chunk-7a7d7a82.cace920c.js 765 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7a7d7a82","chunk-2d225639","chunk-121f0b83"],{"0195":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAADxUlEQVRYR+3Ze2xTVRzA8e+5d+3K6Na6MAMYQxCCUpAME/UPJMjIhIAzookv/jELuM4XCSYKcepIls3IwwhsYOKUmJiosAioU3STmYxkhKCCImHxQaZZbGVbu3Z9jNt7TDu6F+vWrNyuJty/bnMev8/59fSce08Foy63k6UqFAlBwegyQz9LfIpKm81NizhEJB5LxG8uO7lFgXoBqw2FTNC5hF91ldIZtZyKVo0B/y1ldlY2bUhunUpcPLaEEArF+XW0xoDd5RwTkpJMwA0aBH/ZgywQvjIcmuB8RuGGJuDTwuOkTMKBDAXWi24nWwXUZCJQSr5MP1AB9OTSkXag6liNddNh+o5sQ/t+34TKtAJVxxqszs8QJgtIif/TzWgte8dFpg0YzVxu+VECx3eQs66C0IlaLCvK8B9+Ce3EnoTItAGz7n8BRc2mv3kn9v2S3p33oeTNRLltGf0NW6YeOFwQB+q/n8ysORjX3ACO/l7MD2wjZ301oZY6Qp88N1SsQO72P1Hts+jdtRz90ulYmeEZFDflI3u6R0Cmb2nFNOduvFULka4/YmXRH4b18T0EGl6hv+mtwfqGA60VP+OvunNEIkXBHPJeu4B26TR9b69A2HLJe/1vNNdF+nbcM2LnmBJgVGsu3krOIzX4PyzFtHgd2UtK8NYUIjsvjBiMIUB1yUOoMxfFAllWvUioeWBxjfxznsi5YwMABaa/fIasWQsR5mkEPt9Of2PlNUuJIUDl9iKUmxfEgk1bW0GwsSp2r7vb0S9+N4gQsx3YXj1HxNWOr9oB2rVLnSHA4WHGmoPDy227vYR/aST0/pNjLsQ3gFiIvtIkvOx7w4TPHiX43mNTk8HENCAb8qp7uNLeQvDd9ekFKvOWYXUewffmYmSXa1zneIWGzEFl/nJyn/+KUGs94YbNICftu/5b3QDua3RvJ8Gm3aSkA6xP7SfwzS70y79BXxfaD4cSjjapB1bz2kpySt5ABnvR/V2TT93VlmrBXCKeTrgSJuJuJ7BvTWrA6A5h2fAB5sKH8b+zEr3jp5SQhszB6AmOZUM95qWP4qucgfSNsUUkyTYGGA0uIOuuJ9DOfjzmFpakD+WOYmTHt8jAxC2SmoMTd2Ncjf8H0OOkXEKdcXlIqeeDwv0shSadH1PqxqDGQrApdoDZU0YTglUGxZlsty67wvwY0LORudLEKWSaD84T0zUFHrQd4PjgIbrnGebpgo+E4N7JDvk6tesQKqX2Wpqvrm5D3UoQXicrgSI9zX9DCIlPl7Tlh/lCHBx64vwPdNsYfdxqBdUAAAAASUVORK5CYII="},"0585":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEUUlEQVRYR93ZfUzUdRzA8ff39zuO4ziO40EppYnTSQ9W87GHrTAGuIgeTMbmyNWICeofSgbTlmY1lR5sNSUyYC0qezBz4rJYEWxUajOdmjqbTQY5NRDhnjju7vf7tbuNCyKIhzu8+f3rtrvv5/Pa5/v4+52gX9M2I3VdIQdI0zSSBYj+34fyswYdQnDEItgr3sXelysAsK7gVkVit5Qyf47u7lykhGkIWRdK0z+xNQ2t+zKec9/jPVV3SVYpjN3FQd8P/MDuZ5mpRnHYkF+bYLh3+cSghsjiuXAY565MRbPan4yrpM4PvFZMoyFv5yLDQ6uvK64vuQ/p2H5fu0VipmhfybyI+KSjsa9cBEkOC6APYa9ehvLrZytEZxGrItJWVZiWVYQNzgdxHarF9dHTtaKzmPWRWS9sMy7ZElZA92/f4NiZ/fWNA9R6Hdi2P0B04R7kyTPGVm1No3tTCoYlbxE5d+mwMUZdQa3HSndJLKaNp9BNnT02INDT8A69e9diKPgcw/y8IeOMGOg+14j61x/gceL6Yg36R15CsiSPGejr6D5UjdpyZFjkiIGOPevwnvwUVC/a1XZEnAV0UeMC0tuOZvUi35lDzOoD/xlrxMC+3sEaYtXegf3tdJB0mNY0IEXHhRFQ07BuneM/EExrfkAyxo5/Dg5VQaWzFRQFyXITImLgkCvX/gSvBylmEsJgGoBwNVcTOT8PEWUO7Sp21r+Je18p+swyjEtfCyRTOlqwbZ6OiJ+GecPJ/4UMpRz/HFQVrNsfRG39mZiN5wN7o70qD+/xPUSX/UJEyoIxL6bxAwHl8u/YtqQizUjHvLYB9+lvce54GH1GKcbc18eM829Foz3qhlrFzvo3cO8rw5BfRW/9iyBkzJvOD5qXo9UGDejbH63lC1HbjvsNxpIm9LPSAh7frUS9dHaQT5e6CP0di0O3ivtH9rQcxVG+AN3CfEwFHw9I6mk7geboGASR41OGPdODV0Ggb/j1izdgXLJ1tKMZ+o067IFK10Vs65MH7YnjKWVQh1hpv4DjkxXoZmdjzCgZjyvQN6jAoIj+FeTGAfouBUKOQOijAzdqOXE66tVW5Cm3haJ4/pgjrqDzyzI8x2owFn2HY9s8okt/ouer50EXibmk8foD8bqxvZ+LeuEAmg1EwiTQW4gpaUYyJ4UB0EfwIavyUE7sR9w8i5jnmpFiJocMN6ohDii8bpxNFRjuecp/EQ11G/EcDDUkaBfWiYYGKthVTJF8f+F7puVVE20YNp/rxxpcuwtrhK2I25U4y+nYV6+ATh82SFvl4yin6p7xv8DsXEldZPbLjxpzNoUF0H22AeeOjDaLgVQ/sKOYqbLgkP6x8luMWev8D9XXq/We2I/zwydcuMiKr6Q58BLdj4QPROKUTN1deQjzlIk1uqx4zxxEaT12RpUpSKzgiA8w6G+G9tXMlbykC4nEiRQKFbuQOBybRJPYjLcv9986trmXxtT73AAAAABJRU5ErkJggg=="},"06c5":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("6b75");function i(e,t){if(e){if("string"===typeof e)return Object(n["a"])(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n["a"])(e,t):void 0}}},"092b":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEu0lEQVRYR+2YWUirRxTHz8SFqEiRa0XFtV5FTEVREFFcUPoqQt1iBReCCbghLhQfXEFf9MHdGJeXQjUIvlQTVBRxuX1oUawbRkEUFbc0EvcYv3KmJER7rTH5vFroQOBLZr45v/zPzJlzhoBBk0ql1kql8ntCyHcMw7gSQiwM+1/5+YgQMsfhcAYEAoFSZ4voHiQSSej9/f2Am5vbRy8vL7C3twcOh/PKTH9PzzAMXF5ewt7eHmxtbam0Wq1IJBINYh8F7Ozs/Nba2no2Pj7+K09Pzy8C9ZQRpVIJcrmcUavVP4hEop8JwzBELBbPx8TEhPv7+78pnM746ekpDA8P/0kI+UgkEkm4vb39p9TU1HcBp4OYmpoChUKRj+rl8Xi8tsjIyHcFqFAoYGpq6icE/DE4OLghLCzsXQHu7OzgWhz5H9BUt7yagvf396zEz1cBnJ6ehrOzM0hISDBVOP17rANqtVpIS0uDi4sLGBoaAltbW7MgWQeUSqWwvr4OXC4X7OzsIC8v7/0Anp+fQ1VVFSQnJ9PzdGVlBQQCAbi6upoMyaqCra2tEBsbC+jmzc1NiIqKgvb2dqitrX17wIODAxCLxVBdXQ2Li4sUMCkpCbq7uyE0NJR+TGmsKYgq6dxpCHh9fQ0VFRXQ2NhoUthhBXB1dRUmJiagsLCQimQIiN/lcjkgaGJi4otFZAWwtLSUbg5Mbj8HiIkojkGVcWe/pJkNODk5CYeHh8Dn8/V2HyuIHajy+Pg4FBUVvYQPzAK8u7uDkpISaGpqAktLS73hpaUlWFhYgMzMzAcw9fX1kJGRAR4eHkZDmgU4MDAATk5OEBcX98Ag7uDZ2VnIysp68PvR0RFgKKqrq3t9QLVaDTU1NXR3Pm5PAeK43t5eCAwMBGPzTpMVbGlpgfj4eODxeA/4NBoN9PT0wNraGlRWVoKjo+OD/tvbWygvL6fLwsLi+WrWJMD9/X2QSCR05xq2+fl5QLenpKQAVoVtbW0QEBAA6enpYGVlpR+KIUmlUtFA/lwzCRBPC6FQCC4uLnT+3d1dLFnB19eXbgJDGB00wkRHR+t5ysrKqMK60PQU6IsBl5eXsYiBgoICWmT39/fD8fEx5Ofn/8OdOqPo9sHBQZo85Obmgre3N814ZDIZFBcX/6uILwLUBVxUcG5ujhrIycmBoKCg5zxF+09OTujSwGCdnZ1NlwDGT7zBYEVBDMoYPjBbxvIUjy5TrkXQC6g8bjAsKxsaGswHRDdhnodXEpgxOzs7G6Xa40G4c1FB9MbIyAj1RHNzM0RERHx2PqNdjEUQrrWbmxuazl9dXQGeJGy0Dx8+gI+Pj3mAbICYMofRCpoyORvv/CcAZTLZL3j1IfDz85NgTfGeGh6ZMzMzPaS7u9uPy+Wu8/l8Ypg6vTXs6OgonlTp9Ia1q6trMCgoKCU8PPytuaj97e1tGBsb23RwcOBRwL6+vq81Gs1scHCwX0hIyIMk9EsTb2xs4KGg1mg0cSKR6Df9JbpYLMb8qMPGxibJ3d2d4GFuTFrExh/A4I0xFot+lUr1KyEkVygU/oFz6wF1hjo6Or6xsLDAVNmNEMJlA+C5ORiGuWMY5hAAPgmFwt8JIYzunb8AFAb8PO1U3TwAAAAASUVORK5CYII="},"0f9e":function(e,t,r){"use strict";var n=r("ce0b"),i=r.n(n);i.a},1375:function(e,t,r){},"13da":function(e,t,r){"use strict";var n=r("9d82"),i=r.n(n);i.a},"153d":function(e,t,r){"use strict";var n,i,a,o,s,l,c,h,u,d,p=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"canvas-frame"}})},f=[],m=r("d81c"),v=(r("e3d9"),r("3643")),g=r.n(v),y={data:function(){return{}},mounted:function(){this.threeStart()},methods:{initThree:function(){u=document.getElementById("canvas-frame").clientWidth,d=document.getElementById("canvas-frame").clientHeight,n=new m["WebGLRenderer"],n.setSize(u,d),document.getElementById("canvas-frame").appendChild(n.domElement),n.setClearColor(16777215,1),a=new m["Clock"],i=new g.a,i.domElement.style.position="absolute",i.domElement.style.left="0px",i.domElement.style.top="0px",document.getElementById("canvas-frame").appendChild(i.domElement)},initCamera:function(){s=new m["PerspectiveCamera"](45,u/d,1,1e4),s.position.set(0,0,600),s.up=new m["Vector3"](0,1,0),s.lookAt(0,0,0)},initScene:function(){l=new m["Scene"]},initLight:function(){c=new m["AmbientLight"](16711680),c.position.set(100,100,200),l.add(c)},initObject:function(){o={time:{value:1}};var e=o,t=new m["CylinderGeometry"](100,150,400),r=new m["ShaderMaterial"]({uniforms:e,vertexShader:document.getElementById("vertexShader").textContent,fragmentShader:document.getElementById("fragment_shader").textContent});h=new m["Mesh"](t,r),h.position.x=0,h.position.y=0,h.position.z=0,l.add(h)},threeStart:function(){this.initThree(),this.initCamera(),this.initScene(),this.initLight(),this.initObject(),this.animation()},animation:function(){var e=a.getDelta();o.time.value+=5*e,n.render(l,s),requestAnimationFrame(this.animation),i.update()}}},x=y,b=r("2877"),w=Object(b["a"])(x,p,f,!1,null,null,null);t["a"]=w.exports},"16d0":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA/1JREFUWAnNmGtIVEEUx/9zXbU0LRMsi4oiwR4WVFCRUVSGPbC0IKI+FH0JKh/1oSAIMimowBJ6UIEIfagkNfsgFtGDCiGj0jJ7k2WhVvggTTe9/Wevy17ade/eu7rsgdG5Z+7M+e3MOWfOroAHST+hxvWGY7yiQvEwPCQqJQQ/SnaLz/8vLvSK9fnq5j5gvxCYrdcHsN+gqjjfPgr597aLP9KuBqiqIu00LvJhRwBhvJmqCvuD1OIDos1xhOsKuGvBAyfBF9jDUSQ7Ys1ZNcbWg8/sR0lFUInAIoVwKwkVfHCEoj9mKPTCCUG1azoYut0U6YM2nS64ugJhPue5kBAgZQ4QMTywn8EnQAmXtQrYtRjIzQgspCGghMsm3LSx2s7FRgJHNgQO0hAwfT6QSLgD1zXAk7eBHjuQKWM/AGIYILdfApUvgI7fGk1nN3CoBIiJDgAdTRgCtrW7g9i5g80/3fVDoTE84qEwamZNwx30tFjiJCCOd8/rb0DLL9cbCUz58SOB+u+Dt8OWdrCjiylnKZCT4iyHgEhG9+G1wEbmytYOF7S/PUuAjc3AxUfAdEb34iQNYVsyEMqUdLySUd7jwlrCcdmsiqUjlsbuPAMWTgZ2Eox3JlISgQuPga9NVlE8z7MMqHK908yJZ7bwqJcBNfTHimrNSChXTSK8lIQx2v8OR30MPP8A9LFs91UsA0oDXTTaxhYVDjQxHbE8cgi/X2BqP1jcCE3nfK75SEBN5dNfvwC38m4ex4R95612xFWfgKfsdzOZX3uo2Xf63/1an3jcXrIUJHKVmTzCNDp/CW+ZMwyMdz94Z/Ooo6PcbPilsAQoU8reFdqxXmNgSJ/Kpz9GhLLqkalHRk2/PHkPyGZVTAMqnJG9EhgdAZx7oBUO0vg3pp7SGmAuk/U6FhhO6WTOlM2qmPZBGwGLuGuFzIMSSi9XqbtX7z1Kk2fQTxnJMsB8EdM72PNXy3X/w0ljdudYy8CmUwmYy3py+LCB39GPmAbUT7bSz7uh7bCvkIZHLNPEpnkulIOr6Xe9rmcrvXBajaUP56QCR8u8r2AIWNcIXOr3l0OEK2c++6qrYLwv73lUHnPMRBbCdZ7H9VpDQFlO6Uuq2i/AJ15rVmUpf5aSkX6UuVMmdSMx5YPVDUwZukrFaHFP4zK5H7sFVL/xNOquM9xB/ZS8Uv2Ttf7ey+bmmdpBc0sPztuK2gc/D21wQAZYpUvhj7w+xNIA04dYLfrwSrEL3KUdfs0JOuntteGKUpEpullnZhGvv9wMDlAWROdu7hH1jiApzxbFqkAO0fy8IwbtwxWGtmKfXE1XubEAPaXOokIOLGeLZwtklLPkRbVQUVCWIyrYd8g/iwYAmJpgrqQAAAAASUVORK5CYII="},1928:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFS0lEQVRYR8WZWUibWRTHz9cmKKY4UREXxIpKg8El7g+Tahjqy+gU5sF9FEQlsYobKr5Ygogj2s2lLoljW3xxx4cO0QdFJtFxptRqKV3cyrg8pG44aKtRv284l8lMrNrkS6I9EPgg57vnl3PPvfd/bigwsLa2Ni5FUXEMw3wHAC6G313A8zbDMJM6na43Pz//b308Sv+gVCoDaZrucXNzE3h5eQGPx7sApv9D7O/vw+rqKrx//36dYZhsqVQ6iN8SwObmZgGXy/1DIpF84+vre6FgnwdbW1uD4eFhZnd3N1kmk3UTQIVCoRGLxd/6+fl9VTh98PX1dRgcHNzgcDi+VEtLSzCfz59KTEwEivpvxr866OjoKMzNzeVQbW1tuUKhsEksFlsFSqfTwbt37+DDhw9w6dIlcHV1BYFAQJ7Z2OzsLIyNjXUiYLlIJPo5IiKCzfsnfBHqyZMnsLi4SIBcXFzg8PAQtFotZgKCgoIgMzOTAJtiS0tLMDQ09KvFgJix+/fvw/LyMkilUggICDgRn6ZpmJycxFqHmJgYSE1NNcpoFcCDgwMoKioCzH5aWprRGsaM3r17l0x3aWnpFyGtAlhbWwvOzs6QkZFhNCOGDnK5HIRCISQkJJz5nsWAr169AqVSCQ8ePDCauc8pMPNYj1gaTk5Op0JaDFhQUAD5+fng4+PDKnt6Z9xGXr58CYWFhdYH3NnZgZycHOjs7DQLDl/CxYV1293dbX3AiYkJsiqLi4vNBsQXcQbKy8vB3d39xDgWTfHAwADs7e1BSkrKsYFxqzkrq3l5eWBvb3/Mv6qqCuLi4kAkElkf8OjoCOLj448NvLCwAPX19WBnZweoTvCjN4RxdHQ85o+7AO6LwcHB1gVUq9UwMzMDmBVLrKSkhCwSDw8P6wJub2+TgR89emQ2H27auA/29fWdek5bVINIhdkrKysDT09PsyBxFsbHx8kiOc0sBpyamoKenh6oqalhDYhnc1ZWFlRXV58pHiwGRKqKigqIjIwkK5GN1dXVAZ/Ph+zs7PM76nBk3GowE1hLN2/eNMqImWttbYWVlRXAVf0ljWiVDKLWQyWOJ8uNGzfg1q1bZ9Yknt2NjY3g7+8Pubm5RgWsxYDT09Nw7949eP36NcnclStXiEJBWBSnhoIVfXExoV709vY2mml0sAgQF0hDQwM5qvDQ7+rqgtu3b5Np3tragjdv3gB2Z2hubm4QGBgItra2JoHpncwGxF4DtxgERPmOJ0pSUhL09vayAjDmbBYgKhCcJqy18PBwEmNkZARevHgBeCpY08wCrKysJPpP31MgMKrppqYmcHBwsCYf+xrs7++H58+fk81Vb48fPwYul2tSE8SWnlUGUfneuXOHdGX6Yt/Y2ABU1QjJ4XDYxjfqbzLgx48fyTRiN2aoOnC6JRIJREVFGQ1mjoPJgLjBouLATkxvb9++hYcPH5KN97zMZMBPnz5Beno63oCRFpNhGNKPYF9rbsNkyo8yGRAHe/bsGanB2NhYcoOAd4dndWOmBDfFBwFVKtVTSqFQZF+7dk0RHR39xfc2NzdBo9EQFXL9+nXWvbApUIY+eBppNJpfqPb2dl8bG5u55ORkuHz5Mttxzs1fpVKh6vmJXAi2trYOhIaG/hgWFnZuAdkM/G/9/bW/vy8ggB0dHc4HBwd/hoSEeIWEhBiVQmyCsfWdn58HtVq9q9PpvpfJZL8ZXqK70DSt5PF4P1y9epUshIu8cUXxi0J2c3NzGgAypVLpFP64E3e+SqXSj6Zp/BvCnaKoCytKhmHWaJqe1Gq1v8vlclqf+X8AQ3ocEMh+0esAAAAASUVORK5CYII="},2330:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEzklEQVRYR72YW0icRxTH/7OrKxqDEkW0xggGEfVBNC67rlhX01Ibn4IvXpqXQBC8JKZiaxVvVTRWmmDSJF7QWIsKPoht44M+iIi3BSOoKAoWFIqQGAXFgvcpZ+im1iZ+387u5rwtO+ec3zfnMmeG4YyYzWaX/f39GACfAHA9+78zfjPGOIA3u7u7r+bm5v467YNZfxDY3t7etxqNpoBz7usMEBU29wD8DKBkcnJyi9YLwIiICJ2Xl9dvAL5QYeRjLPnj5OTEbLFY/hSAJpPpR8751x/Ds1ofjLGxiYmJT5ler/d3cXFZA6BTq/wR16Uwk8n0Fef8F0c5ZYwhICAAPj4+ODk5wevXr/H27VtZ8z8xo9H4DWOsXtaCVe/y5cvIyMhAdHQ01tfXsbGxAYL19/eHr68vxsbG0Nvbi60tkftq5VcWFxdXDKBOrcbZdQRx69YtJCYmoqOjA+Pj42LnToubmxuuX7+O9PR0dHV1YXBwUK27AbsANRoNysvLsbm5iWfPnuH4+Phcxx4eHqioqMDy8jLa29vVQNoHmJOTA845nj9/rsaZWEMfVVlZCYvFgoGBASU9ecCQkBAUFhYiPz//fyFV8uru7o6Wlhbcu3dPKSflAWtra0U+LSwsKPG89/8bN27gypUraGpqOk9fDpB24PHjx7hz544UHCmRDcpDqvxzRA4wJiZGVO2jR4+kAUmRPrKqqkoU2QdEDjAlJQWXLl1Cd3e3XYAlJSXo6+vD0tKSYwFv3rwpmjAZt0fu37+P4eFhzM7OOhYwISEB4eHhohLtESq05uZmrK3RKPBekQuxn58fysrKRIuRFeqHlCKZmZnntSk5QIKiL6dThIYBGYmNjQXlck1NjeOrmCzGx8eDQv3gwQOb+Sh/nz59iocPH2JlZcU5gGS1vr5eHFejo6M2Qd6+fRsXL15EY2Ojkp58iMmyp6en6GVtbW1iilEj1JgNBgOKiopweHiopGIfoLe3tzjuvLy80N/fjxcvXnyw6QYFBSEvL0+cvRRaFXAELw949epV3L17F3q9XuzCwcGBGKN2d3cxPT0tiocqNTAwUOwYTT200zMzM0q7dvp/OcCwsDCUlpais7MTZrMZycnJePLkCXp6ekCTdVRUlDhpCIom6/n5eTFlS4jtgBRWgqE+uLq6CldXVxFmmpbPTtISQGdVbAOkkFH+UL6NjIwIY0ajEUlJSairk741OK7N5ObmiuS2HnFarVY0bAq3bMNW2GX1O0h5lpqaKtqDNZRpaWmgkFPyO0nUAdJ4T3Mb7eDOzo5goR5Ip0F2djb29uhJxSmiDKjT6dDa2orq6ur/HEsFBQVYXFzE0NCQU8j+MaoMGBkZCZr/Th/qwcHBKC4uhvVW50RCZcALFy6IoqBQUhMmaWhoEJd02QuTDR+kDEjG6FUgKytLPF2EhoaCoGWmGBvArEsFYAEAxdsPXRGp321vb+Ply5c4OjqS8GezSi8zGAyfazQap2a6zVj/KpSwa9euuep0OrpWhdhhyBmqB5zzMPHCajQav2SM/Q5A6wxPkjYrJicnv3/3iG4ymdI55/Tk5C5p0FFqnHP+w9TU1HcA+DtAsq7X64O0Wm0uY+wzAIEA3BzlVcEOVdwbzvkE57zZYrG8sq7/G4As9QnAx8XPAAAAAElFTkSuQmCC"},2899:function(e,t,r){},"2c00":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEUElEQVRYR+3Zf0wbZRgH8O97d712R0vL3MABbjMIJhjGnGYmk02LMMzGVBxjfyzGhYAtytT9IqKIYWxZVIjJGIywkIwoy4zERQeaqrgtQYQ/ZHMytplhdM4Qitn6A0p77d2ZHhaBlQZWWjBZ/7rmvfeez/vce+/z9kow5WM24lEaSCcES6e2hfS7BDtFo0trxjnyGQRfLOI7+NuIOApopJbEZjGr8kAiY0PquePiThs8fa0QblzsE2nkL6lFt/ccGTiUj1hGiS52y+EHuKx9AMWEFzchmuvnL+BoesEJFzIX16FDBt4qwpfKTRVbuOzyeYNNDMxfaYejJuNP3SiSiN2AZCFKd1lbOQgw7IIAehH2uucg9J7ZSSxGGOh1BfXql44vGJwX4uxohPNkQSO5ZcRbyo1vH+ZyDi0oIN/7NUaObmoLP1D0zOghnBcg3/cNHA1ZUOXUQfVUUcA7FnYgf9kER/2zgHtscVPlHYVK/9q0yLAC5czVZYHNeg98WwUY/evwnD8C1bYaqPTFfpFhBTrP1kIUeHAZu2ExEkTs74BoG4LQ3wku94P5B04U+ICKhCcX1hz0ae4Bp94Xh+lD8KdLwOh3Qb39yH/NogfW8nhIlkFE7OuGYuVauS3kGRRu3wQdFT8BIsBWvQHiH53QlF0DfX+S3OZ9MJyfFoN9sQrcxr3j54ccaD2QDG1536RECubrsFcmglq5AZF7zkGwDsBeEQcq5jFElnQDFD2/QG90h6kK/On9UL3cBM8vZ+C51AJ1aS+YuEcmDSYkGeQvtcEzMJY19/dlUKQflI+ZZclgV20eA4gCbO+vhTjQA/AAm10JLrvsjqUkNMBrZyGa++Vgrra9UG6ulo+p6ASwD+vHEZ6/ejF8KAUkJhHad3r97i9DApyYBn9zcNJCvJuASdkBdf4nfhfie0Bp1A6ySDNtmbIUEzCp26EuPDU/GQxUQCXXCGylatBJOVAbPw8v0N3/AxzH0qAu/R30fSsCOQO2hWQOuq93YKRmPRRpexCRWwWQ8d/7s4bOOdCHI5HLocwsCwonl8DmQrCZJaCiE0EioqBcs9XvIGe8YXW0HgTf+i6wCCDqZbPO2NQO0tAAiC4CUESCil4Nza6vggN6K8RwswHChUZwb/wExYo1QSHn/BbLGkkaQ/Ych6ZiEJQm+q6RoQH+i3T1tECZ+nxQr0j4q+1glj8OitMGHOSM5+BdpyrIjv8foMWIIjrNUKfeUR/kmOe2u7OzCc6Pd54g5lexmo2KuaA9cHNG70zmljH91YYbtkG42FIol4TbBnzH5n70DJfxZrjiB4zj/u1HjFSvG9QBD8lASwEelJToVuUdW6pabwi6WgQzSv7X8xhteNpDRpCtrYdpvKhaXkGCSNBMxac8oUjdCkoXF0ycWfcVR63wXDFBvPrtDUIjX1eLdu9FJlV9CSBWI7x7+HQxzH9DEAl2UULXYhdayQk4fSP8B6SuiH0n8o2HAAAAAElFTkSuQmCC"},"2cca":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAADnUlEQVRYR+2ZaWxMURSAv9vpdFrasdRO0lhDIgghYolSxJqhtYwtiMQW2nQkdkItJWIZu0T40ya0ljYUsUXjh+UHsZWkQYmUSKq2btPpXHnzjLZKZ6bevJK4P+ee5XvnnnvuyRnBz2uDDLKE01UYaS1diBr7AfpBVFD4MZInN+aK0qoufgBMTpOGsnxsAmxAqwBxeDP7FTgWEsb69AXikyLsBpx/RBrfl3BGwjhvFnTZFzwzCEaciRdv3IATdsutUrBKF+c+OhGC7IwEES0m7peRLidvgFAfdfUTk4wQFrucjiRVP69+edorJtjlcinZ7peafsIZwrJHrgSS9fPphydBlq6Ajc2weBik3oFXb30A1ROwcSPYFgutzFDkgDWZkJfvBVIvwCaNIDkOXn+AflHwMB86NVMhX9YGqRfg7KHQMgJ2ZcGpJWA7Bf07QufmsPF0LVHUC7AqQkYCJKZ7iZxH4T/gL05P9whGNITB3aCoDLIfVRKZQiCmB5S74Op9kFLd0x1Qcbp0NMR0gdWZkJOngkwdBNP6wN4bcP1BJXi9ACrRss8AISA+BZSCvN8Kd1/BjnPVz7leABWE9m1g5yS49BTaN4UWZliaAsUlOgAqTaPJ9Ot6VeaozK+4ATCrLyjpphRhz3EHvMwYjbDiN732getQ6G7OYVhPiI8Gpwts6fD6Xc2PqrcjbhEJ+6zqMxbVFBwVYEsFR7kOR+yt7zAYYJsV2phhUQq0i4StFjj/BI5e/QsArYPB2ht2XoObj1WghSNhVDdIugD3cuuxzHTvAJvGQ85bWJumXhBlhYXC4dkQHATxJ6CgMMCFOrwBzIuGY9nwpagyIhHhEGxQy4lyo6uuhg0gxAglpVBaFkBABWJzLHwqgaSz4HR6y8rf72t+i5W3dkuc6jD5IpT+FCV/UY/PgU0X4MV7qHDB5y+1WPCl3Zo5BCb18hfDN/nnBbAs5Q8BlWRPigVzKGzOgq/VRju+gVSV0jyCnhu5MVZtBtak1Sy+/mBqnoMe56EmmD4QTt6GomJ/kKrLThkElx/Bx+/PY62WfMnBuqNooPmvACYCuzT4Xs1NSEmasOyWwxFc0dy6BgYFrBPu6WoxuVIQpYFNLU2UO0Po6p6wWuxyDJLznpGwll7qbEuyPTNRrPwxRLfY5Vwkh5Tuvs5GNVKUErupLcvSp4iKan8zjD0oOwQ7SABivk/6gzTy6YuZAgR3glwcOJsobnkUvgEmtZ64C0w1wQAAAABJRU5ErkJggg=="},"2f21":function(e,t,r){"use strict";var n=r("79e5");e.exports=function(e,t){return!!e&&n((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},3643:function(e,t,r){var n=function(){function e(e){return i.appendChild(e.dom),e}function t(e){for(var t=0;t<i.children.length;t++)i.children[t].style.display=t===e?"block":"none";r=e}var r=0,i=document.createElement("div");i.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",i.addEventListener("click",(function(e){e.preventDefault(),t(++r%i.children.length)}),!1);var a=(performance||Date).now(),o=a,s=0,l=e(new n.Panel("FPS","#0ff","#002")),c=e(new n.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var h=e(new n.Panel("MB","#f08","#201"));return t(0),{REVISION:16,dom:i,addPanel:e,showPanel:t,begin:function(){a=(performance||Date).now()},end:function(){s++;var e=(performance||Date).now();if(c.update(e-a,200),e>o+1e3&&(l.update(1e3*s/(e-o),100),o=e,s=0,h)){var t=performance.memory;h.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:i,setMode:t}};n.Panel=function(e,t,r){var n=1/0,i=0,a=Math.round,o=a(window.devicePixelRatio||1),s=80*o,l=48*o,c=3*o,h=2*o,u=3*o,d=15*o,p=74*o,f=30*o,m=document.createElement("canvas");m.width=s,m.height=l,m.style.cssText="width:80px;height:48px";var v=m.getContext("2d");return v.font="bold "+9*o+"px Helvetica,Arial,sans-serif",v.textBaseline="top",v.fillStyle=r,v.fillRect(0,0,s,l),v.fillStyle=t,v.fillText(e,c,h),v.fillRect(u,d,p,f),v.fillStyle=r,v.globalAlpha=.9,v.fillRect(u,d,p,f),{dom:m,update:function(l,g){n=Math.min(n,l),i=Math.max(i,l),v.fillStyle=r,v.globalAlpha=1,v.fillRect(0,0,s,d),v.fillStyle=t,v.fillText(a(l)+" "+e+" ("+a(n)+"-"+a(i)+")",c,h),v.drawImage(m,u+o,d,p-o,f,u,d,p-o,f),v.fillRect(u+p-o,d,o,f),v.fillStyle=r,v.globalAlpha=.9,v.fillRect(u+p-o,d,o,a((1-l/g)*f))}}},e.exports=n},3835:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}function i(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)if(r.push(o.value),t&&r.length===t)break}catch(l){i=!0,a=l}finally{try{n||null==s["return"]||s["return"]()}finally{if(i)throw a}}return r}}var a=r("06c5");function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){return n(e)||i(e,t)||Object(a["a"])(e,t)||o()}r.d(t,"a",(function(){return s}))},3846:function(e,t,r){r("9e1e")&&"g"!=/./g.flags&&r("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:r("0bfb")})},"386b":function(e,t,r){var n=r("5ca1"),i=r("79e5"),a=r("be13"),o=/"/g,s=function(e,t,r,n){var i=String(a(e)),s="<"+t;return""!==r&&(s+=" "+r+'="'+String(n).replace(o,"&quot;")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var r={};r[e]=t(s),n(n.P+n.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",r)}},"38c2":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAADxklEQVRYR+XZbWhbVRjA8f9zkyZNurbpiwZ1dqijUwdbbVEcItOOFUTraJ0fRHzf1lZFsA7X6gcLFcvc1lZlbx9mYR+mMKazuDLfB4puWjtBF6SCTKdV6dquSXpXbpMcyVWzdTXNXfPSoPkUuOc8zy/nOfecc2+E8z6qDe3MH9wFrFSKhQJy/vV0fldwWoRjHuGA7CD4T64YwL+Ba8Ma+4Ab0glJFFvBbzbFusLd9EXbmsDxx1gcyeEoUJIoQIauhxHqi3bSawLHGvkEuC1Dya2lEYY9dhbLcBNVdkW/tV6ZbSWwQUYbeFyE7ZlNbTGbsFdGG2kR6LDYJaPNlOLQfwjohLynB9D3rEENn5rbSArkt/3A2XeeIzSwP2GMixtBF3g6FePtS1FDvoTB4zVwrGrGXb+ZYM+DhPrfmDWOJaC2pBrt0nIkJ5e8e7vQD71IZPzXOQOjHZ0rHiJn0Y0Eex6YFWkJ6Fz7Co5ltaBp2EoWER77BUJTSQHF6UYr8GJ824e+4864sSwBY71TVGJZAO6nvoFIBP21StRE/N+aeaBAXstxUBH0V6tQ+uyFSAooxSWgOVHjQ3BBxaWoGGy5qOAQTE5H2G9tJNS/C84mniVJAR2rW3DXd6C/vw3j7Y2xbFJ6GYUvnCQ88hOBzeWWIPGoSQHRIK/5M+xlVfjby2Nro2v9fpwVdfi33EzkZHJbfHLA6FnNezUFz59g6sfP0btXYVt6B/lP9qF/2IVxoDlxDRO0SBoYje+oacVd9xLBfU24ajaZN0Cg/ZoZ83Iu2pQAzVI/O0BOWYVp8HdXExk8EvPYVzyC5r1uhi88+DFh3+HkdxIr66BWVklB69dMfvUmk6/fNy2ptnAZLPDOgKiR7xPu6akZwWjqvxdx/b2XMQ5umks1/7XP/wcoHg+FHWPoH3RivPVM9o2glF6O6/69hL47jPHR1uwDpkx0QaDUzcE0CS0BzUNBeBJlTJw7UY/4kKJy1O+DaaL9FdYS0HFPJ87KtUzsvpuC1uP4t96Cq24LKmygd90+/0Ds4F7/LvarbkLLv4TwyM9gTBDsrkD5jSwARglR5LpeHMtrCQ/5CHYvRwVCacVZLvG5TRUcKzcy9eU2VEClHXfxwIyQpiexdJPMgyuW0gSeaaRBwa75hMTNLeyRQAPXh4QTWQp82HyBOdpEryhqswopnPLkssQEnm7kCpvwBYorswGpog+rQk3xTj6NvUQ3kdADrJ5PpAJfxMajpds5FnXM+Jth+AkqtRDVolGaSahECIrG0UIvR6SN2C7wJ1E2B5ffR7qlAAAAAElFTkSuQmCC"},"3ccf":function(e,t,r){},"420d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEd0lEQVRYR92Yeyj0aRTHv795m0Fuo6yVS9rEiuQyyv7GP/6hjchK7f5DFLWk6H3lktzJ9cXmFmpd2+IttSISW4z1y3+0SfmDIvuW9y9Rbs0823lq7OyY14yd34xtT8mP5zznfOac85zzzE+AiYii+C2AEgDfAPjCdM3Bz3pBEP5kjP0G4L0kSX8Y/Qn0EBkZqVKr1aOMsXwHg9hiXg/gnSRJP5EyBxRFcQBAqS27naTDAHwvSdIHISkp6WuDwXAA4I2TnNvq5qNarf5K0Gq1jYyxBlt3OVNPoVCkC6IofgCQ40zHtvpijL0jwCUA6bZucrJex/8TUKlUoqioCJ6ennYF9PDwEIuLi8/ZeHkEFQoFmpqaoNPpsLa2ZhOgq6sr6EMZJSoqChkZGXh4eEBjY6N8gARXV1eH3d1drK6u2gRnrhQSEoLS0lJup7q6Wj5AQRBQU1OD/f19LC8v/ys4Pz8/VFVVobm5GZeXlxxOlggSXGVlJQ4ODrC0RIfeslAaXVxccH19/UTBy8sLDQ0N6OzsxMXFBV+XDbC8vBzHx8fWChq5ubnw9fVFX1/fPwCpBltaWjA8PIyTk5PHNVkAqV40Gg02NjaeTStFOT8/HyqVChMTE7i/v3/Uj46OxvT0NM+AqcgCODAwgKGhIas1V1ZWhvPzc+j1ekRERKC9vf1xT2FhISoqKp7YkAWwp6fHonFTbzExMcjKyoIkSfDw8EBQUBD29vawtbXF1T5nwymA1HoowvX19YiLi+OA1B/7+/tRUlLCU/2qgNnZ2XB3d8fMzAxSU1M54MLCAjIzM+Hj44OpqanXA/T29ubOKVI0FUwBKbKDg4O8tVDve5UaJKc7Ozv8h8QUkP421ibNbKcDhoWFgU4nRcco5oD0f4qg0wGp59EhoPSenZ1xvvj4eBQXF/Pn2dlZbG5u8mcab729vcjLy4PBYJC/D1o6gRSp0NBQjIyM8JZCNUjjbXR0FHd3dygoKODrNDmOjo6wvb2Nrq6uJ5PIIW3Gzc0N1LwptTk5OfSVlbcZAjEVU3B/f39+0mkq3dzcyDvqzCNIaQwPD+ftZH5+Huvr62CMviVaFkp9d3c3Tk9PedonJye5Ynp6OgIDAzE2NvbclLJ+YTUFDA4O5vVFaVxZWeG/qR4J1pIY12JjY0GRpzFIUU9MTERCQgK/2ZjXpZmdlwEGBASAet/nIkZ1aMkhXUxra2u5b4ITRRFtbW3W4Ej9ZYDP5eK5NWMWtFotUlJS+NXLSuSM5pwHODc3h7S0NLS2tvJU2yjWAamHUbO1R+h+SHdBgqOR+AKxDkinlq7r9sjV1RXGx8dfCmdbDdoDJsNeHsEFAN/JYMwRJmro7dZ7xthbR1i31yZj7AeKoBbA7/Yac8B++u4awt+warXaXxljmQ5wYo/JGkmSOjigRqPxViqVq4Ig0Mvz/4L8LElSIQDGAUmSk5Ndb29v3yoUih8ZY8GvRElv9zskSfrF6P8R0ASI6jKAMfYlY39/AAcDP6hUqo86ne6TuZ+/AFoEPGMa7KL9AAAAAElFTkSuQmCC"},4551:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEwElEQVRYR82YWyi1aRTH/+922EjZEmpyMYRNX07twrZTfJfTTEgunG4cyqGcIpLThYxyZpxPRQ4zg+bC4IYLie2TaRDJFA0JDTlEXPC+03pq77ZvfN69X4f51tXbftaz1m+v51nPWs/DwUBUKpWFpaXl9wA+AnA2HHvrb47jLgVB0PI8/+vy8vKVzh+n+wgKCvKVyWS/AFC+Ncxz9jmOOxUEIXVpaek30mOAGo1GyfP8MgC7/xPOwLcgCEKsVqv9mQGq1eoF4vxK4HQYZ3K53J1Tq9UBAP74yuAYjiAI6QSYCeCn1wK0tLSEh4cHnJycwPM8Tk5OsLOzw74lyCABFgH4UcLkR1M8PT2RkJAAV1dXBkRg5ubmcHZ2hru7OzY2NtDf389+N0F+fzGghYUFsrOz4eLigu7ubmxubv7Hv0wmQ2BgIJKTkzE3N4eRkRFjGV8GSHA1NTVYWVnB8PAw7ZlnHVNEc3Jy8PDwgIaGBmMgXwaYl5eH09NTDAwMGONMr1NSUoLt7W2MjY2JzZMO+OHDByQlJSE/P180cp9TUOQ7OztRUFCAs7Oz5yClA9bV1aG1tRW7u7tiUXhyPCwsDD4+PmhpaXl9QFtbWzQ3N7MIShWKImU1Zf4zIi2CarWaZWVTU5NUPjaPVqG2thZHR0dfsiMNMCIiAtbW1hgdHX1kmI6a+Pj4J521t7fj6krfpDCdoqIiTE9PY21t7XUBIyMjQWfbxMTEI8Nubm7IzMzE7e0t5HI5qKropKKiAufn54/06RSYnZ19fUCNRgNfX19QVF4i1dXVLEkODw9fN4J2dnZs76Smpkrmo0N7aGgIsbGxz9VpaXuQqBobG9kmPzg4kARJq0DJRn/01bOYDAYEBCA6OhpUFUwV2r8dHR0oLS0Vax6kR5CgysvLWR2empoyiTE3NxeXl5fo6+sTm/cyQCsrK5Yo4+PjmJycFHPGMj8lJYV1PpTVRvSILwOkXm9wcBBUWaiN6urqwv7+/pOgVLvT09OxtbXFltcIOLIjHdDPzw9ZWVnw9vZmQNfX16xDIdj19fVHDSsdSZRMPT092NvbE420gYI0QEqQjIwM1iyEh4cjJiYGVVVVbJkVCgW8vLzg6OjI/BwfH7Nu+u7uzhQwna7pgHTXoGaTqgC172ZmZmyZ4+LipACIzTENkDqQtrY2todWV1eZcYqgv7+/sR2yGNDn46YBFhcXsz2ku1NQraXEoDb+4uLCVOfG6BsPGBUVxQ7nsrIyveHExETc39+bcgkyBspQxzhA6nzpcKXE0G12BwcHfT0myDcScUAbGxu2jIWFhY+6Dlru+fl5LCzQq8mbiTggHbC0vJWVlXoKpVKJtLQ0FtU3FnFA6px7e3vZoUxXTI7jWA9XX18v+cJkwp8SByRjKpWKRWtmZobV0ZubG7HbmAkMz6pOciEhIamCIHSJWbS3t0dISAi7V9C+E3tFELNn5Hgvvc24A/jLyAnvqiYIQoLuAZNuP1Hv6l3c2d8KhULJAENDQx3v7+8/AfhWfN67aNxwHPfd4uLivOEjurNMJusG8MO7IHzZyZ+CICRrtVr26qsH1OkHBwd7cxz3keO4b3ieN3svWJlM9g/P81qtVrsEQP8c+y+Z4fn0HxRNdgAAAABJRU5ErkJggg=="},"4ad6":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAED0lEQVRYR9WYbVBUVRjHf2cXEHBdUQFdZhBXzd6GBcFiJrOR1iKbPoQz0MDUFOU4jBGODSU01jQ1KdHkkM1kGGNl05tftMw+OH7gg81UA0vAaKiwiLA6tijKywrL7r3NLu3mJvtq91L305lznuf5/85zz3POvUdw02PqwIiLbWgwAwZAc/O4wu0hZFqR2duZz88+LeFrZLdRgYZ9AuYoDBJJ+MbOc9RQitsLmNvO4xL8APiBI4mipI0sU9+VR53IbyV+Sss5IEtJwRhiT8ku7hImC2YEJ2IIoLiLLPO6yG5ju9CwR3G1GAQEHBI5Fmplwe4Y/BV3kSWORQWoFeCWFefyC0QFmKsvZN+yozzRreOKM3bIo3dbqe4vos/hqcvQT8SAq/VmmpYd4yN7A59deiNc3JDjHbkypT1rODPWFjZORIAeuP3GH7E5L/DN1eawQcMZ1Bnq+WJoP4NTVq66/uD4lU+DukQEWLa4jlrDLmzOAayTZ8Pphx1fN89Mh6ONEfc1BpzneXdg8+0BerxfymikPHUzFdb1dI+1hoUIZfCvv2Kf2IsZe3gmtZKi35O5PhU7o2KAHqSceevpGmtBuo2tRlHAUHl7avGrbE2vZcR1LcAsUZNEzYUyOkZbvP2qAC5IgPSE/ICtwpPdAt1jjEjDXpA4EU9V+mvckMbZdDaN4b/2TlUA8/SPUqjfxPuDlUGTWml4jy3p23m6dy2nx37x2/0nAPP0Gziw/DgNl3by1eVdAZNQFLDB+D3JmmQWxqWxMG4RPRPdXvHdtjJsE3ZvOyUBDq+y0+mwsM1adEuGFQVM1E5/cq/Rl/CgbiONF5/3AkxKeCtbI6BpxUmy5iyn+EwG465bV4CigD65YGtwi6GeyvQaynoLgp61qgCumHsPpuQNHLbv9ado3YISPsz6ls/tH3NwaKu/X6c14nD3YZ+c7lIFcKbS/WTlSe7XrZ2xqg8ONfkrftYAjcl3EC/m4pRH/ZACDTrtEkbcg/Q7+mY3g5GezrOWwf81YGZSJk7pIpcn3f4isU20sTSxIOCU+eckI/pgjTQzoeyeM7xJRWo1z/bex3ereqjqL+XlJe/QfeMUdeeLg7qqBujZ3GszD7AxpZj52hQc0rj3pKmyPsSUFHxqqgH6EHZkNlO+6AV+Gm2huq8QVwg4j4/qgB7RB1Ke5NeRI2HhZg0wmjXtzaCpnVeAhmgc1bKVJY6I7HbKBXyplmhUOhIfiNUW0tyCfiApKmcVjIXgYe+Nao6Ft2XBThU0I5eQOdGZxyPTV76H0Oas5GtZUBJ5BAUtBV1aCXN7Hva/76RlNKbfqJRhh4ClCsqHCj2MRLMrkbdO38uYx3DGS3NTB3cKmQxJQqsWaBzY51/nVEshAT8KfwIDrixNJv+UOgAAAABJRU5ErkJggg=="},"50ae":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAC00lEQVRIS8WXT09TQRTFz3lUYrFVjIoxwkqMa2Pc6EYTxQUtUSN/3OmGRLGhLSsTE+oON0BFYsIXEMQYQ1gobmWlH0AXrACNKBH6Ckgs75j3BCyl5b3WRmY799zfnZk7d+4QHkZ7u/bMVi03GIbVAOkMwHpQ1Y5UXBA0RfKDZRkTx5erJoaG+MvNLXcyuBr9UZ2BrxNUB4Ejbs6cOIBvEAd9yCRf9R9cKKQpCG6KmW0C+gEd9QLcbsOvBKJjfcHhfPpt4OZmVazUpZOUOkoDblWJHPRPBzpHR7mWPbMF7EBr08OEbpQDuuFD4Av/TKAtG74FHIqZA4TulRO6CScHx3uDm743waG42Uop73mUKxCRbeO9wRHbnwO2s3eNvo+lJ5LH0Mi5Citzys52BxyKmt2kEh7l/2RG8uFYbzBBuzh83mfOermnssvF+i6VSrfvuf9AsJaN0aVGg2vjHhy9PnRg/tp8quYSZPUBqvegyWtiqSLEcNx8DCni5kQw7o/3BXpsu+aEKlcXzYiIBxD+lM5iBjnAcCz1DsB5N102eMM23JU6DKEHwm0AhpuPrPlJhmKpOW/n+3fFuYCmyNJp+axeQBe8wO1zZjieWoVQ6SbIt+JcTbjLHIGlFjdfIFbLCBZD8fQzSq2ewLu21aFYapLAObcoCyWXhEcUbhWdXLt2nYouIAs1F0ErCeik2y4VmncKiF0MVhbNGW9Xqowl046qKW4mJHWXuoJidJuPhC1ynkXD9wlSTTFOirbNfRZtB/+jESB4c6P529r6xM0n5WrycnfDbvrytj7Oq9Osip+16eeArhe9jTsK+HLvTKClYLO3AV+pSw1QvFMOuKin/un9kR3b22yQ09ATyZITjpyj0Om5oc+G29luGb6oJd31cs9trYjvBjhoWJn+kr4w2QHYfdmXwPIVwLoM6SzIE8D6pw1cgDQF8j1gvD2Wrnrj5dP2G3TfXMyV13MxAAAAAElFTkSuQmCC"},"55dd":function(e,t,r){"use strict";var n=r("5ca1"),i=r("d8e8"),a=r("4bf8"),o=r("79e5"),s=[].sort,l=[1,2,3];n(n.P+n.F*(o((function(){l.sort(void 0)}))||!o((function(){l.sort(null)}))||!r("2f21")(s)),"Array",{sort:function(e){return void 0===e?s.call(a(this)):s.call(a(this),i(e))}})},"5e94":function(e,t,r){"use strict";var n=r("1375"),i=r.n(n);i.a},"6b54":function(e,t,r){"use strict";r("3846");var n=r("cb7c"),i=r("0bfb"),a=r("9e1e"),o="toString",s=/./[o],l=function(e){r("2aba")(RegExp.prototype,o,e,!0)};r("79e5")((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?l((function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?i.call(e):void 0)})):s.name!=o&&l((function(){return s.call(this)}))},"6b75":function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},7563:function(e,t,r){"use strict";var n=r("3ccf"),i=r.n(n);i.a},"789b":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"vtkContour"},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.container_show,expression:"container_show"}],ref:"container_vtk",staticClass:"vtkMovie"}),e._v(" "),r("div",{staticClass:"contour"},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.colorStripShow,expression:"colorStripShow"}],staticClass:"colorStrip"},[r("div",{staticClass:"CP",domProps:{innerHTML:e._s(e.scalarRadio)}}),e._v(" "),r("div",{ref:"colorBlock",staticClass:"colorBlock"},e._l(e.coloras,(function(t,n){return r("li",{key:n,style:{height:e.height,background:t}},[r("span",[e._v(e._s(e.nucolor[n]))])])})),0)])]),e._v(" "),r("div",{staticClass:"movieControl1"},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.contourDivShow,expression:"contourDivShow"}],staticClass:"controlDiv"},[r("span",{staticClass:"movieControlTitle"},[e._v(e._s(e.$t("FEM.results.contour")))]),e._v(" "),r("el-form",[r("el-form-item",{attrs:{label:e.$t("FEM.results.contourLevel"),"label-width":"120px"}},[r("el-input-number",{staticStyle:{width:"130px"},attrs:{"controls-position":"right",min:1,"step-strictly":"",size:"small"},model:{value:e.contourLevel,callback:function(t){e.contourLevel=t},expression:"contourLevel"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"vector Factor","label-width":"120px"}},[r("el-input-number",{staticStyle:{width:"130px"},attrs:{"controls-position":"right",min:1,size:"small"},model:{value:e.vectorFactor,callback:function(t){e.vectorFactor=t},expression:"vectorFactor"}})],1)],1)],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:e.movieDivShow,expression:"movieDivShow"}],staticClass:"contourMovie"},[r("span",{staticClass:"movieControlTitle"},[e._v(e._s(e.$t("FEM.results.movieControl")))]),e._v(" "),r("div",{staticClass:"movieControlBox"},[r("div",{staticClass:"movieControlLeft"},[r("el-form",[r("el-form-item",{attrs:{label:e.$t("FEM.results.startStep"),"label-width":"100px"}},[r("el-input-number",{attrs:{"controls-position":"right",min:1,size:"small","step-strictly":""},model:{value:e.moveLoadStart,callback:function(t){e.moveLoadStart=t},expression:"moveLoadStart"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.results.currentStep"),"label-width":"100px"}},[r("span",[e._v(e._s(e.currentStep))])]),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.results.endStep"),"label-width":"100px"}},[r("el-input-number",{attrs:{"controls-position":"right",min:1,size:"small","step-strictly":""},model:{value:e.moveLoadEnd,callback:function(t){e.moveLoadEnd=t},expression:"moveLoadEnd"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.results.intervalStep"),"label-width":"100px"}},[r("el-input-number",{attrs:{"controls-position":"right",min:1,size:"small","step-strictly":""},model:{value:e.intervalStep,callback:function(t){e.intervalStep=t},expression:"intervalStep"}})],1)],1)],1),e._v(" "),r("div",{staticClass:"movieControlRight"},[r("el-button",{staticStyle:{margin:"0 0 10px 0"},attrs:{size:"small"},on:{click:function(t){return e.moveLoad()}}},[e._v(e._s(e.$t("FEM.results.loadContourData")))]),e._v(" "),r("div",[r("el-progress",{attrs:{percentage:e.loadpercentage}})],1),e._v(" "),r("div",{staticClass:"spcs"},[r("el-button",{attrs:{size:"small"},on:{click:function(t){return e.moveReStart()}}},[e._v(e._s(e.$t("FEM.results.start")))]),e._v(" "),r("el-button",{attrs:{size:"small"}},[e._v(e._s(e.$t("FEM.results.pause")))]),r("br"),e._v(" "),r("el-button",{attrs:{size:"small"}},[e._v(e._s(e.$t("FEM.results.continue")))]),e._v(" "),r("el-button",{attrs:{size:"small"},on:{click:function(t){return e.moveStop()}}},[e._v(e._s(e.$t("FEM.results.stop")))])],1)],1)])])])])},i=[],a=(r("55dd"),r("3835")),o=r("b85c"),s=(r("ac6a"),r("5df3"),r("f400"),r("c5f6"),r("6b54"),r("a481"),r("28a5"),r("5a89")),l=(r("e3d9"),r("4721")),c={data:function(){return{container_show:!0,scene:null,renderer:null,camera:null,controls:null,maxX:0,maxY:0,maxZ:0,minX:0,minY:0,minZ:0,camerahight:5,mufactor:.2,cawidth:500,cahight:500,baseColors:[],contourLevel:5,allUrls:[],moveUrls:[],moveLoadStart:1,moveLoadEnd:20,vectorFactor:518906,loadpercentage:0,movepercentage:0,intervalStep:1,currentStep:1,moveflag:!1,beginUrl:"",beginZone:"",beginflag:!1,beginMesh:null,endUrl:"",endZone:"",endIsload:!1,endLineMesh:null,endShadeMesh:null,endContourMesh:null,endEdgeMesh:null,endScatterMesh:null,endVectorMesh:[],contourDivShow:!1,colorStripShow:!1,movieDivShow:!1,zones:[],moveMesh:null,moveElem:"",meshs:[],maps:[],coloras:[],height:"30px",nucolor:[],reveColor:[]}},props:{scalarRadio:String,endUrlps:String},mounted:function(){this.initScene(),this.initBaseColors()},watch:{contourLevel:{handler:function(e){this.initBaseColors(),this.offHeight(),this.minMax(this.endZone.colorMap.get(this.scalarRadio).scalars),console.log(this.endZone),console.log(this.coloras),console.log(this.nucolor)},deep:!0,immediate:!1},maps:{handler:function(e){this.emitMap()},deep:!0,immediate:!1}},methods:{offHeight:function(){var e=this.$refs.colorBlock.offsetHeight;this.height=e/this.coloras.length+"px"},getcaHeight:function(e){this.renderer.setSize(e,e)},getmax:function(e,t){this.nucolor=[];for(var r=(t-e)/this.contourLevel,n=1;n<=this.contourLevel;n++){var i=(e+n*r).toExponential(2);this.nucolor.unshift(i)}this.nucolor.push(e.toExponential(2)),this.reveColor=JSON.parse(JSON.stringify(this.nucolor)).reverse()},getColor:function(e){for(var t=1;t<=this.contourLevel;t++)if(e>=this.reveColor[t-1]&&e<this.reveColor[t]){var r=this.baseColors[t-1];return r}return this.baseColors[this.contourLevel-1]},initBaseColors:function(){this.coloras=[],this.baseColors=[];var e=0,t=240;this.baseColors.push(this.colorHex(this.hsltorgb(e,100,50)));for(var r=Math.round((t-e)/this.contourLevel),n=1;n<this.contourLevel-1;n++)this.baseColors.push(this.colorHex(this.hsltorgb(e+r*n,100,50)));this.baseColors.push(this.colorHex(this.hsltorgb(t,100,50))),this.baseColors=this.baseColors.reverse(),this.coloras.push("#D7DCE7")},hsltorgb:function(e,t,r){e/=360,t/=100,r/=100;var n=[];if(0==t)n=[Math.round(255*r),Math.round(255*r),Math.round(255*r)];else for(var i=r>=.5?r+t-r*t:r*(1+t),a=2*r-i,o=(n[0]=e+1/3,n[1]=e,n[2]=e-1/3,0);o<n.length;o++){var s=n[o];switch(s<0?s+=1:s>1&&(s-=1),!0){case s<1/6:s=a+6*(i-a)*s;break;case 1/6<=s&&s<.5:s=i;break;case.5<=s&&s<2/3:s=a+(i-a)*(4-6*s);break;default:s=a;break}n[o]=Math.round(255*s)}return this.colorHex("rgb("+n[0]+","+n[1]+","+n[2]+")")},colorHex:function(e){var t=/^(rgb|RGB)/;if(t.test(e)){for(var r="0x",n=e.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(","),i=0;i<n.length;i++){var a=Number(n[i]).toString(16);"0"===a&&(a+=a),r+=a.toUpperCase()}return this.coloras.push(e),Number(r)}return Number(e)},init:function(){this.scene=new s["P"],this.renderer=new s["W"]({antialias:!0,alpha:!0}),this.camera=new s["H"](20,1,.2,1e4),this.controls=new l["a"](this.camera,this.renderer.domElement)},initScene:function(){null==this.scene&&this.init(),this.renderer.setSize(this.cawidth,this.cahight),this.$refs.container_vtk.appendChild(this.renderer.domElement)},initCamera:function(){var e=this;e.camerahight=Math.max(Math.abs(e.maxX),Math.abs(e.maxY),Math.abs(e.maxZ),Math.abs(e.minX),Math.abs(e.minY),Math.abs(e.minZ)),e.controls.target.set(0,0,0),e.controls.update(),e.camera.position.set(-1,3*e.camerahight,4*e.camerahight),e.camera.lookAt(e.scene.position),e.camera.updateMatrix(),e.renderer.render(e.scene,e.camera);var t=function t(){e.renderer.render(e.scene,e.camera),requestAnimationFrame(t)};t()},moveAnimate:function(){var e=this;new Date;e.zones.length>0&&e.moveflag&&e.currentStep<=e.zones.length-1?(null!=e.moveMesh&&e.scene.remove(e.moveMesh),e.moveShowZone(e.zones[e.currentStep-1],e.moveElem),e.scene.add(e.moveMesh),e.currentStep++):e.moveflag=!1},vtk:function(e){var t,r=this,n=/^POINTS /,i=/^CELLS[ ]+(\d+)/,s=/^VECTORS /,l=/^CELL_TYPES[ ]+(\d+)/,c=/(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)/g,h=/(\-?\d+\.?[\d\-\+E]*)\s+(\-?\d+\.?[\d\-\+E]*)\s+(\-?\d+\.?[\d\-\+E]*)/g,u=/^[^\d.\s-]+/,d=/(\-?\d+)\s+([\s\d]*)/,p=/(\-?\d+\.?[\d\-\+E]*)\s/,f=!1,m=!1,v=!1,g=[],y=[],x=[],b=new Map,w=e.split("\n");if(w.forEach((function(e){if(0===e.indexOf("SCALARS")){var a=e.split(" ")[1];"undefined"==typeof b.get(a)&&b.set(a,{inSection:!0,scalars:[]}),f=!1,m=!1,!1,v=!1,b.forEach((function(e,t){t!==a&&(e.inSection=!1)}))}if(b.forEach((function(r,n){r.inSection&&null!==(t=p.exec(e))&&r.scalars.push(parseFloat(t[0]))})),f)while(null!==(t=c.exec(e))){if(null!==u.exec(e))break;var o=parseFloat(t[1]),w=parseFloat(t[2]),_=parseFloat(t[3]);r.maxX=o>r.maxX?o:r.maxX,r.maxY=w>r.maxY?w:r.maxY,r.maxZ=_>r.maxZ?_:r.maxZ,r.minX=o<r.minX?o:r.minX,r.minY=w<r.minY?w:r.minY,r.minZ=_<r.minZ?_:r.minZ,g.push(o,w,_)}if(m&&null!==(t=d.exec(e))){var M=parseInt(t[1]),S=t[2].split(/\s+/);if(M>=3)for(var A,E,T=parseInt(S[0]),C=1,L=0;L<M-2;++L)A=parseInt(S[C]),E=parseInt(S[C+1]),y.push(T,A,E),C++}if(v)while(null!==(t=h.exec(e))){if(null!==u.exec(e))break;o=parseFloat(t[1]),w=parseFloat(t[2]),_=parseFloat(t[3]);x.push(o,w,_)}null!==n.exec(e)&&(f=!0,m=!1,!1,v=!1,b.forEach((function(e,t){e.inSection=!1}))),null!==i.exec(e)&&(f=!1,m=!0,!1,v=!1,b.forEach((function(e,t){e.inSection=!1}))),null!==l.exec(e)&&(f=!1,m=!1,!0,v=!1,b.forEach((function(e,t){e.inSection=!1}))),null!==s.exec(e)&&(f=!1,m=!1,!1,v=!0,b.forEach((function(e,t){e.inSection=!1})))})),0==this.maps.length){var _,M=[],S=Object(o["a"])(b.entries());try{for(S.s();!(_=S.n()).done;){var A=Object(a["a"])(_.value,2),E=A[0],T=A[1];M.push([E,T])}}catch(C){S.e(C)}finally{S.f()}M.forEach((function(e){r.maps.push(e[0])}))}return{cells:y,positions:g,colorMap:b,vectors:x}},emitMap:function(){this.$emit("spenmaps",this.maps)},minMax:function(e){var t=0,r=0;t=Math.max.apply(null,e),r=Math.min.apply(null,e),this.getmax(r,t)},clearAll:function(){var e=this;this.meshs.forEach((function(t){e.scene.remove(t)})),this.endVectorMesh.forEach((function(t){e.scene.remove(t)})),this.maps=[],this.contourLevel=5,this.allUrls=[],this.moveUrls=[],this.moveLoadStart=1,this.moveLoadEnd=20,this.vectorFactor=518906,this.loadpercentage=0,this.movepercentage=0,this.nowIndex=0,this.moveflag=!1,this.beginUrl="",this.beginZone="",this.beginflag=!1,this.beginMesh=null,this.endUrl="",this.endZone="",this.endIsload=!1,this.endLineMesh=null,this.endShadeMesh=null,this.endContourMesh=null,this.endEdgeMesh=null,this.endScatterMesh=null,this.endVectorMesh=[],this.zones=[],this.meshs=[],this.contourDivShow=!1,this.colorStripShow=!1,this.movieDivShow=!1},beginUrlLoad:function(e){this.beginUrl=e;var t=this,r=new s["s"];r.load(e,(function(e){t.beginZone=t.vtk(e),t.initCamera(),t.beginIsload=!0,t.beginShow()}),(function(e){}),(function(e){console.error("An error happened")}))},beginShow:function(){var e=this.beginZone,t=e.cells,r=e.positions,n=(e.colorMap,e.vectors,new s["h"]);n.setIndex(t),n.setAttribute("position",new s["t"](r,3));var i=new s["X"](n),a=new s["A"](i,new s["y"]({color:65280}));a.position.x=-1*(this.maxX+this.minX)/2,a.position.y=-1*(this.maxY+this.minY)/2,a.position.z=-1*(this.maxZ+this.minZ)/2,this.meshs.push(a),this.beginMesh=a,this.beginflag=!0,this.scene.add(a)},beginUnhidden:function(e){this.beginflag?this.scene.add(this.beginMesh):this.beginUrlLoad(e)},beginhidden:function(){this.scene.remove(this.beginMesh)},endhidden:function(e){var t=this;switch(e){case"mesh":this.scene.remove(this.endLineMesh);break;case"shade":this.scene.remove(this.endShadeMesh);break;case"contourAll":this.contourDivShow=this.colorStripShow=!1,this.scene.remove(this.endContourMesh);break;case"contourImg":this.scene.remove(this.endContourMesh);break;case"edge":this.scene.remove(this.endEdgeMesh);break;case"scatter":this.scene.remove(this.endScatterMesh);break;case"vectorAll":this.colorStripShow=this.contourDivShow=!1,this.endVectorMesh.forEach((function(e){t.scene.remove(e)}));break;case"vectorImg":this.endVectorMesh.forEach((function(e){t.scene.remove(e)}));break;case"moveAll":this.contourDivShow=this.colorStripShow=!1,this.moveStop(),this.movieDivShow=!1,this.moveMesh&&this.scene.remove(this.moveMesh);break;case"moveImg":this.moveStop(),this.movieDivShow=!1,this.moveMesh&&this.scene.remove(this.moveMesh);default:}},endMesh:function(e){this.endIsload?this.endMeshShow():this.endUrlLoad(e,this.endMeshShow)},endUrlLoad:function(e,t,r){this.endUrl=e;var n=this,i=new s["s"];i.load(e,(function(e){n.endZone=n.vtk(e),n.initCamera(),n.endIsload=!0,t(r)}),(function(e){}),(function(e){console.error("An error happened")}))},endMeshShow:function(){var e=this.endZone,t=e.cells,r=e.positions,n=(e.colorMap,e.vectors,r.slice(0)),i=new s["h"];i.setIndex(t),i.setAttribute("position",new s["t"](n,3));var a=new s["X"](i),o=new s["A"](a,new s["y"]({color:65280}));o.position.x=-1*(this.maxX+this.minX)/2,o.position.y=-1*(this.maxY+this.minY)/2,o.position.z=-1*(this.maxZ+this.minZ)/2,this.endLineMesh=o,this.meshs.push(o),this.scene.add(o)},endShade:function(e){this.endIsload?this.endShadeShow():this.endUrlLoad(e,this.endShadeShow)},endShadeShow:function(){for(var e=this.endZone,t=e.cells,r=e.positions,n=(e.colorMap,e.vectors,r.slice(0)),i=new s["h"],a=[],o=new s["k"],l=0;l<n.length/3;l++)o.setHex(65280),a.push(o.r),a.push(o.g),a.push(o.b);i.setIndex(t),i.setAttribute("color",new s["t"](a,3)),i.setAttribute("position",new s["t"](n,3));new s["X"](i);var c=new s["F"]({vertexColors:s["V"],side:s["n"]}),h=new s["E"](i,c);h.position.x=-1*(this.maxX+this.minX)/2,h.position.y=-1*(this.maxY+this.minY)/2,h.position.z=-1*(this.maxZ+this.minZ)/2,this.meshs.push(h),this.endShadeMesh=h,this.scene.add(h)},endContour:function(e,t){this.contourDivShow=this.colorStripShow=!0,this.endIsload?this.endContourShow(t):this.endUrlLoad(e,this.endContourShow,t)},endContourShow:function(e){for(var t=this,r=this.endZone,n=r.cells,i=r.positions,a=r.colorMap,o=r.vectors,l=i.slice(0),c=0;c<l.length;c++)l[c]=l[c]+o[c]*this.vectorFactor;var h=[],u=new s["k"];if(a.get(e)){var d=a.get(e).scalars;this.minMax(d),d.forEach((function(e){var r=t.getColor(e);u.setHex(r),h.push(u.r),h.push(u.g),h.push(u.b)}))}var p=new s["h"];p.setIndex(n),p.setAttribute("color",new s["t"](h,3)),p.setAttribute("position",new s["t"](l,3));new s["X"](p);var f=new s["F"]({vertexColors:s["V"],side:s["n"]}),m=new s["E"](p,f);m.position.x=-1*(this.maxX+this.minX)/2,m.position.y=-1*(this.maxY+this.minY)/2,m.position.z=-1*(this.maxZ+this.minZ)/2,this.endContourMesh=m,this.meshs.push(m),this.scene.add(m)},endEdge:function(e){this.endIsload?this.endEdgeShow():this.endUrlLoad(e,this.endEdgeShow)},endEdgeShow:function(){var e=this.endZone,t=e.cells,r=e.positions,n=(e.colorMap,e.vectors,r.slice(0)),i=new s["h"];i.setIndex(t),i.setAttribute("position",new s["t"](n,3));var a=new s["o"](i,50),o=new s["A"](a,new s["y"]({color:16711680,linewidth:3}));o.position.x=-1*(this.maxX+this.minX)/2,o.position.y=-1*(this.maxY+this.minY)/2,o.position.z=-1*(this.maxZ+this.minZ)/2,this.endEdgeMesh=o,this.meshs.push(o),this.scene.add(o)},endScatter:function(e){this.endIsload?this.endScatterShow():this.endUrlLoad(e,this.endScatterShow)},endScatterShow:function(){var e=this.endZone,t=e.cells,r=e.positions,n=(e.colorMap,e.vectors,r.slice(0)),i=new s["h"];i.setIndex(t),i.setAttribute("position",new s["t"](n,3));var a=new s["X"](i),o=new s["K"](a,new s["L"]({color:8947848,size:1}));o.position.x=-1*(this.maxX+this.minX)/2,o.position.y=-1*(this.maxY+this.minY)/2,o.position.z=-1*(this.maxZ+this.minZ)/2,this.endScatterMesh=o,this.meshs.push(o),this.scene.add(o)},endVector:function(e,t){this.colorStripShow=this.contourDivShow=!0,this.endIsload?this.endVectorShow(t):this.endUrlLoad(e,this.endVectorShow,t)},endVectorShow:function(e){var t=this,r=this.endZone,n=(r.cells,r.positions),i=r.colorMap,a=(r.vectors,n.slice(0)),o=i.get(e).scalars;this.endVectorMesh=[],this.minMax(o);for(var l=0,c=0;c<a.length/3;c++){var h=new s["U"](0,1,0),u=new s["U"](a[l++]-1*(this.maxX+this.minX)/2,a[l++]-1*(this.maxY+this.minY)/2,a[l++]-1*(this.maxZ+this.minZ)/2),d=o[c]*this.vectorFactor*5,p=this.getColor(o[c]),f=.2,m=new s["b"](h,u,d,p,f);this.endVectorMesh.push(m)}this.endVectorMesh.forEach((function(e){t.scene.add(e)}))},moveInitUrls:function(e,t){this.allUrls=e,this.contourDivShow=this.colorStripShow=!0,this.movieDivShow=!0,this.moveElem=t},moveUrlsInit:function(){var e=this,t=/([\d]*.vtk)/,r=/([\d]*)/;this.moveUrls=this.allUrls.filter((function(n){var i,a=0;return null!==(i=t.exec(n))&&null!==(i=r.exec(i[1]))&&(a=parseInt(i[1]),a>=e.moveLoadStart&&a<=e.moveLoadEnd)})),this.moveUrls.sort((function(e,n){var i,a=0,o=0;return null!==(i=t.exec(e))&&null!==(i=r.exec(i[1]))&&(a=parseInt(i[1])),null!==(i=t.exec(n))&&null!==(i=r.exec(i[1]))&&(o=parseInt(i[1])),a-o}))},moveLoad:function(){var e=this,t=new s["s"],r=0;e.moveUrlsInit(),e.moveUrls.forEach((function(n){t.load(n,(function(t){r++,e.zones.push(e.vtk(t)),e.loadpercentage=Math.round(r/e.moveUrls.length*100),e.initCamera()}),(function(e){}),(function(e){console.error("An error happened")}))}))},moveShowZone:function(e,t){for(var r=this,n=e.cells,i=e.positions,a=e.colorMap,o=e.vectors,l=i.slice(0),c=0;c<l.length;c++)l[c]=l[c]+o[c]*this.vectorFactor;var h=[],u=new s["k"];if(a.get(t)){var d=a.get(t).scalars;this.minMax(d),d.forEach((function(e){var t=r.getColor(e);u.setHex(t),h.push(u.r),h.push(u.g),h.push(u.b)}))}var p=new s["h"];p.setIndex(n),p.setAttribute("color",new s["t"](h,3)),p.setAttribute("position",new s["t"](l,3));new s["X"](p);var f=new s["F"]({vertexColors:s["V"],side:s["n"]}),m=new s["E"](p,f);m.position.x=-1*(this.maxX+this.minX)/2,m.position.y=-1*(this.maxY+this.minY)/2,m.position.z=-1*(this.maxZ+this.minZ)/2,this.moveMesh=m},moveReStart:function(){this.moveflag=!0,this.currentStep=1;setInterval(this.moveAnimate,1e3)},moveStart:function(){this.moveflag=!0},moveStop:function(){this.moveflag=!1},positive:function(e){"x"==e&&this.camera.position.set(4*this.camerahight,0,0),"y"==e&&this.camera.position.set(0,4*this.camerahight,0),"z"==e&&this.camera.position.set(0,0,4*this.camerahight),this.camera.lookAt(this.scene.position),this.camera.updateMatrix()},negative:function(e){"x"==e&&this.camera.position.set(-4*this.camerahight,0,0),"y"==e&&this.camera.position.set(0,-4*this.camerahight,0),"z"==e&&this.camera.position.set(0,0,-4*this.camerahight),this.camera.lookAt(this.scene.position),this.camera.updateMatrix()},large:function(){var e=this;this.meshs.forEach((function(t){var r=t.scale.x*(1+e.mufactor),n=t.scale.y*(1+e.mufactor),i=t.scale.z*(1+e.mufactor);t.scale.set(r,n,i)}))},small:function(){var e=this;this.meshs.forEach((function(t){var r=t.scale.x*(1-e.mufactor),n=t.scale.y*(1-e.mufactor),i=t.scale.z*(1-e.mufactor);t.scale.set(r,n,i)}))}}},h=c,u=(r("eb4f"),r("2877")),d=Object(u["a"])(h,n,i,!1,null,null,null);t["a"]=d.exports},"7c3f":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFRUlEQVRYR8WZbUiUWRTH/zOPuo6kRppjyWJu0IYvKCtZQomIsgpDiEY4uIrWzIgakaLublm+hIiKmrLaqCAu2oeGFHLdkh3fokVEfGNQUNDIlD5ojYGaZquznAuKTZnPzDyT54sMc++5P88595xzz4hgJPn5+TZSqfQnsVh8HICt8ffW+GwwGAwAFhwcHIYTExNXd58h2v5AYMeOHfsVwA0XFxfXQ4cOgeM4a/B8ppP43r9/j8XFxfWtra0/OY67qVAo9LSQAWo0Gju9Xt/u6en5c3BwMJydnb8JmPEhHz58wPDwMMbHx2fEYnGoUqmcZ4D19fXlnp6emRERERCJdox6IJB06NjYGAYHB/9VqVQhopqaGneJRDIrl8vt7O3tDwzK+OC2tja8ffs2UqRWq385efJkc3h4uCBwFE+vX78m5cwb7u7uOHr0qMm6dTodBgYG/hDV1dXl+Pv7l5w9e9ZkJbs3zM3NoaWlBSMjI/Dw8ICbmxu2Yd+8eYOQkBDI5XIcOXKE1zkvX76EVqt9TIC/BQQEFAcFBfHaaLyIIJqamtDb2wuFQoHz589DLBZ/soyCX6vV4sGDB0hMTERUVNS+Z7169QqdnZ1/WwS4tbWFO3fuwMXFBdevX983LVEquX37Nk6fPg2lUvlVSEEAq6urmbWuXbu2r0W2F9A/lZubi3PnzuHixYt77rMYcGZmBiUlJVCr1Z+5dD9asuSVK1dQW1u7Z0xaDJiTk8PiydfXdz+eL37f0dGB2dlZpKenf/F7iwDX1taQmprKLoe5QjoSEhLw6NEj4QGHhobQ19eHrKwsc/nYvrS0NNy9e5ddMmOxyIJPnjxhiZgsYIkUFhbi0qVL8Pb2FhawtbWVJWFSbomUlZWB6n9AQICwgM+ePcPExARzkSVCF410nDhxQljAhYUF5OXl4f79+2bzUT4kD9AlMa48pNSiGCQFlMeKi4shlUrNghwcHATFcn5+vvC3mDQ+f/4c5GqqCqYKxW9KSgrLAqdOnbIOIGnNzMxk5So0NNQkxoaGBiwvL7P9e4nFLibFKysrLGGrVCpcuHCBFyS1ZAMDA6isrISt7d5vMkEA3717h8uXL4P+xsbG4urVq3B1dd3TZVVVVSwpZ2dnfxVOkEsyPT2NiooKejswIDs7O9ZGOTo64syZM6yTpps6Pz/PLEZCcRcYGMjL0hZZcHJyEgUFBUhOTkZPTw+6urqQkZGB+Ph4UGc9OjoKvV7PWn7qrP39/XH8OD2z+YvZgEtLSyzuKMV4eXnh48ePzM1UXb6Uz/gjfbrSLEByGXXOMTExCAsLYxr7+/vR3d3NOmUhxSxA6qBtbGx2Stzm5iZL2KWlpWYnbMHSDMVZe3s77t27t+NKjUbDbjClGaHFJAtSe3/r1i2aQMDJyYmxUKKlW9nY2AhrPPh5A25sbCApKYnVzN1lqby8HD4+PoiMjBTaeEwfb8Dx8XHWcewu6vSoLioqYha11iyHN+Dq6irLd+RKGsmRUM6jqmHug4mPyXkDkjKaCjQ3NyMuLg5TU1MgaHO6GD5g22t2A97w8/OrpLng14Q20E0+fPgw62Ao3VhTXrx4QYbR0HQrQiqV/hMdHW3N80zWTQVgYmLiJs1mqOeZlMlkP5haL00+lecGejM/fPhwY319/cftCWuURCL5SyaTceTCgxSahD19+pTm1XkqlapwZ95bX18fx3Fco4+Pj4SagIMYolNrptPpDGtra6VKpfJ3kUhk+GQgXVNT872trW26wWCgcasHgO++kTX/o58hDAZDP8dxdUqlcnj73P8BYWoERw67OD4AAAAASUVORK5CYII="},"7d64":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEp0lEQVRYR9WYe0xTVxzHv/f2SVeE8X5jHwjG0TpY2Jx7BJgR0c1kc+DM9ofL2Fy2ZeGhoIBzEETIQLfFVJDIXGK2odkYOoeK+MBkj1BqIU4RFRCkUDDQggKl7V1utV3ZeENbdv46ued3zvmc7znn9/udS8CqSJQQQI9PQSIWgC8A0rrdxvU+UKgHha8aI/G7eS7CXAmXYyubCdlbXrs5cS5vwJflD5KwH999fS+uDNaiXP0h+nU40NiCNCTAYAJcqUC8MwunysXNhIizzMZCTT28xjCApNZXcGNQvq8pAjuJyHqwxhhoKRXXBT/Lf8GhcObJaTXjr3uNDY8ijJA0IDaEL6k5EaJcFHBmiJyuVJzoKc4mwuVI3uSTUrzbr2hRAZ7sP47s9oQKQtqAjM0+O/MzfPcuKsDz2l+RfCv+l1kB6igd2ATbLguZNeBF7Vmkta3Fj2F3EMQWzBky5jqB/cH1kPIipxxjVoAXtGeQ2haHt70+Q4rPnjnD0R2lVwkcFl9BFH/1wgCa4Frj4MYGXncrmBcc3blElY71Hh8ggCWEG9MTm923TjjmjBU82FOAUlUGnmQDAZwX5w3YNFgHAS8EfIYP/NmhKAg8PD9AChRyulJwsu8ADgrrMF9nvuBbbF5eblcaKvuKcGp5pylOz7XYDJAGujR4Dqv50WASzLnyLfwlmSmJrOcLHFVvB+9f7DojkBd0Fi87rzENZVMFzbD3dB24p7s7zlXQ6v42dAFLSFeTmZ7S46g6ExwSOL7sLvzZgfYDpF1ArbYKeQGySQXeq0pHhboQMtElrOK/ZLGzi4LTAdZqq5F8Zx2SfPPxsXfGuEXYFDCpdQOGjVoM6Nug1XcgiPvIL2b5yxDGXWGqd+k6selmIEJ40fhGeB4ELEm77beYznZpv3hZew51Q9XIfJyi8Uln082mz92W289BNSrHz6G9cGN6/OcI2FRB82yTbfE+1S58r85HqWjyWGsXQMWDP6F4+Afe9fzEolBVfwWy2xPxmudHSPJItXzXGDTgM/gQcMS23+KpfGLCrWfQPCSf0GSDxzbLjbeLghNRKB/KMWZKaDmWZvq8ag0DcGW4I5y30rEKzjTiOEzB/zXgteFGcEku6J8CZgWF3BC0jNwYF2WsFznjhHWmykxlV6z6HBV9e1AqkuOdm5HIDf4BX3cnQuS0EYeWVk7Y1a6ARhiR3vEeLg+UY8QAsEhAzIvCEWEteOQTjgekCegbndHxPqrvl+Ep5+dRJqiBE+k0qfB2VdBMQUOeHvgJMUvWTQlH2zsEcDbn2QIoUWB7oveOwl2+839SzgZgOttqTRV23N5YSYQrsGWV66vHSpZWTdfHru2H1EWQdaZ9STzdAE+CgfbTy7ucvFn0X1/HFwNlwPpmd3SPamJM2aS0AblSl+isMsEZsAiWwwkLVVk41p1X0xiBNY/S3QowpGJ8F+Yc9WamX4klsNublM7Gi7ozUdP/bRPDiFhFBHr/yccpkJKr2EYB6e5sBHmzo8C0ykxsCUvBgL4xJXpGHvRTRpTpucj5awWG6DnHPxgeU0iUCCUo+BmNYNgSzHpsJtDrosG1i9HQW3//G13blU1SIyFEAAAAAElFTkSuQmCC"},"83a5":function(e,t,r){e.exports=r.p+"static/img/adilog.d0f21b66.png"},"95b0":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAD4ElEQVRYR92YbWxTVRjHf+fert0LOKFzW0Wwc0OM2A5qiMoXHSgEFsUPbk6IIS6BiRrDYnAYolE0kWmCWQSDMfGLRMjUsET4NA2LRvBla4ElzGUdsGwzThgjoxPK1nvMLVlhDtbbnq5E77fePs///zvPPfecex7BDS7vcRYIyZ2GgX6j/6flnsGA8yIdLWWMXa8vYj8kwnuMTcAWwD0tEPFFhwR8Nmrn3ZMLCZnhVwEb0UtL2CcFFfE10hAhaNcNlgd8nI0CevxsF4I302Bt2UJKmtt9rBCL/dwREfQAWZaz0xQoBMuE189zCL5Mk2diNgYNwhuIvhQfJJaZnmhp0CRK/WyVgvfTY5mYizQ4ZBlQF1CRX8e3g/WMTFipEjOtcdXTOFjH0JX4eQkBOnT41SMp73TRd+nP+Oo3ifi4uBm3o5j1wXs4HwfSEmCGBjYBWTocvl9S0eWj93IgaUC7BjvdRyjIcLE+WMTgFJCWAN+5ex9Pz6pKGmiqxJ8utvBSd9lNQywBOu0w01ZMluZkf8kvvNJTSW/YnzSwQKPWtZslOUt54dRj/B5qVQMcz07VHHx1TgNVzuooXGeobcqBWqpgqgHNl2TXwNa4cKavEmB14Xv4ch4mFAkRYTQ6jmxtBhkig7qex5WWovGiKAGuK9hGafZDjMpwVE/DxsrcJzk/do7VHYVcMZKeprFEJcB/29fO2cXavA2sDS6ha+SEOp3qI76e4JHb17DH3cTb/Zs5cLYhJXDKc3CcwlyGDiwY4mjoB+pOr5kAV5m/Bbf93knAzcP7CQx/H3cgyo/Y3J8/n/8bTlseFZ1FXIpM9CzKns8MvXASSH/4x7jbXEoqaK5pz+e9SFVwMd0jJ+NWJNEApQoum72Oj+btZfsfr/HNXztj3uYZQhMQkYniTI5XAmzxDDJLn82FyFBMOVNkkallsq1vEwfP7VEmVAJc6axGE5OPzTnabbSGmjjzd/etBVR2tyCgVEEL+soh/w/Aja4dzLUXsaP/WY48cPWTvyx3A77spdSeWqVcpakELFWwwKGzt6SPjsvtPDrzCQ5e+JoVuU9Rc7oc//B3tx7QJDAhvyjpjZ4jwkaYmjPllrYqVXpLFRw3yXdA/byfaRh4g2PDh1W9LeUnBGhJMcVB/w1ATxu1QuPaZpriKqjICclXYlGA1QYcUhGarlwpeUus6sLRP0IXkrnTZZSk7pgQLIx2WL1+nkHQGGsJJ6mY0jSDD088yOuxJrqnjY1CYzdgS6lREmJS8ml7kJepJHKty2/2qlu5D43NCJYjuEtIMpPQTybFbOgNIDkqND45vojYQvsPNxf5SiLhURsAAAAASUVORK5CYII="},"9d82":function(e,t,r){},"9daa":function(e,t,r){"use strict";var n=r("2899"),i=r.n(n);i.a},"9f06":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEiElEQVRYR93Ze0xTVxwH8O9paQtSGFABeY1SS5AoBWFhZO4BmuCDLcsUnSaOveLM4iC4CRHJyIIb6gbbmk0mQV32YDoWMiWiREOGmQyXSAFrWBhFkPAqQ6HF8ujj3uWWlTFAqL23g+3+1/b8fr9Pfz099/SUYI5L0YwIQiOQosCf63WnPEdBKxnBb7VJME/PT6Ye0CCKJrwJIMtHCKmf8DEIiJtTLDOT0rBg0NQM7bhhCECpSYjDLatxnxk3CSwHP1qOM6s84rfnBpYgalnMvwKbWaTX2I3C/hzUDH2r5lPY0BiLP6zAKBXyYzwT3z0luwwBESwKbnrRY325KOsvuKKORTJZq4Iv4ePOxcheN39BwKLjGICFtiClVYL+Cd16olBhV4L3c9+VSCuXBM6GODFQhC+6DyiJohFZL/pnf3go4NiSAlbrKpHd/vw5Eq3CwZ0rco4cDChYUsAa/SXs12ypshtopI04OfApdkpeg4/LcofeDA0aR/tykCbZhyBhyLw5Hhqot+jwlNoLZyPUiHRb4xCQCXqpPRE9E1fxtbwTwcLQB+axGzhKGcB0775Fj5QWKU6G1yHcNdJh4Dg1hvTOFAyamvCV/DYeFYbNmctuYMadXbg6dNZh0HyBazyeQNnKOnbALmMHhs1DYDq5V/M0Dod+D6lI7jCYmYdFfQfQYqjFcdnPeFz8JDugLZqrOfheTyYu3FWiWHYN8eJ17Ocgl0Cme2ntSUj3/2BeHFPT7jn4IGBhfx6aDLVw53uBD6F12Bilg4megDK0AhIXX4enASfAz7RHcHO0DgLiaoVQMOO67jzELkB1pB5insfiAmdWz+tJx4XBz1Eqr0ecewIrHCcdnC64OHwOOZ0vICNIidd9M1jjOAUyy9D2Vhmixc+iJKwS5K89MFOE2ZF0GltngTd6bkOS50bn3+qYO8yONgV05lb8GHEPXnzvfxRtHm2A3jI8CyIVrUSIUOp8ILOmVQ4qcUr+K9a6x3Py0dqSsF5mKu6VIb9rN94K/AR7/DKncBTzfabNEJLJpcfRizUwQU0wZgHcpv0wNdGAmQLeCT6BtOV7HbVZ41gDz9w9DYqmZiEM1AgSxM9AsSx2cYGsqtsRzLqDdtRgNeT/AzzadwjdRg3yg4qRdMvXuuW/rDuPptFafCm7wqpL8wXb3cH2id/xsiYCMtdENI/UYp3XNlzXVaAw7BLWe25afCAjYJCvaCKgNwF8HlAkrV7wVsVWbncHbYVuT7Qhq2sr0v2LkOiZzLb+gvEPDVwwI8cD/jvAqAbsT13x9sd5gUUc94BduqrhCuR2pP5AYhqxJVwcV1Uuv8EuI8fR7/dmoVxbmEc2t0HUY0DbaXl9CBdbdS6cw5YhbGrxMY9TWG09YVWokOotQvk38g6y0EaSC8B8OZgDgj0dybil++Wjm3HInjpEj2rAG24CHN/tV+Cy+ZGt1h2viCdytsean9k/ak19uDZSg9KBVzEwjhK1BvuwA5a/T/mZs+obWAUeMkGwAQTBhMbkb0rnX8xfD1rQqCc8FDfH4CdbyT8Bn6e3WTs9GnwAAAAASUVORK5CYII="},a5e8:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAE60lEQVRYR8WYXUhcRxTH/3M1RomIqNVUKmpqMCo+WAR3V0T8wIIFJZGAPqQPiZVqIioRNaKJSGJJRB9UKn6An5HQB5XQYGs1rFZ3SxAhKCZIBVG0frwolcSsdW85Q3aJW9d79+7VztPuzvn47ZmZc84Mw9HBNBpNIoAUxpi/zdypfhVF8W9BEP5wc3P7Wa/X71ucMcsHnU73pSiKPwH46lRJpI2vA/jWaDSOkygH1Gg0IYyxVwA+k9Y/E4l/GGPfGAyGUQ6o1Wp/A5B6Jq7lO9k8f/58GIuPj48ym83z8vXOTlIUxe/oUOQzxn5Uw21AQACSkpIQGRkJHx8fmM1mbG5uYn5+HhMTE9jZ2XHIDWOsm2m12goAPzikaSPs6+uLvLw8XLp0CePj45iZmeFggiAgMDAQcXFxHNxgMKCvrw/v3r2T6+6F04BRUVEoLS1FT08Pj5Ioisc6d3FxwdWrV5Geno6qqiqsr9NhlRzOAV65cgWVlZUoKyvDxsaGpDcSoD9EOsXFxdje3pbSUQ547tw5dHZ2orq6GisrK1KOjsxrNBrk5ORwSHsR/6igHDA7Oxu0bE+fPnUIziJMUZyamsLk5ORJ+soBu7u7kZ+fj/fv3x/rIDY2FhRlo9F47HxoaCiKiop4FE8YygDJ+K1bt/hmtzfo4Hh6eqKmpsauTG9vLz/9+/vW0msrqwwwLS0NFy9eBDlwBvD+/ft49uwZFhcX7ZlRBnjt2jVucHBw8IhhPz8/6550d3fnc5bo3LhxA1tbW0fkS0pK8PLlS7x+/VpdQMpl/v7+oH346XB1dUVMTAz/6fr16/Dw8LBGmSBMJtMR+QcPHqC/vx9LS0vqAlIuy8zMRF1dnVNL3NHRAYri3t6euoAUKaoctGxUb48bthG0laHy+PjxY+Tm5qp/isliYWEh3rx5g7GxsZMc2J2jFEXVZ2ho6HQAvby80NLSgoKCgpOW6FjnQUFBePToEU9VBwcHpwNIVhMSEpCVlYXy8nJ8+PBBViRpaZ88eYL6+nq8fftWSkdZmvnUamtrK2hP0omU6lAiIiJw7949NDU18ZZMxnAOMDU1FbW1tdwPRfD58+cYGRnhiddyeKjcRUdHIyMjA5Qn6WCsrq7KYOMiygDJKXUxwcHBCAkJ4TWX8tzAwACSk5MRFhbGrVOnQqC0lKOjo5idnZULZpFTBki5i9r3rq4uXL58GW1tbTzlrK2tOQogJe84IFWRxMREVFRU8Ah5e3vzE3n79m0pZ0rmHQMMDw/nm/zOnTvW1ELRnJubU5wPJajlA1Kkmpub+d5bXl7mdmn/UbtP0ZPojJVET/4hodtZY2MjhoeHodfrrc7ot/b2djn57HQBaUmpEyEYy9BqtUhJScHDhw+VOpejJ73EVJbo/kDLaMltlJgJliqIjJuZHBB7MtKA1N5TBO/evWs1Qp3KhQsX/tMPOkNiR1cakBQbGhr4DYz2ID1vUC2lNsm2Af3fAKkzphsYlazDw0MOfEKbribnC3o8+p4x1qqmVbVsiaLYRYARjLEFtYyqaYcxdtPygPkLgK/VNK6Crb9MJlMYB4yLi/tCEAR6Av5cBcNqmKDrX4bRaPzV+oj+8Z2abuIJanhwwsafgiDcnJ6e/p1sWAEtBnU6ndZsNicDCGSMuTrhyFHVTQCvdnd3RxcWFqwX6H8BEIICyImsYRAAAAAASUVORK5CYII="},aedb:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEsElEQVRYR+2Yayj8WRjHvz9i3FsKNe4UyZZRrkWyIUKUy7QRcpsppF2Ua8m+oI3NdRkjE0sxkX9p7ax45ZJ7Li9EGtIQ/i9cckuY7ZwazX/DzgyDF/u8md/8Lud8zvec8zzPeRgoWVtb2/c6OjpFAH4AwAagq/xcy9dfAczK5fLf+Xy+RNEXo7jo6OgoYLFY9RwOR9fJyQkmJiZgmMfHWmYDrq+vsb+/j+XlZZyenorMzc35SUlJt5RAIBAkmpmZDURHRzME7CPt7u4OY2NjkMlkLTweL59pampisVgsaVxcHNvKyuoj2R77vr29RX9///3l5aUH097eHsFms/+KiYn5FHAKiLm5OayurlYRwJ89PT3r/f39PxWgVCrFxMTEICMQCEo4HE6Nr6/vpwLc29uDRCL5Uy3A8/NzmJmZvctA1AYcHx9HeXk5MjMzkZOTo3VItQAJXEVFBYgLIEYAtQ2pMuDk5CSKi4tRUFCA+vp6ZGRkoLe3F3w+H6mpqVpTUmXA0dFREL8UFxcHb29vdHZ20v9ra2vIysr6eEBlAgUgh8PRGpiiYZUV/B/wmbl4NwVnZmbQ1tYGEqlyc3NVXhpvAnh8fIzFxUXo6+sjKCgILBbrG4CtrS3qjkpLSxEYGAhjY+P3A+zp6UFrayvc3d1xdHQEU1NTdHV10TxSYZWVlbCzs9PIZ75Kwe3tbdTW1lL/yOVycXh4iKSkJERERKCsrIzyPTw8ICwsDCKRCPb29ior9+pdXFNTg+rqaoSEhNBfhTU2NpIcDsRvmpubY2dnB9nZ2SBRSBPTWEE3Nzdsbm5SQB8fH0RFRdG1RVSMjY1Ffn4+UlJSKKhEIkFTU5MmfNAYkPTm4uJCwZaWlkDyNqKes7MzSkpKKPzQ0BCN3a6urkhPTwcJlxsbG2qtxVcBdnd3w8PDgyojFAoxPDyMlpYWnJ2d0Wkl8ZrcGxgYgIWFBVVVJpPRe6qaxoBEkby8vG/66evro74uODgY09PTuLi4oJsoNDSUKpycnIyEhAQUFhaqyqf5FJNk4alYvL6+DuKUDQ0NH5WytbWlx0jiihoaGqgLurm5gYGBwX+Caqzgc4DKPV5dXWFqaooq6ejoSAeko6NDX4mMjERiYiJdBi+ZVgFf6pgsgaKiIpqqkez8OVMZkEwRmT5izc3NiI+PB5tNqiKa2/z8PMixkmyetLS0JxtSGVAsFmNkZIQ2QlyFg4MDjIyMNKcD6G4/ODigkYY4/qdMZUDlj98iYSUOncfj0RhdV1f37Ib5MECyQaytren55t/Zj7IYGgG+xRTPzs7Cy8vrRTgCqhHgqxaemh8rAxZ7enr+6ufnp2YT2n19d3eXlOG+kOIR18nJqT88PFy7ParZ+srKChYWFn5jRCLRd/f39/tcLtfoo4uXijGQZHdwcBAnJyfBtMLa3t5eYWNj8wsJQ7q671mWflpW4sRXVlb+5vP5ERRQLBbrnp6e/mFpafljQEAAdQMfYaR6RqKMVCpd1tPTi8jIyPj6WCWXy+WkFMdjGOYnQ0NDV3VOYG8xGFJOOT8/PyYlcwC1PB7virT7ZBlfKBTaAnhXGRmGOZPJZNKqqqoH5QH/A9ks2jNHPWqbAAAAAElFTkSuQmCC"},b09f:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"FEM"},[r("transformtool",{ref:"transform",style:{top:e.righTop}}),e._v(" "),r("el-container",{staticStyle:{height:"100vh"}},[r("el-header",{staticClass:"fixed-header"},[r("el-menu",{staticClass:"headMenu_1",attrs:{mode:"horizontal"}},[r("div",{staticClass:"log"},[r("el-image",{attrs:{src:e.adilog}})],1),e._v(" "),r("div",{staticClass:"log logtitle"},[r("li",[e._v("  FEM")])]),e._v(" "),r("el-submenu",{attrs:{index:"1"}},[r("template",{slot:"title"},[e._v(e._s(e.$t("FEM.file.file")))]),e._v(" "),r("el-menu-item",{attrs:{index:"1-1"},on:{click:function(t){e.dialog.new_visiable=!0,e.clearAll()}}},[e._v(e._s(e.$t("FEM.file.new")))]),e._v(" "),r("el-menu-item",{attrs:{index:"1-2"},on:{click:function(t){e.dialog.load_visiable=!0,e.loadProjects(),e.clearAll()}}},[e._v(e._s(e.$t("FEM.file.load")))])],2),e._v(" "),r("el-menu-item",{attrs:{index:"2"},on:{click:function(t){return e.headMenuShows("solution")}}},[e._v(e._s(e.$t("FEM.solution.solution")))]),e._v(" "),r("el-menu-item",{attrs:{index:"3"},on:{click:function(t){return e.headMenuShows("solver")}}},[e._v(e._s(e.$t("FEM.solver.solver")))]),e._v(" "),r("el-menu-item",{attrs:{index:"4"},on:{click:function(t){return e.headMenuShows("results")}}},[e._v(e._s(e.$t("FEM.results.results")))]),e._v(" "),r("el-submenu",{attrs:{index:"5"}},[r("template",{slot:"title"},[e._v(e._s(e.$t("FEM.help.help")))]),e._v(" "),r("el-menu-item",{attrs:{index:"5-1"}},[e._v(e._s(e.$t("FEM.help.about")))]),e._v(" "),r("el-menu-item",{attrs:{index:"5-2"}},[e._v(e._s(e.$t("FEM.help.theroy")))]),e._v(" "),r("el-menu-item",{attrs:{index:"5-3"}},[e._v(e._s(e.$t("FEM.help.user")))]),e._v(" "),r("el-menu-item",{attrs:{index:"5-4"}},[e._v(e._s(e.$t("FEM.help.application")))])],2)],1)],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:e.headMenu_2Show,expression:"headMenu_2Show"}],staticClass:"headMenu_2",attrs:{id:"head2"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.solutionShow,expression:"solutionShow"}],staticClass:"lg_weiyi"},[r("div",{staticClass:"el-padding"},[r("el-row",[r("el-col",{attrs:{span:8}},[r("li",{staticClass:"staticTitle title"},[e._v("\n "+e._s(e.$t("FEM.solution.static"))+"\n ")]),e._v(" "),r("div",{staticClass:"title_content_1"},[r("el-radio-group",{staticClass:"offon",model:{value:e.parameterObj.solution.f_static,callback:function(t){e.$set(e.parameterObj.solution,"f_static",t)},expression:"parameterObj.solution.f_static"}},[r("el-radio",{staticStyle:{padding:"0 20px 0 0"},attrs:{label:"true"},on:{change:function(t){return e.mDynamicShow("true")}}},[e._v(e._s(e.$t("FEM.solution.on")))]),e._v(" "),r("el-radio",{attrs:{label:"false"},on:{change:function(t){return e.mDynamicShow("false")}}},[e._v(e._s(e.$t("FEM.solution.off")))])],1)],1),e._v(" "),r("div",[r("el-checkbox-group",{staticClass:"nonlinear",style:{visibility:e.staticShow},model:{value:e.parameterObj.solution.nlgeom,callback:function(t){e.$set(e.parameterObj.solution,"nlgeom",t)},expression:"parameterObj.solution.nlgeom"}},[r("el-checkbox",{attrs:{"true-label":"1","false-label":"0"}},[e._v(e._s(e.$t("FEM.solution.nonlinear")))])],1),e._v(" "),r("div",{staticClass:"title_content_2"},[r("div",{staticClass:"staticSolver"},[r("li",{staticClass:"offTitle"},[e._v(e._s(e.$t("FEM.solution.solver")))]),e._v(" "),r("el-radio-group",{model:{value:e.parameterObj.solution.solver,callback:function(t){e.$set(e.parameterObj.solution,"solver",t)},expression:"parameterObj.solution.solver"}},[r("el-radio",{attrs:{label:"0"}},[e._v(e._s(e.$t("FEM.solution.mumps")))]),e._v(" "),r("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.$t("FEM.solution.pcg")))]),e._v(" "),r("el-radio",{attrs:{label:"2"}},[e._v(e._s(e.$t("FEM.solution.ldl")))])],1)],1),e._v(" "),r("div",{staticClass:"staticOutput",style:{visibility:e.staticShow}},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.output"))+"\n ")]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutStaticChange("stiff")}},model:{value:e.parameterObj.static.dump_stiff,callback:function(t){e.$set(e.parameterObj.static,"dump_stiff",t)},expression:"parameterObj.static.dump_stiff"}},[e._v(e._s(e.$t("FEM.solution.stiffness")))]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutStaticChange()}},model:{value:e.parameterObj.static.strain_o,callback:function(t){e.$set(e.parameterObj.static,"strain_o",t)},expression:"parameterObj.static.strain_o"}},[e._v(e._s(e.$t("FEM.solution.NSO")))])],1)])],1)]),e._v(" "),r("el-col",{attrs:{span:1}},[r("div",{staticClass:"line"})]),e._v(" "),r("el-col",{staticStyle:{padding:"0 0 0 20px"},style:{visibility:e.MDynamic},attrs:{span:15}},[r("li",{staticClass:"title MDtitle"},[e._v("\n "+e._s(e.$t("FEM.solution.modesDynamic"))+"\n ")]),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:"false"===e.parameterObj.solution.f_static,expression:"parameterObj.solution.f_static==='false'"}],staticClass:"modesTrans"},[r("span",{style:{background:e.Mcolor},on:{click:function(t){return e.modesDynamicShow("modes")}}},[e._v(e._s(e.$t("FEM.solution.modes")))]),e._v(" "),r("span",{style:{background:e.Tcolor},on:{click:function(t){return e.modesDynamicShow("transient")}}},[e._v(e._s(e.$t("FEM.solution.transient")))])]),e._v(" "),r("div",{staticClass:"modesDynamicContent"},[r("div",{staticClass:"modes",style:{visibility:e.modesShow}},[r("table",[r("tr",[r("td",{staticClass:"fontSize"},[e._v("\n "+e._s(e.$t("FEM.solution.numOfEige"))+"\n ")]),e._v(" "),r("td",[r("el-input",{model:{value:e.parameterObj.solution.num_eigv,callback:function(t){e.$set(e.parameterObj.solution,"num_eigv",t)},expression:"parameterObj.solution.num_eigv"}})],1)]),e._v(" "),r("tr",[r("td",[r("el-checkbox",{attrs:{"true-label":"1","false-label":"0"},model:{value:e.parameterObj.modes.coupled,callback:function(t){e.$set(e.parameterObj.modes,"coupled",t)},expression:"parameterObj.modes.coupled"}},[e._v("\n "+e._s(e.$t("FEM.solution.massCoupled"))+"\n ")])],1)])]),e._v(" "),r("div",{staticClass:"title_content_2"},[r("div",{staticClass:"staticSolver"},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.method"))+"\n ")]),e._v(" "),r("el-radio-group",{model:{value:e.parameterObj.solution.eigv_method,callback:function(t){e.$set(e.parameterObj.solution,"eigv_method",t)},expression:"parameterObj.solution.eigv_method"}},[r("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.$t("FEM.solution.inverse")))]),e._v(" "),r("el-radio",{attrs:{label:"2"}},[e._v(e._s(e.$t("FEM.solution.lanczos")))])],1)],1),e._v(" "),r("div",{staticClass:"staticOutput"},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.output"))+"\n ")]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutmodesChange("stiff")}},model:{value:e.parameterObj.modes.dump_stiff,callback:function(t){e.$set(e.parameterObj.modes,"dump_stiff",t)},expression:"parameterObj.modes.dump_stiff"}},[e._v(e._s(e.$t("FEM.solution.stiffness")))]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutmodesChange("mass")}},model:{value:e.parameterObj.modes.dump_mass,callback:function(t){e.$set(e.parameterObj.modes,"dump_mass",t)},expression:"parameterObj.modes.dump_mass"}},[e._v(e._s(e.$t("FEM.solution.massOutput")))])],1)])]),e._v(" "),r("p",{staticClass:"line",staticStyle:{height:"140px",margin:"0 2vw"}}),e._v(" "),r("div",{staticClass:"dynamic",style:{visibility:e.dynamicShow}},[r("el-checkbox",{attrs:{"true-label":"1","false-label":"0"},model:{value:e.parameterObj.transient.coupled,callback:function(t){e.$set(e.parameterObj.transient,"coupled",t)},expression:"parameterObj.transient.coupled"}},[e._v(e._s(e.$t("FEM.solution.massCoupled")))]),e._v(" "),r("div",{staticClass:"title_content_2"},[r("div",{staticClass:"staticSolver"},[r("li",{staticClass:"offTitle"},[e._v("C=αM+βK")]),e._v(" "),r("table",[r("tr",[r("td",{staticStyle:{padding:"0 5px"}},[e._v("α")]),e._v(" "),r("td",[r("el-input-number",{staticStyle:{height:"30px"},attrs:{controls:!1},model:{value:e.parameterObj.solution.alphad,callback:function(t){e.$set(e.parameterObj.solution,"alphad",t)},expression:"parameterObj.solution.alphad"}})],1)]),e._v(" "),r("tr",[r("td",{staticStyle:{padding:"0 5px"}},[e._v("β")]),e._v(" "),r("td",[r("el-input-number",{staticStyle:{height:"30px"},attrs:{controls:!1},model:{value:e.parameterObj.solution.betad,callback:function(t){e.$set(e.parameterObj.solution,"betad",t)},expression:"parameterObj.solution.betad"}})],1)])])]),e._v(" "),r("div",{staticClass:"staticOutput"},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.method"))+"\n ")]),e._v(" "),r("el-radio-group",{attrs:{"text-color":"#000"},on:{change:e.newmarkShow},model:{value:e.parameterObj.solution.f_transient,callback:function(t){e.$set(e.parameterObj.solution,"f_transient",t)},expression:"parameterObj.solution.f_transient"}},[r("el-radio",{attrs:{label:"3"}},[e._v("HHT")]),e._v(" "),r("el-radio",{attrs:{label:"2"}},[e._v(e._s(e.$t("FEM.solution.newmark")))]),e._v(" "),r("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.$t("FEM.solution.direct")))])],1)],1)]),e._v(" "),r("span",{staticClass:"stepControl",on:{click:e.stepControlClick}},[e._v(e._s(e.$t("FEM.solution.stepControl")))])],1)])])],1)],1)]),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:e.solverShow,expression:"solverShow"}]},[r("el-row",[r("el-col",{attrs:{span:6}},[r("div",{staticClass:"solverConter"},[r("li",{staticClass:"solverTitle"},[e._v(e._s(e.$t("FEM.solver.showElement")))]),e._v(" "),r("p",{on:{click:e.femRun}},[r("img",{attrs:{src:e.run}}),e._v(" "),r("span",{staticClass:"imgText"},[e._v(e._s(e.$t("FEM.solver.run")))])])])])],1)],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:e.resultsShow,expression:"resultsShow"}],staticClass:"san",staticStyle:{padding:"20px 0"}},[r("el-row",[r("el-col",{attrs:{span:5}},[r("div",{staticClass:"results"},[r("li",{staticClass:"resultTitle"},[e._v(e._s(e.$t("FEM.results.loadResults")))]),e._v(" "),r("div",{staticClass:"resultConter"},[r("el-radio-group",{staticClass:"LRadio",model:{value:e.parameterObj.results.loadResults,callback:function(t){e.$set(e.parameterObj.results,"loadResults",t)},expression:"parameterObj.results.loadResults"}},e._l(e.loadResultRadio,(function(t,n){return r("el-radio",{key:n,staticStyle:{padding:"10px 0"},attrs:{label:n+1}},[e._v(e._s(t))])})),1)],1)])]),e._v(" "),r("el-col",{attrs:{span:1}},[r("div",{staticClass:"line"})]),e._v(" "),r("el-col",{attrs:{span:5}},[r("div",{staticClass:"results"},[r("li",{staticClass:"resultTitle"},[e._v(e._s(e.$t("FEM.results.scalar")))]),e._v(" "),r("div",{staticClass:"resultConter1"},[r("el-radio-group",{model:{value:e.parameterObj.results.scalar,callback:function(t){e.$set(e.parameterObj.results,"scalar",t)},expression:"parameterObj.results.scalar"}},e._l(e.scalarSelectionAll,(function(t,n){return r("el-radio",{key:n,attrs:{label:t}},[e._v(e._s(t))])})),1)],1)])]),e._v(" "),r("el-col",{attrs:{span:1}},[r("div",{staticClass:"line"})]),e._v(" "),r("el-col",{attrs:{span:3}},[r("div",{staticClass:"results"},[r("li",{staticClass:"resultTitle"},[e._v(e._s(e.$t("FEM.results.vectorS")))]),e._v(" "),r("div",{staticClass:"resultConter3"},[r("el-checkbox",{model:{value:e.parameterObj.results.transiation,callback:function(t){e.$set(e.parameterObj.results,"transiation",t)},expression:"parameterObj.results.transiation"}},[e._v(e._s(e.$t("FEM.results.transiation")))])],1)])]),e._v(" "),r("el-col",{attrs:{span:1}},[r("div",{staticClass:"line"})]),e._v(" "),r("el-col",{attrs:{span:4}},[r("div",{staticClass:"results"},[r("li",{staticClass:"resultTitle"},[e._v(e._s(e.$t("FEM.results.showElement")))]),e._v(" "),r("div",{staticClass:"resultConter4"},[r("el-checkbox-group",{model:{value:e.parameterObj.results.showElement,callback:function(t){e.$set(e.parameterObj.results,"showElement",t)},expression:"parameterObj.results.showElement"}},[r("el-checkbox",{attrs:{label:"Mesh"},on:{change:function(t){return e.contourShow("Mesh")}}},[e._v(e._s(e.$t("FEM.results.mesh")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Contour"},on:{change:function(t){return e.contourShow("Contour")}}},[e._v(e._s(e.$t("FEM.results.contour")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Shade"},on:{change:function(t){return e.contourShow("Shade")}}},[e._v(e._s(e.$t("FEM.results.shade")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Edge"},on:{change:function(t){return e.contourShow("Edge")}}},[e._v(e._s(e.$t("FEM.results.edge")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Scatter"},on:{change:function(t){return e.contourShow("Scatter")}}},[e._v(e._s(e.$t("FEM.results.scatter")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Vector"},on:{change:function(t){return e.contourShow("Vector")}}},[e._v(e._s(e.$t("FEM.results.vector")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Contour Movie"},on:{change:function(t){return e.contourShow("Contour Movie")}}},[e._v(e._s(e.$t("FEM.results.contourMovie")))])],1)],1)])])],1)],1)]),e._v(" "),r("el-dialog",{staticClass:"newDialog",attrs:{title:"New",visible:e.dialog.new_visiable,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,width:"600px",center:""},on:{"update:visible":function(t){return e.$set(e.dialog,"new_visiable",t)}}},[r("el-form",{ref:"newProject",attrs:{model:e.project,rules:e.newRules}},[r("el-form-item",{attrs:{prop:"projectName"}},[r("span",[e._v(e._s(e.$t("FEM.file.name")))]),e._v(" "),r("el-input",{model:{value:e.project.projectName,callback:function(t){e.$set(e.project,"projectName",t)},expression:"project.projectName"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"projectDesc"}},[r("span",[e._v(e._s(e.$t("FEM.file.description")))]),e._v(" "),r("el-input",{model:{value:e.project.projectDesc,callback:function(t){e.$set(e.project,"projectDesc",t)},expression:"project.projectDesc"}})],1),e._v(" "),r("el-form-item",{staticClass:"paddingTB",attrs:{prop:"fileType"}},[r("span",{staticClass:"fontWeight"},[e._v(e._s(e.$t("FEM.file.type")))]),e._v(" "),r("el-radio",{attrs:{label:"binary",disabled:""},model:{value:e.project.fileType,callback:function(t){e.$set(e.project,"fileType",t)},expression:"project.fileType"}},[e._v(e._s(e.$t("FEM.file.binary")))]),e._v(" "),r("el-radio",{attrs:{label:"ascii"},model:{value:e.project.fileType,callback:function(t){e.$set(e.project,"fileType",t)},expression:"project.fileType"}},[e._v(e._s(e.$t("FEM.file.ascii")))])],1)],1),e._v(" "),r("vue-uploader",{ref:"bdf",staticStyle:{margin:"20px 0 0 0"},attrs:{projectId:e.project.projectId,solverType:"fem",accept:".bdf",name:"Load BDF File"},on:{handfiles:e.handfiles,upoK:e.upDisOk}}),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialog.new_visiable=!1}}},[e._v(e._s(e.$t("Base.cannel")))]),e._v(" "),r("el-button",{on:{click:e.reUpload}},[e._v("Reupload")]),e._v(" "),r("el-button",{on:{click:function(t){return e.saveProject("newProject")}}},[e._v("Save")]),e._v(" "),r("el-button",{attrs:{disabled:e.disOK},on:{click:e.ugridShow}},[e._v(e._s(e.$t("Base.ok")))])],1)],1),e._v(" "),r("el-dialog",{staticClass:"loadDialog",attrs:{title:"Load",visible:e.dialog.load_visiable,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,width:"750px",center:""},on:{"update:visible":function(t){return e.$set(e.dialog,"load_visiable",t)}}},[r("el-form",[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"projectsTable",attrs:{data:e.projects,border:"",height:"250",size:"mini"},on:{"selection-change":e.projectsSelectionChange,select:e.projectsSelectionSelect,"select-all":e.projectsSelectionAll}},[r("el-table-column",{attrs:{type:"selection"}}),e._v(" "),r("el-table-column",{attrs:{property:"projectName",label:"Project Name"}}),e._v(" "),r("el-table-column",{attrs:{property:"solverstate",formatter:e.solverstateFormat,label:"Project Status"}}),e._v(" "),r("el-table-column",{attrs:{property:"projectDesc",label:"Project Description"}}),e._v(" "),r("el-table-column",{attrs:{property:"createTime",label:"Project Create Time"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialog.load_visiable=!1}}},[e._v(e._s(e.$t("Base.cannel")))]),e._v(" "),r("el-button",{on:{click:function(t){return e.loadfileShow()}}},[e._v(e._s(e.$t("Base.ok")))])],1)],1),e._v(" "),r("el-dialog",{staticClass:"loadDialog",attrs:{title:"Newmark",visible:e.dialog.newmark_visiable,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,width:"600px",center:""},on:{"update:visible":function(t){return e.$set(e.dialog,"newmark_visiable",t)}}},[r("div",{staticClass:"newmarkDialog"},[r("div",{staticClass:"newmarkInt"},[e._v("\n δ"),r("sub",[e._v("n")]),e._v(" "),r("el-input-number",{attrs:{controls:!1,label:"δn"},model:{value:e.parameterObj.solution.gam_newmark,callback:function(t){e.$set(e.parameterObj.solution,"gam_newmark",t)},expression:"parameterObj.solution.gam_newmark"}})],1),e._v(" "),r("div",{staticClass:"newmarkInt"},[e._v("\n α"),r("sub",[e._v("n")]),e._v(" "),r("el-input-number",{attrs:{controls:!1,label:"αn"},model:{value:e.parameterObj.solution.bet_newmark,callback:function(t){e.$set(e.parameterObj.solution,"bet_newmark",t)},expression:"parameterObj.solution.bet_newmark"}})],1)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialog.newmark_visiable=!1}}},[e._v(e._s(e.$t("Base.cannel")))]),e._v(" "),r("el-button",{on:{click:function(t){e.dialog.newmark_visiable=!1}}},[e._v(e._s(e.$t("Base.ok")))])],1)]),e._v(" "),r("el-dialog",{staticClass:"stepControlDialog",attrs:{title:"Step Control",visible:e.dialog.stepControl_visiable,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,width:"500px",center:""},on:{"update:visible":function(t){return e.$set(e.dialog,"stepControl_visiable",t)}}},[r("el-form",[r("el-form-item",{attrs:{label:e.$t("FEM.solution.caseNum"),"label-width":"200px"}},[r("el-input",{model:{value:e.parameterObj.solution.sid,callback:function(t){e.$set(e.parameterObj.solution,"sid",t)},expression:"parameterObj.solution.sid"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.solution.totalTime"),"label-width":"200px"}},[r("el-input",{model:{value:e.parameterObj.solution.num_steps,callback:function(t){e.$set(e.parameterObj.solution,"num_steps",t)},expression:"parameterObj.solution.num_steps"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.solution.timeStep"),"label-width":"200px"}},[r("el-input",{model:{value:e.parameterObj.solution.dt_str,callback:function(t){e.$set(e.parameterObj.solution,"dt_str",t)},expression:"parameterObj.solution.dt_str"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.solution.outInterval"),"label-width":"200px"}},[r("el-input",{model:{value:e.parameterObj.solution.freq,callback:function(t){e.$set(e.parameterObj.solution,"freq",t)},expression:"parameterObj.solution.freq"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.solution.outFormat"),"label-width":"200px"}},[r("el-radio-group",{model:{value:e.parameterObj.solution.sort,callback:function(t){e.$set(e.parameterObj.solution,"sort",t)},expression:"parameterObj.solution.sort"}},[r("el-radio",{attrs:{label:"1"}}),e._v(" "),r("el-radio",{staticStyle:{margin:"0 0 0 30px"},attrs:{label:"2"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.solution.stiffness"),"label-width":"200px"}},[r("el-checkbox",{model:{value:e.parameterObj.transient.dump_stiff,callback:function(t){e.$set(e.parameterObj.transient,"dump_stiff",t)},expression:"parameterObj.transient.dump_stiff"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.solution.massOutput"),"label-width":"200px"}},[r("el-checkbox",{model:{value:e.parameterObj.transient.dump_mass,callback:function(t){e.$set(e.parameterObj.transient,"dump_mass",t)},expression:"parameterObj.transient.dump_mass"}})],1),e._v(" "),r("el-form-item",{attrs:{label:e.$t("FEM.solution.NSO"),"label-width":"200px"}},[r("el-checkbox",{model:{value:e.parameterObj.transient.strain_o,callback:function(t){e.$set(e.parameterObj.transient,"strain_o",t)},expression:"parameterObj.transient.strain_o"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialog.stepControl_visiable=!1}}},[e._v(e._s(e.$t("Base.cannel")))]),e._v(" "),r("el-button",{on:{click:function(t){e.dialog.stepControl_visiable=!1}}},[e._v(e._s(e.$t("Base.ok")))])],1)],1),e._v(" "),r("el-container",{attrs:{id:"contentainer"}},[r("el-aside",{directives:[{name:"show",rawName:"v-show",value:e.as1Show,expression:"as1Show"}],staticClass:"aside1",attrs:{width:"300px"}},[r("li",{staticClass:"resultTitle"},[e._v(e._s(e.rightTitle))]),e._v(" "),r("el-tree",{attrs:{data:e.data},on:{"node-click":e.handleNodeClick}})],1),e._v(" "),r("el-aside",{directives:[{name:"show",rawName:"v-show",value:e.taskPage,expression:"taskPage"}],staticClass:"aside2",attrs:{width:"300px"}},[r("li",{staticClass:"taskPageTitle"},[e._v(e._s(e.$t("FEM.other.taskPage")))]),e._v(" "),r("div",{staticClass:"taskPageOff",on:{click:function(t){return e.taskPageOff()}}},[e._v("x")]),e._v(" "),r("div",{staticClass:"taskPageContent"},[r("div",{directives:[{name:"show",rawName:"v-show",value:1==e.solutionPage,expression:"solutionPage == true"}],staticClass:"solutionPage"},[r("div",{directives:[{name:"show",rawName:"v-show",value:"true"===e.parameterObj.solution.f_static,expression:"parameterObj.solution.f_static==='true'"}],staticClass:"solutionPage1"},[r("li",{staticClass:"solutionPageTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.static"))+"\n ")]),e._v(" "),r("el-radio-group",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],model:{value:e.parameterObj.solution.f_static,callback:function(t){e.$set(e.parameterObj.solution,"f_static",t)},expression:"parameterObj.solution.f_static"}},[r("el-radio",{staticStyle:{padding:"0 20px 0 0"},attrs:{label:"true"},on:{change:function(t){return e.mDynamicShow("true")}}},[e._v(e._s(e.$t("FEM.solution.on")))]),e._v(" "),r("el-radio",{attrs:{label:"false"},on:{change:function(t){return e.mDynamicShow("false")}}},[e._v(e._s(e.$t("FEM.solution.off")))])],1),e._v(" "),r("div",[r("el-checkbox",{directives:[{name:"show",rawName:"v-show",value:"true"==this.parameterObj.solution.f_static,expression:"this.parameterObj.solution.f_static == 'true'"}],attrs:{"true-label":"1","false-label":"0"},model:{value:e.parameterObj.solution.nlgeom,callback:function(t){e.$set(e.parameterObj.solution,"nlgeom",t)},expression:"parameterObj.solution.nlgeom"}},[e._v(e._s(e.$t("FEM.solution.nonlinear")))]),e._v(" "),r("div",{staticClass:"title_content_2_2"},[r("div",{staticClass:"staticSolver"},[r("li",{staticClass:"offTitle"},[e._v(e._s(e.$t("FEM.solution.solver")))]),e._v(" "),r("el-radio-group",{model:{value:e.parameterObj.solution.solver,callback:function(t){e.$set(e.parameterObj.solution,"solver",t)},expression:"parameterObj.solution.solver"}},[r("el-radio",{attrs:{label:"0"}},[e._v(e._s(e.$t("FEM.solution.mumps")))]),e._v(" "),r("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.$t("FEM.solution.pcg")))]),e._v(" "),r("el-radio",{attrs:{label:"2"}},[e._v(e._s(e.$t("FEM.solution.ldl")))])],1)],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:"true"==this.parameterObj.solution.f_static,expression:"this.parameterObj.solution.f_static == 'true'"}],staticStyle:{margin:"20px 0 0 0"}},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.output"))+"\n ")]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutStaticChange("stiff")}},model:{value:e.parameterObj.static.dump_stiff,callback:function(t){e.$set(e.parameterObj.static,"dump_stiff",t)},expression:"parameterObj.static.dump_stiff"}},[e._v(e._s(e.$t("FEM.solution.stiffness")))]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutStaticChange()}},model:{value:e.parameterObj.static.strain_o,callback:function(t){e.$set(e.parameterObj.static,"strain_o",t)},expression:"parameterObj.static.strain_o"}},[e._v(e._s(e.$t("FEM.solution.NSO")))])],1)])],1)],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:"false"==this.parameterObj.solution.f_static,expression:"this.parameterObj.solution.f_static == 'false'"}],staticClass:"solutionPage2"},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.modeShow,expression:"modeShow"}],staticClass:"modes"},[r("li",{staticClass:"solutionPageTitle "},[e._v("\n "+e._s(e.$t("FEM.solution.modes"))+"\n ")]),e._v(" "),r("table",[r("tr",[r("td",{staticClass:"fontSize"},[e._v("\n "+e._s(e.$t("FEM.solution.numOfEige"))+"\n ")]),e._v(" "),r("td",[r("el-input",{model:{value:e.parameterObj.solution.num_eigv,callback:function(t){e.$set(e.parameterObj.solution,"num_eigv",t)},expression:"parameterObj.solution.num_eigv"}})],1)]),e._v(" "),r("tr",[r("td",[r("el-checkbox",{attrs:{"true-label":"1","false-label":"0"},model:{value:e.parameterObj.modes.coupled,callback:function(t){e.$set(e.parameterObj.modes,"coupled",t)},expression:"parameterObj.modes.coupled"}},[e._v("\n "+e._s(e.$t("FEM.solution.massCoupled"))+"\n ")])],1)])]),e._v(" "),r("div",{staticClass:"title_content_2_2"},[r("div",{staticClass:"staticSolver"},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.method"))+"\n ")]),e._v(" "),r("el-radio-group",{model:{value:e.parameterObj.solution.eigv_method,callback:function(t){e.$set(e.parameterObj.solution,"eigv_method",t)},expression:"parameterObj.solution.eigv_method"}},[r("el-radio",{staticStyle:{margin:"0 5px 0 0"},attrs:{label:"1"}},[e._v(e._s(e.$t("FEM.solution.inverse")))]),e._v(" "),r("el-radio",{attrs:{label:"2"}},[e._v(e._s(e.$t("FEM.solution.lanczos")))])],1)],1),e._v(" "),r("div",{staticStyle:{margin:"20px 0 10px 0"}},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.output"))+"\n ")]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutmodesChange("stiff")}},model:{value:e.parameterObj.modes.dump_stiff,callback:function(t){e.$set(e.parameterObj.modes,"dump_stiff",t)},expression:"parameterObj.modes.dump_stiff"}},[e._v(e._s(e.$t("FEM.solution.stiffness")))]),e._v(" "),r("el-radio",{attrs:{"text-color":"#000"},on:{change:function(t){return e.outPutmodesChange("mass")}},model:{value:e.parameterObj.modes.dump_mass,callback:function(t){e.$set(e.parameterObj.modes,"dump_mass",t)},expression:"parameterObj.modes.dump_mass"}},[e._v(e._s(e.$t("FEM.solution.massOutput")))])],1)])]),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:e.dynaShow,expression:"dynaShow"}],staticClass:"dynamic"},[r("li",{staticClass:"solutionPageTitle tops"},[e._v("\n "+e._s(e.$t("FEM.solution.transient"))+"\n ")]),e._v(" "),r("el-checkbox",{staticStyle:{padding:"8px 0"},attrs:{"true-label":"1","false-label":"0"},model:{value:e.parameterObj.transient.coupled,callback:function(t){e.$set(e.parameterObj.transient,"coupled",t)},expression:"parameterObj.transient.coupled"}},[e._v(e._s(e.$t("FEM.solution.massCoupled")))]),e._v(" "),r("div",{staticClass:"title_content_2_2"},[r("div",{staticClass:"staticSolver"},[r("li",{staticClass:"offTitle"},[e._v("C=αM+βK")]),e._v(" "),r("table",[r("tr",[r("td",{staticStyle:{padding:"0 5px"}},[e._v("α")]),e._v(" "),r("td",[r("el-input",{model:{value:e.parameterObj.solution.alphad,callback:function(t){e.$set(e.parameterObj.solution,"alphad",t)},expression:"parameterObj.solution.alphad"}})],1)]),e._v(" "),r("tr",[r("td",{staticStyle:{padding:"0 5px"}},[e._v("β")]),e._v(" "),r("td",[r("el-input",{model:{value:e.parameterObj.solution.betad,callback:function(t){e.$set(e.parameterObj.solution,"betad",t)},expression:"parameterObj.solution.betad"}})],1)])])]),e._v(" "),r("div",{staticStyle:{margin:"20px 0 10px 0"}},[r("li",{staticClass:"offTitle"},[e._v("\n "+e._s(e.$t("FEM.solution.method"))+"\n ")]),e._v(" "),r("el-radio-group",{attrs:{"text-color":"#000"},on:{change:e.newmarkShow},model:{value:e.parameterObj.solution.f_transient,callback:function(t){e.$set(e.parameterObj.solution,"f_transient",t)},expression:"parameterObj.solution.f_transient"}},[r("el-radio",{staticStyle:{margin:"0 5px 0 0"},attrs:{label:"3"}},[e._v("HHT")]),e._v(" "),r("el-radio",{staticStyle:{margin:"0 5px 0 0"},attrs:{label:"2"}},[e._v(e._s(e.$t("FEM.solution.newmark")))]),e._v(" "),r("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.$t("FEM.solution.direct")))])],1)],1)]),e._v(" "),r("span",{staticClass:"stepControl",on:{click:e.stepControlClick}},[e._v(e._s(e.$t("FEM.solution.stepControl")))])],1)])]),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:1==e.solverPage,expression:"solverPage == true"}],staticClass:"solverPage"},[r("li",{staticClass:"solutionPageTitle"},[e._v("\n "+e._s(e.$t("FEM.solver.showElement"))+"\n ")]),e._v(" "),r("p",{staticClass:"imgRun",on:{click:e.femRun}},[r("img",{attrs:{src:e.run}}),e._v(" "),r("span",{staticClass:"imgText"},[e._v(e._s(e.$t("FEM.solver.run")))])])]),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:1==e.resultsPage,expression:"resultsPage == true"}],staticClass:"resultsPage"},[r("div",{staticClass:"resultsPage1"},[r("li",{staticClass:"solutionPageTitle"},[e._v("\n "+e._s(e.$t("FEM.results.loadResults"))+"\n ")]),e._v(" "),r("el-radio-group",{staticClass:"LRadio",model:{value:e.parameterObj.results.loadResults,callback:function(t){e.$set(e.parameterObj.results,"loadResults",t)},expression:"parameterObj.results.loadResults"}},e._l(e.loadResultRadio,(function(t,n){return r("el-radio",{key:n,staticStyle:{padding:"10px 0"},attrs:{label:n+1}},[e._v(e._s(t))])})),1)],1),e._v(" "),r("div",{staticClass:"resultsPage2"},[r("li",{staticClass:"solutionPageTitle paddingTB"},[e._v("\n "+e._s(e.$t("FEM.results.scalar"))+"\n ")]),e._v(" "),r("div",{staticClass:"resultConter1",staticStyle:{margin:"0"}},[r("el-radio-group",{model:{value:e.parameterObj.results.scalar,callback:function(t){e.$set(e.parameterObj.results,"scalar",t)},expression:"parameterObj.results.scalar"}},e._l(e.scalarSelectionAll,(function(t,n){return r("el-radio",{key:n,attrs:{label:t}},[e._v(e._s(t))])})),1)],1)]),e._v(" "),r("div",{staticClass:"resultsPage3"},[r("li",{staticClass:"solutionPageTitle paddingTB"},[e._v("\n "+e._s(e.$t("FEM.results.vectorS"))+"\n ")]),e._v(" "),r("div",{staticClass:"resultConter3"},[r("el-checkbox",{model:{value:e.parameterObj.results.transiation,callback:function(t){e.$set(e.parameterObj.results,"transiation",t)},expression:"parameterObj.results.transiation"}},[e._v(e._s(e.$t("FEM.results.transiation")))])],1)]),e._v(" "),r("div",{staticClass:"resultsPage4"},[r("li",{staticClass:"solutionPageTitle paddingTB"},[e._v("\n "+e._s(e.$t("FEM.results.showElement"))+"\n ")]),e._v(" "),r("div",{staticClass:"resultConter4"},[r("el-checkbox-group",{model:{value:e.parameterObj.results.showElement,callback:function(t){e.$set(e.parameterObj.results,"showElement",t)},expression:"parameterObj.results.showElement"}},[r("el-checkbox",{attrs:{label:"Mesh"},on:{change:function(t){return e.contourShow("Mesh")}}},[e._v(e._s(e.$t("FEM.results.mesh")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Contour"},on:{change:function(t){return e.contourShow("Contour")}}},[e._v(e._s(e.$t("FEM.results.contour")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Shade"},on:{change:function(t){return e.contourShow("Shade")}}},[e._v(e._s(e.$t("FEM.results.shade")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Edge"},on:{change:function(t){return e.contourShow("Edge")}}},[e._v(e._s(e.$t("FEM.results.edge")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Scatter"},on:{change:function(t){return e.contourShow("Scatter")}}},[e._v(e._s(e.$t("FEM.results.scatter")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Vector"},on:{change:function(t){return e.contourShow("Vector")}}},[e._v(e._s(e.$t("FEM.results.vector")))]),e._v(" "),r("el-checkbox",{attrs:{label:"Contour Movie"},on:{change:function(t){return e.contourShow("Contour Movie")}}},[e._v(e._s(e.$t("FEM.results.contourMovie")))])],1)],1)])])])]),e._v(" "),r("el-container",[r("div",{staticClass:"femMain",on:{click:function(t){return e.topdivshow(t)}}},[r("vtk-load",{directives:[{name:"show",rawName:"v-show",value:e.vtkoneload,expression:"vtkoneload"}],ref:"vtkoneload",attrs:{scalarRadio:e.parameterObj.results.scalar,endUrlps:e.endUrl},on:{spenmaps:e.spenmaps}})],1),e._v(" "),r("div",{staticClass:"asidelShow"},[r("span",{on:{click:function(t){return e.footerShows("as")}}},[e._v("⇄")])]),e._v(" "),r("div",{staticClass:"footerTitle"},[r("p",[e._v(e._s(e.$t("FEM.other.console")))]),e._v(" "),r("div",[r("li",{style:{visibility:e.runShow}},[r("span",[e._v("正在求解中")]),e._v(" "),r("i",{staticClass:"el-icon-loading"})]),e._v(" "),r("li",[r("span",{on:{click:function(t){return e.footerShows("foot")}}},[e._v("▲▼")])])])]),e._v(" "),e.footerShow?r("el-footer",{staticClass:"femFooter"},[r("div",{staticClass:"footerTextBox"},[r("el-input",{staticClass:"footerText",attrs:{type:"textarea"},model:{value:e.logs,callback:function(t){e.logs=t},expression:"logs"}})],1)]):e._e()],1)],1)],1),e._v(" "),r("filesload",{ref:"filesload",attrs:{fileurls:e.fileurls},on:{fileLoadeState:function(t){return e.fileLoadeState(t)}}}),e._v(" "),r("loading",{ref:"loading",attrs:{loadObjs:e.loadObjs}})],1)},i=[],a=(r("f386"),r("6762"),r("2fdb"),r("28a5"),r("ac6a"),r("7f7f"),r("96cf"),r("1da1")),o=r("ade3"),s=r("83a5"),l=r.n(s),c=r("50ae"),h=r.n(c),u=r("b775"),d=r("5c96"),p=r("4360"),f=(r("83d6"),function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"webuploader-container"},[r("div",{attrs:{id:"uploader"}},[r("el-row",[r("el-col",{attrs:{span:6}},[e._v(e._s(e.name))]),e._v(" "),r("el-col",{attrs:{span:6}},[r("div",{attrs:{id:"picker"}},[e._v("选择文件")])])],1),e._v(" "),e._l(e.files,(function(t,n){return r("el-row",{key:n},[r("el-col",{attrs:{span:6}},[e._v(e._s(t.name)+" ")]),e._v(" "),r("el-col",{attrs:{span:8}},[r("el-progress",{attrs:{percentage:t.percentage}})],1),e._v(" "),r("el-col",{attrs:{span:5}},[e._v(e._s(t.msg))]),e._v(" "),r("el-col",{attrs:{span:5}},[r("el-button",{attrs:{size:"mini",type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(r){return e.fileDel(t.id)}}})],1)],1)}))],2)])}),m=[],v=r("1157"),g=r.n(v),y=r("4941"),x=r.n(y),b=r("3fa5"),w=r("5a89"),_=new b["a"],M={data:function(){return{uploader:void 0,fileName:void 0,md5:"1212",files:[]}},mounted:function(){this.initWebUploader()},props:{projectId:String,solverType:String,accept:String,name:String},methods:{initWebUploader:function(){var e=this,t=this;this.uploader=x.a.create({swf:"./Uploader.swf",server:"/cfd/TransServlet",formData:{},pick:{id:"#picker",multiple:!0},resize:!1,chunked:!0,chunkSize:1048576,threads:4}),this.uploader.on("fileQueued",(function(e){t.files=[],t.fileName=e.name;var r=t.fileName.split(".")[1];if(t.accept.indexOf(r)<0)return t.uploader.reset(),void _.error("只支持"+t.accept+"格式文件!");t.uploader.md5File(e).progress((function(e){console.log("Percentage:",e)})).then((function(e){t.md5=e,console.log("md5 result:",e)})),t.files.length>0&&(t.uploader.removeFile(t.files[0].id),t.files=[]),t.files.push({id:e.id,name:e.name,msg:"等待上传...",percentage:0})})),this.uploader.on("uploadBeforeSend",(function(e,r,n){r.chunk=e.chunk,r.chunks=e.chunks,r.pid=t.projectId,r.solverType=t.solverType,r.md5=t.md5,r.fileName=t.fileName,r.uploadFlag=2,r.channelNo="service",r.clientToken=p["a"].getters.token,r.transCode="A00113",r.userId=p["a"].getters.userId,n.Content="multipart",n.Type="form-data"})),this.uploader.on("uploadProgress",(function(e,r){var n=Math.floor(100*r);t.files.forEach((function(t){(t.id=e.id)&&(t.msg="上传中"),t.percentage=n}))})),this.uploader.on("uploadSuccess",(function(r,n){t.files.forEach((function(e){(e.id=r.id)&&(e.msg="已上传",t.$emit("upoK"))}));var i={transCode:"A00117",pid:t.projectId,fileName:e.fileName,solverType:t.solverType};Object(u["c"])(i).then((function(e){var t=e.rows;t.forEach((function(e){self.logs+="\n"+e.log}))})).catch((function(e){}))})),this.uploader.on("uploadAccept",(function(e,r){return"000000000"==r.returnCode?"3"==r.code||(t.uploader.stop(!0),!1):(_.error(r.returnMsg),!1)})),this.uploader.on("uploadError",(function(e,t){g()("#"+e.id).text(e.name+"上传出错")})),this.uploader.on("uploadComplete",(function(e){}))},hanfile:function(){this.$emit("handfiles",this.files)},uploaderClear:function(){this.uploader.reset(),this.percentage=0,this.files=[]},fileDel:function(e){var t=this;this.files=this.files.filter((function(r){return r.id==e&&t.uploader.removeFile(e),r.id!=e}))}},watch:{files:{handler:function(e){this.hanfile()},deep:!0,immediate:!1}}},S=M,A=(r("9daa"),r("2877")),E=Object(A["a"])(S,f,m,!1,null,null,null),T=E.exports,C=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div")},L=[],R=r("b8c3"),P=r.n(R),O=new w["s"],I={data:function(){return{imggifs:P.a,visiable:!1,files:[]}},props:{fileurls:Array},mounted:function(){this.init()},watch:{files:{handler:function(e){this.$emit("fileLoadeState",e)},deep:!0,immediate:!1}},methods:{init:function(){var e=this;void 0!==e.fileurls&&(e.files=[],e.fileurls.forEach((function(t){var r=t.split("/"),n=r[r.length-1],i={url:t,name:n,percentage:0};e.files.push(i),O.load(t,e.loadsucess,(function(t){e.visiable=!0,i.percentage=Math.floor(t.loaded/t.total*100)}))})))},handleClose:function(){},loadsucess:function(e){},loaderror:function(e){console.error("An error happened")},load:function(e){this.fileurls.includes(e)||this.fileurls.push(e),this.init()}}},D=I,N=(r("7563"),Object(A["a"])(D,C,L,!1,null,"18a256bd",null)),B=N.exports,F=r("153d"),U=r("789b"),j=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{staticClass:"diolog",attrs:{visible:e.visiable,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1},on:{"update:visible":function(t){e.visiable=t}}},[r("el-row",{staticClass:"lgcoent"},[r("el-col",{staticClass:"lgleft",attrs:{span:8}},[r("div",{staticClass:"lodingimg"},[r("el-image",{staticClass:"img",attrs:{src:e.imggif}}),e._v(" "),r("h1",{staticClass:"loding"},[e._v("Loading...")])],1)]),e._v(" "),r("el-col",{staticClass:"lodgright",attrs:{span:16}},e._l(e.loadObjs,(function(t,n){return r("el-row",{key:n},[r("div",[1==t.type?r("li",[r("el-col",{attrs:{span:14}},[e._v(e._s(n+1)+"."+e._s(t.message))]),e._v(" "),-1==t.state?r("el-col",{attrs:{span:10}},[e._v(" ...等待")]):e._e(),e._v(" "),0==t.state?r("el-col",{attrs:{span:10}},[e._v(" ...进行中")]):e._e(),e._v(" "),1==t.state?r("el-col",{attrs:{span:10}},[e._v(" 完成")]):e._e()],1):e._e(),e._v(" "),2==t.type?r("li",[r("el-col",{attrs:{span:14}},[e._v(e._s(n+1)+"."+e._s(t.filename))]),e._v(" "),r("el-col",{attrs:{span:10}},[r("el-progress",{attrs:{percentage:t.percentage}})],1)],1):e._e()])])})),1)],1)],1)},z=[],k=(new w["s"],{data:function(){return{imggif:P.a,visiable:!1,loading:!0}},props:{loadObjs:Array},mounted:function(){},methods:{},watch:{loadObjs:{handler:function(e){var t=!0;e.forEach((function(e){(1==e.type&&1!=e.state||2==e.type&&100!=e.percentage)&&(t=!1)})),this.visiable=!t},deep:!0,immediate:!1}}}),G=k,H=(r("13da"),Object(A["a"])(G,j,z,!1,null,"c1871034",null)),V=H.exports,W=(r("b719"),function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"show",rawName:"v-show",value:e.isVShow,expression:"isVShow"}],class:e.tcss},[r("ul",[r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_x}}):r("el-image",{attrs:{src:e.x},on:{click:function(t){return e.positive("x")}}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_x_}}):r("el-image",{attrs:{src:e.x_},on:{click:function(t){return e.negative("x")}}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_y}}):r("el-image",{attrs:{src:e.y},on:{click:function(t){return e.positive("y")}}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_y_}}):r("el-image",{attrs:{src:e.y_},on:{click:function(t){return e.negative("y")}}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_z}}):r("el-image",{attrs:{src:e.z},on:{click:function(t){return e.positive("z")}}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_z_}}):r("el-image",{attrs:{src:e.z_},on:{click:function(t){return e.negative("z")}}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_search}}):r("el-image",{attrs:{src:e.search}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_max}}):r("el-image",{attrs:{src:e.max},on:{click:e.large}})],1),e._v(" "),r("li",[1==e.xyzsIsN?r("el-image",{attrs:{src:e.n_min}}):r("el-image",{attrs:{src:e.min},on:{click:e.small}})],1),e._v(" "),r("li",[1==e.monitorIsN?r("el-image",{attrs:{src:e.n_monitor}}):r("el-image",{attrs:{src:e.monitor}})],1),e._v(" "),r("li",[1==e.boundaryIsN?r("el-image",{attrs:{src:e.n_boundary}}):r("el-image",{attrs:{src:e.boundary}})],1),e._v(" "),r("li",[1==e.volumIsN?r("el-image",{attrs:{src:e.n_volum}}):r("el-image",{attrs:{src:e.volum}})],1)])])}),Y=[],q=r("1928"),X=r.n(q),Z=r("4551"),J=r.n(Z),Q=r("e176"),K=r.n(Q),$=r("a5e8"),ee=r.n($),te=r("092b"),re=r.n(te),ne=r("bb3c"),ie=r.n(ne),ae=r("bf5a"),oe=r.n(ae),se=r("420d"),le=r.n(se),ce=r("aedb"),he=r.n(ce),ue=r("d914"),de=r.n(ue),pe=r("7c3f"),fe=r.n(pe),me=r("2330"),ve=r.n(me),ge=r("c7b7"),ye=r.n(ge),xe=r("2cca"),be=r.n(xe),we=r("dbd5"),_e=r.n(we),Me=r("16d0"),Se=r.n(Me),Ae=r("0585"),Ee=r.n(Ae),Te=r("38c2"),Ce=r.n(Te),Le=r("2c00"),Re=r.n(Le),Pe=r("0195"),Oe=r.n(Pe),Ie=r("9f06"),De=r.n(Ie),Ne=r("95b0"),Be=r.n(Ne),Fe=r("7d64"),Ue=r.n(Fe),je=r("4ad6"),ze=r.n(je),ke={data:function(){return{n_min:X.a,min:J.a,n_max:K.a,max:ee.a,n_boundary:re.a,boundary:ie.a,n_volum:oe.a,volum:le.a,n_monitor:he.a,monitor:de.a,n_search:fe.a,search:ve.a,n_x_:ye.a,x_:be.a,n_x:_e.a,x:Se.a,n_y_:Ee.a,y_:Ce.a,n_y:Re.a,y:Oe.a,n_z_:De.a,z_:Be.a,n_z:Ue.a,z:ze.a,xyzsIsN:!1,boundaryIsN:!1,monitorIsN:!1,volumIsN:!1,isVShow:!0,tcss:"asideTag2"}},methods:{changeCssBig:function(){this.tcss="asideTag"},changeCssSmall:function(){this.tcss="asideTag2"},positive:function(e){this.$parent.positive(e)},negative:function(e){this.$parent.negative(e)},small:function(){this.$parent.small()},large:function(){this.$parent.large()}}},Ge=ke,He=(r("0f9e"),Object(A["a"])(Ge,W,Y,!1,null,null,null)),Ve=He.exports,We=(r("ea7f"),{data:function(){var e;return e={loadObjs:[],lesseeId:"",adilog:l.a,loading:V,run:h.a,runShow:"hidden",as1Show:!0,headMenu_2Show:!1,solutionShow:!1,solverShow:!1,resultsShow:!1,disOK:!0,modesShow:"hidden",dynamicShow:"hidden",Mcolor:"#0f0",Tcolor:"#666",MDynamic:"",staticShow:"visible",solutionPage:!1,solverPage:!1,resultsPage:!1,taskPage:!1,projects:[]},Object(o["a"])(e,"loading",!1),Object(o["a"])(e,"logs","欢迎来到FEM!"),Object(o["a"])(e,"footerShow",!0),Object(o["a"])(e,"rightTitle",""),Object(o["a"])(e,"loadResultRadio",[]),Object(o["a"])(e,"islogload",!0),Object(o["a"])(e,"vtkoneload",!0),Object(o["a"])(e,"modeShow",!1),Object(o["a"])(e,"dynaShow",!1),Object(o["a"])(e,"urlarr",[]),Object(o["a"])(e,"loadObj",{}),Object(o["a"])(e,"resFiles",[]),Object(o["a"])(e,"fileurls",[]),Object(o["a"])(e,"endUrl",""),Object(o["a"])(e,"righTop","15%"),Object(o["a"])(e,"files",""),Object(o["a"])(e,"dialog",{new_visiable:!1,load_visiable:!1,newmark_visiable:!1,stepControl_visiable:!1,contour_visiable:!1,contourMovie_visiable:!1}),Object(o["a"])(e,"parameterObj",{solution:{f_static:"true",solver:"",eigenv:"false",num_eigv:"",nlgeom:"",eigv_method:"",f_transient:"",alphad:"",betad:"",gam_newmark:"",bet_newmark:"",sid:"",num_steps:"",dt_str:"",freq:"",sort:""},static:{dump_stiff:!1,strain_o:!1},modes:{coupled:"",dump_stiff:!1,dump_mass:!1},transient:{coupled:"",dump_stiff:!1,dump_mass:!1,strain_o:!1},results:{loadResults:2,scalar:"Displacement-magnitude",transiation:!0,showElement:[]}}),Object(o["a"])(e,"newRules",{projectName:[{required:!0,message:"Project Name cannot be empty",trigger:"blur"}],projectDesc:[{required:!0,message:"Project Description cannot be empty",trigger:"blur"}],fileType:[{required:!0,message:"Please select File Type",trigger:"change"}]}),Object(o["a"])(e,"scalarSelectionAll",[]),Object(o["a"])(e,"data",[{label:"Setup",children:[{label:"Solution",children:[{label:"static"},{label:"modes"},{label:"transient"}]},{label:"Solver"},{label:"Results",children:[{label:"Begin"},{label:"Contour"}]}]}]),Object(o["a"])(e,"project",{projectName:"",projectDesc:"",solverstate:"0",fileType:"",projectId:"",loadfils:""}),e},components:{vueUploader:T,filesload:B,GlSl:F["a"],VtkLoad:U["a"],loading:V,transformtool:Ve},watch:{headMenu_2Show:{handler:function(e){this.rightButton()}}},methods:{solverstateFormat:function(e,t){switch(e.solverstate){case"0":return"未求解";case"1":return"求解中";case"2":return"求解完成";default:break}},clearAll:function(){var e=this;this.project={projectName:"",projectDesc:"",solverstate:"",fileType:"",projectId:"",loadfils:""},this.parameterObj={solution:{f_static:"true",solver:"",eigenv:"false",num_eigv:"",nlgeom:"",eigv_method:"",f_transient:"",alphad:"",betad:"",gam_newmark:"",bet_newmark:"",sid:"",num_steps:"",dt_str:"",freq:"",sort:""},static:{dump_stiff:!1,strain_o:!1},modes:{coupled:"",dump_stiff:!1,dump_mass:!1},transient:{coupled:"",dump_stiff:!1,dump_mass:!1,strain_o:!1},results:{loadResults:2,scalar:"Displacement-magnitude",transiation:!0,showElement:[]}},this.endUrl=this.rightTitle=this.MDynamic="",this.resFiles=this.urlarr=this.loadResultRadio=this.projects=this.scalarSelectionAll=[],this.loadObj={},this.staticShow="visible",this.dynamicShow=this.modesShow="hidden",this.Mcolor="#0f0",this.Tcolor="#666",this.logs="欢迎来到FEM!",this.headMenu_2Show=this.solutionShow=this.solverShow=this.resultsShow=this.solutionPage=this.solverPage=this.resultsPage=this.taskPage=this.loading=this.modeShow=this.dynaShow=!1,this.footerShow=this.islogload=this.vtkoneload=!0,this.$refs.vtkoneload.clearAll(),setTimeout((function(){e.$refs.vtkoneload.endhidden("move1")}),100)},headMenuShows:function(e){"solution"===e?(this.$refs.vtkoneload.beginUnhidden(this.project.loadfils),this.headMenu_2Show&&this.solutionShow?this.headMenu_2Show=this.solutionShow=!1:(this.solverShow=this.resultsShow=!1,this.headMenu_2Show=this.solutionShow=!0)):"solver"===e?(this.$refs.vtkoneload.beginUnhidden(this.project.loadfils),this.headMenu_2Show&&this.solverShow?this.headMenu_2Show=this.solverShow=!1:(this.solutionShow=this.resultsShow=!1,this.headMenu_2Show=this.solverShow=!0)):"results"===e&&(this.$refs.vtkoneload.beginhidden(),0===this.resFiles.length?""==this.project.projectId?this.$message.error("Please select file first"):(this.getResultsList(),this.headMenu_2Show&&this.resultsShow?this.headMenu_2Show=this.resultsShow=!1:(this.solutionShow=this.solverShow=!1,this.headMenu_2Show=this.resultsShow=!0)):this.headMenu_2Show&&this.resultsShow?this.headMenu_2Show=this.resultsShow=!1:(this.solutionShow=this.solverShow=!1,this.headMenu_2Show=this.resultsShow=!0))},handleNodeClick:function(e){switch(e.label){case"Solver":this.$refs.vtkoneload.beginUnhidden(this.project.loadfils),this.solutionPage=this.resultsPage=!1,this.solverPage=this.taskPage=!0;break;case"Solution":this.$refs.vtkoneload.beginUnhidden(this.project.loadfils),this.parameterObj.solution.f_static="true",this.mDynamicShow("true"),this.solverPage=this.resultsPage=!1,this.solutionPage=this.taskPage=!0;break;case"Results":this.$refs.vtkoneload.beginhidden(),this.resultsPage=this.taskPage=this.solverPage=this.solutionPage=!1;break;case"static":this.parameterObj.solution.f_static="true",this.mDynamicShow("true");break;case"modes":this.parameterObj.solution.f_static="false",this.mDynamicShow("false"),this.modesDynamicShow("modes"),this.solverPage=this.resultsPage=!1,this.solutionPage=this.taskPage=!0,this.modeShow=!0,this.dynaShow=!1;break;case"transient":this.parameterObj.solution.f_static="false",this.mDynamicShow("false"),this.modesDynamicShow("transient"),this.solverPage=this.resultsPage=!1,this.solutionPage=this.taskPage=!0,this.modeShow=!1,this.dynaShow=!0;break;case"Begin":this.$refs.vtkoneload.beginUnhidden(this.project.loadfils);break;case"Contour":this.$refs.vtkoneload.beginhidden(),0==this.resFiles.length?""==this.project.projectId?this.$message.error("Please select file first"):(this.getResultsList(),this.solutionPage=this.solverPage=!1,this.resultsPage=this.taskPage=!0):(this.solutionPage=this.solverPage=!1,this.resultsPage=this.taskPage=!0);break;default:}},modesDynamicShow:function(e){"modes"===e?(this.Mcolor="#0f0",this.Tcolor="#666",this.modesShow="",this.dynamicShow="hidden",this.modeShow=!0,this.dynaShow=!1):"transient"===e&&(this.Mcolor="#666",this.Tcolor="#0f0",this.modesShow="hidden",this.dynamicShow="",this.modeShow=!1,this.dynaShow=!0)},mDynamicShow:function(e){"true"===e?(this.staticShow="visible",this.MDynamic="hidden",this.modesShow="hidden"):"false"===e&&(this.staticShow="hidden",this.MDynamic="",this.modesShow="visible",this.staticShow="hidden")},taskPageOff:function(){this.taskPage=!1},updateParam:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(n in t=this.loadObj,r={},r="false"==this.parameterObj.solution.f_static?"false"==this.parameterObj.solution.eigenv?Object.assign(this.parameterObj.solution,this.parameterObj.transient):Object.assign(this.parameterObj.solution,this.parameterObj.modes):Object.assign(this.parameterObj.solution,this.parameterObj.static),t)t[n].value=r[n];i={transCode:"A00104",parameterObj:JSON.stringify(t),projectId:this.project.projectId,lesseeId:this.$store.getters.lesseeId},Object(u["c"])(i).then((function(e){})).catch((function(e){}));case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),femExe:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=this,r={transCode:"A00105",projectId:this.project.projectId,lesseeId:this.$store.getters.lesseeId,userName:this.$store.getters.name},Object(u["c"])(r).then((function(e){n.getLogs()})).catch((function(e){n.runShow="hidden","EB8100017"==e.returnCode&&d["MessageBox"].confirm("你还未分配资源?","提示",{confirmButtonText:"分配资源",cancelButtonText:"取消",type:"warning"}).then((function(){var e=t.$store.getters.proUrl+"?projectId="+t.project.projectId,r={transCode:"A00118",lesseeId:t.$store.getters.lesseeId};Object(u["c"])(r).then((function(t){window.location.href=e+"&authCode="+t.authCode})).catch((function(e){}))})).catch((function(){Object(d["Message"])({type:"info",message:"已取消"})}))}));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getLogs:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=function(){var e=t.project.projectId;if(null!=e&&""!=e&&t.islogload){t.islogload=!1;var n={transCode:"A00112",projectId:e,page:0,count:30};Object(u["c"])(n).then((function(e){var n=e.rows;t.logs="",n.forEach((function(e){t.logs=e.log+"\n"+t.logs,e.log.indexOf("Solver end")>=0&&(clearInterval(r),t.runShow="hidden",t.getResultsList())})),t.islogload=!0})).catch((function(e){t.runShow="hidden",t.islogload=!0}))}},t=this,r=setInterval(n,1e4),n();case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getUploadFiles:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this,r={transCode:"A00110",projectId:this.project.projectId},e.next=4,Object(u["c"])(r).then((function(e){e.files.forEach((function(e){".vtk"===e.filepath.substr(-4)&&(t.project.loadfils=e.filepath,t.$refs.vtkoneload.beginUnhidden(e.filepath))}))})).catch((function(e){}));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getFEMLoadFiles:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t={transCode:"A00107",projectId:this.project.projectId},e.next=3,Object(u["c"])(t).then((function(e){for(var t in r.rightTitle=e.projectName,r.project.projectId=e.projectId,r.loadObj=JSON.parse(e.parameterObj),r.loadObj)r.parameterObj.solution[t]=r.loadObj[t].value;"false"===r.parameterObj.solution.f_static?"true"===r.parameterObj.solution.eigenv?(r.parameterObj.modes.coupled=r.parameterObj.solution.coupled,r.parameterObj.modes.dump_stiff="false"!==r.parameterObj.solution.dump_stiff,r.parameterObj.modes.dump_mass="false"!==r.parameterObj.solution.dump_mass):(r.Mcolor="#666",r.Tcolor="#0f0",r.modesShow="hidden",r.dynamicShow="",r.parameterObj.transient.coupled=r.parameterObj.solution.coupled,r.parameterObj.transient.dump_stiff="false"!==r.parameterObj.solution.dump_stiff,r.parameterObj.transient.dump_mass="false"!==r.parameterObj.solution.dump_mass,r.parameterObj.transient.strain_o="false"!==r.parameterObj.solution.strain_o):(r.parameterObj.static.dump_stiff="false"!==r.parameterObj.solution.dump_stiff,r.parameterObj.static.strain_o="false"!==r.parameterObj.solution.strain_o)})).catch((function(e){}));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getResultsList:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.loadObjs=[],t=this,r={transCode:"A00109",projectId:this.project.projectId},Object(u["c"])(r).then((function(e){var r={type:1,message:"获取结果文件",state:-1};t.loadObjs.push(r),n.resFiles=e.files;var i=[];n.loadResultRadio=[],e.files.forEach((function(e){if(".rst"==e.filepath.substr(-4))i=e.filepath.split("/"),n.loadResultRadio.push(i[i.length-1]);else if(e.filepath.includes("transient1.vtk"))t.$refs.vtkoneload.endUrlLoad(e.filepath,(function(){})),n.urlarr.push(e.filepath);else if(".vtk"==e.filepath.substr(-4)){if(e.filepath.includes("transient.vtk"))return;n.urlarr.push(e.filepath)}}));var a=n.urlarr.length;if(n.urlarr.forEach((function(e){e.includes("transient".concat(a,".vtk"))&&(n.endUrl=e)})),0!=n.resFiles.length){var o=n.endUrl.split("/"),s=o[o.length-1],l={type:2,filename:s,percentage:0};n.loadObjs.push(l),n.$refs.filesload.load(n.endUrl),n.loadObjs[0].state=1}})).catch((function(e){}));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),reUpload:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$refs.bdf.uploader.upload();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),saveProject:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t){var r,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=this,this.$refs[t].validate((function(e){if(!e||0==n.files.length)return r.$message.error("Please complete the form"),!1;r.loadObjs=[];var t={type:1,message:"创建项目",state:-1};r.loadObjs.push(t);var i={type:1,message:"上传文件",state:-1};r.loadObjs.push(i);var a={transCode:"A00100",projectName:r.project.projectName,projectDesc:r.project.projectDesc,parameterObj:null,projectType:"fem",fileType:r.project.fileType,lesseeId:n.$store.getters.lesseeId};Object(u["c"])(a).then((function(e){r.project.projectId=e.projectId,r.project.projectName=e.projectName,r.reUpload()})).catch((function(e){})),t.state=1}));case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),ugridShow:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,n,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(""!=this.project.projectId){e.next=4;break}this.$message.error("Please save it first"),e.next=21;break;case 4:return this.loadObjs=[],t={type:1,message:"获取参数",state:-1},this.loadObjs.push(t),r={type:1,message:"获取上传文件",state:-1},this.loadObjs.push(r),e.next=11,this.getFEMLoadFiles();case 11:return t.state=1,e.next=14,this.getUploadFiles();case 14:r.state=1,n=this.project.loadfils.split("/"),i=n[n.length-1],a={type:2,filename:i,percentage:0},this.loadObjs.push(a),this.$refs.filesload.load(this.project.loadfils),this.dialog.new_visiable=!1;case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),fileLoadeState:function(e){var t=this;e.forEach((function(e){t.loadObjs.forEach((function(t){2==t.type&&t.filename===e.name&&(t.percentage=e.percentage),t.type}))}))},upDisOk:function(){this.disOK=!1,this.loadObjs[1].state=1},loadfileShow:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t,r,n,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadObjs=[],t={type:1,message:"获取参数",state:-1},this.loadObjs.push(t),r={type:1,message:"获取上传文件URL",state:-1},this.loadObjs.push(r),e.next=7,this.getFEMLoadFiles();case 7:return t.state=1,e.next=10,this.getUploadFiles();case 10:r.state=1,n=this.project.loadfils.split("/"),i=n[n.length-1],a={type:2,filename:i,percentage:0},this.loadObjs.push(a),this.$refs.filesload.load(this.project.loadfils),this.dialog.load_visiable=!1;case 17:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),femRun:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadObjs=[],t={type:1,message:"更新参数",state:-1},this.loadObjs.push(t),e.next=5,this.updateParam();case 5:return t.state=1,this.runShow="visible",e.next=9,this.femExe();case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),newmarkShow:function(){"2"===this.parameterObj.solution.f_transient?this.dialog.newmark_visiable=!0:this.dialog.newmark_visiable=!1},stepControlClick:function(){this.dialog.stepControl_visiable=!0},contourShow:function(e){switch(e){case"Contour":this.parameterObj.results.showElement.indexOf("Contour")>=0?this.$refs.vtkoneload.endContour(this.endUrl,this.parameterObj.results.scalar):this.parameterObj.results.showElement.indexOf("Contour Movie")>=0||this.parameterObj.results.showElement.indexOf("Vector")>=0?this.$refs.vtkoneload.endhidden("contourImg"):this.$refs.vtkoneload.endhidden("contourAll");break;case"Edge":this.parameterObj.results.showElement.indexOf("Edge")>=0?this.$refs.vtkoneload.endEdge(this.endUrl):this.$refs.vtkoneload.endhidden("edge");break;case"Scatter":this.parameterObj.results.showElement.indexOf("Scatter")>=0?this.$refs.vtkoneload.endScatter(this.endUrl):this.$refs.vtkoneload.endhidden("scatter");break;case"Vector":this.parameterObj.results.showElement.indexOf("Vector")>=0?this.$refs.vtkoneload.endVector(this.endUrl,this.parameterObj.results.scalar):this.parameterObj.results.showElement.indexOf("Contour")>=0||this.parameterObj.results.showElement.indexOf("Contour Movie")>=0?this.$refs.vtkoneload.endhidden("vectorImg"):this.$refs.vtkoneload.endhidden("vectorAll");break;case"Shade":this.parameterObj.results.showElement.indexOf("Shade")>=0?this.$refs.vtkoneload.endShade(this.endUrl):this.$refs.vtkoneload.endhidden("shade");break;case"Mesh":this.parameterObj.results.showElement.indexOf("Mesh")>=0?this.$refs.vtkoneload.endMesh(this.endUrl):this.$refs.vtkoneload.endhidden("mesh");break;case"Contour Movie":this.parameterObj.results.showElement.indexOf("Contour Movie")>=0?this.$refs.vtkoneload.moveInitUrls(this.urlarr,this.parameterObj.results.scalar):this.parameterObj.results.showElement.indexOf("Vector")>=0||this.parameterObj.results.showElement.indexOf("Contour")>=0?this.$refs.vtkoneload.endhidden("moveImg"):this.$refs.vtkoneload.endhidden("moveAll");break;default:}},loadProjects:function(){var e=this,t={transCode:"A00101",page:1,size:1,projectType:"fem",lesseeId:this.$store.getters.lesseeId};this.loading=!0,Object(u["c"])(t).then((function(t){e.projects=t.rows,e.loading=!1})).catch((function(e){}))},projectsSelectionChange:function(e){e.length>0&&(this.project.projectName=e[0].projectName,this.project.solverstate=e[0].solverstate,this.project.projectDescription=e[0].projectDescription,this.project.createTime=e[0].createTime)},projectsSelectionSelect:function(e,t){this.project.projectId=t.projectId,e.length<=1||(this.$refs.projectsTable.clearSelection(),this.$refs.projectsTable.toggleRowSelection(t,!0))},projectsSelectionAll:function(){this.$refs.projectsTable.clearSelection()},footerShows:function(e){switch(e){case"foot":this.footerShow=!this.footerShow,this.footerShow?this.as1Show?this.$refs.vtkoneload.getcaHeight(500):this.$refs.vtkoneload.getcaHeight(600):this.as1Show?this.$refs.vtkoneload.getcaHeight(700):this.$refs.vtkoneload.getcaHeight(800);break;case"as":this.as1Show=!this.as1Show,this.footerShow&&this.as1Show?this.$refs.vtkoneload.getcaHeight(500):!this.footerShow&&this.as1Show?this.$refs.vtkoneload.getcaHeight(700):this.footerShow&&!this.as1Show?this.$refs.vtkoneload.getcaHeight(600):this.footerShow||this.as1Show||this.$refs.vtkoneload.getcaHeight(800);default:}},outPutStaticChange:function(e){"stiff"==e?this.parameterObj.static.strain_o=!this.parameterObj.static.dump_stiff:this.parameterObj.static.dump_stiff=!this.parameterObj.static.strain_o},outPutmodesChange:function(e){"stiff"==e?this.parameterObj.modes.dump_mass=!this.parameterObj.modes.dump_stiff:this.parameterObj.modes.dump_stiff=!this.parameterObj.modes.dump_mass},init:function(){this.project.projectId=this.$route.query.projectId,this.lesseeId=this.$store.getters.lesseeId,void 0!=this.project.projectId&&null!=this.project.projectId&&this.loadfileShow()},spenmaps:function(e){this.scalarSelectionAll=e},large:function(){this.$refs.vtkoneload.large()},small:function(){this.$refs.vtkoneload.small()},positive:function(e){this.$refs.vtkoneload.positive(e)},negative:function(e){this.$refs.vtkoneload.negative(e)},rightButton:function(){this.headMenu_2Show?this.righTop="28%":this.righTop="15%"},handfiles:function(e){this.files="",this.files=e},topdivshow:function(e){switch(e.target.className){case"vtkMovie":this.headMenu_2Show=!1;break;case"vtkContour":this.headMenu_2Show=!1;break;case"contour":this.headMenu_2Show=!1;break;default:}}},created:function(){this.init()},mounted:function(){this.clearAll()}}),Ye=We,qe=(r("5e94"),Object(A["a"])(Ye,n,i,!1,null,null,null));t["default"]=qe.exports},b85c:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("06c5");function i(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Object(n["a"])(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r["return"]||r["return"]()}finally{if(l)throw o}}}}},b8c3:function(e,t,r){e.exports=r.p+"static/img/loding.6295dd24.gif"},bb3c:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEQklEQVRYR+2YSyz8VxTHv/c3jEfEiFcEq5K/GBULCTODEFJiXSw08Q5FdxYIFt6sPZMShPAnWEitkZj+JtGSaNCFiEciVLSVeizM/H7Nuc1MTPtv5/H7/f0telYzc+8553PPuffcM5fhhej1eq1Op/tSluUvGGPRADQvxz/y518YY2ZZlt+Lovir3Rezf0hPT08VBOE9gPiPDOLK/O+yLH9tsVgWaSIHNJlMn8uyvA1A50r7lcZlAF+JorhAgMxgMHzPGDO8knN33fxG2WQZGRkGSZJEd7Veed43zGg0NgIYfmXHbrmTZXmOAFsA9Lul8fqT1v8HVBh09SMoCAIkSVLI5VBXFzArKwvBwcFYX19/e4AajQazs7MIDAxEaWkpHh8f1YBUL4JFRUVISEjA09MThxsfH387gEFBQejo6MDKygpiYmKQmJiI6elpXF5eKoVUJ4INDQ3Y2tqCj48P4uLiYDabUVdXh66urk8PGBUVhZqaGvT09CAlJYUDrq6uorq6Gnt7e9jd3VUCqTyCbW1tmJqa4ul8Cejv74/Ozk60trYqKTvKAGmv5ebmYmRkhEfpJSB9z8/PB4Gura15G0VlgAMDAzy19/f3HwRkjIHm0F58eHjwBtJ7wJycHERGRmJpacnh+O8RpAGKcl5eHoaHvWqYvAOk0zo4OIjm5mZYrVYHYHJyMk/z3NycU7Ro3vz8PC4uLjyNoneAxcXFuLm5webmppNDOsEmk4nfKC8lIiICVIro0HgongNSUW5vb0dLC7WRzvJvgDSroqICBwcH2NnZ8YTRc8DGxkZsbGzg8PDQyZGvry8qKyv5ddfX14fb21unca1Wy3+ndNtsNnchPQOMjo7mEL29vU4ODAYDSkpKsLy8jPPzc9TX1+Po6AiLi4t4fn52zKWSFBISwgu5m+IZIKV2YmICV1dX3H5sbCxqa2txfHyMhYUFJxg7NMFsb9M/2r+kv7+fL9BemlyAug+YlJSE7OxsjI6OIiAgAOXl5QgPD8fY2Ng/0ml3SmmnLkev12NychKnp6d8C1ABHxoacieI7gHaC253dzc/pQUFBZiZmcH+/r47ThAWFoaqqirehpEebQGqn2dnZ6703QOkokxgOp0Ooijyq8ubtp6yUFZWxg9YfHw8b9EUp5jSREU2NDSUb/rr62tXRj84Tgui646yUVhYCKPRiKamJlgslv+y5zqC9CeICq2fnx9v52n/0U2ihlApOjk5UQaoBogCG64jqMC4GqpvHvA7enqrYYx9q8Zy1bbBGJtgaWlp7zQazc/2x0y1nSi0V8pfWI1GIz23lig0prb68d3dXRIHzMrKirDZbNuyLL9T24uX9v4QBCHXbDb/4HhET01NDddqtaMAij5lumVZtjDGakVR/IkW5wC0rzQzM/Mzq9WaKwhCrCRJ/l5GwCM1QRCskiRdazQa0Ww2/wiAHtG5/Al+DLiKLqAl3wAAAABJRU5ErkJggg=="},bf5a:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABOtJREFUWAnNWFsovVkUX+e431MYQ9RQDOMBSR6IjCIiyqTxME3uJqJRXtxDDI3IvUQkQiPEA//iRUiExhReFHKbItfczVq7//d1OM75LsZl1e7b395r7/3ba6/b3gpQoZaWljCFQvEbNvlhsVbpeuvqPS6wi2USy5+pqal/cwsqqNLf369/dHTUamlp+au3tzfY29uDkZERx/Pm38fHRzg/P4fNzU1YXl6+v76+zklJSanjF25tba0fGxt7vL29Rd6PpbOzs8fe3t4HxPQTAVQ0NTW5mpiY/BMXF6djYGDAg/7IyuHhIQwNDe2hJL9T6ujo/Ozq6vppwJFgbGxs4FskfX39H5VoFD9YW7+nPYg7m6+Yvleixhnp6uqKG/WOXIaGhoDCs1a+45qylpIlOrR2QJ8JaHGyFuUGubu7Q3R0NPf74lcywIeHBygsLITAwEAICwt7cdLnjVdXV3Bzc8M3r66uwvDwMCwsLAgClHTEBK6oqAgCAgJEgyNUpE/m5uasYECAgYEBKCkp4QFrq4iWIBoTlJWVga+vL4SHh2ubU2Mf+beamhooLS1loDUyqnSIkiCBq6ioAE9PT4iMjFQZ/rRKx6hJL09PT9kG8/PzwcLC4ulALX+iANKuSaGjoqK0TAXQ09MDGKLUeEgHSTWys7OZE1Zj0NIgeMR1dXWwtLQEVlZW0NnZqXEqknJ7eztgeGISwijA866srEBiYiI4OTnxbWIrggDX1tYgLy9PcD6ScnBwMGDohKmpKSgoKODH0AY9PDz4fykVQYCUQLi5uWmdkwDY2tqCn58fS5sw+YCDgwMICgrSOk5Mpygd1DYRuZ7GxkbIzMzk2ZKTk6Gjo+OJ7+M7JVZeDXBwcBD8/f2fKL+ZmRnExMRAd3e3RDjq7K8CeHJyApjoQnx8vNrMZPFzc3NAvu819CqAzc3NzDpVLZYDo1QqIT09Herr67kmWV/ZADc2Nph06Hg1kZeXl6Yu0e2yAJLPq62tZY6XW2lxcRH6+vpgdHSUuRmunYxnb28PyJjkkCyA4+PjLLI4OjrC9vY25ObmMl2srq5mR0qOOSMjA9bX15nx0G1tZGREDj4Q9IPPZ728vAS8dbGgjxcuoNQpKysL8F7Ds1JII+Ckf6ampuDj4wNk7aGhoZKvs5IlSOGMUqecnBxwdnZmPlAVHIfSwcEBqqqqICIigm2Cjpg2xhFJlO7fQiRJgltbWywhoOhCC5Oh0DHSpfslIl2l7IbyQRrb1dUFsbGxMDs7C6QGYkKoJIB0uWpra6PLzEt42HGSe3lO5eXlUFlZyZrJN87MzLDs5iXe52MlAbSzswMqUon8JKnF9PQ0K8XFxSAGHK2jvl2pq4vkn5+fB7J+ygvFgqOpBSVIyk3Z8GuI3AxdkkhylI5JIUGALi4u0NDQIGVONd6QkBBIS0sDPT09tT6hBkGA5HA/kujp40ZuGHpL4F/v0Seor8rN4+Pjt1xL1tyECYW3SVb8FznczyRFcvw7Ozvn6He/KPGpdQYTzxHy7p+B7u7uYHJyEu7v78uTkpKOOD/4Cwb9uYmJCaCniY8gCou7u7vMHe3v77ej4P4gHHzMwkuOISrm79iWZmxs7IDl3XCSel1cXNCdml73K/GVv4dbnAfINeBOFPi0ZofG8w0WtX6O73/+3qID30tISPj3+bz/AdtPclK0A/BBAAAAAElFTkSuQmCC"},c1a4:function(e,t,r){},c7b7:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEEElEQVRYR+2ZfUxVZRjAf++9XC4EkvFhqDOKj3Br0z50dyuZEl0yYLvkhpv908gNMkpDq+HUxJw2k2m3Qufa3HTSCJyoRLUAizDNwI+2stCNNiRcUnipe/kS7tsOxysX+bxwv9p6t/PPOc/7PL/zvM953ud5j+DuUSg1plDmCx2zpR0x4rmHbogBbloi+PmbbNHjbOIOQFaZ1Pa2sV7A+sj7iA4PBe/hga0H2tqxSsnBwGDeLs8VnQroIGDOAam70c2xhHlkvLwUYiM85KYJ1HZ0wcEzcPoyv2oFxmNrResgYOZeufORODZuSwetxjdwzlYP/wAV31N3fJ1YJp7/SEZoofVANkHh9/geTiGwS8j7BK63YxQms3zh0ThKCtP9A85BUXoBSuv5QGSa5VvLn2BX7lP+BXi6GYoqOS5M78uCtMW8m/OkfwGe+Q3eq6TKq4DtNjh0DjIXQHzk+A7xOqACt7saLDbQ62Dt05AwDqRXAW9YoagGZoXBlevwYBS0WeC1ZEiMGt2TXgU83AAdNnglCV4thQ2p0NgC1zqgwOgHgM4IOSUq4Fiec8h61YP/A46XEG52w3fNEKyDlIeHJLtvQe0VCNBCaiJobtdNPlniffVwqQXykmHhHBXy04tQexmyFoExcQjcJ4CKt7ZWgZTwTgb82QU7P4fE2fD6suH+9wmggtDUDnuqYXGsmuOUhFyYAWF6LwBKoKtv9EhUYs8RX0d/hK9+UuWcl9vjX3FPP3xYNzrgiwaYpbQHQHUTlDeCRgNvpkLcKJW5z5b4907Y8QU8FAV//A06LWxNg6AALyzxRIVYvx22fwkdVtiWAdcsUPw1GOJhtcEPAJXq99QvsMoAyfEq0MdnoaEZVi8BQ4wP08zFVthfBw9EwqZnhzrVf3phcyXY7bDpOYieoUJ6LAYtPVDSAKsWQXjwkEcs3dA3ADP06m7iPDp7oLcfQgLVy2OACsTuGgjRwxspEKidKCrHfu52Dyp7rQKnjNwkCL7rq3QVdfMJeGmJejgQoIGxWt1Jl1tHGuHbJlcxJid//0zYPka7O2lAay8U1YKtF9YshdDbsTQ5hJFSbvegYsLWp/YUdmBj6sjk6wqs22PQYVyBLLsEKxbAvUGuIA2XVXQkJ0BUyPg6Jr3EU0eZ3sz/FGC+8XH25CVN743dPfvUVTBXUSZMe+UzMXOoNq90t4np6Suuh5oLbBGDp6tdXC3MImbh3OkpdddsZXNYc4hbVsn8wV7LZJZpYaF8tmMFYt5Md5mZmh4lW2w5Cc2t7DqRLwruHKKbzDI7UMf+5Y+hT4pXq2RHKT81U67NUvb78y1QcR4snZj1c9lQvlIMDPvNkL5Pxgb0sQ5IAaIBb55Y/4XgnMZOcUW+OOt4vX8BupcNx1mwgQYAAAAASUVORK5CYII="},ce0b:function(e,t,r){},d81c:function(e,t,r){(function(e,r){r(t)})(0,(function(e){"use strict";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){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var n=arguments[r];if(void 0!==n&&null!==n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t});var t="118",r={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},n={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},i=0,a=1,o=2,s=3,l=0,c=1,h=0,u=1,d=2,p=3,f=0,m=1,v=2,g=1,y=2,x=0,b=1,w=2,_=3,M=4,S=5,A=100,E=101,T=102,C=103,L=104,R=200,P=201,O=202,I=203,D=204,N=205,B=206,F=207,U=208,j=209,z=210,k=0,G=1,H=2,V=3,W=4,Y=5,q=6,X=7,Z=0,J=1,Q=2,K=0,$=1,ee=2,te=3,re=4,ne=5,ie=300,ae=301,oe=302,se=303,le=304,ce=306,he=307,ue=1e3,de=1001,pe=1002,fe=1003,me=1004,ve=1004,ge=1005,ye=1005,xe=1006,be=1007,we=1007,_e=1008,Me=1008,Se=1009,Ae=1010,Ee=1011,Te=1012,Ce=1013,Le=1014,Re=1015,Pe=1016,Oe=1017,Ie=1018,De=1019,Ne=1020,Be=1021,Fe=1022,Ue=1023,je=1024,ze=1025,ke=Ue,Ge=1026,He=1027,Ve=1028,We=1029,Ye=1030,qe=1031,Xe=1032,Ze=1033,Je=33776,Qe=33777,Ke=33778,$e=33779,et=35840,tt=35841,rt=35842,nt=35843,it=36196,at=37492,ot=37496,st=37808,lt=37809,ct=37810,ht=37811,ut=37812,dt=37813,pt=37814,ft=37815,mt=37816,vt=37817,gt=37818,yt=37819,xt=37820,bt=37821,wt=36492,_t=37840,Mt=37841,St=37842,At=37843,Et=37844,Tt=37845,Ct=37846,Lt=37847,Rt=37848,Pt=37849,Ot=37850,It=37851,Dt=37852,Nt=37853,Bt=2200,Ft=2201,Ut=2202,jt=2300,zt=2301,kt=2302,Gt=2400,Ht=2401,Vt=2402,Wt=2500,Yt=2501,qt=0,Xt=1,Zt=2,Jt=3e3,Qt=3001,Kt=3007,$t=3002,er=3003,tr=3004,rr=3005,nr=3006,ir=3200,ar=3201,or=0,sr=1,lr=0,cr=7680,hr=7681,ur=7682,dr=7683,pr=34055,fr=34056,mr=5386,vr=512,gr=513,yr=514,xr=515,br=516,wr=517,_r=518,Mr=519,Sr=35044,Ar=35048,Er=35040,Tr=35045,Cr=35049,Lr=35041,Rr=35046,Pr=35050,Or=35042;function Ir(){}Object.assign(Ir.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var r=this._listeners,n=r[e];if(void 0!==n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners,r=t[e.type];if(void 0!==r){e.target=this;for(var n=r.slice(0),i=0,a=n.length;i<a;i++)n[i].call(this,e)}}}});for(var Dr=[],Nr=0;Nr<256;Nr++)Dr[Nr]=(Nr<16?"0":"")+Nr.toString(16);var Br,Fr={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,r=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=Dr[255&e]+Dr[e>>8&255]+Dr[e>>16&255]+Dr[e>>24&255]+"-"+Dr[255&t]+Dr[t>>8&255]+"-"+Dr[t>>16&15|64]+Dr[t>>24&255]+"-"+Dr[63&r|128]+Dr[r>>8&255]+"-"+Dr[r>>16&255]+Dr[r>>24&255]+Dr[255&n]+Dr[n>>8&255]+Dr[n>>16&255]+Dr[n>>24&255];return i.toUpperCase()},clamp:function(e,t,r){return Math.max(t,Math.min(r,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,r,n,i){return n+(e-t)*(i-n)/(r-t)},lerp:function(e,t,r){return(1-r)*e+r*t},smoothstep:function(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*e*(3-2*e))},smootherstep:function(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*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*Fr.DEG2RAD},radToDeg:function(e){return e*Fr.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))},setQuaternionFromProperEuler:function(e,t,r,n,i){var a=Math.cos,o=Math.sin,s=a(r/2),l=o(r/2),c=a((t+n)/2),h=o((t+n)/2),u=a((t-n)/2),d=o((t-n)/2),p=a((n-t)/2),f=o((n-t)/2);switch(i){case"XYX":e.set(s*h,l*u,l*d,s*c);break;case"YZY":e.set(l*d,s*h,l*u,s*c);break;case"ZXZ":e.set(l*u,l*d,s*h,s*c);break;case"XZX":e.set(s*h,l*f,l*p,s*c);break;case"YXY":e.set(l*p,s*h,l*f,s*c);break;case"ZYZ":e.set(l*f,l*p,s*h,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}};function Ur(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}function jr(){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.defineProperties(Ur.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(Ur.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,r=this.y,n=e.elements;return this.x=n[0]*t+n[3]*r+n[6],this.y=n[1]*t+n[4]*r+n[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 r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))},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)+Math.PI;return e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,r=this.y-e.y;return t*t+r*r},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,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this},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,r){return void 0!==r&&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 r=Math.cos(t),n=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*r-a*n+e.x,this.y=i*n+a*r+e.y,this},random:function(){return this.x=Math.random(),this.y=Math.random(),this}}),Object.assign(jr.prototype,{isMatrix3:!0,set:function(e,t,r,n,i,a,o,s,l){var c=this.elements;return c[0]=e,c[1]=n,c[2]=o,c[3]=t,c[4]=i,c[5]=s,c[6]=r,c[7]=a,c[8]=l,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,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this},extractBasis:function(e,t,r){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),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},multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var r=e.elements,n=t.elements,i=this.elements,a=r[0],o=r[3],s=r[6],l=r[1],c=r[4],h=r[7],u=r[2],d=r[5],p=r[8],f=n[0],m=n[3],v=n[6],g=n[1],y=n[4],x=n[7],b=n[2],w=n[5],_=n[8];return i[0]=a*f+o*g+s*b,i[3]=a*m+o*y+s*w,i[6]=a*v+o*x+s*_,i[1]=l*f+c*g+h*b,i[4]=l*m+c*y+h*w,i[7]=l*v+c*x+h*_,i[2]=u*f+d*g+p*b,i[5]=u*m+d*y+p*w,i[8]=u*v+d*x+p*_,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8];return t*a*c-t*o*l-r*i*c+r*o*s+n*i*l-n*a*s},getInverse:function(e,t){void 0!==t&&console.warn("THREE.Matrix3: .getInverse() can no longer be configured to throw on degenerate.");var r=e.elements,n=this.elements,i=r[0],a=r[1],o=r[2],s=r[3],l=r[4],c=r[5],h=r[6],u=r[7],d=r[8],p=d*l-c*u,f=c*h-d*s,m=u*s-l*h,v=i*p+a*f+o*m;if(0===v)return this.set(0,0,0,0,0,0,0,0,0);var g=1/v;return n[0]=p*g,n[1]=(o*u-d*a)*g,n[2]=(c*a-o*l)*g,n[3]=f*g,n[4]=(d*i-o*h)*g,n[5]=(o*s-c*i)*g,n[6]=m*g,n[7]=(a*h-u*i)*g,n[8]=(l*i-a*s)*g,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,r,n,i,a,o){var s=Math.cos(i),l=Math.sin(i);this.set(r*s,r*l,-r*(s*a+l*o)+a+e,-n*l,n*s,-n*(-l*a+s*o)+o+t,0,0,1)},scale:function(e,t){var r=this.elements;return r[0]*=e,r[3]*=e,r[6]*=e,r[1]*=t,r[4]*=t,r[7]*=t,this},rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=this.elements,i=n[0],a=n[3],o=n[6],s=n[1],l=n[4],c=n[7];return n[0]=t*i+r*s,n[3]=t*a+r*l,n[6]=t*o+r*c,n[1]=-r*i+t*s,n[4]=-r*a+t*l,n[7]=-r*o+t*c,this},translate:function(e,t){var r=this.elements;return r[0]+=e*r[2],r[3]+=e*r[5],r[6]+=e*r[8],r[1]+=t*r[2],r[4]+=t*r[5],r[7]+=t*r[8],this},equals:function(e){for(var t=this.elements,r=e.elements,n=0;n<9;n++)if(t[n]!==r[n])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var r=0;r<9;r++)this.elements[r]=e[r+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}});var zr={getDataURL:function(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;var t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Br&&(Br=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Br.width=e.width,Br.height=e.height;var r=Br.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),t=Br}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},kr=0;function Gr(e,t,r,n,i,a,o,s,l,c){Object.defineProperty(this,"id",{value:kr++}),this.uuid=Fr.generateUUID(),this.name="",this.image=void 0!==e?e:Gr.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:Gr.DEFAULT_MAPPING,this.wrapS=void 0!==r?r:de,this.wrapT=void 0!==n?n:de,this.magFilter=void 0!==i?i:xe,this.minFilter=void 0!==a?a:_e,this.anisotropy=void 0!==l?l:1,this.format=void 0!==o?o:Ue,this.internalFormat=null,this.type=void 0!==s?s:Se,this.offset=new Ur(0,0),this.repeat=new Ur(1,1),this.center=new Ur(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new jr,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==c?c:Jt,this.version=0,this.onUpdate=null}function Hr(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=1),this.x=e,this.y=t,this.z=r,this.w=n}function Vr(e,t,r){this.width=e,this.height=t,this.scissor=new Hr(0,0,e,t),this.scissorTest=!1,this.viewport=new Hr(0,0,e,t),r=r||{},this.texture=new Gr(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.generateMipmaps=void 0!==r.generateMipmaps&&r.generateMipmaps,this.texture.minFilter=void 0!==r.minFilter?r.minFilter:xe,this.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,this.stencilBuffer=void 0===r.stencilBuffer||r.stencilBuffer,this.depthTexture=void 0!==r.depthTexture?r.depthTexture:null}function Wr(e,t,r){Vr.call(this,e,t,r),this.samples=4}function Yr(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=1),this._x=e,this._y=t,this._z=r,this._w=n}Gr.DEFAULT_IMAGE=void 0,Gr.DEFAULT_MAPPING=ie,Gr.prototype=Object.assign(Object.create(Ir.prototype),{constructor:Gr,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.internalFormat=e.internalFormat,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 r={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 n=this.image;if(void 0===n.uuid&&(n.uuid=Fr.generateUUID()),!t&&void 0===e.images[n.uuid]){var i;if(Array.isArray(n)){i=[];for(var a=0,o=n.length;a<o;a++)i.push(zr.getDataURL(n[a]))}else i=zr.getDataURL(n);e.images[n.uuid]={uuid:n.uuid,url:i}}r.image=n.uuid}return t||(e.textures[this.uuid]=r),r},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(this.mapping!==ie)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ue:e.x=e.x-Math.floor(e.x);break;case de:e.x=e.x<0?0:1;break;case pe:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case ue:e.y=e.y-Math.floor(e.y);break;case de:e.y=e.y<0?0:1;break;case pe:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(Gr.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.defineProperties(Hr.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(Hr.prototype,{isVector4:!0,set:function(e,t,r,n){return this.x=e,this.y=t,this.z=r,this.w=n,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,r=this.y,n=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*r+a[8]*n+a[12]*i,this.y=a[1]*t+a[5]*r+a[9]*n+a[13]*i,this.z=a[2]*t+a[6]*r+a[10]*n+a[14]*i,this.w=a[3]*t+a[7]*r+a[11]*n+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,r,n,i,a=.01,o=.1,s=e.elements,l=s[0],c=s[4],h=s[8],u=s[1],d=s[5],p=s[9],f=s[2],m=s[6],v=s[10];if(Math.abs(c-u)<a&&Math.abs(h-f)<a&&Math.abs(p-m)<a){if(Math.abs(c+u)<o&&Math.abs(h+f)<o&&Math.abs(p+m)<o&&Math.abs(l+d+v-3)<o)return this.set(1,0,0,0),this;t=Math.PI;var g=(l+1)/2,y=(d+1)/2,x=(v+1)/2,b=(c+u)/4,w=(h+f)/4,_=(p+m)/4;return g>y&&g>x?g<a?(r=0,n=.707106781,i=.707106781):(r=Math.sqrt(g),n=b/r,i=w/r):y>x?y<a?(r=.707106781,n=0,i=.707106781):(n=Math.sqrt(y),r=b/n,i=_/n):x<a?(r=.707106781,n=.707106781,i=0):(i=Math.sqrt(x),r=w/i,n=_/i),this.set(r,n,i,t),this}var M=Math.sqrt((m-p)*(m-p)+(h-f)*(h-f)+(u-c)*(u-c));return Math.abs(M)<.001&&(M=1),this.x=(m-p)/M,this.y=(h-f)/M,this.z=(u-c)/M,this.w=Math.acos((l+d+v-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 r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))},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,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this.w=e.w+(t.w-e.w)*r,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},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,r){return void 0!==r&&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},random:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}),Vr.prototype=Object.assign(Object.create(Ir.prototype),{constructor:Vr,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"})}}),Wr.prototype=Object.assign(Object.create(Vr.prototype),{constructor:Wr,isWebGLMultisampleRenderTarget:!0,copy:function(e){return Vr.prototype.copy.call(this,e),this.samples=e.samples,this}}),Object.assign(Yr,{slerp:function(e,t,r,n){return r.copy(e).slerp(t,n)},slerpFlat:function(e,t,r,n,i,a,o){var s=r[n+0],l=r[n+1],c=r[n+2],h=r[n+3],u=i[a+0],d=i[a+1],p=i[a+2],f=i[a+3];if(h!==f||s!==u||l!==d||c!==p){var m=1-o,v=s*u+l*d+c*p+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,l=l*m+d*w,c=c*m+p*w,h=h*m+f*w,m===1-o){var _=1/Math.sqrt(s*s+l*l+c*c+h*h);s*=_,l*=_,c*=_,h*=_}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=h},multiplyQuaternionsFlat:function(e,t,r,n,i,a){var o=r[n],s=r[n+1],l=r[n+2],c=r[n+3],h=i[a],u=i[a+1],d=i[a+2],p=i[a+3];return e[t]=o*p+c*h+s*d-l*u,e[t+1]=s*p+c*u+l*h-o*d,e[t+2]=l*p+c*d+o*u-s*h,e[t+3]=c*p-o*h-s*u-l*d,e}}),Object.defineProperties(Yr.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(Yr.prototype,{isQuaternion:!0,set:function(e,t,r,n){return this._x=e,this._y=t,this._z=r,this._w=n,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 r=e._x,n=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(r/2),c=o(n/2),h=o(i/2),u=s(r/2),d=s(n/2),p=s(i/2);switch(a){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var r=t/2,n=Math.sin(r);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(r),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t=e.elements,r=t[0],n=t[4],i=t[8],a=t[1],o=t[5],s=t[9],l=t[2],c=t[6],h=t[10],u=r+o+h;if(u>0){var d=.5/Math.sqrt(u+1);this._w=.25/d,this._x=(c-s)*d,this._y=(i-l)*d,this._z=(a-n)*d}else if(r>o&&r>h){var p=2*Math.sqrt(1+r-o-h);this._w=(c-s)/p,this._x=.25*p,this._y=(n+a)/p,this._z=(i+l)/p}else if(o>h){var f=2*Math.sqrt(1+o-r-h);this._w=(i-l)/f,this._x=(n+a)/f,this._y=.25*f,this._z=(s+c)/f}else{var m=2*Math.sqrt(1+h-r-o);this._w=(a-n)/m,this._x=(i+l)/m,this._y=(s+c)/m,this._z=.25*m}return this._onChangeCallback(),this},setFromUnitVectors:function(e,t){var r=1e-6,n=e.dot(t)+1;return n<r?(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(Fr.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var r=this.angleTo(e);if(0===r)return this;var n=Math.min(1,t/r);return this.slerp(e,n),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 r=e._x,n=e._y,i=e._z,a=e._w,o=t._x,s=t._y,l=t._z,c=t._w;return this._x=r*c+a*o+n*l-i*s,this._y=n*c+a*s+i*o-r*l,this._z=i*c+a*l+r*s-n*o,this._w=a*c-r*o-n*s-i*l,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var r=this._x,n=this._y,i=this._z,a=this._w,o=a*e._w+r*e._x+n*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=r,this._y=n,this._z=i,this;var s=1-o*o;if(s<=Number.EPSILON){var l=1-t;return this._w=l*a+t*this._w,this._x=l*r+t*this._x,this._y=l*n+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var c=Math.sqrt(s),h=Math.atan2(c,o),u=Math.sin((1-t)*h)/c,d=Math.sin(t*h)/c;return this._w=a*u+this._w*d,this._x=r*u+this._x*d,this._y=n*u+this._y*d,this._z=i*u+this._z*d,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},fromBufferAttribute:function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}});var qr=new Zr,Xr=new Yr;function Zr(e,t,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),this.x=e,this.y=t,this.z=r}Object.assign(Zr.prototype,{isVector3:!0,set:function(e,t,r){return this.x=e,this.y=t,this.z=r,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(Xr.setFromEuler(e))},applyAxisAngle:function(e,t){return this.applyQuaternion(Xr.setFromAxisAngle(e,t))},applyMatrix3:function(e){var t=this.x,r=this.y,n=this.z,i=e.elements;return this.x=i[0]*t+i[3]*r+i[6]*n,this.y=i[1]*t+i[4]*r+i[7]*n,this.z=i[2]*t+i[5]*r+i[8]*n,this},applyNormalMatrix:function(e){return this.applyMatrix3(e).normalize()},applyMatrix4:function(e){var t=this.x,r=this.y,n=this.z,i=e.elements,a=1/(i[3]*t+i[7]*r+i[11]*n+i[15]);return this.x=(i[0]*t+i[4]*r+i[8]*n+i[12])*a,this.y=(i[1]*t+i[5]*r+i[9]*n+i[13])*a,this.z=(i[2]*t+i[6]*r+i[10]*n+i[14])*a,this},applyQuaternion:function(e){var t=this.x,r=this.y,n=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*n-o*r,c=s*r+o*t-i*n,h=s*n+i*r-a*t,u=-i*t-a*r-o*n;return this.x=l*s+u*-i+c*-o-h*-a,this.y=c*s+u*-a+h*-i-l*-o,this.z=h*s+u*-o+l*-a-c*-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,r=this.y,n=this.z,i=e.elements;return this.x=i[0]*t+i[4]*r+i[8]*n,this.y=i[1]*t+i[5]*r+i[9]*n,this.z=i[2]*t+i[6]*r+i[10]*n,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 r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))},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,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this},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 r=e.x,n=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=n*s-i*o,this.y=i*a-r*s,this.z=r*o-n*a,this},projectOnVector:function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)},projectOnPlane:function(e){return qr.copy(this).projectOnVector(e),this.sub(qr)},reflect:function(e){return this.sub(qr.copy(e).multiplyScalar(2*this.dot(e)))},angleTo:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var r=this.dot(e)/t;return Math.acos(Fr.clamp(r,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,r=this.y-e.y,n=this.z-e.z;return t*t+r*r+n*n},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,r){var n=Math.sin(t)*e;return this.x=n*Math.sin(r),this.y=Math.cos(t)*e,this.z=n*Math.cos(r),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,r){return this.x=e*Math.sin(t),this.y=r,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(),r=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=n,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},setFromMatrix3Column:function(e,t){return this.fromArray(e.elements,3*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,r){return void 0!==r&&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},random:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}});var Jr=new Zr,Qr=new nn,Kr=new Zr(0,0,0),$r=new Zr(1,1,1),en=new Zr,tn=new Zr,rn=new Zr;function nn(){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(nn.prototype,{isMatrix4:!0,set:function(e,t,r,n,i,a,o,s,l,c,h,u,d,p,f,m){var v=this.elements;return v[0]=e,v[4]=t,v[8]=r,v[12]=n,v[1]=i,v[5]=a,v[9]=o,v[13]=s,v[2]=l,v[6]=c,v[10]=h,v[14]=u,v[3]=d,v[7]=p,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 nn).fromArray(this.elements)},copy:function(e){var t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this},copyPosition:function(e){var t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[14],this},extractBasis:function(e,t,r){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this},extractRotation:function(e){var t=this.elements,r=e.elements,n=1/Jr.setFromMatrixColumn(e,0).length(),i=1/Jr.setFromMatrixColumn(e,1).length(),a=1/Jr.setFromMatrixColumn(e,2).length();return t[0]=r[0]*n,t[1]=r[1]*n,t[2]=r[2]*n,t[3]=0,t[4]=r[4]*i,t[5]=r[5]*i,t[6]=r[6]*i,t[7]=0,t[8]=r[8]*a,t[9]=r[9]*a,t[10]=r[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,r=e.x,n=e.y,i=e.z,a=Math.cos(r),o=Math.sin(r),s=Math.cos(n),l=Math.sin(n),c=Math.cos(i),h=Math.sin(i);if("XYZ"===e.order){var u=a*c,d=a*h,p=o*c,f=o*h;t[0]=s*c,t[4]=-s*h,t[8]=l,t[1]=d+p*l,t[5]=u-f*l,t[9]=-o*s,t[2]=f-u*l,t[6]=p+d*l,t[10]=a*s}else if("YXZ"===e.order){var m=s*c,v=s*h,g=l*c,y=l*h;t[0]=m+y*o,t[4]=g*o-v,t[8]=a*l,t[1]=a*h,t[5]=a*c,t[9]=-o,t[2]=v*o-g,t[6]=y+m*o,t[10]=a*s}else if("ZXY"===e.order){var x=s*c,b=s*h,w=l*c,_=l*h;t[0]=x-_*o,t[4]=-a*h,t[8]=w+b*o,t[1]=b+w*o,t[5]=a*c,t[9]=_-x*o,t[2]=-a*l,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){var M=a*c,S=a*h,A=o*c,E=o*h;t[0]=s*c,t[4]=A*l-S,t[8]=M*l+E,t[1]=s*h,t[5]=E*l+M,t[9]=S*l-A,t[2]=-l,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){var T=a*s,C=a*l,L=o*s,R=o*l;t[0]=s*c,t[4]=R-T*h,t[8]=L*h+C,t[1]=h,t[5]=a*c,t[9]=-o*c,t[2]=-l*c,t[6]=C*h+L,t[10]=T-R*h}else if("XZY"===e.order){var P=a*s,O=a*l,I=o*s,D=o*l;t[0]=s*c,t[4]=-h,t[8]=l*c,t[1]=P*h+D,t[5]=a*c,t[9]=O*h-I,t[2]=I*h-O,t[6]=o*c,t[10]=D*h+P}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(Kr,e,$r)},lookAt:function(e,t,r){var n=this.elements;return rn.subVectors(e,t),0===rn.lengthSq()&&(rn.z=1),rn.normalize(),en.crossVectors(r,rn),0===en.lengthSq()&&(1===Math.abs(r.z)?rn.x+=1e-4:rn.z+=1e-4,rn.normalize(),en.crossVectors(r,rn)),en.normalize(),tn.crossVectors(rn,en),n[0]=en.x,n[4]=tn.x,n[8]=rn.x,n[1]=en.y,n[5]=tn.y,n[9]=rn.y,n[2]=en.z,n[6]=tn.z,n[10]=rn.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 r=e.elements,n=t.elements,i=this.elements,a=r[0],o=r[4],s=r[8],l=r[12],c=r[1],h=r[5],u=r[9],d=r[13],p=r[2],f=r[6],m=r[10],v=r[14],g=r[3],y=r[7],x=r[11],b=r[15],w=n[0],_=n[4],M=n[8],S=n[12],A=n[1],E=n[5],T=n[9],C=n[13],L=n[2],R=n[6],P=n[10],O=n[14],I=n[3],D=n[7],N=n[11],B=n[15];return i[0]=a*w+o*A+s*L+l*I,i[4]=a*_+o*E+s*R+l*D,i[8]=a*M+o*T+s*P+l*N,i[12]=a*S+o*C+s*O+l*B,i[1]=c*w+h*A+u*L+d*I,i[5]=c*_+h*E+u*R+d*D,i[9]=c*M+h*T+u*P+d*N,i[13]=c*S+h*C+u*O+d*B,i[2]=p*w+f*A+m*L+v*I,i[6]=p*_+f*E+m*R+v*D,i[10]=p*M+f*T+m*P+v*N,i[14]=p*S+f*C+m*O+v*B,i[3]=g*w+y*A+x*L+b*I,i[7]=g*_+y*E+x*R+b*D,i[11]=g*M+y*T+x*P+b*N,i[15]=g*S+y*C+x*O+b*B,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},determinant:function(){var e=this.elements,t=e[0],r=e[4],n=e[8],i=e[12],a=e[1],o=e[5],s=e[9],l=e[13],c=e[2],h=e[6],u=e[10],d=e[14],p=e[3],f=e[7],m=e[11],v=e[15];return p*(+i*s*h-n*l*h-i*o*u+r*l*u+n*o*d-r*s*d)+f*(+t*s*d-t*l*u+i*a*u-n*a*d+n*l*c-i*s*c)+m*(+t*l*h-t*o*d-i*a*h+r*a*d+i*o*c-r*l*c)+v*(-n*o*c-t*s*h+t*o*u+n*a*h-r*a*u+r*s*c)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(e,t,r){var n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=r),this},getInverse:function(e,t){void 0!==t&&console.warn("THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.");var r=this.elements,n=e.elements,i=n[0],a=n[1],o=n[2],s=n[3],l=n[4],c=n[5],h=n[6],u=n[7],d=n[8],p=n[9],f=n[10],m=n[11],v=n[12],g=n[13],y=n[14],x=n[15],b=p*y*u-g*f*u+g*h*m-c*y*m-p*h*x+c*f*x,w=v*f*u-d*y*u-v*h*m+l*y*m+d*h*x-l*f*x,_=d*g*u-v*p*u+v*c*m-l*g*m-d*c*x+l*p*x,M=v*p*h-d*g*h-v*c*f+l*g*f+d*c*y-l*p*y,S=i*b+a*w+o*_+s*M;if(0===S)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var A=1/S;return r[0]=b*A,r[1]=(g*f*s-p*y*s-g*o*m+a*y*m+p*o*x-a*f*x)*A,r[2]=(c*y*s-g*h*s+g*o*u-a*y*u-c*o*x+a*h*x)*A,r[3]=(p*h*s-c*f*s-p*o*u+a*f*u+c*o*m-a*h*m)*A,r[4]=w*A,r[5]=(d*y*s-v*f*s+v*o*m-i*y*m-d*o*x+i*f*x)*A,r[6]=(v*h*s-l*y*s-v*o*u+i*y*u+l*o*x-i*h*x)*A,r[7]=(l*f*s-d*h*s+d*o*u-i*f*u-l*o*m+i*h*m)*A,r[8]=_*A,r[9]=(v*p*s-d*g*s-v*a*m+i*g*m+d*a*x-i*p*x)*A,r[10]=(l*g*s-v*c*s+v*a*u-i*g*u-l*a*x+i*c*x)*A,r[11]=(d*c*s-l*p*s-d*a*u+i*p*u+l*a*m-i*c*m)*A,r[12]=M*A,r[13]=(d*g*o-v*p*o+v*a*f-i*g*f-d*a*y+i*p*y)*A,r[14]=(v*c*o-l*g*o-v*a*h+i*g*h+l*a*y-i*c*y)*A,r[15]=(l*p*o-d*c*o+d*a*h-i*p*h-l*a*f+i*c*f)*A,this},scale:function(e){var t=this.elements,r=e.x,n=e.y,i=e.z;return t[0]*=r,t[4]*=n,t[8]*=i,t[1]*=r,t[5]*=n,t[9]*=i,t[2]*=r,t[6]*=n,t[10]*=i,t[3]*=r,t[7]*=n,t[11]*=i,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,r,n))},makeTranslation:function(e,t,r){return this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var r=Math.cos(t),n=Math.sin(t),i=1-r,a=e.x,o=e.y,s=e.z,l=i*a,c=i*o;return this.set(l*a+r,l*o-n*s,l*s+n*o,0,l*o+n*s,c*o+r,c*s-n*a,0,l*s-n*o,c*s+n*a,i*s*s+r,0,0,0,0,1),this},makeScale:function(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this},makeShear:function(e,t,r){return this.set(1,t,r,0,e,1,r,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,r){var n=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,l=i+i,c=a+a,h=o+o,u=i*l,d=i*c,p=i*h,f=a*c,m=a*h,v=o*h,g=s*l,y=s*c,x=s*h,b=r.x,w=r.y,_=r.z;return n[0]=(1-(f+v))*b,n[1]=(d+x)*b,n[2]=(p-y)*b,n[3]=0,n[4]=(d-x)*w,n[5]=(1-(u+v))*w,n[6]=(m+g)*w,n[7]=0,n[8]=(p+y)*_,n[9]=(m-g)*_,n[10]=(1-(u+f))*_,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this},decompose:function(e,t,r){var n=this.elements,i=Jr.set(n[0],n[1],n[2]).length(),a=Jr.set(n[4],n[5],n[6]).length(),o=Jr.set(n[8],n[9],n[10]).length(),s=this.determinant();s<0&&(i=-i),e.x=n[12],e.y=n[13],e.z=n[14],Qr.copy(this);var l=1/i,c=1/a,h=1/o;return Qr.elements[0]*=l,Qr.elements[1]*=l,Qr.elements[2]*=l,Qr.elements[4]*=c,Qr.elements[5]*=c,Qr.elements[6]*=c,Qr.elements[8]*=h,Qr.elements[9]*=h,Qr.elements[10]*=h,t.setFromRotationMatrix(Qr),r.x=i,r.y=a,r.z=o,this},makePerspective:function(e,t,r,n,i,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*i/(t-e),l=2*i/(r-n),c=(t+e)/(t-e),h=(r+n)/(r-n),u=-(a+i)/(a-i),d=-2*a*i/(a-i);return o[0]=s,o[4]=0,o[8]=c,o[12]=0,o[1]=0,o[5]=l,o[9]=h,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=d,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(e,t,r,n,i,a){var o=this.elements,s=1/(t-e),l=1/(r-n),c=1/(a-i),h=(t+e)*s,u=(r+n)*l,d=(a+i)*c;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-h,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*c,o[14]=-d,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(e){for(var t=this.elements,r=e.elements,n=0;n<16;n++)if(t[n]!==r[n])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var r=0;r<16;r++)this.elements[r]=e[r+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}});var an=new nn,on=new Yr;function sn(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=sn.DefaultOrder),this._x=e,this._y=t,this._z=r,this._order=n}function ln(){this.mask=1}sn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],sn.DefaultOrder="XYZ",Object.defineProperties(sn.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()}},order:{get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}}}),Object.assign(sn.prototype,{isEuler:!0,set:function(e,t,r,n){return this._x=e,this._y=t,this._z=r,this._order=n||this._order,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this},setFromRotationMatrix:function(e,t,r){var n=Fr.clamp,i=e.elements,a=i[0],o=i[4],s=i[8],l=i[1],c=i[5],h=i[9],u=i[2],d=i[6],p=i[10];switch(t=t||this._order,t){case"XYZ":this._y=Math.asin(n(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-n(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,a),this._z=0);break;case"ZXY":this._x=Math.asin(n(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,a));break;case"ZYX":this._y=Math.asin(-n(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(n(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-u,a)):(this._x=0,this._y=Math.atan2(s,p));break;case"XZY":this._z=Math.asin(-n(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-h,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!1!==r&&this._onChangeCallback(),this},setFromQuaternion:function(e,t,r){return an.makeRotationFromQuaternion(e),this.setFromRotationMatrix(an,t,r)},setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:function(e){return on.setFromEuler(this),this.setFromQuaternion(on,e)},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[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._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new Zr(this._x,this._y,this._z)},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}}),Object.assign(ln.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask|=1<<e|0},enableAll:function(){this.mask=-1},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},disableAll:function(){this.mask=0},test:function(e){return 0!==(this.mask&e.mask)}});var cn=0,hn=new Zr,un=new Yr,dn=new nn,pn=new Zr,fn=new Zr,mn=new Zr,vn=new Yr,gn=new Zr(1,0,0),yn=new Zr(0,1,0),xn=new Zr(0,0,1),bn={type:"added"},wn={type:"removed"};function _n(){Object.defineProperty(this,"id",{value:cn++}),this.uuid=Fr.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=_n.DefaultUp.clone();var e=new Zr,t=new sn,r=new Yr,n=new Zr(1,1,1);function i(){r.setFromEuler(t,!1)}function a(){t.setFromQuaternion(r,void 0,!1)}t._onChange(i),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new nn},normalMatrix:{value:new jr}}),this.matrix=new nn,this.matrixWorld=new nn,this.matrixAutoUpdate=_n.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ln,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Mn(){_n.call(this),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}_n.DefaultUp=new Zr(0,1,0),_n.DefaultMatrixAutoUpdate=!0,_n.prototype=Object.assign(Object.create(Ir.prototype),{constructor:_n,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(e,t){return un.setFromAxisAngle(e,t),this.quaternion.multiply(un),this},rotateOnWorldAxis:function(e,t){return un.setFromAxisAngle(e,t),this.quaternion.premultiply(un),this},rotateX:function(e){return this.rotateOnAxis(gn,e)},rotateY:function(e){return this.rotateOnAxis(yn,e)},rotateZ:function(e){return this.rotateOnAxis(xn,e)},translateOnAxis:function(e,t){return hn.copy(e).applyQuaternion(this.quaternion),this.position.add(hn.multiplyScalar(t)),this},translateX:function(e){return this.translateOnAxis(gn,e)},translateY:function(e){return this.translateOnAxis(yn,e)},translateZ:function(e){return this.translateOnAxis(xn,e)},localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(e){return e.applyMatrix4(dn.getInverse(this.matrixWorld))},lookAt:function(e,t,r){e.isVector3?pn.copy(e):pn.set(e,t,r);var n=this.parent;this.updateWorldMatrix(!0,!1),fn.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?dn.lookAt(fn,pn,this.up):dn.lookAt(pn,fn,this.up),this.quaternion.setFromRotationMatrix(dn),n&&(dn.extractRotation(n.matrixWorld),un.setFromRotationMatrix(dn),this.quaternion.premultiply(un.inverse()))},add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(bn)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var r=this.children.indexOf(e);return-1!==r&&(e.parent=null,this.children.splice(r,1),e.dispatchEvent(wn)),this},attach:function(e){return this.updateWorldMatrix(!0,!1),dn.getInverse(this.matrixWorld),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),dn.multiply(e.parent.matrixWorld)),e.applyMatrix4(dn),e.updateWorldMatrix(!1,!1),this.add(e),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var r=0,n=this.children.length;r<n;r++){var i=this.children[r],a=i.getObjectByProperty(e,t);if(void 0!==a)return a}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new Zr),this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new Yr),this.updateMatrixWorld(!0),this.matrixWorld.decompose(fn,e,mn),e},getWorldScale:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new Zr),this.updateMatrixWorld(!0),this.matrixWorld.decompose(fn,vn,e),e},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Zr),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()},raycast:function(){},traverse:function(e){e(this);for(var t=this.children,r=0,n=t.length;r<n;r++)t[r].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,r=0,n=t.length;r<n;r++)t[r].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,r=0,n=t.length;r<n;r++)t[r].updateMatrixWorld(e)},updateWorldMatrix:function(e,t){var r=this.parent;if(!0===e&&null!==r&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var n=this.children,i=0,a=n.length;i<a;i++)n[i].updateWorldMatrix(!1,!0)},toJSON:function(e){var t=void 0===e||"string"===typeof e,r={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var n={};function i(t,r){return void 0===t[r.uuid]&&(t[r.uuid]=r.toJSON(e)),r.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON()),this.isMesh||this.isLine||this.isPoints){n.geometry=i(e.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var o=a.shapes;if(Array.isArray(o))for(var s=0,l=o.length;s<l;s++){var c=o[s];i(e.shapes,c)}else i(e.shapes,o)}}if(void 0!==this.material)if(Array.isArray(this.material)){for(var h=[],u=0,d=this.material.length;u<d;u++)h.push(i(e.materials,this.material[u]));n.material=h}else n.material=i(e.materials,this.material);if(this.children.length>0){n.children=[];for(var p=0;p<this.children.length;p++)n.children.push(this.children[p].toJSON(e).object)}if(t){var f=x(e.geometries),m=x(e.materials),v=x(e.textures),g=x(e.images),y=x(e.shapes);f.length>0&&(r.geometries=f),m.length>0&&(r.materials=m),v.length>0&&(r.textures=v),g.length>0&&(r.images=g),y.length>0&&(r.shapes=y)}return r.object=n,r;function x(e){var t=[];for(var r in e){var n=e[r];delete n.metadata,t.push(n)}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 r=0;r<e.children.length;r++){var n=e.children[r];this.add(n.clone())}return this}}),Mn.prototype=Object.assign(Object.create(_n.prototype),{constructor:Mn,isScene:!0,copy:function(e,t){return _n.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},toJSON:function(e){var t=_n.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.environment&&(t.object.environment=this.environment.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Sn=[new Zr,new Zr,new Zr,new Zr,new Zr,new Zr,new Zr,new Zr],An=new Zr,En=new Fn,Tn=new Zr,Cn=new Zr,Ln=new Zr,Rn=new Zr,Pn=new Zr,On=new Zr,In=new Zr,Dn=new Zr,Nn=new Zr,Bn=new Zr;function Fn(e,t){this.min=void 0!==e?e:new Zr(1/0,1/0,1/0),this.max=void 0!==t?t:new Zr(-1/0,-1/0,-1/0)}function Un(e,t,r,n,i){for(var a=0,o=e.length-3;a<=o;a+=3){Bn.fromArray(e,a);var s=i.x*Math.abs(Bn.x)+i.y*Math.abs(Bn.y)+i.z*Math.abs(Bn.z),l=t.dot(Bn),c=r.dot(Bn),h=n.dot(Bn);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>s)return!1}return!0}Object.assign(Fn.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,r=1/0,n=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,l=e.length;s<l;s+=3){var c=e[s],h=e[s+1],u=e[s+2];c<t&&(t=c),h<r&&(r=h),u<n&&(n=u),c>i&&(i=c),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,r,n),this.max.set(i,a,o),this},setFromBufferAttribute:function(e){for(var t=1/0,r=1/0,n=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,l=e.count;s<l;s++){var c=e.getX(s),h=e.getY(s),u=e.getZ(s);c<t&&(t=c),h<r&&(r=h),u<n&&(n=u),c>i&&(i=c),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,r,n),this.max.set(i,a,o),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(e,t){var r=An.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this},setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new Zr),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new Zr),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(e){e.updateWorldMatrix(!1,!1);var t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),En.copy(t.boundingBox),En.applyMatrix4(e.matrixWorld),this.union(En));for(var r=e.children,n=0,i=r.length;n<i;n++)this.expandByObject(r[n]);return this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.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 Zr),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.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:function(e){return this.clampPoint(e.center,An),An.distanceToSquared(e.center)<=e.radius*e.radius},intersectsPlane:function(e){var t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant},intersectsTriangle:function(e){if(this.isEmpty())return!1;this.getCenter(In),Dn.subVectors(this.max,In),Tn.subVectors(e.a,In),Cn.subVectors(e.b,In),Ln.subVectors(e.c,In),Rn.subVectors(Cn,Tn),Pn.subVectors(Ln,Cn),On.subVectors(Tn,Ln);var t=[0,-Rn.z,Rn.y,0,-Pn.z,Pn.y,0,-On.z,On.y,Rn.z,0,-Rn.x,Pn.z,0,-Pn.x,On.z,0,-On.x,-Rn.y,Rn.x,0,-Pn.y,Pn.x,0,-On.y,On.x,0];return!!Un(t,Tn,Cn,Ln,Dn)&&(t=[1,0,0,0,1,0,0,0,1],!!Un(t,Tn,Cn,Ln,Dn)&&(Nn.crossVectors(Rn,Pn),t=[Nn.x,Nn.y,Nn.z],Un(t,Tn,Cn,Ln,Dn)))},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Zr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=An.copy(e).clamp(this.min,this.max);return t.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(An).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()||(Sn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Sn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Sn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Sn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Sn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Sn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Sn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Sn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Sn)),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 jn=new Fn;function zn(e,t){this.center=void 0!==e?e:new Zr,this.radius=void 0!==t?t:-1}Object.assign(zn.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){var r=this.center;void 0!==t?r.copy(t):jn.setFromPoints(e).getCenter(r);for(var n=0,i=0,a=e.length;i<a;i++)n=Math.max(n,r.distanceToSquared(e[i]));return this.radius=Math.sqrt(n),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},isEmpty:function(){return this.radius<0},makeEmpty:function(){return this.center.set(0,0,0),this.radius=-1,this},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var r=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new Zr),t.copy(e),r>this.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 Fn),this.isEmpty()?(e.makeEmpty(),e):(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 kn=new Zr,Gn=new Zr,Hn=new Zr,Vn=new Zr,Wn=new Zr,Yn=new Zr,qn=new Zr;function Xn(e,t){this.origin=void 0!==e?e:new Zr,this.direction=void 0!==t?t:new Zr(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 Zr),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,kn)),this},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Zr),t.subVectors(e,this.origin);var r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(e){var t=kn.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(kn.copy(this.direction).multiplyScalar(t).add(this.origin),kn.distanceToSquared(e))},distanceSqToSegment:function(e,t,r,n){Gn.copy(e).add(t).multiplyScalar(.5),Hn.copy(t).sub(e).normalize(),Vn.copy(this.origin).sub(Gn);var i,a,o,s,l=.5*e.distanceTo(t),c=-this.direction.dot(Hn),h=Vn.dot(this.direction),u=-Vn.dot(Hn),d=Vn.lengthSq(),p=Math.abs(1-c*c);if(p>0)if(i=c*u-h,a=c*h-u,s=l*p,i>=0)if(a>=-s)if(a<=s){var f=1/p;i*=f,a*=f,o=i*(i+c*a+2*h)+a*(c*i+a+2*u)+d}else a=l,i=Math.max(0,-(c*a+h)),o=-i*i+a*(a+2*u)+d;else a=-l,i=Math.max(0,-(c*a+h)),o=-i*i+a*(a+2*u)+d;else a<=-s?(i=Math.max(0,-(-c*l+h)),a=i>0?-l:Math.min(Math.max(-l,-u),l),o=-i*i+a*(a+2*u)+d):a<=s?(i=0,a=Math.min(Math.max(-l,-u),l),o=a*(a+2*u)+d):(i=Math.max(0,-(c*l+h)),a=i>0?l:Math.min(Math.max(-l,-u),l),o=-i*i+a*(a+2*u)+d);else a=c>0?-l:l,i=Math.max(0,-(c*a+h)),o=-i*i+a*(a+2*u)+d;return r&&r.copy(this.direction).multiplyScalar(i).add(this.origin),n&&n.copy(Hn).multiplyScalar(a).add(Gn),o},intersectSphere:function(e,t){kn.subVectors(e.center,this.origin);var r=kn.dot(this.direction),n=kn.dot(kn)-r*r,i=e.radius*e.radius;if(n>i)return null;var a=Math.sqrt(i-n),o=r-a,s=r+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 r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null},intersectPlane:function(e,t){var r=this.distanceToPlane(e);return null===r?null:this.at(r,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);if(0===t)return!0;var r=e.normal.dot(this.direction);return r*t<0},intersectBox:function(e,t){var r,n,i,a,o,s,l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(r=(e.min.x-u.x)*l,n=(e.max.x-u.x)*l):(r=(e.max.x-u.x)*l,n=(e.min.x-u.x)*l),c>=0?(i=(e.min.y-u.y)*c,a=(e.max.y-u.y)*c):(i=(e.max.y-u.y)*c,a=(e.min.y-u.y)*c),r>a||i>n?null:((i>r||r!==r)&&(r=i),(a<n||n!==n)&&(n=a),h>=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),r>s||o>n?null:((o>r||r!==r)&&(r=o),(s<n||n!==n)&&(n=s),n<0?null:this.at(r>=0?r:n,t)))},intersectsBox:function(e){return null!==this.intersectBox(e,kn)},intersectTriangle:function(e,t,r,n,i){Wn.subVectors(t,e),Yn.subVectors(r,e),qn.crossVectors(Wn,Yn);var a,o=this.direction.dot(qn);if(o>0){if(n)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Vn.subVectors(this.origin,e);var s=a*this.direction.dot(Yn.crossVectors(Vn,Yn));if(s<0)return null;var l=a*this.direction.dot(Wn.cross(Vn));if(l<0)return null;if(s+l>o)return null;var c=-a*Vn.dot(qn);return c<0?null:this.at(c/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 Zn=new Zr,Jn=new Zr,Qn=new jr;function Kn(e,t){this.normal=void 0!==e?e:new Zr(1,0,0),this.constant=void 0!==t?t:0}Object.assign(Kn.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,r,n){return this.normal.set(e,t,r),this.constant=n,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(e,t,r){var n=Zn.subVectors(r,t).cross(Jn.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,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 Zr),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 Zr);var r=e.delta(Zn),n=this.normal.dot(r);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/n;return i<0||i>1?void 0:t.copy(r).multiplyScalar(i).add(e.start)},intersectsLine:function(e){var t=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return t<0&&r>0||r<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 Zr),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(e,t){var r=t||Qn.getNormalMatrix(e),n=this.coplanarPoint(Zn).applyMatrix4(e),i=this.normal.applyMatrix3(r).normalize();return this.constant=-n.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 $n=new Zr,ei=new Zr,ti=new Zr,ri=new Zr,ni=new Zr,ii=new Zr,ai=new Zr,oi=new Zr,si=new Zr,li=new Zr;function ci(e,t,r){this.a=void 0!==e?e:new Zr,this.b=void 0!==t?t:new Zr,this.c=void 0!==r?r:new Zr}Object.assign(ci,{getNormal:function(e,t,r,n){void 0===n&&(console.warn("THREE.Triangle: .getNormal() target is now required"),n=new Zr),n.subVectors(r,t),$n.subVectors(e,t),n.cross($n);var i=n.lengthSq();return i>0?n.multiplyScalar(1/Math.sqrt(i)):n.set(0,0,0)},getBarycoord:function(e,t,r,n,i){$n.subVectors(n,t),ei.subVectors(r,t),ti.subVectors(e,t);var a=$n.dot($n),o=$n.dot(ei),s=$n.dot(ti),l=ei.dot(ei),c=ei.dot(ti),h=a*l-o*o;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new Zr),0===h)return i.set(-2,-1,-1);var u=1/h,d=(l*s-o*c)*u,p=(a*c-o*s)*u;return i.set(1-d-p,p,d)},containsPoint:function(e,t,r,n){return ci.getBarycoord(e,t,r,n,ri),ri.x>=0&&ri.y>=0&&ri.x+ri.y<=1},getUV:function(e,t,r,n,i,a,o,s){return this.getBarycoord(e,t,r,n,ri),s.set(0,0),s.addScaledVector(i,ri.x),s.addScaledVector(a,ri.y),s.addScaledVector(o,ri.z),s},isFrontFacing:function(e,t,r,n){return $n.subVectors(r,t),ei.subVectors(e,t),$n.cross(ei).dot(n)<0}}),Object.assign(ci.prototype,{set:function(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this},setFromPointsAndIndices:function(e,t,r,n){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[n]),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 $n.subVectors(this.c,this.b),ei.subVectors(this.a,this.b),.5*$n.cross(ei).length()},getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new Zr),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return ci.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 Kn),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return ci.getBarycoord(e,this.a,this.b,this.c,t)},getUV:function(e,t,r,n,i){return ci.getUV(e,this.a,this.b,this.c,t,r,n,i)},containsPoint:function(e){return ci.containsPoint(e,this.a,this.b,this.c)},isFrontFacing:function(e){return ci.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 Zr);var r,n,i=this.a,a=this.b,o=this.c;ni.subVectors(a,i),ii.subVectors(o,i),oi.subVectors(e,i);var s=ni.dot(oi),l=ii.dot(oi);if(s<=0&&l<=0)return t.copy(i);si.subVectors(e,a);var c=ni.dot(si),h=ii.dot(si);if(c>=0&&h<=c)return t.copy(a);var u=s*h-c*l;if(u<=0&&s>=0&&c<=0)return r=s/(s-c),t.copy(i).addScaledVector(ni,r);li.subVectors(e,o);var d=ni.dot(li),p=ii.dot(li);if(p>=0&&d<=p)return t.copy(o);var f=d*l-s*p;if(f<=0&&l>=0&&p<=0)return n=l/(l-p),t.copy(i).addScaledVector(ii,n);var m=c*p-d*h;if(m<=0&&h-c>=0&&d-p>=0)return ai.subVectors(o,a),n=(h-c)/(h-c+(d-p)),t.copy(a).addScaledVector(ai,n);var v=1/(m+f+u);return r=f*v,n=u*v,t.copy(i).addScaledVector(ni,r).addScaledVector(ii,n)},equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}});var hi={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},ui={h:0,s:0,l:0},di={h:0,s:0,l:0};function pi(e,t,r){return void 0===t&&void 0===r?this.set(e):this.setRGB(e,t,r)}function fi(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+6*(t-e)*(2/3-r):e}function mi(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function vi(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}function gi(e,t,r,n,i,a){this.a=e,this.b=t,this.c=r,this.normal=n&&n.isVector3?n:new Zr,this.vertexNormals=Array.isArray(n)?n:[],this.color=i&&i.isColor?i:new pi,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==a?a:0}Object.assign(pi.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,r){return this.r=e,this.g=t,this.b=r,this},setHSL:function(e,t,r){if(e=Fr.euclideanModulo(e,1),t=Fr.clamp(t,0,1),r=Fr.clamp(r,0,1),0===t)this.r=this.g=this.b=r;else{var n=r<=.5?r*(1+t):r+t-r*t,i=2*r-n;this.r=fi(i,n,e+1/3),this.g=fi(i,n,e),this.b=fi(i,n,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 r;if(r=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var n,i=r[1],a=r[2];switch(i){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,t(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,t(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(n[1])/360,s=parseInt(n[2],10)/100,l=parseInt(n[3],10)/100;return t(n[5]),this.setHSL(o,s,l)}break}}else if(r=/^\#([A-Fa-f0-9]+)$/.exec(e)){var c=r[1],h=c.length;if(3===h)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===h)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 e&&e.length>0?this.setColorName(e):this},setColorName:function(e){var t=hi[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 r=t>0?1/t:1;return this.r=Math.pow(e.r,r),this.g=Math.pow(e.g,r),this.b=Math.pow(e.b,r),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=mi(e.r),this.g=mi(e.g),this.b=mi(e.b),this},copyLinearToSRGB:function(e){return this.r=vi(e.r),this.g=vi(e.g),this.b=vi(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,r,n=this.r,i=this.g,a=this.b,o=Math.max(n,i,a),s=Math.min(n,i,a),l=(s+o)/2;if(s===o)t=0,r=0;else{var c=o-s;switch(r=l<=.5?c/(o+s):c/(2-o-s),o){case n:t=(i-a)/c+(i<a?6:0);break;case i:t=(a-n)/c+2;break;case a:t=(n-i)/c+4;break}t/=6}return e.h=t,e.s=r,e.l=l,e},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(e,t,r){return this.getHSL(ui),ui.h+=e,ui.s+=t,ui.l+=r,this.setHSL(ui.h,ui.s,ui.l),this},add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},lerpHSL:function(e,t){this.getHSL(ui),e.getHSL(di);var r=Fr.lerp(ui.h,di.h,t),n=Fr.lerp(ui.s,di.s,t),i=Fr.lerp(ui.l,di.l,t);return this.setHSL(r,n,i),this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},fromBufferAttribute:function(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this},toJSON:function(){return this.getHex()}}),pi.NAMES=hi,Object.assign(gi.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,r=e.vertexNormals.length;t<r;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(var n=0,i=e.vertexColors.length;n<i;n++)this.vertexColors[n]=e.vertexColors[n].clone();return this}});var yi=0;function xi(){Object.defineProperty(this,"id",{value:yi++}),this.uuid=Fr.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=b,this.side=f,this.flatShading=!1,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=D,this.blendDst=N,this.blendEquation=A,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Mr,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=cr,this.stencilZFail=cr,this.stencilZPass=cr,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}function bi(e){xi.call(this),this.type="MeshBasicMaterial",this.color=new pi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Z,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.setValues(e)}xi.prototype=Object.assign(Object.create(Ir.prototype),{constructor:xi,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(e){if(void 0!==e)for(var t in e){var r=e[t];if(void 0!==r)if("shading"!==t){var n=this[t];void 0!==n?n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[t]=r: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=r===g;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 r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function n(e){var t=[];for(var r in e){var n=e[r];delete n.metadata,t.push(n)}return t}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(r.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearcoat&&(r.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,r.reflectivity=this.reflectivity,r.refractionRatio=this.refractionRatio,void 0!==this.combine&&(r.combine=this.combine),void 0!==this.envMapIntensity&&(r.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==b&&(r.blending=this.blending),!0===this.flatShading&&(r.flatShading=this.flatShading),this.side!==f&&(r.side=this.side),this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(r.rotation=this.rotation),!0===this.polygonOffset&&(r.polygonOffset=!0),0!==this.polygonOffsetFactor&&(r.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(r.morphTargets=!0),!0===this.morphNormals&&(r.morphNormals=!0),!0===this.skinning&&(r.skinning=!0),!1===this.visible&&(r.visible=!1),!1===this.toneMapped&&(r.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),t){var i=n(e.textures),a=n(e.images);i.length>0&&(r.textures=i),a.length>0&&(r.images=a)}return r},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.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,r=null;if(null!==t){var n=t.length;r=new Array(n);for(var i=0;i!==n;++i)r[i]=t[i].clone()}return this.clippingPlanes=r,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(xi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),bi.prototype=Object.create(xi.prototype),bi.prototype.constructor=bi,bi.prototype.isMeshBasicMaterial=!0,bi.prototype.copy=function(e){return xi.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};var wi=new Zr,_i=new Ur;function Mi(e,t,r){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===r,this.usage=Sr,this.updateRange={offset:0,count:-1},this.version=0}function Si(e,t,r){Mi.call(this,new Int8Array(e),t,r)}function Ai(e,t,r){Mi.call(this,new Uint8Array(e),t,r)}function Ei(e,t,r){Mi.call(this,new Uint8ClampedArray(e),t,r)}function Ti(e,t,r){Mi.call(this,new Int16Array(e),t,r)}function Ci(e,t,r){Mi.call(this,new Uint16Array(e),t,r)}function Li(e,t,r){Mi.call(this,new Int32Array(e),t,r)}function Ri(e,t,r){Mi.call(this,new Uint32Array(e),t,r)}function Pi(e,t,r){Mi.call(this,new Float32Array(e),t,r)}function Oi(e,t,r){Mi.call(this,new Float64Array(e),t,r)}function Ii(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Di(e){if(0===e.length)return-1/0;for(var t=e[0],r=1,n=e.length;r<n;++r)e[r]>t&&(t=e[r]);return t}Object.defineProperty(Mi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Mi.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,r){e*=this.itemSize,r*=t.itemSize;for(var n=0,i=this.itemSize;n<i;n++)this.array[e+n]=t.array[r+n];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),a=new pi),t[r++]=a.r,t[r++]=a.g,t[r++]=a.b}return this},copyVector2sArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),a=new Ur),t[r++]=a.x,t[r++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),a=new Zr),t[r++]=a.x,t[r++]=a.y,t[r++]=a.z}return this},copyVector4sArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),a=new Hr),t[r++]=a.x,t[r++]=a.y,t[r++]=a.z,t[r++]=a.w}return this},applyMatrix3:function(e){if(2===this.itemSize)for(var t=0,r=this.count;t<r;t++)_i.fromBufferAttribute(this,t),_i.applyMatrix3(e),this.setXY(t,_i.x,_i.y);else if(3===this.itemSize)for(var n=0,i=this.count;n<i;n++)wi.fromBufferAttribute(this,n),wi.applyMatrix3(e),this.setXYZ(n,wi.x,wi.y,wi.z);return this},applyMatrix4:function(e){for(var t=0,r=this.count;t<r;t++)wi.x=this.getX(t),wi.y=this.getY(t),wi.z=this.getZ(t),wi.applyMatrix4(e),this.setXYZ(t,wi.x,wi.y,wi.z);return this},applyNormalMatrix:function(e){for(var t=0,r=this.count;t<r;t++)wi.x=this.getX(t),wi.y=this.getY(t),wi.z=this.getZ(t),wi.applyNormalMatrix(e),this.setXYZ(t,wi.x,wi.y,wi.z);return this},transformDirection:function(e){for(var t=0,r=this.count;t<r;t++)wi.x=this.getX(t),wi.y=this.getY(t),wi.z=this.getZ(t),wi.transformDirection(e),this.setXYZ(t,wi.x,wi.y,wi.z);return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=r,this},setXYZ:function(e,t,r,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this},setXYZW:function(e,t,r,n,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}}),Si.prototype=Object.create(Mi.prototype),Si.prototype.constructor=Si,Ai.prototype=Object.create(Mi.prototype),Ai.prototype.constructor=Ai,Ei.prototype=Object.create(Mi.prototype),Ei.prototype.constructor=Ei,Ti.prototype=Object.create(Mi.prototype),Ti.prototype.constructor=Ti,Ci.prototype=Object.create(Mi.prototype),Ci.prototype.constructor=Ci,Li.prototype=Object.create(Mi.prototype),Li.prototype.constructor=Li,Ri.prototype=Object.create(Mi.prototype),Ri.prototype.constructor=Ri,Pi.prototype=Object.create(Mi.prototype),Pi.prototype.constructor=Pi,Oi.prototype=Object.create(Mi.prototype),Oi.prototype.constructor=Oi,Object.assign(Ii.prototype,{computeGroups:function(e){var t,r,n=[],i=void 0,a=e.faces;for(r=0;r<a.length;r++){var o=a[r];o.materialIndex!==i&&(i=o.materialIndex,void 0!==t&&(t.count=3*r-t.start,n.push(t)),t={start:3*r,materialIndex:i})}void 0!==t&&(t.count=3*r-t.start,n.push(t)),this.groups=n},fromGeometry:function(e){var t,r=e.faces,n=e.vertices,i=e.faceVertexUvs,a=i[0]&&i[0].length>0,o=i[1]&&i[1].length>0,s=e.morphTargets,l=s.length;if(l>0){t=[];for(var c=0;c<l;c++)t[c]={name:s[c].name,data:[]};this.morphTargets.position=t}var h,u=e.morphNormals,d=u.length;if(d>0){h=[];for(var p=0;p<d;p++)h[p]={name:u[p].name,data:[]};this.morphTargets.normal=h}var f=e.skinIndices,m=e.skinWeights,v=f.length===n.length,g=m.length===n.length;n.length>0&&0===r.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var y=0;y<r.length;y++){var x=r[y];this.vertices.push(n[x.a],n[x.b],n[x.c]);var b=x.vertexNormals;if(3===b.length)this.normals.push(b[0],b[1],b[2]);else{var w=x.normal;this.normals.push(w,w,w)}var _=x.vertexColors;if(3===_.length)this.colors.push(_[0],_[1],_[2]);else{var M=x.color;this.colors.push(M,M,M)}if(!0===a){var S=i[0][y];void 0!==S?this.uvs.push(S[0],S[1],S[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",y),this.uvs.push(new Ur,new Ur,new Ur))}if(!0===o){var A=i[1][y];void 0!==A?this.uvs2.push(A[0],A[1],A[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",y),this.uvs2.push(new Ur,new Ur,new Ur))}for(var E=0;E<l;E++){var T=s[E].vertices;t[E].data.push(T[x.a],T[x.b],T[x.c])}for(var C=0;C<d;C++){var L=u[C].vertexNormals[y];h[C].data.push(L.a,L.b,L.c)}v&&this.skinIndices.push(f[x.a],f[x.b],f[x.c]),g&&this.skinWeights.push(m[x.a],m[x.b],m[x.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this}});var Ni=1,Bi=new nn,Fi=new _n,Ui=new Zr,ji=new Fn,zi=new Fn,ki=new Zr;function Gi(){Object.defineProperty(this,"id",{value:Ni+=2}),this.uuid=Fr.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}Gi.prototype=Object.assign(Object.create(Ir.prototype),{constructor:Gi,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(Di(e)>65535?Ri:Ci)(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,r){this.groups.push({start:e,count:t,materialIndex:void 0!==r?r:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix4:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var r=this.attributes.normal;if(void 0!==r){var n=(new jr).getNormalMatrix(e);r.applyNormalMatrix(n),r.needsUpdate=!0}var i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return Bi.makeRotationX(e),this.applyMatrix4(Bi),this},rotateY:function(e){return Bi.makeRotationY(e),this.applyMatrix4(Bi),this},rotateZ:function(e){return Bi.makeRotationZ(e),this.applyMatrix4(Bi),this},translate:function(e,t,r){return Bi.makeTranslation(e,t,r),this.applyMatrix4(Bi),this},scale:function(e,t,r){return Bi.makeScale(e,t,r),this.applyMatrix4(Bi),this},lookAt:function(e){return Fi.lookAt(e),Fi.updateMatrix(),this.applyMatrix4(Fi.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ui).negate(),this.translate(Ui.x,Ui.y,Ui.z),this},setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var r=new Pi(3*t.vertices.length,3),n=new Pi(3*t.colors.length,3);if(this.setAttribute("position",r.copyVector3sArray(t.vertices)),this.setAttribute("color",n.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new Pi(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=[],r=0,n=e.length;r<n;r++){var i=e[r];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new Pi(t,3)),this},updateFromObject:function(e){var t=e.geometry;if(e.isMesh){var r=t.__directGeometry;if(!0===t.elementsNeedUpdate&&(r=void 0,t.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(t);r.verticesNeedUpdate=t.verticesNeedUpdate,r.normalsNeedUpdate=t.normalsNeedUpdate,r.colorsNeedUpdate=t.colorsNeedUpdate,r.uvsNeedUpdate=t.uvsNeedUpdate,r.groupsNeedUpdate=t.groupsNeedUpdate,t.verticesNeedUpdate=!1,t.normalsNeedUpdate=!1,t.colorsNeedUpdate=!1,t.uvsNeedUpdate=!1,t.groupsNeedUpdate=!1,t=r}if(!0===t.verticesNeedUpdate){var n=this.attributes.position;void 0!==n&&(n.copyVector3sArray(t.vertices),n.needsUpdate=!0),t.verticesNeedUpdate=!1}if(!0===t.normalsNeedUpdate){var i=this.attributes.normal;void 0!==i&&(i.copyVector3sArray(t.normals),i.needsUpdate=!0),t.normalsNeedUpdate=!1}if(!0===t.colorsNeedUpdate){var a=this.attributes.color;void 0!==a&&(a.copyColorsArray(t.colors),a.needsUpdate=!0),t.colorsNeedUpdate=!1}if(t.uvsNeedUpdate){var o=this.attributes.uv;void 0!==o&&(o.copyVector2sArray(t.uvs),o.needsUpdate=!0),t.uvsNeedUpdate=!1}if(t.lineDistancesNeedUpdate){var s=this.attributes.lineDistance;void 0!==s&&(s.copyArray(t.lineDistances),s.needsUpdate=!0),t.lineDistancesNeedUpdate=!1}return t.groupsNeedUpdate&&(t.computeGroups(e.geometry),this.groups=t.groups,t.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new Ii).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.setAttribute("position",new Mi(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var r=new Float32Array(3*e.normals.length);this.setAttribute("normal",new Mi(r,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var n=new Float32Array(3*e.colors.length);this.setAttribute("color",new Mi(n,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.setAttribute("uv",new Mi(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var a=new Float32Array(2*e.uvs2.length);this.setAttribute("uv2",new Mi(a,2).copyVector2sArray(e.uvs2))}for(var o in this.groups=e.groups,e.morphTargets){for(var s=[],l=e.morphTargets[o],c=0,h=l.length;c<h;c++){var u=l[c],d=new Pi(3*u.data.length,3);d.name=u.name,s.push(d.copyVector3sArray(u.data))}this.morphAttributes[o]=s}if(e.skinIndices.length>0){var p=new Pi(4*e.skinIndices.length,4);this.setAttribute("skinIndex",p.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var f=new Pi(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 Fn);var e=this.attributes.position,t=this.morphAttributes.position;if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var r=0,n=t.length;r<n;r++){var i=t[r];ji.setFromBufferAttribute(i),this.morphTargetsRelative?(ki.addVectors(this.boundingBox.min,ji.min),this.boundingBox.expandByPoint(ki),ki.addVectors(this.boundingBox.max,ji.max),this.boundingBox.expandByPoint(ki)):(this.boundingBox.expandByPoint(ji.min),this.boundingBox.expandByPoint(ji.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new zn);var e=this.attributes.position,t=this.morphAttributes.position;if(e){var r=this.boundingSphere.center;if(ji.setFromBufferAttribute(e),t)for(var n=0,i=t.length;n<i;n++){var a=t[n];zi.setFromBufferAttribute(a),this.morphTargetsRelative?(ki.addVectors(ji.min,zi.min),ji.expandByPoint(ki),ki.addVectors(ji.max,zi.max),ji.expandByPoint(ki)):(ji.expandByPoint(zi.min),ji.expandByPoint(zi.max))}ji.getCenter(r);for(var o=0,s=0,l=e.count;s<l;s++)ki.fromBufferAttribute(e,s),o=Math.max(o,r.distanceToSquared(ki));if(t)for(var c=0,h=t.length;c<h;c++)for(var u=t[c],d=this.morphTargetsRelative,p=0,f=u.count;p<f;p++)ki.fromBufferAttribute(u,p),d&&(Ui.fromBufferAttribute(e,p),ki.add(Ui)),o=Math.max(o,r.distanceToSquared(ki));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.getAttribute("position");if(void 0!==t){var r=this.getAttribute("normal");if(void 0===r)r=new Mi(new Float32Array(3*t.count),3),this.setAttribute("normal",r);else for(var n=0,i=r.count;n<i;n++)r.setXYZ(n,0,0,0);var a=new Zr,o=new Zr,s=new Zr,l=new Zr,c=new Zr,h=new Zr,u=new Zr,d=new Zr;if(e)for(var p=0,f=e.count;p<f;p+=3){var m=e.getX(p+0),v=e.getX(p+1),g=e.getX(p+2);a.fromBufferAttribute(t,m),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),u.subVectors(s,o),d.subVectors(a,o),u.cross(d),l.fromBufferAttribute(r,m),c.fromBufferAttribute(r,v),h.fromBufferAttribute(r,g),l.add(u),c.add(u),h.add(u),r.setXYZ(m,l.x,l.y,l.z),r.setXYZ(v,c.x,c.y,c.z),r.setXYZ(g,h.x,h.y,h.z)}else for(var y=0,x=t.count;y<x;y+=3)a.fromBufferAttribute(t,y+0),o.fromBufferAttribute(t,y+1),s.fromBufferAttribute(t,y+2),u.subVectors(s,o),d.subVectors(a,o),u.cross(d),r.setXYZ(y+0,u.x,u.y,u.z),r.setXYZ(y+1,u.x,u.y,u.z),r.setXYZ(y+2,u.x,u.y,u.z);this.normalizeNormals(),r.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var r=this.attributes;for(var n in r)if(void 0!==e.attributes[n])for(var i=r[n],a=i.array,o=e.attributes[n],s=o.array,l=o.itemSize*t,c=Math.min(s.length,a.length-l),h=0,u=l;h<c;h++,u++)a[u]=s[h];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){for(var e=this.attributes.normal,t=0,r=e.count;t<r;t++)ki.fromBufferAttribute(e,t),ki.normalize(),e.setXYZ(t,ki.x,ki.y,ki.z)},toNonIndexed:function(){function e(e,t){for(var r=e.array,n=e.itemSize,i=e.normalized,a=new r.constructor(t.length*n),o=0,s=0,l=0,c=t.length;l<c;l++){o=t[l]*n;for(var h=0;h<n;h++)a[s++]=r[o++]}return new Mi(a,n,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Gi,r=this.index.array,n=this.attributes;for(var i in n){var a=n[i],o=e(a,r);t.setAttribute(i,o)}var s=this.morphAttributes;for(var l in s){for(var c=[],h=s[l],u=0,d=h.length;u<d;u++){var p=h[u],f=e(p,r);c.push(f)}t.morphAttributes[l]=c}t.morphTargetsRelative=this.morphTargetsRelative;for(var m=this.groups,v=0,g=m.length;v<g;v++){var y=m[v];t.addGroup(y.start,y.count,y.materialIndex)}return t},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}e.data={attributes:{}};var n=this.index;null!==n&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});var i=this.attributes;for(var a in i){var o=i[a],s=o.toJSON(e.data);""!==o.name&&(s.name=o.name),e.data.attributes[a]=s}var l={},c=!1;for(var h in this.morphAttributes){for(var u=this.morphAttributes[h],d=[],p=0,f=u.length;p<f;p++){var m=u[p],v=m.toJSON(e.data);""!==m.name&&(v.name=m.name),d.push(v)}d.length>0&&(l[h]=d,c=!0)}c&&(e.data.morphAttributes=l,e.data.morphTargetsRelative=this.morphTargetsRelative);var g=this.groups;g.length>0&&(e.data.groups=JSON.parse(JSON.stringify(g)));var y=this.boundingSphere;return null!==y&&(e.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),e},clone:function(){return(new Gi).copy(this)},copy:function(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var t={};this.name=e.name;var r=e.index;null!==r&&this.setIndex(r.clone(t));var n=e.attributes;for(var i in n){var a=n[i];this.setAttribute(i,a.clone(t))}var o=e.morphAttributes;for(var s in o){for(var l=[],c=o[s],h=0,u=c.length;h<u;h++)l.push(c[h].clone(t));this.morphAttributes[s]=l}this.morphTargetsRelative=e.morphTargetsRelative;for(var d=e.groups,p=0,f=d.length;p<f;p++){var m=d[p];this.addGroup(m.start,m.count,m.materialIndex)}var v=e.boundingBox;null!==v&&(this.boundingBox=v.clone());var g=e.boundingSphere;return null!==g&&(this.boundingSphere=g.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Hi=new nn,Vi=new Xn,Wi=new zn,Yi=new Zr,qi=new Zr,Xi=new Zr,Zi=new Zr,Ji=new Zr,Qi=new Zr,Ki=new Zr,$i=new Zr,ea=new Zr,ta=new Ur,ra=new Ur,na=new Ur,ia=new Zr,aa=new Zr;function oa(e,t){_n.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new Gi,this.material=void 0!==t?t:new bi,this.updateMorphTargets()}function sa(e,t,r,n,i,a,o,s){var l;if(l=t.side===m?n.intersectTriangle(o,a,i,!0,s):n.intersectTriangle(i,a,o,t.side!==v,s),null===l)return null;aa.copy(s),aa.applyMatrix4(e.matrixWorld);var c=r.ray.origin.distanceTo(aa);return c<r.near||c>r.far?null:{distance:c,point:aa.clone(),object:e}}function la(e,t,r,n,i,a,o,s,l,c,h,u){Yi.fromBufferAttribute(i,c),qi.fromBufferAttribute(i,h),Xi.fromBufferAttribute(i,u);var d=e.morphTargetInfluences;if(t.morphTargets&&a&&d){Ki.set(0,0,0),$i.set(0,0,0),ea.set(0,0,0);for(var p=0,f=a.length;p<f;p++){var m=d[p],v=a[p];0!==m&&(Zi.fromBufferAttribute(v,c),Ji.fromBufferAttribute(v,h),Qi.fromBufferAttribute(v,u),o?(Ki.addScaledVector(Zi,m),$i.addScaledVector(Ji,m),ea.addScaledVector(Qi,m)):(Ki.addScaledVector(Zi.sub(Yi),m),$i.addScaledVector(Ji.sub(qi),m),ea.addScaledVector(Qi.sub(Xi),m)))}Yi.add(Ki),qi.add($i),Xi.add(ea)}e.isSkinnedMesh&&(e.boneTransform(c,Yi),e.boneTransform(h,qi),e.boneTransform(u,Xi));var g=sa(e,t,r,n,Yi,qi,Xi,ia);if(g){s&&(ta.fromBufferAttribute(s,c),ra.fromBufferAttribute(s,h),na.fromBufferAttribute(s,u),g.uv=ci.getUV(ia,Yi,qi,Xi,ta,ra,na,new Ur)),l&&(ta.fromBufferAttribute(l,c),ra.fromBufferAttribute(l,h),na.fromBufferAttribute(l,u),g.uv2=ci.getUV(ia,Yi,qi,Xi,ta,ra,na,new Ur));var y=new gi(c,h,u);ci.getNormal(Yi,qi,Xi,y.normal),g.face=y}return g}oa.prototype=Object.assign(Object.create(_n.prototype),{constructor:oa,isMesh:!0,copy:function(e){return _n.prototype.copy.call(this,e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,r=Object.keys(t);if(r.length>0){var n=t[r[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=n.length;i<a;i++){var o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(e,t){var r,n=this.geometry,i=this.material,a=this.matrixWorld;if(void 0!==i&&(null===n.boundingSphere&&n.computeBoundingSphere(),Wi.copy(n.boundingSphere),Wi.applyMatrix4(a),!1!==e.ray.intersectsSphere(Wi)&&(Hi.getInverse(a),Vi.copy(e.ray).applyMatrix4(Hi),null===n.boundingBox||!1!==Vi.intersectsBox(n.boundingBox))))if(n.isBufferGeometry){var o=n.index,s=n.attributes.position,l=n.morphAttributes.position,c=n.morphTargetsRelative,h=n.attributes.uv,u=n.attributes.uv2,d=n.groups,p=n.drawRange;if(null!==o)if(Array.isArray(i))for(var f=0,m=d.length;f<m;f++)for(var v=d[f],g=i[v.materialIndex],y=Math.max(v.start,p.start),x=Math.min(v.start+v.count,p.start+p.count),b=y,w=x;b<w;b+=3){var _=o.getX(b),M=o.getX(b+1),S=o.getX(b+2);r=la(this,g,e,Vi,s,l,c,h,u,_,M,S),r&&(r.faceIndex=Math.floor(b/3),r.face.materialIndex=v.materialIndex,t.push(r))}else for(var A=Math.max(0,p.start),E=Math.min(o.count,p.start+p.count),T=A,C=E;T<C;T+=3){var L=o.getX(T),R=o.getX(T+1),P=o.getX(T+2);r=la(this,i,e,Vi,s,l,c,h,u,L,R,P),r&&(r.faceIndex=Math.floor(T/3),t.push(r))}else if(void 0!==s)if(Array.isArray(i))for(var O=0,I=d.length;O<I;O++)for(var D=d[O],N=i[D.materialIndex],B=Math.max(D.start,p.start),F=Math.min(D.start+D.count,p.start+p.count),U=B,j=F;U<j;U+=3){var z=U,k=U+1,G=U+2;r=la(this,N,e,Vi,s,l,c,h,u,z,k,G),r&&(r.faceIndex=Math.floor(U/3),r.face.materialIndex=D.materialIndex,t.push(r))}else for(var H=Math.max(0,p.start),V=Math.min(s.count,p.start+p.count),W=H,Y=V;W<Y;W+=3){var q=W,X=W+1,Z=W+2;r=la(this,i,e,Vi,s,l,c,h,u,q,X,Z),r&&(r.faceIndex=Math.floor(W/3),t.push(r))}}else if(n.isGeometry){var J,Q=Array.isArray(i),K=n.vertices,$=n.faces,ee=n.faceVertexUvs[0];ee.length>0&&(J=ee);for(var te=0,re=$.length;te<re;te++){var ne=$[te],ie=Q?i[ne.materialIndex]:i;if(void 0!==ie){var ae=K[ne.a],oe=K[ne.b],se=K[ne.c];if(r=sa(this,ie,e,Vi,ae,oe,se,ia),r){if(J&&J[te]){var le=J[te];ta.copy(le[0]),ra.copy(le[1]),na.copy(le[2]),r.uv=ci.getUV(ia,ae,oe,se,ta,ra,na,new Ur)}r.face=ne,r.faceIndex=te,t.push(r)}}}}}});var ca=0,ha=new nn,ua=new _n,da=new Zr;function pa(){Object.defineProperty(this,"id",{value:ca+=2}),this.uuid=Fr.generateUUID(),this.name="",this.type="Geometry",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.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}pa.prototype=Object.assign(Object.create(Ir.prototype),{constructor:pa,isGeometry:!0,applyMatrix4:function(e){for(var t=(new jr).getNormalMatrix(e),r=0,n=this.vertices.length;r<n;r++){var i=this.vertices[r];i.applyMatrix4(e)}for(var a=0,o=this.faces.length;a<o;a++){var s=this.faces[a];s.normal.applyMatrix3(t).normalize();for(var l=0,c=s.vertexNormals.length;l<c;l++)s.vertexNormals[l].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(e){return ha.makeRotationX(e),this.applyMatrix4(ha),this},rotateY:function(e){return ha.makeRotationY(e),this.applyMatrix4(ha),this},rotateZ:function(e){return ha.makeRotationZ(e),this.applyMatrix4(ha),this},translate:function(e,t,r){return ha.makeTranslation(e,t,r),this.applyMatrix4(ha),this},scale:function(e,t,r){return ha.makeScale(e,t,r),this.applyMatrix4(ha),this},lookAt:function(e){return ua.lookAt(e),ua.updateMatrix(),this.applyMatrix4(ua.matrix),this},fromBufferGeometry:function(e){var t=this,r=null!==e.index?e.index:void 0,n=e.attributes;if(void 0===n.position)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var i=n.position,a=n.normal,o=n.color,s=n.uv,l=n.uv2;void 0!==l&&(this.faceVertexUvs[1]=[]);for(var c=0;c<i.count;c++)t.vertices.push((new Zr).fromBufferAttribute(i,c)),void 0!==o&&t.colors.push((new pi).fromBufferAttribute(o,c));function h(e,r,n,i){var c=void 0===o?[]:[t.colors[e].clone(),t.colors[r].clone(),t.colors[n].clone()],h=void 0===a?[]:[(new Zr).fromBufferAttribute(a,e),(new Zr).fromBufferAttribute(a,r),(new Zr).fromBufferAttribute(a,n)],u=new gi(e,r,n,h,c,i);t.faces.push(u),void 0!==s&&t.faceVertexUvs[0].push([(new Ur).fromBufferAttribute(s,e),(new Ur).fromBufferAttribute(s,r),(new Ur).fromBufferAttribute(s,n)]),void 0!==l&&t.faceVertexUvs[1].push([(new Ur).fromBufferAttribute(l,e),(new Ur).fromBufferAttribute(l,r),(new Ur).fromBufferAttribute(l,n)])}var u=e.groups;if(u.length>0)for(var d=0;d<u.length;d++)for(var p=u[d],f=p.start,m=p.count,v=f,g=f+m;v<g;v+=3)void 0!==r?h(r.getX(v),r.getX(v+1),r.getX(v+2),p.materialIndex):h(v,v+1,v+2,p.materialIndex);else if(void 0!==r)for(var y=0;y<r.count;y+=3)h(r.getX(y),r.getX(y+1),r.getX(y+2));else for(var x=0;x<i.count;x+=3)h(x,x+1,x+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(da).negate(),this.translate(da.x,da.y,da.z),this},normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,r=0===t?1:1/t,n=new nn;return n.set(r,0,0,-r*e.x,0,r,0,-r*e.y,0,0,r,-r*e.z,0,0,0,1),this.applyMatrix4(n),this},computeFaceNormals:function(){for(var e=new Zr,t=new Zr,r=0,n=this.faces.length;r<n;r++){var i=this.faces[r],a=this.vertices[i.a],o=this.vertices[i.b],s=this.vertices[i.c];e.subVectors(s,o),t.subVectors(a,o),e.cross(t),e.normalize(),i.normal.copy(e)}},computeVertexNormals:function(e){void 0===e&&(e=!0);for(var t=new Array(this.vertices.length),r=0,n=this.vertices.length;r<n;r++)t[r]=new Zr;if(e)for(var i=new Zr,a=new Zr,o=0,s=this.faces.length;o<s;o++){var l=this.faces[o],c=this.vertices[l.a],h=this.vertices[l.b],u=this.vertices[l.c];i.subVectors(u,h),a.subVectors(c,h),i.cross(a),t[l.a].add(i),t[l.b].add(i),t[l.c].add(i)}else{this.computeFaceNormals();for(var d=0,p=this.faces.length;d<p;d++){var f=this.faces[d];t[f.a].add(f.normal),t[f.b].add(f.normal),t[f.c].add(f.normal)}}for(var m=0,v=this.vertices.length;m<v;m++)t[m].normalize();for(var g=0,y=this.faces.length;g<y;g++){var x=this.faces[g],b=x.vertexNormals;3===b.length?(b[0].copy(t[x.a]),b[1].copy(t[x.b]),b[2].copy(t[x.c])):(b[0]=t[x.a].clone(),b[1]=t[x.b].clone(),b[2]=t[x.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){this.computeFaceNormals();for(var e=0,t=this.faces.length;e<t;e++){var r=this.faces[e],n=r.vertexNormals;3===n.length?(n[0].copy(r.normal),n[1].copy(r.normal),n[2].copy(r.normal)):(n[0]=r.normal.clone(),n[1]=r.normal.clone(),n[2]=r.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var e=0,t=this.faces.length;e<t;e++){var r=this.faces[e];r.__originalFaceNormal?r.__originalFaceNormal.copy(r.normal):r.__originalFaceNormal=r.normal.clone(),r.__originalVertexNormals||(r.__originalVertexNormals=[]);for(var n=0,i=r.vertexNormals.length;n<i;n++)r.__originalVertexNormals[n]?r.__originalVertexNormals[n].copy(r.vertexNormals[n]):r.__originalVertexNormals[n]=r.vertexNormals[n].clone()}var a=new pa;a.faces=this.faces;for(var o=0,s=this.morphTargets.length;o<s;o++){if(!this.morphNormals[o]){this.morphNormals[o]={},this.morphNormals[o].faceNormals=[],this.morphNormals[o].vertexNormals=[];for(var l=this.morphNormals[o].faceNormals,c=this.morphNormals[o].vertexNormals,h=0,u=this.faces.length;h<u;h++){var d=new Zr,p={a:new Zr,b:new Zr,c:new Zr};l.push(d),c.push(p)}}var f=this.morphNormals[o];a.vertices=this.morphTargets[o].vertices,a.computeFaceNormals(),a.computeVertexNormals();for(var m=0,v=this.faces.length;m<v;m++){var g=this.faces[m],y=f.faceNormals[m],x=f.vertexNormals[m];y.copy(g.normal),x.a.copy(g.vertexNormals[0]),x.b.copy(g.vertexNormals[1]),x.c.copy(g.vertexNormals[2])}}for(var b=0,w=this.faces.length;b<w;b++){var _=this.faces[b];_.normal=_.__originalFaceNormal,_.vertexNormals=_.__originalVertexNormals}},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Fn),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new zn),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,r){if(e&&e.isGeometry){var n,i=this.vertices.length,a=this.vertices,o=e.vertices,s=this.faces,l=e.faces,c=this.colors,h=e.colors;void 0===r&&(r=0),void 0!==t&&(n=(new jr).getNormalMatrix(t));for(var u=0,d=o.length;u<d;u++){var p=o[u],f=p.clone();void 0!==t&&f.applyMatrix4(t),a.push(f)}for(var m=0,v=h.length;m<v;m++)c.push(h[m].clone());for(var g=0,y=l.length;g<y;g++){var x=l[g],b=void 0,w=void 0,_=void 0,M=x.vertexNormals,S=x.vertexColors;b=new gi(x.a+i,x.b+i,x.c+i),b.normal.copy(x.normal),void 0!==n&&b.normal.applyMatrix3(n).normalize();for(var A=0,E=M.length;A<E;A++)w=M[A].clone(),void 0!==n&&w.applyMatrix3(n).normalize(),b.vertexNormals.push(w);b.color.copy(x.color);for(var T=0,C=S.length;T<C;T++)_=S[T],b.vertexColors.push(_.clone());b.materialIndex=x.materialIndex+r,s.push(b)}for(var L=0,R=e.faceVertexUvs.length;L<R;L++){var P=e.faceVertexUvs[L];void 0===this.faceVertexUvs[L]&&(this.faceVertexUvs[L]=[]);for(var O=0,I=P.length;O<I;O++){for(var D=P[O],N=[],B=0,F=D.length;B<F;B++)N.push(D[B].clone());this.faceVertexUvs[L].push(N)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){e&&e.isMesh?(e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e)},mergeVertices:function(){for(var e={},t=[],r=[],n=4,i=Math.pow(10,n),a=0,o=this.vertices.length;a<o;a++){var s=this.vertices[a],l=Math.round(s.x*i)+"_"+Math.round(s.y*i)+"_"+Math.round(s.z*i);void 0===e[l]?(e[l]=a,t.push(this.vertices[a]),r[a]=t.length-1):r[a]=r[e[l]]}for(var c=[],h=0,u=this.faces.length;h<u;h++){var d=this.faces[h];d.a=r[d.a],d.b=r[d.b],d.c=r[d.c];for(var p=[d.a,d.b,d.c],f=0;f<3;f++)if(p[f]===p[(f+1)%3]){c.push(h);break}}for(var m=c.length-1;m>=0;m--){var v=c[m];this.faces.splice(v,1);for(var g=0,y=this.faceVertexUvs.length;g<y;g++)this.faceVertexUvs[g].splice(v,1)}var x=this.vertices.length-t.length;return this.vertices=t,x},setFromPoints:function(e){this.vertices=[];for(var t=0,r=e.length;t<r;t++){var n=e[t];this.vertices.push(new Zr(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,r=0;r<t;r++)e[r]._id=r;function n(e,t){return e.materialIndex-t.materialIndex}e.sort(n);var i,a,o=this.faceVertexUvs[0],s=this.faceVertexUvs[1];o&&o.length===t&&(i=[]),s&&s.length===t&&(a=[]);for(var l=0;l<t;l++){var c=e[l]._id;i&&i.push(o[c]),a&&a.push(s[c])}i&&(this.faceVertexUvs[0]=i),a&&(this.faceVertexUvs[1]=a)},toJSON:function(){var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}for(var n=[],i=0;i<this.vertices.length;i++){var a=this.vertices[i];n.push(a.x,a.y,a.z)}for(var o=[],s=[],l={},c=[],h={},u=[],d={},p=0;p<this.faces.length;p++){var f=this.faces[p],m=!0,v=!1,g=void 0!==this.faceVertexUvs[0][p],y=f.normal.length()>0,x=f.vertexNormals.length>0,b=1!==f.color.r||1!==f.color.g||1!==f.color.b,w=f.vertexColors.length>0,_=0;if(_=E(_,0,0),_=E(_,1,m),_=E(_,2,v),_=E(_,3,g),_=E(_,4,y),_=E(_,5,x),_=E(_,6,b),_=E(_,7,w),o.push(_),o.push(f.a,f.b,f.c),o.push(f.materialIndex),g){var M=this.faceVertexUvs[0][p];o.push(L(M[0]),L(M[1]),L(M[2]))}if(y&&o.push(T(f.normal)),x){var S=f.vertexNormals;o.push(T(S[0]),T(S[1]),T(S[2]))}if(b&&o.push(C(f.color)),w){var A=f.vertexColors;o.push(C(A[0]),C(A[1]),C(A[2]))}}function E(e,t,r){return r?e|1<<t:e&~(1<<t)}function T(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==l[t]||(l[t]=s.length/3,s.push(e.x,e.y,e.z)),l[t]}function C(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==h[t]||(h[t]=c.length,c.push(e.getHex())),h[t]}function L(e){var t=e.x.toString()+e.y.toString();return void 0!==d[t]||(d[t]=u.length/2,u.push(e.x,e.y)),d[t]}return e.data={},e.data.vertices=n,e.data.normals=s,c.length>0&&(e.data.colors=c),u.length>0&&(e.data.uvs=[u]),e.data.faces=o,e},clone:function(){return(new pa).copy(this)},copy:function(e){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;for(var t=e.vertices,r=0,n=t.length;r<n;r++)this.vertices.push(t[r].clone());for(var i=e.colors,a=0,o=i.length;a<o;a++)this.colors.push(i[a].clone());for(var s=e.faces,l=0,c=s.length;l<c;l++)this.faces.push(s[l].clone());for(var h=0,u=e.faceVertexUvs.length;h<u;h++){var d=e.faceVertexUvs[h];void 0===this.faceVertexUvs[h]&&(this.faceVertexUvs[h]=[]);for(var p=0,f=d.length;p<f;p++){for(var m=d[p],v=[],g=0,y=m.length;g<y;g++){var x=m[g];v.push(x.clone())}this.faceVertexUvs[h].push(v)}}for(var b=e.morphTargets,w=0,_=b.length;w<_;w++){var M={};if(M.name=b[w].name,void 0!==b[w].vertices){M.vertices=[];for(var S=0,A=b[w].vertices.length;S<A;S++)M.vertices.push(b[w].vertices[S].clone())}if(void 0!==b[w].normals){M.normals=[];for(var E=0,T=b[w].normals.length;E<T;E++)M.normals.push(b[w].normals[E].clone())}this.morphTargets.push(M)}for(var C=e.morphNormals,L=0,R=C.length;L<R;L++){var P={};if(void 0!==C[L].vertexNormals){P.vertexNormals=[];for(var O=0,I=C[L].vertexNormals.length;O<I;O++){var D=C[L].vertexNormals[O],N={};N.a=D.a.clone(),N.b=D.b.clone(),N.c=D.c.clone(),P.vertexNormals.push(N)}}if(void 0!==C[L].faceNormals){P.faceNormals=[];for(var B=0,F=C[L].faceNormals.length;B<F;B++)P.faceNormals.push(C[L].faceNormals[B].clone())}this.morphNormals.push(P)}for(var U=e.skinWeights,j=0,z=U.length;j<z;j++)this.skinWeights.push(U[j].clone());for(var k=e.skinIndices,G=0,H=k.length;G<H;G++)this.skinIndices.push(k[G].clone());for(var V=e.lineDistances,W=0,Y=V.length;W<Y;W++)this.lineDistances.push(V[W]);var q=e.boundingBox;null!==q&&(this.boundingBox=q.clone());var X=e.boundingSphere;return null!==X&&(this.boundingSphere=X.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var fa=function(e){function t(t,r,n,i,a,o){e.call(this),this.type="BoxGeometry",this.parameters={width:t,height:r,depth:n,widthSegments:i,heightSegments:a,depthSegments:o},this.fromBufferGeometry(new ma(t,r,n,i,a,o)),this.mergeVertices()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(pa),ma=function(e){function t(t,r,n,i,a,o){e.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:r,depth:n,widthSegments:i,heightSegments:a,depthSegments:o};var s=this;t=t||1,r=r||1,n=n||1,i=Math.floor(i)||1,a=Math.floor(a)||1,o=Math.floor(o)||1;var l=[],c=[],h=[],u=[],d=0,p=0;function f(e,t,r,n,i,a,o,f,m,v,g){for(var y=a/m,x=o/v,b=a/2,w=o/2,_=f/2,M=m+1,S=v+1,A=0,E=0,T=new Zr,C=0;C<S;C++)for(var L=C*x-w,R=0;R<M;R++){var P=R*y-b;T[e]=P*n,T[t]=L*i,T[r]=_,c.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[r]=f>0?1:-1,h.push(T.x,T.y,T.z),u.push(R/m),u.push(1-C/v),A+=1}for(var O=0;O<v;O++)for(var I=0;I<m;I++){var D=d+I+M*O,N=d+I+M*(O+1),B=d+(I+1)+M*(O+1),F=d+(I+1)+M*O;l.push(D,N,F),l.push(N,B,F),E+=6}s.addGroup(p,E,g),p+=E,d+=A}f("z","y","x",-1,-1,n,r,t,o,a,0),f("z","y","x",1,-1,n,r,-t,o,a,1),f("x","z","y",1,1,t,n,r,i,o,2),f("x","z","y",1,-1,t,n,-r,i,o,3),f("x","y","z",1,-1,t,r,n,i,a,4),f("x","y","z",-1,-1,t,r,-n,i,a,5),this.setIndex(l),this.setAttribute("position",new Pi(c,3)),this.setAttribute("normal",new Pi(h,3)),this.setAttribute("uv",new Pi(u,2))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Gi);function va(e){var t={};for(var r in e)for(var n in t[r]={},e[r]){var i=e[r][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[r][n]=i.clone():Array.isArray(i)?t[r][n]=i.slice():t[r][n]=i}return t}function ga(e){for(var t={},r=0;r<e.length;r++){var n=va(e[r]);for(var i in n)t[i]=n[i]}return t}var ya={clone:va,merge:ga},xa="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",ba="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";function wa(e){xi.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=xa,this.fragmentShader=ba,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function _a(){_n.call(this),this.type="Camera",this.matrixWorldInverse=new nn,this.projectionMatrix=new nn,this.projectionMatrixInverse=new nn}function Ma(e,t,r,n){_a.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==r?r:.1,this.far=void 0!==n?n:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}wa.prototype=Object.create(xi.prototype),wa.prototype.constructor=wa,wa.prototype.isShaderMaterial=!0,wa.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=va(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=Object.assign({},e.extensions),this},wa.prototype.toJSON=function(e){var t=xi.prototype.toJSON.call(this,e);for(var r in t.uniforms={},this.uniforms){var n=this.uniforms[r],i=n.value;i&&i.isTexture?t.uniforms[r]={type:"t",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[r]={type:"c",value:i.getHex()}:i&&i.isVector2?t.uniforms[r]={type:"v2",value:i.toArray()}:i&&i.isVector3?t.uniforms[r]={type:"v3",value:i.toArray()}:i&&i.isVector4?t.uniforms[r]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[r]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[r]={type:"m4",value:i.toArray()}:t.uniforms[r]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var a={};for(var o in this.extensions)!0===this.extensions[o]&&(a[o]=!0);return Object.keys(a).length>0&&(t.extensions=a),t},_a.prototype=Object.assign(Object.create(_n.prototype),{constructor:_a,isCamera:!0,copy:function(e,t){return _n.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 Zr),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){_n.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(e,t){_n.prototype.updateWorldMatrix.call(this,e,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Ma.prototype=Object.assign(Object.create(_a.prototype),{constructor:Ma,isPerspectiveCamera:!0,copy:function(e,t){return _a.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*Fr.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*Fr.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*Fr.RAD2DEG*Math.atan(Math.tan(.5*Fr.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,r,n,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=r,this.view.offsetY=n,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*Fr.DEG2RAD*this.fov)/this.zoom,r=2*t,n=this.aspect*r,i=-.5*n,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;i+=a.offsetX*n/o,t-=a.offsetY*r/s,n*=a.width/o,r*=a.height/s}var l=this.filmOffset;0!==l&&(i+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+n,t,t-r,e,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=_n.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 Sa=90,Aa=1;function Ea(e,t,r){if(_n.call(this),this.type="CubeCamera",!0===r.isWebGLCubeRenderTarget){this.renderTarget=r;var n=new Ma(Sa,Aa,e,t);n.layers=this.layers,n.up.set(0,-1,0),n.lookAt(new Zr(1,0,0)),this.add(n);var i=new Ma(Sa,Aa,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new Zr(-1,0,0)),this.add(i);var a=new Ma(Sa,Aa,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(new Zr(0,1,0)),this.add(a);var o=new Ma(Sa,Aa,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(new Zr(0,-1,0)),this.add(o);var s=new Ma(Sa,Aa,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new Zr(0,0,1)),this.add(s);var l=new Ma(Sa,Aa,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new Zr(0,0,-1)),this.add(l),this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var c=e.xr.enabled,h=e.getRenderTarget();e.xr.enabled=!1;var u=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(t,n),e.setRenderTarget(r,1),e.render(t,i),e.setRenderTarget(r,2),e.render(t,a),e.setRenderTarget(r,3),e.render(t,o),e.setRenderTarget(r,4),e.render(t,s),r.texture.generateMipmaps=u,e.setRenderTarget(r,5),e.render(t,l),e.setRenderTarget(h),e.xr.enabled=c},this.clear=function(e,t,n,i){for(var a=e.getRenderTarget(),o=0;o<6;o++)e.setRenderTarget(r,o),e.clear(t,n,i);e.setRenderTarget(a)}}else console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.")}function Ta(e,t,r){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=r),Vr.call(this,e,e,t)}function Ca(e,t,r,n,i,a,o,s,l,c,h,u){Gr.call(this,null,a,o,s,l,c,n,i,h,u),this.image={data:e||null,width:t||1,height:r||1},this.magFilter=void 0!==l?l:fe,this.minFilter=void 0!==c?c:fe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}Ea.prototype=Object.create(_n.prototype),Ea.prototype.constructor=Ea,Ta.prototype=Object.create(Vr.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isWebGLCubeRenderTarget=!0,Ta.prototype.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=t.format,this.texture.encoding=t.encoding;var r=new Mn,n={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 <begin_vertex>","\t#include <project_vertex>","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#include <common>","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV = equirectUv( direction );","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},i=new wa({name:"CubemapFromEquirect",uniforms:va(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:m,blending:x});i.uniforms.tEquirect.value=t;var a=new oa(new ma(5,5,5),i);r.add(a);var o=new Ea(1,10,this);return o.update(e,r),a.geometry.dispose(),a.material.dispose(),this},Ca.prototype=Object.create(Gr.prototype),Ca.prototype.constructor=Ca,Ca.prototype.isDataTexture=!0;var La=new zn,Ra=new Zr;function Pa(e,t,r,n,i,a){this.planes=[void 0!==e?e:new Kn,void 0!==t?t:new Kn,void 0!==r?r:new Kn,void 0!==n?n:new Kn,void 0!==i?i:new Kn,void 0!==a?a:new Kn]}Object.assign(Pa.prototype,{set:function(e,t,r,n,i,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(r),o[3].copy(n),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,r=0;r<6;r++)t[r].copy(e.planes[r]);return this},setFromProjectionMatrix:function(e){var t=this.planes,r=e.elements,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],l=r[5],c=r[6],h=r[7],u=r[8],d=r[9],p=r[10],f=r[11],m=r[12],v=r[13],g=r[14],y=r[15];return t[0].setComponents(o-n,h-s,f-u,y-m).normalize(),t[1].setComponents(o+n,h+s,f+u,y+m).normalize(),t[2].setComponents(o+i,h+l,f+d,y+v).normalize(),t[3].setComponents(o-i,h-l,f-d,y-v).normalize(),t[4].setComponents(o-a,h-c,f-p,y-g).normalize(),t[5].setComponents(o+a,h+c,f+p,y+g).normalize(),this},intersectsObject:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),La.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(La)},intersectsSprite:function(e){return La.center.set(0,0,0),La.radius=.7071067811865476,La.applyMatrix4(e.matrixWorld),this.intersectsSphere(La)},intersectsSphere:function(e){for(var t=this.planes,r=e.center,n=-e.radius,i=0;i<6;i++){var a=t[i].distanceToPoint(r);if(a<n)return!1}return!0},intersectsBox:function(e){for(var t=this.planes,r=0;r<6;r++){var n=t[r];if(Ra.x=n.normal.x>0?e.max.x:e.min.x,Ra.y=n.normal.y>0?e.max.y:e.min.y,Ra.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(Ra)<0)return!1}return!0},containsPoint:function(e){for(var t=this.planes,r=0;r<6;r++)if(t[r].distanceToPoint(e)<0)return!1;return!0}});var Oa={common:{diffuse:{value:new pi(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new jr},uv2Transform:{value:new jr},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 Ur(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 pi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},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 pi(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new jr}},sprite:{diffuse:{value:new pi(15658734)},opacity:{value:1},center:{value:new Ur(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new jr}}};function Ia(){var e=null,t=!1,r=null,n=null;function i(t,a){r(t,a),n=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==r&&(n=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(e){r=e},setContext:function(t){e=t}}}function Da(e,t){var r=t.isWebGL2,n=new WeakMap;function i(t,r){var n=t.array,i=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,n,i),t.onUploadCallback();var o=5126;return n instanceof Float32Array?o=5126:n instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):n instanceof Uint16Array?o=5123:n instanceof Int16Array?o=5122:n instanceof Uint32Array?o=5125:n instanceof Int32Array?o=5124:n instanceof Int8Array?o=5120:n instanceof Uint8Array&&(o=5121),{buffer:a,type:o,bytesPerElement:n.BYTES_PER_ELEMENT,version:t.version}}function a(t,n,i){var a=n.array,o=n.updateRange;e.bindBuffer(i,t),-1===o.count?e.bufferSubData(i,0,a):(r?e.bufferSubData(i,o.offset*a.BYTES_PER_ELEMENT,a,o.offset,o.count):e.bufferSubData(i,o.offset*a.BYTES_PER_ELEMENT,a.subarray(o.offset,o.offset+o.count)),o.count=-1)}function o(e){return e.isInterleavedBufferAttribute&&(e=e.data),n.get(e)}function s(t){t.isInterleavedBufferAttribute&&(t=t.data);var r=n.get(t);r&&(e.deleteBuffer(r.buffer),n.delete(t))}function l(e,t){e.isInterleavedBufferAttribute&&(e=e.data);var r=n.get(e);void 0===r?n.set(e,i(e,t)):r.version<e.version&&(a(r.buffer,e,t),r.version=e.version)}return{get:o,remove:s,update:l}}function Na(e,t,r,n){pa.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:r,heightSegments:n},this.fromBufferGeometry(new Ba(e,t,r,n)),this.mergeVertices()}function Ba(e,t,r,n){Gi.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:r,heightSegments:n},e=e||1,t=t||1;for(var i=e/2,a=t/2,o=Math.floor(r)||1,s=Math.floor(n)||1,l=o+1,c=s+1,h=e/o,u=t/s,d=[],p=[],f=[],m=[],v=0;v<c;v++)for(var g=v*u-a,y=0;y<l;y++){var x=y*h-i;p.push(x,-g,0),f.push(0,0,1),m.push(y/o),m.push(1-v/s)}for(var b=0;b<s;b++)for(var w=0;w<o;w++){var _=w+l*b,M=w+l*(b+1),S=w+1+l*(b+1),A=w+1+l*b;d.push(_,M,A),d.push(M,S,A)}this.setIndex(d),this.setAttribute("position",new Pi(p,3)),this.setAttribute("normal",new Pi(f,3)),this.setAttribute("uv",new Pi(m,2))}Na.prototype=Object.create(pa.prototype),Na.prototype.constructor=Na,Ba.prototype=Object.create(Gi.prototype),Ba.prototype.constructor=Ba;var Fa="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",Ua="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",ja="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",za="#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",ka="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",Ga="vec3 transformed = vec3( position );",Ha="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",Va="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",Wa="#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",Ya="#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",qa="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",Xa="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",Za="#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",Ja="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",Qa="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",Ka="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",$a="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",eo="#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\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}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",to="#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); } else if (face == 1.0) {\n uv = vec2(-direction.x, -direction.z) / abs(direction.y); } else if (face == 2.0) {\n uv = vec2(-direction.x, direction.y) / abs(direction.z); } else if (face == 3.0) {\n uv = vec2(-direction.z, direction.y) / abs(direction.x); } else if (face == 4.0) {\n uv = vec2(-direction.x, direction.z) / abs(direction.y); } else {\n uv = vec2(direction.x, direction.y) / abs(direction.z); }\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",ro="vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * 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",no="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",io="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",ao="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",oo="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",so="gl_FragColor = linearToOutputTexel( gl_FragColor );",lo="\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 = clamp( floor( D ) / 255.0, 0.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}",co="#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, reflectVec, 0.0 );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec2 sampleUV = equirectUv( reflectVec );\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\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",ho="#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",uo="#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",po="#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",fo="#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",mo="#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",vo="#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",go="#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",yo="#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",xo="#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}",bo="#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",wo="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",_o="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;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\n#endif",Mo="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};\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};\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};\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",So="#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\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 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\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV = equirectUv( reflectVec );\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#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",Ao="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",Eo="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\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}\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)",To="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",Co="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)",Lo="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 = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.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",Ro="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}",Po="\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#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\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\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\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\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\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\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\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\t#pragma unroll_loop_end\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_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",Oo="#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",Io="#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",Do="#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",No="#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",Bo="#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",Fo="#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",Uo="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",jo="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",zo="#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",ko="#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",Go="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",Ho="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",Vo="#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",Wo="#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",Yo="#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",qo="#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;",Xo="#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",Zo="#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",Jo="#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",Qo="#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",Ko="#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",$o="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}",es="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",ts="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",rs="#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",ns="#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",is="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",as="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",os="#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\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ 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\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ 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\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ 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 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 dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\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",ss="#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\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ 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\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ 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\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",ls="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",cs="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",hs="#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",us="#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",ds="#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",ps="#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",fs="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",ms="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",vs="#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",gs="#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\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}\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 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",ys="#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",xs="#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",bs="#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",ws="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",_s="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",Ms="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",Ss="#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",As="uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",Es="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}",Ts="#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",Cs="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",Ls="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",Rs="#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",Ps="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",Os="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",Is="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",Ds="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",Ns="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",Bs="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",Fs="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\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 <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Us="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",js="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 <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\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 <lightmap_fragment>\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 <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",zs="#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",ks="#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 <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\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 <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Gs="#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",Hs="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Vs="#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",Ws="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Ys="#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",qs="#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 <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\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 <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Xs="#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 <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\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 <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",Zs="#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 <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",Js="#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 <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\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 <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",Qs="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",Ks="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\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 <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",$s="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",el="#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",tl="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",rl="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\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 <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",nl={alphamap_fragment:Fa,alphamap_pars_fragment:Ua,alphatest_fragment:ja,aomap_fragment:za,aomap_pars_fragment:ka,begin_vertex:Ga,beginnormal_vertex:Ha,bsdfs:Va,bumpmap_pars_fragment:Wa,clipping_planes_fragment:Ya,clipping_planes_pars_fragment:qa,clipping_planes_pars_vertex:Xa,clipping_planes_vertex:Za,color_fragment:Ja,color_pars_fragment:Qa,color_pars_vertex:Ka,color_vertex:$a,common:eo,cube_uv_reflection_fragment:to,defaultnormal_vertex:ro,displacementmap_pars_vertex:no,displacementmap_vertex:io,emissivemap_fragment:ao,emissivemap_pars_fragment:oo,encodings_fragment:so,encodings_pars_fragment:lo,envmap_fragment:co,envmap_common_pars_fragment:ho,envmap_pars_fragment:uo,envmap_pars_vertex:po,envmap_physical_pars_fragment:So,envmap_vertex:fo,fog_vertex:mo,fog_pars_vertex:vo,fog_fragment:go,fog_pars_fragment:yo,gradientmap_pars_fragment:xo,lightmap_fragment:bo,lightmap_pars_fragment:wo,lights_lambert_vertex:_o,lights_pars_begin:Mo,lights_toon_fragment:Ao,lights_toon_pars_fragment:Eo,lights_phong_fragment:To,lights_phong_pars_fragment:Co,lights_physical_fragment:Lo,lights_physical_pars_fragment:Ro,lights_fragment_begin:Po,lights_fragment_maps:Oo,lights_fragment_end:Io,logdepthbuf_fragment:Do,logdepthbuf_pars_fragment:No,logdepthbuf_pars_vertex:Bo,logdepthbuf_vertex:Fo,map_fragment:Uo,map_pars_fragment:jo,map_particle_fragment:zo,map_particle_pars_fragment:ko,metalnessmap_fragment:Go,metalnessmap_pars_fragment:Ho,morphnormal_vertex:Vo,morphtarget_pars_vertex:Wo,morphtarget_vertex:Yo,normal_fragment_begin:qo,normal_fragment_maps:Xo,normalmap_pars_fragment:Zo,clearcoat_normal_fragment_begin:Jo,clearcoat_normal_fragment_maps:Qo,clearcoat_pars_fragment:Ko,packing:$o,premultiplied_alpha_fragment:es,project_vertex:ts,dithering_fragment:rs,dithering_pars_fragment:ns,roughnessmap_fragment:is,roughnessmap_pars_fragment:as,shadowmap_pars_fragment:os,shadowmap_pars_vertex:ss,shadowmap_vertex:ls,shadowmask_pars_fragment:cs,skinbase_vertex:hs,skinning_pars_vertex:us,skinning_vertex:ds,skinnormal_vertex:ps,specularmap_fragment:fs,specularmap_pars_fragment:ms,tonemapping_fragment:vs,tonemapping_pars_fragment:gs,uv_pars_fragment:ys,uv_pars_vertex:xs,uv_vertex:bs,uv2_pars_fragment:ws,uv2_pars_vertex:_s,uv2_vertex:Ms,worldpos_vertex:Ss,background_frag:As,background_vert:Es,cube_frag:Ts,cube_vert:Cs,depth_frag:Ls,depth_vert:Rs,distanceRGBA_frag:Ps,distanceRGBA_vert:Os,equirect_frag:Is,equirect_vert:Ds,linedashed_frag:Ns,linedashed_vert:Bs,meshbasic_frag:Fs,meshbasic_vert:Us,meshlambert_frag:js,meshlambert_vert:zs,meshmatcap_frag:ks,meshmatcap_vert:Gs,meshtoon_frag:Hs,meshtoon_vert:Vs,meshphong_frag:Ws,meshphong_vert:Ys,meshphysical_frag:qs,meshphysical_vert:Xs,normal_frag:Zs,normal_vert:Js,points_frag:Qs,points_vert:Ks,shadow_frag:$s,shadow_vert:el,sprite_frag:tl,sprite_vert:rl},il={basic:{uniforms:ga([Oa.common,Oa.specularmap,Oa.envmap,Oa.aomap,Oa.lightmap,Oa.fog]),vertexShader:nl.meshbasic_vert,fragmentShader:nl.meshbasic_frag},lambert:{uniforms:ga([Oa.common,Oa.specularmap,Oa.envmap,Oa.aomap,Oa.lightmap,Oa.emissivemap,Oa.fog,Oa.lights,{emissive:{value:new pi(0)}}]),vertexShader:nl.meshlambert_vert,fragmentShader:nl.meshlambert_frag},phong:{uniforms:ga([Oa.common,Oa.specularmap,Oa.envmap,Oa.aomap,Oa.lightmap,Oa.emissivemap,Oa.bumpmap,Oa.normalmap,Oa.displacementmap,Oa.fog,Oa.lights,{emissive:{value:new pi(0)},specular:{value:new pi(1118481)},shininess:{value:30}}]),vertexShader:nl.meshphong_vert,fragmentShader:nl.meshphong_frag},standard:{uniforms:ga([Oa.common,Oa.envmap,Oa.aomap,Oa.lightmap,Oa.emissivemap,Oa.bumpmap,Oa.normalmap,Oa.displacementmap,Oa.roughnessmap,Oa.metalnessmap,Oa.fog,Oa.lights,{emissive:{value:new pi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:nl.meshphysical_vert,fragmentShader:nl.meshphysical_frag},toon:{uniforms:ga([Oa.common,Oa.aomap,Oa.lightmap,Oa.emissivemap,Oa.bumpmap,Oa.normalmap,Oa.displacementmap,Oa.gradientmap,Oa.fog,Oa.lights,{emissive:{value:new pi(0)}}]),vertexShader:nl.meshtoon_vert,fragmentShader:nl.meshtoon_frag},matcap:{uniforms:ga([Oa.common,Oa.bumpmap,Oa.normalmap,Oa.displacementmap,Oa.fog,{matcap:{value:null}}]),vertexShader:nl.meshmatcap_vert,fragmentShader:nl.meshmatcap_frag},points:{uniforms:ga([Oa.points,Oa.fog]),vertexShader:nl.points_vert,fragmentShader:nl.points_frag},dashed:{uniforms:ga([Oa.common,Oa.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:nl.linedashed_vert,fragmentShader:nl.linedashed_frag},depth:{uniforms:ga([Oa.common,Oa.displacementmap]),vertexShader:nl.depth_vert,fragmentShader:nl.depth_frag},normal:{uniforms:ga([Oa.common,Oa.bumpmap,Oa.normalmap,Oa.displacementmap,{opacity:{value:1}}]),vertexShader:nl.normal_vert,fragmentShader:nl.normal_frag},sprite:{uniforms:ga([Oa.sprite,Oa.fog]),vertexShader:nl.sprite_vert,fragmentShader:nl.sprite_frag},background:{uniforms:{uvTransform:{value:new jr},t2D:{value:null}},vertexShader:nl.background_vert,fragmentShader:nl.background_frag},cube:{uniforms:ga([Oa.envmap,{opacity:{value:1}}]),vertexShader:nl.cube_vert,fragmentShader:nl.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:nl.equirect_vert,fragmentShader:nl.equirect_frag},distanceRGBA:{uniforms:ga([Oa.common,Oa.displacementmap,{referencePosition:{value:new Zr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:nl.distanceRGBA_vert,fragmentShader:nl.distanceRGBA_frag},shadow:{uniforms:ga([Oa.lights,Oa.fog,{color:{value:new pi(0)},opacity:{value:1}}]),vertexShader:nl.shadow_vert,fragmentShader:nl.shadow_frag}};function al(e,t,r,n){var i,a,o=new pi(0),s=0,l=null,c=0,h=null;function u(t,n,u,p){var v=!0===n.isScene?n.background:null,g=e.xr,y=g.getSession&&g.getSession();if(y&&"additive"===y.environmentBlendMode&&(v=null),null===v?d(o,s):v&&v.isColor&&(d(v,1),p=!0),(e.autoClear||p)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),v&&(v.isCubeTexture||v.isWebGLCubeRenderTarget||v.mapping===ce)){void 0===a&&(a=new oa(new ma(1,1,1),new wa({name:"BackgroundCubeMaterial",uniforms:va(il.cube.uniforms),vertexShader:il.cube.vertexShader,fragmentShader:il.cube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),a.geometry.deleteAttribute("uv"),a.onBeforeRender=function(e,t,r){this.matrixWorld.copyPosition(r.matrixWorld)},Object.defineProperty(a.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(a));var x=v.isWebGLCubeRenderTarget?v.texture:v;a.material.uniforms.envMap.value=x,a.material.uniforms.flipEnvMap.value=x.isCubeTexture?-1:1,l===v&&c===x.version&&h===e.toneMapping||(a.material.needsUpdate=!0,l=v,c=x.version,h=e.toneMapping),t.unshift(a,a.geometry,a.material,0,0,null)}else v&&v.isTexture&&(void 0===i&&(i=new oa(new Ba(2,2),new wa({name:"BackgroundMaterial",uniforms:va(il.background.uniforms),vertexShader:il.background.vertexShader,fragmentShader:il.background.fragmentShader,side:f,depthTest:!1,depthWrite:!1,fog:!1})),i.geometry.deleteAttribute("normal"),Object.defineProperty(i.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(i)),i.material.uniforms.t2D.value=v,!0===v.matrixAutoUpdate&&v.updateMatrix(),i.material.uniforms.uvTransform.value.copy(v.matrix),l===v&&c===v.version&&h===e.toneMapping||(i.material.needsUpdate=!0,l=v,c=v.version,h=e.toneMapping),t.unshift(i,i.geometry,i.material,0,0,null))}function d(e,r){t.buffers.color.setClear(e.r,e.g,e.b,r,n)}return{getClearColor:function(){return o},setClearColor:function(e,t){o.set(e),s=void 0!==t?t:1,d(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(e){s=e,d(o,s)},render:u}}function ol(e,t,r,n){var i=e.getParameter(34921),a=n.isWebGL2?null:t.get("OES_vertex_array_object"),o=n.isWebGL2||null!==a,s={},l=m(null),c=l;function h(t,n,i,a,s){var l=!1;if(o){var h=f(a,i,n);c!==h&&(c=h,d(c.object)),l=v(a),l&&g(a)}else{var u=!0===n.wireframe;c.geometry===a.id&&c.program===i.id&&c.wireframe===u||(c.geometry=a.id,c.program=i.id,c.wireframe=u,l=!0)}!0===t.isInstancedMesh&&(l=!0),null!==s&&r.update(s,34963),l&&(M(t,n,i,a),null!==s&&e.bindBuffer(34963,r.get(s).buffer))}function u(){return n.isWebGL2?e.createVertexArray():a.createVertexArrayOES()}function d(t){return n.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function p(t){return n.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function f(e,t,r){var n=!0===r.wireframe,i=s[e.id];void 0===i&&(i={},s[e.id]=i);var a=i[t.id];void 0===a&&(a={},i[t.id]=a);var o=a[n];return void 0===o&&(o=m(u()),a[n]=o),o}function m(e){for(var t=[],r=[],n=[],a=0;a<i;a++)t[a]=0,r[a]=0,n[a]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:r,attributeDivisors:n,object:e,attributes:{}}}function v(e){var t=c.attributes,r=e.attributes;if(Object.keys(t).length!==Object.keys(r).length)return!0;for(var n in r){var i=t[n],a=r[n];if(i.attribute!==a)return!0;if(i.data!==a.data)return!0}return!1}function g(e){var t={},r=e.attributes;for(var n in r){var i=r[n],a={};a.attribute=i,i.data&&(a.data=i.data),t[n]=a}c.attributes=t}function y(){for(var e=c.newAttributes,t=0,r=e.length;t<r;t++)e[t]=0}function x(e){b(e,0)}function b(r,i){var a=c.newAttributes,o=c.enabledAttributes,s=c.attributeDivisors;if(a[r]=1,0===o[r]&&(e.enableVertexAttribArray(r),o[r]=1),s[r]!==i){var l=n.isWebGL2?e:t.get("ANGLE_instanced_arrays");l[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](r,i),s[r]=i}}function w(){for(var t=c.newAttributes,r=c.enabledAttributes,n=0,i=r.length;n<i;n++)r[n]!==t[n]&&(e.disableVertexAttribArray(n),r[n]=0)}function _(t,r,i,a,o,s){!0!==n.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,r,i,a,o,s):e.vertexAttribIPointer(t,r,i,a,o,s)}function M(i,a,o,s){if(!1!==n.isWebGL2||!i.isInstancedMesh&&!s.isInstancedBufferGeometry||null!==t.get("ANGLE_instanced_arrays")){y();var l=s.attributes,c=o.getAttributes(),h=a.defaultAttributeValues;for(var u in c){var d=c[u];if(d>=0){var p=l[u];if(void 0!==p){var f=p.normalized,m=p.itemSize,v=r.get(p);if(void 0===v)continue;var g=v.buffer,M=v.type,S=v.bytesPerElement;if(p.isInterleavedBufferAttribute){var A=p.data,E=A.stride,T=p.offset;A&&A.isInstancedInterleavedBuffer?(b(d,A.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=A.meshPerAttribute*A.count)):x(d),e.bindBuffer(34962,g),_(d,m,M,f,E*S,T*S)}else p.isInstancedBufferAttribute?(b(d,p.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=p.meshPerAttribute*p.count)):x(d),e.bindBuffer(34962,g),_(d,m,M,f,0,0)}else if("instanceMatrix"===u){var C=r.get(i.instanceMatrix);if(void 0===C)continue;var L=C.buffer,R=C.type;b(d+0,1),b(d+1,1),b(d+2,1),b(d+3,1),e.bindBuffer(34962,L),e.vertexAttribPointer(d+0,4,R,!1,64,0),e.vertexAttribPointer(d+1,4,R,!1,64,16),e.vertexAttribPointer(d+2,4,R,!1,64,32),e.vertexAttribPointer(d+3,4,R,!1,64,48)}else if(void 0!==h){var P=h[u];if(void 0!==P)switch(P.length){case 2:e.vertexAttrib2fv(d,P);break;case 3:e.vertexAttrib3fv(d,P);break;case 4:e.vertexAttrib4fv(d,P);break;default:e.vertexAttrib1fv(d,P)}}}}w()}}function S(){for(var e in T(),s){var t=s[e];for(var r in t){var n=t[r];for(var i in n)p(n[i].object),delete n[i];delete t[r]}delete s[e]}}function A(e){if(void 0!==s[e.id]){var t=s[e.id];for(var r in t){var n=t[r];for(var i in n)p(n[i].object),delete n[i];delete t[r]}delete s[e.id]}}function E(e){for(var t in s){var r=s[t];if(void 0!==r[e.id]){var n=r[e.id];for(var i in n)p(n[i].object),delete n[i];delete r[e.id]}}}function T(){C(),c!==l&&(c=l,d(c.object))}function C(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:h,reset:T,resetDefaultState:C,dispose:S,releaseStatesOfGeometry:A,releaseStatesOfProgram:E,initAttributes:y,enableAttribute:x,disableUnusedAttributes:w}}function sl(e,t,r,n){var i,a=n.isWebGL2;function o(e){i=e}function s(t,n){e.drawArrays(i,t,n),r.update(n,i)}function l(n,o,s,l){if(0!==l){var c,h;if(a)c=e,h="drawArraysInstanced";else if(c=t.get("ANGLE_instanced_arrays"),h="drawArraysInstancedANGLE",null===c)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[h](i,o,s,l),r.update(s,i,l)}}this.setMode=o,this.render=s,this.renderInstances=l}function ll(e,t,r){var n;function i(){if(void 0!==n)return n;var r=t.get("EXT_texture_filter_anisotropic");return n=null!==r?e.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,n}function a(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&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 o="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,s=void 0!==r.precision?r.precision:"highp",l=a(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);var c=!0===r.logarithmicDepthBuffer,h=e.getParameter(34930),u=e.getParameter(35660),d=e.getParameter(3379),p=e.getParameter(34076),f=e.getParameter(34921),m=e.getParameter(36347),v=e.getParameter(36348),g=e.getParameter(36349),y=u>0,x=o||!!t.get("OES_texture_float"),b=y&&x,w=o?e.getParameter(36183):0;return{isWebGL2:o,getMaxAnisotropy:i,getMaxPrecision:a,precision:s,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:v,maxFragmentUniforms:g,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:b,maxSamples:w}}function cl(){var e=this,t=null,r=0,n=!1,i=!1,a=new Kn,o=new jr,s={value:null,needsUpdate:!1};function l(){s.value!==t&&(s.value=t,s.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function c(t,r,n,i){var l=null!==t?t.length:0,c=null;if(0!==l){if(c=s.value,!0!==i||null===c){var h=n+4*l,u=r.matrixWorldInverse;o.getNormalMatrix(u),(null===c||c.length<h)&&(c=new Float32Array(h));for(var d=0,p=n;d!==l;++d,p+=4)a.copy(t[d]).applyMatrix4(u,o),a.normal.toArray(c,p),c[p+3]=a.constant}s.value=c,s.needsUpdate=!0}return e.numPlanes=l,e.numIntersection=0,c}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(e,i,a){var o=0!==e.length||i||0!==r||n;return n=i,t=c(e,a,0),r=e.length,o},this.beginShadows=function(){i=!0,c(null)},this.endShadows=function(){i=!1,l()},this.setState=function(e,a,o,h,u,d){if(!n||null===e||0===e.length||i&&!o)i?c(null):l();else{var p=i?0:r,f=4*p,m=u.clippingState||null;s.value=m,m=c(e,h,f,d);for(var v=0;v!==f;++v)m[v]=t[v];u.clippingState=m,this.numIntersection=a?this.numPlanes:0,this.numPlanes+=p}}}function hl(e){var t={};return{get:function(r){if(void 0!==t[r])return t[r];var n;switch(r){case"WEBGL_depth_texture":n=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=e.getExtension(r)}return null===n&&console.warn("THREE.WebGLRenderer: "+r+" extension not supported."),t[r]=n,n}}}function ul(e,t,r,n){var i=new WeakMap,a=new WeakMap;function o(e){var s=e.target,l=i.get(s);for(var c in null!==l.index&&t.remove(l.index),l.attributes)t.remove(l.attributes[c]);s.removeEventListener("dispose",o),i.delete(s);var h=a.get(l);h&&(t.remove(h),a.delete(l)),n.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,r.memory.geometries--}function s(e,t){var n=i.get(t);return n||(t.addEventListener("dispose",o),t.isBufferGeometry?n=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new Gi).setFromObject(e)),n=t._bufferGeometry),i.set(t,n),r.memory.geometries++,n)}function l(e){var r=e.attributes;for(var n in r)t.update(r[n],34962);var i=e.morphAttributes;for(var a in i)for(var o=i[a],s=0,l=o.length;s<l;s++)t.update(o[s],34962)}function c(e){var r=[],n=e.index,i=e.attributes.position,o=0;if(null!==n){var s=n.array;o=n.version;for(var l=0,c=s.length;l<c;l+=3){var h=s[l+0],u=s[l+1],d=s[l+2];r.push(h,u,u,d,d,h)}}else{var p=i.array;o=i.version;for(var f=0,m=p.length/3-1;f<m;f+=3){var v=f+0,g=f+1,y=f+2;r.push(v,g,g,y,y,v)}}var x=new(Di(r)>65535?Ri:Ci)(r,1);x.version=o;var b=a.get(e);b&&t.remove(b),a.set(e,x)}function h(e){var t=a.get(e);if(t){var r=e.index;null!==r&&t.version<r.version&&c(e)}else c(e);return a.get(e)}return{get:s,update:l,getWireframeAttribute:h}}function dl(e,t,r,n){var i,a,o,s=n.isWebGL2;function l(e){i=e}function c(e){a=e.type,o=e.bytesPerElement}function h(t,n){e.drawElements(i,n,a,t*o),r.update(n,i)}function u(n,l,c,h){if(0!==h){var u,d;if(s)u=e,d="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[d](i,c,a,l*o,h),r.update(c,i,h)}}this.setMode=l,this.setIndex=c,this.render=h,this.renderInstances=u}function pl(e){var t={geometries:0,textures:0},r={frame:0,calls:0,triangles:0,points:0,lines:0};function n(e,t,n){switch(n=n||1,r.calls++,t){case 4:r.triangles+=n*(e/3);break;case 1:r.lines+=n*(e/2);break;case 3:r.lines+=n*(e-1);break;case 2:r.lines+=n*e;break;case 0:r.points+=n*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",t);break}}function i(){r.frame++,r.calls=0,r.triangles=0,r.points=0,r.lines=0}return{memory:t,render:r,programs:null,autoReset:!0,reset:i,update:n}}function fl(e,t){return e[0]-t[0]}function ml(e,t){return Math.abs(t[1])-Math.abs(e[1])}function vl(e){for(var t={},r=new Float32Array(8),n=[],i=0;i<8;i++)n[i]=[i,0];function a(i,a,o,s){var l=i.morphTargetInfluences,c=void 0===l?0:l.length,h=t[a.id];if(void 0===h){h=[];for(var u=0;u<c;u++)h[u]=[u,0];t[a.id]=h}for(var d=0;d<c;d++){var p=h[d];p[0]=d,p[1]=l[d]}h.sort(ml);for(var f=0;f<8;f++)f<c&&h[f][1]?(n[f][0]=h[f][0],n[f][1]=h[f][1]):(n[f][0]=Number.MAX_SAFE_INTEGER,n[f][1]=0);n.sort(fl);for(var m=o.morphTargets&&a.morphAttributes.position,v=o.morphNormals&&a.morphAttributes.normal,g=0,y=0;y<8;y++){var x=n[y],b=x[0],w=x[1];b!==Number.MAX_SAFE_INTEGER&&w?(m&&a.getAttribute("morphTarget"+y)!==m[b]&&a.setAttribute("morphTarget"+y,m[b]),v&&a.getAttribute("morphNormal"+y)!==v[b]&&a.setAttribute("morphNormal"+y,v[b]),r[y]=w,g+=w):(m&&void 0!==a.getAttribute("morphTarget"+y)&&a.deleteAttribute("morphTarget"+y),v&&void 0!==a.getAttribute("morphNormal"+y)&&a.deleteAttribute("morphNormal"+y),r[y]=0)}var _=a.morphTargetsRelative?1:1-g;s.getUniforms().setValue(e,"morphTargetBaseInfluence",_),s.getUniforms().setValue(e,"morphTargetInfluences",r)}return{update:a}}function gl(e,t,r,n){var i=new WeakMap;function a(e){var a=n.render.frame,o=e.geometry,s=t.get(e,o);return i.get(s)!==a&&(o.isGeometry&&s.updateFromObject(e),t.update(s),i.set(s,a)),e.isInstancedMesh&&r.update(e.instanceMatrix,34962),s}function o(){i=new WeakMap}return{update:a,dispose:o}}function yl(e,t,r,n,i,a,o,s,l,c){e=void 0!==e?e:[],t=void 0!==t?t:ae,o=void 0!==o?o:Fe,Gr.call(this,e,t,r,n,i,a,o,s,l,c),this.flipY=!1}function xl(e,t,r,n){Gr.call(this,null),this.image={data:e||null,width:t||1,height:r||1,depth:n||1},this.magFilter=fe,this.minFilter=fe,this.wrapR=de,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function bl(e,t,r,n){Gr.call(this,null),this.image={data:e||null,width:t||1,height:r||1,depth:n||1},this.magFilter=fe,this.minFilter=fe,this.wrapR=de,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}il.physical={uniforms:ga([il.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Ur(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new pi(0)},transparency:{value:0}}]),vertexShader:nl.meshphysical_vert,fragmentShader:nl.meshphysical_frag},yl.prototype=Object.create(Gr.prototype),yl.prototype.constructor=yl,yl.prototype.isCubeTexture=!0,Object.defineProperty(yl.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}}),xl.prototype=Object.create(Gr.prototype),xl.prototype.constructor=xl,xl.prototype.isDataTexture2DArray=!0,bl.prototype=Object.create(Gr.prototype),bl.prototype.constructor=bl,bl.prototype.isDataTexture3D=!0;var wl=new Gr,_l=new xl,Ml=new bl,Sl=new yl,Al=[],El=[],Tl=new Float32Array(16),Cl=new Float32Array(9),Ll=new Float32Array(4);function Rl(e,t,r){var n=e[0];if(n<=0||n>0)return e;var i=t*r,a=Al[i];if(void 0===a&&(a=new Float32Array(i),Al[i]=a),0!==t){n.toArray(a,0);for(var o=1,s=0;o!==t;++o)s+=r,e[o].toArray(a,s)}return a}function Pl(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Ol(e,t){for(var r=0,n=t.length;r<n;r++)e[r]=t[r]}function Il(e,t){var r=El[t];void 0===r&&(r=new Int32Array(t),El[t]=r);for(var n=0;n!==t;++n)r[n]=e.allocateTextureUnit();return r}function Dl(e,t){var r=this.cache;r[0]!==t&&(e.uniform1f(this.addr,t),r[0]=t)}function Nl(e,t){var r=this.cache;if(void 0!==t.x)r[0]===t.x&&r[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(Pl(r,t))return;e.uniform2fv(this.addr,t),Ol(r,t)}}function Bl(e,t){var r=this.cache;if(void 0!==t.x)r[0]===t.x&&r[1]===t.y&&r[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else if(void 0!==t.r)r[0]===t.r&&r[1]===t.g&&r[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),r[0]=t.r,r[1]=t.g,r[2]=t.b);else{if(Pl(r,t))return;e.uniform3fv(this.addr,t),Ol(r,t)}}function Fl(e,t){var r=this.cache;if(void 0!==t.x)r[0]===t.x&&r[1]===t.y&&r[2]===t.z&&r[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(Pl(r,t))return;e.uniform4fv(this.addr,t),Ol(r,t)}}function Ul(e,t){var r=this.cache,n=t.elements;if(void 0===n){if(Pl(r,t))return;e.uniformMatrix2fv(this.addr,!1,t),Ol(r,t)}else{if(Pl(r,n))return;Ll.set(n),e.uniformMatrix2fv(this.addr,!1,Ll),Ol(r,n)}}function jl(e,t){var r=this.cache,n=t.elements;if(void 0===n){if(Pl(r,t))return;e.uniformMatrix3fv(this.addr,!1,t),Ol(r,t)}else{if(Pl(r,n))return;Cl.set(n),e.uniformMatrix3fv(this.addr,!1,Cl),Ol(r,n)}}function zl(e,t){var r=this.cache,n=t.elements;if(void 0===n){if(Pl(r,t))return;e.uniformMatrix4fv(this.addr,!1,t),Ol(r,t)}else{if(Pl(r,n))return;Tl.set(n),e.uniformMatrix4fv(this.addr,!1,Tl),Ol(r,n)}}function kl(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTexture2D(t||wl,i)}function Gl(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture2DArray(t||_l,i)}function Hl(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture3D(t||Ml,i)}function Vl(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTextureCube(t||Sl,i)}function Wl(e,t){var r=this.cache;r[0]!==t&&(e.uniform1i(this.addr,t),r[0]=t)}function Yl(e,t){var r=this.cache;Pl(r,t)||(e.uniform2iv(this.addr,t),Ol(r,t))}function ql(e,t){var r=this.cache;Pl(r,t)||(e.uniform3iv(this.addr,t),Ol(r,t))}function Xl(e,t){var r=this.cache;Pl(r,t)||(e.uniform4iv(this.addr,t),Ol(r,t))}function Zl(e,t){var r=this.cache;r[0]!==t&&(e.uniform1ui(this.addr,t),r[0]=t)}function Jl(e){switch(e){case 5126:return Dl;case 35664:return Nl;case 35665:return Bl;case 35666:return Fl;case 35674:return Ul;case 35675:return jl;case 35676:return zl;case 5124:case 35670:return Wl;case 35667:case 35671:return Yl;case 35668:case 35672:return ql;case 35669:case 35673:return Xl;case 5125:return Zl;case 35678:case 36198:case 36298:case 36306:case 35682:return kl;case 35679:case 36299:case 36307:return Hl;case 35680:case 36300:case 36308:case 36293:return Vl;case 36289:case 36303:case 36311:case 36292:return Gl}}function Ql(e,t){e.uniform1fv(this.addr,t)}function Kl(e,t){e.uniform1iv(this.addr,t)}function $l(e,t){e.uniform2iv(this.addr,t)}function ec(e,t){e.uniform3iv(this.addr,t)}function tc(e,t){e.uniform4iv(this.addr,t)}function rc(e,t){var r=Rl(t,this.size,2);e.uniform2fv(this.addr,r)}function nc(e,t){var r=Rl(t,this.size,3);e.uniform3fv(this.addr,r)}function ic(e,t){var r=Rl(t,this.size,4);e.uniform4fv(this.addr,r)}function ac(e,t){var r=Rl(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,r)}function oc(e,t){var r=Rl(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,r)}function sc(e,t){var r=Rl(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,r)}function lc(e,t,r){var n=t.length,i=Il(r,n);e.uniform1iv(this.addr,i);for(var a=0;a!==n;++a)r.safeSetTexture2D(t[a]||wl,i[a])}function cc(e,t,r){var n=t.length,i=Il(r,n);e.uniform1iv(this.addr,i);for(var a=0;a!==n;++a)r.safeSetTextureCube(t[a]||Sl,i[a])}function hc(e){switch(e){case 5126:return Ql;case 35664:return rc;case 35665:return nc;case 35666:return ic;case 35674:return ac;case 35675:return oc;case 35676:return sc;case 5124:case 35670:return Kl;case 35667:case 35671:return $l;case 35668:case 35672:return ec;case 35669:case 35673:return tc;case 35678:case 36198:case 36298:case 36306:case 35682:return lc;case 35680:case 36300:case 36308:case 36293:return cc}}function uc(e,t,r){this.id=e,this.addr=r,this.cache=[],this.setValue=Jl(t.type)}function dc(e,t,r){this.id=e,this.addr=r,this.cache=[],this.size=t.size,this.setValue=hc(t.type)}function pc(e){this.id=e,this.seq=[],this.map={}}dc.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Ol(t,e)},pc.prototype.setValue=function(e,t,r){for(var n=this.seq,i=0,a=n.length;i!==a;++i){var o=n[i];o.setValue(e,t[o.id],r)}};var fc=/([\w\d_]+)(\])?(\[|\.)?/g;function mc(e,t){e.seq.push(t),e.map[t.id]=t}function vc(e,t,r){var n=e.name,i=n.length;fc.lastIndex=0;while(1){var a=fc.exec(n),o=fc.lastIndex,s=a[1],l="]"===a[2],c=a[3];if(l&&(s|=0),void 0===c||"["===c&&o+2===i){mc(r,void 0===c?new uc(s,e,t):new dc(s,e,t));break}var h=r.map,u=h[s];void 0===u&&(u=new pc(s),mc(r,u)),r=u}}function gc(e,t){this.seq=[],this.map={};for(var r=e.getProgramParameter(t,35718),n=0;n<r;++n){var i=e.getActiveUniform(t,n),a=e.getUniformLocation(t,i.name);vc(i,a,this)}}function yc(e,t,r){var n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}gc.prototype.setValue=function(e,t,r,n){var i=this.map[t];void 0!==i&&i.setValue(e,r,n)},gc.prototype.setOptional=function(e,t,r){var n=t[r];void 0!==n&&this.setValue(e,r,n)},gc.upload=function(e,t,r,n){for(var i=0,a=t.length;i!==a;++i){var o=t[i],s=r[o.id];!1!==s.needsUpdate&&o.setValue(e,s.value,n)}},gc.seqWithValue=function(e,t){for(var r=[],n=0,i=e.length;n!==i;++n){var a=e[n];a.id in t&&r.push(a)}return r};var xc=0;function bc(e){for(var t=e.split("\n"),r=0;r<t.length;r++)t[r]=r+1+": "+t[r];return t.join("\n")}function wc(e){switch(e){case Jt:return["Linear","( value )"];case Qt:return["sRGB","( value )"];case $t:return["RGBE","( value )"];case tr:return["RGBM","( value, 7.0 )"];case rr:return["RGBM","( value, 16.0 )"];case nr:return["RGBD","( value, 256.0 )"];case Kt:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case er:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function _c(e,t,r){var n=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(n&&""===i)return"";var a=e.getShaderSource(t);return"THREE.WebGLShader: gl.getShaderInfoLog() "+r+"\n"+i+bc(a)}function Mc(e,t){var r=wc(t);return"vec4 "+e+"( vec4 value ) { return "+r[0]+"ToLinear"+r[1]+"; }"}function Sc(e,t){var r=wc(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+r[0]+r[1]+"; }"}function Ac(e,t){var r;switch(t){case $:r="Linear";break;case ee:r="Reinhard";break;case te:r="OptimizedCineon";break;case re:r="ACESFilmic";break;case ne:r="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),r="Linear"}return"vec3 "+e+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function Ec(e){var t=[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""];return t.filter(Lc).join("\n")}function Tc(e){var t=[];for(var r in e){var n=e[r];!1!==n&&t.push("#define "+r+" "+n)}return t.join("\n")}function Cc(e,t){for(var r={},n=e.getProgramParameter(t,35721),i=0;i<n;i++){var a=e.getActiveAttrib(t,i),o=a.name;r[o]=e.getAttribLocation(t,o)}return r}function Lc(e){return""!==e}function Rc(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Pc(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var Oc=/^[ \t]*#include +<([\w\d./]+)>/gm;function Ic(e){return e.replace(Oc,Dc)}function Dc(e,t){var r=nl[t];if(void 0===r)throw new Error("Can not resolve #include <"+t+">");return Ic(r)}var Nc=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Bc=/#pragma unroll_loop_start[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;function Fc(e){return e.replace(Bc,jc).replace(Nc,Uc)}function Uc(e,t,r,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),jc(e,t,r,n)}function jc(e,t,r,n){for(var i="",a=parseInt(t);a<parseInt(r);a++)i+=n.replace(/\[ i \]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function zc(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function kc(e){var t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===u?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===d?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===p&&(t="SHADOWMAP_TYPE_VSM"),t}function Gc(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case ae:case oe:t="ENVMAP_TYPE_CUBE";break;case ce:case he:t="ENVMAP_TYPE_CUBE_UV";break;case se:case le:t="ENVMAP_TYPE_EQUIREC";break}return t}function Hc(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case oe:case le:t="ENVMAP_MODE_REFRACTION";break}return t}function Vc(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case Z:t="ENVMAP_BLENDING_MULTIPLY";break;case J:t="ENVMAP_BLENDING_MIX";break;case Q:t="ENVMAP_BLENDING_ADD";break}return t}function Wc(e,t,r,n){var i,a,o=e.getContext(),s=r.defines,l=r.vertexShader,c=r.fragmentShader,h=kc(r),u=Gc(r),d=Hc(r),p=Vc(r),f=e.gammaFactor>0?e.gammaFactor:1,m=r.isWebGL2?"":Ec(r),v=Tc(s),g=o.createProgram();if(r.isRawShaderMaterial?(i=[v].filter(Lc).join("\n"),i.length>0&&(i+="\n"),a=[m,v].filter(Lc).join("\n"),a.length>0&&(a+="\n")):(i=[zc(r),"#define SHADER_NAME "+r.shaderName,v,r.instancing?"#define USE_INSTANCING":"",r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+f,"#define MAX_BONES "+r.maxBones,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+d:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&!1===r.flatShading?"#define USE_MORPHNORMALS":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+h:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#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(Lc).join("\n"),a=[m,zc(r),"#define SHADER_NAME "+r.shaderName,v,r.alphaTest?"#define ALPHATEST "+r.alphaTest+(r.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+f,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+u:"",r.envMap?"#define "+d:"",r.envMap?"#define "+p:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.sheen?"#define USE_SHEEN":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+h:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensionShaderTextureLOD||r.envMap)&&r.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==K?"#define TONE_MAPPING":"",r.toneMapping!==K?nl["tonemapping_pars_fragment"]:"",r.toneMapping!==K?Ac("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",nl["encodings_pars_fragment"],r.map?Mc("mapTexelToLinear",r.mapEncoding):"",r.matcap?Mc("matcapTexelToLinear",r.matcapEncoding):"",r.envMap?Mc("envMapTexelToLinear",r.envMapEncoding):"",r.emissiveMap?Mc("emissiveMapTexelToLinear",r.emissiveMapEncoding):"",r.lightMap?Mc("lightMapTexelToLinear",r.lightMapEncoding):"",Sc("linearToOutputTexel",r.outputEncoding),r.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Lc).join("\n")),l=Ic(l),l=Rc(l,r),l=Pc(l,r),c=Ic(c),c=Rc(c,r),c=Pc(c,r),l=Fc(l),c=Fc(c),r.isWebGL2&&!r.isRawShaderMaterial){var y=!1,x=/^\s*#version\s+300\s+es\s*\n/;r.isShaderMaterial&&null!==l.match(x)&&null!==c.match(x)&&(y=!0,l=l.replace(x,""),c=c.replace(x,"")),i=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,a=["#version 300 es\n","#define varying in",y?"":"out highp vec4 pc_fragColor;",y?"":"#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"+a}var b,w,_=i+l,M=a+c,S=yc(o,35633,_),A=yc(o,35632,M);if(o.attachShader(g,S),o.attachShader(g,A),void 0!==r.index0AttributeName?o.bindAttribLocation(g,0,r.index0AttributeName):!0===r.morphTargets&&o.bindAttribLocation(g,0,"position"),o.linkProgram(g),e.debug.checkShaderErrors){var E=o.getProgramInfoLog(g).trim(),T=o.getShaderInfoLog(S).trim(),C=o.getShaderInfoLog(A).trim(),L=!0,R=!0;if(!1===o.getProgramParameter(g,35714)){L=!1;var P=_c(o,S,"vertex"),O=_c(o,A,"fragment");console.error("THREE.WebGLProgram: shader error: ",o.getError(),"35715",o.getProgramParameter(g,35715),"gl.getProgramInfoLog",E,P,O)}else""!==E?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",E):""!==T&&""!==C||(R=!1);R&&(this.diagnostics={runnable:L,programLog:E,vertexShader:{log:T,prefix:i},fragmentShader:{log:C,prefix:a}})}return o.deleteShader(S),o.deleteShader(A),this.getUniforms=function(){return void 0===b&&(b=new gc(o,g)),b},this.getAttributes=function(){return void 0===w&&(w=Cc(o,g)),w},this.destroy=function(){n.releaseStatesOfProgram(this),o.deleteProgram(g),this.program=void 0},this.name=r.shaderName,this.id=xc++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=S,this.fragmentShader=A,this}function Yc(e,t,r,n){var i=[],a=r.isWebGL2,o=r.logarithmicDepthBuffer,s=r.floatVertexTextures,l=r.maxVertexUniforms,c=r.vertexTextures,h=r.precision,u={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},d=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen"];function p(e,t){var r;if(t){var n=il[t];r={name:e.name||e.type,uniforms:ya.clone(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader}}else r={name:e.name||e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};return r}function f(e){var t=e.skeleton,r=t.bones;if(s)return 1024;var n=l,i=Math.floor((n-20)/4),a=Math.min(i,r.length);return a<r.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+r.length+" bones. This GPU supports "+a+"."),0):a}function g(e){var t;return e?e.isTexture?t=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=Jt,t}function y(n,i,l,d,y,x,b){var w=d.fog,_=n.isMeshStandardMaterial?d.environment:null,M=n.envMap||_,S=u[n.type],A=b.isSkinnedMesh?f(b):0;null!==n.precision&&(h=r.getMaxPrecision(n.precision),h!==n.precision&&console.warn("THREE.WebGLProgram.getParameters:",n.precision,"not supported, using",h,"instead."));var E=p(n,S);n.onBeforeCompile(E,e);var T=e.getRenderTarget(),C={isWebGL2:a,shaderID:S,shaderName:E.name,uniforms:E.uniforms,vertexShader:E.vertexShader,fragmentShader:E.fragmentShader,defines:n.defines,isRawShaderMaterial:n.isRawShaderMaterial,isShaderMaterial:n.isShaderMaterial,precision:h,instancing:!0===b.isInstancedMesh,supportsVertexTextures:c,outputEncoding:null!==T?g(T.texture):e.outputEncoding,map:!!n.map,mapEncoding:g(n.map),matcap:!!n.matcap,matcapEncoding:g(n.matcap),envMap:!!M,envMapMode:M&&M.mapping,envMapEncoding:g(M),envMapCubeUV:!!M&&(M.mapping===ce||M.mapping===he),lightMap:!!n.lightMap,lightMapEncoding:g(n.lightMap),aoMap:!!n.aoMap,emissiveMap:!!n.emissiveMap,emissiveMapEncoding:g(n.emissiveMap),bumpMap:!!n.bumpMap,normalMap:!!n.normalMap,objectSpaceNormalMap:n.normalMapType===sr,tangentSpaceNormalMap:n.normalMapType===or,clearcoatMap:!!n.clearcoatMap,clearcoatRoughnessMap:!!n.clearcoatRoughnessMap,clearcoatNormalMap:!!n.clearcoatNormalMap,displacementMap:!!n.displacementMap,roughnessMap:!!n.roughnessMap,metalnessMap:!!n.metalnessMap,specularMap:!!n.specularMap,alphaMap:!!n.alphaMap,gradientMap:!!n.gradientMap,sheen:!!n.sheen,combine:n.combine,vertexTangents:n.normalMap&&n.vertexTangents,vertexColors:n.vertexColors,vertexUvs:!!n.map||!!n.bumpMap||!!n.normalMap||!!n.specularMap||!!n.alphaMap||!!n.emissiveMap||!!n.roughnessMap||!!n.metalnessMap||!!n.clearcoatMap||!!n.clearcoatRoughnessMap||!!n.clearcoatNormalMap||!!n.displacementMap,uvsVertexOnly:!(n.map||n.bumpMap||n.normalMap||n.specularMap||n.alphaMap||n.emissiveMap||n.roughnessMap||n.metalnessMap||n.clearcoatNormalMap)&&!!n.displacementMap,fog:!!w,useFog:n.fog,fogExp2:w&&w.isFogExp2,flatShading:n.flatShading,sizeAttenuation:n.sizeAttenuation,logarithmicDepthBuffer:o,skinning:n.skinning&&A>0,maxBones:A,useVertexTexture:s,morphTargets:n.morphTargets,morphNormals:n.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:i.directional.length,numPointLights:i.point.length,numSpotLights:i.spot.length,numRectAreaLights:i.rectArea.length,numHemiLights:i.hemi.length,numDirLightShadows:i.directionalShadowMap.length,numPointLightShadows:i.pointShadowMap.length,numSpotLightShadows:i.spotShadowMap.length,numClippingPlanes:y,numClipIntersection:x,dithering:n.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:n.toneMapped?e.toneMapping:K,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:n.premultipliedAlpha,alphaTest:n.alphaTest,doubleSided:n.side===v,flipSided:n.side===m,depthPacking:void 0!==n.depthPacking&&n.depthPacking,index0AttributeName:n.index0AttributeName,extensionDerivatives:n.extensions&&n.extensions.derivatives,extensionFragDepth:n.extensions&&n.extensions.fragDepth,extensionDrawBuffers:n.extensions&&n.extensions.drawBuffers,extensionShaderTextureLOD:n.extensions&&n.extensions.shaderTextureLOD,rendererExtensionFragDepth:a||null!==t.get("EXT_frag_depth"),rendererExtensionDrawBuffers:a||null!==t.get("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:a||null!==t.get("EXT_shader_texture_lod"),customProgramCacheKey:n.customProgramCacheKey()};return C}function x(t){var r=[];if(t.shaderID?r.push(t.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var n in t.defines)r.push(n),r.push(t.defines[n]);if(void 0===t.isRawShaderMaterial){for(var i=0;i<d.length;i++)r.push(t[d[i]]);r.push(e.outputEncoding),r.push(e.gammaFactor)}return r.push(t.customProgramCacheKey),r.join()}function b(t,r){for(var a,o=0,s=i.length;o<s;o++){var l=i[o];if(l.cacheKey===r){a=l,++a.usedTimes;break}}return void 0===a&&(a=new Wc(e,r,t,n),i.push(a)),a}function w(e){if(0===--e.usedTimes){var t=i.indexOf(e);i[t]=i[i.length-1],i.pop(),e.destroy()}}return{getParameters:y,getProgramCacheKey:x,acquireProgram:b,releaseProgram:w,programs:i}}function qc(){var e=new WeakMap;function t(t){var r=e.get(t);return void 0===r&&(r={},e.set(t,r)),r}function r(t){e.delete(t)}function n(t,r,n){e.get(t)[r]=n}function i(){e=new WeakMap}return{get:t,remove:r,update:n,dispose:i}}function Xc(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Zc(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Jc(){var e=[],t=0,r=[],n=[],i={id:-1};function a(){t=0,r.length=0,n.length=0}function o(r,n,a,o,s,l){var c=e[t];return void 0===c?(c={id:r.id,object:r,geometry:n,material:a,program:a.program||i,groupOrder:o,renderOrder:r.renderOrder,z:s,group:l},e[t]=c):(c.id=r.id,c.object=r,c.geometry=n,c.material=a,c.program=a.program||i,c.groupOrder=o,c.renderOrder=r.renderOrder,c.z=s,c.group=l),t++,c}function s(e,t,i,a,s,l){var c=o(e,t,i,a,s,l);(!0===i.transparent?n:r).push(c)}function l(e,t,i,a,s,l){var c=o(e,t,i,a,s,l);(!0===i.transparent?n:r).unshift(c)}function c(e,t){r.length>1&&r.sort(e||Xc),n.length>1&&n.sort(t||Zc)}function h(){for(var r=t,n=e.length;r<n;r++){var i=e[r];if(null===i.id)break;i.id=null,i.object=null,i.geometry=null,i.material=null,i.program=null,i.group=null}}return{opaque:r,transparent:n,init:a,push:s,unshift:l,finish:h,sort:c}}function Qc(){var e=new WeakMap;function t(r){var n=r.target;n.removeEventListener("dispose",t),e.delete(n)}function r(r,n){var i,a=e.get(r);return void 0===a?(i=new Jc,e.set(r,new WeakMap),e.get(r).set(n,i),r.addEventListener("dispose",t)):(i=a.get(n),void 0===i&&(i=new Jc,a.set(n,i))),i}function n(){e=new WeakMap}return{get:r,dispose:n}}function Kc(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var r;switch(t.type){case"DirectionalLight":r={direction:new Zr,color:new pi};break;case"SpotLight":r={position:new Zr,direction:new Zr,color:new pi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new Zr,color:new pi,distance:0,decay:0};break;case"HemisphereLight":r={direction:new Zr,skyColor:new pi,groundColor:new pi};break;case"RectAreaLight":r={color:new pi,position:new Zr,halfWidth:new Zr,halfHeight:new Zr};break}return e[t.id]=r,r}}}function $c(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var r;switch(t.type){case"DirectionalLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ur};break;case"SpotLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ur};break;case"PointLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ur,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=r,r}}}var eh=0;function th(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function rh(){for(var e=new Kc,t=$c(),r={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:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=0;n<9;n++)r.probe.push(new Zr);var i=new Zr,a=new nn,o=new nn;function s(n,s,l){for(var c=0,h=0,u=0,d=0;d<9;d++)r.probe[d].set(0,0,0);var p=0,f=0,m=0,v=0,g=0,y=0,x=0,b=0,w=l.matrixWorldInverse;n.sort(th);for(var _=0,M=n.length;_<M;_++){var S=n[_],A=S.color,E=S.intensity,T=S.distance,C=S.shadow&&S.shadow.map?S.shadow.map.texture:null;if(S.isAmbientLight)c+=A.r*E,h+=A.g*E,u+=A.b*E;else if(S.isLightProbe)for(var L=0;L<9;L++)r.probe[L].addScaledVector(S.sh.coefficients[L],E);else if(S.isDirectionalLight){var R=e.get(S);if(R.color.copy(S.color).multiplyScalar(S.intensity),R.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),R.direction.sub(i),R.direction.transformDirection(w),S.castShadow){var P=S.shadow,O=t.get(S);O.shadowBias=P.bias,O.shadowNormalBias=P.normalBias,O.shadowRadius=P.radius,O.shadowMapSize=P.mapSize,r.directionalShadow[p]=O,r.directionalShadowMap[p]=C,r.directionalShadowMatrix[p]=S.shadow.matrix,y++}r.directional[p]=R,p++}else if(S.isSpotLight){var I=e.get(S);if(I.position.setFromMatrixPosition(S.matrixWorld),I.position.applyMatrix4(w),I.color.copy(A).multiplyScalar(E),I.distance=T,I.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),I.direction.sub(i),I.direction.transformDirection(w),I.coneCos=Math.cos(S.angle),I.penumbraCos=Math.cos(S.angle*(1-S.penumbra)),I.decay=S.decay,S.castShadow){var D=S.shadow,N=t.get(S);N.shadowBias=D.bias,N.shadowNormalBias=D.normalBias,N.shadowRadius=D.radius,N.shadowMapSize=D.mapSize,r.spotShadow[m]=N,r.spotShadowMap[m]=C,r.spotShadowMatrix[m]=S.shadow.matrix,b++}r.spot[m]=I,m++}else if(S.isRectAreaLight){var B=e.get(S);B.color.copy(A).multiplyScalar(E),B.position.setFromMatrixPosition(S.matrixWorld),B.position.applyMatrix4(w),o.identity(),a.copy(S.matrixWorld),a.premultiply(w),o.extractRotation(a),B.halfWidth.set(.5*S.width,0,0),B.halfHeight.set(0,.5*S.height,0),B.halfWidth.applyMatrix4(o),B.halfHeight.applyMatrix4(o),r.rectArea[v]=B,v++}else if(S.isPointLight){var F=e.get(S);if(F.position.setFromMatrixPosition(S.matrixWorld),F.position.applyMatrix4(w),F.color.copy(S.color).multiplyScalar(S.intensity),F.distance=S.distance,F.decay=S.decay,S.castShadow){var U=S.shadow,j=t.get(S);j.shadowBias=U.bias,j.shadowNormalBias=U.normalBias,j.shadowRadius=U.radius,j.shadowMapSize=U.mapSize,j.shadowCameraNear=U.camera.near,j.shadowCameraFar=U.camera.far,r.pointShadow[f]=j,r.pointShadowMap[f]=C,r.pointShadowMatrix[f]=S.shadow.matrix,x++}r.point[f]=F,f++}else if(S.isHemisphereLight){var z=e.get(S);z.direction.setFromMatrixPosition(S.matrixWorld),z.direction.transformDirection(w),z.direction.normalize(),z.skyColor.copy(S.color).multiplyScalar(E),z.groundColor.copy(S.groundColor).multiplyScalar(E),r.hemi[g]=z,g++}}r.ambient[0]=c,r.ambient[1]=h,r.ambient[2]=u;var k=r.hash;k.directionalLength===p&&k.pointLength===f&&k.spotLength===m&&k.rectAreaLength===v&&k.hemiLength===g&&k.numDirectionalShadows===y&&k.numPointShadows===x&&k.numSpotShadows===b||(r.directional.length=p,r.spot.length=m,r.rectArea.length=v,r.point.length=f,r.hemi.length=g,r.directionalShadow.length=y,r.directionalShadowMap.length=y,r.pointShadow.length=x,r.pointShadowMap.length=x,r.spotShadow.length=b,r.spotShadowMap.length=b,r.directionalShadowMatrix.length=y,r.pointShadowMatrix.length=x,r.spotShadowMatrix.length=b,k.directionalLength=p,k.pointLength=f,k.spotLength=m,k.rectAreaLength=v,k.hemiLength=g,k.numDirectionalShadows=y,k.numPointShadows=x,k.numSpotShadows=b,r.version=eh++)}return{setup:s,state:r}}function nh(){var e=new rh,t=[],r=[];function n(){t.length=0,r.length=0}function i(e){t.push(e)}function a(e){r.push(e)}function o(n){e.setup(t,r,n)}var s={lightsArray:t,shadowsArray:r,lights:e};return{init:n,state:s,setupLights:o,pushLight:i,pushShadow:a}}function ih(){var e=new WeakMap;function t(r){var n=r.target;n.removeEventListener("dispose",t),e.delete(n)}function r(r,n){var i;return!1===e.has(r)?(i=new nh,e.set(r,new WeakMap),e.get(r).set(n,i),r.addEventListener("dispose",t)):!1===e.get(r).has(n)?(i=new nh,e.get(r).set(n,i)):i=e.get(r).get(n),i}function n(){e=new WeakMap}return{get:r,dispose:n}}function ah(e){xi.call(this),this.type="MeshDepthMaterial",this.depthPacking=ir,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}function oh(e){xi.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Zr,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}ah.prototype=Object.create(xi.prototype),ah.prototype.constructor=ah,ah.prototype.isMeshDepthMaterial=!0,ah.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},oh.prototype=Object.create(xi.prototype),oh.prototype.constructor=oh,oh.prototype.isMeshDistanceMaterial=!0,oh.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this};var sh="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\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}",lh="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";function ch(e,t,r){var n=new Pa,i=new Ur,a=new Ur,o=new Hr,s=[],l=[],c={},h={0:m,1:f,2:v},d=new wa({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ur},radius:{value:4}},vertexShader:lh,fragmentShader:sh}),g=d.clone();g.defines.HORIZONAL_PASS=1;var y=new Gi;y.setAttribute("position",new Mi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var b=new oa(y,d),w=this;function _(r,n){var i=t.update(b);d.uniforms.shadow_pass.value=r.map.texture,d.uniforms.resolution.value=r.mapSize,d.uniforms.radius.value=r.radius,e.setRenderTarget(r.mapPass),e.clear(),e.renderBufferDirect(n,null,i,d,b,null),g.uniforms.shadow_pass.value=r.mapPass.texture,g.uniforms.resolution.value=r.mapSize,g.uniforms.radius.value=r.radius,e.setRenderTarget(r.map),e.clear(),e.renderBufferDirect(n,null,i,g,b,null)}function M(e,t,r){var n=e<<0|t<<1|r<<2,i=s[n];return void 0===i&&(i=new ah({depthPacking:ar,morphTargets:e,skinning:t}),s[n]=i),i}function S(e,t,r){var n=e<<0|t<<1|r<<2,i=l[n];return void 0===i&&(i=new oh({morphTargets:e,skinning:t}),l[n]=i),i}function A(t,r,n,i,a,o,s){var l=null,u=M,d=t.customDepthMaterial;if(!0===i.isPointLight&&(u=S,d=t.customDistanceMaterial),void 0===d){var f=!1;!0===n.morphTargets&&(f=r.morphAttributes&&r.morphAttributes.position&&r.morphAttributes.position.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));var v=!0===t.isInstancedMesh;l=u(f,m,v)}else l=d;if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var g=l.uuid,y=n.uuid,x=c[g];void 0===x&&(x={},c[g]=x);var b=x[y];void 0===b&&(b=l.clone(),x[y]=b),l=b}return l.visible=n.visible,l.wireframe=n.wireframe,l.side=s===p?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:h[n.side],l.clipShadows=n.clipShadows,l.clippingPlanes=n.clippingPlanes,l.clipIntersection=n.clipIntersection,l.wireframeLinewidth=n.wireframeLinewidth,l.linewidth=n.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=a,l.farDistance=o),l}function E(r,i,a,o,s){if(!1!==r.visible){var l=r.layers.test(i.layers);if(l&&(r.isMesh||r.isLine||r.isPoints)&&(r.castShadow||r.receiveShadow&&s===p)&&(!r.frustumCulled||n.intersectsObject(r))){r.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,r.matrixWorld);var c=t.update(r),h=r.material;if(Array.isArray(h))for(var u=c.groups,d=0,f=u.length;d<f;d++){var m=u[d],v=h[m.materialIndex];if(v&&v.visible){var g=A(r,c,v,o,a.near,a.far,s);e.renderBufferDirect(a,null,c,g,r,m)}}else if(h.visible){var y=A(r,c,h,o,a.near,a.far,s);e.renderBufferDirect(a,null,c,y,r,null)}}for(var x=r.children,b=0,w=x.length;b<w;b++)E(x[b],i,a,o,s)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=u,this.render=function(t,s,l){if(!1!==w.enabled&&(!1!==w.autoUpdate||!1!==w.needsUpdate)&&0!==t.length){var c=e.getRenderTarget(),h=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),d=e.state;d.setBlending(x),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var f=0,m=t.length;f<m;f++){var v=t[f],g=v.shadow;if(!1!==g.autoUpdate||!1!==g.needsUpdate)if(void 0!==g){i.copy(g.mapSize);var y=g.getFrameExtents();if(i.multiply(y),a.copy(g.mapSize),(i.x>r||i.y>r)&&(i.x>r&&(a.x=Math.floor(r/y.x),i.x=a.x*y.x,g.mapSize.x=a.x),i.y>r&&(a.y=Math.floor(r/y.y),i.y=a.y*y.y,g.mapSize.y=a.y)),null===g.map&&!g.isPointLightShadow&&this.type===p){var b={minFilter:xe,magFilter:xe,format:Ue};g.map=new Vr(i.x,i.y,b),g.map.texture.name=v.name+".shadowMap",g.mapPass=new Vr(i.x,i.y,b),g.camera.updateProjectionMatrix()}if(null===g.map){var M={minFilter:fe,magFilter:fe,format:Ue};g.map=new Vr(i.x,i.y,M),g.map.texture.name=v.name+".shadowMap",g.camera.updateProjectionMatrix()}e.setRenderTarget(g.map),e.clear();for(var S=g.getViewportCount(),A=0;A<S;A++){var T=g.getViewport(A);o.set(a.x*T.x,a.y*T.y,a.x*T.z,a.y*T.w),d.viewport(o),g.updateMatrices(v,A),n=g.getFrustum(),E(s,l,g.camera,v,this.type)}g.isPointLightShadow||this.type!==p||_(g,l),g.needsUpdate=!1}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}w.needsUpdate=!1,e.setRenderTarget(c,h,u)}}}function hh(e,t,r){var n=r.isWebGL2;function s(){var t=!1,r=new Hr,n=null,i=new Hr(0,0,0,0);return{setMask:function(r){n===r||t||(e.colorMask(r,r,r,r),n=r)},setLocked:function(e){t=e},setClear:function(t,n,a,o,s){!0===s&&(t*=o,n*=o,a*=o),r.set(t,n,a,o),!1===i.equals(r)&&(e.clearColor(t,n,a,o),i.copy(r))},reset:function(){t=!1,n=null,i.set(-1,0,0,0)}}}function l(){var t=!1,r=null,n=null,i=null;return{setTest:function(e){e?ge(2929):ye(2929)},setMask:function(n){r===n||t||(e.depthMask(n),r=n)},setFunc:function(t){if(n!==t){if(t)switch(t){case k:e.depthFunc(512);break;case G:e.depthFunc(519);break;case H:e.depthFunc(513);break;case V:e.depthFunc(515);break;case W:e.depthFunc(514);break;case Y:e.depthFunc(518);break;case q:e.depthFunc(516);break;case X:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);n=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,r=null,n=null,i=null}}}function c(){var t=!1,r=null,n=null,i=null,a=null,o=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?ge(2960):ye(2960))},setMask:function(n){r===n||t||(e.stencilMask(n),r=n)},setFunc:function(t,r,o){n===t&&i===r&&a===o||(e.stencilFunc(t,r,o),n=t,i=r,a=o)},setOp:function(t,r,n){o===t&&s===r&&l===n||(e.stencilOp(t,r,n),o=t,s=r,l=n)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,r=null,n=null,i=null,a=null,o=null,s=null,l=null,c=null}}}var h=new s,u=new l,d=new c,p={},f=null,g=null,y=null,Z=null,J=null,Q=null,K=null,$=null,ee=null,te=!1,re=null,ne=null,ie=null,ae=null,oe=null,se=e.getParameter(35661),le=!1,ce=0,he=e.getParameter(7938);-1!==he.indexOf("WebGL")?(ce=parseFloat(/^WebGL\ ([0-9])/.exec(he)[1]),le=ce>=1):-1!==he.indexOf("OpenGL ES")&&(ce=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(he)[1]),le=ce>=2);var ue=null,de={},pe=new Hr,fe=new Hr;function me(t,r,n){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;o<n;o++)e.texImage2D(r+o,0,6408,1,1,0,6408,5121,i);return a}var ve={};function ge(t){!0!==p[t]&&(e.enable(t),p[t]=!0)}function ye(t){!1!==p[t]&&(e.disable(t),p[t]=!1)}function xe(t){return f!==t&&(e.useProgram(t),f=t,!0)}ve[3553]=me(3553,3553,1),ve[34067]=me(34067,34069,6),h.setClear(0,0,0,1),u.setClear(1),d.setClear(0),ge(2929),u.setFunc(V),Ae(!1),Ee(a),ge(2884),Me(x);var be={};if(be[A]=32774,be[E]=32778,be[T]=32779,n)be[C]=32775,be[L]=32776;else{var we=t.get("EXT_blend_minmax");null!==we&&(be[C]=we.MIN_EXT,be[L]=we.MAX_EXT)}var _e={};function Me(t,r,n,i,a,o,s,l){if(t!==x){if(g||(ge(3042),g=!0),t===S)a=a||r,o=o||n,s=s||i,r===Z&&a===K||(e.blendEquationSeparate(be[r],be[a]),Z=r,K=a),n===J&&i===Q&&o===$&&s===ee||(e.blendFuncSeparate(_e[n],_e[i],_e[o],_e[s]),J=n,Q=i,$=o,ee=s),y=t,te=null;else if(t!==y||l!==te){if(Z===A&&K===A||(e.blendEquation(32774),Z=A,K=A),l)switch(t){case b:e.blendFuncSeparate(1,771,1,771);break;case w:e.blendFunc(1,1);break;case _:e.blendFuncSeparate(0,0,769,771);break;case M:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t);break}else switch(t){case b:e.blendFuncSeparate(770,771,1,771);break;case w:e.blendFunc(770,1);break;case _:e.blendFunc(0,769);break;case M:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t);break}J=null,Q=null,$=null,ee=null,y=t,te=l}}else g&&(ye(3042),g=!1)}function Se(e,t){e.side===v?ye(2884):ge(2884);var r=e.side===m;t&&(r=!r),Ae(r),e.blending===b&&!1===e.transparent?Me(x):Me(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),u.setFunc(e.depthFunc),u.setTest(e.depthTest),u.setMask(e.depthWrite),h.setMask(e.colorWrite);var n=e.stencilWrite;d.setTest(n),n&&(d.setMask(e.stencilWriteMask),d.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),d.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),Ce(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)}function Ae(t){re!==t&&(t?e.frontFace(2304):e.frontFace(2305),re=t)}function Ee(t){t!==i?(ge(2884),t!==ne&&(t===a?e.cullFace(1029):t===o?e.cullFace(1028):e.cullFace(1032))):ye(2884),ne=t}function Te(t){t!==ie&&(le&&e.lineWidth(t),ie=t)}function Ce(t,r,n){t?(ge(32823),ae===r&&oe===n||(e.polygonOffset(r,n),ae=r,oe=n)):ye(32823)}function Le(e){e?ge(3089):ye(3089)}function Re(t){void 0===t&&(t=33984+se-1),ue!==t&&(e.activeTexture(t),ue=t)}function Pe(t,r){null===ue&&Re();var n=de[ue];void 0===n&&(n={type:void 0,texture:void 0},de[ue]=n),n.type===t&&n.texture===r||(e.bindTexture(t,r||ve[t]),n.type=t,n.texture=r)}function Oe(){var t=de[ue];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)}function Ie(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}}function De(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}}function Ne(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}}function Be(t){!1===pe.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),pe.copy(t))}function Fe(t){!1===fe.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),fe.copy(t))}function Ue(){p={},ue=null,de={},f=null,y=null,re=null,ne=null,h.reset(),u.reset(),d.reset()}return _e[R]=0,_e[P]=1,_e[O]=768,_e[D]=770,_e[z]=776,_e[U]=774,_e[B]=772,_e[I]=769,_e[N]=771,_e[j]=775,_e[F]=773,{buffers:{color:h,depth:u,stencil:d},enable:ge,disable:ye,useProgram:xe,setBlending:Me,setMaterial:Se,setFlipSided:Ae,setCullFace:Ee,setLineWidth:Te,setPolygonOffset:Ce,setScissorTest:Le,activeTexture:Re,bindTexture:Pe,unbindTexture:Oe,compressedTexImage2D:Ie,texImage2D:De,texImage3D:Ne,scissor:Be,viewport:Fe,reset:Ue}}function uh(e,t,r,n,i,a,o){var s,l=i.isWebGL2,c=i.maxTextures,h=i.maxCubemapSize,u=i.maxTextureSize,d=i.maxSamples,p=new WeakMap,f=!1;try{f="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch($){}function m(e,t){return f?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function v(e,t,r,n){var i=1;if((e.width>n||e.height>n)&&(i=n/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?Fr.floorPowerOfTwo:Math.floor,o=a(i*e.width),l=a(i*e.height);void 0===s&&(s=m(o,l));var c=r?m(o,l):s;c.width=o,c.height=l;var h=c.getContext("2d");return h.drawImage(e,0,0,o,l),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+l+")."),c}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 Fr.isPowerOfTwo(e.width)&&Fr.isPowerOfTwo(e.height)}function y(e){return!l&&(e.wrapS!==de||e.wrapT!==de||e.minFilter!==fe&&e.minFilter!==xe)}function x(e,t){return e.generateMipmaps&&t&&e.minFilter!==fe&&e.minFilter!==xe}function b(t,r,i,a){e.generateMipmap(t);var o=n.get(r);o.__maxMipLevel=Math.log(Math.max(i,a))*Math.LOG2E}function w(r,n,i){if(!1===l)return n;if(null!==r){if(void 0!==e[r])return e[r];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+r+"'")}var a=n;return 6403===n&&(5126===i&&(a=33326),5131===i&&(a=33325),5121===i&&(a=33321)),6407===n&&(5126===i&&(a=34837),5131===i&&(a=34843),5121===i&&(a=32849)),6408===n&&(5126===i&&(a=34836),5131===i&&(a=34842),5121===i&&(a=32856)),33325!==a&&33326!==a&&34842!==a&&34836!==a||t.get("EXT_color_buffer_float"),a}function _(e){return e===fe||e===me||e===ge?9728:9729}function M(e){var t=e.target;t.removeEventListener("dispose",M),A(t),t.isVideoTexture&&p.delete(t),o.memory.textures--}function S(e){var t=e.target;t.removeEventListener("dispose",S),E(t),o.memory.textures--}function A(t){var r=n.get(t);void 0!==r.__webglInit&&(e.deleteTexture(r.__webglTexture),n.remove(t))}function E(t){var r=n.get(t),i=n.get(t.texture);if(t){if(void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(var a=0;a<6;a++)e.deleteFramebuffer(r.__webglFramebuffer[a]),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[a]);else e.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer&&e.deleteRenderbuffer(r.__webglColorRenderbuffer),r.__webglDepthRenderbuffer&&e.deleteRenderbuffer(r.__webglDepthRenderbuffer);n.remove(t.texture),n.remove(t)}}var T=0;function C(){T=0}function L(){var e=T;return e>=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),T+=1,e}function R(e,t){var i=n.get(e);if(e.isVideoTexture&&X(e),e.version>0&&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 j(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}r.activeTexture(33984+t),r.bindTexture(3553,i.__webglTexture)}function P(e,t){var i=n.get(e);e.version>0&&i.__version!==e.version?j(i,e,t):(r.activeTexture(33984+t),r.bindTexture(35866,i.__webglTexture))}function O(e,t){var i=n.get(e);e.version>0&&i.__version!==e.version?j(i,e,t):(r.activeTexture(33984+t),r.bindTexture(32879,i.__webglTexture))}function I(t,i){if(6===t.image.length){var o=n.get(t);if(t.version>0&&o.__version!==t.version){U(o,t),r.activeTexture(33984+i),r.bindTexture(34067,o.__webglTexture),e.pixelStorei(37440,t.flipY);for(var s=t&&(t.isCompressedTexture||t.image[0].isCompressedTexture),c=t.image[0]&&t.image[0].isDataTexture,u=[],d=0;d<6;d++)u[d]=s||c?c?t.image[d].image:t.image[d]:v(t.image[d],!1,!0,h);var p,f=u[0],m=g(f)||l,y=a.convert(t.format),_=a.convert(t.type),M=w(t.internalFormat,y,_);if(F(34067,t,m),s){for(var S=0;S<6;S++){p=u[S].mipmaps;for(var A=0;A<p.length;A++){var E=p[A];t.format!==Ue&&t.format!==Fe?null!==y?r.compressedTexImage2D(34069+S,A,M,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):r.texImage2D(34069+S,A,M,E.width,E.height,0,y,_,E.data)}}o.__maxMipLevel=p.length-1}else{p=t.mipmaps;for(var T=0;T<6;T++)if(c){r.texImage2D(34069+T,0,M,u[T].width,u[T].height,0,y,_,u[T].data);for(var C=0;C<p.length;C++){var L=p[C],R=L.image[T].image;r.texImage2D(34069+T,C+1,M,R.width,R.height,0,y,_,R.data)}}else{r.texImage2D(34069+T,0,M,y,_,u[T]);for(var P=0;P<p.length;P++){var O=p[P];r.texImage2D(34069+T,P+1,M,y,_,O.image[T])}}o.__maxMipLevel=p.length}x(t,m)&&b(34067,t,f.width,f.height),o.__version=t.version,t.onUpdate&&t.onUpdate(t)}else r.activeTexture(33984+i),r.bindTexture(34067,o.__webglTexture)}}function D(e,t){r.activeTexture(33984+t),r.bindTexture(34067,n.get(e).__webglTexture)}var N={};N[ue]=10497,N[de]=33071,N[pe]=33648;var B={};function F(r,a,o){o?(e.texParameteri(r,10242,N[a.wrapS]),e.texParameteri(r,10243,N[a.wrapT]),32879!==r&&35866!==r||e.texParameteri(r,32882,N[a.wrapR]),e.texParameteri(r,10240,B[a.magFilter]),e.texParameteri(r,10241,B[a.minFilter])):(e.texParameteri(r,10242,33071),e.texParameteri(r,10243,33071),32879!==r&&35866!==r||e.texParameteri(r,32882,33071),a.wrapS===de&&a.wrapT===de||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(r,10240,_(a.magFilter)),e.texParameteri(r,10241,_(a.minFilter)),a.minFilter!==fe&&a.minFilter!==xe&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));var s=t.get("EXT_texture_filter_anisotropic");if(s){if(a.type===Re&&null===t.get("OES_texture_float_linear"))return;if(a.type===Pe&&null===(l||t.get("OES_texture_half_float_linear")))return;(a.anisotropy>1||n.get(a).__currentAnisotropy)&&(e.texParameterf(r,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy)}}function U(t,r){void 0===t.__webglInit&&(t.__webglInit=!0,r.addEventListener("dispose",M),t.__webglTexture=e.createTexture(),o.memory.textures++)}function j(t,n,i){var o=3553;n.isDataTexture2DArray&&(o=35866),n.isDataTexture3D&&(o=32879),U(t,n),r.activeTexture(33984+i),r.bindTexture(o,t.__webglTexture),e.pixelStorei(37440,n.flipY),e.pixelStorei(37441,n.premultiplyAlpha),e.pixelStorei(3317,n.unpackAlignment);var s,c=y(n)&&!1===g(n.image),h=v(n.image,c,!1,u),d=g(h)||l,p=a.convert(n.format),f=a.convert(n.type),m=w(n.internalFormat,p,f);F(o,n,d);var _=n.mipmaps;if(n.isDepthTexture)m=6402,l?m=n.type===Re?36012:n.type===Le?33190:n.type===Ne?35056:33189:n.type===Re&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),n.format===Ge&&6402===m&&n.type!==Te&&n.type!==Le&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),n.type=Te,f=a.convert(n.type)),n.format===He&&6402===m&&(m=34041,n.type!==Ne&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),n.type=Ne,f=a.convert(n.type))),r.texImage2D(3553,0,m,h.width,h.height,0,p,f,null);else if(n.isDataTexture)if(_.length>0&&d){for(var M=0,S=_.length;M<S;M++)s=_[M],r.texImage2D(3553,M,m,s.width,s.height,0,p,f,s.data);n.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else r.texImage2D(3553,0,m,h.width,h.height,0,p,f,h.data),t.__maxMipLevel=0;else if(n.isCompressedTexture){for(var A=0,E=_.length;A<E;A++)s=_[A],n.format!==Ue&&n.format!==Fe?null!==p?r.compressedTexImage2D(3553,A,m,s.width,s.height,0,s.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):r.texImage2D(3553,A,m,s.width,s.height,0,p,f,s.data);t.__maxMipLevel=_.length-1}else if(n.isDataTexture2DArray)r.texImage3D(35866,0,m,h.width,h.height,h.depth,0,p,f,h.data),t.__maxMipLevel=0;else if(n.isDataTexture3D)r.texImage3D(32879,0,m,h.width,h.height,h.depth,0,p,f,h.data),t.__maxMipLevel=0;else if(_.length>0&&d){for(var T=0,C=_.length;T<C;T++)s=_[T],r.texImage2D(3553,T,m,p,f,s);n.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else r.texImage2D(3553,0,m,p,f,h),t.__maxMipLevel=0;x(n,d)&&b(o,n,h.width,h.height),t.__version=n.version,n.onUpdate&&n.onUpdate(n)}function z(t,i,o,s){var l=a.convert(i.texture.format),c=a.convert(i.texture.type),h=w(i.texture.internalFormat,l,c);r.texImage2D(s,0,h,i.width,i.height,0,l,c,null),e.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,o,s,n.get(i.texture).__webglTexture,0),e.bindFramebuffer(36160,null)}function k(t,r,n){if(e.bindRenderbuffer(36161,t),r.depthBuffer&&!r.stencilBuffer){var i=33189;if(n){var o=r.depthTexture;o&&o.isDepthTexture&&(o.type===Re?i=36012:o.type===Le&&(i=33190));var s=q(r);e.renderbufferStorageMultisample(36161,s,i,r.width,r.height)}else e.renderbufferStorage(36161,i,r.width,r.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(r.depthBuffer&&r.stencilBuffer){if(n){var l=q(r);e.renderbufferStorageMultisample(36161,l,35056,r.width,r.height)}else e.renderbufferStorage(36161,34041,r.width,r.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{var c=a.convert(r.texture.format),h=a.convert(r.texture.type),u=w(r.texture.internalFormat,c,h);if(n){var d=q(r);e.renderbufferStorageMultisample(36161,d,u,r.width,r.height)}else e.renderbufferStorage(36161,u,r.width,r.height)}e.bindRenderbuffer(36161,null)}function G(t,r){var i=r&&r.isWebGLCubeRenderTarget;if(i)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,t),!r.depthTexture||!r.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");n.get(r.depthTexture).__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),R(r.depthTexture,0);var a=n.get(r.depthTexture).__webglTexture;if(r.depthTexture.format===Ge)e.framebufferTexture2D(36160,36096,3553,a,0);else{if(r.depthTexture.format!==He)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,a,0)}}function H(t){var r=n.get(t),i=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");G(r.__webglFramebuffer,t)}else if(i){r.__webglDepthbuffer=[];for(var a=0;a<6;a++)e.bindFramebuffer(36160,r.__webglFramebuffer[a]),r.__webglDepthbuffer[a]=e.createRenderbuffer(),k(r.__webglDepthbuffer[a],t,!1)}else e.bindFramebuffer(36160,r.__webglFramebuffer),r.__webglDepthbuffer=e.createRenderbuffer(),k(r.__webglDepthbuffer,t,!1);e.bindFramebuffer(36160,null)}function V(t){var i=n.get(t),s=n.get(t.texture);t.addEventListener("dispose",S),s.__webglTexture=e.createTexture(),o.memory.textures++;var c=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultisampleRenderTarget,u=g(t)||l;if(!l||t.texture.format!==Fe||t.texture.type!==Re&&t.texture.type!==Pe||(t.texture.format=Ue,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),c){i.__webglFramebuffer=[];for(var d=0;d<6;d++)i.__webglFramebuffer[d]=e.createFramebuffer()}else if(i.__webglFramebuffer=e.createFramebuffer(),h)if(l){i.__webglMultisampledFramebuffer=e.createFramebuffer(),i.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,i.__webglColorRenderbuffer);var p=a.convert(t.texture.format),f=a.convert(t.texture.type),m=w(t.texture.internalFormat,p,f),v=q(t);e.renderbufferStorageMultisample(36161,v,m,t.width,t.height),e.bindFramebuffer(36160,i.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,i.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(i.__webglDepthRenderbuffer=e.createRenderbuffer(),k(i.__webglDepthRenderbuffer,t,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(c){r.bindTexture(34067,s.__webglTexture),F(34067,t.texture,u);for(var y=0;y<6;y++)z(i.__webglFramebuffer[y],t,36064,34069+y);x(t.texture,u)&&b(34067,t.texture,t.width,t.height),r.bindTexture(34067,null)}else r.bindTexture(3553,s.__webglTexture),F(3553,t.texture,u),z(i.__webglFramebuffer,t,36064,3553),x(t.texture,u)&&b(3553,t.texture,t.width,t.height),r.bindTexture(3553,null);t.depthBuffer&&H(t)}function W(e){var t=e.texture,i=g(e)||l;if(x(t,i)){var a=e.isWebGLCubeRenderTarget?34067:3553,o=n.get(t).__webglTexture;r.bindTexture(a,o),b(a,t,e.width,e.height),r.bindTexture(a,null)}}function Y(t){if(t.isWebGLMultisampleRenderTarget)if(l){var r=n.get(t);e.bindFramebuffer(36008,r.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,r.__webglFramebuffer);var i=t.width,a=t.height,o=16384;t.depthBuffer&&(o|=256),t.stencilBuffer&&(o|=1024),e.blitFramebuffer(0,0,i,a,0,0,i,a,o,9728),e.bindFramebuffer(36160,r.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")}function q(e){return l&&e.isWebGLMultisampleRenderTarget?Math.min(d,e.samples):0}function X(e){var t=o.render.frame;p.get(e)!==t&&(p.set(e,t),e.update())}B[fe]=9728,B[me]=9984,B[ge]=9986,B[xe]=9729,B[be]=9985,B[_e]=9987;var Z=!1,J=!1;function Q(e,t){e&&e.isWebGLRenderTarget&&(!1===Z&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),Z=!0),e=e.texture),R(e,t)}function K(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===J&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),J=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?I(e,t):D(e,t)}this.allocateTextureUnit=L,this.resetTextureUnits=C,this.setTexture2D=R,this.setTexture2DArray=P,this.setTexture3D=O,this.setTextureCube=I,this.setTextureCubeDynamic=D,this.setupRenderTarget=V,this.updateRenderTargetMipmap=W,this.updateMultisampleRenderTarget=Y,this.safeSetTexture2D=Q,this.safeSetTextureCube=K}function dh(e,t,r){var n=r.isWebGL2;function i(e){var r;if(e===Se)return 5121;if(e===Oe)return 32819;if(e===Ie)return 32820;if(e===De)return 33635;if(e===Ae)return 5120;if(e===Ee)return 5122;if(e===Te)return 5123;if(e===Ce)return 5124;if(e===Le)return 5125;if(e===Re)return 5126;if(e===Pe)return n?5131:(r=t.get("OES_texture_half_float"),null!==r?r.HALF_FLOAT_OES:null);if(e===Be)return 6406;if(e===Fe)return 6407;if(e===Ue)return 6408;if(e===je)return 6409;if(e===ze)return 6410;if(e===Ge)return 6402;if(e===He)return 34041;if(e===Ve)return 6403;if(e===We)return 36244;if(e===Ye)return 33319;if(e===qe)return 33320;if(e===Xe)return 36248;if(e===Ze)return 36249;if(e===Je||e===Qe||e===Ke||e===$e){if(r=t.get("WEBGL_compressed_texture_s3tc"),null===r)return null;if(e===Je)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===Qe)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===Ke)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===$e)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e===et||e===tt||e===rt||e===nt){if(r=t.get("WEBGL_compressed_texture_pvrtc"),null===r)return null;if(e===et)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===tt)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===rt)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===nt)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e===it)return r=t.get("WEBGL_compressed_texture_etc1"),null!==r?r.COMPRESSED_RGB_ETC1_WEBGL:null;if((e===at||e===ot)&&(r=t.get("WEBGL_compressed_texture_etc"),null!==r)){if(e===at)return r.COMPRESSED_RGB8_ETC2;if(e===ot)return r.COMPRESSED_RGBA8_ETC2_EAC}return e===st||e===lt||e===ct||e===ht||e===ut||e===dt||e===pt||e===ft||e===mt||e===vt||e===gt||e===yt||e===xt||e===bt||e===_t||e===Mt||e===St||e===At||e===Et||e===Tt||e===Ct||e===Lt||e===Rt||e===Pt||e===Ot||e===It||e===Dt||e===Nt?(r=t.get("WEBGL_compressed_texture_astc"),null!==r?e:null):e===wt?(r=t.get("EXT_texture_compression_bptc"),null!==r?e:null):e===Ne?n?34042:(r=t.get("WEBGL_depth_texture"),null!==r?r.UNSIGNED_INT_24_8_WEBGL:null):void 0}return{convert:i}}function ph(e){Ma.call(this),this.cameras=e||[]}function fh(){_n.call(this),this.type="Group"}function mh(){this._targetRay=null,this._grip=null}function vh(e,t){var r=this,n=null,i=1,a=null,o="local-floor",s=null,l=[],c=new Map,h=new Ma;h.layers.enable(1),h.viewport=new Hr;var u=new Ma;u.layers.enable(2),u.viewport=new Hr;var d=[h,u],p=new ph;p.layers.enable(1),p.layers.enable(2);var f=null,m=null;function v(e){var t=c.get(e.inputSource);t&&t.dispatchEvent({type:e.type})}function g(){c.forEach((function(e,t){e.disconnect(t)})),c.clear(),e.setFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),E.stop(),r.isPresenting=!1,r.dispatchEvent({type:"sessionend"})}function y(e){a=e,E.setContext(n),E.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}function x(e){for(var t=n.inputSources,r=0;r<l.length;r++)c.set(t[r],l[r]);for(var i=0;i<e.removed.length;i++){var a=e.removed[i],o=c.get(a);o&&(o.dispatchEvent({type:"disconnected",data:a}),c.delete(a))}for(var s=0;s<e.added.length;s++){var h=e.added[s],u=c.get(h);u&&u.dispatchEvent({type:"connected",data:h})}}this.enabled=!1,this.isPresenting=!1,this.getController=function(e){var t=l[e];return void 0===t&&(t=new mh,l[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){var t=l[e];return void 0===t&&(t=new mh,l[e]=t),t.getGripSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return n},this.setSession=function(e){if(n=e,null!==n){n.addEventListener("select",v),n.addEventListener("selectstart",v),n.addEventListener("selectend",v),n.addEventListener("squeeze",v),n.addEventListener("squeezestart",v),n.addEventListener("squeezeend",v),n.addEventListener("end",g);var r=t.getContextAttributes();!0!==r.xrCompatible&&t.makeXRCompatible();var a={antialias:r.antialias,alpha:r.alpha,depth:r.depth,stencil:r.stencil,framebufferScaleFactor:i},s=new XRWebGLLayer(n,t,a);n.updateRenderState({baseLayer:s}),n.requestReferenceSpace(o).then(y),n.addEventListener("inputsourceschange",x)}};var b=new Zr,w=new Zr;function _(e,t,r){b.setFromMatrixPosition(t.matrixWorld),w.setFromMatrixPosition(r.matrixWorld);var n=b.distanceTo(w),i=t.projectionMatrix.elements,a=r.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],h=(i[8]-1)/i[0],u=(a[8]+1)/a[0],d=o*h,p=o*u,f=n/(-h+u),m=f*-h;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld);var v=o+f,g=s+f,y=d-m,x=p+(n-m),_=l*s/g*v,M=c*s/g*v;e.projectionMatrix.makePerspective(y,x,_,M,v,g)}function M(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.getInverse(e.matrixWorld)}this.getCamera=function(e){p.near=u.near=h.near=e.near,p.far=u.far=h.far=e.far,f===p.near&&m===p.far||(n.updateRenderState({depthNear:p.near,depthFar:p.far}),f=p.near,m=p.far);var t=e.parent,r=p.cameras;M(p,t);for(var i=0;i<r.length;i++)M(r[i],t);e.matrixWorld.copy(p.matrixWorld);for(var a=e.children,o=0,s=a.length;o<s;o++)a[o].updateMatrixWorld(!0);return 2===r.length?_(p,h,u):p.projectionMatrix.copy(h.projectionMatrix),p};var S=null;function A(t,r){if(s=r.getViewerPose(a),null!==s){var i=s.views,o=n.renderState.baseLayer;e.setFramebuffer(o.framebuffer);var c=!1;i.length!==p.cameras.length&&(p.cameras.length=0,c=!0);for(var h=0;h<i.length;h++){var u=i[h],f=o.getViewport(u),m=d[h];m.matrix.fromArray(u.transform.matrix),m.projectionMatrix.fromArray(u.projectionMatrix),m.viewport.set(f.x,f.y,f.width,f.height),0===h&&p.matrix.copy(m.matrix),!0===c&&p.cameras.push(m)}}for(var v=n.inputSources,g=0;g<l.length;g++){var y=l[g],x=v[g];y.update(x,r,a)}S&&S(t,r)}var E=new Ia;E.setAnimationLoop(A),this.setAnimationLoop=function(e){S=e},this.dispose=function(){}}function gh(e){function t(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)}function r(e,t,r,m,y){t.isMeshBasicMaterial?n(e,t):t.isMeshLambertMaterial?(n(e,t),l(e,t)):t.isMeshToonMaterial?(n(e,t),h(e,t)):t.isMeshPhongMaterial?(n(e,t),c(e,t)):t.isMeshStandardMaterial?(n(e,t,r),t.isMeshPhysicalMaterial?d(e,t,r):u(e,t,r)):t.isMeshMatcapMaterial?(n(e,t),p(e,t)):t.isMeshDepthMaterial?(n(e,t),f(e,t)):t.isMeshDistanceMaterial?(n(e,t),v(e,t)):t.isMeshNormalMaterial?(n(e,t),g(e,t)):t.isLineBasicMaterial?(i(e,t),t.isLineDashedMaterial&&a(e,t)):t.isPointsMaterial?o(e,t,m,y):t.isSpriteMaterial?s(e,t):t.isShadowMaterial?(e.color.value.copy(t.color),e.opacity.value=t.opacity):t.isShaderMaterial&&(t.uniformsNeedUpdate=!1)}function n(t,r,n){t.opacity.value=r.opacity,r.color&&t.diffuse.value.copy(r.color),r.emissive&&t.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(t.map.value=r.map),r.alphaMap&&(t.alphaMap.value=r.alphaMap),r.specularMap&&(t.specularMap.value=r.specularMap);var i,a,o=r.envMap||n;o&&(t.envMap.value=o,t.flipEnvMap.value=o.isCubeTexture?-1:1,t.reflectivity.value=r.reflectivity,t.refractionRatio.value=r.refractionRatio,t.maxMipLevel.value=e.get(o).__maxMipLevel),r.lightMap&&(t.lightMap.value=r.lightMap,t.lightMapIntensity.value=r.lightMapIntensity),r.aoMap&&(t.aoMap.value=r.aoMap,t.aoMapIntensity.value=r.aoMapIntensity),r.map?i=r.map:r.specularMap?i=r.specularMap:r.displacementMap?i=r.displacementMap:r.normalMap?i=r.normalMap:r.bumpMap?i=r.bumpMap:r.roughnessMap?i=r.roughnessMap:r.metalnessMap?i=r.metalnessMap:r.alphaMap?i=r.alphaMap:r.emissiveMap&&(i=r.emissiveMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),r.aoMap?a=r.aoMap:r.lightMap&&(a=r.lightMap),void 0!==a&&(a.isWebGLRenderTarget&&(a=a.texture),!0===a.matrixAutoUpdate&&a.updateMatrix(),t.uv2Transform.value.copy(a.matrix))}function i(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}function a(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function o(e,t,r,n){var i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*n,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}function s(e,t){var r;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),t.map?r=t.map:t.alphaMap&&(r=t.alphaMap),void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix))}function l(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}function c(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 h(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),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 u(e,t,r){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||r)&&(e.envMapIntensity.value=t.envMapIntensity)}function d(e,t,r){u(e,t,r),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen),t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),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}function p(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)}function f(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function v(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}function g(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)}return{refreshFogUniforms:t,refreshMaterialUniforms:r}}function yh(e){e=e||{};var t=void 0!==e.canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),r=void 0!==e.context?e.context:null,n=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,a=void 0===e.stencil||e.stencil,o=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",h=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat,u=null,d=null;this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=Jt,this.physicallyCorrectLights=!1,this.toneMapping=K,this.toneMappingExposure=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p=this,f=!1,m=null,v=0,g=0,y=null,x=null,b=-1,w=null,_=null,M=new Hr,S=new Hr,A=null,E=t.width,T=t.height,C=1,L=null,R=null,P=new Hr(0,0,E,T),O=new Hr(0,0,E,T),I=!1,D=new Pa,N=new cl,B=!1,F=!1,U=new nn,j=new Zr,z={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function k(){return null===y?C:1}var G,H,V,W,Y,q,X,Z,J,Q,$,ee,te,re,ne,ie,ae,oe,se,le=r;function ce(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=t.getContext(i,r);if(null!==a)return a}return null}try{var he={alpha:n,depth:i,stencil:a,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:h};if(t.addEventListener("webglcontextlost",me,!1),t.addEventListener("webglcontextrestored",ve,!1),null===le){var ue=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&ue.shift(),le=ce(ue,he),null===le)throw ce(ue)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===le.getShaderPrecisionFormat&&(le.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(De){throw console.error("THREE.WebGLRenderer: "+De.message),De}function de(){G=new hl(le),H=new ll(le,G,e),!1===H.isWebGL2&&(G.get("WEBGL_depth_texture"),G.get("OES_texture_float"),G.get("OES_texture_half_float"),G.get("OES_texture_half_float_linear"),G.get("OES_standard_derivatives"),G.get("OES_element_index_uint"),G.get("OES_vertex_array_object"),G.get("ANGLE_instanced_arrays")),G.get("OES_texture_float_linear"),oe=new dh(le,G,H),V=new hh(le,G,H),V.scissor(S.copy(O).multiplyScalar(C).floor()),V.viewport(M.copy(P).multiplyScalar(C).floor()),W=new pl(le),Y=new qc,q=new uh(le,G,V,Y,H,oe,W),X=new Da(le,H),se=new ol(le,G,X,H),Z=new ul(le,X,W,se),J=new gl(le,Z,X,W),ne=new vl(le),Q=new Yc(p,G,H,se),$=new gh(Y),ee=new Qc,te=new ih,re=new al(p,V,J,s),ie=new sl(le,G,W,H),ae=new dl(le,G,W,H),W.programs=Q.programs,p.capabilities=H,p.extensions=G,p.properties=Y,p.renderLists=ee,p.state=V,p.info=W}de();var pe=new vh(p,le);this.xr=pe;var fe=new ch(p,J,H.maxTextureSize);function me(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),f=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),f=!1,de()}function ge(e){var t=e.target;t.removeEventListener("dispose",ge),ye(t)}function ye(e){xe(e),Y.remove(e)}function xe(e){var t=Y.get(e).program;e.program=void 0,void 0!==t&&Q.releaseProgram(t)}function be(e,t){e.render((function(e){p.renderBufferImmediate(e,t)}))}this.shadowMap=fe,this.getContext=function(){return le},this.getContextAttributes=function(){return le.getContextAttributes()},this.forceContextLoss=function(){var e=G.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=G.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return C},this.setPixelRatio=function(e){void 0!==e&&(C=e,this.setSize(E,T,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new Ur),e.set(E,T)},this.setSize=function(e,r,n){pe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(E=e,T=r,t.width=Math.floor(e*C),t.height=Math.floor(r*C),!1!==n&&(t.style.width=e+"px",t.style.height=r+"px"),this.setViewport(0,0,e,r))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new Ur),e.set(E*C,T*C).floor()},this.setDrawingBufferSize=function(e,r,n){E=e,T=r,C=n,t.width=Math.floor(e*n),t.height=Math.floor(r*n),this.setViewport(0,0,e,r)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new Hr),e.copy(M)},this.getViewport=function(e){return e.copy(P)},this.setViewport=function(e,t,r,n){e.isVector4?P.set(e.x,e.y,e.z,e.w):P.set(e,t,r,n),V.viewport(M.copy(P).multiplyScalar(C).floor())},this.getScissor=function(e){return e.copy(O)},this.setScissor=function(e,t,r,n){e.isVector4?O.set(e.x,e.y,e.z,e.w):O.set(e,t,r,n),V.scissor(S.copy(O).multiplyScalar(C).floor())},this.getScissorTest=function(){return I},this.setScissorTest=function(e){V.setScissorTest(I=e)},this.setOpaqueSort=function(e){L=e},this.setTransparentSort=function(e){R=e},this.getClearColor=function(){return re.getClearColor()},this.setClearColor=function(){re.setClearColor.apply(re,arguments)},this.getClearAlpha=function(){return re.getClearAlpha()},this.setClearAlpha=function(){re.setClearAlpha.apply(re,arguments)},this.clear=function(e,t,r){var n=0;(void 0===e||e)&&(n|=16384),(void 0===t||t)&&(n|=256),(void 0===r||r)&&(n|=1024),le.clear(n)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",me,!1),t.removeEventListener("webglcontextrestored",ve,!1),ee.dispose(),te.dispose(),Y.dispose(),J.dispose(),se.dispose(),pe.dispose(),Me.stop()},this.renderBufferImmediate=function(e,t){se.initAttributes();var r=Y.get(e);e.hasPositions&&!r.position&&(r.position=le.createBuffer()),e.hasNormals&&!r.normal&&(r.normal=le.createBuffer()),e.hasUvs&&!r.uv&&(r.uv=le.createBuffer()),e.hasColors&&!r.color&&(r.color=le.createBuffer());var n=t.getAttributes();e.hasPositions&&(le.bindBuffer(34962,r.position),le.bufferData(34962,e.positionArray,35048),se.enableAttribute(n.position),le.vertexAttribPointer(n.position,3,5126,!1,0,0)),e.hasNormals&&(le.bindBuffer(34962,r.normal),le.bufferData(34962,e.normalArray,35048),se.enableAttribute(n.normal),le.vertexAttribPointer(n.normal,3,5126,!1,0,0)),e.hasUvs&&(le.bindBuffer(34962,r.uv),le.bufferData(34962,e.uvArray,35048),se.enableAttribute(n.uv),le.vertexAttribPointer(n.uv,2,5126,!1,0,0)),e.hasColors&&(le.bindBuffer(34962,r.color),le.bufferData(34962,e.colorArray,35048),se.enableAttribute(n.color),le.vertexAttribPointer(n.color,3,5126,!1,0,0)),se.disableUnusedAttributes(),le.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,r,n,i,a){null===t&&(t=z);var o=i.isMesh&&i.matrixWorld.determinant()<0,s=Le(e,t,n,i);V.setMaterial(n,o);var l=r.index,c=r.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;var h,u=1;!0===n.wireframe&&(l=Z.getWireframeAttribute(r),u=2),(n.morphTargets||n.morphNormals)&&ne.update(i,r,n,s),se.setup(i,n,s,r,l);var d=ie;null!==l&&(h=X.get(l),d=ae,d.setIndex(h));var p=null!==l?l.count:c.count,f=r.drawRange.start*u,m=r.drawRange.count*u,v=null!==a?a.start*u:0,g=null!==a?a.count*u:1/0,y=Math.max(f,v),x=Math.min(p,f+m,v+g)-1,b=Math.max(0,x-y+1);if(0!==b){if(i.isMesh)!0===n.wireframe?(V.setLineWidth(n.wireframeLinewidth*k()),d.setMode(1)):d.setMode(4);else if(i.isLine){var w=n.linewidth;void 0===w&&(w=1),V.setLineWidth(w*k()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(r,y,b,i.count);else if(r.isInstancedBufferGeometry){var _=Math.min(r.instanceCount,r._maxInstanceCount);d.renderInstances(r,y,b,_)}else d.render(y,b)}},this.compile=function(e,t){d=te.get(e,t),d.init(),e.traverse((function(e){e.isLight&&(d.pushLight(e),e.castShadow&&d.pushShadow(e))})),d.setupLights(t);var r=new WeakMap;e.traverse((function(t){var n=t.material;if(n)if(Array.isArray(n))for(var i=0;i<n.length;i++){var a=n[i];!1===r.has(a)&&(Ce(a,e,t),r.set(a))}else!1===r.has(n)&&(Ce(n,e,t),r.set(n))}))};var we=null;function _e(e){pe.isPresenting||we&&we(e)}var Me=new Ia;function Ae(e,t,r,n){if(!1!==e.visible){var i=e.layers.test(t.layers);if(i)if(e.isGroup)r=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)d.pushLight(e),e.castShadow&&d.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||D.intersectsSprite(e)){n&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(U);var a=J.update(e),o=e.material;o.visible&&u.push(e,a,o,r,j.z,null)}}else if(e.isImmediateRenderObject)n&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(U),u.push(e,null,e.material,r,j.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==W.render.frame&&(e.skeleton.update(),e.skeleton.frame=W.render.frame),!e.frustumCulled||D.intersectsObject(e))){n&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(U);var s=J.update(e),l=e.material;if(Array.isArray(l))for(var c=s.groups,h=0,p=c.length;h<p;h++){var f=c[h],m=l[f.materialIndex];m&&m.visible&&u.push(e,s,m,r,j.z,f)}else l.visible&&u.push(e,s,l,r,j.z,null)}for(var v=e.children,g=0,y=v.length;g<y;g++)Ae(v[g],t,r,n)}}function Ee(e,t,r){for(var n=!0===t.isScene?t.overrideMaterial:null,i=0,a=e.length;i<a;i++){var o=e[i],s=o.object,l=o.geometry,c=null===n?o.material:n,h=o.group;if(r.isArrayCamera){_=r;for(var u=r.cameras,p=0,f=u.length;p<f;p++){var m=u[p];s.layers.test(m.layers)&&(V.viewport(M.copy(m.viewport)),d.setupLights(m),Te(s,t,m,l,c,h))}}else _=null,Te(s,t,r,l,c,h)}}function Te(e,t,r,n,i,a){if(e.onBeforeRender(p,t,r,n,i,a),d=te.get(t,_||r),e.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var o=Le(r,t,i,e);V.setMaterial(i),se.reset(),be(e,o)}else p.renderBufferDirect(r,t,n,i,e,a);e.onAfterRender(p,t,r,n,i,a),d=te.get(t,_||r)}function Ce(e,t,r){!0!==t.isScene&&(t=z);var n=Y.get(e),i=d.state.lights,a=d.state.shadowsArray,o=i.state.version,s=Q.getParameters(e,i.state,a,t,N.numPlanes,N.numIntersection,r),l=Q.getProgramCacheKey(s),c=n.program,h=!0;if(void 0===c)e.addEventListener("dispose",ge);else if(c.cacheKey!==l)xe(e);else if(n.lightsStateVersion!==o)n.lightsStateVersion=o,h=!1;else{if(void 0!==s.shaderID)return;h=!1}h&&(c=Q.acquireProgram(s,l),n.program=c,n.uniforms=s.uniforms,n.outputEncoding=s.outputEncoding,e.program=c);var u=c.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var f=0;f<p.maxMorphTargets;f++)u["morphTarget"+f]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(var m=0;m<p.maxMorphNormals;m++)u["morphNormal"+m]>=0&&e.numSupportedMorphNormals++}var v=n.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(n.numClippingPlanes=N.numPlanes,n.numIntersection=N.numIntersection,v.clippingPlanes=N.uniform),n.environment=e.isMeshStandardMaterial?t.environment:null,n.fog=t.fog,n.needsLights=Ie(e),n.lightsStateVersion=o,n.needsLights&&(v.ambientLightColor.value=i.state.ambient,v.lightProbe.value=i.state.probe,v.directionalLights.value=i.state.directional,v.directionalLightShadows.value=i.state.directionalShadow,v.spotLights.value=i.state.spot,v.spotLightShadows.value=i.state.spotShadow,v.rectAreaLights.value=i.state.rectArea,v.pointLights.value=i.state.point,v.pointLightShadows.value=i.state.pointShadow,v.hemisphereLights.value=i.state.hemi,v.directionalShadowMap.value=i.state.directionalShadowMap,v.directionalShadowMatrix.value=i.state.directionalShadowMatrix,v.spotShadowMap.value=i.state.spotShadowMap,v.spotShadowMatrix.value=i.state.spotShadowMatrix,v.pointShadowMap.value=i.state.pointShadowMap,v.pointShadowMatrix.value=i.state.pointShadowMatrix);var g=n.program.getUniforms(),y=gc.seqWithValue(g.seq,v);n.uniformsList=y}function Le(e,t,r,n){!0!==t.isScene&&(t=z),q.resetTextureUnits();var i=t.fog,a=r.isMeshStandardMaterial?t.environment:null,o=null===y?p.outputEncoding:y.texture.encoding,s=Y.get(r),l=d.state.lights;if(!0===B&&(!0===F||e!==w)){var c=e===w&&r.id===b;N.setState(r.clippingPlanes,r.clipIntersection,r.clipShadows,e,s,c)}r.version===s.__version?void 0===s.program||r.fog&&s.fog!==i||s.environment!==a||s.needsLights&&s.lightsStateVersion!==l.state.version?Ce(r,t,n):void 0===s.numClippingPlanes||s.numClippingPlanes===N.numPlanes&&s.numIntersection===N.numIntersection?s.outputEncoding!==o&&Ce(r,t,n):Ce(r,t,n):(Ce(r,t,n),s.__version=r.version);var h=!1,u=!1,f=!1,m=s.program,v=m.getUniforms(),g=s.uniforms;if(V.useProgram(m.program)&&(h=!0,u=!0,f=!0),r.id!==b&&(b=r.id,u=!0),h||w!==e){if(v.setValue(le,"projectionMatrix",e.projectionMatrix),H.logarithmicDepthBuffer&&v.setValue(le,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),w!==e&&(w=e,u=!0,f=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){var x=v.map.cameraPosition;void 0!==x&&x.setValue(le,j.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&v.setValue(le,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||r.skinning)&&v.setValue(le,"viewMatrix",e.matrixWorldInverse)}if(r.skinning){v.setOptional(le,n,"bindMatrix"),v.setOptional(le,n,"bindMatrixInverse");var _=n.skeleton;if(_){var M=_.bones;if(H.floatVertexTextures){if(void 0===_.boneTexture){var S=Math.sqrt(4*M.length);S=Fr.ceilPowerOfTwo(S),S=Math.max(S,4);var A=new Float32Array(S*S*4);A.set(_.boneMatrices);var E=new Ca(A,S,S,Ue,Re);_.boneMatrices=A,_.boneTexture=E,_.boneTextureSize=S}v.setValue(le,"boneTexture",_.boneTexture,q),v.setValue(le,"boneTextureSize",_.boneTextureSize)}else v.setOptional(le,_,"boneMatrices")}}return(u||s.receiveShadow!==n.receiveShadow)&&(s.receiveShadow=n.receiveShadow,v.setValue(le,"receiveShadow",n.receiveShadow)),u&&(v.setValue(le,"toneMappingExposure",p.toneMappingExposure),s.needsLights&&Oe(g,f),i&&r.fog&&$.refreshFogUniforms(g,i),$.refreshMaterialUniforms(g,r,a,C,T),void 0!==g.ltc_1&&(g.ltc_1.value=Oa.LTC_1),void 0!==g.ltc_2&&(g.ltc_2.value=Oa.LTC_2),gc.upload(le,s.uniformsList,g,q)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(gc.upload(le,s.uniformsList,g,q),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&v.setValue(le,"center",n.center),v.setValue(le,"modelViewMatrix",n.modelViewMatrix),v.setValue(le,"normalMatrix",n.normalMatrix),v.setValue(le,"modelMatrix",n.matrixWorld),m}function Oe(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}function Ie(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}Me.setAnimationLoop(_e),"undefined"!==typeof window&&Me.setContext(window),this.setAnimationLoop=function(e){we=e,pe.setAnimationLoop(e),null===e?Me.stop():Me.start()},this.render=function(e,t){var r,n;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),r=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),n=arguments[3]),void 0===t||!0===t.isCamera){if(!0!==f){se.resetDefaultState(),b=-1,w=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===pe.enabled&&!0===pe.isPresenting&&(t=pe.getCamera(t)),!0===e.isScene&&e.onBeforeRender(p,e,t,r||y),d=te.get(e,t),d.init(),U.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),D.setFromProjectionMatrix(U),F=this.localClippingEnabled,B=N.init(this.clippingPlanes,F,t),u=ee.get(e,t),u.init(),Ae(e,t,0,p.sortObjects),u.finish(),!0===p.sortObjects&&u.sort(L,R),!0===B&&N.beginShadows();var i=d.state.shadowsArray;fe.render(i,e,t),d.setupLights(t),!0===B&&N.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==r&&this.setRenderTarget(r),re.render(u,e,t,n);var a=u.opaque,o=u.transparent;a.length>0&&Ee(a,e,t),o.length>0&&Ee(o,e,t),!0===e.isScene&&e.onAfterRender(p,e,t),null!==y&&(q.updateRenderTargetMipmap(y),q.updateMultisampleRenderTarget(y)),V.buffers.depth.setTest(!0),V.buffers.depth.setMask(!0),V.buffers.color.setMask(!0),V.setPolygonOffset(!1),u=null,d=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(e){m!==e&&null===y&&le.bindFramebuffer(36160,e),m=e},this.getActiveCubeFace=function(){return v},this.getActiveMipmapLevel=function(){return g},this.getRenderTarget=function(){return y},this.setRenderTarget=function(e,t,r){y=e,v=t,g=r,e&&void 0===Y.get(e).__webglFramebuffer&&q.setupRenderTarget(e);var n=m,i=!1;if(e){var a=Y.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(n=a[t||0],i=!0):n=e.isWebGLMultisampleRenderTarget?Y.get(e).__webglMultisampledFramebuffer:a,M.copy(e.viewport),S.copy(e.scissor),A=e.scissorTest}else M.copy(P).multiplyScalar(C).floor(),S.copy(O).multiplyScalar(C).floor(),A=I;if(x!==n&&(le.bindFramebuffer(36160,n),x=n),V.viewport(M),V.scissor(S),V.setScissorTest(A),i){var o=Y.get(e.texture);le.framebufferTexture2D(36160,36064,34069+(t||0),o.__webglTexture,r||0)}},this.readRenderTargetPixels=function(e,t,r,n,i,a,o){if(e&&e.isWebGLRenderTarget){var s=Y.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){var l=!1;s!==x&&(le.bindFramebuffer(36160,s),l=!0);try{var c=e.texture,h=c.format,u=c.type;if(h!==Ue&&oe.convert(h)!==le.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(u!==Se&&oe.convert(u)!==le.getParameter(35738)&&(u!==Re||!(H.isWebGL2||G.get("OES_texture_float")||G.get("WEBGL_color_buffer_float")))&&(u!==Pe||!(H.isWebGL2?G.get("EXT_color_buffer_float"):G.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===le.checkFramebufferStatus(36160)?t>=0&&t<=e.width-n&&r>=0&&r<=e.height-i&&le.readPixels(t,r,n,i,oe.convert(h),oe.convert(u),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{l&&le.bindFramebuffer(36160,x)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,r){void 0===r&&(r=0);var n=Math.pow(2,-r),i=Math.floor(t.image.width*n),a=Math.floor(t.image.height*n),o=oe.convert(t.format);q.setTexture2D(t,0),le.copyTexImage2D(3553,r,o,e.x,e.y,i,a,0),V.unbindTexture()},this.copyTextureToTexture=function(e,t,r,n){void 0===n&&(n=0);var i=t.image.width,a=t.image.height,o=oe.convert(r.format),s=oe.convert(r.type);q.setTexture2D(r,0),le.pixelStorei(37440,r.flipY),le.pixelStorei(37441,r.premultiplyAlpha),le.pixelStorei(3317,r.unpackAlignment),t.isDataTexture?le.texSubImage2D(3553,n,e.x,e.y,i,a,o,s,t.image.data):t.isCompressedTexture?le.compressedTexSubImage2D(3553,n,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):le.texSubImage2D(3553,n,e.x,e.y,o,s,t.image),0===n&&r.generateMipmaps&&le.generateMipmap(3553),V.unbindTexture()},this.initTexture=function(e){q.setTexture2D(e,0),V.unbindTexture()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function xh(e){yh.call(this,e)}function bh(e,t){this.name="",this.color=new pi(e),this.density=void 0!==t?t:25e-5}function wh(e,t,r){this.name="",this.color=new pi(e),this.near=void 0!==t?t:1,this.far=void 0!==r?r:1e3}function _h(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Sr,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Fr.generateUUID()}ph.prototype=Object.assign(Object.create(Ma.prototype),{constructor:ph,isArrayCamera:!0}),fh.prototype=Object.assign(Object.create(_n.prototype),{constructor:fh,isGroup:!0}),Object.assign(mh.prototype,{constructor:mh,getTargetRaySpace:function(){return null===this._targetRay&&(this._targetRay=new fh,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1),this._targetRay},getGripSpace:function(){return null===this._grip&&(this._grip=new fh,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1),this._grip},dispatchEvent:function(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),this},disconnect:function(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),this},update:function(e,t,r){var n=null,i=null,a=this._targetRay,o=this._grip;return e&&(null!==a&&(n=t.getPose(e.targetRaySpace,r),null!==n&&(a.matrix.fromArray(n.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale))),null!==o&&e.gripSpace&&(i=t.getPose(e.gripSpace,r),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale)))),null!==a&&(a.visible=null!==n),null!==o&&(o.visible=null!==i),this}}),Object.assign(vh.prototype,Ir.prototype),xh.prototype=Object.assign(Object.create(yh.prototype),{constructor:xh,isWebGL1Renderer:!0}),Object.assign(bh.prototype,{isFogExp2:!0,clone:function(){return new bh(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(wh.prototype,{isFog:!0,clone:function(){return new wh(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),Object.defineProperty(_h.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(_h.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,r){e*=this.stride,r*=t.stride;for(var n=0,i=this.stride;n<i;n++)this.array[e+n]=t.array[r+n];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Fr.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);var t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),r=new _h(t,this.stride);return r.setUsage(this.usage),r},onUpload:function(e){return this.onUploadCallback=e,this},toJSON:function(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Fr.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});var Mh,Sh=new Zr;function Ah(e,t,r,n){this.name="",this.data=e,this.itemSize=t,this.offset=r,this.normalized=!0===n}function Eh(e){xi.call(this),this.type="SpriteMaterial",this.color=new pi(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}Object.defineProperties(Ah.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Ah.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(e){for(var t=0,r=this.data.count;t<r;t++)Sh.x=this.getX(t),Sh.y=this.getY(t),Sh.z=this.getZ(t),Sh.applyMatrix4(e),this.setXYZ(t,Sh.x,Sh.y,Sh.z);return this},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=r,this},setXYZ:function(e,t,r,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=n,this},setXYZW:function(e,t,r,n,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=n,this.data.array[e+3]=i,this},clone:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],r=0;r<this.count;r++)for(var n=r*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[n+i]);return new Mi(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Ah(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)},toJSON:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],r=0;r<this.count;r++)for(var n=r*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[n+i]);return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}),Eh.prototype=Object.create(xi.prototype),Eh.prototype.constructor=Eh,Eh.prototype.isSpriteMaterial=!0,Eh.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this};var Th=new Zr,Ch=new Zr,Lh=new Zr,Rh=new Ur,Ph=new Ur,Oh=new nn,Ih=new Zr,Dh=new Zr,Nh=new Zr,Bh=new Ur,Fh=new Ur,Uh=new Ur;function jh(e){if(_n.call(this),this.type="Sprite",void 0===Mh){Mh=new Gi;var t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),r=new _h(t,5);Mh.setIndex([0,1,2,0,2,3]),Mh.setAttribute("position",new Ah(r,3,0,!1)),Mh.setAttribute("uv",new Ah(r,2,3,!1))}this.geometry=Mh,this.material=void 0!==e?e:new Eh,this.center=new Ur(.5,.5)}function zh(e,t,r,n,i,a){Rh.subVectors(e,r).addScalar(.5).multiply(n),void 0!==i?(Ph.x=a*Rh.x-i*Rh.y,Ph.y=i*Rh.x+a*Rh.y):Ph.copy(Rh),e.copy(t),e.x+=Ph.x,e.y+=Ph.y,e.applyMatrix4(Oh)}jh.prototype=Object.assign(Object.create(_n.prototype),{constructor:jh,isSprite:!0,raycast:function(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ch.setFromMatrixScale(this.matrixWorld),Oh.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Lh.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Ch.multiplyScalar(-Lh.z);var r,n,i=this.material.rotation;0!==i&&(n=Math.cos(i),r=Math.sin(i));var a=this.center;zh(Ih.set(-.5,-.5,0),Lh,a,Ch,r,n),zh(Dh.set(.5,-.5,0),Lh,a,Ch,r,n),zh(Nh.set(.5,.5,0),Lh,a,Ch,r,n),Bh.set(0,0),Fh.set(1,0),Uh.set(1,1);var o=e.ray.intersectTriangle(Ih,Dh,Nh,!1,Th);if(null!==o||(zh(Dh.set(-.5,.5,0),Lh,a,Ch,r,n),Fh.set(0,1),o=e.ray.intersectTriangle(Ih,Nh,Dh,!1,Th),null!==o)){var s=e.ray.origin.distanceTo(Th);s<e.near||s>e.far||t.push({distance:s,point:Th.clone(),uv:ci.getUV(Th,Ih,Dh,Nh,Bh,Fh,Uh,new Ur),face:null,object:this})}},copy:function(e){return _n.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}});var kh=new Zr,Gh=new Zr;function Hh(){_n.call(this),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function Vh(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),oa.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new nn,this.bindMatrixInverse=new nn}Hh.prototype=Object.assign(Object.create(_n.prototype),{constructor:Hh,isLOD:!0,copy:function(e){_n.prototype.copy.call(this,e,!1);for(var t=e.levels,r=0,n=t.length;r<n;r++){var i=t[r];this.addLevel(i.object.clone(),i.distance)}return this.autoUpdate=e.autoUpdate,this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);var r,n=this.levels;for(r=0;r<n.length;r++)if(t<n[r].distance)break;return n.splice(r,0,{distance:t,object:e}),this.add(e),this},getCurrentLevel:function(){return this._currentLevel},getObjectForDistance:function(e){var t=this.levels;if(t.length>0){var r,n;for(r=1,n=t.length;r<n;r++)if(e<t[r].distance)break;return t[r-1].object}return null},raycast:function(e,t){var r=this.levels;if(r.length>0){kh.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(kh);this.getObjectForDistance(n).raycast(e,t)}},update:function(e){var t=this.levels;if(t.length>1){kh.setFromMatrixPosition(e.matrixWorld),Gh.setFromMatrixPosition(this.matrixWorld);var r,n,i=kh.distanceTo(Gh)/e.zoom;for(t[0].object.visible=!0,r=1,n=t.length;r<n;r++){if(!(i>=t[r].distance))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;r<n;r++)t[r].object.visible=!1}},toJSON:function(e){var t=_n.prototype.toJSON.call(this,e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];for(var r=this.levels,n=0,i=r.length;n<i;n++){var a=r[n];t.object.levels.push({object:a.object.uuid,distance:a.distance})}return t}}),Vh.prototype=Object.assign(Object.create(oa.prototype),{constructor:Vh,isSkinnedMesh:!0,copy:function(e){return oa.prototype.copy.call(this,e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var e=new Hr,t=this.geometry.attributes.skinWeight,r=0,n=t.count;r<n;r++){e.x=t.getX(r),e.y=t.getY(r),e.z=t.getZ(r),e.w=t.getW(r);var i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(r,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(e){oa.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},boneTransform:function(){var e=new Zr,t=new Hr,r=new Hr,n=new Zr,i=new nn;return function(a,o){var s=this.skeleton,l=this.geometry;t.fromBufferAttribute(l.attributes.skinIndex,a),r.fromBufferAttribute(l.attributes.skinWeight,a),e.fromBufferAttribute(l.attributes.position,a).applyMatrix4(this.bindMatrix),o.set(0,0,0);for(var c=0;c<4;c++){var h=r.getComponent(c);if(0!==h){var u=t.getComponent(c);i.multiplyMatrices(s.bones[u].matrixWorld,s.boneInverses[u]),o.addScaledVector(n.copy(e).applyMatrix4(i),h)}}return o.applyMatrix4(this.bindMatrixInverse)}}()});var Wh=new nn,Yh=new nn;function qh(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),this.frame=-1,void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var r=0,n=this.bones.length;r<n;r++)this.boneInverses.push(new nn)}}function Xh(){_n.call(this),this.type="Bone"}Object.assign(qh.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var r=new nn;this.bones[e]&&r.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(r)}},pose:function(){for(var e=0,t=this.bones.length;e<t;e++){var r=this.bones[e];r&&r.matrixWorld.getInverse(this.boneInverses[e])}for(var n=0,i=this.bones.length;n<i;n++){var a=this.bones[n];a&&(a.parent&&a.parent.isBone?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position,a.quaternion,a.scale))}},update:function(){for(var e=this.bones,t=this.boneInverses,r=this.boneMatrices,n=this.boneTexture,i=0,a=e.length;i<a;i++){var o=e[i]?e[i].matrixWorld:Yh;Wh.multiplyMatrices(o,t[i]),Wh.toArray(r,16*i)}void 0!==n&&(n.needsUpdate=!0)},clone:function(){return new qh(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,r=this.bones.length;t<r;t++){var n=this.bones[t];if(n.name===e)return n}},dispose:function(){this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=void 0)}}),Xh.prototype=Object.assign(Object.create(_n.prototype),{constructor:Xh,isBone:!0});var Zh=new nn,Jh=new nn,Qh=[],Kh=new oa;function $h(e,t,r){oa.call(this,e,t),this.instanceMatrix=new Mi(new Float32Array(16*r),16),this.count=r,this.frustumCulled=!1}function eu(e){xi.call(this),this.type="LineBasicMaterial",this.color=new pi(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}$h.prototype=Object.assign(Object.create(oa.prototype),{constructor:$h,isInstancedMesh:!0,copy:function(e){return oa.prototype.copy.call(this,e),this.instanceMatrix.copy(e.instanceMatrix),this.count=e.count,this},getMatrixAt:function(e,t){t.fromArray(this.instanceMatrix.array,16*e)},raycast:function(e,t){var r=this.matrixWorld,n=this.count;if(Kh.geometry=this.geometry,Kh.material=this.material,void 0!==Kh.material)for(var i=0;i<n;i++){this.getMatrixAt(i,Zh),Jh.multiplyMatrices(r,Zh),Kh.matrixWorld=Jh,Kh.raycast(e,Qh);for(var a=0,o=Qh.length;a<o;a++){var s=Qh[a];s.instanceId=i,s.object=this,t.push(s)}Qh.length=0}},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){}}),eu.prototype=Object.create(xi.prototype),eu.prototype.constructor=eu,eu.prototype.isLineBasicMaterial=!0,eu.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this};var tu=new Zr,ru=new Zr,nu=new nn,iu=new Xn,au=new zn;function ou(e,t,r){1===r&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),_n.call(this),this.type="Line",this.geometry=void 0!==e?e:new Gi,this.material=void 0!==t?t:new eu,this.updateMorphTargets()}ou.prototype=Object.assign(Object.create(_n.prototype),{constructor:ou,isLine:!0,copy:function(e){return _n.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,r=[0],n=1,i=t.count;n<i;n++)tu.fromBufferAttribute(t,n-1),ru.fromBufferAttribute(t,n),r[n]=r[n-1],r[n]+=tu.distanceTo(ru);e.setAttribute("lineDistance",new Pi(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var a=e.vertices,o=e.lineDistances;o[0]=0;for(var s=1,l=a.length;s<l;s++)o[s]=o[s-1],o[s]+=a[s-1].distanceTo(a[s])}return this},raycast:function(e,t){var r=this.geometry,n=this.matrixWorld,i=e.params.Line.threshold;if(null===r.boundingSphere&&r.computeBoundingSphere(),au.copy(r.boundingSphere),au.applyMatrix4(n),au.radius+=i,!1!==e.ray.intersectsSphere(au)){nu.getInverse(n),iu.copy(e.ray).applyMatrix4(nu);var a=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a,s=new Zr,l=new Zr,c=new Zr,h=new Zr,u=this&&this.isLineSegments?2:1;if(r.isBufferGeometry){var d=r.index,p=r.attributes,f=p.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length-1;v<g;v+=u){var y=m[v],x=m[v+1];s.fromArray(f,3*y),l.fromArray(f,3*x);var b=iu.distanceSqToSegment(s,l,h,c);if(!(b>o)){h.applyMatrix4(this.matrixWorld);var w=e.ray.origin.distanceTo(h);w<e.near||w>e.far||t.push({distance:w,point:c.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else for(var _=0,M=f.length/3-1;_<M;_+=u){s.fromArray(f,3*_),l.fromArray(f,3*_+3);var S=iu.distanceSqToSegment(s,l,h,c);if(!(S>o)){h.applyMatrix4(this.matrixWorld);var A=e.ray.origin.distanceTo(h);A<e.near||A>e.far||t.push({distance:A,point:c.clone().applyMatrix4(this.matrixWorld),index:_,face:null,faceIndex:null,object:this})}}}else if(r.isGeometry)for(var E=r.vertices,T=E.length,C=0;C<T-1;C+=u){var L=iu.distanceSqToSegment(E[C],E[C+1],h,c);if(!(L>o)){h.applyMatrix4(this.matrixWorld);var R=e.ray.origin.distanceTo(h);R<e.near||R>e.far||t.push({distance:R,point:c.clone().applyMatrix4(this.matrixWorld),index:C,face:null,faceIndex:null,object:this})}}}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,r=Object.keys(t);if(r.length>0){var n=t[r[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=n.length;i<a;i++){var o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});var su=new Zr,lu=new Zr;function cu(e,t){ou.call(this,e,t),this.type="LineSegments"}function hu(e,t){ou.call(this,e,t),this.type="LineLoop"}function uu(e){xi.call(this),this.type="PointsMaterial",this.color=new pi(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}cu.prototype=Object.assign(Object.create(ou.prototype),{constructor:cu,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,r=[],n=0,i=t.count;n<i;n+=2)su.fromBufferAttribute(t,n),lu.fromBufferAttribute(t,n+1),r[n]=0===n?0:r[n-1],r[n+1]=r[n]+su.distanceTo(lu);e.setAttribute("lineDistance",new Pi(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry)for(var a=e.vertices,o=e.lineDistances,s=0,l=a.length;s<l;s+=2)su.copy(a[s]),lu.copy(a[s+1]),o[s]=0===s?0:o[s-1],o[s+1]=o[s]+su.distanceTo(lu);return this}}),hu.prototype=Object.assign(Object.create(ou.prototype),{constructor:hu,isLineLoop:!0}),uu.prototype=Object.create(xi.prototype),uu.prototype.constructor=uu,uu.prototype.isPointsMaterial=!0,uu.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this};var du=new nn,pu=new Xn,fu=new zn,mu=new Zr;function vu(e,t){_n.call(this),this.type="Points",this.geometry=void 0!==e?e:new Gi,this.material=void 0!==t?t:new uu,this.updateMorphTargets()}function gu(e,t,r,n,i,a,o){var s=pu.distanceSqToPoint(e);if(s<r){var l=new Zr;pu.closestPointToPoint(e,l),l.applyMatrix4(n);var c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:o})}}function yu(e,t,r,n,i,a,o,s,l){Gr.call(this,e,t,r,n,i,a,o,s,l),this.format=void 0!==o?o:Fe,this.minFilter=void 0!==a?a:xe,this.magFilter=void 0!==i?i:xe,this.generateMipmaps=!1}function xu(e,t,r,n,i,a,o,s,l,c,h,u){Gr.call(this,null,a,o,s,l,c,n,i,h,u),this.image={width:t,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function bu(e,t,r,n,i,a,o,s,l){Gr.call(this,e,t,r,n,i,a,o,s,l),this.needsUpdate=!0}function wu(e,t,r,n,i,a,o,s,l,c){if(c=void 0!==c?c:Ge,c!==Ge&&c!==He)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===r&&c===Ge&&(r=Te),void 0===r&&c===He&&(r=Ne),Gr.call(this,null,n,i,a,o,s,c,r,l),this.image={width:e,height:t},this.magFilter=void 0!==o?o:fe,this.minFilter=void 0!==s?s:fe,this.flipY=!1,this.generateMipmaps=!1}function _u(e){Gi.call(this),this.type="WireframeGeometry";var t=[],r=[0,0],n={},i=["a","b","c"];if(e&&e.isGeometry){for(var a=e.faces,o=0,s=a.length;o<s;o++)for(var l=a[o],c=0;c<3;c++){var h=l[i[c]],u=l[i[(c+1)%3]];r[0]=Math.min(h,u),r[1]=Math.max(h,u);var d=r[0]+","+r[1];void 0===n[d]&&(n[d]={index1:r[0],index2:r[1]})}for(var p in n){var f=n[p],m=e.vertices[f.index1];t.push(m.x,m.y,m.z),m=e.vertices[f.index2],t.push(m.x,m.y,m.z)}}else if(e&&e.isBufferGeometry){var v=new Zr;if(null!==e.index){var g=e.attributes.position,y=e.index,x=e.groups;0===x.length&&(x=[{start:0,count:y.count,materialIndex:0}]);for(var b=0,w=x.length;b<w;++b)for(var _=x[b],M=_.start,S=_.count,A=M,E=M+S;A<E;A+=3)for(var T=0;T<3;T++){var C=y.getX(A+T),L=y.getX(A+(T+1)%3);r[0]=Math.min(C,L),r[1]=Math.max(C,L);var R=r[0]+","+r[1];void 0===n[R]&&(n[R]={index1:r[0],index2:r[1]})}for(var P in n){var O=n[P];v.fromBufferAttribute(g,O.index1),t.push(v.x,v.y,v.z),v.fromBufferAttribute(g,O.index2),t.push(v.x,v.y,v.z)}}else for(var I=e.attributes.position,D=0,N=I.count/3;D<N;D++)for(var B=0;B<3;B++){var F=3*D+B;v.fromBufferAttribute(I,F),t.push(v.x,v.y,v.z);var U=3*D+(B+1)%3;v.fromBufferAttribute(I,U),t.push(v.x,v.y,v.z)}}this.setAttribute("position",new Pi(t,3))}function Mu(e,t,r){pa.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:r},this.fromBufferGeometry(new Su(e,t,r)),this.mergeVertices()}function Su(e,t,r){Gi.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:r};var n=[],i=[],a=[],o=[],s=1e-5,l=new Zr,c=new Zr,h=new Zr,u=new Zr,d=new Zr;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var p=t+1,f=0;f<=r;f++)for(var m=f/r,v=0;v<=t;v++){var g=v/t;e(g,m,c),i.push(c.x,c.y,c.z),g-s>=0?(e(g-s,m,h),u.subVectors(c,h)):(e(g+s,m,h),u.subVectors(h,c)),m-s>=0?(e(g,m-s,h),d.subVectors(c,h)):(e(g,m+s,h),d.subVectors(h,c)),l.crossVectors(u,d).normalize(),a.push(l.x,l.y,l.z),o.push(g,m)}for(var y=0;y<r;y++)for(var x=0;x<t;x++){var b=y*p+x,w=y*p+x+1,_=(y+1)*p+x+1,M=(y+1)*p+x;n.push(b,w,M),n.push(w,_,M)}this.setIndex(n),this.setAttribute("position",new Pi(i,3)),this.setAttribute("normal",new Pi(a,3)),this.setAttribute("uv",new Pi(o,2))}function Au(e,t,r,n){pa.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:n},this.fromBufferGeometry(new Eu(e,t,r,n)),this.mergeVertices()}function Eu(e,t,r,n){Gi.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:n},r=r||1,n=n||0;var i=[],a=[];function o(e){for(var r=new Zr,n=new Zr,i=new Zr,a=0;a<t.length;a+=3)d(t[a+0],r),d(t[a+1],n),d(t[a+2],i),s(r,n,i,e)}function s(e,t,r,n){for(var i=Math.pow(2,n),a=[],o=0;o<=i;o++){a[o]=[];for(var s=e.clone().lerp(r,o/i),l=t.clone().lerp(r,o/i),c=i-o,h=0;h<=c;h++)a[o][h]=0===h&&o===i?s:s.clone().lerp(l,h/c)}for(var d=0;d<i;d++)for(var p=0;p<2*(i-d)-1;p++){var f=Math.floor(p/2);p%2===0?(u(a[d][f+1]),u(a[d+1][f]),u(a[d][f])):(u(a[d][f+1]),u(a[d+1][f+1]),u(a[d+1][f]))}}function l(e){for(var t=new Zr,r=0;r<i.length;r+=3)t.x=i[r+0],t.y=i[r+1],t.z=i[r+2],t.normalize().multiplyScalar(e),i[r+0]=t.x,i[r+1]=t.y,i[r+2]=t.z}function c(){for(var e=new Zr,t=0;t<i.length;t+=3){e.x=i[t+0],e.y=i[t+1],e.z=i[t+2];var r=m(e)/2/Math.PI+.5,n=v(e)/Math.PI+.5;a.push(r,1-n)}p(),h()}function h(){for(var e=0;e<a.length;e+=6){var t=a[e+0],r=a[e+2],n=a[e+4],i=Math.max(t,r,n),o=Math.min(t,r,n);i>.9&&o<.1&&(t<.2&&(a[e+0]+=1),r<.2&&(a[e+2]+=1),n<.2&&(a[e+4]+=1))}}function u(e){i.push(e.x,e.y,e.z)}function d(t,r){var n=3*t;r.x=e[n+0],r.y=e[n+1],r.z=e[n+2]}function p(){for(var e=new Zr,t=new Zr,r=new Zr,n=new Zr,o=new Ur,s=new Ur,l=new Ur,c=0,h=0;c<i.length;c+=9,h+=6){e.set(i[c+0],i[c+1],i[c+2]),t.set(i[c+3],i[c+4],i[c+5]),r.set(i[c+6],i[c+7],i[c+8]),o.set(a[h+0],a[h+1]),s.set(a[h+2],a[h+3]),l.set(a[h+4],a[h+5]),n.copy(e).add(t).add(r).divideScalar(3);var u=m(n);f(o,h+0,e,u),f(s,h+2,t,u),f(l,h+4,r,u)}}function f(e,t,r,n){n<0&&1===e.x&&(a[t]=e.x-1),0===r.x&&0===r.z&&(a[t]=n/2/Math.PI+.5)}function m(e){return Math.atan2(e.z,-e.x)}function v(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}o(n),l(r),c(),this.setAttribute("position",new Pi(i,3)),this.setAttribute("normal",new Pi(i.slice(),3)),this.setAttribute("uv",new Pi(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}function Tu(e,t){pa.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Cu(e,t)),this.mergeVertices()}function Cu(e,t){var r=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],n=[2,1,0,0,3,2,1,3,0,2,3,1];Eu.call(this,r,n,e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Lu(e,t){pa.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ru(e,t)),this.mergeVertices()}function Ru(e,t){var r=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],n=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];Eu.call(this,r,n,e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Pu(e,t){pa.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ou(e,t)),this.mergeVertices()}function Ou(e,t){var r=(1+Math.sqrt(5))/2,n=[-1,r,0,1,r,0,-1,-r,0,1,-r,0,0,-1,r,0,1,r,0,-1,-r,0,1,-r,r,0,-1,r,0,1,-r,0,-1,-r,0,1],i=[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];Eu.call(this,n,i,e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Iu(e,t){pa.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Du(e,t)),this.mergeVertices()}function Du(e,t){var r=(1+Math.sqrt(5))/2,n=1/r,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,-n,-r,0,-n,r,0,n,-r,0,n,r,-n,-r,0,-n,r,0,n,-r,0,n,r,0,-r,0,-n,r,0,-n,-r,0,n,r,0,n],a=[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];Eu.call(this,i,a,e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Nu(e,t,r,n,i,a){pa.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:r,radialSegments:n,closed:i},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new Bu(e,t,r,n,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function Bu(e,t,r,n,i){Gi.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:r,radialSegments:n,closed:i},t=t||64,r=r||1,n=n||8,i=i||!1;var a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;var o=new Zr,s=new Zr,l=new Ur,c=new Zr,h=[],u=[],d=[],p=[];function f(){for(var e=0;e<t;e++)m(e);m(!1===i?t:0),g(),v()}function m(i){c=e.getPointAt(i/t,c);for(var l=a.normals[i],d=a.binormals[i],p=0;p<=n;p++){var f=p/n*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);s.x=v*l.x+m*d.x,s.y=v*l.y+m*d.y,s.z=v*l.z+m*d.z,s.normalize(),u.push(s.x,s.y,s.z),o.x=c.x+r*s.x,o.y=c.y+r*s.y,o.z=c.z+r*s.z,h.push(o.x,o.y,o.z)}}function v(){for(var e=1;e<=t;e++)for(var r=1;r<=n;r++){var i=(n+1)*(e-1)+(r-1),a=(n+1)*e+(r-1),o=(n+1)*e+r,s=(n+1)*(e-1)+r;p.push(i,a,s),p.push(a,o,s)}}function g(){for(var e=0;e<=t;e++)for(var r=0;r<=n;r++)l.x=e/t,l.y=r/n,d.push(l.x,l.y)}f(),this.setIndex(p),this.setAttribute("position",new Pi(h,3)),this.setAttribute("normal",new Pi(u,3)),this.setAttribute("uv",new Pi(d,2))}function Fu(e,t,r,n,i,a,o){pa.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:r,radialSegments:n,p:i,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new Uu(e,t,r,n,i,a)),this.mergeVertices()}function Uu(e,t,r,n,i,a){Gi.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:r,radialSegments:n,p:i,q:a},e=e||1,t=t||.4,r=Math.floor(r)||64,n=Math.floor(n)||8,i=i||2,a=a||3;for(var o=[],s=[],l=[],c=[],h=new Zr,u=new Zr,d=new Zr,p=new Zr,f=new Zr,m=new Zr,v=new Zr,g=0;g<=r;++g){var y=g/r*i*Math.PI*2;L(y,i,a,e,d),L(y+.01,i,a,e,p),m.subVectors(p,d),v.addVectors(p,d),f.crossVectors(m,v),v.crossVectors(f,m),f.normalize(),v.normalize();for(var x=0;x<=n;++x){var b=x/n*Math.PI*2,w=-t*Math.cos(b),_=t*Math.sin(b);h.x=d.x+(w*v.x+_*f.x),h.y=d.y+(w*v.y+_*f.y),h.z=d.z+(w*v.z+_*f.z),s.push(h.x,h.y,h.z),u.subVectors(h,d).normalize(),l.push(u.x,u.y,u.z),c.push(g/r),c.push(x/n)}}for(var M=1;M<=r;M++)for(var S=1;S<=n;S++){var A=(n+1)*(M-1)+(S-1),E=(n+1)*M+(S-1),T=(n+1)*M+S,C=(n+1)*(M-1)+S;o.push(A,E,C),o.push(E,T,C)}function L(e,t,r,n,i){var a=Math.cos(e),o=Math.sin(e),s=r/t*e,l=Math.cos(s);i.x=n*(2+l)*.5*a,i.y=n*(2+l)*o*.5,i.z=n*Math.sin(s)*.5}this.setIndex(o),this.setAttribute("position",new Pi(s,3)),this.setAttribute("normal",new Pi(l,3)),this.setAttribute("uv",new Pi(c,2))}function ju(e,t,r,n,i){pa.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:r,tubularSegments:n,arc:i},this.fromBufferGeometry(new zu(e,t,r,n,i)),this.mergeVertices()}function zu(e,t,r,n,i){Gi.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:r,tubularSegments:n,arc:i},e=e||1,t=t||.4,r=Math.floor(r)||8,n=Math.floor(n)||6,i=i||2*Math.PI;for(var a=[],o=[],s=[],l=[],c=new Zr,h=new Zr,u=new Zr,d=0;d<=r;d++)for(var p=0;p<=n;p++){var f=p/n*i,m=d/r*Math.PI*2;h.x=(e+t*Math.cos(m))*Math.cos(f),h.y=(e+t*Math.cos(m))*Math.sin(f),h.z=t*Math.sin(m),o.push(h.x,h.y,h.z),c.x=e*Math.cos(f),c.y=e*Math.sin(f),u.subVectors(h,c).normalize(),s.push(u.x,u.y,u.z),l.push(p/n),l.push(d/r)}for(var v=1;v<=r;v++)for(var g=1;g<=n;g++){var y=(n+1)*v+g-1,x=(n+1)*(v-1)+g-1,b=(n+1)*(v-1)+g,w=(n+1)*v+g;a.push(y,x,w),a.push(x,b,w)}this.setIndex(a),this.setAttribute("position",new Pi(o,3)),this.setAttribute("normal",new Pi(s,3)),this.setAttribute("uv",new Pi(l,2))}vu.prototype=Object.assign(Object.create(_n.prototype),{constructor:vu,isPoints:!0,copy:function(e){return _n.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},raycast:function(e,t){var r=this.geometry,n=this.matrixWorld,i=e.params.Points.threshold;if(null===r.boundingSphere&&r.computeBoundingSphere(),fu.copy(r.boundingSphere),fu.applyMatrix4(n),fu.radius+=i,!1!==e.ray.intersectsSphere(fu)){du.getInverse(n),pu.copy(e.ray).applyMatrix4(du);var a=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a;if(r.isBufferGeometry){var s=r.index,l=r.attributes,c=l.position.array;if(null!==s)for(var h=s.array,u=0,d=h.length;u<d;u++){var p=h[u];mu.fromArray(c,3*p),gu(mu,p,o,n,e,t,this)}else for(var f=0,m=c.length/3;f<m;f++)mu.fromArray(c,3*f),gu(mu,f,o,n,e,t,this)}else for(var v=r.vertices,g=0,y=v.length;g<y;g++)gu(v[g],g,o,n,e,t,this)}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,r=Object.keys(t);if(r.length>0){var n=t[r[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=n.length;i<a;i++){var o=n[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}),yu.prototype=Object.assign(Object.create(Gr.prototype),{constructor:yu,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),xu.prototype=Object.create(Gr.prototype),xu.prototype.constructor=xu,xu.prototype.isCompressedTexture=!0,bu.prototype=Object.create(Gr.prototype),bu.prototype.constructor=bu,bu.prototype.isCanvasTexture=!0,wu.prototype=Object.create(Gr.prototype),wu.prototype.constructor=wu,wu.prototype.isDepthTexture=!0,_u.prototype=Object.create(Gi.prototype),_u.prototype.constructor=_u,Mu.prototype=Object.create(pa.prototype),Mu.prototype.constructor=Mu,Su.prototype=Object.create(Gi.prototype),Su.prototype.constructor=Su,Au.prototype=Object.create(pa.prototype),Au.prototype.constructor=Au,Eu.prototype=Object.create(Gi.prototype),Eu.prototype.constructor=Eu,Tu.prototype=Object.create(pa.prototype),Tu.prototype.constructor=Tu,Cu.prototype=Object.create(Eu.prototype),Cu.prototype.constructor=Cu,Lu.prototype=Object.create(pa.prototype),Lu.prototype.constructor=Lu,Ru.prototype=Object.create(Eu.prototype),Ru.prototype.constructor=Ru,Pu.prototype=Object.create(pa.prototype),Pu.prototype.constructor=Pu,Ou.prototype=Object.create(Eu.prototype),Ou.prototype.constructor=Ou,Iu.prototype=Object.create(pa.prototype),Iu.prototype.constructor=Iu,Du.prototype=Object.create(Eu.prototype),Du.prototype.constructor=Du,Nu.prototype=Object.create(pa.prototype),Nu.prototype.constructor=Nu,Bu.prototype=Object.create(Gi.prototype),Bu.prototype.constructor=Bu,Bu.prototype.toJSON=function(){var e=Gi.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},Fu.prototype=Object.create(pa.prototype),Fu.prototype.constructor=Fu,Uu.prototype=Object.create(Gi.prototype),Uu.prototype.constructor=Uu,ju.prototype=Object.create(pa.prototype),ju.prototype.constructor=ju,zu.prototype=Object.create(Gi.prototype),zu.prototype.constructor=zu;var ku={triangulate:function(e,t,r){r=r||2;var n,i,a,o,s,l,c,h=t&&t.length,u=h?t[0]*r:e.length,d=Gu(e,0,u,r,!0),p=[];if(!d||d.next===d.prev)return p;if(h&&(d=Zu(e,t,d,r)),e.length>80*r){n=a=e[0],i=o=e[1];for(var f=r;f<u;f+=r)s=e[f],l=e[f+1],s<n&&(n=s),l<i&&(i=l),s>a&&(a=s),l>o&&(o=l);c=Math.max(a-n,o-i),c=0!==c?1/c:0}return Vu(d,p,r,n,i,c),p}};function Gu(e,t,r,n,i){var a,o;if(i===yd(e,t,r,n)>0)for(a=t;a<r;a+=n)o=md(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=md(a,e[a],e[a+1],o);return o&&sd(o,o.next)&&(vd(o),o=o.next),o}function Hu(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!sd(n,n.next)&&0!==od(n.prev,n,n.next))n=n.next;else{if(vd(n),n=t=n.prev,n===n.next)break;r=!0}}while(r||n!==t);return t}function Vu(e,t,r,n,i,a,o){if(e){!o&&a&&ed(e,n,i,a);var s,l,c=e;while(e.prev!==e.next)if(s=e.prev,l=e.next,a?Yu(e,n,i,a):Wu(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),vd(e),e=l.next,c=l.next;else if(e=l,e===c){o?1===o?(e=qu(Hu(e),t,r),Vu(e,t,r,n,i,a,2)):2===o&&Xu(e,t,r,n,i,a):Vu(Hu(e),t,r,n,i,a,1);break}}}function Wu(e){var t=e.prev,r=e,n=e.next;if(od(t,r,n)>=0)return!1;var i=e.next.next;while(i!==e.prev){if(id(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&od(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Yu(e,t,r,n){var i=e.prev,a=e,o=e.next;if(od(i,a,o)>=0)return!1;var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,c=i.x>a.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=rd(s,l,t,r,n),d=rd(c,h,t,r,n),p=e.prevZ,f=e.nextZ;while(p&&p.z>=u&&f&&f.z<=d){if(p!==e.prev&&p!==e.next&&id(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&od(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&id(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&od(f.prev,f,f.next)>=0)return!1;f=f.nextZ}while(p&&p.z>=u){if(p!==e.prev&&p!==e.next&&id(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&od(p.prev,p,p.next)>=0)return!1;p=p.prevZ}while(f&&f.z<=d){if(f!==e.prev&&f!==e.next&&id(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&od(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function qu(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!sd(i,a)&&ld(i,n,n.next,a)&&dd(i,a)&&dd(a,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(a.i/r),vd(n),vd(n.next),n=e=a),n=n.next}while(n!==e);return Hu(n)}function Xu(e,t,r,n,i,a){var o=e;do{var s=o.next.next;while(s!==o.prev){if(o.i!==s.i&&ad(o,s)){var l=fd(o,s);return o=Hu(o,o.next),l=Hu(l,l.next),Vu(o,t,r,n,i,a),void Vu(l,t,r,n,i,a)}s=s.next}o=o.next}while(o!==e)}function Zu(e,t,r,n){var i,a,o,s,l,c=[];for(i=0,a=t.length;i<a;i++)o=t[i]*n,s=i<a-1?t[i+1]*n:e.length,l=Gu(e,o,s,n,!1),l===l.next&&(l.steiner=!0),c.push(nd(l));for(c.sort(Ju),i=0;i<c.length;i++)Qu(c[i],r),r=Hu(r,r.next);return r}function Ju(e,t){return e.x-t.x}function Qu(e,t){if(t=Ku(e,t),t){var r=fd(t,e);Hu(t,t.next),Hu(r,r.next)}}function Ku(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(i===o)return r;var l,c=r,h=r.x,u=r.y,d=1/0;n=r;do{i>=n.x&&n.x>=h&&i!==n.x&&id(a<u?i:o,a,h,u,a<u?o:i,a,n.x,n.y)&&(l=Math.abs(a-n.y)/(i-n.x),dd(n,e)&&(l<d||l===d&&(n.x>r.x||n.x===r.x&&$u(r,n)))&&(r=n,d=l)),n=n.next}while(n!==c);return r}function $u(e,t){return od(e.prev,e,t.prev)<0&&od(t.next,e,e.next)<0}function ed(e,t,r,n){var i=e;do{null===i.z&&(i.z=rd(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,td(i)}function td(e){var t,r,n,i,a,o,s,l,c=1;do{r=e,e=null,a=null,o=0;while(r){for(o++,n=r,s=0,t=0;t<c;t++)if(s++,n=n.nextZ,!n)break;l=c;while(s>0||l>0&&n)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1);return e}function rd(e,t,r,n,i){return e=32767*(e-r)*i,t=32767*(t-n)*i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function nd(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function id(e,t,r,n,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function ad(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!ud(e,t)&&(dd(e,t)&&dd(t,e)&&pd(e,t)&&(od(e.prev,e,t.prev)||od(e,t.prev,t))||sd(e,t)&&od(e.prev,e,e.next)>0&&od(t.prev,t,t.next)>0)}function od(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function sd(e,t){return e.x===t.x&&e.y===t.y}function ld(e,t,r,n){var i=hd(od(e,t,r)),a=hd(od(e,t,n)),o=hd(od(r,n,e)),s=hd(od(r,n,t));return i!==a&&o!==s||(!(0!==i||!cd(e,r,t))||(!(0!==a||!cd(e,n,t))||(!(0!==o||!cd(r,e,n))||!(0!==s||!cd(r,t,n)))))}function cd(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function hd(e){return e>0?1:e<0?-1:0}function ud(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&ld(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function dd(e,t){return od(e.prev,e,e.next)<0?od(e,t,e.next)>=0&&od(e,e.prev,t)>=0:od(e,t,e.prev)<0||od(e,e.next,t)<0}function pd(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!==r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}function fd(e,t){var r=new gd(e.i,e.x,e.y),n=new gd(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function md(e,t,r,n){var i=new gd(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function vd(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 gd(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function yd(e,t,r,n){for(var i=0,a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}var xd={area:function(e){for(var t=e.length,r=0,n=t-1,i=0;i<t;n=i++)r+=e[n].x*e[i].y-e[i].x*e[n].y;return.5*r},isClockWise:function(e){return xd.area(e)<0},triangulateShape:function(e,t){var r=[],n=[],i=[];bd(e),wd(r,e);var a=e.length;t.forEach(bd);for(var o=0;o<t.length;o++)n.push(a),a+=t[o].length,wd(r,t[o]);for(var s=ku.triangulate(r,n),l=0;l<s.length;l+=3)i.push(s.slice(l,l+3));return i}};function bd(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function wd(e,t){for(var r=0;r<t.length;r++)e.push(t[r].x),e.push(t[r].y)}function _d(e,t){pa.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new Md(e,t)),this.mergeVertices()}function Md(e,t){Gi.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];for(var r=this,n=[],i=[],a=0,o=e.length;a<o;a++){var s=e[a];l(s)}function l(e){var a=[],o=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:100,c=void 0===t.bevelEnabled||t.bevelEnabled,h=void 0!==t.bevelThickness?t.bevelThickness:6,u=void 0!==t.bevelSize?t.bevelSize:h-2,d=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3,f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Sd;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);var v,g,y,x,b,w=!1;f&&(v=f.getSpacedPoints(s),w=!0,c=!1,g=f.computeFrenetFrames(s,!1),y=new Zr,x=new Zr,b=new Zr),c||(p=0,h=0,u=0,d=0);var _=e.extractPoints(o),M=_.shape,S=_.holes,A=!xd.isClockWise(M);if(A){M=M.reverse();for(var E=0,T=S.length;E<T;E++){var C=S[E];xd.isClockWise(C)&&(S[E]=C.reverse())}}for(var L=xd.triangulateShape(M,S),R=M,P=0,O=S.length;P<O;P++){var I=S[P];M=M.concat(I)}function D(e,t,r){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(r).add(e)}var N=M.length,B=L.length;function F(e,t,r){var n,i,a,o=e.x-t.x,s=e.y-t.y,l=r.x-e.x,c=r.y-e.y,h=o*o+s*s,u=o*c-s*l;if(Math.abs(u)>Number.EPSILON){var d=Math.sqrt(h),p=Math.sqrt(l*l+c*c),f=t.x-s/d,m=t.y+o/d,v=r.x-c/p,g=r.y+l/p,y=((v-f)*c-(g-m)*l)/(o*c-s*l);n=f+o*y-e.x,i=m+s*y-e.y;var x=n*n+i*i;if(x<=2)return new Ur(n,i);a=Math.sqrt(x/2)}else{var b=!1;o>Number.EPSILON?l>Number.EPSILON&&(b=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(c)&&(b=!0),b?(n=-s,i=o,a=Math.sqrt(h)):(n=o,i=s,a=Math.sqrt(h/2))}return new Ur(n/a,i/a)}for(var U=[],j=0,z=R.length,k=z-1,G=j+1;j<z;j++,k++,G++)k===z&&(k=0),G===z&&(G=0),U[j]=F(R[j],R[k],R[G]);for(var H,V=[],W=U.concat(),Y=0,q=S.length;Y<q;Y++){var X=S[Y];H=[];for(var Z=0,J=X.length,Q=J-1,K=Z+1;Z<J;Z++,Q++,K++)Q===J&&(Q=0),K===J&&(K=0),H[Z]=F(X[Z],X[Q],X[K]);V.push(H),W=W.concat(H)}for(var $=0;$<p;$++){for(var ee=$/p,te=h*Math.cos(ee*Math.PI/2),re=u*Math.sin(ee*Math.PI/2)+d,ne=0,ie=R.length;ne<ie;ne++){var ae=D(R[ne],U[ne],re);De(ae.x,ae.y,-te)}for(var oe=0,se=S.length;oe<se;oe++){var le=S[oe];H=V[oe];for(var ce=0,he=le.length;ce<he;ce++){var ue=D(le[ce],H[ce],re);De(ue.x,ue.y,-te)}}}for(var de=u+d,pe=0;pe<N;pe++){var fe=c?D(M[pe],W[pe],de):M[pe];w?(x.copy(g.normals[0]).multiplyScalar(fe.x),y.copy(g.binormals[0]).multiplyScalar(fe.y),b.copy(v[0]).add(x).add(y),De(b.x,b.y,b.z)):De(fe.x,fe.y,0)}for(var me=1;me<=s;me++)for(var ve=0;ve<N;ve++){var ge=c?D(M[ve],W[ve],de):M[ve];w?(x.copy(g.normals[me]).multiplyScalar(ge.x),y.copy(g.binormals[me]).multiplyScalar(ge.y),b.copy(v[me]).add(x).add(y),De(b.x,b.y,b.z)):De(ge.x,ge.y,l/s*me)}for(var ye=p-1;ye>=0;ye--){for(var xe=ye/p,be=h*Math.cos(xe*Math.PI/2),we=u*Math.sin(xe*Math.PI/2)+d,_e=0,Me=R.length;_e<Me;_e++){var Se=D(R[_e],U[_e],we);De(Se.x,Se.y,l+be)}for(var Ae=0,Ee=S.length;Ae<Ee;Ae++){var Te=S[Ae];H=V[Ae];for(var Ce=0,Le=Te.length;Ce<Le;Ce++){var Re=D(Te[Ce],H[Ce],we);w?De(Re.x,Re.y+v[s-1].y,v[s-1].x+be):De(Re.x,Re.y,l+be)}}}function Pe(){var e=n.length/3;if(c){for(var t=0,i=N*t,a=0;a<B;a++){var o=L[a];Ne(o[2]+i,o[1]+i,o[0]+i)}t=s+2*p,i=N*t;for(var l=0;l<B;l++){var h=L[l];Ne(h[0]+i,h[1]+i,h[2]+i)}}else{for(var u=0;u<B;u++){var d=L[u];Ne(d[2],d[1],d[0])}for(var f=0;f<B;f++){var m=L[f];Ne(m[0]+N*s,m[1]+N*s,m[2]+N*s)}}r.addGroup(e,n.length/3-e,0)}function Oe(){var e=n.length/3,t=0;Ie(R,t),t+=R.length;for(var i=0,a=S.length;i<a;i++){var o=S[i];Ie(o,t),t+=o.length}r.addGroup(e,n.length/3-e,1)}function Ie(e,t){var r=e.length;while(--r>=0){var n=r,i=r-1;i<0&&(i=e.length-1);for(var a=0,o=s+2*p;a<o;a++){var l=N*a,c=N*(a+1),h=t+n+l,u=t+i+l,d=t+i+c,f=t+n+c;Be(h,u,d,f)}}}function De(e,t,r){a.push(e),a.push(t),a.push(r)}function Ne(e,t,i){Fe(e),Fe(t),Fe(i);var a=n.length/3,o=m.generateTopUV(r,n,a-3,a-2,a-1);Ue(o[0]),Ue(o[1]),Ue(o[2])}function Be(e,t,i,a){Fe(e),Fe(t),Fe(a),Fe(t),Fe(i),Fe(a);var o=n.length/3,s=m.generateSideWallUV(r,n,o-6,o-3,o-2,o-1);Ue(s[0]),Ue(s[1]),Ue(s[3]),Ue(s[1]),Ue(s[2]),Ue(s[3])}function Fe(e){n.push(a[3*e+0]),n.push(a[3*e+1]),n.push(a[3*e+2])}function Ue(e){i.push(e.x),i.push(e.y)}Pe(),Oe()}this.setAttribute("position",new Pi(n,3)),this.setAttribute("uv",new Pi(i,2)),this.computeVertexNormals()}_d.prototype=Object.create(pa.prototype),_d.prototype.constructor=_d,_d.prototype.toJSON=function(){var e=pa.prototype.toJSON.call(this),t=this.parameters.shapes,r=this.parameters.options;return Ad(t,r,e)},Md.prototype=Object.create(Gi.prototype),Md.prototype.constructor=Md,Md.prototype.toJSON=function(){var e=Gi.prototype.toJSON.call(this),t=this.parameters.shapes,r=this.parameters.options;return Ad(t,r,e)};var Sd={generateTopUV:function(e,t,r,n,i){var a=t[3*r],o=t[3*r+1],s=t[3*n],l=t[3*n+1],c=t[3*i],h=t[3*i+1];return[new Ur(a,o),new Ur(s,l),new Ur(c,h)]},generateSideWallUV:function(e,t,r,n,i,a){var o=t[3*r],s=t[3*r+1],l=t[3*r+2],c=t[3*n],h=t[3*n+1],u=t[3*n+2],d=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*a],v=t[3*a+1],g=t[3*a+2];return Math.abs(s-h)<.01?[new Ur(o,1-l),new Ur(c,1-u),new Ur(d,1-f),new Ur(m,1-g)]:[new Ur(s,1-l),new Ur(h,1-u),new Ur(p,1-f),new Ur(v,1-g)]}};function Ad(e,t,r){if(r.shapes=[],Array.isArray(e))for(var n=0,i=e.length;n<i;n++){var a=e[n];r.shapes.push(a.uuid)}else r.shapes.push(e.uuid);return void 0!==t.extrudePath&&(r.options.extrudePath=t.extrudePath.toJSON()),r}function Ed(e,t){pa.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new Td(e,t)),this.mergeVertices()}function Td(e,t){t=t||{};var r=t.font;if(!r||!r.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new pa;var n=r.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),Md.call(this,n,t),this.type="TextBufferGeometry"}function Cd(e,t,r,n,i,a,o){pa.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:r,phiStart:n,phiLength:i,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new Ld(e,t,r,n,i,a,o)),this.mergeVertices()}function Ld(e,t,r,n,i,a,o){Gi.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:r,phiStart:n,phiLength:i,thetaStart:a,thetaLength:o},e=e||1,t=Math.max(3,Math.floor(t)||8),r=Math.max(2,Math.floor(r)||6),n=void 0!==n?n:0,i=void 0!==i?i:2*Math.PI,a=void 0!==a?a:0,o=void 0!==o?o:Math.PI;for(var s=Math.min(a+o,Math.PI),l=0,c=[],h=new Zr,u=new Zr,d=[],p=[],f=[],m=[],v=0;v<=r;v++){var g=[],y=v/r,x=0;0==v&&0==a?x=.5/t:v==r&&s==Math.PI&&(x=-.5/t);for(var b=0;b<=t;b++){var w=b/t;h.x=-e*Math.cos(n+w*i)*Math.sin(a+y*o),h.y=e*Math.cos(a+y*o),h.z=e*Math.sin(n+w*i)*Math.sin(a+y*o),p.push(h.x,h.y,h.z),u.copy(h).normalize(),f.push(u.x,u.y,u.z),m.push(w+x,1-y),g.push(l++)}c.push(g)}for(var _=0;_<r;_++)for(var M=0;M<t;M++){var S=c[_][M+1],A=c[_][M],E=c[_+1][M],T=c[_+1][M+1];(0!==_||a>0)&&d.push(S,A,T),(_!==r-1||s<Math.PI)&&d.push(A,E,T)}this.setIndex(d),this.setAttribute("position",new Pi(p,3)),this.setAttribute("normal",new Pi(f,3)),this.setAttribute("uv",new Pi(m,2))}function Rd(e,t,r,n,i,a){pa.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:r,phiSegments:n,thetaStart:i,thetaLength:a},this.fromBufferGeometry(new Pd(e,t,r,n,i,a)),this.mergeVertices()}function Pd(e,t,r,n,i,a){Gi.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:r,phiSegments:n,thetaStart:i,thetaLength:a},e=e||.5,t=t||1,i=void 0!==i?i:0,a=void 0!==a?a:2*Math.PI,r=void 0!==r?Math.max(3,r):8,n=void 0!==n?Math.max(1,n):1;for(var o=[],s=[],l=[],c=[],h=e,u=(t-e)/n,d=new Zr,p=new Ur,f=0;f<=n;f++){for(var m=0;m<=r;m++){var v=i+m/r*a;d.x=h*Math.cos(v),d.y=h*Math.sin(v),s.push(d.x,d.y,d.z),l.push(0,0,1),p.x=(d.x/t+1)/2,p.y=(d.y/t+1)/2,c.push(p.x,p.y)}h+=u}for(var g=0;g<n;g++)for(var y=g*(r+1),x=0;x<r;x++){var b=x+y,w=b,_=b+r+1,M=b+r+2,S=b+1;o.push(w,_,S),o.push(_,M,S)}this.setIndex(o),this.setAttribute("position",new Pi(s,3)),this.setAttribute("normal",new Pi(l,3)),this.setAttribute("uv",new Pi(c,2))}function Od(e,t,r,n){pa.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:r,phiLength:n},this.fromBufferGeometry(new Id(e,t,r,n)),this.mergeVertices()}function Id(e,t,r,n){Gi.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:r,phiLength:n},t=Math.floor(t)||12,r=r||0,n=n||2*Math.PI,n=Fr.clamp(n,0,2*Math.PI);for(var i=[],a=[],o=[],s=1/t,l=new Zr,c=new Ur,h=0;h<=t;h++)for(var u=r+h*s*n,d=Math.sin(u),p=Math.cos(u),f=0;f<=e.length-1;f++)l.x=e[f].x*d,l.y=e[f].y,l.z=e[f].x*p,a.push(l.x,l.y,l.z),c.x=h/t,c.y=f/(e.length-1),o.push(c.x,c.y);for(var m=0;m<t;m++)for(var v=0;v<e.length-1;v++){var g=v+m*e.length,y=g,x=g+e.length,b=g+e.length+1,w=g+1;i.push(y,x,w),i.push(x,b,w)}if(this.setIndex(i),this.setAttribute("position",new Pi(a,3)),this.setAttribute("uv",new Pi(o,2)),this.computeVertexNormals(),n===2*Math.PI)for(var _=this.attributes.normal.array,M=new Zr,S=new Zr,A=new Zr,E=t*e.length*3,T=0,C=0;T<e.length;T++,C+=3)M.x=_[C+0],M.y=_[C+1],M.z=_[C+2],S.x=_[E+C+0],S.y=_[E+C+1],S.z=_[E+C+2],A.addVectors(M,S).normalize(),_[C+0]=_[E+C+0]=A.x,_[C+1]=_[E+C+1]=A.y,_[C+2]=_[E+C+2]=A.z}function Dd(e,t){pa.call(this),this.type="ShapeGeometry","object"===typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new Nd(e,t)),this.mergeVertices()}function Nd(e,t){Gi.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:t},t=t||12;var r=[],n=[],i=[],a=[],o=0,s=0;if(!1===Array.isArray(e))c(e);else for(var l=0;l<e.length;l++)c(e[l]),this.addGroup(o,s,l),o+=s,s=0;function c(e){var o=n.length/3,l=e.extractPoints(t),c=l.shape,h=l.holes;!1===xd.isClockWise(c)&&(c=c.reverse());for(var u=0,d=h.length;u<d;u++){var p=h[u];!0===xd.isClockWise(p)&&(h[u]=p.reverse())}for(var f=xd.triangulateShape(c,h),m=0,v=h.length;m<v;m++){var g=h[m];c=c.concat(g)}for(var y=0,x=c.length;y<x;y++){var b=c[y];n.push(b.x,b.y,0),i.push(0,0,1),a.push(b.x,b.y)}for(var w=0,_=f.length;w<_;w++){var M=f[w],S=M[0]+o,A=M[1]+o,E=M[2]+o;r.push(S,A,E),s+=3}}this.setIndex(r),this.setAttribute("position",new Pi(n,3)),this.setAttribute("normal",new Pi(i,3)),this.setAttribute("uv",new Pi(a,2))}function Bd(e,t){if(t.shapes=[],Array.isArray(e))for(var r=0,n=e.length;r<n;r++){var i=e[r];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}function Fd(e,t){Gi.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var r,n,i,a,o=[],s=Math.cos(Fr.DEG2RAD*t),l=[0,0],c={},h=["a","b","c"];e.isBufferGeometry?(a=new pa,a.fromBufferGeometry(e)):a=e.clone(),a.mergeVertices(),a.computeFaceNormals();for(var u=a.vertices,d=a.faces,p=0,f=d.length;p<f;p++)for(var m=d[p],v=0;v<3;v++)r=m[h[v]],n=m[h[(v+1)%3]],l[0]=Math.min(r,n),l[1]=Math.max(r,n),i=l[0]+","+l[1],void 0===c[i]?c[i]={index1:l[0],index2:l[1],face1:p,face2:void 0}:c[i].face2=p;for(i in c){var g=c[i];if(void 0===g.face2||d[g.face1].normal.dot(d[g.face2].normal)<=s){var y=u[g.index1];o.push(y.x,y.y,y.z),y=u[g.index2],o.push(y.x,y.y,y.z)}}this.setAttribute("position",new Pi(o,3))}function Ud(e,t,r,n,i,a,o,s){pa.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:n,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new jd(e,t,r,n,i,a,o,s)),this.mergeVertices()}function jd(e,t,r,n,i,a,o,s){Gi.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:n,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s};var l=this;e=void 0!==e?e:1,t=void 0!==t?t:1,r=r||1,n=Math.floor(n)||8,i=Math.floor(i)||1,a=void 0!==a&&a,o=void 0!==o?o:0,s=void 0!==s?s:2*Math.PI;var c=[],h=[],u=[],d=[],p=0,f=[],m=r/2,v=0;function g(){for(var a=new Zr,g=new Zr,y=0,x=(t-e)/r,b=0;b<=i;b++){for(var w=[],_=b/i,M=_*(t-e)+e,S=0;S<=n;S++){var A=S/n,E=A*s+o,T=Math.sin(E),C=Math.cos(E);g.x=M*T,g.y=-_*r+m,g.z=M*C,h.push(g.x,g.y,g.z),a.set(T,x,C).normalize(),u.push(a.x,a.y,a.z),d.push(A,1-_),w.push(p++)}f.push(w)}for(var L=0;L<n;L++)for(var R=0;R<i;R++){var P=f[R][L],O=f[R+1][L],I=f[R+1][L+1],D=f[R][L+1];c.push(P,O,D),c.push(O,I,D),y+=6}l.addGroup(v,y,0),v+=y}function y(r){var i,a,f=new Ur,g=new Zr,y=0,x=!0===r?e:t,b=!0===r?1:-1;i=p;for(var w=1;w<=n;w++)h.push(0,m*b,0),u.push(0,b,0),d.push(.5,.5),p++;a=p;for(var _=0;_<=n;_++){var M=_/n,S=M*s+o,A=Math.cos(S),E=Math.sin(S);g.x=x*E,g.y=m*b,g.z=x*A,h.push(g.x,g.y,g.z),u.push(0,b,0),f.x=.5*A+.5,f.y=.5*E*b+.5,d.push(f.x,f.y),p++}for(var T=0;T<n;T++){var C=i+T,L=a+T;!0===r?c.push(L,L+1,C):c.push(L+1,L,C),y+=3}l.addGroup(v,y,!0===r?1:2),v+=y}g(),!1===a&&(e>0&&y(!0),t>0&&y(!1)),this.setIndex(c),this.setAttribute("position",new Pi(h,3)),this.setAttribute("normal",new Pi(u,3)),this.setAttribute("uv",new Pi(d,2))}function zd(e,t,r,n,i,a,o){Ud.call(this,0,e,t,r,n,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:r,heightSegments:n,openEnded:i,thetaStart:a,thetaLength:o}}function kd(e,t,r,n,i,a,o){jd.call(this,0,e,t,r,n,i,a,o),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:r,heightSegments:n,openEnded:i,thetaStart:a,thetaLength:o}}function Gd(e,t,r,n){pa.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:r,thetaLength:n},this.fromBufferGeometry(new Hd(e,t,r,n)),this.mergeVertices()}function Hd(e,t,r,n){Gi.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:r,thetaLength:n},e=e||1,t=void 0!==t?Math.max(3,t):8,r=void 0!==r?r:0,n=void 0!==n?n:2*Math.PI;var i=[],a=[],o=[],s=[],l=new Zr,c=new Ur;a.push(0,0,0),o.push(0,0,1),s.push(.5,.5);for(var h=0,u=3;h<=t;h++,u+=3){var d=r+h/t*n;l.x=e*Math.cos(d),l.y=e*Math.sin(d),a.push(l.x,l.y,l.z),o.push(0,0,1),c.x=(a[u]/e+1)/2,c.y=(a[u+1]/e+1)/2,s.push(c.x,c.y)}for(var p=1;p<=t;p++)i.push(p,p+1,0);this.setIndex(i),this.setAttribute("position",new Pi(a,3)),this.setAttribute("normal",new Pi(o,3)),this.setAttribute("uv",new Pi(s,2))}Ed.prototype=Object.create(pa.prototype),Ed.prototype.constructor=Ed,Td.prototype=Object.create(Md.prototype),Td.prototype.constructor=Td,Cd.prototype=Object.create(pa.prototype),Cd.prototype.constructor=Cd,Ld.prototype=Object.create(Gi.prototype),Ld.prototype.constructor=Ld,Rd.prototype=Object.create(pa.prototype),Rd.prototype.constructor=Rd,Pd.prototype=Object.create(Gi.prototype),Pd.prototype.constructor=Pd,Od.prototype=Object.create(pa.prototype),Od.prototype.constructor=Od,Id.prototype=Object.create(Gi.prototype),Id.prototype.constructor=Id,Dd.prototype=Object.create(pa.prototype),Dd.prototype.constructor=Dd,Dd.prototype.toJSON=function(){var e=pa.prototype.toJSON.call(this),t=this.parameters.shapes;return Bd(t,e)},Nd.prototype=Object.create(Gi.prototype),Nd.prototype.constructor=Nd,Nd.prototype.toJSON=function(){var e=Gi.prototype.toJSON.call(this),t=this.parameters.shapes;return Bd(t,e)},Fd.prototype=Object.create(Gi.prototype),Fd.prototype.constructor=Fd,Ud.prototype=Object.create(pa.prototype),Ud.prototype.constructor=Ud,jd.prototype=Object.create(Gi.prototype),jd.prototype.constructor=jd,zd.prototype=Object.create(Ud.prototype),zd.prototype.constructor=zd,kd.prototype=Object.create(jd.prototype),kd.prototype.constructor=kd,Gd.prototype=Object.create(pa.prototype),Gd.prototype.constructor=Gd,Hd.prototype=Object.create(Gi.prototype),Hd.prototype.constructor=Hd;var Vd=Object.freeze({__proto__:null,WireframeGeometry:_u,ParametricGeometry:Mu,ParametricBufferGeometry:Su,TetrahedronGeometry:Tu,TetrahedronBufferGeometry:Cu,OctahedronGeometry:Lu,OctahedronBufferGeometry:Ru,IcosahedronGeometry:Pu,IcosahedronBufferGeometry:Ou,DodecahedronGeometry:Iu,DodecahedronBufferGeometry:Du,PolyhedronGeometry:Au,PolyhedronBufferGeometry:Eu,TubeGeometry:Nu,TubeBufferGeometry:Bu,TorusKnotGeometry:Fu,TorusKnotBufferGeometry:Uu,TorusGeometry:ju,TorusBufferGeometry:zu,TextGeometry:Ed,TextBufferGeometry:Td,SphereGeometry:Cd,SphereBufferGeometry:Ld,RingGeometry:Rd,RingBufferGeometry:Pd,PlaneGeometry:Na,PlaneBufferGeometry:Ba,LatheGeometry:Od,LatheBufferGeometry:Id,ShapeGeometry:Dd,ShapeBufferGeometry:Nd,ExtrudeGeometry:_d,ExtrudeBufferGeometry:Md,EdgesGeometry:Fd,ConeGeometry:zd,ConeBufferGeometry:kd,CylinderGeometry:Ud,CylinderBufferGeometry:jd,CircleGeometry:Gd,CircleBufferGeometry:Hd,BoxGeometry:fa,BoxBufferGeometry:ma});function Wd(e){xi.call(this),this.type="ShadowMaterial",this.color=new pi(0),this.transparent=!0,this.setValues(e)}function Yd(e){wa.call(this,e),this.type="RawShaderMaterial"}function qd(e){xi.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new pi(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=or,this.normalScale=new Ur(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.vertexTangents=!1,this.setValues(e)}function Xd(e){qd.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Ur(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,this.sheen=null,this.transparency=0,this.setValues(e)}function Zd(e){xi.call(this),this.type="MeshPhongMaterial",this.color=new pi(16777215),this.specular=new pi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=or,this.normalScale=new Ur(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Z,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 Jd(e){xi.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new pi(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=or,this.normalScale=new Ur(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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 Qd(e){xi.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=or,this.normalScale=new Ur(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 Kd(e){xi.call(this),this.type="MeshLambertMaterial",this.color=new pi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Z,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 $d(e){xi.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new pi(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=or,this.normalScale=new Ur(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 ep(e){eu.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Wd.prototype=Object.create(xi.prototype),Wd.prototype.constructor=Wd,Wd.prototype.isShadowMaterial=!0,Wd.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.color.copy(e.color),this},Yd.prototype=Object.create(wa.prototype),Yd.prototype.constructor=Yd,Yd.prototype.isRawShaderMaterial=!0,qd.prototype=Object.create(xi.prototype),qd.prototype.constructor=qd,qd.prototype.isMeshStandardMaterial=!0,qd.prototype.copy=function(e){return xi.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.vertexTangents=e.vertexTangents,this},Xd.prototype=Object.create(qd.prototype),Xd.prototype.constructor=Xd,Xd.prototype.isMeshPhysicalMaterial=!0,Xd.prototype.copy=function(e){return qd.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new pi).copy(e.sheen):this.sheen=null,this.transparency=e.transparency,this},Zd.prototype=Object.create(xi.prototype),Zd.prototype.constructor=Zd,Zd.prototype.isMeshPhongMaterial=!0,Zd.prototype.copy=function(e){return xi.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},Jd.prototype=Object.create(xi.prototype),Jd.prototype.constructor=Jd,Jd.prototype.isMeshToonMaterial=!0,Jd.prototype.copy=function(e){return xi.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,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.alphaMap=e.alphaMap,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},Qd.prototype=Object.create(xi.prototype),Qd.prototype.constructor=Qd,Qd.prototype.isMeshNormalMaterial=!0,Qd.prototype.copy=function(e){return xi.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},Kd.prototype=Object.create(xi.prototype),Kd.prototype.constructor=Kd,Kd.prototype.isMeshLambertMaterial=!0,Kd.prototype.copy=function(e){return xi.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},$d.prototype=Object.create(xi.prototype),$d.prototype.constructor=$d,$d.prototype.isMeshMatcapMaterial=!0,$d.prototype.copy=function(e){return xi.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},ep.prototype=Object.create(eu.prototype),ep.prototype.constructor=ep,ep.prototype.isLineDashedMaterial=!0,ep.prototype.copy=function(e){return eu.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var tp=Object.freeze({__proto__:null,ShadowMaterial:Wd,SpriteMaterial:Eh,RawShaderMaterial:Yd,ShaderMaterial:wa,PointsMaterial:uu,MeshPhysicalMaterial:Xd,MeshStandardMaterial:qd,MeshPhongMaterial:Zd,MeshToonMaterial:Jd,MeshNormalMaterial:Qd,MeshLambertMaterial:Kd,MeshDepthMaterial:ah,MeshDistanceMaterial:oh,MeshBasicMaterial:bi,MeshMatcapMaterial:$d,LineDashedMaterial:ep,LineBasicMaterial:eu,Material:xi}),rp={arraySlice:function(e,t,r){return rp.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==r?r:e.length)):e.slice(t,r)},convertArray:function(e,t,r){return!e||!r&&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){function t(t,r){return e[t]-e[r]}for(var r=e.length,n=new Array(r),i=0;i!==r;++i)n[i]=i;return n.sort(t),n},sortedArray:function(e,t,r){for(var n=e.length,i=new e.constructor(n),a=0,o=0;o!==n;++a)for(var s=r[a]*t,l=0;l!==t;++l)i[o++]=e[s+l];return i},flattenJSON:function(e,t,r,n){var i=1,a=e[0];while(void 0!==a&&void 0===a[n])a=e[i++];if(void 0!==a){var o=a[n];if(void 0!==o)if(Array.isArray(o))do{o=a[n],void 0!==o&&(t.push(a.time),r.push.apply(r,o)),a=e[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{o=a[n],void 0!==o&&(t.push(a.time),o.toArray(r,r.length)),a=e[i++]}while(void 0!==a);else do{o=a[n],void 0!==o&&(t.push(a.time),r.push(o)),a=e[i++]}while(void 0!==a)}},subclip:function(e,t,r,n,i){i=i||30;var a=e.clone();a.name=t;for(var o=[],s=0;s<a.tracks.length;++s){for(var l=a.tracks[s],c=l.getValueSize(),h=[],u=[],d=0;d<l.times.length;++d){var p=l.times[d]*i;if(!(p<r||p>=n)){h.push(l.times[d]);for(var f=0;f<c;++f)u.push(l.values[d*c+f])}}0!==h.length&&(l.times=rp.convertArray(h,l.times.constructor),l.values=rp.convertArray(u,l.values.constructor),o.push(l))}a.tracks=o;for(var m=1/0,v=0;v<a.tracks.length;++v)m>a.tracks[v].times[0]&&(m=a.tracks[v].times[0]);for(var g=0;g<a.tracks.length;++g)a.tracks[g].shift(-1*m);return a.resetDuration(),a},makeClipAdditive:function(e,t,r,n){void 0===t&&(t=0),void 0===r&&(r=e),(void 0===n||n<=0)&&(n=30);for(var i=e.tracks.length,a=t/n,o=function(t){var n=r.tracks[t],i=n.ValueTypeName;if("bool"!==i&&"string"!==i){var o=e.tracks.find((function(e){return e.name===n.name&&e.ValueTypeName===i}));if(void 0!==o){var s=n.getValueSize(),l=n.times.length-1,c=void 0;if(a<=n.times[0])c=rp.arraySlice(n.values,0,n.valueSize);else if(a>=n.times[l]){var h=l*s;c=rp.arraySlice(n.values,h)}else{var u=n.createInterpolant();u.evaluate(a),c=u.resultBuffer}if("quaternion"===i){var d=new Yr(c[0],c[1],c[2],c[3]).normalize().conjugate();d.toArray(c)}for(var p=o.times.length,f=0;f<p;++f){var m=f*s;if("quaternion"===i)Yr.multiplyQuaternionsFlat(o.values,m,c,0,o.values,m);else for(var v=0;v<s;++v)o.values[m+v]-=c[v]}}}},s=0;s<i;++s)o(s);return e.blendMode=Yt,e}};function np(e,t,r,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(r),this.sampleValues=t,this.valueSize=r}function ip(e,t,r,n){np.call(this,e,t,r,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ap(e,t,r,n){np.call(this,e,t,r,n)}function op(e,t,r,n){np.call(this,e,t,r,n)}function sp(e,t,r,n){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=rp.convertArray(t,this.TimeBufferType),this.values=rp.convertArray(r,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function lp(e,t,r){sp.call(this,e,t,r)}function cp(e,t,r,n){sp.call(this,e,t,r,n)}function hp(e,t,r,n){sp.call(this,e,t,r,n)}function up(e,t,r,n){np.call(this,e,t,r,n)}function dp(e,t,r,n){sp.call(this,e,t,r,n)}function pp(e,t,r,n){sp.call(this,e,t,r,n)}function fp(e,t,r,n){sp.call(this,e,t,r,n)}function mp(e,t,r,n){this.name=e,this.tracks=r,this.duration=void 0!==t?t:-1,this.blendMode=void 0!==n?n:Wt,this.uuid=Fr.generateUUID(),this.duration<0&&this.resetDuration()}function vp(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return hp;case"vector":case"vector2":case"vector3":case"vector4":return fp;case"color":return cp;case"quaternion":return dp;case"bool":case"boolean":return lp;case"string":return pp}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}function gp(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=vp(e.type);if(void 0===e.times){var r=[],n=[];rp.flattenJSON(e.keys,r,n,"value"),e.times=r,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}Object.assign(np.prototype,{evaluate:function(e){var t=this.parameterPositions,r=this._cachedIndex,n=t[r],i=t[r-1];e:{t:{var a;r:{n:if(!(e<n)){for(var o=r+2;;){if(void 0===n){if(e<i)break n;return r=t.length,this._cachedIndex=r,this.afterEnd_(r-1,e,i)}if(r===o)break;if(i=n,n=t[++r],e<n)break t}a=t.length;break r}if(e>=i)break e;var s=t[1];e<s&&(r=2,i=s);for(var l=r-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,n);if(r===l)break;if(n=i,i=t[--r-1],e>=i)break t}a=r,r=0}while(r<a){var c=r+a>>>1;e<t[c]?a=c:r=c+1}if(n=t[r],i=t[r-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,n);if(void 0===n)return r=t.length,this._cachedIndex=r,this.afterEnd_(r-1,i,e)}this._cachedIndex=r,this.intervalChanged_(r,i,n)}return this.interpolate_(r,i,e,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,r=this.sampleValues,n=this.valueSize,i=e*n,a=0;a!==n;++a)t[a]=r[i+a];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(np.prototype,{beforeStart_:np.prototype.copySampleValue_,afterEnd_:np.prototype.copySampleValue_}),ip.prototype=Object.assign(Object.create(np.prototype),{constructor:ip,DefaultSettings_:{endingStart:Gt,endingEnd:Gt},intervalChanged_:function(e,t,r){var n=this.parameterPositions,i=e-2,a=e+1,o=n[i],s=n[a];if(void 0===o)switch(this.getSettings_().endingStart){case Ht:i=e,o=2*t-r;break;case Vt:i=n.length-2,o=t+n[i]-n[i+1];break;default:i=e,o=r}if(void 0===s)switch(this.getSettings_().endingEnd){case Ht:a=e,s=2*r-t;break;case Vt:a=1,s=r+n[1]-n[0];break;default:a=e-1,s=t}var l=.5*(r-t),c=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(s-r),this._offsetPrev=i*c,this._offsetNext=a*c},interpolate_:function(e,t,r,n){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,c=this._offsetPrev,h=this._offsetNext,u=this._weightPrev,d=this._weightNext,p=(r-t)/(n-t),f=p*p,m=f*p,v=-u*m+2*u*f-u*p,g=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,x=d*m-d*f,b=0;b!==o;++b)i[b]=v*a[c+b]+g*a[l+b]+y*a[s+b]+x*a[h+b];return i}}),ap.prototype=Object.assign(Object.create(np.prototype),{constructor:ap,interpolate_:function(e,t,r,n){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,c=(r-t)/(n-t),h=1-c,u=0;u!==o;++u)i[u]=a[l+u]*h+a[s+u]*c;return i}}),op.prototype=Object.assign(Object.create(np.prototype),{constructor:op,interpolate_:function(e){return this.copySampleValue_(e-1)}}),Object.assign(sp,{toJSON:function(e){var t,r=e.constructor;if(void 0!==r.toJSON)t=r.toJSON(e);else{t={name:e.name,times:rp.convertArray(e.times,Array),values:rp.convertArray(e.values,Array)};var n=e.getInterpolation();n!==e.DefaultInterpolation&&(t.interpolation=n)}return t.type=e.ValueTypeName,t}}),Object.assign(sp.prototype,{constructor:sp,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:zt,InterpolantFactoryMethodDiscrete:function(e){return new op(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new ap(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new ip(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case jt:t=this.InterpolantFactoryMethodDiscrete;break;case zt:t=this.InterpolantFactoryMethodLinear;break;case kt:t=this.InterpolantFactoryMethodSmooth;break}if(void 0===t){var r="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(r);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",r),this}return this.createInterpolant=t,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return jt;case this.InterpolantFactoryMethodLinear:return zt;case this.InterpolantFactoryMethodSmooth:return kt}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,r=0,n=t.length;r!==n;++r)t[r]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,r=0,n=t.length;r!==n;++r)t[r]*=e;return this},trim:function(e,t){var r=this.times,n=r.length,i=0,a=n-1;while(i!==n&&r[i]<e)++i;while(-1!==a&&r[a]>t)--a;if(++a,0!==i||a!==n){i>=a&&(a=Math.max(a,1),i=a-1);var o=this.getValueSize();this.times=rp.arraySlice(r,i,a),this.values=rp.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 r=this.times,n=this.values,i=r.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=r[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!==n&&rp.isTypedArray(n))for(var l=0,c=n.length;l!==c;++l){var h=n[l];if(isNaN(h)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,h),e=!1;break}}return e},optimize:function(){for(var e=rp.arraySlice(this.times),t=rp.arraySlice(this.values),r=this.getValueSize(),n=this.getInterpolation()===kt,i=e.length-1,a=1,o=1;o<i;++o){var s=!1,l=e[o],c=e[o+1];if(l!==c&&(1!==o||l!==l[0]))if(n)s=!0;else for(var h=o*r,u=h-r,d=h+r,p=0;p!==r;++p){var f=t[h+p];if(f!==t[u+p]||f!==t[d+p]){s=!0;break}}if(s){if(o!==a){e[a]=e[o];for(var m=o*r,v=a*r,g=0;g!==r;++g)t[v+g]=t[m+g]}++a}}if(i>0){e[a]=e[i];for(var y=i*r,x=a*r,b=0;b!==r;++b)t[x+b]=t[y+b];++a}return a!==e.length?(this.times=rp.arraySlice(e,0,a),this.values=rp.arraySlice(t,0,a*r)):(this.times=e,this.values=t),this},clone:function(){var e=rp.arraySlice(this.times,0),t=rp.arraySlice(this.values,0),r=this.constructor,n=new r(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),lp.prototype=Object.assign(Object.create(sp.prototype),{constructor:lp,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:jt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),cp.prototype=Object.assign(Object.create(sp.prototype),{constructor:cp,ValueTypeName:"color"}),hp.prototype=Object.assign(Object.create(sp.prototype),{constructor:hp,ValueTypeName:"number"}),up.prototype=Object.assign(Object.create(np.prototype),{constructor:up,interpolate_:function(e,t,r,n){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(r-t)/(n-t),l=e*o,c=l+o;l!==c;l+=4)Yr.slerpFlat(i,0,a,l-o,a,l,s);return i}}),dp.prototype=Object.assign(Object.create(sp.prototype),{constructor:dp,ValueTypeName:"quaternion",DefaultInterpolation:zt,InterpolantFactoryMethodLinear:function(e){return new up(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),pp.prototype=Object.assign(Object.create(sp.prototype),{constructor:pp,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:jt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),fp.prototype=Object.assign(Object.create(sp.prototype),{constructor:fp,ValueTypeName:"vector"}),Object.assign(mp,{parse:function(e){for(var t=[],r=e.tracks,n=1/(e.fps||1),i=0,a=r.length;i!==a;++i)t.push(gp(r[i]).scale(n));return new mp(e.name,e.duration,t,e.blendMode)},toJSON:function(e){for(var t=[],r=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode},i=0,a=r.length;i!==a;++i)t.push(sp.toJSON(r[i]));return n},CreateFromMorphTargetSequence:function(e,t,r,n){for(var i=t.length,a=[],o=0;o<i;o++){var s=[],l=[];s.push((o+i-1)%i,o,(o+1)%i),l.push(0,1,0);var c=rp.getKeyframeOrder(s);s=rp.sortedArray(s,1,c),l=rp.sortedArray(l,1,c),n||0!==s[0]||(s.push(i),l.push(l[0])),a.push(new hp(".morphTargetInfluences["+t[o].name+"]",s,l).scale(1/r))}return new mp(e,-1,a)},findByName:function(e,t){var r=e;if(!Array.isArray(e)){var n=e;r=n.geometry&&n.geometry.animations||n.animations}for(var i=0;i<r.length;i++)if(r[i].name===t)return r[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,r){for(var n={},i=/^([\w-]*?)([\d]+)$/,a=0,o=e.length;a<o;a++){var s=e[a],l=s.name.match(i);if(l&&l.length>1){var c=l[1],h=n[c];h||(n[c]=h=[]),h.push(s)}}var u=[];for(var d in n)u.push(mp.CreateFromMorphTargetSequence(d,n[d],t,r));return u},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var r=function(e,t,r,n,i){if(0!==r.length){var a=[],o=[];rp.flattenJSON(r,a,o,n),0!==a.length&&i.push(new e(t,a,o))}},n=[],i=e.name||"default",a=e.fps||30,o=e.blendMode,s=e.length||-1,l=e.hierarchy||[],c=0;c<l.length;c++){var h=l[c].keys;if(h&&0!==h.length)if(h[0].morphTargets){var u={},d=void 0;for(d=0;d<h.length;d++)if(h[d].morphTargets)for(var p=0;p<h[d].morphTargets.length;p++)u[h[d].morphTargets[p]]=-1;for(var f in u){for(var m=[],v=[],g=0;g!==h[d].morphTargets.length;++g){var y=h[d];m.push(y.time),v.push(y.morphTarget===f?1:0)}n.push(new hp(".morphTargetInfluence["+f+"]",m,v))}s=u.length*(a||1)}else{var x=".bones["+t[c].name+"]";r(fp,x+".position",h,"pos",n),r(dp,x+".quaternion",h,"rot",n),r(fp,x+".scale",h,"scl",n)}}if(0===n.length)return null;var b=new mp(i,s,n,o);return b}}),Object.assign(mp.prototype,{resetDuration:function(){for(var e=this.tracks,t=0,r=0,n=e.length;r!==n;++r){var i=this.tracks[r];t=Math.max(t,i.times[i.times.length-1])}return this.duration=t,this},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},validate:function(){for(var e=!0,t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this},clone:function(){for(var e=[],t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new mp(this.name,this.duration,e,this.blendMode)}});var yp={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function xp(e,t,r){var n=this,i=!1,a=0,o=0,s=void 0,l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=r,this.itemStart=function(e){o++,!1===i&&void 0!==n.onStart&&n.onStart(e,a,o),i=!0},this.itemEnd=function(e){a++,void 0!==n.onProgress&&n.onProgress(e,a,o),a===o&&(i=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(e){void 0!==n.onError&&n.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){var t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(var t=0,r=l.length;t<r;t+=2){var n=l[t],i=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}var bp=new xp;function wp(e){this.manager=void 0!==e?e:bp,this.crossOrigin="anonymous",this.path="",this.resourcePath="",this.requestHeader={}}Object.assign(wp.prototype,{load:function(){},loadAsync:function(e,t){var r=this;return new Promise((function(n,i){r.load(e,n,t,i)}))},parse:function(){},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}});var _p={};function Mp(e){wp.call(this,e)}function Sp(e){wp.call(this,e)}function Ap(e){wp.call(this,e)}function Ep(e){wp.call(this,e)}function Tp(e){wp.call(this,e)}function Cp(e){wp.call(this,e)}function Lp(e){wp.call(this,e)}function Rp(){this.type="Curve",this.arcLengthDivisions=200}function Pp(e,t,r,n,i,a,o,s){Rp.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=r||1,this.yRadius=n||1,this.aStartAngle=i||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=o||!1,this.aRotation=s||0}function Op(e,t,r,n,i,a){Pp.call(this,e,t,r,r,n,i,a),this.type="ArcCurve"}function Ip(){var e=0,t=0,r=0,n=0;function i(i,a,o,s){e=i,t=o,r=-3*i+3*a-2*o-s,n=2*i-2*a+o+s}return{initCatmullRom:function(e,t,r,n,a){i(t,r,a*(r-e),a*(n-t))},initNonuniformCatmullRom:function(e,t,r,n,a,o,s){var l=(t-e)/a-(r-e)/(a+o)+(r-t)/o,c=(r-t)/o-(n-t)/(o+s)+(n-r)/s;l*=o,c*=o,i(t,r,l,c)},calc:function(i){var a=i*i,o=a*i;return e+t*i+r*a+n*o}}}Mp.prototype=Object.assign(Object.create(wp.prototype),{constructor:Mp,load:function(e,t,r,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,a=yp.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;if(void 0===_p[e]){var o,s=/^data:(.*?)(;base64)?,(.*)$/,l=e.match(s);if(l){var c=l[1],h=!!l[2],u=l[3];u=decodeURIComponent(u),h&&(u=atob(u));try{var d,p=(this.responseType||"").toLowerCase();switch(p){case"arraybuffer":case"blob":for(var f=new Uint8Array(u.length),m=0;m<u.length;m++)f[m]=u.charCodeAt(m);d="blob"===p?new Blob([f.buffer],{type:c}):f.buffer;break;case"document":var v=new DOMParser;d=v.parseFromString(u,c);break;case"json":d=JSON.parse(u);break;default:d=u;break}setTimeout((function(){t&&t(d),i.manager.itemEnd(e)}),0)}catch(y){setTimeout((function(){n&&n(y),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{for(var g in _p[e]=[],_p[e].push({onLoad:t,onProgress:r,onError:n}),o=new XMLHttpRequest,o.open("GET",e,!0),o.addEventListener("load",(function(t){var r=this.response,n=_p[e];if(delete _p[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),yp.add(e,r);for(var a=0,o=n.length;a<o;a++){var s=n[a];s.onLoad&&s.onLoad(r)}i.manager.itemEnd(e)}else{for(var l=0,c=n.length;l<c;l++){var h=n[l];h.onError&&h.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),o.addEventListener("progress",(function(t){for(var r=_p[e],n=0,i=r.length;n<i;n++){var a=r[n];a.onProgress&&a.onProgress(t)}}),!1),o.addEventListener("error",(function(t){var r=_p[e];delete _p[e];for(var n=0,a=r.length;n<a;n++){var o=r[n];o.onError&&o.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),o.addEventListener("abort",(function(t){var r=_p[e];delete _p[e];for(var n=0,a=r.length;n<a;n++){var o=r[n];o.onError&&o.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(o.responseType=this.responseType),void 0!==this.withCredentials&&(o.withCredentials=this.withCredentials),o.overrideMimeType&&o.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)o.setRequestHeader(g,this.requestHeader[g]);o.send(null)}return i.manager.itemStart(e),o}_p[e].push({onLoad:t,onProgress:r,onError:n})},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this}}),Sp.prototype=Object.assign(Object.create(wp.prototype),{constructor:Sp,load:function(e,t,r,n){var i=this,a=new Mp(i.manager);a.setPath(i.path),a.load(e,(function(r){try{t(i.parse(JSON.parse(r)))}catch(a){n?n(a):console.error(a),i.manager.itemError(e)}}),r,n)},parse:function(e){for(var t=[],r=0;r<e.length;r++){var n=mp.parse(e[r]);t.push(n)}return t}}),Ap.prototype=Object.assign(Object.create(wp.prototype),{constructor:Ap,load:function(e,t,r,n){var i=this,a=[],o=new xu;o.image=a;var s=new Mp(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer");var l=0;function c(c){s.load(e[c],(function(e){var r=i.parse(e,!0);a[c]={width:r.width,height:r.height,format:r.format,mipmaps:r.mipmaps},l+=1,6===l&&(1===r.mipmapCount&&(o.minFilter=xe),o.format=r.format,o.needsUpdate=!0,t&&t(o))}),r,n)}if(Array.isArray(e))for(var h=0,u=e.length;h<u;++h)c(h);else s.load(e,(function(e){var r=i.parse(e,!0);if(r.isCubemap)for(var n=r.mipmaps.length/r.mipmapCount,s=0;s<n;s++){a[s]={mipmaps:[]};for(var l=0;l<r.mipmapCount;l++)a[s].mipmaps.push(r.mipmaps[s*r.mipmapCount+l]),a[s].format=r.format,a[s].width=r.width,a[s].height=r.height}else o.image.width=r.width,o.image.height=r.height,o.mipmaps=r.mipmaps;1===r.mipmapCount&&(o.minFilter=xe),o.format=r.format,o.needsUpdate=!0,t&&t(o)}),r,n);return o}}),Ep.prototype=Object.assign(Object.create(wp.prototype),{constructor:Ep,load:function(e,t,r,n){var i=this,a=new Ca,o=new Mp(this.manager);return o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(e,(function(e){var r=i.parse(e);r&&(void 0!==r.image?a.image=r.image:void 0!==r.data&&(a.image.width=r.width,a.image.height=r.height,a.image.data=r.data),a.wrapS=void 0!==r.wrapS?r.wrapS:de,a.wrapT=void 0!==r.wrapT?r.wrapT:de,a.magFilter=void 0!==r.magFilter?r.magFilter:xe,a.minFilter=void 0!==r.minFilter?r.minFilter:xe,a.anisotropy=void 0!==r.anisotropy?r.anisotropy:1,void 0!==r.format&&(a.format=r.format),void 0!==r.type&&(a.type=r.type),void 0!==r.mipmaps&&(a.mipmaps=r.mipmaps,a.minFilter=_e),1===r.mipmapCount&&(a.minFilter=xe),a.needsUpdate=!0,t&&t(a,r))}),r,n),a}}),Tp.prototype=Object.assign(Object.create(wp.prototype),{constructor:Tp,load:function(e,t,r,n){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,a=yp.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;var o=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){o.removeEventListener("load",s,!1),o.removeEventListener("error",l,!1),yp.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){o.removeEventListener("load",s,!1),o.removeEventListener("error",l,!1),n&&n(t),i.manager.itemError(e),i.manager.itemEnd(e)}return o.addEventListener("load",s,!1),o.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),i.manager.itemStart(e),o.src=e,o}}),Cp.prototype=Object.assign(Object.create(wp.prototype),{constructor:Cp,load:function(e,t,r,n){var i=new yl,a=new Tp(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var o=0;function s(r){a.load(e[r],(function(e){i.images[r]=e,o++,6===o&&(i.needsUpdate=!0,t&&t(i))}),void 0,n)}for(var l=0;l<e.length;++l)s(l);return i}}),Lp.prototype=Object.assign(Object.create(wp.prototype),{constructor:Lp,load:function(e,t,r,n){var i=new Gr,a=new Tp(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(r){i.image=r;var n=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=n?Fe:Ue,i.needsUpdate=!0,void 0!==t&&t(i)}),r,n),i}}),Object.assign(Rp.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var r=this.getUtoTmapping(e);return this.getPoint(r,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],r=0;r<=e;r++)t.push(this.getPoint(r/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],r=0;r<=e;r++)t.push(this.getPointAt(r/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,r=[],n=this.getPoint(0),i=0;r.push(0);for(var a=1;a<=e;a++)t=this.getPoint(a/e),i+=t.distanceTo(n),r.push(i),n=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var r,n=this.getLengths(),i=0,a=n.length;r=t||e*n[a-1];var o,s=0,l=a-1;while(s<=l)if(i=Math.floor(s+(l-s)/2),o=n[i]-r,o<0)s=i+1;else{if(!(o>0)){l=i;break}l=i-1}if(i=l,n[i]===r)return i/(a-1);var c=n[i],h=n[i+1],u=h-c,d=(r-c)/u,p=(i+d)/(a-1);return p},getTangent:function(e,t){var r=1e-4,n=e-r,i=e+r;n<0&&(n=0),i>1&&(i=1);var a=this.getPoint(n),o=this.getPoint(i),s=t||(a.isVector2?new Ur:new Zr);return s.copy(o).sub(a).normalize(),s},getTangentAt:function(e,t){var r=this.getUtoTmapping(e);return this.getTangent(r,t)},computeFrenetFrames:function(e,t){for(var r=new Zr,n=[],i=[],a=[],o=new Zr,s=new nn,l=0;l<=e;l++){var c=l/e;n[l]=this.getTangentAt(c,new Zr),n[l].normalize()}i[0]=new Zr,a[0]=new Zr;var h=Number.MAX_VALUE,u=Math.abs(n[0].x),d=Math.abs(n[0].y),p=Math.abs(n[0].z);u<=h&&(h=u,r.set(1,0,0)),d<=h&&(h=d,r.set(0,1,0)),p<=h&&r.set(0,0,1),o.crossVectors(n[0],r).normalize(),i[0].crossVectors(n[0],o),a[0].crossVectors(n[0],i[0]);for(var f=1;f<=e;f++){if(i[f]=i[f-1].clone(),a[f]=a[f-1].clone(),o.crossVectors(n[f-1],n[f]),o.length()>Number.EPSILON){o.normalize();var m=Math.acos(Fr.clamp(n[f-1].dot(n[f]),-1,1));i[f].applyMatrix4(s.makeRotationAxis(o,m))}a[f].crossVectors(n[f],i[f])}if(!0===t){var v=Math.acos(Fr.clamp(i[0].dot(i[e]),-1,1));v/=e,n[0].dot(o.crossVectors(i[0],i[e]))>0&&(v=-v);for(var g=1;g<=e;g++)i[g].applyMatrix4(s.makeRotationAxis(n[g],v*g)),a[g].crossVectors(n[g],i[g])}return{tangents:n,normals:i,binormals:a}},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}}),Pp.prototype=Object.create(Rp.prototype),Pp.prototype.constructor=Pp,Pp.prototype.isEllipseCurve=!0,Pp.prototype.getPoint=function(e,t){var r=t||new Ur,n=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)<Number.EPSILON;while(i<0)i+=n;while(i>n)i-=n;i<Number.EPSILON&&(i=a?0:n),!0!==this.aClockwise||a||(i===n?i=-n:i-=n);var o=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(o),l=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var c=Math.cos(this.aRotation),h=Math.sin(this.aRotation),u=s-this.aX,d=l-this.aY;s=u*c-d*h+this.aX,l=u*h+d*c+this.aY}return r.set(s,l)},Pp.prototype.copy=function(e){return Rp.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},Pp.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},Pp.prototype.fromJSON=function(e){return Rp.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},Op.prototype=Object.create(Pp.prototype),Op.prototype.constructor=Op,Op.prototype.isArcCurve=!0;var Dp=new Zr,Np=new Ip,Bp=new Ip,Fp=new Ip;function Up(e,t,r,n){Rp.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=r||"centripetal",this.tension=n||.5}function jp(e,t,r,n,i){var a=.5*(n-t),o=.5*(i-r),s=e*e,l=e*s;return(2*r-2*n+a+o)*l+(-3*r+3*n-2*a-o)*s+a*e+r}function zp(e,t){var r=1-e;return r*r*t}function kp(e,t){return 2*(1-e)*e*t}function Gp(e,t){return e*e*t}function Hp(e,t,r,n){return zp(e,t)+kp(e,r)+Gp(e,n)}function Vp(e,t){var r=1-e;return r*r*r*t}function Wp(e,t){var r=1-e;return 3*r*r*e*t}function Yp(e,t){return 3*(1-e)*e*e*t}function qp(e,t){return e*e*e*t}function Xp(e,t,r,n,i){return Vp(e,t)+Wp(e,r)+Yp(e,n)+qp(e,i)}function Zp(e,t,r,n){Rp.call(this),this.type="CubicBezierCurve",this.v0=e||new Ur,this.v1=t||new Ur,this.v2=r||new Ur,this.v3=n||new Ur}function Jp(e,t,r,n){Rp.call(this),this.type="CubicBezierCurve3",this.v0=e||new Zr,this.v1=t||new Zr,this.v2=r||new Zr,this.v3=n||new Zr}function Qp(e,t){Rp.call(this),this.type="LineCurve",this.v1=e||new Ur,this.v2=t||new Ur}function Kp(e,t){Rp.call(this),this.type="LineCurve3",this.v1=e||new Zr,this.v2=t||new Zr}function $p(e,t,r){Rp.call(this),this.type="QuadraticBezierCurve",this.v0=e||new Ur,this.v1=t||new Ur,this.v2=r||new Ur}function ef(e,t,r){Rp.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new Zr,this.v1=t||new Zr,this.v2=r||new Zr}function tf(e){Rp.call(this),this.type="SplineCurve",this.points=e||[]}Up.prototype=Object.create(Rp.prototype),Up.prototype.constructor=Up,Up.prototype.isCatmullRomCurve3=!0,Up.prototype.getPoint=function(e,t){var r,n,i,a,o=t||new Zr,s=this.points,l=s.length,c=(l-(this.closed?0:1))*e,h=Math.floor(c),u=c-h;if(this.closed?h+=h>0?0:(Math.floor(Math.abs(h)/l)+1)*l:0===u&&h===l-1&&(h=l-2,u=1),this.closed||h>0?r=s[(h-1)%l]:(Dp.subVectors(s[0],s[1]).add(s[0]),r=Dp),n=s[h%l],i=s[(h+1)%l],this.closed||h+2<l?a=s[(h+2)%l]:(Dp.subVectors(s[l-1],s[l-2]).add(s[l-1]),a=Dp),"centripetal"===this.curveType||"chordal"===this.curveType){var d="chordal"===this.curveType?.5:.25,p=Math.pow(r.distanceToSquared(n),d),f=Math.pow(n.distanceToSquared(i),d),m=Math.pow(i.distanceToSquared(a),d);f<1e-4&&(f=1),p<1e-4&&(p=f),m<1e-4&&(m=f),Np.initNonuniformCatmullRom(r.x,n.x,i.x,a.x,p,f,m),Bp.initNonuniformCatmullRom(r.y,n.y,i.y,a.y,p,f,m),Fp.initNonuniformCatmullRom(r.z,n.z,i.z,a.z,p,f,m)}else"catmullrom"===this.curveType&&(Np.initCatmullRom(r.x,n.x,i.x,a.x,this.tension),Bp.initCatmullRom(r.y,n.y,i.y,a.y,this.tension),Fp.initCatmullRom(r.z,n.z,i.z,a.z,this.tension));return o.set(Np.calc(u),Bp.calc(u),Fp.calc(u)),o},Up.prototype.copy=function(e){Rp.prototype.copy.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Up.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);e.points=[];for(var t=0,r=this.points.length;t<r;t++){var n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},Up.prototype.fromJSON=function(e){Rp.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push((new Zr).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Zp.prototype=Object.create(Rp.prototype),Zp.prototype.constructor=Zp,Zp.prototype.isCubicBezierCurve=!0,Zp.prototype.getPoint=function(e,t){var r=t||new Ur,n=this.v0,i=this.v1,a=this.v2,o=this.v3;return r.set(Xp(e,n.x,i.x,a.x,o.x),Xp(e,n.y,i.y,a.y,o.y)),r},Zp.prototype.copy=function(e){return Rp.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Zp.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Zp.prototype.fromJSON=function(e){return Rp.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Jp.prototype=Object.create(Rp.prototype),Jp.prototype.constructor=Jp,Jp.prototype.isCubicBezierCurve3=!0,Jp.prototype.getPoint=function(e,t){var r=t||new Zr,n=this.v0,i=this.v1,a=this.v2,o=this.v3;return r.set(Xp(e,n.x,i.x,a.x,o.x),Xp(e,n.y,i.y,a.y,o.y),Xp(e,n.z,i.z,a.z,o.z)),r},Jp.prototype.copy=function(e){return Rp.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Jp.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Jp.prototype.fromJSON=function(e){return Rp.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Qp.prototype=Object.create(Rp.prototype),Qp.prototype.constructor=Qp,Qp.prototype.isLineCurve=!0,Qp.prototype.getPoint=function(e,t){var r=t||new Ur;return 1===e?r.copy(this.v2):(r.copy(this.v2).sub(this.v1),r.multiplyScalar(e).add(this.v1)),r},Qp.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Qp.prototype.getTangent=function(e,t){var r=t||new Ur;return r.copy(this.v2).sub(this.v1).normalize(),r},Qp.prototype.copy=function(e){return Rp.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Qp.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Qp.prototype.fromJSON=function(e){return Rp.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Kp.prototype=Object.create(Rp.prototype),Kp.prototype.constructor=Kp,Kp.prototype.isLineCurve3=!0,Kp.prototype.getPoint=function(e,t){var r=t||new Zr;return 1===e?r.copy(this.v2):(r.copy(this.v2).sub(this.v1),r.multiplyScalar(e).add(this.v1)),r},Kp.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Kp.prototype.copy=function(e){return Rp.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Kp.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Kp.prototype.fromJSON=function(e){return Rp.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},$p.prototype=Object.create(Rp.prototype),$p.prototype.constructor=$p,$p.prototype.isQuadraticBezierCurve=!0,$p.prototype.getPoint=function(e,t){var r=t||new Ur,n=this.v0,i=this.v1,a=this.v2;return r.set(Hp(e,n.x,i.x,a.x),Hp(e,n.y,i.y,a.y)),r},$p.prototype.copy=function(e){return Rp.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},$p.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},$p.prototype.fromJSON=function(e){return Rp.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},ef.prototype=Object.create(Rp.prototype),ef.prototype.constructor=ef,ef.prototype.isQuadraticBezierCurve3=!0,ef.prototype.getPoint=function(e,t){var r=t||new Zr,n=this.v0,i=this.v1,a=this.v2;return r.set(Hp(e,n.x,i.x,a.x),Hp(e,n.y,i.y,a.y),Hp(e,n.z,i.z,a.z)),r},ef.prototype.copy=function(e){return Rp.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},ef.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},ef.prototype.fromJSON=function(e){return Rp.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},tf.prototype=Object.create(Rp.prototype),tf.prototype.constructor=tf,tf.prototype.isSplineCurve=!0,tf.prototype.getPoint=function(e,t){var r=t||new Ur,n=this.points,i=(n.length-1)*e,a=Math.floor(i),o=i-a,s=n[0===a?a:a-1],l=n[a],c=n[a>n.length-2?n.length-1:a+1],h=n[a>n.length-3?n.length-1:a+2];return r.set(jp(o,s.x,l.x,c.x,h.x),jp(o,s.y,l.y,c.y,h.y)),r},tf.prototype.copy=function(e){Rp.prototype.copy.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push(n.clone())}return this},tf.prototype.toJSON=function(){var e=Rp.prototype.toJSON.call(this);e.points=[];for(var t=0,r=this.points.length;t<r;t++){var n=this.points[t];e.points.push(n.toArray())}return e},tf.prototype.fromJSON=function(e){Rp.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push((new Ur).fromArray(n))}return this};var rf=Object.freeze({__proto__:null,ArcCurve:Op,CatmullRomCurve3:Up,CubicBezierCurve:Zp,CubicBezierCurve3:Jp,EllipseCurve:Pp,LineCurve:Qp,LineCurve3:Kp,QuadraticBezierCurve:$p,QuadraticBezierCurve3:ef,SplineCurve:tf});function nf(){Rp.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function af(e){nf.call(this),this.type="Path",this.currentPoint=new Ur,e&&this.setFromPoints(e)}function of(e){af.call(this,e),this.uuid=Fr.generateUUID(),this.type="Shape",this.holes=[]}function sf(e,t){_n.call(this),this.type="Light",this.color=new pi(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function lf(e,t,r){sf.call(this,e,r),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(_n.DefaultUp),this.updateMatrix(),this.groundColor=new pi(t)}function cf(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new Ur(512,512),this.map=null,this.mapPass=null,this.matrix=new nn,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Pa,this._frameExtents=new Ur(1,1),this._viewportCount=1,this._viewports=[new Hr(0,0,1,1)]}function hf(){cf.call(this,new Ma(50,1,.5,500))}function uf(e,t,r,n,i,a){sf.call(this,e,t),this.type="SpotLight",this.position.copy(_n.DefaultUp),this.updateMatrix(),this.target=new _n,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==r?r:0,this.angle=void 0!==n?n:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==a?a:1,this.shadow=new hf}function df(){cf.call(this,new Ma(90,1,.5,500)),this._frameExtents=new Ur(4,2),this._viewportCount=6,this._viewports=[new Hr(2,1,1,1),new Hr(0,1,1,1),new Hr(3,1,1,1),new Hr(1,1,1,1),new Hr(3,0,1,1),new Hr(1,0,1,1)],this._cubeDirections=[new Zr(1,0,0),new Zr(-1,0,0),new Zr(0,0,1),new Zr(0,0,-1),new Zr(0,1,0),new Zr(0,-1,0)],this._cubeUps=[new Zr(0,1,0),new Zr(0,1,0),new Zr(0,1,0),new Zr(0,1,0),new Zr(0,0,1),new Zr(0,0,-1)]}function pf(e,t,r,n){sf.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==r?r:0,this.decay=void 0!==n?n:1,this.shadow=new df}function ff(e,t,r,n,i,a){_a.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=void 0!==e?e:-1,this.right=void 0!==t?t:1,this.top=void 0!==r?r:1,this.bottom=void 0!==n?n:-1,this.near=void 0!==i?i:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function mf(){cf.call(this,new ff(-5,5,5,-5,.5,500))}function vf(e,t){sf.call(this,e,t),this.type="DirectionalLight",this.position.copy(_n.DefaultUp),this.updateMatrix(),this.target=new _n,this.shadow=new mf}function gf(e,t){sf.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function yf(e,t,r,n){sf.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==r?r:10,this.height=void 0!==n?n:10}function xf(){this.coefficients=[];for(var e=0;e<9;e++)this.coefficients.push(new Zr)}function bf(e,t){sf.call(this,void 0,t),this.type="LightProbe",this.sh=void 0!==e?e:new xf}function wf(e){wp.call(this,e),this.textures={}}nf.prototype=Object.assign(Object.create(Rp.prototype),{constructor:nf,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Qp(t,e))},getPoint:function(e){var t=e*this.getLength(),r=this.getCurveLengths(),n=0;while(n<r.length){if(r[n]>=t){var i=r[n]-t,a=this.curves[n],o=a.getLength(),s=0===o?0:1-i/o;return a.getPointAt(s)}n++}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,r=0,n=this.curves.length;r<n;r++)t+=this.curves[r].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],r=0;r<=e;r++)t.push(this.getPoint(r/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,r=[],n=0,i=this.curves;n<i.length;n++)for(var a=i[n],o=a&&a.isEllipseCurve?2*e:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?e*a.points.length:e,s=a.getPoints(o),l=0;l<s.length;l++){var c=s[l];t&&t.equals(c)||(r.push(c),t=c)}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r},copy:function(e){Rp.prototype.copy.call(this,e),this.curves=[];for(var t=0,r=e.curves.length;t<r;t++){var n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=Rp.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,r=this.curves.length;t<r;t++){var n=this.curves[t];e.curves.push(n.toJSON())}return e},fromJSON:function(e){Rp.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,r=e.curves.length;t<r;t++){var n=e.curves[t];this.curves.push((new rf[n.type]).fromJSON(n))}return this}}),af.prototype=Object.assign(Object.create(nf.prototype),{constructor:af,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,r=e.length;t<r;t++)this.lineTo(e[t].x,e[t].y);return this},moveTo:function(e,t){return this.currentPoint.set(e,t),this},lineTo:function(e,t){var r=new Qp(this.currentPoint.clone(),new Ur(e,t));return this.curves.push(r),this.currentPoint.set(e,t),this},quadraticCurveTo:function(e,t,r,n){var i=new $p(this.currentPoint.clone(),new Ur(e,t),new Ur(r,n));return this.curves.push(i),this.currentPoint.set(r,n),this},bezierCurveTo:function(e,t,r,n,i,a){var o=new Zp(this.currentPoint.clone(),new Ur(e,t),new Ur(r,n),new Ur(i,a));return this.curves.push(o),this.currentPoint.set(i,a),this},splineThru:function(e){var t=[this.currentPoint.clone()].concat(e),r=new tf(t);return this.curves.push(r),this.currentPoint.copy(e[e.length-1]),this},arc:function(e,t,r,n,i,a){var o=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+o,t+s,r,n,i,a),this},absarc:function(e,t,r,n,i,a){return this.absellipse(e,t,r,r,n,i,a),this},ellipse:function(e,t,r,n,i,a,o,s){var l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,r,n,i,a,o,s),this},absellipse:function(e,t,r,n,i,a,o,s){var l=new Pp(e,t,r,n,i,a,o,s);if(this.curves.length>0){var c=l.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(l);var h=l.getPoint(1);return this.currentPoint.copy(h),this},copy:function(e){return nf.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=nf.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return nf.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),of.prototype=Object.assign(Object.create(af.prototype),{constructor:of,getPointsHoles:function(e){for(var t=[],r=0,n=this.holes.length;r<n;r++)t[r]=this.holes[r].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){af.prototype.copy.call(this,e),this.holes=[];for(var t=0,r=e.holes.length;t<r;t++){var n=e.holes[t];this.holes.push(n.clone())}return this},toJSON:function(){var e=af.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,r=this.holes.length;t<r;t++){var n=this.holes[t];e.holes.push(n.toJSON())}return e},fromJSON:function(e){af.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,r=e.holes.length;t<r;t++){var n=e.holes[t];this.holes.push((new af).fromJSON(n))}return this}}),sf.prototype=Object.assign(Object.create(_n.prototype),{constructor:sf,isLight:!0,copy:function(e){return _n.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=_n.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),lf.prototype=Object.assign(Object.create(sf.prototype),{constructor:lf,isHemisphereLight:!0,copy:function(e){return sf.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(cf.prototype,{_projScreenMatrix:new nn,_lightPositionWorld:new Zr,_lookTarget:new Zr,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(e){var t=this.camera,r=this.matrix,n=this._projScreenMatrix,i=this._lookTarget,a=this._lightPositionWorld;a.setFromMatrixPosition(e.matrixWorld),t.position.copy(a),i.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(i),t.updateMatrixWorld(),n.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(n),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(t.projectionMatrix),r.multiply(t.matrixWorldInverse)},getViewport:function(e){return this._viewports[e]},getFrameExtents:function(){return this._frameExtents},copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),hf.prototype=Object.assign(Object.create(cf.prototype),{constructor:hf,isSpotLightShadow:!0,updateMatrices:function(e){var t=this.camera,r=2*Fr.RAD2DEG*e.angle,n=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;r===t.fov&&n===t.aspect&&i===t.far||(t.fov=r,t.aspect=n,t.far=i,t.updateProjectionMatrix()),cf.prototype.updateMatrices.call(this,e)}}),uf.prototype=Object.assign(Object.create(sf.prototype),{constructor:uf,isSpotLight:!0,copy:function(e){return sf.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),df.prototype=Object.assign(Object.create(cf.prototype),{constructor:df,isPointLightShadow:!0,updateMatrices:function(e,t){void 0===t&&(t=0);var r=this.camera,n=this.matrix,i=this._lightPositionWorld,a=this._lookTarget,o=this._projScreenMatrix;i.setFromMatrixPosition(e.matrixWorld),r.position.copy(i),a.copy(r.position),a.add(this._cubeDirections[t]),r.up.copy(this._cubeUps[t]),r.lookAt(a),r.updateMatrixWorld(),n.makeTranslation(-i.x,-i.y,-i.z),o.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(o)}}),pf.prototype=Object.assign(Object.create(sf.prototype),{constructor:pf,isPointLight:!0,copy:function(e){return sf.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),ff.prototype=Object.assign(Object.create(_a.prototype),{constructor:ff,isOrthographicCamera:!0,copy:function(e,t){return _a.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,r,n,i,a){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=r,this.view.offsetY=n,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.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,n=(this.top+this.bottom)/2,i=r-e,a=r+e,o=n+t,s=n-t;if(null!==this.view&&this.view.enabled){var l=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=l*this.view.offsetX,a=i+l*this.view.width,o-=c*this.view.offsetY,s=o-c*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=_n.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),mf.prototype=Object.assign(Object.create(cf.prototype),{constructor:mf,isDirectionalLightShadow:!0,updateMatrices:function(e){cf.prototype.updateMatrices.call(this,e)}}),vf.prototype=Object.assign(Object.create(sf.prototype),{constructor:vf,isDirectionalLight:!0,copy:function(e){return sf.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),gf.prototype=Object.assign(Object.create(sf.prototype),{constructor:gf,isAmbientLight:!0}),yf.prototype=Object.assign(Object.create(sf.prototype),{constructor:yf,isRectAreaLight:!0,copy:function(e){return sf.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=sf.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(xf.prototype,{isSphericalHarmonics3:!0,set:function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this},zero:function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this},getAt:function(e,t){var r=e.x,n=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*n),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*r),t.addScaledVector(a[4],r*n*1.092548),t.addScaledVector(a[5],n*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],r*i*1.092548),t.addScaledVector(a[8],.546274*(r*r-n*n)),t},getIrradianceAt:function(e,t){var r=e.x,n=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*n),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*r),t.addScaledVector(a[4],.858086*r*n),t.addScaledVector(a[5],.858086*n*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*r*i),t.addScaledVector(a[8],.429043*(r*r-n*n)),t},add:function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this},addScaledSH:function(e,t){for(var r=0;r<9;r++)this.coefficients[r].addScaledVector(e.coefficients[r],t);return this},scale:function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this},lerp:function(e,t){for(var r=0;r<9;r++)this.coefficients[r].lerp(e.coefficients[r],t);return this},equals:function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0},copy:function(e){return this.set(e.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(e,t){void 0===t&&(t=0);for(var r=this.coefficients,n=0;n<9;n++)r[n].fromArray(e,t+3*n);return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);for(var r=this.coefficients,n=0;n<9;n++)r[n].toArray(e,t+3*n);return e}}),Object.assign(xf,{getBasisAt:function(e,t){var r=e.x,n=e.y,i=e.z;t[0]=.282095,t[1]=.488603*n,t[2]=.488603*i,t[3]=.488603*r,t[4]=1.092548*r*n,t[5]=1.092548*n*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*r*i,t[8]=.546274*(r*r-n*n)}}),bf.prototype=Object.assign(Object.create(sf.prototype),{constructor:bf,isLightProbe:!0,copy:function(e){return sf.prototype.copy.call(this,e),this.sh.copy(e.sh),this},fromJSON:function(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this},toJSON:function(e){var t=sf.prototype.toJSON.call(this,e);return t.object.sh=this.sh.toArray(),t}}),wf.prototype=Object.assign(Object.create(wp.prototype),{constructor:wf,load:function(e,t,r,n){var i=this,a=new Mp(i.manager);a.setPath(i.path),a.load(e,(function(r){try{t(i.parse(JSON.parse(r)))}catch(a){n?n(a):console.error(a),i.manager.itemError(e)}}),r,n)},parse:function(e){var t=this.textures;function r(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var n=new tp[e.type];if(void 0!==e.uuid&&(n.uuid=e.uuid),void 0!==e.name&&(n.name=e.name),void 0!==e.color&&n.color.setHex(e.color),void 0!==e.roughness&&(n.roughness=e.roughness),void 0!==e.metalness&&(n.metalness=e.metalness),void 0!==e.sheen&&(n.sheen=(new pi).setHex(e.sheen)),void 0!==e.emissive&&n.emissive.setHex(e.emissive),void 0!==e.specular&&n.specular.setHex(e.specular),void 0!==e.shininess&&(n.shininess=e.shininess),void 0!==e.clearcoat&&(n.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(n.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.fog&&(n.fog=e.fog),void 0!==e.flatShading&&(n.flatShading=e.flatShading),void 0!==e.blending&&(n.blending=e.blending),void 0!==e.combine&&(n.combine=e.combine),void 0!==e.side&&(n.side=e.side),void 0!==e.opacity&&(n.opacity=e.opacity),void 0!==e.transparent&&(n.transparent=e.transparent),void 0!==e.alphaTest&&(n.alphaTest=e.alphaTest),void 0!==e.depthTest&&(n.depthTest=e.depthTest),void 0!==e.depthWrite&&(n.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(n.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(n.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(n.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(n.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(n.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(n.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(n.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(n.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(n.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(n.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(n.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(n.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(n.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(n.rotation=e.rotation),1!==e.linewidth&&(n.linewidth=e.linewidth),void 0!==e.dashSize&&(n.dashSize=e.dashSize),void 0!==e.gapSize&&(n.gapSize=e.gapSize),void 0!==e.scale&&(n.scale=e.scale),void 0!==e.polygonOffset&&(n.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(n.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(n.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(n.skinning=e.skinning),void 0!==e.morphTargets&&(n.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(n.morphNormals=e.morphNormals),void 0!==e.dithering&&(n.dithering=e.dithering),void 0!==e.vertexTangents&&(n.vertexTangents=e.vertexTangents),void 0!==e.visible&&(n.visible=e.visible),void 0!==e.toneMapped&&(n.toneMapped=e.toneMapped),void 0!==e.userData&&(n.userData=e.userData),void 0!==e.vertexColors&&("number"===typeof e.vertexColors?n.vertexColors=e.vertexColors>0:n.vertexColors=e.vertexColors),void 0!==e.uniforms)for(var i in e.uniforms){var a=e.uniforms[i];switch(n.uniforms[i]={},a.type){case"t":n.uniforms[i].value=r(a.value);break;case"c":n.uniforms[i].value=(new pi).setHex(a.value);break;case"v2":n.uniforms[i].value=(new Ur).fromArray(a.value);break;case"v3":n.uniforms[i].value=(new Zr).fromArray(a.value);break;case"v4":n.uniforms[i].value=(new Hr).fromArray(a.value);break;case"m3":n.uniforms[i].value=(new jr).fromArray(a.value);case"m4":n.uniforms[i].value=(new nn).fromArray(a.value);break;default:n.uniforms[i].value=a.value}}if(void 0!==e.defines&&(n.defines=e.defines),void 0!==e.vertexShader&&(n.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(n.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var o in e.extensions)n.extensions[o]=e.extensions[o];if(void 0!==e.shading&&(n.flatShading=1===e.shading),void 0!==e.size&&(n.size=e.size),void 0!==e.sizeAttenuation&&(n.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(n.map=r(e.map)),void 0!==e.matcap&&(n.matcap=r(e.matcap)),void 0!==e.alphaMap&&(n.alphaMap=r(e.alphaMap)),void 0!==e.bumpMap&&(n.bumpMap=r(e.bumpMap)),void 0!==e.bumpScale&&(n.bumpScale=e.bumpScale),void 0!==e.normalMap&&(n.normalMap=r(e.normalMap)),void 0!==e.normalMapType&&(n.normalMapType=e.normalMapType),void 0!==e.normalScale){var s=e.normalScale;!1===Array.isArray(s)&&(s=[s,s]),n.normalScale=(new Ur).fromArray(s)}return void 0!==e.displacementMap&&(n.displacementMap=r(e.displacementMap)),void 0!==e.displacementScale&&(n.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(n.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(n.roughnessMap=r(e.roughnessMap)),void 0!==e.metalnessMap&&(n.metalnessMap=r(e.metalnessMap)),void 0!==e.emissiveMap&&(n.emissiveMap=r(e.emissiveMap)),void 0!==e.emissiveIntensity&&(n.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(n.specularMap=r(e.specularMap)),void 0!==e.envMap&&(n.envMap=r(e.envMap)),void 0!==e.envMapIntensity&&(n.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(n.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(n.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(n.lightMap=r(e.lightMap)),void 0!==e.lightMapIntensity&&(n.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(n.aoMap=r(e.aoMap)),void 0!==e.aoMapIntensity&&(n.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(n.gradientMap=r(e.gradientMap)),void 0!==e.clearcoatMap&&(n.clearcoatMap=r(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(n.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(n.clearcoatNormalMap=r(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(n.clearcoatNormalScale=(new Ur).fromArray(e.clearcoatNormalScale)),n},setTextures:function(e){return this.textures=e,this}});var _f={decodeText:function(e){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",r=0,n=e.length;r<n;r++)t+=String.fromCharCode(e[r]);try{return decodeURIComponent(escape(t))}catch(i){return t}},extractUrlBase:function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}};function Mf(){Gi.call(this),this.type="InstancedBufferGeometry",this.instanceCount=1/0}function Sf(e,t,r,n){"number"===typeof r&&(n=r,r=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),Mi.call(this,e,t,r),this.meshPerAttribute=n||1}function Af(e){wp.call(this,e)}Mf.prototype=Object.assign(Object.create(Gi.prototype),{constructor:Mf,isInstancedBufferGeometry:!0,copy:function(e){return Gi.prototype.copy.call(this,e),this.instanceCount=e.instanceCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e=Gi.prototype.toJSON.call(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}),Sf.prototype=Object.assign(Object.create(Mi.prototype),{constructor:Sf,isInstancedBufferAttribute:!0,copy:function(e){return Mi.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},toJSON:function(){var e=Mi.prototype.toJSON.call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}),Af.prototype=Object.assign(Object.create(wp.prototype),{constructor:Af,load:function(e,t,r,n){var i=this,a=new Mp(i.manager);a.setPath(i.path),a.load(e,(function(r){try{t(i.parse(JSON.parse(r)))}catch(a){n?n(a):console.error(a),i.manager.itemError(e)}}),r,n)},parse:function(e){var t={},r={};function n(e,r){if(void 0!==t[r])return t[r];var n=e.interleavedBuffers,a=n[r],o=i(e,a.buffer),s=new Ef[a.type](o),l=new _h(s,a.stride);return l.uuid=a.uuid,t[r]=l,l}function i(e,t){if(void 0!==r[t])return r[t];var n=e.arrayBuffers,i=n[t],a=new Uint32Array(i).buffer;return r[t]=a,a}var a=e.isInstancedBufferGeometry?new Mf:new Gi,o=e.data.index;if(void 0!==o){var s=new Ef[o.type](o.array);a.setIndex(new Mi(s,1))}var l=e.data.attributes;for(var c in l){var h=l[c],u=void 0;if(h.isInterleavedBufferAttribute){var d=n(e.data,h.data);u=new Ah(d,h.itemSize,h.offset,h.normalized)}else{var p=new Ef[h.type](h.array),f=h.isInstancedBufferAttribute?Sf:Mi;u=new f(p,h.itemSize,h.normalized)}void 0!==h.name&&(u.name=h.name),a.setAttribute(c,u)}var m=e.data.morphAttributes;if(m)for(var v in m){for(var g=m[v],y=[],x=0,b=g.length;x<b;x++){var w=g[x],_=void 0;if(w.isInterleavedBufferAttribute){var M=n(e.data,w.data);_=new Ah(M,w.itemSize,w.offset,w.normalized)}else{var S=new Ef[w.type](w.array);_=new Mi(S,w.itemSize,w.normalized)}void 0!==w.name&&(_.name=w.name),y.push(_)}a.morphAttributes[v]=y}var A=e.data.morphTargetsRelative;A&&(a.morphTargetsRelative=!0);var E=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==E)for(var T=0,C=E.length;T!==C;++T){var L=E[T];a.addGroup(L.start,L.count,L.materialIndex)}var R=e.data.boundingSphere;if(void 0!==R){var P=new Zr;void 0!==R.center&&P.fromArray(R.center),a.boundingSphere=new zn(P,R.radius)}return e.name&&(a.name=e.name),e.userData&&(a.userData=e.userData),a}});var Ef={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!==typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Tf(e){wp.call(this,e)}Tf.prototype=Object.assign(Object.create(wp.prototype),{constructor:Tf,load:function(e,t,r,n){var i=this,a=""===this.path?_f.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;var o=new Mp(i.manager);o.setPath(this.path),o.load(e,(function(r){var a=null;try{a=JSON.parse(r)}catch(s){return void 0!==n&&n(s),void console.error("THREE:ObjectLoader: Can't parse "+e+".",s.message)}var o=a.metadata;void 0!==o&&void 0!==o.type&&"geometry"!==o.type.toLowerCase()?i.parse(a,t):console.error("THREE.ObjectLoader: Can't load "+e)}),r,n)},parse:function(e,t){var r=this.parseShape(e.shapes),n=this.parseGeometries(e.geometries,r),i=this.parseImages(e.images,(function(){void 0!==t&&t(s)})),a=this.parseTextures(e.textures,i),o=this.parseMaterials(e.materials,a),s=this.parseObject(e.object,n,o);return e.animations&&(s.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(s),s},parseShape:function(e){var t={};if(void 0!==e)for(var r=0,n=e.length;r<n;r++){var i=(new of).fromJSON(e[r]);t[i.uuid]=i}return t},parseGeometries:function(e,t){var r,n={};if(void 0!==e)for(var i=new Af,a=0,o=e.length;a<o;a++){var s=void 0,l=e[a];switch(l.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new Vd[l.type](l.width,l.height,l.widthSegments,l.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new Vd[l.type](l.width,l.height,l.depth,l.widthSegments,l.heightSegments,l.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new Vd[l.type](l.radius,l.segments,l.thetaStart,l.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new Vd[l.type](l.radiusTop,l.radiusBottom,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new Vd[l.type](l.radius,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new Vd[l.type](l.radius,l.widthSegments,l.heightSegments,l.phiStart,l.phiLength,l.thetaStart,l.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new Vd[l.type](l.radius,l.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new Vd[l.type](l.innerRadius,l.outerRadius,l.thetaSegments,l.phiSegments,l.thetaStart,l.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new Vd[l.type](l.radius,l.tube,l.radialSegments,l.tubularSegments,l.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new Vd[l.type](l.radius,l.tube,l.tubularSegments,l.radialSegments,l.p,l.q);break;case"TubeGeometry":case"TubeBufferGeometry":s=new Vd[l.type]((new rf[l.path.type]).fromJSON(l.path),l.tubularSegments,l.radius,l.radialSegments,l.closed);break;case"LatheGeometry":case"LatheBufferGeometry":s=new Vd[l.type](l.points,l.segments,l.phiStart,l.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new Vd[l.type](l.vertices,l.indices,l.radius,l.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":r=[];for(var c=0,h=l.shapes.length;c<h;c++){var u=t[l.shapes[c]];r.push(u)}s=new Vd[l.type](r,l.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":r=[];for(var d=0,p=l.shapes.length;d<p;d++){var f=t[l.shapes[d]];r.push(f)}var m=l.options.extrudePath;void 0!==m&&(l.options.extrudePath=(new rf[m.type]).fromJSON(m)),s=new Vd[l.type](r,l.options);break;case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(l);break;case"Geometry":console.error('THREE.ObjectLoader: Loading "Geometry" is not supported anymore.');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+l.type+'"');continue}s.uuid=l.uuid,void 0!==l.name&&(s.name=l.name),!0===s.isBufferGeometry&&void 0!==l.userData&&(s.userData=l.userData),n[l.uuid]=s}return n},parseMaterials:function(e,t){var r={},n={};if(void 0!==e){var i=new wf;i.setTextures(t);for(var a=0,o=e.length;a<o;a++){var s=e[a];if("MultiMaterial"===s.type){for(var l=[],c=0;c<s.materials.length;c++){var h=s.materials[c];void 0===r[h.uuid]&&(r[h.uuid]=i.parse(h)),l.push(r[h.uuid])}n[s.uuid]=l}else void 0===r[s.uuid]&&(r[s.uuid]=i.parse(s)),n[s.uuid]=r[s.uuid]}}return n},parseAnimations:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r],i=mp.parse(n);void 0!==n.uuid&&(i.uuid=n.uuid),t.push(i)}return t},parseImages:function(e,t){var r,n=this,i={};function a(e){return n.manager.itemStart(e),r.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}if(void 0!==e&&e.length>0){var o=new xp(t);r=new Tp(o),r.setCrossOrigin(this.crossOrigin);for(var s=0,l=e.length;s<l;s++){var c=e[s],h=c.url;if(Array.isArray(h)){i[c.uuid]=[];for(var u=0,d=h.length;u<d;u++){var p=h[u],f=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p)?p:n.resourcePath+p;i[c.uuid].push(a(f))}}else{var m=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url)?c.url:n.resourcePath+c.url;i[c.uuid]=a(m)}}}return i},parseTextures:function(e,t){function r(e,t){return"number"===typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var n={};if(void 0!==e)for(var i=0,a=e.length;i<a;i++){var o=e[i];void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===t[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);var s=void 0;s=Array.isArray(t[o.image])?new yl(t[o.image]):new Gr(t[o.image]),s.needsUpdate=!0,s.uuid=o.uuid,void 0!==o.name&&(s.name=o.name),void 0!==o.mapping&&(s.mapping=r(o.mapping,Lf)),void 0!==o.offset&&s.offset.fromArray(o.offset),void 0!==o.repeat&&s.repeat.fromArray(o.repeat),void 0!==o.center&&s.center.fromArray(o.center),void 0!==o.rotation&&(s.rotation=o.rotation),void 0!==o.wrap&&(s.wrapS=r(o.wrap[0],Rf),s.wrapT=r(o.wrap[1],Rf)),void 0!==o.format&&(s.format=o.format),void 0!==o.type&&(s.type=o.type),void 0!==o.encoding&&(s.encoding=o.encoding),void 0!==o.minFilter&&(s.minFilter=r(o.minFilter,Pf)),void 0!==o.magFilter&&(s.magFilter=r(o.magFilter,Pf)),void 0!==o.anisotropy&&(s.anisotropy=o.anisotropy),void 0!==o.flipY&&(s.flipY=o.flipY),void 0!==o.premultiplyAlpha&&(s.premultiplyAlpha=o.premultiplyAlpha),void 0!==o.unpackAlignment&&(s.unpackAlignment=o.unpackAlignment),n[o.uuid]=s}return n},parseObject:function(e,t,r){var n,i,a;function o(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function s(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],n=0,i=e.length;n<i;n++){var a=e[n];void 0===r[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),t.push(r[a])}return t}return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),r[e]}}switch(e.type){case"Scene":n=new Mn,void 0!==e.background&&Number.isInteger(e.background)&&(n.background=new pi(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?n.fog=new wh(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(n.fog=new bh(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":n=new Ma(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(n.focus=e.focus),void 0!==e.zoom&&(n.zoom=e.zoom),void 0!==e.filmGauge&&(n.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(n.filmOffset=e.filmOffset),void 0!==e.view&&(n.view=Object.assign({},e.view));break;case"OrthographicCamera":n=new ff(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(n.zoom=e.zoom),void 0!==e.view&&(n.view=Object.assign({},e.view));break;case"AmbientLight":n=new gf(e.color,e.intensity);break;case"DirectionalLight":n=new vf(e.color,e.intensity);break;case"PointLight":n=new pf(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":n=new yf(e.color,e.intensity,e.width,e.height);break;case"SpotLight":n=new uf(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":n=new lf(e.color,e.groundColor,e.intensity);break;case"LightProbe":n=(new bf).fromJSON(e);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":i=o(e.geometry),a=s(e.material),n=new oa(i,a);break;case"InstancedMesh":i=o(e.geometry),a=s(e.material);var l=e.count,c=e.instanceMatrix;n=new $h(i,a,l),n.instanceMatrix=new Mi(new Float32Array(c.array),16);break;case"LOD":n=new Hh;break;case"Line":n=new ou(o(e.geometry),s(e.material),e.mode);break;case"LineLoop":n=new hu(o(e.geometry),s(e.material));break;case"LineSegments":n=new cu(o(e.geometry),s(e.material));break;case"PointCloud":case"Points":n=new vu(o(e.geometry),s(e.material));break;case"Sprite":n=new jh(s(e.material));break;case"Group":n=new fh;break;default:n=new _n}if(n.uuid=e.uuid,void 0!==e.name&&(n.name=e.name),void 0!==e.matrix?(n.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(n.matrixAutoUpdate=e.matrixAutoUpdate),n.matrixAutoUpdate&&n.matrix.decompose(n.position,n.quaternion,n.scale)):(void 0!==e.position&&n.position.fromArray(e.position),void 0!==e.rotation&&n.rotation.fromArray(e.rotation),void 0!==e.quaternion&&n.quaternion.fromArray(e.quaternion),void 0!==e.scale&&n.scale.fromArray(e.scale)),void 0!==e.castShadow&&(n.castShadow=e.castShadow),void 0!==e.receiveShadow&&(n.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(n.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(n.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(n.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&n.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(n.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(n.visible=e.visible),void 0!==e.frustumCulled&&(n.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(n.renderOrder=e.renderOrder),void 0!==e.userData&&(n.userData=e.userData),void 0!==e.layers&&(n.layers.mask=e.layers),void 0!==e.children)for(var h=e.children,u=0;u<h.length;u++)n.add(this.parseObject(h[u],t,r));if("LOD"===e.type){void 0!==e.autoUpdate&&(n.autoUpdate=e.autoUpdate);for(var d=e.levels,p=0;p<d.length;p++){var f=d[p],m=n.getObjectByProperty("uuid",f.object);void 0!==m&&n.addLevel(m,f.distance)}}return n}});var Cf,Lf={UVMapping:ie,CubeReflectionMapping:ae,CubeRefractionMapping:oe,EquirectangularReflectionMapping:se,EquirectangularRefractionMapping:le,CubeUVReflectionMapping:ce,CubeUVRefractionMapping:he},Rf={RepeatWrapping:ue,ClampToEdgeWrapping:de,MirroredRepeatWrapping:pe},Pf={NearestFilter:fe,NearestMipmapNearestFilter:me,NearestMipmapLinearFilter:ge,LinearFilter:xe,LinearMipmapNearestFilter:be,LinearMipmapLinearFilter:_e};function Of(e){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),wp.call(this,e),this.options={premultiplyAlpha:"none"}}function If(){this.type="ShapePath",this.color=new pi,this.subPaths=[],this.currentPath=null}function Df(e){this.type="Font",this.data=e}function Nf(e,t,r){for(var n=Array.from?Array.from(e):String(e).split(""),i=t/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*i,o=[],s=0,l=0,c=0;c<n.length;c++){var h=n[c];if("\n"===h)s=0,l-=a;else{var u=Bf(h,i,s,l,r);s+=u.offsetX,o.push(u.path)}}return o}function Bf(e,t,r,n,i){var a=i.glyphs[e]||i.glyphs["?"];if(a){var o,s,l,c,h,u,d,p,f=new If;if(a.o)for(var m=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),v=0,g=m.length;v<g;){var y=m[v++];switch(y){case"m":o=m[v++]*t+r,s=m[v++]*t+n,f.moveTo(o,s);break;case"l":o=m[v++]*t+r,s=m[v++]*t+n,f.lineTo(o,s);break;case"q":l=m[v++]*t+r,c=m[v++]*t+n,h=m[v++]*t+r,u=m[v++]*t+n,f.quadraticCurveTo(h,u,l,c);break;case"b":l=m[v++]*t+r,c=m[v++]*t+n,h=m[v++]*t+r,u=m[v++]*t+n,d=m[v++]*t+r,p=m[v++]*t+n,f.bezierCurveTo(h,u,d,p,l,c);break}}return{offsetX:a.ha*t,path:f}}console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".")}function Ff(e){wp.call(this,e)}Of.prototype=Object.assign(Object.create(wp.prototype),{constructor:Of,isImageBitmapLoader:!0,setOptions:function(e){return this.options=e,this},load:function(e,t,r,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,a=yp.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;fetch(e).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,i.options)})).then((function(r){yp.add(e,r),t&&t(r),i.manager.itemEnd(e)})).catch((function(t){n&&n(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}),Object.assign(If.prototype,{moveTo:function(e,t){return this.currentPath=new af,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this},lineTo:function(e,t){return this.currentPath.lineTo(e,t),this},quadraticCurveTo:function(e,t,r,n){return this.currentPath.quadraticCurveTo(e,t,r,n),this},bezierCurveTo:function(e,t,r,n,i,a){return this.currentPath.bezierCurveTo(e,t,r,n,i,a),this},splineThru:function(e){return this.currentPath.splineThru(e),this},toShapes:function(e,t){function r(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r],a=new of;a.curves=i.curves,t.push(a)}return t}function n(e,t){for(var r=t.length,n=!1,i=r-1,a=0;a<r;i=a++){var o=t[i],s=t[a],l=s.x-o.x,c=s.y-o.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(o=t[a],l=-l,s=t[i],c=-c),e.y<o.y||e.y>s.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var h=c*(e.x-o.x)-l*(e.y-o.y);if(0===h)return!0;if(h<0)continue;n=!n}}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 n}var i=xd.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return r(a);var o,s,l,c=[];if(1===a.length)return s=a[0],l=new of,l.curves=s.curves,c.push(l),c;var h=!i(a[0].getPoints());h=e?!h:h;var u,d,p=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=a.length;g<y;g++)s=a[g],u=s.getPoints(),o=i(u),o=e?!o:o,o?(!h&&f[v]&&v++,f[v]={s:new of,p:u},f[v].s.curves=s.curves,h&&v++,m[v]=[]):m[v].push({h:s,p:u[0]});if(!f[0])return r(a);if(f.length>1){for(var x=!1,b=[],w=0,_=f.length;w<_;w++)p[w]=[];for(var M=0,S=f.length;M<S;M++)for(var A=m[M],E=0;E<A.length;E++){for(var T=A[E],C=!0,L=0;L<f.length;L++)n(T.p,f[L].p)&&(M!==L&&b.push({froms:M,tos:L,hole:E}),C?(C=!1,p[L].push(T)):x=!0);C&&p[M].push(T)}b.length>0&&(x||(m=p))}for(var R=0,P=f.length;R<P;R++){l=f[R].s,c.push(l),d=m[R];for(var O=0,I=d.length;O<I;O++)l.holes.push(d[O].h)}return c}}),Object.assign(Df.prototype,{isFont:!0,generateShapes:function(e,t){void 0===t&&(t=100);for(var r=[],n=Nf(e,t,this.data),i=0,a=n.length;i<a;i++)Array.prototype.push.apply(r,n[i].toShapes());return r}}),Ff.prototype=Object.assign(Object.create(wp.prototype),{constructor:Ff,load:function(e,t,r,n){var i=this,a=new Mp(this.manager);a.setPath(this.path),a.load(e,(function(e){var r;try{r=JSON.parse(e)}catch(a){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),r=JSON.parse(e.substring(65,e.length-2))}var n=i.parse(r);t&&t(n)}),r,n)},parse:function(e){return new Df(e)}});var Uf={getContext:function(){return void 0===Cf&&(Cf=new(window.AudioContext||window.webkitAudioContext)),Cf},setContext:function(e){Cf=e}};function jf(e){wp.call(this,e)}function zf(e,t,r){bf.call(this,void 0,r);var n=(new pi).set(e),i=(new pi).set(t),a=new Zr(n.r,n.g,n.b),o=new Zr(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(o).multiplyScalar(s),this.sh.coefficients[1].copy(a).sub(o).multiplyScalar(l)}function kf(e,t){bf.call(this,void 0,t);var r=(new pi).set(e);this.sh.coefficients[0].set(r.r,r.g,r.b).multiplyScalar(2*Math.sqrt(Math.PI))}jf.prototype=Object.assign(Object.create(wp.prototype),{constructor:jf,load:function(e,t,r,n){var i=this,a=new Mp(i.manager);a.setResponseType("arraybuffer"),a.setPath(i.path),a.load(e,(function(r){try{var a=r.slice(0),o=Uf.getContext();o.decodeAudioData(a,(function(e){t(e)}))}catch(s){n?n(s):console.error(s),i.manager.itemError(e)}}),r,n)}}),zf.prototype=Object.assign(Object.create(bf.prototype),{constructor:zf,isHemisphereLightProbe:!0,copy:function(e){return bf.prototype.copy.call(this,e),this},toJSON:function(e){var t=bf.prototype.toJSON.call(this,e);return t}}),kf.prototype=Object.assign(Object.create(bf.prototype),{constructor:kf,isAmbientLightProbe:!0,copy:function(e){return bf.prototype.copy.call(this,e),this},toJSON:function(e){var t=bf.prototype.toJSON.call(this,e);return t}});var Gf=new nn,Hf=new nn;function Vf(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ma,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ma,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 Wf(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}Object.assign(Vf.prototype,{update:function(e){var t=this._cache,r=t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep;if(r){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;var n,i,a=e.projectionMatrix.clone(),o=t.eyeSep/2,s=o*t.near/t.focus,l=t.near*Math.tan(Fr.DEG2RAD*t.fov*.5)/t.zoom;Hf.elements[12]=-o,Gf.elements[12]=o,n=-l*t.aspect+s,i=l*t.aspect+s,a.elements[0]=2*t.near/(i-n),a.elements[8]=(i+n)/(i-n),this.cameraL.projectionMatrix.copy(a),n=-l*t.aspect-s,i=l*t.aspect-s,a.elements[0]=2*t.near/(i-n),a.elements[8]=(i+n)/(i-n),this.cameraR.projectionMatrix.copy(a)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Hf),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Gf)}}),Object.assign(Wf.prototype,{start:function(){this.startTime=("undefined"===typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=("undefined"===typeof performance?Date:performance).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}});var Yf=new Zr,qf=new Yr,Xf=new Zr,Zf=new Zr;function Jf(){_n.call(this),this.type="AudioListener",this.context=Uf.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Wf}function Qf(e){_n.call(this),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this._startedAt=0,this._progress=0,this.filters=[]}Jf.prototype=Object.assign(Object.create(_n.prototype),{constructor:Jf,getInput:function(){return this.gain},removeFilter:function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},updateMatrixWorld:function(e){_n.prototype.updateMatrixWorld.call(this,e);var t=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yf,qf,Xf),Zf.set(0,0,-1).applyQuaternion(qf),t.positionX){var n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Yf.x,n),t.positionY.linearRampToValueAtTime(Yf.y,n),t.positionZ.linearRampToValueAtTime(Yf.z,n),t.forwardX.linearRampToValueAtTime(Zf.x,n),t.forwardY.linearRampToValueAtTime(Zf.y,n),t.forwardZ.linearRampToValueAtTime(Zf.z,n),t.upX.linearRampToValueAtTime(r.x,n),t.upY.linearRampToValueAtTime(r.y,n),t.upZ.linearRampToValueAtTime(r.z,n)}else t.setPosition(Yf.x,Yf.y,Yf.z),t.setOrientation(Zf.x,Zf.y,Zf.z,r.x,r.y,r.z)}}),Qf.prototype=Object.assign(Object.create(_n.prototype),{constructor:Qf,getOutput:function(){return this.gain},setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setMediaElementSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},setMediaStreamSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(e){if(void 0===e&&(e=0),!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){this._startedAt=this.context.currentTime+e;var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e||(e=[]),!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},setDetune:function(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},getDetune:function(){return this.detune},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},setLoopStart:function(e){return this.loopStart=e,this},setLoopEnd:function(e){return this.loopEnd=e,this},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}});var Kf=new Zr,$f=new Yr,em=new Zr,tm=new Zr;function rm(e){Qf.call(this,e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}function nm(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function im(e,t,r){var n,i,a;switch(this.binding=e,this.valueSize=r,t){case"quaternion":n=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*r),this._workIndex=5;break;case"string":case"bool":n=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*r);break;default:n=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*r)}this._mixBufferRegion=n,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}rm.prototype=Object.assign(Object.create(Qf.prototype),{constructor:rm,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){return this.panner.refDistance=e,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){return this.panner.rolloffFactor=e,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){return this.panner.distanceModel=e,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){return this.panner.maxDistance=e,this},setDirectionalCone:function(e,t,r){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=r,this},updateMatrixWorld:function(e){if(_n.prototype.updateMatrixWorld.call(this,e),!0!==this.hasPlaybackControl||!1!==this.isPlaying){this.matrixWorld.decompose(Kf,$f,em),tm.set(0,0,1).applyQuaternion($f);var t=this.panner;if(t.positionX){var r=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Kf.x,r),t.positionY.linearRampToValueAtTime(Kf.y,r),t.positionZ.linearRampToValueAtTime(Kf.z,r),t.orientationX.linearRampToValueAtTime(tm.x,r),t.orientationY.linearRampToValueAtTime(tm.y,r),t.orientationZ.linearRampToValueAtTime(tm.z,r)}else t.setPosition(Kf.x,Kf.y,Kf.z),t.setOrientation(tm.x,tm.y,tm.z)}}}),Object.assign(nm.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),r=0;r<t.length;r++)e+=t[r];return e/t.length}}),Object.assign(im.prototype,{accumulate:function(e,t){var r=this.buffer,n=this.valueSize,i=e*n+n,a=this.cumulativeWeight;if(0===a){for(var o=0;o!==n;++o)r[i+o]=r[o];a=t}else{a+=t;var s=t/a;this._mixBufferRegion(r,i,0,s,n)}this.cumulativeWeight=a},accumulateAdditive:function(e){var t=this.buffer,r=this.valueSize,n=r*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,n,0,e,r),this.cumulativeWeightAdditive+=e},apply:function(e){var t=this.valueSize,r=this.buffer,n=e*t+t,i=this.cumulativeWeight,a=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){var s=t*this._origIndex;this._mixBufferRegion(r,n,s,1-i,t)}a>0&&this._mixBufferRegionAdditive(r,n,this._addIndex*t,1,t);for(var l=t,c=t+t;l!==c;++l)if(r[l]!==r[l+t]){o.setValue(r,n);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,r=this.valueSize,n=r*this._origIndex;e.getValue(t,n);for(var i=r,a=n;i!==a;++i)t[i]=t[n+i%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_setAdditiveIdentityNumeric:function(){for(var e=this._addIndex*this.valueSize,t=e+this.valueSize,r=e;r<t;r++)this.buffer[r]=0},_setAdditiveIdentityQuaternion:function(){this._setAdditiveIdentityNumeric(),this.buffer[4*this._addIndex+3]=1},_setAdditiveIdentityOther:function(){for(var e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize,r=0;r<this.valueSize;r++)this.buffer[t+r]=this.buffer[e+r]},_select:function(e,t,r,n,i){if(n>=.5)for(var a=0;a!==i;++a)e[t+a]=e[r+a]},_slerp:function(e,t,r,n){Yr.slerpFlat(e,t,e,t,e,r,n)},_slerpAdditive:function(e,t,r,n,i){var a=this._workIndex*i;Yr.multiplyQuaternionsFlat(e,a,e,t,e,r),Yr.slerpFlat(e,t,e,t,e,a,n)},_lerp:function(e,t,r,n,i){for(var a=1-n,o=0;o!==i;++o){var s=t+o;e[s]=e[s]*a+e[r+o]*n}},_lerpAdditive:function(e,t,r,n,i){for(var a=0;a!==i;++a){var o=t+a;e[o]=e[o]+e[r+a]*n}}});var am="\\[\\]\\.:\\/",om=new RegExp("["+am+"]","g"),sm="[^"+am+"]",lm="[^"+am.replace("\\.","")+"]",cm=/((?:WC+[\/:])*)/.source.replace("WC",sm),hm=/(WCOD+)?/.source.replace("WCOD",lm),um=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sm),dm=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sm),pm=new RegExp("^"+cm+hm+um+dm+"$"),fm=["material","materials","bones"];function mm(e,t,r){var n=r||vm.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,n)}function vm(e,t,r){this.path=t,this.parsedPath=r||vm.parseTrackName(t),this.node=vm.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function gm(){this.uuid=Fr.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,r=arguments.length;t!==r;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function ym(e,t,r,n){this._mixer=e,this._clip=t,this._localRoot=r||null,this.blendMode=n||t.blendMode;for(var i=t.tracks,a=i.length,o=new Array(a),s={endingStart:Gt,endingEnd:Gt},l=0;l!==a;++l){var c=i[l].createInterpolant(null);o[l]=c,c.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ft,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 xm(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function bm(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function wm(e,t,r){_h.call(this,e,t),this.meshPerAttribute=r||1}function _m(e,t,r,n){this.ray=new Xn(e,t),this.near=r||0,this.far=n||1/0,this.camera=null,this.layers=new ln,this.params={Mesh:{},Line:{threshold:1},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 Mm(e,t){return e.distance-t.distance}function Sm(e,t,r,n){if(e.layers.test(t.layers)&&e.raycast(t,r),!0===n)for(var i=e.children,a=0,o=i.length;a<o;a++)Sm(i[a],t,r,!0)}function Am(e,t,r){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==r?r:0,this}function Em(e,t,r){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==r?r:0,this}Object.assign(mm.prototype,{getValue:function(e,t){this.bind();var r=this._targetGroup.nCachedObjects_,n=this._bindings[r];void 0!==n&&n.getValue(e,t)},setValue:function(e,t){for(var r=this._bindings,n=this._targetGroup.nCachedObjects_,i=r.length;n!==i;++n)r[n].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].unbind()}}),Object.assign(vm,{Composite:mm,create:function(e,t,r){return e&&e.isAnimationObjectGroup?new vm.Composite(e,t,r):new vm(e,t,r)},sanitizeNodeName:function(e){return e.replace(/\s/g,"_").replace(om,"")},parseTrackName:function(e){var t=pm.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var r={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){var i=r.nodeName.substring(n+1);-1!==fm.indexOf(i)&&(r.nodeName=r.nodeName.substring(0,n),r.objectName=i)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r},findNode:function(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var r=e.skeleton.getBoneByName(t);if(void 0!==r)return r}if(e.children){var n=function(e){for(var r=0;r<e.length;r++){var i=e[r];if(i.name===t||i.uuid===t)return i;var a=n(i.children);if(a)return a}return null},i=n(e.children);if(i)return i}return null}}),Object.assign(vm.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)e[t++]=r[n]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)r[n]=e[t++]},function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)r[n]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)r[n]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,r=t.objectName,n=t.propertyName,i=t.propertyIndex;if(e||(e=vm.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(r){var a=t.objectIndex;switch(r){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var o=0;o<e.length;o++)if(e[o].name===a){a=o;break}break;default:if(void 0===e[r])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[r]}if(void 0!==a){if(void 0===e[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[a]}}var s=e[n];if(void 0!==s){var l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);var c=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===n){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}c=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(c=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][l]}else{var h=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+h+"."+n+" but it wasn't found.",e)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(vm.prototype,{_getValue_unbound:vm.prototype.getValue,_setValue_unbound:vm.prototype.setValue}),Object.assign(gm.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=this._indicesByUUID,r=this._paths,n=this._parsedPaths,i=this._bindings,a=i.length,o=void 0,s=e.length,l=this.nCachedObjects_,c=0,h=arguments.length;c!==h;++c){var u=arguments[c],d=u.uuid,p=t[d];if(void 0===p){p=s++,t[d]=p,e.push(u);for(var f=0,m=a;f!==m;++f)i[f].push(new vm(u,r[f],n[f]))}else if(p<l){o=e[p];var v=--l,g=e[v];t[g.uuid]=p,e[p]=g,t[d]=v,e[v]=u;for(var y=0,x=a;y!==x;++y){var b=i[y],w=b[v],_=b[p];b[p]=w,void 0===_&&(_=new vm(u,r[y],n[y])),b[v]=_}}else e[p]!==o&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l},remove:function(){for(var e=this._objects,t=this._indicesByUUID,r=this._bindings,n=r.length,i=this.nCachedObjects_,a=0,o=arguments.length;a!==o;++a){var s=arguments[a],l=s.uuid,c=t[l];if(void 0!==c&&c>=i){var h=i++,u=e[h];t[u.uuid]=c,e[c]=u,t[l]=h,e[h]=s;for(var d=0,p=n;d!==p;++d){var f=r[d],m=f[h],v=f[c];f[c]=m,f[h]=v}}}this.nCachedObjects_=i},uncache:function(){for(var e=this._objects,t=this._indicesByUUID,r=this._bindings,n=r.length,i=this.nCachedObjects_,a=e.length,o=0,s=arguments.length;o!==s;++o){var l=arguments[o],c=l.uuid,h=t[c];if(void 0!==h)if(delete t[c],h<i){var u=--i,d=e[u],p=--a,f=e[p];t[d.uuid]=h,e[h]=d,t[f.uuid]=u,e[u]=f,e.pop();for(var m=0,v=n;m!==v;++m){var g=r[m],y=g[u],x=g[p];g[h]=y,g[u]=x,g.pop()}}else{var b=--a,w=e[b];t[w.uuid]=h,e[h]=w,e.pop();for(var _=0,M=n;_!==M;++_){var S=r[_];S[h]=S[b],S.pop()}}}this.nCachedObjects_=i},subscribe_:function(e,t){var r=this._bindingsIndicesByPath,n=r[e],i=this._bindings;if(void 0!==n)return i[n];var a=this._paths,o=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,h=new Array(l);n=i.length,r[e]=n,a.push(e),o.push(t),i.push(h);for(var u=c,d=s.length;u!==d;++u){var p=s[u];h[u]=new vm(p,e,t)}return h},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,r=t[e];if(void 0!==r){var n=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o],l=e[o];t[l]=r,a[r]=s,a.pop(),i[r]=i[o],i.pop(),n[r]=n[o],n.pop()}}}),Object.assign(ym.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,r){if(e.fadeOut(t),this.fadeIn(t),r){var n=this._clip.duration,i=e._clip.duration,a=i/n,o=n/i;e.warp(1,a,t),this.warp(o,1,t)}return this},crossFadeTo:function(e,t,r){return e.crossFadeFrom(this,t,r)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,r){var n=this._mixer,i=n.time,a=this.timeScale,o=this._timeScaleInterpolant;null===o&&(o=n._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,l=o.sampleValues;return s[0]=i,s[1]=i+r,l[0]=e/a,l[1]=t/a,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,r,n){if(this.enabled){var i=this._startTime;if(null!==i){var a=(e-i)*r;if(a<0||0===r)return;this._startTime=null,t=r*a}t*=this._updateTimeScale(e);var o=this._updateTime(t),s=this._updateWeight(e);if(s>0){var l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case Yt:for(var h=0,u=l.length;h!==u;++h)l[h].evaluate(o),c[h].accumulateAdditive(s);break;case Wt:default:for(var d=0,p=l.length;d!==p;++d)l[d].evaluate(o),c[d].accumulate(n,s)}}}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var r=this._weightInterpolant;if(null!==r){var n=r.evaluate(e)[0];t*=n,e>r.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var r=this._timeScaleInterpolant;if(null!==r){var n=r.evaluate(e)[0];t*=n,e>r.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this._clip.duration,r=this.loop,n=this.time+e,i=this._loopCount,a=r===Ut;if(0===e)return-1===i?n:a&&1===(1&i)?t-n:n;if(r===Bt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(n>=t)n=t;else{if(!(n<0)){this.time=n;break e}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,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)),n>=t||n<0){var o=Math.floor(n/t);n-=t*o,i+=Math.abs(o);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=e>0?t:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var l=e<0;this._setEndings(l,!l,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=n;if(a&&1===(1&i))return t-n}return n},_setEndings:function(e,t,r){var n=this._interpolantSettings;r?(n.endingStart=Ht,n.endingEnd=Ht):(n.endingStart=e?this.zeroSlopeAtStart?Ht:Gt:Vt,n.endingEnd=t?this.zeroSlopeAtEnd?Ht:Gt:Vt)},_scheduleFading:function(e,t,r){var n=this._mixer,i=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=r,this}}),xm.prototype=Object.assign(Object.create(Ir.prototype),{constructor:xm,_bindAction:function(e,t){var r=e._localRoot||this._root,n=e._clip.tracks,i=n.length,a=e._propertyBindings,o=e._interpolants,s=r.uuid,l=this._bindingsByRootAndName,c=l[s];void 0===c&&(c={},l[s]=c);for(var h=0;h!==i;++h){var u=n[h],d=u.name,p=c[d];if(void 0!==p)a[h]=p;else{if(p=a[h],void 0!==p){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,s,d));continue}var f=t&&t._propertyBindings[h].binding.parsedPath;p=new im(vm.create(r,d,f),u.ValueTypeName,u.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,s,d),a[h]=p}o[h].resultBuffer=p.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,r=e._clip.uuid,n=this._actionsByClip[r];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,r,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,r=0,n=t.length;r!==n;++r){var i=t[r];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&&t<this._nActiveActions},_addInactiveAction:function(e,t,r){var n=this._actions,i=this._actionsByClip,a=i[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a;else{var o=a.knownActions;e._byClipCacheIndex=o.length,o.push(e)}e._cacheIndex=n.length,n.push(e),a.actionByRoot[r]=e},_removeInactiveAction:function(e){var t=this._actions,r=t[t.length-1],n=e._cacheIndex;r._cacheIndex=n,t[n]=r,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,a=this._actionsByClip,o=a[i],s=o.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null;var h=o.actionByRoot,u=(e._localRoot||this._root).uuid;delete h[u],0===s.length&&delete a[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,r=0,n=t.length;r!==n;++r){var i=t[r];0===--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,r=e._cacheIndex,n=this._nActiveActions++,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_takeBackAction:function(e){var t=this._actions,r=e._cacheIndex,n=--this._nActiveActions,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_addInactiveBinding:function(e,t,r){var n=this._bindingsByRootAndName,i=this._bindings,a=n[t];void 0===a&&(a={},n[t]=a),a[r]=e,e._cacheIndex=i.length,i.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,r=e.binding,n=r.rootNode.uuid,i=r.path,a=this._bindingsByRootAndName,o=a[n],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete o[i],0===Object.keys(o).length&&delete a[n]},_lendBinding:function(e){var t=this._bindings,r=e._cacheIndex,n=this._nActiveBindings++,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_takeBackBinding:function(e){var t=this._bindings,r=e._cacheIndex,n=--this._nActiveBindings,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,r=e[t];return void 0===r&&(r=new ap(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),r.__cacheIndex=t,e[t]=r),r},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,r=e.__cacheIndex,n=--this._nActiveControlInterpolants,i=t[n];e.__cacheIndex=n,t[n]=e,i.__cacheIndex=r,t[r]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t,r){var n=t||this._root,i=n.uuid,a="string"===typeof e?mp.findByName(n,e):e,o=null!==a?a.uuid:e,s=this._actionsByClip[o],l=null;if(void 0===r&&(r=null!==a?a.blendMode:Wt),void 0!==s){var c=s.actionByRoot[i];if(void 0!==c&&c.blendMode===r)return c;l=s.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;var h=new ym(this,a,t,r);return this._bindAction(h,l),this._addInactiveAction(h,o,i),h},existingAction:function(e,t){var r=t||this._root,n=r.uuid,i="string"===typeof e?mp.findByName(r,e):e,a=i?i.uuid:e,o=this._actionsByClip[a];return void 0!==o&&o.actionByRoot[n]||null},stopAllAction:function(){for(var e=this._actions,t=this._nActiveActions,r=t-1;r>=0;--r)e[r].stop();return this},update:function(e){e*=this.timeScale;for(var t=this._actions,r=this._nActiveActions,n=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1,o=0;o!==r;++o){var s=t[o];s._update(n,e,i,a)}for(var l=this._bindings,c=this._nActiveBindings,h=0;h!==c;++h)l[h].apply(a);return this},setTime:function(e){this.time=0;for(var t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,r=e.uuid,n=this._actionsByClip,i=n[r];if(void 0!==i){for(var a=i.knownActions,o=0,s=a.length;o!==s;++o){var l=a[o];this._deactivateAction(l);var c=l._cacheIndex,h=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,h._cacheIndex=c,t[c]=h,t.pop(),this._removeInactiveBindingsForAction(l)}delete n[r]}},uncacheRoot:function(e){var t=e.uuid,r=this._actionsByClip;for(var n in r){var i=r[n].actionByRoot,a=i[t];void 0!==a&&(this._deactivateAction(a),this._removeInactiveAction(a))}var o=this._bindingsByRootAndName,s=o[t];if(void 0!==s)for(var l in s){var c=s[l];c.restoreOriginalState(),this._removeInactiveBinding(c)}},uncacheAction:function(e,t){var r=this.existingAction(e,t);null!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}}),bm.prototype.clone=function(){return new bm(void 0===this.value.clone?this.value:this.value.clone())},wm.prototype=Object.assign(Object.create(_h.prototype),{constructor:wm,isInstancedInterleavedBuffer:!0,copy:function(e){return _h.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},clone:function(e){var t=_h.prototype.clone.call(this,e);return t.meshPerAttribute=this.meshPerAttribute,t},toJSON:function(e){var t=_h.prototype.toJSON.call(this,e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}),Object.assign(_m.prototype,{set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(e,t,r){var n=r||[];return Sm(e,this,n,t),n.sort(Mm),n},intersectObjects:function(e,t,r){var n=r||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var i=0,a=e.length;i<a;i++)Sm(e[i],this,n,t);return n.sort(Mm),n}}),Object.assign(Am.prototype,{set:function(e,t,r){return this.radius=e,this.phi=t,this.theta=r,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){var e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,r){return this.radius=Math.sqrt(e*e+t*t+r*r),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,r),this.phi=Math.acos(Fr.clamp(t/this.radius,-1,1))),this}}),Object.assign(Em.prototype,{set:function(e,t,r){return this.radius=e,this.theta=t,this.y=r,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,r){return this.radius=Math.sqrt(e*e+r*r),this.theta=Math.atan2(e,r),this.y=t,this}});var Tm=new Ur;function Cm(e,t){this.min=void 0!==e?e:new Ur(1/0,1/0),this.max=void 0!==t?t:new Ur(-1/0,-1/0)}Object.assign(Cm.prototype,{set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(e,t){var r=Tm.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new Ur),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new Ur),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.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 Ur),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.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Ur),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=Tm.copy(e).clamp(this.min,this.max);return t.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 Lm=new Zr,Rm=new Zr;function Pm(e,t){this.start=void 0!==e?e:new Zr,this.end=void 0!==t?t:new Zr}function Om(e){_n.call(this),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}Object.assign(Pm.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 Zr),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 Zr),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 Zr),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){Lm.subVectors(e,this.start),Rm.subVectors(this.end,this.start);var r=Rm.dot(Rm),n=Rm.dot(Lm),i=n/r;return t&&(i=Fr.clamp(i,0,1)),i},closestPointToPoint:function(e,t,r){var n=this.closestPointToPointParameter(e,t);return void 0===r&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),r=new Zr),this.delta(r).multiplyScalar(n).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)}}),Om.prototype=Object.create(_n.prototype),Om.prototype.constructor=Om,Om.prototype.isImmediateRenderObject=!0;var Im=new Zr;function Dm(e,t){_n.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var r=new Gi,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,a=1,o=32;i<o;i++,a++){var s=i/o*Math.PI*2,l=a/o*Math.PI*2;n.push(Math.cos(s),Math.sin(s),1,Math.cos(l),Math.sin(l),1)}r.setAttribute("position",new Pi(n,3));var c=new eu({fog:!1,toneMapped:!1});this.cone=new cu(r,c),this.add(this.cone),this.update()}Dm.prototype=Object.create(_n.prototype),Dm.prototype.constructor=Dm,Dm.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Dm.prototype.update=function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Im.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Im),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Nm=new Zr,Bm=new nn,Fm=new nn;function Um(e){var t=[];e&&e.isBone&&t.push(e);for(var r=0;r<e.children.length;r++)t.push.apply(t,Um(e.children[r]));return t}function jm(e){for(var t=Um(e),r=new Gi,n=[],i=[],a=new pi(0,0,1),o=new pi(0,1,0),s=0;s<t.length;s++){var l=t[s];l.parent&&l.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),i.push(a.r,a.g,a.b),i.push(o.r,o.g,o.b))}r.setAttribute("position",new Pi(n,3)),r.setAttribute("color",new Pi(i,3));var c=new eu({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});cu.call(this,r,c),this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function zm(e,t,r){this.light=e,this.light.updateMatrixWorld(),this.color=r;var n=new Ld(t,4,2),i=new bi({wireframe:!0,fog:!1,toneMapped:!1});oa.call(this,n,i),this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}jm.prototype=Object.create(cu.prototype),jm.prototype.constructor=jm,jm.prototype.isSkeletonHelper=!0,jm.prototype.updateMatrixWorld=function(e){var t=this.bones,r=this.geometry,n=r.getAttribute("position");Fm.getInverse(this.root.matrixWorld);for(var i=0,a=0;i<t.length;i++){var o=t[i];o.parent&&o.parent.isBone&&(Bm.multiplyMatrices(Fm,o.matrixWorld),Nm.setFromMatrixPosition(Bm),n.setXYZ(a,Nm.x,Nm.y,Nm.z),Bm.multiplyMatrices(Fm,o.parent.matrixWorld),Nm.setFromMatrixPosition(Bm),n.setXYZ(a+1,Nm.x,Nm.y,Nm.z),a+=2)}r.getAttribute("position").needsUpdate=!0,_n.prototype.updateMatrixWorld.call(this,e)},zm.prototype=Object.create(oa.prototype),zm.prototype.constructor=zm,zm.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},zm.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};var km=new Zr,Gm=new pi,Hm=new pi;function Vm(e,t,r){_n.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r;var n=new Ru(t);n.rotateY(.5*Math.PI),this.material=new bi({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);var i=n.getAttribute("position"),a=new Float32Array(3*i.count);n.setAttribute("color",new Mi(a,3)),this.add(new oa(n,this.material)),this.update()}function Wm(e,t,r,n){e=e||10,t=t||10,r=new pi(void 0!==r?r:4473924),n=new pi(void 0!==n?n:8947848);for(var i=t/2,a=e/t,o=e/2,s=[],l=[],c=0,h=0,u=-o;c<=t;c++,u+=a){s.push(-o,0,u,o,0,u),s.push(u,0,-o,u,0,o);var d=c===i?r:n;d.toArray(l,h),h+=3,d.toArray(l,h),h+=3,d.toArray(l,h),h+=3,d.toArray(l,h),h+=3}var p=new Gi;p.setAttribute("position",new Pi(s,3)),p.setAttribute("color",new Pi(l,3));var f=new eu({vertexColors:!0,toneMapped:!1});cu.call(this,p,f),this.type="GridHelper"}function Ym(e,t,r,n,i,a){e=e||10,t=t||16,r=r||8,n=n||64,i=new pi(void 0!==i?i:4473924),a=new pi(void 0!==a?a:8947848);for(var o=[],s=[],l=0;l<=t;l++){var c=l/t*(2*Math.PI),h=Math.sin(c)*e,u=Math.cos(c)*e;o.push(0,0,0),o.push(h,0,u);var d=1&l?i:a;s.push(d.r,d.g,d.b),s.push(d.r,d.g,d.b)}for(var p=0;p<=r;p++)for(var f=1&p?i:a,m=e-e/r*p,v=0;v<n;v++){var g=v/n*(2*Math.PI),y=Math.sin(g)*m,x=Math.cos(g)*m;o.push(y,0,x),s.push(f.r,f.g,f.b),g=(v+1)/n*(2*Math.PI),y=Math.sin(g)*m,x=Math.cos(g)*m,o.push(y,0,x),s.push(f.r,f.g,f.b)}var b=new Gi;b.setAttribute("position",new Pi(o,3)),b.setAttribute("color",new Pi(s,3));var w=new eu({vertexColors:!0,toneMapped:!1});cu.call(this,b,w),this.type="PolarGridHelper"}Vm.prototype=Object.create(_n.prototype),Vm.prototype.constructor=Vm,Vm.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Vm.prototype.update=function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");Gm.copy(this.light.color),Hm.copy(this.light.groundColor);for(var r=0,n=t.count;r<n;r++){var i=r<n/2?Gm:Hm;t.setXYZ(r,i.r,i.g,i.b)}t.needsUpdate=!0}e.lookAt(km.setFromMatrixPosition(this.light.matrixWorld).negate())},Wm.prototype=Object.assign(Object.create(cu.prototype),{constructor:Wm,copy:function(e){return cu.prototype.copy.call(this,e),this.geometry.copy(e.geometry),this.material.copy(e.material),this},clone:function(){return(new this.constructor).copy(this)}}),Ym.prototype=Object.create(cu.prototype),Ym.prototype.constructor=Ym;var qm=new Zr,Xm=new Zr,Zm=new Zr;function Jm(e,t,r){_n.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r,void 0===t&&(t=1);var n=new Gi;n.setAttribute("position",new Pi([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));var i=new eu({fog:!1,toneMapped:!1});this.lightPlane=new ou(n,i),this.add(this.lightPlane),n=new Gi,n.setAttribute("position",new Pi([0,0,0,0,0,1],3)),this.targetLine=new ou(n,i),this.add(this.targetLine),this.update()}Jm.prototype=Object.create(_n.prototype),Jm.prototype.constructor=Jm,Jm.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Jm.prototype.update=function(){qm.setFromMatrixPosition(this.light.matrixWorld),Xm.setFromMatrixPosition(this.light.target.matrixWorld),Zm.subVectors(Xm,qm),this.lightPlane.lookAt(Xm),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Xm),this.targetLine.scale.z=Zm.length()};var Qm=new Zr,Km=new _a;function $m(e){var t=new Gi,r=new eu({color:16777215,vertexColors:!0,toneMapped:!1}),n=[],i=[],a={},o=new pi(16755200),s=new pi(16711680),l=new pi(43775),c=new pi(16777215),h=new pi(3355443);function u(e,t,r){d(e,r),d(t,r)}function d(e,t){n.push(0,0,0),i.push(t.r,t.g,t.b),void 0===a[e]&&(a[e]=[]),a[e].push(n.length/3-1)}u("n1","n2",o),u("n2","n4",o),u("n4","n3",o),u("n3","n1",o),u("f1","f2",o),u("f2","f4",o),u("f4","f3",o),u("f3","f1",o),u("n1","f1",o),u("n2","f2",o),u("n3","f3",o),u("n4","f4",o),u("p","n1",s),u("p","n2",s),u("p","n3",s),u("p","n4",s),u("u1","u2",l),u("u2","u3",l),u("u3","u1",l),u("c","t",c),u("p","c",h),u("cn1","cn2",h),u("cn3","cn4",h),u("cf1","cf2",h),u("cf3","cf4",h),t.setAttribute("position",new Pi(n,3)),t.setAttribute("color",new Pi(i,3)),cu.call(this,t,r),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function ev(e,t,r,n,i,a,o){Qm.set(i,a,o).unproject(n);var s=t[e];if(void 0!==s)for(var l=r.getAttribute("position"),c=0,h=s.length;c<h;c++)l.setXYZ(s[c],Qm.x,Qm.y,Qm.z)}$m.prototype=Object.create(cu.prototype),$m.prototype.constructor=$m,$m.prototype.update=function(){var e=this.geometry,t=this.pointMap,r=1,n=1;Km.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),ev("c",t,e,Km,0,0,-1),ev("t",t,e,Km,0,0,1),ev("n1",t,e,Km,-r,-n,-1),ev("n2",t,e,Km,r,-n,-1),ev("n3",t,e,Km,-r,n,-1),ev("n4",t,e,Km,r,n,-1),ev("f1",t,e,Km,-r,-n,1),ev("f2",t,e,Km,r,-n,1),ev("f3",t,e,Km,-r,n,1),ev("f4",t,e,Km,r,n,1),ev("u1",t,e,Km,.7*r,1.1*n,-1),ev("u2",t,e,Km,.7*-r,1.1*n,-1),ev("u3",t,e,Km,0,2*n,-1),ev("cf1",t,e,Km,-r,0,1),ev("cf2",t,e,Km,r,0,1),ev("cf3",t,e,Km,0,-n,1),ev("cf4",t,e,Km,0,n,1),ev("cn1",t,e,Km,-r,0,-1),ev("cn2",t,e,Km,r,0,-1),ev("cn3",t,e,Km,0,-n,-1),ev("cn4",t,e,Km,0,n,-1),e.getAttribute("position").needsUpdate=!0};var tv=new Fn;function rv(e,t){this.object=e,void 0===t&&(t=16776960);var r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),i=new Gi;i.setIndex(new Mi(r,1)),i.setAttribute("position",new Mi(n,3)),cu.call(this,i,new eu({color:t,toneMapped:!1})),this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}function nv(e,t){this.type="Box3Helper",this.box=e,t=t||16776960;var r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],i=new Gi;i.setIndex(new Mi(r,1)),i.setAttribute("position",new Pi(n,3)),cu.call(this,i,new eu({color:t,toneMapped:!1})),this.type="Box3Helper",this.geometry.computeBoundingSphere()}function iv(e,t,r){this.plane=e,this.size=void 0===t?1:t;var n=void 0!==r?r:16776960,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,0,1,0,0,0],a=new Gi;a.setAttribute("position",new Pi(i,3)),a.computeBoundingSphere(),ou.call(this,a,new eu({color:n,toneMapped:!1})),this.type="PlaneHelper";var o=[1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],s=new Gi;s.setAttribute("position",new Pi(o,3)),s.computeBoundingSphere(),this.add(new oa(s,new bi({color:n,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}rv.prototype=Object.create(cu.prototype),rv.prototype.constructor=rv,rv.prototype.update=function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&tv.setFromObject(this.object),!tv.isEmpty()){var t=tv.min,r=tv.max,n=this.geometry.attributes.position,i=n.array;i[0]=r.x,i[1]=r.y,i[2]=r.z,i[3]=t.x,i[4]=r.y,i[5]=r.z,i[6]=t.x,i[7]=t.y,i[8]=r.z,i[9]=r.x,i[10]=t.y,i[11]=r.z,i[12]=r.x,i[13]=r.y,i[14]=t.z,i[15]=t.x,i[16]=r.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=r.x,i[22]=t.y,i[23]=t.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}},rv.prototype.setFromObject=function(e){return this.object=e,this.update(),this},rv.prototype.copy=function(e){return cu.prototype.copy.call(this,e),this.object=e.object,this},rv.prototype.clone=function(){return(new this.constructor).copy(this)},nv.prototype=Object.create(cu.prototype),nv.prototype.constructor=nv,nv.prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),_n.prototype.updateMatrixWorld.call(this,e))},iv.prototype=Object.create(ou.prototype),iv.prototype.constructor=iv,iv.prototype.updateMatrixWorld=function(e){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?m:f,this.lookAt(this.plane.normal),_n.prototype.updateMatrixWorld.call(this,e)};var av,ov,sv=new Zr;function lv(e,t,r,n,i,a){_n.call(this),this.type="ArrowHelper",void 0===e&&(e=new Zr(0,0,1)),void 0===t&&(t=new Zr(0,0,0)),void 0===r&&(r=1),void 0===n&&(n=16776960),void 0===i&&(i=.2*r),void 0===a&&(a=.2*i),void 0===av&&(av=new Gi,av.setAttribute("position",new Pi([0,0,0,0,1,0],3)),ov=new jd(0,.5,1,5,1),ov.translate(0,-.5,0)),this.position.copy(t),this.line=new ou(av,new eu({color:n,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new oa(ov,new bi({color:n,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(r,i,a)}function cv(e){e=e||1;var t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],n=new Gi;n.setAttribute("position",new Pi(t,3)),n.setAttribute("color",new Pi(r,3));var i=new eu({vertexColors:!0,toneMapped:!1});cu.call(this,n,i),this.type="AxesHelper"}lv.prototype=Object.create(_n.prototype),lv.prototype.constructor=lv,lv.prototype.setDirection=function(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{sv.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(sv,t)}},lv.prototype.setLength=function(e,t,r){void 0===t&&(t=.2*e),void 0===r&&(r=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(r,t,r),this.cone.position.y=e,this.cone.updateMatrix()},lv.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},lv.prototype.copy=function(e){return _n.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},lv.prototype.clone=function(){return(new this.constructor).copy(this)},cv.prototype=Object.create(cu.prototype),cv.prototype.constructor=cv;var hv=4,uv=8,dv=Math.pow(2,uv),pv=[.125,.215,.35,.446,.526,.582],fv=uv-hv+1+pv.length,mv=20,vv={};vv[Jt]=0,vv[Qt]=1,vv[$t]=2,vv[tr]=3,vv[rr]=4,vv[nr]=5,vv[Kt]=6;var gv=new ff,yv=Cv(),xv=yv._lodPlanes,bv=yv._sizeLods,wv=yv._sigmas,_v=null,Mv=(1+Math.sqrt(5))/2,Sv=1/Mv,Av=[new Zr(1,1,1),new Zr(-1,1,1),new Zr(1,1,-1),new Zr(-1,1,-1),new Zr(0,Mv,Sv),new Zr(0,Mv,-Sv),new Zr(Sv,0,Mv),new Zr(-Sv,0,Mv),new Zr(Mv,Sv,0),new Zr(-Mv,Sv,0)];function Ev(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=Pv(mv),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}function Tv(e){return void 0!==e&&e.type===Se&&(e.encoding===Jt||e.encoding===Qt||e.encoding===Kt)}function Cv(){for(var e=[],t=[],r=[],n=uv,i=0;i<fv;i++){var a=Math.pow(2,n);t.push(a);var o=1/a;i>uv-hv?o=pv[i-uv+hv-1]:0==i&&(o=0),r.push(o);for(var s=1/(a-1),l=-s/2,c=1+s/2,h=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,d=6,p=3,f=2,m=1,v=new Float32Array(p*d*u),g=new Float32Array(f*d*u),y=new Float32Array(m*d*u),x=0;x<u;x++){var b=x%3*2/3-1,w=x>2?0:-1,_=[b,w,0,b+2/3,w,0,b+2/3,w+1,0,b,w,0,b+2/3,w+1,0,b,w+1,0];v.set(_,p*d*x),g.set(h,f*d*x);var M=[x,x,x,x,x,x];y.set(M,m*d*x)}var S=new Gi;S.setAttribute("position",new Mi(v,p)),S.setAttribute("uv",new Mi(g,f)),S.setAttribute("faceIndex",new Mi(y,m)),e.push(S),n>hv&&n--}return{_lodPlanes:e,_sizeLods:t,_sigmas:r}}function Lv(e){var t=new Vr(3*dv,3*dv,e);return t.texture.mapping=ce,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function Rv(e,t,r,n,i){e.viewport.set(t,r,n,i),e.scissor.set(t,r,n,i)}function Pv(e){var t=new Float32Array(e),r=new Zr(0,1,0),n=new Yd({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r},inputEncoding:{value:vv[Jt]},outputEncoding:{value:vv[Jt]}},vertexShader:Dv(),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"+Nv()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",blending:x,depthTest:!1,depthWrite:!1});return n}function Ov(){var e=new Ur(1,1),t=new Yd({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:vv[Jt]},outputEncoding:{value:vv[Jt]}},vertexShader:Dv(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+Nv()+"\n\n#include <common>\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv = equirectUv( outputDirection );\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",blending:x,depthTest:!1,depthWrite:!1});return t}function Iv(){var e=new Yd({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:vv[Jt]},outputEncoding:{value:vv[Jt]}},vertexShader:Dv(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n"+Nv()+"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",blending:x,depthTest:!1,depthWrite:!1});return e}function Dv(){return"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\n\n// RH coordinate system; PMREM face-indexing convention\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\t} else if (face == 2.0) {\n\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\t} else if (face == 5.0) {\n\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\t}\n\treturn direction;\n}\n\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t"}function Nv(){return"\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include <encodings_pars_fragment>\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 Bv(e,t,r,n,i,a,o){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new gi(e,t,r,i,a,o)}Ev.prototype={constructor:Ev,fromScene:function(e,t,r,n){void 0===t&&(t=0),void 0===r&&(r=.1),void 0===n&&(n=100),_v=this._renderer.getRenderTarget();var i=this._allocateTargets();return this._sceneToCubeUV(e,r,n,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i},fromEquirectangular:function(e){return this._fromTexture(e)},fromCubemap:function(e){return this._fromTexture(e)},compileCubemapShader:function(){null===this._cubemapShader&&(this._cubemapShader=Iv(),this._compileMaterial(this._cubemapShader))},compileEquirectangularShader:function(){null===this._equirectShader&&(this._equirectShader=Ov(),this._compileMaterial(this._equirectShader))},dispose:function(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(var e=0;e<xv.length;e++)xv[e].dispose()},_cleanup:function(e){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(_v),e.scissorTest=!1,Rv(e,0,0,e.width,e.height)},_fromTexture:function(e){_v=this._renderer.getRenderTarget();var t=this._allocateTargets(e);return this._textureToCubeUV(e,t),this._applyPMREM(t),this._cleanup(t),t},_allocateTargets:function(e){var t={magFilter:fe,minFilter:fe,generateMipmaps:!1,type:Se,format:ke,encoding:Tv(e)?e.encoding:$t,depthBuffer:!1,stencilBuffer:!1},r=Lv(t);return r.depthBuffer=!e,this._pingPongRenderTarget=Lv(t),r},_compileMaterial:function(e){var t=new oa(xv[0],e);this._renderer.compile(t,gv)},_sceneToCubeUV:function(e,t,r,n){var i=90,a=1,o=new Ma(i,a,t,r),s=[1,-1,1,1,1,1],l=[1,1,1,-1,-1,-1],c=this._renderer,h=c.outputEncoding,u=c.toneMapping,d=c.getClearColor(),p=c.getClearAlpha();c.toneMapping=K,c.outputEncoding=Jt;var f=e.background;if(f&&f.isColor){f.convertSRGBToLinear();var m=Math.max(f.r,f.g,f.b),v=Math.min(Math.max(Math.ceil(Math.log2(m)),-128),127);f=f.multiplyScalar(Math.pow(2,-v));var g=(v+128)/255;c.setClearColor(f,g),e.background=null}for(var y=0;y<6;y++){var x=y%3;0==x?(o.up.set(0,s[y],0),o.lookAt(l[y],0,0)):1==x?(o.up.set(0,0,s[y]),o.lookAt(0,l[y],0)):(o.up.set(0,s[y],0),o.lookAt(0,0,l[y])),Rv(n,x*dv,y>2?dv:0,dv,dv),c.setRenderTarget(n),c.render(e,o)}c.toneMapping=u,c.outputEncoding=h,c.setClearColor(d,p)},_textureToCubeUV:function(e,t){var r=this._renderer;e.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=Iv()):null==this._equirectShader&&(this._equirectShader=Ov());var n=e.isCubeTexture?this._cubemapShader:this._equirectShader,i=new oa(xv[0],n),a=n.uniforms;a["envMap"].value=e,e.isCubeTexture||a["texelSize"].value.set(1/e.image.width,1/e.image.height),a["inputEncoding"].value=vv[e.encoding],a["outputEncoding"].value=vv[t.texture.encoding],Rv(t,0,0,3*dv,2*dv),r.setRenderTarget(t),r.render(i,gv)},_applyPMREM:function(e){var t=this._renderer,r=t.autoClear;t.autoClear=!1;for(var n=1;n<fv;n++){var i=Math.sqrt(wv[n]*wv[n]-wv[n-1]*wv[n-1]),a=Av[(n-1)%Av.length];this._blur(e,n-1,n,i,a)}t.autoClear=r},_blur:function(e,t,r,n,i){var a=this._pingPongRenderTarget;this._halfBlur(e,a,t,r,n,"latitudinal",i),this._halfBlur(a,e,r,r,n,"longitudinal",i)},_halfBlur:function(e,t,r,n,i,a,o){var s=this._renderer,l=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");var c=3,h=new oa(xv[n],l),u=l.uniforms,d=bv[r]-1,p=isFinite(i)?Math.PI/(2*d):2*Math.PI/(2*mv-1),f=i/p,m=isFinite(i)?1+Math.floor(c*f):mv;m>mv&&console.warn("sigmaRadians, "+i+", is too large and will clip, as it requested "+m+" samples when the maximum is set to "+mv);for(var v=[],g=0,y=0;y<mv;++y){var x=y/f,b=Math.exp(-x*x/2);v.push(b),0==y?g+=b:y<m&&(g+=2*b)}for(var w=0;w<v.length;w++)v[w]=v[w]/g;u["envMap"].value=e.texture,u["samples"].value=m,u["weights"].value=v,u["latitudinal"].value="latitudinal"===a,o&&(u["poleAxis"].value=o),u["dTheta"].value=p,u["mipInt"].value=uv-r,u["inputEncoding"].value=vv[e.texture.encoding],u["outputEncoding"].value=vv[e.texture.encoding];var _=bv[n],M=3*Math.max(0,dv-2*_),S=(0===n?0:2*dv)+2*_*(n>uv-hv?n-uv+hv:0);Rv(t,M,S,3*_,2*_),s.setRenderTarget(t),s.render(h,gv)}};var Fv=0,Uv=1,jv=0,zv=1,kv=2;function Gv(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function Hv(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}function Vv(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new vu(e,t)}function Wv(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new jh(e)}function Yv(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new vu(e,t)}function qv(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new uu(e)}function Xv(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new uu(e)}function Zv(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new uu(e)}function Jv(e,t,r){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Zr(e,t,r)}function Qv(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Mi(e,t).setUsage(Ar)}function Kv(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Si(e,t)}function $v(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Ai(e,t)}function eg(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Ei(e,t)}function tg(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Ti(e,t)}function rg(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Ci(e,t)}function ng(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Li(e,t)}function ig(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Ri(e,t)}function ag(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Pi(e,t)}function og(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Oi(e,t)}function sg(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Up.call(this,e),this.type="catmullrom",this.closed=!0}function lg(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Up.call(this,e),this.type="catmullrom"}function cg(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Up.call(this,e),this.type="catmullrom"}function hg(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cv(e)}function ug(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new rv(e,t)}function dg(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new cu(new Fd(e.geometry),new eu({color:void 0!==t?t:16777215}))}function pg(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new cu(new _u(e.geometry),new eu({color:void 0!==t?t:16777215}))}function fg(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Mp(e)}function mg(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ep(e)}function vg(e,t,r){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Ta(e,r)}Rp.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Rp.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(nf.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 pa,r=0,n=e.length;r<n;r++){var i=e[r];t.vertices.push(new Zr(i.x,i.y,i.z||0))}return t}}),Object.assign(af.prototype,{fromPoints:function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),sg.prototype=Object.create(Up.prototype),lg.prototype=Object.create(Up.prototype),cg.prototype=Object.create(Up.prototype),Object.assign(cg.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),Wm.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},jm.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(wp.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),_f.extractUrlBase(e)}}),wp.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Object.assign(Tf.prototype,{setTexturePath:function(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}),Object.assign(Cm.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(Fn.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(zn.prototype,{empty:function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()}}),Pa.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Pm.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(Fr,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Fr.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Fr.ceilPowerOfTwo(e)}}),Object.assign(jr.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(nn.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new Zr).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,r,n,i,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,n,r,i,a)}}),Kn.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Yr.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Object.assign(Xn.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(ci.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(ci,{barycoordFromPoint:function(e,t,r,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),ci.getBarycoord(e,t,r,n,i)},normal:function(e,t,r,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),ci.getNormal(e,t,r,n)}}),Object.assign(of.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new _d(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Dd(this,e)}}),Object.assign(Ur.prototype,{fromAttribute:function(e,t,r){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Zr.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,r){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Hr.prototype,{fromAttribute:function(e,t,r){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(pa.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(e){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.assign(_n.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(_n.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.assign(oa.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}),Object.defineProperties(oa.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),qt},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Object.defineProperties(Hh.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(qh.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Vh.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(Rp.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),Ma.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(sf.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(Mi.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Ar},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Ar)}}}),Object.assign(Mi.prototype,{setDynamic:function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Ar:Sr),this},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},setArray:function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(Gi.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addAttribute:function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new Mi(arguments[1],arguments[2])))},addDrawCall:function(e,t,r){void 0!==r&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},removeAttribute:function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},applyMatrix:function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(Gi.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(Mf.prototype,{maxInstancedCount:{get:function(){return console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount},set:function(e){console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount=e}}}),Object.defineProperties(_m.prototype,{linePrecision:{get:function(){return console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold},set:function(e){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold=e}}}),Object.defineProperties(_h.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.usage===Ar},set:function(e){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(e)}}}),Object.assign(_h.prototype,{setDynamic:function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?Ar:Sr),this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(Md.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(bm.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(xi.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new pi}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===g}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Zd.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(wa.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(yh.prototype,{clearTarget:function(e,t,r,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,r,n)},animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTexture2D:function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()}}),Object.defineProperties(yh.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?Qt:Jt}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(ch.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Vr.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(Qf.prototype,{load:{value:function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this,r=new jf;return r.load(e,(function(e){t.setBuffer(e)})),this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}}),nm.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ea.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)};var gg={merge:function(e,t,r){var n;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),n=t.matrix,t=t.geometry),e.merge(t,n,r)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}};function yg(){console.error("THREE.CanvasRenderer has been removed")}function xg(){console.error("THREE.JSONLoader has been removed.")}zr.crossOrigin=void 0,zr.loadTexture=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Lp;i.setCrossOrigin(this.crossOrigin);var a=i.load(e,r,void 0,n);return t&&(a.mapping=t),a},zr.loadTextureCube=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Cp;i.setCrossOrigin(this.crossOrigin);var a=i.load(e,r,void 0,n);return t&&(a.mapping=t),a},zr.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},zr.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};var bg={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function wg(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:t}})),e.ACESFilmicToneMapping=re,e.AddEquation=A,e.AddOperation=Q,e.AdditiveAnimationBlendMode=Yt,e.AdditiveBlending=w,e.AlphaFormat=Be,e.AlwaysDepth=G,e.AlwaysStencilFunc=Mr,e.AmbientLight=gf,e.AmbientLightProbe=kf,e.AnimationClip=mp,e.AnimationLoader=Sp,e.AnimationMixer=xm,e.AnimationObjectGroup=gm,e.AnimationUtils=rp,e.ArcCurve=Op,e.ArrayCamera=ph,e.ArrowHelper=lv,e.Audio=Qf,e.AudioAnalyser=nm,e.AudioContext=Uf,e.AudioListener=Jf,e.AudioLoader=jf,e.AxesHelper=cv,e.AxisHelper=hg,e.BackSide=m,e.BasicDepthPacking=ir,e.BasicShadowMap=h,e.BinaryTextureLoader=mg,e.Bone=Xh,e.BooleanKeyframeTrack=lp,e.BoundingBoxHelper=ug,e.Box2=Cm,e.Box3=Fn,e.Box3Helper=nv,e.BoxBufferGeometry=ma,e.BoxGeometry=fa,e.BoxHelper=rv,e.BufferAttribute=Mi,e.BufferGeometry=Gi,e.BufferGeometryLoader=Af,e.ByteType=Ae,e.Cache=yp,e.Camera=_a,e.CameraHelper=$m,e.CanvasRenderer=yg,e.CanvasTexture=bu,e.CatmullRomCurve3=Up,e.CineonToneMapping=te,e.CircleBufferGeometry=Hd,e.CircleGeometry=Gd,e.ClampToEdgeWrapping=de,e.Clock=Wf,e.ClosedSplineCurve3=sg,e.Color=pi,e.ColorKeyframeTrack=cp,e.CompressedTexture=xu,e.CompressedTextureLoader=Ap,e.ConeBufferGeometry=kd,e.ConeGeometry=zd,e.CubeCamera=Ea,e.CubeGeometry=fa,e.CubeReflectionMapping=ae,e.CubeRefractionMapping=oe,e.CubeTexture=yl,e.CubeTextureLoader=Cp,e.CubeUVReflectionMapping=ce,e.CubeUVRefractionMapping=he,e.CubicBezierCurve=Zp,e.CubicBezierCurve3=Jp,e.CubicInterpolant=ip,e.CullFaceBack=a,e.CullFaceFront=o,e.CullFaceFrontBack=s,e.CullFaceNone=i,e.Curve=Rp,e.CurvePath=nf,e.CustomBlending=S,e.CustomToneMapping=ne,e.CylinderBufferGeometry=jd,e.CylinderGeometry=Ud,e.Cylindrical=Em,e.DataTexture=Ca,e.DataTexture2DArray=xl,e.DataTexture3D=bl,e.DataTextureLoader=Ep,e.DecrementStencilOp=dr,e.DecrementWrapStencilOp=fr,e.DefaultLoadingManager=bp,e.DepthFormat=Ge,e.DepthStencilFormat=He,e.DepthTexture=wu,e.DirectionalLight=vf,e.DirectionalLightHelper=Jm,e.DirectionalLightShadow=mf,e.DiscreteInterpolant=op,e.DodecahedronBufferGeometry=Du,e.DodecahedronGeometry=Iu,e.DoubleSide=v,e.DstAlphaFactor=B,e.DstColorFactor=U,e.DynamicBufferAttribute=Qv,e.DynamicCopyUsage=Pr,e.DynamicDrawUsage=Ar,e.DynamicReadUsage=Cr,e.EdgesGeometry=Fd,e.EdgesHelper=dg,e.EllipseCurve=Pp,e.EqualDepth=W,e.EqualStencilFunc=yr,e.EquirectangularReflectionMapping=se,e.EquirectangularRefractionMapping=le,e.Euler=sn,e.EventDispatcher=Ir,e.ExtrudeBufferGeometry=Md,e.ExtrudeGeometry=_d,e.Face3=gi,e.Face4=Bv,e.FaceColors=zv,e.FileLoader=Mp,e.FlatShading=g,e.Float32Attribute=ag,e.Float32BufferAttribute=Pi,e.Float64Attribute=og,e.Float64BufferAttribute=Oi,e.FloatType=Re,e.Fog=wh,e.FogExp2=bh,e.Font=Df,e.FontLoader=Ff,e.FrontFaceDirectionCCW=c,e.FrontFaceDirectionCW=l,e.FrontSide=f,e.Frustum=Pa,e.GammaEncoding=Kt,e.Geometry=pa,e.GeometryUtils=gg,e.GreaterDepth=q,e.GreaterEqualDepth=Y,e.GreaterEqualStencilFunc=_r,e.GreaterStencilFunc=br,e.GridHelper=Wm,e.Group=fh,e.HalfFloatType=Pe,e.HemisphereLight=lf,e.HemisphereLightHelper=Vm,e.HemisphereLightProbe=zf,e.IcosahedronBufferGeometry=Ou,e.IcosahedronGeometry=Pu,e.ImageBitmapLoader=Of,e.ImageLoader=Tp,e.ImageUtils=zr,e.ImmediateRenderObject=Om,e.IncrementStencilOp=ur,e.IncrementWrapStencilOp=pr,e.InstancedBufferAttribute=Sf,e.InstancedBufferGeometry=Mf,e.InstancedInterleavedBuffer=wm,e.InstancedMesh=$h,e.Int16Attribute=tg,e.Int16BufferAttribute=Ti,e.Int32Attribute=ng,e.Int32BufferAttribute=Li,e.Int8Attribute=Kv,e.Int8BufferAttribute=Si,e.IntType=Ce,e.InterleavedBuffer=_h,e.InterleavedBufferAttribute=Ah,e.Interpolant=np,e.InterpolateDiscrete=jt,e.InterpolateLinear=zt,e.InterpolateSmooth=kt,e.InvertStencilOp=mr,e.JSONLoader=xg,e.KeepStencilOp=cr,e.KeyframeTrack=sp,e.LOD=Hh,e.LatheBufferGeometry=Id,e.LatheGeometry=Od,e.Layers=ln,e.LensFlare=wg,e.LessDepth=H,e.LessEqualDepth=V,e.LessEqualStencilFunc=xr,e.LessStencilFunc=gr,e.Light=sf,e.LightProbe=bf,e.LightShadow=cf,e.Line=ou,e.Line3=Pm,e.LineBasicMaterial=eu,e.LineCurve=Qp,e.LineCurve3=Kp,e.LineDashedMaterial=ep,e.LineLoop=hu,e.LinePieces=Uv,e.LineSegments=cu,e.LineStrip=Fv,e.LinearEncoding=Jt,e.LinearFilter=xe,e.LinearInterpolant=ap,e.LinearMipMapLinearFilter=Me,e.LinearMipMapNearestFilter=we,e.LinearMipmapLinearFilter=_e,e.LinearMipmapNearestFilter=be,e.LinearToneMapping=$,e.Loader=wp,e.LoaderUtils=_f,e.LoadingManager=xp,e.LogLuvEncoding=er,e.LoopOnce=Bt,e.LoopPingPong=Ut,e.LoopRepeat=Ft,e.LuminanceAlphaFormat=ze,e.LuminanceFormat=je,e.MOUSE=r,e.Material=xi,e.MaterialLoader=wf,e.Math=Fr,e.MathUtils=Fr,e.Matrix3=jr,e.Matrix4=nn,e.MaxEquation=L,e.Mesh=oa,e.MeshBasicMaterial=bi,e.MeshDepthMaterial=ah,e.MeshDistanceMaterial=oh,e.MeshFaceMaterial=Gv,e.MeshLambertMaterial=Kd,e.MeshMatcapMaterial=$d,e.MeshNormalMaterial=Qd,e.MeshPhongMaterial=Zd,e.MeshPhysicalMaterial=Xd,e.MeshStandardMaterial=qd,e.MeshToonMaterial=Jd,e.MinEquation=C,e.MirroredRepeatWrapping=pe,e.MixOperation=J,e.MultiMaterial=Hv,e.MultiplyBlending=M,e.MultiplyOperation=Z,e.NearestFilter=fe,e.NearestMipMapLinearFilter=ye,e.NearestMipMapNearestFilter=ve,e.NearestMipmapLinearFilter=ge,e.NearestMipmapNearestFilter=me,e.NeverDepth=k,e.NeverStencilFunc=vr,e.NoBlending=x,e.NoColors=jv,e.NoToneMapping=K,e.NormalAnimationBlendMode=Wt,e.NormalBlending=b,e.NotEqualDepth=X,e.NotEqualStencilFunc=wr,e.NumberKeyframeTrack=hp,e.Object3D=_n,e.ObjectLoader=Tf,e.ObjectSpaceNormalMap=sr,e.OctahedronBufferGeometry=Ru,e.OctahedronGeometry=Lu,e.OneFactor=P,e.OneMinusDstAlphaFactor=F,e.OneMinusDstColorFactor=j,e.OneMinusSrcAlphaFactor=N,e.OneMinusSrcColorFactor=I,e.OrthographicCamera=ff,e.PCFShadowMap=u,e.PCFSoftShadowMap=d,e.PMREMGenerator=Ev,e.ParametricBufferGeometry=Su,e.ParametricGeometry=Mu,e.Particle=Wv,e.ParticleBasicMaterial=Xv,e.ParticleSystem=Yv,e.ParticleSystemMaterial=Zv,e.Path=af,e.PerspectiveCamera=Ma,e.Plane=Kn,e.PlaneBufferGeometry=Ba,e.PlaneGeometry=Na,e.PlaneHelper=iv,e.PointCloud=Vv,e.PointCloudMaterial=qv,e.PointLight=pf,e.PointLightHelper=zm,e.Points=vu,e.PointsMaterial=uu,e.PolarGridHelper=Ym,e.PolyhedronBufferGeometry=Eu,e.PolyhedronGeometry=Au,e.PositionalAudio=rm,e.PropertyBinding=vm,e.PropertyMixer=im,e.QuadraticBezierCurve=$p,e.QuadraticBezierCurve3=ef,e.Quaternion=Yr,e.QuaternionKeyframeTrack=dp,e.QuaternionLinearInterpolant=up,e.REVISION=t,e.RGBADepthPacking=ar,e.RGBAFormat=Ue,e.RGBAIntegerFormat=Ze,e.RGBA_ASTC_10x10_Format=yt,e.RGBA_ASTC_10x5_Format=mt,e.RGBA_ASTC_10x6_Format=vt,e.RGBA_ASTC_10x8_Format=gt,e.RGBA_ASTC_12x10_Format=xt,e.RGBA_ASTC_12x12_Format=bt,e.RGBA_ASTC_4x4_Format=st,e.RGBA_ASTC_5x4_Format=lt,e.RGBA_ASTC_5x5_Format=ct,e.RGBA_ASTC_6x5_Format=ht,e.RGBA_ASTC_6x6_Format=ut,e.RGBA_ASTC_8x5_Format=dt,e.RGBA_ASTC_8x6_Format=pt,e.RGBA_ASTC_8x8_Format=ft,e.RGBA_BPTC_Format=wt,e.RGBA_ETC2_EAC_Format=ot,e.RGBA_PVRTC_2BPPV1_Format=nt,e.RGBA_PVRTC_4BPPV1_Format=rt,e.RGBA_S3TC_DXT1_Format=Qe,e.RGBA_S3TC_DXT3_Format=Ke,e.RGBA_S3TC_DXT5_Format=$e,e.RGBDEncoding=nr,e.RGBEEncoding=$t,e.RGBEFormat=ke,e.RGBFormat=Fe,e.RGBIntegerFormat=Xe,e.RGBM16Encoding=rr,e.RGBM7Encoding=tr,e.RGB_ETC1_Format=it,e.RGB_ETC2_Format=at,e.RGB_PVRTC_2BPPV1_Format=tt,e.RGB_PVRTC_4BPPV1_Format=et,e.RGB_S3TC_DXT1_Format=Je,e.RGFormat=Ye,e.RGIntegerFormat=qe,e.RawShaderMaterial=Yd,e.Ray=Xn,e.Raycaster=_m,e.RectAreaLight=yf,e.RedFormat=Ve,e.RedIntegerFormat=We,e.ReinhardToneMapping=ee,e.RepeatWrapping=ue,e.ReplaceStencilOp=hr,e.ReverseSubtractEquation=T,e.RingBufferGeometry=Pd,e.RingGeometry=Rd,e.SRGB8_ALPHA8_ASTC_10x10_Format=It,e.SRGB8_ALPHA8_ASTC_10x5_Format=Rt,e.SRGB8_ALPHA8_ASTC_10x6_Format=Pt,e.SRGB8_ALPHA8_ASTC_10x8_Format=Ot,e.SRGB8_ALPHA8_ASTC_12x10_Format=Dt,e.SRGB8_ALPHA8_ASTC_12x12_Format=Nt,e.SRGB8_ALPHA8_ASTC_4x4_Format=_t,e.SRGB8_ALPHA8_ASTC_5x4_Format=Mt,e.SRGB8_ALPHA8_ASTC_5x5_Format=St,e.SRGB8_ALPHA8_ASTC_6x5_Format=At,e.SRGB8_ALPHA8_ASTC_6x6_Format=Et,e.SRGB8_ALPHA8_ASTC_8x5_Format=Tt,e.SRGB8_ALPHA8_ASTC_8x6_Format=Ct,e.SRGB8_ALPHA8_ASTC_8x8_Format=Lt,e.Scene=Mn,e.SceneUtils=bg,e.ShaderChunk=nl,e.ShaderLib=il,e.ShaderMaterial=wa,e.ShadowMaterial=Wd,e.Shape=of,e.ShapeBufferGeometry=Nd,e.ShapeGeometry=Dd,e.ShapePath=If,e.ShapeUtils=xd,e.ShortType=Ee,e.Skeleton=qh,e.SkeletonHelper=jm,e.SkinnedMesh=Vh,e.SmoothShading=y,e.Sphere=zn,e.SphereBufferGeometry=Ld,e.SphereGeometry=Cd,e.Spherical=Am,e.SphericalHarmonics3=xf,e.Spline=cg,e.SplineCurve=tf,e.SplineCurve3=lg,e.SpotLight=uf,e.SpotLightHelper=Dm,e.SpotLightShadow=hf,e.Sprite=jh,e.SpriteMaterial=Eh,e.SrcAlphaFactor=D,e.SrcAlphaSaturateFactor=z,e.SrcColorFactor=O,e.StaticCopyUsage=Rr,e.StaticDrawUsage=Sr,e.StaticReadUsage=Tr,e.StereoCamera=Vf,e.StreamCopyUsage=Or,e.StreamDrawUsage=Er,e.StreamReadUsage=Lr,e.StringKeyframeTrack=pp,e.SubtractEquation=E,e.SubtractiveBlending=_,e.TOUCH=n,e.TangentSpaceNormalMap=or,e.TetrahedronBufferGeometry=Cu,e.TetrahedronGeometry=Tu,e.TextBufferGeometry=Td,e.TextGeometry=Ed,e.Texture=Gr,e.TextureLoader=Lp,e.TorusBufferGeometry=zu,e.TorusGeometry=ju,e.TorusKnotBufferGeometry=Uu,e.TorusKnotGeometry=Fu,e.Triangle=ci,e.TriangleFanDrawMode=Zt,e.TriangleStripDrawMode=Xt,e.TrianglesDrawMode=qt,e.TubeBufferGeometry=Bu,e.TubeGeometry=Nu,e.UVMapping=ie,e.Uint16Attribute=rg,e.Uint16BufferAttribute=Ci,e.Uint32Attribute=ig,e.Uint32BufferAttribute=Ri,e.Uint8Attribute=$v,e.Uint8BufferAttribute=Ai,e.Uint8ClampedAttribute=eg,e.Uint8ClampedBufferAttribute=Ei,e.Uniform=bm,e.UniformsLib=Oa,e.UniformsUtils=ya,e.UnsignedByteType=Se,e.UnsignedInt248Type=Ne,e.UnsignedIntType=Le,e.UnsignedShort4444Type=Oe,e.UnsignedShort5551Type=Ie,e.UnsignedShort565Type=De,e.UnsignedShortType=Te,e.VSMShadowMap=p,e.Vector2=Ur,e.Vector3=Zr,e.Vector4=Hr,e.VectorKeyframeTrack=fp,e.Vertex=Jv,e.VertexColors=kv,e.VideoTexture=yu,e.WebGL1Renderer=xh,e.WebGLCubeRenderTarget=Ta,e.WebGLMultisampleRenderTarget=Wr,e.WebGLRenderTarget=Vr,e.WebGLRenderTargetCube=vg,e.WebGLRenderer=yh,e.WebGLUtils=dh,e.WireframeGeometry=_u,e.WireframeHelper=pg,e.WrapAroundEnding=Vt,e.XHRLoader=fg,e.ZeroCurvatureEnding=Gt,e.ZeroFactor=R,e.ZeroSlopeEnding=Ht,e.ZeroStencilOp=lr,e.sRGBEncoding=Qt,Object.defineProperty(e,"__esModule",{value:!0})}))},d914:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEFklEQVRYR+2YXyh0aRzHv895R9j82Svy2gsSKaso4YyLlQv/LnBhLHIlsmRbFpHIn1VEu1z4t0UUsRuxKeGC0sTZ1LzlZhJFNFLe0qz/Q6+z/Z53R7O7mDljZ95zsb+rM83znOfzfJ/fv/Mw2JhWq/1SluVaxliKLMtvAbyx/d/Fz+8B/A5gUJKkZetazPogiuJ3AH50M9STe5Zleez8/Pwbo9F4xwFFUdQB+BXAI7CL1XLk9f2SJH3LMjIyPM1m8z4AOlI12QdBEKKYKIrpAJbURGZlkWW5lSUmJn7PGCPfU6PNkoINADrVSAdgURGgr68vLi4u3LkXxwFTUlLQ1taG8fFxjI6OugvSMUCCa21thUaj4WAE6CZI+4BJSUno7OxEf38/qqqquIKFhYUYGRnB5OSkq5W0D5iWlgZPT08sLCxgc3MT5eXl8PDwQHR0NMbGxj49oC2BFXB7e9vVYNb321fwf8CXz8L1CoqiiNLSUmxtbWF4eFipa7wOMCAgALGxsbi/v8fGxgYsFsvfAMLDwzEwMICenh4eYFdXV+4DLCoqQllZGXZ2dhAYGMgrDP2+vLx8hGhpaYHJZHpNznROwbCwMNTW1qK3txczMzMccGpqCisrK+ju7uaAgiBgcXGRQx8dHSlVzvkobm5uRmNjI9bX19He3v64cGVlJXQ6HbKzs2E2mxESEoLBwUFkZmY6C0fzlCu4u7uLiIgIDmgwGLC0tMR9i1ScnZ3lUNPT06AEn5qaipqaGvcC0mr7+/tYXl7mARIaGsohDg4O0NHRweHz8/N57d7b28PExASoXEZGRjrji8oVJMCSkhIYjUauTHFxMbKyslBdXQ0/Pz8MDQ3xep2TkwMKpLOzM+6rwcHByMvLU6qmckBShCBsraCggOc6vV5PH2Dw8fFBU1MT1tbWuMIEPD8/j76+PtcDUrPwVC2OioricLe3t1xRsuPjY8TExPBUVFdXx1OQl5cXH+OgKVfwOUDbBb29vbnfkZKHh4d8Qw8PD3wIdUVzc3NcVQfMNYAvLUwqd3V18VbNAUj7gBSpdHxkFRUV3JdOTk4c2PzzQ+Li4hAfH89Tkp2m1z5gbm7uY7KlVEFV4fr6+lWA/v7+CAoKwurqKijxv2D2AW0n/xcNKyV0aiCoRjc0NNgLGPcDUs0+PT1FfX39v7qfJ5RUBkhHTFF5c3Pj9BGT71FU/7M1e+aFygCdpnJ+IgesA/CxR1Kf/UaXR18zxn5RHxvAGPuJJScnf26xWI4BfKY2SMbYV/xGVavVNsmy/IPKAFckSUrngDqd7o3JZJoAUKASyHcajSZdr9e/t72TJn8sEwShWpbliE8Eegrg57u7uy6DwcDL1ZOX5gkJCV8ACHQnpCAIf0iSRHflH9uev+xPK+8HIoZpURoAAAAASUVORK5CYII="},dbd5:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAERklEQVRYR9XZf0zUZRzA8ff3wOPnmZg7QMWEjEW4CrVa/lqDNdESjpj8SE0NRPthCrmi+qPcdGc/EE6a0oTlhZsYllQUbGx11SSadGlu5UIkbJEVKL/l99O+foccRez4fjmg55/n9r17Ps/r+/zYPs9zEiOUuMPC2N/JHJ1AN9L3rnjW40njZ89K9f+MLTk+MGWLZHS86KHnHj8DuLm5gvLvmAMC2jqhrZ3LQiKvdTrZti1Sl/xLBSiEZLJwZLaRlJTlcO9c0A2jTwz0UhMcrYQf6qjSexJdvE1qucGIzRGZwbMx748DD/eJwYzWi8UGtrN8VJIumaRHDgk/fR/1hzZhCJg++ThZ0DcA2wqhqYllUmyOSFwYQtHetVMDN6g4dgY+qCRLirWI3dGLeXP7sqkF/KoWDpRySh7BzDX3YU5bOrWAlXXwxid86jSwtx+O2+HRcJjp7fqXGRNQxr1UAud/BqM/WJJcj3QaKOMyS6CuATrawcsbDD5gedy1SKeBuTb44jxkb4C0PHh5HVhPg8ELLAmum2qngb+3gpsOjL6wygzmDRAWAL+1wIJZUwDoSBgELgpyHWwwstMj+L8EXu+FhlZYHAQhtw69QtUv8GszRMzVPv2aRtBzGuwuhEAj5G9SUqLGDticBwZfyN8CPnpty0ATUF6Dx6qhsAJSoiEhAl75GOwX4K2NEB44hDthVz4nLhobWDNQAM8ch8sN8EQkFJRDwkOQ8uBwyKQBZcYfbbA1H7q74LYgOLwe3CTo6oUvaxXot5eU+oEQpY4MhWlOHCQ0j6DcmbxZNhdA8zVYEg77YhREWzcUfKN8vnhFqRcEKPVTy51LiscFuK8cvj4LEWFg/xHSTRAdNkWm2HYR9hdD5BLIiIInj0JzCxxJBX/DJG+SeTNhawG4u4M1Fbz18NMVyLBC8DzITVLWolyudir1WFM01VO8dz1YK6GmDl6Ih6jQodF6vQI+rwbTCmWtaSmqga8mwS2eyrFUThoci7x7axuV8/SdxpF5H55TdvIMr9H5qoFyNqMlWUh9D3r6wJIMfqMgJw3Y2gXPFcHAwOhIp4Hvfw8nq5TpaGkGH19lc2gpvb3Q2QGhIZCbOHIkp4HydUTNX0qQA6fgsZUw3yGDUQMtPadssp0xsPoujUDH5uORsBbZwVoBO9bCmv/AyX06PYKOQDk52PUw3KEh1d+YD8lLR8epBqqZTrVtVI2g2s7UtLsJjLGIjFURZD29Qk0Y17Wx1UBOGSelOIuIDp5DWVa86zpTE/md01D+HXuk1QeFh36AOnMSgWH+akKNf5v2bkiz0t/ew8IbOUdMjlg3awYnzPFI8gF9MktXH+wphQv1vF2yS9px8ybaZBE7PT3Iirsft5W3g9EwsffU165DdT0Un4E/r/Kuvpntxa9JPcOuymNyxN0SPI8gSpIIFEzc3xAIGoVEtU5wsCRdKhucxb8BQV0axdV/3DYAAAAASUVORK5CYII="},e176:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFaklEQVRYR82Ye0jUWRTHvz9ny2egyFY+MGMFHR9pi5RbbmuutYGwSIWihu/JUVCJIF+UUpJC7/Axo4EaErkUBc3CrM+YpVzmjyAVsVqa6OEDX+H6GEbrt5wLM5uP0Rl/P90uDMzM79xzPvfc3zn33MPhi8HzPKdQKH6SSCQ/8zy/9ctnG/D9H57n/7K1tVWlpqbqjfY44xelUvkdgN9cXV2/37FjBxwdHTeA6T8TBoMB79+/x4cPHwZ4nk+Sy+Xt9JQB1tTUeEskEu3+/fu/9ff331CwxcYGBgbQ1tY2r9frozMzM1sYoFKpbA0LC4vatWvX/wpnND40NIRHjx4Nz83N+XC1tbUBTk5OvXFxcbCxsfkqAAmitbUVOp1OximVyiw/P7/qAwcOCIajlXd0dKC3txfj4+Nswdu2bUNQUBAiIyPh7OxssY0XL17g8ePHDQRYEBISUr5nzx6LJy8WHBsbQ3V1NV6/fo1Dhw4hNDQU27dvB8/z9NKjq6sL7e3tCA8PR0pKChwcHFa19fbtW6jV6t8FA5K3KioqkJaWhoMHD4LjTIlhAcSnT59w//59qFQqlJeXw8PDY0VIUQD7+vpw4cIFXL16FW5ubqt6hQRoQefPn0dlZSW2bjWfagUDUt6i7SLveXl5WQRnFHr69CmamppQVVVl1uOCAe/cuYP5+XkkJSVZBWcUJi9SYEZERCw7XzBgYmIibt26BXt7+2UNaLVatoB9+/Yt+5wC6sqVK8yLyw1BgKS8traWba+5Qc+mpqZQVlZmViY+Ph719fWws7NbIiMIUK1WY3BwEKmpqYIAz507B9oJX19fcQHv3bvHFB4/fnyB4pGREdCJREOv17M8aHwF7t69uyRqL126hKioKOzevVtcQMplw8PDSE9PX6CY3rlnz56x/whodnbW5OWQkBBs3rx5gfzZs2eRnJwMHx8fcQF7enrw4MED0BYJeQcpTVE+dHJyEheQPJWQkMC8ZK7AWOzBxQSjo6M4ffo0GhsbxY9i0njt2jUEBATg8OHDa8qD5Dk6fY4dO7Y+gJOTk8jMzGTpZsuWLVZBUgopKChAQ0PDkvfSqEhQmjEq0Wg0aG5uZmexra2tRZBU+Zw6dQqFhYWQSqVm54gCSNplMhnm5uZw8eJFuLu7rwhpLC4IcLXyThTAlpYWFBUVMSjyYExMDKKjo+Hn52cKHoJ//vw5Hj58CMqTxcXFFhUXggDJaElJCd68ecM+VNlQsj1x4gRdePDq1SsGTRFO9SFt5ZEjR1gha+kQBEgngIuLCzIyMvDy5UtWrFJa8fT0tNT+qnJrBqRTpLOzE5cvX2be+fjxI86cOcOiWcyxJsD+/n5WQSuVSlP2J28GBwevOR+aW5TVgBMTE8jKymL3iZ07dzK9Op2O/SZgc3eRtXrVKsDPnz8jJyeHZX26PhpHbm4u5HI51qMbYRXgjRs3sGnTJmRnZ5vgnjx5wi7XpaWla3XSivMsBiRBuj9QEBgLAyoWKHIpUFa6mQkhtxiQyvvr16/j5s2bJnuUUqanp5fUg0KAFs+1GJAm5uXlsRvY0aNHQe0NKpNWOujFALUKcGZmhhUE3d3dkEgkyM/PB1XI6zlMgAqFQi6VSmvEaB6JCUw5V6PR1HN1dXVSe3v7ProCfk3tNypEdDpdGuv0KBQK9d69e39Z722z1MPUZVWpVIMAfBhgXV2dJ8/z2rCwMLfAwEDRTwVLwUju3bt31GM0GAyGX0+ePPmHqVdGfWqO4267uLj86O3tzc5asY+vlUDpikpN9KGhob9tbGzSZDLZnyS/pJmnUCh+4Dgukud5d47jvrFm9QJlhzmO0zo7O7fExsYajLr+BRcqHwJkgOEjAAAAAElFTkSuQmCC"},e3d9:function(e,t,r){"use strict";var n=r("5a89"),i={},a=void 0,o=i;
  2. /** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */function s(e,t){var r,n=e.split("."),i=o;!(n[0]in i)&&i.execScript&&i.execScript("var "+n[0]);for(;n.length&&(r=n.shift());)n.length||t===a?i=i[r]?i[r]:i[r]={}:i[r]=t}var l="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function c(e){var t,r,n,i,a,o,s,c,h,u,d=e.length,p=0,f=Number.POSITIVE_INFINITY;for(c=0;c<d;++c)e[c]>p&&(p=e[c]),e[c]<f&&(f=e[c]);for(t=1<<p,r=new(l?Uint32Array:Array)(t),n=1,i=0,a=2;n<=p;){for(c=0;c<d;++c)if(e[c]===n){for(o=0,s=i,h=0;h<n;++h)o=o<<1|1&s,s>>=1;for(u=n<<16|c,h=o;h<t;h+=a)r[h]=u;++i}++n,i<<=1,a<<=1}return[r,p,f]}function h(e,t){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=l?new Uint8Array(e):e,this.m=!1,this.i=d,this.r=!1,!t&&(t={})||(t.index&&(this.a=t.index),t.bufferSize&&(this.h=t.bufferSize),t.bufferType&&(this.i=t.bufferType),t.resize&&(this.r=t.resize)),this.i){case u:this.b=32768,this.c=new(l?Uint8Array:Array)(32768+this.h+258);break;case d:this.b=0,this.c=new(l?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var u=0,d=1,p={t:u,s:d};h.prototype.k=function(){for(;!this.m;){var e=O(this,3);switch(1&e&&(this.m=!0),e>>>=1,e){case 0:var t=this.input,r=this.a,n=this.c,i=this.b,o=t.length,s=a,h=a,p=n.length,f=a;if(this.d=this.f=0,r+1>=o)throw Error("invalid uncompressed block header: LEN");if(s=t[r++]|t[r++]<<8,r+1>=o)throw Error("invalid uncompressed block header: NLEN");if(h=t[r++]|t[r++]<<8,s===~h)throw Error("invalid uncompressed block header: length verify");if(r+s>t.length)throw Error("input buffer is broken");switch(this.i){case u:for(;i+s>n.length;){if(f=p-i,s-=f,l)n.set(t.subarray(r,r+f),i),i+=f,r+=f;else for(;f--;)n[i++]=t[r++];this.b=i,n=this.e(),i=this.b}break;case d:for(;i+s>n.length;)n=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(l)n.set(t.subarray(r,r+s),i),i+=s,r+=s;else for(;s--;)n[i++]=t[r++];this.a=r,this.b=i,this.c=n;break;case 1:this.j(L,P);break;case 2:var m=O(this,5)+257,v=O(this,5)+1,y=O(this,4)+4,x=new(l?Uint8Array:Array)(g.length),b=a,w=a,_=a,M=a,S=a,A=a,E=a,T=a,C=a;for(T=0;T<y;++T)x[g[T]]=O(this,3);if(!l)for(T=y,y=x.length;T<y;++T)x[g[T]]=0;for(b=c(x),M=new(l?Uint8Array:Array)(m+v),T=0,C=m+v;T<C;)switch(S=I(this,b),S){case 16:for(E=3+O(this,2);E--;)M[T++]=A;break;case 17:for(E=3+O(this,3);E--;)M[T++]=0;A=0;break;case 18:for(E=11+O(this,7);E--;)M[T++]=0;A=0;break;default:A=M[T++]=S}w=c(l?M.subarray(0,m):M.slice(0,m)),_=c(l?M.subarray(m):M.slice(m)),this.j(w,_);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var f,m,v=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],g=l?new Uint16Array(v):v,y=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],x=l?new Uint16Array(y):y,b=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],w=l?new Uint8Array(b):b,_=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],M=l?new Uint16Array(_):_,S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=l?new Uint8Array(S):S,E=new(l?Uint8Array:Array)(288);for(f=0,m=E.length;f<m;++f)E[f]=143>=f?8:255>=f?9:279>=f?7:8;var T,C,L=c(E),R=new(l?Uint8Array:Array)(30);for(T=0,C=R.length;T<C;++T)R[T]=5;var P=c(R);function O(e,t){for(var r,n=e.f,i=e.d,a=e.input,o=e.a,s=a.length;i<t;){if(o>=s)throw Error("input buffer is broken");n|=a[o++]<<i,i+=8}return r=n&(1<<t)-1,e.f=n>>>t,e.d=i-t,e.a=o,r}function I(e,t){for(var r,n,i=e.f,a=e.d,o=e.input,s=e.a,l=o.length,c=t[0],h=t[1];a<h&&!(s>=l);)i|=o[s++]<<a,a+=8;if(r=c[i&(1<<h)-1],n=r>>>16,n>a)throw Error("invalid code length: "+n);return e.f=i>>n,e.d=a-n,e.a=s,65535&r}function D(e,t){var r,n;switch(this.input=e,this.a=0,!t&&(t={})||(t.index&&(this.a=t.index),t.verify&&(this.A=t.verify)),r=e[this.a++],n=e[this.a++],15&r){case N:this.method=N;break;default:throw Error("unsupported compression method")}if(0!==((r<<8)+n)%31)throw Error("invalid fcheck flag:"+((r<<8)+n)%31);if(32&n)throw Error("fdict flag is not supported");this.q=new h(e,{index:this.a,bufferSize:t.bufferSize,bufferType:t.bufferType,resize:t.resize})}h.prototype.j=function(e,t){var r=this.c,n=this.b;this.o=e;for(var i,a,o,s,l=r.length-258;256!==(i=I(this,e));)if(256>i)n>=l&&(this.b=n,r=this.e(),n=this.b),r[n++]=i;else for(a=i-257,s=x[a],0<w[a]&&(s+=O(this,w[a])),i=I(this,t),o=M[i],0<A[i]&&(o+=O(this,A[i])),n>=l&&(this.b=n,r=this.e(),n=this.b);s--;)r[n]=r[n++-o];for(;8<=this.d;)this.d-=8,this.a--;this.b=n},h.prototype.w=function(e,t){var r=this.c,n=this.b;this.o=e;for(var i,a,o,s,l=r.length;256!==(i=I(this,e));)if(256>i)n>=l&&(r=this.e(),l=r.length),r[n++]=i;else for(a=i-257,s=x[a],0<w[a]&&(s+=O(this,w[a])),i=I(this,t),o=M[i],0<A[i]&&(o+=O(this,A[i])),n+s>l&&(r=this.e(),l=r.length);s--;)r[n]=r[n++-o];for(;8<=this.d;)this.d-=8,this.a--;this.b=n},h.prototype.e=function(){var e,t,r=new(l?Uint8Array:Array)(this.b-32768),n=this.b-32768,i=this.c;if(l)r.set(i.subarray(32768,r.length));else for(e=0,t=r.length;e<t;++e)r[e]=i[e+32768];if(this.g.push(r),this.l+=r.length,l)i.set(i.subarray(n,n+32768));else for(e=0;32768>e;++e)i[e]=i[n+e];return this.b=32768,i},h.prototype.z=function(e){var t,r,n,i,a=this.input.length/this.a+1|0,o=this.input,s=this.c;return e&&("number"===typeof e.p&&(a=e.p),"number"===typeof e.u&&(a+=e.u)),2>a?(r=(o.length-this.a)/this.o[2],i=r/2*258|0,n=i<s.length?s.length+i:s.length<<1):n=s.length*a,l?(t=new Uint8Array(n),t.set(s)):t=s,this.c=t},h.prototype.n=function(){var e,t,r,n,i,a=0,o=this.c,s=this.g,c=new(l?Uint8Array:Array)(this.l+(this.b-32768));if(0===s.length)return l?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(t=0,r=s.length;t<r;++t)for(e=s[t],n=0,i=e.length;n<i;++n)c[a++]=e[n];for(t=32768,r=this.b;t<r;++t)c[a++]=o[t];return this.g=[],this.buffer=c},h.prototype.v=function(){var e,t=this.b;return l?this.r?(e=new Uint8Array(t),e.set(this.c.subarray(0,t))):e=this.c.subarray(0,t):(this.c.length>t&&(this.c.length=t),e=this.c),this.buffer=e},D.prototype.k=function(){var e,t,r=this.input;if(e=this.q.k(),this.a=this.q.a,this.A){t=(r[this.a++]<<24|r[this.a++]<<16|r[this.a++]<<8|r[this.a++])>>>0;var n=e;if("string"===typeof n){var i,a,o=n.split("");for(i=0,a=o.length;i<a;i++)o[i]=(255&o[i].charCodeAt(0))>>>0;n=o}for(var s,l=1,c=0,h=n.length,u=0;0<h;){s=1024<h?1024:h,h-=s;do{l+=n[u++],c+=l}while(--s);l%=65521,c%=65521}if(t!==(c<<16|l)>>>0)throw Error("invalid adler-32 checksum")}return e};var N=8;s("Zlib.Inflate",D),s("Zlib.Inflate.prototype.decompress",D.prototype.k);var B,F,U,j,z={ADAPTIVE:p.s,BLOCK:p.t};if(Object.keys)B=Object.keys(z);else for(F in B=[],U=0,z)B[U++]=F;for(U=0,j=B.length;U<j;++U)F=B[U],s("Zlib.Inflate.BufferType."+F,z[F]);var k=i.Zlib,G=function(e){n["B"].call(this,e)};G.prototype=Object.assign(Object.create(n["B"].prototype),{constructor:G,load:function(e,t,r,i){var a=this,o=new n["s"](a.manager);o.setPath(a.path),o.setResponseType("arraybuffer"),o.load(e,(function(r){try{t(a.parse(r))}catch(n){i?i(n):console.error(n),a.manager.itemError(e)}}),r,i)},parse:function(e){function t(e){var t,r=[],i=[],a=[],o=[],s=/^[^\d.\s-]+/,l=/(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)/g,c=/^(\d+)\s+([\s\d]*)/,h=/^POINTS /,u=/^POLYGONS /,d=/^TRIANGLE_STRIPS /,p=/^POINT_DATA[ ]+(\d+)/,f=/^CELL_DATA[ ]+(\d+)/,m=/^COLOR_SCALARS[ ]+(\w+)[ ]+3/,v=/^NORMALS[ ]+(\w+)[ ]+(\w+)/,g=!1,y=!1,x=!1,b=!1,w=!1,_=!1,M=!1,S=e.split("\n");for(var A in S){var E=S[A].trim();if(0===E.indexOf("DATASET")){var T=E.split(" ")[1];if("POLYDATA"!==T)throw new Error("Unsupported DATASET type: "+T)}else if(g)while(null!==(t=l.exec(E))){if(null!==s.exec(E))break;var C=parseFloat(t[1]),L=parseFloat(t[2]),R=parseFloat(t[3]);i.push(C,L,R)}else if(y){if(null!==(t=c.exec(E))){var P=parseInt(t[1]),O=t[2].split(/\s+/);if(P>=3)for(var I=parseInt(O[0]),D=1,N=0;N<P-2;++N)B=parseInt(O[D]),F=parseInt(O[D+1]),r.push(I,B,F),D++}}else if(x){if(null!==(t=c.exec(E))){P=parseInt(t[1]),O=t[2].split(/\s+/);if(P>=3){var B,F;for(N=0;N<P-2;N++)N%2===1?(I=parseInt(O[N]),B=parseInt(O[N+2]),F=parseInt(O[N+1]),r.push(I,B,F)):(I=parseInt(O[N]),B=parseInt(O[N+1]),F=parseInt(O[N+2]),r.push(I,B,F))}}}else if(b||w)if(_)while(null!==(t=l.exec(E))){if(null!==s.exec(E))break;var U=parseFloat(t[1]),j=parseFloat(t[2]),z=parseFloat(t[3]);a.push(U,j,z)}else if(M)while(null!==(t=l.exec(E))){if(null!==s.exec(E))break;var k=parseFloat(t[1]),G=parseFloat(t[2]),H=parseFloat(t[3]);o.push(k,G,H)}null!==u.exec(E)?(y=!0,g=!1,x=!1):null!==h.exec(E)?(y=!1,g=!0,x=!1):null!==d.exec(E)?(y=!1,g=!1,x=!0):null!==p.exec(E)?(b=!0,g=!1,y=!1,x=!1):null!==f.exec(E)?(w=!0,g=!1,y=!1,x=!1):null!==m.exec(E)?(_=!0,M=!1,g=!1,y=!1,x=!1):null!==v.exec(E)&&(M=!0,_=!1,g=!1,y=!1,x=!1)}var V=new n["h"];if(V.setIndex(r),V.setAttribute("position",new n["t"](i,3)),o.length===i.length&&V.setAttribute("normal",new n["t"](o,3)),a.length!==r.length)a.length===i.length&&V.setAttribute("color",new n["t"](a,3));else{V=V.toNonIndexed();var W=V.attributes.position.count/3;if(a.length===3*W){var Y=[];for(A=0;A<W;A++){U=a[3*A+0],j=a[3*A+1],z=a[3*A+2];Y.push(U,j,z),Y.push(U,j,z),Y.push(U,j,z)}V.setAttribute("color",new n["t"](Y,3))}}return V}function r(e){var t,r,i,a,o,s,l,c=new Uint8Array(e),h=new DataView(e),u=[],d=[],p=[],f=[],m=0;function v(e,t){var r=t,n=e[r],i=[];while(10!==n)i.push(String.fromCharCode(n)),r++,n=e[r];return{start:t,end:r,next:r+1,parsedString:i.join("")}}while(1){if(s=v(c,m),l=s.parsedString,0===l.indexOf("DATASET")){var g=l.split(" ")[1];if("POLYDATA"!==g)throw new Error("Unsupported DATASET type: "+g)}else if(0===l.indexOf("POINTS")){for(f.push(l),a=parseInt(l.split(" ")[1],10),t=4*a*3,u=new Float32Array(3*a),r=s.next,i=0;i<a;i++)u[3*i]=h.getFloat32(r,!1),u[3*i+1]=h.getFloat32(r+4,!1),u[3*i+2]=h.getFloat32(r+8,!1),r+=12;s.next=s.next+t+1}else if(0===l.indexOf("TRIANGLE_STRIPS")){var y=parseInt(l.split(" ")[1],10),x=parseInt(l.split(" ")[2],10);t=4*x,p=new Uint32Array(3*x-9*y);var b=0;for(r=s.next,i=0;i<y;i++){var w=h.getInt32(r,!1),_=[];for(r+=4,o=0;o<w;o++)_.push(h.getInt32(r,!1)),r+=4;for(var M=0;M<w-2;M++)M%2?(p[b++]=_[M],p[b++]=_[M+2],p[b++]=_[M+1]):(p[b++]=_[M],p[b++]=_[M+1],p[b++]=_[M+2])}s.next=s.next+t+1}else if(0===l.indexOf("POLYGONS")){y=parseInt(l.split(" ")[1],10),x=parseInt(l.split(" ")[2],10);t=4*x,p=new Uint32Array(3*x-9*y);b=0;for(r=s.next,i=0;i<y;i++){w=h.getInt32(r,!1),_=[];for(r+=4,o=0;o<w;o++)_.push(h.getInt32(r,!1)),r+=4;for(M=1;M<w-1;M++)p[b++]=_[0],p[b++]=_[M],p[b++]=_[M+1]}s.next=s.next+t+1}else if(0===l.indexOf("POINT_DATA")){for(a=parseInt(l.split(" ")[1],10),s=v(c,s.next),t=4*a*3,d=new Float32Array(3*a),r=s.next,i=0;i<a;i++)d[3*i]=h.getFloat32(r,!1),d[3*i+1]=h.getFloat32(r+4,!1),d[3*i+2]=h.getFloat32(r+8,!1),r+=12;s.next=s.next+t}if(m=s.next,m>=c.byteLength)break}var S=new n["h"];return S.setIndex(new n["g"](p,1)),S.setAttribute("position",new n["g"](u,3)),d.length===u.length&&S.setAttribute("normal",new n["g"](d,3)),S}function i(e,t){var r=e.length,n=new Float32Array(r+t.length);return n.set(e),n.set(t,r),n}function a(e,t){var r=e.length,n=new Int32Array(r+t.length);return n.set(e),n.set(t,r),n}function o(e){function t(e){var r={};if(1===e.nodeType){if(e.attributes&&e.attributes.length>0){r["attributes"]={};for(var n=0;n<e.attributes.length;n++){var i=e.attributes.item(n);r["attributes"][i.nodeName]=i.nodeValue.trim()}}}else 3===e.nodeType&&(r=e.nodeValue.trim());if(e.hasChildNodes())for(var a=0;a<e.childNodes.length;a++){var o=e.childNodes.item(a),s=o.nodeName;if("undefined"===typeof r[s]){var l=t(o);""!==l&&(r[s]=l)}else{if("undefined"===typeof r[s].push){var c=r[s];r[s]=[c]}l=t(o);""!==l&&r[s].push(l)}}return r}function r(e){var t,r,n,i,a,o,s="undefined"!==typeof Uint8Array?Uint8Array:Array,l=[],c=[],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=h.length;for(t=0;t<u;t++)l[t]=h[t];for(t=0;t<u;++t)c[h.charCodeAt(t)]=t;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63;u=e.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[u-2]?2:"="===e[u-1]?1:0,o=new s(3*u/4-a),n=a>0?u-4:u;var d=0;for(t=0,r=0;t<n;t+=4,r+=3)i=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],o[d++]=(16711680&i)>>16,o[d++]=(65280&i)>>8,o[d++]=255&i;return 2===a?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[d++]=255&i):1===a&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[d++]=i>>8&255,o[d++]=255&i),o}function o(e,t){var n=0;if("UInt64"===c.attributes.header_type?n=8:"UInt32"===c.attributes.header_type&&(n=4),"binary"===e.attributes.format&&t){var o,s,l,h,u,d,p,f;if("Float32"===e.attributes.type)var m=new Float32Array;else if("Int64"===e.attributes.type)m=new Int32Array;o=e["#text"],s=r(o),l=s[0];for(var v=1;v<n-1;v++)l|=s[v]<<v*n;u=(l+3)*n,d=u%3>0?3-u%3:0,u+=d,p=[],f=u,p.push(f),h=3*n;for(v=0;v<l;v++){for(var g=s[v*n+h],y=1;y<n-1;y++)g|=s[v*n+h+y]<<8*y;f+=g,p.push(f)}for(v=0;v<p.length-1;v++){var x=new k.Inflate(s.slice(p[v],p[v+1]),{resize:!0,verify:!0});b=x.decompress(),b=b.buffer,"Float32"===e.attributes.type?(b=new Float32Array(b),m=i(m,b)):"Int64"===e.attributes.type&&(b=new Int32Array(b),m=a(m,b))}delete e["#text"],"Int64"===e.attributes.type&&"binary"===e.attributes.format&&(m=m.filter((function(e,t){if(t%2!==1)return!0})))}else{if("binary"!==e.attributes.format||t)if(e["#text"])b=e["#text"].split(/\s+/).filter((function(e){if(""!==e)return e}));else b=new Int32Array(0).buffer;else{var b=r(e["#text"]);b=b.slice(n).buffer}if(delete e["#text"],"Float32"===e.attributes.type)m=new Float32Array(b);else if("Int32"===e.attributes.type)m=new Int32Array(b);else if("Int64"===e.attributes.type){m=new Int32Array(b);"binary"===e.attributes.format&&(m=m.filter((function(e,t){if(t%2!==1)return!0})))}}return m}var s=null;if(window.DOMParser)try{s=(new DOMParser).parseFromString(e,"text/xml")}catch(G){s=null}else{if(!window.ActiveXObject)throw new Error("Cannot parse xml string!");try{if(s=new ActiveXObject("Microsoft.XMLDOM"),s.async=!1,!s.loadXML())throw new Error(s.parseError.reason+s.parseError.srcText)}catch(G){s=null}}var l=s.documentElement,c=t(l),h=[],u=[],d=[];if(c.PolyData){var p=c.PolyData.Piece,f=c.attributes.hasOwnProperty("compressor"),m=["PointData","Points","Strips","Polys"],v=0,g=m.length;while(v<g){var y=p[m[v]];if(y&&y.DataArray){if("[object Array]"===Object.prototype.toString.call(y.DataArray))var x=y.DataArray;else x=[y.DataArray];var b=0,w=x.length;while(b<w)"#text"in x[b]&&x[b]["#text"].length>0&&(x[b].text=o(x[b],f)),b++;switch(m[v]){case"PointData":var _=parseInt(p.attributes.NumberOfPoints),M=y.attributes.Normals;if(_>0)for(var S=0,A=x.length;S<A;S++)if(M===x[S].attributes.Name){var E=x[S].attributes.NumberOfComponents;u=new Float32Array(_*E),u.set(x[S].text,0)}break;case"Points":_=parseInt(p.attributes.NumberOfPoints);if(_>0){E=y.DataArray.attributes.NumberOfComponents;h=new Float32Array(_*E),h.set(y.DataArray.text,0)}break;case"Strips":var T=parseInt(p.attributes.NumberOfStrips);if(T>0){var C=new Int32Array(y.DataArray[0].text.length),L=new Int32Array(y.DataArray[1].text.length);C.set(y.DataArray[0].text,0),L.set(y.DataArray[1].text,0);var R=T+C.length;d=new Uint32Array(3*R-9*T);var P=0;for(S=0,A=T;S<A;S++){for(var O=[],I=0,D=L[S],N=0;I<D-N;I++)O.push(C[I]),S>0&&(N=L[S-1]);var B=0;for(D=L[S],N=0;B<D-N-2;B++)B%2?(d[P++]=O[B],d[P++]=O[B+2],d[P++]=O[B+1]):(d[P++]=O[B],d[P++]=O[B+1],d[P++]=O[B+2]),S>0&&(N=L[S-1])}}break;case"Polys":var F=parseInt(p.attributes.NumberOfPolys);if(F>0){C=new Int32Array(y.DataArray[0].text.length),L=new Int32Array(y.DataArray[1].text.length);C.set(y.DataArray[0].text,0),L.set(y.DataArray[1].text,0);R=F+C.length;d=new Uint32Array(3*R-9*F);P=0;var U=0;S=0,A=F,N=0;while(S<A){var j=[];I=0,D=L[S];while(I<D-N)j.push(C[U++]),I++;B=1;while(B<D-N-1)d[P++]=j[0],d[P++]=j[B],d[P++]=j[B+1],B++;S++,N=L[S-1]}}break;default:break}}v++}var z=new n["h"];return z.setIndex(new n["g"](d,1)),z.setAttribute("position",new n["g"](h,3)),u.length===h.length&&z.setAttribute("normal",new n["g"](u,3)),z}throw new Error("Unsupported DATASET type")}function s(e){var t="",r=new Uint8Array(e),n=0,i=r.length;while(i--)t+=String.fromCharCode(r[n++]);return t}var l=n["C"].decodeText(new Uint8Array(e,0,250)).split("\n");return-1!==l[0].indexOf("xml")?o(s(e)):l[2].includes("ASCII")?t(s(e)):r(e)}})},eb4f:function(e,t,r){"use strict";var n=r("c1a4"),i=r.n(n);i.a},f386:function(e,t,r){"use strict";r("386b")("small",(function(e){return function(){return e(this,"small","","")}}))}}]);