(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/5b3QDua3RvJ8Gm3aSkA6x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Q07BuneM/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}}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VtbW0QEBAA6enpYGVlpR+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/AGIYILdfApUvgI7fGk1nN3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ciRdv3IATdsutUrBKF+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;to+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,""")+'"'),s+">"+i+""};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+xlVfjby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luGb6oJd31cs9trYjvBjhoWJn+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=this.reveColor[t-1]&&e=.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);o1&&(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;i0&&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=3)for(var A,E,T=parseInt(S[0]),C=1,L=0;L=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;c0&&(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/b3gpQoZaWljCFQvEbNvlhsVbpeuvqPS6w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TXgU83AAdNnglCV4thQ2p0NgC1zqgwOgHgM4IOSUq4Fiec8h61YP/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>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;a1)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)y&&g>x?gx?y=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 nMath.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<1){for(var t=0;t1){for(var t=0;t0){n.children=[];for(var p=0;p0&&(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;rs)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;si&&(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;si&&(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;tthis.max.x||e.ythis.max.y||e.zthis.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new 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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.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;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new 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=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=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+(i0&&(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;rt&&(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;n0,o=i[1]&&i[1].length>0,s=e.morphTargets,l=s.length;if(l>0){t=[];for(var c=0;c0){h=[];for(var p=0;p0&&0===r.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var y=0;y65535?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;r0){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;c0){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;r0&&(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;p0&&(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;hr.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;p0){var n=t[r[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=n.length;i0&&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;f0&&(J=ee);for(var te=0,re=$.length;te0)for(var d=0;d0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){this.computeFaceNormals();for(var e=0,t=this.faces.length;e0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var e=0,t=this.faces.length;e=0;m--){var v=c[m];this.faces.splice(v,1);for(var g=0,y=this.faceVertexUvs.length;g0,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<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;r0?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;O0&&(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 ","\t#include ","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#include ","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(a0?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=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.length65535?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.version0)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/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);a0?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 a0,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;i1&&r.sort(e||Xc),n.length>1&&n.sort(t||Zc)}function h(){for(var r=t,n=e.length;r0);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;dr||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=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;on||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;A1||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;M0&&d){for(var T=0,C=_.length;T=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(var m=0;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;ne.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;r0){var r,n;for(r=1,n=t.length;r0){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=t[r].distance))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;ro)){h.applyMatrix4(this.matrixWorld);var w=e.ray.origin.distanceTo(h);we.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;_o)){h.applyMatrix4(this.matrixWorld);var A=e.ray.origin.distanceTo(h);Ae.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;Co)){h.applyMatrix4(this.matrixWorld);var R=e.ray.origin.distanceTo(h);Re.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;i0&&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;ni.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=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.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;c0){var n=t[r[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,a=n.length;i0&&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;fa&&(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=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.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,u=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=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.x&&n.x>=h&&i!==n.x&&id(ar.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;t0||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=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;a2&&e[t-1].equals(e[0])&&e.pop()}function wd(e,t){for(var r=0;rNumber.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=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=0){var n=r,i=r-1;i<0&&(i=e.length-1);for(var a=0,o=s+2*p;a0)&&d.push(S,A,T),(_!==r-1||s0&&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=n)){h.push(l.times[d]);for(var f=0;fa.tracks[v].times[0]&&(m=a.tracks[v].times[0]);for(var g=0;g=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=i)break e;var s=t[1];e=i)break t}a=r,r=0}while(r>>1;et)--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;o0){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;o1){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;c0||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)n)i-=n;i0?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+2n.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=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;r1&&!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;t0){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;r0: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;r0){var o=new xp(t);r=new Tp(o),r.setCrossOrigin(this.crossOrigin);for(var s=0,l=e.length;sNumber.EPSILON){if(c<0&&(o=t[a],l=-l,s=t[i],c=-c),e.ys.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;g1){for(var x=!1,b=[],w=0,_=f.length;w<_;w++)p[w]=[];for(var M=0,S=f.length;M0&&(x||(m=p))}for(var R=0,P=f.length;R0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e0&&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=.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=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],h0){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=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;tthis.max.x||e.ythis.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new 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.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new 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.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;iuv-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;x2?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 \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 \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 \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;e2?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;nmv&&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;yuv-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;rp&&(p=e[c]),e[c]>=1;for(u=n<<16|c,h=o;h>>=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=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=s)throw Error("input buffer is broken");n|=a[o++]<>>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=l);)i|=o[s++]<>>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=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],0l&&(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;ee;++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=it&&(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>>0;n=o}for(var s,l=1,c=0,h=n.length,u=0;0>>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=3)for(var I=parseInt(O[0]),D=1,N=0;N=3){var B,F;for(N=0;N=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;n0)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>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;v0?3-u%3:0,u+=d,p=[],f=u,p.push(f),h=3*n;for(v=0;v0&&(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;S0){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;S0&&(N=L[S-1]);var B=0;for(D=L[S],N=0;B0&&(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