diff --git a/js/package.json b/js/package.json index 91afab30..8bd5743f 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "nglview-js-widgets", - "version": "0.5.4-dev.16", + "version": "0.5.4-dev.17", "description": "nglview-js-widgets", "author": "Hai Nguyen , Alexander Rose ", "license": "MIT", @@ -37,7 +37,7 @@ "json-loader": "^0.5.4", "css-loader": "^0.23.1", "style-loader": "^0.13.1", - "ngl": "0.10.5-19", + "ngl": "0.10.5-20", "webpack": "^1.12.14" }, "dependencies": { @@ -46,7 +46,7 @@ "underscore": "^1.8.3", "@jupyter-widgets/base": "^0.5.2", "@jupyterlab/nbwidgets": "^0.6.15", - "ngl": "0.10.5-19" + "ngl": "0.10.5-20" }, "homepage": "https://github.com/arose/nglview#readme", "directories": { diff --git a/jslab/package.json b/jslab/package.json index 5525b27d..bb72977e 100644 --- a/jslab/package.json +++ b/jslab/package.json @@ -17,7 +17,7 @@ "license": "MIT", "dependencies": { "@jupyter-widgets/jupyterlab-manager": "^0.25.11", - "nglview-js-widgets": "0.5.4-dev.16" + "nglview-js-widgets": "0.5.4-dev.17" }, "jupyterlab": { "extension": true diff --git a/nglview/static/index.js b/nglview/static/index.js index 8aa93465..f63743e9 100644 --- a/nglview/static/index.js +++ b/nglview/static/index.js @@ -1115,7 +1115,7 @@ define(["@jupyter-widgets/base"], function(__WEBPACK_EXTERNAL_MODULE_2__) { retu /* 3 */ /***/ (function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(setImmediate, Buffer) {!function(t,e){ true?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.NGL={})}(this,function(t){"use strict";function e(){}function r(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(t,this)}function n(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,Xu(function(){var r=1===t._state?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._state?o:a)(e.promise,t._value);var i;try{i=r(t._value)}catch(t){return void a(e.promise,t)}o(e.promise,i)})}function o(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void u(r(n,e),t)}t._state=1,t._value=e,s(t)}catch(e){a(t,e)}}function a(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&Xu(function(){t._handled||qu(t._value)});for(var e=0,r=t._deferreds.length;e0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function y(t,e,r,i,n,o,a,s,c,u,h,l){p.call(this,null,o,a,s,c,u,i,n,h,l),this.image={data:t,width:e,height:r},this.magFilter=void 0!==c?c:nl,this.minFilter=void 0!==u?u:nl,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function b(t,e,r,i,n,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:qh,p.call(this,t,e,r,i,n,o,a,s,c,u),this.flipY=!1}function x(){this.seq=[],this.map={}}function _(t,e,r){var i=t[0];if(i<=0||i>0)return t;var n=e*r,o=rp[n];if(void 0===o&&(o=new Float32Array(n),rp[n]=o),0!==e){i.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=r,t[a].toArray(o,s)}return o}function w(t,e){var r=ip[e];void 0===r&&(r=new Int32Array(e),ip[e]=r);for(var i=0;i!==e;++i)r[i]=t.allocTextureUnit();return r}function S(t,e){t.uniform1f(this.addr,e)}function A(t,e){t.uniform1i(this.addr,e)}function M(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function E(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function T(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function P(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function C(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(op.set(e.elements),t.uniformMatrix3fv(this.addr,!1,op))}function I(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(np.set(e.elements),t.uniformMatrix4fv(this.addr,!1,np))}function R(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),r.setTexture2D(e||tp,i)}function L(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),r.setTextureCube(e||ep,i)}function O(t,e){t.uniform2iv(this.addr,e)}function D(t,e){t.uniform3iv(this.addr,e)}function N(t,e){t.uniform4iv(this.addr,e)}function k(t){switch(t){case 5126:return S;case 35664:return M;case 35665:return E;case 35666:return T;case 35674:return P;case 35675:return C;case 35676:return I;case 35678:case 36198:return R;case 35680:return L;case 5124:case 35670:return A;case 35667:case 35671:return O;case 35668:case 35672:return D;case 35669:case 35673:return N}}function F(t,e){t.uniform1fv(this.addr,e)}function B(t,e){t.uniform1iv(this.addr,e)}function z(t,e){t.uniform2fv(this.addr,_(e,this.size,2))}function U(t,e){t.uniform3fv(this.addr,_(e,this.size,3))}function j(t,e){t.uniform4fv(this.addr,_(e,this.size,4))}function G(t,e){t.uniformMatrix2fv(this.addr,!1,_(e,this.size,4))}function V(t,e){t.uniformMatrix3fv(this.addr,!1,_(e,this.size,9))}function $(t,e){t.uniformMatrix4fv(this.addr,!1,_(e,this.size,16))}function H(t,e,r){var i=e.length,n=w(r,i);t.uniform1iv(this.addr,n);for(var o=0;o!==i;++o)r.setTexture2D(e[o]||tp,n[o])}function W(t,e,r){var i=e.length,n=w(r,i);t.uniform1iv(this.addr,n);for(var o=0;o!==i;++o)r.setTextureCube(e[o]||ep,n[o])}function X(t){switch(t){case 5126:return F;case 35664:return z;case 35665:return U;case 35666:return j;case 35674:return G;case 35675:return V;case 35676:return $;case 35678:return H;case 35680:return W;case 5124:case 35670:return B;case 35667:case 35671:return O;case 35668:case 35672:return D;case 35669:case 35673:return N}}function q(t,e,r){this.id=t,this.addr=r,this.setValue=k(e.type)}function Y(t,e,r){this.id=t,this.addr=r,this.size=e.size,this.setValue=X(e.type)}function Z(t){this.id=t,x.call(this)}function K(t,e){t.seq.push(e),t.map[e.id]=e}function Q(t,e,r){var i=t.name,n=i.length;for(ap.lastIndex=0;;){var o=ap.exec(i),a=ap.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===n){K(r,void 0===u?new q(s,t,e):new Y(s,t,e));break}var h=r.map[s];void 0===h&&K(r,h=new Z(s)),r=h}}function J(t,e,r){var i=this;x.call(this),this.renderer=r;for(var n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),o=0;o.001&&R.scale>.001&&(S.x=R.x,S.y=R.y,S.z=R.z,_=R.size*R.scale/m.w,w.x=_*y,w.y=_,d.uniform3f(u.screenPosition,S.x,S.y,S.z),d.uniform2f(u.scale,w.x,w.y),d.uniform1f(u.rotation,R.rotation),d.uniform1f(u.opacity,R.opacity),d.uniform3f(u.color,R.color.r,R.color.g,R.color.b),f.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst),t.setTexture2D(R.texture,1),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0))}}}f.enable(d.CULL_FACE),f.enable(d.DEPTH_TEST),f.buffers.depth.setMask(!0),t.resetGLState()}}}function it(t,e){function r(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),e=new Uint16Array([0,1,2,0,2,3]);o=l.createBuffer(),a=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,o),l.bufferData(l.ARRAY_BUFFER,t,l.STATIC_DRAW),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,a),l.bufferData(l.ELEMENT_ARRAY_BUFFER,e,l.STATIC_DRAW),s=i(),c={position:l.getAttribLocation(s,"position"),uv:l.getAttribLocation(s,"uv")},u={uvOffset:l.getUniformLocation(s,"uvOffset"),uvScale:l.getUniformLocation(s,"uvScale"),rotation:l.getUniformLocation(s,"rotation"),scale:l.getUniformLocation(s,"scale"),color:l.getUniformLocation(s,"color"),map:l.getUniformLocation(s,"map"),opacity:l.getUniformLocation(s,"opacity"),modelViewMatrix:l.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:l.getUniformLocation(s,"projectionMatrix"),fogType:l.getUniformLocation(s,"fogType"),fogDensity:l.getUniformLocation(s,"fogDensity"),fogNear:l.getUniformLocation(s,"fogNear"),fogFar:l.getUniformLocation(s,"fogFar"),fogColor:l.getUniformLocation(s,"fogColor"),alphaTest:l.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var n=r.getContext("2d");n.fillStyle="white",n.fillRect(0,0,8,8),(h=new p(r)).needsUpdate=!0}function i(){var e=l.createProgram(),r=l.createShader(l.VERTEX_SHADER),i=l.createShader(l.FRAGMENT_SHADER);return l.shaderSource(r,["precision "+t.getPrecision()+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),l.shaderSource(i,["precision "+t.getPrecision()+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),l.compileShader(r),l.compileShader(i),l.attachShader(e,r),l.attachShader(e,i),l.linkProgram(e),e}function n(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var o,a,s,c,u,h,l=t.context,d=t.state,f=new g,v=new m,y=new g;this.render=function(i,p){if(0!==e.length){void 0===s&&r(),l.useProgram(s),d.initAttributes(),d.enableAttribute(c.position),d.enableAttribute(c.uv),d.disableUnusedAttributes(),d.disable(l.CULL_FACE),d.enable(l.BLEND),l.bindBuffer(l.ARRAY_BUFFER,o),l.vertexAttribPointer(c.position,2,l.FLOAT,!1,16,0),l.vertexAttribPointer(c.uv,2,l.FLOAT,!1,16,8),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,a),l.uniformMatrix4fv(u.projectionMatrix,!1,p.projectionMatrix.elements),d.activeTexture(l.TEXTURE0),l.uniform1i(u.map,0);var m=0,g=0,b=i.fog;b?(l.uniform3f(u.fogColor,b.color.r,b.color.g,b.color.b),b.isFog?(l.uniform1f(u.fogNear,b.near),l.uniform1f(u.fogFar,b.far),l.uniform1i(u.fogType,1),m=1,g=1):b.isFogExp2&&(l.uniform1f(u.fogDensity,b.density),l.uniform1i(u.fogType,2),m=2,g=2)):(l.uniform1i(u.fogType,0),m=0,g=0);for(var x=0,_=e.length;x<_;x++)(S=e[x]).modelViewMatrix.multiplyMatrices(p.matrixWorldInverse,S.matrixWorld),S.z=-S.modelViewMatrix.elements[14];e.sort(n);for(var w=[],x=0,_=e.length;x<_;x++){var S=e[x],A=S.material;if(!1!==A.visible){S.onBeforeRender(t,i,p,void 0,A,void 0),l.uniform1f(u.alphaTest,A.alphaTest),l.uniformMatrix4fv(u.modelViewMatrix,!1,S.modelViewMatrix.elements),S.matrixWorld.decompose(f,v,y),w[0]=y.x,w[1]=y.y;var M=0;i.fog&&A.fog&&(M=g),m!==M&&(l.uniform1i(u.fogType,M),m=M),null!==A.map?(l.uniform2f(u.uvOffset,A.map.offset.x,A.map.offset.y),l.uniform2f(u.uvScale,A.map.repeat.x,A.map.repeat.y)):(l.uniform2f(u.uvOffset,0,0),l.uniform2f(u.uvScale,1,1)),l.uniform1f(u.opacity,A.opacity),l.uniform3f(u.color,A.color.r,A.color.g,A.color.b),l.uniform1f(u.rotation,A.rotation),l.uniform2fv(u.scale,w),d.setBlending(A.blending,A.blendEquation,A.blendSrc,A.blendDst,A.blendEquationAlpha,A.blendSrcAlpha,A.blendDstAlpha,A.premultipliedAlpha),d.buffers.depth.setTest(A.depthTest),d.buffers.depth.setMask(A.depthWrite),A.map?t.setTexture2D(A.map,0):t.setTexture2D(h,0),l.drawElements(l.TRIANGLES,6,l.UNSIGNED_SHORT,0),S.onAfterRender(t,i,p,void 0,A,void 0)}}d.enable(l.CULL_FACE),t.resetGLState()}}}function nt(){Object.defineProperty(this,"id",{value:pp++}),this.uuid=Ql.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=lh,this.side=rh,this.shading=ah,this.vertexColors=sh,this.opacity=1,this.transparent=!1,this.blendSrc=Mh,this.blendDst=Eh,this.blendEquation=gh,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Nh,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.needsUpdate=!0}function ot(t){nt.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function at(t){nt.call(this),this.type="MeshDepthMaterial",this.depthPacking=Zl,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function st(t,e){this.min=void 0!==t?t:new g(1/0,1/0,1/0),this.max=void 0!==e?e:new g(-1/0,-1/0,-1/0)}function ct(t,e){this.center=void 0!==t?t:new g,this.radius=void 0!==e?e:0}function ut(){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.")}function ht(t,e){this.normal=void 0!==t?t:new g(1,0,0),this.constant=void 0!==e?e:0}function lt(t,e,r,i,n,o){this.planes=[void 0!==t?t:new ht,void 0!==e?e:new ht,void 0!==r?r:new ht,void 0!==i?i:new ht,void 0!==n?n:new ht,void 0!==o?o:new ht]}function pt(t,e,r,i){function n(e,r,i,n){var o=e.geometry,a=null,s=S,c=e.customDepthMaterial;if(i&&(s=A,c=e.customDistanceMaterial),c)a=c;else{var u=!1;r.morphTargets&&(o&&o.isBufferGeometry?u=o.morphAttributes&&o.morphAttributes.position&&o.morphAttributes.position.length>0:o&&o.isGeometry&&(u=o.morphTargets&&o.morphTargets.length>0)),e.isSkinnedMesh&&!1===r.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var h=e.isSkinnedMesh&&r.skinning,l=0;u&&(l|=x),h&&(l|=_),a=s[l]}if(t.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){var p=a.uuid,d=r.uuid,f=M[p];void 0===f&&(f={},M[p]=f);var m=f[d];void 0===m&&(m=a.clone(),f[d]=m),a=m}a.visible=r.visible,a.wireframe=r.wireframe;var g=r.side;return F.renderSingleSided&&g==nh&&(g=rh),F.renderReverseSided&&(g===rh?g=ih:g===ih&&(g=rh)),a.side=g,a.clipShadows=r.clipShadows,a.clippingPlanes=r.clippingPlanes,a.wireframeLinewidth=r.wireframeLinewidth,a.linewidth=r.linewidth,i&&void 0!==a.uniforms.lightPos&&a.uniforms.lightPos.value.copy(n),a}function o(e,i,a,s){if(!1!==e.visible){if(e.layers.test(i.layers)&&(e.isMesh||e.isLine||e.isPoints)&&e.castShadow&&(!e.frustumCulled||c.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,e.matrixWorld);var u=r.update(e),h=e.material;if(Array.isArray(h))for(var l=u.groups,p=0,d=l.length;pe&&(e=t[r]);return e}function Ct(){Object.defineProperty(this,"id",{value:_t()}),this.uuid=Ql.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function It(t,e,r,i,n,o){wt.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:r,widthSegments:i,heightSegments:n,depthSegments:o},this.fromBufferGeometry(new Rt(t,e,r,i,n,o)),this.mergeVertices()}function Rt(t,e,r,i,n,o){function a(t,e,r,i,n,o,a,f,m,v,y){var b,x,_=o/m,w=a/v,S=o/2,A=a/2,M=f/2,E=m+1,T=v+1,P=0,C=0,I=new g;for(x=0;x0?1:-1,h.push(I.x,I.y,I.z),l.push(b/m),l.push(1-x/v),P+=1}}for(x=0;x65535?Mt:At)(n,1),e.update(i,t.ELEMENT_ARRAY_BUFFER),c[r.id]=i,i}var s={},c={};return{get:n,update:o,getWireframeAttribute:a}}function Xt(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var r;switch(e.type){case"DirectionalLight":r={direction:new g,color:new tt,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case"SpotLight":r={position:new g,direction:new g,color:new tt,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case"PointLight":r={position:new g,color:new tt,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case"HemisphereLight":r={direction:new g,skyColor:new tt,groundColor:new tt};break;case"RectAreaLight":r={color:new tt,position:new g,halfWidth:new g,halfHeight:new g}}return t[e.id]=r,r}}}function qt(t,e,r){function i(t){var i=r.frame,n=t.geometry,a=e.get(t,n);return o[a.id]!==i&&(n.isGeometry&&a.updateFromObject(t),e.update(a),o[a.id]=i),a}function n(){o={}}var o={};return{update:i,clear:n}}function Yt(t){for(var e=t.split("\n"),r=0;r");return ae(r)}return t.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,e)}function se(t){function e(t,e,r,i){for(var n="",o=parseInt(e);o0?t.gammaFactor:1,v=ee(a,n,t.extensions),y=re(s),b=o.createProgram();r.isRawShaderMaterial?(f=[y,"\n"].filter(ne).join("\n"),m=[v,y,"\n"].filter(ne).join("\n")):(f=["precision "+n.precision+" float;","precision "+n.precision+" int;","#define SHADER_NAME "+i.name,y,n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+g,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+p:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexColors?"#define USE_COLOR":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+n.numClippingPlanes,n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#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(ne).join("\n"),m=[v,"precision "+n.precision+" float;","precision "+n.precision+" int;","#define SHADER_NAME "+i.name,y,n.alphaTest?"#define ALPHATEST "+n.alphaTest:"","#define GAMMA_FACTOR "+g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.envMap?"#define "+p:"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexColors?"#define USE_COLOR":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+n.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(n.numClippingPlanes-n.numClipIntersection),n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",n.envMap&&t.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",n.toneMapping!==Vh?"#define TONE_MAPPING":"",n.toneMapping!==Vh?hp.tonemapping_pars_fragment:"",n.toneMapping!==Vh?te("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.outputEncoding||n.mapEncoding||n.envMapEncoding||n.emissiveMapEncoding?hp.encodings_pars_fragment:"",n.mapEncoding?Qt("mapTexelToLinear",n.mapEncoding):"",n.envMapEncoding?Qt("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMapEncoding?Qt("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.outputEncoding?Jt("linearToOutputTexel",n.outputEncoding):"",n.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(ne).join("\n")),c=oe(c=ae(c),n),u=oe(u=ae(u),n),r.isShaderMaterial||(c=se(c),u=se(u));var x=f+c,_=m+u,w=Zt(o,o.VERTEX_SHADER,x),S=Zt(o,o.FRAGMENT_SHADER,_);o.attachShader(b,w),o.attachShader(b,S),void 0!==r.index0AttributeName?o.bindAttribLocation(b,0,r.index0AttributeName):!0===n.morphTargets&&o.bindAttribLocation(b,0,"position"),o.linkProgram(b);var A=o.getProgramInfoLog(b),M=o.getShaderInfoLog(w),E=o.getShaderInfoLog(S),T=!0,P=!0;!1===o.getProgramParameter(b,o.LINK_STATUS)?(T=!1,console.error("THREE.WebGLProgram: shader error: ",o.getError(),"gl.VALIDATE_STATUS",o.getProgramParameter(b,o.VALIDATE_STATUS),"gl.getProgramInfoLog",A,M,E)):""!==A?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",A):""!==M&&""!==E||(P=!1),P&&(this.diagnostics={runnable:T,material:r,programLog:A,vertexShader:{log:M,prefix:f},fragmentShader:{log:E,prefix:m}}),o.deleteShader(w),o.deleteShader(S);var C;this.getUniforms=function(){return void 0===C&&(C=new J(o,b,t)),C};var I;return this.getAttributes=function(){return void 0===I&&(I=ie(o,b)),I},this.destroy=function(){o.deleteProgram(b),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=mp++,this.code=e,this.usedTimes=1,this.program=b,this.vertexShader=w,this.fragmentShader=S,this}function ue(t,e){function r(t){var r=t.skeleton.bones;if(e.floatVertexTextures)return 1024;var i=e.maxVertexUniforms,n=Math.floor((i-20)/4),o=Math.min(n,r.length);return o0,maxBones:p,useVertexTexture:e.floatVertexTextures,morphTargets:n.morphTargets,morphNormals:n.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:n.dithering,shadowMapEnabled:t.shadowMap.enabled&&h.receiveShadow&&a.shadows.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:n.premultipliedAlpha,alphaTest:n.alphaTest,doubleSided:n.side===nh,flipSided:n.side===ih,depthPacking:void 0!==n.depthPacking&&n.depthPacking}},this.getProgramCode=function(e,r){var i=[];if(r.shaderID?i.push(r.shaderID):(i.push(e.fragmentShader),i.push(e.vertexShader)),void 0!==e.defines)for(var n in e.defines)i.push(n),i.push(e.defines[n]);for(var o=0;oe||t.height>e){var r=e/Math.max(t.width,t.height),i=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return i.width=Math.floor(t.width*r),i.height=Math.floor(t.height*r),i.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,i.width,i.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+i.width+"x"+i.height,t),i}return t}function c(t){return Ql.isPowerOfTwo(t.width)&&Ql.isPowerOfTwo(t.height)}function u(t){if(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement){var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.width=Ql.nearestPowerOfTwo(t.width),e.height=Ql.nearestPowerOfTwo(t.height),e.getContext("2d").drawImage(t,0,0,e.width,e.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+e.width+"x"+e.height,t),e}return t}function h(t){return t.wrapS!==rl||t.wrapT!==rl||t.minFilter!==nl&&t.minFilter!==sl}function l(t,e){return t.generateMipmaps&&e&&t.minFilter!==nl&&t.minFilter!==sl}function p(e){return e===nl||e===ol||e===al?t.NEAREST:t.LINEAR}function d(t){var e=t.target;e.removeEventListener("dispose",d),m(e),a.textures--}function f(t){var e=t.target;e.removeEventListener("dispose",f),g(e),a.textures--}function m(e){var r=i.get(e);if(e.image&&r.__image__webglTextureCube)t.deleteTexture(r.__image__webglTextureCube);else{if(void 0===r.__webglInit)return;t.deleteTexture(r.__webglTexture)}i.remove(e)}function g(e){var r=i.get(e),n=i.get(e.texture);if(e){if(void 0!==n.__webglTexture&&t.deleteTexture(n.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(r.__webglFramebuffer[o]),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer[o]);else t.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer);i.remove(e.texture),i.remove(e)}}function v(e,n){var o=i.get(e);if(e.version>0&&o.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==a.complete)return void _(o,e,n);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}r.activeTexture(t.TEXTURE0+n),r.bindTexture(t.TEXTURE_2D,o.__webglTexture)}function y(e,u){var h=i.get(e);if(6===e.image.length)if(e.version>0&&h.__version!==e.version){h.__image__webglTextureCube||(e.addEventListener("dispose",d),h.__image__webglTextureCube=t.createTexture(),a.textures++),r.activeTexture(t.TEXTURE0+u),r.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var p=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,m=[],g=0;g<6;g++)m[g]=p||f?f?e.image[g].image:e.image[g]:s(e.image[g],n.maxCubemapSize);var v=c(m[0]),y=o(e.format),b=o(e.type);x(t.TEXTURE_CUBE_MAP,e,v);for(g=0;g<6;g++)if(p)for(var _,w=m[g].mipmaps,S=0,A=w.length;S-1?r.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,S,y,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,S,y,_.width,_.height,0,y,b,_.data);else f?r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,y,m[g].width,m[g].height,0,y,b,m[g].data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,y,y,b,m[g]);l(e,v)&&t.generateMipmap(t.TEXTURE_CUBE_MAP),h.__version=e.version,e.onUpdate&&e.onUpdate(e)}else r.activeTexture(t.TEXTURE0+u),r.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube)}function b(e,n){r.activeTexture(t.TEXTURE0+n),r.bindTexture(t.TEXTURE_CUBE_MAP,i.get(e).__webglTexture)}function x(r,a,s){var c;if(s?(t.texParameteri(r,t.TEXTURE_WRAP_S,o(a.wrapS)),t.texParameteri(r,t.TEXTURE_WRAP_T,o(a.wrapT)),t.texParameteri(r,t.TEXTURE_MAG_FILTER,o(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,o(a.minFilter))):(t.texParameteri(r,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(r,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===rl&&a.wrapT===rl||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(r,t.TEXTURE_MAG_FILTER,p(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,p(a.minFilter)),a.minFilter!==nl&&a.minFilter!==sl&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===gl&&null===e.get("OES_texture_float_linear"))return;if(a.type===vl&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||i.get(a).__currentAnisotropy)&&(t.texParameterf(r,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,n.getMaxAnisotropy())),i.get(a).__currentAnisotropy=a.anisotropy)}}function _(e,i,p){void 0===e.__webglInit&&(e.__webglInit=!0,i.addEventListener("dispose",d),e.__webglTexture=t.createTexture(),a.textures++),r.activeTexture(t.TEXTURE0+p),r.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,i.unpackAlignment);var f=s(i.image,n.maxTextureSize);h(i)&&!1===c(f)&&(f=u(f));var m=c(f),g=o(i.format),v=o(i.type);x(t.TEXTURE_2D,i,m);var y,b=i.mipmaps;if(i.isDepthTexture){var _=t.DEPTH_COMPONENT;if(i.type===gl){if(!P)throw new Error("Float Depth Texture only supported in WebGL2.0");_=t.DEPTH_COMPONENT32F}else P&&(_=t.DEPTH_COMPONENT16);i.format===Tl&&_===t.DEPTH_COMPONENT&&i.type!==dl&&i.type!==ml&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=dl,v=o(i.type)),i.format===Pl&&(_=t.DEPTH_STENCIL,i.type!==_l&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=_l,v=o(i.type))),r.texImage2D(t.TEXTURE_2D,0,_,f.width,f.height,0,g,v,null)}else if(i.isDataTexture)if(b.length>0&&m){for(var w=0,S=b.length;w-1?r.compressedTexImage2D(t.TEXTURE_2D,w,g,y.width,y.height,0,y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):r.texImage2D(t.TEXTURE_2D,w,g,y.width,y.height,0,g,v,y.data);else if(b.length>0&&m){for(var w=0,S=b.length;w=1,it=null,nt={},ot=new d,at=new d,st={};return st[t.TEXTURE_2D]=a(t.TEXTURE_2D,t.TEXTURE_2D,1),st[t.TEXTURE_CUBE_MAP]=a(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),{buffers:{color:R,depth:L,stencil:O},init:s,initAttributes:c,enableAttribute:u,enableAttributeAndDivisor:h,disableUnusedAttributes:l,enable:p,disable:f,getCompressedTextureFormats:m,setBlending:g,setMaterial:v,setFlipSided:y,setCullFace:b,setLineWidth:x,setPolygonOffset:_,getScissorTest:w,setScissorTest:S,activeTexture:A,bindTexture:M,compressedTexImage2D:E,texImage2D:T,scissor:P,viewport:C,reset:I}}function de(t,e,r){function i(){if(void 0!==o)return o;var r=e.get("EXT_texture_filter_anisotropic");return o=null!==r?t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function n(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o,a=void 0!==r.precision?r.precision:"highp",s=n(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var c=!0===r.logarithmicDepthBuffer&&!!e.get("EXT_frag_depth"),u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),d=t.getParameter(t.MAX_VERTEX_ATTRIBS),f=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),g=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=h>0,y=!!e.get("OES_texture_float");return{getMaxAnisotropy:i,getMaxPrecision:n,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:p,maxAttributes:d,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y}}function fe(t){bt.call(this),this.cameras=t||[]}function me(t){function e(){if(i.isPresenting){var e=i.getEyeParameters("left"),n=e.renderWidth,o=e.renderHeight;p=t.getPixelRatio(),l=t.getSize(),t.setDrawingBufferSize(2*n,o,1)}else r.enabled&&t.setDrawingBufferSize(l.width,l.height,p)}var r=this,i=null,n=null;"VRFrameData"in window&&(n=new window.VRFrameData);var o=new v,a=new v,s=new v,c=new bt;c.bounds=new d(0,0,.5,1),c.layers.enable(1);var u=new bt;u.bounds=new d(.5,0,.5,1),u.layers.enable(2);var h=new fe([c,u]);h.layers.enable(1),h.layers.enable(2);var l,p;window.addEventListener("vrdisplaypresentchange",e,!1),this.enabled=!1,this.standing=!1,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===i)return t;i.depthNear=t.near,i.depthFar=t.far,i.getFrameData(n);var e=n.pose;null!==e.position?t.position.fromArray(e.position):t.position.set(0,0,0),null!==e.orientation&&t.quaternion.fromArray(e.orientation),t.updateMatrixWorld();var r=i.stageParameters;if(this.standing&&r&&(a.fromArray(r.sittingToStandingTransform),s.getInverse(a),t.matrixWorld.multiply(a),t.matrixWorldInverse.multiply(s)),!1===i.isPresenting)return t;h.matrixWorld.copy(t.matrixWorld),h.matrixWorldInverse.copy(t.matrixWorldInverse),c.matrixWorldInverse.fromArray(n.leftViewMatrix),u.matrixWorldInverse.fromArray(n.rightViewMatrix),this.standing&&r&&(c.matrixWorldInverse.multiply(s),u.matrixWorldInverse.multiply(s));var l=t.parent;null!==l&&(o.getInverse(l.matrixWorld),c.matrixWorldInverse.multiply(o),u.matrixWorldInverse.multiply(o)),c.matrixWorld.getInverse(c.matrixWorldInverse),u.matrixWorld.getInverse(u.matrixWorldInverse),c.projectionMatrix.fromArray(n.leftProjectionMatrix),u.projectionMatrix.fromArray(n.rightProjectionMatrix),h.projectionMatrix.copy(c.projectionMatrix);var p=i.getLayers();if(p.length){var d=p[0];null!==d.leftBounds&&4===d.leftBounds.length&&c.bounds.fromArray(d.leftBounds),null!==d.rightBounds&&4===d.rightBounds.length&&u.bounds.fromArray(d.rightBounds)}return h},this.getStandingMatrix=function(){return a},this.submitFrame=function(){i&&i.isPresenting&&i.submitFrame()}}function ge(t){var e={};return{get:function(r){if(void 0!==e[r])return e[r];var i;switch(r){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":i=t.getExtension("WEBGL_compressed_texture_etc1");break;default:i=t.getExtension(r)}return null===i&&console.warn("THREE.WebGLRenderer: "+r+" extension not supported."),e[r]=i,i}}}function ve(){function t(){u.value!==i&&(u.value=i,u.needsUpdate=n>0),r.numPlanes=n,r.numIntersection=0}function e(t,e,i,n){var o=null!==t?t.length:0,a=null;if(0!==o){if(a=u.value,!0!==n||null===a){var h=i+4*o,l=e.matrixWorldInverse;c.getNormalMatrix(l),(null===a||a.length=0){var u=n[s];if(void 0!==u){var h=u.normalized,l=u.itemSize,p=Bt.get(u),d=p.buffer,f=p.type,m=p.bytesPerElement;if(u.isInterleavedBufferAttribute){var g=u.data,v=g.stride,y=u.offset;g&&g.isInstancedInterleavedBuffer?(Nt.enableAttributeAndDivisor(c,g.meshPerAttribute),void 0===r.maxInstancedCount&&(r.maxInstancedCount=g.meshPerAttribute*g.count)):Nt.enableAttribute(c),Rt.bindBuffer(Rt.ARRAY_BUFFER,d),Rt.vertexAttribPointer(c,l,f,h,v*m,(i*v+y)*m)}else u.isInstancedBufferAttribute?(Nt.enableAttributeAndDivisor(c,u.meshPerAttribute),void 0===r.maxInstancedCount&&(r.maxInstancedCount=u.meshPerAttribute*u.count)):Nt.enableAttribute(c),Rt.bindBuffer(Rt.ARRAY_BUFFER,d),Rt.vertexAttribPointer(c,l,f,h,0,i*l*m)}else if(void 0!==a){var b=a[s];if(void 0!==b)switch(b.length){case 2:Rt.vertexAttrib2fv(c,b);break;case 3:Rt.vertexAttrib3fv(c,b);break;case 4:Rt.vertexAttrib4fv(c,b);break;default:Rt.vertexAttrib1fv(c,b)}}}}Nt.disableUnusedAttributes()}function l(t,e,r){if(t.visible){if(t.layers.test(e.layers))if(t.isLight)$.push(t);else if(t.isSprite)t.frustumCulled&&!bt.intersectsSprite(t)||X.push(t);else if(t.isLensFlare)q.push(t);else if(t.isImmediateRenderObject)r&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St),H.push(t,null,t.material,At.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||bt.intersectsObject(t))){r&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St);var i=jt.update(t),n=t.material;if(Array.isArray(n))for(var o=i.groups,a=0,s=o.length;a=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(var p=0;p=0&&t.numSupportedMorphNormals++}var d=i.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(i.numClippingPlanes=xt.numPlanes,i.numIntersection=xt.numIntersection,d.clippingPlanes=xt.uniform),i.fog=e,i.lightsHash=Tt.hash,t.lights&&(d.ambientLightColor.value=Tt.ambient,d.directionalLights.value=Tt.directional,d.spotLights.value=Tt.spot,d.rectAreaLights.value=Tt.rectArea,d.pointLights.value=Tt.point,d.hemisphereLights.value=Tt.hemi,d.directionalShadowMap.value=Tt.directionalShadowMap,d.directionalShadowMatrix.value=Tt.directionalShadowMatrix,d.spotShadowMap.value=Tt.spotShadowMap,d.spotShadowMatrix.value=Tt.spotShadowMatrix,d.pointShadowMap.value=Tt.pointShadowMap,d.pointShadowMatrix.value=Tt.pointShadowMatrix);var f=i.program.getUniforms(),m=J.seqWithValue(f.seq,d);i.uniformsList=m}function b(t,e,r,i){ut=0;var n=kt.get(r);if(_t&&(wt||t!==nt)){var o=t===nt&&r.id===tt;xt.setState(r.clippingPlanes,r.clipIntersection,r.clipShadows,t,n,o)}!1===r.needsUpdate&&(void 0===n.program?r.needsUpdate=!0:r.fog&&n.fog!==e?r.needsUpdate=!0:r.lights&&n.lightsHash!==Tt.hash?r.needsUpdate=!0:void 0===n.numClippingPlanes||n.numClippingPlanes===xt.numPlanes&&n.numIntersection===xt.numIntersection||(r.needsUpdate=!0)),r.needsUpdate&&(m(r,e,i),r.needsUpdate=!1);var a=!1,s=!1,c=!1,u=n.program,h=u.getUniforms(),l=n.shader.uniforms;if(u.id!==Z&&(Rt.useProgram(u.program),Z=u.id,a=!0,s=!0,c=!0),r.id!==tt&&(tt=r.id,s=!0),a||t!==nt){if(h.setValue(Rt,"projectionMatrix",t.projectionMatrix),Dt.logarithmicDepthBuffer&&h.setValue(Rt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),nt!==(ot||t)&&(nt=ot||t,s=!0,c=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshStandardMaterial||r.envMap){var p=h.map.cameraPosition;void 0!==p&&p.setValue(Rt,At.setFromMatrixPosition(t.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.skinning)&&h.setValue(Rt,"viewMatrix",t.matrixWorldInverse)}if(r.skinning){h.setOptional(Rt,i,"bindMatrix"),h.setOptional(Rt,i,"bindMatrixInverse");var d=i.skeleton;if(d){var f=d.bones;if(Dt.floatVertexTextures){if(void 0===d.boneTexture){var g=Math.sqrt(4*f.length);g=Ql.nextPowerOfTwo(Math.ceil(g)),g=Math.max(g,4);var v=new Float32Array(g*g*4);v.set(d.boneMatrices);var b=new y(v,g,g,Al,gl);d.boneMatrices=v,d.boneTexture=b,d.boneTextureSize=g}h.setValue(Rt,"boneTexture",d.boneTexture),h.setValue(Rt,"boneTextureSize",d.boneTextureSize)}else h.setOptional(Rt,d,"boneMatrices")}}return s&&(h.setValue(Rt,"toneMappingExposure",Y.toneMappingExposure),h.setValue(Rt,"toneMappingWhitePoint",Y.toneMappingWhitePoint),r.lights&&R(l,c),e&&r.fog&&A(l,e),(r.isMeshBasicMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial||r.isMeshStandardMaterial||r.isMeshNormalMaterial||r.isMeshDepthMaterial)&&x(l,r),r.isLineBasicMaterial?_(l,r):r.isLineDashedMaterial?(_(l,r),w(l,r)):r.isPointsMaterial?S(l,r):r.isMeshLambertMaterial?M(l,r):r.isMeshToonMaterial?T(l,r):r.isMeshPhongMaterial?E(l,r):r.isMeshPhysicalMaterial?C(l,r):r.isMeshStandardMaterial?P(l,r):r.isMeshDepthMaterial?r.displacementMap&&(l.displacementMap.value=r.displacementMap,l.displacementScale.value=r.displacementScale,l.displacementBias.value=r.displacementBias):r.isMeshNormalMaterial&&I(l,r),void 0!==l.ltcMat&&(l.ltcMat.value=cp.LTC_MAT_TEXTURE),void 0!==l.ltcMag&&(l.ltcMag.value=cp.LTC_MAG_TEXTURE),J.upload(Rt,n.uniformsList,l,Y)),h.setValue(Rt,"modelViewMatrix",i.modelViewMatrix),h.setValue(Rt,"normalMatrix",i.normalMatrix),h.setValue(Rt,"modelMatrix",i.matrixWorld),u}function x(t,e){t.opacity.value=e.opacity,t.diffuse.value=e.color,e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),t.map.value=e.map,t.specularMap.value=e.specularMap,t.alphaMap.value=e.alphaMap,e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var r;if(e.map?r=e.map:e.specularMap?r=e.specularMap:e.displacementMap?r=e.displacementMap:e.normalMap?r=e.normalMap:e.bumpMap?r=e.bumpMap:e.roughnessMap?r=e.roughnessMap:e.metalnessMap?r=e.metalnessMap:e.alphaMap?r=e.alphaMap:e.emissiveMap&&(r=e.emissiveMap),void 0!==r){r.isWebGLRenderTarget&&(r=r.texture);var i=r.offset,n=r.repeat;t.offsetRepeat.value.set(i.x,i.y,n.x,n.y)}t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio}function _(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function w(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function S(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*mt,t.scale.value=.5*ft,t.map.value=e.map,null!==e.map){var r=e.map.offset,i=e.map.repeat;t.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}}function A(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}function M(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function E(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function T(t,e){E(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}function P(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function C(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,P(t,e)}function I(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function R(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function L(t){for(var e=0,r=0,i=t.length;r=Dt.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+Dt.maxTextures),ut+=1,t}function N(t){var e;if(t===el)return Rt.REPEAT;if(t===rl)return Rt.CLAMP_TO_EDGE;if(t===il)return Rt.MIRRORED_REPEAT;if(t===nl)return Rt.NEAREST;if(t===ol)return Rt.NEAREST_MIPMAP_NEAREST;if(t===al)return Rt.NEAREST_MIPMAP_LINEAR;if(t===sl)return Rt.LINEAR;if(t===cl)return Rt.LINEAR_MIPMAP_NEAREST;if(t===ul)return Rt.LINEAR_MIPMAP_LINEAR;if(t===hl)return Rt.UNSIGNED_BYTE;if(t===yl)return Rt.UNSIGNED_SHORT_4_4_4_4;if(t===bl)return Rt.UNSIGNED_SHORT_5_5_5_1;if(t===xl)return Rt.UNSIGNED_SHORT_5_6_5;if(t===ll)return Rt.BYTE;if(t===pl)return Rt.SHORT;if(t===dl)return Rt.UNSIGNED_SHORT;if(t===fl)return Rt.INT;if(t===ml)return Rt.UNSIGNED_INT;if(t===gl)return Rt.FLOAT;if(t===vl&&null!==(e=Ot.get("OES_texture_half_float")))return e.HALF_FLOAT_OES;if(t===wl)return Rt.ALPHA;if(t===Sl)return Rt.RGB;if(t===Al)return Rt.RGBA;if(t===Ml)return Rt.LUMINANCE;if(t===El)return Rt.LUMINANCE_ALPHA;if(t===Tl)return Rt.DEPTH_COMPONENT;if(t===Pl)return Rt.DEPTH_STENCIL;if(t===gh)return Rt.FUNC_ADD;if(t===vh)return Rt.FUNC_SUBTRACT;if(t===yh)return Rt.FUNC_REVERSE_SUBTRACT;if(t===_h)return Rt.ZERO;if(t===wh)return Rt.ONE;if(t===Sh)return Rt.SRC_COLOR;if(t===Ah)return Rt.ONE_MINUS_SRC_COLOR;if(t===Mh)return Rt.SRC_ALPHA;if(t===Eh)return Rt.ONE_MINUS_SRC_ALPHA;if(t===Th)return Rt.DST_ALPHA;if(t===Ph)return Rt.ONE_MINUS_DST_ALPHA;if(t===Ch)return Rt.DST_COLOR;if(t===Ih)return Rt.ONE_MINUS_DST_COLOR;if(t===Rh)return Rt.SRC_ALPHA_SATURATE;if((t===Cl||t===Il||t===Rl||t===Ll)&&null!==(e=Ot.get("WEBGL_compressed_texture_s3tc"))){if(t===Cl)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===Il)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===Rl)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===Ll)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((t===Ol||t===Dl||t===Nl||t===kl)&&null!==(e=Ot.get("WEBGL_compressed_texture_pvrtc"))){if(t===Ol)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===Dl)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===Nl)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===kl)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t===Fl&&null!==(e=Ot.get("WEBGL_compressed_texture_etc1")))return e.COMPRESSED_RGB_ETC1_WEBGL;if((t===bh||t===xh)&&null!==(e=Ot.get("EXT_blend_minmax"))){if(t===bh)return e.MIN_EXT;if(t===xh)return e.MAX_EXT}return t===_l&&null!==(e=Ot.get("WEBGL_depth_texture"))?e.UNSIGNED_INT_24_8_WEBGL:0}console.log("THREE.WebGLRenderer",Yu);var k=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),F=void 0!==t.context?t.context:null,B=void 0!==t.alpha&&t.alpha,z=void 0===t.depth||t.depth,U=void 0===t.stencil||t.stencil,j=void 0!==t.antialias&&t.antialias,G=void 0===t.premultipliedAlpha||t.premultipliedAlpha,V=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,$=[],H=null,W=new Float32Array(8),X=[],q=[];this.domElement=k,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=$h,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var Y=this,Z=null,K=null,Q=null,tt=-1,et="",nt=null,ot=null,at=new d,st=null,ct=new d,ut=0,ht=k.width,ft=k.height,mt=1,gt=new d(0,0,ht,ft),vt=!1,yt=new d(0,0,ht,ft),bt=new lt,xt=new ve,_t=!1,wt=!1,St=new v,At=new g,Mt=new v,Et=new v,Tt={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},Pt={geometries:0,textures:0},It={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:It,memory:Pt,programs:null};var Rt;try{var Lt={alpha:B,depth:z,stencil:U,antialias:j,premultipliedAlpha:G,preserveDrawingBuffer:V};if(null===(Rt=F||k.getContext("webgl",Lt)||k.getContext("experimental-webgl",Lt)))throw null!==k.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===Rt.getShaderPrecisionFormat&&(Rt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),k.addEventListener("webglcontextlost",n,!1)}catch(t){console.error("THREE.WebGLRenderer: "+t)}var Ot=new ge(Rt);Ot.get("WEBGL_depth_texture"),Ot.get("OES_texture_float"),Ot.get("OES_texture_float_linear"),Ot.get("OES_texture_half_float"),Ot.get("OES_texture_half_float_linear"),Ot.get("OES_standard_derivatives"),Ot.get("ANGLE_instanced_arrays"),Ot.get("OES_element_index_uint")&&(Ct.MaxIndex=4294967296);var Dt=new de(Rt,Ot,t),Nt=new pe(Rt,Ot,N),kt=new le,Ft=new he(Rt,Ot,Nt,kt,Dt,N,Pt),Bt=new dt(Rt),Ut=new Wt(Rt,Bt,Pt),jt=new qt(Rt,Ut,It),Gt=new ue(this,Dt),Yt=new Xt,Zt=new Vt,Kt=new zt(this,Nt,jt,G),Qt=new me(this);this.info.programs=Gt.programs;var Jt=new Ht(Rt,Ot,It),te=new $t(Rt,Ot,It);r(),this.context=Rt,this.capabilities=Dt,this.extensions=Ot,this.properties=kt,this.renderLists=Zt,this.state=Nt,this.vr=Qt;var ee=new pt(this,Tt,jt,Dt);this.shadowMap=ee;var re=new it(this,X),ie=new rt(this,q);this.getContext=function(){return Rt},this.getContextAttributes=function(){return Rt.getContextAttributes()},this.forceContextLoss=function(){var t=Ot.get("WEBGL_lose_context");t&&t.loseContext()},this.getMaxAnisotropy=function(){return Dt.getMaxAnisotropy()},this.getPrecision=function(){return Dt.precision},this.getPixelRatio=function(){return mt},this.setPixelRatio=function(t){void 0!==t&&(mt=t,this.setSize(ht,ft,!1))},this.getSize=function(){return{width:ht,height:ft}},this.setSize=function(t,e,r){var i=Qt.getDevice();if(i&&i.isPresenting)return void console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");ht=t,ft=e,k.width=t*mt,k.height=e*mt,!1!==r&&(k.style.width=t+"px",k.style.height=e+"px"),this.setViewport(0,0,t,e)},this.getDrawingBufferSize=function(){return{width:ht*mt,height:ft*mt}},this.setDrawingBufferSize=function(t,e,r){ht=t,ft=e,mt=r,k.width=t*r,k.height=e*r,this.setViewport(0,0,t,e)},this.setViewport=function(t,e,r,i){yt.set(t,ft-e-i,r,i),Nt.viewport(ct.copy(yt).multiplyScalar(mt))},this.setScissor=function(t,e,r,i){gt.set(t,ft-e-i,r,i),Nt.scissor(at.copy(gt).multiplyScalar(mt))},this.setScissorTest=function(t){Nt.setScissorTest(vt=t)},this.getClearColor=Kt.getClearColor,this.setClearColor=Kt.setClearColor,this.getClearAlpha=Kt.getClearAlpha,this.setClearAlpha=Kt.setClearAlpha,this.clear=function(t,e,r){var i=0;(void 0===t||t)&&(i|=Rt.COLOR_BUFFER_BIT),(void 0===e||e)&&(i|=Rt.DEPTH_BUFFER_BIT),(void 0===r||r)&&(i|=Rt.STENCIL_BUFFER_BIT),Rt.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,r,i){this.setRenderTarget(t),this.clear(e,r,i)},this.resetGLState=i,this.dispose=function(){k.removeEventListener("webglcontextlost",n,!1),Zt.dispose()},this.renderBufferImmediate=function(t,e,r){Nt.initAttributes();var i=kt.get(t);t.hasPositions&&!i.position&&(i.position=Rt.createBuffer()),t.hasNormals&&!i.normal&&(i.normal=Rt.createBuffer()),t.hasUvs&&!i.uv&&(i.uv=Rt.createBuffer()),t.hasColors&&!i.color&&(i.color=Rt.createBuffer());var n=e.getAttributes();if(t.hasPositions&&(Rt.bindBuffer(Rt.ARRAY_BUFFER,i.position),Rt.bufferData(Rt.ARRAY_BUFFER,t.positionArray,Rt.DYNAMIC_DRAW),Nt.enableAttribute(n.position),Rt.vertexAttribPointer(n.position,3,Rt.FLOAT,!1,0,0)),t.hasNormals){if(Rt.bindBuffer(Rt.ARRAY_BUFFER,i.normal),!r.isMeshPhongMaterial&&!r.isMeshStandardMaterial&&!r.isMeshNormalMaterial&&r.shading===oh)for(var o=0,a=3*t.count;o8&&(d.length=8);for(var g=i.morphAttributes,f=0,m=d.length;f0&&A.renderInstances(i,I,L):A.render(I,L)}},this.compile=function(t,e){$=[],t.traverse(function(t){t.isLight&&$.push(t)}),O($,e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var r=0;r=0&&e<=t.width-i&&r>=0&&r<=t.height-n&&Rt.readPixels(e,r,i,n,N(u),N(h),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&Rt.bindFramebuffer(Rt.FRAMEBUFFER,Q)}}}}function be(t,e){this.name="",this.color=new tt(t),this.density=void 0!==e?e:25e-5}function xe(t,e,r){this.name="",this.color=new tt(t),this.near=void 0!==e?e:1,this.far=void 0!==r?r:1e3}function _e(){gt.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function we(t,e,r,i,n){gt.call(this),this.lensFlares=[],this.positionScreen=new g,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,r,i,n)}function Se(t){nt.call(this),this.type="SpriteMaterial",this.color=new tt(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Ae(t){gt.call(this),this.type="Sprite",this.material=void 0!==t?t:new Se}function Me(){gt.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Ee(t,e){var r=this;if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var i=0,n=this.bones.length;i=0?(l=t(v-1e-5,m,l),p.subVectors(h,l)):(l=t(v+1e-5,m,l),p.subVectors(l,h)),m-1e-5>=0?(l=t(v,m-1e-5,l),d.subVectors(h,l)):(l=t(v,m+1e-5,l),d.subVectors(l,h)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(i=0;i.9&&o<.1&&(e<.2&&(f[t+0]+=1),r<.2&&(f[t+2]+=1),i<.2&&(f[t+4]+=1))}}function a(t){d.push(t.x,t.y,t.z)}function s(e,r){var i=3*e;r.x=t[i+0],r.y=t[i+1],r.z=t[i+2]}function c(){for(var t=new g,e=new g,r=new g,i=new g,n=new l,o=new l,a=new l,s=0,c=0;s0)&&f.push(w,S,M),(c!==r-1||u0&&c(!0),e>0&&c(!1)),this.setIndex(h),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(d,3)),this.addAttribute("uv",new Et(f,2))}function yr(t,e,r,i,n,o,a){gr.call(this,0,t,e,r,i,n,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:i,openEnded:n,thetaStart:o,thetaLength:a}}function br(t,e,r,i,n,o,a){vr.call(this,0,t,e,r,i,n,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:i,openEnded:n,thetaStart:o,thetaLength:a}}function xr(t,e,r,i){wt.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},this.fromBufferGeometry(new _r(t,e,r,i)),this.mergeVertices()}function _r(t,e,r,i){Ct.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},t=t||50,e=void 0!==e?Math.max(3,e):8,r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var n,o,a=[],s=[],c=[],u=[],h=new g,p=new l;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,n=3;o<=e;o++,n+=3){var d=r+o/e*i;h.x=t*Math.cos(d),h.y=t*Math.sin(d),s.push(h.x,h.y,h.z),c.push(0,0,1),p.x=(s[n]/t+1)/2,p.y=(s[n+1]/t+1)/2,u.push(p.x,p.y)}for(n=1;n<=e;n++)a.push(n,n+1,0);this.setIndex(a),this.addAttribute("position",new Et(s,3)),this.addAttribute("normal",new Et(c,3)),this.addAttribute("uv",new Et(u,2))}function wr(t){ot.call(this,{uniforms:up.merge([cp.lights,{opacity:{value:1}}]),vertexShader:hp.shadow_vert,fragmentShader:hp.shadow_frag}),this.lights=!0,this.transparent=!0,Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}}}),this.setValues(t)}function Sr(t){ot.call(this,t),this.type="RawShaderMaterial"}function Ar(t){nt.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new tt(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Mr(t){Ar.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function Er(t){nt.call(this),this.type="MeshPhongMaterial",this.color=new tt(16777215),this.specular=new tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Uh,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(t)}function Tr(t){Er.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Pr(t){nt.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Cr(t){nt.call(this),this.type="MeshLambertMaterial",this.color=new tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Uh,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(t)}function Ir(t){nt.call(this),this.type="LineDashedMaterial",this.color=new tt(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.lights=!1,this.setValues(t)}function Rr(t,e,r){var i=this,n=!1,o=0,a=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=r,this.itemStart=function(t){a++,!1===n&&void 0!==i.onStart&&i.onStart(t,o,a),n=!0},this.itemEnd=function(t){o++,void 0!==i.onProgress&&i.onProgress(t,o,a),o===a&&(n=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)}}function Lr(t){this.manager=void 0!==t?t:xp}function Or(t){this.manager=void 0!==t?t:xp,this._parser=null}function Dr(t){this.manager=void 0!==t?t:xp,this._parser=null}function Nr(t){this.manager=void 0!==t?t:xp}function kr(t){this.manager=void 0!==t?t:xp}function Fr(t){this.manager=void 0!==t?t:xp}function Br(t,e){gt.call(this),this.type="Light",this.color=new tt(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function zr(t,e,r){Br.call(this,t,r),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(gt.DefaultUp),this.updateMatrix(),this.groundColor=new tt(e)}function Ur(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new l(512,512),this.map=null,this.matrix=new v}function jr(){Ur.call(this,new bt(50,1,.5,500))}function Gr(t,e,r,i,n,o){Br.call(this,t,e),this.type="SpotLight",this.position.copy(gt.DefaultUp),this.updateMatrix(),this.target=new gt,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==r?r:0,this.angle=void 0!==i?i:Math.PI/3,this.penumbra=void 0!==n?n:0,this.decay=void 0!==o?o:1,this.shadow=new jr}function Vr(t,e,r,i){Br.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==r?r:0,this.decay=void 0!==i?i:1,this.shadow=new Ur(new bt(90,1,.5,500))}function $r(){Ur.call(this,new yt(-5,5,5,-5,.5,500))}function Hr(t,e){Br.call(this,t,e),this.type="DirectionalLight",this.position.copy(gt.DefaultUp),this.updateMatrix(),this.target=new gt,this.shadow=new $r}function Wr(t,e){Br.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function Xr(t,e,r,i){Br.call(this,t,e),this.type="RectAreaLight",this.position.set(0,1,0),this.updateMatrix(),this.width=void 0!==r?r:10,this.height=void 0!==i?i:10}function qr(t,e,r,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new e.constructor(r),this.sampleValues=e,this.valueSize=r}function Yr(t,e,r,i){qr.call(this,t,e,r,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Zr(t,e,r,i){qr.call(this,t,e,r,i)}function Kr(t,e,r,i){qr.call(this,t,e,r,i)}function Qr(t,e,r,i){if(void 0===t)throw new Error("track name is undefined");if(void 0===e||0===e.length)throw new Error("no keyframes in track named "+t);this.name=t,this.times=_p.convertArray(e,this.TimeBufferType),this.values=_p.convertArray(r,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation),this.validate(),this.optimize()}function Jr(t,e,r,i){Qr.call(this,t,e,r,i)}function ti(t,e,r,i){qr.call(this,t,e,r,i)}function ei(t,e,r,i){Qr.call(this,t,e,r,i)}function ri(t,e,r,i){Qr.call(this,t,e,r,i)}function ii(t,e,r,i){Qr.call(this,t,e,r,i)}function ni(t,e,r){Qr.call(this,t,e,r)}function oi(t,e,r,i){Qr.call(this,t,e,r,i)}function ai(t,e,r,i){Qr.apply(this,arguments)}function si(t,e,r){this.name=t,this.tracks=r,this.duration=void 0!==e?e:-1,this.uuid=Ql.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function ci(t){this.manager=void 0!==t?t:xp,this.textures={}}function ui(t){this.manager=void 0!==t?t:xp}function hi(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function li(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:xp,this.withCredentials=!1}function pi(t){this.manager=void 0!==t?t:xp,this.texturePath=""}function di(t,e,r,i,n){var o=.5*(i-e),a=.5*(n-r),s=t*t;return(2*r-2*i+o+a)*(t*s)+(-3*r+3*i-2*o-a)*s+o*t+r}function fi(t,e){var r=1-t;return r*r*e}function mi(t,e){return 2*(1-t)*t*e}function gi(t,e){return t*t*e}function vi(t,e,r,i){return fi(t,e)+mi(t,r)+gi(t,i)}function yi(t,e){var r=1-t;return r*r*r*e}function bi(t,e){var r=1-t;return 3*r*r*t*e}function xi(t,e){return 3*(1-t)*t*t*e}function _i(t,e){return t*t*t*e}function wi(t,e,r,i,n){return yi(t,e)+bi(t,r)+xi(t,i)+_i(t,n)}function Si(){this.arcLengthDivisions=200}function Ai(t,e){Si.call(this),this.v1=t,this.v2=e}function Mi(){Si.call(this),this.curves=[],this.autoClose=!1}function Ei(t,e,r,i,n,o,a,s){Si.call(this),this.aX=t,this.aY=e,this.xRadius=r,this.yRadius=i,this.aStartAngle=n,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0}function Ti(t){Si.call(this),this.points=void 0===t?[]:t}function Pi(t,e,r,i){Si.call(this),this.v0=t,this.v1=e,this.v2=r,this.v3=i}function Ci(t,e,r){Si.call(this),this.v0=t,this.v1=e,this.v2=r}function Ii(t){Mi.call(this),this.currentPoint=new l,t&&this.fromPoints(t)}function Ri(){Ii.apply(this,arguments),this.holes=[]}function Li(){this.subPaths=[],this.currentPath=null}function Oi(t){this.data=t}function Di(t){this.manager=void 0!==t?t:xp}function Ni(t){this.manager=void 0!==t?t:xp}function ki(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new bt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new bt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Fi(){gt.call(this),this.type="AudioListener",this.context=Cp.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Bi(t){gt.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function zi(t){Bi.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Ui(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function ji(t,e,r){this.binding=t,this.valueSize=r;var i,n=Float64Array;switch(e){case"quaternion":i=this._slerp;break;case"string":case"bool":n=Array,i=this._select;break;default:i=this._lerp}this.buffer=new n(4*r),this._mixBufferRegion=i,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function Gi(t,e,r){var i=r||Vi.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Vi(t,e,r){this.path=e,this.parsedPath=r||Vi.parseTrackName(e),this.node=Vi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function $i(t){var e=arguments;this.uuid=Ql.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var r={};this._indicesByUUID=r;for(var i=0,n=arguments.length;i!==n;++i)r[e[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var o=this;this.stats={objects:{get total(){return o._objects.length},get inUse(){return this.total-o.nCachedObjects_}},get bindingsPerObject(){return o._bindings.length}}}function Hi(t,e,r){this._mixer=t,this._clip=e,this._localRoot=r||null;for(var i=e.tracks,n=i.length,o=new Array(n),a={endingStart:zl,endingEnd:zl},s=0;s!==n;++s){var c=i[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(n),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Bl,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 Wi(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Xi(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function qi(){Ct.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Yi(t,e,r,i){this.uuid=Ql.generateUUID(),this.data=t,this.itemSize=e,this.offset=r,this.normalized=!0===i}function Zi(t,e){this.uuid=Ql.generateUUID(),this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function Ki(t,e,r){Zi.call(this,t,e),this.meshPerAttribute=r||1}function Qi(t,e,r){St.call(this,t,e),this.meshPerAttribute=r||1}function Ji(t,e,r,i){this.ray=new Nt(t,e),this.near=r||0,this.far=i||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function tn(t,e){return t.distance-e.distance}function en(t,e,r,i){if(!1!==t.visible&&(t.raycast(e,r),!0===i))for(var n=t.children,o=0,a=n.length;o1?c.pop().toLowerCase():"",h=e.match(/^(.+):\/\/(.+)$/);h&&(i=h[1].toLowerCase(),e=h[2]);var l=e.substring(0,e.lastIndexOf("/")+1);if(n.includes(u)){r=u;var p=e.length-u.length-1;u=e.substr(0,p).split(".").pop().toLowerCase();var d=s.length-u.length-1;s=s.substr(0,d)}else r=!1;return{path:e,name:a,ext:u,base:s,dir:l,compressed:r,protocol:i,src:t}}function Sn(t,e,r){var i,n,o,a=null,s=0;r||(r={});var c=function(){s=!1===r.leading?0:Date.now(),a=null,o=t.apply(i,n),a||(i=n=null)};return function(){var u=Date.now();s||!1!==r.leading||(s=u);var h=e-(u-s);return i=this,n=arguments,h<=0||h>e?(a&&(clearTimeout(a),a=null),s=u,o=t.apply(i,n),a||(i=n=null)):a||!1===r.trailing||(a=setTimeout(c,h)),o}}function An(t,e){return te?1:0}function Mn(t,e,r){void 0===r&&(r=An);for(var i=0,n=t.length-1;i<=n;){var o=i+n>>1,a=r(e,t[o]);if(a>0)i=o+1;else{if(!(a<0))return o;n=o-1}}return-i-1}function En(t,e){var r=t.length-1;if(t[r]>1;t[n]>=e?r=n-1:i=n+1}return r+1}function Tn(t,e){if(t[0]>e)return-1;for(var r=0,i=t.length-1;r<=i;){var n=r+i>>1;t[n]>e?i=n-1:r=n+1}return r-1}function Pn(t,e,r){var i=En(t,e),n=Tn(t,r);return-1===i||-1===n||i>n?0:n-i+1}function Cn(t){return t.sort().filter(function(t,e,r){return 0===e||t!==r[e-1]})}function In(t){if(t.length>28672){for(var e=[],r=0;r65535?Uint32Array:Uint16Array)(t)}function Dn(t){return Array.isArray(t)?t:[t]}function Nn(t){return t.buffer&&t.buffer instanceof ArrayBuffer?t.buffer:t}function kn(t,e){return t instanceof e?t:new e(t)}function Fn(t,e){return void 0===t?t=new e:Array.isArray(t)&&(t=(new e).fromArray(t)),t}function Bn(t){return Fn(t,l)}function zn(t){return Fn(t,g)}function Un(t){return Fn(t,v)}function jn(t){return Fn(t,m)}function Gn(t){return kn(t,Float32Array)}function Vn(t){return gn(t,"").toString().toLowerCase()}function $n(t){return.01745*t}function Hn(t){return 57.29578*t}function Wn(){for(var t,e=0,r=0;r<36;r++)8===r||13===r||18===r||23===r?uf[r]="-":14===r?uf[r]="4":(e<=2&&(e=33554432+16777216*Math.random()|0),t=15&e,e>>=4,uf[r]=cf[19===r?3&t|8:t]);return uf.join("")}function Xn(t){return t-=t>>1&1431655765,16843009*((t=(858993459&t)+(t>>2&858993459))+(t>>4)&252645135)>>24}function qn(t,e,r){return(t-e)/(r-e)}function Yn(t,e,r){return Math.max(e,Math.min(r,t))}function Zn(t){return Yn(t,0,100)}function Kn(t){return Yn(t,0,1)}function Qn(t,e,r){return t+(e-t)*r}function Jn(t,e,r,i,n,o){var a=(r-t)*o,s=(i-e)*o,c=n*n;return(2*e-2*r+a+s)*(n*c)+(-3*e+3*r-2*a-s)*c+a*n+e}function to(t,e,r){return(r=Kn(qn(r,t,e)))*r*(3-2*r)}function eo(t,e,r){if(t>e)return t;var i=t/e;return((2*r-e)*i+(2*e-3*r))*i*i+r}function ro(t,e,r,i,n){this._listener=e,this._isOnce=r,this.context=i,this._signal=t,this._priority=n||0}function io(t,e){if("function"!=typeof t)throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",e))}function no(){this._bindings=[],this._prevParams=null;var t=this;this.dispatch=function(){no.prototype.dispatch.apply(t,arguments)}}function oo(t){var e={operator:void 0,rules:[]};if(!t)return e;var r,i,n=e,o=[];"("===(t=t.replace(/\(/g," ( ").replace(/\)/g," ) ").trim()).charAt(0)&&")"===t.substr(-1)&&(t=t.slice(1,-1).trim());for(var a,s=t.split(/\s+/),c=function(t){r={operator:t,rules:[]},void 0===n?(n=r,e=r):(n.rules.push(r),o.push(n),n=r)},u=function(t){i=n,void 0===(n=o.pop())&&(c(t),h(i))},h=function(t){n.rules.push(t)},l=0;l0)if("NOT"===d)a=1;else if(1===a)a=2;else{if(2!==a)throw new Error("something went wrong with 'not'");a=!1,u()}if("AND"!==d)if("OR"!==d)if("NOT"!==p.toUpperCase()){var f=df[d];if(void 0===f)if("HYDROGEN"!==d)if("SMALL"!==d)if("NUCLEOPHILIC"!==d)if("HYDROPHOBIC"!==d)if("AROMATIC"!==d)if("AMIDE"!==d)if("ACIDIC"!==d)if("BASIC"!==d)if("CHARGED"!==d)if("POLAR"!==d)if("NONPOLAR"!==d)if("CYCLIC"!==d)if("ALIPHATIC"!==d)if("SIDECHAINATTACHED"!==d)if("LIGAND"!==d)if(-1===ff.indexOf(d))if("@"!==p.charAt(0))if("#"!==p.charAt(0))if("_"!==p.charAt(0))if("["!==p[0]||"]"!==p[p.length-1])if(p.length>=1&&p.length<=4&&"^"!==p[0]&&":"!==p[0]&&"."!==p[0]&&"%"!==p[0]&&"/"!==p[0]&&isNaN(parseInt(p)))h({resname:d});else{var m={operator:"AND",rules:[]},g=p.split("/");if(g.length>1&&g[1]){if(isNaN(parseInt(g[1])))throw new Error("model must be an integer");m.rules.push({model:parseInt(g[1])})}var v=g[0].split("%");v.length>1&&m.rules.push({altloc:v[1]});var y=v[0].split(".");if(y.length>1&&y[1]){if(y[1].length>4)throw new Error("atomname must be one to four characters");m.rules.push({atomname:y[1].substring(0,4).toUpperCase()})}var b=y[0].split(":");b.length>1&&b[1]&&m.rules.push({chainname:b[1]});var x=b[0].split("^");if(x.length>1&&m.rules.push({inscode:x[1]}),x[0]){var _=void 0,w=void 0;"-"===x[0][0]&&(x[0]=x[0].substr(1),_=!0),x[0].includes("--")&&(x[0]=x[0].replace("--","-"),w=!0);var S=x[0].split("-");if(1===S.length){if(S=parseInt(S[0]),isNaN(S))throw new Error("resi must be an integer");_&&(S*=-1),m.rules.push({resno:S})}else{if(2!==S.length)throw new Error("resi range must contain one '-'");_&&(S[0]*=-1),w&&(S[1]*=-1),m.rules.push({resno:[parseInt(S[0]),parseInt(S[1])]})}}if(1===m.rules.length)h(m.rules[0]);else{if(!(m.rules.length>1))throw new Error("empty selection chunk");h(m)}}else{var A=d.substr(1,p.length-2).split(","),M=A.length>1?A:A[0];h({resname:M})}else h({element:d.substr(1)});else console.error("# for element selection deprecated, use _"),h({element:d.substr(1)});else{for(var E=p.substr(1).split(","),T=0,P=E.length;Tt.resno||e.resno[1]t.resno||e.resno[1]0?t:null}function po(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword&&!mf.includes(t.keyword)||(void 0!==t.model||(void 0!==t.chainname||(void 0!==t.resname||(void 0!==t.resno||void 0!==t.sstruc))))})),ho(t,ao)}function fo(t,e){return e&&(t=lo(t,function(t){return!(void 0===t.keyword||!mf.includes(t.keyword))||(void 0!==t.model||(void 0!==t.chainname||(void 0!==t.atomname||(void 0!==t.element||void 0!==t.altloc))))})),ho(t,so)}function mo(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword&&!gf.includes(t.keyword)||(void 0!==t.resname||(void 0!==t.resno||(void 0!==t.atomname||(void 0!==t.element||(void 0!==t.altloc||(void 0!==t.sstruc||void 0!==t.inscode))))))})),ho(t,co)}function go(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword||(void 0!==t.chainname||(void 0!==t.resname||(void 0!==t.resno||(void 0!==t.atomname||(void 0!==t.element||(void 0!==t.altloc||(void 0!==t.sstruc||void 0!==t.inscode)))))))})),ho(t,uo)}function vo(t){var e=t;return t.forEach(function(t){t.__deps&&Array.prototype.push.apply(e,vo(t.__deps))}),e}function yo(t){return Cn(vo(t)).map(function(t){return t.toString()}).join("\n\n\n")}function bo(t){var e=t.data.__name,r=t.data.__postId;if(void 0===e)console.error("message __name undefined");else if(void 0===self.func)console.error("worker func undefined",e);else{var i=function(t,e){t=t||{},void 0!==r&&(t.__postId=r);try{self.postMessage(t,e)}catch(e){console.error("self.postMessage:",e),self.postMessage(t)}};self.func(t,i)}}function xo(t,e){var r="'use strict';\n\n"+yo(e);return r+="\n\n\nself.func = "+t.toString()+";",r+="\n\n\nself.onmessage = "+bo.toString()+";",new window.Blob([r],{type:"application/javascript"})}function _o(t){zf=t}function wo(t){Uf=t}function So(e){t.Debug=e}function Ao(t){var e=wn(t),r=Wf.get(e.protocol);return r&&!(e=wn(r.getUrl(e.src))).ext&&r.getExt&&(e.ext=r.getExt(t)),e}function Mo(t,e){var r,i=Object.assign(Ao(t),e);return qf.names.includes(i.ext)?r=om:Vf.includes(i.ext)?r=cm:"plugin"===i.ext&&(r=um),r?new r(i.src,i).load():Promise.reject(new Error("autoLoad: ext '"+i.ext+"' unknown"))}function Eo(t){return To(Po(t),arguments)}function To(t,e){var r,i,n,o,a,s,c,u,h,l=1,p=t.length,d="";for(i=0;i=0),o.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,o.width?parseInt(o.width):0);break;case"e":r=o.precision?parseFloat(r).toExponential(o.precision):parseFloat(r).toExponential();break;case"f":r=o.precision?parseFloat(r).toFixed(o.precision):parseFloat(r);break;case"g":r=o.precision?String(Number(r.toPrecision(o.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=o.precision?r.substring(0,o.precision):r;break;case"t":r=String(!!r),r=o.precision?r.substring(0,o.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=o.precision?r.substring(0,o.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=o.precision?r.substring(0,o.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}pm.json.test(o.type)?d+=r:(!pm.number.test(o.type)||u&&!o.sign?h="":(h=u?"+":"-",r=r.toString().replace(pm.sign,"")),s=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",c=o.width-(h+r).length,a=o.width&&c>0?s.repeat(c):"",d+=o.align?h+r+a:"0"===s?h+a+r:a+h+r)}return d}function Po(t){if(dm[t])return dm[t];for(var e,r=t,i=[],n=0;r;){if(null!==(e=pm.text.exec(r)))i.push(e[0]);else if(null!==(e=pm.modulo.exec(r)))i.push("%");else{if(null===(e=pm.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){n|=1;var o=[],a=e[2],s=[];if(null===(s=pm.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(s[1]);""!==(a=a.substring(s[0].length));)if(null!==(s=pm.key_access.exec(a)))o.push(s[1]);else{if(null===(s=pm.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(s[1])}e[2]=o}else n|=2;if(3===n)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return dm[t]=i}function Co(){this.signals={updated:new no},this.begin(),this.maxDuration=-1/0,this.minDuration=1/0,this.avgDuration=14,this.lastDuration=1/0,this.prevFpsTime=0,this.lastFps=1/0,this.lastFrames=1,this.frames=0,this.count=0}function Io(t){if(void 0===t)return"";var e=[];for(var r in t){var i=t[r];!1!==i&&e.push("#define "+r+" "+i)}return e.join("\n")+"\n"}function Ro(t,e){e=e||{};var r=t+"|";for(var i in e)r+=i+":"+e[i];if(!_m[r]){var n=Io(e),o=Yf.get("shader/"+t);if(!o)throw new Error("empty shader, '"+t+"'");o=o.replace(xm,function(t,e){var r="shader/chunk/"+e+".glsl";return Yf.get(r)||hp[e]||""}),_m[r]=n+o}return _m[r]}function Lo(t,e,r,i){function n(e){var i=e%u,n=Math.floor(e/u),o=i*m,a=n*g;r.camera.setViewOffset(m*u,g*u,o,a,m,g),r.render(),h?v.drawImage(t.domElement,Math.floor(o/2),Math.floor(a/2),Math.ceil(m/2),Math.ceil(g/2)):v.drawImage(t.domElement,Math.floor(o),Math.floor(a),Math.ceil(m),Math.ceil(g)),"function"==typeof l&&l(e+1,d,!1)}function o(){r.setSampling(y),r.camera.view=null,"function"==typeof p&&p(d+1,d,!1)}function a(){for(var t=0;t<=d;++t)t===d?o():n(t)}function s(){function t(){e===d?o():n(e),e+=1}for(var e=0,r=0;r<=d;++r)setTimeout(t,0,r)}var c=i||{},u=void 0!==c.factor?c.factor:2,h=void 0!==c.antialias&&c.antialias,l=c.onProgress,p=c.onFinish;h&&(u*=2);var d=u*u,f=document.createElement("canvas"),m=r.width,g=r.height;h?(f.width=m*u/2,f.height=g*u/2):(f.width=m*u,f.height=g*u);var v=f.getContext("2d"),y=r.sampleLevel;r.setSampling(-1),this.render=a,this.renderAsync=s,this.canvas=f}function Oo(t,e,r,i,n){r=r||1,i=i||0;var o,a,s=n?n.length:t.length/r,c=0,u=0;if(n)for(a=0;ae?1:t=u&&e(t[o],l)>0;)t[o+1]=t[o],--o;t[o+1]=l}if(-1===c)break;h=s[c--],u=s[c--]}else{for(a=h,n(u+h>>1,o=u+1),e(t[u],t[h])>0&&n(u,h),e(t[o],t[h])>0&&n(o,h),e(t[u],t[o])>0&&n(u,o),l=t[o];;){do{o++}while(e(t[o],l)<0);do{a--}while(e(t[a],l)>0);if(a=a-u?(s[++c]=o,s[++c]=h,h=a-1):(s[++c]=u,s[++c]=a-1,u=o)}return t}function $o(t){for(var e=-1/0,r=0,i=t.length;re&&(e=t[r]);return e}function Ho(t){for(var e=1/0,r=0,i=t.length;r=0;a--){for(o=h-1;o>=0;o--)if(c=4*(a*h+o),l[c]!==e||l[c+1]!==r||l[c+2]!==i||l[c+3]!==n){s=!0;break}if(s)break}var f=a;for(s=!1,o=h-1;o>=0;o--){for(a=u-1;a>=0;a--)if(c=4*(a*h+o),l[c]!==e||l[c+1]!==r||l[c+2]!==i||l[c+3]!==n){s=!0;break}if(s)break}var m=o,g=document.createElement("canvas");return g.width=m-d,g.height=f-p,g.getContext("2d").drawImage(t,d,p,g.width,g.height,0,0,g.width,g.height),g}function Zo(t,e){function r(e){var r=s;c&&(r*=2),e&&(r=1/r),t.scene.traverse(function(t){var e=t.material;e&&e.linewidth&&(e.linewidth*=r),e&&e.uniforms&&e.uniforms.size&&void 0===e.uniforms.size.__seen&&(e.uniforms.size.value*=r,e.uniforms.size.__seen=!0)}),t.scene.traverse(function(t){var e=t.material;e&&e.uniforms&&e.uniforms.size&&delete e.uniforms.size.__seen})}function i(t){if(a){var e=d;return Yo(t,u?0:255*e.r,u?0:255*e.g,u?0:255*e.b,u?0:255)}return t}function n(t,e,r){"function"==typeof o.onProgress&&o.onProgress(t,e,r)}var o=e||{},a=gn(o.trim,!1),s=gn(o.factor,1),c=gn(o.antialias,!1),u=gn(o.transparent,!1),h=t.renderer,l=t.camera,p=h.getClearAlpha(),d=h.getClearColor();return new Promise(function(e){function o(o,s){i(a.canvas).toBlob(function(i){h.setClearAlpha(p),r(!0),t.requestRender(),n(s,s,!0),e(i)},"image/png")}var a=new Lo(h,l,t,{factor:s,antialias:c,onProgress:n,onFinish:o});h.setClearAlpha(u?0:1),r(),a.renderAsync()})}function Ko(t,e){t.traverseVisible(function(t){if(t instanceof De&&t.sortParticles){var r=t.geometry.attributes,i=r.position.count;if(0!==i){Im.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),Rm.multiplyMatrices(e.projectionMatrix,Im);var n,o,a,s;t.userData.sortData?(n=t.userData.sortData,a=n.__zArray,o=n.__sortArray,s=n.__cmpFn):(a=new Float32Array(i),o=new Uint32Array(i),n={__zArray:a,__sortArray:o,__cmpFn:s=function(t,e){var r=a[t],i=a[e];return r>i?1:r500&&!V&&$<3&&-1!==$){var e=$;$=3,j=!0,O(),V=!0,$=e,t.Debug&&jf.log("rendered still frame")}window.requestAnimationFrame(w)}function S(t,e){t*=window.devicePixelRatio,e*=window.devicePixelRatio;var r,i,n,o=zf?Dm:Nm;O(!0),ht.readRenderTargetPixels(pt,t,e,1,1,o),r=zf?Math.round(255*o[0])<<16&16711680|Math.round(255*o[1])<<8&65280|255&Math.round(255*o[2]):o[0]<<16|o[1]<<8|o[2];var a=Math.round(o[3]),s=at.getObjectById(a);return s&&(i=s.userData.instance,n=s.userData.buffer.picking),{pid:r,instance:i,picker:n}}function A(){j||(window.performance.now()-q.startTime>22&&(q.begin(),V=!1),j=!0,window.requestAnimationFrame(function(){O(),q.update()}))}function M(){var t=$n(Y.fov),e=2*Math.tan(t/2)*-K.position.z;Z.zoom=F/e}function E(){var t=X;(H=Et.copy(K.position).length())||(K.position.set(0,0,t.cameraZ),H=Math.abs(t.cameraZ)),W=Math.max(10,.5*Mt),((W+=wt.getCenter(Et).length())===1/0||W===-1/0||isNaN(W))&&(W=50);var e=(50-t.clipNear)/50,r=-(50-t.clipFar)/50;K.near=H-W*e,K.far=H+W*r;var i=(50-t.fogNear)/50,n=-(50-t.fogFar)/50,o=Q.fog;o.color.set(t.fogColor),o.near=H-W*i,o.far=H+W*n,"PerspectiveCamera"===K.type?(K.near=Math.max(.1,t.clipDist,K.near),K.far=Math.max(1,K.far),o.near=Math.max(.1,o.near),o.far=Math.max(1,o.far)):"OrthographicCamera"===K.type&&0===t.clipNear&&t.clipDist>0&&H+K.zoom>2*-t.clipDist&&(K.near+=K.zoom+t.clipDist)}function T(){K.updateMatrix(),K.updateMatrixWorld(!0),K.matrixWorldInverse.getInverse(K.matrixWorld),K.updateProjectionMatrix(),Qo(Q,K,ht,H,W),Ko(Q,K)}function P(t,e,r,i){nt.visible=t,at.visible=e,ct.visible=r,ut.visible=i}function C(){Et.copy(K.position).setLength(100*Mt),J.position.copy(K.position).add(Et),J.color.set(X.lightColor),J.intensity=X.lightIntensity,et.color.set(X.ambientColor),et.intensity=X.ambientIntensity}function I(){ht.clearTarget(pt),P(!1,!0,!1,!1),ht.render(Q,K,pt),_(),ht.setRenderTarget(null)}function R(e){e?ht.clearTarget(e):ht.clear(),P(!1,!1,!0,!1),ht.render(Q,K,e),e?ht.clearTarget(e,!1,!0,!1):ht.clearDepth(),_(),P(!0,!1,!1,t.Debug),ht.render(Q,K,e),_()}function L(){var t=Tm[Math.max(0,Math.min($,5))],e=1/t.length;mt.tForeground.value=dt.texture;for(var r=dt.width,i=dt.height,n=0;n0?L():R(),G=t,U=!1,j=!1}function D(){jf.log("scene cleared"),Q.remove(rt),r(),ht.clear()}var N,k,F,B={ticked:new no};if((N="string"==typeof e?document.getElementById(e):e instanceof window.Element?e:document.createElement("div"))===document.body)k=window.innerWidth||1,F=window.innerHeight||1;else{var z=N.getBoundingClientRect();k=z.width||1,F=z.height||1}var U,j,G,V,$,H,W,X;!function(){X={fogColor:new tt(0),fogNear:50,fogFar:100,backgroundColor:new tt(0),cameraType:"perspective",cameraFov:40,cameraZ:-80,clipNear:0,clipFar:100,clipDist:10,lightColor:new tt(14540253),lightIntensity:1,ambientColor:new tt(14540253),ambientIntensity:.2,sampleLevel:0}}();var q;!function(){q=new Co}();var Y,Z,K;!function(){var t=new g(0,0,0);(Y=new bt(X.cameraFov,k/F)).position.z=X.cameraZ,Y.lookAt(t),(Z=new yt(k/-2,k/2,F/2,F/-2)).position.z=X.cameraZ,Z.lookAt(t),(K="orthographic"===X.cameraType?Z:Y).updateProjectionMatrix()}();var Q,J,et,rt,it,nt,at,ct,ut;r();var ht,lt,pt,dt,ft,mt,gt,vt,xt;if(!1===function(){var t=window.devicePixelRatio;try{ht=new ye({preserveDrawingBuffer:!0,alpha:!0,antialias:!0})}catch(t){return N.innerHTML=Gf,!1}ht.setPixelRatio(t),ht.setSize(k,F),ht.autoClear=!1,ht.sortObjects=!0;var e=ht.getContext();wo(ht.extensions.get("EXT_frag_depth")),ht.extensions.get("OES_element_index_uint"),_o(ht.extensions.get("OES_texture_float")&&ht.extensions.get("WEBGL_color_buffer_float")||ht.extensions.get("OES_texture_float")&&Jo(e,e.FLOAT)),N.appendChild(ht.domElement);var r=k*t,i=F*t;ht.extensions.get("OES_texture_float"),lt=ht.extensions.get("OES_texture_half_float")&&Jo(e,36193),ht.extensions.get("WEBGL_color_buffer_float"),(pt=new f(r,i,{minFilter:nl,magFilter:nl,stencilBuffer:!1,format:Al,type:zf?gl:hl})).texture.generateMipmaps=!1,dt=new f(r,i,{minFilter:sl,magFilter:sl,format:Al}),ft=new f(r,i,{minFilter:nl,magFilter:nl,format:Al,type:lt?vl:zf?gl:hl}),gt=new ot({uniforms:mt={tForeground:{type:"t",value:null},scale:{type:"f",value:1}},vertexShader:Ro("Quad.vert"),fragmentShader:Ro("Quad.frag"),premultipliedAlpha:!0,transparent:!0,blending:ph,depthTest:!1,depthWrite:!1}),vt=new yt(-1,1,1,-1,0,1),xt=(new _e).add(new Bt(new Lt(2,2),gt))}())return this.container=N,void jf.error("Viewer: could not initialize renderer");var _t,wt=new st,At=new g,Mt=0;!function(){var t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),e=new Float32Array(24),r=new Ct;r.setIndex(new St(t,1)),r.addAttribute("position",new St(e,3));var i=new ot({uniforms:{uColor:{value:new tt("skyblue")}},vertexShader:Ro("BasicLine.vert"),fragmentShader:Ro("BasicLine.frag"),linewidth:2});_t=new Re(r,i),ut.add(_t)}(),d(),p();var Et=new g,Tt={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};this.container=N,this.stats=q,this.signals=B,this.rotationGroup=rt,this.translationGroup=it,this.add=n,this.remove=a,this.clear=D,this.getPickingPixels=c,this.getImage=u,this.makeImage=h,this.setLight=l,this.setFog=p,this.setBackground=d,this.setSampling=m,this.setCamera=v,this.setClip=y,this.setSize=b,this.handleResize=x,this.pick=S,this.requestRender=A,this.render=O,this.animate=w,this.updateZoom=M,this.updateHelper=i,this.renderer=ht,this.scene=Q,this.perspectiveCamera=Y,this.boundingBox=wt,this.updateBoundingBox=function(){s(),t.Debug&&i()},Object.defineProperties(this,{camera:{get:function(){return K}},width:{get:function(){return k}},height:{get:function(){return F}},sampleLevel:{get:function(){return $}}})}function ra(t){var e=t.touches[0].pageX-t.touches[1].pageX,r=t.touches[0].pageY-t.touches[1].pageY;return Math.sqrt(e*e+r*r)}function ia(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<n&&(n=u),h>o&&(o=h),l>a&&(a=l)}return[pa([e,r,i]),pa([n,o,a])]}function ua(t,e){for(var r=0,i=e.length;r>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24}function Ta(t,e){this.type=t,this.scale=e||1,this.max=10}function Pa(t,e){this.cols=t,this.rows=e,this.size=this.cols*this.rows,this.data=new Float32Array(this.size)}function Ca(t,e){for(var r=0,i=0,n=e.rows,o=e.cols,a=0,s=0,c=0,u=e.data,h=t.data;re?(e/=t,t*Math.sqrt(1+e*e)):e>0?(t/=e,e*Math.sqrt(1+t*t)):0}function za(t,e,r,i,n,o,a,s){for(var c=2*Zv,u=Kv,h=0,l=0,p=0,d=0,f=Math.max(o,30),m=0,g=0,v=0,y=0,b=0,x=0,_=0,w=0,S=0,A=0,M=0,E=0,T=0,P=0,C=0,I=0,R=0,L=4660,O=0,D=0,N=0,k=new Float64Array(a<<3);h>16)?D:-D,t[h*e+p]=O;for(d=0;d<2;d++)for(l=0;l>o),d=Math.max(0,e-i-c>>o),f=Math.max(0,r-i-u>>o),y=Math.min(h,t+i-s>>o),x=Math.min(l,e+i-c>>o),_=Math.min(p,r+i-u>>o),w=[],S=a;S<=y;++S)for(var A=d;A<=x;++A)for(var E=f;E<=_;++E){var P=b[(S*l+A)*p+E];if(P>0)for(var I=P-1,R=T[I],L=R+M[I],O=R;O>o),l=1+(a.max.y-c>>o),p=1+(a.max.z-u>>o),d=h*l*p,f=t.count,m=t.x,g=t.y,v=t.z,y=0,b=new Uint32Array(d),x=new Int32Array(f);for(i=0;i>o,w=g[i]-c>>o,S=v[i]-u>>o,A=(_*l+w)*p+S;1===(b[A]+=1)&&(y+=1),x[i]=A}var M=new Uint16Array(y);for(i=0,n=0;i0&&(b[i]=n+1,M[n]=E,n+=1)}var T=new Uint32Array(y);for(i=1;i0){var R=I-1;C[T[R]+P[R]]=i,P[R]+=1}}this.within=r}function Za(e){var r=0,i=0,n={},o={},a=window.URL.createObjectURL($f.get(e)),s=new window.Worker(a);$f.activeWorkerCount+=1,s.onmessage=function(i){r-=1;var a=i.data.__postId;t.Debug&&jf.timeEnd("Worker.postMessage "+e+" #"+a),n[a]&&n[a].call(s,i),delete n[a],delete o[a]},s.onerror=function(t){if(r-=1,t.data){var i=t.data.__postId;o[i]?o[i].call(s,t):jf.error("Worker.onerror",i,e,t),delete n[i],delete o[i]}else jf.error("Worker.onerror",e,t)},this.name=e,this.post=function(a,c,u,h){n[i]=u,o[i]=h,(a=a||{}).__name=e,a.__postId=i,a.__debug=t.Debug,t.Debug&&jf.time("Worker.postMessage "+e+" #"+i);try{s.postMessage(a,c)}catch(t){jf.error("worker.post:",t),s.postMessage(a)}return r+=1,i+=1,this},this.terminate=function(){s?(s.terminate(),window.URL.revokeObjectURL(a),$f.activeWorkerCount-=1):jf.log("no worker to terminate")},Object.defineProperties(this,{postCount:{get:function(){return i}},pending:{get:function(){return r}}})}function Ka(t,e){e=Math.min(8,e||2);var r=[],i=0;this.name=t,this.maxCount=e,this.post=function(t,e,r,i){return this.getNextWorker().post(t,e,r,i),this},this.terminate=function(){r.forEach(function(t){t.terminate()})},this.getNextWorker=function(){for(var n,o=1/0,a=0;a=i){n=new Za(t),r.push(n),i+=1;break}var s=r[a];if(0===s.pending){n=s;break}s.pending=x){N=v,L=!0;break}if(L)break}if(L)break}for(L=!1,g=o;g=x){D=g,L=!0;break}if(L)break}if(L)break}for(L=!1,m=n;m=x){O=m,L=!0;break}if(L)break}if(L)break}for(L=!1,v=h;v>=s;--v){for(g=u;g>=o;--g){for(m=c;m>=n;--m)if(p=e*r*v+e*g+m,t[p]>=x){B=v,L=!0;break}if(L)break}if(L)break}for(L=!1,g=u;g>=o;--g){for(v=B;v>=s;--v){for(m=c;m>=n;--m)if(p=e*r*v+e*g+m,t[p]>=x){F=g,L=!0;break}if(L)break}if(L)break}for(L=!1,m=c;m>=n;--m){for(g=F;g>=o;--g){for(v=B;v>=s;--v)if(p=e*r*v+e*g+m,t[p]>=x){k=m,L=!0;break}if(L)break}if(L)break}_?(n=Math.max(0,O-1),o=Math.max(0,D-1),s=Math.max(0,N-1),c=Math.min(e-1,k+1),u=Math.min(r-1,F+1),h=Math.min(i-1,B+1)):(n=Math.max(1,O-1),o=Math.max(1,D-1),s=Math.max(1,N-1),c=Math.min(e-2,k+1),u=Math.min(r-2,F+1),h=Math.min(i-2,B+1))}var z=15;for(v=s;vs&&(s=e);var a=o-n;if(0===a)return-1;var u=4*l;if(l+=1,1===a)return h[u]=n,h[u+1]=-1,h[u+2]=-1,h[u+3]=i,u;var d=n+Math.floor(a/2);p=e%3;for(var f,m,g,v,y,b=n,x=o-1;x>b;){for(v=t[3*c[g=b+x>>1]+p],m=c[g],c[g]=c[x],c[x]=m,y=b,f=b;fn&&s.pop()}var p,d,f=i(u)%3,m=3*c[h[u]],g=[t[m+0],t[m+1],t[m+2]],v=e(r,g),y=h[u+1],b=h[u+2];if(-1===b&&-1===y)return void((s.size()t[3*c[h[e]]+n])throw new Error("left child is > parent!");i+=o(a,r+1)}if(-1!==s){if(t[3*c[h[s]]+n]0&&(e=":"+Cn(t).join(" OR :")),new Cf(e)}function fs(e,r){if(r){t.Debug&&jf.time("assignSecondaryStructure");var i=[];e.eachModel(function(t){t.eachChain(function(t){i.push(t.chainname)})});var n=i.slice().sort(),o=[];n.forEach(function(t){o.push(i.indexOf(t))});var a=r.helices;(a=a.filter(function(t){return Mn(n,t[0])>=0})).sort(function(t,e){var r=t[0],i=e[0],a=t[1],s=e[1];if(r===i)return a===s?0:a=0})).sort(function(t,e){var r=t[0],i=e[0];if(r===i)return 0;var a=Mn(n,r),s=Mn(n,i);return o[a]=e;)r=Math.floor(r/e),n+=_y[r%e],i+=1;return i>=5&&jf.warn("chainname overflow"),n}function gs(e,r){t.Debug&&jf.time("calculateChainnames");var i=!0;if(e.eachChain(function(t){t.chainname&&(i=!1)}),i){var n=e.modelStore,o=e.chainStore,a=e.residueStore,s=function(t,e,r,i){for(var s=o.count,c=0;c500)return void(t.Debug&&jf.warn("more than 500 atoms, skip residue for auto-bonding",e.qualifiedName()));var c,u,h=[],l=[],p=[];if(o>50){var d=new ls(e,!0),f=e.isCg()?1.2:2.3;for(c=a;c500)return void jf.warn("more than 500 atoms, skip residue for auto-bonding",t.qualifiedName());for(var l=t.getBonds(),p=l.atomIndices1,d=l.atomIndices2,f=l.bondOrders,m=p.length,g=0;g1&&(c.x-=1),s.x<0&&(c.x+=1),s.y>1&&(c.y-=1),s.y<0&&(c.y+=1),s.z>1&&(c.z-=1),s.z<0&&(c.z+=1),t&&c.add(t),u.setPosition(c),u.multiplyMatrices(i.fracToCart,u),u.multiply(i.cartToFrac),e.push(u)}),e}if(e.unitcell){t.Debug&&jf.time("buildUnitcellAssembly");var i=e.unitcell,n=e.center.clone().applyMatrix4(i.cartToFrac),o=ps(i.spacegroup),a=new g,s=new g,c=new g;n.x>1&&(a.x-=1),n.x<0&&(a.x+=1),n.y>1&&(a.y-=1),n.y<0&&(a.y+=1),n.z>1&&(a.z-=1),n.z<0&&(a.z+=1);var u,h=new gy("UNITCELL"),l=r();if(e.biomolDict.NCS){u=[new v].concat(e.biomolDict.NCS.partList[0].matrixList);var p=[];l.forEach(function(t){u.forEach(function(e){p.push(t.clone().multiply(e))})}),h.addPart(p)}else h.addPart(l);var d=new g,f=new gy("SUPERCELL"),m=Array.prototype.concat.call(r(d.set(1,0,0)),r(d.set(0,1,0)),r(d.set(0,0,1)),r(d.set(-1,0,0)),r(d.set(0,-1,0)),r(d.set(0,0,-1)),r(d.set(1,1,0)),r(d.set(1,0,1)),r(d.set(0,1,1)),r(d.set(-1,-1,0)),r(d.set(-1,0,-1)),r(d.set(0,-1,-1)),r(d.set(1,-1,-1)),r(d.set(1,1,-1)),r(d.set(1,-1,1)),r(d.set(-1,1,1)),r(d.set(-1,-1,1)),r(d.set(-1,1,-1)),r(d.set(0,1,-1)),r(d.set(0,-1,1)),r(d.set(1,0,-1)),r(d.set(-1,0,1)),r(d.set(1,-1,0)),r(d.set(-1,1,0)),r(),r(d.set(1,1,1)),r(d.set(-1,-1,-1)));if(e.biomolDict.NCS){var y=[];m.forEach(function(t){u.forEach(function(e){y.push(t.clone().multiply(e))})}),f.addPart(y)}else f.addPart(m);e.biomolDict.UNITCELL=h,e.biomolDict.SUPERCELL=f,t.Debug&&jf.timeEnd("buildUnitcellAssembly")}}function Ss(t){var e=t.trim().toUpperCase();parseInt(e.charAt(0))&&(e=e.substr(1)),parseInt(e.charAt(0))&&(e=e.substr(1));var r=e.length;if(0===r)return"";if(1===r)return e;if(2===r){if(-1!==Sy.indexOf(e))return e;if(-1!==wy.indexOf(e[0]))return e[0]}return r>=3&&-1!==wy.indexOf(e[0])?e[0]:""}function As(t){var e=t.bondHash,r=e.countArray,i=e.offsetArray,n=e.indexArray,o=t.getBondProxy();t.eachResidue(function(t){var e=t.residueType;if(void 0===e.bonds){var a=t.atomOffset,s=[],c=[],u=[],h={};t.eachAtom(function(t){for(var e=t.index,l=i[e],p=0,d=r[e];pm){var g=m;m=f,f=g}var v=f+"|"+m;void 0===h[v]&&(h[v]=!0,s.push(f-a),c.push(m-a),u.push(o.bondOrder))}}),e.bonds={atomIndices1:s,atomIndices2:c,bondOrders:u}}})}function Ms(t,e){return t+"|"+e}function Es(t,e,r,i){return t+"|"+e.join(",")+"|"+(r?1:0)+"|"+(i||"")}function Ts(t,e,r){if(0!==r[0]&&0!==r[8]&&0!==r[4])for(var i=t.length,n=r[0],o=r[1],a=r[2],s=-e[0]+n+n/2,c=-e[1]+o+o/2,u=-e[2]+a+a/2,h=0;h.9*e[3*i+i])if(o>0)for(n=0;n<3;++n)t[r+n]-=e[3*i+n];else for(n=0;n<3;++n)t[r+n]+=e[3*i+n];return t}}function Cs(t,e,r){return[Oo(e,r[0],3,0,t),Oo(e,r[1],3,1,t),Oo(e,r[2],3,2,t)]}function Is(t,e,r,i,n){for(var o=t.length,a=new Float32Array(o),s=0;s1&&(l=1),i(e,r,n,o,h,f),i(e,r,n,o,l,m),m.sub(f).normalize(),m.toArray(a,g)}}function a(e,r,i,n,o){for(var a=r.next(),s=r.next(),c=r.next(),u=r.size,h=u-1,l=n||0,p=0;pr&&s.bondSet.clear(y)}else("OH"===u.atomname&&"TYR"===u.resname||"OH"===h.atomname&&"TYR"===h.resname)&&(function(t,e,i,n){var o,a;t.atomname===i?(o=t,a=e):(o=e,a=t),d.index=o.residueIndex;var s=d.getAtomIndexByName(n);return m.subVectors(s,o),v.subVectors(s,a),Hn(m.angleTo(v))r&&s.bondSet.clear(y)))}}return{atomSet:s.atomSet,bondSet:s.bondSet,bondStore:s.bondStore}}function Qs(t){var e=JSON.stringify(t);return void 0===Yx[e]&&(Yx[e]=new Zx(t)),Yx[e]}function Js(t,e){this.type=t,this.text=e||{}}function tc(t,e,r,i,n){function o(t,i,o){return((t*e+i)*r+o)*n}var a,s=new(i=i||Int32Array)(t*e*r*(n=n||1));this.data=s,this.index=o,this.set=function(t,e,r){var i=arguments,c=o(t,e,r);for(a=0;aa?u[h]=-1:(o=Math.sqrt(a-n),u[h]=Math.floor(o)),++h;A[l]=c,S[l]=u}}function o(r){var i,n,o,a,s,c,u,h,l,p,d,f,m,v,_,M,P,I,R=3*r,O=r;i=Math.floor(.5+g*(t[R]+w[0])),n=Math.floor(.5+g*(t[R+1]+w[1])),o=Math.floor(.5+g*(t[R+2]+w[2]));var D,N=e[O],k=S[N],F=0,B=b*x,z=A[N];for(p=0;p=y||v>=b||_>=x)){var U=m*B+v*x+_;if(E)if(T[U]&L){if(T[U]&L){var j=C[U];j!==R&&u*u+h*h+l*l<(a=i+u-Math.floor(.5+g*(t[j]+w[0])))*a+(s=n+h-Math.floor(.5+g*(t[j+1]+w[1])))*s+(c=o+l-Math.floor(.5+g*(t[j+2]+w[2])))*c&&(C[U]=r)}}else T[U]|=L,C[U]=r;else T[U]|=L}F++}}function a(e){console.time("EDTSurface fillvoxels");var r,i;for(r=0,i=T.length;r=y||d>=b||f>=x)){var B=p*F+d*x+f;if(T[B]&O){if(E){var z=C[B];u*u+h*h+l*l<(a=Math.floor(.5+g*(t[z]+w[0])))*a+(s=Math.floor(.5+g*(t[z+1]+w[1])))*s+(c=Math.floor(.5+g*(t[z+2]+w[2])))*c&&(C[B]=r)}}else T[B]|=O,E&&(C[B]=r)}N++}}function c(){var e,r;for(e=0,r=T.length;e-1&&a-1&&c-1&&s0);var f,m=v*v,g=new Uint16Array(3);for(t=0;t=m)||(T[n]|=D,E&&T[n]&O&&(o.toArray(t,e,r,g),f=g[0]*a+g[1]*x+g[2],C[n]=C[f])));console.timeEnd("EDTSurface fastdistancemap")}function l(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f,m,g=new Uint16Array(3),v=0;if(0===r)return v;var _=-1,w=-1,S=-1,A=b*x;for(h=0,p=r;h-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)T&&(T=R)}this.neighbourListLength=27*T+1,this.withinRadii=function(n,o,a,c,p){for(var d=0,f=s(n,u),y=s(o,h),x=s(a,l),_=Math.max(0,f-1),w=Math.max(0,y-1),E=Math.max(0,x-1),T=Math.min(m,f+1),P=Math.min(g,y+1),C=Math.min(v,x+1),I=_;I<=T;++I)for(var R=I*b,L=w;L<=P;++L)for(var O=L*v,D=E;D<=C;++D)for(var N=R+O+D,k=S[N],F=k+A[N],B=k;BE&&(E=A[h]);o(),a(),s(),H=-1}function n(t,e,r){for(var i=0;i=0;){if(o!==i&&o!==n&&u(o,t,e,r))return H=o,o;o=j[++a]}return H=-1,-1}function u(e,r,i,n){var o=3*e,a=M[e],s=t[o]-r,c=t[o+1]-i,u=t[o+2]-n;return s*s+c*c+u*u=0;)t0&&s0&&e(g-1),l.growIfFull(),l.resno[g]=_,void 0!==S&&(l.sstruc[g]=S.charCodeAt(0)),void 0!==A&&(l.inscode[g]=A.charCodeAt(0)),l.atomOffset[g]=m,l.atomCount[g]=0,l.count+=1,l.chainIndex[g]=v,p.residueCount[v]+=1),h.count+=1,h.residueIndex[m]=g,l.atomCount[g]+=1,n=t,o=b,a=x,s=_,c=A,u=w},this.finalize=function(){r=a,i=u,g>-1&&e(g)}}function oc(t){switch(t=t.toLowerCase()){case"polymer":return _v;case"non-polymer":return wv;case"macrolide":return Sv;case"water":return Av;default:return xv}}function ac(t,e,r){var i=""+t;return e&&(i+=":"+e),r&&(i+="^"+r),i}function sc(t){return!t||t[0]!==t[t.length-1]||"'"!==t[0]&&'"'!==t[0]?t:t.substring(1,t.length-1)}function cc(t,e){Array.isArray(t[e])||Object.keys(t).forEach(function(e){t[e]=[t[e]]})}function uc(t){return"?"!==t}function hc(t,e){return uc(t)?t:e}function lc(t){switch(t.toLowerCase()){case"?":case"sing":return 1;case"doub":return 2;case"trip":return 3;case"quad":return 4}return 0}function pc(t,e,r){var i,n,o=e.atomStore,a=e.atomMap,s=t.chem_comp,c=t.chem_comp_atom,u=t.chem_comp_bond;s&&(s.name&&(e.title=s.name.trim().replace(yw,"")),s.id&&(e.id=s.id.trim().replace(yw,"")));var h={};if(c){var l,p,d,f;for(n=c.comp_id.length,i=0;if*f)return n.growIfFull(),n.atomTypeId[m]=n.atomTypeId[t],n.x[m]=p.x,n.y[m]=p.y,n.z[m]=p.z,n.occupancy[m]=n.occupancy[t],n.serial[m]=m,n.altloc[m]="A".charCodeAt(0),r.addAtom(0,"","","HET",1,1),void(m+=1)}}})}(b)}function fc(t,e,r){var i,n,o,a,s=[],c=[],u=t.struct_conf;if(u)for(cc(u,"id"),i=0,n=u.beg_auth_seq_id.length;i0){o=o.split("(");var c=s(o[0]),u=s(o[1]);Object.keys(c).forEach(function(t){Object.keys(u).forEach(function(e){var r=new v;r.multiplyMatrices(c[t],u[e]),i[t+"x"+e]=r})})}else i=s(o);var h=[];for(var l in i)h.push(i[l]);var p=t;/^(0|[1-9][0-9]*)$/.test(p)&&(p="BU"+p);for(var d=a.asym_id_list[e].split(","),f=0,m=d.length;fw){var S=_;_=w,w=S;var A=f;f=b,b=A}if(0!==_&&0!==w)for(var M=0;Mo&&++s;e=new Int32Array(s)}for(r=0,i=0;r65535){for(var i=[],n=0;n6,"non valid type "+a);var s=qc(t,a,t.readUint32());Gc(t),e[n]={name:o,type:$c(a),value:s}}return e}function eu(t,e,r){var i,n=t.readUint32(),o=0;if(n===lS)return jc(t.readUint32()!==lS,"wrong empty tag for list of variables"),[];jc(n!==dS,"wrong tag for list of variables");var a=t.readUint32();i=new Array(a);for(var s=0;s6,"non valid type "+d);var f=t.readUint32(),m=t.readUint32();2===r&&(jc(m>0,"offsets larger than 4GB not supported"),m=t.readUint32()),h[0]===e&&(o+=f),i[s]={name:c,dimensions:h,attributes:p,type:$c(d),size:f,offset:m,record:h[0]===e}}return{variables:i,recordStep:o}}function ru(t){for(var e=1,r=0;t>=e&&r<32;)r++,e<<=1;return r}function iu(t,e){var r=1,i=0;xS[0]=1;for(var n=0;n>=8;for(;0!==a;)xS[o++]=255&a,a>>=8;r=o}var s=1;for(r--;xS[r]>=s;)i++,s*=2;return i+8*r}function nu(t,e,r,i){for(var n=(1<=8;)c|=(a=a<<8|e[s++])>>o<0&&(o>(o-=r)&(1<8;)_S[s++]=nu(t,e,8,a),i-=8;i>0&&(_S[s++]=nu(t,e,i,a));for(var c=r-1;c>0;c--){for(var u=0,h=s-1;h>=0;h--){var l=(u=u<<8|_S[h])/n[c]|0;_S[h]=l,u-=l*n[c]}o[c]=u}o[0]=_S[0]|_S[1]<<8|_S[2]<<16|_S[3]<<24}function au(t){return t.trim().split(LS).map(parseFloat)}function su(){this.regexp={vertex_pattern:/^v\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)/,normal_pattern:/^vn\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)/,uv_pattern:/^vt\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)/,face_vertex:/^f\s+(-?\d+)\s+(-?\d+)\s+(-?\d+)(?:\s+(-?\d+))?/,face_vertex_uv:/^f\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+))?/,face_vertex_uv_normal:/^f\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+)\/(-?\d+))?/,face_vertex_normal:/^f\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)(?:\s+(-?\d+)\/\/(-?\d+))?/,object_pattern:/^[og]\s*(.+)?/,smoothing_pattern:/^s\s+(\d+|on|off)/,material_library_pattern:/^mtllib /,material_use_pattern:/^usemtl /}}function cu(){this.propertyNameMapping={}}function uu(t){return t.replace(GS,"")}function hu(t){function e(){if(o(/^<\?xml\s*/)){for(var t={attributes:{}};!a()&&!s("?>");){var e=n();if(!e)return t;t.attributes[e.name]=e.value}return o(/\?>\s*/),t}}function r(){var t=o(VS);if(t){for(var e={name:t[1],attributes:{},children:[]};!(a()||s(">")||s("?>")||s("/>"));){var c=n();if(!c)return e;e.attributes[c.name]=c.value}if(o(/^\s*\/>\s*/))return e;o(/\??>\s*/),e.content=i();for(var u;u=r();)e.children.push(u);return o(/^<\/[\w-:.]+>\s*/),e}}function i(){var t=o($S);return t?t[1]:""}function n(){var t=o(HS);if(t)return{name:t[1],value:uu(t[2])}}function o(e){var r=t.match(e);if(r)return t=t.slice(r[0].length),r}function a(){return 0===t.length}function s(e){return 0===t.indexOf(e)}return t=t.trim().replace(//g,""),function(){return{declaration:e(),root:r()}}()}function lu(t,e,r){var i=t.icode.value,n=t.chain.value,o=t.altcode.value,a=t.resnum.value;return i.trim()&&(a+="^"+i),n.trim()&&(a+=":"+n),e&&(a+="."+e),r&&o.trim()&&(a+="%"+o),a+="/"+(parseInt(t.model.value)-1)}function pu(t,e,r){void 0===t[e]?t[e]=r:t[e]|=r}function du(t,e){return void 0!==t&&t.value===e}function fu(t){var e=t.inscode,r=t.chainname,i=t.atomname,n=t.altloc,o=t.resno;return e&&(o+="^"+e),r&&(o+=":"+r),i&&(o+="."+i),n&&(o+="%"+n),o+="/"+t.modelIndex}function mu(t,e,r){for(var i=0,n=e.getElementsByTagName("clash"),o=0,a=n.length;o0&&(i+=1),e.getElementsByTagName("bond-outlier").length>0&&(i+=1),e.getElementsByTagName("plane-outlier").length>0&&(i+=1),du(r.rota,"OUTLIER")&&(i+=1),du(r.rama,"OUTLIER")&&(i+=1),du(r.RNApucker,"outlier")&&(i+=1),i}function gu(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}}return t}function vu(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}function yu(t,e,r,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+i),n);for(var o=0;o>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(n=n+e[i++]|0)|0}while(--a);n%=65521,o%=65521}return n|o<<16|0}function _u(t,e,r,i){var n=QS,o=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e[a])];return-1^t}function wu(t,e){var r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_,w,S,A,M,E;r=t.state,i=t.next_in,M=t.input,n=i+(t.avail_in-5),o=t.next_out,E=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),c=r.dmax,u=r.wsize,h=r.whave,l=r.wnext,p=r.window,d=r.hold,f=r.bits,m=r.lencode,g=r.distcode,v=(1<>>24,d>>>=x,f-=x,0===(x=b>>>16&255))E[o++]=65535&b;else{if(!(16&x)){if(0==(64&x)){b=m[(65535&b)+(d&(1<>>=x,f-=x),f<15&&(d+=M[i++]<>>24,d>>>=x,f-=x,!(16&(x=b>>>16&255))){if(0==(64&x)){b=g[(65535&b)+(d&(1<c){t.msg="invalid distance too far back",r.mode=JS;break t}if(d>>>=x,f-=x,x=o-a,w>x){if((x=w-x)>h&&r.sane){t.msg="invalid distance too far back",r.mode=JS;break t}if(S=0,A=p,0===l){if(S+=u-x,x<_){_-=x;do{E[o++]=p[S++]}while(--x);S=o-w,A=E}}else if(l2;)E[o++]=A[S++],E[o++]=A[S++],E[o++]=A[S++],_-=3;_&&(E[o++]=A[S++],_>1&&(E[o++]=A[S++]))}else{S=o-w;do{E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],_-=3}while(_>2);_&&(E[o++]=E[S++],_>1&&(E[o++]=E[S++]))}break}}break}}while(i>3,d&=(1<<(f-=_<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i=1&&0===I[_];_--);if(w>_&&(w=_),0===_)return n[o++]=20971520,n[o++]=20971520,s.bits=1,0;for(x=1;x<_&&0===I[x];x++);for(w0&&(t===nA||1!==_))return-1;for(R[1]=0,y=1;yrA||t===aA&&E>iA)return 1;for(var D=0;;){D++,f=y-A,a[b]d?(m=L[O+a[b]],g=P[C+a[b]]):(m=96,g=0),c=1<>A)+(u-=c)]=f<<24|m<<16|g|0}while(0!==u);for(c=1<>=1;if(0!==c?(T&=c-1,T+=c):T=0,b++,0==--I[y]){if(y===_)break;y=e[r+a[b]]}if(y>w&&(T&l)!==h){for(0===A&&(A=w),p+=x,M=1<<(S=y-A);S+A<_&&!((M-=I[S+A])<=0);)S++,M<<=1;if(E+=1<rA||t===aA&&E>iA)return 1;n[h=T&l]=w<<24|S<<16|p-o|0}}return 0!==T&&(n[p+T]=y-A<<24|64<<16|0),s.bits=w,0}function Au(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Mu(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Eu(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=MA,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(iM),e.distcode=e.distdyn=new Int32Array(nM),e.sane=1,e.back=-1,vA):xA}function Tu(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Eu(t)):xA}function Pu(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?xA:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,Tu(t))):xA}function Cu(t,e){var r,i;return t?(i=new Mu,t.state=i,i.window=null,(r=Pu(t,e))!==vA&&(t.state=null),r):xA}function Iu(t){if(oM){var e;for(ZS=new Int32Array(512),KS=new Int32Array(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Su(pA,t.lens,0,288,ZS,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Su(dA,t.lens,0,32,KS,0,t.work,{bits:5}),oM=!1}t.lencode=ZS,t.lenbits=9,t.distcode=KS,t.distbits=5}function Ru(t,e,r,i){var n,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(yu(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>i&&(n=i),yu(o.window,e,r-i,n,o.wnext),(i-=n)?(yu(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=_u(r.check,T,2,0),u=0,h=0,r.mode=EA;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=tM;break}if((15&u)!==AA){t.msg="unknown compression method",r.mode=tM;break}if(u>>>=4,h-=4,w=8+(15&u),0===r.wbits)r.wbits=w;else if(w>r.wbits){t.msg="invalid window size",r.mode=tM;break}r.dmax=1<>8&1),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0,r.mode=TA;case TA:for(;h<32;){if(0===s)break t;s--,u+=i[o++]<>>8&255,T[2]=u>>>16&255,T[3]=u>>>24&255,r.check=_u(r.check,T,4,0)),u=0,h=0,r.mode=PA;case PA:for(;h<16;){if(0===s)break t;s--,u+=i[o++]<>8),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0,r.mode=CA;case CA:if(1024&r.flags){for(;h<16;){if(0===s)break t;s--,u+=i[o++]<>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0}else r.head&&(r.head.extra=null);r.mode=IA;case IA:if(1024&r.flags&&((d=r.length)>s&&(d=s),d&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),yu(r.head.extra,i,o,d,w)),512&r.flags&&(r.check=_u(r.check,i,d,o)),s-=d,o+=d,r.length-=d),r.length))break t;r.length=0,r.mode=RA;case RA:if(2048&r.flags){if(0===s)break t;d=0;do{w=i[o+d++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w))}while(w&&d>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=kA;break;case DA:for(;h<32;){if(0===s)break t;s--,u+=i[o++]<>>=7&h,h-=7&h,r.mode=KA;break}for(;h<3;){if(0===s)break t;s--,u+=i[o++]<>>=1,h-=1,3&u){case 0:r.mode=BA;break;case 1:if(Iu(r),r.mode=$A,e===gA){u>>>=2,h-=2;break t}break;case 2:r.mode=jA;break;case 3:t.msg="invalid block type",r.mode=tM}u>>>=2,h-=2;break;case BA:for(u>>>=7&h,h-=7&h;h<32;){if(0===s)break t;s--,u+=i[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=tM;break}if(r.length=65535&u,u=0,h=0,r.mode=zA,e===gA)break t;case zA:r.mode=UA;case UA:if(d=r.length){if(d>s&&(d=s),d>c&&(d=c),0===d)break t;yu(n,i,o,d,a),s-=d,o+=d,c-=d,a+=d,r.length-=d;break}r.mode=kA;break;case jA:for(;h<14;){if(0===s)break t;s--,u+=i[o++]<>>=5,h-=5,r.ndist=1+(31&u),u>>>=5,h-=5,r.ncode=4+(15&u),u>>>=4,h-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=tM;break}r.have=0,r.mode=GA;case GA:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},S=Su(lA,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,S){t.msg="invalid code lengths set",r.mode=tM;break}r.have=0,r.mode=VA;case VA:for(;r.have>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=g,h-=g,r.lens[r.have++]=y;else{if(16===y){for(M=g+2;h>>=g,h-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=tM;break}w=r.lens[r.have-1],d=3+(3&u),u>>>=2,h-=2}else if(17===y){for(M=g+3;h>>=g)),u>>>=3,h-=3}else{for(M=g+7;h>>=g)),u>>>=7,h-=7}if(r.have+d>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=tM;break}for(;d--;)r.lens[r.have++]=w}}if(r.mode===tM)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=tM;break}if(r.lenbits=9,A={bits:r.lenbits},S=Su(pA,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,S){t.msg="invalid literal/lengths set",r.mode=tM;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},S=Su(dA,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,S){t.msg="invalid distances set",r.mode=tM;break}if(r.mode=$A,e===gA)break t;case $A:r.mode=HA;case HA:if(s>=6&&c>=258){t.next_out=a,t.avail_out=c,t.next_in=o,t.avail_in=s,r.hold=u,r.bits=h,wu(t,p),a=t.next_out,n=t.output,c=t.avail_out,o=t.next_in,i=t.input,s=t.avail_in,u=r.hold,h=r.bits,r.mode===kA&&(r.back=-1);break}for(r.back=0;E=r.lencode[u&(1<>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=b,h-=b,r.back+=b}if(u>>>=g,h-=g,r.back+=g,r.length=y,0===v){r.mode=ZA;break}if(32&v){r.back=-1,r.mode=kA;break}if(64&v){t.msg="invalid literal/length code",r.mode=tM;break}r.extra=15&v,r.mode=WA;case WA:if(r.extra){for(M=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=XA;case XA:for(;E=r.distcode[u&(1<>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=b,h-=b,r.back+=b}if(u>>>=g,h-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=tM;break}r.offset=y,r.extra=15&v,r.mode=qA;case qA:if(r.extra){for(M=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=tM;break}r.mode=YA;case YA:if(0===c)break t;if(d=p-c,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=tM;break}d>r.wnext?(d-=r.wnext,f=r.wsize-d):f=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=n,f=a-r.offset,d=r.length;d>c&&(d=c),c-=d,r.length-=d;do{n[a++]=m[f++]}while(--d);0===r.length&&(r.mode=HA);break;case ZA:if(0===c)break t;n[a++]=r.length,c--,r.mode=HA;break;case KA:if(r.wrap){for(;h<32;){if(0===s)break t;s--,u|=i[o++]<>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e}function Fu(t,e){if(e<65537&&(t.subarray&&sM||!t.subarray&&aM))return String.fromCharCode.apply(null,vu(t,e));for(var r="",i=0;i4)s[i++]=65533,r+=o-1;else{for(n&=2===o?31:3===o?15:7;o>1&&r1?s[i++]=65533:n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|1023&n)}return Fu(s,i)}function Uu(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+cM[t[r]]>e?r:e}function ju(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function Gu(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function Vu(t){if(!(this instanceof Vu))return new Vu(t);this.options=gu({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ju,this.strm.avail_out=0;var r=Cu(this.strm,e.windowBits);if(r!==hM)throw new Error(lM[r]);this.header=new Gu,Du(this.strm,this.header)}function $u(t,e){var r=new Vu(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function Hu(t){var e;t instanceof ArrayBuffer&&(t=new Uint8Array(t));try{e=$u(t)}catch(r){e=t}return e}"undefined"!=typeof window&&function(){window.console=window.console||{};for(var t,e,r=window.console,i={},n=function(){},o="memory".split(","),a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=o.pop();)r[t]||(r[t]=i);for(;e=a.pop();)r[e]||(r[e]=n)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,"toBlob",{value:function(t,e,r){for(var i=window.atob(this.toDataURL(e,r).split(",")[1]),n=i.length,o=n>>2,a=new Uint8Array(n),s=new Uint32Array(a.buffer,0,o),c=0,u=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&t>-9007199254740992&&t<9007199254740992&&Math.floor(t)===t}),Number.isNaN||(Number.isNaN=function(t){return t!==t}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var r,i=Object(t),n=!1,o=1;o1?arguments[1]:void 0,s=a?Number(a):0;Number.isNaN(s)&&(s=0);var c=Math.min(Math.max(s,0),i);if(o+c>i)return!1;for(var u=-1;++ur.length)&&(e=r.length),e-=t.length;var i=r.indexOf(t,e);return-1!==i&&i===e}),String.prototype.repeat||(String.prototype.repeat=function(t){if(null===this)throw new TypeError("can't convert "+this+" to object");var e=""+this;if(t=+t,Number.isNaN(t)&&(t=0),t<0)throw new RangeError("repeat count must be non-negative");if(t===1/0)throw new RangeError("repeat count must be less than infinity");if(t=Math.floor(t),0===e.length||0===t)return"";if(e.length*t>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var r="";1==(1&t)&&(r+=e),0!==(t>>>=1);)e+=e;return r}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.includes||(Array.prototype.includes=function(t){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var e=Object(this),r=parseInt(e.length,10)||0;if(0===r)return!1;var i,n=parseInt(arguments[1],10)||0;n>=0?i=n:(i=r+n)<0&&(i=0);for(var o;i0?1:-1)*Math.floor(Math.abs(e)):e},i=Math.pow(2,53)-1,n=function(t){var e=r(t);return Math.min(Math.max(e,0),i)};return function(t){var r=this,i=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,a=arguments.length>1?arguments[1]:void 0;if(void 0!==a){if(!e(a))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var s,c=n(i.length),u=e(r)?Object(new r(c)):new Array(c),h=0;h0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&function(){Object.assign=function(t){var e=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1;i>=4,r[n]=e[19===n?3&t|8:t]);return r.join("")}}(),clamp:function(t,e,r){return Math.max(e,Math.min(r,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,r,i,n){return i+(t-e)*(n-i)/(r-e)},lerp:function(t,e,r){return(1-r)*t+r*e},smoothstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*(3-2*t)},smootherstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Ql.DEG2RAD},radToDeg:function(t){return t*Ql.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}};Object.defineProperties(l.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(l.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new l,e=new l;return function(r,i){return t.set(r,r),e.set(i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,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(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y;return e*e+r*r},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var r=Math.cos(e),i=Math.sin(e),n=this.x-t.x,o=this.y-t.y;return this.x=n*r-o*i+t.x,this.y=n*i+o*r+t.y,this}});var Jl=0;p.DEFAULT_IMAGE=void 0,p.DEFAULT_MAPPING=300,Object.defineProperty(p.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(p.prototype,h.prototype,{constructor:p,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){if(void 0!==t.textures[this.uuid])return t.textures[this.uuid];var e={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],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ql.generateUUID()),void 0===t.images[r.uuid]&&(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;return void 0!==t.toDataURL?e=t:((e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0,t.width,t.height)),e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),e.image=r.uuid}return t.textures[this.uuid]=e,e},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(300===this.mapping){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case el:t.x=t.x-Math.floor(t.x);break;case rl:t.x=t.x<0?0:1;break;case il:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case el:t.y=t.y-Math.floor(t.y);break;case rl:t.y=t.y<0?0:1;break;case il:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.assign(d.prototype,{isVector4:!0,set:function(t,e,r,i){return this.x=t,this.y=e,this.z=r,this.w=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){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: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=this.w,o=t.elements;return this.x=o[0]*e+o[4]*r+o[8]*i+o[12]*n,this.y=o[1]*e+o[5]*r+o[9]*i+o[13]*n,this.z=o[2]*e+o[6]*r+o[10]*i+o[14]*n,this.w=o[3]*e+o[7]*r+o[11]*i+o[15]*n,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,r,i,n,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],h=o[5],l=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(l-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(l+d)<.1&&Math.abs(a+h+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,g=(h+1)/2,v=(f+1)/2,y=(s+u)/4,b=(c+p)/4,x=(l+d)/4;return m>g&&m>v?m<.01?(r=0,i=.707106781,n=.707106781):(i=y/(r=Math.sqrt(m)),n=b/r):g>v?g<.01?(r=.707106781,i=0,n=.707106781):(r=y/(i=Math.sqrt(g)),n=x/i):v<.01?(r=.707106781,i=.707106781,n=0):(r=b/(n=Math.sqrt(v)),i=x/n),this.set(r,i,n,e),this}var _=Math.sqrt((d-l)*(d-l)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(_)<.001&&(_=1),this.x=(d-l)/_,this.y=(c-p)/_,this.z=(u-s)/_,this.w=Math.acos((a+h+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(r,i){return void 0===t&&(t=new d,e=new d),t.set(r,r,r,r),e.set(i,i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),Object.assign(f.prototype,h.prototype,{isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.assign(m,{slerp:function(t,e,r,i){return r.copy(t).slerp(e,i)},slerpFlat:function(t,e,r,i,n,o,a){var s=r[i+0],c=r[i+1],u=r[i+2],h=r[i+3],l=n[o+0],p=n[o+1],d=n[o+2],f=n[o+3];if(h!==f||s!==l||c!==p||u!==d){var m=1-a,g=s*l+c*p+u*d+h*f,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var b=Math.sqrt(y),x=Math.atan2(b,g*v);m=Math.sin(m*x)/b,a=Math.sin(a*x)/b}var _=a*v;if(s=s*m+l*_,c=c*m+p*_,u=u*m+d*_,h=h*m+f*_,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+h*h);s*=w,c*=w,u*=w,h*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=h}}),Object.defineProperties(m.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(m.prototype,{set:function(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._w=i,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var r=t._x,i=t._y,n=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(r/2),u=a(i/2),h=a(n/2),l=s(r/2),p=s(i/2),d=s(n/2);return"XYZ"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h-l*p*d):"YXZ"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h+l*p*d):"ZXY"===o?(this._x=l*u*h-c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h-l*p*d):"ZYX"===o?(this._x=l*u*h-c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h+l*p*d):"YZX"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h-l*p*d):"XZY"===o&&(this._x=l*u*h-c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h+l*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var r=e/2,i=Math.sin(r);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(r),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,r=t.elements,i=r[0],n=r[4],o=r[8],a=r[1],s=r[5],c=r[9],u=r[2],h=r[6],l=r[10],p=i+s+l;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(h-c)*e,this._y=(o-u)*e,this._z=(a-n)*e):i>s&&i>l?(e=2*Math.sqrt(1+i-s-l),this._w=(h-c)/e,this._x=.25*e,this._y=(n+a)/e,this._z=(o+u)/e):s>l?(e=2*Math.sqrt(1+s-i-l),this._w=(o-u)/e,this._x=(n+a)/e,this._y=.25*e,this._z=(c+h)/e):(e=2*Math.sqrt(1+l-i-s),this._w=(a-n)/e,this._x=(o+u)/e,this._y=(c+h)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new g;return function(r,i){return void 0===e&&(e=new g),t=r.dot(i)+1,t<1e-6?(t=0,Math.abs(r.x)>Math.abs(r.z)?e.set(-r.y,r.x,0):e.set(0,-r.z,r.y)):e.crossVectors(r,i),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var r=t._x,i=t._y,n=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=r*u+o*a+i*c-n*s,this._y=i*u+o*s+n*a-r*c,this._z=n*u+o*c+r*s-i*a,this._w=o*u-r*a-i*s-n*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var r=this._x,i=this._y,n=this._z,o=this._w,a=o*t._w+r*t._x+i*t._y+n*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=r,this._y=i,this._z=n,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(r+this._x),this._y=.5*(i+this._y),this._z=.5*(n+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,h=Math.sin(e*c)/s;return this._w=o*u+this._w*h,this._x=r*u+this._x*h,this._y=i*u+this._y*h,this._z=n*u+this._z*h,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(g.prototype,{isVector3:!0,set:function(t,e,r){return this.x=t,this.y=e,this.z=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new m;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new m;return function(e,r){return this.applyQuaternion(t.setFromAxisAngle(e,r))}}(),applyMatrix3:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[3]*r+n[6]*i,this.y=n[1]*e+n[4]*r+n[7]*i,this.z=n[2]*e+n[5]*r+n[8]*i,this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements,o=1/(n[3]*e+n[7]*r+n[11]*i+n[15]);return this.x=(n[0]*e+n[4]*r+n[8]*i+n[12])*o,this.y=(n[1]*e+n[5]*r+n[9]*i+n[13])*o,this.z=(n[2]*e+n[6]*r+n[10]*i+n[14])*o,this},applyQuaternion:function(t){var e=this.x,r=this.y,i=this.z,n=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*i-a*r,u=s*r+a*e-n*i,h=s*i+n*r-o*e,l=-n*e-o*r-a*i;return this.x=c*s+l*-n+u*-a-h*-o,this.y=u*s+l*-o+h*-n-c*-a,this.z=h*s+l*-a+c*-o-u*-n,this},project:function(){var t=new v;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new v;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[4]*r+n[8]*i,this.y=n[1]*e+n[5]*r+n[9]*i,this.z=n[2]*e+n[6]*r+n[10]*i,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new g,e=new g;return function(r,i){return t.set(r,r,r),e.set(i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,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(t){return this.x*t.x+this.y*t.y+this.z*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var r=this.x,i=this.y,n=this.z;return this.x=i*t.z-n*t.y,this.y=n*t.x-r*t.z,this.z=r*t.y-i*t.x,this},crossVectors:function(t,e){var r=t.x,i=t.y,n=t.z,o=e.x,a=e.y,s=e.z;return this.x=i*s-n*a,this.y=n*o-r*s,this.z=r*a-i*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new g;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new g;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ql.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return e*e+r*r+i*i},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=r,this.z=i,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(v.prototype,{isMatrix4:!0,set:function(t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=i,g[1]=n,g[5]=o,g[9]=a,g[13]=s,g[2]=c,g[6]=u,g[10]=h,g[14]=l,g[3]=p,g[7]=d,g[11]=f,g[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 v).fromArray(this.elements)},copy:function(t){var e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],this},copyPosition:function(t){var e=this.elements,r=t.elements;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this},extractBasis:function(t,e,r){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this},extractRotation:function(){var t=new g;return function(e){var r=this.elements,i=e.elements,n=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,2).length();return r[0]=i[0]*n,r[1]=i[1]*n,r[2]=i[2]*n,r[4]=i[4]*o,r[5]=i[5]*o,r[6]=i[6]*o,r[8]=i[8]*a,r[9]=i[9]*a,r[10]=i[10]*a,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,r=t.x,i=t.y,n=t.z,o=Math.cos(r),a=Math.sin(r),s=Math.cos(i),c=Math.sin(i),u=Math.cos(n),h=Math.sin(n);if("XYZ"===t.order){var l=o*u,p=o*h,d=a*u,f=a*h;e[0]=s*u,e[4]=-s*h,e[8]=c,e[1]=p+d*c,e[5]=l-f*c,e[9]=-a*s,e[2]=f-l*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,g=s*h,v=c*u,y=c*h;e[0]=m+y*a,e[4]=v*a-g,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=g*a-v,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){var m=s*u,g=s*h,v=c*u,y=c*h;e[0]=m-y*a,e[4]=-o*h,e[8]=v+g*a,e[1]=g+v*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){var l=o*u,p=o*h,d=a*u,f=a*h;e[0]=s*u,e[4]=d*c-p,e[8]=l*c+f,e[1]=s*h,e[5]=f*c+l,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,x=o*c,_=a*s,w=a*c;e[0]=s*u,e[4]=w-b*h,e[8]=_*h+x,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=x*h+_,e[10]=b-w*h}else if("XZY"===t.order){var b=o*s,x=o*c,_=a*s,w=a*c;e[0]=s*u,e[4]=-h,e[8]=c*u,e[1]=b*h+w,e[5]=o*u,e[9]=x*h-_,e[2]=_*h-x,e[6]=a*u,e[10]=w*h+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,r=t._x,i=t._y,n=t._z,o=t._w,a=r+r,s=i+i,c=n+n,u=r*a,h=r*s,l=r*c,p=i*s,d=i*c,f=n*c,m=o*a,g=o*s,v=o*c;return e[0]=1-(p+f),e[4]=h-v,e[8]=l+g,e[1]=h+v,e[5]=1-(u+f),e[9]=d-m,e[2]=l-g,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t=new g,e=new g,r=new g;return function(i,n,o){var a=this.elements;return r.subVectors(i,n),0===r.lengthSq()&&(r.z=1),r.normalize(),t.crossVectors(o,r),0===t.lengthSq()&&(1===Math.abs(o.z)?r.x+=1e-4:r.z+=1e-4,r.normalize(),t.crossVectors(o,r)),t.normalize(),e.crossVectors(r,t),a[0]=t.x,a[4]=e.x,a[8]=r.x,a[1]=t.y,a[5]=e.y,a[9]=r.y,a[2]=t.z,a[6]=e.z,a[10]=r.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var r=t.elements,i=e.elements,n=this.elements,o=r[0],a=r[4],s=r[8],c=r[12],u=r[1],h=r[5],l=r[9],p=r[13],d=r[2],f=r[6],m=r[10],g=r[14],v=r[3],y=r[7],b=r[11],x=r[15],_=i[0],w=i[4],S=i[8],A=i[12],M=i[1],E=i[5],T=i[9],P=i[13],C=i[2],I=i[6],R=i[10],L=i[14],O=i[3],D=i[7],N=i[11],k=i[15];return n[0]=o*_+a*M+s*C+c*O,n[4]=o*w+a*E+s*I+c*D,n[8]=o*S+a*T+s*R+c*N,n[12]=o*A+a*P+s*L+c*k,n[1]=u*_+h*M+l*C+p*O,n[5]=u*w+h*E+l*I+p*D,n[9]=u*S+h*T+l*R+p*N,n[13]=u*A+h*P+l*L+p*k,n[2]=d*_+f*M+m*C+g*O,n[6]=d*w+f*E+m*I+g*D,n[10]=d*S+f*T+m*R+g*N,n[14]=d*A+f*P+m*L+g*k,n[3]=v*_+y*M+b*C+x*O,n[7]=v*w+y*E+b*I+x*D,n[11]=v*S+y*T+b*R+x*N,n[15]=v*A+y*P+b*L+x*k,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new g;return function(e){for(var r=this,i=0,n=e.count;i>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,r){return this.r=t,this.g=e,this.b=r,this},setHSL:function(){function t(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+6*(e-t)*(2/3-r):t}return function(e,r,i){if(e=Ql.euclideanModulo(e,1),r=Ql.clamp(r,0,1),i=Ql.clamp(i,0,1),0===r)this.r=this.g=this.b=i;else{var n=i<=.5?i*(1+r):i+r-i*r,o=2*i-n;this.r=t(o,n,e+1/3),this.g=t(o,n,e),this.b=t(o,n,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var r;if(r=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var i,n=r[1],o=r[2];switch(n){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(i[1])/360,s=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(a,s,c)}}}else if(r=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u=(h=r[1]).length;if(3===u)return this.r=parseInt(h.charAt(0)+h.charAt(0),16)/255,this.g=parseInt(h.charAt(1)+h.charAt(1),16)/255,this.b=parseInt(h.charAt(2)+h.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(h.charAt(0)+h.charAt(1),16)/255,this.g=parseInt(h.charAt(2)+h.charAt(3),16)/255,this.b=parseInt(h.charAt(4)+h.charAt(5),16)/255,this}if(t&&t.length>0){var h=sp[t];void 0!==h?this.setHex(h):console.warn("THREE.Color: Unknown color "+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var r=e>0?1/e:1;return this.r=Math.pow(t.r,r),this.g=Math.pow(t.g,r),this.b=Math.pow(t.b,r),this},convertGammaToLinear:function(){var t=this.r,e=this.g,r=this.b;return this.r=t*t,this.g=e*e,this.b=r*r,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),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(t){var e,r,i=t||{h:0,s:0,l:0},n=this.r,o=this.g,a=this.b,s=Math.max(n,o,a),c=Math.min(n,o,a),u=(c+s)/2;if(c===s)e=0,r=0;else{var h=s-c;switch(r=u<=.5?h/(s+c):h/(2-s-c),s){case n:e=(o-a)/h+(o 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat theta = acos( dot( N, V ) );\n\tvec2 uv = vec2(\n\t\tsqrt( saturate( roughness ) ),\n\t\tsaturate( theta / ( 0.5 * PI ) ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.86267 + (0.49788 + 0.01436 * y ) * y;\n\tfloat b = 3.45068 + (4.18814 + y) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\n\treturn result;\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transpose( const in mat3 v ) {\n\tmat3 tmp;\n\ttmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n\ttmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n\ttmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n\treturn tmp;\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = asin( flipNormal * reflectVec.y ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltcMat;\tuniform sampler2D ltcMag;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tfloat norm = texture2D( ltcMag, uv ).a;\n\t\tvec4 t = texture2D( ltcMat, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( 1, 0, t.y ),\n\t\t\tvec3( 0, t.z, 0 ),\n\t\t\tvec3( t.w, 0, t.x )\n\t\t);\n\t\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",lights_template:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_flip:"#ifdef DOUBLE_SIDED\n\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n#else\n\tfloat flipNormal = 1.0;\n#endif\n",normal_fragment:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal ) * flipNormal;\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 1.0 - 2.0 * rgb.xyz;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\n#include \nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",distanceRGBA_frag:"uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include \n#include \n#include \nvoid main () {\n\t#include \n\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\n}\n",distanceRGBA_vert:"varying vec4 vWorldPosition;\n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",shadow_frag:"uniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) );\n}\n",shadow_vert:"#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n}\n"},lp={basic:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.fog]),vertexShader:hp.meshbasic_vert,fragmentShader:hp.meshbasic_frag},lambert:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.fog,cp.lights,{emissive:{value:new tt(0)}}]),vertexShader:hp.meshlambert_vert,fragmentShader:hp.meshlambert_frag},phong:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.bumpmap,cp.normalmap,cp.displacementmap,cp.gradientmap,cp.fog,cp.lights,{emissive:{value:new tt(0)},specular:{value:new tt(1118481)},shininess:{value:30}}]),vertexShader:hp.meshphong_vert,fragmentShader:hp.meshphong_frag},standard:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.bumpmap,cp.normalmap,cp.displacementmap,cp.roughnessmap,cp.metalnessmap,cp.fog,cp.lights,{emissive:{value:new tt(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:hp.meshphysical_vert,fragmentShader:hp.meshphysical_frag},points:{uniforms:up.merge([cp.points,cp.fog]),vertexShader:hp.points_vert,fragmentShader:hp.points_frag},dashed:{uniforms:up.merge([cp.common,cp.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hp.linedashed_vert,fragmentShader:hp.linedashed_frag},depth:{uniforms:up.merge([cp.common,cp.displacementmap]),vertexShader:hp.depth_vert,fragmentShader:hp.depth_frag},normal:{uniforms:up.merge([cp.common,cp.bumpmap,cp.normalmap,cp.displacementmap,{opacity:{value:1}}]),vertexShader:hp.normal_vert,fragmentShader:hp.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:hp.cube_vert,fragmentShader:hp.cube_frag},equirect:{uniforms:{tEquirect:{value:null},tFlip:{value:-1}},vertexShader:hp.equirect_vert,fragmentShader:hp.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new g}},vertexShader:hp.distanceRGBA_vert,fragmentShader:hp.distanceRGBA_frag}};lp.physical={uniforms:up.merge([lp.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:hp.meshphysical_vert,fragmentShader:hp.meshphysical_frag},Object.assign(et.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){var e=this;this.makeEmpty();for(var r=0,i=t.length;rthis.max.x||t.ythis.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return(e||new l).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)},clampPoint:function(t,e){return(e||new l).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new l;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}});var pp=0;Object.assign(nt.prototype,h.prototype,{isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){var e=this;if(void 0!==t)for(var r in t){var i=t[r];if(void 0!==i){var n=e[r];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):e[r]="overdraw"===r?Number(i):i:console.warn("THREE."+e.type+": '"+r+"' is not a property of this material.")}else console.warn("THREE.Material: '"+r+"' parameter is undefined.")}},toJSON:function(t){function e(t){var e=[];for(var r in t){var i=t[r];delete i.metadata,e.push(i)}return e}var r=void 0===t;r&&(t={textures:{},images:{}});var i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearCoat&&(i.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(i.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,i.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==lh&&(i.blending=this.blending),this.shading!==ah&&(i.shading=this.shading),this.side!==rh&&(i.side=this.side),this.vertexColors!==sh&&(i.vertexColors=this.vertexColors),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),i.skinning=this.skinning,i.morphTargets=this.morphTargets,i.dithering=this.dithering,r){var n=e(t.textures),o=e(t.images);n.length>0&&(i.textures=n),o.length>0&&(i.images=o)}return i},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.shading=t.shading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,r=null;if(null!==e){var i=e.length;r=new Array(i);for(var n=0;n!==i;++n)r[n]=e[n].clone()}return this.clippingPlanes=r,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),ot.prototype=Object.create(nt.prototype),ot.prototype.constructor=ot,ot.prototype.isShaderMaterial=!0,ot.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=up.clone(t.uniforms),this.defines=t.defines,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},ot.prototype.toJSON=function(t){var e=nt.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},at.prototype=Object.create(nt.prototype),at.prototype.constructor=at,at.prototype.isMeshDepthMaterial=!0,at.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Object.assign(st.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,r=1/0,i=1/0,n=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;sn&&(n=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,r,i),this.max.set(n,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,r=1/0,i=1/0,n=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;sn&&(n=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,r,i),this.max.set(n,o,a),this},setFromPoints:function(t){var e=this;this.makeEmpty();for(var r=0,i=t.length;rthis.max.x||t.ythis.max.y||t.zthis.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return(e||new g).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)},intersectsSphere:function(){var t=new g;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,r;return t.normal.x>0?(e=t.normal.x*this.min.x,r=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,r=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,r+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,r+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,r+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,r+=t.normal.z*this.min.z),e<=t.constant&&r>=t.constant},clampPoint:function(t,e){return(e||new g).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new g;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new g;return function(e){var r=e||new ct;return this.getCenter(r.center),r.radius=.5*this.getSize(t).length(),r}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new g,new g,new g,new g,new g,new g,new g,new g];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(ct.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new st;return function(e,r){var i=this.center;void 0!==r?i.copy(r):t.setFromPoints(e).getCenter(i);for(var n=0,o=0,a=e.length;othis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i},getBoundingBox:function(t){var e=t||new st;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(ut.prototype,{isMatrix3:!0,set:function(t,e,r,i,n,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=n,u[5]=s,u[6]=r,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new g;return function(e){for(var r=this,i=0,n=e.count;i1))return i.copy(n).multiplyScalar(a).add(e.start)}else if(0===this.distanceToPoint(e.start))return i.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),r=this.distanceToPoint(t.end);return e<0&&r>0||r<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return(t||new g).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new g,e=new ut;return function(r,i){var n=this.coplanarPoint(t).applyMatrix4(r),o=i||e.getNormalMatrix(r),a=this.normal.applyMatrix3(o).normalize();return this.constant=-n.dot(a),this}}(),translate:function(t){return this.constant=this.constant-t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(lt.prototype,{set:function(t,e,r,i,n,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(r),a[3].copy(i),a[4].copy(n),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,r=0;r<6;r++)e[r].copy(t.planes[r]);return this},setFromMatrix:function(t){var e=this.planes,r=t.elements,i=r[0],n=r[1],o=r[2],a=r[3],s=r[4],c=r[5],u=r[6],h=r[7],l=r[8],p=r[9],d=r[10],f=r[11],m=r[12],g=r[13],v=r[14],y=r[15];return e[0].setComponents(a-i,h-s,f-l,y-m).normalize(),e[1].setComponents(a+i,h+s,f+l,y+m).normalize(),e[2].setComponents(a+n,h+c,f+p,y+g).normalize(),e[3].setComponents(a-n,h-c,f-p,y-g).normalize(),e[4].setComponents(a-o,h-u,f-d,y-v).normalize(),e[5].setComponents(a+o,h+u,f+d,y+v).normalize(),this},intersectsObject:function(){var t=new ct;return function(e){var r=e.geometry;return null===r.boundingSphere&&r.computeBoundingSphere(),t.copy(r.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new ct;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,r=t.center,i=-t.radius,n=0;n<6;n++)if(e[n].distanceToPoint(r)0?r.min.x:r.max.x,e.x=o.normal.x>0?r.max.x:r.min.x,t.y=o.normal.y>0?r.min.y:r.max.y,e.y=o.normal.y>0?r.max.y:r.min.y,t.z=o.normal.z>0?r.min.z:r.max.z,e.z=o.normal.z>0?r.max.z:r.min.z;var a=o.distanceToPoint(t),s=o.distanceToPoint(e);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,r=0;r<6;r++)if(e[r].distanceToPoint(t)<0)return!1;return!0}}),ft.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],ft.DefaultOrder="XYZ",Object.defineProperties(ft.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(ft.prototype,{isEuler:!0,set:function(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._order=i||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,r){var i=Ql.clamp,n=t.elements,o=n[0],a=n[4],s=n[8],c=n[1],u=n[5],h=n[9],l=n[2],p=n[6],d=n[10];return e=e||this._order,"XYZ"===e?(this._y=Math.asin(i(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-l,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(i(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-l,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-i(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(i(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-l,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-i(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-h,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==r&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new v;return function(e,r,i){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,r,i)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new m;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new g(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(mt.prototype,{set:function(t){this.mask=1<1){for(var i=0;i1){for(var i=0;i0){a.children=[];for(c=0;c0&&(o.geometries=h),l.length>0&&(o.materials=l),p.length>0&&(o.textures=p),d.length>0&&(o.images=d)}return o.object=a,o},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){var r=this;if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var i=0;i0)for(f=0;f0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,r,i=this;for(this.computeFaceNormals(),t=0,e=this.faces.length;t0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,r,i,n,o=this;for(r=0,i=this.faces.length;r0&&(e+=r[i].distanceTo(r[i-1])),t.lineDistances[i]=e},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new st),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ct),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,r){if(!t||!t.isGeometry)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var i,n=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],h=t.faceVertexUvs[0],l=this.colors,p=t.colors;void 0===r&&(r=0),void 0!==e&&(i=(new ut).getNormalMatrix(e));for(var d=0,f=a.length;d=0;r--){var m=d[r];for(c.faces.splice(m,1),a=0,s=this.faceVertexUvs.length;a0,_=y.vertexNormals.length>0,w=1!==y.color.r||1!==y.color.g||1!==y.color.b,S=y.vertexColors.length>0,A=0;if(A=t(A,0,0),A=t(A,1,!0),A=t(A,2,!1),A=t(A,3,b),A=t(A,4,x),A=t(A,5,_),A=t(A,6,w),A=t(A,7,S),l.push(A),l.push(y.a,y.b,y.c),l.push(y.materialIndex),b){var M=n.faceVertexUvs[0][u];l.push(i(M[0]),i(M[1]),i(M[2]))}if(x&&l.push(e(y.normal)),_){var E=y.vertexNormals;l.push(e(E[0]),e(E[1]),e(E[2]))}if(w&&l.push(r(y.color)),S){var T=y.vertexColors;l.push(r(T[0]),r(T[1]),r(T[2]))}}return o.data={},o.data.vertices=c,o.data.normals=p,f.length>0&&(o.data.colors=f),g.length>0&&(o.data.uvs=[g]),o.data.faces=l,o},clone:function(){return(new wt).copy(this)},copy:function(t){var e,r,i,n,o,a,s=this;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=t.name;var c=t.vertices;for(e=0,r=c.length;e0,s=o[1]&&o[1].length>0,c=t.morphTargets,u=c.length;if(u>0){e=[];for(y=0;y0){h=[];for(y=0;y65535?Mt:At)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new St(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,r){this.groups.push({start:t,count:e,materialIndex:void 0!==r?r:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var r=this.attributes.normal;return void 0!==r&&((new ut).getNormalMatrix(t).applyToBufferAttribute(r),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new v;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new v;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new v;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new v;return function(e,r,i){return t.makeTranslation(e,r,i),this.applyMatrix(t),this}}(),scale:function(){var t=new v;return function(e,r,i){return t.makeScale(e,r,i),this.applyMatrix(t),this}}(),lookAt:function(){var t=new gt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var r=new Et(3*e.vertices.length,3),i=new Et(3*e.colors.length,3);if(this.addAttribute("position",r.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var n=new Et(e.lineDistances.length,1);this.addAttribute("lineDistance",n.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var r=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(r=void 0,e.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(e);r.verticesNeedUpdate=e.verticesNeedUpdate,r.normalsNeedUpdate=e.normalsNeedUpdate,r.colorsNeedUpdate=e.colorsNeedUpdate,r.uvsNeedUpdate=e.uvsNeedUpdate,r.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=r}var i;return!0===e.verticesNeedUpdate&&(void 0!==(i=this.attributes.position)&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),!0===e.normalsNeedUpdate&&(void 0!==(i=this.attributes.normal)&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),!0===e.colorsNeedUpdate&&(void 0!==(i=this.attributes.color)&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(void 0!==(i=this.attributes.uv)&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(void 0!==(i=this.attributes.lineDistance)&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Tt).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=this,r=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new St(r,3).copyVector3sArray(t.vertices)),t.normals.length>0){var i=new Float32Array(3*t.normals.length);this.addAttribute("normal",new St(i,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var n=new Float32Array(3*t.colors.length);this.addAttribute("color",new St(n,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var o=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new St(o,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var a=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new St(a,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var s=new(Pt(t.indices)>65535?Uint32Array:Uint16Array)(3*t.indices.length);this.setIndex(new St(s,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var c in t.morphTargets){for(var u=[],h=t.morphTargets[c],l=0,p=h.length;l0){var m=new Et(4*t.skinIndices.length,4);this.addAttribute("skinIndex",m.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var g=new Et(4*t.skinWeights.length,4);this.addAttribute("skinWeight",g.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new st);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new st,e=new g;return function(){null===this.boundingSphere&&(this.boundingSphere=new ct);var r=this.attributes.position;if(r){var i=this.boundingSphere.center;t.setFromBufferAttribute(r),t.getCenter(i);for(var n=0,o=0,a=r.count;o0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Ct).copy(this)},copy:function(t){var e,r,i,n=this;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var o=t.index;null!==o&&this.setIndex(o.clone());var a=t.attributes;for(e in a){var s=a[e];n.addAttribute(e,s.clone())}var c=t.morphAttributes;for(e in c){var u=[],h=c[e];for(r=0,i=h.length;r0)if(s=p*f-d,c=p*d-f,h=l*g,s>=0)if(c>=-h)if(c<=h){var v=1/g;u=(s*=v)*(s+p*(c*=v)+2*d)+c*(p*s+c+2*f)+m}else c=l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;else c=-l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;else c<=-h?u=-(s=Math.max(0,-(-p*l+d)))*s+(c=s>0?-l:Math.min(Math.max(-l,-f),l))*(c+2*f)+m:c<=h?(s=0,u=(c=Math.min(Math.max(-l,-f),l))*(c+2*f)+m):u=-(s=Math.max(0,-(p*l+d)))*s+(c=s>0?l:Math.min(Math.max(-l,-f),l))*(c+2*f)+m;else c=p>0?-l:l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(c).add(t),u}}(),intersectSphere:function(){var t=new g;return function(e,r){t.subVectors(e.center,this.origin);var i=t.dot(this.direction),n=t.dot(t)-i*i,o=e.radius*e.radius;if(n>o)return null;var a=Math.sqrt(o-n),s=i-a,c=i+a;return s<0&&c<0?null:s<0?this.at(c,r):this.at(s,r)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var r=-(this.origin.dot(t.normal)+t.constant)/e;return r>=0?r:null},intersectPlane:function(t,e){var r=this.distanceToPlane(t);return null===r?null:this.at(r,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var r,i,n,o,a,s,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,l=this.origin;return c>=0?(r=(t.min.x-l.x)*c,i=(t.max.x-l.x)*c):(r=(t.max.x-l.x)*c,i=(t.min.x-l.x)*c),u>=0?(n=(t.min.y-l.y)*u,o=(t.max.y-l.y)*u):(n=(t.max.y-l.y)*u,o=(t.min.y-l.y)*u),r>o||n>i?null:((n>r||r!==r)&&(r=n),(o=0?(a=(t.min.z-l.z)*h,s=(t.max.z-l.z)*h):(a=(t.max.z-l.z)*h,s=(t.min.z-l.z)*h),r>s||a>i?null:((a>r||r!==r)&&(r=a),(s=0?r:i,e)))},intersectsBox:function(){var t=new g;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new g,e=new g,r=new g,i=new g;return function(n,o,a,s,c){e.subVectors(o,n),r.subVectors(a,n),i.crossVectors(e,r);var u,h=this.direction.dot(i);if(h>0){if(s)return null;u=1}else{if(!(h<0))return null;u=-1,h=-h}t.subVectors(this.origin,n);var l=u*this.direction.dot(r.crossVectors(t,r));if(l<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(l+p>h)return null;var d=-u*t.dot(i);return d<0?null:this.at(d/h,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(kt.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return(t||new g).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return(t||new g).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var r=e||new g;return this.delta(r).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new g,e=new g;return function(r,i){t.subVectors(r,this.start),e.subVectors(this.end,this.start);var n=e.dot(e),o=e.dot(t)/n;return i&&(o=Ql.clamp(o,0,1)),o}}(),closestPointToPoint:function(t,e,r){var i=this.closestPointToPointParameter(t,e),n=r||new g;return this.delta(n).multiplyScalar(i).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(Ft,{normal:function(){var t=new g;return function(e,r,i,n){var o=n||new g;o.subVectors(i,r),t.subVectors(e,r),o.cross(t);var a=o.lengthSq();return a>0?o.multiplyScalar(1/Math.sqrt(a)):o.set(0,0,0)}}(),barycoordFromPoint:function(){var t=new g,e=new g,r=new g;return function(i,n,o,a,s){t.subVectors(a,n),e.subVectors(o,n),r.subVectors(i,n);var c=t.dot(t),u=t.dot(e),h=t.dot(r),l=e.dot(e),p=e.dot(r),d=c*l-u*u,f=s||new g;if(0===d)return f.set(-2,-1,-1);var m=1/d,v=(l*h-u*p)*m,y=(c*p-u*h)*m;return f.set(1-v-y,y,v)}}(),containsPoint:function(){var t=new g;return function(e,r,i,n){var o=Ft.barycoordFromPoint(e,r,i,n,t);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}()}),Object.assign(Ft.prototype,{set:function(t,e,r){return this.a.copy(t),this.b.copy(e),this.c.copy(r),this},setFromPointsAndIndices:function(t,e,r,i){return this.a.copy(t[e]),this.b.copy(t[r]),this.c.copy(t[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new g,e=new g;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){return(t||new g).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return Ft.normal(this.a,this.b,this.c,t)},plane:function(t){return(t||new ht).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return Ft.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ft.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t=new ht,e=[new kt,new kt,new kt],r=new g,i=new g;return function(n,o){var a=o||new g,s=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(n,r),!0===this.containsPoint(r))a.copy(r);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var c=0;c0){var s=o[a[0]];if(void 0!==s)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=c.length;te.far?null:{distance:c,point:x.clone(),object:t}}function r(r,i,n,o,u,h,l,p){a.fromBufferAttribute(o,h),s.fromBufferAttribute(o,l),c.fromBufferAttribute(o,p);var g=e(r,i,n,a,s,c,b);return g&&(u&&(d.fromBufferAttribute(u,h),f.fromBufferAttribute(u,l),m.fromBufferAttribute(u,p),g.uv=t(b,a,s,c,d,f,m)),g.face=new xt(h,l,p,Ft.normal(a,s,c)),g.faceIndex=h),g}var i=new v,n=new Nt,o=new ct,a=new g,s=new g,c=new g,u=new g,h=new g,p=new g,d=new l,f=new l,m=new l,y=new g,b=new g,x=new g;return function(l,g){var v=this,y=this.geometry,x=this.material,_=this.matrixWorld;if(void 0!==x&&(null===y.boundingSphere&&y.computeBoundingSphere(),o.copy(y.boundingSphere),o.applyMatrix4(_),!1!==l.ray.intersectsSphere(o)&&(i.getInverse(_),n.copy(l.ray).applyMatrix4(i),null===y.boundingBox||!1!==n.intersectsBox(y.boundingBox)))){var w;if(y.isBufferGeometry){var S,A,M,E,T,P=y.index,C=y.attributes.position,I=y.attributes.uv;if(null!==P)for(E=0,T=P.count;E0&&(D=B);for(var z=0,U=F.length;zo)){var a=i.ray.origin.distanceTo(t);ai.far||n.push({distance:a,point:t.clone(),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),Me.prototype=Object.assign(Object.create(gt.prototype),{constructor:Me,copy:function(t){var e=this;gt.prototype.copy.call(this,t,!1);for(var r=t.levels,i=0,n=r.length;i1){t.setFromMatrixPosition(r.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var n=t.distanceTo(e);i[0].object.visible=!0;for(var o=1,a=i.length;o=i[o].distance;o++)i[o-1].object.visible=!1,i[o].object.visible=!0;for(;os||(d.applyMatrix4(o.matrixWorld),(E=i.ray.origin.distanceTo(d))i.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o}))}else for(var b=0,x=v.length/3-1;bs||(d.applyMatrix4(o.matrixWorld),(E=i.ray.origin.distanceTo(d))i.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o}))}else if(c.isGeometry)for(var S=c.vertices,A=S.length,b=0;bs)){d.applyMatrix4(o.matrixWorld);var E=i.ray.origin.distanceTo(d);Ei.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Re.prototype=Object.assign(Object.create(Ie.prototype),{constructor:Re,isLineSegments:!0}),Le.prototype=Object.assign(Object.create(Ie.prototype),{constructor:Le,isLineLoop:!0}),Oe.prototype=Object.create(nt.prototype),Oe.prototype.constructor=Oe,Oe.prototype.isPointsMaterial=!0,Oe.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},De.prototype=Object.assign(Object.create(gt.prototype),{constructor:De,isPoints:!0,raycast:function(){var t=new v,e=new Nt,r=new ct;return function(i,n){function o(t,r){var o=e.distanceSqToPoint(t);if(oi.far)return;n.push({distance:u,distanceToRay:Math.sqrt(o),point:s.clone(),index:r,face:null,object:a})}}var a=this,s=this.geometry,c=this.matrixWorld,u=i.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),r.copy(s.boundingSphere),r.applyMatrix4(c),r.radius+=u,!1!==i.ray.intersectsSphere(r)){t.getInverse(c),e.copy(i.ray).applyMatrix4(t);var h=u/((this.scale.x+this.scale.y+this.scale.z)/3),l=h*h,p=new g;if(s.isBufferGeometry){var d=s.index,f=s.attributes.position.array;if(null!==d)for(var m=d.array,v=0,y=m.length;v=-Number.EPSILON&&P>=-Number.EPSILON&&T>=-Number.EPSILON))return!1;return!0}return function(e,r){var i=e.length;if(i<3)return null;var n,o,a,s=[],c=[],u=[];if(gp.area(e)>0)for(o=0;o2;){if(l--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),r?u:s;if(n=o,h<=n&&(n=0),o=n+1,h<=o&&(o=0),a=o+1,h<=a&&(a=0),t(e,n,o,a,h,c)){var p,d,f,m,g;for(p=c[n],d=c[o],f=c[a],s.push([e[p],e[d],e[f]]),u.push([c[n],c[o],c[a]]),m=o,g=o+1;g2&&t[e-1].equals(t[0])&&t.pop()}function i(t,e,r){return t.x!==e.x?t.xNumber.EPSILON){var f;if(p>0){if(d<0||d>p)return[];if((f=u*h-c*l)<0||f>p)return[]}else{if(d>0||d0||fM?[]:x===M?o?[]:[y]:_<=M?[y,b]:[y,S]}function o(t,e,r,i){var n=e.x-t.x,o=e.y-t.y,a=r.x-t.x,s=r.y-t.y,c=i.x-t.x,u=i.y-t.y,h=n*s-o*a,l=n*u-o*c;if(Math.abs(h)>Number.EPSILON){var p=c*s-u*a;return h>0?l>=0&&p>=0:l>=0||p>=0}return l>0}r(t),e.forEach(r);for(var a,s,c,u,h,l,p={},d=t.concat(),f=0,m=e.length;f0;){if(--_<0){console.log("Infinite Loop! Holes left:"+g.length+", Probably Hole outside Shape!");break}for(a=x;ai&&(a=0);var s=o(m[t],m[n],m[a],r[e]);if(!s)return!1;var c=r.length-1,u=e-1;u<0&&(u=c);var h=e+1;return h>c&&(h=0),!!(s=o(r[e],r[u],r[h],m[t]))}(a,w)&&!function(t,e){var r,i;for(r=0;r0)return!0;return!1}(s,c)&&!function(t,r){var i,o,a,s;for(i=0;i0)return!0;return!1}(s,c)){i=w,g.splice(y,1),l=m.slice(0,a+1),p=m.slice(a),d=r.slice(i),f=r.slice(0,i+1),m=l.concat(d).concat(f).concat(p),x=a;break}if(i>=0)break;v[h]=!0}if(i>=0)break}}return m}(t,e),v=gp.triangulate(g,!1);for(a=0,s=v.length;aNumber.EPSILON){var d=Math.sqrt(h),f=Math.sqrt(c*c+u*u),m=e.x-s/d,g=e.y+a/d,v=((r.x-u/f-m)*u-(r.y+c/f-g)*c)/(a*u-s*c),y=(i=m+a*v-t.x)*i+(n=g+s*v-t.y)*n;if(y<=2)return new l(i,n);o=Math.sqrt(y/2)}else{var b=!1;a>Number.EPSILON?c>Number.EPSILON&&(b=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(u)&&(b=!0),b?(i=-s,n=a,o=Math.sqrt(h)):(i=a,n=s,o=Math.sqrt(h/2))}return new l(i/o,n/o)}function n(t,e){var r,i;for(Z=t.length;--Z>=0;){r=Z,(i=Z-1)<0&&(i=t.length-1);var n=0,o=P+2*M;for(n=0;n=0;j--){for(V=j/M,$=S*Math.cos(V*Math.PI/2),G=A*Math.sin(V*Math.PI/2),Z=0,K=U.length;Z0||0===t.search(/^data\:image\/jpeg/);o.format=r?Sl:Al,o.needsUpdate=!0,void 0!==e&&e(o)},r,i),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Br.prototype=Object.assign(Object.create(gt.prototype),{constructor:Br,isLight:!0,copy:function(t){return gt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=gt.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),zr.prototype=Object.assign(Object.create(Br.prototype),{constructor:zr,isHemisphereLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Ur.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),jr.prototype=Object.assign(Object.create(Ur.prototype),{constructor:jr,isSpotLightShadow:!0,update:function(t){var e=this.camera,r=2*Ql.RAD2DEG*t.angle,i=this.mapSize.width/this.mapSize.height,n=t.distance||e.far;r===e.fov&&i===e.aspect&&n===e.far||(e.fov=r,e.aspect=i,e.far=n,e.updateProjectionMatrix())}}),Gr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Gr,isSpotLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Vr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Vr,isPointLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),$r.prototype=Object.assign(Object.create(Ur.prototype),{constructor:$r}),Hr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Hr,isDirectionalLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Wr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Wr,isAmbientLight:!0}),Xr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Xr,isRectAreaLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=Br.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}});var _p={arraySlice:function(t,e,r){return _p.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==r?r:t.length)):t.slice(e,r)},convertArray:function(t,e,r){return!t||!r&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(e,r){return t[e]-t[r]}for(var r=t.length,i=new Array(r),n=0;n!==r;++n)i[n]=n;return i.sort(e),i},sortedArray:function(t,e,r){for(var i=t.length,n=new t.constructor(i),o=0,a=0;a!==i;++o)for(var s=r[o]*e,c=0;c!==e;++c)n[a++]=t[s+c];return n},flattenJSON:function(t,e,r,i){for(var n=1,o=t[0];void 0!==o&&void 0===o[i];)o=t[n++];if(void 0!==o){var a=o[i];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[i])&&(e.push(o.time),r.push.apply(r,a)),o=t[n++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[i])&&(e.push(o.time),a.toArray(r,r.length)),o=t[n++]}while(void 0!==o);else do{void 0!==(a=o[i])&&(e.push(o.time),r.push(a)),o=t[n++]}while(void 0!==o)}}};Object.assign(qr.prototype,{evaluate:function(t){var e=this,r=this.parameterPositions,i=this._cachedIndex,n=r[i],o=r[i-1];t:{e:{var a;r:{i:if(!(t=o)break t;var s=r[1];t=o)break e}a=i,i=0}}for(;i>>1;te;)--o;if(++o,0!==n||o!==i){n>=o&&(n=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=_p.arraySlice(r,n,o),this.values=_p.arraySlice(this.values,n*a,o*a)}return this},validate:function(){var t=this,e=!0,r=this.getValueSize();r-Math.floor(r)!=0&&(console.error("THREE.KeyframeTrackPrototype: Invalid value size in track.",this),e=!1);var i=this.times,n=this.values,o=i.length;0===o&&(console.error("THREE.KeyframeTrackPrototype: Track is empty.",this),e=!1);for(var a=null,s=0;s!==o;s++){var c=i[s];if("number"==typeof c&&isNaN(c)){console.error("THREE.KeyframeTrackPrototype: Time is not a valid number.",t,s,c),e=!1;break}if(null!==a&&a>c){console.error("THREE.KeyframeTrackPrototype: Out of order keys.",t,s,c,a),e=!1;break}a=c}if(void 0!==n&&_p.isTypedArray(n))for(var s=0,u=n.length;s!==u;++s){var h=n[s];if(isNaN(h)){console.error("THREE.KeyframeTrackPrototype: Value is not a valid number.",t,s,h),e=!1;break}}return e},optimize:function(){for(var t=this.times,e=this.values,r=this.getValueSize(),i=2302===this.getInterpolation(),n=1,o=t.length-1,a=1;a0){t[n]=t[o];for(var f=o*r,m=n*r,p=0;p!==r;++p)e[m+p]=e[f+p];++n}return n!==t.length&&(this.times=_p.arraySlice(t,0,n),this.values=_p.arraySlice(e,0,n*r)),this}},Jr.prototype=Object.assign(Object.create(wp),{constructor:Jr,ValueTypeName:"vector"}),ti.prototype=Object.assign(Object.create(qr.prototype),{constructor:ti,interpolate_:function(t,e,r,i){for(var n=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(r-e)/(i-e),u=s+a;s!==u;s+=4)m.slerpFlat(n,0,o,s-a,o,s,c);return n}}),ei.prototype=Object.assign(Object.create(wp),{constructor:ei,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new ti(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),ri.prototype=Object.assign(Object.create(wp),{constructor:ri,ValueTypeName:"number"}),ii.prototype=Object.assign(Object.create(wp),{constructor:ii,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ni.prototype=Object.assign(Object.create(wp),{constructor:ni,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),oi.prototype=Object.assign(Object.create(wp),{constructor:oi,ValueTypeName:"color"}),ai.prototype=wp,wp.constructor=ai,Object.assign(ai,{parse:function(t){if(void 0===t.type)throw new Error("track type undefined, can not parse");var e=ai._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var r=[],i=[];_p.flattenJSON(t.keys,r,i,"value"),t.times=r,t.values=i}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,r=t.constructor;if(void 0!==r.toJSON)e=r.toJSON(t);else{e={name:t.name,times:_p.convertArray(t.times,Array),values:_p.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ri;case"vector":case"vector2":case"vector3":case"vector4":return Jr;case"color":return oi;case"quaternion":return ei;case"bool":case"boolean":return ni;case"string":return ii}throw new Error("Unsupported typeName: "+t)}}),Object.assign(si,{parse:function(t){for(var e=[],r=t.tracks,i=1/(t.fps||1),n=0,o=r.length;n!==o;++n)e.push(ai.parse(r[n]).scale(i));return new si(t.name,t.duration,e)},toJSON:function(t){for(var e=[],r=t.tracks,i={name:t.name,duration:t.duration,tracks:e},n=0,o=r.length;n!==o;++n)e.push(ai.toJSON(r[n]));return i},CreateFromMorphTargetSequence:function(t,e,r,i){for(var n=e.length,o=[],a=0;a1){var c=i[h=s[1]];c||(i[h]=c=[]),c.push(a)}}var u=[];for(var h in i)u.push(si.CreateFromMorphTargetSequence(h,i[h],e,r));return u},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var r=function(t,e,r,i,n){if(0!==r.length){var o=[],a=[];_p.flattenJSON(r,o,a,i),0!==o.length&&n.push(new t(e,o,a))}},i=[],n=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c1?t.skinWeights[i+1]:0,s=r>2?t.skinWeights[i+2]:0,c=r>3?t.skinWeights[i+3]:0;e.skinWeights.push(new d(o,a,s,c))}if(t.skinIndices)for(var i=0,n=t.skinIndices.length;i1?t.skinIndices[i+1]:0,l=r>2?t.skinIndices[i+2]:0,p=r>3?t.skinIndices[i+3]:0;e.skinIndices.push(new d(u,h,l,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}function r(t,e){var r=t.scale;if(void 0!==t.morphTargets)for(var i=0,n=t.morphTargets.length;i0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var h=e.faces,l=t.morphColors[0].colors,i=0,n=h.length;i0&&(e.animations=r)}return function(n,o){void 0!==n.data&&(n=n.data),void 0!==n.scale?n.scale=1/n.scale:n.scale=1;var a=new wt;return t(n,a),e(n,a),r(n,a),i(n,a),a.computeFaceNormals(),a.computeBoundingSphere(),void 0===n.materials||0===n.materials.length?{geometry:a}:{geometry:a,materials:hi.prototype.initMaterials(n.materials,o,this.crossOrigin)}}}()}),Object.assign(pi.prototype,{load:function(t,e,r,i){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var n=this;new Lr(n.manager).load(t,function(r){var o=null;try{o=JSON.parse(r)}catch(e){return void 0!==i&&i(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}var a=o.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())return void console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead.");n.parse(o,e)},r,i)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var r=this.parseGeometries(t.geometries),i=this.parseImages(t.images,function(){void 0!==e&&e(a)}),n=this.parseTextures(t.textures,i),o=this.parseMaterials(t.materials,n),a=this.parseObject(t.object,r,o);return t.animations&&(a.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(a),a},parseGeometries:function(t){var e=this,r={};if(void 0!==t)for(var i=new li,n=new ui,o=0,a=t.length;o0){var n=new Nr(new Rr(e));n.setCrossOrigin(this.crossOrigin);for(var o=0,a=t.length;o0?new Pe(c,u):new Bt(c,u);break;case"LOD":a=new Me;break;case"Line":a=new Ie(n(e.geometry),o(e.material),e.mode);break;case"LineLoop":a=new Le(n(e.geometry),o(e.material));break;case"LineSegments":a=new Re(n(e.geometry),o(e.material));break;case"PointCloud":case"Points":a=new De(n(e.geometry),o(e.material));break;case"Sprite":a=new Ae(o(e.material));break;case"Group":a=new Ne;break;default:a=new gt}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.children)for(var h in e.children)a.add(s.parseObject(e.children[h],r,i));if("LOD"===e.type)for(var l=e.levels,p=0;p0)){c=n;break}c=n-1}if(n=c,i[n]===r)return n/(o-1);var u=i[n];return(n+(r-u)/(i[n+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,r=t+1e-4;e<0&&(e=0),r>1&&(r=1);var i=this.getPoint(e);return this.getPoint(r).clone().sub(i).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var r,i,n,o=this,a=new g,s=[],c=[],u=[],h=new g,l=new v;for(r=0;r<=t;r++)i=r/t,s[r]=o.getTangentAt(i),s[r].normalize();c[0]=new g,u[0]=new g;var p=Number.MAX_VALUE,d=Math.abs(s[0].x),f=Math.abs(s[0].y),m=Math.abs(s[0].z);for(d<=p&&(p=d,a.set(1,0,0)),f<=p&&(p=f,a.set(0,1,0)),m<=p&&a.set(0,0,1),h.crossVectors(s[0],a).normalize(),c[0].crossVectors(s[0],h),u[0].crossVectors(s[0],c[0]),r=1;r<=t;r++)c[r]=c[r-1].clone(),u[r]=u[r-1].clone(),h.crossVectors(s[r-1],s[r]),h.length()>Number.EPSILON&&(h.normalize(),n=Math.acos(Ql.clamp(s[r-1].dot(s[r]),-1,1)),c[r].applyMatrix4(l.makeRotationAxis(h,n))),u[r].crossVectors(s[r],c[r]);if(!0===e)for(n=Math.acos(Ql.clamp(c[0].dot(c[t]),-1,1)),n/=t,s[0].dot(h.crossVectors(c[0],c[t]))>0&&(n=-n),r=1;r<=t;r++)c[r].applyMatrix4(l.makeRotationAxis(s[r],n*r)),u[r].crossVectors(s[r],c[r]);return{tangents:s,normals:c,binormals:u}}}),Ai.prototype=Object.create(Si.prototype),Ai.prototype.constructor=Ai,Ai.prototype.isLineCurve=!0,Ai.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},Ai.prototype.getPointAt=function(t){return this.getPoint(t)},Ai.prototype.getTangent=function(t){return this.v2.clone().sub(this.v1).normalize()},Mi.prototype=Object.assign(Object.create(Si.prototype),{constructor:Mi,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Ai(e,t))},getPoint:function(t){for(var e=this,r=t*this.getLength(),i=this.getCurveLengths(),n=0;n=r){var o=i[n]-r,a=e.curves[n],s=a.getLength(),c=0===s?0:1-o/s;return a.getPointAt(c)}n++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){var t=this;if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],r=0,i=0,n=this.curves.length;i1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r},createPointsGeometry:function(t){var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){for(var e=new wt,r=0,i=t.length;re;)r-=e;re.length-2?e.length-1:i+1],c=e[i>e.length-3?e.length-1:i+2];return new l(di(n,o.x,a.x,s.x,c.x),di(n,o.y,a.y,s.y,c.y))},Pi.prototype=Object.create(Si.prototype),Pi.prototype.constructor=Pi,Pi.prototype.getPoint=function(t){var e=this.v0,r=this.v1,i=this.v2,n=this.v3;return new l(wi(t,e.x,r.x,i.x,n.x),wi(t,e.y,r.y,i.y,n.y))},Ci.prototype=Object.create(Si.prototype),Ci.prototype.constructor=Ci,Ci.prototype.getPoint=function(t){var e=this.v0,r=this.v1,i=this.v2;return new l(vi(t,e.x,r.x,i.x),vi(t,e.y,r.y,i.y))};var Tp=Object.assign(Object.create(Mi.prototype),{fromPoints:function(t){var e=this;this.moveTo(t[0].x,t[0].y);for(var r=1,i=t.length;r0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var h=c.getPoint(1);this.currentPoint.copy(h)}});Ii.prototype=Tp,Tp.constructor=Ii,Ri.prototype=Object.assign(Object.create(Tp),{constructor:Ri,getPointsHoles:function(t){for(var e=this,r=[],i=0,n=this.holes.length;i1){for(var v=!1,y=[],b=0,x=p.length;bNumber.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[n],u=-u),t.ys.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var h=u*(t.x-a.x)-c*(t.y-a.y);if(0===h)return!0;if(h<0)continue;i=!i}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return i})(S.p,p[M].p)&&(b!==M&&y.push({froms:b,tos:M,hole:w}),A?(A=!1,l[M].push(S)):v=!0);A&&l[b].push(S)}y.length>0&&(v||(d=l))}for(var E,m=0,T=p.length;m0){this.source.connect(this.filters[0]);for(var e=1,r=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,r=this.filters.length;e=.5)for(var o=0;o!==n;++o)t[e+o]=t[r+o]},_slerp:function(t,e,r,i){m.slerpFlat(t,e,t,e,t,r,i)},_lerp:function(t,e,r,i,n){for(var o=1-i,a=0;a!==n;++a){var s=e+a;t[s]=t[s]*o+t[r+a]*i}}}),Object.assign(Gi.prototype,{getValue:function(t,e){this.bind();var r=this._targetGroup.nCachedObjects_,i=this._bindings[r];void 0!==i&&i.getValue(t,e)},setValue:function(t,e){for(var r=this._bindings,i=this._targetGroup.nCachedObjects_,n=r.length;i!==n;++i)r[i].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,r=t.length;e!==r;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,r=t.length;e!==r;++e)t[e].unbind()}}),Object.assign(Vi,{Composite:Gi,create:function(t,e,r){return t&&t.isAnimationObjectGroup?new Vi.Composite(t,e,r):new Vi(t,e,r)},sanitizeNodeName:function(t){return t.replace(/\s/g,"_").replace(/[^\w-]/g,"")},parseTrackName:function(){var t=new RegExp("^"+/((?:[\w-]+[\/:])*)/.source+/([\w-\.]+)?/.source+/(?:\.([\w-]+)(?:\[(.+)\])?)?/.source+/\.([\w-]+)(?:\[(.+)\])?/.source+"$"),e=["material","materials","bones"];return function(r){var i=t.exec(r);if(!i)throw new Error("PropertyBinding: Cannot parse trackName: "+r);var n={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},o=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==o&&-1!==o){var a=n.nodeName.substring(o+1);-1!==e.indexOf(a)&&(n.nodeName=n.nodeName.substring(0,o),n.objectName=a)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+r);return n}}(),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var r=function(t){for(var r=0;r=i){var p=i++,d=r[p];n[d.uuid]=l,r[l]=d,n[h]=p,r[p]=u;for(var f=0,m=a;f!==m;++f){var g=o[f],v=g[p],y=g[l];g[l]=v,g[p]=y}}}this.nCachedObjects_=i},uncache:function(t){for(var e=arguments,r=this._objects,i=r.length,n=this.nCachedObjects_,o=this._indicesByUUID,a=this._bindings,s=a.length,c=0,u=arguments.length;c!==u;++c){var h=e[c].uuid,l=o[h];if(void 0!==l)if(delete o[h],l0)for(var c=this._interpolants,u=this._propertyBindings,h=0,l=c.length;h!==l;++h)c[h].evaluate(a),u[h].accumulate(i,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var r=this._weightInterpolant;if(null!==r){var i=r.evaluate(t)[0];e*=i,t>r.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var r=this._timeScaleInterpolant;null!==r&&(e*=r.evaluate(t)[0],t>r.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var r=this._clip.duration,i=this.loop,n=this._loopCount;if(2200===i){-1===n&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=r)e=r;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=2202===i;if(-1===n&&(t>=0?(n=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=r||e<0){var a=Math.floor(e/r);e-=r*a,n+=Math.abs(a);var s=this.repetitions-n;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?r:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(0===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&n))return this.time=e,r-e}return this.time=e,e},_setEndings:function(t,e,r){var i=this._interpolantSettings;r?(i.endingStart=2401,i.endingEnd=2401):(i.endingStart=t?this.zeroSlopeAtStart?2401:zl:2402,i.endingEnd=e?this.zeroSlopeAtEnd?2401:zl:2402)},_scheduleFading:function(t,e,r){var i=this._mixer,n=i.time,o=this._weightInterpolant;null===o&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=n,s[0]=e,a[1]=n+t,s[1]=r,this}}),Object.assign(Wi.prototype,h.prototype,{_bindAction:function(t,e){var r=this,i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,a=t._propertyBindings,s=t._interpolants,c=i.uuid,u=this._bindingsByRootAndName,h=u[c];void 0===h&&(h={},u[c]=h);for(var l=0;l!==o;++l){var p=n[l],d=p.name,f=h[d];if(void 0!==f)a[l]=f;else{if(void 0!==(f=a[l])){null===f._cacheIndex&&(++f.referenceCount,r._addInactiveBinding(f,c,d));continue}var m=e&&e._propertyBindings[l].binding.parsedPath;++(f=new ji(Vi.create(i,d,m),p.ValueTypeName,p.getValueSize())).referenceCount,r._addInactiveBinding(f,c,d),a[l]=f}s[l].resultBuffer=f.buffer}},_activateAction:function(t){var e=this;if(!this._isActiveAction(t)){if(null===t._cacheIndex){var r=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,r)}for(var o=t._propertyBindings,a=0,s=o.length;a!==s;++a){var c=o[a];0==c.useCount++&&(e._lendBinding(c),c.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){var e=this;if(this._isActiveAction(t)){for(var r=t._propertyBindings,i=0,n=r.length;i!==n;++i){var o=r[i];0==--o.useCount&&(o.restoreOriginalState(),e._takeBackBinding(o))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e0?0:(Math.floor(Math.abs(n)/e.length)+1)*e.length:0===o&&n===r-1&&(n=r-2,o=1);var a,s,c,u;if(this.closed||n>0?a=e[(n-1)%r]:(Ip.subVectors(e[0],e[1]).add(e[0]),a=Ip),s=e[n%r],c=e[(n+1)%r],this.closed||n+2r&&(t=r),t},nf=function(t){return t.length>=3?[].slice.call(t):t[0]},ed=function(t){var e,r;for(t._clipped=!1,t._unclipped=t.slice(0),e=r=0;r<3;e=++r)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]<0&&(t[e]=0),t[e]>255&&(t[e]=255)):3===e&&(t[e]<0&&(t[e]=0),t[e]>1&&(t[e]=1));return t._clipped||delete t._unclipped,t},zp=Math.PI,Kd=Math.round,id=Math.cos,cd=Math.floor,Nd=Math.pow,Td=Math.log,Jd=Math.sin,tf=Math.sqrt,qp=Math.atan2,Id=Math.max,Xp=Math.abs,Gp=2*zp,Up=zp/3,Fp=zp/180,jp=180/zp,Wp=[],(td=function(){return arguments[0]instanceof kp?arguments[0]:function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,arguments,function(){})}).version="1.3.3",Hp={},Vp=[],$p=!1,kp=function(){function t(){var t,e,r,i,n,o,a,s,c,u=arguments;for(o=this,e=[],s=0,i=arguments.length;s3?e[3]:1]},sf=function(t){return 255*(t<=.00304?12.92*t:1.055*Nd(t,1/2.4)-.055)},wd=function(t){return t>Bp.t1?t*t*t:Bp.t2*(t-Bp.t0)},Bp={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Vd=function(){var t,e,r,i,n,o,a,s;return i=nf(arguments),r=i[0],e=i[1],t=i[2],n=qd(r,e,t),o=n[0],a=n[1],s=n[2],[116*a-16,500*(o-a),200*(a-s)]},Yd=function(t){return(t/=255)<=.04045?t/12.92:Nd((t+.055)/1.055,2.4)},af=function(t){return t>Bp.t3?Nd(t,1/3):t/Bp.t2+Bp.t0},qd=function(){var t,e,r,i,n,o,a;return i=nf(arguments),r=i[0],e=i[1],t=i[2],r=Yd(r),e=Yd(e),t=Yd(t),n=af((.4124564*r+.3575761*e+.1804375*t)/Bp.Xn),o=af((.2126729*r+.7151522*e+.072175*t)/Bp.Yn),a=af((.0193339*r+.119192*e+.9503041*t)/Bp.Zn),[n,o,a]},td.lab=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["lab"]),function(){})},Hp.lab=_d,kp.prototype.lab=function(){return Vd(this._rgb)},Yp=function(t){var e,r,i,n,o,a,s,c,u,h,l;return t=function(){var e,r,i;for(i=[],r=0,e=t.length;r=360;)r-=360;d[u]=r}return td(d,e).alpha(i/h)},Hp.rgb=function(){var t,e,r,i;e=nf(arguments),r=[];for(t in e)i=e[t],r.push(i);return r},td.rgb=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["rgb"]),function(){})},kp.prototype.rgb=function(t){return null==t&&(t=!0),t?this._rgb.map(Math.round).slice(0,3):this._rgb.slice(0,3)},kp.prototype.rgba=function(t){return null==t&&(t=!0),t?[Math.round(this._rgb[0]),Math.round(this._rgb[1]),Math.round(this._rgb[2]),this._rgb[3]]:this._rgb.slice(0)},Vp.push({p:3,test:function(t){var e;return e=nf(arguments),"array"===rf(e)&&3===e.length?"rgb":4===e.length&&"number"===rf(e[3])&&e[3]>=0&&e[3]<=1?"rgb":void 0}}),hd=function(t){var e,r,i,n,o,a;if(t.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]),a=parseInt(t,16),n=a>>16,i=a>>8&255,r=255&a,[n,i,r,1];if(t.match(/^#?([A-Fa-f0-9]{8})$/))return 9===t.length&&(t=t.substr(1)),a=parseInt(t,16),n=a>>24&255,i=a>>16&255,r=a>>8&255,e=Kd((255&a)/255*100)/100,[n,i,r,e];if(null!=Hp.css&&(o=Hp.css(t)))return o;throw"unknown color: "+t},zd=function(t,e){var r,i,n,o,a,s,c;return null==e&&(e="rgb"),a=t[0],n=t[1],i=t[2],r=t[3],a=Math.round(a),n=Math.round(n),i=Math.round(i),c=a<<16|n<<8|i,s="000000"+c.toString(16),s=s.substr(s.length-6),o="0"+Kd(255*r).toString(16),o=o.substr(o.length-2),"#"+function(){switch(e.toLowerCase()){case"rgba":return s+o;case"argb":return o+s;default:return s}}()},Hp.hex=function(t){return hd(t)},td.hex=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hex"]),function(){})},kp.prototype.hex=function(t){return null==t&&(t="rgb"),zd(this._rgb,t)},Vp.push({p:4,test:function(t){if(1===arguments.length&&"string"===rf(t))return"hex"}}),dd=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d;if(t=nf(arguments),n=t[0],h=t[1],a=t[2],0===h)c=i=e=255*a;else{for(d=[0,0,0],r=[0,0,0],l=2*a-(p=a<.5?a*(1+h):a+h-a*h),n/=360,d[0]=n+1/3,d[1]=n,d[2]=n-1/3,o=s=0;s<=2;o=++s)d[o]<0&&(d[o]+=1),d[o]>1&&(d[o]-=1),6*d[o]<1?r[o]=l+6*(p-l)*d[o]:2*d[o]<1?r[o]=p:3*d[o]<2?r[o]=l+(p-l)*(2/3-d[o])*6:r[o]=l;c=(u=[Kd(255*r[0]),Kd(255*r[1]),Kd(255*r[2])])[0],i=u[1],e=u[2]}return t.length>3?[c,i,e,t[3]]:[c,i,e]},jd=function(t,e,r){var i,n,o,a,s;return void 0!==t&&t.length>=3&&(t=(a=t)[0],e=a[1],r=a[2]),t/=255,e/=255,r/=255,o=Math.min(t,e,r),Id=Math.max(t,e,r),n=(Id+o)/2,Id===o?(s=0,i=Number.NaN):s=n<.5?(Id-o)/(Id+o):(Id-o)/(2-Id-o),t===Id?i=(e-r)/(Id-o):e===Id?i=2+(r-t)/(Id-o):r===Id&&(i=4+(t-e)/(Id-o)),(i*=60)<0&&(i+=360),[i,s,n]},td.hsl=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hsl"]),function(){})},Hp.hsl=dd,kp.prototype.hsl=function(){return jd(this._rgb)},fd=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v;if(t=nf(arguments),n=t[0],m=t[1],v=t[2],v*=255,0===m)c=i=e=v;else switch(360===n&&(n=0),n>360&&(n-=360),n<0&&(n+=360),n/=60,o=cd(n),r=n-o,a=v*(1-m),s=v*(1-m*r),g=v*(1-m*(1-r)),o){case 0:c=(u=[v,g,a])[0],i=u[1],e=u[2];break;case 1:c=(h=[s,v,a])[0],i=h[1],e=h[2];break;case 2:c=(l=[a,v,g])[0],i=l[1],e=l[2];break;case 3:c=(p=[a,s,v])[0],i=p[1],e=p[2];break;case 4:c=(d=[g,a,v])[0],i=d[1],e=d[2];break;case 5:c=(f=[v,a,s])[0],i=f[1],e=f[2]}return[c,i,e,t.length>3?t[3]:1]},Gd=function(){var t,e,r,i,n,o,a,s,c;return a=nf(arguments),o=a[0],r=a[1],t=a[2],n=Math.min(o,r,t),Id=Math.max(o,r,t),e=Id-n,c=Id/255,0===Id?(i=Number.NaN,s=0):(s=e/Id,o===Id&&(i=(r-t)/e),r===Id&&(i=2+(t-o)/e),t===Id&&(i=4+(o-r)/e),(i*=60)<0&&(i+=360)),[i,s,c]},td.hsv=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hsv"]),function(){})},Hp.hsv=fd,kp.prototype.hsv=function(){return Gd(this._rgb)},Od=function(t){var e,r,i;return"number"===rf(t)&&t>=0&&t<=16777215?(i=t>>16,r=t>>8&255,e=255&t,[i,r,e,1]):(console.warn("unknown num color: "+t),[0,0,0,1])},Wd=function(){var t,e,r,i;return i=nf(arguments),r=i[0],e=i[1],t=i[2],(r<<16)+(e<<8)+t},td.num=function(t){return new kp(t,"num")},kp.prototype.num=function(t){return null==t&&(t="rgb"),Wd(this._rgb,t)},Hp.num=Od,Vp.push({p:1,test:function(t){if(1===arguments.length&&"number"===rf(t)&&t>=0&&t<=16777215)return"num"}}),ud=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b;if(r=nf(arguments),s=r[0],n=r[1],e=r[2],n/=100,a=a/100*255,t=255*n,0===n)l=a=i=e;else switch(360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360),s/=60,c=cd(s),o=s-c,u=e*(1-n),h=u+t*(1-o),y=u+t*o,b=u+t,c){case 0:l=(p=[b,y,u])[0],a=p[1],i=p[2];break;case 1:l=(d=[h,b,u])[0],a=d[1],i=d[2];break;case 2:l=(f=[u,b,y])[0],a=f[1],i=f[2];break;case 3:l=(m=[u,h,b])[0],a=m[1],i=m[2];break;case 4:l=(g=[y,u,b])[0],a=g[1],i=g[2];break;case 5:l=(v=[b,u,h])[0],a=v[1],i=v[2]}return[l,a,i,r.length>3?r[3]:1]},Bd=function(){var t,e,r,i,n,o,a,s,c;return c=nf(arguments),s=c[0],n=c[1],e=c[2],a=Math.min(s,n,e),Id=Math.max(s,n,e),i=Id-a,r=100*i/255,t=a/(255-i)*100,0===i?o=Number.NaN:(s===Id&&(o=(n-e)/i),n===Id&&(o=2+(e-s)/i),e===Id&&(o=4+(s-n)/i),(o*=60)<0&&(o+=360)),[o,r,t]},td.hcg=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hcg"]),function(){})},Hp.hcg=ud,kp.prototype.hcg=function(){return Bd(this._rgb)},nd=function(t){var e,r,i,n,o,a,s,c;if(t=t.toLowerCase(),null!=td.colors&&td.colors[t])return hd(td.colors[t]);if(o=t.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(s=o.slice(1,4),n=a=0;a<=2;n=++a)s[n]=+s[n];s[3]=1}else if(o=t.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(s=o.slice(1,5),n=c=0;c<=3;n=++c)s[n]=+s[n];else if(o=t.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(s=o.slice(1,4),n=e=0;e<=2;n=++e)s[n]=Kd(2.55*s[n]);s[3]=1}else if(o=t.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(s=o.slice(1,5),n=r=0;r<=2;n=++r)s[n]=Kd(2.55*s[n]);s[3]=+s[3]}else(o=t.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?((i=o.slice(1,4))[1]*=.01,i[2]*=.01,(s=dd(i))[3]=1):(o=t.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&((i=o.slice(1,4))[1]*=.01,i[2]*=.01,(s=dd(i))[3]=+o[4]);return s},Fd=function(t){var e;return e=t[3]<1?"rgba":"rgb","rgb"===e?e+"("+t.slice(0,3).map(Kd).join(",")+")":"rgba"===e?e+"("+t.slice(0,3).map(Kd).join(",")+","+t[3]+")":void 0},Zd=function(t){return Kd(100*t)/100},pd=function(t,e){var r;return r=e<1?"hsla":"hsl",t[0]=Zd(t[0]||0),t[1]=Zd(100*t[1])+"%",t[2]=Zd(100*t[2])+"%","hsla"===r&&(t[3]=e),r+"("+t.join(",")+")"},Hp.css=function(t){return nd(t)},td.css=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["css"]),function(){})},kp.prototype.css=function(t){return null==t&&(t="rgb"),"rgb"===t.slice(0,3)?Fd(this._rgb):"hsl"===t.slice(0,3)?pd(this.hsl(),this.alpha()):void 0},Hp.named=function(t){return hd(of[t])},Vp.push({p:5,test:function(t){if(1===arguments.length&&null!=of[t])return"named"}}),kp.prototype.name=function(t){var e,r;arguments.length&&(of[t]&&(this._rgb=hd(of[t])),this._rgb[3]=1),e=this.hex();for(r in of)if(e===of[r])return r;return e},Sd=function(){var t,e,r,i;return i=nf(arguments),r=i[0],t=i[1],e=i[2],e*=Fp,[r,id(e)*t,Jd(e)*t]},Ad=function(){var t,e,r,i,n,o,a,s,c,u,h;return r=nf(arguments),s=r[0],n=r[1],a=r[2],u=Sd(s,n,a),t=u[0],e=u[1],i=u[2],h=_d(t,e,i),c=h[0],o=h[1],i=h[2],[c,o,i,r.length>3?r[3]:1]},xd=function(){var t,e,r,i,n,o;return o=nf(arguments),n=o[0],t=o[1],e=o[2],r=tf(t*t+e*e),i=(qp(e,t)*jp+360)%360,0===Kd(1e4*r)&&(i=Number.NaN),[n,r,i]},$d=function(){var t,e,r,i,n,o,a;return o=nf(arguments),n=o[0],r=o[1],e=o[2],a=Vd(n,r,e),i=a[0],t=a[1],e=a[2],xd(i,t,e)},td.lch=function(){var t;return t=nf(arguments),new kp(t,"lch")},td.hcl=function(){var t;return t=nf(arguments),new kp(t,"hcl")},Hp.lch=Ad,Hp.hcl=function(){var t,e,r,i;return i=nf(arguments),e=i[0],t=i[1],r=i[2],Ad([r,t,e])},kp.prototype.lch=function(){return $d(this._rgb)},kp.prototype.hcl=function(){return $d(this._rgb).reverse()},kd=function(t){var e,r,i,n,o,a,s,c,u;return null==t&&(t="rgb"),c=nf(arguments),s=c[0],n=c[1],e=c[2],s/=255,n/=255,e/=255,o=1-Math.max(s,Math.max(n,e)),i=o<1?1/(1-o):0,r=(1-s-o)*i,a=(1-n-o)*i,u=(1-e-o)*i,[r,a,u,o]},rd=function(){var t,e,r,i,n,o,a,s,c;return e=nf(arguments),i=e[0],a=e[1],c=e[2],o=e[3],t=e.length>4?e[4]:1,1===o?[0,0,0,t]:(s=i>=1?0:255*(1-i)*(1-o),n=a>=1?0:255*(1-a)*(1-o),r=c>=1?0:255*(1-c)*(1-o),[s,n,r,t])},Hp.cmyk=function(){return rd(nf(arguments))},td.cmyk=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["cmyk"]),function(){})},kp.prototype.cmyk=function(){return kd(this._rgb)},Hp.gl=function(){var t,e,r,i,n;for(i=function(){var t,r;t=nf(arguments),r=[];for(e in t)n=t[e],r.push(n);return r}.apply(this,arguments),t=r=0;r<=2;t=++r)i[t]*=255;return i},td.gl=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["gl"]),function(){})},kp.prototype.gl=function(){var t;return t=this._rgb,[t[0]/255,t[1]/255,t[2]/255,t[3]]},Hd=function(t,e,r){var i;return i=nf(arguments),t=i[0],e=i[1],r=i[2],t=Pd(t),e=Pd(e),r=Pd(r),.2126*t+.7152*e+.0722*r},Pd=function(t){return t/=255,t<=.03928?t/12.92:Nd((t+.055)/1.055,2.4)},Wp=[],md=function(t,e,r,i){var n,o,a,s;for(null==r&&(r=.5),null==i&&(i="rgb"),"object"!==rf(t)&&(t=td(t)),"object"!==rf(e)&&(e=td(e)),a=0,o=Wp.length;at?o(r,c):o(c,a)},r=Hd(this._rgb),this._rgb=(r>t?o(td("black"),this):o(this,td("white"))).rgba()),this):Hd(this._rgb)},ef=function(t){var e,r,i,n;return n=t/100,n<66?(i=255,r=-155.25485562709179-.44596950469579133*(r=n-2)+104.49216199393888*Td(r),e=n<20?0:.8274096064007395*(e=n-10)-254.76935184120902+115.67994401066147*Td(e)):(i=351.97690566805693+.114206453784165*(i=n-55)-40.25366309332127*Td(i),r=325.4494125711974+.07943456536662342*(r=n-50)-28.0852963507957*Td(r),e=255),[i,r,e]},Xd=function(){var t,e,r,i,n,o,a;for(i=(n=nf(arguments))[0],n[1],t=n[2],r=1e3,e=4e4,.4;e-r>.4;)(o=ef(a=.5*(e+r)))[2]/o[0]>=t/i?e=a:r=a;return Kd(a)},td.temperature=td.kelvin=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["temperature"]),function(){})},Hp.temperature=Hp.kelvin=Hp.K=ef,kp.prototype.temperature=function(){return Xd(this._rgb)},kp.prototype.kelvin=kp.prototype.temperature,td.contrast=function(t,e){var r,i,n,o;return"string"!==(n=rf(t))&&"number"!==n||(t=new kp(t)),"string"!==(o=rf(e))&&"number"!==o||(e=new kp(e)),r=t.luminance(),i=e.luminance(),r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)},td.distance=function(t,e,r){var i,n,o,a,s,c,u;null==r&&(r="lab"),"string"!==(s=rf(t))&&"number"!==s||(t=new kp(t)),"string"!==(c=rf(e))&&"number"!==c||(e=new kp(e)),o=t.get(r),a=e.get(r),u=0;for(n in o)u+=(i=(o[n]||0)-(a[n]||0))*i;return Math.sqrt(u)},td.deltaE=function(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_,w,S,A,M,E,T,P,C,I;for(null==r&&(r=1),null==i&&(i=1),"string"!==(x=rf(t))&&"number"!==x||(t=new kp(t)),"string"!==(_=rf(e))&&"number"!==_||(e=new kp(e)),n=(w=t.lab())[0],a=w[1],c=w[2],o=(S=e.lab())[0],s=S[1],u=S[2],h=tf(a*a+c*c),l=tf(s*s+u*u),E=n<16?.511:.040975*n/(1+.01765*n),A=.0638*h/(1+.0131*h)+.638,b=h<1e-6?0:180*qp(c,a)/zp;b<0;)b+=360;for(;b>=360;)b-=360;return T=b>=164&&b<=345?.56+Xp(.2*id(zp*(b+168)/180)):.36+Xp(.4*id(zp*(b+35)/180)),p=h*h*h*h,y=tf(p/(p+1900)),M=A*(y*T+1-y),v=n-o,g=h-l,f=a-s,m=c-u,d=f*f+m*m-g*g,P=v/(r*E),C=g/(i*A),I=M,tf(P*P+C*C+d/(I*I))},kp.prototype.get=function(t){var e,r,i,n,o,a;return i=this,o=t.split("."),n=o[0],e=o[1],a=i[n](),e?(r=n.indexOf(e),r>-1?a[r]:console.warn("unknown channel "+e+" in mode "+n)):a},kp.prototype.set=function(t,e){var r,i,n,o,a,s;if(n=this,a=t.split("."),o=a[0],r=a[1])if(s=n[o](),(i=o.indexOf(r))>-1)if("string"===rf(e))switch(e.charAt(0)){case"+":case"-":s[i]+=+e;break;case"*":s[i]*=+e.substr(1);break;case"/":s[i]/=+e.substr(1);break;default:s[i]=+e}else s[i]=e;else console.warn("unknown channel "+r+" in mode "+o);else s=e;return td(s,o).alpha(n.alpha())},kp.prototype.clipped=function(){return this._rgb._clipped||!1},kp.prototype.alpha=function(t){return arguments.length?td.rgb([this._rgb[0],this._rgb[1],this._rgb[2],t]):this._rgb[3]},kp.prototype.darken=function(t){var e,r;return null==t&&(t=1),r=this,e=r.lab(),e[0]-=Bp.Kn*t,td.lab(e).alpha(r.alpha())},kp.prototype.brighten=function(t){return null==t&&(t=1),this.darken(-t)},kp.prototype.darker=kp.prototype.darken,kp.prototype.brighter=kp.prototype.brighten,kp.prototype.saturate=function(t){var e,r;return null==t&&(t=1),r=this,e=r.lch(),e[1]+=t*Bp.Kn,e[1]<0&&(e[1]=0),td.lch(e).alpha(r.alpha())},kp.prototype.desaturate=function(t){return null==t&&(t=1),this.saturate(-t)},kp.prototype.premultiply=function(){var t,e;return e=this.rgb(),t=this.alpha(),td(e[0]*t,e[1]*t,e[2]*t,t)},Kp=function(t){return function(e,r){var i,n;return i=td(r).rgb(),n=td(e).rgb(),td(t(i,n),"rgb")}},sd=function(t){return function(e,r){var i,n,o;for(o=[],i=n=0;n<=3;i=++n)o[i]=t(e[i],r[i]);return o}},Ld=function(t,e){return t},Rd=function(t,e){return t*e/255},od=function(t,e){return t>e?e:t},Md=function(t,e){return t>e?t:e},Qd=function(t,e){return 255*(1-(1-t/255)*(1-e/255))},Dd=function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))},Jp=function(t,e){return 255*(1-(1-e/255)/(t/255))},ad=function(t,e){return 255===t?255:(t=e/255*255/(1-t/255),t>255?255:t)},(Zp=function(t,e,r){if(!Zp[r])throw"unknown blend mode "+r;return Zp[r](t,e)}).normal=Kp(sd(Ld)),Zp.multiply=Kp(sd(Rd)),Zp.screen=Kp(sd(Qd)),Zp.overlay=Kp(sd(Dd)),Zp.darken=Kp(sd(od)),Zp.lighten=Kp(sd(Md)),Zp.dodge=Kp(sd(ad)),Zp.burn=Kp(sd(Jp)),td.blend=Zp,td.analyze=function(t){var e,r,i,n;for(i={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},r=0,e=t.length;ri.max&&(i.max=n),i.count+=1);return i.domain=[i.min,i.max],i.limits=function(t,e){return td.limits(i,t,e)},i},td.scale=function(t,e){var r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_;return u="rgb",h=td("#ccc"),f=0,!1,a=[0,1],d=[],p=[0,0],r=!1,n=[],l=!1,c=0,s=1,o=!1,i={},m=!0,x=function(t){var e,r,i,o,a,s;if(null==t&&(t=["#fff","#000"]),null!=t&&"string"===rf(t)&&null!=td.brewer&&(t=td.brewer[t]||td.brewer[t.toLowerCase()]||t),"array"===rf(t)){for(e=i=0,o=(t=t.slice(0)).length-1;0<=o?i<=o:i>=o;e=0<=o?++i:--i)r=t[e],"string"===rf(r)&&(t[e]=td(r));for(d.length=0,e=s=0,a=t.length-1;0<=a?s<=a:s>=a;e=0<=a?++s:--s)d.push(e/(t.length-1))}return b(),n=t},v=function(t){var e,i;if(null!=r){for(i=r.length-1,e=0;e=r[e];)e++;return e-1}return 0},_=function(t){return t},function(t){var e,i,n,o,a;return a=t,r.length>2&&(o=r.length-1,e=v(t),n=r[0]+(r[1]-r[0])*(0+.5*f),i=r[o-1]+(r[o]-r[o-1])*(1-.5*f),a=c+(r[e]+.5*(r[e+1]-r[e])-n)/(i-n)*(s-c)),a},y=function(t,e){var o,a,l,f,g,y,b;if(null==e&&(e=!1),isNaN(t))return h;if(e?b=t:r&&r.length>2?(b=v(t)/(r.length-2),b=p[0]+b*(1-p[0]-p[1])):s!==c?(b=(t-c)/(s-c),b=p[0]+b*(1-p[0]-p[1]),b=Math.min(1,Math.max(0,b))):b=1,e||(b=_(b)),l=Math.floor(1e4*b),m&&i[l])o=i[l];else{if("array"===rf(n))for(a=f=0,y=d.length-1;0<=y?f<=y:f>=y;a=0<=y?++f:--f){if(g=d[a],b<=g){o=n[a];break}if(b>=g&&a===d.length-1){o=n[a];break}if(b>g&&b=h;e=0<=h?++l:--l)d.push(e/(i-1));return a=[c,s],g},g.mode=function(t){return arguments.length?(u=t,b(),g):u},g.range=function(t,e){return x(t),g},g.out=function(t){return l=t,g},g.spread=function(t){return arguments.length?(f=t,g):f},g.correctLightness=function(t){return null==t&&(t=!0),o=t,b(),_=o?function(t){var e,r,i,n,o,a,s,c,u;for(e=y(0,!0).lab()[0],r=y(1,!0).lab()[0],s=e>r,i=y(t,!0).lab()[0],n=i-(o=e+(r-e)*t),c=0,u=1,a=20;Math.abs(n)>.01&&a-- >0;)!function(){s&&(n*=-1),n<0?(c=t,t+=.5*(u-t)):(u=t,t+=.5*(c-t)),i=y(t,!0).lab()[0],n=i-o}();return t}:function(t){return t},g},g.padding=function(t){return null!=t?("number"===rf(t)&&(t=[t,t]),p=t,g):p},g.colors=function(e,i){var o,s,c,u,h,l,p;if(null==i&&(i="hex"),0===arguments.length)return n.map(function(t){return t[i]()});if(e)return 1===e?g(.5)[i]():(s=a[0],o=a[1]-s,function(){h=[];for(var t=0;0<=e?te;0<=e?t++:t--)h.push(t);return h}.apply(this).map(function(t){return g(s+t/(e-1)*o)[i]()}));if(t=[],l=[],r&&r.length>2)for(c=p=1,u=r.length;1<=u?pu;c=1<=u?++p:--p)l.push(.5*(r[c-1]+r[c]));else l=a;return l.map(function(t){return g(t)[i]()})},g.cache=function(t){return null!=t?m=t:m},g},null==td.scales&&(td.scales={}),td.scales.cool=function(){return td.scale([td.hsl(180,1,.9),td.hsl(250,.7,.4)])},td.scales.hot=function(){return td.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},td.analyze=function(t,e,r){var i,n,o,a,s,c;if(s={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==r&&(r=function(){return!0}),i=function(t){null==t||isNaN(t)||(s.values.push(t),s.sum+=t,ts.max&&(s.max=t),s.count+=1)},c=function(t,n){if(r(t,n))return i(null!=e&&"function"===rf(e)?e(t):null!=e&&"string"===rf(e)||"number"===rf(e)?t[e]:t)},"array"===rf(t))for(a=0,o=t.length;a=F;w=1<=F?++O:--O)M.push(T+w/r*(Id-T));M.push(Id)}else if("l"===e.substr(0,1)){if(T<=0)throw"Logarithmic scales are only possible for values > 0";for(P=Math.LOG10E*Td(T),E=Math.LOG10E*Td(Id),M.push(T),w=it=1,B=r-1;1<=B?it<=B:it>=B;w=1<=B?++it:--it)M.push(Nd(10,P+w/r*(E-P)));M.push(Id)}else if("q"===e.substr(0,1)){for(M.push(T),w=i=1,$=r-1;1<=$?i<=$:i>=$;w=1<=$?++i:--i)D=(rt.length-1)*w/r,(N=cd(D))===D?M.push(rt[N]):(k=D-N,M.push(rt[N]*(1-k)+rt[N+1]*k));M.push(Id)}else if("k"===e.substr(0,1)){for(I=rt.length,g=new Array(I),x=new Array(r),Q=!0,R=0,y=null,(y=[]).push(T),w=n=1,H=r-1;1<=H?n<=H:n>=H;w=1<=H?++n:--n)y.push(T+w/r*(Id-T));for(y.push(Id);Q;){for(S=o=0,W=r-1;0<=W?o<=W:o>=W;S=0<=W?++o:--o)x[S]=0;for(w=a=0,X=I-1;0<=X?a<=X:a>=X;w=0<=X?++a:--a){for(et=rt[w],C=Number.MAX_VALUE,S=s=0,q=r-1;0<=q?s<=q:s>=q;S=0<=q?++s:--s)(_=Xp(y[S]-et))=Y;S=0<=Y?++c:--c)L[S]=null;for(w=u=0,Z=I-1;0<=Z?u<=Z:u>=Z;w=0<=Z?++u:--u)null===L[b=g[w]]?L[b]=rt[w]:L[b]+=rt[w];for(S=h=0,K=r-1;0<=K?h<=K:h>=K;S=0<=K?++h:--h)L[S]*=1/x[S];for(Q=!1,S=l=0,z=r-1;0<=z?l<=z:l>=z;S=0<=z?++l:--l)if(L[S]!==y[w]){Q=!0;break}y=L,++R>200&&(Q=!1)}for(A={},S=p=0,U=r-1;0<=U?p<=U:p>=U;S=0<=U?++p:--p)A[S]=[];for(w=d=0,j=I-1;0<=j?d<=j:d>=j;w=0<=j?++d:--d)A[b=g[w]].push(rt[w]);for(J=[],S=f=0,G=r-1;0<=G?f<=G:f>=G;S=0<=G?++f:--f)J.push(A[S][0]),J.push(A[S][A[S].length-1]);for(J=J.sort(function(t,e){return t-e}),M.push(J[0]),w=m=1,V=J.length-1;m<=V;w=m+=2)tt=J[w],isNaN(tt)||-1!==M.indexOf(tt)||M.push(tt)}return M},ld=function(t,e,r){var i,n,o,a;return i=nf(arguments),t=i[0],e=i[1],r=i[2],isNaN(t)&&(t=0),t/=360,t<1/3?o=1-((n=(1-e)/3)+(a=(1+e*id(Gp*t)/id(Up-Gp*t))/3)):t<2/3?n=1-((a=(1-e)/3)+(o=(1+e*id(Gp*(t-=1/3))/id(Up-Gp*t))/3)):a=1-((o=(1-e)/3)+(n=(1+e*id(Gp*(t-=2/3))/id(Up-Gp*t))/3)),a=Ed(r*a*3),o=Ed(r*o*3),n=Ed(r*n*3),[255*a,255*o,255*n,i.length>3?i[3]:1]},Ud=function(){var t,e,r,i,n,o,a,s;return a=nf(arguments),o=a[0],e=a[1],t=a[2],Gp=2*Math.PI,o/=255,e/=255,t/=255,n=Math.min(o,e,t),i=(o+e+t)/3,s=1-n/i,0===s?r=0:(r=(o-e+(o-t))/2,r/=Math.sqrt((o-e)*(o-e)+(o-t)*(e-t)),r=Math.acos(r),t>e&&(r=Gp-r),r/=Gp),[360*r,s,i]},td.hsi=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hsi"]),function(){})},Hp.hsi=ld,kp.prototype.hsi=function(){return Ud(this._rgb)},gd=function(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f;return"hsl"===i?(d=t.hsl(),f=e.hsl()):"hsv"===i?(d=t.hsv(),f=e.hsv()):"hcg"===i?(d=t.hcg(),f=e.hcg()):"hsi"===i?(d=t.hsi(),f=e.hsi()):"lch"!==i&&"hcl"!==i||(i="hcl",d=t.hcl(),f=e.hcl()),"h"===i.substr(0,1)&&(o=d[0],l=d[1],c=d[2],a=f[0],p=f[1],u=f[2]),isNaN(o)||isNaN(a)?isNaN(o)?isNaN(a)?n=Number.NaN:(n=a,1!==c&&0!==c||"hsv"===i||(h=p)):(n=o,1!==u&&0!==u||"hsv"===i||(h=l)):n=o+r*(a>o&&a-o>180?a-(o+360):a180?a+360-o:a-o),null==h&&(h=l+r*(p-l)),s=c+r*(u-c),td[i](n,h,s)},yd=function(t,e,r,i){var n,o;return n=t.num(),o=e.num(),td.num(n+(o-n)*r,"num")},(Wp=Wp.concat(function(){var t,e,r,i;for(i=[],e=0,t=(r=["hsv","hsl","hsi","hcl","lch","hcg"]).length;e>16&255)/255,e[r+1]=(t>>8&255)/255,e[r+2]=(255&t)/255,e},pf.prototype.atomColorToArray=function(t,e,r){return this.colorToArray(this.atomColor(t),e,r)},pf.prototype.bondColor=function(t,e){return this.atomProxy.index=e?t.atomIndex1:t.atomIndex2,this.atomColor(this.atomProxy)},pf.prototype.bondColorToArray=function(t,e,r,i){return this.colorToArray(this.bondColor(t,e),r,i)},pf.prototype.volumeColorToArray=function(t,e,r){return this.colorToArray(this.volumeColor(t),e,r)},pf.prototype.positionColorToArray=function(t,e,r){return this.colorToArray(this.positionColor(t),e,r)},ro.prototype={active:!0,params:null,execute:function(t){var e,r;return this.active&&this._listener&&(r=this.params?this.params.concat(t):t,e=this._listener.apply(this.context,r),this._isOnce&&this.detach()),e},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},no.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(t,e,r,i){var n,o=this._indexOfListener(t,r);if(-1!==o){if((n=this._bindings[o]).isOnce()!==e)throw new Error("You cannot add"+(e?"":"Once")+"() then add"+(e?"Once":"")+"() the same listener without removing the relationship first.")}else n=new ro(this,t,e,r,i),this._addBinding(n);return this.memorize&&this._prevParams&&n.execute(this._prevParams),n},_addBinding:function(t){var e=this._bindings.length;do{--e}while(this._bindings[e]&&t._priority<=this._bindings[e]._priority);this._bindings.splice(e+1,0,t)},_indexOfListener:function(t,e){for(var r,i=this,n=this._bindings.length;n--;)if((r=i._bindings[n])._listener===t&&r.context===e)return n;return-1},has:function(t,e){return-1!==this._indexOfListener(t,e)},add:function(t,e,r){return io(t,"add"),this._registerListener(t,!1,e,r)},addOnce:function(t,e,r){return io(t,"addOnce"),this._registerListener(t,!0,e,r)},remove:function(t,e){io(t,"remove");var r=this._indexOfListener(t,e);return-1!==r&&(this._bindings[r]._destroy(),this._bindings.splice(r,1)),t},removeAll:function(){for(var t=this,e=this._bindings.length;e--;)t._bindings[e]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(t){if(this.active){var e,r=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=r),i){e=this._bindings.slice(),this._shouldPropagate=!0;do{i--}while(e[i]&&this._shouldPropagate&&!1!==e[i].execute(r))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var df={PROTEIN:1,NUCLEIC:2,RNA:3,DNA:4,POLYMER:5,WATER:6,HELIX:7,SHEET:8,TURN:9,BACKBONE:10,SIDECHAIN:11,ALL:12,HETERO:13,ION:14,SACCHARIDE:15,SUGAR:15,BONDED:16,RING:17},ff=["*","","ALL"],mf=[df.BACKBONE,df.SIDECHAIN,df.BONDED,df.RING],gf=[df.POLYMER,df.WATER],vf=["ALA","GLY","SER"],yf=["CYS","SER","THR"],bf=["ALA","ILE","LEU","MET","PHE","PRO","TRP","VAL"],xf=["PHE","TRP","TYR","HIS"],_f=["ASN","GLN"],wf=["ASP","GLU"],Sf=["ARG","HIS","LYS"],Af=["ARG","ASP","GLU","HIS","LYS"],Mf=["ASN","ARG","ASP","CYS","GLY","GLN","GLU","HIS","LYS","SER","THR","TYR"],Ef=["ALA","ILE","LEU","MET","PHE","PRO","TRP","VAL"],Tf=["HIS","PHE","PRO","TRP","TYR"],Pf=["ALA","GLY","ILE","LEU","VAL"],Cf=function(t){this.signals={stringChanged:new no},this.setString(t)},If={type:{}};If.type.get=function(){return"selection"},Cf.prototype.setString=function(t,e){if(void 0===t&&(t=this.string||""),t!==this.string){try{this.selection=oo(t)}catch(t){this.selection={error:t.message}}var r=this.selection;this.string=t,this.test=po(r),this.residueTest=fo(r),this.chainTest=mo(r),this.modelTest=go(r),this.atomOnlyTest=po(r,!0),this.residueOnlyTest=fo(r,!0),this.chainOnlyTest=mo(r,!0),this.modelOnlyTest=go(r,!0),e||this.signals.stringChanged.dispatch(this.string)}},Object.defineProperties(Cf.prototype,If);var Rf=function(t){function e(e){var r=this;t.call(this,e);var i=e.dataList||[];this.colormakerList=[],this.selectionList=[],i.forEach(function(t){var e=t[0],i=t[1],n=t[2];void 0===n&&(n={}),Hf.hasScheme(e)?Object.assign(n,{scheme:e,structure:r.structure}):Object.assign(n,{scheme:"uniform",value:new tt(e).getHex()}),r.colormakerList.push(Hf.getScheme(n)),r.selectionList.push(new Cf(i))})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){for(var e=this,r=0,i=this.selectionList.length;ri).lines},tm.prototype.chunkCount=function(){return Math.floor(this.data.length/this.chunkSize)+1},tm.prototype.asText=function(){return this.isBinary()?In(this.data):this.data},tm.prototype.chunkToLines=function(t,e,r){var i=this.newline;if(!this.isBinary()&&t.length===this.data.length)return{lines:t.split(i),partialLine:""};var n=[],o=this.isBinary()?In(t):t,a=o.lastIndexOf(i);if(-1===a)e+=o;else{var s=e+o.substr(0,a);n=n.concat(s.split(i)),e=a===o.length-i.length?"":o.substr(a+i.length)}return r&&""!==e&&n.push(e),{lines:n,partialLine:e}},tm.prototype.nextChunk=function(){var t=this.__pointer;if(!(t>this.data.length))return this.__pointer+=this.chunkSize,this.chunk(t)},tm.prototype.nextChunkOfLines=function(){var t=this.nextChunk();if(void 0!==t){var e=this.__pointer>this.data.length,r=this.chunkToLines(t,this.__partialLine,e);return this.__partialLine=r.partialLine,r.lines}},tm.prototype.eachChunk=function(t){for(var e=this,r=this.chunkSize,i=this.data.length,n=this.chunkCount(),o=0;o>>0:0,o=t.byteLength-n,a=n;t.buffer&&(t.byteLength!==t.buffer.byteLength&&(a=t.byteOffset+n),t=t.buffer),this._lastWrittenByte=i?o:0,this.buffer=t,this.length=o,this.byteLength=o,this.byteOffset=a,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,a,o),this._mark=0,this._marks=[]};vm.prototype.available=function(t){return void 0===t&&(t=1),this.offset+t<=this.length},vm.prototype.isLittleEndian=function(){return this.littleEndian},vm.prototype.setLittleEndian=function(){return this.littleEndian=!0,this},vm.prototype.isBigEndian=function(){return!this.littleEndian},vm.prototype.setBigEndian=function(){return this.littleEndian=!1,this},vm.prototype.skip=function(t){return void 0===t&&(t=1),this.offset+=t,this},vm.prototype.seek=function(t){return this.offset=t,this},vm.prototype.mark=function(){return this._mark=this.offset,this},vm.prototype.reset=function(){return this.offset=this._mark,this},vm.prototype.pushMark=function(){return this._marks.push(this.offset),this},vm.prototype.popMark=function(){var t=this._marks.pop();if(void 0===t)throw new Error("Mark stack empty");return this.seek(t),this},vm.prototype.rewind=function(){return this.offset=0,this},vm.prototype.ensureAvailable=function(t){if(void 0===t&&(t=1),!this.available(t)){var e=2*(this.offset+t),r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=e,this._data=new DataView(this.buffer)}return this},vm.prototype.readBoolean=function(){return 0!==this.readUint8()},vm.prototype.readInt8=function(){return this._data.getInt8(this.offset++)},vm.prototype.readUint8=function(){return this._data.getUint8(this.offset++)},vm.prototype.readByte=function(){return this.readUint8()},vm.prototype.readBytes=function(t){var e=this;void 0===t&&(t=1);for(var r=new Uint8Array(t),i=0;ithis._lastWrittenByte&&(this._lastWrittenByte=this.offset)};var ym=function(t){function e(e){t.call(this),this.surface=e,this._records=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mimeType:{},defaultName:{},defaultExt:{}};return r.mimeType.get=function(){return"application/vnd.ms-pki.stl"},r.defaultName.get=function(){return"surface"},r.defaultExt.get=function(){return"stl"},e.prototype.getData=function(){var t=this,e=this.surface.index.length/3,r=new vm(2*e+3*e*4*4+80+4);r.skip(80),r.writeUint32(e);for(var i=new g,n=new g,o=new g,a=new g,s=0;sthis.prevFpsTime+1e3&&(this.lastFps=this.frames,this.prevFpsTime=t,this.frames=0),t}},Yf.add("shader/chunk/dull_interior_fragment.glsl","#ifdef DULL_INTERIOR\nif( gl_FrontFacing == false ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#endif"),Yf.add("shader/chunk/fog_fragment.glsl","#ifdef USE_FOG\nfloat depth = length( vViewPosition );\n#ifdef FOG_EXP2\nfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n#else\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n#endif\ngl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif"),Yf.add("shader/chunk/matrix_scale.glsl","float matrixScale( in mat4 m ){\nvec4 r = m[ 0 ];\nreturn sqrt( r[ 0 ] * r[ 0 ] + r[ 1 ] * r[ 1 ] + r[ 2 ] * r[ 2 ] );\n}"),Yf.add("shader/chunk/nearclip_vertex.glsl","#ifdef NEAR_CLIP\nif( vViewPosition.z < nearClip - 5.0 )\ngl_Position.z = 2.0 * gl_Position.w;\n#endif"),Yf.add("shader/chunk/nearclip_fragment.glsl","#ifdef NEAR_CLIP\nif( vViewPosition.z < nearClip )\ndiscard;\n#endif"),Yf.add("shader/chunk/opaque_back_fragment.glsl","#ifdef OPAQUE_BACK\n#ifdef FLIP_SIDED\nif( gl_FrontFacing == true ){\ngl_FragColor.a = 1.0;\n}\n#else\nif( gl_FrontFacing == false ){\ngl_FragColor.a = 1.0;\n}\n#endif\n#endif"),Yf.add("shader/chunk/radiusclip_vertex.glsl","#ifdef RADIUS_CLIP\nif( distance( vViewPosition, vClipCenter ) > clipRadius + 5.0 )\ngl_Position.z = 2.0 * gl_Position.w;\n#endif"),Yf.add("shader/chunk/radiusclip_fragment.glsl","#ifdef RADIUS_CLIP\nif( distance( vViewPosition, vClipCenter ) > clipRadius )\ndiscard;\n#endif"),Yf.add("shader/chunk/unpack_color.glsl","vec3 unpackColor(float f) {\nvec3 color;\ncolor.r = floor(f / 256.0 / 256.0);\ncolor.g = floor((f - color.r * 256.0 * 256.0) / 256.0);\ncolor.b = floor(f - color.r * 256.0 * 256.0 - color.g * 256.0);\nreturn color / 255.0;\n}");var xm=/^(?!\/\/)\s*#include\s+(\S+)/gim,_m={};if("undefined"!=typeof window&&window.WebGLRenderingContext){var wm=window.WebGLRenderingContext.prototype,Sm=wm.getShaderParameter;wm.getShaderParameter=function(){return!t.Debug||Sm.apply(this,arguments)};var Am=wm.getShaderInfoLog;wm.getShaderInfoLog=function(){return t.Debug?Am.apply(this,arguments):""};var Mm=wm.getProgramParameter;wm.getProgramParameter=function(e,r){return!t.Debug&&r===wm.LINK_STATUS||Mm.apply(this,arguments)};var Em=wm.getProgramInfoLog;wm.getProgramInfoLog=function(){return t.Debug?Em.apply(this,arguments):""}}var Tm=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];Tm.forEach(function(t){t.forEach(function(t){t[0]*=.0625,t[1]*=.0625})}),Lo.prototype.constructor=Lo;var Pm=2*Math.PI,Cm=(new Float32Array(4),new Float32Array(4),new g),Im=new v,Rm=new v,Lm=new v,Om=new v,Dm=new Float32Array(4),Nm=new Uint8Array(4),km=new v;ea.prototype.constructor=ea;var Fm=function(t,e){this.signals={moved:new no,scrolled:new no,dragged:new no,dropped:new no,clicked:new no,hovered:new no,doubleClicked:new no};var r=Object.assign({},e);this.hoverTimeout=gn(r.hoverTimeout,50),this.handleScroll=gn(r.handleScroll,!0),this.doubleClickSpeed=gn(r.doubleClickSpeed,500),this.domElement=t,this.position=new l,this.prevPosition=new l,this.down=new l,this.canvasPosition=new l,this.moving=!1,this.hovering=!0,this.scrolled=!1,this.lastMoved=1/0,this.which=void 0,this.buttons=void 0,this.pressed=void 0,this.altKey=void 0,this.ctrlKey=void 0,this.metaKey=void 0,this.shiftKey=void 0,this._listen=this._listen.bind(this),this._onMousewheel=this._onMousewheel.bind(this),this._onMousemove=this._onMousemove.bind(this),this._onMousedown=this._onMousedown.bind(this),this._onMouseup=this._onMouseup.bind(this),this._onContextmenu=this._onContextmenu.bind(this),this._onTouchstart=this._onTouchstart.bind(this),this._onTouchend=this._onTouchend.bind(this),this._onTouchmove=this._onTouchmove.bind(this),this._listen(),document.addEventListener("mousewheel",this._onMousewheel),document.addEventListener("wheel",this._onMousewheel),document.addEventListener("MozMousePixelScroll",this._onMousewheel),document.addEventListener("mousemove",this._onMousemove),document.addEventListener("mousedown",this._onMousedown),document.addEventListener("mouseup",this._onMouseup),document.addEventListener("contextmenu",this._onContextmenu),document.addEventListener("touchstart",this._onTouchstart),document.addEventListener("touchend",this._onTouchend),document.addEventListener("touchmove",this._onTouchmove),this.prevClickCP=new l},Bm={key:{}};Bm.key.get=function(){var t=0;return this.altKey&&(t+=1),this.ctrlKey&&(t+=2),this.metaKey&&(t+=4),this.shiftKey&&(t+=8),t},Fm.prototype.setParameters=function(t){var e=Object.assign({},t);this.hoverTimeout=gn(e.hoverTimeout,this.hoverTimeout)},Fm.prototype._listen=function(){var t=window.performance.now(),e=this.canvasPosition;this.doubleClickPending&&t-this.lastClicked>this.doubleClickSpeed&&(this.doubleClickPending=!1),t-this.lastMoved>this.hoverTimeout&&(this.moving=!1),(this.scrolled||!this.moving&&!this.hovering)&&(this.scrolled=!1,-1!==this.hoverTimeout&&this.overElement&&(this.hovering=!0,this.signals.hovered.dispatch(e.x,e.y))),window.requestAnimationFrame(this._listen)},Fm.prototype._onMousewheel=function(t){var e=this;if(t.target===this.domElement&&this.handleScroll){t.preventDefault(),this._setKeys(t);var r=0;r=t.wheelDelta?t.wheelDelta/40:t.detail?-t.detail/3:-t.deltaY/(t.deltaMode?.33:30),this.signals.scrolled.dispatch(r),setTimeout(function(){e.scrolled=!0},this.hoverTimeout)}},Fm.prototype._onMousemove=function(t){t.target===this.domElement?(t.preventDefault(),this.overElement=!0):this.overElement=!1,this._setKeys(t),this.moving=!0,this.hovering=!1,this.lastMoved=window.performance.now(),this.prevPosition.copy(this.position),this.position.set(t.clientX,t.clientY),this._setCanvasPosition(t);var e=this.prevPosition.x-this.position.x,r=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(e,r),this.pressed&&this.signals.dragged.dispatch(e,r)},Fm.prototype._onMousedown=function(t){t.target===this.domElement&&(t.preventDefault(),this._setKeys(t),this.moving=!1,this.hovering=!1,this.down.set(t.clientX,t.clientY),this.position.set(t.clientX,t.clientY),this.which=t.which,this.buttons=ia(t),this.pressed=!0,this._setCanvasPosition(t))},Fm.prototype._onMouseup=function(t){t.target===this.domElement&&t.preventDefault(),this._setKeys(t);var e=this.canvasPosition;this._distance()<4&&(this.lastClicked=window.performance.now(),this.doubleClickPending&&this.prevClickCP.distanceTo(e)<4?(this.signals.doubleClicked.dispatch(e.x,e.y),this.doubleClickPending=!1):(this.signals.clicked.dispatch(e.x,e.y),this.doubleClickPending=!0),this.prevClickCP.copy(e)),this.which=void 0,this.buttons=void 0,this.pressed=void 0},Fm.prototype._onContextmenu=function(t){t.target===this.domElement&&t.preventDefault()},Fm.prototype._onTouchstart=function(t){if(t.target===this.domElement)switch(t.preventDefault(),this.pressed=!0,t.touches.length){case 1:this.moving=!1,this.hovering=!1,this.down.set(t.touches[0].pageX,t.touches[0].pageY),this.position.set(t.touches[0].pageX,t.touches[0].pageY),this._setCanvasPosition(t.touches[0]);break;case 2:this.down.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),this.position.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),this.lastTouchDistance=ra(t)}},Fm.prototype._onTouchend=function(t){t.target===this.domElement&&t.preventDefault(),this.which=void 0,this.buttons=void 0,this.pressed=void 0},Fm.prototype._onTouchmove=function(t){switch(t.target===this.domElement?(t.preventDefault(),this.overElement=!0):this.overElement=!1,t.touches.length){case 1:this._setKeys(t),this.which=1,this.buttons=1,this.moving=!0,this.hovering=!1,this.lastMoved=window.performance.now(),this.prevPosition.copy(this.position),this.position.set(t.touches[0].pageX,t.touches[0].pageY),this._setCanvasPosition(t.touches[0]);var e=this.prevPosition.x-this.position.x,r=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(e,r),this.pressed&&this.signals.dragged.dispatch(e,r);break;case 2:var i=ra(t),n=i-this.lastTouchDistance;if(this.lastTouchDistance=i,this.prevPosition.copy(this.position),this.position.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),Math.abs(n)>2&&this.handleScroll&&this.position.distanceTo(this.prevPosition)<2)this.which=0,this.buttons=0,this.signals.scrolled.dispatch(n/2);else{this.which=3,this.buttons=2;var o=this.prevPosition.x-this.position.x,a=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(o,a),this.pressed&&this.signals.dragged.dispatch(o,a)}}},Fm.prototype._distance=function(){return this.position.distanceTo(this.down)},Fm.prototype._setCanvasPosition=function(t){var e,r,i=this.domElement.getBoundingClientRect();"offsetX"in t&&"offsetY"in t?(e=t.offsetX,r=t.offsetY):(e=t.clientX-i.left,r=t.clientY-i.top),this.canvasPosition.set(e,i.height-r)},Fm.prototype._setKeys=function(t){this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey},Fm.prototype.dispose=function(){document.removeEventListener("mousewheel",this._onMousewheel),document.removeEventListener("wheel",this._onMousewheel),document.removeEventListener("MozMousePixelScroll",this._onMousewheel),document.removeEventListener("mousemove",this._onMousemove),document.removeEventListener("mousedown",this._onMousedown),document.removeEventListener("mouseup",this._onMouseup),document.removeEventListener("contextmenu",this._onContextmenu),document.removeEventListener("touchstart",this._onTouchstart),document.removeEventListener("touchend",this._onTouchend),document.removeEventListener("touchmove",this._onTouchmove)},Object.defineProperties(Fm.prototype,Bm);var zm=new v,Um=new v,jm=new v,Gm=new g,Vm=new m,$m=new v,Hm=new g,Wm=new g,Xm=function(t,e){var r=e||{};this.rotateSpeed=gn(r.rotateSpeed,2),this.zoomSpeed=gn(r.zoomSpeed,1.2),this.panSpeed=gn(r.panSpeed,1),this.stage=t,this.viewer=t.viewer,this.mouse=t.mouseObserver,this.controls=t.viewerControls},qm={component:{},atom:{}};qm.component.get=function(){return this.stage.transformComponent},qm.atom.get=function(){return this.stage.transformAtom},Xm.prototype._setPanVector=function(t,e,r){var i,n=this.viewer.camera;if(r=-r||0,r+=n.position.z,"OrthographicCamera"===n.type)i=1/n.zoom;else{var o=$n(n.fov);i=-2*r*Math.tan(o/2)/this.viewer.height}Hm.set(t,e,0),Hm.multiplyScalar(this.panSpeed*i)},Xm.prototype._getRotateXY=function(t,e){return[this.rotateSpeed*-t*.01,this.rotateSpeed*e*.01]},Xm.prototype._transformPanVector=function(){$m.extractRotation(this.component.transform),$m.premultiply(this.viewer.rotationGroup.matrix),$m.getInverse($m),Hm.applyMatrix4($m)},Xm.prototype.zoom=function(t){this.controls.zoom(this.zoomSpeed*t*.02)},Xm.prototype.pan=function(t,e){this._setPanVector(t,e),$m.getInverse(this.viewer.rotationGroup.matrix),Hm.applyMatrix4($m),this.controls.translate(Hm)},Xm.prototype.panComponent=function(t,e){this.component&&(this._setPanVector(t,e),this._transformPanVector(),this.component.position.add(Hm),this.component.updateMatrix())},Xm.prototype.panAtom=function(t,e){this.atom&&this.component&&(this.atom.positionToVector3(Wm),Wm.add(this.viewer.translationGroup.position),Wm.applyMatrix4(this.viewer.rotationGroup.matrix),this._setPanVector(t,e,Wm.z),this._transformPanVector(),this.atom.positionAdd(Hm),this.component.updateRepresentations({position:!0}))},Xm.prototype.rotate=function(t,e){var r=this._getRotateXY(t,e),i=r[0],n=r[1];zm.makeRotationX(n),Um.makeRotationY(i),zm.multiply(Um),this.controls.applyMatrix(zm)},Xm.prototype.rotateComponent=function(t,e){if(this.component){var r=this._getRotateXY(t,e),i=r[0],n=r[1];jm.extractRotation(this.component.transform),jm.premultiply(this.viewer.rotationGroup.matrix),jm.getInverse(jm),Gm.set(1,0,0),Gm.applyMatrix4(jm),zm.makeRotationAxis(Gm,n),Gm.set(0,1,0),Gm.applyMatrix4(jm),Um.makeRotationAxis(Gm,i),zm.multiply(Um),Vm.setFromRotationMatrix(zm),this.component.quaternion.premultiply(Vm),this.component.updateMatrix()}},Object.defineProperties(Xm.prototype,qm);var Ym=function(t,e){this.pid=t.pid,this.picker=t.picker,this.instance=t.instance,this.stage=e,this.controls=e.viewerControls,this.mouse=e.mouseObserver},Zm={type:{},altKey:{},ctrlKey:{},metaKey:{},shiftKey:{},canvasPosition:{},component:{},object:{},position:{},closestBondAtom:{},arrow:{},atom:{},axes:{},bond:{},box:{},cone:{},clash:{},contact:{},cylinder:{},distance:{},ellipsoid:{},octahedron:{},mesh:{},slice:{},sphere:{},tetrahedron:{},torus:{},surface:{},unitcell:{},unknown:{},volume:{}};Zm.type.get=function(){return this.picker.type},Zm.altKey.get=function(){return this.mouse.altKey},Zm.ctrlKey.get=function(){return this.mouse.ctrlKey},Zm.metaKey.get=function(){return this.mouse.metaKey},Zm.shiftKey.get=function(){return this.mouse.shiftKey},Zm.canvasPosition.get=function(){return this.mouse.canvasPosition},Zm.component.get=function(){return this.stage.getComponentsByObject(this.picker.data).list[0]},Zm.object.get=function(){return this.picker.getObject(this.pid)},Zm.position.get=function(){return this.picker.getPosition(this.pid,this.instance,this.component)},Zm.closestBondAtom.get=function(){if("bond"===this.type){var t=this.bond,e=this.controls;return na(this.canvasPosition,e.getPositionOnCanvas(t.atom1),e.getPositionOnCanvas(t.atom2))?t.atom1:t.atom2}},Zm.arrow.get=function(){return this._objectIfType("arrow")},Zm.atom.get=function(){return this._objectIfType("atom")},Zm.axes.get=function(){return this._objectIfType("axes")},Zm.bond.get=function(){return this._objectIfType("bond")},Zm.box.get=function(){return this._objectIfType("box")},Zm.cone.get=function(){return this._objectIfType("cone")},Zm.clash.get=function(){return this._objectIfType("clash")},Zm.contact.get=function(){return this._objectIfType("contact")},Zm.cylinder.get=function(){return this._objectIfType("cylinder")},Zm.distance.get=function(){return this._objectIfType("distance")},Zm.ellipsoid.get=function(){return this._objectIfType("ellipsoid")},Zm.octahedron.get=function(){return this._objectIfType("octahedron")},Zm.mesh.get=function(){return this._objectIfType("mesh")},Zm.slice.get=function(){return this._objectIfType("slice")},Zm.sphere.get=function(){return this._objectIfType("sphere")},Zm.tetrahedron.get=function(){return this._objectIfType("tetrahedron")},Zm.torus.get=function(){return this._objectIfType("torus")},Zm.surface.get=function(){return this._objectIfType("surface")},Zm.unitcell.get=function(){return this._objectIfType("unitcell")},Zm.unknown.get=function(){return this._objectIfType("unknown")},Zm.volume.get=function(){return this._objectIfType("volume")},Ym.prototype._objectIfType=function(t){return this.type===t?this.object:void 0},Ym.prototype.getLabel=function(){var t="nothing";return this.arrow?t="arrow: "+(this.arrow.name||this.pid)+" ("+this.arrow.shape.name+")":this.atom?t="atom: "+this.atom.qualifiedName()+" ("+this.atom.structure.name+")":this.axes?t="axes":this.bond?t="bond: "+this.bond.atom1.qualifiedName()+" - "+this.bond.atom2.qualifiedName()+" ("+this.bond.structure.name+")":this.box?t="box: "+(this.box.name||this.pid)+" ("+this.box.shape.name+")":this.cone?t="cone: "+(this.cone.name||this.pid)+" ("+this.cone.shape.name+")":this.clash?t="clash: "+this.clash.clash.sele1+" - "+this.clash.clash.sele2:this.contact?t="contact: "+this.contact.atom1.qualifiedName()+" - "+this.contact.atom2.qualifiedName()+" ("+this.contact.structure.name+")":this.cylinder?t="cylinder: "+(this.cylinder.name||this.pid)+" ("+this.cylinder.shape.name+")":this.distance?t="distance: "+this.distance.atom1.qualifiedName()+" - "+this.distance.atom2.qualifiedName()+" ("+this.distance.structure.name+")":this.ellipsoid?t="ellipsoid: "+(this.ellipsoid.name||this.pid)+" ("+this.ellipsoid.shape.name+")":this.octahedron?t="octahedron: "+(this.octahedron.name||this.pid)+" ("+this.octahedron.shape.name+")":this.mesh?t="mesh: "+(this.mesh.name||this.mesh.serial)+" ("+this.mesh.shape.name+")":this.slice?t="slice: "+this.slice.value.toPrecision(3)+" ("+this.slice.volume.name+")":this.sphere?t="sphere: "+(this.sphere.name||this.pid)+" ("+this.sphere.shape.name+")":this.surface?t="surface: "+this.surface.surface.name:this.tetrahedron?t="tetrahedron: "+(this.tetrahedron.name||this.pid)+" ("+this.tetrahedron.shape.name+")":this.torus?t="torus: "+(this.torus.name||this.pid)+" ("+this.torus.shape.name+")":this.unitcell?t="unitcell: "+this.unitcell.unitcell.spacegroup+" ("+this.unitcell.structure.name+")":this.unknown?t="unknown":this.volume&&(t="volume: "+this.volume.value.toPrecision(3)+" ("+this.volume.volume.name+")"),t},Object.defineProperties(Ym.prototype,Zm);var Km=function(t){this.stage=t,this.viewer=t.viewer};Km.prototype.pick=function(t,e){var r=this.viewer.pick(t,e);if(r.picker&&"ignore"!==r.picker.type&&void 0!==r.pid){var i=r.picker.array;if(!(i&&r.pid>=i.length))return new Ym(r,this.stage);console.error("pid >= picker.array.length")}};var Qm=new m,Jm=new g,tg=new g,eg=new g,rg=new g,ig=new v,ng=new g,og=new v,ag=function(t){this.stage=t,this.viewer=t.viewer,this.signals={changed:new no}},sg={position:{},rotation:{}};sg.position.get=function(){return this.viewer.translationGroup.position},sg.rotation.get=function(){return this.viewer.rotationGroup.quaternion},ag.prototype.changed=function(){this.viewer.requestRender(),this.signals.changed.dispatch()},ag.prototype.getPositionOnCanvas=function(t,e){var r=Bn(e),i=this.viewer;return eg.copy(t).add(i.translationGroup.position).applyMatrix4(i.rotationGroup.matrix).project(i.camera),r.set((eg.x+1)*i.width/2,(eg.y+1)*i.height/2)},ag.prototype.getOrientation=function(t){var e=Un(t);e.copy(this.viewer.rotationGroup.matrix);var r=-this.viewer.camera.position.z;return e.scale(rg.set(r,r,r)),e.setPosition(this.viewer.translationGroup.position),e},ag.prototype.orient=function(t){Un(t).decompose(Jm,Qm,tg);var e=this.viewer;e.rotationGroup.setRotationFromQuaternion(Qm),e.translationGroup.position.copy(Jm),e.camera.position.z=-tg.z,e.updateZoom(),this.changed()},ag.prototype.translate=function(t){this.viewer.translationGroup.position.add(zn(t)),this.changed()},ag.prototype.center=function(t){this.viewer.translationGroup.position.copy(zn(t)).negate(),this.changed()},ag.prototype.zoom=function(t){this.distance(this.viewer.camera.position.z*(1-t))},ag.prototype.distance=function(t){this.viewer.camera.position.z=t,this.viewer.updateZoom(),this.changed()},ag.prototype.spin=function(t,e){ig.getInverse(this.viewer.rotationGroup.matrix),ng.copy(zn(t)).applyMatrix4(ig),this.viewer.rotationGroup.rotateOnAxis(ng,e),this.changed()},ag.prototype.rotate=function(t){this.viewer.rotationGroup.setRotationFromQuaternion(jn(t)),this.changed()},ag.prototype.align=function(t){og.getInverse(Un(t)),this.viewer.rotationGroup.setRotationFromMatrix(og),this.changed()},ag.prototype.applyMatrix=function(t){this.viewer.rotationGroup.applyMatrix(Un(t)),this.changed()},Object.defineProperties(ag.prototype,sg);var cg=function(t,e){for(var r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];this.duration=gn(t,1e3),this.controls=e,this.startTime=window.performance.now(),this.pausedTime=-1,this.elapsedDuration=0,this.pausedDuration=0,this.ignoreGlobalToggle=!1,this._paused=!1,this._resolveList=[],(n=this)._init.apply(n,r);var n},ug={done:{},paused:{}};ug.done.get=function(){return 1===this.alpha},ug.paused.get=function(){return this._paused},cg.prototype._init=function(){},cg.prototype._tick=function(){},cg.prototype.tick=function(t){if(!this._paused)return this.elapsedDuration=t.currentTime-this.startTime-this.pausedDuration,0===this.duration?this.alpha=1:this.alpha=to(0,1,this.elapsedDuration/this.duration),this._tick(t),this.done&&this._resolveList.forEach(function(t){return t()}),this.done},cg.prototype.pause=function(t){t&&(this._hold=!0),-1===this.pausedTime&&(this.pausedTime=window.performance.now()),this._paused=!0},cg.prototype.resume=function(t){!t&&this._hold||(this.pausedDuration+=window.performance.now()-this.pausedTime,this._paused=!1,this._hold=!1,this.pausedTime=-1)},cg.prototype.toggle=function(){this._paused?this.resume():this.pause()},cg.prototype.then=function(t){var e=this;return(this.done?Promise.resolve():new Promise(function(t){return e._resolveList.push(t)})).then(t)},Object.defineProperties(cg.prototype,ug);var hg=function(t){function e(e){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];t.apply(this,[gn(e,1/0)].concat(r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){Array.isArray(t)?this.axis=(new g).fromArray(t):this.axis=gn(t,new g(0,1,0)),this.angle=gn(e,.01)},e.prototype._tick=function(t){this.axis&&this.angle&&this.controls.spin(this.axis,this.angle*t.lastDuration/16)},e}(cg),lg=function(t){function e(e){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];t.apply(this,[gn(e,1/0)].concat(r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e,r){Array.isArray(t)?this.axis=(new g).fromArray(t):this.axis=gn(t,new g(0,1,0)),this.angleStep=gn(e,.01),this.angleEnd=gn(r,.2),this.angleSum=0,this.direction=1},e.prototype._tick=function(t){if(this.axis&&this.angleStep&&this.angleEnd){var e=to(0,1,Math.abs(this.angleSum)/this.angleEnd),r=this.angleStep*this.direction*(1.1-e);this.controls.spin(this.axis,r*t.lastDuration/16),this.angleSum+=this.angleStep,this.angleSum>=this.angleEnd&&(this.direction*=-1,this.angleSum=-this.angleEnd)}},e}(cg),pg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.moveFrom=zn(gn(t,new g)),this.moveTo=zn(gn(e,new g))},e.prototype._tick=function(){this.controls.position.lerpVectors(this.moveFrom,this.moveTo,this.alpha).negate(),this.controls.changed()},e}(cg),dg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.zoomFrom=t,this.zoomTo=e},e.prototype._tick=function(){this.controls.distance(Qn(this.zoomFrom,this.zoomTo,this.alpha))},e}(cg),fg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.rotateFrom=jn(t),this.rotateTo=jn(e),this._currentRotation=new m},e.prototype._tick=function(){this._currentRotation.copy(this.rotateFrom).slerp(this.rotateTo,this.alpha),this.controls.rotate(this._currentRotation)},e}(cg),mg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e,r){this.valueFrom=t,this.valueTo=e,this.callback=r},e.prototype._tick=function(){this.callback(Qn(this.valueFrom,this.valueTo,this.alpha))},e}(cg),gg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t){this.callback=t},e.prototype._tick=function(){1===this.alpha&&this.callback()},e}(cg),vg=function(t){this._list=t||[],this._resolveList=[]},yg={done:{}};yg.done.get=function(){return this._list.every(function(t){return t.done})},vg.prototype.then=function(t){var e=this;return(this.done?Promise.resolve():new Promise(function(t){e._resolveList.push(t),e._list.forEach(function(t){t.then(function(){e._resolveList.forEach(function(t){t()}),e._resolveList.length=0})})})).then(t)},Object.defineProperties(vg.prototype,yg);var bg=function(t){this.stage=t,this.viewer=t.viewer,this.controls=t.viewerControls,this.animationList=[],this.finishedList=[]},xg={paused:{}};xg.paused.get=function(){return this.animationList.every(function(t){return t.paused})},bg.prototype.add=function(t){return 0===t.duration?t.tick(this.viewer.stats):this.animationList.push(t),t},bg.prototype.remove=function(t){var e=this.animationList,r=e.indexOf(t);r>-1&&e.splice(r,1)},bg.prototype.run=function(t){for(var e=this,r=this.finishedList,i=this.animationList,n=i.length,o=0;o0;)r[i]=arguments[i+1];if(!this.disabled){var n=this.mouse.key||0,o=this.mouse.buttons||0;this.actionList.forEach(function(i){i.type===t&&i.key===n&&i.button===o&&i.callback.apply(i,[e.stage].concat(r))})}},Sg.prototype.add=function(t,e){var r=oa(t),i=r[0],n=r[1],o=r[2];this.actionList.push({type:i,key:n,button:o,callback:e})},Sg.prototype.remove=function(t,e){var r=t.includes("*"),i=oa(t),n=i[0],o=i[1],a=i[2],s=this.actionList.filter(function(t){return!((t.type===n||r&&""===n)&&(t.key===o||r&&0===o)&&(t.button===a||r&&0===a)&&(t.callback===e||void 0===e))});this.actionList=s},Sg.prototype.preset=function(t){var e=this;this.clear(),(wg[t]||[]).forEach(function(t){return(r=e).add.apply(r,t);var r})},Sg.prototype.clear=function(){this.actionList.length=0};var Ag=function(){};Ag.autoView=function(t){t.autoView(1e3)},Ag.toggleAnimations=function(t){t.animationControls.toggle()},Ag.toggleRock=function(t){t.toggleRock()};var Mg={default:[["i",Ag.toggleSpin=function(t){t.toggleSpin()}],["k",Ag.toggleRock],["p",Ag.toggleAnimations],["r",Ag.autoView]]},Eg=function(t,e){var r=e||{};this.stage=t,this.actionList=[],this.disabled=r.disabled||!1,this.preset(r.preset||"default")};Eg.prototype.run=function(t){var e=this;this.disabled||this.actionList.forEach(function(r){r.keyCode===t&&r.callback(e.stage)})},Eg.prototype.add=function(t,e){var r=t.charCodeAt(0);this.actionList.push({keyCode:r,callback:e})},Eg.prototype.remove=function(t,e){var r=t.charCodeAt(0),i=this.actionList.filter(function(t){return!(t.keyCode===r&&(t.callback===e||void 0===e))});this.actionList=i},Eg.prototype.preset=function(t){var e=this;this.clear(),(Mg[t]||[]).forEach(function(t){return(r=e).add.apply(r,t);var r})},Eg.prototype.clear=function(){this.actionList.length=0};var Tg=function(t){this.stage=t,this.mouse=t.mouseObserver,this.controls=t.mouseControls,this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this)};Tg.prototype._onClick=function(t,e){var r=this.stage.pickingControls.pick(t,e);this.stage.signals.clicked.dispatch(r),this.controls.run("clickPick",r)},Tg.prototype._onHover=function(t,e){var r=this.stage.pickingControls.pick(t,e);r&&this.mouse.down.equals(this.mouse.position)&&(this.stage.transformComponent=r.component,this.stage.transformAtom=r.atom),this.stage.signals.hovered.dispatch(r),this.controls.run("hoverPick",r)},Tg.prototype.dispose=function(){this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var Pg=function(t){this.stage=t,this.mouse=t.mouseObserver,this.controls=t.mouseControls,this.mouse.signals.moved.add(this._onMove,this),this.mouse.signals.scrolled.add(this._onScroll,this),this.mouse.signals.dragged.add(this._onDrag,this),this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this),this.mouse.signals.doubleClicked.add(this._onDblclick,this)};Pg.prototype._onMove=function(){this.stage.tooltip.style.display="none"},Pg.prototype._onScroll=function(t){this.controls.run("scroll",t)},Pg.prototype._onDrag=function(t,e){this.controls.run("drag",t,e)},Pg.prototype._onClick=function(t,e){this.controls.run("click",t,e)},Pg.prototype._onDblclick=function(t,e){this.controls.run("doubleClick",t,e)},Pg.prototype._onHover=function(t,e){this.controls.run("hover",t,e)},Pg.prototype.dispose=function(){this.mouse.signals.moved.remove(this._onMove,this),this.mouse.signals.scrolled.remove(this._onScroll,this),this.mouse.signals.dragged.remove(this._onDrag,this),this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var Cg=function(t){this.viewer=t.viewer,this.animationControls=t.animationControls,this.viewer.signals.ticked.add(this._onTick,this)};Cg.prototype._onTick=function(t){this.animationControls.run(t)},Cg.prototype.dispose=function(){this.viewer.signals.ticked.remove(this._onTick,this)};var Ig=function(t){this.stage=t,this.controls=t.keyControls,this.domElement=t.viewer.renderer.domElement,this.domElement.setAttribute("tabIndex","-1"),this.domElement.style.outline="none",this.domElement.autofocus=!0,this.domElement.focus(),this._focusDomElement=this._focusDomElement.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this),this._onKeypress=this._onKeypress.bind(this),this.domElement.addEventListener("mousedown",this._focusDomElement),this.domElement.addEventListener("touchstart",this._focusDomElement),this.domElement.addEventListener("keydown",this._onKeydown),this.domElement.addEventListener("keyup",this._onKeyup),this.domElement.addEventListener("keypress",this._onKeypress)};Ig.prototype._onKeydown=function(){},Ig.prototype._onKeyup=function(){},Ig.prototype._onKeypress=function(t){this.controls.run(t.keyCode)},Ig.prototype._focusDomElement=function(){this.domElement.focus()},Ig.prototype.dispose=function(){this.domElement.removeEventListener("mousedown",this._focusDomElement),this.domElement.removeEventListener("touchstart",this._focusDomElement),this.domElement.removeEventListener("keydown",this._onKeypress),this.domElement.removeEventListener("keyup",this._onKeypress),this.domElement.removeEventListener("keypress",this._onKeypress)};var Rg=function(t,e,r,i){var n=i||{};this.offsetX=gn(n.offsetX,0),this.offsetY=gn(n.offsetY,0),this.visible=gn(n.visible,!0),this.component=t,this.stage=t.stage,this.viewer=this.stage.viewer,this.position=e,this._viewerPosition=new g,this._updateViewerPosition(),this._canvasPosition=new g,this._cameraPosition=new g,this.element=document.createElement("div"),Object.assign(this.element.style,{display:"block",position:"fixed",zIndex:1+(parseInt(this.viewer.container.style.zIndex)||0),pointerEvents:"none",backgroundColor:"rgba( 0, 0, 0, 0.6 )",color:"lightgrey",padding:"8px",fontFamily:"sans-serif",left:"-10000px"}),this.viewer.container.appendChild(this.element),this.setContent(r),this.updateVisibility(),this.viewer.signals.ticked.add(this._update,this),this.component.signals.matrixChanged.add(this._updateViewerPosition,this)};Rg.prototype.setContent=function(t){var e=this.element.style.display;"none"===e&&(this.element.style.left="-10000px",this.element.style.display="block"),t instanceof window.Element?(this.element.innerHTML="",this.element.appendChild(t)):this.element.innerHTML=t,this._clientRect=this.element.getBoundingClientRect(),"none"===e&&(this.element.style.display=e)},Rg.prototype.setVisibility=function(t){this.visible=t,this.updateVisibility()},Rg.prototype.getVisibility=function(){return this.visible&&this.component.visible},Rg.prototype.updateVisibility=function(){this.element.style.display=this.getVisibility()?"block":"none"},Rg.prototype._updateViewerPosition=function(){this._viewerPosition.copy(this.position).applyMatrix4(this.component.matrix)},Rg.prototype._update=function(){if(this.getVisibility()){var t=this.element.style,e=this._canvasPosition,r=this._viewerPosition,i=this._clientRect;if(this._cameraPosition.copy(r).add(this.viewer.translationGroup.position).applyMatrix4(this.viewer.rotationGroup.matrix).sub(this.viewer.camera.position),this._cameraPosition.z<0)return void(t.display="none");t.display="block",t.opacity=1-to(this.viewer.scene.fog.near,this.viewer.scene.fog.far,this._cameraPosition.length()),this.stage.viewerControls.getPositionOnCanvas(r,e),t.bottom=this.offsetX+e.y+i.height/2+"px",t.left=this.offsetY+e.x-i.width/2+"px"}},Rg.prototype.dispose=function(){this.viewer.container.removeChild(this.element),this.viewer.signals.ticked.remove(this._update,this),this.component.signals.matrixChanged.remove(this._updateViewerPosition,this)};var Lg=new v,Og=new g,Dg=new m,Ng=function(t){this.component=t,this.stage=t.stage,this.viewer=t.stage.viewer,this.signals={changed:new no}},kg={position:{},rotation:{}};kg.position.get=function(){return this.component.position},kg.rotation.get=function(){return this.component.quaternion},Ng.prototype.changed=function(){this.component.updateMatrix(),this.viewer.requestRender(),this.signals.changed.dispatch()},Ng.prototype.spin=function(t,e){Lg.getInverse(this.viewer.rotationGroup.matrix),Og.copy(zn(t)).applyMatrix4(Lg),Lg.extractRotation(this.component.transform),Lg.premultiply(this.viewer.rotationGroup.matrix),Lg.getInverse(Lg),Og.copy(zn(t)),Og.applyMatrix4(Lg),Lg.makeRotationAxis(Og,e),Dg.setFromRotationMatrix(Lg),this.component.quaternion.premultiply(Dg),this.changed()},Object.defineProperties(Ng.prototype,kg),va.__deps=[ya],ba.__deps=[ya,ga];var Fg=new g,Bg=function(){},zg={Picker:{},Buffer:{}};zg.Picker.get=function(){return Jf.get(this.type)},zg.Buffer.get=function(){return Qf.get(this.type)},Bg.getShapeKey=function(t){return this.type+t[0].toUpperCase()+t.substr(1)},Bg.valueToShape=function(t,e,r){var i=t[this.getShapeKey(e)];switch(this.fields[e]){case"v3":case"c":Ma(r,i);break;default:i.push(r)}},Bg.objectToShape=function(t,e){var r=this;Object.keys(this.fields).forEach(function(i){r.valueToShape(t,i,e[i])}),this.valueToShape(t,"name",e.name),this.expandBoundingBox(t.boundingBox,e)},Bg.valueFromShape=function(t,e,r){var i=t[this.getShapeKey(r)];switch(this.fields[r]){case"v3":return(new g).fromArray(i,3*e);case"c":return(new tt).fromArray(i,3*e);default:return i[e]}},Bg.objectFromShape=function(t,e){var r=this,i={shape:t,name:this.valueFromShape(t,e,"name")};return Object.keys(this.fields).forEach(function(n){i[n]=r.valueFromShape(t,e,n)}),i},Bg.arrayFromShape=function(t,e){var r=t[this.getShapeKey(e)];switch(this.fields[e]){case"s":return r;default:return new Float32Array(r)}},Bg.dataFromShape=function(t){var e=this,r={};return this.Picker&&(r.picking=new this.Picker(t)),Object.keys(this.fields).forEach(function(i){r[i]=e.arrayFromShape(t,i)}),r},Bg.bufferFromShape=function(t,e){return new this.Buffer(this.dataFromShape(t),e)},Object.defineProperties(Bg,zg);var Ug=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"sphere"},r.fields.get=function(){return{position:"v3",color:"c",radius:"f"}},e.positionFromShape=function(t,e){return this.valueFromShape(t,e,"position")},e.expandBoundingBox=function(t,e){t.expandByPoint(Fg.fromArray(e.position))},Object.defineProperties(e,r),e}(Bg),jg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"box"},r.fields.get=function(){return{position:"v3",color:"c",size:"f",heightAxis:"v3",depthAxis:"v3"}},Object.defineProperties(e,r),e}(Ug),Gg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"octahedron"},Object.defineProperties(e,r),e}(jg),Vg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"tetrahedron"},Object.defineProperties(e,r),e}(jg),$g=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"cylinder"},r.fields.get=function(){return{position1:"v3",position2:"v3",color:"c",radius:"f"}},e.positionFromShape=function(t,e){var r=this.valueFromShape(t,e,"position1"),i=this.valueFromShape(t,e,"position2");return r.add(i).multiplyScalar(.5)},e.expandBoundingBox=function(t,e){t.expandByPoint(Fg.fromArray(e.position1)),t.expandByPoint(Fg.fromArray(e.position2))},Object.defineProperties(e,r),e}(Bg),Hg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"arrow"},Object.defineProperties(e,r),e}($g),Wg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"cone"},Object.defineProperties(e,r),e}($g),Xg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"ellipsoid"},r.fields.get=function(){return{position:"v3",color:"c",radius:"f",majorAxis:"v3",minorAxis:"v3"}},Object.defineProperties(e,r),e}(Ug),qg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"torus"},Object.defineProperties(e,r),e}(Xg),Yg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"text"},r.fields.get=function(){return{position:"v3",color:"c",size:"f",text:"s"}},Object.defineProperties(e,r),e}(Ug),Zg=function(t){this.array=t};Zg.prototype.getIndex=function(t){return this.array?this.array[t]:t},Zg.prototype.getObject=function(){return{}},Zg.prototype._applyTransformations=function(t,e,r){return e&&t.applyMatrix4(e.matrix),r&&t.applyMatrix4(r.matrix),t},Zg.prototype._getPosition=function(){return new g},Zg.prototype.getPosition=function(t,e,r){return this._applyTransformations(this._getPosition(t),e,r)};var Kg=function(t){function e(e){t.call(this),this.shape=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{},data:{},type:{}};return r.primitive.get=function(){},r.data.get=function(){return this.shape},r.type.get=function(){return this.primitive.type},e.prototype.getObject=function(t){return this.primitive.objectFromShape(this.shape,t)},e.prototype._getPosition=function(t){return this.primitive.positionFromShape(this.shape,t)},Object.defineProperties(e.prototype,r),e}(Zg),Qg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return $g},Object.defineProperties(e.prototype,r),e}(Kg),Jg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Hg},Object.defineProperties(e.prototype,r),e}(Kg),tv=function(t){function e(e,r){t.call(this,e),this.structure=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"atom"},r.data.get=function(){return this.structure},e.prototype.getObject=function(t){return this.structure.getAtomProxy(this.getIndex(t))},e.prototype._getPosition=function(t){return(new g).copy(this.getObject(t))},Object.defineProperties(e.prototype,r),e}(Zg),ev=function(t){function e(e){t.call(this),this.axes=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"axes"},r.data.get=function(){return this.axes},e.prototype.getObject=function(){return{axes:this.axes}},e.prototype._getPosition=function(){return this.axes.center.clone()},Object.defineProperties(e.prototype,r),e}(Zg),rv=function(t){function e(e,r,i){t.call(this,e),this.structure=r,this.bondStore=i||r.bondStore}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"bond"},r.data.get=function(){return this.structure},e.prototype.getObject=function(t){var e=this.structure.getBondProxy(this.getIndex(t));return e.bondStore=this.bondStore,e},e.prototype._getPosition=function(t){var e=this.getObject(t);return(new g).copy(e.atom1).add(e.atom2).multiplyScalar(.5)},Object.defineProperties(e.prototype,r),e}(Zg),iv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"contact"},Object.defineProperties(e.prototype,r),e}(rv),nv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Wg},Object.defineProperties(e.prototype,r),e}(Kg),ov=function(t){function e(e,r,i){t.call(this,e),this.validation=r,this.structure=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"clash"},r.data.get=function(){return this.validation},e.prototype.getObject=function(t){var e=this.validation,r=this.getIndex(t);return{validation:e,index:r,clash:e.clashArray[r]}},e.prototype._getAtomProxyFromSele=function(t){var e=new Cf(t),r=this.structure.getAtomIndices(e)[0];return this.structure.getAtomProxy(r)},e.prototype._getPosition=function(t){var e=this.getObject(t).clash,r=this._getAtomProxyFromSele(e.sele1),i=this._getAtomProxyFromSele(e.sele2);return(new g).copy(r).add(i).multiplyScalar(.5)},Object.defineProperties(e.prototype,r),e}(Zg),av=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"distance"},Object.defineProperties(e.prototype,r),e}(rv),sv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Xg},Object.defineProperties(e.prototype,r),e}(Kg),cv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Gg},Object.defineProperties(e.prototype,r),e}(Kg),uv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return jg},Object.defineProperties(e.prototype,r),e}(Kg),hv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"ignore"},Object.defineProperties(e.prototype,r),e}(Zg),lv=function(t){function e(e,r){t.call(this,e),this.mesh=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"mesh"},e.prototype.getObject=function(){var t=this.mesh;return{shape:this.shape,name:t.name,serial:t.serial}},e.prototype._getPosition=function(){return this.__position||(this.__position=aa(this.mesh.position)),this.__position},Object.defineProperties(e.prototype,r),e}(Kg),pv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Ug},Object.defineProperties(e.prototype,r),e}(Kg),dv=function(t){function e(e,r){t.call(this,e),this.surface=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"surface"},r.data.get=function(){return this.surface},e.prototype.getObject=function(t){return{surface:this.surface,index:this.getIndex(t)}},e.prototype._getPosition=function(){return this.surface.center.clone()},Object.defineProperties(e.prototype,r),e}(Zg),fv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Vg},Object.defineProperties(e.prototype,r),e}(Kg),mv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return qg},Object.defineProperties(e.prototype,r),e}(Kg),gv=function(t){function e(e,r){t.call(this),this.unitcell=e,this.structure=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"unitcell"},r.data.get=function(){return this.unitcell},e.prototype.getObject=function(){return{unitcell:this.unitcell,structure:this.structure}},e.prototype._getPosition=function(){return this.unitcell.getCenter(this.structure)},Object.defineProperties(e.prototype,r),e}(Zg),vv=(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};r.type.get=function(){return"unknown"},Object.defineProperties(e.prototype,r)}(Zg),function(t){function e(e,r){t.call(this,e),this.volume=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"volume"},r.data.get=function(){return this.volume},e.prototype.getObject=function(t){var e=this.volume,r=this.getIndex(t);return{volume:e,index:r,value:e.data[r]}},e.prototype._getPosition=function(t){var e=this.volume.position,r=this.getIndex(t);return new g(e[3*r],e[3*r+1],e[3*r+2])},Object.defineProperties(e.prototype,r),e}(Zg)),yv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"slice"},Object.defineProperties(e.prototype,r),e}(vv);Jf.add("arrow",Jg),Jf.add("box",uv),Jf.add("cone",nv),Jf.add("cylinder",Qg),Jf.add("ellipsoid",sv),Jf.add("octahedron",cv),Jf.add("sphere",pv),Jf.add("tetrahedron",fv),Jf.add("torus",mv);var bv=function(t,e){this.length=t,this._words=new Uint32Array(t+32>>>5),!0===e&&this.setAll()};bv.prototype.get=function(t){return 0!=(this._words[t>>>5]&1<>>5]|=1<>>5]&=~(1<>>5]^=1<>>5,a=e>>>5,s=o;s>>5]|=1<>>5]|=1<>>5]|=1<>>5]&=~(1<>>5]&=~(1<>>5]&=~(1<>>5]|=1<>>5]&=~(1<>>r,this},bv.prototype._isRangeValue=function(t,e,r){for(var i=this._words,n=!0===r?4294967295:0,o=t>>>5,a=e>>>5,s=o;s>>5]&1<>>5]&1<>>5]&1<>>5]&1<>>5]&1<0?f>e&&(e=f):f>r&&(r=f),sa(s.copy(t),l,u);var m=c.subVectors(s,u).normalize().dot(l),g=s.distanceTo(u);m>0?g>i&&(i=g):g>n&&(n=g),sa(s.copy(t),p,u);var v=c.subVectors(s,u).normalize().dot(p),y=s.distanceTo(u);v>0?y>o&&(o=y):y>a&&(a=y)}),{d1a:e,d2a:i,d3a:o,d1b:-r,d2b:-n,d3b:-a}},Za.prototype.constructor=Za,Ka.prototype.constructor=Ka,es.__deps=[Qa,Ja,ts,On],rs.__deps=[is],is.__deps=[fa,da,ma,la],os.__deps=[$n,xa,_a,va,ya,wa,Sa,fa,Aa,ja,Va,Ha,$a,Wa];var ey=function(t,e,r){this.name=t||"",this.path=e||"",this.info={},this.center=new g,this.boundingBox=new st,r instanceof wt||r instanceof Ct||r instanceof Ne?this.fromGeometry(r):r&&(this.set(r.position,r.index,r.normal,r.color,r.atomindex,r.contour),this.boundingBox.setFromArray(r.position),this.boundingBox.getCenter(this.center))},ry={type:{}};ry.type.get=function(){return"Surface"},ey.prototype.set=function(t,e,r,i,n,o){this.position=t,this.index=e,this.normal=r,this.color=i,this.atomindex=n,this.size=t.length/3,this.contour=o},ey.prototype.fromGeometry=function(e){t.Debug&&jf.time("GeometrySurface.fromGeometry");var r;e instanceof wt?(e.computeVertexNormals(!0),r=(new Ct).fromGeometry(e)):r=e instanceof Ct?e:e[0],r.boundingBox||r.computeBoundingBox(),this.boundingBox.copy(r.boundingBox),this.boundingBox.getCenter(this.center);var i,n,o;if(r instanceof Ct){var a=r.attributes,s=!!a.normal&&a.normal.array;(!s||0===s[0]&&0===s[1]&&0===s[2])&&r.computeVertexNormals(),i=a.position.array,n=a.index?a.index.array:null,o=a.normal.array}this.set(i,n,o,void 0,void 0),t.Debug&&jf.timeEnd("GeometrySurface.setGeometry")},ey.prototype.getPosition=function(){return this.position},ey.prototype.getColor=function(t){var e=t||{};e.surface=this;var r=this.size,i=new Float32Array(3*r),n=Hf.getScheme(e);if(n.volumeColor||"random"===e.scheme)for(var o=0;o=t&&f<=e||r&&(fe)){var m=3*l;u[l]=f,h[m+0]=n[d+0],h[m+1]=n[d+1],h[m+2]=n[d+2],o&&(c[l]=o[p]),l+=1}}this.data=new Float32Array(this._dataBuffer,0,l),this.position=new Float32Array(this._positionBuffer,0,3*l),o&&(this.atomindex=new Float32Array(this._atomindexBuffer,0,l))}this._filterHash=a}},Object.defineProperties(oy.prototype,ay),oy.prototype.getValueForSigma=iy.prototype.getValueForSigma,oy.prototype.getSigmaForValue=iy.prototype.getSigmaForValue,oy.prototype.getDataAtomindex=iy.prototype.getDataAtomindex,oy.prototype.getDataPosition=iy.prototype.getDataPosition,oy.prototype.getDataColor=iy.prototype.getDataColor,oy.prototype.getDataPicking=iy.prototype.getDataPicking,oy.prototype.getDataSize=iy.prototype.getDataSize;var sy=function(e,r){t.Debug&&jf.time("BondHash init");for(var i=e.count,n=e.atomIndex1,o=e.atomIndex2,a=new Uint8Array(r),s=new Int32Array(r),c=0;ca?s.set(e[n].subarray(0,a)):s.set(e[n]),e[n]=s}},cy.prototype.growIfFull=function(){if(this.count>=this.length){var t=Math.round(1.5*this.length);this.resize(Math.max(256,t))}},cy.prototype.copyFrom=function(t,e,r,i){for(var n=this,o=0,a=this._fields.length;o0;)s-=1;a<=s&&(a===o?o=s:s===o&&(o=a),e(a,s),a+=1,s-=1)}while(a<=s);r(i,s),r(a,n)}}jf.time("Store.sort");var i=this,n=new this.constructor(1);r(0,this.count-1),jf.timeEnd("Store.sort")},cy.prototype.clear=function(){this.count=0},cy.prototype.dispose=function(){var t=this;delete this.length,delete this.count;for(var e=0,r=this._fields.length;e0&&(l[r]=M.angleTo(E)),t=Math.cos(x.angleTo(_)),f[r]=180/Math.PI*Math.acos(t),i=x.length(),n=_.length(),p[r]=Math.sqrt(n*i)/Math.max(2,2*(1-t)),d[r]=Math.abs(y.dot(M)),w.copy(x).multiplyScalar(p[r]/i),S.copy(_).multiplyScalar(p[r]/n),w.subVectors(R,w),S.subVectors(L,S),w.toArray(u,e+3),S.toArray(u,e+6),T.subVectors(I,P),T.toArray(m,e),E.copy(M),P.copy(w);for(w.fromArray(u,3),S.fromArray(u,6),M.subVectors(w,S).normalize(),I.index=o.getAtomIndexByType(0,C),P.copy(I),A.copy(I),sa(A,M,w),A.toArray(u,0),T.subVectors(P,w),T.toArray(m,0),w.fromArray(u,3*s-6),S.fromArray(u,3*s-9),M.subVectors(w,S).normalize(),I.index=o.getAtomIndexByType(s-1,C),P.copy(I),A.copy(I),sa(A,M,w),A.toArray(u,3*s-3),r=s-3;re?F=!0:h.bending[B]>t&&(F=!0)),F){if(B-v<4){v=B,F=!1;continue}D.index=L.traceAtomIndex,P=h.axis.subarray(3*v+3,3*B),C=h.center.subarray(3*v,3*B+3),p=aa(P).normalize(),d=aa(C),I.fromArray(C),sa(I,p,d),R.fromArray(C,C.length-3),sa(R,p,d),p.subVectors(R,I),p.toArray(b,y),d.toArray(x,y),I.toArray(_,y),R.toArray(w,y),f.atomColorToArray(D,S,y),A.push(D.index),M.push(m.atomRadius(D)),E.push(u+v),T.push(u+B+1-v),y+=3,v=B,F=!1}var z=new Float32Array(A);return{axis:new Float32Array(b),center:new Float32Array(x),begin:new Float32Array(_),end:new Float32Array(w),color:new Float32Array(S),picking:new tv(z,s),size:new Float32Array(M),residueOffset:E,residueCount:T}}},us.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},peek:function(){return this.content[0]},remove:function(t){for(var e=this,r=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=e.content[i];if(!(e.scoreFunction(r)":"3/4-Z","?":"X-Y","@":"Y-X",A:"Z+1/3",B:"Z+2/3",C:"X+2/3",D:"Y+1/3",E:"-Y+2/3",F:"X-Y+1/3",G:"Y-X+2/3",H:"-X+1/3",I:"X+1/3",J:"Y+2/3",K:"-Y+1/3",L:"X-Y+2/3",M:"Y-X+1/3",N:"-X+2/3",O:"2/3+X",P:"1/3+Y",Q:"1/3+Z",R:"2/3-Y",S:"1/3+X-Y",T:"2/3+Y-X",U:"1/3-X",V:"2/3-X",W:"1/3-Y",X:"1/3-Z",Y:"2/3+Y",Z:"1/3+Y-X","[":"2/3+X-Y","]":"1/3+X","^":"2/3+Z",_:"2/3-Z","`":"5/6+Z",a:"1/6+Z",b:"5/6-Z",c:"1/6-Z",d:"Z+5/6",e:"Z+1/6",f:"Z+1/4",g:"+Y"},my={"P 1":" !#","P -1":" !#$%&","P 1 2 1":" !#$!&","P 1 21 1":" !#$'&","C 1 2 1":" !#$!&()#*)&","P 1 m 1":" !# %#","P 1 c 1":" !# %+","C 1 m 1":" !# %#()#(,#","C 1 c 1":" !# %+()#(,+","P 1 2/m 1":" !# %#$!&$%&","P 1 21/m 1":" !#$)&$%& ,#","C 1 2/m 1":" !# %#$!&$%&()#(,#*)&*,&","P 1 2/c 1":" !#$!-$%& %+","P 1 21/c 1":" !#$%&$)- ,+","C 1 2/c 1":" !#$!-$%& %+()#*)-*,&(,+","P 2 2 2":" !#$%#$!& %&","P 2 2 21":" !#$%+$!- %&","P 21 21 2":" !#$%#*)&(,&","P 21 21 21":" !#*%+$)-(,&","C 2 2 21":" !#$%+$!- %&()#*,+*)-(,&","C 2 2 2":" !#$%#$!& %&()#*,#*)&(,&","F 2 2 2":" !#$%#$!& %& )+$,+$)- ,-(!+*%+*!-(%-()#*,#*)&(,&","I 2 2 2":" !#$%# %&$!&.'/01/.120'2","I 21 21 21":" !#*%+$)-(,&()+$,#*!& %-","P m m 2":" !#$%# %#$!#","P m c 21":" !#$%+ %+$!#","P c c 2":" !#$%# %+$!+","P m a 2":" !#$%#(%#*!#","P c a 21":" !#$%+(%#*!+","P n c 2":" !#$%# ,+$)+","P m n 21":" !#*%+(%+$!#","P b a 2":" !#$%#(,#*)#","P n a 21":" !#$%+(,#*)+","P n n 2":" !#$%#(,+*)+","C m m 2":" !#$%# %#$!#()#*,#(,#*)#","C m c 21":" !#$%+ %+$!#()#*,+(,+*)#","C c c 2":" !#$%# %+$!+()#*,#(,+*)+","A m m 2":" !#$%# %#$!# )+$,+ ,+$)+","A b m 2":" !#$%# ,#$)# )+$,+ %+$!+","A m a 2":" !#$%#(%#*!# )+$,+(,+*)+","A b a 2":" !#$%#(,#*)# )+$,+(%+*!+","F m m 2":" !#$%# %#$!# )+$,+ ,+$)+(!+*%+(%+*!+()#*,#(,#*)#","F d d 2":" !#$%#345675 )+$,+3896:9(!+*%+;49<79()#*,#;85<:5","I m m 2":" !#$%# %#$!#()+*,+(,+*)+","I b a 2":" !#$%#(,#*)#()+*,+ %+$!+","I m a 2":" !#$%#(%#*!#()+*,+ ,+$)+","P 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#","P 2/n 2/n 2/n":" !#$%#$!& %&*,-()-(,+*)+","P 2/c 2/c 2/m":" !#$%#$!- %-$%& !& %+$!+","P 2/b 2/a 2/n":" !#$%#$!& %&*,&()&(,#*)#","P 21/m 2/m 2/a":" !#*%#$!&(%&$%&(!& %#*!#","P 2/n 21/n 2/a":" !#*%#*)- ,-$%&(!&(,+$)+","P 2/m 2/n 21/a":" !#*%+*!- %&$%&(!-(%+$!#","P 21/c 2/c 2/a":" !#*%#$!-(%-$%&(!& %+*!+","P 21/b 21/a 2/m":" !#$%#*)&(,&$%& !&(,#*)#","P 21/c 21/c 2/n":" !#*,#$)-(%-$%&()& ,+*!+","P 2/b 21/c 21/m":" !#$%+$)- ,&$%& !- ,+$)#","P 21/n 21/n 2/m":" !#$%#*)-(,-$%& !&(,+*)+","P 21/m 21/m 2/n":" !#$%#*'&.,&*,&.'& %#$!#","P 21/b 2/c 21/n":" !#*,+$!-(,&$%&()- %+*)#","P 21/b 21/c 21/a":" !#*%+$)-(,&$%&(!- ,+*)#","P 21/n 21/m 21/a":" !#0%/$'&.12$%&.!2 1#0'/","C 2/m 2/c 21/m":" !#$%+$!- %&$%& !- %+$!#()#*,+*)-(,&*,&()-(,+*)#","C 2/m 2/c 21/a":" !#$,+$)- %&$%& )- ,+$!#()#*%+*!-(,&*,&(!-(%+*)#","C 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#()#*,#*)&(,&*,&()&(,#*)#","C 2/c 2/c 2/m":" !#$%#$!- %-$%& !& %+$!+()#*,#*)-(,-*,&()&(,+*)+","C 2/m 2/m 2/a":" !#$,#$)& %&$%& )& ,#$!#()#*%#*!&(,&*,&(!&(%#*)#","C 2/c 2/c 2/a":" !#*,#$!&(,&$,-(!- ,+*!+()#$%#*)& %&*%- )-(%+$)+","F 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!# )+$,+$)- ,-$,- )- ,+$)+(!+*%+*!-(%-*%-(!-(%+*!+()#*,#*)&(,&*,&()&(,#*)#","F 2/d 2/d 2/d":" !#$%#$!& %&64=37=345675 )+$,+$)- ,-68>3:>3896:9(!+*%+*!-(%-<4>;7>;49<79()#*,#*)&(,&<8=;:=;85<:5","I 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#()+*,+*)-(,-*,-()-(,+*)+","I 2/b 2/a 2/m":" !#$%#*)&(,&$%& !&(,#*)#()+*,+$!- %-*,-()- %+$!+","I 21/b 21/c 21/a":" !#*%+$)-(,&$%&(!- ,+*)#()+$,#*!& %-*,- )&(%#$!+","I 21/m 21/m 21/a":" !#$,#$)& %&$%& )& ,#$!#()+*%+*!-(,-*,-(!-(%+*)+","P 4":" !#$%#% #!$#","P 41":" !#$%+% 5!$9","P 42":" !#$%#% +!$+","P 43":" !#$%+% 9!$5","I 4":" !#$%#% #!$#()+*,+,(+)*+","I 41":" !#*,+%(5)$9()+$%#, 9!*5","P -4":" !#$%#!$&% &","I -4":" !#$%#!$&% &()+*,+)*-,(-","P 4/m":" !#$%#% #!$#$%& !&!$&% &","P 42/m":" !#$%#% +!$+$%& !&!$-% -","P 4/n":" !#$%#,(#)*#*,&()&!$&% &","P 42/n":" !#$%#,(+)*+*,-()-!$&% &","I 4/m":" !#$%#% #!$#$%& !&!$&% &()+*,+,(+)*+*,-()-)*-,(-","I 41/a":" !#*,+%(5)$9$,=(!>!$&,(-()+$%#, 9!*5*%> )=)*-% &","P 4 2 2":" !#$%#% #!$#$!& %&! &%$&","P 4 21 2":" !#$%#,(#)*#*)&(,&! &%$&","P 41 2 2":" !#$%+% 5!$9$!& %-! >%$=","P 41 21 2":" !#$%+,(5)*9*)=(,>! &%$-","P 42 2 2":" !#$%#% +!$+$!& %&! -%$-","P 42 21 2":" !#$%#,(+)*+*)-(,-! &%$&","P 43 2 2":" !#$%+% 9!$5$!& %-! =%$>","P 43 21 2":" !#$%+,(9)*5*)>(,=! &%$-","I 4 2 2":" !#$%#% #!$#$!& %&! &%$&()+*,+,(+)*+*)-(,-)(-,*-","I 41 2 2":" !#*,+%(5)$9*!> ,=)(-%$&()+$%#, 9!*5$)=(%>! &,*-","P 4 m m":" !#$%#% #!$# %#$!#%$#! #","P 4 b m":" !#$%#% #!$#(,#*)#,*#)(#","P 42 c m":" !#$%#% +!$+ %+$!+%$#! #","P 42 n m":" !#$%#,(+)*+(,+*)+%$#! #","P 4 c c":" !#$%#% #!$# %+$!+%$+! +","P 4 n c":" !#$%#% #!$#(,+*)+,*+)(+","P 42 m c":" !#$%#% +!$+ %#$!#%$+! +","P 42 b c":" !#$%#% +!$+(,#*)#,*+)(+","I 4 m m":" !#$%#% #!$# %#$!#%$#! #()+*,+,(+)*+(,+*)+,*+)(+","I 4 c m":" !#$%#% #!$# %+$!+%$+! +()+*,+,(+)*+(,#*)#,*#)(#","I 41 m d":" !#*,+%(5)$9 %#*)+%*5) 9()+$%#, 9!*5(,+$!#,$9!(5","I 41 c d":" !#*,+%(5)$9 %+*)#%*9) 5()+$%#, 9!*5(,#$!+,$5!(9","P -4 2 m":" !#$%#% &!$&$!& %&%$#! #","P -4 2 c":" !#$%#% &!$&$!- %-%$+! +","P -4 21 m":" !#$%#% &!$&*)&(,&,*#)(#","P -4 21 c":" !#$%#% &!$&*)-(,-,*+)(+","P -4 m 2":" !#$%#!$&% & %#$!#! &%$&","P -4 c 2":" !#$%#% &!$& %+$!+! -%$-","P -4 b 2":" !#$%#% &!$&(,#*)#)(&,*&","P -4 n 2":" !#$%#% &!$&(,+*)+)(-,*-","I -4 m 2":" !#$%#% &!$& %#$!#! &%$&()+*,+,(-)*-(,+*)+)(-,*-","I -4 c 2":" !#$%#% &!$& %+$!+! -%$-()+*,+,(-)*-(,#*)#)(&,*&","I -4 2 m":" !#$%#% &!$&$!& %&%$#! #()+*,+,(-)*-*)-(,-,*+)(+","I -4 2 d":" !#$%#% &!$&*!>(%>,$9) 9()+*,+,(-)*-$)= ,=%*5!(5","P 4/m 2/m 2/m":" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #","P 4/m 2/c 2/c":" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +","P 4/n 2/b 2/m":" !#$%#% #!$#$!& %&! &%$&*,&()&)*&,(&(,#*)#,*#)(#","P 4/n 2/n 2/c":" !#$%#% #!$#$!& %&! &%$&*,-()-)*-,(-(,+*)+,*+)(+","P 4/m 21/b 2/m":" !#$%#% #!$#*)&(,&)(&,*&$%& !&!$&% &(,#*)#,*#)(#","P 4/m 21/n 2/c":" !#$%#% #!$#*)-(,-)(-,*-$%& !&!$&% &(,+*)+,*+)(+","P 4/n 21/m 2/m":" !#$%#,(#)*#*)&(,&! &%$&*,&()&!$&% & %#$!#,*#)(#","P 4/n 2/c 2/c":" !#$%#,(#)*#*)-(,-! -%$-*,&()&!$&% & %+$!+,*+)(+","P 42/m 2/m 2/c":" !#$%#% +!$+$!& %&! -%$-$%& !&!$-% - %#$!#%$+! +","P 42/m 2/c 2/m":" !#$%#% +!$+$!- %-! &%$&$%& !&!$-% - %+$!+%$#! #","P 42/n 2/b 2/c":" !#$%#,(+)*+$!- %-)(&,*&*,-()-!$&% &(,#*)#%$+! +","P 42/n 2/n 2/m":" !#$%#,(+)*+$!& %&)(-,*-*,-()-!$&% &(,+*)+%$#! #","P 42/m 21/b 2/c":" !#$%#% +!$+*)&(,&)(-,*-$%& !&!$-% -(,#*)#,*+)(+","P 42/m 21/n 2/m":" !#$%#,./'*/*'-.,-! &%$&$%& !&'*-,.-.,/*'/%$#! #","P 42/n 21/m 2/c":" !#$%#,(+)*+*)-(,-! &%$&*,-()-!$&% & %#$!#,*+)(+","P 42/n 21/c 2/m":" !#$%#,(+)*+*)&(,&! -%$-*,-()-!$&% & %+$!+,*#)(#","I 4/m 2/m 2/m":" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #()+*,+,(+)*+*)-(,-)(-,*-*,-()-)*-,(-(,+*)+,*+)(+","I 4/m 2/c 2/m":" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +()+*,+,(+)*+*)&(,&)(&,*&*,-()-)*-,(-(,#*)#,*#)(#","I 41/a 2/m 2/d":" !#*,+%(5)$9*!> ,=)(-%$&$,=(!>!$&,(-(,+$!#,$9!(5()+$%#, 9!*5$)=(%>! &,*-*%> )=)*-% & %#*)+%*5) 9","I 41/a 2/c 2/d":" !#*,+%(5)$9*!= ,>)(&%$-$,=(!>!$&,(-(,#$!+,$5!(9()+$%#, 9!*5$)>(%=! -,*&*%> )=)*-% & %+*)#%*9) 5","P 3":" !#%?#@$#","P 31":" !#%?A@$B","P 32":" !#%?B@$A","H 3":" !#%?#@$#CDAEFAGHAIJBKLBMNB","R 3":" !## !!# ","P -3":" !#%?#@$#$%&!@&? &","H -3":" !#%?#@$#$%&!@&? &OPQRSQTUQVWXYZX[]X]Y^W[^ZV^UR_PT_SO_","R -3":" !## !!# $%&&$%%&$","P 3 1 2":" !#%?#@$#%$&@!& ?&","P 3 2 1":" !#%?#@$#! &?%&$@&","P 31 1 2":" !#%?Q@$^%$_@!X ?&","P 31 2 1":" !#%?A@$B! &?%_$@X","P 32 1 2":" !#%?^@$Q%$X@!_ ?&","P 32 2 1":" !#%?B@$A! &?%X$@_","H 3 2":" !#%?#@$#! &?%&$@&OPQRSQTUQY]X[WXVZX]Y^W[^ZV^PO_SR_UT_","R 3 2":" !## !!# %$&$&%&%$","P 3 m 1":" !#%?#@$#%$#@!# ?#","P 3 1 m":" !#%?#@$#! #?%#$@#","P 3 c 1":" !#%?#@$#%$+@!+ ?+","P 3 1 c":" !#%?#@$#! +?%+$@+","H 3 m":" !#%?#@$#%$#@!# ?#OPQRSQTUQRUQTPQOSQ]Y^W[^ZV^WV^ZY^][^","R 3 m":" !## !!# ! # #!#! ","H 3 c":" !#%?#@$#%$+@!+ ?+OPQRSQTUQRU`TP`OS`]Y^W[^ZV^WVaZYa][a","R 3 c":" !## !!# '././'/'.","P -3 1 2/m":" !#%?#@$#%$&@!& ?&$%&!@&? &! #?%#$@#","P -3 1 2/c":" !#%?#@$#%$-@!- ?-$%&!@&? &! +?%+$@+","P -3 2/m 1":" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#","P -3 2/c 1":" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+","H -3 2/m":" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#OPQRSQTUQY]X[WXVZXVWXYZX[]XRUQTPQOSQ]Y^W[^ZV^PO_SR_UT_UR_PT_SO_WV^ZY^][^","R -3 2/m":" !## !!# %$&$&%&%$$%&&$%%&$! # #!#! ","H -3 2/c":" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+OPQRSQTUQY]b[WbVZbVWXYZX[]XRU`TP`OS`]Y^W[^ZV^POcSRcUTcUR_PT_SO_WVaZYa][a","R -3 2/c":" !## !!# 102021210$%&&$%%&$'././'/'.","P 6":" !#%?#@$#$%#!@#? #","P 61":" !#%?A@$B$%/!@d? e","P 65":" !#%?B@$A$%/!@e? d","P 62":" !#%?^@$Q$%#!@^? Q","P 64":" !#%?Q@$^$%#!@Q? ^","P 63":" !#%?#@$#$%+!@+? +","P -6":" !#%?#@$# !&%?&@$&","P 6/m":" !#%?#@$#$%#!@#? #$%&!@&? & !&%?&@$&","P 63/m":" !#%?#@$#$%+!@+? +$%&!@&? & !-%?-@$-","P 6 2 2":" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&","P 61 2 2":" !#%?Q@$^$%+!@`? a! X?%&$@_%$b@!- ?c","P 65 2 2":" !#%?^@$Q$%+!@a? `! _?%&$@X%$c@!- ?b","P 62 2 2":" !#%?^@$Q$%#!@^? Q! _?%&$@X%$_@!& ?X","P 64 2 2":" !#%?Q@$^$%#!@Q? ^! X?%&$@_%$X@!& ?_","P 63 2 2":" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-","P 6 m m":" !#%?#@$#$%#!@#? #%$#@!# ?#! #?%#$@#","P 6 c c":" !#%?#@$#$%#!@#? #%$+@!+ ?+! +?%+$@+","P 63 c m":" !#%?#@$#$%+!@+? +%$+@!+ ?+! #?%#$@#","P 63 m c":" !#%?#@$#$%+!@+? +%$#@!# ?#! +?%+$@+","P -6 m 2":" !#%?#@$# !&%?&@$&%$#@!# ?#%$&@!& ?&","P -6 c 2":" !#%?#@$# !-%?-@$-%$+@!+ ?+%$&@!& ?&","P -6 2 m":" !#%?#@$# !&%?&@$&! &?%&$@&! #?%#$@#","P -6 2 c":" !#%?#@$# !-%?-@$-! &?%&$@&! +?%+$@+","P 6/m 2/m 2/m":" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&$%&!@&? & !&@$&%?&%$#@!# ?#! #?%#$@#","P 6/m 2/c 2/c":" !#%?#@$#$%#!@#? #! -?%-$@-%$-@!- ?-$%&!@&? & !&@$&%?&%$+@!+ ?+! +?%+$@+","P 63/m 2/c 2/m":" !#%?#@$#$%+!@+? +! -?%-$@-%$&@!& ?&$%&!@&? & !-@$-%?-%$+@!+ ?+! #?%#$@#","P 63/m 2/m 2/c":" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-$%&!@&? & !-@$-%?-%$#@!# ?#! +?%+$@+","P 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ","F 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ","I 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(","P 21 3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(","I 21 3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- ","P 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$","P 2/n -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& *,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*","F 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-($,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(*%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- *,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$","F 2/d -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& 64=37=345675=64=375345674=67=3453756 )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(68>3:>3896:9=<8=;:5;85<:4><7>;49;79<(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(<4>;7>;49<79>68>3:93896:8=<:=;85;:5<()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- <8=;:=;8f<:f><4>;79;49<78>6:>3893:96","I 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*","P 21/a -3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*","I 21/a -3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*()+$,#*g& %-+()#$,&*!- %)+(,#$!&*%- *,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$","P 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$","P 42 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*","F 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(-%*-!*+%(+ +,$+)$-, -)#)*#,(&)(&,*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() -,$-)$+, +(#,*#)*&,(&)+!*+%(-!(-%*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(&,*&)*#,(#(+%*+!*-%(-!+)$+, -) -,$","F 41 3 2":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46 )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<(!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86","I 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*","P 43 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7;>46=:<5839398<5:6=4;>75:<983>7;=46","P 41 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<","I 41 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46","P -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% ","F -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(+%*+!*-%(- +)$+,$-) -,#)(#,*&)*&,((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() +,$+)$-, -(#)*#,*&)(&,+!(+%*-!*-%(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(#,*#)*&,(&(+!*+%*-!(-%+) +,$-)$-, ","I -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(","P -4 3 n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(","F -4 3 c":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,( )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-() #,$#)$&, &(#!*#%*&!(&%+! +%$-!$-% (!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(!(#%*#!*&%(& +!$+%$-! -%#) #,$&)$&, ()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ! +%$+!$-% - #)$#,$&) &,#!(#%*&!*&%(","I -4 3 d":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7354<9:6>8;=357<946>:;=857394<>:6=8;()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- :;98657<=43>;9:658<=73>49:;586=7<>43","P 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ","P 4/n -3 2/n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","P 42/m -3 2/n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","P 42/n -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ","F 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(-%*-!*+%(+ +,$+)$-, -)#)*#,(&)(&,*$,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*%*+!(+%(-!*-$-) -, +)$+,&,(&)*#,*#)((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() -,$-)$+, +(#,*#)*&,(&)+!*+%(-!(-%**%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*,$+) +, -)$-*&)(&,(#)*#,-%(-!*+%*+!(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(&,*&)*#,(#(+%*+!*-%(-!+)$+, -) -,$*,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$,*#)(#,(&)*&*-!(-%(+!*+%-, -)$+,$+) ","F 4/m -3 2/c":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)( )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-() &,$&)$#, #(#%*#!*&%(&!+!$+% -! -%$$,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*,$#) #, &)$&*&!(&%(#!*#%-% -!$+%$+! (!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(!(&%*&!*#%(# +%$+!$-% -!#)$#, &) &,$*%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*%*#!(#%(&!*&$-! -% +!$+%&, &)$#,$#) ()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ! -%$-!$+% + #,$#)$&, &)#!*#%(&!(&%**,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$%$+! +% -!$-$&) &, #)$#,&%(&!*#%*#!(","F 41/d -3 2/m":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=4664=3:>;85<79=64>3:5;89<74=6:>385;79<,$+! #%(-)*&*&)(-% #!$+,-%(&)*+,$#! )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<68>37=;49<:5=<8>;753496:4><:=;893756,*#!(+% &)$-*-!(&, +)$#%-, &!$+%*#)((!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<<4>;:=389675>68=379;45<:8=<7>;453:96%$#) +,(&!*-$&! -,(#)*+%&% -)$#,*+!(()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86<8=;7>3456:9><4=;:9385678>67=349;:5<%*+)(#, -!$&$-) &%(+!*#,&,(-!*#%$+) ","F 41/d -3 2/c":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46<8>;7=3496:5><8=;793456:8><7=;493:56%*#)(+, &!$-$-! &,(+)*#%&, -!$#%*+)( )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<<4=;:>385679>64=3:9;85<78=67>345;:9<%$+) #,(-!*&$&) -%(#!*+,&%(-)*#,$+! (!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<68=37>;45<:9=<4>;:5389674>6:=389;75<,*+!(#% -)$&*-)(&% +!$#,-,(&!*+%$#) ()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>8664>3:=;89<75=68>375;49<:4=<:>;853796,$#! +%(&)*-*&!(-, #)$+%-% &)$+,*#!(","I 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","I 41/a -3 2/d":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<$%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*4<97358;=:6>6>:;=8357<94=8;>:694<573()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46*,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$865:;943>7<=<=73>4;9:658>43=7<5869:;","P 1 1 2":" !#$%#","P 1 1 21":" !#$%+","B 1 1 2":" !#$%#(g+*%+","A 1 2 1":" !#$!& )+$)-","C 1 21 1":" !#$)&()#*!&","I 1 2 1":" !#$!&.'/0'2","I 1 21 1":" !#$)&.'/0!-","P 1 1 m":" !# !&","P 1 1 b":" !# )&","B 1 1 m":" !# !&(!+(!-","B 1 1 b":" !# )&(!+()-","P 1 1 2/m":" !# !&$%#$%&","P 1 1 21/m":" !#$%+$%& !-","B 1 1 2/m":" !# !&$%#$%&(!+(!-*%+*%-","P 1 1 2/b":" !#$,#$%& )&","P 1 1 21/b":" !#$%&$,+ )-","B 1 1 2/b":" !#$,#$%& )&(!+*,+*%-()-","P 21 2 2":" !#$!&(%&*%#","P 2 21 2":" !# ,&$)&$%#","P 21 21 2 (a)":" !#*,#.%&$'&","P 21 2 21":" !#$!&(%-*%+","P 2 21 21":" !# %&$)-$,+","C 2 2 21a)":" !#*%+(,&$)-()#$,+ %&*!-","C 2 2 2a":" !#*,#.%&$'&()#$%# ,&*!&","F 2 2 2a":" !#*,#.%&$'& '/*%/.12$!2.!/$,/ %20'2.'#$%# 1&0!&","I 2 2 2a":" !#*,#.%&$'&()+$%+*!- ,-","P 21/m 21/m 2/n a":" !#*,#$)&(%&$%&.'& ,#*!#","P 42 21 2a":" !#*,#%.+'$+$'&.%&! -,*-","I 2 3a":" !#*,#.%&$'&!# ,- '&$%/$# !-*!/$%&.%()+$%+ ,-*!-)+(%&(!-*,#*+()&$)#*,- ,"},gy=function(t){this.name=t||"",this.partList=[]},vy={type:{}};vy.type.get=function(){return"Assembly"},gy.prototype.addPart=function(t,e){var r=new yy(t,e);return this.partList.push(r),r},gy.prototype._getCount=function(t,e){var r=0;return this.partList.forEach(function(i){r+=i[e](t)}),r},gy.prototype.getAtomCount=function(t){return this._getCount(t,"getAtomCount")},gy.prototype.getResidueCount=function(t){return this._getCount(t,"getResidueCount")},gy.prototype.getInstanceCount=function(){var t=0;return this.partList.forEach(function(e){t+=e.matrixList.length}),t},gy.prototype.isIdentity=function(t){if(1!==this.partList.length)return!1;var e=this.partList[0];if(1!==e.matrixList.length)return!1;if(!(new v).equals(e.matrixList[0]))return!1;var r=[];return t.eachChain(function(t){r.push(t.chainname)}),r=Cn(r),e.chainList.length===r.length},gy.prototype.getBoundingBox=function(t){var e=new st;return this.partList.forEach(function(r){var i=r.getBoundingBox(t);e.expandByPoint(i.min),e.expandByPoint(i.max)}),e},gy.prototype.getCenter=function(t){return this.getBoundingBox(t).getCenter()},gy.prototype.getSelection=function(){var t=[];return this.partList.forEach(function(e){t=t.concat(e.chainList)}),ds(t)},Object.defineProperties(gy.prototype,vy);var yy=function(t,e){this.matrixList=t||[],this.chainList=e||[]},by={type:{}};by.type.get=function(){return"AssemblyPart"},yy.prototype._getCount=function(t,e){var r=0,i=this.chainList;return t.eachChain(function(t){(0===i.length||i.includes(t.chainname))&&(r+=t[e])}),this.matrixList.length*r},yy.prototype.getAtomCount=function(t){return this._getCount(t,"atomCount")},yy.prototype.getResidueCount=function(t){return this._getCount(t,"residueCount")},yy.prototype.getBoundingBox=function(t){var e=new st,r=new st,i=this.getSelection(),n=t.getBoundingBox(i);return this.matrixList.forEach(function(t){r.copy(n).applyMatrix4(t),e.expandByPoint(r.min),e.expandByPoint(r.max)}),e},yy.prototype.getSelection=function(){return ds(this.chainList)},yy.prototype.getView=function(t){var e=this.getSelection();return e?t.getView(e):t},yy.prototype.getInstanceList=function(){for(var t=this,e=[],r=0,i=this.matrixList.length;r=t.residueCount)){a.index=o+h,s.index=o+h+l,c.index=a.traceAtomIndex,u.index=s.traceAtomIndex;var p=c.distanceTo(u);if(Math.abs(p-r[l-2])>i)return!1}return!0},r=function(t,r){return e(t,r,[5.45,5.18,6.37],2.1)},i=function(t,r){return e(t,r,[6.1,10.4,13],1.42)},n=function(t){for(var e=t.residueStore,n=t.residueIndexStart,o=0,a=t.residueCount;o1&&i.bending[a]<20&&(e.sstruc[r+a]="h".charCodeAt(0),e.sstruc[r+a+1]="h".charCodeAt(0))}};return function(e){t.Debug&&jf.time("calculateSecondaryStructure"),e.eachPolymer(function(t){if(!(t.residueCount<4)){if(t.isCg())o(t);else{if(!t.isProtein())return;n(t)}var e,r=0;t.eachResidue(function(t){t.sstruc===e?r+=1:(1===r&&(t.index-=1,t.sstruc="c"),r=1,e=t.sstruc)})}}),t.Debug&&jf.timeEnd("calculateSecondaryStructure")}}(),_y="ABCDEFGHIJKLMNOPQRSTUVWXYZ",wy=["H","C","O","N","S","P"],Sy=["NA","CL","FE"],Ay=function(t,e,r){this.structure=t,r=r||Ss(e),this.atomname=e,this.element=r,this.vdw=Nv[r],this.covalent=kv[r]},My=function(t){this.structure=t,this.dict={},this.list=[]};My.prototype.add=function(t,e){var r=Ms(t=t.toUpperCase(),e=e?e.toUpperCase():Ss(t)),i=this.dict[r];if(void 0===i){var n=new Ay(this.structure,t,e);i=this.list.length,this.dict[r]=i,this.list.push(n)}return i},My.prototype.get=function(t){return this.list[t]};var Ey=function(t,e,r,i,n,o){this.structure=t,this.resname=e,this.atomTypeIdList=r,this.hetero=i?1:0,this.chemCompType=n,this.bonds=o,this.rings=void 0,this.atomCount=r.length,this.moleculeType=this.getMoleculeType(),this.backboneType=this.getBackboneType(0),this.backboneEndType=this.getBackboneType(-1),this.backboneStartType=this.getBackboneType(1),this.backboneIndexList=this.getBackboneIndexList();var a=Yv[this.backboneType],s=Yv[this.backboneStartType],c=Yv[this.backboneEndType],u=this.getAtomIndexByName(a.trace);this.traceAtomIndex=void 0!==u?u:-1;var h=this.getAtomIndexByName(a.direction1);this.direction1AtomIndex=void 0!==h?h:-1;var l=this.getAtomIndexByName(a.direction2);this.direction2AtomIndex=void 0!==l?l:-1;var p=this.getAtomIndexByName(s.backboneStart);this.backboneStartAtomIndex=void 0!==p?p:-1;var d=this.getAtomIndexByName(c.backboneEnd);this.backboneEndAtomIndex=void 0!==d?d:-1;var f;f=Vv.includes(e)?this.getAtomIndexByName("N1"):this.getAtomIndexByName("N3"),this.rungEndAtomIndex=void 0!==f?f:-1,this.bondReferenceAtomIndices=[]};Ey.prototype.getBackboneIndexList=function(){var t,e=[];switch(this.moleculeType){case 3:t=Xv;break;case 4:case 5:t=qv;break;default:return e}for(var r=this.structure.atomMap,i=this.atomTypeIdList,n=0,o=this.atomCount;n=2?t(l,e[l],a):r[l]=2;else if(1===r[l]&&c&&c!==l){var p=[l];i[l]=1,n.push(p);for(var d=o.length-1;d>=0;--d){var f=o[d];if(f===l)break;p.push(f),i[f]=1}}}r[a]=2,o.pop()}for(var e=this.getBondGraph(),r=new Int8Array(this.atomCount),i=new Int8Array(this.atomCount),n=[],o=[],a=0;a1)for(var y=0;y1)for(var x=0;x0){var e=this.residueStore.atomOffset[this.residueIndex];return t.includes(this.index-e)}return!1},Iy.prototype.isPolymer=function(){if(this.structure.entityList.length>0)return this.entity.isPolymer();var t=this.residueType.moleculeType;return 3===t||4===t||5===t},Iy.prototype.isSidechain=function(){return this.isPolymer()&&!this.isBackbone()},Iy.prototype.isCg=function(){var t=this.residueType.backboneType;return 4===t||5===t||6===t},Iy.prototype.isHetero=function(){return 1===this.residueType.hetero},Iy.prototype.isProtein=function(){return 3===this.residueType.moleculeType},Iy.prototype.isNucleic=function(){var t=this.residueType.moleculeType;return 4===t||5===t},Iy.prototype.isRna=function(){return 4===this.residueType.moleculeType},Iy.prototype.isDna=function(){return 5===this.residueType.moleculeType},Iy.prototype.isWater=function(){return 1===this.residueType.moleculeType},Iy.prototype.isIon=function(){return 2===this.residueType.moleculeType},Iy.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},Iy.prototype.isHelix=function(){return Lv.includes(this.sstruc)},Iy.prototype.isSheet=function(){return Ov.includes(this.sstruc)},Iy.prototype.isTurn=function(){return Dv.includes(this.sstruc)&&this.isProtein()},Iy.prototype.isBonded=function(){return 0!==this.bondHash.countArray[this.index]},Iy.prototype.isRing=function(){return 1===this.residueType.getRings().flags[this.index-this.residueAtomOffset]},Iy.prototype.distanceTo=function(t){var e=this.atomStore,r=t.atomStore,i=this.index,n=t.index,o=e.x[i]-r.x[n],a=e.y[i]-r.y[n],s=e.z[i]-r.z[n],c=o*o+a*a+s*s;return Math.sqrt(c)},Iy.prototype.connectedTo=function(t){var e=this.atomStore,r=t.atomStore,i=this.index,n=t.index;if(e.altloc&&r.altloc){var o=e.altloc[i],a=r.altloc[n];if(0!==o&&0!==a&&32!==o&&32!==a&&o!==a)return!1}var s=e.x[i]-r.x[n],c=e.y[i]-r.y[n],u=e.z[i]-r.z[n],h=s*s+c*c+u*u;if(h<64&&this.isCg())return!0;if(isNaN(h))return!1;var l=this.covalent+t.covalent,p=l+.3,d=l-.5;return hd*d},Iy.prototype.positionFromArray=function(t,e){return void 0===e&&(e=0),this.x=t[e+0],this.y=t[e+1],this.z=t[e+2],this},Iy.prototype.positionToArray=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var r=this.index,i=this.atomStore;return t[e+0]=i.x[r],t[e+1]=i.y[r],t[e+2]=i.z[r],t},Iy.prototype.positionToVector3=function(t){return void 0===t&&(t=new g),t.x=this.x,t.y=this.y,t.z=this.z,t},Iy.prototype.positionFromVector3=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},Iy.prototype.positionAdd=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},Iy.prototype.positionSub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},Iy.prototype.getResidueBonds=function(t){var e,r,i,n,o=this.residueAtomOffset,a=this.index-this.residueAtomOffset,s=this.residueType.getBonds(),c=s.atomIndices1,u=s.atomIndices2;for(t||(n=[]),e=c.indexOf(a);-1!==e;){if(i=u[e]+o,t)return i;n.push(i),e=c.indexOf(a,e+1)}for(r=u.indexOf(a);-1!==r;){if(i=c[r]+o,t)return i;n.push(i),r=u.indexOf(a,r+1)}return n},Iy.prototype.qualifiedName=function(t){var e="";return this.resname&&!t&&(e+="["+this.resname+"]"),void 0!==this.resno&&(e+=this.resno),this.inscode&&(e+="^"+this.inscode),this.chainname&&(e+=":"+this.chainname),this.atomname&&(e+="."+this.atomname),this.altloc&&(e+="%"+this.altloc),this.structure.modelStore.count>1&&(e+="/"+this.modelIndex),e},Iy.prototype.clone=function(){return new this.constructor(this.structure,this.index)},Iy.prototype.toObject=function(){return{index:this.index,residueIndex:this.residueIndex,atomno:this.atomno,resname:this.resname,x:this.x,y:this.y,z:this.z,element:this.element,chainname:this.chainname,resno:this.resno,serial:this.serial,vdw:this.vdw,covalent:this.covalent,hetero:this.hetero,bfactor:this.bfactor,altloc:this.altloc,atomname:this.atomname,modelindex:this.modelindex}},Object.defineProperties(Iy.prototype,Ry);var Ly=function(t,e){this.structure=t,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.atomStore=t.atomStore,this.residueMap=t.residueMap,this.atomMap=t.atomMap,this.index=e},Oy={entity:{},entityIndex:{},chain:{},chainIndex:{},atomOffset:{},atomCount:{},atomEnd:{},modelIndex:{},chainname:{},chainid:{},resno:{},sstruc:{},inscode:{},residueType:{},resname:{},hetero:{},moleculeType:{},backboneType:{},backboneStartType:{},backboneEndType:{},traceAtomIndex:{},direction1AtomIndex:{},direction2AtomIndex:{},backboneStartAtomIndex:{},backboneEndAtomIndex:{},rungEndAtomIndex:{}};Oy.entity.get=function(){return this.structure.entityList[this.entityIndex]},Oy.entityIndex.get=function(){return this.chainStore.entityIndex[this.chainIndex]},Oy.chain.get=function(){return this.structure.getChainProxy(this.chainIndex)},Oy.chainIndex.get=function(){return this.residueStore.chainIndex[this.index]},Oy.chainIndex.set=function(t){this.residueStore.chainIndex[this.index]=t},Oy.atomOffset.get=function(){return this.residueStore.atomOffset[this.index]},Oy.atomOffset.set=function(t){this.residueStore.atomOffset[this.index]=t},Oy.atomCount.get=function(){return this.residueStore.atomCount[this.index]},Oy.atomCount.set=function(t){this.residueStore.atomCount[this.index]=t},Oy.atomEnd.get=function(){return this.atomOffset+this.atomCount-1},Oy.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},Oy.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},Oy.chainid.get=function(){return this.chainStore.getChainid(this.chainIndex)},Oy.resno.get=function(){return this.residueStore.resno[this.index]},Oy.resno.set=function(t){this.residueStore.resno[this.index]=t},Oy.sstruc.get=function(){return this.residueStore.getSstruc(this.index)},Oy.sstruc.set=function(t){this.residueStore.setSstruc(this.index,t)},Oy.inscode.get=function(){return this.residueStore.getInscode(this.index)},Oy.inscode.set=function(t){this.residueStore.getInscode(this.index,t)},Oy.residueType.get=function(){return this.residueMap.get(this.residueStore.residueTypeId[this.index])},Oy.resname.get=function(){return this.residueType.resname},Oy.hetero.get=function(){return this.residueType.hetero},Oy.moleculeType.get=function(){return this.residueType.moleculeType},Oy.backboneType.get=function(){return this.residueType.backboneType},Oy.backboneStartType.get=function(){return this.residueType.backboneStartType},Oy.backboneEndType.get=function(){return this.residueType.backboneEndType},Oy.traceAtomIndex.get=function(){return this.residueType.traceAtomIndex+this.atomOffset},Oy.direction1AtomIndex.get=function(){return this.residueType.direction1AtomIndex+this.atomOffset},Oy.direction2AtomIndex.get=function(){return this.residueType.direction2AtomIndex+this.atomOffset},Oy.backboneStartAtomIndex.get=function(){return this.residueType.backboneStartAtomIndex+this.atomOffset},Oy.backboneEndAtomIndex.get=function(){return this.residueType.backboneEndAtomIndex+this.atomOffset},Oy.rungEndAtomIndex.get=function(){return this.residueType.rungEndAtomIndex+this.atomOffset},Ly.prototype.eachAtom=function(t,e){var r,i=this.atomCount,n=this.atomOffset,o=this.structure._ap,a=n+i;if(e&&e.atomOnlyTest){var s=e.atomOnlyTest;for(r=n;r0)return this.entity.isPolymer();var t=this.residueType.moleculeType;return 3===t||4===t||5===t},Ly.prototype.isHetero=function(){return 1===this.residueType.hetero},Ly.prototype.isWater=function(){return 1===this.residueType.moleculeType},Ly.prototype.isIon=function(){return 2===this.residueType.moleculeType},Ly.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},Ly.prototype.isHelix=function(){return Lv.includes(this.sstruc)},Ly.prototype.isSheet=function(){return Ov.includes(this.sstruc)},Ly.prototype.isTurn=function(){return Dv.includes(this.sstruc)&&this.isProtein()},Ly.prototype.getAtomType=function(t){return this.atomMap.get(this.atomStore.atomTypeId[t])},Ly.prototype.getResname1=function(){return zv[this.resname.toUpperCase()]||"X"},Ly.prototype.getBackboneType=function(t){switch(t){case-1:return this.residueType.backboneStartType;case 1:return this.residueType.backboneEndType;default:return this.residueType.backboneType}},Ly.prototype.getAtomIndexByName=function(t){var e=this.residueType.getAtomIndexByName(t);return void 0!==e&&(e+=this.atomOffset),e},Ly.prototype.getAtomByName=function(t){return this.residueType.getAtomByName(t)},Ly.prototype.hasAtomWithName=function(t){return this.residueType.hasAtomWithName(t)},Ly.prototype.getAtomnameList=function(){var t=this;console.warn("getAtomnameList - might be expensive");for(var e=this.atomCount,r=this.atomOffset,i=new Array(e),n=0;n=t){var r=this.structure.getResidueProxy(e);if(r.connectedTo(this))return r}else if(e===t-1){var i=this.chainStore.residueCount[this.chainIndex],n=this.structure.getResidueProxy(t+i-1);if(n.connectedTo(this))return n}},Ly.prototype.getBonds=function(){return this.residueType.getBonds(this)},Ly.prototype.getRings=function(){return this.residueType.getRings()},Ly.prototype.qualifiedName=function(t){var e="";return this.resname&&!t&&(e+="["+this.resname+"]"),void 0!==this.resno&&(e+=this.resno),this.inscode&&(e+="^"+this.inscode),this.chain&&(e+=":"+this.chainname),e+="/"+this.modelIndex},Ly.prototype.clone=function(){return new this.constructor(this.structure,this.index)},Ly.prototype.toObject=function(){return{index:this.index,chainIndex:this.chainIndex,atomOffset:this.atomOffset,atomCount:this.atomCount,resno:this.resno,resname:this.resname,sstruc:this.sstruc}},Object.defineProperties(Ly.prototype,Oy);var Dy=function(t,e,r){this.structure=t,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.atomStore=t.atomStore,this.residueIndexStart=e,this.residueIndexEnd=r,this.residueCount=r-e+1;var i=this.structure.getResidueProxy(this.residueIndexStart),n=this.structure.getResidueProxy(this.residueIndexEnd);this.isPrevConnected=void 0!==i.getPreviousConnectedResidue();var o=n.getNextConnectedResidue();this.isNextConnected=void 0!==o,this.isNextNextConnected=this.isNextConnected&&void 0!==o.getNextConnectedResidue(),this.isCyclic=n.connectedTo(i),this.__residueProxy=this.structure.getResidueProxy()},Ny={chainIndex:{},modelIndex:{},chainname:{}};Ny.chainIndex.get=function(){return this.residueStore.chainIndex[this.residueIndexStart]},Ny.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},Ny.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},Dy.prototype.isProtein=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isProtein()},Dy.prototype.isCg=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isCg()},Dy.prototype.isNucleic=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isNucleic()},Dy.prototype.getMoleculeType=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.moleculeType},Dy.prototype.getBackboneType=function(t){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.getBackboneType(t)},Dy.prototype.getAtomIndexByType=function(t,e){this.isCyclic?-1===t?t=this.residueCount-1:t===this.residueCount&&(t=0):(-1!==t||this.isPrevConnected||(t+=1),t!==this.residueCount||this.isNextNextConnected||(t-=1));var r=this.__residueProxy;r.index=this.residueIndexStart+t;var i;switch(e){case"trace":i=r.traceAtomIndex;break;case"direction1":i=r.direction1AtomIndex;break;case"direction2":i=r.direction2AtomIndex;break;default:var n=r.getAtomByName(e);i=n?n.index:void 0}return i},Dy.prototype.eachAtom=function(t,e){this.eachResidue(function(r){r.eachAtom(t,e)},e)},Dy.prototype.eachAtomN=function(t,e,r){var i,n=this,o=this.residueCount,a=new Array(t);for(i=0;i=n&&r=t&&e.apply(this,s)}})}},Dy.prototype.eachResidue=function(t){for(var e=this.structure.getResidueProxy(),r=this.residueCount,i=this.residueIndexStart,n=0;n1&&t(new Dy(o,r,u.index)),r=i)):(m!==Mv&&u.index-r>1&&t(new Dy(o,r,u.index)),r=i)}i-r>1&&this.structure.getResidueProxy(r).backboneStartType&&t(new Dy(o,r,i))},ky.prototype.qualifiedName=function(){return":"+this.chainname+"/"+this.modelIndex},ky.prototype.clone=function(){return new this.constructor(this.structure,this.index)},ky.prototype.toObject=function(){return{index:this.index,residueOffset:this.residueOffset,residueCount:this.residueCount,chainname:this.chainname}},Object.defineProperties(ky.prototype,Fy);var By=function(t,e){this.structure=t,this.modelStore=t.modelStore,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.index=e},zy={chainOffset:{},chainCount:{},residueOffset:{},atomOffset:{},chainEnd:{},residueEnd:{},atomEnd:{},residueCount:{},atomCount:{}};zy.chainOffset.get=function(){return this.modelStore.chainOffset[this.index]},zy.chainOffset.set=function(t){this.modelStore.chainOffset[this.index]=t},zy.chainCount.get=function(){return this.modelStore.chainCount[this.index]},zy.chainCount.set=function(t){this.modelStore.chainCount[this.index]=t},zy.residueOffset.get=function(){return this.chainStore.residueOffset[this.chainOffset]},zy.atomOffset.get=function(){return this.residueStore.atomOffset[this.residueOffset]},zy.chainEnd.get=function(){return this.chainOffset+this.chainCount-1},zy.residueEnd.get=function(){return this.chainStore.residueOffset[this.chainEnd]+this.chainStore.residueCount[this.chainEnd]-1},zy.atomEnd.get=function(){return this.residueStore.atomOffset[this.residueEnd]+this.residueStore.atomCount[this.residueEnd]-1},zy.residueCount.get=function(){return 0===this.chainCount?0:this.residueEnd-this.residueOffset+1},zy.atomCount.get=function(){return 0===this.residueCount?0:this.atomEnd-this.atomOffset+1},By.prototype.eachAtom=function(t,e){this.eachChain(function(r){r.eachAtom(t,e)},e)},By.prototype.eachResidue=function(t,e){this.eachChain(function(r){r.eachResidue(t,e)},e)},By.prototype.eachPolymer=function(t,e){if(e&&e.chainOnlyTest){var r=e.chainOnlyTest;this.eachChain(function(i){r(i)&&i.eachPolymer(t,e)})}else this.eachChain(function(r){r.eachPolymer(t,e)})},By.prototype.eachChain=function(t,e){var r,i=this.chainCount,n=this.chainOffset,o=this.structure._cp,a=n+i;if(e&&e.test){var s=e.chainOnlyTest;if(s)for(r=n;r1?(C=r.atomRadius(w),I=C*v/(.5*P),x.calculateShiftDir(N),m?(R=2*y*C,N.multiplyScalar(R),N.negate(),D.subVectors(S,w).multiplyScalar(Math.max(.1,R/1.88)),w.positionToArray(n,E),S.positionToArray(o,E),P>=2&&(O.addVectors(w,N).add(D).toArray(n,E+3),O.addVectors(S,N).sub(D).toArray(o,E+3),P>=3&&(O.subVectors(w,N).add(D).toArray(n,E+6),O.subVectors(S,N).sub(D).toArray(o,E+6)))):(R=(y-v)*C,N.multiplyScalar(R),2===P?(O.addVectors(w,N).toArray(n,E),O.subVectors(w,N).toArray(n,E+3),O.addVectors(S,N).toArray(o,E),O.subVectors(S,N).toArray(o,E+3)):3===P?(w.positionToArray(n,E),O.addVectors(w,N).toArray(n,E+3),O.subVectors(w,N).toArray(n,E+6),S.positionToArray(o,E),O.addVectors(S,N).toArray(o,E+3),O.subVectors(S,N).toArray(o,E+6)):(w.positionToArray(n,E),S.positionToArray(o,E)))):(w.positionToArray(n,E),S.positionToArray(o,E))),a&&(i.bondColorToArray(x,1,a,E),i.bondColorToArray(x,0,s,E),f&&P>1))for(M=1;M1))for(M=1;M1))for(I=u[L]*v/(m?1:.5*P),M=m?1:0;M1))for(I=h[L]*v/(m?1:.5*P),M=m?1:0;Ma&&(a=e),r>s&&(s=r),u>c&&(c=u)},e),r.min.set(i,n,o),r.max.set(a,s,c),t.Debug&&jf.timeEnd("getBoundingBox"),r},Uy.prototype.getPrincipalAxes=function(e){t.Debug&&jf.time("getPrincipalAxes");var r=0,i=new Pa(3,this.atomCount),n=i.data;return this.eachAtom(function(t){n[r+0]=t.x,n[r+1]=t.y,n[r+2]=t.z,r+=3},e),t.Debug&&jf.timeEnd("getPrincipalAxes"),new ty(i)},Uy.prototype.atomCenter=function(t){return t?this.getBoundingBox(t).getCenter():this.center.clone()},Uy.prototype.getSequence=function(t){var e=[],r=this.getResidueProxy();return this.eachAtom(function(t){r.index=t.residueIndex,t.index===r.traceAtomIndex&&e.push(r.getResname1())},t),e},Uy.prototype.getAtomIndices=function(t){var e;if(t&&t.string)e=[],this.eachAtom(function(t){e.push(t.index)},t);else{var r={what:{index:!0}};e=this.getAtomData(r).index}return e},Uy.prototype.getChainnameCount=function(t){var e=new Set;return this.eachChain(function(t){t.residueCount&&e.add(t.chainname)},t),e.size},Uy.prototype.updatePosition=function(t){var e=0;this.eachAtom(function(r){r.positionFromArray(t,e),e+=3})},Uy.prototype.refreshPosition=function(){this.getBoundingBox(void 0,this.boundingBox),this.boundingBox.getCenter(this.center),this.spatialHash=new Ya(this.atomStore,this.boundingBox)},Uy.prototype.dispose=function(){this.frames&&(this.frames.length=0),this.boxes&&(this.boxes.length=0),this.bondStore.dispose(),this.backboneBondStore.dispose(),this.rungBondStore.dispose(),this.atomStore.dispose(),this.residueStore.dispose(),this.chainStore.dispose(),this.modelStore.dispose(),delete this.bondStore,delete this.atomStore,delete this.residueStore,delete this.chainStore,delete this.modelStore,delete this.frames,delete this.boxes,delete this.cif,delete this.bondSet,delete this.atomSet},Object.defineProperties(Uy.prototype,jy);var Gy=function(t,e){var r;"function"==typeof t.eachAtom?r=t.atomCount:t instanceof Float32Array&&(r=t.length/3);var i=new Pa(3,r),n=new Pa(3,r);this.coords1t=new Pa(r,3),this.coords2t=new Pa(r,3),this.A=new Pa(3,3),this.W=new Pa(1,3),this.U=new Pa(3,3),this.V=new Pa(3,3),this.VH=new Pa(3,3),this.R=new Pa(3,3),this.tmp=new Pa(3,3),this.c=new Pa(3,3),this.c.data.set([1,0,0,0,1,0,0,0,-1]),this.prepCoords(t,i),this.prepCoords(e,n),this._superpose(i,n)};Gy.prototype._superpose=function(e,r){this.mean1=Da(e),this.mean2=Da(r),Na(e,this.mean1),Na(r,this.mean2),Ca(this.coords1t,e),Ca(this.coords2t,r),Ia(this.A,this.coords2t,this.coords1t),Ua(this.A,this.W,this.U,this.V),Ra(this.V,this.VH),Oa(this.R,this.U,this.VH),La(this.R)<0&&(t.Debug&&jf.log("R not a right handed system"),Oa(this.tmp,this.c,this.VH),Oa(this.R,this.U,this.tmp))},Gy.prototype.prepCoords=function(t,e){var r=0,i=e.data;"function"==typeof t.eachAtom?t.eachAtom(function(t){i[r+0]=t.x,i[r+1]=t.y,i[r+2]=t.z,r+=3}):t instanceof Float32Array?i.set(t):jf.warn("prepCoords: input type unknown")},Gy.prototype.transform=function(t){var e;"function"==typeof t.eachAtom?e=t.atomCount:t instanceof Float32Array&&(e=t.length/3);var r=new Pa(3,e),i=new Pa(e,3);this.prepCoords(t,r),Na(r,this.mean1),Ia(i,this.R,r),Ca(r,i),ka(r,this.mean2);var n=0,o=r.data;"function"==typeof t.eachAtom?t.eachAtom(function(t){t.x=o[n+0],t.y=o[n+1],t.z=o[n+2],n+=3}):t instanceof Float32Array?t.set(o.subarray(0,3*e)):jf.warn("transform: input type unknown")};var Vy=function(t,e){this.signals={startedRunning:new no,haltedRunning:new no},t.signals.playerChanged.add(function(t){t!==this&&this.pause()},this);var r=Object.assign({},e),i=gn(t.frameCount,1);this.traj=t,this.start=gn(r.start,0),this.end=Math.min(gn(r.end,i-1),i-1),this.step=gn(r.step,Math.ceil((i+1)/100)),this.timeout=gn(r.timeout,50),this.interpolateType=gn(r.interpolateType,""),this.interpolateStep=gn(r.interpolateStep,5),this.mode=gn(r.mode,"loop"),this.direction=gn(r.direction,"forward"),this._run=!1,this._previousTime=0,this._currentTime=0,this._currentStep=1,this._currentFrame=this.start,this._direction="bounce"===this.direction?"forward":this.direction,t.signals.countChanged.add(function(t){this.end=Math.min(gn(this.end,t-1),t-1)},this),this._animate=this._animate.bind(this)},$y={isRunning:{}};$y.isRunning.get=function(){return this._run},Vy.prototype.setParameters=function(t){var e=Object.assign({},t);void 0!==e.start&&(this.start=e.start),void 0!==e.end&&(this.end=e.end),void 0!==e.step&&(this.step=e.step),void 0!==e.timeout&&(this.timeout=e.timeout),void 0!==e.interpolateType&&(this.interpolateType=e.interpolateType),void 0!==e.interpolateStep&&(this.interpolateStep=e.interpolateStep),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.direction&&(this.direction=e.direction,"bounce"!==this.direction&&(this._direction=this.direction))},Vy.prototype._animate=function(){if(this._run){this._currentTime=window.performance.now();var t=this._currentTime-this._previousTime,e=this.interpolateType?this.interpolateStep:1,r=this.timeout/e,i=this.traj;if(i&&i.frameCount&&!i.inProgress&&t>=r)if(this.interpolateType)if(this._currentStep>this.interpolateStep&&(this._currentStep=1),1===this._currentStep&&(this._currentFrame=this._nextInterpolated()),i.hasFrame(this._currentFrame)){this._currentStep+=1;var n=this._currentStep/(this.interpolateStep+1);i.setFrameInterpolated.apply(i,this._currentFrame.concat([n],[this.interpolateType])),this._previousTime=this._currentTime}else i.loadFrame(this._currentFrame);else{var o=this._next();i.hasFrame(o)?(i.setFrame(o),this._previousTime=this._currentTime):i.loadFrame(o)}window.requestAnimationFrame(this._animate)}},Vy.prototype._next=function(){var t;return((t="forward"===this._direction?this.traj.currentFrame+this.step:this.traj.currentFrame-this.step)>this.end||t=this.end?e=this.start:"backward"===this.direction&&t<=this.start&&(e=this.end),this.traj.setFrame(e),this._run=!0,this._animate(),this.signals.startedRunning.dispatch()}},Vy.prototype.pause=function(){this._run=!1,this.signals.haltedRunning.dispatch()},Vy.prototype.stop=function(){this.pause(),this.traj.setFrame(this.start)},Object.defineProperties(Vy.prototype,$y);var Hy=function(t,e,r){this.signals={countChanged:new no,frameChanged:new no,playerChanged:new no};var i=r||{};this.deltaTime=gn(i.deltaTime,0),this.timeOffset=gn(i.timeOffset,0),this.centerPbc=gn(i.centerPbc,!1),this.removePbc=gn(i.removePbc,!1),this.superpose=gn(i.superpose,!1),this.name=t.replace(/^.*[\\/]/,""),this.trajPath=t,this.initialCoords=null,this.structureCoords=null,this.selection=new Cf(gn(i.sele,"backbone and not hydrogen")),this.selection.signals.stringChanged.add(function(){this.selectionIndices=this.structure.getAtomIndices(this.selection),this._resetCache(),this._saveInitialCoords(),this.setFrame(this._currentFrame)},this),this._frameCount=0,this._currentFrame=-1},Wy={frameCount:{},currentFrame:{}};Wy.frameCount.get=function(){return this._frameCount},Wy.currentFrame.get=function(){return this._currentFrame},Hy.prototype._init=function(t){this.setStructure(t),this._loadFrameCount(),this.setPlayer(new Vy(this))},Hy.prototype.setStructure=function(t){this.structure=t,this.atomCount=t.atomCount,this.backboneIndices=this._getIndices(new Cf("backbone and not hydrogen")),this._makeAtomIndices(),this._saveStructureCoords(),this.selectionIndices=this._getIndices(this.selection),this._resetCache(),this._saveInitialCoords(),this.setFrame(this._currentFrame)},Hy.prototype._saveInitialCoords=function(){var t=this;0!==Ho(this.structureCoords)||0!==$o(this.structureCoords)?(this.initialCoords=new Float32Array(this.structureCoords),this._makeSuperposeCoords()):this.frameCache[0]?(this.initialCoords=new Float32Array(this.frameCache[0]),this._makeSuperposeCoords()):this.loadFrame(0,function(){return t._saveInitialCoords()})},Hy.prototype._saveStructureCoords=function(){var t={what:{position:!0}};this.structureCoords=this.structure.getAtomData(t).position},Hy.prototype.setSelection=function(t){return this.selection.setString(t),this},Hy.prototype._getIndices=function(t){var e=0,r=t.test,i=[];return this.structure.eachAtom(function(t){r(t)&&i.push(e),e+=1}),i},Hy.prototype._makeSuperposeCoords=function(){var t=this,e=3*this.selectionIndices.length;this.coords1=new Float32Array(e),this.coords2=new Float32Array(e);for(var r=this.initialCoords,i=this.coords2,n=0;n0&&this.centerPbc){var n=[e[0],e[4],e[8]];Ts(r,Cs(this.backboneIndices,r,n),n)}this.removePbc&&Ps(r,e)}this.selectionIndices.length>0&&this.coords1&&this.superpose&&this._doSuperpose(r),this.frameCache[t]=r,this.boxCache[t]=e,this.frameCacheSize+=1},Hy.prototype._setFrameCount=function(t){t!==this._frameCount&&(this._frameCount=t,this.signals.countChanged.dispatch(t))},Hy.prototype.dispose=function(){this._resetCache(),this._disposed=!0,this.player&&this.player.stop()},Hy.prototype.setPlayer=function(t){this.player=t,this.signals.playerChanged.dispatch(t)},Hy.prototype.getPath=function(t,e){jf.error("Trajectory.getPath not implemented",t,e)},Hy.prototype.getFrameTime=function(t){return this.timeOffset+t*this.deltaTime},Object.defineProperties(Hy.prototype,Wy),Yf.add("shader/Mesh.vert","#define STANDARD\nuniform float nearClip;\nuniform vec3 clipCenter;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#elif defined( NOLIGHT )\nvarying vec3 vColor;\n#else\n#include color_pars_vertex\n#ifndef FLAT_SHADED\nvarying vec3 vNormal;\n#endif\n#endif\n#include common\nvoid main(){\n#if defined( PICKING )\nvPickingColor = unpackColor( primitiveId );\n#elif defined( NOLIGHT )\nvColor = color;\n#else\n#include color_vertex\n#include beginnormal_vertex\n#include defaultnormal_vertex\n#ifndef FLAT_SHADED\nvNormal = normalize( transformedNormal );\n#endif\n#endif\n#include begin_vertex\n#include project_vertex\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvViewPosition = -mvPosition.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}"),Yf.add("shader/Mesh.frag","#define STANDARD\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float nearClip;\nuniform float clipRadius;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\nuniform float objectId;\nvarying vec3 vPickingColor;\n#elif defined( NOLIGHT )\nvarying vec3 vColor;\n#else\n#ifndef FLAT_SHADED\nvarying vec3 vNormal;\n#endif\n#include common\n#include color_pars_fragment\n#include fog_pars_fragment\n#include bsdfs\n#include lights_pars\n#include lights_physical_pars_fragment\n#endif\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\n#if defined( PICKING )\nif( opacity < 0.7 )\ndiscard;\ngl_FragColor = vec4( vPickingColor, objectId );\n#elif defined( NOLIGHT )\ngl_FragColor = vec4( vColor, opacity );\n#else\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\n#include normal_flip\n#include normal_fragment\n#include dull_interior_fragment\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#include opaque_back_fragment\n#endif\n}");var Xy={f:1,v2:2,v3:3,c:3},qy=function(t,e){var r=t||{},i=e||{};this.opaqueBack=gn(i.opaqueBack,!1),this.dullInterior=gn(i.dullInterior,!1),this.side=gn(i.side,"double"),this.opacity=gn(i.opacity,1),this.depthWrite=gn(i.depthWrite,!0),this.clipNear=gn(i.clipNear,0),this.clipRadius=gn(i.clipRadius,0),this.clipCenter=gn(i.clipCenter,new g),this.flatShaded=gn(i.flatShaded,!1),this.background=gn(i.background,!1),this.linewidth=gn(i.linewidth,1),this.wireframe=gn(i.wireframe,!1),this.wireframeLinewidth=gn(i.wireframeLinewidth,1),this.roughness=gn(i.roughness,.4),this.metalness=gn(i.metalness,0),this.diffuse=gn(i.diffuse,16777215),this.forceTransparent=gn(i.forceTransparent,!1),this.disablePicking=gn(i.disablePicking,!1),this.geometry=new Ct,this.indexVersion=0,this.wireframeIndexVersion=-1,this.uniforms=up.merge([cp.common,{fogColor:{value:null},fogNear:{value:0},fogFar:{value:0},opacity:{value:this.opacity},nearClip:{value:0},clipRadius:{value:this.clipRadius},clipCenter:{value:this.clipCenter}},{emissive:{value:new tt(0)},roughness:{value:this.roughness},metalness:{value:this.metalness}},cp.ambient,cp.lights]),this.uniforms.diffuse.value.set(this.diffuse),this.pickingUniforms={nearClip:{value:0},objectId:{value:0},opacity:{value:this.opacity}},this.group=new Ne,this.wireframeGroup=new Ne,this.pickingGroup=new Ne,this.matrix=gn(i.matrix,new v);var n=r.position||r.position1;this._positionDataSize=n?n.length/3:0,this.addAttributes({position:{type:"v3",value:r.position},color:{type:"c",value:r.color},primitiveId:{type:"f",value:r.primitiveId}}),r.index&&this.initIndex(r.index),this.picking=r.picking,this.makeWireframeGeometry()},Yy={parameters:{},matrix:{},transparent:{},size:{},attributeSize:{},pickable:{},dynamic:{},vertexShader:{},fragmentShader:{}};Yy.parameters.get=function(){return{opaqueBack:{updateShader:!0},dullInterior:{updateShader:!0},side:{updateShader:!0,property:!0},opacity:{uniform:!0},depthWrite:{property:!0},clipNear:{updateShader:!0,property:!0},clipRadius:{updateShader:!0,property:!0,uniform:!0},clipCenter:{uniform:!0},flatShaded:{updateShader:!0},background:{updateShader:!0},linewidth:{property:!0},wireframe:{updateVisibility:!0},roughness:{uniform:!0},metalness:{uniform:!0},diffuse:{uniform:!0},matrix:{}}},Yy.matrix.set=function(t){this.setMatrix(t)},Yy.matrix.get=function(){return this.group.matrix.clone()},Yy.transparent.get=function(){return this.opacity<1||this.forceTransparent},Yy.size.get=function(){return this._positionDataSize},Yy.attributeSize.get=function(){return this.size},Yy.pickable.get=function(){return!!this.picking&&!this.disablePicking},Yy.dynamic.get=function(){return!0},Yy.vertexShader.get=function(){},Yy.fragmentShader.get=function(){},qy.prototype.setMatrix=function(t){Os(this.group,t),Os(this.wireframeGroup,t),Os(this.pickingGroup,t)},qy.prototype.initIndex=function(t){this.geometry.setIndex(new St(t,1)),this.geometry.getIndex().setDynamic(this.dynamic)},qy.prototype.makeMaterial=function(){var t=Ls(this.side),e=new ot({uniforms:this.uniforms,vertexShader:"",fragmentShader:"",depthTest:!0,transparent:this.transparent,depthWrite:this.depthWrite,lights:!0,fog:!0,side:t,linewidth:this.linewidth});e.vertexColors=uh,e.extensions.derivatives=this.flatShaded,e.extensions.fragDepth=this.isImpostor,e.clipNear=this.clipNear;var r=new ot({uniforms:this.uniforms,vertexShader:"",fragmentShader:"",depthTest:!0,transparent:this.transparent,depthWrite:this.depthWrite,lights:!1,fog:!0,side:t,linewidth:this.linewidth});r.vertexColors=uh,r.clipNear=this.clipNear;var i=new ot({uniforms:this.pickingUniforms,vertexShader:"",fragmentShader:"",depthTest:!0,transparent:!1,depthWrite:this.depthWrite,lights:!1,fog:!1,side:t,linewidth:this.linewidth,blending:hh});i.vertexColors=uh,i.extensions.fragDepth=this.isImpostor,i.clipNear=this.clipNear,this.material=e,this.wireframeMaterial=r,this.pickingMaterial=i,this.updateShader()},qy.prototype.makeWireframeGeometry=function(){this.makeWireframeIndex();var t=this.geometry,e=this.wireframeIndex,r=new Ct;r.attributes=t.attributes,e&&(r.setIndex(new St(e,1).setDynamic(this.dynamic)),r.setDrawRange(0,this.wireframeIndexCount)),this.wireframeGeometry=r},qy.prototype.makeWireframeIndex=function(){function t(t,r){if(t>r){var i=t;t=r,r=i}var n=e[t];return void 0===n?(e[t]=[r],!0):!n.includes(r)&&(n.push(r),!0)}var e=[],r=this.geometry,i=r.index;if(this.wireframe)if(i){var n=i.array,o=n.length;r.drawRange.count!==1/0&&(o=r.drawRange.count);var a;a=this.wireframeIndex&&this.wireframeIndex.length>2*o?this.wireframeIndex:On(2*o,r.attributes.position.count);var s=0;e.length=0;for(var c=0;c2*d?this.wireframeIndex:On(2*d,d);for(var f=0,m=0;fthis.wireframeGeometry.index.array.length)this.wireframeGeometry.setIndex(new St(this.wireframeIndex,1).setDynamic(this.dynamic));else{var t=this.wireframeGeometry.getIndex();t.set(this.wireframeIndex),t.needsUpdate=this.wireframeIndexCount>0,t.updateRange.count=this.wireframeIndexCount}this.wireframeGeometry.setDrawRange(0,this.wireframeIndexCount)},qy.prototype.getRenderOrder=function(){var t=0;return this.isText?t=1:this.transparent&&(t=this.isSurface?3:2),t},qy.prototype._getMesh=function(t){this.material||this.makeMaterial();var e,r=this.geometry,i=this[t];return this.isLine?e=new Re(r,i):this.isPoint?(e=new De(r,i),this.sortParticles&&(e.sortParticles=!0)):e=new Bt(r,i),e.frustumCulled=!1,e.renderOrder=this.getRenderOrder(),e},qy.prototype.getMesh=function(){return this._getMesh("material")},qy.prototype.getWireframeMesh=function(){var t;return this.material||this.makeMaterial(),this.wireframeGeometry||this.makeWireframeGeometry(),t=new Re(this.wireframeGeometry,this.wireframeMaterial),t.frustumCulled=!1,t.renderOrder=this.getRenderOrder(),t},qy.prototype.getPickingMesh=function(){return this._getMesh("pickingMaterial")},qy.prototype.getShader=function(t,e){return Ro(t,this.getDefines(e))},qy.prototype.getVertexShader=function(t){return this.getShader(this.vertexShader,t)},qy.prototype.getFragmentShader=function(t){return this.getShader(this.fragmentShader,t)},qy.prototype.getDefines=function(t){var e={};return this.clipNear&&(e.NEAR_CLIP=1),this.clipRadius&&(e.RADIUS_CLIP=1),"picking"===t?e.PICKING=1:(("background"===t||this.background)&&(e.NOLIGHT=1),this.flatShaded&&(e.FLAT_SHADED=1),this.opaqueBack&&(e.OPAQUE_BACK=1),this.dullInterior&&(e.DULL_INTERIOR=1)),e},qy.prototype.getParameters=function(){var t=this,e={};for(var r in t.parameters)e[r]=t[r];return e},qy.prototype.addUniforms=function(t){this.uniforms=up.merge([this.uniforms,t]),this.pickingUniforms=up.merge([this.pickingUniforms,t])},qy.prototype.addAttributes=function(t){var e=this;for(var r in t){var i=void 0,n=t[r],o=e.attributeSize*Xy[n.type];n.value?(o!==n.value.length&&jf.error("attribute value has wrong length",r),i=n.value):i=Ln("float32",o),e.geometry.addAttribute(r,new St(i,Xy[n.type]).setDynamic(e.dynamic))}},qy.prototype.updateRenderOrder=function(){function t(t){t.renderOrder=e}var e=this.getRenderOrder();this.group.children.forEach(t),this.pickingGroup&&this.pickingGroup.children.forEach(t)},qy.prototype.updateShader=function(){var t=this.material,e=this.wireframeMaterial,r=this.pickingMaterial;t.vertexShader=this.getVertexShader(),t.fragmentShader=this.getFragmentShader(),t.needsUpdate=!0,e.vertexShader=this.getShader("Line.vert"),e.fragmentShader=this.getShader("Line.frag"),e.needsUpdate=!0,r.vertexShader=this.getVertexShader("picking"),r.fragmentShader=this.getFragmentShader("picking"),r.needsUpdate=!0},qy.prototype.setParameters=function(t){var e=this;if(t){var r=t,i=this.parameters,n={},o={},a=!1,s=!1;for(var c in r){var u=r[c];void 0!==u&&(void 0!==i[c]&&(e[c]=u,i[c].property&&(!0!==i[c].property?n[i[c].property]=u:n[c]=u),i[c].uniform&&(!0!==i[c].uniform?o[i[c].uniform]=u:o[c]=u),i[c].updateShader&&(a=!0),i[c].updateVisibility&&(s=!0),e.dynamic&&"wireframe"===c&&!0===u&&e.updateWireframeIndex(),"flatShaded"===c&&(e.material.extensions.derivatives=e.flatShaded),"forceTransparent"===c&&(n.transparent=e.transparent)))}this.setProperties(n),this.setUniforms(o),a&&this.updateShader(),s&&this.setVisibility(this.visible)}},qy.prototype.setAttributes=function(t){var e=this,r=this.geometry,i=r.attributes;for(var n in t)if("picking"!==n){var o=t[n],a=o.length;if("index"===n){var s=r.getIndex();r.setDrawRange(0,1/0),a>s.array.length?r.setIndex(new St(o,1).setDynamic(e.dynamic)):(s.set(o),s.needsUpdate=a>0,s.updateRange.count=a,r.setDrawRange(0,a)),e.indexVersion++,e.wireframe&&e.updateWireframeIndex()}else{var c=i[n];a>c.array.length?r.addAttribute(n,new St(o,c.itemSize).setDynamic(e.dynamic)):(i[n].set(o),i[n].needsUpdate=a>0,i[n].updateRange.count=a)}}},qy.prototype.setUniforms=function(t){var e=this;if(t){var r=this.material.uniforms,i=this.wireframeMaterial.uniforms,n=this.pickingMaterial.uniforms;for(var o in t)"opacity"===o&&e.setProperties({transparent:e.transparent}),void 0!==r[o]&&(r[o].value.isVector3?r[o].value.copy(t[o]):r[o].value.set?r[o].value.set(t[o]):r[o].value=t[o]),void 0!==i[o]&&(i[o].value.isVector3?i[o].value.copy(t[o]):i[o].value.set?i[o].value.set(t[o]):i[o].value=t[o]),void 0!==n[o]&&(n[o].value.isVector3?n[o].value.copy(t[o]):n[o].value.set?n[o].value.set(t[o]):n[o].value=t[o])}},qy.prototype.setProperties=function(t){var e=this;if(t){var r=this.material,i=this.wireframeMaterial,n=this.pickingMaterial;for(var o in t){var a=t[o];"transparent"===o?e.updateRenderOrder():"side"===o&&(a=Ls(a)),void 0!==r[o]&&(r[o]=a),void 0!==i[o]&&(i[o]=a),void 0!==n[o]&&(n[o]=a)}r.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},qy.prototype.setVisibility=function(t){this.visible=t,this.wireframe?(this.group.visible=!1,this.wireframeGroup.visible=t,this.pickable&&(this.pickingGroup.visible=!1)):(this.group.visible=t,this.wireframeGroup.visible=!1,this.pickable&&(this.pickingGroup.visible=t))},qy.prototype.dispose=function(){this.material&&this.material.dispose(),this.wireframeMaterial&&this.wireframeMaterial.dispose(),this.pickingMaterial&&this.pickingMaterial.dispose(),this.geometry.dispose(),this.wireframeGeometry&&this.wireframeGeometry.dispose()},Object.defineProperties(qy.prototype,Yy);var Zy=function(t){function e(e,r){var i=e||{};!i.primitiveId&&i.position&&(i.primitiveId=Bo(i.position.length/3)),t.call(this,i,r),this.addAttributes({normal:{type:"v3",value:i.normal}}),void 0===i.normal&&this.geometry.computeVertexNormals()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertexShader:{},fragmentShader:{}};return r.vertexShader.get=function(){return"Mesh.vert"},r.fragmentShader.get=function(){return"Mesh.frag"},Object.defineProperties(e.prototype,r),e}(qy),Ky=new st,Qy=[Hg,jg,Wg,$g,Xg,Gg,Ug,Vg,Yg,qg],Jy=function(t,e){var r=this;this.name=gn(t,"shape");var i=e||{};this.aspectRatio=gn(i.aspectRatio,1.5),this.sphereDetail=gn(i.sphereDetail,2),this.radialSegments=gn(i.radialSegments,50),this.disableImpostor=gn(i.disableImpostor,!1),this.openEnded=gn(i.openEnded,!1),this.labelParams=gn(i.labelParams,{}),this.boundingBox=new st,this.bufferList=[],this.meshCount=0,Qy.forEach(function(t){Object.keys(t.fields).forEach(function(e){r[t.getShapeKey(e)]=[]}),r[t.getShapeKey("name")]=[]})},tb={center:{},type:{}};Jy.prototype.addBuffer=function(t){this.bufferList.push(t);var e=t.geometry;return e.boundingBox||e.computeBoundingBox(),this.boundingBox.union(e.boundingBox),this},Jy.prototype.addMesh=function(t,e,r,i,n){t=Gn(t),e=Gn(e),Array.isArray(r)&&(r=On(r,t.length)),i&&(i=Gn(i));var o={position:t,color:e,index:r,normal:i},a=new lv(this,Object.assign({serial:this.meshCount,name:n},o)),s=new Zy(Object.assign({picking:a},o));return this.bufferList.push(s),Ky.setFromArray(t),this.boundingBox.union(Ky),this.meshCount+=1,this},Jy.prototype.addSphere=function(t,e,r,i){return Ug.objectToShape(this,{position:t,color:e,radius:r,name:i}),this},Jy.prototype.addEllipsoid=function(t,e,r,i,n,o){return Xg.objectToShape(this,{position:t,color:e,radius:r,majorAxis:i,minorAxis:n,name:o}),this},Jy.prototype.addTorus=function(t,e,r,i,n,o){return qg.objectToShape(this,{position:t,color:e,radius:r,majorAxis:i,minorAxis:n,name:o}),this},Jy.prototype.addCylinder=function(t,e,r,i,n){return $g.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addCone=function(t,e,r,i,n){return Wg.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addArrow=function(t,e,r,i,n){return Hg.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addBox=function(t,e,r,i,n,o){return jg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addOctahedron=function(t,e,r,i,n,o){return Gg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addTetrahedron=function(t,e,r,i,n,o){return Vg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addText=function(t,e,r,i){return Yg.objectToShape(this,{position:t,color:e,size:r,text:i}),this},Jy.prototype.addLabel=function(t,e,r,i){return console.warn("Shape.addLabel is deprecated, use .addText instead"),this.addText(t,e,r,i)},Jy.prototype.getBufferList=function(){var t=this,e=[],r={aspectRatio:this.aspectRatio,sphereDetail:this.sphereDetail,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,openEnded:this.openEnded,labelParams:this.labelParams};return Qy.forEach(function(i){t[i.getShapeKey("color")].length&&e.push(i.bufferFromShape(t,r))}),this.bufferList.concat(e)},Jy.prototype.dispose=function(){var t=this;this.bufferList.forEach(function(t){t.dispose()}),this.bufferList.length=0,Qy.forEach(function(e){Object.keys(e.fields).forEach(function(r){t[e.getShapeKey(r)].length=0}),t[e.getShapeKey("name")].length=0})},tb.center.get=function(){return this._center||(this._center=this.boundingBox.getCenter()),this._center},tb.type.get=function(){return"Shape"},Object.defineProperties(Jy.prototype,tb);var eb=function(t,e,r){this.type="",this.parameters={lazy:{type:"boolean"},clipNear:{type:"range",step:1,max:100,min:0,buffer:!0},clipRadius:{type:"number",precision:1,max:1e3,min:0,buffer:!0},clipCenter:{type:"vector3",precision:1,buffer:!0},flatShaded:{type:"boolean",buffer:!0},opacity:{type:"range",step:.01,max:1,min:0,buffer:!0},depthWrite:{type:"boolean",buffer:!0},side:{type:"select",buffer:!0,options:{front:"front",back:"back",double:"double"}},wireframe:{type:"boolean",buffer:!0},linewidth:{type:"integer",max:50,min:1,buffer:!0},colorScheme:{type:"select",update:"color",options:{}},colorScale:{type:"select",update:"color",options:Hf.getScales()},colorReverse:{type:"boolean",update:"color"},colorValue:{type:"color",update:"color"},colorDomain:{type:"hidden",update:"color"},colorMode:{type:"select",update:"color",options:Hf.getModes()},roughness:{type:"range",step:.01,max:1,min:0,buffer:!0},metalness:{type:"range",step:.01,max:1,min:0,buffer:!0},diffuse:{type:"color",buffer:!0},matrix:{type:"hidden",buffer:!0},disablePicking:{type:"boolean",rebuild:!0}},this.viewer=e,this.tasks=new bm,this.queue=new Ds(this.make.bind(this)),this.bufferList=[],this.parameters.colorScheme&&(this.parameters.colorScheme.options=Hf.getSchemes())};eb.prototype.init=function(t){var e=t||{};this.clipNear=gn(e.clipNear,0),this.clipRadius=gn(e.clipRadius,0),this.clipCenter=gn(e.clipCenter,new g),this.flatShaded=gn(e.flatShaded,!1),this.side=gn(e.side,"double"),this.opacity=gn(e.opacity,1),this.depthWrite=gn(e.depthWrite,!0),this.wireframe=gn(e.wireframe,!1),this.linewidth=gn(e.linewidth,2),this.setColor(e.color,e),this.colorScheme=gn(e.colorScheme,"uniform"),this.colorScale=gn(e.colorScale,""),this.colorReverse=gn(e.colorReverse,!1),this.colorValue=gn(e.colorValue,9474192),this.colorDomain=gn(e.colorDomain,void 0),this.colorMode=gn(e.colorMode,"hcl"),this.visible=gn(e.visible,!0),this.quality=gn(e.quality,void 0),this.roughness=gn(e.roughness,.4),this.metalness=gn(e.metalness,0),this.diffuse=gn(e.diffuse,16777215),this.lazy=gn(e.lazy,!1),this.lazyProps={build:!1,bufferParams:{},what:{}},this.matrix=gn(e.matrix,new v),this.disablePicking=gn(e.disablePicking,!1);var r=this.parameters;!0===r.sphereDetail&&(r.sphereDetail={type:"integer",max:3,min:0,rebuild:"impostor"}),!0===r.radialSegments&&(r.radialSegments={type:"integer",max:25,min:5,rebuild:"impostor"}),!0===r.openEnded&&(r.openEnded={type:"boolean",rebuild:"impostor",buffer:!0}),!0===r.disableImpostor&&(r.disableImpostor={type:"boolean",rebuild:!0}),"low"===e.quality?(r.sphereDetail&&(this.sphereDetail=0),r.radialSegments&&(this.radialSegments=5)):"medium"===e.quality?(r.sphereDetail&&(this.sphereDetail=1),r.radialSegments&&(this.radialSegments=10)):"high"===e.quality?(r.sphereDetail&&(this.sphereDetail=2),r.radialSegments&&(this.radialSegments=20)):(r.sphereDetail&&(this.sphereDetail=gn(e.sphereDetail,1)),r.radialSegments&&(this.radialSegments=gn(e.radialSegments,10))),r.openEnded&&(this.openEnded=gn(e.openEnded,!0)),r.disableImpostor&&(this.disableImpostor=gn(e.disableImpostor,!1))},eb.prototype.getColorParams=function(t){return Object.assign({scheme:this.colorScheme,scale:this.colorScale,reverse:this.colorReverse,value:this.colorValue,domain:this.colorDomain,mode:this.colorMode},t)},eb.prototype.getBufferParams=function(t){return Object.assign({clipNear:this.clipNear,clipRadius:this.clipRadius,clipCenter:this.clipCenter,flatShaded:this.flatShaded,opacity:this.opacity,depthWrite:this.depthWrite,side:this.side,wireframe:this.wireframe,linewidth:this.linewidth,roughness:this.roughness,metalness:this.metalness,diffuse:this.diffuse,matrix:this.matrix,disablePicking:this.disablePicking},t)},eb.prototype.setColor=function(t,e){var r=Object.keys(Hf.getSchemes());return"string"==typeof t&&r.includes(t.toLowerCase())?e?e.colorScheme=t:this.setParameters({colorScheme:t}):void 0!==t&&(t=new tt(t).getHex(),e?(e.colorScheme="uniform",e.colorValue=t):this.setParameters({colorScheme:"uniform",colorValue:t})),this},eb.prototype.create=function(){},eb.prototype.update=function(){this.build()},eb.prototype.build=function(t){return this.lazy&&!this.visible?void(this.lazyProps.build=!0):this.prepare?(this.queue.length()>0?(this.tasks.change(1-this.queue.length()),this.queue.kill()):this.tasks.increment(),void this.queue.push(t||!1)):(this.tasks.increment(),void this.make())},eb.prototype.make=function(e,r){t.Debug&&jf.time("Representation.make "+this.type);var i=function(){e?(this.update(e),this.viewer.requestRender(),this.tasks.decrement(),r&&r()):(this.clear(),this.create(),this.manualAttach||this.disposed||(t.Debug&&jf.time("Representation.attach "+this.type),this.attach(function(){t.Debug&&jf.timeEnd("Representation.attach "+this.type),this.tasks.decrement(),r&&r()}.bind(this)))),t.Debug&&jf.timeEnd("Representation.make "+this.type)}.bind(this);this.prepare?this.prepare(i):i()},eb.prototype.attach=function(t){this.setVisibility(this.visible),t()},eb.prototype.setVisibility=function(t,e){if(this.visible=t,this.visible){var r=this.lazyProps,i=r.bufferParams,n=r.what;if(r.build)return r.build=!1,void this.build();(Object.keys(i).length||Object.keys(n).length)&&(r.bufferParams={},r.what={},this.updateParameters(i,n))}return this.bufferList.forEach(function(e){e.setVisibility(t)}),e||this.viewer.requestRender(),this},eb.prototype.setParameters=function(t,e,r){var i=this,n=t||{},o=this.parameters;e=e||{},r=r||!1;var a={};for(var s in n)void 0!==n[s]&&void 0!==o[s]&&(o[s].int&&(n[s]=parseInt(n[s])),o[s].float&&(n[s]=parseFloat(n[s])),(n[s]!==i[s]||n[s].equals&&!n[s].equals(i[s]))&&(i[s]&&i[s].set?i[s].set(n[s]):i[s]=n[s],o[s].buffer&&(!0===o[s].buffer?a[s]=n[s]:a[o[s].buffer]=n[s]),o[s].update&&(e[o[s].update]=!0),!o[s].rebuild||"impostor"===o[s].rebuild&&Uf&&!i.disableImpostor||(r=!0)));return r?this.build():this.updateParameters(a,e),this},eb.prototype.updateParameters=function(t,e){if(this.lazy&&!this.visible)return Object.assign(this.lazyProps.bufferParams,t),void Object.assign(this.lazyProps.what,e);this.bufferList.forEach(function(e){e.setParameters(t)}),Object.keys(e).length&&this.update(e),this.viewer.requestRender()},eb.prototype.getParameters=function(){var t=this,e={lazy:this.lazy,visible:this.visible,quality:this.quality};return Object.keys(this.parameters).forEach(function(r){null!==t.parameters[r]&&(e[r]=t[r])}),e},eb.prototype.clear=function(){var t=this;this.bufferList.forEach(function(e){t.viewer.remove(e),e.dispose()}),this.bufferList.length=0,this.viewer.requestRender()},eb.prototype.dispose=function(){this.disposed=!0,this.queue.kill(),this.tasks.dispose(),this.clear()};var rb=function(t){function e(e,r,i){Array.isArray(e)||(e=[e]),t.call(this,e,r,i),this.type="buffer",this.parameters=Object.assign({},this.parameters,{colorScheme:null,colorScale:null,colorValue:null,colorDomain:null,colorMode:null}),this.buffer=e,this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){t.prototype.init.call(this,e),this.build()},e.prototype.create=function(){this.bufferList.push.apply(this.bufferList,this.buffer)},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t),t.setParameters(e.getBufferParams())}),this.setVisibility(this.visible),t()},e}(eb),ib=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isSurface:{}};return r.isSurface.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(Zy),nb=function(t){this.size=t.size,this.side=t.side,this.wireframe=t.wireframe,this.visible=t.visible,this.geometry=t.geometry,this.picking=t.picking,this.background=t.background,this.disablePicking=t.disablePicking,this.group=new Ne,this.wireframeGroup=new Ne,this.pickingGroup=new Ne,this.matrix=t.matrix,this.frontMeshes=[],this.backMeshes=[];var e=t,r=new t.constructor;e.makeMaterial(),r.makeMaterial(),r.picking=t.picking,r.geometry=t.geometry,r.wireframeGeometry=t.wireframeGeometry,r.setParameters(t.getParameters()),r.updateShader(),e.setParameters({side:"front"}),r.setParameters({side:"back",opacity:r.opacity}),this.buffer=t,this.frontBuffer=e,this.backBuffer=r},ob={matrix:{},pickable:{}};ob.matrix.set=function(t){qy.prototype.setMatrix.call(this,t)},ob.matrix.get=function(){return this.group.matrix.clone()},ob.pickable.get=function(){return!!this.picking&&!this.disablePicking},nb.prototype.getMesh=function(t){var e,r;return t?(r=this.backBuffer.getPickingMesh(),e=this.frontBuffer.getPickingMesh()):(r=this.backBuffer.getMesh(),e=this.frontBuffer.getMesh()),this.frontMeshes.push(e),this.backMeshes.push(r),this.setParameters({side:this.side}),(new Ne).add(r,e)},nb.prototype.getWireframeMesh=function(){return this.buffer.getWireframeMesh()},nb.prototype.getPickingMesh=function(){return this.getMesh(!0)},nb.prototype.setAttributes=function(t){this.buffer.setAttributes(t)},nb.prototype.setParameters=function(t){"front"===(t=Object.assign({},t)).side?(this.frontMeshes.forEach(Ns),this.backMeshes.forEach(ks)):"back"===t.side?(this.frontMeshes.forEach(ks),this.backMeshes.forEach(Ns)):"double"===t.side&&(this.frontMeshes.forEach(Ns),this.backMeshes.forEach(Ns)),void 0!==t.matrix&&(this.matrix=t.matrix),delete t.matrix,void 0!==t.side&&(this.side=t.side),delete t.side,this.frontBuffer.setParameters(t),void 0!==t.wireframe&&(this.wireframe=t.wireframe,this.setVisibility(this.visible)),delete t.wireframe,this.backBuffer.setParameters(t)},nb.prototype.dispose=function(){this.frontBuffer.dispose(),this.backBuffer.dispose()},Object.defineProperties(nb.prototype,ob),nb.prototype.setVisibility=qy.prototype.setVisibility,Yf.add("shader/Line.vert","uniform float nearClip;\nuniform vec3 clipCenter;\nvarying vec3 vViewPosition;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#include color_pars_vertex\nvoid main(){\n#include color_vertex\n#include begin_vertex\n#include project_vertex\nvViewPosition = -mvPosition.xyz;\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}"),Yf.add("shader/Line.frag","uniform float opacity;\nuniform float nearClip;\nuniform float clipRadius;\nvarying vec3 vViewPosition;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#include common\n#include color_pars_fragment\n#include fog_pars_fragment\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\ngl_FragColor = vec4( vColor, opacity );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n}");var ab=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return r.isLine.get=function(){return!0},r.vertexShader.get=function(){return"Line.vert"},r.fragmentShader.get=function(){return"Line.frag"},Object.defineProperties(e.prototype,r),e}(qy),sb=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="surface",this.parameters=Object.assign({isolevelType:{type:"select",options:{value:"value",sigma:"sigma"}},isolevel:{type:"number",precision:2,max:1e3,min:-1e3},negateIsolevel:{type:"boolean"},smooth:{type:"integer",precision:1,max:10,min:0},background:{type:"boolean",rebuild:!0},opaqueBack:{type:"boolean",buffer:!0},boxSize:{type:"integer",precision:1,max:100,min:0},colorVolume:{type:"hidden"},contour:{type:"boolean",rebuild:!0},useWorker:{type:"boolean",rebuild:!0},wrap:{type:"boolean",rebuild:!0}},this.parameters),e instanceof iy?(this.surface=void 0,this.volume=e):(this.surface=e,this.volume=void 0),this.boxCenter=new g,this.__boxCenter=new g,this.box=new st,this.__box=new st,this._position=new g,this.setBox=function(){this._position.copy(r.translationGroup.position).negate(),this._position.equals(this.boxCenter)||this.setParameters({boxCenter:this._position})},this.viewer.signals.ticked.add(this.setBox,this),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,"uniform"),r.colorValue=gn(r.colorValue,14540253),this.isolevelType=gn(r.isolevelType,"sigma"),this.isolevel=gn(r.isolevel,2),this.negateIsolevel=gn(r.negateIsolevel,!1),this.smooth=gn(r.smooth,0),this.background=gn(r.background,!1),this.opaqueBack=gn(r.opaqueBack,!0),this.boxSize=gn(r.boxSize,0),this.colorVolume=gn(r.colorVolume,void 0),this.contour=gn(r.contour,!1),this.useWorker=gn(r.useWorker,!0),this.wrap=gn(r.wrap,!1),t.prototype.init.call(this,r),this.build()},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t)}),this.setVisibility(this.visible),t()},e.prototype.prepare=function(t){var e=this;if(this.volume){var r;if(r="sigma"===this.isolevelType?this.volume.getValueForSigma(this.isolevel):this.isolevel,this.negateIsolevel&&(r*=-1),!this.surface||this.__isolevel!==r||this.__smooth!==this.smooth||this.__contour!==this.contour||this.__wrap!==this.wrap||this.__boxSize!==this.boxSize||this.boxSize>0&&!this.__boxCenter.equals(this.boxCenter)){this.__isolevel=r,this.__smooth=this.smooth,this.__contour=this.contour,this.__wrap=this.wrap,this.__boxSize=this.boxSize,this.__boxCenter.copy(this.boxCenter),this.__box.copy(this.box);var i=function(r){e.surface=r,t()};this.useWorker?this.volume.getSurfaceWorker(r,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap,i):i(this.volume.getSurface(r,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap))}else t()}else t()},e.prototype.create=function(){var t,e={position:this.surface.getPosition(),color:this.surface.getColor(this.getColorParams()),index:this.surface.getIndex()};if(this.contour)t=new ab(e,this.getBufferParams({wireframe:!1}));else{e.normal=this.surface.getNormal(),e.picking=this.surface.getPicking();var r=new ib(e,this.getBufferParams({background:this.background,opaqueBack:this.opaqueBack,dullInterior:!1}));t=new nb(r)}this.bufferList.push(t)},e.prototype.update=function(t){if(0!==this.bufferList.length){var e={};(t=t||{}).position&&(e.position=this.surface.getPosition()),t.color&&(e.color=this.surface.getColor(this.getColorParams())),t.index&&(e.index=this.surface.getIndex()),t.normal&&(e.normal=this.surface.getNormal()),this.bufferList.forEach(function(t){t.setAttributes(e)})}},e.prototype.setParameters=function(e,r,i){return e&&void 0!==e.isolevelType&&this.volume&&("value"===this.isolevelType&&"sigma"===e.isolevelType?this.isolevel=this.volume.getSigmaForValue(this.isolevel):"sigma"===this.isolevelType&&"value"===e.isolevelType&&(this.isolevel=this.volume.getValueForSigma(this.isolevel)),this.isolevelType=e.isolevelType),e&&e.boxCenter&&(this.boxCenter.copy(e.boxCenter),delete e.boxCenter),e&&e.wireframe&&(e.contour||void 0===e.contour&&this.contour)&&(e.wireframe=!1),t.prototype.setParameters.call(this,e,r,i),this.volume&&this.volume.getBox(this.boxCenter,this.boxSize,this.box),e&&void 0!==e.colorVolume&&(r.color=!0),this.surface&&(void 0!==e.isolevel||void 0!==e.negateIsolevel||void 0!==e.smooth||void 0!==e.wrap||void 0!==e.boxSize||this.boxSize>0&&!this.__box.equals(this.box))&&this.build({position:!0,color:!0,index:!0,normal:!this.contour}),this},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.volume=this.colorVolume,e},e.prototype.dispose=function(){this.viewer.signals.ticked.remove(this.setBox,this),t.prototype.dispose.call(this)},e}(eb),cb=new v,ub=new ut,hb=function(t){function e(e,r,i){var n,o=e||{},a=r||{},s=i.attributes.position.array,c=i.attributes.normal.array,u=i.index?i.index.array:void 0,h=o.position.length/3,l=s.length/3,p=h*l,d=new Float32Array(3*p),f=new Float32Array(3*p),m=new Float32Array(3*p);u&&(n=On(h*u.length,p)),t.call(this,{position:d,color:m,index:n,normal:f,primitiveId:o.primitiveId||zo(h,l),picking:o.picking},a),this.setAttributes(o),this.geoPosition=s,this.geoNormal=c,this.geoIndex=u,this.positionCount=h,this.geoPositionCount=l,this.transformedGeoPosition=new Float32Array(3*l),this.transformedGeoNormal=new Float32Array(3*l),this.meshPosition=d,this.meshColor=m,this.meshIndex=n,this.meshNormal=f,this.meshIndex=n,this.makeIndex()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={updateNormals:{}};return e.prototype.applyPositionTransform=function(){},e.prototype.setAttributes=function(t,e){var r,i,n,o,a,s,c,u,h,l=this,p=this.geometry.attributes,d=this.updateNormals;t.position&&(r=t.position,n=this.geoPosition,c=this.meshPosition,a=this.transformedGeoPosition,p.position.needsUpdate=!0,(d||e)&&(o=this.geoNormal,h=this.meshNormal,s=this.transformedGeoNormal,p.normal.needsUpdate=!0)),t.color&&(i=t.color,u=this.meshColor,p.color.needsUpdate=!0);for(var f=this.positionCount,m=this.geoPositionCount,g=0;g 0.0 ){\ncameraPos = rayDirection * posT + rayOrigin;\ninterior = true;\nflag2 = true;\nreturn false;\n}else{\ncameraNormal = normalize( cameraPos - cameraSpherePos );\n}\n#else\nif( calcDepth( cameraPos ) <= 0.0 ){\ncameraPos = rayDirection * posT + rayOrigin;\ninterior = true;\nreturn false;\n}else{\ncameraNormal = normalize( cameraPos - cameraSpherePos );\n}\n#endif\nreturn true;\n}\nreturn false;\n}\nvoid main(void){\nbool flag = Impostor( cameraPos, cameraNormal );\n#ifdef NEAR_CLIP\nif( calcClip( cameraPos ) > 0.0 )\ndiscard;\n#endif\ngl_FragDepthEXT = calcDepth( cameraPos );\nif( !flag ){\n#ifdef NEAR_CLIP\nif( flag2 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\n}else if( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n#else\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n#endif\n}\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\n#ifdef PICKING\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vNormal = cameraNormal;\nvec3 vViewPosition = -cameraPos;\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\n#include normal_flip\n#include normal_fragment\nif( interior ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var db=function(t){function e(e,r){t.call(this,e,r),this.index=On(this.indexSize,this.attributeSize),this.makeIndex(),this.initIndex(this.index,1),this.addAttributes({mapping:{type:this.mappingType,value:null}}),this.setAttributes({primitiveId:Bo(this.size)})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={attributeSize:{},indexSize:{},mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.attributeSize.get=function(){return this.size*this.mappingSize},r.indexSize.get=function(){return this.size*this.mappingIndicesSize},r.mapping.get=function(){},r.mappingIndices.get=function(){},r.mappingIndicesSize.get=function(){},r.mappingType.get=function(){},r.mappingSize.get=function(){},r.mappingItemSize.get=function(){},e.prototype.addAttributes=function(e){var r={};for(var i in e){var n=e[i];r[i]={type:n.type,value:null}}t.prototype.addAttributes.call(this,r)},e.prototype.getAttributeIndex=function(t){return 3*t*this.mappingSize},e.prototype.setAttributes=function(t){t&&!t.position&&t.position1&&t.position2&&(t.position=Do(t.position1,t.position2));var e,r,i,n,o,a,s,c=this.size,u=this.mappingSize,h=this.geometry.attributes;for(var l in t)if("index"!==l&&"picking"!==l){r=t[l],i=(e=h[l]).itemSize,n=e.array;for(var p=0;p0&&this.alphaTest<=1&&(r.ALPHATEST=this.alphaTest.toPrecision(2)),r},e.prototype.setUniforms=function(e){e&&void 0!==e.edgeBleach&&(this.makeTexture(),e.map=this.tex),t.prototype.setUniforms.call(this,e)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.tex&&this.tex.dispose()},r.isPoint.get=function(){return!0},r.vertexShader.get=function(){return"Point.vert"},r.fragmentShader.get=function(){return"Point.frag"},Object.defineProperties(e.prototype,r),e}(qy),xb=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="dot",this.parameters=Object.assign({thresholdType:{type:"select",rebuild:!0,options:{value:"value",sigma:"sigma"}},thresholdMin:{type:"number",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdMax:{type:"number",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdOut:{type:"boolean",rebuild:!0},dotType:{type:"select",rebuild:!0,options:{"":"",sphere:"sphere",point:"point"}},radiusType:{type:"select",options:{"":"",value:"value","abs-value":"abs-value","value-min":"value-min",deviation:"deviation",size:"size"}},radius:{type:"number",precision:3,max:10,min:.001,property:"size"},scale:{type:"number",precision:3,max:10,min:.001},sphereDetail:!0,disableImpostor:!0,pointSize:{type:"number",precision:1,max:100,min:0,buffer:!0},sizeAttenuation:{type:"boolean",buffer:!0},sortParticles:{type:"boolean",rebuild:!0},useTexture:{type:"boolean",buffer:!0},alphaTest:{type:"range",step:.001,max:1,min:0,buffer:!0},forceTransparent:{type:"boolean",buffer:!0},edgeBleach:{type:"range",step:.001,max:1,min:0,buffer:!0}},this.parameters,{colorScheme:{type:"select",update:"color",options:{"":"",value:"value",uniform:"uniform",random:"random"}}}),e instanceof iy?(this.surface=void 0,this.volume=new oy(e)):(this.surface=e,this.volume=void 0),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,"uniform"),r.colorValue=gn(r.colorValue,14540253),this.thresholdType=gn(r.thresholdType,"sigma"),this.thresholdMin=gn(r.thresholdMin,2),this.thresholdMax=gn(r.thresholdMax,1/0),this.thresholdOut=gn(r.thresholdOut,!1),this.dotType=gn(r.dotType,"point"),this.radius=gn(r.radius,.1),this.scale=gn(r.scale,1),this.pointSize=gn(r.pointSize,1),this.sizeAttenuation=gn(r.sizeAttenuation,!0),this.sortParticles=gn(r.sortParticles,!1),this.useTexture=gn(r.useTexture,!1),this.alphaTest=gn(r.alphaTest,.5),this.forceTransparent=gn(r.forceTransparent,!1),this.edgeBleach=gn(r.edgeBleach,0),t.prototype.init.call(this,r),this.build()},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t)}),this.setVisibility(this.visible),t()},e.prototype.create=function(){var t={};if(this.volume){var e,r,i=this.volume;"sigma"===this.thresholdType?(e=i.getValueForSigma(this.thresholdMin),r=i.getValueForSigma(this.thresholdMax)):(e=this.thresholdMin,r=this.thresholdMax),i.setFilter(e,r,this.thresholdOut),t.position=i.getDataPosition(),t.color=i.getDataColor(this.getColorParams()),"sphere"===this.dotType&&(t.radius=i.getDataSize(this.radius,this.scale),t.picking=i.getDataPicking())}else{var n=this.surface;t.position=n.getPosition(),t.color=n.getColor(this.getColorParams()),"sphere"===this.dotType&&(t.radius=n.getSize(this.radius,this.scale),t.picking=n.getPicking())}"sphere"===this.dotType?this.dotBuffer=new yb(t,this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!1})):this.dotBuffer=new bb(t,this.getBufferParams({pointSize:this.pointSize,sizeAttenuation:this.sizeAttenuation,sortParticles:this.sortParticles,useTexture:this.useTexture,alphaTest:this.alphaTest,forceTransparent:this.forceTransparent,edgeBleach:this.edgeBleach})),this.bufferList.push(this.dotBuffer)},e.prototype.update=function(t){if(0!==this.bufferList.length){var e={};(t=t||{}).color&&(this.volume?e.color=this.volume.getDataColor(this.getColorParams()):e.color=this.surface.getColor(this.getColorParams())),"sphere"===this.dotType&&(t.radius||t.scale)&&(this.volume?e.radius=this.volume.getDataSize(this.radius,this.scale):e.radius=this.surface.getSize(this.radius,this.scale)),this.dotBuffer.setAttributes(e)}},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&void 0!==e.thresholdType&&this.volume instanceof iy&&("value"===this.thresholdType&&"sigma"===e.thresholdType?(this.thresholdMin=this.volume.getSigmaForValue(this.thresholdMin),this.thresholdMax=this.volume.getSigmaForValue(this.thresholdMax)):"sigma"===this.thresholdType&&"value"===e.thresholdType&&(this.thresholdMin=this.volume.getValueForSigma(this.thresholdMin),this.thresholdMax=this.volume.getValueForSigma(this.thresholdMax)),this.thresholdType=e.thresholdType),e&&void 0!==e.radiusType&&("radius"===e.radiusType?this.radius=.1:this.radius=e.radiusType,r.radius=!0,"sphere"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.radius&&(r.radius=!0,"sphere"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.scale&&(r.scale=!0,"sphere"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),t.prototype.setParameters.call(this,e,r,i),this},e}(eb);Yf.add("shader/Image.vert","uniform float clipRadius;\nuniform vec3 clipCenter;\nvarying vec2 vUv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\nvoid main() {\n#include begin_vertex\n#include project_vertex\nvUv = uv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvViewPosition = -mvPosition.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n}"),Yf.add("shader/Image.frag","uniform sampler2D map;\nuniform float opacity;\nuniform vec2 mapSize;\nuniform float nearClip;\nuniform float clipRadius;\nvarying vec2 vUv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\nuniform sampler2D pickingMap;\nuniform float objectId;\n#else\n#include fog_pars_fragment\n#endif\n#if defined( CUBIC_INTERPOLATION )\n#if defined( CATMULROM_FILTER ) || defined( MITCHELL_FILTER )\n#if defined( CATMULROM_FILTER )\nconst float B = 0.0;\nconst float C = 0.5;\n#elif defined( MITCHELL_FILTER )\nconst float B = 0.333;\nconst float C = 0.333;\n#endif\nfloat filter( float x ){\nfloat f = x;\nif( f < 0.0 ){\nf = -f;\n}\nif( f < 1.0 ){\nreturn ( ( 12.0 - 9.0 * B - 6.0 * C ) * ( f * f * f ) +\n( -18.0 + 12.0 * B + 6.0 *C ) * ( f * f ) +\n( 6.0 - 2.0 * B ) ) / 6.0;\n}else if( f >= 1.0 && f < 2.0 ){\nreturn ( ( -B - 6.0 * C ) * ( f * f * f )\n+ ( 6.0 * B + 30.0 * C ) * ( f *f ) +\n( - ( 12.0 * B ) - 48.0 * C ) * f +\n8.0 * B + 24.0 * C ) / 6.0;\n}else{\nreturn 0.0;\n}\n}\n#elif defined( BSPLINE_FILTER )\nfloat filter( float x ){\nfloat f = x;\nif( f < 0.0 ){\nf = -f;\n}\nif( f >= 0.0 && f <= 1.0 ){\nreturn ( 2.0 / 3.0 ) + ( 0.5 ) * ( f * f * f ) - ( f * f );\n}else if( f > 1.0 && f <= 2.0 ){\nreturn 1.0 / 6.0 * pow( ( 2.0 - f ), 3.0 );\n}\nreturn 1.0;\n}\n#else\nfloat filter( float x ){\nreturn 1.0;\n}\n#endif\nvec4 biCubic( sampler2D tex, vec2 texCoord ){\nvec2 texelSize = 1.0 / mapSize;\ntexCoord -= texelSize / 2.0;\nvec4 nSum = vec4( 0.0 );\nfloat nDenom = 0.0;\nvec2 cell = fract( texCoord * mapSize );\nfor( float m = -1.0; m <= 2.0; ++m ){\nfor( float n = -1.0; n <= 2.0; ++n ){\nvec4 vecData = texture2D(\ntex, texCoord + texelSize * vec2( m, n )\n);\nfloat c = filter( m - cell.x ) * filter( -n + cell.y );\nnSum += vecData * c;\nnDenom += c;\n}\n}\nreturn nSum / nDenom;\n}\n#endif\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\n#if defined( CUBIC_INTERPOLATION )\ngl_FragColor = biCubic( map, vUv );\n#else\ngl_FragColor = texture2D( map, vUv );\n#endif\n#if defined( PICKING )\nif( gl_FragColor.a < 0.7 )\ndiscard;\ngl_FragColor = vec4( texture2D( pickingMap, vUv ).xyz, objectId );\n#else\nif( gl_FragColor.a < 0.01 )\ndiscard;\ngl_FragColor.a *= opacity;\n#include fog_fragment\n#endif\n}");var _b=new Uint16Array([0,1,2,1,3,2]),wb=new Float32Array([0,1,0,0,1,1,1,0]),Sb=function(t){function e(e,r){var i=e||{},n=r||{};t.call(this,{position:i.position,index:_b,picking:i.picking},n),this.forceTransparent=!0,this.filter=gn(n.filter,"nearest");var o=new y(i.imageData,i.width,i.height);o.flipY=!0,this.tex=o;for(var a=i.imageData.length,s=new Uint8Array(a),c=0;c>16&255,s[c+1]=u>>8&255,s[c+2]=255&u}var h=new y(s,i.width,i.height);h.flipY=!0,h.minFilter=nl,h.magFilter=nl,this.pickingTex=h,this.addUniforms({map:{value:o},pickingMap:{value:h},mapSize:{value:new l(i.width,i.height)}}),this.geometry.addAttribute("uv",new St(wb,2))}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{filter:{updateShader:!0,uniform:!0}},t.prototype.parameters)},e.prototype.getDefines=function(e){var r=t.prototype.getDefines.call(this,e);return this.filter.startsWith("cubic")&&(r.CUBIC_INTERPOLATION=1,this.filter.endsWith("bspline")?r.BSPLINE_FILTER=1:this.filter.endsWith("catmulrom")?r.CATMULROM_FILTER=1:this.filter.endsWith("mitchell")&&(r.MITCHELL_FILTER=1)),r},e.prototype.updateTexture=function(){var t=this.tex;this.filter.startsWith("cubic")?(t.minFilter=nl,t.magFilter=nl):"linear"===this.filter?(t.minFilter=sl,t.magFilter=sl):(t.minFilter=nl,t.magFilter=nl),t.needsUpdate=!0,this.pickingTex.needsUpdate=!0},e.prototype.makeMaterial=function(){t.prototype.makeMaterial.call(this),this.updateTexture();var e=this.material;e.uniforms.map.value=this.tex,e.blending=lh,e.needsUpdate=!0;var r=this.wireframeMaterial;r.uniforms.map.value=this.tex,r.blending=lh,r.needsUpdate=!0;var i=this.pickingMaterial;i.uniforms.map.value=this.tex,i.uniforms.pickingMap.value=this.pickingTex,i.blending=lh,i.needsUpdate=!0},e.prototype.setUniforms=function(e){e&&void 0!==e.filter&&(this.updateTexture(),e.map=this.tex),t.prototype.setUniforms.call(this,e)},r.vertexShader.get=function(){return"Image.vert"},r.fragmentShader.get=function(){return"Image.frag"},Object.defineProperties(e.prototype,r),e}(qy),Ab=function(t,e){var r=e||{};this.dimension=gn(r.dimension,"x"),this.positionType=gn(r.positionType,"percent"),this.position=gn(r.position,30),this.thresholdType=gn(r.thresholdType,"sigma"),this.thresholdMin=gn(r.thresholdMin,-1/0),this.thresholdMax=gn(r.thresholdMax,1/0),this.normalize=gn(r.normalize,!1),this.volume=t};Ab.prototype.getPositionFromCoordinate=function(t){var e,r=this.dimension,i=this.volume,n=i.matrix,o=(new g).setFromMatrixPosition(n)[r],a=(new g).setFromMatrixScale(n)[r];return e="x"===r?i.nx:"y"===r?i.ny:i.nz,Math.round(((t-o)/(e/100)+1)/a)},Ab.prototype.getData=function(t){function e(t){return Math.round(t/100*(o-1))}function r(t,e,r,i){return 3*(r*a.ny*a.nx+e*a.nx+t)+i}function i(t,e,r,i){m.set(t,e,r).applyMatrix4(c).toArray(f,i)}var n=this;t=t||{};var o,a=this.volume,s=a.data,c=a.matrix;o="coordinate"===this.positionType?this.getPositionFromCoordinate(this.position):this.position;var u,h,l,p,d,f=new Float32Array(12),m=new g,v=0,y=0,b=0,x=a.nx,_=a.ny,w=a.nz;"x"===this.dimension?(l=e(a.nx),p=a.ny-1,d=a.nz-1,u=a.nz,h=a.ny,x=(v=l)+1,i(l,0,0,0),i(l,p,0,3),i(l,0,d,6),i(l,p,d,9)):"y"===this.dimension?(l=a.nx-1,p=e(a.ny),d=a.nz-1,u=a.nz,h=a.nx,_=(y=p)+1,i(0,p,0,0),i(l,p,0,3),i(0,p,d,6),i(l,p,d,9)):"z"===this.dimension&&(l=a.nx-1,p=a.ny-1,d=e(a.nz),u=a.nx,h=a.ny,w=(b=d)+1,i(0,0,d,0),i(0,p,d,3),i(l,0,d,6),i(l,p,d,9));var S,A,M=0,E=0,T=new Uint8Array(u*h*4),P=new Float32Array(u*h);"sigma"===this.thresholdType?(S=a.getValueForSigma(this.thresholdMin),A=a.getValueForSigma(this.thresholdMax)):(S=this.thresholdMin,A=this.thresholdMax);var C=Object.assign({},t.colorParams,{volume:a});this.normalize&&(C.domain=[0,1]);var I,R,L,O=Hf.getScheme(C),D=new Float32Array(3),N=O.getScale();if(this.normalize){I=1/0,R=-1/0;for(var k=y;k<_;++k)for(var F=v;FR&&(R=z)}L=R-I}for(var U=y;U<_;++U)for(var j=v;jS&&$0&&this.updateData(t,e)},this)},e.prototype.updateData=function(){this.build()},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.structure=this.structure,e},e.prototype.getAtomParams=function(t,e){return Object.assign({what:t,colorParams:this.getColorParams(),radiusParams:{radius:this.radius,scale:this.scale}},e)},e.prototype.getBondParams=function(t,e){return Object.assign({what:t,colorParams:this.getColorParams(),radiusParams:{radius:this.radius,scale:this.scale}},e)},e.prototype.setSelection=function(t,e){return this.selection.setString(t,e),this},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&void 0!==e.radiusType&&("size"===e.radiusType?this.radius=1:this.radius=e.radiusType,delete e.radiusType,r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.radius&&(r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.scale&&(r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.defaultAssembly&&(i=!0),t.prototype.setParameters.call(this,e,r,i),this},e.prototype.getParameters=function(){return Object.assign(t.prototype.getParameters.call(this),{sele:this.selection?this.selection.string:void 0,defaultAssembly:this.defaultAssembly})},e.prototype.attach=function(t){var e=this.viewer,r=this.bufferList;this.dataList.forEach(function(t){t.bufferList.forEach(function(i){r.push(i),e.add(i,t.instanceList)})}),this.setVisibility(this.visible),t()},e.prototype.clear=function(){this.dataList.length=0,t.prototype.clear.call(this)},e.prototype.dispose=function(){this.structureView.dispose(),delete this.structure,delete this.structureView,t.prototype.dispose.call(this)},Object.defineProperties(e.prototype,r),e}(eb),Tb=new g,Pb=new g,Cb=new g,Ib=new g(0,1,0),Rb=function(t){function e(e,r){var i=e||{},n=r||{},o=gn(n.radialSegments,10),a=gn(n.openEnded,!0),s=(new v).makeRotationX(Math.PI/2),c=new vr(1,1,1,o,1,a);c.applyMatrix(s);var u=i.position1.length,h=i.radius.length,l=c.attributes.position.array.length/3,p=u/3,d=new Float32Array(2*p*l);zo(p,l,0,d),zo(p,l,p*l,d);var f=new Float32Array(2*u),m=new Float32Array(2*u);t.call(this,{position:f,color:m,primitiveId:d,picking:i.picking},n,c),this.__center=new Float32Array(u),this._position=f,this._color=m,this._from=new Float32Array(2*u),this._to=new Float32Array(2*u),this._radius=new Float32Array(2*h),this.setAttributes(i,!0)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={updateNormals:{}};return e.prototype.applyPositionTransform=function(t,e,r){Pb.fromArray(this._from,r),Cb.fromArray(this._to,r),t.lookAt(Pb,Cb,Ib);var i=this._radius[e];Tb.set(i,i,Pb.distanceTo(Cb)),t.scale(Tb)},e.prototype.setAttributes=function(e,r){var i={};e.position1&&e.position2&&(Do(e.position1,e.position2,this.__center),Do(e.position1,this.__center,this._position),Do(this.__center,e.position2,this._position,e.position1.length),this._from.set(e.position1),this._from.set(this.__center,e.position1.length),this._to.set(this.__center),this._to.set(e.position2,this.__center.length),i.position=this._position),e.color&&e.color2&&(this._color.set(e.color),this._color.set(e.color2,e.color.length),i.color=this._color),e.radius&&(this._radius.set(e.radius),this._radius.set(e.radius,e.radius.length),i.radius=this._radius),t.prototype.setAttributes.call(this,i,r)},r.updateNormals.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(hb);Yf.add("shader/CylinderImpostor.vert","\nattribute vec3 mapping;\nattribute vec3 position1;\nattribute vec3 position2;\nattribute float radius;\nvarying vec3 axis;\nvarying vec4 base_radius;\nvarying vec4 end_b;\nvarying vec3 U;\nvarying vec3 V;\nvarying vec4 w;\n#ifdef PICKING\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#else\nattribute vec3 color2;\nvarying vec3 vColor1;\nvarying vec3 vColor2;\n#endif\nuniform mat4 modelViewMatrixInverse;\nuniform float ortho;\n#include matrix_scale\nvoid main(){\n#ifdef PICKING\nvPickingColor = unpackColor( primitiveId );\n#else\nvColor1 = color;\nvColor2 = color2;\n#endif\nbase_radius.w = radius * matrixScale( modelViewMatrix );\nvec3 center = position;\nvec3 dir = normalize( position2 - position1 );\nfloat ext = length( position2 - position1 ) / 2.0;\nvec3 cam_dir;\nif( ortho == 0.0 ){\ncam_dir = ( modelViewMatrixInverse * vec4( 0, 0, 0, 1 ) ).xyz - center;\n}else{\ncam_dir = ( modelViewMatrixInverse * vec4( 0, 0, 1, 0 ) ).xyz;\n}\ncam_dir = normalize( cam_dir );\nvec3 ldir;\nfloat b = dot( cam_dir, dir );\nend_b.w = b;\nif( b < 0.0 )\nldir = -ext * dir;\nelse\nldir = ext * dir;\nvec3 left = normalize( cross( cam_dir, ldir ) );\nleft = radius * left;\nvec3 up = radius * normalize( cross( left, ldir ) );\naxis = normalize( normalMatrix * ldir );\nU = normalize( normalMatrix * up );\nV = normalize( normalMatrix * left );\nvec4 base4 = modelViewMatrix * vec4( center - ldir, 1.0 );\nbase_radius.xyz = base4.xyz / base4.w;\nvec4 top_position = modelViewMatrix * vec4( center + ldir, 1.0 );\nvec4 end4 = top_position;\nend_b.xyz = end4.xyz / end4.w;\nw = modelViewMatrix * vec4(\ncenter + mapping.x*ldir + mapping.y*left + mapping.z*up, 1.0\n);\ngl_Position = projectionMatrix * w;\ngl_Position.z = 0.99;\n}"),Yf.add("shader/CylinderImpostor.frag","#define STANDARD\n#define IMPOSTOR\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float nearClip;\nuniform mat4 projectionMatrix;\nuniform float ortho;\nvarying vec3 axis;\nvarying vec4 base_radius;\nvarying vec4 end_b;\nvarying vec3 U;\nvarying vec3 V;\nvarying vec4 w;\n#ifdef PICKING\nuniform float objectId;\nvarying vec3 vPickingColor;\n#else\nvarying vec3 vColor1;\nvarying vec3 vColor2;\n#include common\n#include fog_pars_fragment\n#include bsdfs\n#include lights_pars\n#include lights_physical_pars_fragment\n#endif\nbool interior = false;\nfloat distSq3( vec3 v3a, vec3 v3b ){\nreturn (\n( v3a.x - v3b.x ) * ( v3a.x - v3b.x ) +\n( v3a.y - v3b.y ) * ( v3a.y - v3b.y ) +\n( v3a.z - v3b.z ) * ( v3a.z - v3b.z )\n);\n}\nfloat calcDepth( in vec3 cameraPos ){\nvec2 clipZW = cameraPos.z * projectionMatrix[2].zw + projectionMatrix[3].zw;\nreturn 0.5 + 0.5 * clipZW.x / clipZW.y;\n}\nfloat calcClip( vec3 cameraPos ){\nreturn dot( vec4( cameraPos, 1.0 ), vec4( 0.0, 0.0, 1.0, nearClip - 0.5 ) );\n}\nvoid main(){\nvec3 point = w.xyz / w.w;\nvec3 base = base_radius.xyz;\nfloat vRadius = base_radius.w;\nvec3 end = end_b.xyz;\nfloat b = end_b.w;\nvec3 end_cyl = end;\nvec3 surface_point = point;\nvec3 ray_target = surface_point;\nvec3 ray_origin = vec3(0.0);\nvec3 ray_direction = mix(normalize(ray_origin - ray_target), vec3(0.0, 0.0, 1.0), ortho);\nmat3 basis = mat3( U, V, axis );\nvec3 diff = ray_target - 0.5 * (base + end_cyl);\nvec3 P = diff * basis;\nfloat dz = dot( axis, ray_direction );\nfloat radius2 = vRadius*vRadius;\nvec3 D = vec3(dot(U, ray_direction),\ndot(V, ray_direction),\ndz);\nfloat a0 = P.x*P.x + P.y*P.y - radius2;\nfloat a1 = P.x*D.x + P.y*D.y;\nfloat a2 = D.x*D.x + D.y*D.y;\nfloat d = a1*a1 - a0*a2;\nif (d < 0.0)\ndiscard;\nfloat dist = (-a1 + sqrt(d)) / a2;\nvec3 new_point = ray_target + dist * ray_direction;\nvec3 tmp_point = new_point - base;\nvec3 _normal = normalize( tmp_point - axis * dot(tmp_point, axis) );\nray_origin = mix( ray_origin, surface_point, ortho );\nfloat front_cap_test = dot( tmp_point, axis );\nfloat end_cap_test = dot((new_point - end_cyl), axis);\n#ifndef CAP\nvec3 new_point2 = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\nvec3 tmp_point2 = new_point2 - base;\n#endif\nif (front_cap_test < 0.0)\n{\nfloat dNV = dot(-axis, ray_direction);\nif (dNV < 0.0)\ndiscard;\nfloat near = dot(-axis, (base)) / dNV;\nvec3 front_point = ray_direction * near + ray_origin;\nif (dot(front_point - base, front_point-base) > radius2)\ndiscard;\n#ifdef CAP\nnew_point = front_point;\n_normal = axis;\n#else\nnew_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\ndNV = dot(-axis, ray_direction);\nnear = dot(axis, end_cyl) / dNV;\nnew_point2 = ray_direction * near + ray_origin;\nif (dot(new_point2 - end_cyl, new_point2-base) < radius2)\ndiscard;\ninterior = true;\n#endif\n}\nif( end_cap_test > 0.0 )\n{\nfloat dNV = dot(axis, ray_direction);\nif (dNV < 0.0)\ndiscard;\nfloat near = dot(axis, end_cyl) / dNV;\nvec3 end_point = ray_direction * near + ray_origin;\nif( dot(end_point - end_cyl, end_point-base) > radius2 )\ndiscard;\n#ifdef CAP\nnew_point = end_point;\n_normal = axis;\n#else\nnew_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\ndNV = dot(-axis, ray_direction);\nnear = dot(-axis, (base)) / dNV;\nnew_point2 = ray_direction * near + ray_origin;\nif (dot(new_point2 - base, new_point2-base) < radius2)\ndiscard;\ninterior = true;\n#endif\n}\ngl_FragDepthEXT = calcDepth( new_point );\n#ifdef NEAR_CLIP\nif( calcClip( new_point ) > 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nnew_point = ray_target + dist * ray_direction;\nif( calcClip( new_point ) > 0.0 )\ndiscard;\ninterior = true;\ngl_FragDepthEXT = calcDepth( new_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\n}\n}else if( gl_FragDepthEXT <= 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nnew_point = ray_target + dist * ray_direction;\ninterior = true;\ngl_FragDepthEXT = calcDepth( new_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n}\n#else\nif( gl_FragDepthEXT <= 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nnew_point = ray_target + dist * ray_direction;\ninterior = true;\ngl_FragDepthEXT = calcDepth( new_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n}\n#endif\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\n#ifdef PICKING\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vViewPosition = -new_point;\nvec3 vNormal = _normal;\nvec3 vColor;\nif( distSq3( new_point, end_cyl ) < distSq3( new_point, base ) ){\nif( b < 0.0 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\n}else{\nif( b > 0.0 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\n}\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\nvec3 normal = normalize( vNormal );\nif( interior ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var Lb=new Float32Array([-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1]),Ob=new Uint16Array([0,1,2,1,4,2,2,4,3,4,5,3]),Db=function(t){function e(e,r){t.call(this,e,r);var i=r||{};this.openEnded=gn(i.openEnded,!1),this.addUniforms({modelViewMatrixInverse:{value:new v},ortho:{value:0}}),this.addAttributes({position1:{type:"v3",value:null},position2:{type:"v3",value:null},color2:{type:"c",value:null},radius:{type:"f",value:null}}),this.setAttributes(e),this.makeMapping()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},isImpostor:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{openEnded:{updateShader:!0}},t.prototype.parameters)},e.prototype.getDefines=function(e){var r=t.prototype.getDefines.call(this,e);return this.openEnded||(r.CAP=1),r},r.isImpostor.get=function(){return!0},r.vertexShader.get=function(){return"CylinderImpostor.vert"},r.fragmentShader.get=function(){return"CylinderImpostor.frag"},Object.defineProperties(e.prototype,r),e}(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.mapping.get=function(){return Lb},r.mappingIndices.get=function(){return Ob},r.mappingIndicesSize.get=function(){return 12},r.mappingType.get=function(){return"v3"},r.mappingSize.get=function(){return 6},r.mappingItemSize.get=function(){return 3},Object.defineProperties(e.prototype,r),e}(db)),Nb=function(t,e){return t.color2||(t.color2=t.color),!Uf||e&&e.disableImpostor?new Rb(t,e):new Db(t,e)};Qf.add("cylinder",Nb);var kb=function(t){function e(e,r){var i=4*(e.position1.length/3);t.call(this,{position:new Float32Array(3*i),color:new Float32Array(3*i)},r),this.setAttributes(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n,o,a,s=this.geometry.attributes;t.position1&&t.position2&&(e=t.position1,r=t.position2,o=s.position.array,s.position.needsUpdate=!0),t.color&&t.color2&&(i=t.color,n=t.color2,a=s.color.array,s.color.needsUpdate=!0);for(var c,u,h,l,p,d,f,m,g,v,y,b=this.size,x=0;x5&&s>15e3||s>7e5){var p=Math.min(1.5,Math.max(.1,2e3/(s/n)));c&&(p=Math.min(p,.15)),e.addRepresentation("surface",{sele:"polymer",surfaceType:"sas",probeRadius:1.4,scaleFactor:p,colorScheme:u,colorScale:h,colorReverse:l,useWorker:!1})}else s>25e4?e.addRepresentation("backbone",{lineOnly:!0,colorScheme:u,colorScale:h,colorReverse:l}):s>1e5?e.addRepresentation("backbone",{quality:"low",disableImpostor:!0,colorScheme:u,colorScale:h,colorReverse:l,scale:2}):s>8e4?e.addRepresentation("backbone",{colorScheme:u,colorScale:h,colorReverse:l,scale:2}):(e.addRepresentation("cartoon",{colorScheme:u,colorScale:h,colorReverse:l,scale:.7,aspectRatio:5,quality:"auto"}),s<5e4&&e.addRepresentation("base",{colorScheme:u,colorScale:h,colorReverse:l,quality:"auto"}),e.addRepresentation("ball+stick",{sele:"ligand",colorScheme:"element",scale:2,aspectRatio:1.5,bondScale:.3,bondSpacing:.75,quality:"auto"}));e.structure.frames.length&&e.addTrajectory()}else"surface"!==e.type&&"volume"!==e.type||e.addRepresentation("surface");this.tasks.onZeroOnce(this.autoView,this)},qb.prototype.loadFile=function(t,e){var r=Object.assign({},this.defaultFileParams,e),i=new jb(this,r);i.name=wn(t).name,this.addComponent(i);var n=this.tasks;n.increment();var o=function(t){return this.removeComponent(i),i=this.addComponentFromObject(t,r),"script"===i.type?i.run():r.defaultRepresentation&&this.defaultFileRepresentation(i),n.decrement(),i}.bind(this),a=function(t){throw i.setStatus(t),n.decrement(),t},s=gn(r.ext,wn(t).ext);return(qf.isTrajectory(s)?Promise.reject(new Error('loadFile: ext "'+s+'" is a trajectory and must be loaded into a structure component')):Mo(t,r)).then(o,a)},qb.prototype.addComponent=function(t){if(!t)return void jf.warn("Stage.addComponent: no component given");this.compList.push(t),this.signals.componentAdded.dispatch(t)},qb.prototype.addComponentFromObject=function(t,e){var r=Kf.get(t.type);if(r){var i=new r(this,t,e);return this.addComponent(i),i}jf.warn("no component for object type",t.type)},qb.prototype.removeComponent=function(t){var e=this.compList.indexOf(t);-1!==e&&(this.compList.splice(e,1),t.dispose(),this.signals.componentRemoved.dispatch(t))},qb.prototype.removeAllComponents=function(t){this.compList.slice().forEach(function(e){t&&e.type!==t||this.removeComponent(e)},this)},qb.prototype.handleResize=function(){this.viewer.handleResize()},qb.prototype.setSize=function(t,e){var r=this.viewer.container;r!==document.body&&(void 0!==t&&(r.style.width=t),void 0!==e&&(r.style.height=e),this.handleResize())},qb.prototype.toggleFullscreen=function(t){function e(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function r(){if(!e()&&i.lastFullscreenElement){var t=i.lastFullscreenElement;t.style.width=t.dataset.normalWidth,t.style.height=t.dataset.normalHeight,document.removeEventListener("fullscreenchange",r),document.removeEventListener("mozfullscreenchange",r),document.removeEventListener("webkitfullscreenchange",r),document.removeEventListener("MSFullscreenChange",r),i.handleResize(),i.signals.fullscreenChanged.dispatch(!1)}}if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled))return void jf.log("fullscreen mode (currently) not possible");var i=this;t=t||this.viewer.container,this.lastFullscreenElement=t,e()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(t.dataset.normalWidth=t.style.width,t.dataset.normalHeight=t.style.height,t.style.width=window.screen.width+"px",t.style.height=window.screen.height+"px",t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(),document.addEventListener("fullscreenchange",r),document.addEventListener("mozfullscreenchange",r),document.addEventListener("webkitfullscreenchange",r),document.addEventListener("MSFullscreenChange",r),this.handleResize(),this.signals.fullscreenChanged.dispatch(!0),setTimeout(function(){i.handleResize()},100))},qb.prototype.setSpin=function(t){t?(this.spinAnimation.resume(!0),this.rockAnimation.pause(!0)):this.spinAnimation.pause(!0)},qb.prototype.setRock=function(t){t?(this.rockAnimation.resume(!0),this.spinAnimation.pause(!0)):this.rockAnimation.pause(!0)},qb.prototype.toggleSpin=function(){this.setSpin(this.spinAnimation.paused)},qb.prototype.toggleRock=function(){this.setRock(this.rockAnimation.paused)},qb.prototype.setFocus=function(t){var e=Yn(t/2,0,49.9),r=100-e,i=(r-e)/2;this.setParameters({clipNear:e,clipFar:r,fogNear:Zn(r-i),fogFar:Zn(r+i)})},qb.prototype.getZoomForBox=function(t){var e=t.getSize(Xb),r=Math.max(e.x,e.y,e.z),i=Math.min(e.x,e.y,e.z),n=r+Math.sqrt(i),o=$n(this.viewer.perspectiveCamera.fov),a=this.viewer.width,s=this.viewer.height,c=a/s,u=s=this.V[n][o]?(r="S",this.score=this.S[n][o]):this.V[n][o]>=this.H[n][o]?(r="V",this.score=this.V[n][o]):(r="H",this.score=this.H[n][o]),t.Debug&&jf.log("Alignment: SCORE",this.score),t.Debug&&jf.log("Alignment: S, V, H",this.S[n][o],this.V[n][o],this.H[n][o]);n>0&&o>0;)"S"===r?e.S[n][o]===e.S[n-1][o-1]+i(n-1,o-1)?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--n,--o,r="S"):e.S[n][o]===e.V[n][o]?r="V":e.S[n][o]===e.H[n][o]?r="H":(--n,--o):"V"===r?e.V[n][o]===e.V[n-1][o]+e.gapExtensionPenalty?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2="-"+e.ali2,--n,r="V"):e.V[n][o]===e.S[n-1][o]+e.gap(0)?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2="-"+e.ali2,--n,r="S"):--n:"H"===r?e.H[n][o]===e.H[n][o-1]+e.gapExtensionPenalty?(e.ali1="-"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o,r="H"):e.H[n][o]===e.S[n][o-1]+e.gap(0)?(e.ali1="-"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o,r="S"):--o:jf.error("Alignment: no matrix");for(;n>0;)e.ali1=e.seq1[n-1]+e.ali1,e.ali2="-"+e.ali2,--n;for(;o>0;)e.ali1="-"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o;t.Debug&&jf.timeEnd("Alignment.trace"),t.Debug&&jf.log([this.ali1,this.ali2])};var Jb=function(t){function e(e){var r=this;t.call(this,e),e.scale||(this.scale="rainbow",this.reverse=gn(e.reverse,!0)),this.scalePerModel={},this.structure.eachModel(function(t){r.domain=[t.atomOffset,t.atomEnd],r.scalePerModel[t.index]=r.getScale()})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.scalePerModel[t.modelIndex](t.index)},e}(pf);Hf.add("atomindex",Jb);var tx=function(t){function e(e){if(t.call(this,e),e.scale||(this.scale="OrRd"),!e.domain){var r,i=1/0,n=-1/0;e.sele&&(r=new Cf(e.sele)),this.structure.eachAtom(function(t){var e=t.bfactor;i=Math.min(i,e),n=Math.max(n,e)},r),this.domain=[i,n]}this.bfactorScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.bfactorScale(t.bfactor)},e}(pf);Hf.add("bfactor",tx);var ex=function(t){function e(e){t.call(this,e),e.scale||(this.scale="Spectral");var r={},i={};this.structure.eachModel(function(t){var e=0,n={};t.eachChain(function(t){void 0===n[t.chainid]&&(n[t.chainid]=e,e+=1)}),this.domain=[0,e-1],r[t.index]=n,i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){var e=r[t.modelIndex];return i[t.modelIndex](e[t.chainid])}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("chainid",ex);var rx=function(t){function e(e){if(t.call(this,e),e.scale||(this.scale="Spectral"),e.domain){var r=this.getScale();this.atomColor=function(t){return r(t.chainIndex)}}else{var i={};this.structure.eachModel(function(t){this.domain=[t.chainOffset,t.chainEnd],i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){return i[t.modelIndex](t.chainIndex)}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("chainindex",rx);var ix=function(t){function e(e){t.call(this,e),e.scale||(this.scale="Spectral");var r={},i={};this.structure.eachModel(function(t){var e=0,n={};t.eachChain(function(t){void 0===n[t.chainname]&&(n[t.chainname]=e,e+=1)}),this.domain=[0,e-1],r[t.index]=n,i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){var e=r[t.modelIndex];return i[t.modelIndex](e[t.chainname])}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("chainname",ix);var nx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="RdYlBu"),this.rsrzScale=this.getScale({domain:[2,0]}),this.rsccScale=this.getScale({domain:[.678,1]});var r=e.structure.validation||{};this.rsrzDict=r.rsrzDict||{},this.rsccDict=r.rsccDict||{}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){var e=t.resno;t.inscode&&(e+="^"+t.inscode),t.chainname&&(e+=":"+t.chainname),e+="/"+t.modelIndex;var r=this.rsrzDict[e];if(void 0!==r)return this.rsrzScale(r);var i=this.rsccDict[e];return void 0!==i?this.rsccScale(i):9474192},e}(pf);Hf.add("densityfit",nx);var ox={ARG:{CD:.1,CZ:.5,NE:-.1},ASN:{CG:.55,OD1:-.55},ASP:{CB:-.16,CG:.36,OD1:-.6,OD2:-.6},CYS:{CB:.19,SG:-.19},GLN:{CD:.55,OE1:-.55},GLU:{CD:.36,CG:-.16,OE1:-.6,OE2:-.6},HIS:{CB:.1,CD2:.2,CE1:.45,CG:.15,ND1:.05,NE2:.05},LYS:{CE:.25,NZ:.75},MET:{CE:.06,CG:.06,SD:-.12},PTR:{C:.55,CA:.1,CZ:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SEP:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SER:{CB:.25,OG:-.25},THR:{CB:.25,OG1:-.25},TPO:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,OG1:-1.1,O1P:-.85,O2P:-.85,O3P:-.85,P:1.4},TRP:{CD1:.06,CD2:.1,CE2:-.04,CE3:-.03,CG:-.03,NE1:-.06},TYR:{CZ:.25,OH:-.25},backbone:{C:.55,O:-.55,N:-.35,CA:.1}},ax=12,sx=1.04,cx=.25,ux=function(t){function e(e){function r(t){return t.isProtein()?ox[t.resname]&&ox[t.resname][t.atomname]||ox.backbone[t.atomname]||0:0}t.call(this,e),e.scale||(this.scale="rwb"),e.domain||(this.domain=[-.5,0,.5]);var i=this.getScale(),n=this.structure,o=new Float32Array(n.atomCount),a=[],s=[];n.eachAtom(function(t){if(o[t.index]=r(t)*t.occupancy,"N"===t.atomname){var e=$s(t);void 0!==e&&(a.push(e),s.push(cx*t.occupancy))}});var c=this.structure.getBoundingBox();c.expandByScalar(sx);var u=Hs(a),h=new Ya(u,c),l=new Ya(this.structure.atomStore,c),p=this.atomProxy,d=new g,f=ax*ax;this.positionColor=function(t){for(var e=0,r=l.within(t.x,t.y,t.z,ax),n=0;n=3?10813478:9474192},e}(pf);Hf.add("geoquality",fx);var mx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="RdYlGn");var r,i={};for(r in Fv)i[r]=Fv[r][0];if(!e.domain){var n,o=1/0,a=-1/0;for(r in i)n=i[r],o=Math.min(o,n),a=Math.max(a,n);this.domain=[o,0,a]}var s=this.getScale();this.atomColor=function(t){return s(i[t.resname]||Bv)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("hydrophobicity",mx);var gx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="rainbow"),e.domain||(this.domain=[0,this.structure.modelStore.count]);var r=this.getScale();this.atomColor=function(t){return r(t.modelIndex)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("modelindex",gx);var vx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){switch(t.residueType.moleculeType){case 1:return 3697840;case 2:return 15729279;case 3:return 12496596;case 4:return 16629894;case 5:return 12540695;case 6:return 8374655;default:return 16777113}},e}(pf);Hf.add("moleculetype",vx);var yx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="PuBu"),e.domain||(this.domain=[0,1]);var r=this.getScale();this.atomColor=function(t){return r(t.occupancy)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("occupancy",yx);var bx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="rwb"),e.domain||(this.domain=[-1,1]),this.partialchargeScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.partialchargeScale(t.partialCharge)},e}(pf);Hf.add("partialcharge",bx);var xx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(){return Ws()},e.prototype.volumeColor=function(){return Ws()},e.prototype.positionColor=function(){return Ws()},e}(pf);Hf.add("random",xx);var _x=function(t){function e(e){var r=this;if(t.call(this,e),e.scale||(this.scale="rainbow",this.reverse=gn(e.reverse,!0)),e.domain){var i=this.getScale();this.atomColor=function(t){return i(t.residueIndex)}}else{var n={};this.structure.eachChain(function(t){r.domain=[t.residueOffset,t.residueEnd],n[t.index]=r.getScale()}),this.atomColor=function(t){return n[t.chainIndex](t.residueIndex)}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("residueindex",_x);var wx={ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935,ASH:16711935,GLH:16711935,A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576,DA:10526975,DG:16740464,DI:8454143,DC:16747595,DT:10551200,DU:16744576},Sx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return wx[t.resname]||16711935},e}(pf);Hf.add("resname",Sx);var Ax={alphaHelix:16711808,threeTenHelix:10485888,piHelix:6291584,betaStrand:16762880,betaTurn:6324479,coil:16777215,dna:11403518,rna:16580962,carbohydrate:10921722},Mx=function(t){function e(e){t.call(this,e),this.rp=this.structure.getResidueProxy()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){var e=t.sstruc,r=this.rp;return"h"===e?Ax.alphaHelix:"g"===e?Ax.threeTenHelix:"i"===e?Ax.piHelix:"e"===e||"b"===e?Ax.betaStrand:"t"===e?Ax.betaTurn:(r.index=t.residueIndex,r.isDna()?Ax.dna:r.isRna()?Ax.rna:r.isSaccharide()?Ax.carbohydrate:r.isProtein()||"s"===e||"l"===e?Ax.coil:8421504)},e}(pf);Hf.add("sstruc",Mx);var Ex=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(){return this.value},e.prototype.bondColor=function(){return this.value},e.prototype.valueColor=function(){return this.value},e.prototype.volumeColor=function(){return this.value},e}(pf);Hf.add("uniform",Ex);var Tx=function(t){function e(e){t.call(this,e),this.valueScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.volumeColor=function(t){return this.valueScale(this.volume.data[t])},e}(pf);Hf.add("value",Tx);var Px=function(t){function e(e){t.call(this,e);var r=this.volume;if(r&&r.inverseMatrix){var i=this.getScale(),n=r.inverseMatrix,o=r.data,a=r.nx,s=r.ny,c=a*s,u=new g;this.positionColor=function(t){u.copy(t),u.applyMatrix4(n);var e=Math.floor(u.x),r=Math.floor(u.y),h=Math.floor(u.z),l=(h*s+r)*a+e,p=l+1,d=l+a,f=l+c,m=d+1,g=f+1,v=d+c,y=v+1,b=o[l],x=o[p],_=o[d],w=o[f],S=o[m],A=o[g],M=o[v],E=o[y],T=u.x-e,P=u.y-r,C=u.z-h,I=Qn(b,x,T),R=Qn(w,A,T),L=Qn(_,S,T),O=Qn(M,E,T),D=Qn(Qn(I,L,P),Qn(R,O,P),C);return i(D)}}else{var h=this.value;this.positionColor=function(){return h}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.positionColor=function(){},e}(pf);Hf.add("volume",Px);var Cx=function(t){function e(e,r,i){var n=this,o=i||{};o.name=gn(o.name,r.name),t.call(this,e,o),this.script=r,this.status="loaded",this.script.signals.nameChanged.add(function(t){n.setName(t)})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"script"},e.prototype.addRepresentation=function(){},e.prototype.removeRepresentation=function(){},e.prototype.run=function(){var t=this;this.setStatus("running"),this.script.call(this.stage).then(function(){t.setStatus("finished")}),this.setStatus("called")},e.prototype.dispose=function(){this.signals.disposed.dispatch()},e.prototype.setVisibility=function(){},e.prototype.getCenter=function(){},e.prototype.getZoom=function(){},e.prototype.getBox=function(){},Object.defineProperties(e.prototype,r),e}(jb);Kf.add("script",Cx);var Ix=function(t){function e(e,r,i){var n=i||{};n.name=gn(n.name,r.name),t.call(this,e,n),this.shape=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"shape"},e.prototype.addRepresentation=function(e,r){return t.prototype.addRepresentation.call(this,e,this.shape,r)},e.prototype.getBoxUntransformed=function(){return this.shape.boundingBox},e.prototype.getCenterUntransformed=function(){return this.shape.center},e.prototype.dispose=function(){this.shape.dispose(),t.prototype.dispose.call(this)},Object.defineProperties(e.prototype,r),e}(jb);Kf.add("shape",Ix);var Rx=function(t){function e(e,r,i,n){var o=this,a=i||{};a.name=gn(a.name,r.name),t.call(this,e,a),this.signals=Object.assign(this.signals,{frameChanged:new no,playerChanged:new no,countChanged:new no,parametersChanged:new no}),this.trajectory=r,this.parent=n,this.status="loaded",this.defaultStep=gn(a.defaultStep,void 0),this.defaultTimeout=gn(a.defaultTimeout,50),this.defaultInterpolateType=gn(a.defaultInterpolateType,""),this.defaultInterpolateStep=gn(a.defaultInterpolateStep,5),this.defaultMode=gn(a.defaultMode,"loop"),this.defaultDirection=gn(a.defaultDirection,"forward"),r.signals.frameChanged.add(function(t){o.signals.frameChanged.dispatch(t)}),r.signals.playerChanged.add(function(t){o.signals.playerChanged.dispatch(t)}),r.signals.countChanged.add(function(t){o.signals.countChanged.dispatch(t)}),void 0!==a.initialFrame&&this.setFrame(a.initialFrame)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"trajectory"},e.prototype.addRepresentation=function(e,r){return t.prototype.addRepresentation.call(this,e,this.trajectory,r)},e.prototype.setFrame=function(t){this.trajectory.setFrame(t)},e.prototype.setParameters=function(t){this.trajectory.setParameters(t),this.signals.parametersChanged.dispatch(t)},e.prototype.dispose=function(){this.trajectory.dispose(),t.prototype.dispose.call(this)},e.prototype.getCenter=function(){},Object.defineProperties(e.prototype,r),e}(jb),Lx=function(t){function e(e,r,i){var n=i||{};n.timeOffset=gn(n.timeOffset,e.timeOffset),n.deltaTime=gn(n.deltaTime,e.deltaTime),t.call(this,"",r,n),this.name=e.name,this.path=e.path,this.frames=e.coordinates,this.boxes=e.boxes,this._init(r)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"frames"},e.prototype._makeAtomIndices=function(){"StructureView"===this.structure.type?this.atomIndices=this.structure.getAtomIndices():this.atomIndices=null},e.prototype._loadFrame=function(t,e){var r,i=this.frames[t];if(this.atomIndices){var n=this.atomIndices,o=n.length;r=new Float32Array(3*o);for(var a=0;a0&&(i="( "+e.join(" ) AND ( ")+" )"),new Cf(i)},r.prototype.getStructure=function(){return this.structure.getStructure()},r.prototype.eachBond=function(t,e){this.structure.eachBond(t,this.getSelection(e))},r.prototype.eachAtom=function(t,e){var r=this.getAtomProxy(),i=this.getAtomSet(e),n=this.atomStore.count;if(i.getSize()0&&re)&&(s=!0,n.set(i.index),o.addBond(a,i,1))}s&&n.set(a.index)});var a=new bv(o.count,!0);return jf.timeEnd("Contact within"),{atomSet:n,bondSet:a,bondStore:o}};var qx=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="contact",this.parameters=Object.assign({contactType:{type:"select",rebuild:!0,options:{polar:"polar",polarBackbone:"polar backbone"}},maxDistance:{type:"number",precision:1,max:10,min:.1,rebuild:!0},maxAngle:{type:"integer",max:180,min:0,rebuild:!0},radialSegments:!0,disableImpostor:!0},this.parameters),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.radius=gn(r.radius,.25),this.contactType=gn(r.contactType,"polarBackbone"),this.maxDistance=gn(r.maxDistance,3.5),this.maxAngle=gn(r.maxAngle,40),t.prototype.init.call(this,r)},e.prototype.getContactData=function(t){return{polar:Zs,polarBackbone:Ks}[this.contactType](t,this.maxDistance,this.maxAngle)},e.prototype.getBondData=function(t,e,r){var i=t.getBondData(this.getBondParams(e,r));return i.picking&&(i.picking=new iv(i.picking.array,i.picking.structure,r.bondStore)),i},e.prototype.createData=function(t){var e=this.getContactData(t);return{bufferList:[new Nb(this.getBondData(t,void 0,{bondSet:e.bondSet,bondStore:e.bondStore}),this.getBufferParams({openEnded:!1,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0}))],bondSet:e.bondSet,bondStore:e.bondStore}},e.prototype.updateData=function(t,e){if(!t||t.position){var r=this.getContactData(e.sview);e.bondSet=r.bondSet,e.bondStore=r.bondStore}var i={bondSet:e.bondSet,bondStore:e.bondStore},n=this.getBondData(e.sview,t,i),o={};t&&!t.position||(o.position=Do(n.position1,n.position2),o.position1=n.position1,o.position2=n.position2),t&&!t.color||(o.color=n.color,o.color2=n.color2),t&&!t.radius||(o.radius=n.radius),e.bufferList[0].setAttributes(o)},e}(Eb);Xf.add("contact",qx),Yf.add("shader/SDFFont.vert","uniform float nearClip;\nuniform float clipRadius;\nuniform vec3 clipCenter;\nuniform float xOffset;\nuniform float yOffset;\nuniform float zOffset;\nuniform bool ortho;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvarying vec3 vViewPosition;\n#endif\nvarying vec2 texCoord;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#else\n#include color_pars_vertex\n#endif\nattribute vec2 mapping;\nattribute vec2 inputTexCoord;\nattribute float inputSize;\n#include matrix_scale\n#include common\nvoid main(void){\n#if defined( PICKING )\nvPickingColor = unpackColor( primitiveId );\n#else\n#include color_vertex\n#endif\ntexCoord = inputTexCoord;\nfloat scale = matrixScale( modelViewMatrix );\nfloat _zOffset = zOffset * scale;\nif( texCoord.x == 10.0 ){\n_zOffset -= 0.001;\n}\nvec3 pos = position;\nif( ortho ){\npos += normalize( cameraPosition ) * _zOffset;\n}\nvec4 cameraPos = modelViewMatrix * vec4( pos, 1.0 );\nvec4 cameraCornerPos = vec4( cameraPos.xyz, 1.0 );\ncameraCornerPos.xy += mapping * inputSize * 0.01 * scale;\ncameraCornerPos.x += xOffset * scale;\ncameraCornerPos.y += yOffset * scale;\nif( !ortho ){\ncameraCornerPos.xyz += normalize( -cameraCornerPos.xyz ) * _zOffset;\n}\ngl_Position = projectionMatrix * cameraCornerPos;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvViewPosition = -cameraCornerPos.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n#include radiusclip_vertex\n}"),Yf.add("shader/SDFFont.frag","uniform sampler2D fontTexture;\nuniform float opacity;\nuniform bool showBorder;\nuniform vec3 borderColor;\nuniform float borderWidth;\nuniform vec3 backgroundColor;\nuniform float backgroundOpacity;\nuniform float nearClip;\nuniform float clipRadius;\nvarying vec3 vViewPosition;\nvarying vec2 texCoord;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\nuniform float objectId;\nvarying vec3 vPickingColor;\nconst vec3 vColor = vec3( 0.0 );\n#else\n#include common\n#include color_pars_fragment\n#include fog_pars_fragment\n#endif\n#ifdef SDF\nconst float smoothness = 16.0;\n#else\nconst float smoothness = 256.0;\n#endif\nconst float gamma = 2.2;\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\nif( texCoord.x > 1.0 ){\ngl_FragColor = vec4( backgroundColor, backgroundOpacity );\n}else{\nfloat sdf = texture2D( fontTexture, texCoord ).a;\nif( showBorder ) sdf += borderWidth;\nfloat w = clamp(\nsmoothness * ( abs( dFdx( texCoord.x ) ) + abs( dFdy( texCoord.y ) ) ),\n0.0,\n0.5\n);\nfloat a = smoothstep( 0.5 - w, 0.5 + w, sdf );\na = pow( a, 1.0 / gamma );\nif( a < 0.2 ) discard;\na *= opacity;\nvec3 outgoingLight = vColor;\nif( showBorder && sdf < ( 0.5 + borderWidth ) ){\noutgoingLight = borderColor;\n}\ngl_FragColor = vec4( outgoingLight, a );\n}\n#if defined( PICKING )\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var Yx={},Zx=function(t){var e=Object.assign({},t);if(this.font=gn(e.font,["sans-serif"]),this.size=gn(e.size,36),this.style=gn(e.style,"normal"),this.variant=gn(e.variant,"normal"),this.weight=gn(e.weight,"normal"),this.outline=gn(e.outline,0),this.width=gn(e.width,2048),this.height=gn(e.height,2048),this.gamma=1,"undefined"!=typeof navigator){var r=navigator.userAgent;r.match(/Chrome/)&&r.match(/OS X/)&&(this.gamma=.5)}this.mapped={},this.scratchW=0,this.scratchH=0,this.currentX=0,this.currentY=0,this.build(),this.populate(),this.texture=new Fe(this.canvas2),this.texture.flipY=!1,this.texture.needsUpdate=!0};Zx.prototype.build=function(){var t=this.size+2*this.outline+Math.round(this.size/4),e=this.width/4,r=document.createElement("canvas");r.width=e,r.height=t;var i=r.getContext("2d");i.font=this.style+" "+this.variant+" "+this.weight+" "+this.size+"px "+this.font,i.fillStyle="#FF0000",i.textAlign="left",i.textBaseline="bottom",i.lineJoin="round";for(var n=[],o=3*this.outline,a=0;athis.width&&(this.currentX=0,this.currentY+=this.scratchH),this.currentY+this.scratchH>this.height&&console.warn("canvas to small"),this.mapped[t]={x:this.currentX,y:this.currentY,w:this.scratchW,h:this.scratchH},this.context2.drawImage(this.canvas,0,0,this.scratchW,this.scratchH,this.currentX,this.currentY,this.scratchW,this.scratchH),this.currentX+=this.scratchW),this.mapped[t]},Zx.prototype.get=function(t){return this.mapped[t]||this.placeholder},Zx.prototype.draw=function(t){var e=this.lineHeight,r=this.outline,i=this.context,n=this.scratch,o=this.maxWidth,a=this.colors,s=r,c=e-this.outline,u=i.measureText(t),h=Math.min(o,Math.ceil(u.width+2*s+1));i.clearRect(0,0,h,e);var l,p,d,f,m;if(0===this.outline)for(i.fillText(t,s,c),d=3,l=0,p=(m=(f=i.getImageData(0,0,h,e)).data).length/4;l0;--l)d=l>1?2*l-2:l,i.strokeStyle=a[d-1],i.lineWidth=d,i.strokeText(t,s,c);i.globalCompositeOperation="multiply",i.fillStyle="#FF00FF",i.fillText(t,s,c),m=(f=i.getImageData(0,0,h,e)).data,d=0;var g=this.gamma;for(l=0,p=m.length/4;l0&&(r-=h,n=n.subarray(0,3*r));var l=new bv(s.count,!0);return{text:i,position:n,bondSet:l,bondStore:s}},e.prototype.getBondData=function(t,e,r){var i=t.getBondData(this.getBondParams(e,r));return i.picking&&(i.picking=new av(i.picking.array,i.picking.structure,r.bondStore)),i},e.prototype.create=function(){if(0!==this.structureView.atomCount){var t=this.atomPair.length;if(0!==t){var e=this.getDistanceData(this.structureView,this.atomPair),r=new tt(this.labelColor);this.textBuffer=new Kx({position:e.position,size:No(t,this.labelSize),color:ko(t,r.r,r.g,r.b),text:e.text},this.getBufferParams({fontFamily:this.fontFamily,fontStyle:this.fontStyle,fontWeight:this.fontWeight,sdf:this.sdf,zOffset:this.labelZOffset,opacity:1,visible:this.labelVisible}));var i={bondSet:e.bondSet,bondStore:e.bondStore},n=this.getBondData(this.structureView,void 0,i);this.cylinderBuffer=new Nb(n,this.getBufferParams({openEnded:!1,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0})),this.dataList.push({sview:this.structureView,bondSet:e.bondSet,bondStore:e.bondStore,position:e.position,bufferList:[this.textBuffer,this.cylinderBuffer]})}}},e.prototype.update=function(e){e.position?this.build():t.prototype.update.call(this,e)},e.prototype.updateData=function(t,e){var r={bondSet:e.bondSet,bondStore:e.bondStore},i=this.getBondData(e.sview,t,r),n={},o={},a=this.atomPair.length;if(t.labelSize&&(o.size=No(a,this.labelSize)),t.labelColor){var s=new tt(this.labelColor);o.color=ko(a,s.r,s.g,s.b)}t.color&&(n.color=i.color,n.color2=i.color2),(t.radius||t.scale)&&(n.radius=i.radius),this.textBuffer.setAttributes(o),this.cylinderBuffer.setAttributes(n)},e.prototype.setVisibility=function(e,r){return t.prototype.setVisibility.call(this,e,!0),this.textBuffer&&this.textBuffer.setVisibility(this.labelVisible&&this.visible),r||this.viewer.requestRender(),this},e.prototype.setParameters=function(e){var r={};return e&&e.labelSize&&(r.labelSize=!0),e&&(e.labelColor||0===e.labelColor)&&(r.labelColor=!0),t.prototype.setParameters.call(this,e,r,!1),e&&void 0!==e.labelVisible&&this.setVisibility(this.visible),this},e}(Eb);Xf.add("distance",Qx);var Jx=function(t){function e(e,r){var i=r||{},n=2*(e.position.length/3),o=new tt(gn(i.color,"grey")),a=new Float32Array(3*n),s=ko(n,o.r,o.g,o.b);t.call(this,{position:a,color:s},i),this.scale=gn(i.scale,1),this.setAttributes(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n=this.geometry.attributes;t.position&&t.vector&&(e=t.position,r=t.vector,i=n.position.array,n.position.needsUpdate=!0);var o,a,s=this.size/2,c=this.scale;if(t.position&&t.vector)for(var u=0;u radius2) {\nspaceposition.y = mapping.y * 1.5 * radius1;\nspaceposition.x = mapping.x * 1.5 * radius1;\n} else {\nspaceposition.y = mapping.y * 1.5 * radius2;\nspaceposition.x = mapping.x * 1.5 * radius2;\n}\nspaceposition.w = 1.0;\nvec4 e3 = vec4( 1.0 );\nvec3 e1, e1_temp, e2, e2_temp;\ne3.xyz = normalize(position_atom1-position_atom2);\nif (e3.z == 0.0) { e3.z = 0.0000000000001;}\nif ( (position_atom1.x - position_atom2.x) == 0.0) { position_atom1.x += 0.001;}\nif ( (position_atom1.y - position_atom2.y) == 0.0) { position_atom1.y += 0.001;}\nif ( (position_atom1.z - position_atom2.z) == 0.0) { position_atom1.z += 0.001;}\nvec4 focus = vec4( 1.0 );\nfocus.x = ( position_atom1.x*position_atom1.x - position_atom2.x*position_atom2.x +\n( radius2*radius2 - radius1*radius1 )*e3.x*e3.x/shrink )/(2.0*(position_atom1.x - position_atom2.x));\nfocus.y = ( position_atom1.y*position_atom1.y - position_atom2.y*position_atom2.y +\n( radius2*radius2 - radius1*radius1 )*e3.y*e3.y/shrink )/(2.0*(position_atom1.y - position_atom2.y));\nfocus.z = ( position_atom1.z*position_atom1.z - position_atom2.z*position_atom2.z +\n( radius2*radius2 - radius1*radius1 )*e3.z*e3.z/shrink )/(2.0*(position_atom1.z - position_atom2.z));\ne1.x = 1.0;\ne1.y = 1.0;\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\ne1_temp = e1 - focus.xyz;\ne1 = normalize(e1_temp);\ne2_temp = e1.yzx * e3.zxy - e1.zxy * e3.yzx;\ne2 = normalize(e2_temp);\nmat3 R= mat3( e1.xyz, e2.xyz, e3.xyz );\nvertex_position.xyz = R * spaceposition.xyz;\nvertex_position.w = 1.0;\nvertex_position.x += (position_atom1.x+position_atom2.x) / 2.0;\nvertex_position.y += (position_atom1.y+position_atom2.y) / 2.0;\nvertex_position.z += (position_atom1.z+position_atom2.z) / 2.0;\ngl_Position = modelViewProjectionMatrix * vertex_position;\nvec4 i_near, i_far;\nvec4 near = gl_Position;\nnear.z = 0.0 ;\nnear = modelViewProjectionMatrixInverse * near;\ni_near = near;\nvec4 far = gl_Position;\nfar.z = far.w ;\ni_far = modelViewProjectionMatrixInverse * far;\nprime1 = vec4( position_atom1 - (position_atom1 - focus.xyz)*shrink, 1.0 );\nprime2 = vec4( position_atom2 - (position_atom2 - focus.xyz)*shrink, 1.0 );\nfloat Rsquare = (radius1*radius1/shrink) - (\n(position_atom1.x - focus.x)*(position_atom1.x - focus.x) +\n(position_atom1.y - focus.y)*(position_atom1.y - focus.y) +\n(position_atom1.z - focus.z)*(position_atom1.z - focus.z)\n);\nfocus.w = Rsquare;\nmatrix_near = mat4( i_near, i_far, focus, e3 );\ngl_Position.z = 1.0;\n}"),Yf.add("shader/HyperballStickImpostor.frag","#define STANDARD\n#define IMPOSTOR\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float nearClip;\nuniform float shrink;\nuniform mat4 modelViewMatrix;\nuniform mat4 modelViewProjectionMatrix;\nuniform mat4 modelViewMatrixInverseTranspose;\nuniform mat4 projectionMatrix;\nvarying mat4 matrix_near;\nvarying vec4 prime1;\nvarying vec4 prime2;\nvarying float vRadius;\nvarying float vRadius2;\n#ifdef PICKING\nuniform float objectId;\nvarying vec3 vPickingColor;\n#else\nvarying vec3 vColor1;\nvarying vec3 vColor2;\n#include common\n#include fog_pars_fragment\n#include bsdfs\n#include lights_pars\n#include lights_physical_pars_fragment\n#endif\nbool interior = false;\nfloat calcClip( vec4 cameraPos ){\nreturn dot( cameraPos, vec4( 0.0, 0.0, 1.0, nearClip - 0.5 ) );\n}\nfloat calcClip( vec3 cameraPos ){\nreturn calcClip( vec4( cameraPos, 1.0 ) );\n}\nfloat calcDepth( in vec3 cameraPos ){\nvec2 clipZW = cameraPos.z * projectionMatrix[2].zw + projectionMatrix[3].zw;\nreturn 0.5 + 0.5 * clipZW.x / clipZW.y;\n}\nstruct Ray {\nvec3 origin ;\nvec3 direction ;\n};\nbool cutoff_plane (vec3 M, vec3 cutoff, vec3 x3){\nfloat a = x3.x;\nfloat b = x3.y;\nfloat c = x3.z;\nfloat d = -x3.x*cutoff.x-x3.y*cutoff.y-x3.z*cutoff.z;\nfloat l = a*M.x+b*M.y+c*M.z+d;\nif (l<0.0) {return true;}\nelse{return false;}\n}\nvec3 isect_surf(Ray r, mat4 matrix_coef){\nvec4 direction = vec4(r.direction, 0.0);\nvec4 origin = vec4(r.origin, 1.0);\nfloat a = dot(direction,(matrix_coef*direction));\nfloat b = dot(origin,(matrix_coef*direction));\nfloat c = dot(origin,(matrix_coef*origin));\nfloat delta =b*b-a*c;\ngl_FragColor.a = 1.0;\nif (delta<0.0){\ndiscard;\n}\nfloat t1 =(-b-sqrt(delta))/a;\nreturn r.origin+t1*r.direction;\n}\nvec3 isect_surf2(Ray r, mat4 matrix_coef){\nvec4 direction = vec4(r.direction, 0.0);\nvec4 origin = vec4(r.origin, 1.0);\nfloat a = dot(direction,(matrix_coef*direction));\nfloat b = dot(origin,(matrix_coef*direction));\nfloat c = dot(origin,(matrix_coef*origin));\nfloat delta =b*b-a*c;\ngl_FragColor.a = 1.0;\nif (delta<0.0){\ndiscard;\n}\nfloat t2 =(-b+sqrt(delta))/a;\nreturn r.origin+t2*r.direction;\n}\nRay primary_ray(vec4 near1, vec4 far1){\nvec3 near=near1.xyz/near1.w;\nvec3 far=far1.xyz/far1.w;\nreturn Ray(near,far-near);\n}\nfloat update_z_buffer(vec3 M, mat4 ModelViewP){\nfloat depth1;\nvec4 Ms=(ModelViewP*vec4(M,1.0));\nreturn depth1=(1.0+Ms.z/Ms.w)/2.0;\n}\nvoid main(){\nfloat radius = max( vRadius, vRadius2 );\nvec4 i_near, i_far, focus;\nvec3 e3, e1, e1_temp, e2;\ni_near = vec4(matrix_near[0][0],matrix_near[0][1],matrix_near[0][2],matrix_near[0][3]);\ni_far = vec4(matrix_near[1][0],matrix_near[1][1],matrix_near[1][2],matrix_near[1][3]);\nfocus = vec4(matrix_near[2][0],matrix_near[2][1],matrix_near[2][2],matrix_near[2][3]);\ne3 = vec3(matrix_near[3][0],matrix_near[3][1],matrix_near[3][2]);\ne1.x = 1.0;\ne1.y = 1.0;\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\ne1_temp = e1 - focus.xyz;\ne1 = normalize(e1_temp);\ne2 = normalize(cross(e1,e3));\nvec4 equation = focus;\nfloat shrinkfactor = shrink;\nfloat t1 = -1.0/(1.0-shrinkfactor);\nfloat t2 = 1.0/(shrinkfactor);\nvec4 colonne1, colonne2, colonne3, colonne4;\nmat4 mat;\nvec3 equation1 = vec3(t2,t2,t1);\nfloat A1 = - e1.x*equation.x - e1.y*equation.y - e1.z*equation.z;\nfloat A2 = - e2.x*equation.x - e2.y*equation.y - e2.z*equation.z;\nfloat A3 = - e3.x*equation.x - e3.y*equation.y - e3.z*equation.z;\nfloat A11 = equation1.x*e1.x*e1.x + equation1.y*e2.x*e2.x + equation1.z*e3.x*e3.x;\nfloat A21 = equation1.x*e1.x*e1.y + equation1.y*e2.x*e2.y + equation1.z*e3.x*e3.y;\nfloat A31 = equation1.x*e1.x*e1.z + equation1.y*e2.x*e2.z + equation1.z*e3.x*e3.z;\nfloat A41 = equation1.x*e1.x*A1 + equation1.y*e2.x*A2 + equation1.z*e3.x*A3;\nfloat A22 = equation1.x*e1.y*e1.y + equation1.y*e2.y*e2.y + equation1.z*e3.y*e3.y;\nfloat A32 = equation1.x*e1.y*e1.z + equation1.y*e2.y*e2.z + equation1.z*e3.y*e3.z;\nfloat A42 = equation1.x*e1.y*A1 + equation1.y*e2.y*A2 + equation1.z*e3.y*A3;\nfloat A33 = equation1.x*e1.z*e1.z + equation1.y*e2.z*e2.z + equation1.z*e3.z*e3.z;\nfloat A43 = equation1.x*e1.z*A1 + equation1.y*e2.z*A2 + equation1.z*e3.z*A3;\nfloat A44 = equation1.x*A1*A1 + equation1.y*A2*A2 + equation1.z*A3*A3 - equation.w;\ncolonne1 = vec4(A11,A21,A31,A41);\ncolonne2 = vec4(A21,A22,A32,A42);\ncolonne3 = vec4(A31,A32,A33,A43);\ncolonne4 = vec4(A41,A42,A43,A44);\nmat = mat4(colonne1,colonne2,colonne3,colonne4);\nRay ray = primary_ray(i_near,i_far) ;\nvec3 M;\nM = isect_surf(ray, mat);\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\nvec4 M1 = vec4(M,1.0);\nvec4 M2 = mat*M1;\nvec3 _normal = ( modelViewMatrixInverseTranspose * M2 ).xyz;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\n#ifdef NEAR_CLIP\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 ){\nM = isect_surf2(ray, mat);\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 )\ndiscard;\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / radius ) );\n}\n}else if( gl_FragDepthEXT <= 0.0 ){\nM = isect_surf2(ray, mat);\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix);\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\n}\n}\n#else\nif( gl_FragDepthEXT <= 0.0 ){\nM = isect_surf2(ray, mat);\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\n}\n}\n#endif\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\nfloat distance_ratio = ((M.x-prime2.x)*e3.x + (M.y-prime2.y)*e3.y +(M.z-prime2.z)*e3.z) /\ndistance(prime2.xyz,prime1.xyz);\n#ifdef PICKING\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vViewPosition = -( modelViewMatrix * vec4( M, 1.0 ) ).xyz;\nvec3 vNormal = _normal;\nvec3 vColor;\nif( distance_ratio>0.5 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\nvec3 normal = normalize( vNormal );\nif( interior ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var r_=new Float32Array([-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1]),i_=new Uint16Array([0,1,2,0,2,3,1,5,6,1,6,2,4,6,5,4,7,6,0,7,4,0,3,7,0,5,1,0,4,5,3,2,6,3,6,7]),n_=function(t){function e(e,r){t.call(this,e,r);var i=e||{},n=gn((r||{}).shrink,.14);this.addUniforms({modelViewProjectionMatrix:{value:new v},modelViewProjectionMatrixInverse:{value:new v},modelViewMatrixInverseTranspose:{value:new v},shrink:{value:n}}),this.addAttributes({position1:{type:"v3",value:null},position2:{type:"v3",value:null},color2:{type:"c",value:null},radius:{type:"f",value:null},radius2:{type:"f",value:null}}),this.setAttributes(i),this.makeMapping()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},isImpostor:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{shrink:{uniform:!0}},t.prototype.parameters)},r.isImpostor.get=function(){return!0},r.vertexShader.get=function(){return"HyperballStickImpostor.vert"},r.fragmentShader.get=function(){return"HyperballStickImpostor.frag"},Object.defineProperties(e.prototype,r),e}(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.mapping.get=function(){return r_},r.mappingIndices.get=function(){return i_},r.mappingIndicesSize.get=function(){return 36},r.mappingType.get=function(){return"v3"},r.mappingSize.get=function(){return 8},r.mappingItemSize.get=function(){return 3},Object.defineProperties(e.prototype,r),e}(db)),o_=function(t,e){return!Uf||e&&e.disableImpostor?(t.radius=Uo(t.radius,t.radius2),new Rb(t,e)):new n_(t,e)},a_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="hyperball",this.parameters=Object.assign({shrink:{type:"number",precision:3,max:1,min:.001,buffer:!0}},this.parameters,{multipleBond:null,bondSpacing:null})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.scale=gn(r.scale,.2),r.radius=gn(r.radius,"vdw"),this.shrink=gn(r.shrink,.12),t.prototype.init.call(this,r)},e.prototype.getBondParams=function(e,r){return e&&!e.radius||(r=Object.assign({radius2:!0},r)),t.prototype.getBondParams.call(this,e,r)},e.prototype.createData=function(t){var e=new yb(t.getAtomData(this.getAtomParams()),this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!0}));return this.__center=new Float32Array(3*t.bondCount),{bufferList:[e,new o_(t.getBondData(this.getBondParams()),this.getBufferParams({shrink:this.shrink,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams()),i=e.sview.getBondData(this.getBondParams()),n={},o={};if(!t||t.position){n.position=r.position;var a=i.position1,s=i.position2;o.position=Do(a,s,this.__center),o.position1=a,o.position2=s}t&&!t.color||(n.color=r.color,o.color=i.color,o.color2=i.color2),t&&!t.radius||(n.radius=r.radius,o.radius=i.radius,o.radius2=i.radius2),e.bufferList[0].setAttributes(n),e.bufferList[1].setAttributes(o)},e}(e_);Xf.add("hyperball",a_),Js.prototype={constructor:Js,atomLabel:function(t){var e;switch(this.type){case"atomname":e=t.atomname;break;case"atomindex":e=""+t.index;break;case"occupancy":e=t.occupancy.toFixed(2);break;case"bfactor":e=t.bfactor.toFixed(2);break;case"serial":e=""+t.serial;break;case"element":e=t.element;break;case"atom":e=t.atomname+"|"+t.index;break;case"resname":e=t.resname;break;case"resno":e=""+t.resno;break;case"res":var r=t.resname.toUpperCase();e=(zv[r]||r)+t.resno;break;case"text":e=this.text[t.index];break;default:e=t.qualifiedName()}return void 0===e?"":e}},Js.types={"":"",atomname:"atom name",atomindex:"atom index",occupancy:"occupancy",bfactor:"b-factor",serial:"serial",element:"element",atom:"atom name + index",resname:"residue name",resno:"residue no",res:"residue name + no",text:"text",qualified:"qualified name"};var s_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="label",this.parameters=Object.assign({labelType:{type:"select",options:Js.types,rebuild:!0},labelText:{type:"hidden",rebuild:!0},fontFamily:{type:"select",options:{"sans-serif":"sans-serif",monospace:"monospace",serif:"serif"},buffer:!0},fontStyle:{type:"select",options:{normal:"normal",italic:"italic"},buffer:!0},fontWeight:{type:"select",options:{normal:"normal",bold:"bold"},buffer:!0},sdf:{type:"boolean",buffer:!0},xOffset:{type:"number",precision:1,max:20,min:-20,buffer:!0},yOffset:{type:"number",precision:1,max:20,min:-20,buffer:!0},zOffset:{type:"number",precision:1,max:20,min:-20,buffer:!0},attachment:{type:"select",options:{"bottom-left":"bottom-left","bottom-center":"bottom-center","bottom-right":"bottom-right","middle-left":"middle-left","middle-center":"middle-center","middle-right":"middle-right","top-left":"top-left","top-center":"top-center","top-right":"top-right"},rebuild:!0},showBorder:{type:"boolean",buffer:!0},borderColor:{type:"color",buffer:!0},borderWidth:{type:"number",precision:2,max:.3,min:0,buffer:!0},showBackground:{type:"boolean",rebuild:!0},backgroundColor:{type:"color",buffer:!0},backgroundMargin:{type:"number",precision:2,max:2,min:0,rebuild:!0},backgroundOpacity:{type:"range",step:.01,max:1,min:0,buffer:!0}},this.parameters,{side:null,flatShaded:null,wireframe:null,linewidth:null,roughness:null,metalness:null,diffuse:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.labelType=gn(r.labelType,"res"),this.labelText=gn(r.labelText,{}),this.fontFamily=gn(r.fontFamily,"sans-serif"),this.fontStyle=gn(r.fontStyle,"normal"),this.fontWeight=gn(r.fontWeight,"bold"),this.sdf=gn(r.sdf,"Chrome"===Ff),this.xOffset=gn(r.xOffset,0),this.yOffset=gn(r.yOffset,0),this.zOffset=gn(r.zOffset,.5),this.attachment=gn(r.attachment,"bottom-left"),this.showBorder=gn(r.showBorder,!1),this.borderColor=gn(r.borderColor,"lightgrey"),this.borderWidth=gn(r.borderWidth,.15),this.showBackground=gn(r.showBackground,!1),this.backgroundColor=gn(r.backgroundColor,"lightgrey"),this.backgroundMargin=gn(r.backgroundMargin,.5),this.backgroundOpacity=gn(r.backgroundOpacity,1),t.prototype.init.call(this,r)},e.prototype.createData=function(t){var e={position:!0,color:!0,radius:!0},r=t.getAtomData(this.getAtomParams(e)),i=[],n=new Js(this.labelType,this.labelText);return t.eachAtom(function(t){i.push(n.atomLabel(t))}),{bufferList:[new Kx({position:r.position,size:r.radius,color:r.color,text:i},this.getBufferParams({fontFamily:this.fontFamily,fontStyle:this.fontStyle,fontWeight:this.fontWeight,sdf:this.sdf,xOffset:this.xOffset,yOffset:this.yOffset,zOffset:this.zOffset,attachment:this.attachment,showBorder:this.showBorder,borderColor:this.borderColor,borderWidth:this.borderWidth,showBackground:this.showBackground,backgroundColor:this.backgroundColor,backgroundMargin:this.backgroundMargin,backgroundOpacity:this.backgroundOpacity}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams(t)),i={};t&&!t.position||(i.position=r.position),t&&!t.radius||(i.size=r.radius),t&&!t.color||(i.color=r.color),e.bufferList[0].setAttributes(i)},e}(Eb);Xf.add("label",s_);var c_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="line",this.parameters=Object.assign({multipleBond:{type:"select",rebuild:!0,options:{off:"off",symmetric:"symmetric",offset:"offset"}},bondSpacing:{type:"number",precision:2,max:2,min:.5}},this.parameters,{flatShaded:null,side:null,wireframe:null,roughness:null,metalness:null,diffuse:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.multipleBond=gn(r.multipleBond,"off"),this.bondSpacing=gn(r.bondSpacing,1),t.prototype.init.call(this,r)},e.prototype.getBondParams=function(e,r){return r=Object.assign({multipleBond:this.multipleBond,bondSpacing:this.bondSpacing,radiusParams:{radius:.1,scale:1}},r),t.prototype.getBondParams.call(this,e,r)},e.prototype.createData=function(t){var e={position:!0,color:!0},r=t.getBondData(this.getBondParams(e));return{bufferList:[new kb(r,this.getBufferParams())]}},e.prototype.updateData=function(t,e){var r=e.sview.getBondData(this.getBondParams(t)),i={};t&&!t.position||(i.position1=r.position1,i.position2=r.position2),t&&!t.color||(i.color=r.color,i.color2=r.color2),e.bufferList[0].setAttributes(i)},e.prototype.setParameters=function(e){var r={};return e&&e.bondSpacing&&(r.position=!0),t.prototype.setParameters.call(this,e,r,!1),this},e}(Eb);Xf.add("line",c_),ec.__deps=[os,ns,as,ca,tc],ic.__deps=[os,as,No,ca,ya,da,ba,rc,gn],$f.add("molsurf",function(t,e){var r=t.data.args,i=t.data.params;if(r&&i){var n=new("av"===i.type?ic:ec)(r.coordList,r.radiusList,r.indexList).getSurface(i.type,i.probeRadius,i.scaleFactor,i.cutoff,!0,i.smooth,i.contour),o=[n.position.buffer,n.index.buffer];n.normal&&o.push(n.normal.buffer),n.atomindex&&o.push(n.atomindex.buffer),e({sd:n,p:i},o)}},[ec,ic]);var u_=function(t){this.structure=t};u_.prototype._getAtomData=function(){return this.structure.getAtomData({what:{position:!0,radius:!0,index:!0},radiusParams:{radius:"vdw",scale:1}})},u_.prototype._makeSurface=function(t,e){var r=new ey(e.name,"",t);return r.info.type=e.type,r.info.probeRadius=e.probeRadius,r.info.scaleFactor=e.scaleFactor,r.info.smooth=e.smooth,r.info.cutoff=e.cutoff,r},u_.prototype.getSurface=function(t){var e=t||{},r=this._getAtomData(),i=r.position,n=r.radius,o=r.index,a=new("av"===e.type?ic:ec)(i,n,o).getSurface(e.type,e.probeRadius,e.scaleFactor,e.cutoff,!0,e.smooth,e.contour);return this._makeSurface(a,e)},u_.prototype.getSurfaceWorker=function(t,e){var r=this,i=Object.assign({},t);if(window.Worker){void 0===this.worker&&(this.worker=new Za("molsurf"));var n=this._getAtomData(),o=n.position,a=n.radius,s=n.index,c={args:{coordList:o,radiusList:a,indexList:s},params:i},u=[o.buffer,a.buffer,s.buffer];this.worker.post(c,u,function(t){e(r._makeSurface(t.data.sd,i))},function(t){console.warn("MolecularSurface.getSurfaceWorker error - trying without worker",t),r.worker.terminate(),r.worker=void 0;var n=r.getSurface(i);e(n)})}else{var h=this.getSurface(i);e(h)}},u_.prototype.dispose=function(){this.worker&&this.worker.terminate()};var h_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="surface",this.parameters=Object.assign({surfaceType:{type:"select",rebuild:!0,options:{vws:"vws",sas:"sas",ms:"ms",ses:"ses",av:"av"}},probeRadius:{type:"number",precision:1,max:20,min:0,rebuild:!0},smooth:{type:"integer",precision:1,max:10,min:0,rebuild:!0},scaleFactor:{type:"number",precision:1,max:5,min:0,rebuild:!0},cutoff:{type:"number",precision:2,max:50,min:0,rebuild:!0},contour:{type:"boolean",rebuild:!0},background:{type:"boolean",rebuild:!0},opaqueBack:{type:"boolean",buffer:!0},filterSele:{type:"text",rebuild:!0},colorVolume:{type:"hidden"},useWorker:{type:"boolean",rebuild:!0}},this.parameters,{radiusType:null,radius:null,scale:null}),this.__infoList=[],this.structure.signals.refreshed.add(function(){this.__forceNewMolsurf=!0},this),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,"uniform"),r.colorValue=gn(r.colorValue,14540253),r.disablePicking=gn(r.disablePicking,!0),this.surfaceType=gn(r.surfaceType,"ms"),this.probeRadius=gn(r.probeRadius,1.4),this.smooth=gn(r.smooth,2),this.scaleFactor=gn(r.scaleFactor,2),this.cutoff=gn(r.cutoff,0),this.contour=gn(r.contour,!1),this.background=gn(r.background,!1),this.opaqueBack=gn(r.opaqueBack,!0),this.filterSele=gn(r.filterSele,""),this.colorVolume=gn(r.colorVolume,void 0),this.useWorker=gn(r.useWorker,!0),t.prototype.init.call(this,e)},e.prototype.prepareData=function(t,e,r){var i=this.__infoList[e];if(i||(i={},this.__infoList[e]=i),i.molsurf&&i.sele===t.selection.string)r(e);else{if(this.filterSele){var n=t.structure.getView(new Cf(this.filterSele)),o=n.boundingBox.getSize(),a=Math.max(o.x,o.y,o.z),s=t.getAtomSetWithinPoint(n.center,a/2+6);t=t.getView(new Cf(t.getAtomSetWithinSelection(s,3).toSeleString()))}i.sele=t.selection.string,i.molsurf=new u_(t);var c=this.getSurfaceParams(),u=function(t){i.surface=t,r(e)};this.useWorker?i.molsurf.getSurfaceWorker(c,u):u(i.molsurf.getSurface(c))}},e.prototype.prepare=function(t){var e=this;if((this.__forceNewMolsurf||this.__sele!==this.selection.string||this.__surfaceParams!==JSON.stringify(this.getSurfaceParams()))&&(this.__infoList.forEach(function(t){t.molsurf.dispose()}),this.__infoList.length=0),0===this.structureView.atomCount)return void t();var r=function(){this.__sele=this.selection.string,this.__surfaceParams=JSON.stringify(this.getSurfaceParams()),this.__forceNewMolsurf=!1,t()}.bind(this),i="default"===this.assembly?this.defaultAssembly:this.assembly,n=this.structure.biomolDict[i];n?n.partList.forEach(function(t,i){var o=t.getView(e.structureView);e.prepareData(o,i,function(t){t===n.partList.length-1&&r()})}):this.prepareData(this.structureView,0,r)},e.prototype.createData=function(t,e){var r=this.__infoList[e],i=r.surface,n={position:i.getPosition(),color:i.getColor(this.getColorParams()),index:i.getFilteredIndex(this.filterSele,t)},o=[];if(i.contour){var a=new ab(n,this.getBufferParams({wireframe:!1}));o.push(a)}else{n.normal=i.getNormal(),n.picking=i.getPicking(t.getStructure());var s=new ib(n,this.getBufferParams({background:this.background,opaqueBack:this.opaqueBack,dullInterior:!1})),c=new nb(s);o.push(c)}return{bufferList:o,info:r}},e.prototype.updateData=function(t,e){var r={};if(t.position)return this.__forceNewMolsurf=!0,void this.build();t.color&&(r.color=e.info.surface.getColor(this.getColorParams())),t.index&&(r.index=e.info.surface.getFilteredIndex(this.filterSele,e.sview)),e.bufferList[0].setAttributes(r)},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&e.filterSele&&(r.index=!0),e&&void 0!==e.colorVolume&&(r.color=!0),e&&e.wireframe&&(e.contour||void 0===e.contour&&this.contour)&&(e.wireframe=!1),t.prototype.setParameters.call(this,e,r,i),this},e.prototype.getSurfaceParams=function(t){return Object.assign({type:this.surfaceType,probeRadius:this.probeRadius,scaleFactor:this.scaleFactor,smooth:this.smooth&&!this.contour,cutoff:this.cutoff,contour:this.contour,useWorker:this.useWorker},t)},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.volume=this.colorVolume,e},e.prototype.clear=function(){t.prototype.clear.call(this)},e.prototype.dispose=function(){this.__infoList.forEach(function(t){t.molsurf.dispose()}),this.__infoList.length=0,t.prototype.dispose.call(this)},e}(Eb);Xf.add("surface",h_);var l_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="point",this.parameters=Object.assign({pointSize:{type:"number",precision:1,max:100,min:0,buffer:!0},sizeAttenuation:{type:"boolean",buffer:!0},sortParticles:{type:"boolean",rebuild:!0},useTexture:{type:"boolean",buffer:!0},alphaTest:{type:"range",step:.001,max:1,min:0,buffer:!0},forceTransparent:{type:"boolean",buffer:!0},edgeBleach:{type:"range",step:.001,max:1,min:0,buffer:!0}},this.parameters,{flatShaded:null,wireframe:null,linewidth:null,roughness:null,metalness:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.pointSize=gn(r.pointSize,1),this.sizeAttenuation=gn(r.sizeAttenuation,!0),this.sortParticles=gn(r.sortParticles,!1),this.useTexture=gn(r.useTexture,!1),this.alphaTest=gn(r.alphaTest,.5),this.forceTransparent=gn(r.forceTransparent,!1),this.edgeBleach=gn(r.edgeBleach,0),t.prototype.init.call(this,r)},e.prototype.createData=function(t){var e={position:!0,color:!0,picking:!0},r=t.getAtomData(this.getAtomParams(e));return{bufferList:[new bb(r,this.getBufferParams({pointSize:this.pointSize,sizeAttenuation:this.sizeAttenuation,sortParticles:this.sortParticles,useTexture:this.useTexture,alphaTest:this.alphaTest,forceTransparent:this.forceTransparent,edgeBleach:this.edgeBleach}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams(t)),i={};t&&!t.position||(i.position=r.position),t&&!t.color||(i.color=r.color),e.bufferList[0].setAttributes(i)},e}(Eb);Xf.add("point",l_),Yf.add("shader/Ribbon.vert","#define STANDARD\nuniform float nearClip;\nuniform vec3 clipCenter;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\nattribute vec3 dir;\nattribute float size;\n#ifdef PICKING\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#else\n#include color_pars_vertex\n#ifndef FLAT_SHADED\nvarying vec3 vNormal;\n#endif\n#endif\n#include common\nvoid main(void){\n#ifdef PICKING\nvPickingColor = unpackColor( primitiveId );\n#else\n#include color_vertex\n#include beginnormal_vertex\n#include defaultnormal_vertex\n#ifndef FLAT_SHADED\nvNormal = normalize( transformedNormal );\n#endif\n#endif\n#include begin_vertex\ntransformed += normalize( dir ) * size;\n#include project_vertex\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvViewPosition = -mvPosition.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}");var p_=new Uint16Array([0,1,2,1,3,2]),d_=function(t){function e(e,r){var i=e||{},n=i.position.length/3-1,o=4*n,a=3*o,s=new Float32Array(a),c=new Float32Array(a),u=new Float32Array(a),h=On(a,a/3);t.call(this,{position:s,color:c,index:h,normal:u,picking:i.picking},r),this.addAttributes({dir:{type:"v3",value:new Float32Array(a)}}),this.addAttributes({size:{type:"f",value:new Float32Array(o)}}),i.primitiveId=Bo(n),this.setAttributes(i),this.meshIndex=h,this.makeIndex()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertexShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n,o,a,s,c,u,h,l,p,d=this.size/4,f=this.geometry.attributes;t.position&&(e=t.position,s=f.position.array,f.position.needsUpdate=!0),t.normal&&(r=t.normal,c=f.normal.array,f.normal.needsUpdate=!0),t.size&&(i=t.size,u=f.size.array,f.size.needsUpdate=!0),t.dir&&(n=t.dir,h=f.dir.array,f.dir.needsUpdate=!0),t.color&&(o=t.color,l=f.color.array,f.color.needsUpdate=!0),t.primitiveId&&(a=t.primitiveId,p=f.primitiveId.array,f.primitiveId.needsUpdate=!0);var m,g,v,y,b,x,_,w=i?i[0]:null;for(m=0;m0)continue;var o=void 0,st=void 0,vt=void 0,yt=void 0,bt=void 0;if(U){if(yt=l.split(dw),bt=10===yt.length?1:0,x=yt[2],q&&"CA"!==x)continue;o=parseFloat(yt[6-bt]),st=parseFloat(yt[7-bt]),vt=parseFloat(yt[8-bt])}else{if(x=l.substr(12,4).trim(),q&&"CA"!==x)continue;o=parseFloat(l.substr(30,8)),st=parseFloat(l.substr(38,8)),vt=parseFloat(l.substr(46,8))}if(X){var xt=3*s;if(a[xt+0]=o,a[xt+1]=st,a[xt+2]=vt,s+=1,K)continue}var _t=void 0;U?(d=parseInt(yt[1]),_t="",_="H"===l[0]?1:0,f=bt?"":yt[4],m=parseInt(yt[5-bt]),b="",g=yt[3],S="",y=0):(d=parseInt(l.substr(6,5),$),V&&99999===d&&($=16),_="H"===l[0]?1:0,f=l[21].trim(),m=parseInt(l.substr(22,4),H)||1,V&&9999===m&&(H=16),b=l[26].trim(),g=l.substr(17,4).trim()||"MOL",w=parseFloat(l.substr(60,6)),S=l[16].trim(),y=parseFloat(l.substr(54,6)),r||(_t=l.substr(76,2).trim(),f||(f=l.substr(72,4).trim()))),lt.growIfFull(),lt.atomTypeId[ft]=ht.add(x,_t),lt.x[ft]=o,lt.y[ft]=st,lt.z[ft]=vt,lt.serial[ft]=d,lt.altloc[ft]=S.charCodeAt(0),lt.occupancy[ft]=isNaN(y)?0:y,U?(lt.partialCharge[ft]=parseFloat(yt[9-bt]),lt.radius[ft]=parseFloat(yt[10-bt])):lt.bfactor[ft]=isNaN(w)?0:w;var wt=ac(m,f,b);!_||nt[wt]||lw.includes(g)?D||N===f||(O=(L+=1).toString()):N===f&&F===g&&($v.includes(g)||k===m&&B===b)||(O=(L+=1).toString(),k=m,F=g,B=b),G.addAtom(mt,f,O,g,m,_,void 0,b),J[d]=ft,ft+=1,D=!1,N=f}else if("CONECT"===p){var St=J[parseInt(l.substr(6,5))],At=[11,16,21,26],Mt={};if(void 0===St)continue;for(var Et=0;Et<4;++Et){var Tt=parseInt(l.substr(At[Et],5));if(!Number.isNaN(Tt)&&void 0!==(Tt=J[Tt]))if(St0)continue;var ot=it[c].replace(vw,"");if(T&&"CA"!==ot)continue;var at=parseFloat(it[y]),st=parseFloat(it[b]),ct=parseFloat(it[x]);if(E){var ut=3*i;if(r[ut+0]=at,r[ut+1]=st,r[ut+2]=ct,i+=1,X>0)continue}var ht=it[u],lt=parseInt(it[s]),pt=it[v];pt="?"===pt?"":pt;var dt=it[a],ft=it[h],mt="H"===it[d][0]?1:0,gt=it[m],vt=parseFloat(it[_]),yt=parseFloat(it[w]),bt=it[p];if(bt="."===bt?"":bt,$.growIfFull(),$.atomTypeId[W]=V.add(ot,gt),$.x[W]=at,$.y[W]=st,$.z[W]=ct,$.serial[W]=parseInt(it[f]),$.bfactor[W]=isNaN(vt)?0:vt,$.occupancy[W]=isNaN(yt)?0:yt,$.altloc[W]=bt.charCodeAt(0),A.addAtom(X,dt,ft,ht,lt,mt,void 0,pt),t.Debug){var xt=I[ft];void 0!==xt&&xt!==dt&&t.Debug&&jf.warn(xt,dt)}I[ft]=dt;var _t=it[l];R[_t]||(R[_t]=new Set),R[_t].add(S.chainStore.count-1),W+=1}else{var wt=o.match(gw),St=wt.length;B===F.length&&(B=0);for(var At=0;At_)continue}d=P.substr(5,5).trim(),f=parseInt(P.substr(0,5)),m=parseInt(P.substr(15,5)),S.growIfFull(),S.atomTypeId[A]=w.add(p),S.x[A]=R,S.y[A]=L,S.z[A]=O,S.serial[A]=m,o.addAtom(M,"","",d,f,0,"l"),A+=1}}}t.Debug&&jf.time("GroParser._parse "+this.name);var r,i,n=this.structure,o=this.structureBuilder,a=this.firstModelOnly,s=this.asTrajectory,c=this.cAlphaOnly,u=n.frames,h=n.boxes,l=this.streamer.peekLines(3);n.title=l[0].trim();var p,d,f,m,g=5+(l[2].length-l[2].lastIndexOf(".")-1),v=20,y=20+g,b=20+2*g,x=parseInt(l[1]),_=x+3,w=n.atomMap,S=n.atomStore;S.resize(x);var A=0,M=0,E=0;this.streamer.eachChunkOfLines(function(t){e(0,t.length,t)}),o.finalize(),n.finalizeAtoms(),gs(n),vs(n),n.finalizeBonds(),xy(n),t.Debug&&jf.timeEnd("GroParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add("gro",xw);var _w=["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"],ww=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"].concat(_w),Sw={0:"i".charCodeAt(0),1:"s".charCodeAt(0),2:"h".charCodeAt(0),3:"e".charCodeAt(0),4:"g".charCodeAt(0),5:"b".charCodeAt(0),6:"t".charCodeAt(0),7:"l".charCodeAt(0),"-1":"".charCodeAt(0)},Aw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"mmtf"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("MmtfParser._parse "+this.name);var e,r,i,n,o,a=this.structure,s=zc(Fc(this.streamer.data));["depositionDate","releaseDate","resolution","rFree","rWork","experimentalMethods"].forEach(function(t){void 0!==s[t]&&(a.header[t]=s[t])});var c,u,h,l,p,d;if(a.id=s.structureId,a.title=s.title,this.firstModelOnly||this.asTrajectory){for(p=1,h=0,e=0,r=l=s.chainsPerModel[0];e0&&(a.biomolDict.NCS=at)}var ct=s.unitCell;ct&&Array.isArray(ct)&&ct[0]?a.unitcell=new uw({a:ct[0],b:ct[1],c:ct[2],alpha:ct[3],beta:ct[4],gamma:ct[5],spacegroup:s.spaceGroup}):a.unitcell=void 0,_s(a,!0),xs(a,!0),a.finalizeAtoms(),a.finalizeBonds(),ws(a),t.Debug&&jf.timeEnd("MmtfParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add("mmtf",Aw);var Mw=/\s+/,Ew={1:1,2:2,3:3,am:1,ar:1,du:1,un:1,nc:0},Tw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return"mol2"},r.prototype._parse=function(){function e(t,e,S){for(var A=t;AMOLECULE"===M?(v=y,d=0,++m):"@ATOM"===M?(v=b,f=l.count,s&&(i=0,r=new Float32Array(3*g),c.push(r),m>0&&(u=!0))):v="@BOND"===M?x:0;else if(v===y){if(0===d)n.title=M,n.id=M;else if(1===d){var E=M.split(Mw);g=parseInt(E[0])}++d}else if(v===b){var T=M.split(Mw);if(a&&m>0)continue;var P=parseFloat(T[2]),C=parseFloat(T[3]),I=parseFloat(T[4]);if(s){var R=3*i;if(r[R+0]=P,r[R+1]=C,r[R+2]=I,i+=1,u)continue}var L=T[0],O=T[1],D=T[5].split(".")[0],N=T[6]?parseInt(T[6]):1,k=T[7]?T[7]:"",F=T[8]?parseFloat(T[8]):0;l.growIfFull(),l.atomTypeId[p]=h.add(O,D),l.x[p]=P,l.y[p]=C,l.z[p]=I,l.serial[p]=L,l.partialCharge[p]=F,o.addAtom(m,"","",k,N,1),p+=1}else if(v===x){if(a&&m>0)continue;if(s&&m>0)continue;var B=M.split(Mw);_.index=parseInt(B[1])-1+f,w.index=parseInt(B[2])-1+f;var z=Ew[B[3]];n.bondStore.addBond(_,w,z)}}}t.Debug&&jf.time("Mol2Parser._parse "+this.name);var r,i,n=this.structure,o=this.structureBuilder,a=this.firstModelOnly,s=this.asTrajectory,c=n.frames,u=!1,h=n.atomMap,l=n.atomStore;l.resize(Math.round(this.streamer.data.length/60)),l.addField("partialCharge",1,"float32");var p=0,d=0,f=0,m=-1,g=0,v=0,y=1,b=2,x=3,_=n.getAtomProxy(),w=n.getAtomProxy();this.streamer.eachChunkOfLines(function(t){e(0,t.length,t)}),o.finalize(),n.finalizeAtoms(),gs(n),xs(n,!0),_s(n,!0),n.finalizeBonds(),As(n),xy(n),t.Debug&&jf.timeEnd("Mol2Parser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add("mol2",Tw);var Pw=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"pqr"},Object.defineProperties(e.prototype,r),e}(fw);qf.add("pqr",Pw);var Cw=/> <(.+)>/,Iw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return"sdf"},r.prototype._parse=function(){function e(t,e,a){for(var C=t;C0&&(h=!0));else if(v>=M&&v0)continue;var R=parseFloat(I.substr(0,10)),L=parseFloat(I.substr(10,10)),O=parseFloat(I.substr(20,10));if(o){var D=3*c;if(s[D+0]=R,s[D+1]=L,s[D+2]=O,c+=1,h)continue}var N=I.substr(31,3).trim(),k=N+(g+1);p.growIfFull(),p.atomTypeId[g]=l.add(k,N),p.x[g]=R,p.y[g]=L,p.z[g]=O,p.serial[g]=g,p.formalCharge[g]=0,i.addAtom(y,"","","HET",1,1),g+=1}else if(v>=T&&v0)continue;if(o&&y>0)continue;f.index=parseInt(I.substr(0,3))-1+b,m.index=parseInt(I.substr(3,3))-1+b;var F=parseInt(I.substr(6,3));r.bondStore.addBond(f,m,F)}else if(I.match(/M {2}CHG/))for(var B=parseInt(I.substr(6,3)),z=0,U=10;z0)return void jf.error("dcd format with fixed atoms unsupported, aborting");for(var v=a.NATOM,y=4*v,b=0,x=a.NSET;b=1&&(i.timeOffset=(a.ISTART-1)*i.deltaTime),t.Debug&&jf.timeEnd("DcdParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("dcd",uS);var hS={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6},lS=0,pS=10,dS=11,fS=12,mS=function(t){var e=new vm(t);e.setBigEndian(),jc("CDF"!==e.readChars(3),"should start with CDF");var r=e.readByte();jc(r>2,"unknown version"),this.header=Qc(e,r),this.buffer=e},gS={version:{},recordDimension:{},dimensions:{},globalAttributes:{},variables:{}};gS.version.get=function(){return 1===this.header.version?"classic format":"64-bit offset format"},gS.recordDimension.get=function(){return this.header.recordDimension},gS.dimensions.get=function(){return this.header.dimensions},gS.globalAttributes.get=function(){return this.header.globalAttributes},gS.variables.get=function(){return this.header.variables},mS.prototype.hasDataVariable=function(t){return-1!==this.header.variables.findIndex(function(e){return e.name===t})},mS.prototype.getDataVariable=function(t){var e;return e="string"==typeof t?this.header.variables.find(function(e){return e.name===t}):t,jc(void 0===e,"variable not found"),this.buffer.seek(e.offset),e.record?Kc(this.buffer,e,this.header.recordDimension):Zc(this.buffer,e)},Object.defineProperties(mS.prototype,gS);var vS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"nctraj"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("NctrajParser._parse "+this.name);var e=new mS(this.streamer.data),r=this.frames,i=r.coordinates,n=r.boxes,o=r.times;e.getDataVariable("coordinates").forEach(function(t){i.push(new Float32Array(t))}),e.hasDataVariable("cell_lengths")&&e.getDataVariable("cell_lengths").forEach(function(t){n.push(new Float32Array(t))}),e.hasDataVariable("time")&&e.getDataVariable("time").forEach(function(t){o.push(t)}),o.length>=1&&(r.timeOffset=o[0]),o.length>=2&&(r.deltaTime=o[1]-o[0]),t.Debug&&jf.timeEnd("NctrajParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("nctraj",vS),qf.add("ncdf",vS),qf.add("nc",vS);var yS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"trr"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("TrrParser._parse "+this.name);for(var e=Nn(this.streamer.data),r=new DataView(e),i=this.frames,n=i.coordinates,o=i.boxes,a=i.times,s=0;;){s+=8;var c=r.getInt32(s);s+=4,s+=c;var u=r.getInt32(s+8),h=r.getInt32(s+12),l=r.getInt32(s+16),p=r.getInt32(s+28),d=r.getInt32(s+32),f=r.getInt32(s+36),m=r.getInt32(s+40);s+=52;var g=u/9,v=3*m;if(8===g?a.push(r.getFloat64(s)):a.push(r.getFloat32(s)),s+=2*g,u){var y=new Float32Array(9);if(8===g)for(var b=0;b<9;++b)y[b]=10*r.getFloat64(s),s+=8;else for(var x=0;x<9;++x)y[x]=10*r.getFloat32(s),s+=4;o.push(y)}if(s+=h,s+=l,p){var _=void 0;if(8===g){_=new Float32Array(v);for(var w=0;w>8&65280|M>>24&255}_=new Float32Array(e,s,v);for(var E=0;E=e.byteLength)break}a.length>=1&&(i.timeOffset=a[0]),a.length>=2&&(i.deltaTime=a[1]-a[0]),t.Debug&&jf.timeEnd("TrrParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("trr",yS);var bS=new Uint32Array([0,0,0,0,0,0,0,0,0,8,10,12,16,20,25,32,40,50,64,80,101,128,161,203,256,322,406,512,645,812,1024,1290,1625,2048,2580,3250,4096,5060,6501,8192,10321,13003,16384,20642,26007,32768,41285,52015,65536,82570,104031,131072,165140,208063,262144,330280,416127,524287,660561,832255,1048576,1321122,1664510,2097152,2642245,3329021,4194304,5284491,6658042,8388607,10568983,13316085,16777216]),xS=new Uint8Array(32),_S=new Int32Array(32),wS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"xtc"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("XtcParser._parse "+this.name);for(var e=Nn(this.streamer.data),r=new DataView(e),i=this.frames,n=i.coordinates,o=i.boxes,a=i.times,s=new Int32Array(6),c=new Int32Array(3),u=new Int32Array(3),h=new Uint32Array(3),l=new Float32Array(3),p=new Float32Array(3),d=0,f=new Int32Array(3),m=new Uint32Array(f.buffer);;){var g=void 0,v=r.getInt32(d+4);d+=12;var y=3*v;a.push(r.getFloat32(d)),d+=4;for(var b=new Float32Array(9),x=0;x<9;++x)b[x]=10*r.getFloat32(d),d+=4;if(o.push(b),v<=9)for(var _=0;_16777215?(u[0]=ru(c[0]),u[1]=ru(c[1]),u[2]=ru(c[2]),M=0):M=iu(3,c);var E=r.getInt32(d);d+=4;var T=E-1,P=bS[T=9>T?9:T]/2|0,C=bS[E]/2|0;h[0]=h[1]=h[2]=bS[E];var I=4*Math.ceil(r.getInt32(d)/4);d+=4;var R=1/A,L=0,O=0,D=new Uint8Array(e,d);for(l[0]=l[1]=l[2]=0;O0){l[0]=l[1]=l[2]=0;for(var k=0;k9?bS[E-1]/2|0:0):N>0&&(P=C,C=bS[E]/2|0),h[0]=h[1]=h[2]=bS[E],0===h[0]||0===h[1]||0===h[2])return void console.error("(xdrfile error) Undefined error.")}d+=I}for(var B=0;B=e.byteLength)break}a.length>=1&&(i.timeOffset=a[0]),a.length>=2&&(i.deltaTime=a[1]-a[0]),t.Debug&&jf.timeEnd("XtcParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("xtc",wS);var SS=function(t){function e(e,r){var i=r||{};t.call(this,e,i),this.volume=new iy(this.name,this.path),this.voxelSize=gn(i.voxelSize,1)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},__objName:{}};return r.type.get=function(){return"volume"},r.__objName.get=function(){return"volume"},e.prototype._afterParse=function(){this.volume.setMatrix(this.getMatrix()),t.prototype._afterParse.call(this)},e.prototype.getMatrix=function(){return new v},Object.defineProperties(e.prototype,r),e}(nw),AS=/\s+/,MS=/-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g,ES=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return"cube"},r.prototype._parse=function(){function e(t,e){var r=n[t].trim().split(AS)[e];return parseFloat(r)}function r(t,e,r){for(var i=t;i=o.atomCount+6+h)for(var a=n.match(MS),l=0,p=a.length;l0?0:1;this.streamer.eachChunkOfLines(function(t){r(0,t.length,t)}),i.header=o,i.setData(s,o.NVZ,o.NVY,o.NVX),t.Debug&&jf.timeEnd("CubeParser._parse "+this.name)},r.prototype.getMatrix=function(){var t=this.volume.header,e=new v;return e.multiply((new v).makeTranslation(t.originX,t.originY,t.originZ)),e.multiply((new v).makeBasis(t.basisZ,t.basisY,t.basisX)),e},Object.defineProperties(r.prototype,i),r}(SS);qf.add("cub",ES),qf.add("cube",ES);var TS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"dsn6"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("Dsn6Parser._parse "+this.name);var e,r,i=this.volume,n={},o=Nn(this.streamer.data),a=new Int16Array(o),s=new Uint8Array(o),c=String.fromCharCode.apply(null,s.subarray(0,512));if(c.startsWith(":-)"))n.xStart=parseInt(c.substr(10,5)),n.yStart=parseInt(c.substr(15,5)),n.zStart=parseInt(c.substr(20,5)),n.xExtent=parseInt(c.substr(32,5)),n.yExtent=parseInt(c.substr(38,5)),n.zExtent=parseInt(c.substr(42,5)),n.xRate=parseInt(c.substr(52,5)),n.yRate=parseInt(c.substr(58,5)),n.zRate=parseInt(c.substr(62,5)),n.xlen=parseFloat(c.substr(73,10))*this.voxelSize,n.ylen=parseFloat(c.substr(83,10))*this.voxelSize,n.zlen=parseFloat(c.substr(93,10))*this.voxelSize,n.alpha=parseFloat(c.substr(103,10)),n.beta=parseFloat(c.substr(113,10)),n.gamma=parseFloat(c.substr(123,10)),e=parseFloat(c.substr(138,12))/100,r=parseInt(c.substr(155,8)),n.sigma=100*parseFloat(c.substr(170,12));else{if(100!==a[18])for(var u=0,h=a.length;u>8&255}n.xStart=a[0],n.yStart=a[1],n.zStart=a[2],n.xExtent=a[3],n.yExtent=a[4],n.zExtent=a[5],n.xRate=a[6],n.yRate=a[7],n.zRate=a[8];var p=1/a[17],d=p*this.voxelSize;n.xlen=a[9]*d,n.ylen=a[10]*d,n.zlen=a[11]*d,n.alpha=a[12]*p,n.beta=a[13]*p,n.gamma=a[14]*p,e=a[15]/100,r=a[16],n.gamma=a[14]*p}i.header=n,t.Debug&&jf.log(n,e,r);for(var f=new Float32Array(n.xExtent*n.yExtent*n.zExtent),m=512,g=Math.ceil(n.xExtent/8),v=Math.ceil(n.yExtent/8),y=Math.ceil(n.zExtent/8),b=0;ba){var n=r[i].trim();if(""!==n)for(var o=n.split(PS),l=0,p=o.length;l=a&&(g-a)%f!=0&&m=0?r-1:r+e/3)},parseNormalIndex:function(t,e){var r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)},addVertex:function(t,e,r){var i=this.vertices,n=this.object.geometry.vertices;n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2]),n.push(i[r+0]),n.push(i[r+1]),n.push(i[r+2])},addVertexLine:function(t){var e=this.vertices,r=this.object.geometry.vertices;r.push(e[t+0]),r.push(e[t+1]),r.push(e[t+2])},addNormal:function(t,e,r){var i=this.normals,n=this.object.geometry.normals;n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2]),n.push(i[r+0]),n.push(i[r+1]),n.push(i[r+2])},addFace:function(t,e,r,i,n,o,a,s){var c,u=this.vertices.length,h=this.parseVertexIndex(t,u),l=this.parseVertexIndex(e,u),p=this.parseVertexIndex(r,u);if(void 0===i?this.addVertex(h,l,p):(c=this.parseVertexIndex(i,u),this.addVertex(h,l,c),this.addVertex(l,p,c)),void 0!==n){var d=this.normals.length;h=this.parseNormalIndex(n,d),l=n===o?h:this.parseNormalIndex(o,d),p=n===a?h:this.parseNormalIndex(a,d),void 0===i?this.addNormal(h,l,p):(c=this.parseNormalIndex(s,d),this.addNormal(h,l,c),this.addNormal(l,p,c))}},addLineGeometry:function(t){var e=this;this.object.geometry.type="Line";for(var r=this.vertices.length,i=0,n=t.length;i0?x.addAttribute("normal",new St(new Float32Array(b.normals),3)):x.computeVertexNormals(),y.push(x)}}return y}};var NS=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"obj"},e.prototype.getLoader=function(){return new su},Object.defineProperties(e.prototype,r),e}(DS);qf.add("obj",NS),cu.prototype={constructor:cu,setPropertyNameMapping:function(t){this.propertyNameMapping=t},bin2str:function(t){for(var e=new Uint8Array(t),r="",i=0;i=n.elements[s].count&&(s++,c=0);var l=r.parseASCIIElement(n.elements[s].properties,h);r.handleElement(i,n.elements[s].name,l),c++}}return this.postProcess(i)},postProcess:function(t){if(t.useColor){for(var e=0;e0&&(a[C]=I)}else{var R=T.getElementsByTagName("clash"),L=T.getElementsByTagName("mog-bond-outlier"),O=T.getElementsByTagName("mog-angle-outlier");if(L.length>0||O.length>0||R.length>0){var D={};s[C]=D;for(var N=0,k=R.length;N>>1:t>>>1;e[r]=t}return e}(),JS=30,tA=12,eA=15,rA=852,iA=592,nA=0,oA=1,aA=2,sA=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],cA=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],uA=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],hA=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],lA=0,pA=1,dA=2,fA=4,mA=5,gA=6,vA=0,yA=1,bA=2,xA=-2,_A=-3,wA=-4,SA=-5,AA=8,MA=1,EA=2,TA=3,PA=4,CA=5,IA=6,RA=7,LA=8,OA=9,DA=10,NA=11,kA=12,FA=13,BA=14,zA=15,UA=16,jA=17,GA=18,VA=19,$A=20,HA=21,WA=22,XA=23,qA=24,YA=25,ZA=26,KA=27,QA=28,JA=29,tM=30,eM=31,rM=32,iM=852,nM=592,oM=!0,aM=!0,sM=!0;try{String.fromCharCode.apply(null,[0])}catch(t){aM=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){sM=!1}for(var cM=new Uint8Array(256),uM=0;uM<256;uM++)cM[uM]=uM>=252?6:uM>=248?5:uM>=240?4:uM>=224?3:uM>=192?2:1;cM[254]=cM[254]=1;var hM=0,lM={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},pM=Object.prototype.toString;Vu.prototype.push=function(t,e){var r,i,n,o,a,s,c=this,u=this.strm,h=this.options.chunkSize,l=this.options.dictionary,p=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?u.input=Bu(t):"[object ArrayBuffer]"===pM.call(t)?u.input=new Uint8Array(t):u.input=t,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new Uint8Array(h),u.next_out=0,u.avail_out=h),2===(r=Lu(u,0))&&l&&(s="string"==typeof l?ku(l):"[object ArrayBuffer]"===pM.call(l)?new Uint8Array(l):l,r=Nu(c.strm,s)),-5===r&&!0===p&&(r=hM,p=!1),1!==r&&r!==hM)return c.onEnd(r),c.ended=!0,!1;u.next_out&&(0!==u.avail_out&&1!==r&&(0!==u.avail_in||4!==i&&2!==i)||("string"===c.options.to?(n=Uu(u.output,u.next_out),o=u.next_out-n,a=zu(u.output,n),u.next_out=o,u.avail_out=h-o,o&&yu(u.output,u.output,n,o,0),c.onData(a)):c.onData(vu(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(p=!0)}while((u.avail_in>0||0===u.avail_out)&&1!==r);return 1===r&&(i=4),4===i?(r=Ou(this.strm),this.onEnd(r),this.ended=!0,r===hM):2!==i||(this.onEnd(hM),u.avail_out=0,!0)},Vu.prototype.onData=function(t){this.chunks.push(t)},Vu.prototype.onEnd=function(t){t===hM&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=bu(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},Zf.add("gz",Hu);var dM=function(){};dM.prototype.getUrl=function(t){},dM.prototype.getExt=function(t){};var fM="//mmtf.rcsb.org/v1.0/full/",mM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e,r=wn(t),i=r.name.substr(0,4);return!["pdb","cif"].includes(r.ext)||!1!==r.compressed&&"gz"!==r.compressed?"mmtf"===r.ext?e=r.base.endsWith(".bb")?"//mmtf.rcsb.org/v1.0/reduced/"+i:fM+i:r.ext?(jf.warn("unsupported ext",r.ext),e=fM+i):e=fM+i:e="//files.rcsb.org/download/"+r.path,yn()+e},e.prototype.getExt=function(t){var e=wn(t);if("mmtf"===e.ext||!e.ext)return"mmtf"},e}(dM);Wf.add("rcsb",new mM);var gM="//pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/",vM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e,r=wn(t),i=r.name;return r.ext&&"sdf"!==r.ext?(jf.warn("unsupported ext",r.ext),e=gM+i+"/SDF?record_type=3d"):e=gM+i+"/SDF?record_type=3d",yn()+e},e.prototype.getExt=function(t){var e=wn(t);if(!e.ext||"sdf"===e.ext)return"sdf"},e}(dM);Wf.add("pubchem",new vM);var yM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){return t},e}(dM);Wf.add("ftp",new yM),Wf.add("http",new yM),Wf.add("https",new yM);var bM=/^((http|https|ftp):)*\/\//,xM=function(t){function e(e){t.call(this),this.baseUrl=e||""}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e=wn(t),r=this.baseUrl+e.path;return bM.test(this.baseUrl)||(r=xn(r)),r},e}(dM),_M=function(t){function e(e){t.call(this),this.baseUrl=e||""}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getListing=function(t){t=t||"";var e=this.baseUrl+"dir/"+t;return"/"!==e[e.length-1]&&(e+="/"),Mo(e,{ext:"json"}).then(function(e){return{path:t,data:e.data}})},e.prototype.getUrl=function(t){var e=wn(t);return this.baseUrl+"file/"+e.path},e.prototype.getCountUrl=function(t){var e=wn(t);return this.baseUrl+"traj/numframes/"+e.path},e.prototype.getFrameUrl=function(t,e){var r=wn(t);return this.baseUrl+"traj/frame/"+e+"/"+r.path},e.prototype.getFrameParams=function(t,e){return"atomIndices="+e.join(";")},e.prototype.getPathUrl=function(t,e){var r=wn(t);return this.baseUrl+"traj/path/"+e+"/"+r.path},e}(dM);"undefined"==typeof window||window.Promise||(window.Promise=i),t.Version="0.10.5-19",t.setDebug=So,t.ScriptExtensions=Vf,t.DatasourceRegistry=Wf,t.DecompressorRegistry=Zf,t.StaticDatasource=xM,t.MdsrvDatasource=_M,t.ParserRegistry=qf,t.autoLoad=Mo,t.RepresentationRegistry=Xf,t.ColormakerRegistry=Hf,t.Colormaker=pf,t.Selection=Cf,t.PdbWriter=fm,t.SdfWriter=mm,t.StlWriter=ym,t.Stage=qb,t.Collection=$b,t.ComponentCollection=Hb,t.RepresentationCollection=Wb,t.Assembly=gy,t.TrajectoryPlayer=Vy,t.superpose=Vs,t.guessElement=Ss,t.flatten=vn,t.Queue=Ds,t.Counter=bm,t.throttle=Sn,t.download=_n,t.getQuery=mn,t.getDataInfo=Ao,t.getFileInfo=wn,t.uniqueArray=Cn,t.BufferRepresentation=rb,t.ArrowBuffer=I_,t.BoxBuffer=k_,t.ConeBuffer=P_,t.CylinderBuffer=Nb,t.EllipsoidBuffer=G_,t.OctahedronBuffer=X_,t.SphereBuffer=yb,t.TetrahedronBuffer=Q_,t.TextBuffer=Kx,t.TorusBuffer=iw,t.Shape=Jy,t.Structure=Uy,t.Kdtree=ls,t.SpatialHash=Ya,t.MolecularSurface=u_,t.Volume=iy,t.LeftMouseButton=1,t.MiddleMouseButton=2,t.RightMouseButton=3,t.MouseActions=_g,t.KeyActions=Ag,t.Signal=no,t.Matrix3=ut,t.Matrix4=v,t.Vector2=l,t.Vector3=g,t.Box3=st,t.Quaternion=m,t.Euler=ft,t.Plane=ht,t.Color=tt,Object.defineProperty(t,"__esModule",{value:!0})}); + /* WEBPACK VAR INJECTION */(function(setImmediate, Buffer) {!function(t,e){ true?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.NGL={})}(this,function(t){"use strict";function e(){}function r(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(t,this)}function n(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,Xu(function(){var r=1===t._state?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._state?o:a)(e.promise,t._value);var i;try{i=r(t._value)}catch(t){return void a(e.promise,t)}o(e.promise,i)})}function o(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void u(r(n,e),t)}t._state=1,t._value=e,s(t)}catch(e){a(t,e)}}function a(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&Xu(function(){t._handled||qu(t._value)});for(var e=0,r=t._deferreds.length;e0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function y(t,e,r,i,n,o,a,s,c,u,h,l){p.call(this,null,o,a,s,c,u,i,n,h,l),this.image={data:t,width:e,height:r},this.magFilter=void 0!==c?c:nl,this.minFilter=void 0!==u?u:nl,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function b(t,e,r,i,n,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:qh,p.call(this,t,e,r,i,n,o,a,s,c,u),this.flipY=!1}function x(){this.seq=[],this.map={}}function _(t,e,r){var i=t[0];if(i<=0||i>0)return t;var n=e*r,o=rp[n];if(void 0===o&&(o=new Float32Array(n),rp[n]=o),0!==e){i.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=r,t[a].toArray(o,s)}return o}function w(t,e){var r=ip[e];void 0===r&&(r=new Int32Array(e),ip[e]=r);for(var i=0;i!==e;++i)r[i]=t.allocTextureUnit();return r}function S(t,e){t.uniform1f(this.addr,e)}function A(t,e){t.uniform1i(this.addr,e)}function M(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function E(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function T(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function P(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function C(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(op.set(e.elements),t.uniformMatrix3fv(this.addr,!1,op))}function I(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(np.set(e.elements),t.uniformMatrix4fv(this.addr,!1,np))}function R(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),r.setTexture2D(e||tp,i)}function L(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),r.setTextureCube(e||ep,i)}function O(t,e){t.uniform2iv(this.addr,e)}function D(t,e){t.uniform3iv(this.addr,e)}function N(t,e){t.uniform4iv(this.addr,e)}function k(t){switch(t){case 5126:return S;case 35664:return M;case 35665:return E;case 35666:return T;case 35674:return P;case 35675:return C;case 35676:return I;case 35678:case 36198:return R;case 35680:return L;case 5124:case 35670:return A;case 35667:case 35671:return O;case 35668:case 35672:return D;case 35669:case 35673:return N}}function F(t,e){t.uniform1fv(this.addr,e)}function B(t,e){t.uniform1iv(this.addr,e)}function z(t,e){t.uniform2fv(this.addr,_(e,this.size,2))}function U(t,e){t.uniform3fv(this.addr,_(e,this.size,3))}function j(t,e){t.uniform4fv(this.addr,_(e,this.size,4))}function G(t,e){t.uniformMatrix2fv(this.addr,!1,_(e,this.size,4))}function V(t,e){t.uniformMatrix3fv(this.addr,!1,_(e,this.size,9))}function $(t,e){t.uniformMatrix4fv(this.addr,!1,_(e,this.size,16))}function H(t,e,r){var i=e.length,n=w(r,i);t.uniform1iv(this.addr,n);for(var o=0;o!==i;++o)r.setTexture2D(e[o]||tp,n[o])}function W(t,e,r){var i=e.length,n=w(r,i);t.uniform1iv(this.addr,n);for(var o=0;o!==i;++o)r.setTextureCube(e[o]||ep,n[o])}function X(t){switch(t){case 5126:return F;case 35664:return z;case 35665:return U;case 35666:return j;case 35674:return G;case 35675:return V;case 35676:return $;case 35678:return H;case 35680:return W;case 5124:case 35670:return B;case 35667:case 35671:return O;case 35668:case 35672:return D;case 35669:case 35673:return N}}function q(t,e,r){this.id=t,this.addr=r,this.setValue=k(e.type)}function Y(t,e,r){this.id=t,this.addr=r,this.size=e.size,this.setValue=X(e.type)}function Z(t){this.id=t,x.call(this)}function K(t,e){t.seq.push(e),t.map[e.id]=e}function Q(t,e,r){var i=t.name,n=i.length;for(ap.lastIndex=0;;){var o=ap.exec(i),a=ap.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===n){K(r,void 0===u?new q(s,t,e):new Y(s,t,e));break}var h=r.map[s];void 0===h&&K(r,h=new Z(s)),r=h}}function J(t,e,r){var i=this;x.call(this),this.renderer=r;for(var n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),o=0;o.001&&R.scale>.001&&(S.x=R.x,S.y=R.y,S.z=R.z,_=R.size*R.scale/m.w,w.x=_*y,w.y=_,d.uniform3f(u.screenPosition,S.x,S.y,S.z),d.uniform2f(u.scale,w.x,w.y),d.uniform1f(u.rotation,R.rotation),d.uniform1f(u.opacity,R.opacity),d.uniform3f(u.color,R.color.r,R.color.g,R.color.b),f.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst),t.setTexture2D(R.texture,1),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0))}}}f.enable(d.CULL_FACE),f.enable(d.DEPTH_TEST),f.buffers.depth.setMask(!0),t.resetGLState()}}}function it(t,e){function r(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),e=new Uint16Array([0,1,2,0,2,3]);o=l.createBuffer(),a=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,o),l.bufferData(l.ARRAY_BUFFER,t,l.STATIC_DRAW),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,a),l.bufferData(l.ELEMENT_ARRAY_BUFFER,e,l.STATIC_DRAW),s=i(),c={position:l.getAttribLocation(s,"position"),uv:l.getAttribLocation(s,"uv")},u={uvOffset:l.getUniformLocation(s,"uvOffset"),uvScale:l.getUniformLocation(s,"uvScale"),rotation:l.getUniformLocation(s,"rotation"),scale:l.getUniformLocation(s,"scale"),color:l.getUniformLocation(s,"color"),map:l.getUniformLocation(s,"map"),opacity:l.getUniformLocation(s,"opacity"),modelViewMatrix:l.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:l.getUniformLocation(s,"projectionMatrix"),fogType:l.getUniformLocation(s,"fogType"),fogDensity:l.getUniformLocation(s,"fogDensity"),fogNear:l.getUniformLocation(s,"fogNear"),fogFar:l.getUniformLocation(s,"fogFar"),fogColor:l.getUniformLocation(s,"fogColor"),alphaTest:l.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var n=r.getContext("2d");n.fillStyle="white",n.fillRect(0,0,8,8),(h=new p(r)).needsUpdate=!0}function i(){var e=l.createProgram(),r=l.createShader(l.VERTEX_SHADER),i=l.createShader(l.FRAGMENT_SHADER);return l.shaderSource(r,["precision "+t.getPrecision()+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),l.shaderSource(i,["precision "+t.getPrecision()+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),l.compileShader(r),l.compileShader(i),l.attachShader(e,r),l.attachShader(e,i),l.linkProgram(e),e}function n(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var o,a,s,c,u,h,l=t.context,d=t.state,f=new g,v=new m,y=new g;this.render=function(i,p){if(0!==e.length){void 0===s&&r(),l.useProgram(s),d.initAttributes(),d.enableAttribute(c.position),d.enableAttribute(c.uv),d.disableUnusedAttributes(),d.disable(l.CULL_FACE),d.enable(l.BLEND),l.bindBuffer(l.ARRAY_BUFFER,o),l.vertexAttribPointer(c.position,2,l.FLOAT,!1,16,0),l.vertexAttribPointer(c.uv,2,l.FLOAT,!1,16,8),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,a),l.uniformMatrix4fv(u.projectionMatrix,!1,p.projectionMatrix.elements),d.activeTexture(l.TEXTURE0),l.uniform1i(u.map,0);var m=0,g=0,b=i.fog;b?(l.uniform3f(u.fogColor,b.color.r,b.color.g,b.color.b),b.isFog?(l.uniform1f(u.fogNear,b.near),l.uniform1f(u.fogFar,b.far),l.uniform1i(u.fogType,1),m=1,g=1):b.isFogExp2&&(l.uniform1f(u.fogDensity,b.density),l.uniform1i(u.fogType,2),m=2,g=2)):(l.uniform1i(u.fogType,0),m=0,g=0);for(var x=0,_=e.length;x<_;x++)(S=e[x]).modelViewMatrix.multiplyMatrices(p.matrixWorldInverse,S.matrixWorld),S.z=-S.modelViewMatrix.elements[14];e.sort(n);for(var w=[],x=0,_=e.length;x<_;x++){var S=e[x],A=S.material;if(!1!==A.visible){S.onBeforeRender(t,i,p,void 0,A,void 0),l.uniform1f(u.alphaTest,A.alphaTest),l.uniformMatrix4fv(u.modelViewMatrix,!1,S.modelViewMatrix.elements),S.matrixWorld.decompose(f,v,y),w[0]=y.x,w[1]=y.y;var M=0;i.fog&&A.fog&&(M=g),m!==M&&(l.uniform1i(u.fogType,M),m=M),null!==A.map?(l.uniform2f(u.uvOffset,A.map.offset.x,A.map.offset.y),l.uniform2f(u.uvScale,A.map.repeat.x,A.map.repeat.y)):(l.uniform2f(u.uvOffset,0,0),l.uniform2f(u.uvScale,1,1)),l.uniform1f(u.opacity,A.opacity),l.uniform3f(u.color,A.color.r,A.color.g,A.color.b),l.uniform1f(u.rotation,A.rotation),l.uniform2fv(u.scale,w),d.setBlending(A.blending,A.blendEquation,A.blendSrc,A.blendDst,A.blendEquationAlpha,A.blendSrcAlpha,A.blendDstAlpha,A.premultipliedAlpha),d.buffers.depth.setTest(A.depthTest),d.buffers.depth.setMask(A.depthWrite),A.map?t.setTexture2D(A.map,0):t.setTexture2D(h,0),l.drawElements(l.TRIANGLES,6,l.UNSIGNED_SHORT,0),S.onAfterRender(t,i,p,void 0,A,void 0)}}d.enable(l.CULL_FACE),t.resetGLState()}}}function nt(){Object.defineProperty(this,"id",{value:pp++}),this.uuid=Ql.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=lh,this.side=rh,this.shading=ah,this.vertexColors=sh,this.opacity=1,this.transparent=!1,this.blendSrc=Mh,this.blendDst=Eh,this.blendEquation=gh,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Nh,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.needsUpdate=!0}function ot(t){nt.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function at(t){nt.call(this),this.type="MeshDepthMaterial",this.depthPacking=Zl,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function st(t,e){this.min=void 0!==t?t:new g(1/0,1/0,1/0),this.max=void 0!==e?e:new g(-1/0,-1/0,-1/0)}function ct(t,e){this.center=void 0!==t?t:new g,this.radius=void 0!==e?e:0}function ut(){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.")}function ht(t,e){this.normal=void 0!==t?t:new g(1,0,0),this.constant=void 0!==e?e:0}function lt(t,e,r,i,n,o){this.planes=[void 0!==t?t:new ht,void 0!==e?e:new ht,void 0!==r?r:new ht,void 0!==i?i:new ht,void 0!==n?n:new ht,void 0!==o?o:new ht]}function pt(t,e,r,i){function n(e,r,i,n){var o=e.geometry,a=null,s=S,c=e.customDepthMaterial;if(i&&(s=A,c=e.customDistanceMaterial),c)a=c;else{var u=!1;r.morphTargets&&(o&&o.isBufferGeometry?u=o.morphAttributes&&o.morphAttributes.position&&o.morphAttributes.position.length>0:o&&o.isGeometry&&(u=o.morphTargets&&o.morphTargets.length>0)),e.isSkinnedMesh&&!1===r.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var h=e.isSkinnedMesh&&r.skinning,l=0;u&&(l|=x),h&&(l|=_),a=s[l]}if(t.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){var p=a.uuid,d=r.uuid,f=M[p];void 0===f&&(f={},M[p]=f);var m=f[d];void 0===m&&(m=a.clone(),f[d]=m),a=m}a.visible=r.visible,a.wireframe=r.wireframe;var g=r.side;return F.renderSingleSided&&g==nh&&(g=rh),F.renderReverseSided&&(g===rh?g=ih:g===ih&&(g=rh)),a.side=g,a.clipShadows=r.clipShadows,a.clippingPlanes=r.clippingPlanes,a.wireframeLinewidth=r.wireframeLinewidth,a.linewidth=r.linewidth,i&&void 0!==a.uniforms.lightPos&&a.uniforms.lightPos.value.copy(n),a}function o(e,i,a,s){if(!1!==e.visible){if(e.layers.test(i.layers)&&(e.isMesh||e.isLine||e.isPoints)&&e.castShadow&&(!e.frustumCulled||c.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,e.matrixWorld);var u=r.update(e),h=e.material;if(Array.isArray(h))for(var l=u.groups,p=0,d=l.length;pe&&(e=t[r]);return e}function Ct(){Object.defineProperty(this,"id",{value:_t()}),this.uuid=Ql.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function It(t,e,r,i,n,o){wt.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:r,widthSegments:i,heightSegments:n,depthSegments:o},this.fromBufferGeometry(new Rt(t,e,r,i,n,o)),this.mergeVertices()}function Rt(t,e,r,i,n,o){function a(t,e,r,i,n,o,a,f,m,v,y){var b,x,_=o/m,w=a/v,S=o/2,A=a/2,M=f/2,E=m+1,T=v+1,P=0,C=0,I=new g;for(x=0;x0?1:-1,h.push(I.x,I.y,I.z),l.push(b/m),l.push(1-x/v),P+=1}}for(x=0;x65535?Mt:At)(n,1),e.update(i,t.ELEMENT_ARRAY_BUFFER),c[r.id]=i,i}var s={},c={};return{get:n,update:o,getWireframeAttribute:a}}function Xt(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var r;switch(e.type){case"DirectionalLight":r={direction:new g,color:new tt,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case"SpotLight":r={position:new g,direction:new g,color:new tt,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case"PointLight":r={position:new g,color:new tt,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case"HemisphereLight":r={direction:new g,skyColor:new tt,groundColor:new tt};break;case"RectAreaLight":r={color:new tt,position:new g,halfWidth:new g,halfHeight:new g}}return t[e.id]=r,r}}}function qt(t,e,r){function i(t){var i=r.frame,n=t.geometry,a=e.get(t,n);return o[a.id]!==i&&(n.isGeometry&&a.updateFromObject(t),e.update(a),o[a.id]=i),a}function n(){o={}}var o={};return{update:i,clear:n}}function Yt(t){for(var e=t.split("\n"),r=0;r");return ae(r)}return t.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,e)}function se(t){function e(t,e,r,i){for(var n="",o=parseInt(e);o0?t.gammaFactor:1,v=ee(a,n,t.extensions),y=re(s),b=o.createProgram();r.isRawShaderMaterial?(f=[y,"\n"].filter(ne).join("\n"),m=[v,y,"\n"].filter(ne).join("\n")):(f=["precision "+n.precision+" float;","precision "+n.precision+" int;","#define SHADER_NAME "+i.name,y,n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+g,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+p:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexColors?"#define USE_COLOR":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+n.numClippingPlanes,n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#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(ne).join("\n"),m=[v,"precision "+n.precision+" float;","precision "+n.precision+" int;","#define SHADER_NAME "+i.name,y,n.alphaTest?"#define ALPHATEST "+n.alphaTest:"","#define GAMMA_FACTOR "+g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.envMap?"#define "+p:"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexColors?"#define USE_COLOR":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+n.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(n.numClippingPlanes-n.numClipIntersection),n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+h:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",n.envMap&&t.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",n.toneMapping!==Vh?"#define TONE_MAPPING":"",n.toneMapping!==Vh?hp.tonemapping_pars_fragment:"",n.toneMapping!==Vh?te("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.outputEncoding||n.mapEncoding||n.envMapEncoding||n.emissiveMapEncoding?hp.encodings_pars_fragment:"",n.mapEncoding?Qt("mapTexelToLinear",n.mapEncoding):"",n.envMapEncoding?Qt("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMapEncoding?Qt("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.outputEncoding?Jt("linearToOutputTexel",n.outputEncoding):"",n.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(ne).join("\n")),c=oe(c=ae(c),n),u=oe(u=ae(u),n),r.isShaderMaterial||(c=se(c),u=se(u));var x=f+c,_=m+u,w=Zt(o,o.VERTEX_SHADER,x),S=Zt(o,o.FRAGMENT_SHADER,_);o.attachShader(b,w),o.attachShader(b,S),void 0!==r.index0AttributeName?o.bindAttribLocation(b,0,r.index0AttributeName):!0===n.morphTargets&&o.bindAttribLocation(b,0,"position"),o.linkProgram(b);var A=o.getProgramInfoLog(b),M=o.getShaderInfoLog(w),E=o.getShaderInfoLog(S),T=!0,P=!0;!1===o.getProgramParameter(b,o.LINK_STATUS)?(T=!1,console.error("THREE.WebGLProgram: shader error: ",o.getError(),"gl.VALIDATE_STATUS",o.getProgramParameter(b,o.VALIDATE_STATUS),"gl.getProgramInfoLog",A,M,E)):""!==A?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",A):""!==M&&""!==E||(P=!1),P&&(this.diagnostics={runnable:T,material:r,programLog:A,vertexShader:{log:M,prefix:f},fragmentShader:{log:E,prefix:m}}),o.deleteShader(w),o.deleteShader(S);var C;this.getUniforms=function(){return void 0===C&&(C=new J(o,b,t)),C};var I;return this.getAttributes=function(){return void 0===I&&(I=ie(o,b)),I},this.destroy=function(){o.deleteProgram(b),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=mp++,this.code=e,this.usedTimes=1,this.program=b,this.vertexShader=w,this.fragmentShader=S,this}function ue(t,e){function r(t){var r=t.skeleton.bones;if(e.floatVertexTextures)return 1024;var i=e.maxVertexUniforms,n=Math.floor((i-20)/4),o=Math.min(n,r.length);return o0,maxBones:p,useVertexTexture:e.floatVertexTextures,morphTargets:n.morphTargets,morphNormals:n.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:n.dithering,shadowMapEnabled:t.shadowMap.enabled&&h.receiveShadow&&a.shadows.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:n.premultipliedAlpha,alphaTest:n.alphaTest,doubleSided:n.side===nh,flipSided:n.side===ih,depthPacking:void 0!==n.depthPacking&&n.depthPacking}},this.getProgramCode=function(e,r){var i=[];if(r.shaderID?i.push(r.shaderID):(i.push(e.fragmentShader),i.push(e.vertexShader)),void 0!==e.defines)for(var n in e.defines)i.push(n),i.push(e.defines[n]);for(var o=0;oe||t.height>e){var r=e/Math.max(t.width,t.height),i=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return i.width=Math.floor(t.width*r),i.height=Math.floor(t.height*r),i.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,i.width,i.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+i.width+"x"+i.height,t),i}return t}function c(t){return Ql.isPowerOfTwo(t.width)&&Ql.isPowerOfTwo(t.height)}function u(t){if(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement){var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.width=Ql.nearestPowerOfTwo(t.width),e.height=Ql.nearestPowerOfTwo(t.height),e.getContext("2d").drawImage(t,0,0,e.width,e.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+e.width+"x"+e.height,t),e}return t}function h(t){return t.wrapS!==rl||t.wrapT!==rl||t.minFilter!==nl&&t.minFilter!==sl}function l(t,e){return t.generateMipmaps&&e&&t.minFilter!==nl&&t.minFilter!==sl}function p(e){return e===nl||e===ol||e===al?t.NEAREST:t.LINEAR}function d(t){var e=t.target;e.removeEventListener("dispose",d),m(e),a.textures--}function f(t){var e=t.target;e.removeEventListener("dispose",f),g(e),a.textures--}function m(e){var r=i.get(e);if(e.image&&r.__image__webglTextureCube)t.deleteTexture(r.__image__webglTextureCube);else{if(void 0===r.__webglInit)return;t.deleteTexture(r.__webglTexture)}i.remove(e)}function g(e){var r=i.get(e),n=i.get(e.texture);if(e){if(void 0!==n.__webglTexture&&t.deleteTexture(n.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(r.__webglFramebuffer[o]),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer[o]);else t.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer);i.remove(e.texture),i.remove(e)}}function v(e,n){var o=i.get(e);if(e.version>0&&o.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==a.complete)return void _(o,e,n);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}r.activeTexture(t.TEXTURE0+n),r.bindTexture(t.TEXTURE_2D,o.__webglTexture)}function y(e,u){var h=i.get(e);if(6===e.image.length)if(e.version>0&&h.__version!==e.version){h.__image__webglTextureCube||(e.addEventListener("dispose",d),h.__image__webglTextureCube=t.createTexture(),a.textures++),r.activeTexture(t.TEXTURE0+u),r.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var p=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,m=[],g=0;g<6;g++)m[g]=p||f?f?e.image[g].image:e.image[g]:s(e.image[g],n.maxCubemapSize);var v=c(m[0]),y=o(e.format),b=o(e.type);x(t.TEXTURE_CUBE_MAP,e,v);for(g=0;g<6;g++)if(p)for(var _,w=m[g].mipmaps,S=0,A=w.length;S-1?r.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,S,y,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,S,y,_.width,_.height,0,y,b,_.data);else f?r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,y,m[g].width,m[g].height,0,y,b,m[g].data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,y,y,b,m[g]);l(e,v)&&t.generateMipmap(t.TEXTURE_CUBE_MAP),h.__version=e.version,e.onUpdate&&e.onUpdate(e)}else r.activeTexture(t.TEXTURE0+u),r.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube)}function b(e,n){r.activeTexture(t.TEXTURE0+n),r.bindTexture(t.TEXTURE_CUBE_MAP,i.get(e).__webglTexture)}function x(r,a,s){var c;if(s?(t.texParameteri(r,t.TEXTURE_WRAP_S,o(a.wrapS)),t.texParameteri(r,t.TEXTURE_WRAP_T,o(a.wrapT)),t.texParameteri(r,t.TEXTURE_MAG_FILTER,o(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,o(a.minFilter))):(t.texParameteri(r,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(r,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===rl&&a.wrapT===rl||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(r,t.TEXTURE_MAG_FILTER,p(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,p(a.minFilter)),a.minFilter!==nl&&a.minFilter!==sl&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===gl&&null===e.get("OES_texture_float_linear"))return;if(a.type===vl&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||i.get(a).__currentAnisotropy)&&(t.texParameterf(r,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,n.getMaxAnisotropy())),i.get(a).__currentAnisotropy=a.anisotropy)}}function _(e,i,p){void 0===e.__webglInit&&(e.__webglInit=!0,i.addEventListener("dispose",d),e.__webglTexture=t.createTexture(),a.textures++),r.activeTexture(t.TEXTURE0+p),r.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,i.unpackAlignment);var f=s(i.image,n.maxTextureSize);h(i)&&!1===c(f)&&(f=u(f));var m=c(f),g=o(i.format),v=o(i.type);x(t.TEXTURE_2D,i,m);var y,b=i.mipmaps;if(i.isDepthTexture){var _=t.DEPTH_COMPONENT;if(i.type===gl){if(!P)throw new Error("Float Depth Texture only supported in WebGL2.0");_=t.DEPTH_COMPONENT32F}else P&&(_=t.DEPTH_COMPONENT16);i.format===Tl&&_===t.DEPTH_COMPONENT&&i.type!==dl&&i.type!==ml&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=dl,v=o(i.type)),i.format===Pl&&(_=t.DEPTH_STENCIL,i.type!==_l&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=_l,v=o(i.type))),r.texImage2D(t.TEXTURE_2D,0,_,f.width,f.height,0,g,v,null)}else if(i.isDataTexture)if(b.length>0&&m){for(var w=0,S=b.length;w-1?r.compressedTexImage2D(t.TEXTURE_2D,w,g,y.width,y.height,0,y.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):r.texImage2D(t.TEXTURE_2D,w,g,y.width,y.height,0,g,v,y.data);else if(b.length>0&&m){for(var w=0,S=b.length;w=1,it=null,nt={},ot=new d,at=new d,st={};return st[t.TEXTURE_2D]=a(t.TEXTURE_2D,t.TEXTURE_2D,1),st[t.TEXTURE_CUBE_MAP]=a(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),{buffers:{color:R,depth:L,stencil:O},init:s,initAttributes:c,enableAttribute:u,enableAttributeAndDivisor:h,disableUnusedAttributes:l,enable:p,disable:f,getCompressedTextureFormats:m,setBlending:g,setMaterial:v,setFlipSided:y,setCullFace:b,setLineWidth:x,setPolygonOffset:_,getScissorTest:w,setScissorTest:S,activeTexture:A,bindTexture:M,compressedTexImage2D:E,texImage2D:T,scissor:P,viewport:C,reset:I}}function de(t,e,r){function i(){if(void 0!==o)return o;var r=e.get("EXT_texture_filter_anisotropic");return o=null!==r?t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function n(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o,a=void 0!==r.precision?r.precision:"highp",s=n(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var c=!0===r.logarithmicDepthBuffer&&!!e.get("EXT_frag_depth"),u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),d=t.getParameter(t.MAX_VERTEX_ATTRIBS),f=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),g=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=h>0,y=!!e.get("OES_texture_float");return{getMaxAnisotropy:i,getMaxPrecision:n,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:p,maxAttributes:d,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y}}function fe(t){bt.call(this),this.cameras=t||[]}function me(t){function e(){if(i.isPresenting){var e=i.getEyeParameters("left"),n=e.renderWidth,o=e.renderHeight;p=t.getPixelRatio(),l=t.getSize(),t.setDrawingBufferSize(2*n,o,1)}else r.enabled&&t.setDrawingBufferSize(l.width,l.height,p)}var r=this,i=null,n=null;"VRFrameData"in window&&(n=new window.VRFrameData);var o=new v,a=new v,s=new v,c=new bt;c.bounds=new d(0,0,.5,1),c.layers.enable(1);var u=new bt;u.bounds=new d(.5,0,.5,1),u.layers.enable(2);var h=new fe([c,u]);h.layers.enable(1),h.layers.enable(2);var l,p;window.addEventListener("vrdisplaypresentchange",e,!1),this.enabled=!1,this.standing=!1,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===i)return t;i.depthNear=t.near,i.depthFar=t.far,i.getFrameData(n);var e=n.pose;null!==e.position?t.position.fromArray(e.position):t.position.set(0,0,0),null!==e.orientation&&t.quaternion.fromArray(e.orientation),t.updateMatrixWorld();var r=i.stageParameters;if(this.standing&&r&&(a.fromArray(r.sittingToStandingTransform),s.getInverse(a),t.matrixWorld.multiply(a),t.matrixWorldInverse.multiply(s)),!1===i.isPresenting)return t;h.matrixWorld.copy(t.matrixWorld),h.matrixWorldInverse.copy(t.matrixWorldInverse),c.matrixWorldInverse.fromArray(n.leftViewMatrix),u.matrixWorldInverse.fromArray(n.rightViewMatrix),this.standing&&r&&(c.matrixWorldInverse.multiply(s),u.matrixWorldInverse.multiply(s));var l=t.parent;null!==l&&(o.getInverse(l.matrixWorld),c.matrixWorldInverse.multiply(o),u.matrixWorldInverse.multiply(o)),c.matrixWorld.getInverse(c.matrixWorldInverse),u.matrixWorld.getInverse(u.matrixWorldInverse),c.projectionMatrix.fromArray(n.leftProjectionMatrix),u.projectionMatrix.fromArray(n.rightProjectionMatrix),h.projectionMatrix.copy(c.projectionMatrix);var p=i.getLayers();if(p.length){var d=p[0];null!==d.leftBounds&&4===d.leftBounds.length&&c.bounds.fromArray(d.leftBounds),null!==d.rightBounds&&4===d.rightBounds.length&&u.bounds.fromArray(d.rightBounds)}return h},this.getStandingMatrix=function(){return a},this.submitFrame=function(){i&&i.isPresenting&&i.submitFrame()}}function ge(t){var e={};return{get:function(r){if(void 0!==e[r])return e[r];var i;switch(r){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":i=t.getExtension("WEBGL_compressed_texture_etc1");break;default:i=t.getExtension(r)}return null===i&&console.warn("THREE.WebGLRenderer: "+r+" extension not supported."),e[r]=i,i}}}function ve(){function t(){u.value!==i&&(u.value=i,u.needsUpdate=n>0),r.numPlanes=n,r.numIntersection=0}function e(t,e,i,n){var o=null!==t?t.length:0,a=null;if(0!==o){if(a=u.value,!0!==n||null===a){var h=i+4*o,l=e.matrixWorldInverse;c.getNormalMatrix(l),(null===a||a.length=0){var u=n[s];if(void 0!==u){var h=u.normalized,l=u.itemSize,p=Bt.get(u),d=p.buffer,f=p.type,m=p.bytesPerElement;if(u.isInterleavedBufferAttribute){var g=u.data,v=g.stride,y=u.offset;g&&g.isInstancedInterleavedBuffer?(Nt.enableAttributeAndDivisor(c,g.meshPerAttribute),void 0===r.maxInstancedCount&&(r.maxInstancedCount=g.meshPerAttribute*g.count)):Nt.enableAttribute(c),Rt.bindBuffer(Rt.ARRAY_BUFFER,d),Rt.vertexAttribPointer(c,l,f,h,v*m,(i*v+y)*m)}else u.isInstancedBufferAttribute?(Nt.enableAttributeAndDivisor(c,u.meshPerAttribute),void 0===r.maxInstancedCount&&(r.maxInstancedCount=u.meshPerAttribute*u.count)):Nt.enableAttribute(c),Rt.bindBuffer(Rt.ARRAY_BUFFER,d),Rt.vertexAttribPointer(c,l,f,h,0,i*l*m)}else if(void 0!==a){var b=a[s];if(void 0!==b)switch(b.length){case 2:Rt.vertexAttrib2fv(c,b);break;case 3:Rt.vertexAttrib3fv(c,b);break;case 4:Rt.vertexAttrib4fv(c,b);break;default:Rt.vertexAttrib1fv(c,b)}}}}Nt.disableUnusedAttributes()}function l(t,e,r){if(t.visible){if(t.layers.test(e.layers))if(t.isLight)$.push(t);else if(t.isSprite)t.frustumCulled&&!bt.intersectsSprite(t)||X.push(t);else if(t.isLensFlare)q.push(t);else if(t.isImmediateRenderObject)r&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St),H.push(t,null,t.material,At.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||bt.intersectsObject(t))){r&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St);var i=jt.update(t),n=t.material;if(Array.isArray(n))for(var o=i.groups,a=0,s=o.length;a=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(var p=0;p=0&&t.numSupportedMorphNormals++}var d=i.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(i.numClippingPlanes=xt.numPlanes,i.numIntersection=xt.numIntersection,d.clippingPlanes=xt.uniform),i.fog=e,i.lightsHash=Tt.hash,t.lights&&(d.ambientLightColor.value=Tt.ambient,d.directionalLights.value=Tt.directional,d.spotLights.value=Tt.spot,d.rectAreaLights.value=Tt.rectArea,d.pointLights.value=Tt.point,d.hemisphereLights.value=Tt.hemi,d.directionalShadowMap.value=Tt.directionalShadowMap,d.directionalShadowMatrix.value=Tt.directionalShadowMatrix,d.spotShadowMap.value=Tt.spotShadowMap,d.spotShadowMatrix.value=Tt.spotShadowMatrix,d.pointShadowMap.value=Tt.pointShadowMap,d.pointShadowMatrix.value=Tt.pointShadowMatrix);var f=i.program.getUniforms(),m=J.seqWithValue(f.seq,d);i.uniformsList=m}function b(t,e,r,i){ut=0;var n=kt.get(r);if(_t&&(wt||t!==nt)){var o=t===nt&&r.id===tt;xt.setState(r.clippingPlanes,r.clipIntersection,r.clipShadows,t,n,o)}!1===r.needsUpdate&&(void 0===n.program?r.needsUpdate=!0:r.fog&&n.fog!==e?r.needsUpdate=!0:r.lights&&n.lightsHash!==Tt.hash?r.needsUpdate=!0:void 0===n.numClippingPlanes||n.numClippingPlanes===xt.numPlanes&&n.numIntersection===xt.numIntersection||(r.needsUpdate=!0)),r.needsUpdate&&(m(r,e,i),r.needsUpdate=!1);var a=!1,s=!1,c=!1,u=n.program,h=u.getUniforms(),l=n.shader.uniforms;if(u.id!==Z&&(Rt.useProgram(u.program),Z=u.id,a=!0,s=!0,c=!0),r.id!==tt&&(tt=r.id,s=!0),a||t!==nt){if(h.setValue(Rt,"projectionMatrix",t.projectionMatrix),Dt.logarithmicDepthBuffer&&h.setValue(Rt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),nt!==(ot||t)&&(nt=ot||t,s=!0,c=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshStandardMaterial||r.envMap){var p=h.map.cameraPosition;void 0!==p&&p.setValue(Rt,At.setFromMatrixPosition(t.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.skinning)&&h.setValue(Rt,"viewMatrix",t.matrixWorldInverse)}if(r.skinning){h.setOptional(Rt,i,"bindMatrix"),h.setOptional(Rt,i,"bindMatrixInverse");var d=i.skeleton;if(d){var f=d.bones;if(Dt.floatVertexTextures){if(void 0===d.boneTexture){var g=Math.sqrt(4*f.length);g=Ql.nextPowerOfTwo(Math.ceil(g)),g=Math.max(g,4);var v=new Float32Array(g*g*4);v.set(d.boneMatrices);var b=new y(v,g,g,Al,gl);d.boneMatrices=v,d.boneTexture=b,d.boneTextureSize=g}h.setValue(Rt,"boneTexture",d.boneTexture),h.setValue(Rt,"boneTextureSize",d.boneTextureSize)}else h.setOptional(Rt,d,"boneMatrices")}}return s&&(h.setValue(Rt,"toneMappingExposure",Y.toneMappingExposure),h.setValue(Rt,"toneMappingWhitePoint",Y.toneMappingWhitePoint),r.lights&&R(l,c),e&&r.fog&&A(l,e),(r.isMeshBasicMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial||r.isMeshStandardMaterial||r.isMeshNormalMaterial||r.isMeshDepthMaterial)&&x(l,r),r.isLineBasicMaterial?_(l,r):r.isLineDashedMaterial?(_(l,r),w(l,r)):r.isPointsMaterial?S(l,r):r.isMeshLambertMaterial?M(l,r):r.isMeshToonMaterial?T(l,r):r.isMeshPhongMaterial?E(l,r):r.isMeshPhysicalMaterial?C(l,r):r.isMeshStandardMaterial?P(l,r):r.isMeshDepthMaterial?r.displacementMap&&(l.displacementMap.value=r.displacementMap,l.displacementScale.value=r.displacementScale,l.displacementBias.value=r.displacementBias):r.isMeshNormalMaterial&&I(l,r),void 0!==l.ltcMat&&(l.ltcMat.value=cp.LTC_MAT_TEXTURE),void 0!==l.ltcMag&&(l.ltcMag.value=cp.LTC_MAG_TEXTURE),J.upload(Rt,n.uniformsList,l,Y)),h.setValue(Rt,"modelViewMatrix",i.modelViewMatrix),h.setValue(Rt,"normalMatrix",i.normalMatrix),h.setValue(Rt,"modelMatrix",i.matrixWorld),u}function x(t,e){t.opacity.value=e.opacity,t.diffuse.value=e.color,e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),t.map.value=e.map,t.specularMap.value=e.specularMap,t.alphaMap.value=e.alphaMap,e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var r;if(e.map?r=e.map:e.specularMap?r=e.specularMap:e.displacementMap?r=e.displacementMap:e.normalMap?r=e.normalMap:e.bumpMap?r=e.bumpMap:e.roughnessMap?r=e.roughnessMap:e.metalnessMap?r=e.metalnessMap:e.alphaMap?r=e.alphaMap:e.emissiveMap&&(r=e.emissiveMap),void 0!==r){r.isWebGLRenderTarget&&(r=r.texture);var i=r.offset,n=r.repeat;t.offsetRepeat.value.set(i.x,i.y,n.x,n.y)}t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio}function _(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function w(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function S(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*mt,t.scale.value=.5*ft,t.map.value=e.map,null!==e.map){var r=e.map.offset,i=e.map.repeat;t.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}}function A(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}function M(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function E(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function T(t,e){E(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}function P(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function C(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,P(t,e)}function I(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function R(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function L(t){for(var e=0,r=0,i=t.length;r=Dt.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+Dt.maxTextures),ut+=1,t}function N(t){var e;if(t===el)return Rt.REPEAT;if(t===rl)return Rt.CLAMP_TO_EDGE;if(t===il)return Rt.MIRRORED_REPEAT;if(t===nl)return Rt.NEAREST;if(t===ol)return Rt.NEAREST_MIPMAP_NEAREST;if(t===al)return Rt.NEAREST_MIPMAP_LINEAR;if(t===sl)return Rt.LINEAR;if(t===cl)return Rt.LINEAR_MIPMAP_NEAREST;if(t===ul)return Rt.LINEAR_MIPMAP_LINEAR;if(t===hl)return Rt.UNSIGNED_BYTE;if(t===yl)return Rt.UNSIGNED_SHORT_4_4_4_4;if(t===bl)return Rt.UNSIGNED_SHORT_5_5_5_1;if(t===xl)return Rt.UNSIGNED_SHORT_5_6_5;if(t===ll)return Rt.BYTE;if(t===pl)return Rt.SHORT;if(t===dl)return Rt.UNSIGNED_SHORT;if(t===fl)return Rt.INT;if(t===ml)return Rt.UNSIGNED_INT;if(t===gl)return Rt.FLOAT;if(t===vl&&null!==(e=Ot.get("OES_texture_half_float")))return e.HALF_FLOAT_OES;if(t===wl)return Rt.ALPHA;if(t===Sl)return Rt.RGB;if(t===Al)return Rt.RGBA;if(t===Ml)return Rt.LUMINANCE;if(t===El)return Rt.LUMINANCE_ALPHA;if(t===Tl)return Rt.DEPTH_COMPONENT;if(t===Pl)return Rt.DEPTH_STENCIL;if(t===gh)return Rt.FUNC_ADD;if(t===vh)return Rt.FUNC_SUBTRACT;if(t===yh)return Rt.FUNC_REVERSE_SUBTRACT;if(t===_h)return Rt.ZERO;if(t===wh)return Rt.ONE;if(t===Sh)return Rt.SRC_COLOR;if(t===Ah)return Rt.ONE_MINUS_SRC_COLOR;if(t===Mh)return Rt.SRC_ALPHA;if(t===Eh)return Rt.ONE_MINUS_SRC_ALPHA;if(t===Th)return Rt.DST_ALPHA;if(t===Ph)return Rt.ONE_MINUS_DST_ALPHA;if(t===Ch)return Rt.DST_COLOR;if(t===Ih)return Rt.ONE_MINUS_DST_COLOR;if(t===Rh)return Rt.SRC_ALPHA_SATURATE;if((t===Cl||t===Il||t===Rl||t===Ll)&&null!==(e=Ot.get("WEBGL_compressed_texture_s3tc"))){if(t===Cl)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===Il)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===Rl)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===Ll)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((t===Ol||t===Dl||t===Nl||t===kl)&&null!==(e=Ot.get("WEBGL_compressed_texture_pvrtc"))){if(t===Ol)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===Dl)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===Nl)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===kl)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t===Fl&&null!==(e=Ot.get("WEBGL_compressed_texture_etc1")))return e.COMPRESSED_RGB_ETC1_WEBGL;if((t===bh||t===xh)&&null!==(e=Ot.get("EXT_blend_minmax"))){if(t===bh)return e.MIN_EXT;if(t===xh)return e.MAX_EXT}return t===_l&&null!==(e=Ot.get("WEBGL_depth_texture"))?e.UNSIGNED_INT_24_8_WEBGL:0}console.log("THREE.WebGLRenderer",Yu);var k=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),F=void 0!==t.context?t.context:null,B=void 0!==t.alpha&&t.alpha,z=void 0===t.depth||t.depth,U=void 0===t.stencil||t.stencil,j=void 0!==t.antialias&&t.antialias,G=void 0===t.premultipliedAlpha||t.premultipliedAlpha,V=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,$=[],H=null,W=new Float32Array(8),X=[],q=[];this.domElement=k,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=$h,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var Y=this,Z=null,K=null,Q=null,tt=-1,et="",nt=null,ot=null,at=new d,st=null,ct=new d,ut=0,ht=k.width,ft=k.height,mt=1,gt=new d(0,0,ht,ft),vt=!1,yt=new d(0,0,ht,ft),bt=new lt,xt=new ve,_t=!1,wt=!1,St=new v,At=new g,Mt=new v,Et=new v,Tt={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},Pt={geometries:0,textures:0},It={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:It,memory:Pt,programs:null};var Rt;try{var Lt={alpha:B,depth:z,stencil:U,antialias:j,premultipliedAlpha:G,preserveDrawingBuffer:V};if(null===(Rt=F||k.getContext("webgl",Lt)||k.getContext("experimental-webgl",Lt)))throw null!==k.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===Rt.getShaderPrecisionFormat&&(Rt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),k.addEventListener("webglcontextlost",n,!1)}catch(t){console.error("THREE.WebGLRenderer: "+t)}var Ot=new ge(Rt);Ot.get("WEBGL_depth_texture"),Ot.get("OES_texture_float"),Ot.get("OES_texture_float_linear"),Ot.get("OES_texture_half_float"),Ot.get("OES_texture_half_float_linear"),Ot.get("OES_standard_derivatives"),Ot.get("ANGLE_instanced_arrays"),Ot.get("OES_element_index_uint")&&(Ct.MaxIndex=4294967296);var Dt=new de(Rt,Ot,t),Nt=new pe(Rt,Ot,N),kt=new le,Ft=new he(Rt,Ot,Nt,kt,Dt,N,Pt),Bt=new dt(Rt),Ut=new Wt(Rt,Bt,Pt),jt=new qt(Rt,Ut,It),Gt=new ue(this,Dt),Yt=new Xt,Zt=new Vt,Kt=new zt(this,Nt,jt,G),Qt=new me(this);this.info.programs=Gt.programs;var Jt=new Ht(Rt,Ot,It),te=new $t(Rt,Ot,It);r(),this.context=Rt,this.capabilities=Dt,this.extensions=Ot,this.properties=kt,this.renderLists=Zt,this.state=Nt,this.vr=Qt;var ee=new pt(this,Tt,jt,Dt);this.shadowMap=ee;var re=new it(this,X),ie=new rt(this,q);this.getContext=function(){return Rt},this.getContextAttributes=function(){return Rt.getContextAttributes()},this.forceContextLoss=function(){var t=Ot.get("WEBGL_lose_context");t&&t.loseContext()},this.getMaxAnisotropy=function(){return Dt.getMaxAnisotropy()},this.getPrecision=function(){return Dt.precision},this.getPixelRatio=function(){return mt},this.setPixelRatio=function(t){void 0!==t&&(mt=t,this.setSize(ht,ft,!1))},this.getSize=function(){return{width:ht,height:ft}},this.setSize=function(t,e,r){var i=Qt.getDevice();if(i&&i.isPresenting)return void console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");ht=t,ft=e,k.width=t*mt,k.height=e*mt,!1!==r&&(k.style.width=t+"px",k.style.height=e+"px"),this.setViewport(0,0,t,e)},this.getDrawingBufferSize=function(){return{width:ht*mt,height:ft*mt}},this.setDrawingBufferSize=function(t,e,r){ht=t,ft=e,mt=r,k.width=t*r,k.height=e*r,this.setViewport(0,0,t,e)},this.setViewport=function(t,e,r,i){yt.set(t,ft-e-i,r,i),Nt.viewport(ct.copy(yt).multiplyScalar(mt))},this.setScissor=function(t,e,r,i){gt.set(t,ft-e-i,r,i),Nt.scissor(at.copy(gt).multiplyScalar(mt))},this.setScissorTest=function(t){Nt.setScissorTest(vt=t)},this.getClearColor=Kt.getClearColor,this.setClearColor=Kt.setClearColor,this.getClearAlpha=Kt.getClearAlpha,this.setClearAlpha=Kt.setClearAlpha,this.clear=function(t,e,r){var i=0;(void 0===t||t)&&(i|=Rt.COLOR_BUFFER_BIT),(void 0===e||e)&&(i|=Rt.DEPTH_BUFFER_BIT),(void 0===r||r)&&(i|=Rt.STENCIL_BUFFER_BIT),Rt.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,r,i){this.setRenderTarget(t),this.clear(e,r,i)},this.resetGLState=i,this.dispose=function(){k.removeEventListener("webglcontextlost",n,!1),Zt.dispose()},this.renderBufferImmediate=function(t,e,r){Nt.initAttributes();var i=kt.get(t);t.hasPositions&&!i.position&&(i.position=Rt.createBuffer()),t.hasNormals&&!i.normal&&(i.normal=Rt.createBuffer()),t.hasUvs&&!i.uv&&(i.uv=Rt.createBuffer()),t.hasColors&&!i.color&&(i.color=Rt.createBuffer());var n=e.getAttributes();if(t.hasPositions&&(Rt.bindBuffer(Rt.ARRAY_BUFFER,i.position),Rt.bufferData(Rt.ARRAY_BUFFER,t.positionArray,Rt.DYNAMIC_DRAW),Nt.enableAttribute(n.position),Rt.vertexAttribPointer(n.position,3,Rt.FLOAT,!1,0,0)),t.hasNormals){if(Rt.bindBuffer(Rt.ARRAY_BUFFER,i.normal),!r.isMeshPhongMaterial&&!r.isMeshStandardMaterial&&!r.isMeshNormalMaterial&&r.shading===oh)for(var o=0,a=3*t.count;o8&&(d.length=8);for(var g=i.morphAttributes,f=0,m=d.length;f0&&A.renderInstances(i,I,L):A.render(I,L)}},this.compile=function(t,e){$=[],t.traverse(function(t){t.isLight&&$.push(t)}),O($,e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var r=0;r=0&&e<=t.width-i&&r>=0&&r<=t.height-n&&Rt.readPixels(e,r,i,n,N(u),N(h),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&Rt.bindFramebuffer(Rt.FRAMEBUFFER,Q)}}}}function be(t,e){this.name="",this.color=new tt(t),this.density=void 0!==e?e:25e-5}function xe(t,e,r){this.name="",this.color=new tt(t),this.near=void 0!==e?e:1,this.far=void 0!==r?r:1e3}function _e(){gt.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function we(t,e,r,i,n){gt.call(this),this.lensFlares=[],this.positionScreen=new g,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,r,i,n)}function Se(t){nt.call(this),this.type="SpriteMaterial",this.color=new tt(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Ae(t){gt.call(this),this.type="Sprite",this.material=void 0!==t?t:new Se}function Me(){gt.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Ee(t,e){var r=this;if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var i=0,n=this.bones.length;i=0?(l=t(v-1e-5,m,l),p.subVectors(h,l)):(l=t(v+1e-5,m,l),p.subVectors(l,h)),m-1e-5>=0?(l=t(v,m-1e-5,l),d.subVectors(h,l)):(l=t(v,m+1e-5,l),d.subVectors(l,h)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(i=0;i.9&&o<.1&&(e<.2&&(f[t+0]+=1),r<.2&&(f[t+2]+=1),i<.2&&(f[t+4]+=1))}}function a(t){d.push(t.x,t.y,t.z)}function s(e,r){var i=3*e;r.x=t[i+0],r.y=t[i+1],r.z=t[i+2]}function c(){for(var t=new g,e=new g,r=new g,i=new g,n=new l,o=new l,a=new l,s=0,c=0;s0)&&f.push(w,S,M),(c!==r-1||u0&&c(!0),e>0&&c(!1)),this.setIndex(h),this.addAttribute("position",new Et(p,3)),this.addAttribute("normal",new Et(d,3)),this.addAttribute("uv",new Et(f,2))}function yr(t,e,r,i,n,o,a){gr.call(this,0,t,e,r,i,n,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:i,openEnded:n,thetaStart:o,thetaLength:a}}function br(t,e,r,i,n,o,a){vr.call(this,0,t,e,r,i,n,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:i,openEnded:n,thetaStart:o,thetaLength:a}}function xr(t,e,r,i){wt.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},this.fromBufferGeometry(new _r(t,e,r,i)),this.mergeVertices()}function _r(t,e,r,i){Ct.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},t=t||50,e=void 0!==e?Math.max(3,e):8,r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var n,o,a=[],s=[],c=[],u=[],h=new g,p=new l;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,n=3;o<=e;o++,n+=3){var d=r+o/e*i;h.x=t*Math.cos(d),h.y=t*Math.sin(d),s.push(h.x,h.y,h.z),c.push(0,0,1),p.x=(s[n]/t+1)/2,p.y=(s[n+1]/t+1)/2,u.push(p.x,p.y)}for(n=1;n<=e;n++)a.push(n,n+1,0);this.setIndex(a),this.addAttribute("position",new Et(s,3)),this.addAttribute("normal",new Et(c,3)),this.addAttribute("uv",new Et(u,2))}function wr(t){ot.call(this,{uniforms:up.merge([cp.lights,{opacity:{value:1}}]),vertexShader:hp.shadow_vert,fragmentShader:hp.shadow_frag}),this.lights=!0,this.transparent=!0,Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}}}),this.setValues(t)}function Sr(t){ot.call(this,t),this.type="RawShaderMaterial"}function Ar(t){nt.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new tt(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Mr(t){Ar.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function Er(t){nt.call(this),this.type="MeshPhongMaterial",this.color=new tt(16777215),this.specular=new tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Uh,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(t)}function Tr(t){Er.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Pr(t){nt.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Cr(t){nt.call(this),this.type="MeshLambertMaterial",this.color=new tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Uh,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(t)}function Ir(t){nt.call(this),this.type="LineDashedMaterial",this.color=new tt(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.lights=!1,this.setValues(t)}function Rr(t,e,r){var i=this,n=!1,o=0,a=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=r,this.itemStart=function(t){a++,!1===n&&void 0!==i.onStart&&i.onStart(t,o,a),n=!0},this.itemEnd=function(t){o++,void 0!==i.onProgress&&i.onProgress(t,o,a),o===a&&(n=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)}}function Lr(t){this.manager=void 0!==t?t:xp}function Or(t){this.manager=void 0!==t?t:xp,this._parser=null}function Dr(t){this.manager=void 0!==t?t:xp,this._parser=null}function Nr(t){this.manager=void 0!==t?t:xp}function kr(t){this.manager=void 0!==t?t:xp}function Fr(t){this.manager=void 0!==t?t:xp}function Br(t,e){gt.call(this),this.type="Light",this.color=new tt(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function zr(t,e,r){Br.call(this,t,r),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(gt.DefaultUp),this.updateMatrix(),this.groundColor=new tt(e)}function Ur(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new l(512,512),this.map=null,this.matrix=new v}function jr(){Ur.call(this,new bt(50,1,.5,500))}function Gr(t,e,r,i,n,o){Br.call(this,t,e),this.type="SpotLight",this.position.copy(gt.DefaultUp),this.updateMatrix(),this.target=new gt,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==r?r:0,this.angle=void 0!==i?i:Math.PI/3,this.penumbra=void 0!==n?n:0,this.decay=void 0!==o?o:1,this.shadow=new jr}function Vr(t,e,r,i){Br.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==r?r:0,this.decay=void 0!==i?i:1,this.shadow=new Ur(new bt(90,1,.5,500))}function $r(){Ur.call(this,new yt(-5,5,5,-5,.5,500))}function Hr(t,e){Br.call(this,t,e),this.type="DirectionalLight",this.position.copy(gt.DefaultUp),this.updateMatrix(),this.target=new gt,this.shadow=new $r}function Wr(t,e){Br.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function Xr(t,e,r,i){Br.call(this,t,e),this.type="RectAreaLight",this.position.set(0,1,0),this.updateMatrix(),this.width=void 0!==r?r:10,this.height=void 0!==i?i:10}function qr(t,e,r,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new e.constructor(r),this.sampleValues=e,this.valueSize=r}function Yr(t,e,r,i){qr.call(this,t,e,r,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Zr(t,e,r,i){qr.call(this,t,e,r,i)}function Kr(t,e,r,i){qr.call(this,t,e,r,i)}function Qr(t,e,r,i){if(void 0===t)throw new Error("track name is undefined");if(void 0===e||0===e.length)throw new Error("no keyframes in track named "+t);this.name=t,this.times=_p.convertArray(e,this.TimeBufferType),this.values=_p.convertArray(r,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation),this.validate(),this.optimize()}function Jr(t,e,r,i){Qr.call(this,t,e,r,i)}function ti(t,e,r,i){qr.call(this,t,e,r,i)}function ei(t,e,r,i){Qr.call(this,t,e,r,i)}function ri(t,e,r,i){Qr.call(this,t,e,r,i)}function ii(t,e,r,i){Qr.call(this,t,e,r,i)}function ni(t,e,r){Qr.call(this,t,e,r)}function oi(t,e,r,i){Qr.call(this,t,e,r,i)}function ai(t,e,r,i){Qr.apply(this,arguments)}function si(t,e,r){this.name=t,this.tracks=r,this.duration=void 0!==e?e:-1,this.uuid=Ql.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function ci(t){this.manager=void 0!==t?t:xp,this.textures={}}function ui(t){this.manager=void 0!==t?t:xp}function hi(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function li(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:xp,this.withCredentials=!1}function pi(t){this.manager=void 0!==t?t:xp,this.texturePath=""}function di(t,e,r,i,n){var o=.5*(i-e),a=.5*(n-r),s=t*t;return(2*r-2*i+o+a)*(t*s)+(-3*r+3*i-2*o-a)*s+o*t+r}function fi(t,e){var r=1-t;return r*r*e}function mi(t,e){return 2*(1-t)*t*e}function gi(t,e){return t*t*e}function vi(t,e,r,i){return fi(t,e)+mi(t,r)+gi(t,i)}function yi(t,e){var r=1-t;return r*r*r*e}function bi(t,e){var r=1-t;return 3*r*r*t*e}function xi(t,e){return 3*(1-t)*t*t*e}function _i(t,e){return t*t*t*e}function wi(t,e,r,i,n){return yi(t,e)+bi(t,r)+xi(t,i)+_i(t,n)}function Si(){this.arcLengthDivisions=200}function Ai(t,e){Si.call(this),this.v1=t,this.v2=e}function Mi(){Si.call(this),this.curves=[],this.autoClose=!1}function Ei(t,e,r,i,n,o,a,s){Si.call(this),this.aX=t,this.aY=e,this.xRadius=r,this.yRadius=i,this.aStartAngle=n,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0}function Ti(t){Si.call(this),this.points=void 0===t?[]:t}function Pi(t,e,r,i){Si.call(this),this.v0=t,this.v1=e,this.v2=r,this.v3=i}function Ci(t,e,r){Si.call(this),this.v0=t,this.v1=e,this.v2=r}function Ii(t){Mi.call(this),this.currentPoint=new l,t&&this.fromPoints(t)}function Ri(){Ii.apply(this,arguments),this.holes=[]}function Li(){this.subPaths=[],this.currentPath=null}function Oi(t){this.data=t}function Di(t){this.manager=void 0!==t?t:xp}function Ni(t){this.manager=void 0!==t?t:xp}function ki(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new bt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new bt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Fi(){gt.call(this),this.type="AudioListener",this.context=Cp.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Bi(t){gt.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function zi(t){Bi.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Ui(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function ji(t,e,r){this.binding=t,this.valueSize=r;var i,n=Float64Array;switch(e){case"quaternion":i=this._slerp;break;case"string":case"bool":n=Array,i=this._select;break;default:i=this._lerp}this.buffer=new n(4*r),this._mixBufferRegion=i,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function Gi(t,e,r){var i=r||Vi.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Vi(t,e,r){this.path=e,this.parsedPath=r||Vi.parseTrackName(e),this.node=Vi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function $i(t){var e=arguments;this.uuid=Ql.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var r={};this._indicesByUUID=r;for(var i=0,n=arguments.length;i!==n;++i)r[e[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var o=this;this.stats={objects:{get total(){return o._objects.length},get inUse(){return this.total-o.nCachedObjects_}},get bindingsPerObject(){return o._bindings.length}}}function Hi(t,e,r){this._mixer=t,this._clip=e,this._localRoot=r||null;for(var i=e.tracks,n=i.length,o=new Array(n),a={endingStart:zl,endingEnd:zl},s=0;s!==n;++s){var c=i[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(n),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Bl,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 Wi(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Xi(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function qi(){Ct.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Yi(t,e,r,i){this.uuid=Ql.generateUUID(),this.data=t,this.itemSize=e,this.offset=r,this.normalized=!0===i}function Zi(t,e){this.uuid=Ql.generateUUID(),this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function Ki(t,e,r){Zi.call(this,t,e),this.meshPerAttribute=r||1}function Qi(t,e,r){St.call(this,t,e),this.meshPerAttribute=r||1}function Ji(t,e,r,i){this.ray=new Nt(t,e),this.near=r||0,this.far=i||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function tn(t,e){return t.distance-e.distance}function en(t,e,r,i){if(!1!==t.visible&&(t.raycast(e,r),!0===i))for(var n=t.children,o=0,a=n.length;o1?c.pop().toLowerCase():"",h=e.match(/^(.+):\/\/(.+)$/);h&&(i=h[1].toLowerCase(),e=h[2]);var l=e.substring(0,e.lastIndexOf("/")+1);if(n.includes(u)){r=u;var p=e.length-u.length-1;u=e.substr(0,p).split(".").pop().toLowerCase();var d=s.length-u.length-1;s=s.substr(0,d)}else r=!1;return{path:e,name:a,ext:u,base:s,dir:l,compressed:r,protocol:i,src:t}}function Sn(t,e,r){var i,n,o,a=null,s=0;r||(r={});var c=function(){s=!1===r.leading?0:Date.now(),a=null,o=t.apply(i,n),a||(i=n=null)};return function(){var u=Date.now();s||!1!==r.leading||(s=u);var h=e-(u-s);return i=this,n=arguments,h<=0||h>e?(a&&(clearTimeout(a),a=null),s=u,o=t.apply(i,n),a||(i=n=null)):a||!1===r.trailing||(a=setTimeout(c,h)),o}}function An(t,e){return te?1:0}function Mn(t,e,r){void 0===r&&(r=An);for(var i=0,n=t.length-1;i<=n;){var o=i+n>>1,a=r(e,t[o]);if(a>0)i=o+1;else{if(!(a<0))return o;n=o-1}}return-i-1}function En(t,e){var r=t.length-1;if(t[r]>1;t[n]>=e?r=n-1:i=n+1}return r+1}function Tn(t,e){if(t[0]>e)return-1;for(var r=0,i=t.length-1;r<=i;){var n=r+i>>1;t[n]>e?i=n-1:r=n+1}return r-1}function Pn(t,e,r){var i=En(t,e),n=Tn(t,r);return-1===i||-1===n||i>n?0:n-i+1}function Cn(t){return t.sort().filter(function(t,e,r){return 0===e||t!==r[e-1]})}function In(t){if(t.length>28672){for(var e=[],r=0;r65535?Uint32Array:Uint16Array)(t)}function Dn(t){return Array.isArray(t)?t:[t]}function Nn(t){return t.buffer&&t.buffer instanceof ArrayBuffer?t.buffer:t}function kn(t,e){return t instanceof e?t:new e(t)}function Fn(t,e){return void 0===t?t=new e:Array.isArray(t)&&(t=(new e).fromArray(t)),t}function Bn(t){return Fn(t,l)}function zn(t){return Fn(t,g)}function Un(t){return Fn(t,v)}function jn(t){return Fn(t,m)}function Gn(t){return kn(t,Float32Array)}function Vn(t){return gn(t,"").toString().toLowerCase()}function $n(t){return.01745*t}function Hn(t){return 57.29578*t}function Wn(){for(var t,e=0,r=0;r<36;r++)8===r||13===r||18===r||23===r?uf[r]="-":14===r?uf[r]="4":(e<=2&&(e=33554432+16777216*Math.random()|0),t=15&e,e>>=4,uf[r]=cf[19===r?3&t|8:t]);return uf.join("")}function Xn(t){return t-=t>>1&1431655765,16843009*((t=(858993459&t)+(t>>2&858993459))+(t>>4)&252645135)>>24}function qn(t,e,r){return(t-e)/(r-e)}function Yn(t,e,r){return Math.max(e,Math.min(r,t))}function Zn(t){return Yn(t,0,100)}function Kn(t){return Yn(t,0,1)}function Qn(t,e,r){return t+(e-t)*r}function Jn(t,e,r,i,n,o){var a=(r-t)*o,s=(i-e)*o,c=n*n;return(2*e-2*r+a+s)*(n*c)+(-3*e+3*r-2*a-s)*c+a*n+e}function to(t,e,r){return(r=Kn(qn(r,t,e)))*r*(3-2*r)}function eo(t,e,r){if(t>e)return t;var i=t/e;return((2*r-e)*i+(2*e-3*r))*i*i+r}function ro(t,e,r,i,n){this._listener=e,this._isOnce=r,this.context=i,this._signal=t,this._priority=n||0}function io(t,e){if("function"!=typeof t)throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",e))}function no(){this._bindings=[],this._prevParams=null;var t=this;this.dispatch=function(){no.prototype.dispatch.apply(t,arguments)}}function oo(t){var e={operator:void 0,rules:[]};if(!t)return e;var r,i,n=e,o=[];"("===(t=t.replace(/\(/g," ( ").replace(/\)/g," ) ").trim()).charAt(0)&&")"===t.substr(-1)&&(t=t.slice(1,-1).trim());for(var a,s=t.split(/\s+/),c=function(t){r={operator:t,rules:[]},void 0===n?(n=r,e=r):(n.rules.push(r),o.push(n),n=r)},u=function(t){i=n,void 0===(n=o.pop())&&(c(t),h(i))},h=function(t){n.rules.push(t)},l=0;l0)if("NOT"===d)a=1;else if(1===a)a=2;else{if(2!==a)throw new Error("something went wrong with 'not'");a=!1,u()}if("AND"!==d)if("OR"!==d)if("NOT"!==p.toUpperCase()){var f=df[d];if(void 0===f)if("HYDROGEN"!==d)if("SMALL"!==d)if("NUCLEOPHILIC"!==d)if("HYDROPHOBIC"!==d)if("AROMATIC"!==d)if("AMIDE"!==d)if("ACIDIC"!==d)if("BASIC"!==d)if("CHARGED"!==d)if("POLAR"!==d)if("NONPOLAR"!==d)if("CYCLIC"!==d)if("ALIPHATIC"!==d)if("SIDECHAINATTACHED"!==d)if("LIGAND"!==d)if(-1===ff.indexOf(d))if("@"!==p.charAt(0))if("#"!==p.charAt(0))if("_"!==p.charAt(0))if("["!==p[0]||"]"!==p[p.length-1])if(p.length>=1&&p.length<=4&&"^"!==p[0]&&":"!==p[0]&&"."!==p[0]&&"%"!==p[0]&&"/"!==p[0]&&isNaN(parseInt(p)))h({resname:d});else{var m={operator:"AND",rules:[]},g=p.split("/");if(g.length>1&&g[1]){if(isNaN(parseInt(g[1])))throw new Error("model must be an integer");m.rules.push({model:parseInt(g[1])})}var v=g[0].split("%");v.length>1&&m.rules.push({altloc:v[1]});var y=v[0].split(".");if(y.length>1&&y[1]){if(y[1].length>4)throw new Error("atomname must be one to four characters");m.rules.push({atomname:y[1].substring(0,4).toUpperCase()})}var b=y[0].split(":");b.length>1&&b[1]&&m.rules.push({chainname:b[1]});var x=b[0].split("^");if(x.length>1&&m.rules.push({inscode:x[1]}),x[0]){var _=void 0,w=void 0;"-"===x[0][0]&&(x[0]=x[0].substr(1),_=!0),x[0].includes("--")&&(x[0]=x[0].replace("--","-"),w=!0);var S=x[0].split("-");if(1===S.length){if(S=parseInt(S[0]),isNaN(S))throw new Error("resi must be an integer");_&&(S*=-1),m.rules.push({resno:S})}else{if(2!==S.length)throw new Error("resi range must contain one '-'");_&&(S[0]*=-1),w&&(S[1]*=-1),m.rules.push({resno:[parseInt(S[0]),parseInt(S[1])]})}}if(1===m.rules.length)h(m.rules[0]);else{if(!(m.rules.length>1))throw new Error("empty selection chunk");h(m)}}else{var A=d.substr(1,p.length-2).split(","),M=A.length>1?A:A[0];h({resname:M})}else h({element:d.substr(1)});else console.error("# for element selection deprecated, use _"),h({element:d.substr(1)});else{for(var E=p.substr(1).split(","),T=0,P=E.length;Tt.resno||e.resno[1]t.resno||e.resno[1]0?t:null}function po(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword&&!mf.includes(t.keyword)||(void 0!==t.model||(void 0!==t.chainname||(void 0!==t.resname||(void 0!==t.resno||void 0!==t.sstruc))))})),ho(t,ao)}function fo(t,e){return e&&(t=lo(t,function(t){return!(void 0===t.keyword||!mf.includes(t.keyword))||(void 0!==t.model||(void 0!==t.chainname||(void 0!==t.atomname||(void 0!==t.element||void 0!==t.altloc))))})),ho(t,so)}function mo(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword&&!gf.includes(t.keyword)||(void 0!==t.resname||(void 0!==t.resno||(void 0!==t.atomname||(void 0!==t.element||(void 0!==t.altloc||(void 0!==t.sstruc||void 0!==t.inscode))))))})),ho(t,co)}function go(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword||(void 0!==t.chainname||(void 0!==t.resname||(void 0!==t.resno||(void 0!==t.atomname||(void 0!==t.element||(void 0!==t.altloc||(void 0!==t.sstruc||void 0!==t.inscode)))))))})),ho(t,uo)}function vo(t){var e=t;return t.forEach(function(t){t.__deps&&Array.prototype.push.apply(e,vo(t.__deps))}),e}function yo(t){return Cn(vo(t)).map(function(t){return t.toString()}).join("\n\n\n")}function bo(t){var e=t.data.__name,r=t.data.__postId;if(void 0===e)console.error("message __name undefined");else if(void 0===self.func)console.error("worker func undefined",e);else{var i=function(t,e){t=t||{},void 0!==r&&(t.__postId=r);try{self.postMessage(t,e)}catch(e){console.error("self.postMessage:",e),self.postMessage(t)}};self.func(t,i)}}function xo(t,e){var r="'use strict';\n\n"+yo(e);return r+="\n\n\nself.func = "+t.toString()+";",r+="\n\n\nself.onmessage = "+bo.toString()+";",new window.Blob([r],{type:"application/javascript"})}function _o(t){zf=t}function wo(t){Uf=t}function So(e){t.Debug=e}function Ao(t){var e=wn(t),r=Wf.get(e.protocol);return r&&!(e=wn(r.getUrl(e.src))).ext&&r.getExt&&(e.ext=r.getExt(t)),e}function Mo(t,e){var r,i=Object.assign(Ao(t),e);return qf.names.includes(i.ext)?r=om:Vf.includes(i.ext)?r=cm:"plugin"===i.ext&&(r=um),r?new r(i.src,i).load():Promise.reject(new Error("autoLoad: ext '"+i.ext+"' unknown"))}function Eo(t){return To(Po(t),arguments)}function To(t,e){var r,i,n,o,a,s,c,u,h,l=1,p=t.length,d="";for(i=0;i=0),o.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,o.width?parseInt(o.width):0);break;case"e":r=o.precision?parseFloat(r).toExponential(o.precision):parseFloat(r).toExponential();break;case"f":r=o.precision?parseFloat(r).toFixed(o.precision):parseFloat(r);break;case"g":r=o.precision?String(Number(r.toPrecision(o.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=o.precision?r.substring(0,o.precision):r;break;case"t":r=String(!!r),r=o.precision?r.substring(0,o.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=o.precision?r.substring(0,o.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=o.precision?r.substring(0,o.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}pm.json.test(o.type)?d+=r:(!pm.number.test(o.type)||u&&!o.sign?h="":(h=u?"+":"-",r=r.toString().replace(pm.sign,"")),s=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",c=o.width-(h+r).length,a=o.width&&c>0?s.repeat(c):"",d+=o.align?h+r+a:"0"===s?h+a+r:a+h+r)}return d}function Po(t){if(dm[t])return dm[t];for(var e,r=t,i=[],n=0;r;){if(null!==(e=pm.text.exec(r)))i.push(e[0]);else if(null!==(e=pm.modulo.exec(r)))i.push("%");else{if(null===(e=pm.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){n|=1;var o=[],a=e[2],s=[];if(null===(s=pm.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(s[1]);""!==(a=a.substring(s[0].length));)if(null!==(s=pm.key_access.exec(a)))o.push(s[1]);else{if(null===(s=pm.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(s[1])}e[2]=o}else n|=2;if(3===n)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return dm[t]=i}function Co(){this.signals={updated:new no},this.begin(),this.maxDuration=-1/0,this.minDuration=1/0,this.avgDuration=14,this.lastDuration=1/0,this.prevFpsTime=0,this.lastFps=1/0,this.lastFrames=1,this.frames=0,this.count=0}function Io(t){if(void 0===t)return"";var e=[];for(var r in t){var i=t[r];!1!==i&&e.push("#define "+r+" "+i)}return e.join("\n")+"\n"}function Ro(t,e){e=e||{};var r=t+"|";for(var i in e)r+=i+":"+e[i];if(!_m[r]){var n=Io(e),o=Yf.get("shader/"+t);if(!o)throw new Error("empty shader, '"+t+"'");o=o.replace(xm,function(t,e){var r="shader/chunk/"+e+".glsl";return Yf.get(r)||hp[e]||""}),_m[r]=n+o}return _m[r]}function Lo(t,e,r,i){function n(e){var i=e%u,n=Math.floor(e/u),o=i*m,a=n*g;r.camera.setViewOffset(m*u,g*u,o,a,m,g),r.render(),h?v.drawImage(t.domElement,Math.floor(o/2),Math.floor(a/2),Math.ceil(m/2),Math.ceil(g/2)):v.drawImage(t.domElement,Math.floor(o),Math.floor(a),Math.ceil(m),Math.ceil(g)),"function"==typeof l&&l(e+1,d,!1)}function o(){r.setSampling(y),r.camera.view=null,"function"==typeof p&&p(d+1,d,!1)}function a(){for(var t=0;t<=d;++t)t===d?o():n(t)}function s(){function t(){e===d?o():n(e),e+=1}for(var e=0,r=0;r<=d;++r)setTimeout(t,0,r)}var c=i||{},u=void 0!==c.factor?c.factor:2,h=void 0!==c.antialias&&c.antialias,l=c.onProgress,p=c.onFinish;h&&(u*=2);var d=u*u,f=document.createElement("canvas"),m=r.width,g=r.height;h?(f.width=m*u/2,f.height=g*u/2):(f.width=m*u,f.height=g*u);var v=f.getContext("2d"),y=r.sampleLevel;r.setSampling(-1),this.render=a,this.renderAsync=s,this.canvas=f}function Oo(t,e,r,i,n){r=r||1,i=i||0;var o,a,s=n?n.length:t.length/r,c=0,u=0;if(n)for(a=0;ae?1:t=u&&e(t[o],l)>0;)t[o+1]=t[o],--o;t[o+1]=l}if(-1===c)break;h=s[c--],u=s[c--]}else{for(a=h,n(u+h>>1,o=u+1),e(t[u],t[h])>0&&n(u,h),e(t[o],t[h])>0&&n(o,h),e(t[u],t[o])>0&&n(u,o),l=t[o];;){do{o++}while(e(t[o],l)<0);do{a--}while(e(t[a],l)>0);if(a=a-u?(s[++c]=o,s[++c]=h,h=a-1):(s[++c]=u,s[++c]=a-1,u=o)}return t}function $o(t){for(var e=-1/0,r=0,i=t.length;re&&(e=t[r]);return e}function Ho(t){for(var e=1/0,r=0,i=t.length;r=0;a--){for(o=h-1;o>=0;o--)if(c=4*(a*h+o),l[c]!==e||l[c+1]!==r||l[c+2]!==i||l[c+3]!==n){s=!0;break}if(s)break}var f=a;for(s=!1,o=h-1;o>=0;o--){for(a=u-1;a>=0;a--)if(c=4*(a*h+o),l[c]!==e||l[c+1]!==r||l[c+2]!==i||l[c+3]!==n){s=!0;break}if(s)break}var m=o,g=document.createElement("canvas");return g.width=m-d,g.height=f-p,g.getContext("2d").drawImage(t,d,p,g.width,g.height,0,0,g.width,g.height),g}function Zo(t,e){function r(e){var r=s;c&&(r*=2),e&&(r=1/r),t.scene.traverse(function(t){var e=t.material;e&&e.linewidth&&(e.linewidth*=r),e&&e.uniforms&&e.uniforms.size&&void 0===e.uniforms.size.__seen&&(e.uniforms.size.value*=r,e.uniforms.size.__seen=!0)}),t.scene.traverse(function(t){var e=t.material;e&&e.uniforms&&e.uniforms.size&&delete e.uniforms.size.__seen})}function i(t){if(a){var e=d;return Yo(t,u?0:255*e.r,u?0:255*e.g,u?0:255*e.b,u?0:255)}return t}function n(t,e,r){"function"==typeof o.onProgress&&o.onProgress(t,e,r)}var o=e||{},a=gn(o.trim,!1),s=gn(o.factor,1),c=gn(o.antialias,!1),u=gn(o.transparent,!1),h=t.renderer,l=t.camera,p=h.getClearAlpha(),d=h.getClearColor();return new Promise(function(e){function o(o,s){i(a.canvas).toBlob(function(i){h.setClearAlpha(p),r(!0),t.requestRender(),n(s,s,!0),e(i)},"image/png")}var a=new Lo(h,l,t,{factor:s,antialias:c,onProgress:n,onFinish:o});h.setClearAlpha(u?0:1),r(),a.renderAsync()})}function Ko(t,e){t.traverseVisible(function(t){if(t instanceof De&&t.sortParticles){var r=t.geometry.attributes,i=r.position.count;if(0!==i){Im.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),Rm.multiplyMatrices(e.projectionMatrix,Im);var n,o,a,s;t.userData.sortData?(n=t.userData.sortData,a=n.__zArray,o=n.__sortArray,s=n.__cmpFn):(a=new Float32Array(i),o=new Uint32Array(i),n={__zArray:a,__sortArray:o,__cmpFn:s=function(t,e){var r=a[t],i=a[e];return r>i?1:r500&&!V&&$<3&&-1!==$){var e=$;$=3,j=!0,O(),V=!0,$=e,t.Debug&&jf.log("rendered still frame")}window.requestAnimationFrame(w)}function S(t,e){t*=window.devicePixelRatio,e*=window.devicePixelRatio;var r,i,n,o=zf?Dm:Nm;O(!0),ht.readRenderTargetPixels(pt,t,e,1,1,o),r=zf?Math.round(255*o[0])<<16&16711680|Math.round(255*o[1])<<8&65280|255&Math.round(255*o[2]):o[0]<<16|o[1]<<8|o[2];var a=Math.round(o[3]),s=at.getObjectById(a);return s&&(i=s.userData.instance,n=s.userData.buffer.picking),{pid:r,instance:i,picker:n}}function A(){j||(window.performance.now()-q.startTime>22&&(q.begin(),V=!1),j=!0,window.requestAnimationFrame(function(){O(),q.update()}))}function M(){var t=$n(Y.fov),e=2*Math.tan(t/2)*-K.position.z;Z.zoom=F/e}function E(){var t=X;(H=Et.copy(K.position).length())||(K.position.set(0,0,t.cameraZ),H=Math.abs(t.cameraZ)),W=Math.max(10,.5*Mt),((W+=wt.getCenter(Et).length())===1/0||W===-1/0||isNaN(W))&&(W=50);var e=(50-t.clipNear)/50,r=-(50-t.clipFar)/50;K.near=H-W*e,K.far=H+W*r;var i=(50-t.fogNear)/50,n=-(50-t.fogFar)/50,o=Q.fog;o.color.set(t.fogColor),o.near=H-W*i,o.far=H+W*n,"PerspectiveCamera"===K.type?(K.near=Math.max(.1,t.clipDist,K.near),K.far=Math.max(1,K.far),o.near=Math.max(.1,o.near),o.far=Math.max(1,o.far)):"OrthographicCamera"===K.type&&0===t.clipNear&&t.clipDist>0&&H+K.zoom>2*-t.clipDist&&(K.near+=K.zoom+t.clipDist)}function T(){K.updateMatrix(),K.updateMatrixWorld(!0),K.matrixWorldInverse.getInverse(K.matrixWorld),K.updateProjectionMatrix(),Qo(Q,K,ht,H,W),Ko(Q,K)}function P(t,e,r,i){nt.visible=t,at.visible=e,ct.visible=r,ut.visible=i}function C(){Et.copy(K.position).setLength(100*Mt),J.position.copy(K.position).add(Et),J.color.set(X.lightColor),J.intensity=X.lightIntensity,et.color.set(X.ambientColor),et.intensity=X.ambientIntensity}function I(){ht.clearTarget(pt),P(!1,!0,!1,!1),ht.render(Q,K,pt),_(),ht.setRenderTarget(null)}function R(e){e?ht.clearTarget(e):ht.clear(),P(!1,!1,!0,!1),ht.render(Q,K,e),e?ht.clearTarget(e,!1,!0,!1):ht.clearDepth(),_(),P(!0,!1,!1,t.Debug),ht.render(Q,K,e),_()}function L(){var t=Tm[Math.max(0,Math.min($,5))],e=1/t.length;mt.tForeground.value=dt.texture;for(var r=dt.width,i=dt.height,n=0;n0?L():R(),G=t,U=!1,j=!1}function D(){jf.log("scene cleared"),Q.remove(rt),r(),ht.clear()}var N,k,F,B={ticked:new no};if((N="string"==typeof e?document.getElementById(e):e instanceof window.Element?e:document.createElement("div"))===document.body)k=window.innerWidth||1,F=window.innerHeight||1;else{var z=N.getBoundingClientRect();k=z.width||1,F=z.height||1}var U,j,G,V,$,H,W,X;!function(){X={fogColor:new tt(0),fogNear:50,fogFar:100,backgroundColor:new tt(0),cameraType:"perspective",cameraFov:40,cameraZ:-80,clipNear:0,clipFar:100,clipDist:10,lightColor:new tt(14540253),lightIntensity:1,ambientColor:new tt(14540253),ambientIntensity:.2,sampleLevel:0}}();var q;!function(){q=new Co}();var Y,Z,K;!function(){var t=new g(0,0,0);(Y=new bt(X.cameraFov,k/F)).position.z=X.cameraZ,Y.lookAt(t),(Z=new yt(k/-2,k/2,F/2,F/-2)).position.z=X.cameraZ,Z.lookAt(t),(K="orthographic"===X.cameraType?Z:Y).updateProjectionMatrix()}();var Q,J,et,rt,it,nt,at,ct,ut;r();var ht,lt,pt,dt,ft,mt,gt,vt,xt;if(!1===function(){var t=window.devicePixelRatio;try{ht=new ye({preserveDrawingBuffer:!0,alpha:!0,antialias:!0})}catch(t){return N.innerHTML=Gf,!1}ht.setPixelRatio(t),ht.setSize(k,F),ht.autoClear=!1,ht.sortObjects=!0;var e=ht.getContext();wo(ht.extensions.get("EXT_frag_depth")),ht.extensions.get("OES_element_index_uint"),_o(ht.extensions.get("OES_texture_float")&&ht.extensions.get("WEBGL_color_buffer_float")||ht.extensions.get("OES_texture_float")&&Jo(e,e.FLOAT)),N.appendChild(ht.domElement);var r=k*t,i=F*t;ht.extensions.get("OES_texture_float"),lt=ht.extensions.get("OES_texture_half_float")&&Jo(e,36193),ht.extensions.get("WEBGL_color_buffer_float"),(pt=new f(r,i,{minFilter:nl,magFilter:nl,stencilBuffer:!1,format:Al,type:zf?gl:hl})).texture.generateMipmaps=!1,dt=new f(r,i,{minFilter:sl,magFilter:sl,format:Al}),ft=new f(r,i,{minFilter:nl,magFilter:nl,format:Al,type:lt?vl:zf?gl:hl}),gt=new ot({uniforms:mt={tForeground:{type:"t",value:null},scale:{type:"f",value:1}},vertexShader:Ro("Quad.vert"),fragmentShader:Ro("Quad.frag"),premultipliedAlpha:!0,transparent:!0,blending:ph,depthTest:!1,depthWrite:!1}),vt=new yt(-1,1,1,-1,0,1),xt=(new _e).add(new Bt(new Lt(2,2),gt))}())return this.container=N,void jf.error("Viewer: could not initialize renderer");var _t,wt=new st,At=new g,Mt=0;!function(){var t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),e=new Float32Array(24),r=new Ct;r.setIndex(new St(t,1)),r.addAttribute("position",new St(e,3));var i=new ot({uniforms:{uColor:{value:new tt("skyblue")}},vertexShader:Ro("BasicLine.vert"),fragmentShader:Ro("BasicLine.frag"),linewidth:2});_t=new Re(r,i),ut.add(_t)}(),d(),p();var Et=new g,Tt={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};this.container=N,this.stats=q,this.signals=B,this.rotationGroup=rt,this.translationGroup=it,this.add=n,this.remove=a,this.clear=D,this.getPickingPixels=c,this.getImage=u,this.makeImage=h,this.setLight=l,this.setFog=p,this.setBackground=d,this.setSampling=m,this.setCamera=v,this.setClip=y,this.setSize=b,this.handleResize=x,this.pick=S,this.requestRender=A,this.render=O,this.animate=w,this.updateZoom=M,this.updateHelper=i,this.renderer=ht,this.scene=Q,this.perspectiveCamera=Y,this.boundingBox=wt,this.updateBoundingBox=function(){s(),t.Debug&&i()},Object.defineProperties(this,{camera:{get:function(){return K}},width:{get:function(){return k}},height:{get:function(){return F}},sampleLevel:{get:function(){return $}}})}function ra(t){var e=t.touches[0].pageX-t.touches[1].pageX,r=t.touches[0].pageY-t.touches[1].pageY;return Math.sqrt(e*e+r*r)}function ia(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<n&&(n=u),h>o&&(o=h),l>a&&(a=l)}return[pa([e,r,i]),pa([n,o,a])]}function ua(t,e){for(var r=0,i=e.length;r>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24}function Ta(t,e){this.type=t,this.scale=e||1,this.max=10}function Pa(t,e){this.cols=t,this.rows=e,this.size=this.cols*this.rows,this.data=new Float32Array(this.size)}function Ca(t,e){for(var r=0,i=0,n=e.rows,o=e.cols,a=0,s=0,c=0,u=e.data,h=t.data;re?(e/=t,t*Math.sqrt(1+e*e)):e>0?(t/=e,e*Math.sqrt(1+t*t)):0}function za(t,e,r,i,n,o,a,s){for(var c=2*Zv,u=Kv,h=0,l=0,p=0,d=0,f=Math.max(o,30),m=0,g=0,v=0,y=0,b=0,x=0,_=0,w=0,S=0,A=0,M=0,E=0,T=0,P=0,C=0,I=0,R=0,L=4660,O=0,D=0,N=0,k=new Float64Array(a<<3);h>16)?D:-D,t[h*e+p]=O;for(d=0;d<2;d++)for(l=0;l>o),d=Math.max(0,e-i-c>>o),f=Math.max(0,r-i-u>>o),y=Math.min(h,t+i-s>>o),x=Math.min(l,e+i-c>>o),_=Math.min(p,r+i-u>>o),w=[],S=a;S<=y;++S)for(var A=d;A<=x;++A)for(var E=f;E<=_;++E){var P=b[(S*l+A)*p+E];if(P>0)for(var I=P-1,R=T[I],L=R+M[I],O=R;O>o),l=1+(a.max.y-c>>o),p=1+(a.max.z-u>>o),d=h*l*p,f=t.count,m=t.x,g=t.y,v=t.z,y=0,b=new Uint32Array(d),x=new Int32Array(f);for(i=0;i>o,w=g[i]-c>>o,S=v[i]-u>>o,A=(_*l+w)*p+S;1===(b[A]+=1)&&(y+=1),x[i]=A}var M=new Uint16Array(y);for(i=0,n=0;i0&&(b[i]=n+1,M[n]=E,n+=1)}var T=new Uint32Array(y);for(i=1;i0){var R=I-1;C[T[R]+P[R]]=i,P[R]+=1}}this.within=r}function Za(e){var r=0,i=0,n={},o={},a=window.URL.createObjectURL($f.get(e)),s=new window.Worker(a);$f.activeWorkerCount+=1,s.onmessage=function(i){r-=1;var a=i.data.__postId;t.Debug&&jf.timeEnd("Worker.postMessage "+e+" #"+a),n[a]&&n[a].call(s,i),delete n[a],delete o[a]},s.onerror=function(t){if(r-=1,t.data){var i=t.data.__postId;o[i]?o[i].call(s,t):jf.error("Worker.onerror",i,e,t),delete n[i],delete o[i]}else jf.error("Worker.onerror",e,t)},this.name=e,this.post=function(a,c,u,h){n[i]=u,o[i]=h,(a=a||{}).__name=e,a.__postId=i,a.__debug=t.Debug,t.Debug&&jf.time("Worker.postMessage "+e+" #"+i);try{s.postMessage(a,c)}catch(t){jf.error("worker.post:",t),s.postMessage(a)}return r+=1,i+=1,this},this.terminate=function(){s?(s.terminate(),window.URL.revokeObjectURL(a),$f.activeWorkerCount-=1):jf.log("no worker to terminate")},Object.defineProperties(this,{postCount:{get:function(){return i}},pending:{get:function(){return r}}})}function Ka(t,e){e=Math.min(8,e||2);var r=[],i=0;this.name=t,this.maxCount=e,this.post=function(t,e,r,i){return this.getNextWorker().post(t,e,r,i),this},this.terminate=function(){r.forEach(function(t){t.terminate()})},this.getNextWorker=function(){for(var n,o=1/0,a=0;a=i){n=new Za(t),r.push(n),i+=1;break}var s=r[a];if(0===s.pending){n=s;break}s.pending=x){N=v,L=!0;break}if(L)break}if(L)break}for(L=!1,g=o;g=x){D=g,L=!0;break}if(L)break}if(L)break}for(L=!1,m=n;m=x){O=m,L=!0;break}if(L)break}if(L)break}for(L=!1,v=h;v>=s;--v){for(g=u;g>=o;--g){for(m=c;m>=n;--m)if(p=e*r*v+e*g+m,t[p]>=x){B=v,L=!0;break}if(L)break}if(L)break}for(L=!1,g=u;g>=o;--g){for(v=B;v>=s;--v){for(m=c;m>=n;--m)if(p=e*r*v+e*g+m,t[p]>=x){F=g,L=!0;break}if(L)break}if(L)break}for(L=!1,m=c;m>=n;--m){for(g=F;g>=o;--g){for(v=B;v>=s;--v)if(p=e*r*v+e*g+m,t[p]>=x){k=m,L=!0;break}if(L)break}if(L)break}_?(n=Math.max(0,O-1),o=Math.max(0,D-1),s=Math.max(0,N-1),c=Math.min(e-1,k+1),u=Math.min(r-1,F+1),h=Math.min(i-1,B+1)):(n=Math.max(1,O-1),o=Math.max(1,D-1),s=Math.max(1,N-1),c=Math.min(e-2,k+1),u=Math.min(r-2,F+1),h=Math.min(i-2,B+1))}var z=15;for(v=s;vs&&(s=e);var a=o-n;if(0===a)return-1;var u=4*l;if(l+=1,1===a)return h[u]=n,h[u+1]=-1,h[u+2]=-1,h[u+3]=i,u;var d=n+Math.floor(a/2);p=e%3;for(var f,m,g,v,y,b=n,x=o-1;x>b;){for(v=t[3*c[g=b+x>>1]+p],m=c[g],c[g]=c[x],c[x]=m,y=b,f=b;fn&&s.pop()}var p,d,f=i(u)%3,m=3*c[h[u]],g=[t[m+0],t[m+1],t[m+2]],v=e(r,g),y=h[u+1],b=h[u+2];if(-1===b&&-1===y)return void((s.size()t[3*c[h[e]]+n])throw new Error("left child is > parent!");i+=o(a,r+1)}if(-1!==s){if(t[3*c[h[s]]+n]0&&(e=":"+Cn(t).join(" OR :")),new Cf(e)}function fs(e,r){if(r){t.Debug&&jf.time("assignSecondaryStructure");var i=[];e.eachModel(function(t){t.eachChain(function(t){i.push(t.chainname)})});var n=i.slice().sort(),o=[];n.forEach(function(t){o.push(i.indexOf(t))});var a=r.helices;(a=a.filter(function(t){return Mn(n,t[0])>=0})).sort(function(t,e){var r=t[0],i=e[0],a=t[1],s=e[1];if(r===i)return a===s?0:a=0})).sort(function(t,e){var r=t[0],i=e[0];if(r===i)return 0;var a=Mn(n,r),s=Mn(n,i);return o[a]=e;)r=Math.floor(r/e),n+=_y[r%e],i+=1;return i>=5&&jf.warn("chainname overflow"),n}function gs(e,r){t.Debug&&jf.time("calculateChainnames");var i=!0;if(e.eachChain(function(t){t.chainname&&(i=!1)}),i){var n=e.modelStore,o=e.chainStore,a=e.residueStore,s=function(t,e,r,i){for(var s=o.count,c=0;c500)return void(t.Debug&&jf.warn("more than 500 atoms, skip residue for auto-bonding",e.qualifiedName()));var c,u,h=[],l=[],p=[];if(o>50){var d=new ls(e,!0),f=e.isCg()?1.2:2.3;for(c=a;c500)return void jf.warn("more than 500 atoms, skip residue for auto-bonding",t.qualifiedName());for(var l=t.getBonds(),p=l.atomIndices1,d=l.atomIndices2,f=l.bondOrders,m=p.length,g=0;g1&&(c.x-=1),s.x<0&&(c.x+=1),s.y>1&&(c.y-=1),s.y<0&&(c.y+=1),s.z>1&&(c.z-=1),s.z<0&&(c.z+=1),t&&c.add(t),u.setPosition(c),u.multiplyMatrices(i.fracToCart,u),u.multiply(i.cartToFrac),e.push(u)}),e}if(e.unitcell){t.Debug&&jf.time("buildUnitcellAssembly");var i=e.unitcell,n=e.center.clone().applyMatrix4(i.cartToFrac),o=ps(i.spacegroup),a=new g,s=new g,c=new g;n.x>1&&(a.x-=1),n.x<0&&(a.x+=1),n.y>1&&(a.y-=1),n.y<0&&(a.y+=1),n.z>1&&(a.z-=1),n.z<0&&(a.z+=1);var u,h=new gy("UNITCELL"),l=r();if(e.biomolDict.NCS){u=[new v].concat(e.biomolDict.NCS.partList[0].matrixList);var p=[];l.forEach(function(t){u.forEach(function(e){p.push(t.clone().multiply(e))})}),h.addPart(p)}else h.addPart(l);var d=new g,f=new gy("SUPERCELL"),m=Array.prototype.concat.call(r(d.set(1,0,0)),r(d.set(0,1,0)),r(d.set(0,0,1)),r(d.set(-1,0,0)),r(d.set(0,-1,0)),r(d.set(0,0,-1)),r(d.set(1,1,0)),r(d.set(1,0,1)),r(d.set(0,1,1)),r(d.set(-1,-1,0)),r(d.set(-1,0,-1)),r(d.set(0,-1,-1)),r(d.set(1,-1,-1)),r(d.set(1,1,-1)),r(d.set(1,-1,1)),r(d.set(-1,1,1)),r(d.set(-1,-1,1)),r(d.set(-1,1,-1)),r(d.set(0,1,-1)),r(d.set(0,-1,1)),r(d.set(1,0,-1)),r(d.set(-1,0,1)),r(d.set(1,-1,0)),r(d.set(-1,1,0)),r(),r(d.set(1,1,1)),r(d.set(-1,-1,-1)));if(e.biomolDict.NCS){var y=[];m.forEach(function(t){u.forEach(function(e){y.push(t.clone().multiply(e))})}),f.addPart(y)}else f.addPart(m);e.biomolDict.UNITCELL=h,e.biomolDict.SUPERCELL=f,t.Debug&&jf.timeEnd("buildUnitcellAssembly")}}function Ss(t){var e=t.trim().toUpperCase();parseInt(e.charAt(0))&&(e=e.substr(1)),parseInt(e.charAt(0))&&(e=e.substr(1));var r=e.length;if(0===r)return"";if(1===r)return e;if(2===r){if(-1!==Sy.indexOf(e))return e;if(-1!==wy.indexOf(e[0]))return e[0]}return r>=3&&-1!==wy.indexOf(e[0])?e[0]:""}function As(t){var e=t.bondHash,r=e.countArray,i=e.offsetArray,n=e.indexArray,o=t.getBondProxy();t.eachResidue(function(t){var e=t.residueType;if(void 0===e.bonds){var a=t.atomOffset,s=[],c=[],u=[],h={};t.eachAtom(function(t){for(var e=t.index,l=i[e],p=0,d=r[e];pm){var g=m;m=f,f=g}var v=f+"|"+m;void 0===h[v]&&(h[v]=!0,s.push(f-a),c.push(m-a),u.push(o.bondOrder))}}),e.bonds={atomIndices1:s,atomIndices2:c,bondOrders:u}}})}function Ms(t,e){return t+"|"+e}function Es(t,e,r,i){return t+"|"+e.join(",")+"|"+(r?1:0)+"|"+(i||"")}function Ts(t,e,r){if(0!==r[0]&&0!==r[8]&&0!==r[4])for(var i=t.length,n=r[0],o=r[1],a=r[2],s=-e[0]+n+n/2,c=-e[1]+o+o/2,u=-e[2]+a+a/2,h=0;h.9*e[3*i+i])if(o>0)for(n=0;n<3;++n)t[r+n]-=e[3*i+n];else for(n=0;n<3;++n)t[r+n]+=e[3*i+n];return t}}function Cs(t,e,r){return[Oo(e,r[0],3,0,t),Oo(e,r[1],3,1,t),Oo(e,r[2],3,2,t)]}function Is(t,e,r,i,n){for(var o=t.length,a=new Float32Array(o),s=0;s1&&(l=1),i(e,r,n,o,h,f),i(e,r,n,o,l,m),m.sub(f).normalize(),m.toArray(a,g)}}function a(e,r,i,n,o){for(var a=r.next(),s=r.next(),c=r.next(),u=r.size,h=u-1,l=n||0,p=0;pr&&s.bondSet.clear(y)}else("OH"===u.atomname&&"TYR"===u.resname||"OH"===h.atomname&&"TYR"===h.resname)&&(function(t,e,i,n){var o,a;t.atomname===i?(o=t,a=e):(o=e,a=t),d.index=o.residueIndex;var s=d.getAtomIndexByName(n);return m.subVectors(s,o),v.subVectors(s,a),Hn(m.angleTo(v))r&&s.bondSet.clear(y)))}}return{atomSet:s.atomSet,bondSet:s.bondSet,bondStore:s.bondStore}}function Qs(t){var e=JSON.stringify(t);return void 0===Yx[e]&&(Yx[e]=new Zx(t)),Yx[e]}function Js(t,e){this.type=t,this.text=e||{}}function tc(t,e,r,i,n){function o(t,i,o){return((t*e+i)*r+o)*n}var a,s=new(i=i||Int32Array)(t*e*r*(n=n||1));this.data=s,this.index=o,this.set=function(t,e,r){var i=arguments,c=o(t,e,r);for(a=0;aa?u[h]=-1:(o=Math.sqrt(a-n),u[h]=Math.floor(o)),++h;A[l]=c,S[l]=u}}function o(r){var i,n,o,a,s,c,u,h,l,p,d,f,m,v,_,M,P,I,R=3*r,O=r;i=Math.floor(.5+g*(t[R]+w[0])),n=Math.floor(.5+g*(t[R+1]+w[1])),o=Math.floor(.5+g*(t[R+2]+w[2]));var D,N=e[O],k=S[N],F=0,B=b*x,z=A[N];for(p=0;p=y||v>=b||_>=x)){var U=m*B+v*x+_;if(E)if(T[U]&L){if(T[U]&L){var j=C[U];j!==R&&u*u+h*h+l*l<(a=i+u-Math.floor(.5+g*(t[j]+w[0])))*a+(s=n+h-Math.floor(.5+g*(t[j+1]+w[1])))*s+(c=o+l-Math.floor(.5+g*(t[j+2]+w[2])))*c&&(C[U]=r)}}else T[U]|=L,C[U]=r;else T[U]|=L}F++}}function a(e){console.time("EDTSurface fillvoxels");var r,i;for(r=0,i=T.length;r=y||d>=b||f>=x)){var B=p*F+d*x+f;if(T[B]&O){if(E){var z=C[B];u*u+h*h+l*l<(a=Math.floor(.5+g*(t[z]+w[0])))*a+(s=Math.floor(.5+g*(t[z+1]+w[1])))*s+(c=Math.floor(.5+g*(t[z+2]+w[2])))*c&&(C[B]=r)}}else T[B]|=O,E&&(C[B]=r)}N++}}function c(){var e,r;for(e=0,r=T.length;e-1&&a-1&&c-1&&s0);var f,m=v*v,g=new Uint16Array(3);for(t=0;t=m)||(T[n]|=D,E&&T[n]&O&&(o.toArray(t,e,r,g),f=g[0]*a+g[1]*x+g[2],C[n]=C[f])));console.timeEnd("EDTSurface fastdistancemap")}function l(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f,m,g=new Uint16Array(3),v=0;if(0===r)return v;var _=-1,w=-1,S=-1,A=b*x;for(h=0,p=r;h-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)T&&(T=R)}this.neighbourListLength=27*T+1,this.withinRadii=function(n,o,a,c,p){for(var d=0,f=s(n,u),y=s(o,h),x=s(a,l),_=Math.max(0,f-1),w=Math.max(0,y-1),E=Math.max(0,x-1),T=Math.min(m,f+1),P=Math.min(g,y+1),C=Math.min(v,x+1),I=_;I<=T;++I)for(var R=I*b,L=w;L<=P;++L)for(var O=L*v,D=E;D<=C;++D)for(var N=R+O+D,k=S[N],F=k+A[N],B=k;BE&&(E=A[h]);o(),a(),s(),H=-1}function n(t,e,r){for(var i=0;i=0;){if(o!==i&&o!==n&&u(o,t,e,r))return H=o,o;o=j[++a]}return H=-1,-1}function u(e,r,i,n){var o=3*e,a=M[e],s=t[o]-r,c=t[o+1]-i,u=t[o+2]-n;return s*s+c*c+u*u=0;)t0&&s0&&e(g-1),l.growIfFull(),l.resno[g]=_,void 0!==S&&(l.sstruc[g]=S.charCodeAt(0)),void 0!==A&&(l.inscode[g]=A.charCodeAt(0)),l.atomOffset[g]=m,l.atomCount[g]=0,l.count+=1,l.chainIndex[g]=v,p.residueCount[v]+=1),h.count+=1,h.residueIndex[m]=g,l.atomCount[g]+=1,n=t,o=b,a=x,s=_,c=A,u=w},this.finalize=function(){r=a,i=u,g>-1&&e(g)}}function oc(t){switch(t=t.toLowerCase()){case"polymer":return _v;case"non-polymer":return wv;case"macrolide":return Sv;case"water":return Av;default:return xv}}function ac(t,e,r){var i=""+t;return e&&(i+=":"+e),r&&(i+="^"+r),i}function sc(t){return!t||t[0]!==t[t.length-1]||"'"!==t[0]&&'"'!==t[0]?t:t.substring(1,t.length-1)}function cc(t,e){Array.isArray(t[e])||Object.keys(t).forEach(function(e){t[e]=[t[e]]})}function uc(t){return"?"!==t}function hc(t,e){return uc(t)?t:e}function lc(t){switch(t.toLowerCase()){case"?":case"sing":return 1;case"doub":return 2;case"trip":return 3;case"quad":return 4}return 0}function pc(t,e,r){var i,n,o=e.atomStore,a=e.atomMap,s=t.chem_comp,c=t.chem_comp_atom,u=t.chem_comp_bond;s&&(s.name&&(e.title=s.name.trim().replace(yw,"")),s.id&&(e.id=s.id.trim().replace(yw,"")));var h={};if(c){var l,p,d,f;for(n=c.comp_id.length,i=0;if*f)return n.growIfFull(),n.atomTypeId[m]=n.atomTypeId[t],n.x[m]=p.x,n.y[m]=p.y,n.z[m]=p.z,n.occupancy[m]=n.occupancy[t],n.serial[m]=m,n.altloc[m]="A".charCodeAt(0),r.addAtom(0,"","","HET",1,1),void(m+=1)}}})}(b)}function fc(t,e,r){var i,n,o,a,s=[],c=[],u=t.struct_conf;if(u)for(cc(u,"id"),i=0,n=u.beg_auth_seq_id.length;i0){o=o.split("(");var c=s(o[0]),u=s(o[1]);Object.keys(c).forEach(function(t){Object.keys(u).forEach(function(e){var r=new v;r.multiplyMatrices(c[t],u[e]),i[t+"x"+e]=r})})}else i=s(o);var h=[];for(var l in i)h.push(i[l]);var p=t;/^(0|[1-9][0-9]*)$/.test(p)&&(p="BU"+p);for(var d=a.asym_id_list[e].split(","),f=0,m=d.length;fw){var S=_;_=w,w=S;var A=f;f=b,b=A}if(0!==_&&0!==w)for(var M=0;Mo&&++s;e=new Int32Array(s)}for(r=0,i=0;r65535){for(var i=[],n=0;n6,"non valid type "+a);var s=qc(t,a,t.readUint32());Gc(t),e[n]={name:o,type:$c(a),value:s}}return e}function eu(t,e,r){var i,n=t.readUint32(),o=0;if(n===lS)return jc(t.readUint32()!==lS,"wrong empty tag for list of variables"),[];jc(n!==dS,"wrong tag for list of variables");var a=t.readUint32();i=new Array(a);for(var s=0;s6,"non valid type "+d);var f=t.readUint32(),m=t.readUint32();2===r&&(jc(m>0,"offsets larger than 4GB not supported"),m=t.readUint32()),h[0]===e&&(o+=f),i[s]={name:c,dimensions:h,attributes:p,type:$c(d),size:f,offset:m,record:h[0]===e}}return{variables:i,recordStep:o}}function ru(t){for(var e=1,r=0;t>=e&&r<32;)r++,e<<=1;return r}function iu(t,e){var r=1,i=0;xS[0]=1;for(var n=0;n>=8;for(;0!==a;)xS[o++]=255&a,a>>=8;r=o}var s=1;for(r--;xS[r]>=s;)i++,s*=2;return i+8*r}function nu(t,e,r,i){for(var n=(1<=8;)c|=(a=a<<8|e[s++])>>o<0&&(o>(o-=r)&(1<8;)_S[s++]=nu(t,e,8,a),i-=8;i>0&&(_S[s++]=nu(t,e,i,a));for(var c=r-1;c>0;c--){for(var u=0,h=s-1;h>=0;h--){var l=(u=u<<8|_S[h])/n[c]|0;_S[h]=l,u-=l*n[c]}o[c]=u}o[0]=_S[0]|_S[1]<<8|_S[2]<<16|_S[3]<<24}function au(t){return t.trim().split(LS).map(parseFloat)}function su(){this.regexp={vertex_pattern:/^v\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)/,normal_pattern:/^vn\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)/,uv_pattern:/^vt\s+([\d.+\-eE]+)\s+([\d.+\-eE]+)/,face_vertex:/^f\s+(-?\d+)\s+(-?\d+)\s+(-?\d+)(?:\s+(-?\d+))?/,face_vertex_uv:/^f\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+))?/,face_vertex_uv_normal:/^f\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+)\/(-?\d+))?/,face_vertex_normal:/^f\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)(?:\s+(-?\d+)\/\/(-?\d+))?/,object_pattern:/^[og]\s*(.+)?/,smoothing_pattern:/^s\s+(\d+|on|off)/,material_library_pattern:/^mtllib /,material_use_pattern:/^usemtl /}}function cu(){this.propertyNameMapping={}}function uu(t){return t.replace(GS,"")}function hu(t){function e(){if(o(/^<\?xml\s*/)){for(var t={attributes:{}};!a()&&!s("?>");){var e=n();if(!e)return t;t.attributes[e.name]=e.value}return o(/\?>\s*/),t}}function r(){var t=o(VS);if(t){for(var e={name:t[1],attributes:{},children:[]};!(a()||s(">")||s("?>")||s("/>"));){var c=n();if(!c)return e;e.attributes[c.name]=c.value}if(o(/^\s*\/>\s*/))return e;o(/\??>\s*/),e.content=i();for(var u;u=r();)e.children.push(u);return o(/^<\/[\w-:.]+>\s*/),e}}function i(){var t=o($S);return t?t[1]:""}function n(){var t=o(HS);if(t)return{name:t[1],value:uu(t[2])}}function o(e){var r=t.match(e);if(r)return t=t.slice(r[0].length),r}function a(){return 0===t.length}function s(e){return 0===t.indexOf(e)}return t=t.trim().replace(//g,""),function(){return{declaration:e(),root:r()}}()}function lu(t,e,r){var i=t.icode.value,n=t.chain.value,o=t.altcode.value,a=t.resnum.value;return i.trim()&&(a+="^"+i),n.trim()&&(a+=":"+n),e&&(a+="."+e),r&&o.trim()&&(a+="%"+o),a+="/"+(parseInt(t.model.value)-1)}function pu(t,e,r){void 0===t[e]?t[e]=r:t[e]|=r}function du(t,e){return void 0!==t&&t.value===e}function fu(t){var e=t.inscode,r=t.chainname,i=t.atomname,n=t.altloc,o=t.resno;return e&&(o+="^"+e),r&&(o+=":"+r),i&&(o+="."+i),n&&(o+="%"+n),o+="/"+t.modelIndex}function mu(t,e,r){for(var i=0,n=e.getElementsByTagName("clash"),o=0,a=n.length;o0&&(i+=1),e.getElementsByTagName("bond-outlier").length>0&&(i+=1),e.getElementsByTagName("plane-outlier").length>0&&(i+=1),du(r.rota,"OUTLIER")&&(i+=1),du(r.rama,"OUTLIER")&&(i+=1),du(r.RNApucker,"outlier")&&(i+=1),i}function gu(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}}return t}function vu(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}function yu(t,e,r,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+i),n);for(var o=0;o>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(n=n+e[i++]|0)|0}while(--a);n%=65521,o%=65521}return n|o<<16|0}function _u(t,e,r,i){var n=QS,o=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e[a])];return-1^t}function wu(t,e){var r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_,w,S,A,M,E;r=t.state,i=t.next_in,M=t.input,n=i+(t.avail_in-5),o=t.next_out,E=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),c=r.dmax,u=r.wsize,h=r.whave,l=r.wnext,p=r.window,d=r.hold,f=r.bits,m=r.lencode,g=r.distcode,v=(1<>>24,d>>>=x,f-=x,0===(x=b>>>16&255))E[o++]=65535&b;else{if(!(16&x)){if(0==(64&x)){b=m[(65535&b)+(d&(1<>>=x,f-=x),f<15&&(d+=M[i++]<>>24,d>>>=x,f-=x,!(16&(x=b>>>16&255))){if(0==(64&x)){b=g[(65535&b)+(d&(1<c){t.msg="invalid distance too far back",r.mode=JS;break t}if(d>>>=x,f-=x,x=o-a,w>x){if((x=w-x)>h&&r.sane){t.msg="invalid distance too far back",r.mode=JS;break t}if(S=0,A=p,0===l){if(S+=u-x,x<_){_-=x;do{E[o++]=p[S++]}while(--x);S=o-w,A=E}}else if(l2;)E[o++]=A[S++],E[o++]=A[S++],E[o++]=A[S++],_-=3;_&&(E[o++]=A[S++],_>1&&(E[o++]=A[S++]))}else{S=o-w;do{E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],_-=3}while(_>2);_&&(E[o++]=E[S++],_>1&&(E[o++]=E[S++]))}break}}break}}while(i>3,d&=(1<<(f-=_<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i=1&&0===I[_];_--);if(w>_&&(w=_),0===_)return n[o++]=20971520,n[o++]=20971520,s.bits=1,0;for(x=1;x<_&&0===I[x];x++);for(w0&&(t===nA||1!==_))return-1;for(R[1]=0,y=1;yrA||t===aA&&E>iA)return 1;for(var D=0;;){D++,f=y-A,a[b]d?(m=L[O+a[b]],g=P[C+a[b]]):(m=96,g=0),c=1<>A)+(u-=c)]=f<<24|m<<16|g|0}while(0!==u);for(c=1<>=1;if(0!==c?(T&=c-1,T+=c):T=0,b++,0==--I[y]){if(y===_)break;y=e[r+a[b]]}if(y>w&&(T&l)!==h){for(0===A&&(A=w),p+=x,M=1<<(S=y-A);S+A<_&&!((M-=I[S+A])<=0);)S++,M<<=1;if(E+=1<rA||t===aA&&E>iA)return 1;n[h=T&l]=w<<24|S<<16|p-o|0}}return 0!==T&&(n[p+T]=y-A<<24|64<<16|0),s.bits=w,0}function Au(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Mu(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Eu(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=MA,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(iM),e.distcode=e.distdyn=new Int32Array(nM),e.sane=1,e.back=-1,vA):xA}function Tu(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Eu(t)):xA}function Pu(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?xA:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,Tu(t))):xA}function Cu(t,e){var r,i;return t?(i=new Mu,t.state=i,i.window=null,(r=Pu(t,e))!==vA&&(t.state=null),r):xA}function Iu(t){if(oM){var e;for(ZS=new Int32Array(512),KS=new Int32Array(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Su(pA,t.lens,0,288,ZS,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Su(dA,t.lens,0,32,KS,0,t.work,{bits:5}),oM=!1}t.lencode=ZS,t.lenbits=9,t.distcode=KS,t.distbits=5}function Ru(t,e,r,i){var n,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(yu(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>i&&(n=i),yu(o.window,e,r-i,n,o.wnext),(i-=n)?(yu(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=_u(r.check,T,2,0),u=0,h=0,r.mode=EA;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=tM;break}if((15&u)!==AA){t.msg="unknown compression method",r.mode=tM;break}if(u>>>=4,h-=4,w=8+(15&u),0===r.wbits)r.wbits=w;else if(w>r.wbits){t.msg="invalid window size",r.mode=tM;break}r.dmax=1<>8&1),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0,r.mode=TA;case TA:for(;h<32;){if(0===s)break t;s--,u+=i[o++]<>>8&255,T[2]=u>>>16&255,T[3]=u>>>24&255,r.check=_u(r.check,T,4,0)),u=0,h=0,r.mode=PA;case PA:for(;h<16;){if(0===s)break t;s--,u+=i[o++]<>8),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0,r.mode=CA;case CA:if(1024&r.flags){for(;h<16;){if(0===s)break t;s--,u+=i[o++]<>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0}else r.head&&(r.head.extra=null);r.mode=IA;case IA:if(1024&r.flags&&((d=r.length)>s&&(d=s),d&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),yu(r.head.extra,i,o,d,w)),512&r.flags&&(r.check=_u(r.check,i,d,o)),s-=d,o+=d,r.length-=d),r.length))break t;r.length=0,r.mode=RA;case RA:if(2048&r.flags){if(0===s)break t;d=0;do{w=i[o+d++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w))}while(w&&d>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=kA;break;case DA:for(;h<32;){if(0===s)break t;s--,u+=i[o++]<>>=7&h,h-=7&h,r.mode=KA;break}for(;h<3;){if(0===s)break t;s--,u+=i[o++]<>>=1,h-=1,3&u){case 0:r.mode=BA;break;case 1:if(Iu(r),r.mode=$A,e===gA){u>>>=2,h-=2;break t}break;case 2:r.mode=jA;break;case 3:t.msg="invalid block type",r.mode=tM}u>>>=2,h-=2;break;case BA:for(u>>>=7&h,h-=7&h;h<32;){if(0===s)break t;s--,u+=i[o++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=tM;break}if(r.length=65535&u,u=0,h=0,r.mode=zA,e===gA)break t;case zA:r.mode=UA;case UA:if(d=r.length){if(d>s&&(d=s),d>c&&(d=c),0===d)break t;yu(n,i,o,d,a),s-=d,o+=d,c-=d,a+=d,r.length-=d;break}r.mode=kA;break;case jA:for(;h<14;){if(0===s)break t;s--,u+=i[o++]<>>=5,h-=5,r.ndist=1+(31&u),u>>>=5,h-=5,r.ncode=4+(15&u),u>>>=4,h-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=tM;break}r.have=0,r.mode=GA;case GA:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},S=Su(lA,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,S){t.msg="invalid code lengths set",r.mode=tM;break}r.have=0,r.mode=VA;case VA:for(;r.have>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=g,h-=g,r.lens[r.have++]=y;else{if(16===y){for(M=g+2;h>>=g,h-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=tM;break}w=r.lens[r.have-1],d=3+(3&u),u>>>=2,h-=2}else if(17===y){for(M=g+3;h>>=g)),u>>>=3,h-=3}else{for(M=g+7;h>>=g)),u>>>=7,h-=7}if(r.have+d>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=tM;break}for(;d--;)r.lens[r.have++]=w}}if(r.mode===tM)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=tM;break}if(r.lenbits=9,A={bits:r.lenbits},S=Su(pA,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,S){t.msg="invalid literal/lengths set",r.mode=tM;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},S=Su(dA,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,S){t.msg="invalid distances set",r.mode=tM;break}if(r.mode=$A,e===gA)break t;case $A:r.mode=HA;case HA:if(s>=6&&c>=258){t.next_out=a,t.avail_out=c,t.next_in=o,t.avail_in=s,r.hold=u,r.bits=h,wu(t,p),a=t.next_out,n=t.output,c=t.avail_out,o=t.next_in,i=t.input,s=t.avail_in,u=r.hold,h=r.bits,r.mode===kA&&(r.back=-1);break}for(r.back=0;E=r.lencode[u&(1<>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=b,h-=b,r.back+=b}if(u>>>=g,h-=g,r.back+=g,r.length=y,0===v){r.mode=ZA;break}if(32&v){r.back=-1,r.mode=kA;break}if(64&v){t.msg="invalid literal/length code",r.mode=tM;break}r.extra=15&v,r.mode=WA;case WA:if(r.extra){for(M=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=XA;case XA:for(;E=r.distcode[u&(1<>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=b,h-=b,r.back+=b}if(u>>>=g,h-=g,r.back+=g,64&v){t.msg="invalid distance code",r.mode=tM;break}r.offset=y,r.extra=15&v,r.mode=qA;case qA:if(r.extra){for(M=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=tM;break}r.mode=YA;case YA:if(0===c)break t;if(d=p-c,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=tM;break}d>r.wnext?(d-=r.wnext,f=r.wsize-d):f=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=n,f=a-r.offset,d=r.length;d>c&&(d=c),c-=d,r.length-=d;do{n[a++]=m[f++]}while(--d);0===r.length&&(r.mode=HA);break;case ZA:if(0===c)break t;n[a++]=r.length,c--,r.mode=HA;break;case KA:if(r.wrap){for(;h<32;){if(0===s)break t;s--,u|=i[o++]<>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e}function Fu(t,e){if(e<65537&&(t.subarray&&sM||!t.subarray&&aM))return String.fromCharCode.apply(null,vu(t,e));for(var r="",i=0;i4)s[i++]=65533,r+=o-1;else{for(n&=2===o?31:3===o?15:7;o>1&&r1?s[i++]=65533:n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|1023&n)}return Fu(s,i)}function Uu(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+cM[t[r]]>e?r:e}function ju(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function Gu(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function Vu(t){if(!(this instanceof Vu))return new Vu(t);this.options=gu({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ju,this.strm.avail_out=0;var r=Cu(this.strm,e.windowBits);if(r!==hM)throw new Error(lM[r]);this.header=new Gu,Du(this.strm,this.header)}function $u(t,e){var r=new Vu(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function Hu(t){var e;t instanceof ArrayBuffer&&(t=new Uint8Array(t));try{e=$u(t)}catch(r){e=t}return e}"undefined"!=typeof window&&function(){window.console=window.console||{};for(var t,e,r=window.console,i={},n=function(){},o="memory".split(","),a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=o.pop();)r[t]||(r[t]=i);for(;e=a.pop();)r[e]||(r[e]=n)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,"toBlob",{value:function(t,e,r){for(var i=window.atob(this.toDataURL(e,r).split(",")[1]),n=i.length,o=n>>2,a=new Uint8Array(n),s=new Uint32Array(a.buffer,0,o),c=0,u=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&t>-9007199254740992&&t<9007199254740992&&Math.floor(t)===t}),Number.isNaN||(Number.isNaN=function(t){return t!==t}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var r,i=Object(t),n=!1,o=1;o1?arguments[1]:void 0,s=a?Number(a):0;Number.isNaN(s)&&(s=0);var c=Math.min(Math.max(s,0),i);if(o+c>i)return!1;for(var u=-1;++ur.length)&&(e=r.length),e-=t.length;var i=r.indexOf(t,e);return-1!==i&&i===e}),String.prototype.repeat||(String.prototype.repeat=function(t){if(null===this)throw new TypeError("can't convert "+this+" to object");var e=""+this;if(t=+t,Number.isNaN(t)&&(t=0),t<0)throw new RangeError("repeat count must be non-negative");if(t===1/0)throw new RangeError("repeat count must be less than infinity");if(t=Math.floor(t),0===e.length||0===t)return"";if(e.length*t>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var r="";1==(1&t)&&(r+=e),0!==(t>>>=1);)e+=e;return r}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.includes||(Array.prototype.includes=function(t){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var e=Object(this),r=parseInt(e.length,10)||0;if(0===r)return!1;var i,n=parseInt(arguments[1],10)||0;n>=0?i=n:(i=r+n)<0&&(i=0);for(var o;i0?1:-1)*Math.floor(Math.abs(e)):e},i=Math.pow(2,53)-1,n=function(t){var e=r(t);return Math.min(Math.max(e,0),i)};return function(t){var r=this,i=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,a=arguments.length>1?arguments[1]:void 0;if(void 0!==a){if(!e(a))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var s,c=n(i.length),u=e(r)?Object(new r(c)):new Array(c),h=0;h0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&function(){Object.assign=function(t){var e=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1;i>=4,r[n]=e[19===n?3&t|8:t]);return r.join("")}}(),clamp:function(t,e,r){return Math.max(e,Math.min(r,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,r,i,n){return i+(t-e)*(n-i)/(r-e)},lerp:function(t,e,r){return(1-r)*t+r*e},smoothstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*(3-2*t)},smootherstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Ql.DEG2RAD},radToDeg:function(t){return t*Ql.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}};Object.defineProperties(l.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(l.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new l,e=new l;return function(r,i){return t.set(r,r),e.set(i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,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(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y;return e*e+r*r},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var r=Math.cos(e),i=Math.sin(e),n=this.x-t.x,o=this.y-t.y;return this.x=n*r-o*i+t.x,this.y=n*i+o*r+t.y,this}});var Jl=0;p.DEFAULT_IMAGE=void 0,p.DEFAULT_MAPPING=300,Object.defineProperty(p.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(p.prototype,h.prototype,{constructor:p,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){if(void 0!==t.textures[this.uuid])return t.textures[this.uuid];var e={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],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ql.generateUUID()),void 0===t.images[r.uuid]&&(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;return void 0!==t.toDataURL?e=t:((e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0,t.width,t.height)),e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),e.image=r.uuid}return t.textures[this.uuid]=e,e},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(300===this.mapping){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case el:t.x=t.x-Math.floor(t.x);break;case rl:t.x=t.x<0?0:1;break;case il:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case el:t.y=t.y-Math.floor(t.y);break;case rl:t.y=t.y<0?0:1;break;case il:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.assign(d.prototype,{isVector4:!0,set:function(t,e,r,i){return this.x=t,this.y=e,this.z=r,this.w=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){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: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=this.w,o=t.elements;return this.x=o[0]*e+o[4]*r+o[8]*i+o[12]*n,this.y=o[1]*e+o[5]*r+o[9]*i+o[13]*n,this.z=o[2]*e+o[6]*r+o[10]*i+o[14]*n,this.w=o[3]*e+o[7]*r+o[11]*i+o[15]*n,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,r,i,n,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],h=o[5],l=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(l-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(l+d)<.1&&Math.abs(a+h+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,g=(h+1)/2,v=(f+1)/2,y=(s+u)/4,b=(c+p)/4,x=(l+d)/4;return m>g&&m>v?m<.01?(r=0,i=.707106781,n=.707106781):(i=y/(r=Math.sqrt(m)),n=b/r):g>v?g<.01?(r=.707106781,i=0,n=.707106781):(r=y/(i=Math.sqrt(g)),n=x/i):v<.01?(r=.707106781,i=.707106781,n=0):(r=b/(n=Math.sqrt(v)),i=x/n),this.set(r,i,n,e),this}var _=Math.sqrt((d-l)*(d-l)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(_)<.001&&(_=1),this.x=(d-l)/_,this.y=(c-p)/_,this.z=(u-s)/_,this.w=Math.acos((a+h+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(r,i){return void 0===t&&(t=new d,e=new d),t.set(r,r,r,r),e.set(i,i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),Object.assign(f.prototype,h.prototype,{isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.assign(m,{slerp:function(t,e,r,i){return r.copy(t).slerp(e,i)},slerpFlat:function(t,e,r,i,n,o,a){var s=r[i+0],c=r[i+1],u=r[i+2],h=r[i+3],l=n[o+0],p=n[o+1],d=n[o+2],f=n[o+3];if(h!==f||s!==l||c!==p||u!==d){var m=1-a,g=s*l+c*p+u*d+h*f,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var b=Math.sqrt(y),x=Math.atan2(b,g*v);m=Math.sin(m*x)/b,a=Math.sin(a*x)/b}var _=a*v;if(s=s*m+l*_,c=c*m+p*_,u=u*m+d*_,h=h*m+f*_,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+h*h);s*=w,c*=w,u*=w,h*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=h}}),Object.defineProperties(m.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(m.prototype,{set:function(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._w=i,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var r=t._x,i=t._y,n=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(r/2),u=a(i/2),h=a(n/2),l=s(r/2),p=s(i/2),d=s(n/2);return"XYZ"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h-l*p*d):"YXZ"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h+l*p*d):"ZXY"===o?(this._x=l*u*h-c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h-l*p*d):"ZYX"===o?(this._x=l*u*h-c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h+l*p*d):"YZX"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h-l*p*d):"XZY"===o&&(this._x=l*u*h-c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h+l*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var r=e/2,i=Math.sin(r);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(r),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,r=t.elements,i=r[0],n=r[4],o=r[8],a=r[1],s=r[5],c=r[9],u=r[2],h=r[6],l=r[10],p=i+s+l;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(h-c)*e,this._y=(o-u)*e,this._z=(a-n)*e):i>s&&i>l?(e=2*Math.sqrt(1+i-s-l),this._w=(h-c)/e,this._x=.25*e,this._y=(n+a)/e,this._z=(o+u)/e):s>l?(e=2*Math.sqrt(1+s-i-l),this._w=(o-u)/e,this._x=(n+a)/e,this._y=.25*e,this._z=(c+h)/e):(e=2*Math.sqrt(1+l-i-s),this._w=(a-n)/e,this._x=(o+u)/e,this._y=(c+h)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new g;return function(r,i){return void 0===e&&(e=new g),t=r.dot(i)+1,t<1e-6?(t=0,Math.abs(r.x)>Math.abs(r.z)?e.set(-r.y,r.x,0):e.set(0,-r.z,r.y)):e.crossVectors(r,i),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var r=t._x,i=t._y,n=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=r*u+o*a+i*c-n*s,this._y=i*u+o*s+n*a-r*c,this._z=n*u+o*c+r*s-i*a,this._w=o*u-r*a-i*s-n*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var r=this._x,i=this._y,n=this._z,o=this._w,a=o*t._w+r*t._x+i*t._y+n*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=r,this._y=i,this._z=n,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(r+this._x),this._y=.5*(i+this._y),this._z=.5*(n+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,h=Math.sin(e*c)/s;return this._w=o*u+this._w*h,this._x=r*u+this._x*h,this._y=i*u+this._y*h,this._z=n*u+this._z*h,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(g.prototype,{isVector3:!0,set:function(t,e,r){return this.x=t,this.y=e,this.z=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new m;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new m;return function(e,r){return this.applyQuaternion(t.setFromAxisAngle(e,r))}}(),applyMatrix3:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[3]*r+n[6]*i,this.y=n[1]*e+n[4]*r+n[7]*i,this.z=n[2]*e+n[5]*r+n[8]*i,this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements,o=1/(n[3]*e+n[7]*r+n[11]*i+n[15]);return this.x=(n[0]*e+n[4]*r+n[8]*i+n[12])*o,this.y=(n[1]*e+n[5]*r+n[9]*i+n[13])*o,this.z=(n[2]*e+n[6]*r+n[10]*i+n[14])*o,this},applyQuaternion:function(t){var e=this.x,r=this.y,i=this.z,n=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*i-a*r,u=s*r+a*e-n*i,h=s*i+n*r-o*e,l=-n*e-o*r-a*i;return this.x=c*s+l*-n+u*-a-h*-o,this.y=u*s+l*-o+h*-n-c*-a,this.z=h*s+l*-a+c*-o-u*-n,this},project:function(){var t=new v;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new v;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[4]*r+n[8]*i,this.y=n[1]*e+n[5]*r+n[9]*i,this.z=n[2]*e+n[6]*r+n[10]*i,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new g,e=new g;return function(r,i){return t.set(r,r,r),e.set(i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,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(t){return this.x*t.x+this.y*t.y+this.z*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var r=this.x,i=this.y,n=this.z;return this.x=i*t.z-n*t.y,this.y=n*t.x-r*t.z,this.z=r*t.y-i*t.x,this},crossVectors:function(t,e){var r=t.x,i=t.y,n=t.z,o=e.x,a=e.y,s=e.z;return this.x=i*s-n*a,this.y=n*o-r*s,this.z=r*a-i*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new g;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new g;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ql.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return e*e+r*r+i*i},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=r,this.z=i,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(v.prototype,{isMatrix4:!0,set:function(t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=i,g[1]=n,g[5]=o,g[9]=a,g[13]=s,g[2]=c,g[6]=u,g[10]=h,g[14]=l,g[3]=p,g[7]=d,g[11]=f,g[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 v).fromArray(this.elements)},copy:function(t){var e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],this},copyPosition:function(t){var e=this.elements,r=t.elements;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this},extractBasis:function(t,e,r){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this},extractRotation:function(){var t=new g;return function(e){var r=this.elements,i=e.elements,n=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,2).length();return r[0]=i[0]*n,r[1]=i[1]*n,r[2]=i[2]*n,r[4]=i[4]*o,r[5]=i[5]*o,r[6]=i[6]*o,r[8]=i[8]*a,r[9]=i[9]*a,r[10]=i[10]*a,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,r=t.x,i=t.y,n=t.z,o=Math.cos(r),a=Math.sin(r),s=Math.cos(i),c=Math.sin(i),u=Math.cos(n),h=Math.sin(n);if("XYZ"===t.order){var l=o*u,p=o*h,d=a*u,f=a*h;e[0]=s*u,e[4]=-s*h,e[8]=c,e[1]=p+d*c,e[5]=l-f*c,e[9]=-a*s,e[2]=f-l*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,g=s*h,v=c*u,y=c*h;e[0]=m+y*a,e[4]=v*a-g,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=g*a-v,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){var m=s*u,g=s*h,v=c*u,y=c*h;e[0]=m-y*a,e[4]=-o*h,e[8]=v+g*a,e[1]=g+v*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){var l=o*u,p=o*h,d=a*u,f=a*h;e[0]=s*u,e[4]=d*c-p,e[8]=l*c+f,e[1]=s*h,e[5]=f*c+l,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,x=o*c,_=a*s,w=a*c;e[0]=s*u,e[4]=w-b*h,e[8]=_*h+x,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=x*h+_,e[10]=b-w*h}else if("XZY"===t.order){var b=o*s,x=o*c,_=a*s,w=a*c;e[0]=s*u,e[4]=-h,e[8]=c*u,e[1]=b*h+w,e[5]=o*u,e[9]=x*h-_,e[2]=_*h-x,e[6]=a*u,e[10]=w*h+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,r=t._x,i=t._y,n=t._z,o=t._w,a=r+r,s=i+i,c=n+n,u=r*a,h=r*s,l=r*c,p=i*s,d=i*c,f=n*c,m=o*a,g=o*s,v=o*c;return e[0]=1-(p+f),e[4]=h-v,e[8]=l+g,e[1]=h+v,e[5]=1-(u+f),e[9]=d-m,e[2]=l-g,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t=new g,e=new g,r=new g;return function(i,n,o){var a=this.elements;return r.subVectors(i,n),0===r.lengthSq()&&(r.z=1),r.normalize(),t.crossVectors(o,r),0===t.lengthSq()&&(1===Math.abs(o.z)?r.x+=1e-4:r.z+=1e-4,r.normalize(),t.crossVectors(o,r)),t.normalize(),e.crossVectors(r,t),a[0]=t.x,a[4]=e.x,a[8]=r.x,a[1]=t.y,a[5]=e.y,a[9]=r.y,a[2]=t.z,a[6]=e.z,a[10]=r.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var r=t.elements,i=e.elements,n=this.elements,o=r[0],a=r[4],s=r[8],c=r[12],u=r[1],h=r[5],l=r[9],p=r[13],d=r[2],f=r[6],m=r[10],g=r[14],v=r[3],y=r[7],b=r[11],x=r[15],_=i[0],w=i[4],S=i[8],A=i[12],M=i[1],E=i[5],T=i[9],P=i[13],C=i[2],I=i[6],R=i[10],L=i[14],O=i[3],D=i[7],N=i[11],k=i[15];return n[0]=o*_+a*M+s*C+c*O,n[4]=o*w+a*E+s*I+c*D,n[8]=o*S+a*T+s*R+c*N,n[12]=o*A+a*P+s*L+c*k,n[1]=u*_+h*M+l*C+p*O,n[5]=u*w+h*E+l*I+p*D,n[9]=u*S+h*T+l*R+p*N,n[13]=u*A+h*P+l*L+p*k,n[2]=d*_+f*M+m*C+g*O,n[6]=d*w+f*E+m*I+g*D,n[10]=d*S+f*T+m*R+g*N,n[14]=d*A+f*P+m*L+g*k,n[3]=v*_+y*M+b*C+x*O,n[7]=v*w+y*E+b*I+x*D,n[11]=v*S+y*T+b*R+x*N,n[15]=v*A+y*P+b*L+x*k,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new g;return function(e){for(var r=this,i=0,n=e.count;i>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,r){return this.r=t,this.g=e,this.b=r,this},setHSL:function(){function t(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+6*(e-t)*(2/3-r):t}return function(e,r,i){if(e=Ql.euclideanModulo(e,1),r=Ql.clamp(r,0,1),i=Ql.clamp(i,0,1),0===r)this.r=this.g=this.b=i;else{var n=i<=.5?i*(1+r):i+r-i*r,o=2*i-n;this.r=t(o,n,e+1/3),this.g=t(o,n,e),this.b=t(o,n,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var r;if(r=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var i,n=r[1],o=r[2];switch(n){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(i[1])/360,s=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(a,s,c)}}}else if(r=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u=(h=r[1]).length;if(3===u)return this.r=parseInt(h.charAt(0)+h.charAt(0),16)/255,this.g=parseInt(h.charAt(1)+h.charAt(1),16)/255,this.b=parseInt(h.charAt(2)+h.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(h.charAt(0)+h.charAt(1),16)/255,this.g=parseInt(h.charAt(2)+h.charAt(3),16)/255,this.b=parseInt(h.charAt(4)+h.charAt(5),16)/255,this}if(t&&t.length>0){var h=sp[t];void 0!==h?this.setHex(h):console.warn("THREE.Color: Unknown color "+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var r=e>0?1/e:1;return this.r=Math.pow(t.r,r),this.g=Math.pow(t.g,r),this.b=Math.pow(t.b,r),this},convertGammaToLinear:function(){var t=this.r,e=this.g,r=this.b;return this.r=t*t,this.g=e*e,this.b=r*r,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),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(t){var e,r,i=t||{h:0,s:0,l:0},n=this.r,o=this.g,a=this.b,s=Math.max(n,o,a),c=Math.min(n,o,a),u=(c+s)/2;if(c===s)e=0,r=0;else{var h=s-c;switch(r=u<=.5?h/(s+c):h/(2-s-c),s){case n:e=(o-a)/h+(o 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat theta = acos( dot( N, V ) );\n\tvec2 uv = vec2(\n\t\tsqrt( saturate( roughness ) ),\n\t\tsaturate( theta / ( 0.5 * PI ) ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.86267 + (0.49788 + 0.01436 * y ) * y;\n\tfloat b = 3.45068 + (4.18814 + y) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\n\treturn result;\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transpose( const in mat3 v ) {\n\tmat3 tmp;\n\ttmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n\ttmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n\ttmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n\treturn tmp;\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = asin( flipNormal * reflectVec.y ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltcMat;\tuniform sampler2D ltcMag;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tfloat norm = texture2D( ltcMag, uv ).a;\n\t\tvec4 t = texture2D( ltcMat, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( 1, 0, t.y ),\n\t\t\tvec3( 0, t.z, 0 ),\n\t\t\tvec3( t.w, 0, t.x )\n\t\t);\n\t\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",lights_template:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_flip:"#ifdef DOUBLE_SIDED\n\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n#else\n\tfloat flipNormal = 1.0;\n#endif\n",normal_fragment:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal ) * flipNormal;\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 1.0 - 2.0 * rgb.xyz;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\n#include \nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",distanceRGBA_frag:"uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include \n#include \n#include \nvoid main () {\n\t#include \n\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\n}\n",distanceRGBA_vert:"varying vec4 vWorldPosition;\n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",shadow_frag:"uniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) );\n}\n",shadow_vert:"#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n}\n"},lp={basic:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.fog]),vertexShader:hp.meshbasic_vert,fragmentShader:hp.meshbasic_frag},lambert:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.fog,cp.lights,{emissive:{value:new tt(0)}}]),vertexShader:hp.meshlambert_vert,fragmentShader:hp.meshlambert_frag},phong:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.bumpmap,cp.normalmap,cp.displacementmap,cp.gradientmap,cp.fog,cp.lights,{emissive:{value:new tt(0)},specular:{value:new tt(1118481)},shininess:{value:30}}]),vertexShader:hp.meshphong_vert,fragmentShader:hp.meshphong_frag},standard:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.bumpmap,cp.normalmap,cp.displacementmap,cp.roughnessmap,cp.metalnessmap,cp.fog,cp.lights,{emissive:{value:new tt(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:hp.meshphysical_vert,fragmentShader:hp.meshphysical_frag},points:{uniforms:up.merge([cp.points,cp.fog]),vertexShader:hp.points_vert,fragmentShader:hp.points_frag},dashed:{uniforms:up.merge([cp.common,cp.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hp.linedashed_vert,fragmentShader:hp.linedashed_frag},depth:{uniforms:up.merge([cp.common,cp.displacementmap]),vertexShader:hp.depth_vert,fragmentShader:hp.depth_frag},normal:{uniforms:up.merge([cp.common,cp.bumpmap,cp.normalmap,cp.displacementmap,{opacity:{value:1}}]),vertexShader:hp.normal_vert,fragmentShader:hp.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:hp.cube_vert,fragmentShader:hp.cube_frag},equirect:{uniforms:{tEquirect:{value:null},tFlip:{value:-1}},vertexShader:hp.equirect_vert,fragmentShader:hp.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new g}},vertexShader:hp.distanceRGBA_vert,fragmentShader:hp.distanceRGBA_frag}};lp.physical={uniforms:up.merge([lp.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:hp.meshphysical_vert,fragmentShader:hp.meshphysical_frag},Object.assign(et.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){var e=this;this.makeEmpty();for(var r=0,i=t.length;rthis.max.x||t.ythis.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return(e||new l).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)},clampPoint:function(t,e){return(e||new l).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new l;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}});var pp=0;Object.assign(nt.prototype,h.prototype,{isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){var e=this;if(void 0!==t)for(var r in t){var i=t[r];if(void 0!==i){var n=e[r];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):e[r]="overdraw"===r?Number(i):i:console.warn("THREE."+e.type+": '"+r+"' is not a property of this material.")}else console.warn("THREE.Material: '"+r+"' parameter is undefined.")}},toJSON:function(t){function e(t){var e=[];for(var r in t){var i=t[r];delete i.metadata,e.push(i)}return e}var r=void 0===t;r&&(t={textures:{},images:{}});var i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearCoat&&(i.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(i.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,i.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==lh&&(i.blending=this.blending),this.shading!==ah&&(i.shading=this.shading),this.side!==rh&&(i.side=this.side),this.vertexColors!==sh&&(i.vertexColors=this.vertexColors),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),i.skinning=this.skinning,i.morphTargets=this.morphTargets,i.dithering=this.dithering,r){var n=e(t.textures),o=e(t.images);n.length>0&&(i.textures=n),o.length>0&&(i.images=o)}return i},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.shading=t.shading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,r=null;if(null!==e){var i=e.length;r=new Array(i);for(var n=0;n!==i;++n)r[n]=e[n].clone()}return this.clippingPlanes=r,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),ot.prototype=Object.create(nt.prototype),ot.prototype.constructor=ot,ot.prototype.isShaderMaterial=!0,ot.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=up.clone(t.uniforms),this.defines=t.defines,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},ot.prototype.toJSON=function(t){var e=nt.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},at.prototype=Object.create(nt.prototype),at.prototype.constructor=at,at.prototype.isMeshDepthMaterial=!0,at.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Object.assign(st.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,r=1/0,i=1/0,n=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;sn&&(n=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,r,i),this.max.set(n,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,r=1/0,i=1/0,n=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;sn&&(n=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,r,i),this.max.set(n,o,a),this},setFromPoints:function(t){var e=this;this.makeEmpty();for(var r=0,i=t.length;rthis.max.x||t.ythis.max.y||t.zthis.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return(e||new g).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)},intersectsSphere:function(){var t=new g;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,r;return t.normal.x>0?(e=t.normal.x*this.min.x,r=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,r=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,r+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,r+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,r+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,r+=t.normal.z*this.min.z),e<=t.constant&&r>=t.constant},clampPoint:function(t,e){return(e||new g).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new g;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new g;return function(e){var r=e||new ct;return this.getCenter(r.center),r.radius=.5*this.getSize(t).length(),r}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new g,new g,new g,new g,new g,new g,new g,new g];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(ct.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new st;return function(e,r){var i=this.center;void 0!==r?i.copy(r):t.setFromPoints(e).getCenter(i);for(var n=0,o=0,a=e.length;othis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i},getBoundingBox:function(t){var e=t||new st;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(ut.prototype,{isMatrix3:!0,set:function(t,e,r,i,n,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=n,u[5]=s,u[6]=r,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new g;return function(e){for(var r=this,i=0,n=e.count;i1))return i.copy(n).multiplyScalar(a).add(e.start)}else if(0===this.distanceToPoint(e.start))return i.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),r=this.distanceToPoint(t.end);return e<0&&r>0||r<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return(t||new g).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new g,e=new ut;return function(r,i){var n=this.coplanarPoint(t).applyMatrix4(r),o=i||e.getNormalMatrix(r),a=this.normal.applyMatrix3(o).normalize();return this.constant=-n.dot(a),this}}(),translate:function(t){return this.constant=this.constant-t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(lt.prototype,{set:function(t,e,r,i,n,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(r),a[3].copy(i),a[4].copy(n),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,r=0;r<6;r++)e[r].copy(t.planes[r]);return this},setFromMatrix:function(t){var e=this.planes,r=t.elements,i=r[0],n=r[1],o=r[2],a=r[3],s=r[4],c=r[5],u=r[6],h=r[7],l=r[8],p=r[9],d=r[10],f=r[11],m=r[12],g=r[13],v=r[14],y=r[15];return e[0].setComponents(a-i,h-s,f-l,y-m).normalize(),e[1].setComponents(a+i,h+s,f+l,y+m).normalize(),e[2].setComponents(a+n,h+c,f+p,y+g).normalize(),e[3].setComponents(a-n,h-c,f-p,y-g).normalize(),e[4].setComponents(a-o,h-u,f-d,y-v).normalize(),e[5].setComponents(a+o,h+u,f+d,y+v).normalize(),this},intersectsObject:function(){var t=new ct;return function(e){var r=e.geometry;return null===r.boundingSphere&&r.computeBoundingSphere(),t.copy(r.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new ct;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,r=t.center,i=-t.radius,n=0;n<6;n++)if(e[n].distanceToPoint(r)0?r.min.x:r.max.x,e.x=o.normal.x>0?r.max.x:r.min.x,t.y=o.normal.y>0?r.min.y:r.max.y,e.y=o.normal.y>0?r.max.y:r.min.y,t.z=o.normal.z>0?r.min.z:r.max.z,e.z=o.normal.z>0?r.max.z:r.min.z;var a=o.distanceToPoint(t),s=o.distanceToPoint(e);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,r=0;r<6;r++)if(e[r].distanceToPoint(t)<0)return!1;return!0}}),ft.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],ft.DefaultOrder="XYZ",Object.defineProperties(ft.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(ft.prototype,{isEuler:!0,set:function(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._order=i||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,r){var i=Ql.clamp,n=t.elements,o=n[0],a=n[4],s=n[8],c=n[1],u=n[5],h=n[9],l=n[2],p=n[6],d=n[10];return e=e||this._order,"XYZ"===e?(this._y=Math.asin(i(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-l,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(i(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-l,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-i(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(i(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-l,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-i(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-h,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==r&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new v;return function(e,r,i){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,r,i)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new m;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new g(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(mt.prototype,{set:function(t){this.mask=1<1){for(var i=0;i1){for(var i=0;i0){a.children=[];for(c=0;c0&&(o.geometries=h),l.length>0&&(o.materials=l),p.length>0&&(o.textures=p),d.length>0&&(o.images=d)}return o.object=a,o},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){var r=this;if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var i=0;i0)for(f=0;f0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,r,i=this;for(this.computeFaceNormals(),t=0,e=this.faces.length;t0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,r,i,n,o=this;for(r=0,i=this.faces.length;r0&&(e+=r[i].distanceTo(r[i-1])),t.lineDistances[i]=e},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new st),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ct),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,r){if(!t||!t.isGeometry)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var i,n=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],h=t.faceVertexUvs[0],l=this.colors,p=t.colors;void 0===r&&(r=0),void 0!==e&&(i=(new ut).getNormalMatrix(e));for(var d=0,f=a.length;d=0;r--){var m=d[r];for(c.faces.splice(m,1),a=0,s=this.faceVertexUvs.length;a0,_=y.vertexNormals.length>0,w=1!==y.color.r||1!==y.color.g||1!==y.color.b,S=y.vertexColors.length>0,A=0;if(A=t(A,0,0),A=t(A,1,!0),A=t(A,2,!1),A=t(A,3,b),A=t(A,4,x),A=t(A,5,_),A=t(A,6,w),A=t(A,7,S),l.push(A),l.push(y.a,y.b,y.c),l.push(y.materialIndex),b){var M=n.faceVertexUvs[0][u];l.push(i(M[0]),i(M[1]),i(M[2]))}if(x&&l.push(e(y.normal)),_){var E=y.vertexNormals;l.push(e(E[0]),e(E[1]),e(E[2]))}if(w&&l.push(r(y.color)),S){var T=y.vertexColors;l.push(r(T[0]),r(T[1]),r(T[2]))}}return o.data={},o.data.vertices=c,o.data.normals=p,f.length>0&&(o.data.colors=f),g.length>0&&(o.data.uvs=[g]),o.data.faces=l,o},clone:function(){return(new wt).copy(this)},copy:function(t){var e,r,i,n,o,a,s=this;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=t.name;var c=t.vertices;for(e=0,r=c.length;e0,s=o[1]&&o[1].length>0,c=t.morphTargets,u=c.length;if(u>0){e=[];for(y=0;y0){h=[];for(y=0;y65535?Mt:At)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new St(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,r){this.groups.push({start:t,count:e,materialIndex:void 0!==r?r:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var r=this.attributes.normal;return void 0!==r&&((new ut).getNormalMatrix(t).applyToBufferAttribute(r),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new v;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new v;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new v;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new v;return function(e,r,i){return t.makeTranslation(e,r,i),this.applyMatrix(t),this}}(),scale:function(){var t=new v;return function(e,r,i){return t.makeScale(e,r,i),this.applyMatrix(t),this}}(),lookAt:function(){var t=new gt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var r=new Et(3*e.vertices.length,3),i=new Et(3*e.colors.length,3);if(this.addAttribute("position",r.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var n=new Et(e.lineDistances.length,1);this.addAttribute("lineDistance",n.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var r=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(r=void 0,e.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(e);r.verticesNeedUpdate=e.verticesNeedUpdate,r.normalsNeedUpdate=e.normalsNeedUpdate,r.colorsNeedUpdate=e.colorsNeedUpdate,r.uvsNeedUpdate=e.uvsNeedUpdate,r.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=r}var i;return!0===e.verticesNeedUpdate&&(void 0!==(i=this.attributes.position)&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),!0===e.normalsNeedUpdate&&(void 0!==(i=this.attributes.normal)&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),!0===e.colorsNeedUpdate&&(void 0!==(i=this.attributes.color)&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(void 0!==(i=this.attributes.uv)&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(void 0!==(i=this.attributes.lineDistance)&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Tt).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=this,r=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new St(r,3).copyVector3sArray(t.vertices)),t.normals.length>0){var i=new Float32Array(3*t.normals.length);this.addAttribute("normal",new St(i,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var n=new Float32Array(3*t.colors.length);this.addAttribute("color",new St(n,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var o=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new St(o,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var a=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new St(a,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var s=new(Pt(t.indices)>65535?Uint32Array:Uint16Array)(3*t.indices.length);this.setIndex(new St(s,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var c in t.morphTargets){for(var u=[],h=t.morphTargets[c],l=0,p=h.length;l0){var m=new Et(4*t.skinIndices.length,4);this.addAttribute("skinIndex",m.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var g=new Et(4*t.skinWeights.length,4);this.addAttribute("skinWeight",g.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new st);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new st,e=new g;return function(){null===this.boundingSphere&&(this.boundingSphere=new ct);var r=this.attributes.position;if(r){var i=this.boundingSphere.center;t.setFromBufferAttribute(r),t.getCenter(i);for(var n=0,o=0,a=r.count;o0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Ct).copy(this)},copy:function(t){var e,r,i,n=this;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var o=t.index;null!==o&&this.setIndex(o.clone());var a=t.attributes;for(e in a){var s=a[e];n.addAttribute(e,s.clone())}var c=t.morphAttributes;for(e in c){var u=[],h=c[e];for(r=0,i=h.length;r0)if(s=p*f-d,c=p*d-f,h=l*g,s>=0)if(c>=-h)if(c<=h){var v=1/g;u=(s*=v)*(s+p*(c*=v)+2*d)+c*(p*s+c+2*f)+m}else c=l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;else c=-l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;else c<=-h?u=-(s=Math.max(0,-(-p*l+d)))*s+(c=s>0?-l:Math.min(Math.max(-l,-f),l))*(c+2*f)+m:c<=h?(s=0,u=(c=Math.min(Math.max(-l,-f),l))*(c+2*f)+m):u=-(s=Math.max(0,-(p*l+d)))*s+(c=s>0?l:Math.min(Math.max(-l,-f),l))*(c+2*f)+m;else c=p>0?-l:l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(c).add(t),u}}(),intersectSphere:function(){var t=new g;return function(e,r){t.subVectors(e.center,this.origin);var i=t.dot(this.direction),n=t.dot(t)-i*i,o=e.radius*e.radius;if(n>o)return null;var a=Math.sqrt(o-n),s=i-a,c=i+a;return s<0&&c<0?null:s<0?this.at(c,r):this.at(s,r)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var r=-(this.origin.dot(t.normal)+t.constant)/e;return r>=0?r:null},intersectPlane:function(t,e){var r=this.distanceToPlane(t);return null===r?null:this.at(r,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var r,i,n,o,a,s,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,l=this.origin;return c>=0?(r=(t.min.x-l.x)*c,i=(t.max.x-l.x)*c):(r=(t.max.x-l.x)*c,i=(t.min.x-l.x)*c),u>=0?(n=(t.min.y-l.y)*u,o=(t.max.y-l.y)*u):(n=(t.max.y-l.y)*u,o=(t.min.y-l.y)*u),r>o||n>i?null:((n>r||r!==r)&&(r=n),(o=0?(a=(t.min.z-l.z)*h,s=(t.max.z-l.z)*h):(a=(t.max.z-l.z)*h,s=(t.min.z-l.z)*h),r>s||a>i?null:((a>r||r!==r)&&(r=a),(s=0?r:i,e)))},intersectsBox:function(){var t=new g;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new g,e=new g,r=new g,i=new g;return function(n,o,a,s,c){e.subVectors(o,n),r.subVectors(a,n),i.crossVectors(e,r);var u,h=this.direction.dot(i);if(h>0){if(s)return null;u=1}else{if(!(h<0))return null;u=-1,h=-h}t.subVectors(this.origin,n);var l=u*this.direction.dot(r.crossVectors(t,r));if(l<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(l+p>h)return null;var d=-u*t.dot(i);return d<0?null:this.at(d/h,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(kt.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return(t||new g).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return(t||new g).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var r=e||new g;return this.delta(r).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new g,e=new g;return function(r,i){t.subVectors(r,this.start),e.subVectors(this.end,this.start);var n=e.dot(e),o=e.dot(t)/n;return i&&(o=Ql.clamp(o,0,1)),o}}(),closestPointToPoint:function(t,e,r){var i=this.closestPointToPointParameter(t,e),n=r||new g;return this.delta(n).multiplyScalar(i).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(Ft,{normal:function(){var t=new g;return function(e,r,i,n){var o=n||new g;o.subVectors(i,r),t.subVectors(e,r),o.cross(t);var a=o.lengthSq();return a>0?o.multiplyScalar(1/Math.sqrt(a)):o.set(0,0,0)}}(),barycoordFromPoint:function(){var t=new g,e=new g,r=new g;return function(i,n,o,a,s){t.subVectors(a,n),e.subVectors(o,n),r.subVectors(i,n);var c=t.dot(t),u=t.dot(e),h=t.dot(r),l=e.dot(e),p=e.dot(r),d=c*l-u*u,f=s||new g;if(0===d)return f.set(-2,-1,-1);var m=1/d,v=(l*h-u*p)*m,y=(c*p-u*h)*m;return f.set(1-v-y,y,v)}}(),containsPoint:function(){var t=new g;return function(e,r,i,n){var o=Ft.barycoordFromPoint(e,r,i,n,t);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}()}),Object.assign(Ft.prototype,{set:function(t,e,r){return this.a.copy(t),this.b.copy(e),this.c.copy(r),this},setFromPointsAndIndices:function(t,e,r,i){return this.a.copy(t[e]),this.b.copy(t[r]),this.c.copy(t[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new g,e=new g;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){return(t||new g).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return Ft.normal(this.a,this.b,this.c,t)},plane:function(t){return(t||new ht).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return Ft.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ft.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t=new ht,e=[new kt,new kt,new kt],r=new g,i=new g;return function(n,o){var a=o||new g,s=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(n,r),!0===this.containsPoint(r))a.copy(r);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var c=0;c0){var s=o[a[0]];if(void 0!==s)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=c.length;te.far?null:{distance:c,point:x.clone(),object:t}}function r(r,i,n,o,u,h,l,p){a.fromBufferAttribute(o,h),s.fromBufferAttribute(o,l),c.fromBufferAttribute(o,p);var g=e(r,i,n,a,s,c,b);return g&&(u&&(d.fromBufferAttribute(u,h),f.fromBufferAttribute(u,l),m.fromBufferAttribute(u,p),g.uv=t(b,a,s,c,d,f,m)),g.face=new xt(h,l,p,Ft.normal(a,s,c)),g.faceIndex=h),g}var i=new v,n=new Nt,o=new ct,a=new g,s=new g,c=new g,u=new g,h=new g,p=new g,d=new l,f=new l,m=new l,y=new g,b=new g,x=new g;return function(l,g){var v=this,y=this.geometry,x=this.material,_=this.matrixWorld;if(void 0!==x&&(null===y.boundingSphere&&y.computeBoundingSphere(),o.copy(y.boundingSphere),o.applyMatrix4(_),!1!==l.ray.intersectsSphere(o)&&(i.getInverse(_),n.copy(l.ray).applyMatrix4(i),null===y.boundingBox||!1!==n.intersectsBox(y.boundingBox)))){var w;if(y.isBufferGeometry){var S,A,M,E,T,P=y.index,C=y.attributes.position,I=y.attributes.uv;if(null!==P)for(E=0,T=P.count;E0&&(D=B);for(var z=0,U=F.length;zo)){var a=i.ray.origin.distanceTo(t);ai.far||n.push({distance:a,point:t.clone(),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),Me.prototype=Object.assign(Object.create(gt.prototype),{constructor:Me,copy:function(t){var e=this;gt.prototype.copy.call(this,t,!1);for(var r=t.levels,i=0,n=r.length;i1){t.setFromMatrixPosition(r.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var n=t.distanceTo(e);i[0].object.visible=!0;for(var o=1,a=i.length;o=i[o].distance;o++)i[o-1].object.visible=!1,i[o].object.visible=!0;for(;os||(d.applyMatrix4(o.matrixWorld),(E=i.ray.origin.distanceTo(d))i.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o}))}else for(var b=0,x=v.length/3-1;bs||(d.applyMatrix4(o.matrixWorld),(E=i.ray.origin.distanceTo(d))i.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o}))}else if(c.isGeometry)for(var S=c.vertices,A=S.length,b=0;bs)){d.applyMatrix4(o.matrixWorld);var E=i.ray.origin.distanceTo(d);Ei.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Re.prototype=Object.assign(Object.create(Ie.prototype),{constructor:Re,isLineSegments:!0}),Le.prototype=Object.assign(Object.create(Ie.prototype),{constructor:Le,isLineLoop:!0}),Oe.prototype=Object.create(nt.prototype),Oe.prototype.constructor=Oe,Oe.prototype.isPointsMaterial=!0,Oe.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},De.prototype=Object.assign(Object.create(gt.prototype),{constructor:De,isPoints:!0,raycast:function(){var t=new v,e=new Nt,r=new ct;return function(i,n){function o(t,r){var o=e.distanceSqToPoint(t);if(oi.far)return;n.push({distance:u,distanceToRay:Math.sqrt(o),point:s.clone(),index:r,face:null,object:a})}}var a=this,s=this.geometry,c=this.matrixWorld,u=i.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),r.copy(s.boundingSphere),r.applyMatrix4(c),r.radius+=u,!1!==i.ray.intersectsSphere(r)){t.getInverse(c),e.copy(i.ray).applyMatrix4(t);var h=u/((this.scale.x+this.scale.y+this.scale.z)/3),l=h*h,p=new g;if(s.isBufferGeometry){var d=s.index,f=s.attributes.position.array;if(null!==d)for(var m=d.array,v=0,y=m.length;v=-Number.EPSILON&&P>=-Number.EPSILON&&T>=-Number.EPSILON))return!1;return!0}return function(e,r){var i=e.length;if(i<3)return null;var n,o,a,s=[],c=[],u=[];if(gp.area(e)>0)for(o=0;o2;){if(l--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),r?u:s;if(n=o,h<=n&&(n=0),o=n+1,h<=o&&(o=0),a=o+1,h<=a&&(a=0),t(e,n,o,a,h,c)){var p,d,f,m,g;for(p=c[n],d=c[o],f=c[a],s.push([e[p],e[d],e[f]]),u.push([c[n],c[o],c[a]]),m=o,g=o+1;g2&&t[e-1].equals(t[0])&&t.pop()}function i(t,e,r){return t.x!==e.x?t.xNumber.EPSILON){var f;if(p>0){if(d<0||d>p)return[];if((f=u*h-c*l)<0||f>p)return[]}else{if(d>0||d0||fM?[]:x===M?o?[]:[y]:_<=M?[y,b]:[y,S]}function o(t,e,r,i){var n=e.x-t.x,o=e.y-t.y,a=r.x-t.x,s=r.y-t.y,c=i.x-t.x,u=i.y-t.y,h=n*s-o*a,l=n*u-o*c;if(Math.abs(h)>Number.EPSILON){var p=c*s-u*a;return h>0?l>=0&&p>=0:l>=0||p>=0}return l>0}r(t),e.forEach(r);for(var a,s,c,u,h,l,p={},d=t.concat(),f=0,m=e.length;f0;){if(--_<0){console.log("Infinite Loop! Holes left:"+g.length+", Probably Hole outside Shape!");break}for(a=x;ai&&(a=0);var s=o(m[t],m[n],m[a],r[e]);if(!s)return!1;var c=r.length-1,u=e-1;u<0&&(u=c);var h=e+1;return h>c&&(h=0),!!(s=o(r[e],r[u],r[h],m[t]))}(a,w)&&!function(t,e){var r,i;for(r=0;r0)return!0;return!1}(s,c)&&!function(t,r){var i,o,a,s;for(i=0;i0)return!0;return!1}(s,c)){i=w,g.splice(y,1),l=m.slice(0,a+1),p=m.slice(a),d=r.slice(i),f=r.slice(0,i+1),m=l.concat(d).concat(f).concat(p),x=a;break}if(i>=0)break;v[h]=!0}if(i>=0)break}}return m}(t,e),v=gp.triangulate(g,!1);for(a=0,s=v.length;aNumber.EPSILON){var d=Math.sqrt(h),f=Math.sqrt(c*c+u*u),m=e.x-s/d,g=e.y+a/d,v=((r.x-u/f-m)*u-(r.y+c/f-g)*c)/(a*u-s*c),y=(i=m+a*v-t.x)*i+(n=g+s*v-t.y)*n;if(y<=2)return new l(i,n);o=Math.sqrt(y/2)}else{var b=!1;a>Number.EPSILON?c>Number.EPSILON&&(b=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(u)&&(b=!0),b?(i=-s,n=a,o=Math.sqrt(h)):(i=a,n=s,o=Math.sqrt(h/2))}return new l(i/o,n/o)}function n(t,e){var r,i;for(Z=t.length;--Z>=0;){r=Z,(i=Z-1)<0&&(i=t.length-1);var n=0,o=P+2*M;for(n=0;n=0;j--){for(V=j/M,$=S*Math.cos(V*Math.PI/2),G=A*Math.sin(V*Math.PI/2),Z=0,K=U.length;Z0||0===t.search(/^data\:image\/jpeg/);o.format=r?Sl:Al,o.needsUpdate=!0,void 0!==e&&e(o)},r,i),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Br.prototype=Object.assign(Object.create(gt.prototype),{constructor:Br,isLight:!0,copy:function(t){return gt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=gt.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),zr.prototype=Object.assign(Object.create(Br.prototype),{constructor:zr,isHemisphereLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Ur.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),jr.prototype=Object.assign(Object.create(Ur.prototype),{constructor:jr,isSpotLightShadow:!0,update:function(t){var e=this.camera,r=2*Ql.RAD2DEG*t.angle,i=this.mapSize.width/this.mapSize.height,n=t.distance||e.far;r===e.fov&&i===e.aspect&&n===e.far||(e.fov=r,e.aspect=i,e.far=n,e.updateProjectionMatrix())}}),Gr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Gr,isSpotLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Vr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Vr,isPointLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),$r.prototype=Object.assign(Object.create(Ur.prototype),{constructor:$r}),Hr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Hr,isDirectionalLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Wr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Wr,isAmbientLight:!0}),Xr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Xr,isRectAreaLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=Br.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}});var _p={arraySlice:function(t,e,r){return _p.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==r?r:t.length)):t.slice(e,r)},convertArray:function(t,e,r){return!t||!r&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(e,r){return t[e]-t[r]}for(var r=t.length,i=new Array(r),n=0;n!==r;++n)i[n]=n;return i.sort(e),i},sortedArray:function(t,e,r){for(var i=t.length,n=new t.constructor(i),o=0,a=0;a!==i;++o)for(var s=r[o]*e,c=0;c!==e;++c)n[a++]=t[s+c];return n},flattenJSON:function(t,e,r,i){for(var n=1,o=t[0];void 0!==o&&void 0===o[i];)o=t[n++];if(void 0!==o){var a=o[i];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[i])&&(e.push(o.time),r.push.apply(r,a)),o=t[n++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[i])&&(e.push(o.time),a.toArray(r,r.length)),o=t[n++]}while(void 0!==o);else do{void 0!==(a=o[i])&&(e.push(o.time),r.push(a)),o=t[n++]}while(void 0!==o)}}};Object.assign(qr.prototype,{evaluate:function(t){var e=this,r=this.parameterPositions,i=this._cachedIndex,n=r[i],o=r[i-1];t:{e:{var a;r:{i:if(!(t=o)break t;var s=r[1];t=o)break e}a=i,i=0}}for(;i>>1;te;)--o;if(++o,0!==n||o!==i){n>=o&&(n=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=_p.arraySlice(r,n,o),this.values=_p.arraySlice(this.values,n*a,o*a)}return this},validate:function(){var t=this,e=!0,r=this.getValueSize();r-Math.floor(r)!=0&&(console.error("THREE.KeyframeTrackPrototype: Invalid value size in track.",this),e=!1);var i=this.times,n=this.values,o=i.length;0===o&&(console.error("THREE.KeyframeTrackPrototype: Track is empty.",this),e=!1);for(var a=null,s=0;s!==o;s++){var c=i[s];if("number"==typeof c&&isNaN(c)){console.error("THREE.KeyframeTrackPrototype: Time is not a valid number.",t,s,c),e=!1;break}if(null!==a&&a>c){console.error("THREE.KeyframeTrackPrototype: Out of order keys.",t,s,c,a),e=!1;break}a=c}if(void 0!==n&&_p.isTypedArray(n))for(var s=0,u=n.length;s!==u;++s){var h=n[s];if(isNaN(h)){console.error("THREE.KeyframeTrackPrototype: Value is not a valid number.",t,s,h),e=!1;break}}return e},optimize:function(){for(var t=this.times,e=this.values,r=this.getValueSize(),i=2302===this.getInterpolation(),n=1,o=t.length-1,a=1;a0){t[n]=t[o];for(var f=o*r,m=n*r,p=0;p!==r;++p)e[m+p]=e[f+p];++n}return n!==t.length&&(this.times=_p.arraySlice(t,0,n),this.values=_p.arraySlice(e,0,n*r)),this}},Jr.prototype=Object.assign(Object.create(wp),{constructor:Jr,ValueTypeName:"vector"}),ti.prototype=Object.assign(Object.create(qr.prototype),{constructor:ti,interpolate_:function(t,e,r,i){for(var n=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(r-e)/(i-e),u=s+a;s!==u;s+=4)m.slerpFlat(n,0,o,s-a,o,s,c);return n}}),ei.prototype=Object.assign(Object.create(wp),{constructor:ei,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new ti(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),ri.prototype=Object.assign(Object.create(wp),{constructor:ri,ValueTypeName:"number"}),ii.prototype=Object.assign(Object.create(wp),{constructor:ii,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ni.prototype=Object.assign(Object.create(wp),{constructor:ni,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),oi.prototype=Object.assign(Object.create(wp),{constructor:oi,ValueTypeName:"color"}),ai.prototype=wp,wp.constructor=ai,Object.assign(ai,{parse:function(t){if(void 0===t.type)throw new Error("track type undefined, can not parse");var e=ai._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var r=[],i=[];_p.flattenJSON(t.keys,r,i,"value"),t.times=r,t.values=i}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,r=t.constructor;if(void 0!==r.toJSON)e=r.toJSON(t);else{e={name:t.name,times:_p.convertArray(t.times,Array),values:_p.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ri;case"vector":case"vector2":case"vector3":case"vector4":return Jr;case"color":return oi;case"quaternion":return ei;case"bool":case"boolean":return ni;case"string":return ii}throw new Error("Unsupported typeName: "+t)}}),Object.assign(si,{parse:function(t){for(var e=[],r=t.tracks,i=1/(t.fps||1),n=0,o=r.length;n!==o;++n)e.push(ai.parse(r[n]).scale(i));return new si(t.name,t.duration,e)},toJSON:function(t){for(var e=[],r=t.tracks,i={name:t.name,duration:t.duration,tracks:e},n=0,o=r.length;n!==o;++n)e.push(ai.toJSON(r[n]));return i},CreateFromMorphTargetSequence:function(t,e,r,i){for(var n=e.length,o=[],a=0;a1){var c=i[h=s[1]];c||(i[h]=c=[]),c.push(a)}}var u=[];for(var h in i)u.push(si.CreateFromMorphTargetSequence(h,i[h],e,r));return u},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var r=function(t,e,r,i,n){if(0!==r.length){var o=[],a=[];_p.flattenJSON(r,o,a,i),0!==o.length&&n.push(new t(e,o,a))}},i=[],n=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c1?t.skinWeights[i+1]:0,s=r>2?t.skinWeights[i+2]:0,c=r>3?t.skinWeights[i+3]:0;e.skinWeights.push(new d(o,a,s,c))}if(t.skinIndices)for(var i=0,n=t.skinIndices.length;i1?t.skinIndices[i+1]:0,l=r>2?t.skinIndices[i+2]:0,p=r>3?t.skinIndices[i+3]:0;e.skinIndices.push(new d(u,h,l,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}function r(t,e){var r=t.scale;if(void 0!==t.morphTargets)for(var i=0,n=t.morphTargets.length;i0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var h=e.faces,l=t.morphColors[0].colors,i=0,n=h.length;i0&&(e.animations=r)}return function(n,o){void 0!==n.data&&(n=n.data),void 0!==n.scale?n.scale=1/n.scale:n.scale=1;var a=new wt;return t(n,a),e(n,a),r(n,a),i(n,a),a.computeFaceNormals(),a.computeBoundingSphere(),void 0===n.materials||0===n.materials.length?{geometry:a}:{geometry:a,materials:hi.prototype.initMaterials(n.materials,o,this.crossOrigin)}}}()}),Object.assign(pi.prototype,{load:function(t,e,r,i){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var n=this;new Lr(n.manager).load(t,function(r){var o=null;try{o=JSON.parse(r)}catch(e){return void 0!==i&&i(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}var a=o.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())return void console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead.");n.parse(o,e)},r,i)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var r=this.parseGeometries(t.geometries),i=this.parseImages(t.images,function(){void 0!==e&&e(a)}),n=this.parseTextures(t.textures,i),o=this.parseMaterials(t.materials,n),a=this.parseObject(t.object,r,o);return t.animations&&(a.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(a),a},parseGeometries:function(t){var e=this,r={};if(void 0!==t)for(var i=new li,n=new ui,o=0,a=t.length;o0){var n=new Nr(new Rr(e));n.setCrossOrigin(this.crossOrigin);for(var o=0,a=t.length;o0?new Pe(c,u):new Bt(c,u);break;case"LOD":a=new Me;break;case"Line":a=new Ie(n(e.geometry),o(e.material),e.mode);break;case"LineLoop":a=new Le(n(e.geometry),o(e.material));break;case"LineSegments":a=new Re(n(e.geometry),o(e.material));break;case"PointCloud":case"Points":a=new De(n(e.geometry),o(e.material));break;case"Sprite":a=new Ae(o(e.material));break;case"Group":a=new Ne;break;default:a=new gt}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.children)for(var h in e.children)a.add(s.parseObject(e.children[h],r,i));if("LOD"===e.type)for(var l=e.levels,p=0;p0)){c=n;break}c=n-1}if(n=c,i[n]===r)return n/(o-1);var u=i[n];return(n+(r-u)/(i[n+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,r=t+1e-4;e<0&&(e=0),r>1&&(r=1);var i=this.getPoint(e);return this.getPoint(r).clone().sub(i).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var r,i,n,o=this,a=new g,s=[],c=[],u=[],h=new g,l=new v;for(r=0;r<=t;r++)i=r/t,s[r]=o.getTangentAt(i),s[r].normalize();c[0]=new g,u[0]=new g;var p=Number.MAX_VALUE,d=Math.abs(s[0].x),f=Math.abs(s[0].y),m=Math.abs(s[0].z);for(d<=p&&(p=d,a.set(1,0,0)),f<=p&&(p=f,a.set(0,1,0)),m<=p&&a.set(0,0,1),h.crossVectors(s[0],a).normalize(),c[0].crossVectors(s[0],h),u[0].crossVectors(s[0],c[0]),r=1;r<=t;r++)c[r]=c[r-1].clone(),u[r]=u[r-1].clone(),h.crossVectors(s[r-1],s[r]),h.length()>Number.EPSILON&&(h.normalize(),n=Math.acos(Ql.clamp(s[r-1].dot(s[r]),-1,1)),c[r].applyMatrix4(l.makeRotationAxis(h,n))),u[r].crossVectors(s[r],c[r]);if(!0===e)for(n=Math.acos(Ql.clamp(c[0].dot(c[t]),-1,1)),n/=t,s[0].dot(h.crossVectors(c[0],c[t]))>0&&(n=-n),r=1;r<=t;r++)c[r].applyMatrix4(l.makeRotationAxis(s[r],n*r)),u[r].crossVectors(s[r],c[r]);return{tangents:s,normals:c,binormals:u}}}),Ai.prototype=Object.create(Si.prototype),Ai.prototype.constructor=Ai,Ai.prototype.isLineCurve=!0,Ai.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},Ai.prototype.getPointAt=function(t){return this.getPoint(t)},Ai.prototype.getTangent=function(t){return this.v2.clone().sub(this.v1).normalize()},Mi.prototype=Object.assign(Object.create(Si.prototype),{constructor:Mi,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Ai(e,t))},getPoint:function(t){for(var e=this,r=t*this.getLength(),i=this.getCurveLengths(),n=0;n=r){var o=i[n]-r,a=e.curves[n],s=a.getLength(),c=0===s?0:1-o/s;return a.getPointAt(c)}n++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){var t=this;if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],r=0,i=0,n=this.curves.length;i1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r},createPointsGeometry:function(t){var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){for(var e=new wt,r=0,i=t.length;re;)r-=e;re.length-2?e.length-1:i+1],c=e[i>e.length-3?e.length-1:i+2];return new l(di(n,o.x,a.x,s.x,c.x),di(n,o.y,a.y,s.y,c.y))},Pi.prototype=Object.create(Si.prototype),Pi.prototype.constructor=Pi,Pi.prototype.getPoint=function(t){var e=this.v0,r=this.v1,i=this.v2,n=this.v3;return new l(wi(t,e.x,r.x,i.x,n.x),wi(t,e.y,r.y,i.y,n.y))},Ci.prototype=Object.create(Si.prototype),Ci.prototype.constructor=Ci,Ci.prototype.getPoint=function(t){var e=this.v0,r=this.v1,i=this.v2;return new l(vi(t,e.x,r.x,i.x),vi(t,e.y,r.y,i.y))};var Tp=Object.assign(Object.create(Mi.prototype),{fromPoints:function(t){var e=this;this.moveTo(t[0].x,t[0].y);for(var r=1,i=t.length;r0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var h=c.getPoint(1);this.currentPoint.copy(h)}});Ii.prototype=Tp,Tp.constructor=Ii,Ri.prototype=Object.assign(Object.create(Tp),{constructor:Ri,getPointsHoles:function(t){for(var e=this,r=[],i=0,n=this.holes.length;i1){for(var v=!1,y=[],b=0,x=p.length;bNumber.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[n],u=-u),t.ys.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var h=u*(t.x-a.x)-c*(t.y-a.y);if(0===h)return!0;if(h<0)continue;i=!i}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return i})(S.p,p[M].p)&&(b!==M&&y.push({froms:b,tos:M,hole:w}),A?(A=!1,l[M].push(S)):v=!0);A&&l[b].push(S)}y.length>0&&(v||(d=l))}for(var E,m=0,T=p.length;m0){this.source.connect(this.filters[0]);for(var e=1,r=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,r=this.filters.length;e=.5)for(var o=0;o!==n;++o)t[e+o]=t[r+o]},_slerp:function(t,e,r,i){m.slerpFlat(t,e,t,e,t,r,i)},_lerp:function(t,e,r,i,n){for(var o=1-i,a=0;a!==n;++a){var s=e+a;t[s]=t[s]*o+t[r+a]*i}}}),Object.assign(Gi.prototype,{getValue:function(t,e){this.bind();var r=this._targetGroup.nCachedObjects_,i=this._bindings[r];void 0!==i&&i.getValue(t,e)},setValue:function(t,e){for(var r=this._bindings,i=this._targetGroup.nCachedObjects_,n=r.length;i!==n;++i)r[i].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,r=t.length;e!==r;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,r=t.length;e!==r;++e)t[e].unbind()}}),Object.assign(Vi,{Composite:Gi,create:function(t,e,r){return t&&t.isAnimationObjectGroup?new Vi.Composite(t,e,r):new Vi(t,e,r)},sanitizeNodeName:function(t){return t.replace(/\s/g,"_").replace(/[^\w-]/g,"")},parseTrackName:function(){var t=new RegExp("^"+/((?:[\w-]+[\/:])*)/.source+/([\w-\.]+)?/.source+/(?:\.([\w-]+)(?:\[(.+)\])?)?/.source+/\.([\w-]+)(?:\[(.+)\])?/.source+"$"),e=["material","materials","bones"];return function(r){var i=t.exec(r);if(!i)throw new Error("PropertyBinding: Cannot parse trackName: "+r);var n={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},o=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==o&&-1!==o){var a=n.nodeName.substring(o+1);-1!==e.indexOf(a)&&(n.nodeName=n.nodeName.substring(0,o),n.objectName=a)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+r);return n}}(),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var r=function(t){for(var r=0;r=i){var p=i++,d=r[p];n[d.uuid]=l,r[l]=d,n[h]=p,r[p]=u;for(var f=0,m=a;f!==m;++f){var g=o[f],v=g[p],y=g[l];g[l]=v,g[p]=y}}}this.nCachedObjects_=i},uncache:function(t){for(var e=arguments,r=this._objects,i=r.length,n=this.nCachedObjects_,o=this._indicesByUUID,a=this._bindings,s=a.length,c=0,u=arguments.length;c!==u;++c){var h=e[c].uuid,l=o[h];if(void 0!==l)if(delete o[h],l0)for(var c=this._interpolants,u=this._propertyBindings,h=0,l=c.length;h!==l;++h)c[h].evaluate(a),u[h].accumulate(i,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var r=this._weightInterpolant;if(null!==r){var i=r.evaluate(t)[0];e*=i,t>r.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var r=this._timeScaleInterpolant;null!==r&&(e*=r.evaluate(t)[0],t>r.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var r=this._clip.duration,i=this.loop,n=this._loopCount;if(2200===i){-1===n&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=r)e=r;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=2202===i;if(-1===n&&(t>=0?(n=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=r||e<0){var a=Math.floor(e/r);e-=r*a,n+=Math.abs(a);var s=this.repetitions-n;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?r:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(0===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&n))return this.time=e,r-e}return this.time=e,e},_setEndings:function(t,e,r){var i=this._interpolantSettings;r?(i.endingStart=2401,i.endingEnd=2401):(i.endingStart=t?this.zeroSlopeAtStart?2401:zl:2402,i.endingEnd=e?this.zeroSlopeAtEnd?2401:zl:2402)},_scheduleFading:function(t,e,r){var i=this._mixer,n=i.time,o=this._weightInterpolant;null===o&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=n,s[0]=e,a[1]=n+t,s[1]=r,this}}),Object.assign(Wi.prototype,h.prototype,{_bindAction:function(t,e){var r=this,i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,a=t._propertyBindings,s=t._interpolants,c=i.uuid,u=this._bindingsByRootAndName,h=u[c];void 0===h&&(h={},u[c]=h);for(var l=0;l!==o;++l){var p=n[l],d=p.name,f=h[d];if(void 0!==f)a[l]=f;else{if(void 0!==(f=a[l])){null===f._cacheIndex&&(++f.referenceCount,r._addInactiveBinding(f,c,d));continue}var m=e&&e._propertyBindings[l].binding.parsedPath;++(f=new ji(Vi.create(i,d,m),p.ValueTypeName,p.getValueSize())).referenceCount,r._addInactiveBinding(f,c,d),a[l]=f}s[l].resultBuffer=f.buffer}},_activateAction:function(t){var e=this;if(!this._isActiveAction(t)){if(null===t._cacheIndex){var r=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,r)}for(var o=t._propertyBindings,a=0,s=o.length;a!==s;++a){var c=o[a];0==c.useCount++&&(e._lendBinding(c),c.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){var e=this;if(this._isActiveAction(t)){for(var r=t._propertyBindings,i=0,n=r.length;i!==n;++i){var o=r[i];0==--o.useCount&&(o.restoreOriginalState(),e._takeBackBinding(o))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e0?0:(Math.floor(Math.abs(n)/e.length)+1)*e.length:0===o&&n===r-1&&(n=r-2,o=1);var a,s,c,u;if(this.closed||n>0?a=e[(n-1)%r]:(Ip.subVectors(e[0],e[1]).add(e[0]),a=Ip),s=e[n%r],c=e[(n+1)%r],this.closed||n+2r&&(t=r),t},nf=function(t){return t.length>=3?[].slice.call(t):t[0]},ed=function(t){var e,r;for(t._clipped=!1,t._unclipped=t.slice(0),e=r=0;r<3;e=++r)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]<0&&(t[e]=0),t[e]>255&&(t[e]=255)):3===e&&(t[e]<0&&(t[e]=0),t[e]>1&&(t[e]=1));return t._clipped||delete t._unclipped,t},zp=Math.PI,Kd=Math.round,id=Math.cos,cd=Math.floor,Nd=Math.pow,Td=Math.log,Jd=Math.sin,tf=Math.sqrt,qp=Math.atan2,Id=Math.max,Xp=Math.abs,Gp=2*zp,Up=zp/3,Fp=zp/180,jp=180/zp,Wp=[],(td=function(){return arguments[0]instanceof kp?arguments[0]:function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,arguments,function(){})}).version="1.3.3",Hp={},Vp=[],$p=!1,kp=function(){function t(){var t,e,r,i,n,o,a,s,c,u=arguments;for(o=this,e=[],s=0,i=arguments.length;s3?e[3]:1]},sf=function(t){return 255*(t<=.00304?12.92*t:1.055*Nd(t,1/2.4)-.055)},wd=function(t){return t>Bp.t1?t*t*t:Bp.t2*(t-Bp.t0)},Bp={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Vd=function(){var t,e,r,i,n,o,a,s;return i=nf(arguments),r=i[0],e=i[1],t=i[2],n=qd(r,e,t),o=n[0],a=n[1],s=n[2],[116*a-16,500*(o-a),200*(a-s)]},Yd=function(t){return(t/=255)<=.04045?t/12.92:Nd((t+.055)/1.055,2.4)},af=function(t){return t>Bp.t3?Nd(t,1/3):t/Bp.t2+Bp.t0},qd=function(){var t,e,r,i,n,o,a;return i=nf(arguments),r=i[0],e=i[1],t=i[2],r=Yd(r),e=Yd(e),t=Yd(t),n=af((.4124564*r+.3575761*e+.1804375*t)/Bp.Xn),o=af((.2126729*r+.7151522*e+.072175*t)/Bp.Yn),a=af((.0193339*r+.119192*e+.9503041*t)/Bp.Zn),[n,o,a]},td.lab=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["lab"]),function(){})},Hp.lab=_d,kp.prototype.lab=function(){return Vd(this._rgb)},Yp=function(t){var e,r,i,n,o,a,s,c,u,h,l;return t=function(){var e,r,i;for(i=[],r=0,e=t.length;r=360;)r-=360;d[u]=r}return td(d,e).alpha(i/h)},Hp.rgb=function(){var t,e,r,i;e=nf(arguments),r=[];for(t in e)i=e[t],r.push(i);return r},td.rgb=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["rgb"]),function(){})},kp.prototype.rgb=function(t){return null==t&&(t=!0),t?this._rgb.map(Math.round).slice(0,3):this._rgb.slice(0,3)},kp.prototype.rgba=function(t){return null==t&&(t=!0),t?[Math.round(this._rgb[0]),Math.round(this._rgb[1]),Math.round(this._rgb[2]),this._rgb[3]]:this._rgb.slice(0)},Vp.push({p:3,test:function(t){var e;return e=nf(arguments),"array"===rf(e)&&3===e.length?"rgb":4===e.length&&"number"===rf(e[3])&&e[3]>=0&&e[3]<=1?"rgb":void 0}}),hd=function(t){var e,r,i,n,o,a;if(t.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]),a=parseInt(t,16),n=a>>16,i=a>>8&255,r=255&a,[n,i,r,1];if(t.match(/^#?([A-Fa-f0-9]{8})$/))return 9===t.length&&(t=t.substr(1)),a=parseInt(t,16),n=a>>24&255,i=a>>16&255,r=a>>8&255,e=Kd((255&a)/255*100)/100,[n,i,r,e];if(null!=Hp.css&&(o=Hp.css(t)))return o;throw"unknown color: "+t},zd=function(t,e){var r,i,n,o,a,s,c;return null==e&&(e="rgb"),a=t[0],n=t[1],i=t[2],r=t[3],a=Math.round(a),n=Math.round(n),i=Math.round(i),c=a<<16|n<<8|i,s="000000"+c.toString(16),s=s.substr(s.length-6),o="0"+Kd(255*r).toString(16),o=o.substr(o.length-2),"#"+function(){switch(e.toLowerCase()){case"rgba":return s+o;case"argb":return o+s;default:return s}}()},Hp.hex=function(t){return hd(t)},td.hex=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hex"]),function(){})},kp.prototype.hex=function(t){return null==t&&(t="rgb"),zd(this._rgb,t)},Vp.push({p:4,test:function(t){if(1===arguments.length&&"string"===rf(t))return"hex"}}),dd=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d;if(t=nf(arguments),n=t[0],h=t[1],a=t[2],0===h)c=i=e=255*a;else{for(d=[0,0,0],r=[0,0,0],l=2*a-(p=a<.5?a*(1+h):a+h-a*h),n/=360,d[0]=n+1/3,d[1]=n,d[2]=n-1/3,o=s=0;s<=2;o=++s)d[o]<0&&(d[o]+=1),d[o]>1&&(d[o]-=1),6*d[o]<1?r[o]=l+6*(p-l)*d[o]:2*d[o]<1?r[o]=p:3*d[o]<2?r[o]=l+(p-l)*(2/3-d[o])*6:r[o]=l;c=(u=[Kd(255*r[0]),Kd(255*r[1]),Kd(255*r[2])])[0],i=u[1],e=u[2]}return t.length>3?[c,i,e,t[3]]:[c,i,e]},jd=function(t,e,r){var i,n,o,a,s;return void 0!==t&&t.length>=3&&(t=(a=t)[0],e=a[1],r=a[2]),t/=255,e/=255,r/=255,o=Math.min(t,e,r),Id=Math.max(t,e,r),n=(Id+o)/2,Id===o?(s=0,i=Number.NaN):s=n<.5?(Id-o)/(Id+o):(Id-o)/(2-Id-o),t===Id?i=(e-r)/(Id-o):e===Id?i=2+(r-t)/(Id-o):r===Id&&(i=4+(t-e)/(Id-o)),(i*=60)<0&&(i+=360),[i,s,n]},td.hsl=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hsl"]),function(){})},Hp.hsl=dd,kp.prototype.hsl=function(){return jd(this._rgb)},fd=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v;if(t=nf(arguments),n=t[0],m=t[1],v=t[2],v*=255,0===m)c=i=e=v;else switch(360===n&&(n=0),n>360&&(n-=360),n<0&&(n+=360),n/=60,o=cd(n),r=n-o,a=v*(1-m),s=v*(1-m*r),g=v*(1-m*(1-r)),o){case 0:c=(u=[v,g,a])[0],i=u[1],e=u[2];break;case 1:c=(h=[s,v,a])[0],i=h[1],e=h[2];break;case 2:c=(l=[a,v,g])[0],i=l[1],e=l[2];break;case 3:c=(p=[a,s,v])[0],i=p[1],e=p[2];break;case 4:c=(d=[g,a,v])[0],i=d[1],e=d[2];break;case 5:c=(f=[v,a,s])[0],i=f[1],e=f[2]}return[c,i,e,t.length>3?t[3]:1]},Gd=function(){var t,e,r,i,n,o,a,s,c;return a=nf(arguments),o=a[0],r=a[1],t=a[2],n=Math.min(o,r,t),Id=Math.max(o,r,t),e=Id-n,c=Id/255,0===Id?(i=Number.NaN,s=0):(s=e/Id,o===Id&&(i=(r-t)/e),r===Id&&(i=2+(t-o)/e),t===Id&&(i=4+(o-r)/e),(i*=60)<0&&(i+=360)),[i,s,c]},td.hsv=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hsv"]),function(){})},Hp.hsv=fd,kp.prototype.hsv=function(){return Gd(this._rgb)},Od=function(t){var e,r,i;return"number"===rf(t)&&t>=0&&t<=16777215?(i=t>>16,r=t>>8&255,e=255&t,[i,r,e,1]):(console.warn("unknown num color: "+t),[0,0,0,1])},Wd=function(){var t,e,r,i;return i=nf(arguments),r=i[0],e=i[1],t=i[2],(r<<16)+(e<<8)+t},td.num=function(t){return new kp(t,"num")},kp.prototype.num=function(t){return null==t&&(t="rgb"),Wd(this._rgb,t)},Hp.num=Od,Vp.push({p:1,test:function(t){if(1===arguments.length&&"number"===rf(t)&&t>=0&&t<=16777215)return"num"}}),ud=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b;if(r=nf(arguments),s=r[0],n=r[1],e=r[2],n/=100,a=a/100*255,t=255*n,0===n)l=a=i=e;else switch(360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360),s/=60,c=cd(s),o=s-c,u=e*(1-n),h=u+t*(1-o),y=u+t*o,b=u+t,c){case 0:l=(p=[b,y,u])[0],a=p[1],i=p[2];break;case 1:l=(d=[h,b,u])[0],a=d[1],i=d[2];break;case 2:l=(f=[u,b,y])[0],a=f[1],i=f[2];break;case 3:l=(m=[u,h,b])[0],a=m[1],i=m[2];break;case 4:l=(g=[y,u,b])[0],a=g[1],i=g[2];break;case 5:l=(v=[b,u,h])[0],a=v[1],i=v[2]}return[l,a,i,r.length>3?r[3]:1]},Bd=function(){var t,e,r,i,n,o,a,s,c;return c=nf(arguments),s=c[0],n=c[1],e=c[2],a=Math.min(s,n,e),Id=Math.max(s,n,e),i=Id-a,r=100*i/255,t=a/(255-i)*100,0===i?o=Number.NaN:(s===Id&&(o=(n-e)/i),n===Id&&(o=2+(e-s)/i),e===Id&&(o=4+(s-n)/i),(o*=60)<0&&(o+=360)),[o,r,t]},td.hcg=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hcg"]),function(){})},Hp.hcg=ud,kp.prototype.hcg=function(){return Bd(this._rgb)},nd=function(t){var e,r,i,n,o,a,s,c;if(t=t.toLowerCase(),null!=td.colors&&td.colors[t])return hd(td.colors[t]);if(o=t.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(s=o.slice(1,4),n=a=0;a<=2;n=++a)s[n]=+s[n];s[3]=1}else if(o=t.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(s=o.slice(1,5),n=c=0;c<=3;n=++c)s[n]=+s[n];else if(o=t.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(s=o.slice(1,4),n=e=0;e<=2;n=++e)s[n]=Kd(2.55*s[n]);s[3]=1}else if(o=t.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(s=o.slice(1,5),n=r=0;r<=2;n=++r)s[n]=Kd(2.55*s[n]);s[3]=+s[3]}else(o=t.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?((i=o.slice(1,4))[1]*=.01,i[2]*=.01,(s=dd(i))[3]=1):(o=t.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&((i=o.slice(1,4))[1]*=.01,i[2]*=.01,(s=dd(i))[3]=+o[4]);return s},Fd=function(t){var e;return e=t[3]<1?"rgba":"rgb","rgb"===e?e+"("+t.slice(0,3).map(Kd).join(",")+")":"rgba"===e?e+"("+t.slice(0,3).map(Kd).join(",")+","+t[3]+")":void 0},Zd=function(t){return Kd(100*t)/100},pd=function(t,e){var r;return r=e<1?"hsla":"hsl",t[0]=Zd(t[0]||0),t[1]=Zd(100*t[1])+"%",t[2]=Zd(100*t[2])+"%","hsla"===r&&(t[3]=e),r+"("+t.join(",")+")"},Hp.css=function(t){return nd(t)},td.css=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["css"]),function(){})},kp.prototype.css=function(t){return null==t&&(t="rgb"),"rgb"===t.slice(0,3)?Fd(this._rgb):"hsl"===t.slice(0,3)?pd(this.hsl(),this.alpha()):void 0},Hp.named=function(t){return hd(of[t])},Vp.push({p:5,test:function(t){if(1===arguments.length&&null!=of[t])return"named"}}),kp.prototype.name=function(t){var e,r;arguments.length&&(of[t]&&(this._rgb=hd(of[t])),this._rgb[3]=1),e=this.hex();for(r in of)if(e===of[r])return r;return e},Sd=function(){var t,e,r,i;return i=nf(arguments),r=i[0],t=i[1],e=i[2],e*=Fp,[r,id(e)*t,Jd(e)*t]},Ad=function(){var t,e,r,i,n,o,a,s,c,u,h;return r=nf(arguments),s=r[0],n=r[1],a=r[2],u=Sd(s,n,a),t=u[0],e=u[1],i=u[2],h=_d(t,e,i),c=h[0],o=h[1],i=h[2],[c,o,i,r.length>3?r[3]:1]},xd=function(){var t,e,r,i,n,o;return o=nf(arguments),n=o[0],t=o[1],e=o[2],r=tf(t*t+e*e),i=(qp(e,t)*jp+360)%360,0===Kd(1e4*r)&&(i=Number.NaN),[n,r,i]},$d=function(){var t,e,r,i,n,o,a;return o=nf(arguments),n=o[0],r=o[1],e=o[2],a=Vd(n,r,e),i=a[0],t=a[1],e=a[2],xd(i,t,e)},td.lch=function(){var t;return t=nf(arguments),new kp(t,"lch")},td.hcl=function(){var t;return t=nf(arguments),new kp(t,"hcl")},Hp.lch=Ad,Hp.hcl=function(){var t,e,r,i;return i=nf(arguments),e=i[0],t=i[1],r=i[2],Ad([r,t,e])},kp.prototype.lch=function(){return $d(this._rgb)},kp.prototype.hcl=function(){return $d(this._rgb).reverse()},kd=function(t){var e,r,i,n,o,a,s,c,u;return null==t&&(t="rgb"),c=nf(arguments),s=c[0],n=c[1],e=c[2],s/=255,n/=255,e/=255,o=1-Math.max(s,Math.max(n,e)),i=o<1?1/(1-o):0,r=(1-s-o)*i,a=(1-n-o)*i,u=(1-e-o)*i,[r,a,u,o]},rd=function(){var t,e,r,i,n,o,a,s,c;return e=nf(arguments),i=e[0],a=e[1],c=e[2],o=e[3],t=e.length>4?e[4]:1,1===o?[0,0,0,t]:(s=i>=1?0:255*(1-i)*(1-o),n=a>=1?0:255*(1-a)*(1-o),r=c>=1?0:255*(1-c)*(1-o),[s,n,r,t])},Hp.cmyk=function(){return rd(nf(arguments))},td.cmyk=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["cmyk"]),function(){})},kp.prototype.cmyk=function(){return kd(this._rgb)},Hp.gl=function(){var t,e,r,i,n;for(i=function(){var t,r;t=nf(arguments),r=[];for(e in t)n=t[e],r.push(n);return r}.apply(this,arguments),t=r=0;r<=2;t=++r)i[t]*=255;return i},td.gl=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["gl"]),function(){})},kp.prototype.gl=function(){var t;return t=this._rgb,[t[0]/255,t[1]/255,t[2]/255,t[3]]},Hd=function(t,e,r){var i;return i=nf(arguments),t=i[0],e=i[1],r=i[2],t=Pd(t),e=Pd(e),r=Pd(r),.2126*t+.7152*e+.0722*r},Pd=function(t){return t/=255,t<=.03928?t/12.92:Nd((t+.055)/1.055,2.4)},Wp=[],md=function(t,e,r,i){var n,o,a,s;for(null==r&&(r=.5),null==i&&(i="rgb"),"object"!==rf(t)&&(t=td(t)),"object"!==rf(e)&&(e=td(e)),a=0,o=Wp.length;at?o(r,c):o(c,a)},r=Hd(this._rgb),this._rgb=(r>t?o(td("black"),this):o(this,td("white"))).rgba()),this):Hd(this._rgb)},ef=function(t){var e,r,i,n;return n=t/100,n<66?(i=255,r=-155.25485562709179-.44596950469579133*(r=n-2)+104.49216199393888*Td(r),e=n<20?0:.8274096064007395*(e=n-10)-254.76935184120902+115.67994401066147*Td(e)):(i=351.97690566805693+.114206453784165*(i=n-55)-40.25366309332127*Td(i),r=325.4494125711974+.07943456536662342*(r=n-50)-28.0852963507957*Td(r),e=255),[i,r,e]},Xd=function(){var t,e,r,i,n,o,a;for(i=(n=nf(arguments))[0],n[1],t=n[2],r=1e3,e=4e4,.4;e-r>.4;)(o=ef(a=.5*(e+r)))[2]/o[0]>=t/i?e=a:r=a;return Kd(a)},td.temperature=td.kelvin=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["temperature"]),function(){})},Hp.temperature=Hp.kelvin=Hp.K=ef,kp.prototype.temperature=function(){return Xd(this._rgb)},kp.prototype.kelvin=kp.prototype.temperature,td.contrast=function(t,e){var r,i,n,o;return"string"!==(n=rf(t))&&"number"!==n||(t=new kp(t)),"string"!==(o=rf(e))&&"number"!==o||(e=new kp(e)),r=t.luminance(),i=e.luminance(),r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)},td.distance=function(t,e,r){var i,n,o,a,s,c,u;null==r&&(r="lab"),"string"!==(s=rf(t))&&"number"!==s||(t=new kp(t)),"string"!==(c=rf(e))&&"number"!==c||(e=new kp(e)),o=t.get(r),a=e.get(r),u=0;for(n in o)u+=(i=(o[n]||0)-(a[n]||0))*i;return Math.sqrt(u)},td.deltaE=function(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_,w,S,A,M,E,T,P,C,I;for(null==r&&(r=1),null==i&&(i=1),"string"!==(x=rf(t))&&"number"!==x||(t=new kp(t)),"string"!==(_=rf(e))&&"number"!==_||(e=new kp(e)),n=(w=t.lab())[0],a=w[1],c=w[2],o=(S=e.lab())[0],s=S[1],u=S[2],h=tf(a*a+c*c),l=tf(s*s+u*u),E=n<16?.511:.040975*n/(1+.01765*n),A=.0638*h/(1+.0131*h)+.638,b=h<1e-6?0:180*qp(c,a)/zp;b<0;)b+=360;for(;b>=360;)b-=360;return T=b>=164&&b<=345?.56+Xp(.2*id(zp*(b+168)/180)):.36+Xp(.4*id(zp*(b+35)/180)),p=h*h*h*h,y=tf(p/(p+1900)),M=A*(y*T+1-y),v=n-o,g=h-l,f=a-s,m=c-u,d=f*f+m*m-g*g,P=v/(r*E),C=g/(i*A),I=M,tf(P*P+C*C+d/(I*I))},kp.prototype.get=function(t){var e,r,i,n,o,a;return i=this,o=t.split("."),n=o[0],e=o[1],a=i[n](),e?(r=n.indexOf(e),r>-1?a[r]:console.warn("unknown channel "+e+" in mode "+n)):a},kp.prototype.set=function(t,e){var r,i,n,o,a,s;if(n=this,a=t.split("."),o=a[0],r=a[1])if(s=n[o](),(i=o.indexOf(r))>-1)if("string"===rf(e))switch(e.charAt(0)){case"+":case"-":s[i]+=+e;break;case"*":s[i]*=+e.substr(1);break;case"/":s[i]/=+e.substr(1);break;default:s[i]=+e}else s[i]=e;else console.warn("unknown channel "+r+" in mode "+o);else s=e;return td(s,o).alpha(n.alpha())},kp.prototype.clipped=function(){return this._rgb._clipped||!1},kp.prototype.alpha=function(t){return arguments.length?td.rgb([this._rgb[0],this._rgb[1],this._rgb[2],t]):this._rgb[3]},kp.prototype.darken=function(t){var e,r;return null==t&&(t=1),r=this,e=r.lab(),e[0]-=Bp.Kn*t,td.lab(e).alpha(r.alpha())},kp.prototype.brighten=function(t){return null==t&&(t=1),this.darken(-t)},kp.prototype.darker=kp.prototype.darken,kp.prototype.brighter=kp.prototype.brighten,kp.prototype.saturate=function(t){var e,r;return null==t&&(t=1),r=this,e=r.lch(),e[1]+=t*Bp.Kn,e[1]<0&&(e[1]=0),td.lch(e).alpha(r.alpha())},kp.prototype.desaturate=function(t){return null==t&&(t=1),this.saturate(-t)},kp.prototype.premultiply=function(){var t,e;return e=this.rgb(),t=this.alpha(),td(e[0]*t,e[1]*t,e[2]*t,t)},Kp=function(t){return function(e,r){var i,n;return i=td(r).rgb(),n=td(e).rgb(),td(t(i,n),"rgb")}},sd=function(t){return function(e,r){var i,n,o;for(o=[],i=n=0;n<=3;i=++n)o[i]=t(e[i],r[i]);return o}},Ld=function(t,e){return t},Rd=function(t,e){return t*e/255},od=function(t,e){return t>e?e:t},Md=function(t,e){return t>e?t:e},Qd=function(t,e){return 255*(1-(1-t/255)*(1-e/255))},Dd=function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))},Jp=function(t,e){return 255*(1-(1-e/255)/(t/255))},ad=function(t,e){return 255===t?255:(t=e/255*255/(1-t/255),t>255?255:t)},(Zp=function(t,e,r){if(!Zp[r])throw"unknown blend mode "+r;return Zp[r](t,e)}).normal=Kp(sd(Ld)),Zp.multiply=Kp(sd(Rd)),Zp.screen=Kp(sd(Qd)),Zp.overlay=Kp(sd(Dd)),Zp.darken=Kp(sd(od)),Zp.lighten=Kp(sd(Md)),Zp.dodge=Kp(sd(ad)),Zp.burn=Kp(sd(Jp)),td.blend=Zp,td.analyze=function(t){var e,r,i,n;for(i={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},r=0,e=t.length;ri.max&&(i.max=n),i.count+=1);return i.domain=[i.min,i.max],i.limits=function(t,e){return td.limits(i,t,e)},i},td.scale=function(t,e){var r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_;return u="rgb",h=td("#ccc"),f=0,!1,a=[0,1],d=[],p=[0,0],r=!1,n=[],l=!1,c=0,s=1,o=!1,i={},m=!0,x=function(t){var e,r,i,o,a,s;if(null==t&&(t=["#fff","#000"]),null!=t&&"string"===rf(t)&&null!=td.brewer&&(t=td.brewer[t]||td.brewer[t.toLowerCase()]||t),"array"===rf(t)){for(e=i=0,o=(t=t.slice(0)).length-1;0<=o?i<=o:i>=o;e=0<=o?++i:--i)r=t[e],"string"===rf(r)&&(t[e]=td(r));for(d.length=0,e=s=0,a=t.length-1;0<=a?s<=a:s>=a;e=0<=a?++s:--s)d.push(e/(t.length-1))}return b(),n=t},v=function(t){var e,i;if(null!=r){for(i=r.length-1,e=0;e=r[e];)e++;return e-1}return 0},_=function(t){return t},function(t){var e,i,n,o,a;return a=t,r.length>2&&(o=r.length-1,e=v(t),n=r[0]+(r[1]-r[0])*(0+.5*f),i=r[o-1]+(r[o]-r[o-1])*(1-.5*f),a=c+(r[e]+.5*(r[e+1]-r[e])-n)/(i-n)*(s-c)),a},y=function(t,e){var o,a,l,f,g,y,b;if(null==e&&(e=!1),isNaN(t))return h;if(e?b=t:r&&r.length>2?(b=v(t)/(r.length-2),b=p[0]+b*(1-p[0]-p[1])):s!==c?(b=(t-c)/(s-c),b=p[0]+b*(1-p[0]-p[1]),b=Math.min(1,Math.max(0,b))):b=1,e||(b=_(b)),l=Math.floor(1e4*b),m&&i[l])o=i[l];else{if("array"===rf(n))for(a=f=0,y=d.length-1;0<=y?f<=y:f>=y;a=0<=y?++f:--f){if(g=d[a],b<=g){o=n[a];break}if(b>=g&&a===d.length-1){o=n[a];break}if(b>g&&b=h;e=0<=h?++l:--l)d.push(e/(i-1));return a=[c,s],g},g.mode=function(t){return arguments.length?(u=t,b(),g):u},g.range=function(t,e){return x(t),g},g.out=function(t){return l=t,g},g.spread=function(t){return arguments.length?(f=t,g):f},g.correctLightness=function(t){return null==t&&(t=!0),o=t,b(),_=o?function(t){var e,r,i,n,o,a,s,c,u;for(e=y(0,!0).lab()[0],r=y(1,!0).lab()[0],s=e>r,i=y(t,!0).lab()[0],n=i-(o=e+(r-e)*t),c=0,u=1,a=20;Math.abs(n)>.01&&a-- >0;)!function(){s&&(n*=-1),n<0?(c=t,t+=.5*(u-t)):(u=t,t+=.5*(c-t)),i=y(t,!0).lab()[0],n=i-o}();return t}:function(t){return t},g},g.padding=function(t){return null!=t?("number"===rf(t)&&(t=[t,t]),p=t,g):p},g.colors=function(e,i){var o,s,c,u,h,l,p;if(null==i&&(i="hex"),0===arguments.length)return n.map(function(t){return t[i]()});if(e)return 1===e?g(.5)[i]():(s=a[0],o=a[1]-s,function(){h=[];for(var t=0;0<=e?te;0<=e?t++:t--)h.push(t);return h}.apply(this).map(function(t){return g(s+t/(e-1)*o)[i]()}));if(t=[],l=[],r&&r.length>2)for(c=p=1,u=r.length;1<=u?pu;c=1<=u?++p:--p)l.push(.5*(r[c-1]+r[c]));else l=a;return l.map(function(t){return g(t)[i]()})},g.cache=function(t){return null!=t?m=t:m},g},null==td.scales&&(td.scales={}),td.scales.cool=function(){return td.scale([td.hsl(180,1,.9),td.hsl(250,.7,.4)])},td.scales.hot=function(){return td.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},td.analyze=function(t,e,r){var i,n,o,a,s,c;if(s={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==r&&(r=function(){return!0}),i=function(t){null==t||isNaN(t)||(s.values.push(t),s.sum+=t,ts.max&&(s.max=t),s.count+=1)},c=function(t,n){if(r(t,n))return i(null!=e&&"function"===rf(e)?e(t):null!=e&&"string"===rf(e)||"number"===rf(e)?t[e]:t)},"array"===rf(t))for(a=0,o=t.length;a=F;w=1<=F?++O:--O)M.push(T+w/r*(Id-T));M.push(Id)}else if("l"===e.substr(0,1)){if(T<=0)throw"Logarithmic scales are only possible for values > 0";for(P=Math.LOG10E*Td(T),E=Math.LOG10E*Td(Id),M.push(T),w=it=1,B=r-1;1<=B?it<=B:it>=B;w=1<=B?++it:--it)M.push(Nd(10,P+w/r*(E-P)));M.push(Id)}else if("q"===e.substr(0,1)){for(M.push(T),w=i=1,$=r-1;1<=$?i<=$:i>=$;w=1<=$?++i:--i)D=(rt.length-1)*w/r,(N=cd(D))===D?M.push(rt[N]):(k=D-N,M.push(rt[N]*(1-k)+rt[N+1]*k));M.push(Id)}else if("k"===e.substr(0,1)){for(I=rt.length,g=new Array(I),x=new Array(r),Q=!0,R=0,y=null,(y=[]).push(T),w=n=1,H=r-1;1<=H?n<=H:n>=H;w=1<=H?++n:--n)y.push(T+w/r*(Id-T));for(y.push(Id);Q;){for(S=o=0,W=r-1;0<=W?o<=W:o>=W;S=0<=W?++o:--o)x[S]=0;for(w=a=0,X=I-1;0<=X?a<=X:a>=X;w=0<=X?++a:--a){for(et=rt[w],C=Number.MAX_VALUE,S=s=0,q=r-1;0<=q?s<=q:s>=q;S=0<=q?++s:--s)(_=Xp(y[S]-et))=Y;S=0<=Y?++c:--c)L[S]=null;for(w=u=0,Z=I-1;0<=Z?u<=Z:u>=Z;w=0<=Z?++u:--u)null===L[b=g[w]]?L[b]=rt[w]:L[b]+=rt[w];for(S=h=0,K=r-1;0<=K?h<=K:h>=K;S=0<=K?++h:--h)L[S]*=1/x[S];for(Q=!1,S=l=0,z=r-1;0<=z?l<=z:l>=z;S=0<=z?++l:--l)if(L[S]!==y[w]){Q=!0;break}y=L,++R>200&&(Q=!1)}for(A={},S=p=0,U=r-1;0<=U?p<=U:p>=U;S=0<=U?++p:--p)A[S]=[];for(w=d=0,j=I-1;0<=j?d<=j:d>=j;w=0<=j?++d:--d)A[b=g[w]].push(rt[w]);for(J=[],S=f=0,G=r-1;0<=G?f<=G:f>=G;S=0<=G?++f:--f)J.push(A[S][0]),J.push(A[S][A[S].length-1]);for(J=J.sort(function(t,e){return t-e}),M.push(J[0]),w=m=1,V=J.length-1;m<=V;w=m+=2)tt=J[w],isNaN(tt)||-1!==M.indexOf(tt)||M.push(tt)}return M},ld=function(t,e,r){var i,n,o,a;return i=nf(arguments),t=i[0],e=i[1],r=i[2],isNaN(t)&&(t=0),t/=360,t<1/3?o=1-((n=(1-e)/3)+(a=(1+e*id(Gp*t)/id(Up-Gp*t))/3)):t<2/3?n=1-((a=(1-e)/3)+(o=(1+e*id(Gp*(t-=1/3))/id(Up-Gp*t))/3)):a=1-((o=(1-e)/3)+(n=(1+e*id(Gp*(t-=2/3))/id(Up-Gp*t))/3)),a=Ed(r*a*3),o=Ed(r*o*3),n=Ed(r*n*3),[255*a,255*o,255*n,i.length>3?i[3]:1]},Ud=function(){var t,e,r,i,n,o,a,s;return a=nf(arguments),o=a[0],e=a[1],t=a[2],Gp=2*Math.PI,o/=255,e/=255,t/=255,n=Math.min(o,e,t),i=(o+e+t)/3,s=1-n/i,0===s?r=0:(r=(o-e+(o-t))/2,r/=Math.sqrt((o-e)*(o-e)+(o-t)*(e-t)),r=Math.acos(r),t>e&&(r=Gp-r),r/=Gp),[360*r,s,i]},td.hsi=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat(["hsi"]),function(){})},Hp.hsi=ld,kp.prototype.hsi=function(){return Ud(this._rgb)},gd=function(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f;return"hsl"===i?(d=t.hsl(),f=e.hsl()):"hsv"===i?(d=t.hsv(),f=e.hsv()):"hcg"===i?(d=t.hcg(),f=e.hcg()):"hsi"===i?(d=t.hsi(),f=e.hsi()):"lch"!==i&&"hcl"!==i||(i="hcl",d=t.hcl(),f=e.hcl()),"h"===i.substr(0,1)&&(o=d[0],l=d[1],c=d[2],a=f[0],p=f[1],u=f[2]),isNaN(o)||isNaN(a)?isNaN(o)?isNaN(a)?n=Number.NaN:(n=a,1!==c&&0!==c||"hsv"===i||(h=p)):(n=o,1!==u&&0!==u||"hsv"===i||(h=l)):n=o+r*(a>o&&a-o>180?a-(o+360):a180?a+360-o:a-o),null==h&&(h=l+r*(p-l)),s=c+r*(u-c),td[i](n,h,s)},yd=function(t,e,r,i){var n,o;return n=t.num(),o=e.num(),td.num(n+(o-n)*r,"num")},(Wp=Wp.concat(function(){var t,e,r,i;for(i=[],e=0,t=(r=["hsv","hsl","hsi","hcl","lch","hcg"]).length;e>16&255)/255,e[r+1]=(t>>8&255)/255,e[r+2]=(255&t)/255,e},pf.prototype.atomColorToArray=function(t,e,r){return this.colorToArray(this.atomColor(t),e,r)},pf.prototype.bondColor=function(t,e){return this.atomProxy.index=e?t.atomIndex1:t.atomIndex2,this.atomColor(this.atomProxy)},pf.prototype.bondColorToArray=function(t,e,r,i){return this.colorToArray(this.bondColor(t,e),r,i)},pf.prototype.volumeColorToArray=function(t,e,r){return this.colorToArray(this.volumeColor(t),e,r)},pf.prototype.positionColorToArray=function(t,e,r){return this.colorToArray(this.positionColor(t),e,r)},ro.prototype={active:!0,params:null,execute:function(t){var e,r;return this.active&&this._listener&&(r=this.params?this.params.concat(t):t,e=this._listener.apply(this.context,r),this._isOnce&&this.detach()),e},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},no.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(t,e,r,i){var n,o=this._indexOfListener(t,r);if(-1!==o){if((n=this._bindings[o]).isOnce()!==e)throw new Error("You cannot add"+(e?"":"Once")+"() then add"+(e?"Once":"")+"() the same listener without removing the relationship first.")}else n=new ro(this,t,e,r,i),this._addBinding(n);return this.memorize&&this._prevParams&&n.execute(this._prevParams),n},_addBinding:function(t){var e=this._bindings.length;do{--e}while(this._bindings[e]&&t._priority<=this._bindings[e]._priority);this._bindings.splice(e+1,0,t)},_indexOfListener:function(t,e){for(var r,i=this,n=this._bindings.length;n--;)if((r=i._bindings[n])._listener===t&&r.context===e)return n;return-1},has:function(t,e){return-1!==this._indexOfListener(t,e)},add:function(t,e,r){return io(t,"add"),this._registerListener(t,!1,e,r)},addOnce:function(t,e,r){return io(t,"addOnce"),this._registerListener(t,!0,e,r)},remove:function(t,e){io(t,"remove");var r=this._indexOfListener(t,e);return-1!==r&&(this._bindings[r]._destroy(),this._bindings.splice(r,1)),t},removeAll:function(){for(var t=this,e=this._bindings.length;e--;)t._bindings[e]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(t){if(this.active){var e,r=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=r),i){e=this._bindings.slice(),this._shouldPropagate=!0;do{i--}while(e[i]&&this._shouldPropagate&&!1!==e[i].execute(r))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var df={PROTEIN:1,NUCLEIC:2,RNA:3,DNA:4,POLYMER:5,WATER:6,HELIX:7,SHEET:8,TURN:9,BACKBONE:10,SIDECHAIN:11,ALL:12,HETERO:13,ION:14,SACCHARIDE:15,SUGAR:15,BONDED:16,RING:17},ff=["*","","ALL"],mf=[df.BACKBONE,df.SIDECHAIN,df.BONDED,df.RING],gf=[df.POLYMER,df.WATER],vf=["ALA","GLY","SER"],yf=["CYS","SER","THR"],bf=["ALA","ILE","LEU","MET","PHE","PRO","TRP","VAL"],xf=["PHE","TRP","TYR","HIS"],_f=["ASN","GLN"],wf=["ASP","GLU"],Sf=["ARG","HIS","LYS"],Af=["ARG","ASP","GLU","HIS","LYS"],Mf=["ASN","ARG","ASP","CYS","GLY","GLN","GLU","HIS","LYS","SER","THR","TYR"],Ef=["ALA","ILE","LEU","MET","PHE","PRO","TRP","VAL"],Tf=["HIS","PHE","PRO","TRP","TYR"],Pf=["ALA","GLY","ILE","LEU","VAL"],Cf=function(t){this.signals={stringChanged:new no},this.setString(t)},If={type:{}};If.type.get=function(){return"selection"},Cf.prototype.setString=function(t,e){if(void 0===t&&(t=this.string||""),t!==this.string){try{this.selection=oo(t)}catch(t){this.selection={error:t.message}}var r=this.selection;this.string=t,this.test=po(r),this.residueTest=fo(r),this.chainTest=mo(r),this.modelTest=go(r),this.atomOnlyTest=po(r,!0),this.residueOnlyTest=fo(r,!0),this.chainOnlyTest=mo(r,!0),this.modelOnlyTest=go(r,!0),e||this.signals.stringChanged.dispatch(this.string)}},Object.defineProperties(Cf.prototype,If);var Rf=function(t){function e(e){var r=this;t.call(this,e);var i=e.dataList||[];this.colormakerList=[],this.selectionList=[],i.forEach(function(t){var e=t[0],i=t[1],n=t[2];void 0===n&&(n={}),Hf.hasScheme(e)?Object.assign(n,{scheme:e,structure:r.structure}):Object.assign(n,{scheme:"uniform",value:new tt(e).getHex()}),r.colormakerList.push(Hf.getScheme(n)),r.selectionList.push(new Cf(i))})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){for(var e=this,r=0,i=this.selectionList.length;ri).lines},tm.prototype.chunkCount=function(){return Math.floor(this.data.length/this.chunkSize)+1},tm.prototype.asText=function(){return this.isBinary()?In(this.data):this.data},tm.prototype.chunkToLines=function(t,e,r){var i=this.newline;if(!this.isBinary()&&t.length===this.data.length)return{lines:t.split(i),partialLine:""};var n=[],o=this.isBinary()?In(t):t,a=o.lastIndexOf(i);if(-1===a)e+=o;else{var s=e+o.substr(0,a);n=n.concat(s.split(i)),e=a===o.length-i.length?"":o.substr(a+i.length)}return r&&""!==e&&n.push(e),{lines:n,partialLine:e}},tm.prototype.nextChunk=function(){var t=this.__pointer;if(!(t>this.data.length))return this.__pointer+=this.chunkSize,this.chunk(t)},tm.prototype.nextChunkOfLines=function(){var t=this.nextChunk();if(void 0!==t){var e=this.__pointer>this.data.length,r=this.chunkToLines(t,this.__partialLine,e);return this.__partialLine=r.partialLine,r.lines}},tm.prototype.eachChunk=function(t){for(var e=this,r=this.chunkSize,i=this.data.length,n=this.chunkCount(),o=0;o>>0:0,o=t.byteLength-n,a=n;t.buffer&&(t.byteLength!==t.buffer.byteLength&&(a=t.byteOffset+n),t=t.buffer),this._lastWrittenByte=i?o:0,this.buffer=t,this.length=o,this.byteLength=o,this.byteOffset=a,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,a,o),this._mark=0,this._marks=[]};vm.prototype.available=function(t){return void 0===t&&(t=1),this.offset+t<=this.length},vm.prototype.isLittleEndian=function(){return this.littleEndian},vm.prototype.setLittleEndian=function(){return this.littleEndian=!0,this},vm.prototype.isBigEndian=function(){return!this.littleEndian},vm.prototype.setBigEndian=function(){return this.littleEndian=!1,this},vm.prototype.skip=function(t){return void 0===t&&(t=1),this.offset+=t,this},vm.prototype.seek=function(t){return this.offset=t,this},vm.prototype.mark=function(){return this._mark=this.offset,this},vm.prototype.reset=function(){return this.offset=this._mark,this},vm.prototype.pushMark=function(){return this._marks.push(this.offset),this},vm.prototype.popMark=function(){var t=this._marks.pop();if(void 0===t)throw new Error("Mark stack empty");return this.seek(t),this},vm.prototype.rewind=function(){return this.offset=0,this},vm.prototype.ensureAvailable=function(t){if(void 0===t&&(t=1),!this.available(t)){var e=2*(this.offset+t),r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=e,this._data=new DataView(this.buffer)}return this},vm.prototype.readBoolean=function(){return 0!==this.readUint8()},vm.prototype.readInt8=function(){return this._data.getInt8(this.offset++)},vm.prototype.readUint8=function(){return this._data.getUint8(this.offset++)},vm.prototype.readByte=function(){return this.readUint8()},vm.prototype.readBytes=function(t){var e=this;void 0===t&&(t=1);for(var r=new Uint8Array(t),i=0;ithis._lastWrittenByte&&(this._lastWrittenByte=this.offset)};var ym=function(t){function e(e){t.call(this),this.surface=e,this._records=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mimeType:{},defaultName:{},defaultExt:{}};return r.mimeType.get=function(){return"application/vnd.ms-pki.stl"},r.defaultName.get=function(){return"surface"},r.defaultExt.get=function(){return"stl"},e.prototype.getData=function(){var t=this,e=this.surface.index.length/3,r=new vm(2*e+3*e*4*4+80+4);r.skip(80),r.writeUint32(e);for(var i=new g,n=new g,o=new g,a=new g,s=0;sthis.prevFpsTime+1e3&&(this.lastFps=this.frames,this.prevFpsTime=t,this.frames=0),t}},Yf.add("shader/chunk/dull_interior_fragment.glsl","#ifdef DULL_INTERIOR\nif( gl_FrontFacing == false ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#endif"),Yf.add("shader/chunk/fog_fragment.glsl","#ifdef USE_FOG\nfloat depth = length( vViewPosition );\n#ifdef FOG_EXP2\nfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n#else\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n#endif\ngl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif"),Yf.add("shader/chunk/matrix_scale.glsl","float matrixScale( in mat4 m ){\nvec4 r = m[ 0 ];\nreturn sqrt( r[ 0 ] * r[ 0 ] + r[ 1 ] * r[ 1 ] + r[ 2 ] * r[ 2 ] );\n}"),Yf.add("shader/chunk/nearclip_vertex.glsl","#ifdef NEAR_CLIP\nif( vViewPosition.z < nearClip - 5.0 )\ngl_Position.z = 2.0 * gl_Position.w;\n#endif"),Yf.add("shader/chunk/nearclip_fragment.glsl","#ifdef NEAR_CLIP\nif( vViewPosition.z < nearClip )\ndiscard;\n#endif"),Yf.add("shader/chunk/opaque_back_fragment.glsl","#ifdef OPAQUE_BACK\n#ifdef FLIP_SIDED\nif( gl_FrontFacing == true ){\ngl_FragColor.a = 1.0;\n}\n#else\nif( gl_FrontFacing == false ){\ngl_FragColor.a = 1.0;\n}\n#endif\n#endif"),Yf.add("shader/chunk/radiusclip_vertex.glsl","#ifdef RADIUS_CLIP\nif( distance( vViewPosition, vClipCenter ) > clipRadius + 5.0 )\ngl_Position.z = 2.0 * gl_Position.w;\n#endif"),Yf.add("shader/chunk/radiusclip_fragment.glsl","#ifdef RADIUS_CLIP\nif( distance( vViewPosition, vClipCenter ) > clipRadius )\ndiscard;\n#endif"),Yf.add("shader/chunk/unpack_color.glsl","vec3 unpackColor(float f) {\nvec3 color;\ncolor.r = floor(f / 256.0 / 256.0);\ncolor.g = floor((f - color.r * 256.0 * 256.0) / 256.0);\ncolor.b = floor(f - color.r * 256.0 * 256.0 - color.g * 256.0);\nreturn color / 255.0;\n}");var xm=/^(?!\/\/)\s*#include\s+(\S+)/gim,_m={};if("undefined"!=typeof window&&window.WebGLRenderingContext){var wm=window.WebGLRenderingContext.prototype,Sm=wm.getShaderParameter;wm.getShaderParameter=function(){return!t.Debug||Sm.apply(this,arguments)};var Am=wm.getShaderInfoLog;wm.getShaderInfoLog=function(){return t.Debug?Am.apply(this,arguments):""};var Mm=wm.getProgramParameter;wm.getProgramParameter=function(e,r){return!t.Debug&&r===wm.LINK_STATUS||Mm.apply(this,arguments)};var Em=wm.getProgramInfoLog;wm.getProgramInfoLog=function(){return t.Debug?Em.apply(this,arguments):""}}var Tm=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];Tm.forEach(function(t){t.forEach(function(t){t[0]*=.0625,t[1]*=.0625})}),Lo.prototype.constructor=Lo;var Pm=2*Math.PI,Cm=(new Float32Array(4),new Float32Array(4),new g),Im=new v,Rm=new v,Lm=new v,Om=new v,Dm=new Float32Array(4),Nm=new Uint8Array(4),km=new v;ea.prototype.constructor=ea;var Fm=function(t,e){this.signals={moved:new no,scrolled:new no,dragged:new no,dropped:new no,clicked:new no,hovered:new no,doubleClicked:new no};var r=Object.assign({},e);this.hoverTimeout=gn(r.hoverTimeout,50),this.handleScroll=gn(r.handleScroll,!0),this.doubleClickSpeed=gn(r.doubleClickSpeed,500),this.domElement=t,this.position=new l,this.prevPosition=new l,this.down=new l,this.canvasPosition=new l,this.moving=!1,this.hovering=!0,this.scrolled=!1,this.lastMoved=1/0,this.which=void 0,this.buttons=void 0,this.pressed=void 0,this.altKey=void 0,this.ctrlKey=void 0,this.metaKey=void 0,this.shiftKey=void 0,this._listen=this._listen.bind(this),this._onMousewheel=this._onMousewheel.bind(this),this._onMousemove=this._onMousemove.bind(this),this._onMousedown=this._onMousedown.bind(this),this._onMouseup=this._onMouseup.bind(this),this._onContextmenu=this._onContextmenu.bind(this),this._onTouchstart=this._onTouchstart.bind(this),this._onTouchend=this._onTouchend.bind(this),this._onTouchmove=this._onTouchmove.bind(this),this._listen(),document.addEventListener("mousewheel",this._onMousewheel),document.addEventListener("wheel",this._onMousewheel),document.addEventListener("MozMousePixelScroll",this._onMousewheel),document.addEventListener("mousemove",this._onMousemove),document.addEventListener("mousedown",this._onMousedown),document.addEventListener("mouseup",this._onMouseup),document.addEventListener("contextmenu",this._onContextmenu),document.addEventListener("touchstart",this._onTouchstart),document.addEventListener("touchend",this._onTouchend),document.addEventListener("touchmove",this._onTouchmove),this.prevClickCP=new l},Bm={key:{}};Bm.key.get=function(){var t=0;return this.altKey&&(t+=1),this.ctrlKey&&(t+=2),this.metaKey&&(t+=4),this.shiftKey&&(t+=8),t},Fm.prototype.setParameters=function(t){var e=Object.assign({},t);this.hoverTimeout=gn(e.hoverTimeout,this.hoverTimeout)},Fm.prototype._listen=function(){var t=window.performance.now(),e=this.canvasPosition;this.doubleClickPending&&t-this.lastClicked>this.doubleClickSpeed&&(this.doubleClickPending=!1),t-this.lastMoved>this.hoverTimeout&&(this.moving=!1),(this.scrolled||!this.moving&&!this.hovering)&&(this.scrolled=!1,-1!==this.hoverTimeout&&this.overElement&&(this.hovering=!0,this.signals.hovered.dispatch(e.x,e.y))),window.requestAnimationFrame(this._listen)},Fm.prototype._onMousewheel=function(t){var e=this;if(t.target===this.domElement&&this.handleScroll){t.preventDefault(),this._setKeys(t);var r=0;r=t.wheelDelta?t.wheelDelta/40:t.detail?-t.detail/3:-t.deltaY/(t.deltaMode?.33:30),this.signals.scrolled.dispatch(r),setTimeout(function(){e.scrolled=!0},this.hoverTimeout)}},Fm.prototype._onMousemove=function(t){t.target===this.domElement?(t.preventDefault(),this.overElement=!0):this.overElement=!1,this._setKeys(t),this.moving=!0,this.hovering=!1,this.lastMoved=window.performance.now(),this.prevPosition.copy(this.position),this.position.set(t.clientX,t.clientY),this._setCanvasPosition(t);var e=this.prevPosition.x-this.position.x,r=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(e,r),this.pressed&&this.signals.dragged.dispatch(e,r)},Fm.prototype._onMousedown=function(t){t.target===this.domElement&&(t.preventDefault(),this._setKeys(t),this.moving=!1,this.hovering=!1,this.down.set(t.clientX,t.clientY),this.position.set(t.clientX,t.clientY),this.which=t.which,this.buttons=ia(t),this.pressed=!0,this._setCanvasPosition(t))},Fm.prototype._onMouseup=function(t){t.target===this.domElement&&t.preventDefault(),this._setKeys(t);var e=this.canvasPosition;this._distance()<4&&(this.lastClicked=window.performance.now(),this.doubleClickPending&&this.prevClickCP.distanceTo(e)<4?(this.signals.doubleClicked.dispatch(e.x,e.y),this.doubleClickPending=!1):(this.signals.clicked.dispatch(e.x,e.y),this.doubleClickPending=!0),this.prevClickCP.copy(e)),this.which=void 0,this.buttons=void 0,this.pressed=void 0},Fm.prototype._onContextmenu=function(t){t.target===this.domElement&&t.preventDefault()},Fm.prototype._onTouchstart=function(t){if(t.target===this.domElement)switch(t.preventDefault(),this.pressed=!0,t.touches.length){case 1:this.moving=!1,this.hovering=!1,this.down.set(t.touches[0].pageX,t.touches[0].pageY),this.position.set(t.touches[0].pageX,t.touches[0].pageY),this._setCanvasPosition(t.touches[0]);break;case 2:this.down.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),this.position.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),this.lastTouchDistance=ra(t)}},Fm.prototype._onTouchend=function(t){t.target===this.domElement&&t.preventDefault(),this.which=void 0,this.buttons=void 0,this.pressed=void 0},Fm.prototype._onTouchmove=function(t){switch(t.target===this.domElement?(t.preventDefault(),this.overElement=!0):this.overElement=!1,t.touches.length){case 1:this._setKeys(t),this.which=1,this.buttons=1,this.moving=!0,this.hovering=!1,this.lastMoved=window.performance.now(),this.prevPosition.copy(this.position),this.position.set(t.touches[0].pageX,t.touches[0].pageY),this._setCanvasPosition(t.touches[0]);var e=this.prevPosition.x-this.position.x,r=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(e,r),this.pressed&&this.signals.dragged.dispatch(e,r);break;case 2:var i=ra(t),n=i-this.lastTouchDistance;if(this.lastTouchDistance=i,this.prevPosition.copy(this.position),this.position.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),Math.abs(n)>2&&this.handleScroll&&this.position.distanceTo(this.prevPosition)<2)this.which=0,this.buttons=0,this.signals.scrolled.dispatch(n/2);else{this.which=3,this.buttons=2;var o=this.prevPosition.x-this.position.x,a=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(o,a),this.pressed&&this.signals.dragged.dispatch(o,a)}}},Fm.prototype._distance=function(){return this.position.distanceTo(this.down)},Fm.prototype._setCanvasPosition=function(t){var e,r,i=this.domElement.getBoundingClientRect();"offsetX"in t&&"offsetY"in t?(e=t.offsetX,r=t.offsetY):(e=t.clientX-i.left,r=t.clientY-i.top),this.canvasPosition.set(e,i.height-r)},Fm.prototype._setKeys=function(t){this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey},Fm.prototype.dispose=function(){document.removeEventListener("mousewheel",this._onMousewheel),document.removeEventListener("wheel",this._onMousewheel),document.removeEventListener("MozMousePixelScroll",this._onMousewheel),document.removeEventListener("mousemove",this._onMousemove),document.removeEventListener("mousedown",this._onMousedown),document.removeEventListener("mouseup",this._onMouseup),document.removeEventListener("contextmenu",this._onContextmenu),document.removeEventListener("touchstart",this._onTouchstart),document.removeEventListener("touchend",this._onTouchend),document.removeEventListener("touchmove",this._onTouchmove)},Object.defineProperties(Fm.prototype,Bm);var zm=new v,Um=new v,jm=new v,Gm=new g,Vm=new m,$m=new v,Hm=new g,Wm=new g,Xm=function(t,e){var r=e||{};this.rotateSpeed=gn(r.rotateSpeed,2),this.zoomSpeed=gn(r.zoomSpeed,1.2),this.panSpeed=gn(r.panSpeed,1),this.stage=t,this.viewer=t.viewer,this.mouse=t.mouseObserver,this.controls=t.viewerControls},qm={component:{},atom:{}};qm.component.get=function(){return this.stage.transformComponent},qm.atom.get=function(){return this.stage.transformAtom},Xm.prototype._setPanVector=function(t,e,r){var i,n=this.viewer.camera;if(r=-r||0,r+=n.position.z,"OrthographicCamera"===n.type)i=1/n.zoom;else{var o=$n(n.fov);i=-2*r*Math.tan(o/2)/this.viewer.height}Hm.set(t,e,0),Hm.multiplyScalar(this.panSpeed*i)},Xm.prototype._getRotateXY=function(t,e){return[this.rotateSpeed*-t*.01,this.rotateSpeed*e*.01]},Xm.prototype._transformPanVector=function(){$m.extractRotation(this.component.transform),$m.premultiply(this.viewer.rotationGroup.matrix),$m.getInverse($m),Hm.applyMatrix4($m)},Xm.prototype.zoom=function(t){this.controls.zoom(this.zoomSpeed*t*.02)},Xm.prototype.pan=function(t,e){this._setPanVector(t,e),$m.getInverse(this.viewer.rotationGroup.matrix),Hm.applyMatrix4($m),this.controls.translate(Hm)},Xm.prototype.panComponent=function(t,e){this.component&&(this._setPanVector(t,e),this._transformPanVector(),this.component.position.add(Hm),this.component.updateMatrix())},Xm.prototype.panAtom=function(t,e){this.atom&&this.component&&(this.atom.positionToVector3(Wm),Wm.add(this.viewer.translationGroup.position),Wm.applyMatrix4(this.viewer.rotationGroup.matrix),this._setPanVector(t,e,Wm.z),this._transformPanVector(),this.atom.positionAdd(Hm),this.component.updateRepresentations({position:!0}))},Xm.prototype.rotate=function(t,e){var r=this._getRotateXY(t,e),i=r[0],n=r[1];zm.makeRotationX(n),Um.makeRotationY(i),zm.multiply(Um),this.controls.applyMatrix(zm)},Xm.prototype.rotateComponent=function(t,e){if(this.component){var r=this._getRotateXY(t,e),i=r[0],n=r[1];jm.extractRotation(this.component.transform),jm.premultiply(this.viewer.rotationGroup.matrix),jm.getInverse(jm),Gm.set(1,0,0),Gm.applyMatrix4(jm),zm.makeRotationAxis(Gm,n),Gm.set(0,1,0),Gm.applyMatrix4(jm),Um.makeRotationAxis(Gm,i),zm.multiply(Um),Vm.setFromRotationMatrix(zm),this.component.quaternion.premultiply(Vm),this.component.updateMatrix()}},Object.defineProperties(Xm.prototype,qm);var Ym=function(t,e){this.pid=t.pid,this.picker=t.picker,this.instance=t.instance,this.stage=e,this.controls=e.viewerControls,this.mouse=e.mouseObserver},Zm={type:{},altKey:{},ctrlKey:{},metaKey:{},shiftKey:{},canvasPosition:{},component:{},object:{},position:{},closestBondAtom:{},arrow:{},atom:{},axes:{},bond:{},box:{},cone:{},clash:{},contact:{},cylinder:{},distance:{},ellipsoid:{},octahedron:{},mesh:{},slice:{},sphere:{},tetrahedron:{},torus:{},surface:{},unitcell:{},unknown:{},volume:{}};Zm.type.get=function(){return this.picker.type},Zm.altKey.get=function(){return this.mouse.altKey},Zm.ctrlKey.get=function(){return this.mouse.ctrlKey},Zm.metaKey.get=function(){return this.mouse.metaKey},Zm.shiftKey.get=function(){return this.mouse.shiftKey},Zm.canvasPosition.get=function(){return this.mouse.canvasPosition},Zm.component.get=function(){return this.stage.getComponentsByObject(this.picker.data).list[0]},Zm.object.get=function(){return this.picker.getObject(this.pid)},Zm.position.get=function(){return this.picker.getPosition(this.pid,this.instance,this.component)},Zm.closestBondAtom.get=function(){if("bond"===this.type){var t=this.bond,e=this.controls;return na(this.canvasPosition,e.getPositionOnCanvas(t.atom1),e.getPositionOnCanvas(t.atom2))?t.atom1:t.atom2}},Zm.arrow.get=function(){return this._objectIfType("arrow")},Zm.atom.get=function(){return this._objectIfType("atom")},Zm.axes.get=function(){return this._objectIfType("axes")},Zm.bond.get=function(){return this._objectIfType("bond")},Zm.box.get=function(){return this._objectIfType("box")},Zm.cone.get=function(){return this._objectIfType("cone")},Zm.clash.get=function(){return this._objectIfType("clash")},Zm.contact.get=function(){return this._objectIfType("contact")},Zm.cylinder.get=function(){return this._objectIfType("cylinder")},Zm.distance.get=function(){return this._objectIfType("distance")},Zm.ellipsoid.get=function(){return this._objectIfType("ellipsoid")},Zm.octahedron.get=function(){return this._objectIfType("octahedron")},Zm.mesh.get=function(){return this._objectIfType("mesh")},Zm.slice.get=function(){return this._objectIfType("slice")},Zm.sphere.get=function(){return this._objectIfType("sphere")},Zm.tetrahedron.get=function(){return this._objectIfType("tetrahedron")},Zm.torus.get=function(){return this._objectIfType("torus")},Zm.surface.get=function(){return this._objectIfType("surface")},Zm.unitcell.get=function(){return this._objectIfType("unitcell")},Zm.unknown.get=function(){return this._objectIfType("unknown")},Zm.volume.get=function(){return this._objectIfType("volume")},Ym.prototype._objectIfType=function(t){return this.type===t?this.object:void 0},Ym.prototype.getLabel=function(){var t="nothing";return this.arrow?t="arrow: "+(this.arrow.name||this.pid)+" ("+this.arrow.shape.name+")":this.atom?t="atom: "+this.atom.qualifiedName()+" ("+this.atom.structure.name+")":this.axes?t="axes":this.bond?t="bond: "+this.bond.atom1.qualifiedName()+" - "+this.bond.atom2.qualifiedName()+" ("+this.bond.structure.name+")":this.box?t="box: "+(this.box.name||this.pid)+" ("+this.box.shape.name+")":this.cone?t="cone: "+(this.cone.name||this.pid)+" ("+this.cone.shape.name+")":this.clash?t="clash: "+this.clash.clash.sele1+" - "+this.clash.clash.sele2:this.contact?t="contact: "+this.contact.atom1.qualifiedName()+" - "+this.contact.atom2.qualifiedName()+" ("+this.contact.structure.name+")":this.cylinder?t="cylinder: "+(this.cylinder.name||this.pid)+" ("+this.cylinder.shape.name+")":this.distance?t="distance: "+this.distance.atom1.qualifiedName()+" - "+this.distance.atom2.qualifiedName()+" ("+this.distance.structure.name+")":this.ellipsoid?t="ellipsoid: "+(this.ellipsoid.name||this.pid)+" ("+this.ellipsoid.shape.name+")":this.octahedron?t="octahedron: "+(this.octahedron.name||this.pid)+" ("+this.octahedron.shape.name+")":this.mesh?t="mesh: "+(this.mesh.name||this.mesh.serial)+" ("+this.mesh.shape.name+")":this.slice?t="slice: "+this.slice.value.toPrecision(3)+" ("+this.slice.volume.name+")":this.sphere?t="sphere: "+(this.sphere.name||this.pid)+" ("+this.sphere.shape.name+")":this.surface?t="surface: "+this.surface.surface.name:this.tetrahedron?t="tetrahedron: "+(this.tetrahedron.name||this.pid)+" ("+this.tetrahedron.shape.name+")":this.torus?t="torus: "+(this.torus.name||this.pid)+" ("+this.torus.shape.name+")":this.unitcell?t="unitcell: "+this.unitcell.unitcell.spacegroup+" ("+this.unitcell.structure.name+")":this.unknown?t="unknown":this.volume&&(t="volume: "+this.volume.value.toPrecision(3)+" ("+this.volume.volume.name+")"),t},Object.defineProperties(Ym.prototype,Zm);var Km=function(t){this.stage=t,this.viewer=t.viewer};Km.prototype.pick=function(t,e){var r=this.viewer.pick(t,e);if(r.picker&&"ignore"!==r.picker.type&&void 0!==r.pid){var i=r.picker.array;if(!(i&&r.pid>=i.length))return new Ym(r,this.stage);console.error("pid >= picker.array.length")}};var Qm=new m,Jm=new g,tg=new g,eg=new g,rg=new g,ig=new v,ng=new g,og=new v,ag=function(t){this.stage=t,this.viewer=t.viewer,this.signals={changed:new no}},sg={position:{},rotation:{}};sg.position.get=function(){return this.viewer.translationGroup.position},sg.rotation.get=function(){return this.viewer.rotationGroup.quaternion},ag.prototype.changed=function(){this.viewer.requestRender(),this.signals.changed.dispatch()},ag.prototype.getPositionOnCanvas=function(t,e){var r=Bn(e),i=this.viewer;return eg.copy(t).add(i.translationGroup.position).applyMatrix4(i.rotationGroup.matrix).project(i.camera),r.set((eg.x+1)*i.width/2,(eg.y+1)*i.height/2)},ag.prototype.getOrientation=function(t){var e=Un(t);e.copy(this.viewer.rotationGroup.matrix);var r=-this.viewer.camera.position.z;return e.scale(rg.set(r,r,r)),e.setPosition(this.viewer.translationGroup.position),e},ag.prototype.orient=function(t){Un(t).decompose(Jm,Qm,tg);var e=this.viewer;e.rotationGroup.setRotationFromQuaternion(Qm),e.translationGroup.position.copy(Jm),e.camera.position.z=-tg.z,e.updateZoom(),this.changed()},ag.prototype.translate=function(t){this.viewer.translationGroup.position.add(zn(t)),this.changed()},ag.prototype.center=function(t){this.viewer.translationGroup.position.copy(zn(t)).negate(),this.changed()},ag.prototype.zoom=function(t){this.distance(this.viewer.camera.position.z*(1-t))},ag.prototype.distance=function(t){this.viewer.camera.position.z=t,this.viewer.updateZoom(),this.changed()},ag.prototype.spin=function(t,e){ig.getInverse(this.viewer.rotationGroup.matrix),ng.copy(zn(t)).applyMatrix4(ig),this.viewer.rotationGroup.rotateOnAxis(ng,e),this.changed()},ag.prototype.rotate=function(t){this.viewer.rotationGroup.setRotationFromQuaternion(jn(t)),this.changed()},ag.prototype.align=function(t){og.getInverse(Un(t)),this.viewer.rotationGroup.setRotationFromMatrix(og),this.changed()},ag.prototype.applyMatrix=function(t){this.viewer.rotationGroup.applyMatrix(Un(t)),this.changed()},Object.defineProperties(ag.prototype,sg);var cg=function(t,e){for(var r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];this.duration=gn(t,1e3),this.controls=e,this.startTime=window.performance.now(),this.pausedTime=-1,this.elapsedDuration=0,this.pausedDuration=0,this.ignoreGlobalToggle=!1,this._paused=!1,this._resolveList=[],(n=this)._init.apply(n,r);var n},ug={done:{},paused:{}};ug.done.get=function(){return 1===this.alpha},ug.paused.get=function(){return this._paused},cg.prototype._init=function(){},cg.prototype._tick=function(){},cg.prototype.tick=function(t){if(!this._paused)return this.elapsedDuration=t.currentTime-this.startTime-this.pausedDuration,0===this.duration?this.alpha=1:this.alpha=to(0,1,this.elapsedDuration/this.duration),this._tick(t),this.done&&this._resolveList.forEach(function(t){return t()}),this.done},cg.prototype.pause=function(t){t&&(this._hold=!0),-1===this.pausedTime&&(this.pausedTime=window.performance.now()),this._paused=!0},cg.prototype.resume=function(t){!t&&this._hold||(this.pausedDuration+=window.performance.now()-this.pausedTime,this._paused=!1,this._hold=!1,this.pausedTime=-1)},cg.prototype.toggle=function(){this._paused?this.resume():this.pause()},cg.prototype.then=function(t){var e=this;return(this.done?Promise.resolve():new Promise(function(t){return e._resolveList.push(t)})).then(t)},Object.defineProperties(cg.prototype,ug);var hg=function(t){function e(e){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];t.apply(this,[gn(e,1/0)].concat(r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){Array.isArray(t)?this.axis=(new g).fromArray(t):this.axis=gn(t,new g(0,1,0)),this.angle=gn(e,.01)},e.prototype._tick=function(t){this.axis&&this.angle&&this.controls.spin(this.axis,this.angle*t.lastDuration/16)},e}(cg),lg=function(t){function e(e){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];t.apply(this,[gn(e,1/0)].concat(r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e,r){Array.isArray(t)?this.axis=(new g).fromArray(t):this.axis=gn(t,new g(0,1,0)),this.angleStep=gn(e,.01),this.angleEnd=gn(r,.2),this.angleSum=0,this.direction=1},e.prototype._tick=function(t){if(this.axis&&this.angleStep&&this.angleEnd){var e=to(0,1,Math.abs(this.angleSum)/this.angleEnd),r=this.angleStep*this.direction*(1.1-e);this.controls.spin(this.axis,r*t.lastDuration/16),this.angleSum+=this.angleStep,this.angleSum>=this.angleEnd&&(this.direction*=-1,this.angleSum=-this.angleEnd)}},e}(cg),pg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.moveFrom=zn(gn(t,new g)),this.moveTo=zn(gn(e,new g))},e.prototype._tick=function(){this.controls.position.lerpVectors(this.moveFrom,this.moveTo,this.alpha).negate(),this.controls.changed()},e}(cg),dg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.zoomFrom=t,this.zoomTo=e},e.prototype._tick=function(){this.controls.distance(Qn(this.zoomFrom,this.zoomTo,this.alpha))},e}(cg),fg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.rotateFrom=jn(t),this.rotateTo=jn(e),this._currentRotation=new m},e.prototype._tick=function(){this._currentRotation.copy(this.rotateFrom).slerp(this.rotateTo,this.alpha),this.controls.rotate(this._currentRotation)},e}(cg),mg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e,r){this.valueFrom=t,this.valueTo=e,this.callback=r},e.prototype._tick=function(){this.callback(Qn(this.valueFrom,this.valueTo,this.alpha))},e}(cg),gg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t){this.callback=t},e.prototype._tick=function(){1===this.alpha&&this.callback()},e}(cg),vg=function(t){this._list=t||[],this._resolveList=[]},yg={done:{}};yg.done.get=function(){return this._list.every(function(t){return t.done})},vg.prototype.then=function(t){var e=this;return(this.done?Promise.resolve():new Promise(function(t){e._resolveList.push(t),e._list.forEach(function(t){t.then(function(){e._resolveList.forEach(function(t){t()}),e._resolveList.length=0})})})).then(t)},Object.defineProperties(vg.prototype,yg);var bg=function(t){this.stage=t,this.viewer=t.viewer,this.controls=t.viewerControls,this.animationList=[],this.finishedList=[]},xg={paused:{}};xg.paused.get=function(){return this.animationList.every(function(t){return t.paused})},bg.prototype.add=function(t){return 0===t.duration?t.tick(this.viewer.stats):this.animationList.push(t),t},bg.prototype.remove=function(t){var e=this.animationList,r=e.indexOf(t);r>-1&&e.splice(r,1)},bg.prototype.run=function(t){for(var e=this,r=this.finishedList,i=this.animationList,n=i.length,o=0;o0;)r[i]=arguments[i+1];if(!this.disabled){var n=this.mouse.key||0,o=this.mouse.buttons||0;this.actionList.forEach(function(i){i.type===t&&i.key===n&&i.button===o&&i.callback.apply(i,[e.stage].concat(r))})}},Sg.prototype.add=function(t,e){var r=oa(t),i=r[0],n=r[1],o=r[2];this.actionList.push({type:i,key:n,button:o,callback:e})},Sg.prototype.remove=function(t,e){var r=t.includes("*"),i=oa(t),n=i[0],o=i[1],a=i[2],s=this.actionList.filter(function(t){return!((t.type===n||r&&""===n)&&(t.key===o||r&&0===o)&&(t.button===a||r&&0===a)&&(t.callback===e||void 0===e))});this.actionList=s},Sg.prototype.preset=function(t){var e=this;this.clear(),(wg[t]||[]).forEach(function(t){return(r=e).add.apply(r,t);var r})},Sg.prototype.clear=function(){this.actionList.length=0};var Ag=function(){};Ag.autoView=function(t){t.autoView(1e3)},Ag.toggleAnimations=function(t){t.animationControls.toggle()},Ag.toggleRock=function(t){t.toggleRock()};var Mg={default:[["i",Ag.toggleSpin=function(t){t.toggleSpin()}],["k",Ag.toggleRock],["p",Ag.toggleAnimations],["r",Ag.autoView]]},Eg=function(t,e){var r=e||{};this.stage=t,this.actionList=[],this.disabled=r.disabled||!1,this.preset(r.preset||"default")};Eg.prototype.run=function(t){var e=this;this.disabled||this.actionList.forEach(function(r){r.keyCode===t&&r.callback(e.stage)})},Eg.prototype.add=function(t,e){var r=t.charCodeAt(0);this.actionList.push({keyCode:r,callback:e})},Eg.prototype.remove=function(t,e){var r=t.charCodeAt(0),i=this.actionList.filter(function(t){return!(t.keyCode===r&&(t.callback===e||void 0===e))});this.actionList=i},Eg.prototype.preset=function(t){var e=this;this.clear(),(Mg[t]||[]).forEach(function(t){return(r=e).add.apply(r,t);var r})},Eg.prototype.clear=function(){this.actionList.length=0};var Tg=function(t){this.stage=t,this.mouse=t.mouseObserver,this.controls=t.mouseControls,this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this)};Tg.prototype._onClick=function(t,e){var r=this.stage.pickingControls.pick(t,e);this.stage.signals.clicked.dispatch(r),this.controls.run("clickPick",r)},Tg.prototype._onHover=function(t,e){var r=this.stage.pickingControls.pick(t,e);r&&this.mouse.down.equals(this.mouse.position)&&(this.stage.transformComponent=r.component,this.stage.transformAtom=r.atom),this.stage.signals.hovered.dispatch(r),this.controls.run("hoverPick",r)},Tg.prototype.dispose=function(){this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var Pg=function(t){this.stage=t,this.mouse=t.mouseObserver,this.controls=t.mouseControls,this.mouse.signals.moved.add(this._onMove,this),this.mouse.signals.scrolled.add(this._onScroll,this),this.mouse.signals.dragged.add(this._onDrag,this),this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this),this.mouse.signals.doubleClicked.add(this._onDblclick,this)};Pg.prototype._onMove=function(){this.stage.tooltip.style.display="none"},Pg.prototype._onScroll=function(t){this.controls.run("scroll",t)},Pg.prototype._onDrag=function(t,e){this.controls.run("drag",t,e)},Pg.prototype._onClick=function(t,e){this.controls.run("click",t,e)},Pg.prototype._onDblclick=function(t,e){this.controls.run("doubleClick",t,e)},Pg.prototype._onHover=function(t,e){this.controls.run("hover",t,e)},Pg.prototype.dispose=function(){this.mouse.signals.moved.remove(this._onMove,this),this.mouse.signals.scrolled.remove(this._onScroll,this),this.mouse.signals.dragged.remove(this._onDrag,this),this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var Cg=function(t){this.viewer=t.viewer,this.animationControls=t.animationControls,this.viewer.signals.ticked.add(this._onTick,this)};Cg.prototype._onTick=function(t){this.animationControls.run(t)},Cg.prototype.dispose=function(){this.viewer.signals.ticked.remove(this._onTick,this)};var Ig=function(t){this.stage=t,this.controls=t.keyControls,this.domElement=t.viewer.renderer.domElement,this.domElement.setAttribute("tabIndex","-1"),this.domElement.style.outline="none",this.domElement.autofocus=!0,this.domElement.focus(),this._focusDomElement=this._focusDomElement.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this),this._onKeypress=this._onKeypress.bind(this),this.domElement.addEventListener("mousedown",this._focusDomElement),this.domElement.addEventListener("touchstart",this._focusDomElement),this.domElement.addEventListener("keydown",this._onKeydown),this.domElement.addEventListener("keyup",this._onKeyup),this.domElement.addEventListener("keypress",this._onKeypress)};Ig.prototype._onKeydown=function(){},Ig.prototype._onKeyup=function(){},Ig.prototype._onKeypress=function(t){this.controls.run(t.keyCode)},Ig.prototype._focusDomElement=function(){this.domElement.focus()},Ig.prototype.dispose=function(){this.domElement.removeEventListener("mousedown",this._focusDomElement),this.domElement.removeEventListener("touchstart",this._focusDomElement),this.domElement.removeEventListener("keydown",this._onKeypress),this.domElement.removeEventListener("keyup",this._onKeypress),this.domElement.removeEventListener("keypress",this._onKeypress)};var Rg=function(t,e,r,i){var n=i||{};this.offsetX=gn(n.offsetX,0),this.offsetY=gn(n.offsetY,0),this.visible=gn(n.visible,!0),this.component=t,this.stage=t.stage,this.viewer=this.stage.viewer,this.position=e,this._viewerPosition=new g,this._updateViewerPosition(),this._canvasPosition=new g,this._cameraPosition=new g,this.element=document.createElement("div"),Object.assign(this.element.style,{display:"block",position:"fixed",zIndex:1+(parseInt(this.viewer.container.style.zIndex)||0),pointerEvents:"none",backgroundColor:"rgba( 0, 0, 0, 0.6 )",color:"lightgrey",padding:"8px",fontFamily:"sans-serif",left:"-10000px"}),this.viewer.container.appendChild(this.element),this.setContent(r),this.updateVisibility(),this.viewer.signals.ticked.add(this._update,this),this.component.signals.matrixChanged.add(this._updateViewerPosition,this)};Rg.prototype.setContent=function(t){var e=this.element.style.display;"none"===e&&(this.element.style.left="-10000px",this.element.style.display="block"),t instanceof window.Element?(this.element.innerHTML="",this.element.appendChild(t)):this.element.innerHTML=t,this._clientRect=this.element.getBoundingClientRect(),"none"===e&&(this.element.style.display=e)},Rg.prototype.setVisibility=function(t){this.visible=t,this.updateVisibility()},Rg.prototype.getVisibility=function(){return this.visible&&this.component.visible},Rg.prototype.updateVisibility=function(){this.element.style.display=this.getVisibility()?"block":"none"},Rg.prototype._updateViewerPosition=function(){this._viewerPosition.copy(this.position).applyMatrix4(this.component.matrix)},Rg.prototype._update=function(){if(this.getVisibility()){var t=this.element.style,e=this._canvasPosition,r=this._viewerPosition,i=this._clientRect;if(this._cameraPosition.copy(r).add(this.viewer.translationGroup.position).applyMatrix4(this.viewer.rotationGroup.matrix).sub(this.viewer.camera.position),this._cameraPosition.z<0)return void(t.display="none");t.display="block",t.opacity=1-to(this.viewer.scene.fog.near,this.viewer.scene.fog.far,this._cameraPosition.length()),this.stage.viewerControls.getPositionOnCanvas(r,e),t.bottom=this.offsetX+e.y+i.height/2+"px",t.left=this.offsetY+e.x-i.width/2+"px"}},Rg.prototype.dispose=function(){this.viewer.container.removeChild(this.element),this.viewer.signals.ticked.remove(this._update,this),this.component.signals.matrixChanged.remove(this._updateViewerPosition,this)};var Lg=new v,Og=new g,Dg=new m,Ng=function(t){this.component=t,this.stage=t.stage,this.viewer=t.stage.viewer,this.signals={changed:new no}},kg={position:{},rotation:{}};kg.position.get=function(){return this.component.position},kg.rotation.get=function(){return this.component.quaternion},Ng.prototype.changed=function(){this.component.updateMatrix(),this.viewer.requestRender(),this.signals.changed.dispatch()},Ng.prototype.spin=function(t,e){Lg.getInverse(this.viewer.rotationGroup.matrix),Og.copy(zn(t)).applyMatrix4(Lg),Lg.extractRotation(this.component.transform),Lg.premultiply(this.viewer.rotationGroup.matrix),Lg.getInverse(Lg),Og.copy(zn(t)),Og.applyMatrix4(Lg),Lg.makeRotationAxis(Og,e),Dg.setFromRotationMatrix(Lg),this.component.quaternion.premultiply(Dg),this.changed()},Object.defineProperties(Ng.prototype,kg),va.__deps=[ya],ba.__deps=[ya,ga];var Fg=new g,Bg=function(){},zg={Picker:{},Buffer:{}};zg.Picker.get=function(){return Jf.get(this.type)},zg.Buffer.get=function(){return Qf.get(this.type)},Bg.getShapeKey=function(t){return this.type+t[0].toUpperCase()+t.substr(1)},Bg.valueToShape=function(t,e,r){var i=t[this.getShapeKey(e)];switch(this.fields[e]){case"v3":case"c":Ma(r,i);break;default:i.push(r)}},Bg.objectToShape=function(t,e){var r=this;Object.keys(this.fields).forEach(function(i){r.valueToShape(t,i,e[i])}),this.valueToShape(t,"name",e.name),this.expandBoundingBox(t.boundingBox,e)},Bg.valueFromShape=function(t,e,r){var i=t[this.getShapeKey(r)];switch(this.fields[r]){case"v3":return(new g).fromArray(i,3*e);case"c":return(new tt).fromArray(i,3*e);default:return i[e]}},Bg.objectFromShape=function(t,e){var r=this,i={shape:t,name:this.valueFromShape(t,e,"name")};return Object.keys(this.fields).forEach(function(n){i[n]=r.valueFromShape(t,e,n)}),i},Bg.arrayFromShape=function(t,e){var r=t[this.getShapeKey(e)];switch(this.fields[e]){case"s":return r;default:return new Float32Array(r)}},Bg.dataFromShape=function(t){var e=this,r={};return this.Picker&&(r.picking=new this.Picker(t)),Object.keys(this.fields).forEach(function(i){r[i]=e.arrayFromShape(t,i)}),r},Bg.bufferFromShape=function(t,e){return new this.Buffer(this.dataFromShape(t),e)},Object.defineProperties(Bg,zg);var Ug=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"sphere"},r.fields.get=function(){return{position:"v3",color:"c",radius:"f"}},e.positionFromShape=function(t,e){return this.valueFromShape(t,e,"position")},e.expandBoundingBox=function(t,e){t.expandByPoint(Fg.fromArray(e.position))},Object.defineProperties(e,r),e}(Bg),jg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"box"},r.fields.get=function(){return{position:"v3",color:"c",size:"f",heightAxis:"v3",depthAxis:"v3"}},Object.defineProperties(e,r),e}(Ug),Gg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"octahedron"},Object.defineProperties(e,r),e}(jg),Vg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"tetrahedron"},Object.defineProperties(e,r),e}(jg),$g=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"cylinder"},r.fields.get=function(){return{position1:"v3",position2:"v3",color:"c",radius:"f"}},e.positionFromShape=function(t,e){var r=this.valueFromShape(t,e,"position1"),i=this.valueFromShape(t,e,"position2");return r.add(i).multiplyScalar(.5)},e.expandBoundingBox=function(t,e){t.expandByPoint(Fg.fromArray(e.position1)),t.expandByPoint(Fg.fromArray(e.position2))},Object.defineProperties(e,r),e}(Bg),Hg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"arrow"},Object.defineProperties(e,r),e}($g),Wg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"cone"},Object.defineProperties(e,r),e}($g),Xg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"ellipsoid"},r.fields.get=function(){return{position:"v3",color:"c",radius:"f",majorAxis:"v3",minorAxis:"v3"}},Object.defineProperties(e,r),e}(Ug),qg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"torus"},Object.defineProperties(e,r),e}(Xg),Yg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return"text"},r.fields.get=function(){return{position:"v3",color:"c",size:"f",text:"s"}},Object.defineProperties(e,r),e}(Ug),Zg=function(t){this.array=t};Zg.prototype.getIndex=function(t){return this.array?this.array[t]:t},Zg.prototype.getObject=function(){return{}},Zg.prototype._applyTransformations=function(t,e,r){return e&&t.applyMatrix4(e.matrix),r&&t.applyMatrix4(r.matrix),t},Zg.prototype._getPosition=function(){return new g},Zg.prototype.getPosition=function(t,e,r){return this._applyTransformations(this._getPosition(t),e,r)};var Kg=function(t){function e(e){t.call(this),this.shape=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{},data:{},type:{}};return r.primitive.get=function(){},r.data.get=function(){return this.shape},r.type.get=function(){return this.primitive.type},e.prototype.getObject=function(t){return this.primitive.objectFromShape(this.shape,t)},e.prototype._getPosition=function(t){return this.primitive.positionFromShape(this.shape,t)},Object.defineProperties(e.prototype,r),e}(Zg),Qg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return $g},Object.defineProperties(e.prototype,r),e}(Kg),Jg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Hg},Object.defineProperties(e.prototype,r),e}(Kg),tv=function(t){function e(e,r){t.call(this,e),this.structure=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"atom"},r.data.get=function(){return this.structure},e.prototype.getObject=function(t){return this.structure.getAtomProxy(this.getIndex(t))},e.prototype._getPosition=function(t){return(new g).copy(this.getObject(t))},Object.defineProperties(e.prototype,r),e}(Zg),ev=function(t){function e(e){t.call(this),this.axes=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"axes"},r.data.get=function(){return this.axes},e.prototype.getObject=function(){return{axes:this.axes}},e.prototype._getPosition=function(){return this.axes.center.clone()},Object.defineProperties(e.prototype,r),e}(Zg),rv=function(t){function e(e,r,i){t.call(this,e),this.structure=r,this.bondStore=i||r.bondStore}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"bond"},r.data.get=function(){return this.structure},e.prototype.getObject=function(t){var e=this.structure.getBondProxy(this.getIndex(t));return e.bondStore=this.bondStore,e},e.prototype._getPosition=function(t){var e=this.getObject(t);return(new g).copy(e.atom1).add(e.atom2).multiplyScalar(.5)},Object.defineProperties(e.prototype,r),e}(Zg),iv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"contact"},Object.defineProperties(e.prototype,r),e}(rv),nv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Wg},Object.defineProperties(e.prototype,r),e}(Kg),ov=function(t){function e(e,r,i){t.call(this,e),this.validation=r,this.structure=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"clash"},r.data.get=function(){return this.validation},e.prototype.getObject=function(t){var e=this.validation,r=this.getIndex(t);return{validation:e,index:r,clash:e.clashArray[r]}},e.prototype._getAtomProxyFromSele=function(t){var e=new Cf(t),r=this.structure.getAtomIndices(e)[0];return this.structure.getAtomProxy(r)},e.prototype._getPosition=function(t){var e=this.getObject(t).clash,r=this._getAtomProxyFromSele(e.sele1),i=this._getAtomProxyFromSele(e.sele2);return(new g).copy(r).add(i).multiplyScalar(.5)},Object.defineProperties(e.prototype,r),e}(Zg),av=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"distance"},Object.defineProperties(e.prototype,r),e}(rv),sv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Xg},Object.defineProperties(e.prototype,r),e}(Kg),cv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Gg},Object.defineProperties(e.prototype,r),e}(Kg),uv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return jg},Object.defineProperties(e.prototype,r),e}(Kg),hv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"ignore"},Object.defineProperties(e.prototype,r),e}(Zg),lv=function(t){function e(e,r){t.call(this,e),this.mesh=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"mesh"},e.prototype.getObject=function(){var t=this.mesh;return{shape:this.shape,name:t.name,serial:t.serial}},e.prototype._getPosition=function(){return this.__position||(this.__position=aa(this.mesh.position)),this.__position},Object.defineProperties(e.prototype,r),e}(Kg),pv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Ug},Object.defineProperties(e.prototype,r),e}(Kg),dv=function(t){function e(e,r){t.call(this,e),this.surface=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"surface"},r.data.get=function(){return this.surface},e.prototype.getObject=function(t){return{surface:this.surface,index:this.getIndex(t)}},e.prototype._getPosition=function(){return this.surface.center.clone()},Object.defineProperties(e.prototype,r),e}(Zg),fv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Vg},Object.defineProperties(e.prototype,r),e}(Kg),mv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return qg},Object.defineProperties(e.prototype,r),e}(Kg),gv=function(t){function e(e,r){t.call(this),this.unitcell=e,this.structure=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"unitcell"},r.data.get=function(){return this.unitcell},e.prototype.getObject=function(){return{unitcell:this.unitcell,structure:this.structure}},e.prototype._getPosition=function(){return this.unitcell.getCenter(this.structure)},Object.defineProperties(e.prototype,r),e}(Zg),vv=(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};r.type.get=function(){return"unknown"},Object.defineProperties(e.prototype,r)}(Zg),function(t){function e(e,r){t.call(this,e),this.volume=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return"volume"},r.data.get=function(){return this.volume},e.prototype.getObject=function(t){var e=this.volume,r=this.getIndex(t);return{volume:e,index:r,value:e.data[r]}},e.prototype._getPosition=function(t){var e=this.volume.position,r=this.getIndex(t);return new g(e[3*r],e[3*r+1],e[3*r+2])},Object.defineProperties(e.prototype,r),e}(Zg)),yv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"slice"},Object.defineProperties(e.prototype,r),e}(vv);Jf.add("arrow",Jg),Jf.add("box",uv),Jf.add("cone",nv),Jf.add("cylinder",Qg),Jf.add("ellipsoid",sv),Jf.add("octahedron",cv),Jf.add("sphere",pv),Jf.add("tetrahedron",fv),Jf.add("torus",mv);var bv=function(t,e){this.length=t,this._words=new Uint32Array(t+32>>>5),!0===e&&this.setAll()};bv.prototype.get=function(t){return 0!=(this._words[t>>>5]&1<>>5]|=1<>>5]&=~(1<>>5]^=1<>>5,a=e>>>5,s=o;s>>5]|=1<>>5]|=1<>>5]|=1<>>5]&=~(1<>>5]&=~(1<>>5]&=~(1<>>5]|=1<>>5]&=~(1<>>r,this},bv.prototype._isRangeValue=function(t,e,r){for(var i=this._words,n=!0===r?4294967295:0,o=t>>>5,a=e>>>5,s=o;s>>5]&1<>>5]&1<>>5]&1<>>5]&1<>>5]&1<0?f>e&&(e=f):f>r&&(r=f),sa(s.copy(t),l,u);var m=c.subVectors(s,u).normalize().dot(l),g=s.distanceTo(u);m>0?g>i&&(i=g):g>n&&(n=g),sa(s.copy(t),p,u);var v=c.subVectors(s,u).normalize().dot(p),y=s.distanceTo(u);v>0?y>o&&(o=y):y>a&&(a=y)}),{d1a:e,d2a:i,d3a:o,d1b:-r,d2b:-n,d3b:-a}},Za.prototype.constructor=Za,Ka.prototype.constructor=Ka,es.__deps=[Qa,Ja,ts,On],rs.__deps=[is],is.__deps=[fa,da,ma,la],os.__deps=[$n,xa,_a,va,ya,wa,Sa,fa,Aa,ja,Va,Ha,$a,Wa];var ey=function(t,e,r){this.name=t||"",this.path=e||"",this.info={},this.center=new g,this.boundingBox=new st,r instanceof wt||r instanceof Ct||r instanceof Ne?this.fromGeometry(r):r&&(this.set(r.position,r.index,r.normal,r.color,r.atomindex,r.contour),this.boundingBox.setFromArray(r.position),this.boundingBox.getCenter(this.center))},ry={type:{}};ry.type.get=function(){return"Surface"},ey.prototype.set=function(t,e,r,i,n,o){this.position=t,this.index=e,this.normal=r,this.color=i,this.atomindex=n,this.size=t.length/3,this.contour=o},ey.prototype.fromGeometry=function(e){t.Debug&&jf.time("GeometrySurface.fromGeometry");var r;e instanceof wt?(e.computeVertexNormals(!0),r=(new Ct).fromGeometry(e)):r=e instanceof Ct?e:e[0],r.boundingBox||r.computeBoundingBox(),this.boundingBox.copy(r.boundingBox),this.boundingBox.getCenter(this.center);var i,n,o;if(r instanceof Ct){var a=r.attributes,s=!!a.normal&&a.normal.array;(!s||0===s[0]&&0===s[1]&&0===s[2])&&r.computeVertexNormals(),i=a.position.array,n=a.index?a.index.array:null,o=a.normal.array}this.set(i,n,o,void 0,void 0),t.Debug&&jf.timeEnd("GeometrySurface.setGeometry")},ey.prototype.getPosition=function(){return this.position},ey.prototype.getColor=function(t){var e=t||{};e.surface=this;var r=this.size,i=new Float32Array(3*r),n=Hf.getScheme(e);if(n.volumeColor||"random"===e.scheme)for(var o=0;o=t&&f<=e||r&&(fe)){var m=3*l;u[l]=f,h[m+0]=n[d+0],h[m+1]=n[d+1],h[m+2]=n[d+2],o&&(c[l]=o[p]),l+=1}}this.data=new Float32Array(this._dataBuffer,0,l),this.position=new Float32Array(this._positionBuffer,0,3*l),o&&(this.atomindex=new Float32Array(this._atomindexBuffer,0,l))}this._filterHash=a}},Object.defineProperties(oy.prototype,ay),oy.prototype.getValueForSigma=iy.prototype.getValueForSigma,oy.prototype.getSigmaForValue=iy.prototype.getSigmaForValue,oy.prototype.getDataAtomindex=iy.prototype.getDataAtomindex,oy.prototype.getDataPosition=iy.prototype.getDataPosition,oy.prototype.getDataColor=iy.prototype.getDataColor,oy.prototype.getDataPicking=iy.prototype.getDataPicking,oy.prototype.getDataSize=iy.prototype.getDataSize;var sy=function(e,r){t.Debug&&jf.time("BondHash init");for(var i=e.count,n=e.atomIndex1,o=e.atomIndex2,a=new Uint8Array(r),s=new Int32Array(r),c=0;ca?s.set(e[n].subarray(0,a)):s.set(e[n]),e[n]=s}},cy.prototype.growIfFull=function(){if(this.count>=this.length){var t=Math.round(1.5*this.length);this.resize(Math.max(256,t))}},cy.prototype.copyFrom=function(t,e,r,i){for(var n=this,o=0,a=this._fields.length;o0;)s-=1;a<=s&&(a===o?o=s:s===o&&(o=a),e(a,s),a+=1,s-=1)}while(a<=s);r(i,s),r(a,n)}}jf.time("Store.sort");var i=this,n=new this.constructor(1);r(0,this.count-1),jf.timeEnd("Store.sort")},cy.prototype.clear=function(){this.count=0},cy.prototype.dispose=function(){var t=this;delete this.length,delete this.count;for(var e=0,r=this._fields.length;e0&&(l[r]=M.angleTo(E)),t=Math.cos(x.angleTo(_)),f[r]=180/Math.PI*Math.acos(t),i=x.length(),n=_.length(),p[r]=Math.sqrt(n*i)/Math.max(2,2*(1-t)),d[r]=Math.abs(y.dot(M)),w.copy(x).multiplyScalar(p[r]/i),S.copy(_).multiplyScalar(p[r]/n),w.subVectors(R,w),S.subVectors(L,S),w.toArray(u,e+3),S.toArray(u,e+6),T.subVectors(I,P),T.toArray(m,e),E.copy(M),P.copy(w);for(w.fromArray(u,3),S.fromArray(u,6),M.subVectors(w,S).normalize(),I.index=o.getAtomIndexByType(0,C),P.copy(I),A.copy(I),sa(A,M,w),A.toArray(u,0),T.subVectors(P,w),T.toArray(m,0),w.fromArray(u,3*s-6),S.fromArray(u,3*s-9),M.subVectors(w,S).normalize(),I.index=o.getAtomIndexByType(s-1,C),P.copy(I),A.copy(I),sa(A,M,w),A.toArray(u,3*s-3),r=s-3;re?F=!0:h.bending[B]>t&&(F=!0)),F){if(B-v<4){v=B,F=!1;continue}D.index=L.traceAtomIndex,P=h.axis.subarray(3*v+3,3*B),C=h.center.subarray(3*v,3*B+3),p=aa(P).normalize(),d=aa(C),I.fromArray(C),sa(I,p,d),R.fromArray(C,C.length-3),sa(R,p,d),p.subVectors(R,I),p.toArray(b,y),d.toArray(x,y),I.toArray(_,y),R.toArray(w,y),f.atomColorToArray(D,S,y),A.push(D.index),M.push(m.atomRadius(D)),E.push(u+v),T.push(u+B+1-v),y+=3,v=B,F=!1}var z=new Float32Array(A);return{axis:new Float32Array(b),center:new Float32Array(x),begin:new Float32Array(_),end:new Float32Array(w),color:new Float32Array(S),picking:new tv(z,s),size:new Float32Array(M),residueOffset:E,residueCount:T}}},us.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},peek:function(){return this.content[0]},remove:function(t){for(var e=this,r=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=e.content[i];if(!(e.scoreFunction(r)":"3/4-Z","?":"X-Y","@":"Y-X",A:"Z+1/3",B:"Z+2/3",C:"X+2/3",D:"Y+1/3",E:"-Y+2/3",F:"X-Y+1/3",G:"Y-X+2/3",H:"-X+1/3",I:"X+1/3",J:"Y+2/3",K:"-Y+1/3",L:"X-Y+2/3",M:"Y-X+1/3",N:"-X+2/3",O:"2/3+X",P:"1/3+Y",Q:"1/3+Z",R:"2/3-Y",S:"1/3+X-Y",T:"2/3+Y-X",U:"1/3-X",V:"2/3-X",W:"1/3-Y",X:"1/3-Z",Y:"2/3+Y",Z:"1/3+Y-X","[":"2/3+X-Y","]":"1/3+X","^":"2/3+Z",_:"2/3-Z","`":"5/6+Z",a:"1/6+Z",b:"5/6-Z",c:"1/6-Z",d:"Z+5/6",e:"Z+1/6",f:"Z+1/4",g:"+Y"},my={"P 1":" !#","P -1":" !#$%&","P 1 2 1":" !#$!&","P 1 21 1":" !#$'&","C 1 2 1":" !#$!&()#*)&","P 1 m 1":" !# %#","P 1 c 1":" !# %+","C 1 m 1":" !# %#()#(,#","C 1 c 1":" !# %+()#(,+","P 1 2/m 1":" !# %#$!&$%&","P 1 21/m 1":" !#$)&$%& ,#","C 1 2/m 1":" !# %#$!&$%&()#(,#*)&*,&","P 1 2/c 1":" !#$!-$%& %+","P 1 21/c 1":" !#$%&$)- ,+","C 1 2/c 1":" !#$!-$%& %+()#*)-*,&(,+","P 2 2 2":" !#$%#$!& %&","P 2 2 21":" !#$%+$!- %&","P 21 21 2":" !#$%#*)&(,&","P 21 21 21":" !#*%+$)-(,&","C 2 2 21":" !#$%+$!- %&()#*,+*)-(,&","C 2 2 2":" !#$%#$!& %&()#*,#*)&(,&","F 2 2 2":" !#$%#$!& %& )+$,+$)- ,-(!+*%+*!-(%-()#*,#*)&(,&","I 2 2 2":" !#$%# %&$!&.'/01/.120'2","I 21 21 21":" !#*%+$)-(,&()+$,#*!& %-","P m m 2":" !#$%# %#$!#","P m c 21":" !#$%+ %+$!#","P c c 2":" !#$%# %+$!+","P m a 2":" !#$%#(%#*!#","P c a 21":" !#$%+(%#*!+","P n c 2":" !#$%# ,+$)+","P m n 21":" !#*%+(%+$!#","P b a 2":" !#$%#(,#*)#","P n a 21":" !#$%+(,#*)+","P n n 2":" !#$%#(,+*)+","C m m 2":" !#$%# %#$!#()#*,#(,#*)#","C m c 21":" !#$%+ %+$!#()#*,+(,+*)#","C c c 2":" !#$%# %+$!+()#*,#(,+*)+","A m m 2":" !#$%# %#$!# )+$,+ ,+$)+","A b m 2":" !#$%# ,#$)# )+$,+ %+$!+","A m a 2":" !#$%#(%#*!# )+$,+(,+*)+","A b a 2":" !#$%#(,#*)# )+$,+(%+*!+","F m m 2":" !#$%# %#$!# )+$,+ ,+$)+(!+*%+(%+*!+()#*,#(,#*)#","F d d 2":" !#$%#345675 )+$,+3896:9(!+*%+;49<79()#*,#;85<:5","I m m 2":" !#$%# %#$!#()+*,+(,+*)+","I b a 2":" !#$%#(,#*)#()+*,+ %+$!+","I m a 2":" !#$%#(%#*!#()+*,+ ,+$)+","P 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#","P 2/n 2/n 2/n":" !#$%#$!& %&*,-()-(,+*)+","P 2/c 2/c 2/m":" !#$%#$!- %-$%& !& %+$!+","P 2/b 2/a 2/n":" !#$%#$!& %&*,&()&(,#*)#","P 21/m 2/m 2/a":" !#*%#$!&(%&$%&(!& %#*!#","P 2/n 21/n 2/a":" !#*%#*)- ,-$%&(!&(,+$)+","P 2/m 2/n 21/a":" !#*%+*!- %&$%&(!-(%+$!#","P 21/c 2/c 2/a":" !#*%#$!-(%-$%&(!& %+*!+","P 21/b 21/a 2/m":" !#$%#*)&(,&$%& !&(,#*)#","P 21/c 21/c 2/n":" !#*,#$)-(%-$%&()& ,+*!+","P 2/b 21/c 21/m":" !#$%+$)- ,&$%& !- ,+$)#","P 21/n 21/n 2/m":" !#$%#*)-(,-$%& !&(,+*)+","P 21/m 21/m 2/n":" !#$%#*'&.,&*,&.'& %#$!#","P 21/b 2/c 21/n":" !#*,+$!-(,&$%&()- %+*)#","P 21/b 21/c 21/a":" !#*%+$)-(,&$%&(!- ,+*)#","P 21/n 21/m 21/a":" !#0%/$'&.12$%&.!2 1#0'/","C 2/m 2/c 21/m":" !#$%+$!- %&$%& !- %+$!#()#*,+*)-(,&*,&()-(,+*)#","C 2/m 2/c 21/a":" !#$,+$)- %&$%& )- ,+$!#()#*%+*!-(,&*,&(!-(%+*)#","C 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#()#*,#*)&(,&*,&()&(,#*)#","C 2/c 2/c 2/m":" !#$%#$!- %-$%& !& %+$!+()#*,#*)-(,-*,&()&(,+*)+","C 2/m 2/m 2/a":" !#$,#$)& %&$%& )& ,#$!#()#*%#*!&(,&*,&(!&(%#*)#","C 2/c 2/c 2/a":" !#*,#$!&(,&$,-(!- ,+*!+()#$%#*)& %&*%- )-(%+$)+","F 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!# )+$,+$)- ,-$,- )- ,+$)+(!+*%+*!-(%-*%-(!-(%+*!+()#*,#*)&(,&*,&()&(,#*)#","F 2/d 2/d 2/d":" !#$%#$!& %&64=37=345675 )+$,+$)- ,-68>3:>3896:9(!+*%+*!-(%-<4>;7>;49<79()#*,#*)&(,&<8=;:=;85<:5","I 2/m 2/m 2/m":" !#$%#$!& %&$%& !& %#$!#()+*,+*)-(,-*,-()-(,+*)+","I 2/b 2/a 2/m":" !#$%#*)&(,&$%& !&(,#*)#()+*,+$!- %-*,-()- %+$!+","I 21/b 21/c 21/a":" !#*%+$)-(,&$%&(!- ,+*)#()+$,#*!& %-*,- )&(%#$!+","I 21/m 21/m 21/a":" !#$,#$)& %&$%& )& ,#$!#()+*%+*!-(,-*,-(!-(%+*)+","P 4":" !#$%#% #!$#","P 41":" !#$%+% 5!$9","P 42":" !#$%#% +!$+","P 43":" !#$%+% 9!$5","I 4":" !#$%#% #!$#()+*,+,(+)*+","I 41":" !#*,+%(5)$9()+$%#, 9!*5","P -4":" !#$%#!$&% &","I -4":" !#$%#!$&% &()+*,+)*-,(-","P 4/m":" !#$%#% #!$#$%& !&!$&% &","P 42/m":" !#$%#% +!$+$%& !&!$-% -","P 4/n":" !#$%#,(#)*#*,&()&!$&% &","P 42/n":" !#$%#,(+)*+*,-()-!$&% &","I 4/m":" !#$%#% #!$#$%& !&!$&% &()+*,+,(+)*+*,-()-)*-,(-","I 41/a":" !#*,+%(5)$9$,=(!>!$&,(-()+$%#, 9!*5*%> )=)*-% &","P 4 2 2":" !#$%#% #!$#$!& %&! &%$&","P 4 21 2":" !#$%#,(#)*#*)&(,&! &%$&","P 41 2 2":" !#$%+% 5!$9$!& %-! >%$=","P 41 21 2":" !#$%+,(5)*9*)=(,>! &%$-","P 42 2 2":" !#$%#% +!$+$!& %&! -%$-","P 42 21 2":" !#$%#,(+)*+*)-(,-! &%$&","P 43 2 2":" !#$%+% 9!$5$!& %-! =%$>","P 43 21 2":" !#$%+,(9)*5*)>(,=! &%$-","I 4 2 2":" !#$%#% #!$#$!& %&! &%$&()+*,+,(+)*+*)-(,-)(-,*-","I 41 2 2":" !#*,+%(5)$9*!> ,=)(-%$&()+$%#, 9!*5$)=(%>! &,*-","P 4 m m":" !#$%#% #!$# %#$!#%$#! #","P 4 b m":" !#$%#% #!$#(,#*)#,*#)(#","P 42 c m":" !#$%#% +!$+ %+$!+%$#! #","P 42 n m":" !#$%#,(+)*+(,+*)+%$#! #","P 4 c c":" !#$%#% #!$# %+$!+%$+! +","P 4 n c":" !#$%#% #!$#(,+*)+,*+)(+","P 42 m c":" !#$%#% +!$+ %#$!#%$+! +","P 42 b c":" !#$%#% +!$+(,#*)#,*+)(+","I 4 m m":" !#$%#% #!$# %#$!#%$#! #()+*,+,(+)*+(,+*)+,*+)(+","I 4 c m":" !#$%#% #!$# %+$!+%$+! +()+*,+,(+)*+(,#*)#,*#)(#","I 41 m d":" !#*,+%(5)$9 %#*)+%*5) 9()+$%#, 9!*5(,+$!#,$9!(5","I 41 c d":" !#*,+%(5)$9 %+*)#%*9) 5()+$%#, 9!*5(,#$!+,$5!(9","P -4 2 m":" !#$%#% &!$&$!& %&%$#! #","P -4 2 c":" !#$%#% &!$&$!- %-%$+! +","P -4 21 m":" !#$%#% &!$&*)&(,&,*#)(#","P -4 21 c":" !#$%#% &!$&*)-(,-,*+)(+","P -4 m 2":" !#$%#!$&% & %#$!#! &%$&","P -4 c 2":" !#$%#% &!$& %+$!+! -%$-","P -4 b 2":" !#$%#% &!$&(,#*)#)(&,*&","P -4 n 2":" !#$%#% &!$&(,+*)+)(-,*-","I -4 m 2":" !#$%#% &!$& %#$!#! &%$&()+*,+,(-)*-(,+*)+)(-,*-","I -4 c 2":" !#$%#% &!$& %+$!+! -%$-()+*,+,(-)*-(,#*)#)(&,*&","I -4 2 m":" !#$%#% &!$&$!& %&%$#! #()+*,+,(-)*-*)-(,-,*+)(+","I -4 2 d":" !#$%#% &!$&*!>(%>,$9) 9()+*,+,(-)*-$)= ,=%*5!(5","P 4/m 2/m 2/m":" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #","P 4/m 2/c 2/c":" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +","P 4/n 2/b 2/m":" !#$%#% #!$#$!& %&! &%$&*,&()&)*&,(&(,#*)#,*#)(#","P 4/n 2/n 2/c":" !#$%#% #!$#$!& %&! &%$&*,-()-)*-,(-(,+*)+,*+)(+","P 4/m 21/b 2/m":" !#$%#% #!$#*)&(,&)(&,*&$%& !&!$&% &(,#*)#,*#)(#","P 4/m 21/n 2/c":" !#$%#% #!$#*)-(,-)(-,*-$%& !&!$&% &(,+*)+,*+)(+","P 4/n 21/m 2/m":" !#$%#,(#)*#*)&(,&! &%$&*,&()&!$&% & %#$!#,*#)(#","P 4/n 2/c 2/c":" !#$%#,(#)*#*)-(,-! -%$-*,&()&!$&% & %+$!+,*+)(+","P 42/m 2/m 2/c":" !#$%#% +!$+$!& %&! -%$-$%& !&!$-% - %#$!#%$+! +","P 42/m 2/c 2/m":" !#$%#% +!$+$!- %-! &%$&$%& !&!$-% - %+$!+%$#! #","P 42/n 2/b 2/c":" !#$%#,(+)*+$!- %-)(&,*&*,-()-!$&% &(,#*)#%$+! +","P 42/n 2/n 2/m":" !#$%#,(+)*+$!& %&)(-,*-*,-()-!$&% &(,+*)+%$#! #","P 42/m 21/b 2/c":" !#$%#% +!$+*)&(,&)(-,*-$%& !&!$-% -(,#*)#,*+)(+","P 42/m 21/n 2/m":" !#$%#,./'*/*'-.,-! &%$&$%& !&'*-,.-.,/*'/%$#! #","P 42/n 21/m 2/c":" !#$%#,(+)*+*)-(,-! &%$&*,-()-!$&% & %#$!#,*+)(+","P 42/n 21/c 2/m":" !#$%#,(+)*+*)&(,&! -%$-*,-()-!$&% & %+$!+,*#)(#","I 4/m 2/m 2/m":" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #()+*,+,(+)*+*)-(,-)(-,*-*,-()-)*-,(-(,+*)+,*+)(+","I 4/m 2/c 2/m":" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +()+*,+,(+)*+*)&(,&)(&,*&*,-()-)*-,(-(,#*)#,*#)(#","I 41/a 2/m 2/d":" !#*,+%(5)$9*!> ,=)(-%$&$,=(!>!$&,(-(,+$!#,$9!(5()+$%#, 9!*5$)=(%>! &,*-*%> )=)*-% & %#*)+%*5) 9","I 41/a 2/c 2/d":" !#*,+%(5)$9*!= ,>)(&%$-$,=(!>!$&,(-(,#$!+,$5!(9()+$%#, 9!*5$)>(%=! -,*&*%> )=)*-% & %+*)#%*9) 5","P 3":" !#%?#@$#","P 31":" !#%?A@$B","P 32":" !#%?B@$A","H 3":" !#%?#@$#CDAEFAGHAIJBKLBMNB","R 3":" !## !!# ","P -3":" !#%?#@$#$%&!@&? &","H -3":" !#%?#@$#$%&!@&? &OPQRSQTUQVWXYZX[]X]Y^W[^ZV^UR_PT_SO_","R -3":" !## !!# $%&&$%%&$","P 3 1 2":" !#%?#@$#%$&@!& ?&","P 3 2 1":" !#%?#@$#! &?%&$@&","P 31 1 2":" !#%?Q@$^%$_@!X ?&","P 31 2 1":" !#%?A@$B! &?%_$@X","P 32 1 2":" !#%?^@$Q%$X@!_ ?&","P 32 2 1":" !#%?B@$A! &?%X$@_","H 3 2":" !#%?#@$#! &?%&$@&OPQRSQTUQY]X[WXVZX]Y^W[^ZV^PO_SR_UT_","R 3 2":" !## !!# %$&$&%&%$","P 3 m 1":" !#%?#@$#%$#@!# ?#","P 3 1 m":" !#%?#@$#! #?%#$@#","P 3 c 1":" !#%?#@$#%$+@!+ ?+","P 3 1 c":" !#%?#@$#! +?%+$@+","H 3 m":" !#%?#@$#%$#@!# ?#OPQRSQTUQRUQTPQOSQ]Y^W[^ZV^WV^ZY^][^","R 3 m":" !## !!# ! # #!#! ","H 3 c":" !#%?#@$#%$+@!+ ?+OPQRSQTUQRU`TP`OS`]Y^W[^ZV^WVaZYa][a","R 3 c":" !## !!# '././'/'.","P -3 1 2/m":" !#%?#@$#%$&@!& ?&$%&!@&? &! #?%#$@#","P -3 1 2/c":" !#%?#@$#%$-@!- ?-$%&!@&? &! +?%+$@+","P -3 2/m 1":" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#","P -3 2/c 1":" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+","H -3 2/m":" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#OPQRSQTUQY]X[WXVZXVWXYZX[]XRUQTPQOSQ]Y^W[^ZV^PO_SR_UT_UR_PT_SO_WV^ZY^][^","R -3 2/m":" !## !!# %$&$&%&%$$%&&$%%&$! # #!#! ","H -3 2/c":" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+OPQRSQTUQY]b[WbVZbVWXYZX[]XRU`TP`OS`]Y^W[^ZV^POcSRcUTcUR_PT_SO_WVaZYa][a","R -3 2/c":" !## !!# 102021210$%&&$%%&$'././'/'.","P 6":" !#%?#@$#$%#!@#? #","P 61":" !#%?A@$B$%/!@d? e","P 65":" !#%?B@$A$%/!@e? d","P 62":" !#%?^@$Q$%#!@^? Q","P 64":" !#%?Q@$^$%#!@Q? ^","P 63":" !#%?#@$#$%+!@+? +","P -6":" !#%?#@$# !&%?&@$&","P 6/m":" !#%?#@$#$%#!@#? #$%&!@&? & !&%?&@$&","P 63/m":" !#%?#@$#$%+!@+? +$%&!@&? & !-%?-@$-","P 6 2 2":" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&","P 61 2 2":" !#%?Q@$^$%+!@`? a! X?%&$@_%$b@!- ?c","P 65 2 2":" !#%?^@$Q$%+!@a? `! _?%&$@X%$c@!- ?b","P 62 2 2":" !#%?^@$Q$%#!@^? Q! _?%&$@X%$_@!& ?X","P 64 2 2":" !#%?Q@$^$%#!@Q? ^! X?%&$@_%$X@!& ?_","P 63 2 2":" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-","P 6 m m":" !#%?#@$#$%#!@#? #%$#@!# ?#! #?%#$@#","P 6 c c":" !#%?#@$#$%#!@#? #%$+@!+ ?+! +?%+$@+","P 63 c m":" !#%?#@$#$%+!@+? +%$+@!+ ?+! #?%#$@#","P 63 m c":" !#%?#@$#$%+!@+? +%$#@!# ?#! +?%+$@+","P -6 m 2":" !#%?#@$# !&%?&@$&%$#@!# ?#%$&@!& ?&","P -6 c 2":" !#%?#@$# !-%?-@$-%$+@!+ ?+%$&@!& ?&","P -6 2 m":" !#%?#@$# !&%?&@$&! &?%&$@&! #?%#$@#","P -6 2 c":" !#%?#@$# !-%?-@$-! &?%&$@&! +?%+$@+","P 6/m 2/m 2/m":" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&$%&!@&? & !&@$&%?&%$#@!# ?#! #?%#$@#","P 6/m 2/c 2/c":" !#%?#@$#$%#!@#? #! -?%-$@-%$-@!- ?-$%&!@&? & !&@$&%?&%$+@!+ ?+! +?%+$@+","P 63/m 2/c 2/m":" !#%?#@$#$%+!@+? +! -?%-$@-%$&@!& ?&$%&!@&? & !-@$-%?-%$+@!+ ?+! #?%#$@#","P 63/m 2/m 2/c":" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-$%&!@&? & !-@$-%?-%$#@!# ?#! +?%+$@+","P 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ","F 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ","I 2 3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(","P 21 3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(","I 21 3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- ","P 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$","P 2/n -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& *,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*","F 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-($,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(*%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- *,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$","F 2/d -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& 64=37=345675=64=375345674=67=3453756 )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(68>3:>3896:9=<8=;:5;85<:4><7>;49;79<(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(<4>;7>;49<79>68>3:93896:8=<:=;85;:5<()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- <8=;:=;8f<:f><4>;79;49<78>6:>3893:96","I 2/m -3":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*","P 21/a -3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*","I 21/a -3":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*()+$,#*g& %-+()#$,&*!- %)+(,#$!&*%- *,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$","P 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$","P 42 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*","F 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(-%*-!*+%(+ +,$+)$-, -)#)*#,(&)(&,*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() -,$-)$+, +(#,*#)*&,(&)+!*+%(-!(-%*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(&,*&)*#,(#(+%*+!*-%(-!+)$+, -) -,$","F 41 3 2":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46 )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<(!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86","I 4 3 2":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*","P 43 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7;>46=:<5839398<5:6=4;>75:<983>7;=46","P 41 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<","I 41 3 2":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46","P -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% ","F -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(+%*+!*-%(- +)$+,$-) -,#)(#,*&)*&,((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() +,$+)$-, -(#)*#,*&)(&,+!(+%*-!*-%(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(#,*#)*&,(&(+!*+%*-!(-%+) +,$-)$-, ","I -4 3 m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(","P -4 3 n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(","F -4 3 c":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,( )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-() #,$#)$&, &(#!*#%*&!(&%+! +%$-!$-% (!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(!(#%*#!*&%(& +!$+%$-! -%#) #,$&)$&, ()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ! +%$+!$-% - #)$#,$&) &,#!(#%*&!*&%(","I -4 3 d":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7354<9:6>8;=357<946>:;=857394<>:6=8;()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- :;98657<=43>;9:658<=73>49:;586=7<>43","P 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ","P 4/n -3 2/n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","P 42/m -3 2/n":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","P 42/n -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ","F 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%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5;58<976=43>:97<58;>:3=4664=3:>;85<79=64>3:5;89<74=6:>385;79<,$+! #%(-)*&*&)(-% #!$+,-%(&)*+,$#! )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<68>37=;49<:5=<8>;753496:4><:=;893756,*#!(+% &)$-*-!(&, +)$#%-, &!$+%*#)((!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<<4>;:=389675>68=379;45<:8=<7>;453:96%$#) +,(&!*-$&! -,(#)*+%&% -)$#,*+!(()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86<8=;7>3456:9><4=;:9385678>67=349;:5<%*+)(#, -!$&$-) &%(+!*#,&,(-!*#%$+) ","F 41/d -3 2/c":" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46<8>;7=3496:5><8=;793456:8><7=;493:56%*#)(+, &!$-$-! &,(+)*#%&, -!$#%*+)( )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<<4=;:>385679>64=3:9;85<78=67>345;:9<%$+) #,(-!*&$&) -%(#!*+,&%(-)*#,$+! (!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<68=37>;45<:9=<4>;:5389674>6:=389;75<,*+!(#% -)$&*-)(&% +!$#,-,(&!*+%$#) ()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>8664>3:=;89<75=68>375;49<:4=<:>;853796,$#! +%(&)*-*&!(-, #)$+%-% &)$+,*#!(","I 4/m -3 2/m":" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(","I 41/a -3 2/d":" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<$%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*4<97358;=:6>6>:;=8357<94=8;>:694<573()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46*,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$865:;943>7<=<=73>4;9:658>43=7<5869:;","P 1 1 2":" !#$%#","P 1 1 21":" !#$%+","B 1 1 2":" !#$%#(g+*%+","A 1 2 1":" !#$!& )+$)-","C 1 21 1":" !#$)&()#*!&","I 1 2 1":" !#$!&.'/0'2","I 1 21 1":" !#$)&.'/0!-","P 1 1 m":" !# !&","P 1 1 b":" !# )&","B 1 1 m":" !# !&(!+(!-","B 1 1 b":" !# )&(!+()-","P 1 1 2/m":" !# !&$%#$%&","P 1 1 21/m":" !#$%+$%& !-","B 1 1 2/m":" !# !&$%#$%&(!+(!-*%+*%-","P 1 1 2/b":" !#$,#$%& )&","P 1 1 21/b":" !#$%&$,+ )-","B 1 1 2/b":" !#$,#$%& )&(!+*,+*%-()-","P 21 2 2":" !#$!&(%&*%#","P 2 21 2":" !# ,&$)&$%#","P 21 21 2 (a)":" !#*,#.%&$'&","P 21 2 21":" !#$!&(%-*%+","P 2 21 21":" !# %&$)-$,+","C 2 2 21a)":" !#*%+(,&$)-()#$,+ %&*!-","C 2 2 2a":" !#*,#.%&$'&()#$%# ,&*!&","F 2 2 2a":" !#*,#.%&$'& '/*%/.12$!2.!/$,/ %20'2.'#$%# 1&0!&","I 2 2 2a":" !#*,#.%&$'&()+$%+*!- ,-","P 21/m 21/m 2/n a":" !#*,#$)&(%&$%&.'& ,#*!#","P 42 21 2a":" !#*,#%.+'$+$'&.%&! -,*-","I 2 3a":" !#*,#.%&$'&!# ,- '&$%/$# !-*!/$%&.%()+$%+ ,-*!-)+(%&(!-*,#*+()&$)#*,- ,"},gy=function(t){this.name=t||"",this.partList=[]},vy={type:{}};vy.type.get=function(){return"Assembly"},gy.prototype.addPart=function(t,e){var r=new yy(t,e);return this.partList.push(r),r},gy.prototype._getCount=function(t,e){var r=0;return this.partList.forEach(function(i){r+=i[e](t)}),r},gy.prototype.getAtomCount=function(t){return this._getCount(t,"getAtomCount")},gy.prototype.getResidueCount=function(t){return this._getCount(t,"getResidueCount")},gy.prototype.getInstanceCount=function(){var t=0;return this.partList.forEach(function(e){t+=e.matrixList.length}),t},gy.prototype.isIdentity=function(t){if(1!==this.partList.length)return!1;var e=this.partList[0];if(1!==e.matrixList.length)return!1;if(!(new v).equals(e.matrixList[0]))return!1;var r=[];return t.eachChain(function(t){r.push(t.chainname)}),r=Cn(r),e.chainList.length===r.length},gy.prototype.getBoundingBox=function(t){var e=new st;return this.partList.forEach(function(r){var i=r.getBoundingBox(t);e.expandByPoint(i.min),e.expandByPoint(i.max)}),e},gy.prototype.getCenter=function(t){return this.getBoundingBox(t).getCenter()},gy.prototype.getSelection=function(){var t=[];return this.partList.forEach(function(e){t=t.concat(e.chainList)}),ds(t)},Object.defineProperties(gy.prototype,vy);var yy=function(t,e){this.matrixList=t||[],this.chainList=e||[]},by={type:{}};by.type.get=function(){return"AssemblyPart"},yy.prototype._getCount=function(t,e){var r=0,i=this.chainList;return t.eachChain(function(t){(0===i.length||i.includes(t.chainname))&&(r+=t[e])}),this.matrixList.length*r},yy.prototype.getAtomCount=function(t){return this._getCount(t,"atomCount")},yy.prototype.getResidueCount=function(t){return this._getCount(t,"residueCount")},yy.prototype.getBoundingBox=function(t){var e=new st,r=new st,i=this.getSelection(),n=t.getBoundingBox(i);return this.matrixList.forEach(function(t){r.copy(n).applyMatrix4(t),e.expandByPoint(r.min),e.expandByPoint(r.max)}),e},yy.prototype.getSelection=function(){return ds(this.chainList)},yy.prototype.getView=function(t){var e=this.getSelection();return e?t.getView(e):t},yy.prototype.getInstanceList=function(){for(var t=this,e=[],r=0,i=this.matrixList.length;r=t.residueCount)){a.index=o+h,s.index=o+h+l,c.index=a.traceAtomIndex,u.index=s.traceAtomIndex;var p=c.distanceTo(u);if(Math.abs(p-r[l-2])>i)return!1}return!0},r=function(t,r){return e(t,r,[5.45,5.18,6.37],2.1)},i=function(t,r){return e(t,r,[6.1,10.4,13],1.42)},n=function(t){for(var e=t.residueStore,n=t.residueIndexStart,o=0,a=t.residueCount;o1&&i.bending[a]<20&&(e.sstruc[r+a]="h".charCodeAt(0),e.sstruc[r+a+1]="h".charCodeAt(0))}};return function(e){t.Debug&&jf.time("calculateSecondaryStructure"),e.eachPolymer(function(t){if(!(t.residueCount<4)){if(t.isCg())o(t);else{if(!t.isProtein())return;n(t)}var e,r=0;t.eachResidue(function(t){t.sstruc===e?r+=1:(1===r&&(t.index-=1,t.sstruc="c"),r=1,e=t.sstruc)})}}),t.Debug&&jf.timeEnd("calculateSecondaryStructure")}}(),_y="ABCDEFGHIJKLMNOPQRSTUVWXYZ",wy=["H","C","O","N","S","P"],Sy=["NA","CL","FE"],Ay=function(t,e,r){this.structure=t,r=r||Ss(e),this.atomname=e,this.element=r,this.vdw=Nv[r],this.covalent=kv[r]},My=function(t){this.structure=t,this.dict={},this.list=[]};My.prototype.add=function(t,e){var r=Ms(t=t.toUpperCase(),e=e?e.toUpperCase():Ss(t)),i=this.dict[r];if(void 0===i){var n=new Ay(this.structure,t,e);i=this.list.length,this.dict[r]=i,this.list.push(n)}return i},My.prototype.get=function(t){return this.list[t]};var Ey=function(t,e,r,i,n,o){this.structure=t,this.resname=e,this.atomTypeIdList=r,this.hetero=i?1:0,this.chemCompType=n,this.bonds=o,this.rings=void 0,this.atomCount=r.length,this.moleculeType=this.getMoleculeType(),this.backboneType=this.getBackboneType(0),this.backboneEndType=this.getBackboneType(-1),this.backboneStartType=this.getBackboneType(1),this.backboneIndexList=this.getBackboneIndexList();var a=Yv[this.backboneType],s=Yv[this.backboneStartType],c=Yv[this.backboneEndType],u=this.getAtomIndexByName(a.trace);this.traceAtomIndex=void 0!==u?u:-1;var h=this.getAtomIndexByName(a.direction1);this.direction1AtomIndex=void 0!==h?h:-1;var l=this.getAtomIndexByName(a.direction2);this.direction2AtomIndex=void 0!==l?l:-1;var p=this.getAtomIndexByName(s.backboneStart);this.backboneStartAtomIndex=void 0!==p?p:-1;var d=this.getAtomIndexByName(c.backboneEnd);this.backboneEndAtomIndex=void 0!==d?d:-1;var f;f=Vv.includes(e)?this.getAtomIndexByName("N1"):this.getAtomIndexByName("N3"),this.rungEndAtomIndex=void 0!==f?f:-1,this.bondReferenceAtomIndices=[]};Ey.prototype.getBackboneIndexList=function(){var t,e=[];switch(this.moleculeType){case 3:t=Xv;break;case 4:case 5:t=qv;break;default:return e}for(var r=this.structure.atomMap,i=this.atomTypeIdList,n=0,o=this.atomCount;n=2?t(l,e[l],a):r[l]=2;else if(1===r[l]&&c&&c!==l){var p=[l];i[l]=1,n.push(p);for(var d=o.length-1;d>=0;--d){var f=o[d];if(f===l)break;p.push(f),i[f]=1}}}r[a]=2,o.pop()}for(var e=this.getBondGraph(),r=new Int8Array(this.atomCount),i=new Int8Array(this.atomCount),n=[],o=[],a=0;a1)for(var y=0;y1)for(var x=0;x0){var e=this.residueStore.atomOffset[this.residueIndex];return t.includes(this.index-e)}return!1},Iy.prototype.isPolymer=function(){if(this.structure.entityList.length>0)return this.entity.isPolymer();var t=this.residueType.moleculeType;return 3===t||4===t||5===t},Iy.prototype.isSidechain=function(){return this.isPolymer()&&!this.isBackbone()},Iy.prototype.isCg=function(){var t=this.residueType.backboneType;return 4===t||5===t||6===t},Iy.prototype.isHetero=function(){return 1===this.residueType.hetero},Iy.prototype.isProtein=function(){return 3===this.residueType.moleculeType},Iy.prototype.isNucleic=function(){var t=this.residueType.moleculeType;return 4===t||5===t},Iy.prototype.isRna=function(){return 4===this.residueType.moleculeType},Iy.prototype.isDna=function(){return 5===this.residueType.moleculeType},Iy.prototype.isWater=function(){return 1===this.residueType.moleculeType},Iy.prototype.isIon=function(){return 2===this.residueType.moleculeType},Iy.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},Iy.prototype.isHelix=function(){return Lv.includes(this.sstruc)},Iy.prototype.isSheet=function(){return Ov.includes(this.sstruc)},Iy.prototype.isTurn=function(){return Dv.includes(this.sstruc)&&this.isProtein()},Iy.prototype.isBonded=function(){return 0!==this.bondHash.countArray[this.index]},Iy.prototype.isRing=function(){return 1===this.residueType.getRings().flags[this.index-this.residueAtomOffset]},Iy.prototype.distanceTo=function(t){var e=this.atomStore,r=t.atomStore,i=this.index,n=t.index,o=e.x[i]-r.x[n],a=e.y[i]-r.y[n],s=e.z[i]-r.z[n],c=o*o+a*a+s*s;return Math.sqrt(c)},Iy.prototype.connectedTo=function(t){var e=this.atomStore,r=t.atomStore,i=this.index,n=t.index;if(e.altloc&&r.altloc){var o=e.altloc[i],a=r.altloc[n];if(0!==o&&0!==a&&32!==o&&32!==a&&o!==a)return!1}var s=e.x[i]-r.x[n],c=e.y[i]-r.y[n],u=e.z[i]-r.z[n],h=s*s+c*c+u*u;if(h<64&&this.isCg())return!0;if(isNaN(h))return!1;var l=this.covalent+t.covalent,p=l+.3,d=l-.5;return hd*d},Iy.prototype.positionFromArray=function(t,e){return void 0===e&&(e=0),this.x=t[e+0],this.y=t[e+1],this.z=t[e+2],this},Iy.prototype.positionToArray=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var r=this.index,i=this.atomStore;return t[e+0]=i.x[r],t[e+1]=i.y[r],t[e+2]=i.z[r],t},Iy.prototype.positionToVector3=function(t){return void 0===t&&(t=new g),t.x=this.x,t.y=this.y,t.z=this.z,t},Iy.prototype.positionFromVector3=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},Iy.prototype.positionAdd=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},Iy.prototype.positionSub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},Iy.prototype.getResidueBonds=function(t){var e,r,i,n,o=this.residueAtomOffset,a=this.index-this.residueAtomOffset,s=this.residueType.getBonds(),c=s.atomIndices1,u=s.atomIndices2;for(t||(n=[]),e=c.indexOf(a);-1!==e;){if(i=u[e]+o,t)return i;n.push(i),e=c.indexOf(a,e+1)}for(r=u.indexOf(a);-1!==r;){if(i=c[r]+o,t)return i;n.push(i),r=u.indexOf(a,r+1)}return n},Iy.prototype.qualifiedName=function(t){var e="";return this.resname&&!t&&(e+="["+this.resname+"]"),void 0!==this.resno&&(e+=this.resno),this.inscode&&(e+="^"+this.inscode),this.chainname&&(e+=":"+this.chainname),this.atomname&&(e+="."+this.atomname),this.altloc&&(e+="%"+this.altloc),this.structure.modelStore.count>1&&(e+="/"+this.modelIndex),e},Iy.prototype.clone=function(){return new this.constructor(this.structure,this.index)},Iy.prototype.toObject=function(){return{index:this.index,residueIndex:this.residueIndex,atomno:this.atomno,resname:this.resname,x:this.x,y:this.y,z:this.z,element:this.element,chainname:this.chainname,resno:this.resno,serial:this.serial,vdw:this.vdw,covalent:this.covalent,hetero:this.hetero,bfactor:this.bfactor,altloc:this.altloc,atomname:this.atomname,modelindex:this.modelindex}},Object.defineProperties(Iy.prototype,Ry);var Ly=function(t,e){this.structure=t,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.atomStore=t.atomStore,this.residueMap=t.residueMap,this.atomMap=t.atomMap,this.index=e},Oy={entity:{},entityIndex:{},chain:{},chainIndex:{},atomOffset:{},atomCount:{},atomEnd:{},modelIndex:{},chainname:{},chainid:{},resno:{},sstruc:{},inscode:{},residueType:{},resname:{},hetero:{},moleculeType:{},backboneType:{},backboneStartType:{},backboneEndType:{},traceAtomIndex:{},direction1AtomIndex:{},direction2AtomIndex:{},backboneStartAtomIndex:{},backboneEndAtomIndex:{},rungEndAtomIndex:{}};Oy.entity.get=function(){return this.structure.entityList[this.entityIndex]},Oy.entityIndex.get=function(){return this.chainStore.entityIndex[this.chainIndex]},Oy.chain.get=function(){return this.structure.getChainProxy(this.chainIndex)},Oy.chainIndex.get=function(){return this.residueStore.chainIndex[this.index]},Oy.chainIndex.set=function(t){this.residueStore.chainIndex[this.index]=t},Oy.atomOffset.get=function(){return this.residueStore.atomOffset[this.index]},Oy.atomOffset.set=function(t){this.residueStore.atomOffset[this.index]=t},Oy.atomCount.get=function(){return this.residueStore.atomCount[this.index]},Oy.atomCount.set=function(t){this.residueStore.atomCount[this.index]=t},Oy.atomEnd.get=function(){return this.atomOffset+this.atomCount-1},Oy.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},Oy.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},Oy.chainid.get=function(){return this.chainStore.getChainid(this.chainIndex)},Oy.resno.get=function(){return this.residueStore.resno[this.index]},Oy.resno.set=function(t){this.residueStore.resno[this.index]=t},Oy.sstruc.get=function(){return this.residueStore.getSstruc(this.index)},Oy.sstruc.set=function(t){this.residueStore.setSstruc(this.index,t)},Oy.inscode.get=function(){return this.residueStore.getInscode(this.index)},Oy.inscode.set=function(t){this.residueStore.getInscode(this.index,t)},Oy.residueType.get=function(){return this.residueMap.get(this.residueStore.residueTypeId[this.index])},Oy.resname.get=function(){return this.residueType.resname},Oy.hetero.get=function(){return this.residueType.hetero},Oy.moleculeType.get=function(){return this.residueType.moleculeType},Oy.backboneType.get=function(){return this.residueType.backboneType},Oy.backboneStartType.get=function(){return this.residueType.backboneStartType},Oy.backboneEndType.get=function(){return this.residueType.backboneEndType},Oy.traceAtomIndex.get=function(){return this.residueType.traceAtomIndex+this.atomOffset},Oy.direction1AtomIndex.get=function(){return this.residueType.direction1AtomIndex+this.atomOffset},Oy.direction2AtomIndex.get=function(){return this.residueType.direction2AtomIndex+this.atomOffset},Oy.backboneStartAtomIndex.get=function(){return this.residueType.backboneStartAtomIndex+this.atomOffset},Oy.backboneEndAtomIndex.get=function(){return this.residueType.backboneEndAtomIndex+this.atomOffset},Oy.rungEndAtomIndex.get=function(){return this.residueType.rungEndAtomIndex+this.atomOffset},Ly.prototype.eachAtom=function(t,e){var r,i=this.atomCount,n=this.atomOffset,o=this.structure._ap,a=n+i;if(e&&e.atomOnlyTest){var s=e.atomOnlyTest;for(r=n;r0)return this.entity.isPolymer();var t=this.residueType.moleculeType;return 3===t||4===t||5===t},Ly.prototype.isHetero=function(){return 1===this.residueType.hetero},Ly.prototype.isWater=function(){return 1===this.residueType.moleculeType},Ly.prototype.isIon=function(){return 2===this.residueType.moleculeType},Ly.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},Ly.prototype.isHelix=function(){return Lv.includes(this.sstruc)},Ly.prototype.isSheet=function(){return Ov.includes(this.sstruc)},Ly.prototype.isTurn=function(){return Dv.includes(this.sstruc)&&this.isProtein()},Ly.prototype.getAtomType=function(t){return this.atomMap.get(this.atomStore.atomTypeId[t])},Ly.prototype.getResname1=function(){return zv[this.resname.toUpperCase()]||"X"},Ly.prototype.getBackboneType=function(t){switch(t){case-1:return this.residueType.backboneStartType;case 1:return this.residueType.backboneEndType;default:return this.residueType.backboneType}},Ly.prototype.getAtomIndexByName=function(t){var e=this.residueType.getAtomIndexByName(t);return void 0!==e&&(e+=this.atomOffset),e},Ly.prototype.getAtomByName=function(t){return this.residueType.getAtomByName(t)},Ly.prototype.hasAtomWithName=function(t){return this.residueType.hasAtomWithName(t)},Ly.prototype.getAtomnameList=function(){var t=this;console.warn("getAtomnameList - might be expensive");for(var e=this.atomCount,r=this.atomOffset,i=new Array(e),n=0;n=t){var r=this.structure.getResidueProxy(e);if(r.connectedTo(this))return r}else if(e===t-1){var i=this.chainStore.residueCount[this.chainIndex],n=this.structure.getResidueProxy(t+i-1);if(n.connectedTo(this))return n}},Ly.prototype.getBonds=function(){return this.residueType.getBonds(this)},Ly.prototype.getRings=function(){return this.residueType.getRings()},Ly.prototype.qualifiedName=function(t){var e="";return this.resname&&!t&&(e+="["+this.resname+"]"),void 0!==this.resno&&(e+=this.resno),this.inscode&&(e+="^"+this.inscode),this.chain&&(e+=":"+this.chainname),e+="/"+this.modelIndex},Ly.prototype.clone=function(){return new this.constructor(this.structure,this.index)},Ly.prototype.toObject=function(){return{index:this.index,chainIndex:this.chainIndex,atomOffset:this.atomOffset,atomCount:this.atomCount,resno:this.resno,resname:this.resname,sstruc:this.sstruc}},Object.defineProperties(Ly.prototype,Oy);var Dy=function(t,e,r){this.structure=t,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.atomStore=t.atomStore,this.residueIndexStart=e,this.residueIndexEnd=r,this.residueCount=r-e+1;var i=this.structure.getResidueProxy(this.residueIndexStart),n=this.structure.getResidueProxy(this.residueIndexEnd);this.isPrevConnected=void 0!==i.getPreviousConnectedResidue();var o=n.getNextConnectedResidue();this.isNextConnected=void 0!==o,this.isNextNextConnected=this.isNextConnected&&void 0!==o.getNextConnectedResidue(),this.isCyclic=n.connectedTo(i),this.__residueProxy=this.structure.getResidueProxy()},Ny={chainIndex:{},modelIndex:{},chainname:{}};Ny.chainIndex.get=function(){return this.residueStore.chainIndex[this.residueIndexStart]},Ny.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},Ny.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},Dy.prototype.isProtein=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isProtein()},Dy.prototype.isCg=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isCg()},Dy.prototype.isNucleic=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isNucleic()},Dy.prototype.getMoleculeType=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.moleculeType},Dy.prototype.getBackboneType=function(t){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.getBackboneType(t)},Dy.prototype.getAtomIndexByType=function(t,e){this.isCyclic?-1===t?t=this.residueCount-1:t===this.residueCount&&(t=0):(-1!==t||this.isPrevConnected||(t+=1),t!==this.residueCount||this.isNextNextConnected||(t-=1));var r=this.__residueProxy;r.index=this.residueIndexStart+t;var i;switch(e){case"trace":i=r.traceAtomIndex;break;case"direction1":i=r.direction1AtomIndex;break;case"direction2":i=r.direction2AtomIndex;break;default:var n=r.getAtomByName(e);i=n?n.index:void 0}return i},Dy.prototype.eachAtom=function(t,e){this.eachResidue(function(r){r.eachAtom(t,e)},e)},Dy.prototype.eachAtomN=function(t,e,r){var i,n=this,o=this.residueCount,a=new Array(t);for(i=0;i=n&&r=t&&e.apply(this,s)}})}},Dy.prototype.eachResidue=function(t){for(var e=this.structure.getResidueProxy(),r=this.residueCount,i=this.residueIndexStart,n=0;n1&&t(new Dy(o,r,u.index)),r=i)):(m!==Mv&&u.index-r>1&&t(new Dy(o,r,u.index)),r=i)}i-r>1&&this.structure.getResidueProxy(r).backboneStartType&&t(new Dy(o,r,i))},ky.prototype.qualifiedName=function(){return":"+this.chainname+"/"+this.modelIndex},ky.prototype.clone=function(){return new this.constructor(this.structure,this.index)},ky.prototype.toObject=function(){return{index:this.index,residueOffset:this.residueOffset,residueCount:this.residueCount,chainname:this.chainname}},Object.defineProperties(ky.prototype,Fy);var By=function(t,e){this.structure=t,this.modelStore=t.modelStore,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.index=e},zy={chainOffset:{},chainCount:{},residueOffset:{},atomOffset:{},chainEnd:{},residueEnd:{},atomEnd:{},residueCount:{},atomCount:{}};zy.chainOffset.get=function(){return this.modelStore.chainOffset[this.index]},zy.chainOffset.set=function(t){this.modelStore.chainOffset[this.index]=t},zy.chainCount.get=function(){return this.modelStore.chainCount[this.index]},zy.chainCount.set=function(t){this.modelStore.chainCount[this.index]=t},zy.residueOffset.get=function(){return this.chainStore.residueOffset[this.chainOffset]},zy.atomOffset.get=function(){return this.residueStore.atomOffset[this.residueOffset]},zy.chainEnd.get=function(){return this.chainOffset+this.chainCount-1},zy.residueEnd.get=function(){return this.chainStore.residueOffset[this.chainEnd]+this.chainStore.residueCount[this.chainEnd]-1},zy.atomEnd.get=function(){return this.residueStore.atomOffset[this.residueEnd]+this.residueStore.atomCount[this.residueEnd]-1},zy.residueCount.get=function(){return 0===this.chainCount?0:this.residueEnd-this.residueOffset+1},zy.atomCount.get=function(){return 0===this.residueCount?0:this.atomEnd-this.atomOffset+1},By.prototype.eachAtom=function(t,e){this.eachChain(function(r){r.eachAtom(t,e)},e)},By.prototype.eachResidue=function(t,e){this.eachChain(function(r){r.eachResidue(t,e)},e)},By.prototype.eachPolymer=function(t,e){if(e&&e.chainOnlyTest){var r=e.chainOnlyTest;this.eachChain(function(i){r(i)&&i.eachPolymer(t,e)})}else this.eachChain(function(r){r.eachPolymer(t,e)})},By.prototype.eachChain=function(t,e){var r,i=this.chainCount,n=this.chainOffset,o=this.structure._cp,a=n+i;if(e&&e.test){var s=e.chainOnlyTest;if(s)for(r=n;r1?(C=r.atomRadius(w),I=C*v/(.5*P),x.calculateShiftDir(N),m?(R=2*y*C,N.multiplyScalar(R),N.negate(),D.subVectors(S,w).multiplyScalar(Math.max(.1,R/1.88)),w.positionToArray(n,E),S.positionToArray(o,E),P>=2&&(O.addVectors(w,N).add(D).toArray(n,E+3),O.addVectors(S,N).sub(D).toArray(o,E+3),P>=3&&(O.subVectors(w,N).add(D).toArray(n,E+6),O.subVectors(S,N).sub(D).toArray(o,E+6)))):(R=(y-v)*C,N.multiplyScalar(R),2===P?(O.addVectors(w,N).toArray(n,E),O.subVectors(w,N).toArray(n,E+3),O.addVectors(S,N).toArray(o,E),O.subVectors(S,N).toArray(o,E+3)):3===P?(w.positionToArray(n,E),O.addVectors(w,N).toArray(n,E+3),O.subVectors(w,N).toArray(n,E+6),S.positionToArray(o,E),O.addVectors(S,N).toArray(o,E+3),O.subVectors(S,N).toArray(o,E+6)):(w.positionToArray(n,E),S.positionToArray(o,E)))):(w.positionToArray(n,E),S.positionToArray(o,E))),a&&(i.bondColorToArray(x,1,a,E),i.bondColorToArray(x,0,s,E),f&&P>1))for(M=1;M1))for(M=1;M1))for(I=u[L]*v/(m?1:.5*P),M=m?1:0;M1))for(I=h[L]*v/(m?1:.5*P),M=m?1:0;Ma&&(a=e),r>s&&(s=r),u>c&&(c=u)},e),r.min.set(i,n,o),r.max.set(a,s,c),t.Debug&&jf.timeEnd("getBoundingBox"),r},Uy.prototype.getPrincipalAxes=function(e){t.Debug&&jf.time("getPrincipalAxes");var r=0,i=new Pa(3,this.atomCount),n=i.data;return this.eachAtom(function(t){n[r+0]=t.x,n[r+1]=t.y,n[r+2]=t.z,r+=3},e),t.Debug&&jf.timeEnd("getPrincipalAxes"),new ty(i)},Uy.prototype.atomCenter=function(t){return t?this.getBoundingBox(t).getCenter():this.center.clone()},Uy.prototype.hasCoords=function(){var t=this.atomStore;return 0!==Ho(t.x)||0!==$o(t.x)||0!==Ho(t.y)||0!==$o(t.y)||0!==Ho(t.z)||0!==$o(t.z)},Uy.prototype.getSequence=function(t){var e=[],r=this.getResidueProxy();return this.eachAtom(function(t){r.index=t.residueIndex,t.index===r.traceAtomIndex&&e.push(r.getResname1())},t),e},Uy.prototype.getAtomIndices=function(t){var e;if(t&&t.string)e=[],this.eachAtom(function(t){e.push(t.index)},t);else{var r={what:{index:!0}};e=this.getAtomData(r).index}return e},Uy.prototype.getChainnameCount=function(t){var e=new Set;return this.eachChain(function(t){t.residueCount&&e.add(t.chainname)},t),e.size},Uy.prototype.updatePosition=function(t){var e=0;this.eachAtom(function(r){r.positionFromArray(t,e),e+=3})},Uy.prototype.refreshPosition=function(){this.getBoundingBox(void 0,this.boundingBox),this.boundingBox.getCenter(this.center),this.spatialHash=new Ya(this.atomStore,this.boundingBox)},Uy.prototype.dispose=function(){this.frames&&(this.frames.length=0),this.boxes&&(this.boxes.length=0),this.bondStore.dispose(),this.backboneBondStore.dispose(),this.rungBondStore.dispose(),this.atomStore.dispose(),this.residueStore.dispose(),this.chainStore.dispose(),this.modelStore.dispose(),delete this.bondStore,delete this.atomStore,delete this.residueStore,delete this.chainStore,delete this.modelStore,delete this.frames,delete this.boxes,delete this.cif,delete this.bondSet,delete this.atomSet},Object.defineProperties(Uy.prototype,jy);var Gy=function(t,e){var r;"function"==typeof t.eachAtom?r=t.atomCount:t instanceof Float32Array&&(r=t.length/3);var i=new Pa(3,r),n=new Pa(3,r);this.coords1t=new Pa(r,3),this.coords2t=new Pa(r,3),this.A=new Pa(3,3),this.W=new Pa(1,3),this.U=new Pa(3,3),this.V=new Pa(3,3),this.VH=new Pa(3,3),this.R=new Pa(3,3),this.tmp=new Pa(3,3),this.c=new Pa(3,3),this.c.data.set([1,0,0,0,1,0,0,0,-1]),this.prepCoords(t,i),this.prepCoords(e,n),this._superpose(i,n)};Gy.prototype._superpose=function(e,r){this.mean1=Da(e),this.mean2=Da(r),Na(e,this.mean1),Na(r,this.mean2),Ca(this.coords1t,e),Ca(this.coords2t,r),Ia(this.A,this.coords2t,this.coords1t),Ua(this.A,this.W,this.U,this.V),Ra(this.V,this.VH),Oa(this.R,this.U,this.VH),La(this.R)<0&&(t.Debug&&jf.log("R not a right handed system"),Oa(this.tmp,this.c,this.VH),Oa(this.R,this.U,this.tmp))},Gy.prototype.prepCoords=function(t,e){var r=0,i=e.data;"function"==typeof t.eachAtom?t.eachAtom(function(t){i[r+0]=t.x,i[r+1]=t.y,i[r+2]=t.z,r+=3}):t instanceof Float32Array?i.set(t):jf.warn("prepCoords: input type unknown")},Gy.prototype.transform=function(t){var e;"function"==typeof t.eachAtom?e=t.atomCount:t instanceof Float32Array&&(e=t.length/3);var r=new Pa(3,e),i=new Pa(e,3);this.prepCoords(t,r),Na(r,this.mean1),Ia(i,this.R,r),Ca(r,i),ka(r,this.mean2);var n=0,o=r.data;"function"==typeof t.eachAtom?t.eachAtom(function(t){t.x=o[n+0],t.y=o[n+1],t.z=o[n+2],n+=3}):t instanceof Float32Array?t.set(o.subarray(0,3*e)):jf.warn("transform: input type unknown")};var Vy=function(t,e){this.signals={startedRunning:new no,haltedRunning:new no},t.signals.playerChanged.add(function(t){t!==this&&this.pause()},this);var r=Object.assign({},e),i=gn(t.frameCount,1);this.traj=t,this.start=gn(r.start,0),this.end=Math.min(gn(r.end,i-1),i-1),this.step=gn(r.step,Math.ceil((i+1)/100)),this.timeout=gn(r.timeout,50),this.interpolateType=gn(r.interpolateType,""),this.interpolateStep=gn(r.interpolateStep,5),this.mode=gn(r.mode,"loop"),this.direction=gn(r.direction,"forward"),this._run=!1,this._previousTime=0,this._currentTime=0,this._currentStep=1,this._currentFrame=this.start,this._direction="bounce"===this.direction?"forward":this.direction,t.signals.countChanged.add(function(t){this.end=Math.min(gn(this.end,t-1),t-1)},this),this._animate=this._animate.bind(this)},$y={isRunning:{}};$y.isRunning.get=function(){return this._run},Vy.prototype.setParameters=function(t){var e=Object.assign({},t);void 0!==e.start&&(this.start=e.start),void 0!==e.end&&(this.end=e.end),void 0!==e.step&&(this.step=e.step),void 0!==e.timeout&&(this.timeout=e.timeout),void 0!==e.interpolateType&&(this.interpolateType=e.interpolateType),void 0!==e.interpolateStep&&(this.interpolateStep=e.interpolateStep),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.direction&&(this.direction=e.direction,"bounce"!==this.direction&&(this._direction=this.direction))},Vy.prototype._animate=function(){if(this._run){this._currentTime=window.performance.now();var t=this._currentTime-this._previousTime,e=this.interpolateType?this.interpolateStep:1,r=this.timeout/e,i=this.traj;if(i&&i.frameCount&&!i.inProgress&&t>=r)if(this.interpolateType)if(this._currentStep>this.interpolateStep&&(this._currentStep=1),1===this._currentStep&&(this._currentFrame=this._nextInterpolated()),i.hasFrame(this._currentFrame)){this._currentStep+=1;var n=this._currentStep/(this.interpolateStep+1);i.setFrameInterpolated.apply(i,this._currentFrame.concat([n],[this.interpolateType])),this._previousTime=this._currentTime}else i.loadFrame(this._currentFrame);else{var o=this._next();i.hasFrame(o)?(i.setFrame(o),this._previousTime=this._currentTime):i.loadFrame(o)}window.requestAnimationFrame(this._animate)}},Vy.prototype._next=function(){var t;return((t="forward"===this._direction?this.traj.currentFrame+this.step:this.traj.currentFrame-this.step)>this.end||t=this.end?e=this.start:"backward"===this.direction&&t<=this.start&&(e=this.end),this.traj.setFrame(e),this._run=!0,this._animate(),this.signals.startedRunning.dispatch()}},Vy.prototype.pause=function(){this._run=!1,this.signals.haltedRunning.dispatch()},Vy.prototype.stop=function(){this.pause(),this.traj.setFrame(this.start)},Object.defineProperties(Vy.prototype,$y);var Hy=function(t,e,r){this.signals={countChanged:new no,frameChanged:new no,playerChanged:new no};var i=r||{};this.deltaTime=gn(i.deltaTime,0),this.timeOffset=gn(i.timeOffset,0),this.centerPbc=gn(i.centerPbc,!1),this.removePbc=gn(i.removePbc,!1),this.superpose=gn(i.superpose,!1),this.name=t.replace(/^.*[\\/]/,""),this.trajPath=t,this.initialCoords=null,this.structureCoords=null,this.selection=new Cf(gn(i.sele,"backbone and not hydrogen")),this.selection.signals.stringChanged.add(function(){this.selectionIndices=this.structure.getAtomIndices(this.selection),this._resetCache(),this._saveInitialCoords(),this.setFrame(this._currentFrame)},this),this._frameCount=0,this._currentFrame=-1},Wy={frameCount:{},currentFrame:{}};Wy.frameCount.get=function(){return this._frameCount},Wy.currentFrame.get=function(){return this._currentFrame},Hy.prototype._init=function(t){this.setStructure(t),this._loadFrameCount(),this.setPlayer(new Vy(this))},Hy.prototype.setStructure=function(t){this.structure=t,this.atomCount=t.atomCount,this.backboneIndices=this._getIndices(new Cf("backbone and not hydrogen")),this._makeAtomIndices(),this._saveStructureCoords(),this.selectionIndices=this._getIndices(this.selection),this._resetCache(),this._saveInitialCoords(),this.setFrame(this._currentFrame)},Hy.prototype._saveInitialCoords=function(){var t=this;this.structure.hasCoords()?(this.initialCoords=new Float32Array(this.structureCoords),this._makeSuperposeCoords()):this.frameCache[0]?(this.initialCoords=new Float32Array(this.frameCache[0]),this._makeSuperposeCoords()):this.loadFrame(0,function(){return t._saveInitialCoords()})},Hy.prototype._saveStructureCoords=function(){var t={what:{position:!0}};this.structureCoords=this.structure.getAtomData(t).position},Hy.prototype.setSelection=function(t){return this.selection.setString(t),this},Hy.prototype._getIndices=function(t){var e=0,r=t.test,i=[];return this.structure.eachAtom(function(t){r(t)&&i.push(e),e+=1}),i},Hy.prototype._makeSuperposeCoords=function(){var t=this,e=3*this.selectionIndices.length;this.coords1=new Float32Array(e),this.coords2=new Float32Array(e);for(var r=this.initialCoords,i=this.coords2,n=0;n0&&this.centerPbc){var n=[e[0],e[4],e[8]];Ts(r,Cs(this.backboneIndices,r,n),n)}this.removePbc&&Ps(r,e)}this.selectionIndices.length>0&&this.coords1&&this.superpose&&this._doSuperpose(r),this.frameCache[t]=r,this.boxCache[t]=e,this.frameCacheSize+=1},Hy.prototype._setFrameCount=function(t){t!==this._frameCount&&(this._frameCount=t,this.signals.countChanged.dispatch(t))},Hy.prototype.dispose=function(){this._resetCache(),this._disposed=!0,this.player&&this.player.stop()},Hy.prototype.setPlayer=function(t){this.player=t,this.signals.playerChanged.dispatch(t)},Hy.prototype.getPath=function(t,e){jf.error("Trajectory.getPath not implemented",t,e)},Hy.prototype.getFrameTime=function(t){return this.timeOffset+t*this.deltaTime},Object.defineProperties(Hy.prototype,Wy),Yf.add("shader/Mesh.vert","#define STANDARD\nuniform float nearClip;\nuniform vec3 clipCenter;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#elif defined( NOLIGHT )\nvarying vec3 vColor;\n#else\n#include color_pars_vertex\n#ifndef FLAT_SHADED\nvarying vec3 vNormal;\n#endif\n#endif\n#include common\nvoid main(){\n#if defined( PICKING )\nvPickingColor = unpackColor( primitiveId );\n#elif defined( NOLIGHT )\nvColor = color;\n#else\n#include color_vertex\n#include beginnormal_vertex\n#include defaultnormal_vertex\n#ifndef FLAT_SHADED\nvNormal = normalize( transformedNormal );\n#endif\n#endif\n#include begin_vertex\n#include project_vertex\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvViewPosition = -mvPosition.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}"),Yf.add("shader/Mesh.frag","#define STANDARD\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float nearClip;\nuniform float clipRadius;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\nuniform float objectId;\nvarying vec3 vPickingColor;\n#elif defined( NOLIGHT )\nvarying vec3 vColor;\n#else\n#ifndef FLAT_SHADED\nvarying vec3 vNormal;\n#endif\n#include common\n#include color_pars_fragment\n#include fog_pars_fragment\n#include bsdfs\n#include lights_pars\n#include lights_physical_pars_fragment\n#endif\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\n#if defined( PICKING )\nif( opacity < 0.7 )\ndiscard;\ngl_FragColor = vec4( vPickingColor, objectId );\n#elif defined( NOLIGHT )\ngl_FragColor = vec4( vColor, opacity );\n#else\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\n#include normal_flip\n#include normal_fragment\n#include dull_interior_fragment\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#include opaque_back_fragment\n#endif\n}");var Xy={f:1,v2:2,v3:3,c:3},qy=function(t,e){var r=t||{},i=e||{};this.opaqueBack=gn(i.opaqueBack,!1),this.dullInterior=gn(i.dullInterior,!1),this.side=gn(i.side,"double"),this.opacity=gn(i.opacity,1),this.depthWrite=gn(i.depthWrite,!0),this.clipNear=gn(i.clipNear,0),this.clipRadius=gn(i.clipRadius,0),this.clipCenter=gn(i.clipCenter,new g),this.flatShaded=gn(i.flatShaded,!1),this.background=gn(i.background,!1),this.linewidth=gn(i.linewidth,1),this.wireframe=gn(i.wireframe,!1),this.wireframeLinewidth=gn(i.wireframeLinewidth,1),this.roughness=gn(i.roughness,.4),this.metalness=gn(i.metalness,0),this.diffuse=gn(i.diffuse,16777215),this.forceTransparent=gn(i.forceTransparent,!1),this.disablePicking=gn(i.disablePicking,!1),this.geometry=new Ct,this.indexVersion=0,this.wireframeIndexVersion=-1,this.uniforms=up.merge([cp.common,{fogColor:{value:null},fogNear:{value:0},fogFar:{value:0},opacity:{value:this.opacity},nearClip:{value:0},clipRadius:{value:this.clipRadius},clipCenter:{value:this.clipCenter}},{emissive:{value:new tt(0)},roughness:{value:this.roughness},metalness:{value:this.metalness}},cp.ambient,cp.lights]),this.uniforms.diffuse.value.set(this.diffuse),this.pickingUniforms={nearClip:{value:0},objectId:{value:0},opacity:{value:this.opacity}},this.group=new Ne,this.wireframeGroup=new Ne,this.pickingGroup=new Ne,this.matrix=gn(i.matrix,new v);var n=r.position||r.position1;this._positionDataSize=n?n.length/3:0,this.addAttributes({position:{type:"v3",value:r.position},color:{type:"c",value:r.color},primitiveId:{type:"f",value:r.primitiveId}}),r.index&&this.initIndex(r.index),this.picking=r.picking,this.makeWireframeGeometry()},Yy={parameters:{},matrix:{},transparent:{},size:{},attributeSize:{},pickable:{},dynamic:{},vertexShader:{},fragmentShader:{}};Yy.parameters.get=function(){return{opaqueBack:{updateShader:!0},dullInterior:{updateShader:!0},side:{updateShader:!0,property:!0},opacity:{uniform:!0},depthWrite:{property:!0},clipNear:{updateShader:!0,property:!0},clipRadius:{updateShader:!0,property:!0,uniform:!0},clipCenter:{uniform:!0},flatShaded:{updateShader:!0},background:{updateShader:!0},linewidth:{property:!0},wireframe:{updateVisibility:!0},roughness:{uniform:!0},metalness:{uniform:!0},diffuse:{uniform:!0},matrix:{}}},Yy.matrix.set=function(t){this.setMatrix(t)},Yy.matrix.get=function(){return this.group.matrix.clone()},Yy.transparent.get=function(){return this.opacity<1||this.forceTransparent},Yy.size.get=function(){return this._positionDataSize},Yy.attributeSize.get=function(){return this.size},Yy.pickable.get=function(){return!!this.picking&&!this.disablePicking},Yy.dynamic.get=function(){return!0},Yy.vertexShader.get=function(){},Yy.fragmentShader.get=function(){},qy.prototype.setMatrix=function(t){Os(this.group,t),Os(this.wireframeGroup,t),Os(this.pickingGroup,t)},qy.prototype.initIndex=function(t){this.geometry.setIndex(new St(t,1)),this.geometry.getIndex().setDynamic(this.dynamic)},qy.prototype.makeMaterial=function(){var t=Ls(this.side),e=new ot({uniforms:this.uniforms,vertexShader:"",fragmentShader:"",depthTest:!0,transparent:this.transparent,depthWrite:this.depthWrite,lights:!0,fog:!0,side:t,linewidth:this.linewidth});e.vertexColors=uh,e.extensions.derivatives=this.flatShaded,e.extensions.fragDepth=this.isImpostor,e.clipNear=this.clipNear;var r=new ot({uniforms:this.uniforms,vertexShader:"",fragmentShader:"",depthTest:!0,transparent:this.transparent,depthWrite:this.depthWrite,lights:!1,fog:!0,side:t,linewidth:this.linewidth});r.vertexColors=uh,r.clipNear=this.clipNear;var i=new ot({uniforms:this.pickingUniforms,vertexShader:"",fragmentShader:"",depthTest:!0,transparent:!1,depthWrite:this.depthWrite,lights:!1,fog:!1,side:t,linewidth:this.linewidth,blending:hh});i.vertexColors=uh,i.extensions.fragDepth=this.isImpostor,i.clipNear=this.clipNear,this.material=e,this.wireframeMaterial=r,this.pickingMaterial=i,this.updateShader()},qy.prototype.makeWireframeGeometry=function(){this.makeWireframeIndex();var t=this.geometry,e=this.wireframeIndex,r=new Ct;r.attributes=t.attributes,e&&(r.setIndex(new St(e,1).setDynamic(this.dynamic)),r.setDrawRange(0,this.wireframeIndexCount)),this.wireframeGeometry=r},qy.prototype.makeWireframeIndex=function(){function t(t,r){if(t>r){var i=t;t=r,r=i}var n=e[t];return void 0===n?(e[t]=[r],!0):!n.includes(r)&&(n.push(r),!0)}var e=[],r=this.geometry,i=r.index;if(this.wireframe)if(i){var n=i.array,o=n.length;r.drawRange.count!==1/0&&(o=r.drawRange.count);var a;a=this.wireframeIndex&&this.wireframeIndex.length>2*o?this.wireframeIndex:On(2*o,r.attributes.position.count);var s=0;e.length=0;for(var c=0;c2*d?this.wireframeIndex:On(2*d,d);for(var f=0,m=0;fthis.wireframeGeometry.index.array.length)this.wireframeGeometry.setIndex(new St(this.wireframeIndex,1).setDynamic(this.dynamic));else{var t=this.wireframeGeometry.getIndex();t.set(this.wireframeIndex),t.needsUpdate=this.wireframeIndexCount>0,t.updateRange.count=this.wireframeIndexCount}this.wireframeGeometry.setDrawRange(0,this.wireframeIndexCount)},qy.prototype.getRenderOrder=function(){var t=0;return this.isText?t=1:this.transparent&&(t=this.isSurface?3:2),t},qy.prototype._getMesh=function(t){this.material||this.makeMaterial();var e,r=this.geometry,i=this[t];return this.isLine?e=new Re(r,i):this.isPoint?(e=new De(r,i),this.sortParticles&&(e.sortParticles=!0)):e=new Bt(r,i),e.frustumCulled=!1,e.renderOrder=this.getRenderOrder(),e},qy.prototype.getMesh=function(){return this._getMesh("material")},qy.prototype.getWireframeMesh=function(){var t;return this.material||this.makeMaterial(),this.wireframeGeometry||this.makeWireframeGeometry(),t=new Re(this.wireframeGeometry,this.wireframeMaterial),t.frustumCulled=!1,t.renderOrder=this.getRenderOrder(),t},qy.prototype.getPickingMesh=function(){return this._getMesh("pickingMaterial")},qy.prototype.getShader=function(t,e){return Ro(t,this.getDefines(e))},qy.prototype.getVertexShader=function(t){return this.getShader(this.vertexShader,t)},qy.prototype.getFragmentShader=function(t){return this.getShader(this.fragmentShader,t)},qy.prototype.getDefines=function(t){var e={};return this.clipNear&&(e.NEAR_CLIP=1),this.clipRadius&&(e.RADIUS_CLIP=1),"picking"===t?e.PICKING=1:(("background"===t||this.background)&&(e.NOLIGHT=1),this.flatShaded&&(e.FLAT_SHADED=1),this.opaqueBack&&(e.OPAQUE_BACK=1),this.dullInterior&&(e.DULL_INTERIOR=1)),e},qy.prototype.getParameters=function(){var t=this,e={};for(var r in t.parameters)e[r]=t[r];return e},qy.prototype.addUniforms=function(t){this.uniforms=up.merge([this.uniforms,t]),this.pickingUniforms=up.merge([this.pickingUniforms,t])},qy.prototype.addAttributes=function(t){var e=this;for(var r in t){var i=void 0,n=t[r],o=e.attributeSize*Xy[n.type];n.value?(o!==n.value.length&&jf.error("attribute value has wrong length",r),i=n.value):i=Ln("float32",o),e.geometry.addAttribute(r,new St(i,Xy[n.type]).setDynamic(e.dynamic))}},qy.prototype.updateRenderOrder=function(){function t(t){t.renderOrder=e}var e=this.getRenderOrder();this.group.children.forEach(t),this.pickingGroup&&this.pickingGroup.children.forEach(t)},qy.prototype.updateShader=function(){var t=this.material,e=this.wireframeMaterial,r=this.pickingMaterial;t.vertexShader=this.getVertexShader(),t.fragmentShader=this.getFragmentShader(),t.needsUpdate=!0,e.vertexShader=this.getShader("Line.vert"),e.fragmentShader=this.getShader("Line.frag"),e.needsUpdate=!0,r.vertexShader=this.getVertexShader("picking"),r.fragmentShader=this.getFragmentShader("picking"),r.needsUpdate=!0},qy.prototype.setParameters=function(t){var e=this;if(t){var r=t,i=this.parameters,n={},o={},a=!1,s=!1;for(var c in r){var u=r[c];void 0!==u&&(void 0!==i[c]&&(e[c]=u,i[c].property&&(!0!==i[c].property?n[i[c].property]=u:n[c]=u),i[c].uniform&&(!0!==i[c].uniform?o[i[c].uniform]=u:o[c]=u),i[c].updateShader&&(a=!0),i[c].updateVisibility&&(s=!0),e.dynamic&&"wireframe"===c&&!0===u&&e.updateWireframeIndex(),"flatShaded"===c&&(e.material.extensions.derivatives=e.flatShaded),"forceTransparent"===c&&(n.transparent=e.transparent)))}this.setProperties(n),this.setUniforms(o),a&&this.updateShader(),s&&this.setVisibility(this.visible)}},qy.prototype.setAttributes=function(t){var e=this,r=this.geometry,i=r.attributes;for(var n in t)if("picking"!==n){var o=t[n],a=o.length;if("index"===n){var s=r.getIndex();r.setDrawRange(0,1/0),a>s.array.length?r.setIndex(new St(o,1).setDynamic(e.dynamic)):(s.set(o),s.needsUpdate=a>0,s.updateRange.count=a,r.setDrawRange(0,a)),e.indexVersion++,e.wireframe&&e.updateWireframeIndex()}else{var c=i[n];a>c.array.length?r.addAttribute(n,new St(o,c.itemSize).setDynamic(e.dynamic)):(i[n].set(o),i[n].needsUpdate=a>0,i[n].updateRange.count=a)}}},qy.prototype.setUniforms=function(t){var e=this;if(t){var r=this.material.uniforms,i=this.wireframeMaterial.uniforms,n=this.pickingMaterial.uniforms;for(var o in t)"opacity"===o&&e.setProperties({transparent:e.transparent}),void 0!==r[o]&&(r[o].value.isVector3?r[o].value.copy(t[o]):r[o].value.set?r[o].value.set(t[o]):r[o].value=t[o]),void 0!==i[o]&&(i[o].value.isVector3?i[o].value.copy(t[o]):i[o].value.set?i[o].value.set(t[o]):i[o].value=t[o]),void 0!==n[o]&&(n[o].value.isVector3?n[o].value.copy(t[o]):n[o].value.set?n[o].value.set(t[o]):n[o].value=t[o])}},qy.prototype.setProperties=function(t){var e=this;if(t){var r=this.material,i=this.wireframeMaterial,n=this.pickingMaterial;for(var o in t){var a=t[o];"transparent"===o?e.updateRenderOrder():"side"===o&&(a=Ls(a)),void 0!==r[o]&&(r[o]=a),void 0!==i[o]&&(i[o]=a),void 0!==n[o]&&(n[o]=a)}r.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},qy.prototype.setVisibility=function(t){this.visible=t,this.wireframe?(this.group.visible=!1,this.wireframeGroup.visible=t,this.pickable&&(this.pickingGroup.visible=!1)):(this.group.visible=t,this.wireframeGroup.visible=!1,this.pickable&&(this.pickingGroup.visible=t))},qy.prototype.dispose=function(){this.material&&this.material.dispose(),this.wireframeMaterial&&this.wireframeMaterial.dispose(),this.pickingMaterial&&this.pickingMaterial.dispose(),this.geometry.dispose(),this.wireframeGeometry&&this.wireframeGeometry.dispose()},Object.defineProperties(qy.prototype,Yy);var Zy=function(t){function e(e,r){var i=e||{};!i.primitiveId&&i.position&&(i.primitiveId=Bo(i.position.length/3)),t.call(this,i,r),this.addAttributes({normal:{type:"v3",value:i.normal}}),void 0===i.normal&&this.geometry.computeVertexNormals()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertexShader:{},fragmentShader:{}};return r.vertexShader.get=function(){return"Mesh.vert"},r.fragmentShader.get=function(){return"Mesh.frag"},Object.defineProperties(e.prototype,r),e}(qy),Ky=new st,Qy=[Hg,jg,Wg,$g,Xg,Gg,Ug,Vg,Yg,qg],Jy=function(t,e){var r=this;this.name=gn(t,"shape");var i=e||{};this.aspectRatio=gn(i.aspectRatio,1.5),this.sphereDetail=gn(i.sphereDetail,2),this.radialSegments=gn(i.radialSegments,50),this.disableImpostor=gn(i.disableImpostor,!1),this.openEnded=gn(i.openEnded,!1),this.labelParams=gn(i.labelParams,{}),this.boundingBox=new st,this.bufferList=[],this.meshCount=0,Qy.forEach(function(t){Object.keys(t.fields).forEach(function(e){r[t.getShapeKey(e)]=[]}),r[t.getShapeKey("name")]=[]})},tb={center:{},type:{}};Jy.prototype.addBuffer=function(t){this.bufferList.push(t);var e=t.geometry;return e.boundingBox||e.computeBoundingBox(),this.boundingBox.union(e.boundingBox),this},Jy.prototype.addMesh=function(t,e,r,i,n){t=Gn(t),e=Gn(e),Array.isArray(r)&&(r=On(r,t.length)),i&&(i=Gn(i));var o={position:t,color:e,index:r,normal:i},a=new lv(this,Object.assign({serial:this.meshCount,name:n},o)),s=new Zy(Object.assign({picking:a},o));return this.bufferList.push(s),Ky.setFromArray(t),this.boundingBox.union(Ky),this.meshCount+=1,this},Jy.prototype.addSphere=function(t,e,r,i){return Ug.objectToShape(this,{position:t,color:e,radius:r,name:i}),this},Jy.prototype.addEllipsoid=function(t,e,r,i,n,o){return Xg.objectToShape(this,{position:t,color:e,radius:r,majorAxis:i,minorAxis:n,name:o}),this},Jy.prototype.addTorus=function(t,e,r,i,n,o){return qg.objectToShape(this,{position:t,color:e,radius:r,majorAxis:i,minorAxis:n,name:o}),this},Jy.prototype.addCylinder=function(t,e,r,i,n){return $g.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addCone=function(t,e,r,i,n){return Wg.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addArrow=function(t,e,r,i,n){return Hg.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addBox=function(t,e,r,i,n,o){return jg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addOctahedron=function(t,e,r,i,n,o){return Gg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addTetrahedron=function(t,e,r,i,n,o){return Vg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addText=function(t,e,r,i){return Yg.objectToShape(this,{position:t,color:e,size:r,text:i}),this},Jy.prototype.addLabel=function(t,e,r,i){return console.warn("Shape.addLabel is deprecated, use .addText instead"),this.addText(t,e,r,i)},Jy.prototype.getBufferList=function(){var t=this,e=[],r={aspectRatio:this.aspectRatio,sphereDetail:this.sphereDetail,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,openEnded:this.openEnded,labelParams:this.labelParams};return Qy.forEach(function(i){t[i.getShapeKey("color")].length&&e.push(i.bufferFromShape(t,r))}),this.bufferList.concat(e)},Jy.prototype.dispose=function(){var t=this;this.bufferList.forEach(function(t){t.dispose()}),this.bufferList.length=0,Qy.forEach(function(e){Object.keys(e.fields).forEach(function(r){t[e.getShapeKey(r)].length=0}),t[e.getShapeKey("name")].length=0})},tb.center.get=function(){return this._center||(this._center=this.boundingBox.getCenter()),this._center},tb.type.get=function(){return"Shape"},Object.defineProperties(Jy.prototype,tb);var eb=function(t,e,r){this.type="",this.parameters={lazy:{type:"boolean"},clipNear:{type:"range",step:1,max:100,min:0,buffer:!0},clipRadius:{type:"number",precision:1,max:1e3,min:0,buffer:!0},clipCenter:{type:"vector3",precision:1,buffer:!0},flatShaded:{type:"boolean",buffer:!0},opacity:{type:"range",step:.01,max:1,min:0,buffer:!0},depthWrite:{type:"boolean",buffer:!0},side:{type:"select",buffer:!0,options:{front:"front",back:"back",double:"double"}},wireframe:{type:"boolean",buffer:!0},linewidth:{type:"integer",max:50,min:1,buffer:!0},colorScheme:{type:"select",update:"color",options:{}},colorScale:{type:"select",update:"color",options:Hf.getScales()},colorReverse:{type:"boolean",update:"color"},colorValue:{type:"color",update:"color"},colorDomain:{type:"hidden",update:"color"},colorMode:{type:"select",update:"color",options:Hf.getModes()},roughness:{type:"range",step:.01,max:1,min:0,buffer:!0},metalness:{type:"range",step:.01,max:1,min:0,buffer:!0},diffuse:{type:"color",buffer:!0},matrix:{type:"hidden",buffer:!0},disablePicking:{type:"boolean",rebuild:!0}},this.viewer=e,this.tasks=new bm,this.queue=new Ds(this.make.bind(this)),this.bufferList=[],this.parameters.colorScheme&&(this.parameters.colorScheme.options=Hf.getSchemes())};eb.prototype.init=function(t){var e=t||{};this.clipNear=gn(e.clipNear,0),this.clipRadius=gn(e.clipRadius,0),this.clipCenter=gn(e.clipCenter,new g),this.flatShaded=gn(e.flatShaded,!1),this.side=gn(e.side,"double"),this.opacity=gn(e.opacity,1),this.depthWrite=gn(e.depthWrite,!0),this.wireframe=gn(e.wireframe,!1),this.linewidth=gn(e.linewidth,2),this.setColor(e.color,e),this.colorScheme=gn(e.colorScheme,"uniform"),this.colorScale=gn(e.colorScale,""),this.colorReverse=gn(e.colorReverse,!1),this.colorValue=gn(e.colorValue,9474192),this.colorDomain=gn(e.colorDomain,void 0),this.colorMode=gn(e.colorMode,"hcl"),this.visible=gn(e.visible,!0),this.quality=gn(e.quality,void 0),this.roughness=gn(e.roughness,.4),this.metalness=gn(e.metalness,0),this.diffuse=gn(e.diffuse,16777215),this.lazy=gn(e.lazy,!1),this.lazyProps={build:!1,bufferParams:{},what:{}},this.matrix=gn(e.matrix,new v),this.disablePicking=gn(e.disablePicking,!1);var r=this.parameters;!0===r.sphereDetail&&(r.sphereDetail={type:"integer",max:3,min:0,rebuild:"impostor"}),!0===r.radialSegments&&(r.radialSegments={type:"integer",max:25,min:5,rebuild:"impostor"}),!0===r.openEnded&&(r.openEnded={type:"boolean",rebuild:"impostor",buffer:!0}),!0===r.disableImpostor&&(r.disableImpostor={type:"boolean",rebuild:!0}),"low"===e.quality?(r.sphereDetail&&(this.sphereDetail=0),r.radialSegments&&(this.radialSegments=5)):"medium"===e.quality?(r.sphereDetail&&(this.sphereDetail=1),r.radialSegments&&(this.radialSegments=10)):"high"===e.quality?(r.sphereDetail&&(this.sphereDetail=2),r.radialSegments&&(this.radialSegments=20)):(r.sphereDetail&&(this.sphereDetail=gn(e.sphereDetail,1)),r.radialSegments&&(this.radialSegments=gn(e.radialSegments,10))),r.openEnded&&(this.openEnded=gn(e.openEnded,!0)),r.disableImpostor&&(this.disableImpostor=gn(e.disableImpostor,!1))},eb.prototype.getColorParams=function(t){return Object.assign({scheme:this.colorScheme,scale:this.colorScale,reverse:this.colorReverse,value:this.colorValue,domain:this.colorDomain,mode:this.colorMode},t)},eb.prototype.getBufferParams=function(t){return Object.assign({clipNear:this.clipNear,clipRadius:this.clipRadius,clipCenter:this.clipCenter,flatShaded:this.flatShaded,opacity:this.opacity,depthWrite:this.depthWrite,side:this.side,wireframe:this.wireframe,linewidth:this.linewidth,roughness:this.roughness,metalness:this.metalness,diffuse:this.diffuse,matrix:this.matrix,disablePicking:this.disablePicking},t)},eb.prototype.setColor=function(t,e){var r=Object.keys(Hf.getSchemes());return"string"==typeof t&&r.includes(t.toLowerCase())?e?e.colorScheme=t:this.setParameters({colorScheme:t}):void 0!==t&&(t=new tt(t).getHex(),e?(e.colorScheme="uniform",e.colorValue=t):this.setParameters({colorScheme:"uniform",colorValue:t})),this},eb.prototype.create=function(){},eb.prototype.update=function(){this.build()},eb.prototype.build=function(t){return this.lazy&&!this.visible?void(this.lazyProps.build=!0):this.prepare?(this.queue.length()>0?(this.tasks.change(1-this.queue.length()),this.queue.kill()):this.tasks.increment(),void this.queue.push(t||!1)):(this.tasks.increment(),void this.make())},eb.prototype.make=function(e,r){t.Debug&&jf.time("Representation.make "+this.type);var i=function(){e?(this.update(e),this.viewer.requestRender(),this.tasks.decrement(),r&&r()):(this.clear(),this.create(),this.manualAttach||this.disposed||(t.Debug&&jf.time("Representation.attach "+this.type),this.attach(function(){t.Debug&&jf.timeEnd("Representation.attach "+this.type),this.tasks.decrement(),r&&r()}.bind(this)))),t.Debug&&jf.timeEnd("Representation.make "+this.type)}.bind(this);this.prepare?this.prepare(i):i()},eb.prototype.attach=function(t){this.setVisibility(this.visible),t()},eb.prototype.setVisibility=function(t,e){if(this.visible=t,this.visible){var r=this.lazyProps,i=r.bufferParams,n=r.what;if(r.build)return r.build=!1,void this.build();(Object.keys(i).length||Object.keys(n).length)&&(r.bufferParams={},r.what={},this.updateParameters(i,n))}return this.bufferList.forEach(function(e){e.setVisibility(t)}),e||this.viewer.requestRender(),this},eb.prototype.setParameters=function(t,e,r){var i=this,n=t||{},o=this.parameters;this.setColor(n.color,n),e=e||{},r=r||!1;var a={};for(var s in n)void 0!==n[s]&&void 0!==o[s]&&(o[s].int&&(n[s]=parseInt(n[s])),o[s].float&&(n[s]=parseFloat(n[s])),(n[s]!==i[s]||n[s].equals&&!n[s].equals(i[s]))&&(i[s]&&i[s].set?i[s].set(n[s]):i[s]=n[s],o[s].buffer&&(!0===o[s].buffer?a[s]=n[s]:a[o[s].buffer]=n[s]),o[s].update&&(e[o[s].update]=!0),!o[s].rebuild||"impostor"===o[s].rebuild&&Uf&&!i.disableImpostor||(r=!0)));return r?this.build():this.updateParameters(a,e),this},eb.prototype.updateParameters=function(t,e){if(this.lazy&&!this.visible)return Object.assign(this.lazyProps.bufferParams,t),void Object.assign(this.lazyProps.what,e);this.bufferList.forEach(function(e){e.setParameters(t)}),Object.keys(e).length&&this.update(e),this.viewer.requestRender()},eb.prototype.getParameters=function(){var t=this,e={lazy:this.lazy,visible:this.visible,quality:this.quality};return Object.keys(this.parameters).forEach(function(r){null!==t.parameters[r]&&(e[r]=t[r])}),e},eb.prototype.clear=function(){var t=this;this.bufferList.forEach(function(e){t.viewer.remove(e),e.dispose()}),this.bufferList.length=0,this.viewer.requestRender()},eb.prototype.dispose=function(){this.disposed=!0,this.queue.kill(),this.tasks.dispose(),this.clear()};var rb=function(t){function e(e,r,i){Array.isArray(e)||(e=[e]),t.call(this,e,r,i),this.type="buffer",this.parameters=Object.assign({},this.parameters,{colorScheme:null,colorScale:null,colorValue:null,colorDomain:null,colorMode:null}),this.buffer=e,this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){t.prototype.init.call(this,e),this.build()},e.prototype.create=function(){this.bufferList.push.apply(this.bufferList,this.buffer)},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t),t.setParameters(e.getBufferParams())}),this.setVisibility(this.visible),t()},e}(eb),ib=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isSurface:{}};return r.isSurface.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(Zy),nb=function(t){this.size=t.size,this.side=t.side,this.wireframe=t.wireframe,this.visible=t.visible,this.geometry=t.geometry,this.picking=t.picking,this.background=t.background,this.disablePicking=t.disablePicking,this.group=new Ne,this.wireframeGroup=new Ne,this.pickingGroup=new Ne,this.matrix=t.matrix,this.frontMeshes=[],this.backMeshes=[];var e=t,r=new t.constructor;e.makeMaterial(),r.makeMaterial(),r.picking=t.picking,r.geometry=t.geometry,r.wireframeGeometry=t.wireframeGeometry,r.setParameters(t.getParameters()),r.updateShader(),e.setParameters({side:"front"}),r.setParameters({side:"back",opacity:r.opacity}),this.buffer=t,this.frontBuffer=e,this.backBuffer=r},ob={matrix:{},pickable:{}};ob.matrix.set=function(t){qy.prototype.setMatrix.call(this,t)},ob.matrix.get=function(){return this.group.matrix.clone()},ob.pickable.get=function(){return!!this.picking&&!this.disablePicking},nb.prototype.getMesh=function(t){var e,r;return t?(r=this.backBuffer.getPickingMesh(),e=this.frontBuffer.getPickingMesh()):(r=this.backBuffer.getMesh(),e=this.frontBuffer.getMesh()),this.frontMeshes.push(e),this.backMeshes.push(r),this.setParameters({side:this.side}),(new Ne).add(r,e)},nb.prototype.getWireframeMesh=function(){return this.buffer.getWireframeMesh()},nb.prototype.getPickingMesh=function(){return this.getMesh(!0)},nb.prototype.setAttributes=function(t){this.buffer.setAttributes(t)},nb.prototype.setParameters=function(t){"front"===(t=Object.assign({},t)).side?(this.frontMeshes.forEach(Ns),this.backMeshes.forEach(ks)):"back"===t.side?(this.frontMeshes.forEach(ks),this.backMeshes.forEach(Ns)):"double"===t.side&&(this.frontMeshes.forEach(Ns),this.backMeshes.forEach(Ns)),void 0!==t.matrix&&(this.matrix=t.matrix),delete t.matrix,void 0!==t.side&&(this.side=t.side),delete t.side,this.frontBuffer.setParameters(t),void 0!==t.wireframe&&(this.wireframe=t.wireframe,this.setVisibility(this.visible)),delete t.wireframe,this.backBuffer.setParameters(t)},nb.prototype.dispose=function(){this.frontBuffer.dispose(),this.backBuffer.dispose()},Object.defineProperties(nb.prototype,ob),nb.prototype.setVisibility=qy.prototype.setVisibility,Yf.add("shader/Line.vert","uniform float nearClip;\nuniform vec3 clipCenter;\nvarying vec3 vViewPosition;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#include color_pars_vertex\nvoid main(){\n#include color_vertex\n#include begin_vertex\n#include project_vertex\nvViewPosition = -mvPosition.xyz;\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}"),Yf.add("shader/Line.frag","uniform float opacity;\nuniform float nearClip;\nuniform float clipRadius;\nvarying vec3 vViewPosition;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#include common\n#include color_pars_fragment\n#include fog_pars_fragment\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\ngl_FragColor = vec4( vColor, opacity );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n}");var ab=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return r.isLine.get=function(){return!0},r.vertexShader.get=function(){return"Line.vert"},r.fragmentShader.get=function(){return"Line.frag"},Object.defineProperties(e.prototype,r),e}(qy),sb=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="surface",this.parameters=Object.assign({isolevelType:{type:"select",options:{value:"value",sigma:"sigma"}},isolevel:{type:"number",precision:2,max:1e3,min:-1e3},negateIsolevel:{type:"boolean"},smooth:{type:"integer",precision:1,max:10,min:0},background:{type:"boolean",rebuild:!0},opaqueBack:{type:"boolean",buffer:!0},boxSize:{type:"integer",precision:1,max:100,min:0},colorVolume:{type:"hidden"},contour:{type:"boolean",rebuild:!0},useWorker:{type:"boolean",rebuild:!0},wrap:{type:"boolean",rebuild:!0}},this.parameters),e instanceof iy?(this.surface=void 0,this.volume=e):(this.surface=e,this.volume=void 0),this.boxCenter=new g,this.__boxCenter=new g,this.box=new st,this.__box=new st,this._position=new g,this.setBox=function(){this._position.copy(r.translationGroup.position).negate(),this._position.equals(this.boxCenter)||this.setParameters({boxCenter:this._position})},this.viewer.signals.ticked.add(this.setBox,this),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,"uniform"),r.colorValue=gn(r.colorValue,14540253),this.isolevelType=gn(r.isolevelType,"sigma"),this.isolevel=gn(r.isolevel,2),this.negateIsolevel=gn(r.negateIsolevel,!1),this.smooth=gn(r.smooth,0),this.background=gn(r.background,!1),this.opaqueBack=gn(r.opaqueBack,!0),this.boxSize=gn(r.boxSize,0),this.colorVolume=gn(r.colorVolume,void 0),this.contour=gn(r.contour,!1),this.useWorker=gn(r.useWorker,!0),this.wrap=gn(r.wrap,!1),t.prototype.init.call(this,r),this.build()},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t)}),this.setVisibility(this.visible),t()},e.prototype.prepare=function(t){var e=this;if(this.volume){var r;if(r="sigma"===this.isolevelType?this.volume.getValueForSigma(this.isolevel):this.isolevel,this.negateIsolevel&&(r*=-1),!this.surface||this.__isolevel!==r||this.__smooth!==this.smooth||this.__contour!==this.contour||this.__wrap!==this.wrap||this.__boxSize!==this.boxSize||this.boxSize>0&&!this.__boxCenter.equals(this.boxCenter)){this.__isolevel=r,this.__smooth=this.smooth,this.__contour=this.contour,this.__wrap=this.wrap,this.__boxSize=this.boxSize,this.__boxCenter.copy(this.boxCenter),this.__box.copy(this.box);var i=function(r){e.surface=r,t()};this.useWorker?this.volume.getSurfaceWorker(r,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap,i):i(this.volume.getSurface(r,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap))}else t()}else t()},e.prototype.create=function(){var t,e={position:this.surface.getPosition(),color:this.surface.getColor(this.getColorParams()),index:this.surface.getIndex()};if(this.contour)t=new ab(e,this.getBufferParams({wireframe:!1}));else{e.normal=this.surface.getNormal(),e.picking=this.surface.getPicking();var r=new ib(e,this.getBufferParams({background:this.background,opaqueBack:this.opaqueBack,dullInterior:!1}));t=new nb(r)}this.bufferList.push(t)},e.prototype.update=function(t){if(0!==this.bufferList.length){var e={};(t=t||{}).position&&(e.position=this.surface.getPosition()),t.color&&(e.color=this.surface.getColor(this.getColorParams())),t.index&&(e.index=this.surface.getIndex()),t.normal&&(e.normal=this.surface.getNormal()),this.bufferList.forEach(function(t){t.setAttributes(e)})}},e.prototype.setParameters=function(e,r,i){return e&&void 0!==e.isolevelType&&this.volume&&("value"===this.isolevelType&&"sigma"===e.isolevelType?this.isolevel=this.volume.getSigmaForValue(this.isolevel):"sigma"===this.isolevelType&&"value"===e.isolevelType&&(this.isolevel=this.volume.getValueForSigma(this.isolevel)),this.isolevelType=e.isolevelType),e&&e.boxCenter&&(this.boxCenter.copy(e.boxCenter),delete e.boxCenter),e&&e.wireframe&&(e.contour||void 0===e.contour&&this.contour)&&(e.wireframe=!1),t.prototype.setParameters.call(this,e,r,i),this.volume&&this.volume.getBox(this.boxCenter,this.boxSize,this.box),e&&void 0!==e.colorVolume&&(r.color=!0),this.surface&&(void 0!==e.isolevel||void 0!==e.negateIsolevel||void 0!==e.smooth||void 0!==e.wrap||void 0!==e.boxSize||this.boxSize>0&&!this.__box.equals(this.box))&&this.build({position:!0,color:!0,index:!0,normal:!this.contour}),this},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.volume=this.colorVolume,e},e.prototype.dispose=function(){this.viewer.signals.ticked.remove(this.setBox,this),t.prototype.dispose.call(this)},e}(eb),cb=new v,ub=new ut,hb=function(t){function e(e,r,i){var n,o=e||{},a=r||{},s=i.attributes.position.array,c=i.attributes.normal.array,u=i.index?i.index.array:void 0,h=o.position.length/3,l=s.length/3,p=h*l,d=new Float32Array(3*p),f=new Float32Array(3*p),m=new Float32Array(3*p);u&&(n=On(h*u.length,p)),t.call(this,{position:d,color:m,index:n,normal:f,primitiveId:o.primitiveId||zo(h,l),picking:o.picking},a),this.setAttributes(o),this.geoPosition=s,this.geoNormal=c,this.geoIndex=u,this.positionCount=h,this.geoPositionCount=l,this.transformedGeoPosition=new Float32Array(3*l),this.transformedGeoNormal=new Float32Array(3*l),this.meshPosition=d,this.meshColor=m,this.meshIndex=n,this.meshNormal=f,this.meshIndex=n,this.makeIndex()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={updateNormals:{}};return e.prototype.applyPositionTransform=function(){},e.prototype.setAttributes=function(t,e){var r,i,n,o,a,s,c,u,h,l=this,p=this.geometry.attributes,d=this.updateNormals;t.position&&(r=t.position,n=this.geoPosition,c=this.meshPosition,a=this.transformedGeoPosition,p.position.needsUpdate=!0,(d||e)&&(o=this.geoNormal,h=this.meshNormal,s=this.transformedGeoNormal,p.normal.needsUpdate=!0)),t.color&&(i=t.color,u=this.meshColor,p.color.needsUpdate=!0);for(var f=this.positionCount,m=this.geoPositionCount,g=0;g 0.0 ){\ncameraPos = rayDirection * posT + rayOrigin;\ninterior = true;\nflag2 = true;\nreturn false;\n}else{\ncameraNormal = normalize( cameraPos - cameraSpherePos );\n}\n#else\nif( calcDepth( cameraPos ) <= 0.0 ){\ncameraPos = rayDirection * posT + rayOrigin;\ninterior = true;\nreturn false;\n}else{\ncameraNormal = normalize( cameraPos - cameraSpherePos );\n}\n#endif\nreturn true;\n}\nreturn false;\n}\nvoid main(void){\nbool flag = Impostor( cameraPos, cameraNormal );\n#ifdef NEAR_CLIP\nif( calcClip( cameraPos ) > 0.0 )\ndiscard;\n#endif\ngl_FragDepthEXT = calcDepth( cameraPos );\nif( !flag ){\n#ifdef NEAR_CLIP\nif( flag2 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\n}else if( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n#else\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n#endif\n}\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\n#ifdef PICKING\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vNormal = cameraNormal;\nvec3 vViewPosition = -cameraPos;\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\n#include normal_flip\n#include normal_fragment\nif( interior ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var db=function(t){function e(e,r){t.call(this,e,r),this.index=On(this.indexSize,this.attributeSize),this.makeIndex(),this.initIndex(this.index,1),this.addAttributes({mapping:{type:this.mappingType,value:null}}),this.setAttributes({primitiveId:Bo(this.size)})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={attributeSize:{},indexSize:{},mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.attributeSize.get=function(){return this.size*this.mappingSize},r.indexSize.get=function(){return this.size*this.mappingIndicesSize},r.mapping.get=function(){},r.mappingIndices.get=function(){},r.mappingIndicesSize.get=function(){},r.mappingType.get=function(){},r.mappingSize.get=function(){},r.mappingItemSize.get=function(){},e.prototype.addAttributes=function(e){var r={};for(var i in e){var n=e[i];r[i]={type:n.type,value:null}}t.prototype.addAttributes.call(this,r)},e.prototype.getAttributeIndex=function(t){return 3*t*this.mappingSize},e.prototype.setAttributes=function(t){t&&!t.position&&t.position1&&t.position2&&(t.position=Do(t.position1,t.position2));var e,r,i,n,o,a,s,c=this.size,u=this.mappingSize,h=this.geometry.attributes;for(var l in t)if("index"!==l&&"picking"!==l){r=t[l],i=(e=h[l]).itemSize,n=e.array;for(var p=0;p0&&this.alphaTest<=1&&(r.ALPHATEST=this.alphaTest.toPrecision(2)),r},e.prototype.setUniforms=function(e){e&&void 0!==e.edgeBleach&&(this.makeTexture(),e.map=this.tex),t.prototype.setUniforms.call(this,e)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.tex&&this.tex.dispose()},r.isPoint.get=function(){return!0},r.vertexShader.get=function(){return"Point.vert"},r.fragmentShader.get=function(){return"Point.frag"},Object.defineProperties(e.prototype,r),e}(qy),xb=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="dot",this.parameters=Object.assign({thresholdType:{type:"select",rebuild:!0,options:{value:"value",sigma:"sigma"}},thresholdMin:{type:"number",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdMax:{type:"number",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdOut:{type:"boolean",rebuild:!0},dotType:{type:"select",rebuild:!0,options:{"":"",sphere:"sphere",point:"point"}},radiusType:{type:"select",options:{"":"",value:"value","abs-value":"abs-value","value-min":"value-min",deviation:"deviation",size:"size"}},radius:{type:"number",precision:3,max:10,min:.001,property:"size"},scale:{type:"number",precision:3,max:10,min:.001},sphereDetail:!0,disableImpostor:!0,pointSize:{type:"number",precision:1,max:100,min:0,buffer:!0},sizeAttenuation:{type:"boolean",buffer:!0},sortParticles:{type:"boolean",rebuild:!0},useTexture:{type:"boolean",buffer:!0},alphaTest:{type:"range",step:.001,max:1,min:0,buffer:!0},forceTransparent:{type:"boolean",buffer:!0},edgeBleach:{type:"range",step:.001,max:1,min:0,buffer:!0}},this.parameters,{colorScheme:{type:"select",update:"color",options:{"":"",value:"value",uniform:"uniform",random:"random"}}}),e instanceof iy?(this.surface=void 0,this.volume=new oy(e)):(this.surface=e,this.volume=void 0),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,"uniform"),r.colorValue=gn(r.colorValue,14540253),this.thresholdType=gn(r.thresholdType,"sigma"),this.thresholdMin=gn(r.thresholdMin,2),this.thresholdMax=gn(r.thresholdMax,1/0),this.thresholdOut=gn(r.thresholdOut,!1),this.dotType=gn(r.dotType,"point"),this.radius=gn(r.radius,.1),this.scale=gn(r.scale,1),this.pointSize=gn(r.pointSize,1),this.sizeAttenuation=gn(r.sizeAttenuation,!0),this.sortParticles=gn(r.sortParticles,!1),this.useTexture=gn(r.useTexture,!1),this.alphaTest=gn(r.alphaTest,.5),this.forceTransparent=gn(r.forceTransparent,!1),this.edgeBleach=gn(r.edgeBleach,0),t.prototype.init.call(this,r),this.build()},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t)}),this.setVisibility(this.visible),t()},e.prototype.create=function(){var t={};if(this.volume){var e,r,i=this.volume;"sigma"===this.thresholdType?(e=i.getValueForSigma(this.thresholdMin),r=i.getValueForSigma(this.thresholdMax)):(e=this.thresholdMin,r=this.thresholdMax),i.setFilter(e,r,this.thresholdOut),t.position=i.getDataPosition(),t.color=i.getDataColor(this.getColorParams()),"sphere"===this.dotType&&(t.radius=i.getDataSize(this.radius,this.scale),t.picking=i.getDataPicking())}else{var n=this.surface;t.position=n.getPosition(),t.color=n.getColor(this.getColorParams()),"sphere"===this.dotType&&(t.radius=n.getSize(this.radius,this.scale),t.picking=n.getPicking())}"sphere"===this.dotType?this.dotBuffer=new yb(t,this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!1})):this.dotBuffer=new bb(t,this.getBufferParams({pointSize:this.pointSize,sizeAttenuation:this.sizeAttenuation,sortParticles:this.sortParticles,useTexture:this.useTexture,alphaTest:this.alphaTest,forceTransparent:this.forceTransparent,edgeBleach:this.edgeBleach})),this.bufferList.push(this.dotBuffer)},e.prototype.update=function(t){if(0!==this.bufferList.length){var e={};(t=t||{}).color&&(this.volume?e.color=this.volume.getDataColor(this.getColorParams()):e.color=this.surface.getColor(this.getColorParams())),"sphere"===this.dotType&&(t.radius||t.scale)&&(this.volume?e.radius=this.volume.getDataSize(this.radius,this.scale):e.radius=this.surface.getSize(this.radius,this.scale)),this.dotBuffer.setAttributes(e)}},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&void 0!==e.thresholdType&&this.volume instanceof iy&&("value"===this.thresholdType&&"sigma"===e.thresholdType?(this.thresholdMin=this.volume.getSigmaForValue(this.thresholdMin),this.thresholdMax=this.volume.getSigmaForValue(this.thresholdMax)):"sigma"===this.thresholdType&&"value"===e.thresholdType&&(this.thresholdMin=this.volume.getValueForSigma(this.thresholdMin),this.thresholdMax=this.volume.getValueForSigma(this.thresholdMax)),this.thresholdType=e.thresholdType),e&&void 0!==e.radiusType&&("radius"===e.radiusType?this.radius=.1:this.radius=e.radiusType,r.radius=!0,"sphere"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.radius&&(r.radius=!0,"sphere"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.scale&&(r.scale=!0,"sphere"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),t.prototype.setParameters.call(this,e,r,i),this},e}(eb);Yf.add("shader/Image.vert","uniform float clipRadius;\nuniform vec3 clipCenter;\nvarying vec2 vUv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\nvoid main() {\n#include begin_vertex\n#include project_vertex\nvUv = uv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvViewPosition = -mvPosition.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n}"),Yf.add("shader/Image.frag","uniform sampler2D map;\nuniform float opacity;\nuniform vec2 mapSize;\nuniform float nearClip;\nuniform float clipRadius;\nvarying vec2 vUv;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\nuniform sampler2D pickingMap;\nuniform float objectId;\n#else\n#include fog_pars_fragment\n#endif\n#if defined( CUBIC_INTERPOLATION )\n#if defined( CATMULROM_FILTER ) || defined( MITCHELL_FILTER )\n#if defined( CATMULROM_FILTER )\nconst float B = 0.0;\nconst float C = 0.5;\n#elif defined( MITCHELL_FILTER )\nconst float B = 0.333;\nconst float C = 0.333;\n#endif\nfloat filter( float x ){\nfloat f = x;\nif( f < 0.0 ){\nf = -f;\n}\nif( f < 1.0 ){\nreturn ( ( 12.0 - 9.0 * B - 6.0 * C ) * ( f * f * f ) +\n( -18.0 + 12.0 * B + 6.0 *C ) * ( f * f ) +\n( 6.0 - 2.0 * B ) ) / 6.0;\n}else if( f >= 1.0 && f < 2.0 ){\nreturn ( ( -B - 6.0 * C ) * ( f * f * f )\n+ ( 6.0 * B + 30.0 * C ) * ( f *f ) +\n( - ( 12.0 * B ) - 48.0 * C ) * f +\n8.0 * B + 24.0 * C ) / 6.0;\n}else{\nreturn 0.0;\n}\n}\n#elif defined( BSPLINE_FILTER )\nfloat filter( float x ){\nfloat f = x;\nif( f < 0.0 ){\nf = -f;\n}\nif( f >= 0.0 && f <= 1.0 ){\nreturn ( 2.0 / 3.0 ) + ( 0.5 ) * ( f * f * f ) - ( f * f );\n}else if( f > 1.0 && f <= 2.0 ){\nreturn 1.0 / 6.0 * pow( ( 2.0 - f ), 3.0 );\n}\nreturn 1.0;\n}\n#else\nfloat filter( float x ){\nreturn 1.0;\n}\n#endif\nvec4 biCubic( sampler2D tex, vec2 texCoord ){\nvec2 texelSize = 1.0 / mapSize;\ntexCoord -= texelSize / 2.0;\nvec4 nSum = vec4( 0.0 );\nfloat nDenom = 0.0;\nvec2 cell = fract( texCoord * mapSize );\nfor( float m = -1.0; m <= 2.0; ++m ){\nfor( float n = -1.0; n <= 2.0; ++n ){\nvec4 vecData = texture2D(\ntex, texCoord + texelSize * vec2( m, n )\n);\nfloat c = filter( m - cell.x ) * filter( -n + cell.y );\nnSum += vecData * c;\nnDenom += c;\n}\n}\nreturn nSum / nDenom;\n}\n#endif\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\n#if defined( CUBIC_INTERPOLATION )\ngl_FragColor = biCubic( map, vUv );\n#else\ngl_FragColor = texture2D( map, vUv );\n#endif\n#if defined( PICKING )\nif( gl_FragColor.a < 0.7 )\ndiscard;\ngl_FragColor = vec4( texture2D( pickingMap, vUv ).xyz, objectId );\n#else\nif( gl_FragColor.a < 0.01 )\ndiscard;\ngl_FragColor.a *= opacity;\n#include fog_fragment\n#endif\n}");var _b=new Uint16Array([0,1,2,1,3,2]),wb=new Float32Array([0,1,0,0,1,1,1,0]),Sb=function(t){function e(e,r){var i=e||{},n=r||{};t.call(this,{position:i.position,index:_b,picking:i.picking},n),this.forceTransparent=!0,this.filter=gn(n.filter,"nearest");var o=new y(i.imageData,i.width,i.height);o.flipY=!0,this.tex=o;for(var a=i.imageData.length,s=new Uint8Array(a),c=0;c>16&255,s[c+1]=u>>8&255,s[c+2]=255&u}var h=new y(s,i.width,i.height);h.flipY=!0,h.minFilter=nl,h.magFilter=nl,this.pickingTex=h,this.addUniforms({map:{value:o},pickingMap:{value:h},mapSize:{value:new l(i.width,i.height)}}),this.geometry.addAttribute("uv",new St(wb,2))}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{filter:{updateShader:!0,uniform:!0}},t.prototype.parameters)},e.prototype.getDefines=function(e){var r=t.prototype.getDefines.call(this,e);return this.filter.startsWith("cubic")&&(r.CUBIC_INTERPOLATION=1,this.filter.endsWith("bspline")?r.BSPLINE_FILTER=1:this.filter.endsWith("catmulrom")?r.CATMULROM_FILTER=1:this.filter.endsWith("mitchell")&&(r.MITCHELL_FILTER=1)),r},e.prototype.updateTexture=function(){var t=this.tex;this.filter.startsWith("cubic")?(t.minFilter=nl,t.magFilter=nl):"linear"===this.filter?(t.minFilter=sl,t.magFilter=sl):(t.minFilter=nl,t.magFilter=nl),t.needsUpdate=!0,this.pickingTex.needsUpdate=!0},e.prototype.makeMaterial=function(){t.prototype.makeMaterial.call(this),this.updateTexture();var e=this.material;e.uniforms.map.value=this.tex,e.blending=lh,e.needsUpdate=!0;var r=this.wireframeMaterial;r.uniforms.map.value=this.tex,r.blending=lh,r.needsUpdate=!0;var i=this.pickingMaterial;i.uniforms.map.value=this.tex,i.uniforms.pickingMap.value=this.pickingTex,i.blending=lh,i.needsUpdate=!0},e.prototype.setUniforms=function(e){e&&void 0!==e.filter&&(this.updateTexture(),e.map=this.tex),t.prototype.setUniforms.call(this,e)},r.vertexShader.get=function(){return"Image.vert"},r.fragmentShader.get=function(){return"Image.frag"},Object.defineProperties(e.prototype,r),e}(qy),Ab=function(t,e){var r=e||{};this.dimension=gn(r.dimension,"x"),this.positionType=gn(r.positionType,"percent"),this.position=gn(r.position,30),this.thresholdType=gn(r.thresholdType,"sigma"),this.thresholdMin=gn(r.thresholdMin,-1/0),this.thresholdMax=gn(r.thresholdMax,1/0),this.normalize=gn(r.normalize,!1),this.volume=t};Ab.prototype.getPositionFromCoordinate=function(t){var e,r=this.dimension,i=this.volume,n=i.matrix,o=(new g).setFromMatrixPosition(n)[r],a=(new g).setFromMatrixScale(n)[r];return e="x"===r?i.nx:"y"===r?i.ny:i.nz,Math.round(((t-o)/(e/100)+1)/a)},Ab.prototype.getData=function(t){function e(t){return Math.round(t/100*(o-1))}function r(t,e,r,i){return 3*(r*a.ny*a.nx+e*a.nx+t)+i}function i(t,e,r,i){m.set(t,e,r).applyMatrix4(c).toArray(f,i)}var n=this;t=t||{};var o,a=this.volume,s=a.data,c=a.matrix;o="coordinate"===this.positionType?this.getPositionFromCoordinate(this.position):this.position;var u,h,l,p,d,f=new Float32Array(12),m=new g,v=0,y=0,b=0,x=a.nx,_=a.ny,w=a.nz;"x"===this.dimension?(l=e(a.nx),p=a.ny-1,d=a.nz-1,u=a.nz,h=a.ny,x=(v=l)+1,i(l,0,0,0),i(l,p,0,3),i(l,0,d,6),i(l,p,d,9)):"y"===this.dimension?(l=a.nx-1,p=e(a.ny),d=a.nz-1,u=a.nz,h=a.nx,_=(y=p)+1,i(0,p,0,0),i(l,p,0,3),i(0,p,d,6),i(l,p,d,9)):"z"===this.dimension&&(l=a.nx-1,p=a.ny-1,d=e(a.nz),u=a.nx,h=a.ny,w=(b=d)+1,i(0,0,d,0),i(0,p,d,3),i(l,0,d,6),i(l,p,d,9));var S,A,M=0,E=0,T=new Uint8Array(u*h*4),P=new Float32Array(u*h);"sigma"===this.thresholdType?(S=a.getValueForSigma(this.thresholdMin),A=a.getValueForSigma(this.thresholdMax)):(S=this.thresholdMin,A=this.thresholdMax);var C=Object.assign({},t.colorParams,{volume:a});this.normalize&&(C.domain=[0,1]);var I,R,L,O=Hf.getScheme(C),D=new Float32Array(3),N=O.getScale();if(this.normalize){I=1/0,R=-1/0;for(var k=y;k<_;++k)for(var F=v;FR&&(R=z)}L=R-I}for(var U=y;U<_;++U)for(var j=v;jS&&$0&&this.updateData(t,e)},this)},e.prototype.updateData=function(){this.build()},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.structure=this.structure,e},e.prototype.getAtomParams=function(t,e){return Object.assign({what:t,colorParams:this.getColorParams(),radiusParams:{radius:this.radius,scale:this.scale}},e)},e.prototype.getBondParams=function(t,e){return Object.assign({what:t,colorParams:this.getColorParams(),radiusParams:{radius:this.radius,scale:this.scale}},e)},e.prototype.setSelection=function(t,e){return this.selection.setString(t,e),this},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&void 0!==e.radiusType&&("size"===e.radiusType?this.radius=1:this.radius=e.radiusType,delete e.radiusType,r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.radius&&(r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.scale&&(r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.defaultAssembly&&(i=!0),t.prototype.setParameters.call(this,e,r,i),this},e.prototype.getParameters=function(){return Object.assign(t.prototype.getParameters.call(this),{sele:this.selection?this.selection.string:void 0,defaultAssembly:this.defaultAssembly})},e.prototype.attach=function(t){var e=this.viewer,r=this.bufferList;this.dataList.forEach(function(t){t.bufferList.forEach(function(i){r.push(i),e.add(i,t.instanceList)})}),this.setVisibility(this.visible),t()},e.prototype.clear=function(){this.dataList.length=0,t.prototype.clear.call(this)},e.prototype.dispose=function(){this.structureView.dispose(),delete this.structure,delete this.structureView,t.prototype.dispose.call(this)},Object.defineProperties(e.prototype,r),e}(eb),Tb=new g,Pb=new g,Cb=new g,Ib=new g(0,1,0),Rb=function(t){function e(e,r){var i=e||{},n=r||{},o=gn(n.radialSegments,10),a=gn(n.openEnded,!0),s=(new v).makeRotationX(Math.PI/2),c=new vr(1,1,1,o,1,a);c.applyMatrix(s);var u=i.position1.length,h=i.radius.length,l=c.attributes.position.array.length/3,p=u/3,d=new Float32Array(2*p*l);zo(p,l,0,d),zo(p,l,p*l,d);var f=new Float32Array(2*u),m=new Float32Array(2*u);t.call(this,{position:f,color:m,primitiveId:d,picking:i.picking},n,c),this.__center=new Float32Array(u),this._position=f,this._color=m,this._from=new Float32Array(2*u),this._to=new Float32Array(2*u),this._radius=new Float32Array(2*h),this.setAttributes(i,!0)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={updateNormals:{}};return e.prototype.applyPositionTransform=function(t,e,r){Pb.fromArray(this._from,r),Cb.fromArray(this._to,r),t.lookAt(Pb,Cb,Ib);var i=this._radius[e];Tb.set(i,i,Pb.distanceTo(Cb)),t.scale(Tb)},e.prototype.setAttributes=function(e,r){var i={};e.position1&&e.position2&&(Do(e.position1,e.position2,this.__center),Do(e.position1,this.__center,this._position),Do(this.__center,e.position2,this._position,e.position1.length),this._from.set(e.position1),this._from.set(this.__center,e.position1.length),this._to.set(this.__center),this._to.set(e.position2,this.__center.length),i.position=this._position),e.color&&e.color2&&(this._color.set(e.color),this._color.set(e.color2,e.color.length),i.color=this._color),e.radius&&(this._radius.set(e.radius),this._radius.set(e.radius,e.radius.length),i.radius=this._radius),t.prototype.setAttributes.call(this,i,r)},r.updateNormals.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(hb);Yf.add("shader/CylinderImpostor.vert","\nattribute vec3 mapping;\nattribute vec3 position1;\nattribute vec3 position2;\nattribute float radius;\nvarying vec3 axis;\nvarying vec4 base_radius;\nvarying vec4 end_b;\nvarying vec3 U;\nvarying vec3 V;\nvarying vec4 w;\n#ifdef PICKING\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#else\nattribute vec3 color2;\nvarying vec3 vColor1;\nvarying vec3 vColor2;\n#endif\nuniform mat4 modelViewMatrixInverse;\nuniform float ortho;\n#include matrix_scale\nvoid main(){\n#ifdef PICKING\nvPickingColor = unpackColor( primitiveId );\n#else\nvColor1 = color;\nvColor2 = color2;\n#endif\nbase_radius.w = radius * matrixScale( modelViewMatrix );\nvec3 center = position;\nvec3 dir = normalize( position2 - position1 );\nfloat ext = length( position2 - position1 ) / 2.0;\nvec3 cam_dir;\nif( ortho == 0.0 ){\ncam_dir = ( modelViewMatrixInverse * vec4( 0, 0, 0, 1 ) ).xyz - center;\n}else{\ncam_dir = ( modelViewMatrixInverse * vec4( 0, 0, 1, 0 ) ).xyz;\n}\ncam_dir = normalize( cam_dir );\nvec3 ldir;\nfloat b = dot( cam_dir, dir );\nend_b.w = b;\nif( b < 0.0 )\nldir = -ext * dir;\nelse\nldir = ext * dir;\nvec3 left = normalize( cross( cam_dir, ldir ) );\nleft = radius * left;\nvec3 up = radius * normalize( cross( left, ldir ) );\naxis = normalize( normalMatrix * ldir );\nU = normalize( normalMatrix * up );\nV = normalize( normalMatrix * left );\nvec4 base4 = modelViewMatrix * vec4( center - ldir, 1.0 );\nbase_radius.xyz = base4.xyz / base4.w;\nvec4 top_position = modelViewMatrix * vec4( center + ldir, 1.0 );\nvec4 end4 = top_position;\nend_b.xyz = end4.xyz / end4.w;\nw = modelViewMatrix * vec4(\ncenter + mapping.x*ldir + mapping.y*left + mapping.z*up, 1.0\n);\ngl_Position = projectionMatrix * w;\ngl_Position.z = 0.99;\n}"),Yf.add("shader/CylinderImpostor.frag","#define STANDARD\n#define IMPOSTOR\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float nearClip;\nuniform mat4 projectionMatrix;\nuniform float ortho;\nvarying vec3 axis;\nvarying vec4 base_radius;\nvarying vec4 end_b;\nvarying vec3 U;\nvarying vec3 V;\nvarying vec4 w;\n#ifdef PICKING\nuniform float objectId;\nvarying vec3 vPickingColor;\n#else\nvarying vec3 vColor1;\nvarying vec3 vColor2;\n#include common\n#include fog_pars_fragment\n#include bsdfs\n#include lights_pars\n#include lights_physical_pars_fragment\n#endif\nbool interior = false;\nfloat distSq3( vec3 v3a, vec3 v3b ){\nreturn (\n( v3a.x - v3b.x ) * ( v3a.x - v3b.x ) +\n( v3a.y - v3b.y ) * ( v3a.y - v3b.y ) +\n( v3a.z - v3b.z ) * ( v3a.z - v3b.z )\n);\n}\nfloat calcDepth( in vec3 cameraPos ){\nvec2 clipZW = cameraPos.z * projectionMatrix[2].zw + projectionMatrix[3].zw;\nreturn 0.5 + 0.5 * clipZW.x / clipZW.y;\n}\nfloat calcClip( vec3 cameraPos ){\nreturn dot( vec4( cameraPos, 1.0 ), vec4( 0.0, 0.0, 1.0, nearClip - 0.5 ) );\n}\nvoid main(){\nvec3 point = w.xyz / w.w;\nvec3 base = base_radius.xyz;\nfloat vRadius = base_radius.w;\nvec3 end = end_b.xyz;\nfloat b = end_b.w;\nvec3 end_cyl = end;\nvec3 surface_point = point;\nvec3 ray_target = surface_point;\nvec3 ray_origin = vec3(0.0);\nvec3 ray_direction = mix(normalize(ray_origin - ray_target), vec3(0.0, 0.0, 1.0), ortho);\nmat3 basis = mat3( U, V, axis );\nvec3 diff = ray_target - 0.5 * (base + end_cyl);\nvec3 P = diff * basis;\nfloat dz = dot( axis, ray_direction );\nfloat radius2 = vRadius*vRadius;\nvec3 D = vec3(dot(U, ray_direction),\ndot(V, ray_direction),\ndz);\nfloat a0 = P.x*P.x + P.y*P.y - radius2;\nfloat a1 = P.x*D.x + P.y*D.y;\nfloat a2 = D.x*D.x + D.y*D.y;\nfloat d = a1*a1 - a0*a2;\nif (d < 0.0)\ndiscard;\nfloat dist = (-a1 + sqrt(d)) / a2;\nvec3 new_point = ray_target + dist * ray_direction;\nvec3 tmp_point = new_point - base;\nvec3 _normal = normalize( tmp_point - axis * dot(tmp_point, axis) );\nray_origin = mix( ray_origin, surface_point, ortho );\nfloat front_cap_test = dot( tmp_point, axis );\nfloat end_cap_test = dot((new_point - end_cyl), axis);\n#ifndef CAP\nvec3 new_point2 = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\nvec3 tmp_point2 = new_point2 - base;\n#endif\nif (front_cap_test < 0.0)\n{\nfloat dNV = dot(-axis, ray_direction);\nif (dNV < 0.0)\ndiscard;\nfloat near = dot(-axis, (base)) / dNV;\nvec3 front_point = ray_direction * near + ray_origin;\nif (dot(front_point - base, front_point-base) > radius2)\ndiscard;\n#ifdef CAP\nnew_point = front_point;\n_normal = axis;\n#else\nnew_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\ndNV = dot(-axis, ray_direction);\nnear = dot(axis, end_cyl) / dNV;\nnew_point2 = ray_direction * near + ray_origin;\nif (dot(new_point2 - end_cyl, new_point2-base) < radius2)\ndiscard;\ninterior = true;\n#endif\n}\nif( end_cap_test > 0.0 )\n{\nfloat dNV = dot(axis, ray_direction);\nif (dNV < 0.0)\ndiscard;\nfloat near = dot(axis, end_cyl) / dNV;\nvec3 end_point = ray_direction * near + ray_origin;\nif( dot(end_point - end_cyl, end_point-base) > radius2 )\ndiscard;\n#ifdef CAP\nnew_point = end_point;\n_normal = axis;\n#else\nnew_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\ndNV = dot(-axis, ray_direction);\nnear = dot(-axis, (base)) / dNV;\nnew_point2 = ray_direction * near + ray_origin;\nif (dot(new_point2 - base, new_point2-base) < radius2)\ndiscard;\ninterior = true;\n#endif\n}\ngl_FragDepthEXT = calcDepth( new_point );\n#ifdef NEAR_CLIP\nif( calcClip( new_point ) > 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nnew_point = ray_target + dist * ray_direction;\nif( calcClip( new_point ) > 0.0 )\ndiscard;\ninterior = true;\ngl_FragDepthEXT = calcDepth( new_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\n}\n}else if( gl_FragDepthEXT <= 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nnew_point = ray_target + dist * ray_direction;\ninterior = true;\ngl_FragDepthEXT = calcDepth( new_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n}\n#else\nif( gl_FragDepthEXT <= 0.0 ){\ndist = (-a1 - sqrt(d)) / a2;\nnew_point = ray_target + dist * ray_direction;\ninterior = true;\ngl_FragDepthEXT = calcDepth( new_point );\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\n}\n}\n#endif\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\n#ifdef PICKING\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vViewPosition = -new_point;\nvec3 vNormal = _normal;\nvec3 vColor;\nif( distSq3( new_point, end_cyl ) < distSq3( new_point, base ) ){\nif( b < 0.0 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\n}else{\nif( b > 0.0 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\n}\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\nvec3 normal = normalize( vNormal );\nif( interior ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var Lb=new Float32Array([-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1]),Ob=new Uint16Array([0,1,2,1,4,2,2,4,3,4,5,3]),Db=function(t){function e(e,r){t.call(this,e,r);var i=r||{};this.openEnded=gn(i.openEnded,!1),this.addUniforms({modelViewMatrixInverse:{value:new v},ortho:{value:0}}),this.addAttributes({position1:{type:"v3",value:null},position2:{type:"v3",value:null},color2:{type:"c",value:null},radius:{type:"f",value:null}}),this.setAttributes(e),this.makeMapping()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},isImpostor:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{openEnded:{updateShader:!0}},t.prototype.parameters)},e.prototype.getDefines=function(e){var r=t.prototype.getDefines.call(this,e);return this.openEnded||(r.CAP=1),r},r.isImpostor.get=function(){return!0},r.vertexShader.get=function(){return"CylinderImpostor.vert"},r.fragmentShader.get=function(){return"CylinderImpostor.frag"},Object.defineProperties(e.prototype,r),e}(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.mapping.get=function(){return Lb},r.mappingIndices.get=function(){return Ob},r.mappingIndicesSize.get=function(){return 12},r.mappingType.get=function(){return"v3"},r.mappingSize.get=function(){return 6},r.mappingItemSize.get=function(){return 3},Object.defineProperties(e.prototype,r),e}(db)),Nb=function(t,e){return t.color2||(t.color2=t.color),!Uf||e&&e.disableImpostor?new Rb(t,e):new Db(t,e)};Qf.add("cylinder",Nb);var kb=function(t){function e(e,r){var i=4*(e.position1.length/3);t.call(this,{position:new Float32Array(3*i),color:new Float32Array(3*i)},r),this.setAttributes(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n,o,a,s=this.geometry.attributes;t.position1&&t.position2&&(e=t.position1,r=t.position2,o=s.position.array,s.position.needsUpdate=!0),t.color&&t.color2&&(i=t.color,n=t.color2,a=s.color.array,s.color.needsUpdate=!0);for(var c,u,h,l,p,d,f,m,g,v,y,b=this.size,x=0;x5&&s>15e3||s>7e5){var p=Math.min(1.5,Math.max(.1,2e3/(s/n)));c&&(p=Math.min(p,.15)),e.addRepresentation("surface",{sele:"polymer",surfaceType:"sas",probeRadius:1.4,scaleFactor:p,colorScheme:u,colorScale:h,colorReverse:l,useWorker:!1})}else s>25e4?e.addRepresentation("backbone",{lineOnly:!0,colorScheme:u,colorScale:h,colorReverse:l}):s>1e5?e.addRepresentation("backbone",{quality:"low",disableImpostor:!0,colorScheme:u,colorScale:h,colorReverse:l,scale:2}):s>8e4?e.addRepresentation("backbone",{colorScheme:u,colorScale:h,colorReverse:l,scale:2}):(e.addRepresentation("cartoon",{colorScheme:u,colorScale:h,colorReverse:l,scale:.7,aspectRatio:5,quality:"auto"}),s<5e4&&e.addRepresentation("base",{colorScheme:u,colorScale:h,colorReverse:l,quality:"auto"}),e.addRepresentation("ball+stick",{sele:"ligand",colorScheme:"element",scale:2,aspectRatio:1.5,bondScale:.3,bondSpacing:.75,quality:"auto"}));e.structure.frames.length&&e.addTrajectory()}else"surface"!==e.type&&"volume"!==e.type||e.addRepresentation("surface");this.tasks.onZeroOnce(this.autoView,this)},qb.prototype.loadFile=function(t,e){var r=Object.assign({},this.defaultFileParams,e),i=new jb(this,r);i.name=wn(t).name,this.addComponent(i);var n=this.tasks;n.increment();var o=function(t){return this.removeComponent(i),i=this.addComponentFromObject(t,r),"script"===i.type?i.run():r.defaultRepresentation&&this.defaultFileRepresentation(i),n.decrement(),i}.bind(this),a=function(t){throw i.setStatus(t),n.decrement(),t},s=gn(r.ext,wn(t).ext);return(qf.isTrajectory(s)?Promise.reject(new Error('loadFile: ext "'+s+'" is a trajectory and must be loaded into a structure component')):Mo(t,r)).then(o,a)},qb.prototype.addComponent=function(t){if(!t)return void jf.warn("Stage.addComponent: no component given");this.compList.push(t),this.signals.componentAdded.dispatch(t)},qb.prototype.addComponentFromObject=function(t,e){var r=Kf.get(t.type);if(r){var i=new r(this,t,e);return this.addComponent(i),i}jf.warn("no component for object type",t.type)},qb.prototype.removeComponent=function(t){var e=this.compList.indexOf(t);-1!==e&&(this.compList.splice(e,1),t.dispose(),this.signals.componentRemoved.dispatch(t))},qb.prototype.removeAllComponents=function(t){this.compList.slice().forEach(function(e){t&&e.type!==t||this.removeComponent(e)},this)},qb.prototype.handleResize=function(){this.viewer.handleResize()},qb.prototype.setSize=function(t,e){var r=this.viewer.container;r!==document.body&&(void 0!==t&&(r.style.width=t),void 0!==e&&(r.style.height=e),this.handleResize())},qb.prototype.toggleFullscreen=function(t){function e(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function r(){if(!e()&&i.lastFullscreenElement){var t=i.lastFullscreenElement;t.style.width=t.dataset.normalWidth,t.style.height=t.dataset.normalHeight,document.removeEventListener("fullscreenchange",r),document.removeEventListener("mozfullscreenchange",r),document.removeEventListener("webkitfullscreenchange",r),document.removeEventListener("MSFullscreenChange",r),i.handleResize(),i.signals.fullscreenChanged.dispatch(!1)}}if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled))return void jf.log("fullscreen mode (currently) not possible");var i=this;t=t||this.viewer.container,this.lastFullscreenElement=t,e()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(t.dataset.normalWidth=t.style.width,t.dataset.normalHeight=t.style.height,t.style.width=window.screen.width+"px",t.style.height=window.screen.height+"px",t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(),document.addEventListener("fullscreenchange",r),document.addEventListener("mozfullscreenchange",r),document.addEventListener("webkitfullscreenchange",r),document.addEventListener("MSFullscreenChange",r),this.handleResize(),this.signals.fullscreenChanged.dispatch(!0),setTimeout(function(){i.handleResize()},100))},qb.prototype.setSpin=function(t){t?(this.spinAnimation.resume(!0),this.rockAnimation.pause(!0)):this.spinAnimation.pause(!0)},qb.prototype.setRock=function(t){t?(this.rockAnimation.resume(!0),this.spinAnimation.pause(!0)):this.rockAnimation.pause(!0)},qb.prototype.toggleSpin=function(){this.setSpin(this.spinAnimation.paused)},qb.prototype.toggleRock=function(){this.setRock(this.rockAnimation.paused)},qb.prototype.setFocus=function(t){var e=Yn(t/2,0,49.9),r=100-e,i=(r-e)/2;this.setParameters({clipNear:e,clipFar:r,fogNear:Zn(r-i),fogFar:Zn(r+i)})},qb.prototype.getZoomForBox=function(t){var e=t.getSize(Xb),r=Math.max(e.x,e.y,e.z),i=Math.min(e.x,e.y,e.z),n=r+Math.sqrt(i),o=$n(this.viewer.perspectiveCamera.fov),a=this.viewer.width,s=this.viewer.height,c=a/s,u=s=this.V[n][o]?(r="S",this.score=this.S[n][o]):this.V[n][o]>=this.H[n][o]?(r="V",this.score=this.V[n][o]):(r="H",this.score=this.H[n][o]),t.Debug&&jf.log("Alignment: SCORE",this.score),t.Debug&&jf.log("Alignment: S, V, H",this.S[n][o],this.V[n][o],this.H[n][o]);n>0&&o>0;)"S"===r?e.S[n][o]===e.S[n-1][o-1]+i(n-1,o-1)?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--n,--o,r="S"):e.S[n][o]===e.V[n][o]?r="V":e.S[n][o]===e.H[n][o]?r="H":(--n,--o):"V"===r?e.V[n][o]===e.V[n-1][o]+e.gapExtensionPenalty?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2="-"+e.ali2,--n,r="V"):e.V[n][o]===e.S[n-1][o]+e.gap(0)?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2="-"+e.ali2,--n,r="S"):--n:"H"===r?e.H[n][o]===e.H[n][o-1]+e.gapExtensionPenalty?(e.ali1="-"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o,r="H"):e.H[n][o]===e.S[n][o-1]+e.gap(0)?(e.ali1="-"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o,r="S"):--o:jf.error("Alignment: no matrix");for(;n>0;)e.ali1=e.seq1[n-1]+e.ali1,e.ali2="-"+e.ali2,--n;for(;o>0;)e.ali1="-"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o;t.Debug&&jf.timeEnd("Alignment.trace"),t.Debug&&jf.log([this.ali1,this.ali2])};var Jb=function(t){function e(e){var r=this;t.call(this,e),e.scale||(this.scale="rainbow",this.reverse=gn(e.reverse,!0)),this.scalePerModel={},this.structure.eachModel(function(t){r.domain=[t.atomOffset,t.atomEnd],r.scalePerModel[t.index]=r.getScale()})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.scalePerModel[t.modelIndex](t.index)},e}(pf);Hf.add("atomindex",Jb);var tx=function(t){function e(e){if(t.call(this,e),e.scale||(this.scale="OrRd"),!e.domain){var r,i=1/0,n=-1/0;e.sele&&(r=new Cf(e.sele)),this.structure.eachAtom(function(t){var e=t.bfactor;i=Math.min(i,e),n=Math.max(n,e)},r),this.domain=[i,n]}this.bfactorScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.bfactorScale(t.bfactor)},e}(pf);Hf.add("bfactor",tx);var ex=function(t){function e(e){t.call(this,e),e.scale||(this.scale="Spectral");var r={},i={};this.structure.eachModel(function(t){var e=0,n={};t.eachChain(function(t){void 0===n[t.chainid]&&(n[t.chainid]=e,e+=1)}),this.domain=[0,e-1],r[t.index]=n,i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){var e=r[t.modelIndex];return i[t.modelIndex](e[t.chainid])}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("chainid",ex);var rx=function(t){function e(e){if(t.call(this,e),e.scale||(this.scale="Spectral"),e.domain){var r=this.getScale();this.atomColor=function(t){return r(t.chainIndex)}}else{var i={};this.structure.eachModel(function(t){this.domain=[t.chainOffset,t.chainEnd],i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){return i[t.modelIndex](t.chainIndex)}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("chainindex",rx);var ix=function(t){function e(e){t.call(this,e),e.scale||(this.scale="Spectral");var r={},i={};this.structure.eachModel(function(t){var e=0,n={};t.eachChain(function(t){void 0===n[t.chainname]&&(n[t.chainname]=e,e+=1)}),this.domain=[0,e-1],r[t.index]=n,i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){var e=r[t.modelIndex];return i[t.modelIndex](e[t.chainname])}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("chainname",ix);var nx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="RdYlBu"),this.rsrzScale=this.getScale({domain:[2,0]}),this.rsccScale=this.getScale({domain:[.678,1]});var r=e.structure.validation||{};this.rsrzDict=r.rsrzDict||{},this.rsccDict=r.rsccDict||{}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){var e=t.resno;t.inscode&&(e+="^"+t.inscode),t.chainname&&(e+=":"+t.chainname),e+="/"+t.modelIndex;var r=this.rsrzDict[e];if(void 0!==r)return this.rsrzScale(r);var i=this.rsccDict[e];return void 0!==i?this.rsccScale(i):9474192},e}(pf);Hf.add("densityfit",nx);var ox={ARG:{CD:.1,CZ:.5,NE:-.1},ASN:{CG:.55,OD1:-.55},ASP:{CB:-.16,CG:.36,OD1:-.6,OD2:-.6},CYS:{CB:.19,SG:-.19},GLN:{CD:.55,OE1:-.55},GLU:{CD:.36,CG:-.16,OE1:-.6,OE2:-.6},HIS:{CB:.1,CD2:.2,CE1:.45,CG:.15,ND1:.05,NE2:.05},LYS:{CE:.25,NZ:.75},MET:{CE:.06,CG:.06,SD:-.12},PTR:{C:.55,CA:.1,CZ:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SEP:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SER:{CB:.25,OG:-.25},THR:{CB:.25,OG1:-.25},TPO:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,OG1:-1.1,O1P:-.85,O2P:-.85,O3P:-.85,P:1.4},TRP:{CD1:.06,CD2:.1,CE2:-.04,CE3:-.03,CG:-.03,NE1:-.06},TYR:{CZ:.25,OH:-.25},backbone:{C:.55,O:-.55,N:-.35,CA:.1}},ax=12,sx=1.04,cx=.25,ux=function(t){function e(e){function r(t){return t.isProtein()?ox[t.resname]&&ox[t.resname][t.atomname]||ox.backbone[t.atomname]||0:0}t.call(this,e),e.scale||(this.scale="rwb"),e.domain||(this.domain=[-.5,0,.5]);var i=this.getScale(),n=this.structure,o=new Float32Array(n.atomCount),a=[],s=[];n.eachAtom(function(t){if(o[t.index]=r(t)*t.occupancy,"N"===t.atomname){var e=$s(t);void 0!==e&&(a.push(e),s.push(cx*t.occupancy))}});var c=this.structure.getBoundingBox();c.expandByScalar(sx);var u=Hs(a),h=new Ya(u,c),l=new Ya(this.structure.atomStore,c),p=this.atomProxy,d=new g,f=ax*ax;this.positionColor=function(t){for(var e=0,r=l.within(t.x,t.y,t.z,ax),n=0;n=3?10813478:9474192},e}(pf);Hf.add("geoquality",fx);var mx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="RdYlGn");var r,i={};for(r in Fv)i[r]=Fv[r][0];if(!e.domain){var n,o=1/0,a=-1/0;for(r in i)n=i[r],o=Math.min(o,n),a=Math.max(a,n);this.domain=[o,0,a]}var s=this.getScale();this.atomColor=function(t){return s(i[t.resname]||Bv)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("hydrophobicity",mx);var gx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="rainbow"),e.domain||(this.domain=[0,this.structure.modelStore.count]);var r=this.getScale();this.atomColor=function(t){return r(t.modelIndex)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("modelindex",gx);var vx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){switch(t.residueType.moleculeType){case 1:return 3697840;case 2:return 15729279;case 3:return 12496596;case 4:return 16629894;case 5:return 12540695;case 6:return 8374655;default:return 16777113}},e}(pf);Hf.add("moleculetype",vx);var yx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="PuBu"),e.domain||(this.domain=[0,1]);var r=this.getScale();this.atomColor=function(t){return r(t.occupancy)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("occupancy",yx);var bx=function(t){function e(e){t.call(this,e),e.scale||(this.scale="rwb"),e.domain||(this.domain=[-1,1]),this.partialchargeScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.partialchargeScale(t.partialCharge)},e}(pf);Hf.add("partialcharge",bx);var xx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(){return Ws()},e.prototype.volumeColor=function(){return Ws()},e.prototype.positionColor=function(){return Ws()},e}(pf);Hf.add("random",xx);var _x=function(t){function e(e){var r=this;if(t.call(this,e),e.scale||(this.scale="rainbow",this.reverse=gn(e.reverse,!0)),e.domain){var i=this.getScale();this.atomColor=function(t){return i(t.residueIndex)}}else{var n={};this.structure.eachChain(function(t){r.domain=[t.residueOffset,t.residueEnd],n[t.index]=r.getScale()}),this.atomColor=function(t){return n[t.chainIndex](t.residueIndex)}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add("residueindex",_x);var wx={ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935,ASH:16711935,GLH:16711935,A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576,DA:10526975,DG:16740464,DI:8454143,DC:16747595,DT:10551200,DU:16744576},Sx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return wx[t.resname]||16711935},e}(pf);Hf.add("resname",Sx);var Ax={alphaHelix:16711808,threeTenHelix:10485888,piHelix:6291584,betaStrand:16762880,betaTurn:6324479,coil:16777215,dna:11403518,rna:16580962,carbohydrate:10921722},Mx=function(t){function e(e){t.call(this,e),this.rp=this.structure.getResidueProxy()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){var e=t.sstruc,r=this.rp;return"h"===e?Ax.alphaHelix:"g"===e?Ax.threeTenHelix:"i"===e?Ax.piHelix:"e"===e||"b"===e?Ax.betaStrand:"t"===e?Ax.betaTurn:(r.index=t.residueIndex,r.isDna()?Ax.dna:r.isRna()?Ax.rna:r.isSaccharide()?Ax.carbohydrate:r.isProtein()||"s"===e||"l"===e?Ax.coil:8421504)},e}(pf);Hf.add("sstruc",Mx);var Ex=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(){return this.value},e.prototype.bondColor=function(){return this.value},e.prototype.valueColor=function(){return this.value},e.prototype.volumeColor=function(){return this.value},e}(pf);Hf.add("uniform",Ex);var Tx=function(t){function e(e){t.call(this,e),this.valueScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.volumeColor=function(t){return this.valueScale(this.volume.data[t])},e}(pf);Hf.add("value",Tx);var Px=function(t){function e(e){t.call(this,e);var r=this.volume;if(r&&r.inverseMatrix){var i=this.getScale(),n=r.inverseMatrix,o=r.data,a=r.nx,s=r.ny,c=a*s,u=new g;this.positionColor=function(t){u.copy(t),u.applyMatrix4(n);var e=Math.floor(u.x),r=Math.floor(u.y),h=Math.floor(u.z),l=(h*s+r)*a+e,p=l+1,d=l+a,f=l+c,m=d+1,g=f+1,v=d+c,y=v+1,b=o[l],x=o[p],_=o[d],w=o[f],S=o[m],A=o[g],M=o[v],E=o[y],T=u.x-e,P=u.y-r,C=u.z-h,I=Qn(b,x,T),R=Qn(w,A,T),L=Qn(_,S,T),O=Qn(M,E,T),D=Qn(Qn(I,L,P),Qn(R,O,P),C);return i(D)}}else{var h=this.value;this.positionColor=function(){return h}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.positionColor=function(){},e}(pf);Hf.add("volume",Px);var Cx=function(t){function e(e,r,i){var n=this,o=i||{};o.name=gn(o.name,r.name),t.call(this,e,o),this.script=r,this.status="loaded",this.script.signals.nameChanged.add(function(t){n.setName(t)})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"script"},e.prototype.addRepresentation=function(){},e.prototype.removeRepresentation=function(){},e.prototype.run=function(){var t=this;this.setStatus("running"),this.script.call(this.stage).then(function(){t.setStatus("finished")}),this.setStatus("called")},e.prototype.dispose=function(){this.signals.disposed.dispatch()},e.prototype.setVisibility=function(){},e.prototype.getCenter=function(){},e.prototype.getZoom=function(){},e.prototype.getBox=function(){},Object.defineProperties(e.prototype,r),e}(jb);Kf.add("script",Cx);var Ix=function(t){function e(e,r,i){var n=i||{};n.name=gn(n.name,r.name),t.call(this,e,n),this.shape=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"shape"},e.prototype.addRepresentation=function(e,r){return t.prototype.addRepresentation.call(this,e,this.shape,r)},e.prototype.getBoxUntransformed=function(){return this.shape.boundingBox},e.prototype.getCenterUntransformed=function(){return this.shape.center},e.prototype.dispose=function(){this.shape.dispose(),t.prototype.dispose.call(this)},Object.defineProperties(e.prototype,r),e}(jb);Kf.add("shape",Ix);var Rx=function(t){function e(e,r,i,n){var o=this,a=i||{};a.name=gn(a.name,r.name),t.call(this,e,a),this.signals=Object.assign(this.signals,{frameChanged:new no,playerChanged:new no,countChanged:new no,parametersChanged:new no}),this.trajectory=r,this.parent=n,this.status="loaded",this.defaultStep=gn(a.defaultStep,void 0),this.defaultTimeout=gn(a.defaultTimeout,50),this.defaultInterpolateType=gn(a.defaultInterpolateType,""),this.defaultInterpolateStep=gn(a.defaultInterpolateStep,5),this.defaultMode=gn(a.defaultMode,"loop"),this.defaultDirection=gn(a.defaultDirection,"forward"),r.signals.frameChanged.add(function(t){o.signals.frameChanged.dispatch(t)}),r.signals.playerChanged.add(function(t){o.signals.playerChanged.dispatch(t)}),r.signals.countChanged.add(function(t){o.signals.countChanged.dispatch(t)}),void 0!==a.initialFrame&&this.setFrame(a.initialFrame)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"trajectory"},e.prototype.addRepresentation=function(e,r){return t.prototype.addRepresentation.call(this,e,this.trajectory,r)},e.prototype.setFrame=function(t){this.trajectory.setFrame(t)},e.prototype.setParameters=function(t){this.trajectory.setParameters(t),this.signals.parametersChanged.dispatch(t)},e.prototype.dispose=function(){this.trajectory.dispose(),t.prototype.dispose.call(this)},e.prototype.getCenter=function(){},Object.defineProperties(e.prototype,r),e}(jb),Lx=function(t){function e(e,r,i){var n=i||{};n.timeOffset=gn(n.timeOffset,e.timeOffset),n.deltaTime=gn(n.deltaTime,e.deltaTime),t.call(this,"",r,n),this.name=e.name,this.path=e.path,this.frames=e.coordinates,this.boxes=e.boxes,this._init(r)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"frames"},e.prototype._makeAtomIndices=function(){"StructureView"===this.structure.type?this.atomIndices=this.structure.getAtomIndices():this.atomIndices=null},e.prototype._loadFrame=function(t,e){var r,i=this.frames[t];if(this.atomIndices){var n=this.atomIndices,o=n.length;r=new Float32Array(3*o);for(var a=0;a0&&(i="( "+e.join(" ) AND ( ")+" )"),new Cf(i)},r.prototype.getStructure=function(){return this.structure.getStructure()},r.prototype.eachBond=function(t,e){this.structure.eachBond(t,this.getSelection(e))},r.prototype.eachAtom=function(t,e){var r=this.getAtomProxy(),i=this.getAtomSet(e),n=this.atomStore.count;if(i.getSize()0&&re)&&(s=!0,n.set(i.index),o.addBond(a,i,1))}s&&n.set(a.index)});var a=new bv(o.count,!0);return jf.timeEnd("Contact within"),{atomSet:n,bondSet:a,bondStore:o}};var qx=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="contact",this.parameters=Object.assign({contactType:{type:"select",rebuild:!0,options:{polar:"polar",polarBackbone:"polar backbone"}},maxDistance:{type:"number",precision:1,max:10,min:.1,rebuild:!0},maxAngle:{type:"integer",max:180,min:0,rebuild:!0},radialSegments:!0,disableImpostor:!0},this.parameters),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.radius=gn(r.radius,.25),this.contactType=gn(r.contactType,"polarBackbone"),this.maxDistance=gn(r.maxDistance,3.5),this.maxAngle=gn(r.maxAngle,40),t.prototype.init.call(this,r)},e.prototype.getContactData=function(t){return{polar:Zs,polarBackbone:Ks}[this.contactType](t,this.maxDistance,this.maxAngle)},e.prototype.getBondData=function(t,e,r){var i=t.getBondData(this.getBondParams(e,r));return i.picking&&(i.picking=new iv(i.picking.array,i.picking.structure,r.bondStore)),i},e.prototype.createData=function(t){var e=this.getContactData(t);return{bufferList:[new Nb(this.getBondData(t,void 0,{bondSet:e.bondSet,bondStore:e.bondStore}),this.getBufferParams({openEnded:!1,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0}))],bondSet:e.bondSet,bondStore:e.bondStore}},e.prototype.updateData=function(t,e){if(!t||t.position){var r=this.getContactData(e.sview);e.bondSet=r.bondSet,e.bondStore=r.bondStore}var i={bondSet:e.bondSet,bondStore:e.bondStore},n=this.getBondData(e.sview,t,i),o={};t&&!t.position||(o.position=Do(n.position1,n.position2),o.position1=n.position1,o.position2=n.position2),t&&!t.color||(o.color=n.color,o.color2=n.color2),t&&!t.radius||(o.radius=n.radius),e.bufferList[0].setAttributes(o)},e}(Eb);Xf.add("contact",qx),Yf.add("shader/SDFFont.vert","uniform float nearClip;\nuniform float clipRadius;\nuniform vec3 clipCenter;\nuniform float xOffset;\nuniform float yOffset;\nuniform float zOffset;\nuniform bool ortho;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvarying vec3 vViewPosition;\n#endif\nvarying vec2 texCoord;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#else\n#include color_pars_vertex\n#endif\nattribute vec2 mapping;\nattribute vec2 inputTexCoord;\nattribute float inputSize;\n#include matrix_scale\n#include common\nvoid main(void){\n#if defined( PICKING )\nvPickingColor = unpackColor( primitiveId );\n#else\n#include color_vertex\n#endif\ntexCoord = inputTexCoord;\nfloat scale = matrixScale( modelViewMatrix );\nfloat _zOffset = zOffset * scale;\nif( texCoord.x == 10.0 ){\n_zOffset -= 0.001;\n}\nvec3 pos = position;\nif( ortho ){\npos += normalize( cameraPosition ) * _zOffset;\n}\nvec4 cameraPos = modelViewMatrix * vec4( pos, 1.0 );\nvec4 cameraCornerPos = vec4( cameraPos.xyz, 1.0 );\ncameraCornerPos.xy += mapping * inputSize * 0.01 * scale;\ncameraCornerPos.x += xOffset * scale;\ncameraCornerPos.y += yOffset * scale;\nif( !ortho ){\ncameraCornerPos.xyz += normalize( -cameraCornerPos.xyz ) * _zOffset;\n}\ngl_Position = projectionMatrix * cameraCornerPos;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\nvViewPosition = -cameraCornerPos.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n#include radiusclip_vertex\n}"),Yf.add("shader/SDFFont.frag","uniform sampler2D fontTexture;\nuniform float opacity;\nuniform bool showBorder;\nuniform vec3 borderColor;\nuniform float borderWidth;\nuniform vec3 backgroundColor;\nuniform float backgroundOpacity;\nuniform float nearClip;\nuniform float clipRadius;\nvarying vec3 vViewPosition;\nvarying vec2 texCoord;\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\n#if defined( PICKING )\nuniform float objectId;\nvarying vec3 vPickingColor;\nconst vec3 vColor = vec3( 0.0 );\n#else\n#include common\n#include color_pars_fragment\n#include fog_pars_fragment\n#endif\n#ifdef SDF\nconst float smoothness = 16.0;\n#else\nconst float smoothness = 256.0;\n#endif\nconst float gamma = 2.2;\nvoid main(){\n#include nearclip_fragment\n#include radiusclip_fragment\nif( texCoord.x > 1.0 ){\ngl_FragColor = vec4( backgroundColor, backgroundOpacity );\n}else{\nfloat sdf = texture2D( fontTexture, texCoord ).a;\nif( showBorder ) sdf += borderWidth;\nfloat w = clamp(\nsmoothness * ( abs( dFdx( texCoord.x ) ) + abs( dFdy( texCoord.y ) ) ),\n0.0,\n0.5\n);\nfloat a = smoothstep( 0.5 - w, 0.5 + w, sdf );\na = pow( a, 1.0 / gamma );\nif( a < 0.2 ) discard;\na *= opacity;\nvec3 outgoingLight = vColor;\nif( showBorder && sdf < ( 0.5 + borderWidth ) ){\noutgoingLight = borderColor;\n}\ngl_FragColor = vec4( outgoingLight, a );\n}\n#if defined( PICKING )\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var Yx={},Zx=function(t){var e=Object.assign({},t);if(this.font=gn(e.font,["sans-serif"]),this.size=gn(e.size,36),this.style=gn(e.style,"normal"),this.variant=gn(e.variant,"normal"),this.weight=gn(e.weight,"normal"),this.outline=gn(e.outline,0),this.width=gn(e.width,2048),this.height=gn(e.height,2048),this.gamma=1,"undefined"!=typeof navigator){var r=navigator.userAgent;r.match(/Chrome/)&&r.match(/OS X/)&&(this.gamma=.5)}this.mapped={},this.scratchW=0,this.scratchH=0,this.currentX=0,this.currentY=0,this.build(),this.populate(),this.texture=new Fe(this.canvas2),this.texture.flipY=!1,this.texture.needsUpdate=!0};Zx.prototype.build=function(){var t=this.size+2*this.outline+Math.round(this.size/4),e=this.width/4,r=document.createElement("canvas");r.width=e,r.height=t;var i=r.getContext("2d");i.font=this.style+" "+this.variant+" "+this.weight+" "+this.size+"px "+this.font,i.fillStyle="#FF0000",i.textAlign="left",i.textBaseline="bottom",i.lineJoin="round";for(var n=[],o=3*this.outline,a=0;athis.width&&(this.currentX=0,this.currentY+=this.scratchH),this.currentY+this.scratchH>this.height&&console.warn("canvas to small"),this.mapped[t]={x:this.currentX,y:this.currentY,w:this.scratchW,h:this.scratchH},this.context2.drawImage(this.canvas,0,0,this.scratchW,this.scratchH,this.currentX,this.currentY,this.scratchW,this.scratchH),this.currentX+=this.scratchW),this.mapped[t]},Zx.prototype.get=function(t){return this.mapped[t]||this.placeholder},Zx.prototype.draw=function(t){var e=this.lineHeight,r=this.outline,i=this.context,n=this.scratch,o=this.maxWidth,a=this.colors,s=r,c=e-this.outline,u=i.measureText(t),h=Math.min(o,Math.ceil(u.width+2*s+1));i.clearRect(0,0,h,e);var l,p,d,f,m;if(0===this.outline)for(i.fillText(t,s,c),d=3,l=0,p=(m=(f=i.getImageData(0,0,h,e)).data).length/4;l0;--l)d=l>1?2*l-2:l,i.strokeStyle=a[d-1],i.lineWidth=d,i.strokeText(t,s,c);i.globalCompositeOperation="multiply",i.fillStyle="#FF00FF",i.fillText(t,s,c),m=(f=i.getImageData(0,0,h,e)).data,d=0;var g=this.gamma;for(l=0,p=m.length/4;l0&&(r-=h,n=n.subarray(0,3*r));var l=new bv(s.count,!0);return{text:i,position:n,bondSet:l,bondStore:s}},e.prototype.getBondData=function(t,e,r){var i=t.getBondData(this.getBondParams(e,r));return i.picking&&(i.picking=new av(i.picking.array,i.picking.structure,r.bondStore)),i},e.prototype.create=function(){if(0!==this.structureView.atomCount){var t=this.atomPair.length;if(0!==t){var e=this.getDistanceData(this.structureView,this.atomPair),r=new tt(this.labelColor);this.textBuffer=new Kx({position:e.position,size:No(t,this.labelSize),color:ko(t,r.r,r.g,r.b),text:e.text},this.getBufferParams({fontFamily:this.fontFamily,fontStyle:this.fontStyle,fontWeight:this.fontWeight,sdf:this.sdf,zOffset:this.labelZOffset,opacity:1,visible:this.labelVisible}));var i={bondSet:e.bondSet,bondStore:e.bondStore},n=this.getBondData(this.structureView,void 0,i);this.cylinderBuffer=new Nb(n,this.getBufferParams({openEnded:!1,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0})),this.dataList.push({sview:this.structureView,bondSet:e.bondSet,bondStore:e.bondStore,position:e.position,bufferList:[this.textBuffer,this.cylinderBuffer]})}}},e.prototype.update=function(e){e.position?this.build():t.prototype.update.call(this,e)},e.prototype.updateData=function(t,e){var r={bondSet:e.bondSet,bondStore:e.bondStore},i=this.getBondData(e.sview,t,r),n={},o={},a=this.atomPair.length;if(t.labelSize&&(o.size=No(a,this.labelSize)),t.labelColor){var s=new tt(this.labelColor);o.color=ko(a,s.r,s.g,s.b)}t.color&&(n.color=i.color,n.color2=i.color2),(t.radius||t.scale)&&(n.radius=i.radius),this.textBuffer.setAttributes(o),this.cylinderBuffer.setAttributes(n)},e.prototype.setVisibility=function(e,r){return t.prototype.setVisibility.call(this,e,!0),this.textBuffer&&this.textBuffer.setVisibility(this.labelVisible&&this.visible),r||this.viewer.requestRender(),this},e.prototype.setParameters=function(e){var r={};return e&&e.labelSize&&(r.labelSize=!0),e&&(e.labelColor||0===e.labelColor)&&(r.labelColor=!0),t.prototype.setParameters.call(this,e,r,!1),e&&void 0!==e.labelVisible&&this.setVisibility(this.visible),this},e}(Eb);Xf.add("distance",Qx);var Jx=function(t){function e(e,r){var i=r||{},n=2*(e.position.length/3),o=new tt(gn(i.color,"grey")),a=new Float32Array(3*n),s=ko(n,o.r,o.g,o.b);t.call(this,{position:a,color:s},i),this.scale=gn(i.scale,1),this.setAttributes(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n=this.geometry.attributes;t.position&&t.vector&&(e=t.position,r=t.vector,i=n.position.array,n.position.needsUpdate=!0);var o,a,s=this.size/2,c=this.scale;if(t.position&&t.vector)for(var u=0;u radius2) {\nspaceposition.y = mapping.y * 1.5 * radius1;\nspaceposition.x = mapping.x * 1.5 * radius1;\n} else {\nspaceposition.y = mapping.y * 1.5 * radius2;\nspaceposition.x = mapping.x * 1.5 * radius2;\n}\nspaceposition.w = 1.0;\nvec4 e3 = vec4( 1.0 );\nvec3 e1, e1_temp, e2, e2_temp;\ne3.xyz = normalize(position_atom1-position_atom2);\nif (e3.z == 0.0) { e3.z = 0.0000000000001;}\nif ( (position_atom1.x - position_atom2.x) == 0.0) { position_atom1.x += 0.001;}\nif ( (position_atom1.y - position_atom2.y) == 0.0) { position_atom1.y += 0.001;}\nif ( (position_atom1.z - position_atom2.z) == 0.0) { position_atom1.z += 0.001;}\nvec4 focus = vec4( 1.0 );\nfocus.x = ( position_atom1.x*position_atom1.x - position_atom2.x*position_atom2.x +\n( radius2*radius2 - radius1*radius1 )*e3.x*e3.x/shrink )/(2.0*(position_atom1.x - position_atom2.x));\nfocus.y = ( position_atom1.y*position_atom1.y - position_atom2.y*position_atom2.y +\n( radius2*radius2 - radius1*radius1 )*e3.y*e3.y/shrink )/(2.0*(position_atom1.y - position_atom2.y));\nfocus.z = ( position_atom1.z*position_atom1.z - position_atom2.z*position_atom2.z +\n( radius2*radius2 - radius1*radius1 )*e3.z*e3.z/shrink )/(2.0*(position_atom1.z - position_atom2.z));\ne1.x = 1.0;\ne1.y = 1.0;\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\ne1_temp = e1 - focus.xyz;\ne1 = normalize(e1_temp);\ne2_temp = e1.yzx * e3.zxy - e1.zxy * e3.yzx;\ne2 = normalize(e2_temp);\nmat3 R= mat3( e1.xyz, e2.xyz, e3.xyz );\nvertex_position.xyz = R * spaceposition.xyz;\nvertex_position.w = 1.0;\nvertex_position.x += (position_atom1.x+position_atom2.x) / 2.0;\nvertex_position.y += (position_atom1.y+position_atom2.y) / 2.0;\nvertex_position.z += (position_atom1.z+position_atom2.z) / 2.0;\ngl_Position = modelViewProjectionMatrix * vertex_position;\nvec4 i_near, i_far;\nvec4 near = gl_Position;\nnear.z = 0.0 ;\nnear = modelViewProjectionMatrixInverse * near;\ni_near = near;\nvec4 far = gl_Position;\nfar.z = far.w ;\ni_far = modelViewProjectionMatrixInverse * far;\nprime1 = vec4( position_atom1 - (position_atom1 - focus.xyz)*shrink, 1.0 );\nprime2 = vec4( position_atom2 - (position_atom2 - focus.xyz)*shrink, 1.0 );\nfloat Rsquare = (radius1*radius1/shrink) - (\n(position_atom1.x - focus.x)*(position_atom1.x - focus.x) +\n(position_atom1.y - focus.y)*(position_atom1.y - focus.y) +\n(position_atom1.z - focus.z)*(position_atom1.z - focus.z)\n);\nfocus.w = Rsquare;\nmatrix_near = mat4( i_near, i_far, focus, e3 );\ngl_Position.z = 1.0;\n}"),Yf.add("shader/HyperballStickImpostor.frag","#define STANDARD\n#define IMPOSTOR\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float nearClip;\nuniform float shrink;\nuniform mat4 modelViewMatrix;\nuniform mat4 modelViewProjectionMatrix;\nuniform mat4 modelViewMatrixInverseTranspose;\nuniform mat4 projectionMatrix;\nvarying mat4 matrix_near;\nvarying vec4 prime1;\nvarying vec4 prime2;\nvarying float vRadius;\nvarying float vRadius2;\n#ifdef PICKING\nuniform float objectId;\nvarying vec3 vPickingColor;\n#else\nvarying vec3 vColor1;\nvarying vec3 vColor2;\n#include common\n#include fog_pars_fragment\n#include bsdfs\n#include lights_pars\n#include lights_physical_pars_fragment\n#endif\nbool interior = false;\nfloat calcClip( vec4 cameraPos ){\nreturn dot( cameraPos, vec4( 0.0, 0.0, 1.0, nearClip - 0.5 ) );\n}\nfloat calcClip( vec3 cameraPos ){\nreturn calcClip( vec4( cameraPos, 1.0 ) );\n}\nfloat calcDepth( in vec3 cameraPos ){\nvec2 clipZW = cameraPos.z * projectionMatrix[2].zw + projectionMatrix[3].zw;\nreturn 0.5 + 0.5 * clipZW.x / clipZW.y;\n}\nstruct Ray {\nvec3 origin ;\nvec3 direction ;\n};\nbool cutoff_plane (vec3 M, vec3 cutoff, vec3 x3){\nfloat a = x3.x;\nfloat b = x3.y;\nfloat c = x3.z;\nfloat d = -x3.x*cutoff.x-x3.y*cutoff.y-x3.z*cutoff.z;\nfloat l = a*M.x+b*M.y+c*M.z+d;\nif (l<0.0) {return true;}\nelse{return false;}\n}\nvec3 isect_surf(Ray r, mat4 matrix_coef){\nvec4 direction = vec4(r.direction, 0.0);\nvec4 origin = vec4(r.origin, 1.0);\nfloat a = dot(direction,(matrix_coef*direction));\nfloat b = dot(origin,(matrix_coef*direction));\nfloat c = dot(origin,(matrix_coef*origin));\nfloat delta =b*b-a*c;\ngl_FragColor.a = 1.0;\nif (delta<0.0){\ndiscard;\n}\nfloat t1 =(-b-sqrt(delta))/a;\nreturn r.origin+t1*r.direction;\n}\nvec3 isect_surf2(Ray r, mat4 matrix_coef){\nvec4 direction = vec4(r.direction, 0.0);\nvec4 origin = vec4(r.origin, 1.0);\nfloat a = dot(direction,(matrix_coef*direction));\nfloat b = dot(origin,(matrix_coef*direction));\nfloat c = dot(origin,(matrix_coef*origin));\nfloat delta =b*b-a*c;\ngl_FragColor.a = 1.0;\nif (delta<0.0){\ndiscard;\n}\nfloat t2 =(-b+sqrt(delta))/a;\nreturn r.origin+t2*r.direction;\n}\nRay primary_ray(vec4 near1, vec4 far1){\nvec3 near=near1.xyz/near1.w;\nvec3 far=far1.xyz/far1.w;\nreturn Ray(near,far-near);\n}\nfloat update_z_buffer(vec3 M, mat4 ModelViewP){\nfloat depth1;\nvec4 Ms=(ModelViewP*vec4(M,1.0));\nreturn depth1=(1.0+Ms.z/Ms.w)/2.0;\n}\nvoid main(){\nfloat radius = max( vRadius, vRadius2 );\nvec4 i_near, i_far, focus;\nvec3 e3, e1, e1_temp, e2;\ni_near = vec4(matrix_near[0][0],matrix_near[0][1],matrix_near[0][2],matrix_near[0][3]);\ni_far = vec4(matrix_near[1][0],matrix_near[1][1],matrix_near[1][2],matrix_near[1][3]);\nfocus = vec4(matrix_near[2][0],matrix_near[2][1],matrix_near[2][2],matrix_near[2][3]);\ne3 = vec3(matrix_near[3][0],matrix_near[3][1],matrix_near[3][2]);\ne1.x = 1.0;\ne1.y = 1.0;\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\ne1_temp = e1 - focus.xyz;\ne1 = normalize(e1_temp);\ne2 = normalize(cross(e1,e3));\nvec4 equation = focus;\nfloat shrinkfactor = shrink;\nfloat t1 = -1.0/(1.0-shrinkfactor);\nfloat t2 = 1.0/(shrinkfactor);\nvec4 colonne1, colonne2, colonne3, colonne4;\nmat4 mat;\nvec3 equation1 = vec3(t2,t2,t1);\nfloat A1 = - e1.x*equation.x - e1.y*equation.y - e1.z*equation.z;\nfloat A2 = - e2.x*equation.x - e2.y*equation.y - e2.z*equation.z;\nfloat A3 = - e3.x*equation.x - e3.y*equation.y - e3.z*equation.z;\nfloat A11 = equation1.x*e1.x*e1.x + equation1.y*e2.x*e2.x + equation1.z*e3.x*e3.x;\nfloat A21 = equation1.x*e1.x*e1.y + equation1.y*e2.x*e2.y + equation1.z*e3.x*e3.y;\nfloat A31 = equation1.x*e1.x*e1.z + equation1.y*e2.x*e2.z + equation1.z*e3.x*e3.z;\nfloat A41 = equation1.x*e1.x*A1 + equation1.y*e2.x*A2 + equation1.z*e3.x*A3;\nfloat A22 = equation1.x*e1.y*e1.y + equation1.y*e2.y*e2.y + equation1.z*e3.y*e3.y;\nfloat A32 = equation1.x*e1.y*e1.z + equation1.y*e2.y*e2.z + equation1.z*e3.y*e3.z;\nfloat A42 = equation1.x*e1.y*A1 + equation1.y*e2.y*A2 + equation1.z*e3.y*A3;\nfloat A33 = equation1.x*e1.z*e1.z + equation1.y*e2.z*e2.z + equation1.z*e3.z*e3.z;\nfloat A43 = equation1.x*e1.z*A1 + equation1.y*e2.z*A2 + equation1.z*e3.z*A3;\nfloat A44 = equation1.x*A1*A1 + equation1.y*A2*A2 + equation1.z*A3*A3 - equation.w;\ncolonne1 = vec4(A11,A21,A31,A41);\ncolonne2 = vec4(A21,A22,A32,A42);\ncolonne3 = vec4(A31,A32,A33,A43);\ncolonne4 = vec4(A41,A42,A43,A44);\nmat = mat4(colonne1,colonne2,colonne3,colonne4);\nRay ray = primary_ray(i_near,i_far) ;\nvec3 M;\nM = isect_surf(ray, mat);\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\nvec4 M1 = vec4(M,1.0);\nvec4 M2 = mat*M1;\nvec3 _normal = ( modelViewMatrixInverseTranspose * M2 ).xyz;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\n#ifdef NEAR_CLIP\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 ){\nM = isect_surf2(ray, mat);\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 )\ndiscard;\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / radius ) );\n}\n}else if( gl_FragDepthEXT <= 0.0 ){\nM = isect_surf2(ray, mat);\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix);\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\n}\n}\n#else\nif( gl_FragDepthEXT <= 0.0 ){\nM = isect_surf2(ray, mat);\ninterior = true;\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\nif( gl_FragDepthEXT >= 0.0 ){\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\n}\n}\n#endif\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\nif (gl_FragDepthEXT < 0.0)\ndiscard;\nif (gl_FragDepthEXT > 1.0)\ndiscard;\nfloat distance_ratio = ((M.x-prime2.x)*e3.x + (M.y-prime2.y)*e3.y +(M.z-prime2.z)*e3.z) /\ndistance(prime2.xyz,prime1.xyz);\n#ifdef PICKING\ngl_FragColor = vec4( vPickingColor, objectId );\n#else\nvec3 vViewPosition = -( modelViewMatrix * vec4( M, 1.0 ) ).xyz;\nvec3 vNormal = _normal;\nvec3 vColor;\nif( distance_ratio>0.5 ){\nvColor = vColor1;\n}else{\nvColor = vColor2;\n}\nvec4 diffuseColor = vec4( diffuse, opacity );\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\nvec3 totalEmissiveLight = emissive;\n#include color_fragment\n#include roughnessmap_fragment\n#include metalnessmap_fragment\nvec3 normal = normalize( vNormal );\nif( interior ){\nnormal = vec3( 0.0, 0.0, 0.4 );\n}\n#include lights_physical_fragment\n#include lights_template\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n#include premultiplied_alpha_fragment\n#include tonemapping_fragment\n#include encodings_fragment\n#include fog_fragment\n#endif\n}");var r_=new Float32Array([-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1]),i_=new Uint16Array([0,1,2,0,2,3,1,5,6,1,6,2,4,6,5,4,7,6,0,7,4,0,3,7,0,5,1,0,4,5,3,2,6,3,6,7]),n_=function(t){function e(e,r){t.call(this,e,r);var i=e||{},n=gn((r||{}).shrink,.14);this.addUniforms({modelViewProjectionMatrix:{value:new v},modelViewProjectionMatrixInverse:{value:new v},modelViewMatrixInverseTranspose:{value:new v},shrink:{value:n}}),this.addAttributes({position1:{type:"v3",value:null},position2:{type:"v3",value:null},color2:{type:"c",value:null},radius:{type:"f",value:null},radius2:{type:"f",value:null}}),this.setAttributes(i),this.makeMapping()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},isImpostor:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{shrink:{uniform:!0}},t.prototype.parameters)},r.isImpostor.get=function(){return!0},r.vertexShader.get=function(){return"HyperballStickImpostor.vert"},r.fragmentShader.get=function(){return"HyperballStickImpostor.frag"},Object.defineProperties(e.prototype,r),e}(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.mapping.get=function(){return r_},r.mappingIndices.get=function(){return i_},r.mappingIndicesSize.get=function(){return 36},r.mappingType.get=function(){return"v3"},r.mappingSize.get=function(){return 8},r.mappingItemSize.get=function(){return 3},Object.defineProperties(e.prototype,r),e}(db)),o_=function(t,e){return!Uf||e&&e.disableImpostor?(t.radius=Uo(t.radius,t.radius2),new Rb(t,e)):new n_(t,e)},a_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="hyperball",this.parameters=Object.assign({shrink:{type:"number",precision:3,max:1,min:.001,buffer:!0}},this.parameters,{multipleBond:null,bondSpacing:null})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.scale=gn(r.scale,.2),r.radius=gn(r.radius,"vdw"),this.shrink=gn(r.shrink,.12),t.prototype.init.call(this,r)},e.prototype.getBondParams=function(e,r){return e&&!e.radius||(r=Object.assign({radius2:!0},r)),t.prototype.getBondParams.call(this,e,r)},e.prototype.createData=function(t){var e=new yb(t.getAtomData(this.getAtomParams()),this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!0}));return this.__center=new Float32Array(3*t.bondCount),{bufferList:[e,new o_(t.getBondData(this.getBondParams()),this.getBufferParams({shrink:this.shrink,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams()),i=e.sview.getBondData(this.getBondParams()),n={},o={};if(!t||t.position){n.position=r.position;var a=i.position1,s=i.position2;o.position=Do(a,s,this.__center),o.position1=a,o.position2=s}t&&!t.color||(n.color=r.color,o.color=i.color,o.color2=i.color2),t&&!t.radius||(n.radius=r.radius,o.radius=i.radius,o.radius2=i.radius2),e.bufferList[0].setAttributes(n),e.bufferList[1].setAttributes(o)},e}(e_);Xf.add("hyperball",a_),Js.prototype={constructor:Js,atomLabel:function(t){var e;switch(this.type){case"atomname":e=t.atomname;break;case"atomindex":e=""+t.index;break;case"occupancy":e=t.occupancy.toFixed(2);break;case"bfactor":e=t.bfactor.toFixed(2);break;case"serial":e=""+t.serial;break;case"element":e=t.element;break;case"atom":e=t.atomname+"|"+t.index;break;case"resname":e=t.resname;break;case"resno":e=""+t.resno;break;case"res":var r=t.resname.toUpperCase();e=(zv[r]||r)+t.resno;break;case"text":e=this.text[t.index];break;default:e=t.qualifiedName()}return void 0===e?"":e}},Js.types={"":"",atomname:"atom name",atomindex:"atom index",occupancy:"occupancy",bfactor:"b-factor",serial:"serial",element:"element",atom:"atom name + index",resname:"residue name",resno:"residue no",res:"residue name + no",text:"text",qualified:"qualified name"};var s_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="label",this.parameters=Object.assign({labelType:{type:"select",options:Js.types,rebuild:!0},labelText:{type:"hidden",rebuild:!0},fontFamily:{type:"select",options:{"sans-serif":"sans-serif",monospace:"monospace",serif:"serif"},buffer:!0},fontStyle:{type:"select",options:{normal:"normal",italic:"italic"},buffer:!0},fontWeight:{type:"select",options:{normal:"normal",bold:"bold"},buffer:!0},sdf:{type:"boolean",buffer:!0},xOffset:{type:"number",precision:1,max:20,min:-20,buffer:!0},yOffset:{type:"number",precision:1,max:20,min:-20,buffer:!0},zOffset:{type:"number",precision:1,max:20,min:-20,buffer:!0},attachment:{type:"select",options:{"bottom-left":"bottom-left","bottom-center":"bottom-center","bottom-right":"bottom-right","middle-left":"middle-left","middle-center":"middle-center","middle-right":"middle-right","top-left":"top-left","top-center":"top-center","top-right":"top-right"},rebuild:!0},showBorder:{type:"boolean",buffer:!0},borderColor:{type:"color",buffer:!0},borderWidth:{type:"number",precision:2,max:.3,min:0,buffer:!0},showBackground:{type:"boolean",rebuild:!0},backgroundColor:{type:"color",buffer:!0},backgroundMargin:{type:"number",precision:2,max:2,min:0,rebuild:!0},backgroundOpacity:{type:"range",step:.01,max:1,min:0,buffer:!0}},this.parameters,{side:null,flatShaded:null,wireframe:null,linewidth:null,roughness:null,metalness:null,diffuse:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.labelType=gn(r.labelType,"res"),this.labelText=gn(r.labelText,{}),this.fontFamily=gn(r.fontFamily,"sans-serif"),this.fontStyle=gn(r.fontStyle,"normal"),this.fontWeight=gn(r.fontWeight,"bold"),this.sdf=gn(r.sdf,"Chrome"===Ff),this.xOffset=gn(r.xOffset,0),this.yOffset=gn(r.yOffset,0),this.zOffset=gn(r.zOffset,.5),this.attachment=gn(r.attachment,"bottom-left"),this.showBorder=gn(r.showBorder,!1),this.borderColor=gn(r.borderColor,"lightgrey"),this.borderWidth=gn(r.borderWidth,.15),this.showBackground=gn(r.showBackground,!1),this.backgroundColor=gn(r.backgroundColor,"lightgrey"),this.backgroundMargin=gn(r.backgroundMargin,.5),this.backgroundOpacity=gn(r.backgroundOpacity,1),t.prototype.init.call(this,r)},e.prototype.createData=function(t){var e={position:!0,color:!0,radius:!0},r=t.getAtomData(this.getAtomParams(e)),i=[],n=new Js(this.labelType,this.labelText);return t.eachAtom(function(t){i.push(n.atomLabel(t))}),{bufferList:[new Kx({position:r.position,size:r.radius,color:r.color,text:i},this.getBufferParams({fontFamily:this.fontFamily,fontStyle:this.fontStyle,fontWeight:this.fontWeight,sdf:this.sdf,xOffset:this.xOffset,yOffset:this.yOffset,zOffset:this.zOffset,attachment:this.attachment,showBorder:this.showBorder,borderColor:this.borderColor,borderWidth:this.borderWidth,showBackground:this.showBackground,backgroundColor:this.backgroundColor,backgroundMargin:this.backgroundMargin,backgroundOpacity:this.backgroundOpacity}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams(t)),i={};t&&!t.position||(i.position=r.position),t&&!t.radius||(i.size=r.radius),t&&!t.color||(i.color=r.color),e.bufferList[0].setAttributes(i)},e}(Eb);Xf.add("label",s_);var c_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="line",this.parameters=Object.assign({multipleBond:{type:"select",rebuild:!0,options:{off:"off",symmetric:"symmetric",offset:"offset"}},bondSpacing:{type:"number",precision:2,max:2,min:.5}},this.parameters,{flatShaded:null,side:null,wireframe:null,roughness:null,metalness:null,diffuse:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.multipleBond=gn(r.multipleBond,"off"),this.bondSpacing=gn(r.bondSpacing,1),t.prototype.init.call(this,r)},e.prototype.getBondParams=function(e,r){return r=Object.assign({multipleBond:this.multipleBond,bondSpacing:this.bondSpacing,radiusParams:{radius:.1,scale:1}},r),t.prototype.getBondParams.call(this,e,r)},e.prototype.createData=function(t){var e={position:!0,color:!0},r=t.getBondData(this.getBondParams(e));return{bufferList:[new kb(r,this.getBufferParams())]}},e.prototype.updateData=function(t,e){var r=e.sview.getBondData(this.getBondParams(t)),i={};t&&!t.position||(i.position1=r.position1,i.position2=r.position2),t&&!t.color||(i.color=r.color,i.color2=r.color2),e.bufferList[0].setAttributes(i)},e.prototype.setParameters=function(e){var r={};return e&&e.bondSpacing&&(r.position=!0),t.prototype.setParameters.call(this,e,r,!1),this},e}(Eb);Xf.add("line",c_),ec.__deps=[os,ns,as,ca,tc],ic.__deps=[os,as,No,ca,ya,da,ba,rc,gn],$f.add("molsurf",function(t,e){var r=t.data.args,i=t.data.params;if(r&&i){var n=new("av"===i.type?ic:ec)(r.coordList,r.radiusList,r.indexList).getSurface(i.type,i.probeRadius,i.scaleFactor,i.cutoff,!0,i.smooth,i.contour),o=[n.position.buffer,n.index.buffer];n.normal&&o.push(n.normal.buffer),n.atomindex&&o.push(n.atomindex.buffer),e({sd:n,p:i},o)}},[ec,ic]);var u_=function(t){this.structure=t};u_.prototype._getAtomData=function(){return this.structure.getAtomData({what:{position:!0,radius:!0,index:!0},radiusParams:{radius:"vdw",scale:1}})},u_.prototype._makeSurface=function(t,e){var r=new ey(e.name,"",t);return r.info.type=e.type,r.info.probeRadius=e.probeRadius,r.info.scaleFactor=e.scaleFactor,r.info.smooth=e.smooth,r.info.cutoff=e.cutoff,r},u_.prototype.getSurface=function(t){var e=t||{},r=this._getAtomData(),i=r.position,n=r.radius,o=r.index,a=new("av"===e.type?ic:ec)(i,n,o).getSurface(e.type,e.probeRadius,e.scaleFactor,e.cutoff,!0,e.smooth,e.contour);return this._makeSurface(a,e)},u_.prototype.getSurfaceWorker=function(t,e){var r=this,i=Object.assign({},t);if(window.Worker){void 0===this.worker&&(this.worker=new Za("molsurf"));var n=this._getAtomData(),o=n.position,a=n.radius,s=n.index,c={args:{coordList:o,radiusList:a,indexList:s},params:i},u=[o.buffer,a.buffer,s.buffer];this.worker.post(c,u,function(t){e(r._makeSurface(t.data.sd,i))},function(t){console.warn("MolecularSurface.getSurfaceWorker error - trying without worker",t),r.worker.terminate(),r.worker=void 0;var n=r.getSurface(i);e(n)})}else{var h=this.getSurface(i);e(h)}},u_.prototype.dispose=function(){this.worker&&this.worker.terminate()};var h_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="surface",this.parameters=Object.assign({surfaceType:{type:"select",rebuild:!0,options:{vws:"vws",sas:"sas",ms:"ms",ses:"ses",av:"av"}},probeRadius:{type:"number",precision:1,max:20,min:0,rebuild:!0},smooth:{type:"integer",precision:1,max:10,min:0,rebuild:!0},scaleFactor:{type:"number",precision:1,max:5,min:0,rebuild:!0},cutoff:{type:"number",precision:2,max:50,min:0,rebuild:!0},contour:{type:"boolean",rebuild:!0},background:{type:"boolean",rebuild:!0},opaqueBack:{type:"boolean",buffer:!0},filterSele:{type:"text",rebuild:!0},colorVolume:{type:"hidden"},useWorker:{type:"boolean",rebuild:!0}},this.parameters,{radiusType:null,radius:null,scale:null}),this.__infoList=[],this.structure.signals.refreshed.add(function(){this.__forceNewMolsurf=!0},this),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,"uniform"),r.colorValue=gn(r.colorValue,14540253),r.disablePicking=gn(r.disablePicking,!0),this.surfaceType=gn(r.surfaceType,"ms"),this.probeRadius=gn(r.probeRadius,1.4),this.smooth=gn(r.smooth,2),this.scaleFactor=gn(r.scaleFactor,2),this.cutoff=gn(r.cutoff,0),this.contour=gn(r.contour,!1),this.background=gn(r.background,!1),this.opaqueBack=gn(r.opaqueBack,!0),this.filterSele=gn(r.filterSele,""),this.colorVolume=gn(r.colorVolume,void 0),this.useWorker=gn(r.useWorker,!0),t.prototype.init.call(this,e)},e.prototype.prepareData=function(t,e,r){var i=this.__infoList[e];if(i||(i={},this.__infoList[e]=i),i.molsurf&&i.sele===t.selection.string)r(e);else{if(this.filterSele){var n=t.structure.getView(new Cf(this.filterSele)),o=n.boundingBox.getSize(),a=Math.max(o.x,o.y,o.z),s=t.getAtomSetWithinPoint(n.center,a/2+6);t=t.getView(new Cf(t.getAtomSetWithinSelection(s,3).toSeleString()))}i.sele=t.selection.string,i.molsurf=new u_(t);var c=this.getSurfaceParams(),u=function(t){i.surface=t,r(e)};this.useWorker?i.molsurf.getSurfaceWorker(c,u):u(i.molsurf.getSurface(c))}},e.prototype.prepare=function(t){var e=this;if((this.__forceNewMolsurf||this.__sele!==this.selection.string||this.__surfaceParams!==JSON.stringify(this.getSurfaceParams()))&&(this.__infoList.forEach(function(t){t.molsurf.dispose()}),this.__infoList.length=0),0===this.structureView.atomCount)return void t();var r=function(){this.__sele=this.selection.string,this.__surfaceParams=JSON.stringify(this.getSurfaceParams()),this.__forceNewMolsurf=!1,t()}.bind(this),i="default"===this.assembly?this.defaultAssembly:this.assembly,n=this.structure.biomolDict[i];n?n.partList.forEach(function(t,i){var o=t.getView(e.structureView);e.prepareData(o,i,function(t){t===n.partList.length-1&&r()})}):this.prepareData(this.structureView,0,r)},e.prototype.createData=function(t,e){var r=this.__infoList[e],i=r.surface,n={position:i.getPosition(),color:i.getColor(this.getColorParams()),index:i.getFilteredIndex(this.filterSele,t)},o=[];if(i.contour){var a=new ab(n,this.getBufferParams({wireframe:!1}));o.push(a)}else{n.normal=i.getNormal(),n.picking=i.getPicking(t.getStructure());var s=new ib(n,this.getBufferParams({background:this.background,opaqueBack:this.opaqueBack,dullInterior:!1})),c=new nb(s);o.push(c)}return{bufferList:o,info:r}},e.prototype.updateData=function(t,e){var r={};if(t.position)return this.__forceNewMolsurf=!0,void this.build();t.color&&(r.color=e.info.surface.getColor(this.getColorParams())),t.index&&(r.index=e.info.surface.getFilteredIndex(this.filterSele,e.sview)),e.bufferList[0].setAttributes(r)},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&e.filterSele&&(r.index=!0),e&&void 0!==e.colorVolume&&(r.color=!0),e&&e.wireframe&&(e.contour||void 0===e.contour&&this.contour)&&(e.wireframe=!1),t.prototype.setParameters.call(this,e,r,i),this},e.prototype.getSurfaceParams=function(t){return Object.assign({type:this.surfaceType,probeRadius:this.probeRadius,scaleFactor:this.scaleFactor,smooth:this.smooth&&!this.contour,cutoff:this.cutoff,contour:this.contour,useWorker:this.useWorker},t)},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.volume=this.colorVolume,e},e.prototype.clear=function(){t.prototype.clear.call(this)},e.prototype.dispose=function(){this.__infoList.forEach(function(t){t.molsurf.dispose()}),this.__infoList.length=0,t.prototype.dispose.call(this)},e}(Eb);Xf.add("surface",h_);var l_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type="point",this.parameters=Object.assign({pointSize:{type:"number",precision:1,max:100,min:0,buffer:!0},sizeAttenuation:{type:"boolean",buffer:!0},sortParticles:{type:"boolean",rebuild:!0},useTexture:{type:"boolean",buffer:!0},alphaTest:{type:"range",step:.001,max:1,min:0,buffer:!0},forceTransparent:{type:"boolean",buffer:!0},edgeBleach:{type:"range",step:.001,max:1,min:0,buffer:!0}},this.parameters,{flatShaded:null,wireframe:null,linewidth:null,roughness:null,metalness:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.pointSize=gn(r.pointSize,1),this.sizeAttenuation=gn(r.sizeAttenuation,!0),this.sortParticles=gn(r.sortParticles,!1),this.useTexture=gn(r.useTexture,!1),this.alphaTest=gn(r.alphaTest,.5),this.forceTransparent=gn(r.forceTransparent,!1),this.edgeBleach=gn(r.edgeBleach,0),t.prototype.init.call(this,r)},e.prototype.createData=function(t){var e={position:!0,color:!0,picking:!0},r=t.getAtomData(this.getAtomParams(e));return{bufferList:[new bb(r,this.getBufferParams({pointSize:this.pointSize,sizeAttenuation:this.sizeAttenuation,sortParticles:this.sortParticles,useTexture:this.useTexture,alphaTest:this.alphaTest,forceTransparent:this.forceTransparent,edgeBleach:this.edgeBleach}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams(t)),i={};t&&!t.position||(i.position=r.position),t&&!t.color||(i.color=r.color),e.bufferList[0].setAttributes(i)},e}(Eb);Xf.add("point",l_),Yf.add("shader/Ribbon.vert","#define STANDARD\nuniform float nearClip;\nuniform vec3 clipCenter;\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvarying vec3 vViewPosition;\n#endif\n#if defined( RADIUS_CLIP )\nvarying vec3 vClipCenter;\n#endif\nattribute vec3 dir;\nattribute float size;\n#ifdef PICKING\n#include unpack_color\nattribute float primitiveId;\nvarying vec3 vPickingColor;\n#else\n#include color_pars_vertex\n#ifndef FLAT_SHADED\nvarying vec3 vNormal;\n#endif\n#endif\n#include common\nvoid main(void){\n#ifdef PICKING\nvPickingColor = unpackColor( primitiveId );\n#else\n#include color_vertex\n#include beginnormal_vertex\n#include defaultnormal_vertex\n#ifndef FLAT_SHADED\nvNormal = normalize( transformedNormal );\n#endif\n#endif\n#include begin_vertex\ntransformed += normalize( dir ) * size;\n#include project_vertex\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\nvViewPosition = -mvPosition.xyz;\n#endif\n#if defined( RADIUS_CLIP )\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\n#endif\n#include nearclip_vertex\n}");var p_=new Uint16Array([0,1,2,1,3,2]),d_=function(t){function e(e,r){var i=e||{},n=i.position.length/3-1,o=4*n,a=3*o,s=new Float32Array(a),c=new Float32Array(a),u=new Float32Array(a),h=On(a,a/3);t.call(this,{position:s,color:c,index:h,normal:u,picking:i.picking},r),this.addAttributes({dir:{type:"v3",value:new Float32Array(a)}}),this.addAttributes({size:{type:"f",value:new Float32Array(o)}}),i.primitiveId=Bo(n),this.setAttributes(i),this.meshIndex=h,this.makeIndex()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertexShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n,o,a,s,c,u,h,l,p,d=this.size/4,f=this.geometry.attributes;t.position&&(e=t.position,s=f.position.array,f.position.needsUpdate=!0),t.normal&&(r=t.normal,c=f.normal.array,f.normal.needsUpdate=!0),t.size&&(i=t.size,u=f.size.array,f.size.needsUpdate=!0),t.dir&&(n=t.dir,h=f.dir.array,f.dir.needsUpdate=!0),t.color&&(o=t.color,l=f.color.array,f.color.needsUpdate=!0),t.primitiveId&&(a=t.primitiveId,p=f.primitiveId.array,f.primitiveId.needsUpdate=!0);var m,g,v,y,b,x,_,w=i?i[0]:null;for(m=0;m0)continue;var o=void 0,st=void 0,vt=void 0,yt=void 0,bt=void 0;if(U){if(yt=l.split(dw),bt=10===yt.length?1:0,x=yt[2],q&&"CA"!==x)continue;o=parseFloat(yt[6-bt]),st=parseFloat(yt[7-bt]),vt=parseFloat(yt[8-bt])}else{if(x=l.substr(12,4).trim(),q&&"CA"!==x)continue;o=parseFloat(l.substr(30,8)),st=parseFloat(l.substr(38,8)),vt=parseFloat(l.substr(46,8))}if(X){var xt=3*s;if(a[xt+0]=o,a[xt+1]=st,a[xt+2]=vt,s+=1,K)continue}var _t=void 0;U?(d=parseInt(yt[1]),_t="",_="H"===l[0]?1:0,f=bt?"":yt[4],m=parseInt(yt[5-bt]),b="",g=yt[3],S="",y=0):(d=parseInt(l.substr(6,5),$),V&&99999===d&&($=16),_="H"===l[0]?1:0,f=l[21].trim(),m=parseInt(l.substr(22,4),H)||1,V&&9999===m&&(H=16),b=l[26].trim(),g=l.substr(17,4).trim()||"MOL",w=parseFloat(l.substr(60,6)),S=l[16].trim(),y=parseFloat(l.substr(54,6)),r||(_t=l.substr(76,2).trim(),f||(f=l.substr(72,4).trim()))),lt.growIfFull(),lt.atomTypeId[ft]=ht.add(x,_t),lt.x[ft]=o,lt.y[ft]=st,lt.z[ft]=vt,lt.serial[ft]=d,lt.altloc[ft]=S.charCodeAt(0),lt.occupancy[ft]=isNaN(y)?0:y,U?(lt.partialCharge[ft]=parseFloat(yt[9-bt]),lt.radius[ft]=parseFloat(yt[10-bt])):lt.bfactor[ft]=isNaN(w)?0:w;var wt=ac(m,f,b);!_||nt[wt]||lw.includes(g)?D||N===f||(O=(L+=1).toString()):N===f&&F===g&&($v.includes(g)||k===m&&B===b)||(O=(L+=1).toString(),k=m,F=g,B=b),G.addAtom(mt,f,O,g,m,_,void 0,b),J[d]=ft,ft+=1,D=!1,N=f}else if("CONECT"===p){var St=J[parseInt(l.substr(6,5))],At=[11,16,21,26],Mt={};if(void 0===St)continue;for(var Et=0;Et<4;++Et){var Tt=parseInt(l.substr(At[Et],5));if(!Number.isNaN(Tt)&&void 0!==(Tt=J[Tt]))if(St0)continue;var ot=it[c].replace(vw,"");if(T&&"CA"!==ot)continue;var at=parseFloat(it[y]),st=parseFloat(it[b]),ct=parseFloat(it[x]);if(E){var ut=3*i;if(r[ut+0]=at,r[ut+1]=st,r[ut+2]=ct,i+=1,X>0)continue}var ht=it[u],lt=parseInt(it[s]),pt=it[v];pt="?"===pt?"":pt;var dt=it[a],ft=it[h],mt="H"===it[d][0]?1:0,gt=it[m],vt=parseFloat(it[_]),yt=parseFloat(it[w]),bt=it[p];if(bt="."===bt?"":bt,$.growIfFull(),$.atomTypeId[W]=V.add(ot,gt),$.x[W]=at,$.y[W]=st,$.z[W]=ct,$.serial[W]=parseInt(it[f]),$.bfactor[W]=isNaN(vt)?0:vt,$.occupancy[W]=isNaN(yt)?0:yt,$.altloc[W]=bt.charCodeAt(0),A.addAtom(X,dt,ft,ht,lt,mt,void 0,pt),t.Debug){var xt=I[ft];void 0!==xt&&xt!==dt&&t.Debug&&jf.warn(xt,dt)}I[ft]=dt;var _t=it[l];R[_t]||(R[_t]=new Set),R[_t].add(S.chainStore.count-1),W+=1}else{var wt=o.match(gw),St=wt.length;B===F.length&&(B=0);for(var At=0;At_)continue}d=P.substr(5,5).trim(),f=parseInt(P.substr(0,5)),m=parseInt(P.substr(15,5)),S.growIfFull(),S.atomTypeId[A]=w.add(p),S.x[A]=R,S.y[A]=L,S.z[A]=O,S.serial[A]=m,o.addAtom(M,"","",d,f,0,"l"),A+=1}}}t.Debug&&jf.time("GroParser._parse "+this.name);var r,i,n=this.structure,o=this.structureBuilder,a=this.firstModelOnly,s=this.asTrajectory,c=this.cAlphaOnly,u=n.frames,h=n.boxes,l=this.streamer.peekLines(3);n.title=l[0].trim();var p,d,f,m,g=5+(l[2].length-l[2].lastIndexOf(".")-1),v=20,y=20+g,b=20+2*g,x=parseInt(l[1]),_=x+3,w=n.atomMap,S=n.atomStore;S.resize(x);var A=0,M=0,E=0;this.streamer.eachChunkOfLines(function(t){e(0,t.length,t)}),o.finalize(),n.finalizeAtoms(),gs(n),vs(n),n.finalizeBonds(),xy(n),t.Debug&&jf.timeEnd("GroParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add("gro",xw);var _w=["xCoordList","yCoordList","zCoordList","groupIdList","groupTypeList","chainIdList","bFactorList","atomIdList","altLocList","occupancyList","secStructList","insCodeList","sequenceIndexList","chainNameList","bondAtomList","bondOrderList"],ww=["mmtfVersion","mmtfProducer","unitCell","spaceGroup","structureId","title","depositionDate","releaseDate","experimentalMethods","resolution","rFree","rWork","bioAssemblyList","ncsOperatorList","entityList","groupList","numBonds","numAtoms","numGroups","numChains","numModels","groupsPerChain","chainsPerModel"].concat(_w),Sw={0:"i".charCodeAt(0),1:"s".charCodeAt(0),2:"h".charCodeAt(0),3:"e".charCodeAt(0),4:"g".charCodeAt(0),5:"b".charCodeAt(0),6:"t".charCodeAt(0),7:"l".charCodeAt(0),"-1":"".charCodeAt(0)},Aw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"mmtf"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("MmtfParser._parse "+this.name);var e,r,i,n,o,a=this.structure,s=zc(Fc(this.streamer.data));["depositionDate","releaseDate","resolution","rFree","rWork","experimentalMethods"].forEach(function(t){void 0!==s[t]&&(a.header[t]=s[t])});var c,u,h,l,p,d;if(a.id=s.structureId,a.title=s.title,this.firstModelOnly||this.asTrajectory){for(p=1,h=0,e=0,r=l=s.chainsPerModel[0];e0&&(a.biomolDict.NCS=at)}var ct=s.unitCell;ct&&Array.isArray(ct)&&ct[0]?a.unitcell=new uw({a:ct[0],b:ct[1],c:ct[2],alpha:ct[3],beta:ct[4],gamma:ct[5],spacegroup:s.spaceGroup}):a.unitcell=void 0,_s(a,!0),xs(a,!0),a.finalizeAtoms(),a.finalizeBonds(),ws(a),t.Debug&&jf.timeEnd("MmtfParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add("mmtf",Aw);var Mw=/\s+/,Ew={1:1,2:2,3:3,am:1,ar:1,du:1,un:1,nc:0},Tw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return"mol2"},r.prototype._parse=function(){function e(t,e,S){for(var A=t;AMOLECULE"===M?(v=y,d=0,++m):"@ATOM"===M?(v=b,f=l.count,s&&(i=0,r=new Float32Array(3*g),c.push(r),m>0&&(u=!0))):v="@BOND"===M?x:0;else if(v===y){if(0===d)n.title=M,n.id=M;else if(1===d){var E=M.split(Mw);g=parseInt(E[0])}++d}else if(v===b){var T=M.split(Mw);if(a&&m>0)continue;var P=parseFloat(T[2]),C=parseFloat(T[3]),I=parseFloat(T[4]);if(s){var R=3*i;if(r[R+0]=P,r[R+1]=C,r[R+2]=I,i+=1,u)continue}var L=T[0],O=T[1],D=T[5].split(".")[0],N=T[6]?parseInt(T[6]):1,k=T[7]?T[7]:"",F=T[8]?parseFloat(T[8]):0;l.growIfFull(),l.atomTypeId[p]=h.add(O,D),l.x[p]=P,l.y[p]=C,l.z[p]=I,l.serial[p]=L,l.partialCharge[p]=F,o.addAtom(m,"","",k,N,1),p+=1}else if(v===x){if(a&&m>0)continue;if(s&&m>0)continue;var B=M.split(Mw);_.index=parseInt(B[1])-1+f,w.index=parseInt(B[2])-1+f;var z=Ew[B[3]];n.bondStore.addBond(_,w,z)}}}t.Debug&&jf.time("Mol2Parser._parse "+this.name);var r,i,n=this.structure,o=this.structureBuilder,a=this.firstModelOnly,s=this.asTrajectory,c=n.frames,u=!1,h=n.atomMap,l=n.atomStore;l.resize(Math.round(this.streamer.data.length/60)),l.addField("partialCharge",1,"float32");var p=0,d=0,f=0,m=-1,g=0,v=0,y=1,b=2,x=3,_=n.getAtomProxy(),w=n.getAtomProxy();this.streamer.eachChunkOfLines(function(t){e(0,t.length,t)}),o.finalize(),n.finalizeAtoms(),gs(n),xs(n,!0),_s(n,!0),n.finalizeBonds(),As(n),xy(n),t.Debug&&jf.timeEnd("Mol2Parser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add("mol2",Tw);var Pw=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"pqr"},Object.defineProperties(e.prototype,r),e}(fw);qf.add("pqr",Pw);var Cw=/> <(.+)>/,Iw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return"sdf"},r.prototype._parse=function(){function e(t,e,a){for(var C=t;C0&&(h=!0));else if(v>=M&&v0)continue;var R=parseFloat(I.substr(0,10)),L=parseFloat(I.substr(10,10)),O=parseFloat(I.substr(20,10));if(o){var D=3*c;if(s[D+0]=R,s[D+1]=L,s[D+2]=O,c+=1,h)continue}var N=I.substr(31,3).trim(),k=N+(g+1);p.growIfFull(),p.atomTypeId[g]=l.add(k,N),p.x[g]=R,p.y[g]=L,p.z[g]=O,p.serial[g]=g,p.formalCharge[g]=0,i.addAtom(y,"","","HET",1,1),g+=1}else if(v>=T&&v0)continue;if(o&&y>0)continue;f.index=parseInt(I.substr(0,3))-1+b,m.index=parseInt(I.substr(3,3))-1+b;var F=parseInt(I.substr(6,3));r.bondStore.addBond(f,m,F)}else if(I.match(/M {2}CHG/))for(var B=parseInt(I.substr(6,3)),z=0,U=10;z0)return void jf.error("dcd format with fixed atoms unsupported, aborting");for(var v=a.NATOM,y=4*v,b=0,x=a.NSET;b=1&&(i.timeOffset=(a.ISTART-1)*i.deltaTime),t.Debug&&jf.timeEnd("DcdParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("dcd",uS);var hS={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6},lS=0,pS=10,dS=11,fS=12,mS=function(t){var e=new vm(t);e.setBigEndian(),jc("CDF"!==e.readChars(3),"should start with CDF");var r=e.readByte();jc(r>2,"unknown version"),this.header=Qc(e,r),this.buffer=e},gS={version:{},recordDimension:{},dimensions:{},globalAttributes:{},variables:{}};gS.version.get=function(){return 1===this.header.version?"classic format":"64-bit offset format"},gS.recordDimension.get=function(){return this.header.recordDimension},gS.dimensions.get=function(){return this.header.dimensions},gS.globalAttributes.get=function(){return this.header.globalAttributes},gS.variables.get=function(){return this.header.variables},mS.prototype.hasDataVariable=function(t){return-1!==this.header.variables.findIndex(function(e){return e.name===t})},mS.prototype.getDataVariable=function(t){var e;return e="string"==typeof t?this.header.variables.find(function(e){return e.name===t}):t,jc(void 0===e,"variable not found"),this.buffer.seek(e.offset),e.record?Kc(this.buffer,e,this.header.recordDimension):Zc(this.buffer,e)},Object.defineProperties(mS.prototype,gS);var vS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"nctraj"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("NctrajParser._parse "+this.name);var e=new mS(this.streamer.data),r=this.frames,i=r.coordinates,n=r.boxes,o=r.times;e.getDataVariable("coordinates").forEach(function(t){i.push(new Float32Array(t))}),e.hasDataVariable("cell_lengths")&&e.getDataVariable("cell_lengths").forEach(function(t){n.push(new Float32Array(t))}),e.hasDataVariable("time")&&e.getDataVariable("time").forEach(function(t){o.push(t)}),o.length>=1&&(r.timeOffset=o[0]),o.length>=2&&(r.deltaTime=o[1]-o[0]),t.Debug&&jf.timeEnd("NctrajParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("nctraj",vS),qf.add("ncdf",vS),qf.add("nc",vS);var yS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"trr"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("TrrParser._parse "+this.name);for(var e=Nn(this.streamer.data),r=new DataView(e),i=this.frames,n=i.coordinates,o=i.boxes,a=i.times,s=0;;){s+=8;var c=r.getInt32(s);s+=4,s+=c;var u=r.getInt32(s+8),h=r.getInt32(s+12),l=r.getInt32(s+16),p=r.getInt32(s+28),d=r.getInt32(s+32),f=r.getInt32(s+36),m=r.getInt32(s+40);s+=52;var g=u/9,v=3*m;if(8===g?a.push(r.getFloat64(s)):a.push(r.getFloat32(s)),s+=2*g,u){var y=new Float32Array(9);if(8===g)for(var b=0;b<9;++b)y[b]=10*r.getFloat64(s),s+=8;else for(var x=0;x<9;++x)y[x]=10*r.getFloat32(s),s+=4;o.push(y)}if(s+=h,s+=l,p){var _=void 0;if(8===g){_=new Float32Array(v);for(var w=0;w>8&65280|M>>24&255}_=new Float32Array(e,s,v);for(var E=0;E=e.byteLength)break}a.length>=1&&(i.timeOffset=a[0]),a.length>=2&&(i.deltaTime=a[1]-a[0]),t.Debug&&jf.timeEnd("TrrParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("trr",yS);var bS=new Uint32Array([0,0,0,0,0,0,0,0,0,8,10,12,16,20,25,32,40,50,64,80,101,128,161,203,256,322,406,512,645,812,1024,1290,1625,2048,2580,3250,4096,5060,6501,8192,10321,13003,16384,20642,26007,32768,41285,52015,65536,82570,104031,131072,165140,208063,262144,330280,416127,524287,660561,832255,1048576,1321122,1664510,2097152,2642245,3329021,4194304,5284491,6658042,8388607,10568983,13316085,16777216]),xS=new Uint8Array(32),_S=new Int32Array(32),wS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"xtc"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("XtcParser._parse "+this.name);for(var e=Nn(this.streamer.data),r=new DataView(e),i=this.frames,n=i.coordinates,o=i.boxes,a=i.times,s=new Int32Array(6),c=new Int32Array(3),u=new Int32Array(3),h=new Uint32Array(3),l=new Float32Array(3),p=new Float32Array(3),d=0,f=new Int32Array(3),m=new Uint32Array(f.buffer);;){var g=void 0,v=r.getInt32(d+4);d+=12;var y=3*v;a.push(r.getFloat32(d)),d+=4;for(var b=new Float32Array(9),x=0;x<9;++x)b[x]=10*r.getFloat32(d),d+=4;if(o.push(b),v<=9)for(var _=0;_16777215?(u[0]=ru(c[0]),u[1]=ru(c[1]),u[2]=ru(c[2]),M=0):M=iu(3,c);var E=r.getInt32(d);d+=4;var T=E-1,P=bS[T=9>T?9:T]/2|0,C=bS[E]/2|0;h[0]=h[1]=h[2]=bS[E];var I=4*Math.ceil(r.getInt32(d)/4);d+=4;var R=1/A,L=0,O=0,D=new Uint8Array(e,d);for(l[0]=l[1]=l[2]=0;O0){l[0]=l[1]=l[2]=0;for(var k=0;k9?bS[E-1]/2|0:0):N>0&&(P=C,C=bS[E]/2|0),h[0]=h[1]=h[2]=bS[E],0===h[0]||0===h[1]||0===h[2])return void console.error("(xdrfile error) Undefined error.")}d+=I}for(var B=0;B=e.byteLength)break}a.length>=1&&(i.timeOffset=a[0]),a.length>=2&&(i.deltaTime=a[1]-a[0]),t.Debug&&jf.timeEnd("XtcParser._parse "+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add("xtc",wS);var SS=function(t){function e(e,r){var i=r||{};t.call(this,e,i),this.volume=new iy(this.name,this.path),this.voxelSize=gn(i.voxelSize,1)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},__objName:{}};return r.type.get=function(){return"volume"},r.__objName.get=function(){return"volume"},e.prototype._afterParse=function(){this.volume.setMatrix(this.getMatrix()),t.prototype._afterParse.call(this)},e.prototype.getMatrix=function(){return new v},Object.defineProperties(e.prototype,r),e}(nw),AS=/\s+/,MS=/-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g,ES=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return"cube"},r.prototype._parse=function(){function e(t,e){var r=n[t].trim().split(AS)[e];return parseFloat(r)}function r(t,e,r){for(var i=t;i=o.atomCount+6+h)for(var a=n.match(MS),l=0,p=a.length;l0?0:1;this.streamer.eachChunkOfLines(function(t){r(0,t.length,t)}),i.header=o,i.setData(s,o.NVZ,o.NVY,o.NVX),t.Debug&&jf.timeEnd("CubeParser._parse "+this.name)},r.prototype.getMatrix=function(){var t=this.volume.header,e=new v;return e.multiply((new v).makeTranslation(t.originX,t.originY,t.originZ)),e.multiply((new v).makeBasis(t.basisZ,t.basisY,t.basisX)),e},Object.defineProperties(r.prototype,i),r}(SS);qf.add("cub",ES),qf.add("cube",ES);var TS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return"dsn6"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time("Dsn6Parser._parse "+this.name);var e,r,i=this.volume,n={},o=Nn(this.streamer.data),a=new Int16Array(o),s=new Uint8Array(o),c=String.fromCharCode.apply(null,s.subarray(0,512));if(c.startsWith(":-)"))n.xStart=parseInt(c.substr(10,5)),n.yStart=parseInt(c.substr(15,5)),n.zStart=parseInt(c.substr(20,5)),n.xExtent=parseInt(c.substr(32,5)),n.yExtent=parseInt(c.substr(38,5)),n.zExtent=parseInt(c.substr(42,5)),n.xRate=parseInt(c.substr(52,5)),n.yRate=parseInt(c.substr(58,5)),n.zRate=parseInt(c.substr(62,5)),n.xlen=parseFloat(c.substr(73,10))*this.voxelSize,n.ylen=parseFloat(c.substr(83,10))*this.voxelSize,n.zlen=parseFloat(c.substr(93,10))*this.voxelSize,n.alpha=parseFloat(c.substr(103,10)),n.beta=parseFloat(c.substr(113,10)),n.gamma=parseFloat(c.substr(123,10)),e=parseFloat(c.substr(138,12))/100,r=parseInt(c.substr(155,8)),n.sigma=100*parseFloat(c.substr(170,12));else{if(100!==a[18])for(var u=0,h=a.length;u>8&255}n.xStart=a[0],n.yStart=a[1],n.zStart=a[2],n.xExtent=a[3],n.yExtent=a[4],n.zExtent=a[5],n.xRate=a[6],n.yRate=a[7],n.zRate=a[8];var p=1/a[17],d=p*this.voxelSize;n.xlen=a[9]*d,n.ylen=a[10]*d,n.zlen=a[11]*d,n.alpha=a[12]*p,n.beta=a[13]*p,n.gamma=a[14]*p,e=a[15]/100,r=a[16],n.gamma=a[14]*p}i.header=n,t.Debug&&jf.log(n,e,r);for(var f=new Float32Array(n.xExtent*n.yExtent*n.zExtent),m=512,g=Math.ceil(n.xExtent/8),v=Math.ceil(n.yExtent/8),y=Math.ceil(n.zExtent/8),b=0;ba){var n=r[i].trim();if(""!==n)for(var o=n.split(PS),l=0,p=o.length;l=a&&(g-a)%f!=0&&m=0?r-1:r+e/3)},parseNormalIndex:function(t,e){var r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)},addVertex:function(t,e,r){var i=this.vertices,n=this.object.geometry.vertices;n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2]),n.push(i[r+0]),n.push(i[r+1]),n.push(i[r+2])},addVertexLine:function(t){var e=this.vertices,r=this.object.geometry.vertices;r.push(e[t+0]),r.push(e[t+1]),r.push(e[t+2])},addNormal:function(t,e,r){var i=this.normals,n=this.object.geometry.normals;n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2]),n.push(i[r+0]),n.push(i[r+1]),n.push(i[r+2])},addFace:function(t,e,r,i,n,o,a,s){var c,u=this.vertices.length,h=this.parseVertexIndex(t,u),l=this.parseVertexIndex(e,u),p=this.parseVertexIndex(r,u);if(void 0===i?this.addVertex(h,l,p):(c=this.parseVertexIndex(i,u),this.addVertex(h,l,c),this.addVertex(l,p,c)),void 0!==n){var d=this.normals.length;h=this.parseNormalIndex(n,d),l=n===o?h:this.parseNormalIndex(o,d),p=n===a?h:this.parseNormalIndex(a,d),void 0===i?this.addNormal(h,l,p):(c=this.parseNormalIndex(s,d),this.addNormal(h,l,c),this.addNormal(l,p,c))}},addLineGeometry:function(t){var e=this;this.object.geometry.type="Line";for(var r=this.vertices.length,i=0,n=t.length;i0?x.addAttribute("normal",new St(new Float32Array(b.normals),3)):x.computeVertexNormals(),y.push(x)}}return y}};var NS=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return"obj"},e.prototype.getLoader=function(){return new su},Object.defineProperties(e.prototype,r),e}(DS);qf.add("obj",NS),cu.prototype={constructor:cu,setPropertyNameMapping:function(t){this.propertyNameMapping=t},bin2str:function(t){for(var e=new Uint8Array(t),r="",i=0;i=n.elements[s].count&&(s++,c=0);var l=r.parseASCIIElement(n.elements[s].properties,h);r.handleElement(i,n.elements[s].name,l),c++}}return this.postProcess(i)},postProcess:function(t){if(t.useColor){for(var e=0;e0&&(a[C]=I)}else{var R=T.getElementsByTagName("clash"),L=T.getElementsByTagName("mog-bond-outlier"),O=T.getElementsByTagName("mog-angle-outlier");if(L.length>0||O.length>0||R.length>0){var D={};s[C]=D;for(var N=0,k=R.length;N>>1:t>>>1;e[r]=t}return e}(),JS=30,tA=12,eA=15,rA=852,iA=592,nA=0,oA=1,aA=2,sA=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],cA=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],uA=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],hA=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],lA=0,pA=1,dA=2,fA=4,mA=5,gA=6,vA=0,yA=1,bA=2,xA=-2,_A=-3,wA=-4,SA=-5,AA=8,MA=1,EA=2,TA=3,PA=4,CA=5,IA=6,RA=7,LA=8,OA=9,DA=10,NA=11,kA=12,FA=13,BA=14,zA=15,UA=16,jA=17,GA=18,VA=19,$A=20,HA=21,WA=22,XA=23,qA=24,YA=25,ZA=26,KA=27,QA=28,JA=29,tM=30,eM=31,rM=32,iM=852,nM=592,oM=!0,aM=!0,sM=!0;try{String.fromCharCode.apply(null,[0])}catch(t){aM=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){sM=!1}for(var cM=new Uint8Array(256),uM=0;uM<256;uM++)cM[uM]=uM>=252?6:uM>=248?5:uM>=240?4:uM>=224?3:uM>=192?2:1;cM[254]=cM[254]=1;var hM=0,lM={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},pM=Object.prototype.toString;Vu.prototype.push=function(t,e){var r,i,n,o,a,s,c=this,u=this.strm,h=this.options.chunkSize,l=this.options.dictionary,p=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?u.input=Bu(t):"[object ArrayBuffer]"===pM.call(t)?u.input=new Uint8Array(t):u.input=t,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new Uint8Array(h),u.next_out=0,u.avail_out=h),2===(r=Lu(u,0))&&l&&(s="string"==typeof l?ku(l):"[object ArrayBuffer]"===pM.call(l)?new Uint8Array(l):l,r=Nu(c.strm,s)),-5===r&&!0===p&&(r=hM,p=!1),1!==r&&r!==hM)return c.onEnd(r),c.ended=!0,!1;u.next_out&&(0!==u.avail_out&&1!==r&&(0!==u.avail_in||4!==i&&2!==i)||("string"===c.options.to?(n=Uu(u.output,u.next_out),o=u.next_out-n,a=zu(u.output,n),u.next_out=o,u.avail_out=h-o,o&&yu(u.output,u.output,n,o,0),c.onData(a)):c.onData(vu(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(p=!0)}while((u.avail_in>0||0===u.avail_out)&&1!==r);return 1===r&&(i=4),4===i?(r=Ou(this.strm),this.onEnd(r),this.ended=!0,r===hM):2!==i||(this.onEnd(hM),u.avail_out=0,!0)},Vu.prototype.onData=function(t){this.chunks.push(t)},Vu.prototype.onEnd=function(t){t===hM&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=bu(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},Zf.add("gz",Hu);var dM=function(){};dM.prototype.getUrl=function(t){},dM.prototype.getExt=function(t){};var fM="//mmtf.rcsb.org/v1.0/full/",mM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e,r=wn(t),i=r.name.substr(0,4);return!["pdb","cif"].includes(r.ext)||!1!==r.compressed&&"gz"!==r.compressed?"mmtf"===r.ext?e=r.base.endsWith(".bb")?"//mmtf.rcsb.org/v1.0/reduced/"+i:fM+i:r.ext?(jf.warn("unsupported ext",r.ext),e=fM+i):e=fM+i:e="//files.rcsb.org/download/"+r.path,yn()+e},e.prototype.getExt=function(t){var e=wn(t);if("mmtf"===e.ext||!e.ext)return"mmtf"},e}(dM);Wf.add("rcsb",new mM);var gM="//pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/",vM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e,r=wn(t),i=r.name;return r.ext&&"sdf"!==r.ext?(jf.warn("unsupported ext",r.ext),e=gM+i+"/SDF?record_type=3d"):e=gM+i+"/SDF?record_type=3d",yn()+e},e.prototype.getExt=function(t){var e=wn(t);if(!e.ext||"sdf"===e.ext)return"sdf"},e}(dM);Wf.add("pubchem",new vM);var yM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){return t},e}(dM);Wf.add("ftp",new yM),Wf.add("http",new yM),Wf.add("https",new yM);var bM=/^((http|https|ftp):)*\/\//,xM=function(t){function e(e){t.call(this),this.baseUrl=e||""}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e=wn(t),r=this.baseUrl+e.path;return bM.test(this.baseUrl)||(r=xn(r)),r},e}(dM),_M=function(t){function e(e){t.call(this),this.baseUrl=e||""}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getListing=function(t){t=t||"";var e=this.baseUrl+"dir/"+t;return"/"!==e[e.length-1]&&(e+="/"),Mo(e,{ext:"json"}).then(function(e){return{path:t,data:e.data}})},e.prototype.getUrl=function(t){var e=wn(t);return this.baseUrl+"file/"+e.path},e.prototype.getCountUrl=function(t){var e=wn(t);return this.baseUrl+"traj/numframes/"+e.path},e.prototype.getFrameUrl=function(t,e){var r=wn(t);return this.baseUrl+"traj/frame/"+e+"/"+r.path},e.prototype.getFrameParams=function(t,e){return"atomIndices="+e.join(";")},e.prototype.getPathUrl=function(t,e){var r=wn(t);return this.baseUrl+"traj/path/"+e+"/"+r.path},e}(dM);"undefined"==typeof window||window.Promise||(window.Promise=i),t.Version="0.10.5-20",t.setDebug=So,t.ScriptExtensions=Vf,t.DatasourceRegistry=Wf,t.DecompressorRegistry=Zf,t.StaticDatasource=xM,t.MdsrvDatasource=_M,t.ParserRegistry=qf,t.autoLoad=Mo,t.RepresentationRegistry=Xf,t.ColormakerRegistry=Hf,t.Colormaker=pf,t.Selection=Cf,t.PdbWriter=fm,t.SdfWriter=mm,t.StlWriter=ym,t.Stage=qb,t.Collection=$b,t.ComponentCollection=Hb,t.RepresentationCollection=Wb,t.Assembly=gy,t.TrajectoryPlayer=Vy,t.superpose=Vs,t.guessElement=Ss,t.flatten=vn,t.Queue=Ds,t.Counter=bm,t.throttle=Sn,t.download=_n,t.getQuery=mn,t.getDataInfo=Ao,t.getFileInfo=wn,t.uniqueArray=Cn,t.BufferRepresentation=rb,t.ArrowBuffer=I_,t.BoxBuffer=k_,t.ConeBuffer=P_,t.CylinderBuffer=Nb,t.EllipsoidBuffer=G_,t.OctahedronBuffer=X_,t.SphereBuffer=yb,t.TetrahedronBuffer=Q_,t.TextBuffer=Kx,t.TorusBuffer=iw,t.Shape=Jy,t.Structure=Uy,t.Kdtree=ls,t.SpatialHash=Ya,t.MolecularSurface=u_,t.Volume=iy,t.LeftMouseButton=1,t.MiddleMouseButton=2,t.RightMouseButton=3,t.MouseActions=_g,t.KeyActions=Ag,t.Signal=no,t.Matrix3=ut,t.Matrix4=v,t.Vector2=l,t.Vector3=g,t.Box3=st,t.Quaternion=m,t.Euler=ft,t.Plane=ht,t.Color=tt,Object.defineProperty(t,"__esModule",{value:!0})}); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4).setImmediate, __webpack_require__(7).Buffer)) @@ -23129,7 +23129,7 @@ define(["@jupyter-widgets/base"], function(__WEBPACK_EXTERNAL_MODULE_2__) { retu /* 43 */ /***/ (function(module, exports) { - module.exports = {"name":"nglview-js-widgets","version":"0.5.4-dev.16","description":"nglview-js-widgets","author":"Hai Nguyen , Alexander Rose ","license":"MIT","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/arose/nglview.git"},"bugs":{"url":"https://github.com/arose/nglview/issues"},"files":["dist"],"keywords":["molecular graphics","molecular structure","jupyter","widgets","ipython","ipywidgets","science"],"scripts":{"lint":"eslint src test","prepublish":"webpack","test":"mocha"},"devDependencies":{"babel-eslint":"^7.0.0","babel-register":"^6.11.6","eslint":"^3.2.2","eslint-config-google":"^0.7.1","json-loader":"^0.5.4","css-loader":"^0.23.1","style-loader":"^0.13.1","ngl":"0.10.5-19","webpack":"^1.12.14"},"dependencies":{"jquery":"^3.2.1","jquery-ui":"^1.12.1","underscore":"^1.8.3","@jupyter-widgets/base":"^0.5.2","@jupyterlab/nbwidgets":"^0.6.15","ngl":"0.10.5-19"},"homepage":"https://github.com/arose/nglview#readme","directories":{"test":"test"}} + module.exports = {"name":"nglview-js-widgets","version":"0.5.4-dev.17","description":"nglview-js-widgets","author":"Hai Nguyen , Alexander Rose ","license":"MIT","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/arose/nglview.git"},"bugs":{"url":"https://github.com/arose/nglview/issues"},"files":["dist"],"keywords":["molecular graphics","molecular structure","jupyter","widgets","ipython","ipywidgets","science"],"scripts":{"lint":"eslint src test","prepublish":"webpack","test":"mocha"},"devDependencies":{"babel-eslint":"^7.0.0","babel-register":"^6.11.6","eslint":"^3.2.2","eslint-config-google":"^0.7.1","json-loader":"^0.5.4","css-loader":"^0.23.1","style-loader":"^0.13.1","ngl":"0.10.5-20","webpack":"^1.12.14"},"dependencies":{"jquery":"^3.2.1","jquery-ui":"^1.12.1","underscore":"^1.8.3","@jupyter-widgets/base":"^0.5.2","@jupyterlab/nbwidgets":"^0.6.15","ngl":"0.10.5-20"},"homepage":"https://github.com/arose/nglview#readme","directories":{"test":"test"}} /***/ }) /******/ ])});; diff --git a/nglview/static/index.js.map b/nglview/static/index.js.map index e347d2f8..b9d5efc8 100644 --- a/nglview/static/index.js.map +++ b/nglview/static/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 8cc1e55169238da91910","webpack:///./src/index.js","webpack:///./src/widget_ngl.js","webpack:///external \"@jupyter-widgets/base\"","webpack:///./~/ngl/dist/ngl.js","webpack:///./~/timers-browserify/main.js","webpack:///./~/setimmediate/setImmediate.js","webpack:///./~/process/browser.js","webpack:///./~/buffer/index.js","webpack:///./~/base64-js/index.js","webpack:///./~/ieee754/index.js","webpack:///./~/isarray/index.js","webpack:///./~/jquery/dist/jquery.js","webpack:///./~/underscore/underscore.js","webpack:///./~/jquery-ui/ui/widgets/draggable.js","webpack:///./~/jquery-ui/ui/widgets/mouse.js","webpack:///./~/jquery-ui/ui/ie.js","webpack:///./~/jquery-ui/ui/version.js","webpack:///./~/jquery-ui/ui/widget.js","webpack:///./~/jquery-ui/ui/data.js","webpack:///./~/jquery-ui/ui/plugin.js","webpack:///./~/jquery-ui/ui/safe-blur.js","webpack:///./~/jquery-ui/ui/scroll-parent.js","webpack:///./~/jquery-ui/ui/safe-active-element.js","webpack:///./~/jquery-ui/ui/widgets/slider.js","webpack:///./~/jquery-ui/ui/keycode.js","webpack:///./~/jquery-ui/ui/widgets/dialog.js","webpack:///./~/jquery-ui/ui/widgets/button.js","webpack:///./~/jquery-ui/ui/widgets/controlgroup.js","webpack:///./~/jquery-ui/ui/widgets/checkboxradio.js","webpack:///./~/jquery-ui/ui/escape-selector.js","webpack:///./~/jquery-ui/ui/form-reset-mixin.js","webpack:///./~/jquery-ui/ui/form.js","webpack:///./~/jquery-ui/ui/labels.js","webpack:///./~/jquery-ui/ui/widgets/resizable.js","webpack:///./~/jquery-ui/ui/disable-selection.js","webpack:///./~/jquery-ui/ui/focusable.js","webpack:///./~/jquery-ui/ui/tabbable.js","webpack:///./~/jquery-ui/ui/unique-id.js","webpack:///./~/jquery-ui/ui/position.js","webpack:///./~/jquery-ui/themes/base/slider.css?5ec2","webpack:///./~/jquery-ui/themes/base/slider.css","webpack:///./~/css-loader/lib/css-base.js","webpack:///./~/style-loader/addStyles.js","webpack:///./package.json"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,cAAa;AACb,UAAS;;AAET;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA,qD;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA,+BAA8B;AAC9B,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB,kBAAiB;AACjB;AACA,UAAS;AACT,MAAK;;AAEL;AACA;AACA;AACA;;AAEA,wBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,UAAS;AACT,MAAK;;AAEL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,MAAK;;AAEL;AACA;AACA;;AAEA,wBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,4BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,MAAK;;AAEL;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA,SAAQ;AACR;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA,MAAK;;;AAGL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA,kBAAiB;AACjB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA,2BAA0B;AAC1B,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA,wBAAuB,gCAAgC;AACvD;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,mBAAmB;AACtC,UAAS;AACT;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,iDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA,WAAU;AACV,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAmB,SAAS;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,cAAa;AACb,UAAS;AACT,MAAK;;AAEL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,uBAAsB,IAAI,mBAAmB;AAC7C,cAAa;AACb,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA,uBAAsB,IAAI,mBAAmB;AAC7C,cAAa;AACb;AACA;AACA;AACA,cAAa;AACb,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,cAAa;AACb,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,UAAS;AACT,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,iEAAgE;AAChE;AACA;AACA,cAAa;AACb;AACA,UAAS;AACT,MAAK;;AAEL;;AAEA;;AAEA,wBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,oBAAmB,sCAAsC;AACzD,MAAK;;AAEL;AACA,sBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAkB;AAClB,eAAc;AACd;AACA;AACA,mBAAkB;AAClB;AACA;AACA,WAAU;AACV;AACA;AACA,MAAK;;AAEL;AACA,sBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA,YAAW;AACX,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;AACA,sBAAqB;AACrB;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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CAAmC,qCAAqC,YAAY,6CAA6C,uCAAuC,YAAY,+CAA+C,0CAA0C,8BAA8B,GAAG,sCAAsC,YAAY,8CAA8C,GAAG,KAAK,2rCAA2rC,SAAS,EAAE;;;;;;;;ACA7mjnC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;;;;;;ACpDA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAuB;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,mBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA0C,sBAAsB,EAAE;AAClE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAU;AACV;AACA;;AAEA,MAAK;AACL;AACA;;AAEA,MAAK;AACL;AACA;;AAEA,MAAK;AACL;AACA;;AAEA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,EAAC;;;;;;;;ACzLD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAqC;;AAErC;AACA;AACA;;AAEA,4BAA2B;AAC3B;AACA;AACA;AACA,6BAA4B,UAAU;;;;;;;ACvLtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAwB,eAAe;AACvC;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,yBAAwB,QAAQ;AAChC;AACA,sBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,oBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,wDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,sBAAqB,QAAQ;AAC7B;AACA;AACA,IAAG;AACH;AACA,gBAAe,SAAS;AACxB;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAmB,SAAS;AAC5B;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC5vDA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mCAAkC,SAAS;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA,qBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA0C,UAAU;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAQ,WAAW;;AAEnB;AACA;AACA;AACA,SAAQ,WAAW;;AAEnB;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA,SAAQ,WAAW;;AAEnB;AACA;AACA,SAAQ,UAAU;;AAElB;AACA;;;;;;;ACnFA,kBAAiB;;AAEjB;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;;;AAIA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAAQ,YAAY;;AAEpB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,OAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF,qBAAoB;;AAEpB;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF,iCAAgC;AAChC;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA,WAAU,YAAY;AACtB;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS,SAAS;AAClB;AACA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS,YAAY;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAU,YAAY;AACtB;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA,iBAAgB,IAAI;;AAEpB;AACA;;AAEA;;AAEA;AACA;AACA,yCAAwC,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,IAAG;AACH,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD,UAAS;;AAET;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA,OAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;AACA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa,yBAAyB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,SAAS;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,QAAQ;AACnB,YAAW,QAAQ;AACnB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,QAAQ,6BAA6B;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;;AAEA;AACA;AACA,YAAW,gBAAgB;AAC3B,cAAa,uBAAuB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAW,eAAe;AAC1B,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW,eAAe;AAC1B,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,iCAAgC,MAAM;AACtC;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,gBAAe;;AAEf,UAAS;;AAET;AACA,SAAQ,iCAAiC;AACzC,SAAQ,oBAAoB;AAC5B,SAAQ,sCAAsC;AAC9C,SAAQ;AACR,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA,iBAAgB,aAAa,EAAE;AAC/B;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6DAA4D;;AAE5D;AACA;AACA;AACA,0CAAyC;;AAEzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAO;AACP;AACA;AACA;AACA;AACA,8DAA6D;;AAE7D;AACA;AACA;AACA,2CAA0C;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iEAAgE;;AAEhE;AACA;AACA;AACA,8CAA6C;;AAE7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA,kEAAiE,UAAU;AAC3E,uCAAsC,2BAA2B;AACjE;AACA,iCAAgC,MAAM;AACtC;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,WAAU,YAAY;AACtB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,WAAU,YAAY;AACtB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,WAAU,UAAU;AACpB;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,WAAU,cAAc;AACxB;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA,aAAY,uEAAuE;AACnF;AACA;AACA,aAAY,4BAA4B;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAQ,SAAS;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,4DAA2D;;AAE3D;AACA;AACA,qFAAoF;;AAEpF;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA,oCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,SAAQ,SAAS;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQ,SAAS;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,SAAQ,SAAS;AACjB;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAuC,iDAAiD;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kDAAiD;AACjD,WAAU,wCAAwC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,gBAAgB;AAC3B;AACA,YAAW,QAAQ;AACnB,YAAW,MAAM;AACjB,YAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;;AAEA,EAAC;;;;AAID;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA,SAAQ,GAAG;AACX;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;;;;AAIA;;AAEA;;AAEA;AACA;;;;AAIA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;;AAEA,eAAc,SAAS;AACvB;AACA;;AAEA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAQ;AACR;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAU,OAAO;AACjB;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAU,OAAO;AACjB,2BAA0B,wBAAwB;;AAElD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA,2CAA0C;AAC1C,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;AACD;;;;AAIA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAU,cAAc;AACxB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;;AAER;AACA;AACA;AACA,QAAO;AACP,OAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,yCAAwC,sCAAsC;AAC9E,qCAAoC,uCAAuC;AAC3E,qCAAoC,sCAAsC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR,QAAO;AACP;AACA,OAAM;AACN,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAW;;AAEX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;;AAEX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAM;;AAEN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qCAAoC;AACpC,sCAAqC;AACrC,qCAAoC;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;;AAGD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,GAAE;AACF;;;;;AAKA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;AACF;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;;AAEA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wBAAuB,aAAa;AACpC,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAoB,SAAS;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAI;AACJ,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;;AAGD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ,GAAE;AACF;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;;AAEA;;;AAGA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAQ,gBAAgB;AACxB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;AACH;AACA,EAAC;AACD;;AAEA;;AAEA;;;;AAIA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,GAAE;AACF;;AAEA,GAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,SAAQ,OAAO;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,uBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQ,OAAO;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;;;;AAIA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE,gBAAgB;AAClB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;;AAEA,YAAW;;AAEX;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA,qDAAoD;AACpD;;AAEA;AACA;;AAEA,eAAc,sBAAsB;AACpC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0BAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,gEAA+D;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAU,cAAc;;AAExB;AACA;AACA;AACA;AACA;AACA,kBAAiB,mBAAmB;AACpC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B,uCAAuC;AACjE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAuB,uDAAuD;AAC9E;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uCAAsC;AACtC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sCAAqC,cAAc;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;;AAGD;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA8B;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;AACF;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAU,OAAO;AACjB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAQ,+BAA+B;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,yCAAwC,OAAO;AAC/C;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA,UAAS,qCAAqC;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;;AAEA,UAAS,8BAA8B;AACvC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,8BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,aAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS,WAAW;AACpB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;AACD;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;AAIA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,2BAA0B;AAC1B,uBAAsB,cAAc;AACpC,iBAAgB,WAAW,YAAY;AACvC,YAAW;AACX;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sCAAqC,UAAU,SAAS,MAAM,aAAa;AAC3E,cAAa,eAAe;AAC5B;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,GAAE;AACF,EAAC;;;AAGD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAkB;AAClB;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY,+DAA+D;AAC3E;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;AACF;AACA;;AAEA,SAAQ,OAAO;;AAEf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA,mBAAkB,gBAAgB;AAClC;AACA,OAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA,kBAAiB;;AAEjB;AACA;;AAEA,WAAU,OAAO;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA;;AAEA,YAAW,SAAS;AACpB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;;AAEA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW;;AAEX;AACA;AACA;AACA,SAAQ,OAAO;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAQ,gBAAgB;AACxB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,kDAAiD,0BAA0B;AAC3E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAU,gBAAgB;AAC1B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,4BAA2B;AAC3B;AACA,sBAAqB;AACrB;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,gBAAgB;AAC3B;AACA;;AAEA,8CAA6C;AAC7C;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;AAEA,SAAQ,gBAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA,UAAS,gBAAgB;AACzB;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,EAAC;;AAED;AACA,kEAAiE;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAE;AACF;AACA;AACA;;AAEA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAoB,cAAc;AAClC,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA,kDAAiD;;AAEjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAA+B,SAAS;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gCAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA,WAAU,kBAAkB;AAC5B,YAAW,kBAAkB;AAC7B,eAAc;AACd,EAAC;AACD;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAAQ,mBAAmB;AAC3B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;AAKD;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;AAKD;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;;;;AAKD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;;AAEA,kCAAiC;AACjC;AACA;;AAEA,KAAI;AACJ;;AAEA,KAAI;AACJ;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,MAAK;AACL;AACA;;AAEA;AACA,YAAW,SAAS;AACpB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;AAKD;;;AAGA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,uCAAsC;AACtC;AACA;AACA;;AAEA;;AAEA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,+CAA8C;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA,WAAU,KAAK;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kDAAiD;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA,EAAC;;;;;AAKD;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,qCAAqC;;AAEpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA,MAAK;AACL;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,GAAE;;AAEF;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb,MAAK;AACL;;AAEA,YAAW;AACX,IAAG;AACH;AACA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA,iBAAgB;;AAEhB,iDAAgD;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yDAAwD;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAI;;AAEJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,kBAAiB;AACjB,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,4BAA2B;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mCAAkC;;AAElC;AACA,uBAAsB;AACtB,4BAA2B;;AAE3B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uDAAsD;AACtD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;;AAGD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,KAAI;AACJ;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA,GAAE;AACF;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAQ;;AAER;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA,oDAAmD;AACnD;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,uBAAuB;AAClC,YAAW,yBAAyB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;AAKD;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;AAKD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA,EAAC;;;;;AAKD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,KAAI;AACJ,IAAG;AACH;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;AAKD;AACA;AACA;AACA,GAAE;AACF;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA,sDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB;;AAEnB,6DAA4D,eAAe;AAC3E;AACA;;AAEA;AACA;;AAEA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA,eAAc,sDAAsD;AACpE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAI;AACJ;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;AACA,eAAc,mCAAmC;AACjD,gBAAe,6DAA6D;AAC5E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA,GAAE;AACF,EAAC;;;AAGD;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;;;;;AAKA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA,EAAC;;;;;;;AC5gUD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAAyB,gBAAgB;AACzC;AACA;AACA;AACA,wBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,YAAY;AAClD;AACA;AACA,MAAK;AACL;AACA,wCAAuC,YAAY;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,YAAY;AACtD;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,YAAY;AACtD;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B,gBAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,qDAAoD;AACpD,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,2CAA0C;AAC1C,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA8C,YAAY;AAC1D;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+CAA8C,YAAY;AAC1D;AACA;AACA,sBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA6C,YAAY;AACzD;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAsD;AACtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,0BAA0B;AACpE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAqB,cAAc;AACnC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO,eAAe;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAqB,eAAe;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAmB,YAAY;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA,0BAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAmB,YAAY;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0CAAyC,YAAY;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0CAAyC,YAAY;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB;AACnB;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,6CAA4C,mBAAmB;AAC/D;AACA;AACA,0CAAyC,YAAY;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sDAAqD;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,sCAAqC;AACrC;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAmB,OAAO;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe;AACf,eAAc;AACd,eAAc;AACd,iBAAgB;AAChB,iBAAgB;AAChB,iBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP,sBAAqB;AACrB;;AAEA;AACA;AACA,MAAK;AACL,kBAAiB;;AAEjB;AACA,mDAAkD,EAAE,iBAAiB;;AAErE;AACA,yBAAwB,8BAA8B;AACtD,4BAA2B;;AAE3B;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mDAAkD,iBAAiB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;;;;;;AC3gDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA8B;AAC9B;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA,4CAA2C,4BAA4B;AACvE,IAAG;AACH;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA,YAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF,aAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;AACA;AACA,gCAA+B;AAC/B;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA,gCAA+B;AAC/B;AACA,IAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAC;;AAED;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA,KAAI;;AAEJ,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;;AAEA,0CAAyC,QAAQ;;AAEjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC,wCAAwC;AAC1E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;;AAEA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ,yBAAwB,QAAQ;;AAEhC;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA,EAAC;;;;;;;ACjuCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA,yCAAwC;AACxC,wCAAuC;AACvC,wCAAuC;AACvC,0CAAyC,aAAa;AACtD,EAAC;;AAED,EAAC;;;;;;;ACjOD;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;;;;;;ACdD;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA,EAAC;;;;;;;AChBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA,eAAc,+BAA+B;AAC7C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yCAAwC;AACxC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAsB;;AAEtB;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQ,0BAA0B;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;;AAEzB;AACA,0BAAyB;;AAEzB;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAmC;AACnC;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qCAAoC;AACpC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,8BAA6B;AAC7B;;AAEA;;AAEA,+CAA8C,OAAO,WAAW;AAChE;AACA;AACA;AACA;AACA,qDAAoD;AACpD,iBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA,6BAA4B,kBAAkB;AAC9C,GAAE;;AAEF;AACA,6BAA4B,iBAAiB;AAC7C,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,gBAAe,oBAAoB;AACnC;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS,kCAAkC;AAC3C;AACA;AACA,eAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAc;AACd;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,EAAC;;AAED;;AAEA,EAAC;;;;;;;AC5tBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,EAAC;AACD,EAAC;;;;;;;ACtCD;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;AC3CD;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;ACpBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;AC5CD;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;;;;;;ACvCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,oCAAmC,iBAAiB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,0CAAyC,kBAAkB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA,mBAAkB,iCAAiC;AACnD;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,qBAAoB,0BAA0B;AAC9C;AACA;AACA,qBAAoB,6BAA6B;AACjD;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA,SAAQ;AACR;AACA,OAAM;AACN;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;;;;;;AC/uBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;AC5CD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA,MAAK;AACL;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA,IAAG;AACH,uBAAsB;AACtB;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK,2BAA2B;AAChC;;AAEA;AACA,uBAAsB,iBAAiB;;AAEvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;;AAEA,EAAC;;;;;;;AC36BD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAsB,uBAAuB;AAC7C;;AAEA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,EAAC;;;;;;;ACjYD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;AACD,kDAAiD,IAAI;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ,gBAAe,YAAY;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA8C;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA,EAAC;AACD,EAAC;;;;;;;ACzSD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAsB,yBAAyB;AAC/C;AACA;;AAEA,EAAC;;AAED;;AAEA,EAAC;;;;;;;AC7RD;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA,0CAAyC,WAAW,EAAE;AACtD;AACA;AACA;AACA,EAAC;;AAED,EAAC;;;;;;;ACpBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;AC5ED;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;;;;;ACnBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA,EAAC;;;;;;;AC7DD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA,yDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAe,cAAc;;AAE7B;AACA;AACA;AACA;;AAEA,gBAAe,mBAAmB;;AAElC;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;AACA,oCAAmC,+BAA+B;AAClE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oBAAmB;;AAEnB;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA2B;AAC3B,iCAAgC;;AAEhC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC,uBAAuB;AAC3D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS,OAAO;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,UAAS,+CAA+C;;AAExD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;;AAEA,GAAE;;AAEF;;AAEA;AACA;;AAEA;;AAEA,iEAAgE;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;;AAEA,IAAG;AACH;AACA;;AAEA,GAAE;;AAEF;AACA;AACA,YAAW;AACX,IAAG;AACH;AACA;AACA,YAAW;AACX,IAAG;AACH;AACA;AACA,YAAW;AACX,IAAG;AACH;AACA,YAAW;AACX,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF,aAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA,oCAAmC,uBAAuB,KAAK;AAC/D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAAyB,yCAAyC;AAClE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wFAAuF;AACvF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,KAAI;AACJ,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA,EAAC;;;;;;;AChrCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED,EAAC;;;;;;;AC7CD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA,EAAC;;;;;;;ACnFD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;;;;;;AClCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED,EAAC;;;;;;;AChDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B,kBAAkB,WAAW,YAAY,gBAAgB;AACnF,+BAA8B,WAAW;AACzC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAgD,kBAAkB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA,qCAAoC,eAAe;AACnD,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA,MAAK;AACL;AACA;AACA,OAAM;AACN;AACA;AACA;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA,KAAI;AACJ;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA,MAAK;AACL;AACA;AACA,OAAM;AACN;AACA;AACA;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA,KAAI;AACJ;;AAEA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA,EAAC;;;;;;;ACjfD;;AAEA;AACA;AACA;AACA;AACA,iDAAuE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;ACpBA;AACA;;;AAGA;AACA,kRAAiR,uBAAuB,qBAAqB,GAAG,gCAAgC,uBAAuB,eAAe,iBAAiB,kBAAkB,oBAAoB,2BAA2B,uBAAuB,GAAG,+BAA+B,uBAAuB,eAAe,oBAAoB,mBAAmB,cAAc,6BAA6B,GAAG,oIAAoI,oBAAoB,GAAG,2BAA2B,iBAAiB,GAAG,2CAA2C,eAAe,uBAAuB,GAAG,0CAA0C,WAAW,iBAAiB,GAAG,8CAA8C,YAAY,GAAG,8CAA8C,aAAa,GAAG,yBAAyB,gBAAgB,kBAAkB,GAAG,yCAAyC,gBAAgB,mBAAmB,yBAAyB,GAAG,wCAAwC,YAAY,gBAAgB,GAAG,4CAA4C,cAAc,GAAG,4CAA4C,WAAW,GAAG;;AAEl9C;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA,yCAAwC,gBAAgB;AACxD,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,aAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjDA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wDAAuD;AACvD;;AAEA,8BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;AACA;;;;;;;ACrPA,mBAAkB,wOAAwO,8DAA8D,SAAS,gDAAgD,0IAA0I,+DAA+D,oBAAoB,mNAAmN,iBAAiB,mJAAmJ,qEAAqE,e","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8cc1e55169238da91910","module.exports = {};\n\nvar loadedModules = [\n require(\"./widget_ngl.js\"),\n //require(\"./ngl.js\"),\n]\n\nfor (var i in loadedModules) {\n if (loadedModules.hasOwnProperty(i)) {\n var loadedModule = loadedModules[i];\n for (var target_name in loadedModule) {\n if (loadedModule.hasOwnProperty(target_name)) {\n module.exports[target_name] = loadedModule[target_name];\n }\n }\n }\n}\n\nmodule.exports['version'] = require('../package.json').version;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 0\n// module chunks = 0","var widgets = require(\"@jupyter-widgets/base\");\nvar NGL = require('ngl');\nvar $ = require('jquery');\nvar _ = require('underscore');\nrequire('jquery-ui/ui/widgets/draggable');\nrequire('jquery-ui/ui/widgets/slider');\nrequire('jquery-ui/ui/widgets/dialog');\nrequire('jquery-ui/themes/base/slider.css');\n\nvar Jupyter;\nif (typeof window !== 'undefined') {\n Jupyter = window['Jupyter'] = window['Jupyter'] || {};\n} else {\n Jupyter = Jupyter || {};\n}\n\nvar NGLModel = widgets.DOMWidgetModel.extend({\n defaults: function(){\n return _.extend(widgets.DOMWidgetModel.prototype.defaults(), {\n _model_name: 'NGLModel',\n _model_module: 'nglview-js-widgets',\n _model_module_version: require(\"../package.json\").version,\n _view_name: \"NGLView\",\n _view_module: \"nglview-js-widgets\",\n _view_module_version: require(\"../package.json\").version,\n });\n }\n})\n\nvar NGLView = widgets.DOMWidgetView.extend({\n render: function() {\n // init representations handling\n this.model.on(\"change:_init_representations\", this.representationsChanged, this);\n\n // init setting of frame\n this.model.on(\"change:frame\", this.frameChanged, this);\n\n // init setting of frame\n this.model.on(\"change:count\", this.countChanged, this);\n\n // init _parameters handling\n this.model.on(\"change:_parameters\", this.parametersChanged, this);\n\n // init orientation handling\n this.model.on(\"change:orientation\", this.orientationChanged, this);\n\n this.model.set('_ngl_version', NGL.Version);\n\n // for player\n this.delay = 100;\n this.sync_frame = false;\n this.sync_camera = false;\n\n // get message from Python\n this.model.on(\"msg:custom\", function(msg) {\n this.on_msg(msg);\n }, this);\n\n if (this.model.comm) {\n // for embeding in website\n this.model.comm.on_msg(function(msg) {\n var buffers = msg.buffers;\n var content = msg.content.data.content;\n if (buffers.length && content) {\n content.buffers = buffers;\n }\n this.model._handle_comm_msg.call(this.model, msg);\n }.bind(this));\n }\n\n // init NGL stage\n NGL.useWorker = false;\n this.stage = new NGL.Stage(undefined, {\n backgroundColor: \"white\"\n });\n this.structureComponent = undefined;\n this.$container = $(this.stage.viewer.container);\n this.$el.append(this.$container);\n this.$container.resizable({\n resize: function(event, ui) {\n this.setSize(ui.size.width + \"px\", ui.size.height + \"px\");\n }.bind(this)\n });\n this.displayed.then(function() {\n var that = this;\n var width = this.$el.parent().width() + \"px\";\n var height = \"300px\";\n\n this.setSize(width, height);\n this.$container.resizable(\n \"option\", \"maxWidth\", this.$el.parent().width()\n );\n this.requestUpdateStageParameters();\n if (this.model.get(\"_ngl_serialize\")){\n that.handle_embed();\n }\n }.bind(this));\n\n this.stage.viewerControls.signals.changed.add(function() {\n if (this.sync_camera) {\n this.model.set('_scene_position', this.stage.viewerControls.position)\n this.model.set('_scene_rotation', this.stage.viewerControls.rotation)\n this.touch();\n }\n }.bind(this));\n\n // init toggle fullscreen\n $(this.stage.viewer.container).dblclick(function() {\n this.stage.toggleFullscreen();\n }.bind(this));\n\n // init picking handling\n this.$pickingInfo = $(\"
\")\n .css(\"position\", \"absolute\")\n .css(\"top\", \"5%\")\n .css(\"left\", \"3%\")\n .css(\"background-color\", \"white\")\n .css(\"padding\", \"2px 5px 2px 5px\")\n .css(\"opacity\", \"0.7\")\n .appendTo(this.$container);\n\n var $inputNotebookCommand = $('');\n var that = this;\n\n $inputNotebookCommand.keypress(function(e) {\n var command = $(\"#input_notebook_command\").val();\n if (e.which == 13) {\n $(\"#input_notebook_command\").val(\"\")\n Jupyter.notebook.kernel.execute(command);\n }\n });\n\n this.$notebook_text = $(\"
\")\n .css(\"position\", \"absolute\")\n .css(\"bottom\", \"5%\")\n .css(\"left\", \"3%\")\n .css(\"padding\", \"2px 5px 2px 5px\")\n .css(\"opacity\", \"0.7\")\n .append($inputNotebookCommand)\n .appendTo(this.$container);\n this.$notebook_text.hide();\n\n this.stage.signals.clicked.add(function(pd) {\n if (pd) {\n var pd2 = {};\n if (pd.atom) pd2.atom = pd.atom.toObject();\n if (pd.bond) pd2.bond = pd.bond.toObject();\n if (pd.instance) pd2.instance = pd.instance;\n this.model.set(\"picked\", pd2);\n this.touch();\n var pickingText = \"\";\n if (pd.atom) {\n pickingText = \"Atom: \" + pd.atom.qualifiedName();\n } else if (pd.bond) {\n pickingText = \"Bond: \" + pd.bond.atom1.qualifiedName() + \" - \" + pd.bond.atom2.qualifiedName();\n }\n this.$pickingInfo.text(pickingText);\n }\n }, this);\n\n this.initPlayer();\n\n var container = this.stage.viewer.container;\n that = this;\n container.addEventListener('dragover', function(e) {\n e.stopPropagation();\n e.preventDefault();\n e.dataTransfer.dropEffect = 'copy';\n }, false);\n\n container.addEventListener('drop', function(e) {\n e.stopPropagation();\n e.preventDefault();\n var file = e.dataTransfer.files[0];\n\n that.stage.loadFile(file).then(function(o){\n that.makeDefaultRepr(o);\n that._handle_loading_file_finished();\n });\n var numDroppedFiles = that.model.get(\"_n_dragged_files\");\n that.model.set(\"_n_dragged_files\", numDroppedFiles + 1);\n that.touch();\n }, false);\n\n that = this;\n this.stage.signals.componentAdded.add(function() {\n var len = this.stage.compList.length;\n this.model.set(\"n_components\", len);\n this.touch();\n var comp = this.stage.compList[len - 1];\n comp.signals.representationRemoved.add(function() {\n that.request_repr_dict();\n });\n comp.signals.representationAdded.add(function() {\n that.request_repr_dict();\n });\n }, this);\n\n this.stage.signals.componentRemoved.add(function() {\n this.model.set(\"n_components\", this.stage.compList.length);\n this.touch();\n }, this);\n\n // for callbacks from Python\n // must be after initializing NGL.Stage\n this.send({\n 'type': 'request_loaded',\n 'data': true\n })\n var state_params = this.stage.getParameters();\n this.model.set('_ngl_original_stage_parameters', state_params);\n this.touch();\n },\n\n handle_embed: function(){\n var that = this\n var ngl_coordinate_resource = that.model.get(\"_ngl_coordinate_resource\");\n var ngl_msg_archive = that.model.get(\"_ngl_msg_archive\");\n var ngl_stage_params = that.model.get('_ngl_full_stage_parameters_embed');\n var loadfile_list = [];\n\n _.each(ngl_msg_archive, function(msg){\n if (msg.methodName == 'loadFile'){\n loadfile_list.push(that._get_loadFile_promise(msg));\n }\n });\n\n console.log('ngl_stage_params', ngl_stage_params);\n\n Promise.all(loadfile_list).then(function(compList){\n var ngl_repr_dict = that.model.get('_ngl_repr_dict')\n for (var index in ngl_repr_dict){\n var comp = compList[index];\n comp.removeAllRepresentations();\n var reprlist = ngl_repr_dict[index]; \n for (var j in reprlist){\n var repr = reprlist[j];\n comp.addRepresentation(repr.type, repr.params);\n }\n }\n\n that.stage.setParameters(ngl_stage_params);\n\n var frame = 0;\n var count = ngl_coordinate_resource['n_frames'];\n delete ngl_coordinate_resource['n_frames'];\n\n var play = function(){\n that.$playerButton.text(\"pause\");\n that.playerInterval = setInterval(function(){\n frame = frame + 1;\n if (frame > count - 1){\n frame = 0;\n }\n that.$playerSlider.slider(\"option\", \"value\", frame);\n that.updateCoordinatesFromDict(ngl_coordinate_resource, frame);\n }, that.delay)\n }\n\n var pause = function() {\n that.$playerButton.text(\"play\");\n if (that.playerInterval !== undefined) {\n clearInterval(that.playerInterval);\n }\n }.bind(that);\n\n if (that.$playerButton){\n that.$playerButton\n .off('click')\n .click(function(event) {\n if (that.$playerButton.text() === \"play\") {\n play();\n } else if (that.$playerButton.text() === \"pause\") {\n pause();\n }\n event; // to pass eslint\n }.bind(that));\n that.$playerSlider.slider({\n max : count-1,\n slide: function(event, ui) {\n pause();\n that.updateCoordinatesFromDict(ngl_coordinate_resource, ui.value);\n frame = ui.value;\n }.bind(that)\n })\n }\n });\n },\n\n updateCoordinatesFromDict: function(cdict, frame_index){\n // update coordinates for given \"index\"\n // cdict = Dict[int, List[base64]]\n var keys = Object.keys(cdict);\n\n for (var i = 0; i < keys.length; i++) {\n var traj_index = keys[i];\n var coordinates = this.decode_base64(cdict[traj_index][frame_index]);\n if (coordinates && coordinates.byteLength > 0) {\n this.updateCoordinates(coordinates, traj_index);\n }\n }\n },\n\n setSelector: function(selector_id) {\n // id is uuid that will be set from Python\n var selector = \"
\";\n this.$ngl_selector = $(selector)\n .css(\"position\", \"absolute\")\n .css(\"bottom\", \"5%\")\n .css(\"left\", \"3%\")\n .css(\"padding\", \"2px 5px 2px 5px\")\n .css(\"opacity\", \"0.7\")\n .appendTo(this.$container);\n },\n\n setIPythonLikeCell: function() {\n var cell = Jupyter.notebook.insert_cell_at_bottom();\n\n var handler = function(event) {\n var selected_cell = Jupyter.notebook.get_selected_cell();\n if (selected_cell.cell_id === cell.cell_id) {\n selected_cell.execute();\n selected_cell.set_text('');\n }\n event; // to pass eslint\n return false;\n };\n\n var action = {\n help: 'run cell',\n help_index: 'zz',\n handler: handler\n };\n\n Jupyter.keyboard_manager.edit_shortcuts.add_shortcut('enter', action);\n },\n\n hideNotebookCommandBox: function() {\n this.$notebook_text.hide();\n },\n\n showNotebookCommandBox: function() {\n this.$notebook_text.show();\n },\n\n requestFrame: function() {\n this.send({\n 'type': 'request_frame',\n 'data': 'frame'\n });\n },\n\n requestUpdateStageParameters: function() {\n var updated_params = this.stage.getParameters();\n this.model.set('_ngl_full_stage_parameters', updated_params);\n this.touch();\n },\n\n requestReprParameters: function(component_index, repr_index) {\n var comp = this.stage.compList[component_index];\n var repr = comp.reprList[repr_index];\n var msg = repr.repr.getParameters();\n\n if (msg) {\n msg['name'] = repr.name;\n this.send({\n 'type': 'repr_parameters',\n 'data': msg\n });\n }\n },\n\n request_repr_dict: function() {\n var n_components = this.stage.compList.length;\n var msg = {};\n\n for (var i = 0; i < n_components; i++) {\n var comp = this.stage.compList[i];\n msg[i] = {};\n var msgi = msg[i];\n for (var j = 0; j < comp.reprList.length; j++) {\n var repr = comp.reprList[j];\n msgi[j] = {};\n msgi[j]['type'] = repr.name;\n msgi[j]['params'] = repr.repr.getParameters();\n }\n }\n this.send({\n // make sure we are using \"request_repr_dict\" name\n // in backend too.\n 'type': 'request_repr_dict',\n 'data': msg\n });\n },\n\n // setDraggable: function(params) {\n // if (params) {\n // this.$container.draggable(params);\n // } else {\n // this.$container.draggable();\n // }\n // },\n setDelay: function(delay) {\n this.delay = delay;\n },\n\n setSyncFrame: function() {\n this.sync_frame = true;\n },\n\n setUnSyncFrame: function() {\n this.sync_frame = false;\n },\n\n setSyncCamera: function() {\n this.sync_camera = true;\n },\n\n setUnSyncCamera: function() {\n this.sync_camera = false;\n },\n\n viewXZPlane: function() {\n var m = new NGL.Matrix4().makeRotationX( Math.PI / 2 );\n var q = new NGL.Quaternion().setFromRotationMatrix( m );\n this.stage.viewerControls.rotate( q );\n },\n\n makeDefaultRepr: function(o) {\n var reprDefList = this.model.get(\"_init_representations\");\n reprDefList.forEach(function(reprDef) {\n o.addRepresentation(reprDef.type, reprDef.params);\n });\n\n if (this.stage.compList.length < 2) {\n o.autoView(100);\n }\n },\n\n\n initPlayer: function() {\n // init player\n if (this.model.get(\"count\")) {\n var play = function() {\n this.$playerButton.text(\"pause\");\n this.playerInterval = setInterval(function() {\n var frame = this.model.get(\"frame\") + 1;\n var count = this.model.get(\"count\");\n if (frame >= count) frame = 0;\n\n if (this.sync_frame) {\n this.model.set(\"frame\", frame);\n this.touch();\n } else {\n this.requestFrame();\n }\n }.bind(this), this.delay);\n }.bind(this);\n var pause = function() {\n this.$playerButton.text(\"play\");\n if (this.playerInterval !== undefined) {\n clearInterval(this.playerInterval);\n }\n }.bind(this);\n this.$playerButton = $(\"\")\n .css(\"float\", \"left\")\n .css(\"width\", \"55px\")\n .css(\"opacity\", \"0.7\")\n .click(function(event) {\n if (this.$playerButton.text() === \"play\") {\n play();\n } else if (this.$playerButton.text() === \"pause\") {\n pause();\n }\n event; // to pass eslint\n }.bind(this));\n this.$playerSlider = $(\"
\")\n .css(\"margin-left\", \"70px\")\n .css(\"position\", \"relative\")\n .css(\"bottom\", \"-7px\")\n .slider({\n min: 0,\n max: this.model.get(\"count\") - 1,\n slide: function(event, ui) {\n pause();\n this.model.set(\"frame\", ui.value);\n this.touch();\n }.bind(this)\n });\n this.$player = $(\"
\")\n .css(\"position\", \"absolute\")\n .css(\"bottom\", \"5%\")\n .css(\"width\", \"94%\")\n .css(\"margin-left\", \"3%\")\n .css(\"opacity\", \"0.7\")\n .append(this.$playerButton)\n .append(this.$playerSlider)\n .appendTo(this.$container);\n this.model.on(\"change:frame\", function() {\n this.$playerSlider.slider(\"value\", this.model.get(\"frame\"));\n }, this);\n\n if (this.model.get(\"count\") < 2) {\n this.$player.hide()\n }\n }\n },\n\n countChanged: function() {\n var count = this.model.get(\"count\");\n this.$playerSlider.slider({\n max: count - 1\n });\n if (this.model.get(\"count\") > 1) {\n this.$player.show()\n }\n },\n\n representationsChanged: function() {\n var representations = this.model.get(\"_init_representations\");\n var component;\n\n for (var i = 0; i < this.stage.compList.length; i++) {\n component = this.stage.compList[i];\n if (representations && component) {\n component.clearRepresentations();\n representations.forEach(function(repr) {\n component.addRepresentation(repr.type, repr.params);\n });\n }\n }\n },\n\n setVisibilityForRepr: function(component_index, repr_index, value) {\n // value = True/False\n var component = this.stage.compList[component_index];\n var repr = component.reprList[repr_index];\n\n if (repr) {\n repr.setVisibility(value);\n }\n },\n\n removeRepresentation: function(component_index, repr_index) {\n var component = this.stage.compList[component_index];\n var repr = component.reprList[repr_index]\n\n if (repr) {\n component.removeRepresentation(repr);\n }\n },\n\n removeRepresentationsByName: function(repr_name, component_index) {\n var component = this.stage.compList[component_index];\n\n if (component) {\n component.reprList.forEach(function(repr) {\n if (repr.name == repr_name) {\n component.removeRepresentation(repr);\n }\n })\n }\n },\n\n updateRepresentationForComponent: function(repr_index, component_index, params) {\n var component = this.stage.compList[component_index];\n var that = this;\n var repr = component.reprList[repr_index];\n if (repr) {\n repr.setParameters(params);\n that.request_repr_dict();\n }\n },\n\n updateRepresentationsByName: function(repr_name, component_index, params) {\n var component = this.stage.compList[component_index];\n var that = this;\n\n if (component) {\n component.reprList.forEach(function(repr) {\n if (repr.name == repr_name) {\n repr.setParameters(params);\n that.request_repr_dict();\n }\n })\n }\n },\n\n setRepresentation: function(name, params, component_index, repr_index) {\n var component = this.stage.compList[component_index];\n var repr = component.reprList[repr_index];\n var that = this;\n\n if (repr) {\n params['useWorker'] = false;\n var new_repr = NGL.makeRepresentation(name, component.structure,\n this.stage.viewer, params);\n if (new_repr) {\n repr.setRepresentation(new_repr);\n repr.name = name;\n component.reprList[repr_index] = repr;\n that.request_repr_dict();\n }\n }\n },\n\n setColorByResidue: function(colors, component_index, repr_index){\n var repr = this.stage.compList[component_index].reprList[repr_index];\n var schemeId = NGL.ColorMakerRegistry.addScheme(function(params){\n this.atomColor = function(atom){\n var color = colors[atom.residueIndex];\n return color\n };\n params; // to pass eslint; ack;\n });\n repr.setColor(schemeId);\n },\n\n addShape: function(name, shapes) {\n // shapes: List[Tuple[str, ...]]\n // e.g: [('sphere', ...), ('cone', ...)]\n var shape = new NGL.Shape(name);\n var shape_dict = {\n 'sphere': shape.addSphere,\n 'ellipsoid': shape.addEllipsoid,\n 'cylinder': shape.addCylinder,\n 'cone': shape.addCone,\n 'mesh': shape.addMesh,\n 'arrow': shape.addArrow,\n 'text': shape.addText,\n 'label': shape.addText,\n 'tetrahedron': shape.addTetrahedron,\n 'octahedron': shape.addOctahedron,\n 'torus': shape.addTorus\n };\n for (var i = 0; i < shapes.length; i++) {\n var shapes_i = shapes[i]\n var shape_type = shapes_i[0];\n var params = shapes_i.slice(1, shapes_i.length);\n // e.g params = ('sphere', [ 0, 0, 9 ], [ 1, 0, 0 ], 1.5)\n\n var func = shape_dict[shape_type];\n func.apply(shape, params);\n // shape.func(params);\n }\n var shapeComp = this.stage.addComponentFromObject(shape);\n shapeComp.addRepresentation(\"buffer\");\n },\n\n replaceStructure: function(structure){\n var blob = new Blob([structure.data], {type: \"text/plain\"});\n var params = structure.params || {};\n params.ext = structure.ext;\n params.defaultRepresentation = false;\n var comp = this.stage.compList[0];\n var representations = comp.reprList.slice();\n var old_orientation = this.stage.viewerControls.getOrientation();\n var that = this;\n this.stage.loadFile(blob, params).then(function(component) {\n that.stage.viewerControls.orient(old_orientation);\n representations.forEach(function(repr) {\n var repr_name = repr.name;\n var repr_params = repr.repr.getParameters();\n // Note: not using repr.repr.type, repr.repr.params\n // since seems to me that repr.repr.params won't return correct \"sele\"\n component.addRepresentation(repr_name, repr_params);\n });\n that.stage.removeComponent(comp);\n that._handle_loading_file_finished();\n });\n },\n\n superpose: function(cindex0, cindex1, align, sele0, sele1) {\n // superpose two components with given params\n var component0 = this.stage.compList[cindex0];\n var component1 = this.stage.compList[cindex1];\n component1.superpose(component0, align, sele0, sele1);\n },\n\n decode_base64: function(base64) {\n // lightly adapted from Niklas\n\n /*\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n var chars =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var bufferLength = base64.length * 0.75,\n len = base64.length,\n i, p = 0,\n encoded1, encoded2, encoded3, encoded4;\n\n if (base64[base64.length - 1] === \"=\") {\n bufferLength--;\n if (base64[base64.length - 2] === \"=\") {\n bufferLength--;\n }\n }\n\n var arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = chars.indexOf(base64[i]);\n encoded2 = chars.indexOf(base64[i + 1]);\n encoded3 = chars.indexOf(base64[i + 2]);\n encoded4 = chars.indexOf(base64[i + 3]);\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n },\n\n updateCoordinates: function(coordinates, model) {\n // coordinates must be ArrayBuffer (use this.decode_base64)\n var component = this.stage.compList[model];\n if (coordinates && component) {\n var coords = new Float32Array(coordinates);\n component.structure.updatePosition(coords);\n component.updateRepresentations({\n \"position\": true\n });\n }\n },\n\n handleResize: function() {\n this.$container.resizable({\n resize: function(event, ui) {\n this.setSize(ui.size.width + \"px\", ui.size.height + \"px\");\n }.bind(this)\n })\n },\n\n setSize: function(width, height) {\n this.stage.viewer.container.style.width = width;\n this.stage.viewer.container.style.height = height;\n this.stage.handleResize();\n },\n\n openNotebookCommandDialog: function() {\n var that = this;\n var dialog = this.$notebook_text.dialog({\n draggable: true,\n resizable: true,\n modal: false,\n show: {\n effect: \"blind\",\n duration: 150\n },\n close: function(event, ui) {\n that.$container.append(that.$notebook_text);\n that.$notebook_text.dialog('destroy');\n event; ui; // to pass eslint; ack;\n },\n });\n dialog.css({\n overflow: 'hidden'\n });\n dialog.prev('.ui-dialog-titlebar')\n .css({\n 'background': 'transparent',\n 'border': 'none'\n });\n Jupyter.keyboard_manager.register_events(dialog);\n },\n\n setDialog: function() {\n var $nb_container = Jupyter.notebook.container;\n var that = this;\n var dialog = this.$container.dialog({\n title: \"NGLView\",\n draggable: true,\n resizable: true,\n modal: false,\n width: window.innerWidth - $nb_container.width() - $nb_container.offset().left - 50,\n height: 'auto',\n position: {\n my: 'right',\n at: 'right',\n of: window\n },\n show: {\n effect: \"blind\",\n duration: 150\n },\n close: function(event, ui) {\n that.$el.append(that.$container);\n that.$container.dialog('destroy');\n that.handleResize();\n event; ui; // to pass eslint; ack;\n },\n resize: function(event, ui) {\n that.stage.handleResize();\n that.setSize(ui.size.width + \"px\", ui.size.height + \"px\");\n }.bind(that),\n });\n dialog.css({\n overflow: 'hidden'\n });\n dialog.prev('.ui-dialog-titlebar')\n .css({\n 'background': 'transparent',\n 'border': 'none'\n });\n },\n\n resizeNotebook: function(width) {\n var $nb_container = Jupyter.notebook.container;\n $nb_container.width(width);\n\n if (this.$container.dialog) {\n this.$container.dialog({\n width: $nb_container.offset().left\n });\n }\n },\n\n parametersChanged: function() {\n var _parameters = this.model.get(\"_parameters\");\n this.setParameters(_parameters);\n },\n\n setParameters: function(parameters) {\n this.stage.setParameters(parameters);\n\n // do not set _ngl_full_stage_parameters here\n // or parameters will be never updated (not sure why) \n // use observe in python side\n var updated_params = this.stage.getParameters();\n this.send({\n 'type': 'stage_parameters',\n 'data': updated_params\n })\n },\n\n orientationChanged: function() {\n var orientation_list = this.model.get(\"orientation\");\n var mat4 = this.stage.viewerControls.getOrientation();\n mat4.set(orientation_list);\n this.stage.viewerControls.orient(mat4);\n },\n\n _downloadImage: function(filename, params) {\n this.stage.makeImage(params).then(function(blob) {\n NGL.download(blob, filename);\n })\n },\n\n _exportImage: function(params) {\n this.stage.makeImage(params).then(function(blob) {\n var reader = new FileReader();\n var arr_str;\n reader.onload = function() {\n arr_str = reader.result.replace(\"data:image/png;base64,\", \"\");\n this.model.set(\"_image_data\", arr_str);\n this.touch();\n }.bind(this);\n reader.readAsDataURL(blob);\n }.bind(this));\n },\n\n cleanOutput: function() {\n\n var cells = Jupyter.notebook.get_cells();\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n if (cell.output_area.outputs.length > 0) {\n var out = cell.output_area.outputs[0];\n if (out.output_type == 'display_data') {\n cell.clear_output();\n }\n }\n }\n },\n\n _handle_loading_file_finished: function() {\n this.send({'type': 'async_message', 'data': 'ok'});\n },\n\n _get_loadFile_promise: function(msg){\n // args = [{'type': ..., 'data': ...}]\n var args0 = msg.args[0];\n if (args0.type == 'blob') {\n var blob;\n if (args0.binary) {\n var decoded_data = this.decode_base64(args0.data);\n blob = new Blob([decoded_data], {\n type: \"application/octet-binary\"\n });\n } else {\n blob = new Blob([args0.data], {\n type: \"text/plain\"\n });\n }\n return this.stage.loadFile(blob, msg.kwargs)\n } else {\n return this.stage.loadFile(msg.args[0].data, msg.kwargs)\n }\n },\n \n _handle_stage_loadFile: function(msg){\n // args = [{'type': ..., 'data': ...}]\n var that = this;\n this._get_loadFile_promise(msg).then(function(o){\n that._handle_loading_file_finished();\n o;\n });\n },\n\n on_msg: function(msg) {\n // TODO: re-organize\n if (msg.type == 'call_method') {\n var index, component, func, stage;\n var new_args = msg.args.slice();\n new_args.push(msg.kwargs);\n\n switch (msg.target) {\n case 'Stage':\n var stage_func = this.stage[msg.methodName];\n stage = this.stage;\n if (msg.methodName == 'screenshot') {\n NGL.screenshot(this.stage.viewer, msg.kwargs);\n } else if (msg.methodName == 'removeComponent') {\n index = msg.args[0];\n component = this.stage.compList[index];\n this.stage.removeComponent(component);\n } else if (msg.methodName == 'loadFile') {\n this._handle_stage_loadFile(msg);\n } else {\n stage_func.apply(stage, new_args);\n }\n break;\n case 'Viewer':\n var viewer = this.stage.viewer;\n func = this.stage.viewer[msg.methodName];\n func.apply(viewer, new_args);\n break;\n case 'viewerControls':\n var controls = this.stage.viewerControls;\n func = controls[msg.methodName];\n func.apply(controls, new_args);\n break;\n case 'compList':\n index = msg['component_index'];\n component = this.stage.compList[index];\n func = component[msg.methodName];\n func.apply(component, new_args);\n break;\n case 'StructureComponent':\n component = this.structureComponent;\n func = component[msg.methodName];\n func.apply(component, new_args);\n break;\n case 'Widget':\n func = this[msg.methodName];\n if (func) {\n func.apply(this, new_args);\n } else {\n // send error message to Python?\n console.log('can not create func for ' + msg.methodName);\n }\n break;\n case 'player':\n func = this.$player[msg.methodName];\n if (func) {\n func.apply(this.$player, new_args);\n } else {\n // send error message to Python?\n console.log('can not create func for ' + msg.methodName);\n }\n break;\n case 'Representation':\n var component_index = msg['component_index'];\n var repr_index = msg['repr_index'];\n component = this.stage.compList[component_index];\n var repr = component.reprList[repr_index];\n func = repr[msg.methodName];\n if (repr && func) {\n func.apply(repr, new_args);\n }\n break;\n default:\n console.log('there is no method for ' + msg.target);\n break;\n }\n } else if (msg.type == 'base64_single') {\n var coordinatesDict = msg.data;\n var keys = Object.keys(coordinatesDict);\n\n for (var i = 0; i < keys.length; i++) {\n var traj_index = keys[i];\n var coordinates = this.decode_base64(coordinatesDict[traj_index]);\n if (coordinates && coordinates.byteLength > 0) {\n this.updateCoordinates(coordinates, traj_index);\n }\n }\n } else if (msg.type == 'binary_single') {\n var coordinateMeta = msg.data;\n keys = Object.keys(coordinateMeta);\n\n for (i = 0; i < keys.length; i++) {\n traj_index = keys[i];\n coordinates = new Float32Array(msg.buffers[i].buffer);\n if (coordinates.byteLength > 0) {\n this.updateCoordinates(coordinates, traj_index);\n }\n }\n } else if (msg.type == 'get') {\n if (msg.data == 'camera') {\n this.send(JSON.stringify(this.stage.viewer.camera));\n } else if (msg.data == 'parameters') {\n this.send(JSON.stringify(this.stage.parameters));\n } else {\n for (i = 0; i < this.stage.compList.length; i++) {\n console.log(this.stage.compList[i]);\n }\n }\n }\n },\n});\n\nmodule.exports = {\n 'NGLView': NGLView,\n 'NGLModel': NGLModel,\n 'NGL': NGL,\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/widget_ngl.js\n// module id = 1\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"@jupyter-widgets/base\"\n// module id = 2\n// module chunks = 0","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e(t.NGL={})}(this,function(t){\"use strict\";function e(){}function r(t,e){return function(){t.apply(e,arguments)}}function i(t){if(\"object\"!=typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof t)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(t,this)}function n(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,Xu(function(){var r=1===t._state?e.onFulfilled:e.onRejected;if(null===r)return void(1===t._state?o:a)(e.promise,t._value);var i;try{i=r(t._value)}catch(t){return void a(e.promise,t)}o(e.promise,i)})}function o(t,e){try{if(e===t)throw new TypeError(\"A promise cannot be resolved with itself.\");if(e&&(\"object\"==typeof e||\"function\"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if(\"function\"==typeof n)return void u(r(n,e),t)}t._state=1,t._value=e,s(t)}catch(e){a(t,e)}}function a(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&Xu(function(){t._handled||qu(t._value)});for(var e=0,r=t._deferreds.length;e0&&console.error(\"THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.\")}function y(t,e,r,i,n,o,a,s,c,u,h,l){p.call(this,null,o,a,s,c,u,i,n,h,l),this.image={data:t,width:e,height:r},this.magFilter=void 0!==c?c:nl,this.minFilter=void 0!==u?u:nl,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function b(t,e,r,i,n,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:qh,p.call(this,t,e,r,i,n,o,a,s,c,u),this.flipY=!1}function x(){this.seq=[],this.map={}}function _(t,e,r){var i=t[0];if(i<=0||i>0)return t;var n=e*r,o=rp[n];if(void 0===o&&(o=new Float32Array(n),rp[n]=o),0!==e){i.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=r,t[a].toArray(o,s)}return o}function w(t,e){var r=ip[e];void 0===r&&(r=new Int32Array(e),ip[e]=r);for(var i=0;i!==e;++i)r[i]=t.allocTextureUnit();return r}function S(t,e){t.uniform1f(this.addr,e)}function A(t,e){t.uniform1i(this.addr,e)}function M(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function E(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function T(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function P(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function C(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(op.set(e.elements),t.uniformMatrix3fv(this.addr,!1,op))}function I(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(np.set(e.elements),t.uniformMatrix4fv(this.addr,!1,np))}function R(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),r.setTexture2D(e||tp,i)}function L(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),r.setTextureCube(e||ep,i)}function O(t,e){t.uniform2iv(this.addr,e)}function D(t,e){t.uniform3iv(this.addr,e)}function N(t,e){t.uniform4iv(this.addr,e)}function k(t){switch(t){case 5126:return S;case 35664:return M;case 35665:return E;case 35666:return T;case 35674:return P;case 35675:return C;case 35676:return I;case 35678:case 36198:return R;case 35680:return L;case 5124:case 35670:return A;case 35667:case 35671:return O;case 35668:case 35672:return D;case 35669:case 35673:return N}}function F(t,e){t.uniform1fv(this.addr,e)}function B(t,e){t.uniform1iv(this.addr,e)}function z(t,e){t.uniform2fv(this.addr,_(e,this.size,2))}function U(t,e){t.uniform3fv(this.addr,_(e,this.size,3))}function j(t,e){t.uniform4fv(this.addr,_(e,this.size,4))}function G(t,e){t.uniformMatrix2fv(this.addr,!1,_(e,this.size,4))}function V(t,e){t.uniformMatrix3fv(this.addr,!1,_(e,this.size,9))}function $(t,e){t.uniformMatrix4fv(this.addr,!1,_(e,this.size,16))}function H(t,e,r){var i=e.length,n=w(r,i);t.uniform1iv(this.addr,n);for(var o=0;o!==i;++o)r.setTexture2D(e[o]||tp,n[o])}function W(t,e,r){var i=e.length,n=w(r,i);t.uniform1iv(this.addr,n);for(var o=0;o!==i;++o)r.setTextureCube(e[o]||ep,n[o])}function X(t){switch(t){case 5126:return F;case 35664:return z;case 35665:return U;case 35666:return j;case 35674:return G;case 35675:return V;case 35676:return $;case 35678:return H;case 35680:return W;case 5124:case 35670:return B;case 35667:case 35671:return O;case 35668:case 35672:return D;case 35669:case 35673:return N}}function q(t,e,r){this.id=t,this.addr=r,this.setValue=k(e.type)}function Y(t,e,r){this.id=t,this.addr=r,this.size=e.size,this.setValue=X(e.type)}function Z(t){this.id=t,x.call(this)}function K(t,e){t.seq.push(e),t.map[e.id]=e}function Q(t,e,r){var i=t.name,n=i.length;for(ap.lastIndex=0;;){var o=ap.exec(i),a=ap.lastIndex,s=o[1],c=\"]\"===o[2],u=o[3];if(c&&(s|=0),void 0===u||\"[\"===u&&a+2===n){K(r,void 0===u?new q(s,t,e):new Y(s,t,e));break}var h=r.map[s];void 0===h&&K(r,h=new Z(s)),r=h}}function J(t,e,r){var i=this;x.call(this),this.renderer=r;for(var n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),o=0;o.001&&R.scale>.001&&(S.x=R.x,S.y=R.y,S.z=R.z,_=R.size*R.scale/m.w,w.x=_*y,w.y=_,d.uniform3f(u.screenPosition,S.x,S.y,S.z),d.uniform2f(u.scale,w.x,w.y),d.uniform1f(u.rotation,R.rotation),d.uniform1f(u.opacity,R.opacity),d.uniform3f(u.color,R.color.r,R.color.g,R.color.b),f.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst),t.setTexture2D(R.texture,1),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0))}}}f.enable(d.CULL_FACE),f.enable(d.DEPTH_TEST),f.buffers.depth.setMask(!0),t.resetGLState()}}}function it(t,e){function r(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),e=new Uint16Array([0,1,2,0,2,3]);o=l.createBuffer(),a=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,o),l.bufferData(l.ARRAY_BUFFER,t,l.STATIC_DRAW),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,a),l.bufferData(l.ELEMENT_ARRAY_BUFFER,e,l.STATIC_DRAW),s=i(),c={position:l.getAttribLocation(s,\"position\"),uv:l.getAttribLocation(s,\"uv\")},u={uvOffset:l.getUniformLocation(s,\"uvOffset\"),uvScale:l.getUniformLocation(s,\"uvScale\"),rotation:l.getUniformLocation(s,\"rotation\"),scale:l.getUniformLocation(s,\"scale\"),color:l.getUniformLocation(s,\"color\"),map:l.getUniformLocation(s,\"map\"),opacity:l.getUniformLocation(s,\"opacity\"),modelViewMatrix:l.getUniformLocation(s,\"modelViewMatrix\"),projectionMatrix:l.getUniformLocation(s,\"projectionMatrix\"),fogType:l.getUniformLocation(s,\"fogType\"),fogDensity:l.getUniformLocation(s,\"fogDensity\"),fogNear:l.getUniformLocation(s,\"fogNear\"),fogFar:l.getUniformLocation(s,\"fogFar\"),fogColor:l.getUniformLocation(s,\"fogColor\"),alphaTest:l.getUniformLocation(s,\"alphaTest\")};var r=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");r.width=8,r.height=8;var n=r.getContext(\"2d\");n.fillStyle=\"white\",n.fillRect(0,0,8,8),(h=new p(r)).needsUpdate=!0}function i(){var e=l.createProgram(),r=l.createShader(l.VERTEX_SHADER),i=l.createShader(l.FRAGMENT_SHADER);return l.shaderSource(r,[\"precision \"+t.getPrecision()+\" float;\",\"#define SHADER_NAME SpriteMaterial\",\"uniform mat4 modelViewMatrix;\",\"uniform mat4 projectionMatrix;\",\"uniform float rotation;\",\"uniform vec2 scale;\",\"uniform vec2 uvOffset;\",\"uniform vec2 uvScale;\",\"attribute vec2 position;\",\"attribute vec2 uv;\",\"varying vec2 vUV;\",\"void main() {\",\"vUV = uvOffset + uv * uvScale;\",\"vec2 alignedPosition = position * scale;\",\"vec2 rotatedPosition;\",\"rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\",\"rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\",\"vec4 finalPosition;\",\"finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\",\"finalPosition.xy += rotatedPosition;\",\"finalPosition = projectionMatrix * finalPosition;\",\"gl_Position = finalPosition;\",\"}\"].join(\"\\n\")),l.shaderSource(i,[\"precision \"+t.getPrecision()+\" float;\",\"#define SHADER_NAME SpriteMaterial\",\"uniform vec3 color;\",\"uniform sampler2D map;\",\"uniform float opacity;\",\"uniform int fogType;\",\"uniform vec3 fogColor;\",\"uniform float fogDensity;\",\"uniform float fogNear;\",\"uniform float fogFar;\",\"uniform float alphaTest;\",\"varying vec2 vUV;\",\"void main() {\",\"vec4 texture = texture2D( map, vUV );\",\"if ( texture.a < alphaTest ) discard;\",\"gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\",\"if ( fogType > 0 ) {\",\"float depth = gl_FragCoord.z / gl_FragCoord.w;\",\"float fogFactor = 0.0;\",\"if ( fogType == 1 ) {\",\"fogFactor = smoothstep( fogNear, fogFar, depth );\",\"} else {\",\"const float LOG2 = 1.442695;\",\"fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\",\"fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\",\"}\",\"gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\",\"}\",\"}\"].join(\"\\n\")),l.compileShader(r),l.compileShader(i),l.attachShader(e,r),l.attachShader(e,i),l.linkProgram(e),e}function n(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var o,a,s,c,u,h,l=t.context,d=t.state,f=new g,v=new m,y=new g;this.render=function(i,p){if(0!==e.length){void 0===s&&r(),l.useProgram(s),d.initAttributes(),d.enableAttribute(c.position),d.enableAttribute(c.uv),d.disableUnusedAttributes(),d.disable(l.CULL_FACE),d.enable(l.BLEND),l.bindBuffer(l.ARRAY_BUFFER,o),l.vertexAttribPointer(c.position,2,l.FLOAT,!1,16,0),l.vertexAttribPointer(c.uv,2,l.FLOAT,!1,16,8),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,a),l.uniformMatrix4fv(u.projectionMatrix,!1,p.projectionMatrix.elements),d.activeTexture(l.TEXTURE0),l.uniform1i(u.map,0);var m=0,g=0,b=i.fog;b?(l.uniform3f(u.fogColor,b.color.r,b.color.g,b.color.b),b.isFog?(l.uniform1f(u.fogNear,b.near),l.uniform1f(u.fogFar,b.far),l.uniform1i(u.fogType,1),m=1,g=1):b.isFogExp2&&(l.uniform1f(u.fogDensity,b.density),l.uniform1i(u.fogType,2),m=2,g=2)):(l.uniform1i(u.fogType,0),m=0,g=0);for(var x=0,_=e.length;x<_;x++)(S=e[x]).modelViewMatrix.multiplyMatrices(p.matrixWorldInverse,S.matrixWorld),S.z=-S.modelViewMatrix.elements[14];e.sort(n);for(var w=[],x=0,_=e.length;x<_;x++){var S=e[x],A=S.material;if(!1!==A.visible){S.onBeforeRender(t,i,p,void 0,A,void 0),l.uniform1f(u.alphaTest,A.alphaTest),l.uniformMatrix4fv(u.modelViewMatrix,!1,S.modelViewMatrix.elements),S.matrixWorld.decompose(f,v,y),w[0]=y.x,w[1]=y.y;var M=0;i.fog&&A.fog&&(M=g),m!==M&&(l.uniform1i(u.fogType,M),m=M),null!==A.map?(l.uniform2f(u.uvOffset,A.map.offset.x,A.map.offset.y),l.uniform2f(u.uvScale,A.map.repeat.x,A.map.repeat.y)):(l.uniform2f(u.uvOffset,0,0),l.uniform2f(u.uvScale,1,1)),l.uniform1f(u.opacity,A.opacity),l.uniform3f(u.color,A.color.r,A.color.g,A.color.b),l.uniform1f(u.rotation,A.rotation),l.uniform2fv(u.scale,w),d.setBlending(A.blending,A.blendEquation,A.blendSrc,A.blendDst,A.blendEquationAlpha,A.blendSrcAlpha,A.blendDstAlpha,A.premultipliedAlpha),d.buffers.depth.setTest(A.depthTest),d.buffers.depth.setMask(A.depthWrite),A.map?t.setTexture2D(A.map,0):t.setTexture2D(h,0),l.drawElements(l.TRIANGLES,6,l.UNSIGNED_SHORT,0),S.onAfterRender(t,i,p,void 0,A,void 0)}}d.enable(l.CULL_FACE),t.resetGLState()}}}function nt(){Object.defineProperty(this,\"id\",{value:pp++}),this.uuid=Ql.generateUUID(),this.name=\"\",this.type=\"Material\",this.fog=!0,this.lights=!0,this.blending=lh,this.side=rh,this.shading=ah,this.vertexColors=sh,this.opacity=1,this.transparent=!1,this.blendSrc=Mh,this.blendDst=Eh,this.blendEquation=gh,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Nh,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.needsUpdate=!0}function ot(t){nt.call(this),this.type=\"ShaderMaterial\",this.defines={},this.uniforms={},this.vertexShader=\"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\",this.fragmentShader=\"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,void 0!==t&&(void 0!==t.attributes&&console.error(\"THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.\"),this.setValues(t))}function at(t){nt.call(this),this.type=\"MeshDepthMaterial\",this.depthPacking=Zl,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function st(t,e){this.min=void 0!==t?t:new g(1/0,1/0,1/0),this.max=void 0!==e?e:new g(-1/0,-1/0,-1/0)}function ct(t,e){this.center=void 0!==t?t:new g,this.radius=void 0!==e?e:0}function ut(){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.\")}function ht(t,e){this.normal=void 0!==t?t:new g(1,0,0),this.constant=void 0!==e?e:0}function lt(t,e,r,i,n,o){this.planes=[void 0!==t?t:new ht,void 0!==e?e:new ht,void 0!==r?r:new ht,void 0!==i?i:new ht,void 0!==n?n:new ht,void 0!==o?o:new ht]}function pt(t,e,r,i){function n(e,r,i,n){var o=e.geometry,a=null,s=S,c=e.customDepthMaterial;if(i&&(s=A,c=e.customDistanceMaterial),c)a=c;else{var u=!1;r.morphTargets&&(o&&o.isBufferGeometry?u=o.morphAttributes&&o.morphAttributes.position&&o.morphAttributes.position.length>0:o&&o.isGeometry&&(u=o.morphTargets&&o.morphTargets.length>0)),e.isSkinnedMesh&&!1===r.skinning&&console.warn(\"THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:\",e);var h=e.isSkinnedMesh&&r.skinning,l=0;u&&(l|=x),h&&(l|=_),a=s[l]}if(t.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){var p=a.uuid,d=r.uuid,f=M[p];void 0===f&&(f={},M[p]=f);var m=f[d];void 0===m&&(m=a.clone(),f[d]=m),a=m}a.visible=r.visible,a.wireframe=r.wireframe;var g=r.side;return F.renderSingleSided&&g==nh&&(g=rh),F.renderReverseSided&&(g===rh?g=ih:g===ih&&(g=rh)),a.side=g,a.clipShadows=r.clipShadows,a.clippingPlanes=r.clippingPlanes,a.wireframeLinewidth=r.wireframeLinewidth,a.linewidth=r.linewidth,i&&void 0!==a.uniforms.lightPos&&a.uniforms.lightPos.value.copy(n),a}function o(e,i,a,s){if(!1!==e.visible){if(e.layers.test(i.layers)&&(e.isMesh||e.isLine||e.isPoints)&&e.castShadow&&(!e.frustumCulled||c.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,e.matrixWorld);var u=r.update(e),h=e.material;if(Array.isArray(h))for(var l=u.groups,p=0,d=l.length;pe&&(e=t[r]);return e}function Ct(){Object.defineProperty(this,\"id\",{value:_t()}),this.uuid=Ql.generateUUID(),this.name=\"\",this.type=\"BufferGeometry\",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function It(t,e,r,i,n,o){wt.call(this),this.type=\"BoxGeometry\",this.parameters={width:t,height:e,depth:r,widthSegments:i,heightSegments:n,depthSegments:o},this.fromBufferGeometry(new Rt(t,e,r,i,n,o)),this.mergeVertices()}function Rt(t,e,r,i,n,o){function a(t,e,r,i,n,o,a,f,m,v,y){var b,x,_=o/m,w=a/v,S=o/2,A=a/2,M=f/2,E=m+1,T=v+1,P=0,C=0,I=new g;for(x=0;x0?1:-1,h.push(I.x,I.y,I.z),l.push(b/m),l.push(1-x/v),P+=1}}for(x=0;x65535?Mt:At)(n,1),e.update(i,t.ELEMENT_ARRAY_BUFFER),c[r.id]=i,i}var s={},c={};return{get:n,update:o,getWireframeAttribute:a}}function Xt(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var r;switch(e.type){case\"DirectionalLight\":r={direction:new g,color:new tt,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case\"SpotLight\":r={position:new g,direction:new g,color:new tt,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case\"PointLight\":r={position:new g,color:new tt,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new l};break;case\"HemisphereLight\":r={direction:new g,skyColor:new tt,groundColor:new tt};break;case\"RectAreaLight\":r={color:new tt,position:new g,halfWidth:new g,halfHeight:new g}}return t[e.id]=r,r}}}function qt(t,e,r){function i(t){var i=r.frame,n=t.geometry,a=e.get(t,n);return o[a.id]!==i&&(n.isGeometry&&a.updateFromObject(t),e.update(a),o[a.id]=i),a}function n(){o={}}var o={};return{update:i,clear:n}}function Yt(t){for(var e=t.split(\"\\n\"),r=0;r\");return ae(r)}return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,e)}function se(t){function e(t,e,r,i){for(var n=\"\",o=parseInt(e);o0?t.gammaFactor:1,v=ee(a,n,t.extensions),y=re(s),b=o.createProgram();r.isRawShaderMaterial?(f=[y,\"\\n\"].filter(ne).join(\"\\n\"),m=[v,y,\"\\n\"].filter(ne).join(\"\\n\")):(f=[\"precision \"+n.precision+\" float;\",\"precision \"+n.precision+\" int;\",\"#define SHADER_NAME \"+i.name,y,n.supportsVertexTextures?\"#define VERTEX_TEXTURES\":\"\",\"#define GAMMA_FACTOR \"+g,\"#define MAX_BONES \"+n.maxBones,n.useFog&&n.fog?\"#define USE_FOG\":\"\",n.useFog&&n.fogExp?\"#define FOG_EXP2\":\"\",n.map?\"#define USE_MAP\":\"\",n.envMap?\"#define USE_ENVMAP\":\"\",n.envMap?\"#define \"+p:\"\",n.lightMap?\"#define USE_LIGHTMAP\":\"\",n.aoMap?\"#define USE_AOMAP\":\"\",n.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",n.bumpMap?\"#define USE_BUMPMAP\":\"\",n.normalMap?\"#define USE_NORMALMAP\":\"\",n.displacementMap&&n.supportsVertexTextures?\"#define USE_DISPLACEMENTMAP\":\"\",n.specularMap?\"#define USE_SPECULARMAP\":\"\",n.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",n.metalnessMap?\"#define USE_METALNESSMAP\":\"\",n.alphaMap?\"#define USE_ALPHAMAP\":\"\",n.vertexColors?\"#define USE_COLOR\":\"\",n.flatShading?\"#define FLAT_SHADED\":\"\",n.skinning?\"#define USE_SKINNING\":\"\",n.useVertexTexture?\"#define BONE_TEXTURE\":\"\",n.morphTargets?\"#define USE_MORPHTARGETS\":\"\",n.morphNormals&&!1===n.flatShading?\"#define USE_MORPHNORMALS\":\"\",n.doubleSided?\"#define DOUBLE_SIDED\":\"\",n.flipSided?\"#define FLIP_SIDED\":\"\",\"#define NUM_CLIPPING_PLANES \"+n.numClippingPlanes,n.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",n.shadowMapEnabled?\"#define \"+h:\"\",n.sizeAttenuation?\"#define USE_SIZEATTENUATION\":\"\",n.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",n.logarithmicDepthBuffer&&t.extensions.get(\"EXT_frag_depth\")?\"#define USE_LOGDEPTHBUF_EXT\":\"\",\"uniform mat4 modelMatrix;\",\"uniform mat4 modelViewMatrix;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 viewMatrix;\",\"uniform mat3 normalMatrix;\",\"uniform vec3 cameraPosition;\",\"attribute vec3 position;\",\"attribute vec3 normal;\",\"attribute vec2 uv;\",\"#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(ne).join(\"\\n\"),m=[v,\"precision \"+n.precision+\" float;\",\"precision \"+n.precision+\" int;\",\"#define SHADER_NAME \"+i.name,y,n.alphaTest?\"#define ALPHATEST \"+n.alphaTest:\"\",\"#define GAMMA_FACTOR \"+g,n.useFog&&n.fog?\"#define USE_FOG\":\"\",n.useFog&&n.fogExp?\"#define FOG_EXP2\":\"\",n.map?\"#define USE_MAP\":\"\",n.envMap?\"#define USE_ENVMAP\":\"\",n.envMap?\"#define \"+l:\"\",n.envMap?\"#define \"+p:\"\",n.envMap?\"#define \"+d:\"\",n.lightMap?\"#define USE_LIGHTMAP\":\"\",n.aoMap?\"#define USE_AOMAP\":\"\",n.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",n.bumpMap?\"#define USE_BUMPMAP\":\"\",n.normalMap?\"#define USE_NORMALMAP\":\"\",n.specularMap?\"#define USE_SPECULARMAP\":\"\",n.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",n.metalnessMap?\"#define USE_METALNESSMAP\":\"\",n.alphaMap?\"#define USE_ALPHAMAP\":\"\",n.vertexColors?\"#define USE_COLOR\":\"\",n.gradientMap?\"#define USE_GRADIENTMAP\":\"\",n.flatShading?\"#define FLAT_SHADED\":\"\",n.doubleSided?\"#define DOUBLE_SIDED\":\"\",n.flipSided?\"#define FLIP_SIDED\":\"\",\"#define NUM_CLIPPING_PLANES \"+n.numClippingPlanes,\"#define UNION_CLIPPING_PLANES \"+(n.numClippingPlanes-n.numClipIntersection),n.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",n.shadowMapEnabled?\"#define \"+h:\"\",n.premultipliedAlpha?\"#define PREMULTIPLIED_ALPHA\":\"\",n.physicallyCorrectLights?\"#define PHYSICALLY_CORRECT_LIGHTS\":\"\",n.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",n.logarithmicDepthBuffer&&t.extensions.get(\"EXT_frag_depth\")?\"#define USE_LOGDEPTHBUF_EXT\":\"\",n.envMap&&t.extensions.get(\"EXT_shader_texture_lod\")?\"#define TEXTURE_LOD_EXT\":\"\",\"uniform mat4 viewMatrix;\",\"uniform vec3 cameraPosition;\",n.toneMapping!==Vh?\"#define TONE_MAPPING\":\"\",n.toneMapping!==Vh?hp.tonemapping_pars_fragment:\"\",n.toneMapping!==Vh?te(\"toneMapping\",n.toneMapping):\"\",n.dithering?\"#define DITHERING\":\"\",n.outputEncoding||n.mapEncoding||n.envMapEncoding||n.emissiveMapEncoding?hp.encodings_pars_fragment:\"\",n.mapEncoding?Qt(\"mapTexelToLinear\",n.mapEncoding):\"\",n.envMapEncoding?Qt(\"envMapTexelToLinear\",n.envMapEncoding):\"\",n.emissiveMapEncoding?Qt(\"emissiveMapTexelToLinear\",n.emissiveMapEncoding):\"\",n.outputEncoding?Jt(\"linearToOutputTexel\",n.outputEncoding):\"\",n.depthPacking?\"#define DEPTH_PACKING \"+r.depthPacking:\"\",\"\\n\"].filter(ne).join(\"\\n\")),c=oe(c=ae(c),n),u=oe(u=ae(u),n),r.isShaderMaterial||(c=se(c),u=se(u));var x=f+c,_=m+u,w=Zt(o,o.VERTEX_SHADER,x),S=Zt(o,o.FRAGMENT_SHADER,_);o.attachShader(b,w),o.attachShader(b,S),void 0!==r.index0AttributeName?o.bindAttribLocation(b,0,r.index0AttributeName):!0===n.morphTargets&&o.bindAttribLocation(b,0,\"position\"),o.linkProgram(b);var A=o.getProgramInfoLog(b),M=o.getShaderInfoLog(w),E=o.getShaderInfoLog(S),T=!0,P=!0;!1===o.getProgramParameter(b,o.LINK_STATUS)?(T=!1,console.error(\"THREE.WebGLProgram: shader error: \",o.getError(),\"gl.VALIDATE_STATUS\",o.getProgramParameter(b,o.VALIDATE_STATUS),\"gl.getProgramInfoLog\",A,M,E)):\"\"!==A?console.warn(\"THREE.WebGLProgram: gl.getProgramInfoLog()\",A):\"\"!==M&&\"\"!==E||(P=!1),P&&(this.diagnostics={runnable:T,material:r,programLog:A,vertexShader:{log:M,prefix:f},fragmentShader:{log:E,prefix:m}}),o.deleteShader(w),o.deleteShader(S);var C;this.getUniforms=function(){return void 0===C&&(C=new J(o,b,t)),C};var I;return this.getAttributes=function(){return void 0===I&&(I=ie(o,b)),I},this.destroy=function(){o.deleteProgram(b),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn(\"THREE.WebGLProgram: .uniforms is now .getUniforms().\"),this.getUniforms()}},attributes:{get:function(){return console.warn(\"THREE.WebGLProgram: .attributes is now .getAttributes().\"),this.getAttributes()}}}),this.id=mp++,this.code=e,this.usedTimes=1,this.program=b,this.vertexShader=w,this.fragmentShader=S,this}function ue(t,e){function r(t){var r=t.skeleton.bones;if(e.floatVertexTextures)return 1024;var i=e.maxVertexUniforms,n=Math.floor((i-20)/4),o=Math.min(n,r.length);return o0,maxBones:p,useVertexTexture:e.floatVertexTextures,morphTargets:n.morphTargets,morphNormals:n.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:n.dithering,shadowMapEnabled:t.shadowMap.enabled&&h.receiveShadow&&a.shadows.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:n.premultipliedAlpha,alphaTest:n.alphaTest,doubleSided:n.side===nh,flipSided:n.side===ih,depthPacking:void 0!==n.depthPacking&&n.depthPacking}},this.getProgramCode=function(e,r){var i=[];if(r.shaderID?i.push(r.shaderID):(i.push(e.fragmentShader),i.push(e.vertexShader)),void 0!==e.defines)for(var n in e.defines)i.push(n),i.push(e.defines[n]);for(var o=0;oe||t.height>e){var r=e/Math.max(t.width,t.height),i=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");return i.width=Math.floor(t.width*r),i.height=Math.floor(t.height*r),i.getContext(\"2d\").drawImage(t,0,0,t.width,t.height,0,0,i.width,i.height),console.warn(\"THREE.WebGLRenderer: image is too big (\"+t.width+\"x\"+t.height+\"). Resized to \"+i.width+\"x\"+i.height,t),i}return t}function c(t){return Ql.isPowerOfTwo(t.width)&&Ql.isPowerOfTwo(t.height)}function u(t){if(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement){var e=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");return e.width=Ql.nearestPowerOfTwo(t.width),e.height=Ql.nearestPowerOfTwo(t.height),e.getContext(\"2d\").drawImage(t,0,0,e.width,e.height),console.warn(\"THREE.WebGLRenderer: image is not power of two (\"+t.width+\"x\"+t.height+\"). Resized to \"+e.width+\"x\"+e.height,t),e}return t}function h(t){return t.wrapS!==rl||t.wrapT!==rl||t.minFilter!==nl&&t.minFilter!==sl}function l(t,e){return t.generateMipmaps&&e&&t.minFilter!==nl&&t.minFilter!==sl}function p(e){return e===nl||e===ol||e===al?t.NEAREST:t.LINEAR}function d(t){var e=t.target;e.removeEventListener(\"dispose\",d),m(e),a.textures--}function f(t){var e=t.target;e.removeEventListener(\"dispose\",f),g(e),a.textures--}function m(e){var r=i.get(e);if(e.image&&r.__image__webglTextureCube)t.deleteTexture(r.__image__webglTextureCube);else{if(void 0===r.__webglInit)return;t.deleteTexture(r.__webglTexture)}i.remove(e)}function g(e){var r=i.get(e),n=i.get(e.texture);if(e){if(void 0!==n.__webglTexture&&t.deleteTexture(n.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(r.__webglFramebuffer[o]),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer[o]);else t.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer);i.remove(e.texture),i.remove(e)}}function v(e,n){var o=i.get(e);if(e.version>0&&o.__version!==e.version){var a=e.image;if(void 0===a)console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is undefined\",e);else{if(!1!==a.complete)return void _(o,e,n);console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is incomplete\",e)}}r.activeTexture(t.TEXTURE0+n),r.bindTexture(t.TEXTURE_2D,o.__webglTexture)}function y(e,u){var h=i.get(e);if(6===e.image.length)if(e.version>0&&h.__version!==e.version){h.__image__webglTextureCube||(e.addEventListener(\"dispose\",d),h.__image__webglTextureCube=t.createTexture(),a.textures++),r.activeTexture(t.TEXTURE0+u),r.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var p=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,m=[],g=0;g<6;g++)m[g]=p||f?f?e.image[g].image:e.image[g]:s(e.image[g],n.maxCubemapSize);var v=c(m[0]),y=o(e.format),b=o(e.type);x(t.TEXTURE_CUBE_MAP,e,v);for(g=0;g<6;g++)if(p)for(var _,w=m[g].mipmaps,S=0,A=w.length;S-1?r.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,S,y,_.width,_.height,0,_.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()\"):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,S,y,_.width,_.height,0,y,b,_.data);else f?r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,y,m[g].width,m[g].height,0,y,b,m[g].data):r.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,y,y,b,m[g]);l(e,v)&&t.generateMipmap(t.TEXTURE_CUBE_MAP),h.__version=e.version,e.onUpdate&&e.onUpdate(e)}else r.activeTexture(t.TEXTURE0+u),r.bindTexture(t.TEXTURE_CUBE_MAP,h.__image__webglTextureCube)}function b(e,n){r.activeTexture(t.TEXTURE0+n),r.bindTexture(t.TEXTURE_CUBE_MAP,i.get(e).__webglTexture)}function x(r,a,s){var c;if(s?(t.texParameteri(r,t.TEXTURE_WRAP_S,o(a.wrapS)),t.texParameteri(r,t.TEXTURE_WRAP_T,o(a.wrapT)),t.texParameteri(r,t.TEXTURE_MAG_FILTER,o(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,o(a.minFilter))):(t.texParameteri(r,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(r,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===rl&&a.wrapT===rl||console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.\",a),t.texParameteri(r,t.TEXTURE_MAG_FILTER,p(a.magFilter)),t.texParameteri(r,t.TEXTURE_MIN_FILTER,p(a.minFilter)),a.minFilter!==nl&&a.minFilter!==sl&&console.warn(\"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.\",a)),c=e.get(\"EXT_texture_filter_anisotropic\")){if(a.type===gl&&null===e.get(\"OES_texture_float_linear\"))return;if(a.type===vl&&null===e.get(\"OES_texture_half_float_linear\"))return;(a.anisotropy>1||i.get(a).__currentAnisotropy)&&(t.texParameterf(r,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,n.getMaxAnisotropy())),i.get(a).__currentAnisotropy=a.anisotropy)}}function _(e,i,p){void 0===e.__webglInit&&(e.__webglInit=!0,i.addEventListener(\"dispose\",d),e.__webglTexture=t.createTexture(),a.textures++),r.activeTexture(t.TEXTURE0+p),r.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,i.unpackAlignment);var f=s(i.image,n.maxTextureSize);h(i)&&!1===c(f)&&(f=u(f));var m=c(f),g=o(i.format),v=o(i.type);x(t.TEXTURE_2D,i,m);var y,b=i.mipmaps;if(i.isDepthTexture){var _=t.DEPTH_COMPONENT;if(i.type===gl){if(!P)throw new Error(\"Float Depth Texture only supported in WebGL2.0\");_=t.DEPTH_COMPONENT32F}else P&&(_=t.DEPTH_COMPONENT16);i.format===Tl&&_===t.DEPTH_COMPONENT&&i.type!==dl&&i.type!==ml&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.\"),i.type=dl,v=o(i.type)),i.format===Pl&&(_=t.DEPTH_STENCIL,i.type!==_l&&(console.warn(\"THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.\"),i.type=_l,v=o(i.type))),r.texImage2D(t.TEXTURE_2D,0,_,f.width,f.height,0,g,v,null)}else if(i.isDataTexture)if(b.length>0&&m){for(var w=0,S=b.length;w-1?r.compressedTexImage2D(t.TEXTURE_2D,w,g,y.width,y.height,0,y.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\"):r.texImage2D(t.TEXTURE_2D,w,g,y.width,y.height,0,g,v,y.data);else if(b.length>0&&m){for(var w=0,S=b.length;w=1,it=null,nt={},ot=new d,at=new d,st={};return st[t.TEXTURE_2D]=a(t.TEXTURE_2D,t.TEXTURE_2D,1),st[t.TEXTURE_CUBE_MAP]=a(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),{buffers:{color:R,depth:L,stencil:O},init:s,initAttributes:c,enableAttribute:u,enableAttributeAndDivisor:h,disableUnusedAttributes:l,enable:p,disable:f,getCompressedTextureFormats:m,setBlending:g,setMaterial:v,setFlipSided:y,setCullFace:b,setLineWidth:x,setPolygonOffset:_,getScissorTest:w,setScissorTest:S,activeTexture:A,bindTexture:M,compressedTexImage2D:E,texImage2D:T,scissor:P,viewport:C,reset:I}}function de(t,e,r){function i(){if(void 0!==o)return o;var r=e.get(\"EXT_texture_filter_anisotropic\");return o=null!==r?t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function n(e){if(\"highp\"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return\"highp\";e=\"mediump\"}return\"mediump\"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?\"mediump\":\"lowp\"}var o,a=void 0!==r.precision?r.precision:\"highp\",s=n(a);s!==a&&(console.warn(\"THREE.WebGLRenderer:\",a,\"not supported, using\",s,\"instead.\"),a=s);var c=!0===r.logarithmicDepthBuffer&&!!e.get(\"EXT_frag_depth\"),u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),d=t.getParameter(t.MAX_VERTEX_ATTRIBS),f=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),g=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=h>0,y=!!e.get(\"OES_texture_float\");return{getMaxAnisotropy:i,getMaxPrecision:n,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:p,maxAttributes:d,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y}}function fe(t){bt.call(this),this.cameras=t||[]}function me(t){function e(){if(i.isPresenting){var e=i.getEyeParameters(\"left\"),n=e.renderWidth,o=e.renderHeight;p=t.getPixelRatio(),l=t.getSize(),t.setDrawingBufferSize(2*n,o,1)}else r.enabled&&t.setDrawingBufferSize(l.width,l.height,p)}var r=this,i=null,n=null;\"VRFrameData\"in window&&(n=new window.VRFrameData);var o=new v,a=new v,s=new v,c=new bt;c.bounds=new d(0,0,.5,1),c.layers.enable(1);var u=new bt;u.bounds=new d(.5,0,.5,1),u.layers.enable(2);var h=new fe([c,u]);h.layers.enable(1),h.layers.enable(2);var l,p;window.addEventListener(\"vrdisplaypresentchange\",e,!1),this.enabled=!1,this.standing=!1,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===i)return t;i.depthNear=t.near,i.depthFar=t.far,i.getFrameData(n);var e=n.pose;null!==e.position?t.position.fromArray(e.position):t.position.set(0,0,0),null!==e.orientation&&t.quaternion.fromArray(e.orientation),t.updateMatrixWorld();var r=i.stageParameters;if(this.standing&&r&&(a.fromArray(r.sittingToStandingTransform),s.getInverse(a),t.matrixWorld.multiply(a),t.matrixWorldInverse.multiply(s)),!1===i.isPresenting)return t;h.matrixWorld.copy(t.matrixWorld),h.matrixWorldInverse.copy(t.matrixWorldInverse),c.matrixWorldInverse.fromArray(n.leftViewMatrix),u.matrixWorldInverse.fromArray(n.rightViewMatrix),this.standing&&r&&(c.matrixWorldInverse.multiply(s),u.matrixWorldInverse.multiply(s));var l=t.parent;null!==l&&(o.getInverse(l.matrixWorld),c.matrixWorldInverse.multiply(o),u.matrixWorldInverse.multiply(o)),c.matrixWorld.getInverse(c.matrixWorldInverse),u.matrixWorld.getInverse(u.matrixWorldInverse),c.projectionMatrix.fromArray(n.leftProjectionMatrix),u.projectionMatrix.fromArray(n.rightProjectionMatrix),h.projectionMatrix.copy(c.projectionMatrix);var p=i.getLayers();if(p.length){var d=p[0];null!==d.leftBounds&&4===d.leftBounds.length&&c.bounds.fromArray(d.leftBounds),null!==d.rightBounds&&4===d.rightBounds.length&&u.bounds.fromArray(d.rightBounds)}return h},this.getStandingMatrix=function(){return a},this.submitFrame=function(){i&&i.isPresenting&&i.submitFrame()}}function ge(t){var e={};return{get:function(r){if(void 0!==e[r])return e[r];var i;switch(r){case\"WEBGL_depth_texture\":i=t.getExtension(\"WEBGL_depth_texture\")||t.getExtension(\"MOZ_WEBGL_depth_texture\")||t.getExtension(\"WEBKIT_WEBGL_depth_texture\");break;case\"EXT_texture_filter_anisotropic\":i=t.getExtension(\"EXT_texture_filter_anisotropic\")||t.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||t.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\");break;case\"WEBGL_compressed_texture_s3tc\":i=t.getExtension(\"WEBGL_compressed_texture_s3tc\")||t.getExtension(\"MOZ_WEBGL_compressed_texture_s3tc\")||t.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\");break;case\"WEBGL_compressed_texture_pvrtc\":i=t.getExtension(\"WEBGL_compressed_texture_pvrtc\")||t.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\");break;case\"WEBGL_compressed_texture_etc1\":i=t.getExtension(\"WEBGL_compressed_texture_etc1\");break;default:i=t.getExtension(r)}return null===i&&console.warn(\"THREE.WebGLRenderer: \"+r+\" extension not supported.\"),e[r]=i,i}}}function ve(){function t(){u.value!==i&&(u.value=i,u.needsUpdate=n>0),r.numPlanes=n,r.numIntersection=0}function e(t,e,i,n){var o=null!==t?t.length:0,a=null;if(0!==o){if(a=u.value,!0!==n||null===a){var h=i+4*o,l=e.matrixWorldInverse;c.getNormalMatrix(l),(null===a||a.length=0){var u=n[s];if(void 0!==u){var h=u.normalized,l=u.itemSize,p=Bt.get(u),d=p.buffer,f=p.type,m=p.bytesPerElement;if(u.isInterleavedBufferAttribute){var g=u.data,v=g.stride,y=u.offset;g&&g.isInstancedInterleavedBuffer?(Nt.enableAttributeAndDivisor(c,g.meshPerAttribute),void 0===r.maxInstancedCount&&(r.maxInstancedCount=g.meshPerAttribute*g.count)):Nt.enableAttribute(c),Rt.bindBuffer(Rt.ARRAY_BUFFER,d),Rt.vertexAttribPointer(c,l,f,h,v*m,(i*v+y)*m)}else u.isInstancedBufferAttribute?(Nt.enableAttributeAndDivisor(c,u.meshPerAttribute),void 0===r.maxInstancedCount&&(r.maxInstancedCount=u.meshPerAttribute*u.count)):Nt.enableAttribute(c),Rt.bindBuffer(Rt.ARRAY_BUFFER,d),Rt.vertexAttribPointer(c,l,f,h,0,i*l*m)}else if(void 0!==a){var b=a[s];if(void 0!==b)switch(b.length){case 2:Rt.vertexAttrib2fv(c,b);break;case 3:Rt.vertexAttrib3fv(c,b);break;case 4:Rt.vertexAttrib4fv(c,b);break;default:Rt.vertexAttrib1fv(c,b)}}}}Nt.disableUnusedAttributes()}function l(t,e,r){if(t.visible){if(t.layers.test(e.layers))if(t.isLight)$.push(t);else if(t.isSprite)t.frustumCulled&&!bt.intersectsSprite(t)||X.push(t);else if(t.isLensFlare)q.push(t);else if(t.isImmediateRenderObject)r&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St),H.push(t,null,t.material,At.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||bt.intersectsObject(t))){r&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St);var i=jt.update(t),n=t.material;if(Array.isArray(n))for(var o=i.groups,a=0,s=o.length;a=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(var p=0;p=0&&t.numSupportedMorphNormals++}var d=i.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(i.numClippingPlanes=xt.numPlanes,i.numIntersection=xt.numIntersection,d.clippingPlanes=xt.uniform),i.fog=e,i.lightsHash=Tt.hash,t.lights&&(d.ambientLightColor.value=Tt.ambient,d.directionalLights.value=Tt.directional,d.spotLights.value=Tt.spot,d.rectAreaLights.value=Tt.rectArea,d.pointLights.value=Tt.point,d.hemisphereLights.value=Tt.hemi,d.directionalShadowMap.value=Tt.directionalShadowMap,d.directionalShadowMatrix.value=Tt.directionalShadowMatrix,d.spotShadowMap.value=Tt.spotShadowMap,d.spotShadowMatrix.value=Tt.spotShadowMatrix,d.pointShadowMap.value=Tt.pointShadowMap,d.pointShadowMatrix.value=Tt.pointShadowMatrix);var f=i.program.getUniforms(),m=J.seqWithValue(f.seq,d);i.uniformsList=m}function b(t,e,r,i){ut=0;var n=kt.get(r);if(_t&&(wt||t!==nt)){var o=t===nt&&r.id===tt;xt.setState(r.clippingPlanes,r.clipIntersection,r.clipShadows,t,n,o)}!1===r.needsUpdate&&(void 0===n.program?r.needsUpdate=!0:r.fog&&n.fog!==e?r.needsUpdate=!0:r.lights&&n.lightsHash!==Tt.hash?r.needsUpdate=!0:void 0===n.numClippingPlanes||n.numClippingPlanes===xt.numPlanes&&n.numIntersection===xt.numIntersection||(r.needsUpdate=!0)),r.needsUpdate&&(m(r,e,i),r.needsUpdate=!1);var a=!1,s=!1,c=!1,u=n.program,h=u.getUniforms(),l=n.shader.uniforms;if(u.id!==Z&&(Rt.useProgram(u.program),Z=u.id,a=!0,s=!0,c=!0),r.id!==tt&&(tt=r.id,s=!0),a||t!==nt){if(h.setValue(Rt,\"projectionMatrix\",t.projectionMatrix),Dt.logarithmicDepthBuffer&&h.setValue(Rt,\"logDepthBufFC\",2/(Math.log(t.far+1)/Math.LN2)),nt!==(ot||t)&&(nt=ot||t,s=!0,c=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshStandardMaterial||r.envMap){var p=h.map.cameraPosition;void 0!==p&&p.setValue(Rt,At.setFromMatrixPosition(t.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.skinning)&&h.setValue(Rt,\"viewMatrix\",t.matrixWorldInverse)}if(r.skinning){h.setOptional(Rt,i,\"bindMatrix\"),h.setOptional(Rt,i,\"bindMatrixInverse\");var d=i.skeleton;if(d){var f=d.bones;if(Dt.floatVertexTextures){if(void 0===d.boneTexture){var g=Math.sqrt(4*f.length);g=Ql.nextPowerOfTwo(Math.ceil(g)),g=Math.max(g,4);var v=new Float32Array(g*g*4);v.set(d.boneMatrices);var b=new y(v,g,g,Al,gl);d.boneMatrices=v,d.boneTexture=b,d.boneTextureSize=g}h.setValue(Rt,\"boneTexture\",d.boneTexture),h.setValue(Rt,\"boneTextureSize\",d.boneTextureSize)}else h.setOptional(Rt,d,\"boneMatrices\")}}return s&&(h.setValue(Rt,\"toneMappingExposure\",Y.toneMappingExposure),h.setValue(Rt,\"toneMappingWhitePoint\",Y.toneMappingWhitePoint),r.lights&&R(l,c),e&&r.fog&&A(l,e),(r.isMeshBasicMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial||r.isMeshStandardMaterial||r.isMeshNormalMaterial||r.isMeshDepthMaterial)&&x(l,r),r.isLineBasicMaterial?_(l,r):r.isLineDashedMaterial?(_(l,r),w(l,r)):r.isPointsMaterial?S(l,r):r.isMeshLambertMaterial?M(l,r):r.isMeshToonMaterial?T(l,r):r.isMeshPhongMaterial?E(l,r):r.isMeshPhysicalMaterial?C(l,r):r.isMeshStandardMaterial?P(l,r):r.isMeshDepthMaterial?r.displacementMap&&(l.displacementMap.value=r.displacementMap,l.displacementScale.value=r.displacementScale,l.displacementBias.value=r.displacementBias):r.isMeshNormalMaterial&&I(l,r),void 0!==l.ltcMat&&(l.ltcMat.value=cp.LTC_MAT_TEXTURE),void 0!==l.ltcMag&&(l.ltcMag.value=cp.LTC_MAG_TEXTURE),J.upload(Rt,n.uniformsList,l,Y)),h.setValue(Rt,\"modelViewMatrix\",i.modelViewMatrix),h.setValue(Rt,\"normalMatrix\",i.normalMatrix),h.setValue(Rt,\"modelMatrix\",i.matrixWorld),u}function x(t,e){t.opacity.value=e.opacity,t.diffuse.value=e.color,e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),t.map.value=e.map,t.specularMap.value=e.specularMap,t.alphaMap.value=e.alphaMap,e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var r;if(e.map?r=e.map:e.specularMap?r=e.specularMap:e.displacementMap?r=e.displacementMap:e.normalMap?r=e.normalMap:e.bumpMap?r=e.bumpMap:e.roughnessMap?r=e.roughnessMap:e.metalnessMap?r=e.metalnessMap:e.alphaMap?r=e.alphaMap:e.emissiveMap&&(r=e.emissiveMap),void 0!==r){r.isWebGLRenderTarget&&(r=r.texture);var i=r.offset,n=r.repeat;t.offsetRepeat.value.set(i.x,i.y,n.x,n.y)}t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio}function _(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function w(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function S(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*mt,t.scale.value=.5*ft,t.map.value=e.map,null!==e.map){var r=e.map.offset,i=e.map.repeat;t.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}}function A(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}function M(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function E(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function T(t,e){E(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}function P(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function C(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,P(t,e)}function I(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function R(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function L(t){for(var e=0,r=0,i=t.length;r=Dt.maxTextures&&console.warn(\"THREE.WebGLRenderer: Trying to use \"+t+\" texture units while this GPU supports only \"+Dt.maxTextures),ut+=1,t}function N(t){var e;if(t===el)return Rt.REPEAT;if(t===rl)return Rt.CLAMP_TO_EDGE;if(t===il)return Rt.MIRRORED_REPEAT;if(t===nl)return Rt.NEAREST;if(t===ol)return Rt.NEAREST_MIPMAP_NEAREST;if(t===al)return Rt.NEAREST_MIPMAP_LINEAR;if(t===sl)return Rt.LINEAR;if(t===cl)return Rt.LINEAR_MIPMAP_NEAREST;if(t===ul)return Rt.LINEAR_MIPMAP_LINEAR;if(t===hl)return Rt.UNSIGNED_BYTE;if(t===yl)return Rt.UNSIGNED_SHORT_4_4_4_4;if(t===bl)return Rt.UNSIGNED_SHORT_5_5_5_1;if(t===xl)return Rt.UNSIGNED_SHORT_5_6_5;if(t===ll)return Rt.BYTE;if(t===pl)return Rt.SHORT;if(t===dl)return Rt.UNSIGNED_SHORT;if(t===fl)return Rt.INT;if(t===ml)return Rt.UNSIGNED_INT;if(t===gl)return Rt.FLOAT;if(t===vl&&null!==(e=Ot.get(\"OES_texture_half_float\")))return e.HALF_FLOAT_OES;if(t===wl)return Rt.ALPHA;if(t===Sl)return Rt.RGB;if(t===Al)return Rt.RGBA;if(t===Ml)return Rt.LUMINANCE;if(t===El)return Rt.LUMINANCE_ALPHA;if(t===Tl)return Rt.DEPTH_COMPONENT;if(t===Pl)return Rt.DEPTH_STENCIL;if(t===gh)return Rt.FUNC_ADD;if(t===vh)return Rt.FUNC_SUBTRACT;if(t===yh)return Rt.FUNC_REVERSE_SUBTRACT;if(t===_h)return Rt.ZERO;if(t===wh)return Rt.ONE;if(t===Sh)return Rt.SRC_COLOR;if(t===Ah)return Rt.ONE_MINUS_SRC_COLOR;if(t===Mh)return Rt.SRC_ALPHA;if(t===Eh)return Rt.ONE_MINUS_SRC_ALPHA;if(t===Th)return Rt.DST_ALPHA;if(t===Ph)return Rt.ONE_MINUS_DST_ALPHA;if(t===Ch)return Rt.DST_COLOR;if(t===Ih)return Rt.ONE_MINUS_DST_COLOR;if(t===Rh)return Rt.SRC_ALPHA_SATURATE;if((t===Cl||t===Il||t===Rl||t===Ll)&&null!==(e=Ot.get(\"WEBGL_compressed_texture_s3tc\"))){if(t===Cl)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===Il)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===Rl)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===Ll)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((t===Ol||t===Dl||t===Nl||t===kl)&&null!==(e=Ot.get(\"WEBGL_compressed_texture_pvrtc\"))){if(t===Ol)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===Dl)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===Nl)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===kl)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t===Fl&&null!==(e=Ot.get(\"WEBGL_compressed_texture_etc1\")))return e.COMPRESSED_RGB_ETC1_WEBGL;if((t===bh||t===xh)&&null!==(e=Ot.get(\"EXT_blend_minmax\"))){if(t===bh)return e.MIN_EXT;if(t===xh)return e.MAX_EXT}return t===_l&&null!==(e=Ot.get(\"WEBGL_depth_texture\"))?e.UNSIGNED_INT_24_8_WEBGL:0}console.log(\"THREE.WebGLRenderer\",Yu);var k=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\"),F=void 0!==t.context?t.context:null,B=void 0!==t.alpha&&t.alpha,z=void 0===t.depth||t.depth,U=void 0===t.stencil||t.stencil,j=void 0!==t.antialias&&t.antialias,G=void 0===t.premultipliedAlpha||t.premultipliedAlpha,V=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,$=[],H=null,W=new Float32Array(8),X=[],q=[];this.domElement=k,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=$h,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var Y=this,Z=null,K=null,Q=null,tt=-1,et=\"\",nt=null,ot=null,at=new d,st=null,ct=new d,ut=0,ht=k.width,ft=k.height,mt=1,gt=new d(0,0,ht,ft),vt=!1,yt=new d(0,0,ht,ft),bt=new lt,xt=new ve,_t=!1,wt=!1,St=new v,At=new g,Mt=new v,Et=new v,Tt={hash:\"\",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},Pt={geometries:0,textures:0},It={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:It,memory:Pt,programs:null};var Rt;try{var Lt={alpha:B,depth:z,stencil:U,antialias:j,premultipliedAlpha:G,preserveDrawingBuffer:V};if(null===(Rt=F||k.getContext(\"webgl\",Lt)||k.getContext(\"experimental-webgl\",Lt)))throw null!==k.getContext(\"webgl\")?\"Error creating WebGL context with your selected attributes.\":\"Error creating WebGL context.\";void 0===Rt.getShaderPrecisionFormat&&(Rt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),k.addEventListener(\"webglcontextlost\",n,!1)}catch(t){console.error(\"THREE.WebGLRenderer: \"+t)}var Ot=new ge(Rt);Ot.get(\"WEBGL_depth_texture\"),Ot.get(\"OES_texture_float\"),Ot.get(\"OES_texture_float_linear\"),Ot.get(\"OES_texture_half_float\"),Ot.get(\"OES_texture_half_float_linear\"),Ot.get(\"OES_standard_derivatives\"),Ot.get(\"ANGLE_instanced_arrays\"),Ot.get(\"OES_element_index_uint\")&&(Ct.MaxIndex=4294967296);var Dt=new de(Rt,Ot,t),Nt=new pe(Rt,Ot,N),kt=new le,Ft=new he(Rt,Ot,Nt,kt,Dt,N,Pt),Bt=new dt(Rt),Ut=new Wt(Rt,Bt,Pt),jt=new qt(Rt,Ut,It),Gt=new ue(this,Dt),Yt=new Xt,Zt=new Vt,Kt=new zt(this,Nt,jt,G),Qt=new me(this);this.info.programs=Gt.programs;var Jt=new Ht(Rt,Ot,It),te=new $t(Rt,Ot,It);r(),this.context=Rt,this.capabilities=Dt,this.extensions=Ot,this.properties=kt,this.renderLists=Zt,this.state=Nt,this.vr=Qt;var ee=new pt(this,Tt,jt,Dt);this.shadowMap=ee;var re=new it(this,X),ie=new rt(this,q);this.getContext=function(){return Rt},this.getContextAttributes=function(){return Rt.getContextAttributes()},this.forceContextLoss=function(){var t=Ot.get(\"WEBGL_lose_context\");t&&t.loseContext()},this.getMaxAnisotropy=function(){return Dt.getMaxAnisotropy()},this.getPrecision=function(){return Dt.precision},this.getPixelRatio=function(){return mt},this.setPixelRatio=function(t){void 0!==t&&(mt=t,this.setSize(ht,ft,!1))},this.getSize=function(){return{width:ht,height:ft}},this.setSize=function(t,e,r){var i=Qt.getDevice();if(i&&i.isPresenting)return void console.warn(\"THREE.WebGLRenderer: Can't change size while VR device is presenting.\");ht=t,ft=e,k.width=t*mt,k.height=e*mt,!1!==r&&(k.style.width=t+\"px\",k.style.height=e+\"px\"),this.setViewport(0,0,t,e)},this.getDrawingBufferSize=function(){return{width:ht*mt,height:ft*mt}},this.setDrawingBufferSize=function(t,e,r){ht=t,ft=e,mt=r,k.width=t*r,k.height=e*r,this.setViewport(0,0,t,e)},this.setViewport=function(t,e,r,i){yt.set(t,ft-e-i,r,i),Nt.viewport(ct.copy(yt).multiplyScalar(mt))},this.setScissor=function(t,e,r,i){gt.set(t,ft-e-i,r,i),Nt.scissor(at.copy(gt).multiplyScalar(mt))},this.setScissorTest=function(t){Nt.setScissorTest(vt=t)},this.getClearColor=Kt.getClearColor,this.setClearColor=Kt.setClearColor,this.getClearAlpha=Kt.getClearAlpha,this.setClearAlpha=Kt.setClearAlpha,this.clear=function(t,e,r){var i=0;(void 0===t||t)&&(i|=Rt.COLOR_BUFFER_BIT),(void 0===e||e)&&(i|=Rt.DEPTH_BUFFER_BIT),(void 0===r||r)&&(i|=Rt.STENCIL_BUFFER_BIT),Rt.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,r,i){this.setRenderTarget(t),this.clear(e,r,i)},this.resetGLState=i,this.dispose=function(){k.removeEventListener(\"webglcontextlost\",n,!1),Zt.dispose()},this.renderBufferImmediate=function(t,e,r){Nt.initAttributes();var i=kt.get(t);t.hasPositions&&!i.position&&(i.position=Rt.createBuffer()),t.hasNormals&&!i.normal&&(i.normal=Rt.createBuffer()),t.hasUvs&&!i.uv&&(i.uv=Rt.createBuffer()),t.hasColors&&!i.color&&(i.color=Rt.createBuffer());var n=e.getAttributes();if(t.hasPositions&&(Rt.bindBuffer(Rt.ARRAY_BUFFER,i.position),Rt.bufferData(Rt.ARRAY_BUFFER,t.positionArray,Rt.DYNAMIC_DRAW),Nt.enableAttribute(n.position),Rt.vertexAttribPointer(n.position,3,Rt.FLOAT,!1,0,0)),t.hasNormals){if(Rt.bindBuffer(Rt.ARRAY_BUFFER,i.normal),!r.isMeshPhongMaterial&&!r.isMeshStandardMaterial&&!r.isMeshNormalMaterial&&r.shading===oh)for(var o=0,a=3*t.count;o8&&(d.length=8);for(var g=i.morphAttributes,f=0,m=d.length;f0&&A.renderInstances(i,I,L):A.render(I,L)}},this.compile=function(t,e){$=[],t.traverse(function(t){t.isLight&&$.push(t)}),O($,e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var r=0;r=0&&e<=t.width-i&&r>=0&&r<=t.height-n&&Rt.readPixels(e,r,i,n,N(u),N(h),o):console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.\")}finally{s&&Rt.bindFramebuffer(Rt.FRAMEBUFFER,Q)}}}}function be(t,e){this.name=\"\",this.color=new tt(t),this.density=void 0!==e?e:25e-5}function xe(t,e,r){this.name=\"\",this.color=new tt(t),this.near=void 0!==e?e:1,this.far=void 0!==r?r:1e3}function _e(){gt.call(this),this.type=\"Scene\",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function we(t,e,r,i,n){gt.call(this),this.lensFlares=[],this.positionScreen=new g,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,r,i,n)}function Se(t){nt.call(this),this.type=\"SpriteMaterial\",this.color=new tt(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Ae(t){gt.call(this),this.type=\"Sprite\",this.material=void 0!==t?t:new Se}function Me(){gt.call(this),this.type=\"LOD\",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Ee(t,e){var r=this;if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn(\"THREE.Skeleton boneInverses is the wrong length.\"),this.boneInverses=[];for(var i=0,n=this.bones.length;i=0?(l=t(v-1e-5,m,l),p.subVectors(h,l)):(l=t(v+1e-5,m,l),p.subVectors(l,h)),m-1e-5>=0?(l=t(v,m-1e-5,l),d.subVectors(h,l)):(l=t(v,m+1e-5,l),d.subVectors(l,h)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(i=0;i.9&&o<.1&&(e<.2&&(f[t+0]+=1),r<.2&&(f[t+2]+=1),i<.2&&(f[t+4]+=1))}}function a(t){d.push(t.x,t.y,t.z)}function s(e,r){var i=3*e;r.x=t[i+0],r.y=t[i+1],r.z=t[i+2]}function c(){for(var t=new g,e=new g,r=new g,i=new g,n=new l,o=new l,a=new l,s=0,c=0;s0)&&f.push(w,S,M),(c!==r-1||u0&&c(!0),e>0&&c(!1)),this.setIndex(h),this.addAttribute(\"position\",new Et(p,3)),this.addAttribute(\"normal\",new Et(d,3)),this.addAttribute(\"uv\",new Et(f,2))}function yr(t,e,r,i,n,o,a){gr.call(this,0,t,e,r,i,n,o,a),this.type=\"ConeGeometry\",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:i,openEnded:n,thetaStart:o,thetaLength:a}}function br(t,e,r,i,n,o,a){vr.call(this,0,t,e,r,i,n,o,a),this.type=\"ConeBufferGeometry\",this.parameters={radius:t,height:e,radialSegments:r,heightSegments:i,openEnded:n,thetaStart:o,thetaLength:a}}function xr(t,e,r,i){wt.call(this),this.type=\"CircleGeometry\",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},this.fromBufferGeometry(new _r(t,e,r,i)),this.mergeVertices()}function _r(t,e,r,i){Ct.call(this),this.type=\"CircleBufferGeometry\",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},t=t||50,e=void 0!==e?Math.max(3,e):8,r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var n,o,a=[],s=[],c=[],u=[],h=new g,p=new l;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,n=3;o<=e;o++,n+=3){var d=r+o/e*i;h.x=t*Math.cos(d),h.y=t*Math.sin(d),s.push(h.x,h.y,h.z),c.push(0,0,1),p.x=(s[n]/t+1)/2,p.y=(s[n+1]/t+1)/2,u.push(p.x,p.y)}for(n=1;n<=e;n++)a.push(n,n+1,0);this.setIndex(a),this.addAttribute(\"position\",new Et(s,3)),this.addAttribute(\"normal\",new Et(c,3)),this.addAttribute(\"uv\",new Et(u,2))}function wr(t){ot.call(this,{uniforms:up.merge([cp.lights,{opacity:{value:1}}]),vertexShader:hp.shadow_vert,fragmentShader:hp.shadow_frag}),this.lights=!0,this.transparent=!0,Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}}}),this.setValues(t)}function Sr(t){ot.call(this,t),this.type=\"RawShaderMaterial\"}function Ar(t){nt.call(this),this.defines={STANDARD:\"\"},this.type=\"MeshStandardMaterial\",this.color=new tt(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Mr(t){Ar.call(this),this.defines={PHYSICAL:\"\"},this.type=\"MeshPhysicalMaterial\",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function Er(t){nt.call(this),this.type=\"MeshPhongMaterial\",this.color=new tt(16777215),this.specular=new tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Uh,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(t)}function Tr(t){Er.call(this),this.defines={TOON:\"\"},this.type=\"MeshToonMaterial\",this.gradientMap=null,this.setValues(t)}function Pr(t){nt.call(this),this.type=\"MeshNormalMaterial\",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Cr(t){nt.call(this),this.type=\"MeshLambertMaterial\",this.color=new tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Uh,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(t)}function Ir(t){nt.call(this),this.type=\"LineDashedMaterial\",this.color=new tt(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.lights=!1,this.setValues(t)}function Rr(t,e,r){var i=this,n=!1,o=0,a=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=r,this.itemStart=function(t){a++,!1===n&&void 0!==i.onStart&&i.onStart(t,o,a),n=!0},this.itemEnd=function(t){o++,void 0!==i.onProgress&&i.onProgress(t,o,a),o===a&&(n=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)}}function Lr(t){this.manager=void 0!==t?t:xp}function Or(t){this.manager=void 0!==t?t:xp,this._parser=null}function Dr(t){this.manager=void 0!==t?t:xp,this._parser=null}function Nr(t){this.manager=void 0!==t?t:xp}function kr(t){this.manager=void 0!==t?t:xp}function Fr(t){this.manager=void 0!==t?t:xp}function Br(t,e){gt.call(this),this.type=\"Light\",this.color=new tt(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function zr(t,e,r){Br.call(this,t,r),this.type=\"HemisphereLight\",this.castShadow=void 0,this.position.copy(gt.DefaultUp),this.updateMatrix(),this.groundColor=new tt(e)}function Ur(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new l(512,512),this.map=null,this.matrix=new v}function jr(){Ur.call(this,new bt(50,1,.5,500))}function Gr(t,e,r,i,n,o){Br.call(this,t,e),this.type=\"SpotLight\",this.position.copy(gt.DefaultUp),this.updateMatrix(),this.target=new gt,Object.defineProperty(this,\"power\",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==r?r:0,this.angle=void 0!==i?i:Math.PI/3,this.penumbra=void 0!==n?n:0,this.decay=void 0!==o?o:1,this.shadow=new jr}function Vr(t,e,r,i){Br.call(this,t,e),this.type=\"PointLight\",Object.defineProperty(this,\"power\",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==r?r:0,this.decay=void 0!==i?i:1,this.shadow=new Ur(new bt(90,1,.5,500))}function $r(){Ur.call(this,new yt(-5,5,5,-5,.5,500))}function Hr(t,e){Br.call(this,t,e),this.type=\"DirectionalLight\",this.position.copy(gt.DefaultUp),this.updateMatrix(),this.target=new gt,this.shadow=new $r}function Wr(t,e){Br.call(this,t,e),this.type=\"AmbientLight\",this.castShadow=void 0}function Xr(t,e,r,i){Br.call(this,t,e),this.type=\"RectAreaLight\",this.position.set(0,1,0),this.updateMatrix(),this.width=void 0!==r?r:10,this.height=void 0!==i?i:10}function qr(t,e,r,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new e.constructor(r),this.sampleValues=e,this.valueSize=r}function Yr(t,e,r,i){qr.call(this,t,e,r,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Zr(t,e,r,i){qr.call(this,t,e,r,i)}function Kr(t,e,r,i){qr.call(this,t,e,r,i)}function Qr(t,e,r,i){if(void 0===t)throw new Error(\"track name is undefined\");if(void 0===e||0===e.length)throw new Error(\"no keyframes in track named \"+t);this.name=t,this.times=_p.convertArray(e,this.TimeBufferType),this.values=_p.convertArray(r,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation),this.validate(),this.optimize()}function Jr(t,e,r,i){Qr.call(this,t,e,r,i)}function ti(t,e,r,i){qr.call(this,t,e,r,i)}function ei(t,e,r,i){Qr.call(this,t,e,r,i)}function ri(t,e,r,i){Qr.call(this,t,e,r,i)}function ii(t,e,r,i){Qr.call(this,t,e,r,i)}function ni(t,e,r){Qr.call(this,t,e,r)}function oi(t,e,r,i){Qr.call(this,t,e,r,i)}function ai(t,e,r,i){Qr.apply(this,arguments)}function si(t,e,r){this.name=t,this.tracks=r,this.duration=void 0!==e?e:-1,this.uuid=Ql.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function ci(t){this.manager=void 0!==t?t:xp,this.textures={}}function ui(t){this.manager=void 0!==t?t:xp}function hi(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function li(t){\"boolean\"==typeof t&&(console.warn(\"THREE.JSONLoader: showStatus parameter has been removed from constructor.\"),t=void 0),this.manager=void 0!==t?t:xp,this.withCredentials=!1}function pi(t){this.manager=void 0!==t?t:xp,this.texturePath=\"\"}function di(t,e,r,i,n){var o=.5*(i-e),a=.5*(n-r),s=t*t;return(2*r-2*i+o+a)*(t*s)+(-3*r+3*i-2*o-a)*s+o*t+r}function fi(t,e){var r=1-t;return r*r*e}function mi(t,e){return 2*(1-t)*t*e}function gi(t,e){return t*t*e}function vi(t,e,r,i){return fi(t,e)+mi(t,r)+gi(t,i)}function yi(t,e){var r=1-t;return r*r*r*e}function bi(t,e){var r=1-t;return 3*r*r*t*e}function xi(t,e){return 3*(1-t)*t*t*e}function _i(t,e){return t*t*t*e}function wi(t,e,r,i,n){return yi(t,e)+bi(t,r)+xi(t,i)+_i(t,n)}function Si(){this.arcLengthDivisions=200}function Ai(t,e){Si.call(this),this.v1=t,this.v2=e}function Mi(){Si.call(this),this.curves=[],this.autoClose=!1}function Ei(t,e,r,i,n,o,a,s){Si.call(this),this.aX=t,this.aY=e,this.xRadius=r,this.yRadius=i,this.aStartAngle=n,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0}function Ti(t){Si.call(this),this.points=void 0===t?[]:t}function Pi(t,e,r,i){Si.call(this),this.v0=t,this.v1=e,this.v2=r,this.v3=i}function Ci(t,e,r){Si.call(this),this.v0=t,this.v1=e,this.v2=r}function Ii(t){Mi.call(this),this.currentPoint=new l,t&&this.fromPoints(t)}function Ri(){Ii.apply(this,arguments),this.holes=[]}function Li(){this.subPaths=[],this.currentPath=null}function Oi(t){this.data=t}function Di(t){this.manager=void 0!==t?t:xp}function Ni(t){this.manager=void 0!==t?t:xp}function ki(){this.type=\"StereoCamera\",this.aspect=1,this.eyeSep=.064,this.cameraL=new bt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new bt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Fi(){gt.call(this),this.type=\"AudioListener\",this.context=Cp.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Bi(t){gt.call(this),this.type=\"Audio\",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType=\"empty\",this.filters=[]}function zi(t){Bi.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Ui(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function ji(t,e,r){this.binding=t,this.valueSize=r;var i,n=Float64Array;switch(e){case\"quaternion\":i=this._slerp;break;case\"string\":case\"bool\":n=Array,i=this._select;break;default:i=this._lerp}this.buffer=new n(4*r),this._mixBufferRegion=i,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function Gi(t,e,r){var i=r||Vi.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Vi(t,e,r){this.path=e,this.parsedPath=r||Vi.parseTrackName(e),this.node=Vi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function $i(t){var e=arguments;this.uuid=Ql.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var r={};this._indicesByUUID=r;for(var i=0,n=arguments.length;i!==n;++i)r[e[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var o=this;this.stats={objects:{get total(){return o._objects.length},get inUse(){return this.total-o.nCachedObjects_}},get bindingsPerObject(){return o._bindings.length}}}function Hi(t,e,r){this._mixer=t,this._clip=e,this._localRoot=r||null;for(var i=e.tracks,n=i.length,o=new Array(n),a={endingStart:zl,endingEnd:zl},s=0;s!==n;++s){var c=i[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(n),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Bl,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 Wi(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Xi(t){\"string\"==typeof t&&(console.warn(\"THREE.Uniform: Type parameter is no longer needed.\"),t=arguments[1]),this.value=t}function qi(){Ct.call(this),this.type=\"InstancedBufferGeometry\",this.maxInstancedCount=void 0}function Yi(t,e,r,i){this.uuid=Ql.generateUUID(),this.data=t,this.itemSize=e,this.offset=r,this.normalized=!0===i}function Zi(t,e){this.uuid=Ql.generateUUID(),this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function Ki(t,e,r){Zi.call(this,t,e),this.meshPerAttribute=r||1}function Qi(t,e,r){St.call(this,t,e),this.meshPerAttribute=r||1}function Ji(t,e,r,i){this.ray=new Nt(t,e),this.near=r||0,this.far=i||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn(\"THREE.Raycaster: params.PointCloud has been renamed to params.Points.\"),this.Points}}})}function tn(t,e){return t.distance-e.distance}function en(t,e,r,i){if(!1!==t.visible&&(t.raycast(e,r),!0===i))for(var n=t.children,o=0,a=n.length;o1?c.pop().toLowerCase():\"\",h=e.match(/^(.+):\\/\\/(.+)$/);h&&(i=h[1].toLowerCase(),e=h[2]);var l=e.substring(0,e.lastIndexOf(\"/\")+1);if(n.includes(u)){r=u;var p=e.length-u.length-1;u=e.substr(0,p).split(\".\").pop().toLowerCase();var d=s.length-u.length-1;s=s.substr(0,d)}else r=!1;return{path:e,name:a,ext:u,base:s,dir:l,compressed:r,protocol:i,src:t}}function Sn(t,e,r){var i,n,o,a=null,s=0;r||(r={});var c=function(){s=!1===r.leading?0:Date.now(),a=null,o=t.apply(i,n),a||(i=n=null)};return function(){var u=Date.now();s||!1!==r.leading||(s=u);var h=e-(u-s);return i=this,n=arguments,h<=0||h>e?(a&&(clearTimeout(a),a=null),s=u,o=t.apply(i,n),a||(i=n=null)):a||!1===r.trailing||(a=setTimeout(c,h)),o}}function An(t,e){return te?1:0}function Mn(t,e,r){void 0===r&&(r=An);for(var i=0,n=t.length-1;i<=n;){var o=i+n>>1,a=r(e,t[o]);if(a>0)i=o+1;else{if(!(a<0))return o;n=o-1}}return-i-1}function En(t,e){var r=t.length-1;if(t[r]>1;t[n]>=e?r=n-1:i=n+1}return r+1}function Tn(t,e){if(t[0]>e)return-1;for(var r=0,i=t.length-1;r<=i;){var n=r+i>>1;t[n]>e?i=n-1:r=n+1}return r-1}function Pn(t,e,r){var i=En(t,e),n=Tn(t,r);return-1===i||-1===n||i>n?0:n-i+1}function Cn(t){return t.sort().filter(function(t,e,r){return 0===e||t!==r[e-1]})}function In(t){if(t.length>28672){for(var e=[],r=0;r65535?Uint32Array:Uint16Array)(t)}function Dn(t){return Array.isArray(t)?t:[t]}function Nn(t){return t.buffer&&t.buffer instanceof ArrayBuffer?t.buffer:t}function kn(t,e){return t instanceof e?t:new e(t)}function Fn(t,e){return void 0===t?t=new e:Array.isArray(t)&&(t=(new e).fromArray(t)),t}function Bn(t){return Fn(t,l)}function zn(t){return Fn(t,g)}function Un(t){return Fn(t,v)}function jn(t){return Fn(t,m)}function Gn(t){return kn(t,Float32Array)}function Vn(t){return gn(t,\"\").toString().toLowerCase()}function $n(t){return.01745*t}function Hn(t){return 57.29578*t}function Wn(){for(var t,e=0,r=0;r<36;r++)8===r||13===r||18===r||23===r?uf[r]=\"-\":14===r?uf[r]=\"4\":(e<=2&&(e=33554432+16777216*Math.random()|0),t=15&e,e>>=4,uf[r]=cf[19===r?3&t|8:t]);return uf.join(\"\")}function Xn(t){return t-=t>>1&1431655765,16843009*((t=(858993459&t)+(t>>2&858993459))+(t>>4)&252645135)>>24}function qn(t,e,r){return(t-e)/(r-e)}function Yn(t,e,r){return Math.max(e,Math.min(r,t))}function Zn(t){return Yn(t,0,100)}function Kn(t){return Yn(t,0,1)}function Qn(t,e,r){return t+(e-t)*r}function Jn(t,e,r,i,n,o){var a=(r-t)*o,s=(i-e)*o,c=n*n;return(2*e-2*r+a+s)*(n*c)+(-3*e+3*r-2*a-s)*c+a*n+e}function to(t,e,r){return(r=Kn(qn(r,t,e)))*r*(3-2*r)}function eo(t,e,r){if(t>e)return t;var i=t/e;return((2*r-e)*i+(2*e-3*r))*i*i+r}function ro(t,e,r,i,n){this._listener=e,this._isOnce=r,this.context=i,this._signal=t,this._priority=n||0}function io(t,e){if(\"function\"!=typeof t)throw new Error(\"listener is a required param of {fn}() and should be a Function.\".replace(\"{fn}\",e))}function no(){this._bindings=[],this._prevParams=null;var t=this;this.dispatch=function(){no.prototype.dispatch.apply(t,arguments)}}function oo(t){var e={operator:void 0,rules:[]};if(!t)return e;var r,i,n=e,o=[];\"(\"===(t=t.replace(/\\(/g,\" ( \").replace(/\\)/g,\" ) \").trim()).charAt(0)&&\")\"===t.substr(-1)&&(t=t.slice(1,-1).trim());for(var a,s=t.split(/\\s+/),c=function(t){r={operator:t,rules:[]},void 0===n?(n=r,e=r):(n.rules.push(r),o.push(n),n=r)},u=function(t){i=n,void 0===(n=o.pop())&&(c(t),h(i))},h=function(t){n.rules.push(t)},l=0;l0)if(\"NOT\"===d)a=1;else if(1===a)a=2;else{if(2!==a)throw new Error(\"something went wrong with 'not'\");a=!1,u()}if(\"AND\"!==d)if(\"OR\"!==d)if(\"NOT\"!==p.toUpperCase()){var f=df[d];if(void 0===f)if(\"HYDROGEN\"!==d)if(\"SMALL\"!==d)if(\"NUCLEOPHILIC\"!==d)if(\"HYDROPHOBIC\"!==d)if(\"AROMATIC\"!==d)if(\"AMIDE\"!==d)if(\"ACIDIC\"!==d)if(\"BASIC\"!==d)if(\"CHARGED\"!==d)if(\"POLAR\"!==d)if(\"NONPOLAR\"!==d)if(\"CYCLIC\"!==d)if(\"ALIPHATIC\"!==d)if(\"SIDECHAINATTACHED\"!==d)if(\"LIGAND\"!==d)if(-1===ff.indexOf(d))if(\"@\"!==p.charAt(0))if(\"#\"!==p.charAt(0))if(\"_\"!==p.charAt(0))if(\"[\"!==p[0]||\"]\"!==p[p.length-1])if(p.length>=1&&p.length<=4&&\"^\"!==p[0]&&\":\"!==p[0]&&\".\"!==p[0]&&\"%\"!==p[0]&&\"/\"!==p[0]&&isNaN(parseInt(p)))h({resname:d});else{var m={operator:\"AND\",rules:[]},g=p.split(\"/\");if(g.length>1&&g[1]){if(isNaN(parseInt(g[1])))throw new Error(\"model must be an integer\");m.rules.push({model:parseInt(g[1])})}var v=g[0].split(\"%\");v.length>1&&m.rules.push({altloc:v[1]});var y=v[0].split(\".\");if(y.length>1&&y[1]){if(y[1].length>4)throw new Error(\"atomname must be one to four characters\");m.rules.push({atomname:y[1].substring(0,4).toUpperCase()})}var b=y[0].split(\":\");b.length>1&&b[1]&&m.rules.push({chainname:b[1]});var x=b[0].split(\"^\");if(x.length>1&&m.rules.push({inscode:x[1]}),x[0]){var _=void 0,w=void 0;\"-\"===x[0][0]&&(x[0]=x[0].substr(1),_=!0),x[0].includes(\"--\")&&(x[0]=x[0].replace(\"--\",\"-\"),w=!0);var S=x[0].split(\"-\");if(1===S.length){if(S=parseInt(S[0]),isNaN(S))throw new Error(\"resi must be an integer\");_&&(S*=-1),m.rules.push({resno:S})}else{if(2!==S.length)throw new Error(\"resi range must contain one '-'\");_&&(S[0]*=-1),w&&(S[1]*=-1),m.rules.push({resno:[parseInt(S[0]),parseInt(S[1])]})}}if(1===m.rules.length)h(m.rules[0]);else{if(!(m.rules.length>1))throw new Error(\"empty selection chunk\");h(m)}}else{var A=d.substr(1,p.length-2).split(\",\"),M=A.length>1?A:A[0];h({resname:M})}else h({element:d.substr(1)});else console.error(\"# for element selection deprecated, use _\"),h({element:d.substr(1)});else{for(var E=p.substr(1).split(\",\"),T=0,P=E.length;Tt.resno||e.resno[1]t.resno||e.resno[1]0?t:null}function po(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword&&!mf.includes(t.keyword)||(void 0!==t.model||(void 0!==t.chainname||(void 0!==t.resname||(void 0!==t.resno||void 0!==t.sstruc))))})),ho(t,ao)}function fo(t,e){return e&&(t=lo(t,function(t){return!(void 0===t.keyword||!mf.includes(t.keyword))||(void 0!==t.model||(void 0!==t.chainname||(void 0!==t.atomname||(void 0!==t.element||void 0!==t.altloc))))})),ho(t,so)}function mo(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword&&!gf.includes(t.keyword)||(void 0!==t.resname||(void 0!==t.resno||(void 0!==t.atomname||(void 0!==t.element||(void 0!==t.altloc||(void 0!==t.sstruc||void 0!==t.inscode))))))})),ho(t,co)}function go(t,e){return e&&(t=lo(t,function(t){return void 0!==t.keyword||(void 0!==t.chainname||(void 0!==t.resname||(void 0!==t.resno||(void 0!==t.atomname||(void 0!==t.element||(void 0!==t.altloc||(void 0!==t.sstruc||void 0!==t.inscode)))))))})),ho(t,uo)}function vo(t){var e=t;return t.forEach(function(t){t.__deps&&Array.prototype.push.apply(e,vo(t.__deps))}),e}function yo(t){return Cn(vo(t)).map(function(t){return t.toString()}).join(\"\\n\\n\\n\")}function bo(t){var e=t.data.__name,r=t.data.__postId;if(void 0===e)console.error(\"message __name undefined\");else if(void 0===self.func)console.error(\"worker func undefined\",e);else{var i=function(t,e){t=t||{},void 0!==r&&(t.__postId=r);try{self.postMessage(t,e)}catch(e){console.error(\"self.postMessage:\",e),self.postMessage(t)}};self.func(t,i)}}function xo(t,e){var r=\"'use strict';\\n\\n\"+yo(e);return r+=\"\\n\\n\\nself.func = \"+t.toString()+\";\",r+=\"\\n\\n\\nself.onmessage = \"+bo.toString()+\";\",new window.Blob([r],{type:\"application/javascript\"})}function _o(t){zf=t}function wo(t){Uf=t}function So(e){t.Debug=e}function Ao(t){var e=wn(t),r=Wf.get(e.protocol);return r&&!(e=wn(r.getUrl(e.src))).ext&&r.getExt&&(e.ext=r.getExt(t)),e}function Mo(t,e){var r,i=Object.assign(Ao(t),e);return qf.names.includes(i.ext)?r=om:Vf.includes(i.ext)?r=cm:\"plugin\"===i.ext&&(r=um),r?new r(i.src,i).load():Promise.reject(new Error(\"autoLoad: ext '\"+i.ext+\"' unknown\"))}function Eo(t){return To(Po(t),arguments)}function To(t,e){var r,i,n,o,a,s,c,u,h,l=1,p=t.length,d=\"\";for(i=0;i=0),o.type){case\"b\":r=parseInt(r,10).toString(2);break;case\"c\":r=String.fromCharCode(parseInt(r,10));break;case\"d\":case\"i\":r=parseInt(r,10);break;case\"j\":r=JSON.stringify(r,null,o.width?parseInt(o.width):0);break;case\"e\":r=o.precision?parseFloat(r).toExponential(o.precision):parseFloat(r).toExponential();break;case\"f\":r=o.precision?parseFloat(r).toFixed(o.precision):parseFloat(r);break;case\"g\":r=o.precision?String(Number(r.toPrecision(o.precision))):parseFloat(r);break;case\"o\":r=(parseInt(r,10)>>>0).toString(8);break;case\"s\":r=String(r),r=o.precision?r.substring(0,o.precision):r;break;case\"t\":r=String(!!r),r=o.precision?r.substring(0,o.precision):r;break;case\"T\":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=o.precision?r.substring(0,o.precision):r;break;case\"u\":r=parseInt(r,10)>>>0;break;case\"v\":r=r.valueOf(),r=o.precision?r.substring(0,o.precision):r;break;case\"x\":r=(parseInt(r,10)>>>0).toString(16);break;case\"X\":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}pm.json.test(o.type)?d+=r:(!pm.number.test(o.type)||u&&!o.sign?h=\"\":(h=u?\"+\":\"-\",r=r.toString().replace(pm.sign,\"\")),s=o.pad_char?\"0\"===o.pad_char?\"0\":o.pad_char.charAt(1):\" \",c=o.width-(h+r).length,a=o.width&&c>0?s.repeat(c):\"\",d+=o.align?h+r+a:\"0\"===s?h+a+r:a+h+r)}return d}function Po(t){if(dm[t])return dm[t];for(var e,r=t,i=[],n=0;r;){if(null!==(e=pm.text.exec(r)))i.push(e[0]);else if(null!==(e=pm.modulo.exec(r)))i.push(\"%\");else{if(null===(e=pm.placeholder.exec(r)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(e[2]){n|=1;var o=[],a=e[2],s=[];if(null===(s=pm.key.exec(a)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o.push(s[1]);\"\"!==(a=a.substring(s[0].length));)if(null!==(s=pm.key_access.exec(a)))o.push(s[1]);else{if(null===(s=pm.index_access.exec(a)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o.push(s[1])}e[2]=o}else n|=2;if(3===n)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return dm[t]=i}function Co(){this.signals={updated:new no},this.begin(),this.maxDuration=-1/0,this.minDuration=1/0,this.avgDuration=14,this.lastDuration=1/0,this.prevFpsTime=0,this.lastFps=1/0,this.lastFrames=1,this.frames=0,this.count=0}function Io(t){if(void 0===t)return\"\";var e=[];for(var r in t){var i=t[r];!1!==i&&e.push(\"#define \"+r+\" \"+i)}return e.join(\"\\n\")+\"\\n\"}function Ro(t,e){e=e||{};var r=t+\"|\";for(var i in e)r+=i+\":\"+e[i];if(!_m[r]){var n=Io(e),o=Yf.get(\"shader/\"+t);if(!o)throw new Error(\"empty shader, '\"+t+\"'\");o=o.replace(xm,function(t,e){var r=\"shader/chunk/\"+e+\".glsl\";return Yf.get(r)||hp[e]||\"\"}),_m[r]=n+o}return _m[r]}function Lo(t,e,r,i){function n(e){var i=e%u,n=Math.floor(e/u),o=i*m,a=n*g;r.camera.setViewOffset(m*u,g*u,o,a,m,g),r.render(),h?v.drawImage(t.domElement,Math.floor(o/2),Math.floor(a/2),Math.ceil(m/2),Math.ceil(g/2)):v.drawImage(t.domElement,Math.floor(o),Math.floor(a),Math.ceil(m),Math.ceil(g)),\"function\"==typeof l&&l(e+1,d,!1)}function o(){r.setSampling(y),r.camera.view=null,\"function\"==typeof p&&p(d+1,d,!1)}function a(){for(var t=0;t<=d;++t)t===d?o():n(t)}function s(){function t(){e===d?o():n(e),e+=1}for(var e=0,r=0;r<=d;++r)setTimeout(t,0,r)}var c=i||{},u=void 0!==c.factor?c.factor:2,h=void 0!==c.antialias&&c.antialias,l=c.onProgress,p=c.onFinish;h&&(u*=2);var d=u*u,f=document.createElement(\"canvas\"),m=r.width,g=r.height;h?(f.width=m*u/2,f.height=g*u/2):(f.width=m*u,f.height=g*u);var v=f.getContext(\"2d\"),y=r.sampleLevel;r.setSampling(-1),this.render=a,this.renderAsync=s,this.canvas=f}function Oo(t,e,r,i,n){r=r||1,i=i||0;var o,a,s=n?n.length:t.length/r,c=0,u=0;if(n)for(a=0;ae?1:t=u&&e(t[o],l)>0;)t[o+1]=t[o],--o;t[o+1]=l}if(-1===c)break;h=s[c--],u=s[c--]}else{for(a=h,n(u+h>>1,o=u+1),e(t[u],t[h])>0&&n(u,h),e(t[o],t[h])>0&&n(o,h),e(t[u],t[o])>0&&n(u,o),l=t[o];;){do{o++}while(e(t[o],l)<0);do{a--}while(e(t[a],l)>0);if(a=a-u?(s[++c]=o,s[++c]=h,h=a-1):(s[++c]=u,s[++c]=a-1,u=o)}return t}function $o(t){for(var e=-1/0,r=0,i=t.length;re&&(e=t[r]);return e}function Ho(t){for(var e=1/0,r=0,i=t.length;r=0;a--){for(o=h-1;o>=0;o--)if(c=4*(a*h+o),l[c]!==e||l[c+1]!==r||l[c+2]!==i||l[c+3]!==n){s=!0;break}if(s)break}var f=a;for(s=!1,o=h-1;o>=0;o--){for(a=u-1;a>=0;a--)if(c=4*(a*h+o),l[c]!==e||l[c+1]!==r||l[c+2]!==i||l[c+3]!==n){s=!0;break}if(s)break}var m=o,g=document.createElement(\"canvas\");return g.width=m-d,g.height=f-p,g.getContext(\"2d\").drawImage(t,d,p,g.width,g.height,0,0,g.width,g.height),g}function Zo(t,e){function r(e){var r=s;c&&(r*=2),e&&(r=1/r),t.scene.traverse(function(t){var e=t.material;e&&e.linewidth&&(e.linewidth*=r),e&&e.uniforms&&e.uniforms.size&&void 0===e.uniforms.size.__seen&&(e.uniforms.size.value*=r,e.uniforms.size.__seen=!0)}),t.scene.traverse(function(t){var e=t.material;e&&e.uniforms&&e.uniforms.size&&delete e.uniforms.size.__seen})}function i(t){if(a){var e=d;return Yo(t,u?0:255*e.r,u?0:255*e.g,u?0:255*e.b,u?0:255)}return t}function n(t,e,r){\"function\"==typeof o.onProgress&&o.onProgress(t,e,r)}var o=e||{},a=gn(o.trim,!1),s=gn(o.factor,1),c=gn(o.antialias,!1),u=gn(o.transparent,!1),h=t.renderer,l=t.camera,p=h.getClearAlpha(),d=h.getClearColor();return new Promise(function(e){function o(o,s){i(a.canvas).toBlob(function(i){h.setClearAlpha(p),r(!0),t.requestRender(),n(s,s,!0),e(i)},\"image/png\")}var a=new Lo(h,l,t,{factor:s,antialias:c,onProgress:n,onFinish:o});h.setClearAlpha(u?0:1),r(),a.renderAsync()})}function Ko(t,e){t.traverseVisible(function(t){if(t instanceof De&&t.sortParticles){var r=t.geometry.attributes,i=r.position.count;if(0!==i){Im.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),Rm.multiplyMatrices(e.projectionMatrix,Im);var n,o,a,s;t.userData.sortData?(n=t.userData.sortData,a=n.__zArray,o=n.__sortArray,s=n.__cmpFn):(a=new Float32Array(i),o=new Uint32Array(i),n={__zArray:a,__sortArray:o,__cmpFn:s=function(t,e){var r=a[t],i=a[e];return r>i?1:r500&&!V&&$<3&&-1!==$){var e=$;$=3,j=!0,O(),V=!0,$=e,t.Debug&&jf.log(\"rendered still frame\")}window.requestAnimationFrame(w)}function S(t,e){t*=window.devicePixelRatio,e*=window.devicePixelRatio;var r,i,n,o=zf?Dm:Nm;O(!0),ht.readRenderTargetPixels(pt,t,e,1,1,o),r=zf?Math.round(255*o[0])<<16&16711680|Math.round(255*o[1])<<8&65280|255&Math.round(255*o[2]):o[0]<<16|o[1]<<8|o[2];var a=Math.round(o[3]),s=at.getObjectById(a);return s&&(i=s.userData.instance,n=s.userData.buffer.picking),{pid:r,instance:i,picker:n}}function A(){j||(window.performance.now()-q.startTime>22&&(q.begin(),V=!1),j=!0,window.requestAnimationFrame(function(){O(),q.update()}))}function M(){var t=$n(Y.fov),e=2*Math.tan(t/2)*-K.position.z;Z.zoom=F/e}function E(){var t=X;(H=Et.copy(K.position).length())||(K.position.set(0,0,t.cameraZ),H=Math.abs(t.cameraZ)),W=Math.max(10,.5*Mt),((W+=wt.getCenter(Et).length())===1/0||W===-1/0||isNaN(W))&&(W=50);var e=(50-t.clipNear)/50,r=-(50-t.clipFar)/50;K.near=H-W*e,K.far=H+W*r;var i=(50-t.fogNear)/50,n=-(50-t.fogFar)/50,o=Q.fog;o.color.set(t.fogColor),o.near=H-W*i,o.far=H+W*n,\"PerspectiveCamera\"===K.type?(K.near=Math.max(.1,t.clipDist,K.near),K.far=Math.max(1,K.far),o.near=Math.max(.1,o.near),o.far=Math.max(1,o.far)):\"OrthographicCamera\"===K.type&&0===t.clipNear&&t.clipDist>0&&H+K.zoom>2*-t.clipDist&&(K.near+=K.zoom+t.clipDist)}function T(){K.updateMatrix(),K.updateMatrixWorld(!0),K.matrixWorldInverse.getInverse(K.matrixWorld),K.updateProjectionMatrix(),Qo(Q,K,ht,H,W),Ko(Q,K)}function P(t,e,r,i){nt.visible=t,at.visible=e,ct.visible=r,ut.visible=i}function C(){Et.copy(K.position).setLength(100*Mt),J.position.copy(K.position).add(Et),J.color.set(X.lightColor),J.intensity=X.lightIntensity,et.color.set(X.ambientColor),et.intensity=X.ambientIntensity}function I(){ht.clearTarget(pt),P(!1,!0,!1,!1),ht.render(Q,K,pt),_(),ht.setRenderTarget(null)}function R(e){e?ht.clearTarget(e):ht.clear(),P(!1,!1,!0,!1),ht.render(Q,K,e),e?ht.clearTarget(e,!1,!0,!1):ht.clearDepth(),_(),P(!0,!1,!1,t.Debug),ht.render(Q,K,e),_()}function L(){var t=Tm[Math.max(0,Math.min($,5))],e=1/t.length;mt.tForeground.value=dt.texture;for(var r=dt.width,i=dt.height,n=0;n0?L():R(),G=t,U=!1,j=!1}function D(){jf.log(\"scene cleared\"),Q.remove(rt),r(),ht.clear()}var N,k,F,B={ticked:new no};if((N=\"string\"==typeof e?document.getElementById(e):e instanceof window.Element?e:document.createElement(\"div\"))===document.body)k=window.innerWidth||1,F=window.innerHeight||1;else{var z=N.getBoundingClientRect();k=z.width||1,F=z.height||1}var U,j,G,V,$,H,W,X;!function(){X={fogColor:new tt(0),fogNear:50,fogFar:100,backgroundColor:new tt(0),cameraType:\"perspective\",cameraFov:40,cameraZ:-80,clipNear:0,clipFar:100,clipDist:10,lightColor:new tt(14540253),lightIntensity:1,ambientColor:new tt(14540253),ambientIntensity:.2,sampleLevel:0}}();var q;!function(){q=new Co}();var Y,Z,K;!function(){var t=new g(0,0,0);(Y=new bt(X.cameraFov,k/F)).position.z=X.cameraZ,Y.lookAt(t),(Z=new yt(k/-2,k/2,F/2,F/-2)).position.z=X.cameraZ,Z.lookAt(t),(K=\"orthographic\"===X.cameraType?Z:Y).updateProjectionMatrix()}();var Q,J,et,rt,it,nt,at,ct,ut;r();var ht,lt,pt,dt,ft,mt,gt,vt,xt;if(!1===function(){var t=window.devicePixelRatio;try{ht=new ye({preserveDrawingBuffer:!0,alpha:!0,antialias:!0})}catch(t){return N.innerHTML=Gf,!1}ht.setPixelRatio(t),ht.setSize(k,F),ht.autoClear=!1,ht.sortObjects=!0;var e=ht.getContext();wo(ht.extensions.get(\"EXT_frag_depth\")),ht.extensions.get(\"OES_element_index_uint\"),_o(ht.extensions.get(\"OES_texture_float\")&&ht.extensions.get(\"WEBGL_color_buffer_float\")||ht.extensions.get(\"OES_texture_float\")&&Jo(e,e.FLOAT)),N.appendChild(ht.domElement);var r=k*t,i=F*t;ht.extensions.get(\"OES_texture_float\"),lt=ht.extensions.get(\"OES_texture_half_float\")&&Jo(e,36193),ht.extensions.get(\"WEBGL_color_buffer_float\"),(pt=new f(r,i,{minFilter:nl,magFilter:nl,stencilBuffer:!1,format:Al,type:zf?gl:hl})).texture.generateMipmaps=!1,dt=new f(r,i,{minFilter:sl,magFilter:sl,format:Al}),ft=new f(r,i,{minFilter:nl,magFilter:nl,format:Al,type:lt?vl:zf?gl:hl}),gt=new ot({uniforms:mt={tForeground:{type:\"t\",value:null},scale:{type:\"f\",value:1}},vertexShader:Ro(\"Quad.vert\"),fragmentShader:Ro(\"Quad.frag\"),premultipliedAlpha:!0,transparent:!0,blending:ph,depthTest:!1,depthWrite:!1}),vt=new yt(-1,1,1,-1,0,1),xt=(new _e).add(new Bt(new Lt(2,2),gt))}())return this.container=N,void jf.error(\"Viewer: could not initialize renderer\");var _t,wt=new st,At=new g,Mt=0;!function(){var t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),e=new Float32Array(24),r=new Ct;r.setIndex(new St(t,1)),r.addAttribute(\"position\",new St(e,3));var i=new ot({uniforms:{uColor:{value:new tt(\"skyblue\")}},vertexShader:Ro(\"BasicLine.vert\"),fragmentShader:Ro(\"BasicLine.frag\"),linewidth:2});_t=new Re(r,i),ut.add(_t)}(),d(),p();var Et=new g,Tt={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};this.container=N,this.stats=q,this.signals=B,this.rotationGroup=rt,this.translationGroup=it,this.add=n,this.remove=a,this.clear=D,this.getPickingPixels=c,this.getImage=u,this.makeImage=h,this.setLight=l,this.setFog=p,this.setBackground=d,this.setSampling=m,this.setCamera=v,this.setClip=y,this.setSize=b,this.handleResize=x,this.pick=S,this.requestRender=A,this.render=O,this.animate=w,this.updateZoom=M,this.updateHelper=i,this.renderer=ht,this.scene=Q,this.perspectiveCamera=Y,this.boundingBox=wt,this.updateBoundingBox=function(){s(),t.Debug&&i()},Object.defineProperties(this,{camera:{get:function(){return K}},width:{get:function(){return k}},height:{get:function(){return F}},sampleLevel:{get:function(){return $}}})}function ra(t){var e=t.touches[0].pageX-t.touches[1].pageX,r=t.touches[0].pageY-t.touches[1].pageY;return Math.sqrt(e*e+r*r)}function ia(t){if(\"object\"==typeof t){if(\"buttons\"in t)return t.buttons;if(\"which\"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<n&&(n=u),h>o&&(o=h),l>a&&(a=l)}return[pa([e,r,i]),pa([n,o,a])]}function ua(t,e){for(var r=0,i=e.length;r>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24}function Ta(t,e){this.type=t,this.scale=e||1,this.max=10}function Pa(t,e){this.cols=t,this.rows=e,this.size=this.cols*this.rows,this.data=new Float32Array(this.size)}function Ca(t,e){for(var r=0,i=0,n=e.rows,o=e.cols,a=0,s=0,c=0,u=e.data,h=t.data;re?(e/=t,t*Math.sqrt(1+e*e)):e>0?(t/=e,e*Math.sqrt(1+t*t)):0}function za(t,e,r,i,n,o,a,s){for(var c=2*Zv,u=Kv,h=0,l=0,p=0,d=0,f=Math.max(o,30),m=0,g=0,v=0,y=0,b=0,x=0,_=0,w=0,S=0,A=0,M=0,E=0,T=0,P=0,C=0,I=0,R=0,L=4660,O=0,D=0,N=0,k=new Float64Array(a<<3);h>16)?D:-D,t[h*e+p]=O;for(d=0;d<2;d++)for(l=0;l>o),d=Math.max(0,e-i-c>>o),f=Math.max(0,r-i-u>>o),y=Math.min(h,t+i-s>>o),x=Math.min(l,e+i-c>>o),_=Math.min(p,r+i-u>>o),w=[],S=a;S<=y;++S)for(var A=d;A<=x;++A)for(var E=f;E<=_;++E){var P=b[(S*l+A)*p+E];if(P>0)for(var I=P-1,R=T[I],L=R+M[I],O=R;O>o),l=1+(a.max.y-c>>o),p=1+(a.max.z-u>>o),d=h*l*p,f=t.count,m=t.x,g=t.y,v=t.z,y=0,b=new Uint32Array(d),x=new Int32Array(f);for(i=0;i>o,w=g[i]-c>>o,S=v[i]-u>>o,A=(_*l+w)*p+S;1===(b[A]+=1)&&(y+=1),x[i]=A}var M=new Uint16Array(y);for(i=0,n=0;i0&&(b[i]=n+1,M[n]=E,n+=1)}var T=new Uint32Array(y);for(i=1;i0){var R=I-1;C[T[R]+P[R]]=i,P[R]+=1}}this.within=r}function Za(e){var r=0,i=0,n={},o={},a=window.URL.createObjectURL($f.get(e)),s=new window.Worker(a);$f.activeWorkerCount+=1,s.onmessage=function(i){r-=1;var a=i.data.__postId;t.Debug&&jf.timeEnd(\"Worker.postMessage \"+e+\" #\"+a),n[a]&&n[a].call(s,i),delete n[a],delete o[a]},s.onerror=function(t){if(r-=1,t.data){var i=t.data.__postId;o[i]?o[i].call(s,t):jf.error(\"Worker.onerror\",i,e,t),delete n[i],delete o[i]}else jf.error(\"Worker.onerror\",e,t)},this.name=e,this.post=function(a,c,u,h){n[i]=u,o[i]=h,(a=a||{}).__name=e,a.__postId=i,a.__debug=t.Debug,t.Debug&&jf.time(\"Worker.postMessage \"+e+\" #\"+i);try{s.postMessage(a,c)}catch(t){jf.error(\"worker.post:\",t),s.postMessage(a)}return r+=1,i+=1,this},this.terminate=function(){s?(s.terminate(),window.URL.revokeObjectURL(a),$f.activeWorkerCount-=1):jf.log(\"no worker to terminate\")},Object.defineProperties(this,{postCount:{get:function(){return i}},pending:{get:function(){return r}}})}function Ka(t,e){e=Math.min(8,e||2);var r=[],i=0;this.name=t,this.maxCount=e,this.post=function(t,e,r,i){return this.getNextWorker().post(t,e,r,i),this},this.terminate=function(){r.forEach(function(t){t.terminate()})},this.getNextWorker=function(){for(var n,o=1/0,a=0;a=i){n=new Za(t),r.push(n),i+=1;break}var s=r[a];if(0===s.pending){n=s;break}s.pending=x){N=v,L=!0;break}if(L)break}if(L)break}for(L=!1,g=o;g=x){D=g,L=!0;break}if(L)break}if(L)break}for(L=!1,m=n;m=x){O=m,L=!0;break}if(L)break}if(L)break}for(L=!1,v=h;v>=s;--v){for(g=u;g>=o;--g){for(m=c;m>=n;--m)if(p=e*r*v+e*g+m,t[p]>=x){B=v,L=!0;break}if(L)break}if(L)break}for(L=!1,g=u;g>=o;--g){for(v=B;v>=s;--v){for(m=c;m>=n;--m)if(p=e*r*v+e*g+m,t[p]>=x){F=g,L=!0;break}if(L)break}if(L)break}for(L=!1,m=c;m>=n;--m){for(g=F;g>=o;--g){for(v=B;v>=s;--v)if(p=e*r*v+e*g+m,t[p]>=x){k=m,L=!0;break}if(L)break}if(L)break}_?(n=Math.max(0,O-1),o=Math.max(0,D-1),s=Math.max(0,N-1),c=Math.min(e-1,k+1),u=Math.min(r-1,F+1),h=Math.min(i-1,B+1)):(n=Math.max(1,O-1),o=Math.max(1,D-1),s=Math.max(1,N-1),c=Math.min(e-2,k+1),u=Math.min(r-2,F+1),h=Math.min(i-2,B+1))}var z=15;for(v=s;vs&&(s=e);var a=o-n;if(0===a)return-1;var u=4*l;if(l+=1,1===a)return h[u]=n,h[u+1]=-1,h[u+2]=-1,h[u+3]=i,u;var d=n+Math.floor(a/2);p=e%3;for(var f,m,g,v,y,b=n,x=o-1;x>b;){for(v=t[3*c[g=b+x>>1]+p],m=c[g],c[g]=c[x],c[x]=m,y=b,f=b;fn&&s.pop()}var p,d,f=i(u)%3,m=3*c[h[u]],g=[t[m+0],t[m+1],t[m+2]],v=e(r,g),y=h[u+1],b=h[u+2];if(-1===b&&-1===y)return void((s.size()t[3*c[h[e]]+n])throw new Error(\"left child is > parent!\");i+=o(a,r+1)}if(-1!==s){if(t[3*c[h[s]]+n]0&&(e=\":\"+Cn(t).join(\" OR :\")),new Cf(e)}function fs(e,r){if(r){t.Debug&&jf.time(\"assignSecondaryStructure\");var i=[];e.eachModel(function(t){t.eachChain(function(t){i.push(t.chainname)})});var n=i.slice().sort(),o=[];n.forEach(function(t){o.push(i.indexOf(t))});var a=r.helices;(a=a.filter(function(t){return Mn(n,t[0])>=0})).sort(function(t,e){var r=t[0],i=e[0],a=t[1],s=e[1];if(r===i)return a===s?0:a=0})).sort(function(t,e){var r=t[0],i=e[0];if(r===i)return 0;var a=Mn(n,r),s=Mn(n,i);return o[a]=e;)r=Math.floor(r/e),n+=_y[r%e],i+=1;return i>=5&&jf.warn(\"chainname overflow\"),n}function gs(e,r){t.Debug&&jf.time(\"calculateChainnames\");var i=!0;if(e.eachChain(function(t){t.chainname&&(i=!1)}),i){var n=e.modelStore,o=e.chainStore,a=e.residueStore,s=function(t,e,r,i){for(var s=o.count,c=0;c500)return void(t.Debug&&jf.warn(\"more than 500 atoms, skip residue for auto-bonding\",e.qualifiedName()));var c,u,h=[],l=[],p=[];if(o>50){var d=new ls(e,!0),f=e.isCg()?1.2:2.3;for(c=a;c500)return void jf.warn(\"more than 500 atoms, skip residue for auto-bonding\",t.qualifiedName());for(var l=t.getBonds(),p=l.atomIndices1,d=l.atomIndices2,f=l.bondOrders,m=p.length,g=0;g1&&(c.x-=1),s.x<0&&(c.x+=1),s.y>1&&(c.y-=1),s.y<0&&(c.y+=1),s.z>1&&(c.z-=1),s.z<0&&(c.z+=1),t&&c.add(t),u.setPosition(c),u.multiplyMatrices(i.fracToCart,u),u.multiply(i.cartToFrac),e.push(u)}),e}if(e.unitcell){t.Debug&&jf.time(\"buildUnitcellAssembly\");var i=e.unitcell,n=e.center.clone().applyMatrix4(i.cartToFrac),o=ps(i.spacegroup),a=new g,s=new g,c=new g;n.x>1&&(a.x-=1),n.x<0&&(a.x+=1),n.y>1&&(a.y-=1),n.y<0&&(a.y+=1),n.z>1&&(a.z-=1),n.z<0&&(a.z+=1);var u,h=new gy(\"UNITCELL\"),l=r();if(e.biomolDict.NCS){u=[new v].concat(e.biomolDict.NCS.partList[0].matrixList);var p=[];l.forEach(function(t){u.forEach(function(e){p.push(t.clone().multiply(e))})}),h.addPart(p)}else h.addPart(l);var d=new g,f=new gy(\"SUPERCELL\"),m=Array.prototype.concat.call(r(d.set(1,0,0)),r(d.set(0,1,0)),r(d.set(0,0,1)),r(d.set(-1,0,0)),r(d.set(0,-1,0)),r(d.set(0,0,-1)),r(d.set(1,1,0)),r(d.set(1,0,1)),r(d.set(0,1,1)),r(d.set(-1,-1,0)),r(d.set(-1,0,-1)),r(d.set(0,-1,-1)),r(d.set(1,-1,-1)),r(d.set(1,1,-1)),r(d.set(1,-1,1)),r(d.set(-1,1,1)),r(d.set(-1,-1,1)),r(d.set(-1,1,-1)),r(d.set(0,1,-1)),r(d.set(0,-1,1)),r(d.set(1,0,-1)),r(d.set(-1,0,1)),r(d.set(1,-1,0)),r(d.set(-1,1,0)),r(),r(d.set(1,1,1)),r(d.set(-1,-1,-1)));if(e.biomolDict.NCS){var y=[];m.forEach(function(t){u.forEach(function(e){y.push(t.clone().multiply(e))})}),f.addPart(y)}else f.addPart(m);e.biomolDict.UNITCELL=h,e.biomolDict.SUPERCELL=f,t.Debug&&jf.timeEnd(\"buildUnitcellAssembly\")}}function Ss(t){var e=t.trim().toUpperCase();parseInt(e.charAt(0))&&(e=e.substr(1)),parseInt(e.charAt(0))&&(e=e.substr(1));var r=e.length;if(0===r)return\"\";if(1===r)return e;if(2===r){if(-1!==Sy.indexOf(e))return e;if(-1!==wy.indexOf(e[0]))return e[0]}return r>=3&&-1!==wy.indexOf(e[0])?e[0]:\"\"}function As(t){var e=t.bondHash,r=e.countArray,i=e.offsetArray,n=e.indexArray,o=t.getBondProxy();t.eachResidue(function(t){var e=t.residueType;if(void 0===e.bonds){var a=t.atomOffset,s=[],c=[],u=[],h={};t.eachAtom(function(t){for(var e=t.index,l=i[e],p=0,d=r[e];pm){var g=m;m=f,f=g}var v=f+\"|\"+m;void 0===h[v]&&(h[v]=!0,s.push(f-a),c.push(m-a),u.push(o.bondOrder))}}),e.bonds={atomIndices1:s,atomIndices2:c,bondOrders:u}}})}function Ms(t,e){return t+\"|\"+e}function Es(t,e,r,i){return t+\"|\"+e.join(\",\")+\"|\"+(r?1:0)+\"|\"+(i||\"\")}function Ts(t,e,r){if(0!==r[0]&&0!==r[8]&&0!==r[4])for(var i=t.length,n=r[0],o=r[1],a=r[2],s=-e[0]+n+n/2,c=-e[1]+o+o/2,u=-e[2]+a+a/2,h=0;h.9*e[3*i+i])if(o>0)for(n=0;n<3;++n)t[r+n]-=e[3*i+n];else for(n=0;n<3;++n)t[r+n]+=e[3*i+n];return t}}function Cs(t,e,r){return[Oo(e,r[0],3,0,t),Oo(e,r[1],3,1,t),Oo(e,r[2],3,2,t)]}function Is(t,e,r,i,n){for(var o=t.length,a=new Float32Array(o),s=0;s1&&(l=1),i(e,r,n,o,h,f),i(e,r,n,o,l,m),m.sub(f).normalize(),m.toArray(a,g)}}function a(e,r,i,n,o){for(var a=r.next(),s=r.next(),c=r.next(),u=r.size,h=u-1,l=n||0,p=0;pr&&s.bondSet.clear(y)}else(\"OH\"===u.atomname&&\"TYR\"===u.resname||\"OH\"===h.atomname&&\"TYR\"===h.resname)&&(function(t,e,i,n){var o,a;t.atomname===i?(o=t,a=e):(o=e,a=t),d.index=o.residueIndex;var s=d.getAtomIndexByName(n);return m.subVectors(s,o),v.subVectors(s,a),Hn(m.angleTo(v))r&&s.bondSet.clear(y)))}}return{atomSet:s.atomSet,bondSet:s.bondSet,bondStore:s.bondStore}}function Qs(t){var e=JSON.stringify(t);return void 0===Yx[e]&&(Yx[e]=new Zx(t)),Yx[e]}function Js(t,e){this.type=t,this.text=e||{}}function tc(t,e,r,i,n){function o(t,i,o){return((t*e+i)*r+o)*n}var a,s=new(i=i||Int32Array)(t*e*r*(n=n||1));this.data=s,this.index=o,this.set=function(t,e,r){var i=arguments,c=o(t,e,r);for(a=0;aa?u[h]=-1:(o=Math.sqrt(a-n),u[h]=Math.floor(o)),++h;A[l]=c,S[l]=u}}function o(r){var i,n,o,a,s,c,u,h,l,p,d,f,m,v,_,M,P,I,R=3*r,O=r;i=Math.floor(.5+g*(t[R]+w[0])),n=Math.floor(.5+g*(t[R+1]+w[1])),o=Math.floor(.5+g*(t[R+2]+w[2]));var D,N=e[O],k=S[N],F=0,B=b*x,z=A[N];for(p=0;p=y||v>=b||_>=x)){var U=m*B+v*x+_;if(E)if(T[U]&L){if(T[U]&L){var j=C[U];j!==R&&u*u+h*h+l*l<(a=i+u-Math.floor(.5+g*(t[j]+w[0])))*a+(s=n+h-Math.floor(.5+g*(t[j+1]+w[1])))*s+(c=o+l-Math.floor(.5+g*(t[j+2]+w[2])))*c&&(C[U]=r)}}else T[U]|=L,C[U]=r;else T[U]|=L}F++}}function a(e){console.time(\"EDTSurface fillvoxels\");var r,i;for(r=0,i=T.length;r=y||d>=b||f>=x)){var B=p*F+d*x+f;if(T[B]&O){if(E){var z=C[B];u*u+h*h+l*l<(a=Math.floor(.5+g*(t[z]+w[0])))*a+(s=Math.floor(.5+g*(t[z+1]+w[1])))*s+(c=Math.floor(.5+g*(t[z+2]+w[2])))*c&&(C[B]=r)}}else T[B]|=O,E&&(C[B]=r)}N++}}function c(){var e,r;for(e=0,r=T.length;e-1&&a-1&&c-1&&s0);var f,m=v*v,g=new Uint16Array(3);for(t=0;t=m)||(T[n]|=D,E&&T[n]&O&&(o.toArray(t,e,r,g),f=g[0]*a+g[1]*x+g[2],C[n]=C[f])));console.timeEnd(\"EDTSurface fastdistancemap\")}function l(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f,m,g=new Uint16Array(3),v=0;if(0===r)return v;var _=-1,w=-1,S=-1,A=b*x;for(h=0,p=r;h-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)-1&&w-1&&S-1&&(T[f=_*A+x*w+S]&L&&!(T[f]&O)?(e.fromArray(_,w,S,g),d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u,P[f]=d,T[f]|=O,T[f]|=D,i[v]=_,i[v+1]=w,i[v+2]=S,v+=3):T[f]&L&&T[f]&O&&(d=(s=_-g[0])*s+(c=w-g[1])*c+(u=S-g[2])*u)T&&(T=R)}this.neighbourListLength=27*T+1,this.withinRadii=function(n,o,a,c,p){for(var d=0,f=s(n,u),y=s(o,h),x=s(a,l),_=Math.max(0,f-1),w=Math.max(0,y-1),E=Math.max(0,x-1),T=Math.min(m,f+1),P=Math.min(g,y+1),C=Math.min(v,x+1),I=_;I<=T;++I)for(var R=I*b,L=w;L<=P;++L)for(var O=L*v,D=E;D<=C;++D)for(var N=R+O+D,k=S[N],F=k+A[N],B=k;BE&&(E=A[h]);o(),a(),s(),H=-1}function n(t,e,r){for(var i=0;i=0;){if(o!==i&&o!==n&&u(o,t,e,r))return H=o,o;o=j[++a]}return H=-1,-1}function u(e,r,i,n){var o=3*e,a=M[e],s=t[o]-r,c=t[o+1]-i,u=t[o+2]-n;return s*s+c*c+u*u=0;)t0&&s0&&e(g-1),l.growIfFull(),l.resno[g]=_,void 0!==S&&(l.sstruc[g]=S.charCodeAt(0)),void 0!==A&&(l.inscode[g]=A.charCodeAt(0)),l.atomOffset[g]=m,l.atomCount[g]=0,l.count+=1,l.chainIndex[g]=v,p.residueCount[v]+=1),h.count+=1,h.residueIndex[m]=g,l.atomCount[g]+=1,n=t,o=b,a=x,s=_,c=A,u=w},this.finalize=function(){r=a,i=u,g>-1&&e(g)}}function oc(t){switch(t=t.toLowerCase()){case\"polymer\":return _v;case\"non-polymer\":return wv;case\"macrolide\":return Sv;case\"water\":return Av;default:return xv}}function ac(t,e,r){var i=\"\"+t;return e&&(i+=\":\"+e),r&&(i+=\"^\"+r),i}function sc(t){return!t||t[0]!==t[t.length-1]||\"'\"!==t[0]&&'\"'!==t[0]?t:t.substring(1,t.length-1)}function cc(t,e){Array.isArray(t[e])||Object.keys(t).forEach(function(e){t[e]=[t[e]]})}function uc(t){return\"?\"!==t}function hc(t,e){return uc(t)?t:e}function lc(t){switch(t.toLowerCase()){case\"?\":case\"sing\":return 1;case\"doub\":return 2;case\"trip\":return 3;case\"quad\":return 4}return 0}function pc(t,e,r){var i,n,o=e.atomStore,a=e.atomMap,s=t.chem_comp,c=t.chem_comp_atom,u=t.chem_comp_bond;s&&(s.name&&(e.title=s.name.trim().replace(yw,\"\")),s.id&&(e.id=s.id.trim().replace(yw,\"\")));var h={};if(c){var l,p,d,f;for(n=c.comp_id.length,i=0;if*f)return n.growIfFull(),n.atomTypeId[m]=n.atomTypeId[t],n.x[m]=p.x,n.y[m]=p.y,n.z[m]=p.z,n.occupancy[m]=n.occupancy[t],n.serial[m]=m,n.altloc[m]=\"A\".charCodeAt(0),r.addAtom(0,\"\",\"\",\"HET\",1,1),void(m+=1)}}})}(b)}function fc(t,e,r){var i,n,o,a,s=[],c=[],u=t.struct_conf;if(u)for(cc(u,\"id\"),i=0,n=u.beg_auth_seq_id.length;i0){o=o.split(\"(\");var c=s(o[0]),u=s(o[1]);Object.keys(c).forEach(function(t){Object.keys(u).forEach(function(e){var r=new v;r.multiplyMatrices(c[t],u[e]),i[t+\"x\"+e]=r})})}else i=s(o);var h=[];for(var l in i)h.push(i[l]);var p=t;/^(0|[1-9][0-9]*)$/.test(p)&&(p=\"BU\"+p);for(var d=a.asym_id_list[e].split(\",\"),f=0,m=d.length;fw){var S=_;_=w,w=S;var A=f;f=b,b=A}if(0!==_&&0!==w)for(var M=0;Mo&&++s;e=new Int32Array(s)}for(r=0,i=0;r65535){for(var i=[],n=0;n6,\"non valid type \"+a);var s=qc(t,a,t.readUint32());Gc(t),e[n]={name:o,type:$c(a),value:s}}return e}function eu(t,e,r){var i,n=t.readUint32(),o=0;if(n===lS)return jc(t.readUint32()!==lS,\"wrong empty tag for list of variables\"),[];jc(n!==dS,\"wrong tag for list of variables\");var a=t.readUint32();i=new Array(a);for(var s=0;s6,\"non valid type \"+d);var f=t.readUint32(),m=t.readUint32();2===r&&(jc(m>0,\"offsets larger than 4GB not supported\"),m=t.readUint32()),h[0]===e&&(o+=f),i[s]={name:c,dimensions:h,attributes:p,type:$c(d),size:f,offset:m,record:h[0]===e}}return{variables:i,recordStep:o}}function ru(t){for(var e=1,r=0;t>=e&&r<32;)r++,e<<=1;return r}function iu(t,e){var r=1,i=0;xS[0]=1;for(var n=0;n>=8;for(;0!==a;)xS[o++]=255&a,a>>=8;r=o}var s=1;for(r--;xS[r]>=s;)i++,s*=2;return i+8*r}function nu(t,e,r,i){for(var n=(1<=8;)c|=(a=a<<8|e[s++])>>o<0&&(o>(o-=r)&(1<8;)_S[s++]=nu(t,e,8,a),i-=8;i>0&&(_S[s++]=nu(t,e,i,a));for(var c=r-1;c>0;c--){for(var u=0,h=s-1;h>=0;h--){var l=(u=u<<8|_S[h])/n[c]|0;_S[h]=l,u-=l*n[c]}o[c]=u}o[0]=_S[0]|_S[1]<<8|_S[2]<<16|_S[3]<<24}function au(t){return t.trim().split(LS).map(parseFloat)}function su(){this.regexp={vertex_pattern:/^v\\s+([\\d.+\\-eE]+)\\s+([\\d.+\\-eE]+)\\s+([\\d.+\\-eE]+)/,normal_pattern:/^vn\\s+([\\d.+\\-eE]+)\\s+([\\d.+\\-eE]+)\\s+([\\d.+\\-eE]+)/,uv_pattern:/^vt\\s+([\\d.+\\-eE]+)\\s+([\\d.+\\-eE]+)/,face_vertex:/^f\\s+(-?\\d+)\\s+(-?\\d+)\\s+(-?\\d+)(?:\\s+(-?\\d+))?/,face_vertex_uv:/^f\\s+(-?\\d+)\\/(-?\\d+)\\s+(-?\\d+)\\/(-?\\d+)\\s+(-?\\d+)\\/(-?\\d+)(?:\\s+(-?\\d+)\\/(-?\\d+))?/,face_vertex_uv_normal:/^f\\s+(-?\\d+)\\/(-?\\d+)\\/(-?\\d+)\\s+(-?\\d+)\\/(-?\\d+)\\/(-?\\d+)\\s+(-?\\d+)\\/(-?\\d+)\\/(-?\\d+)(?:\\s+(-?\\d+)\\/(-?\\d+)\\/(-?\\d+))?/,face_vertex_normal:/^f\\s+(-?\\d+)\\/\\/(-?\\d+)\\s+(-?\\d+)\\/\\/(-?\\d+)\\s+(-?\\d+)\\/\\/(-?\\d+)(?:\\s+(-?\\d+)\\/\\/(-?\\d+))?/,object_pattern:/^[og]\\s*(.+)?/,smoothing_pattern:/^s\\s+(\\d+|on|off)/,material_library_pattern:/^mtllib /,material_use_pattern:/^usemtl /}}function cu(){this.propertyNameMapping={}}function uu(t){return t.replace(GS,\"\")}function hu(t){function e(){if(o(/^<\\?xml\\s*/)){for(var t={attributes:{}};!a()&&!s(\"?>\");){var e=n();if(!e)return t;t.attributes[e.name]=e.value}return o(/\\?>\\s*/),t}}function r(){var t=o(VS);if(t){for(var e={name:t[1],attributes:{},children:[]};!(a()||s(\">\")||s(\"?>\")||s(\"/>\"));){var c=n();if(!c)return e;e.attributes[c.name]=c.value}if(o(/^\\s*\\/>\\s*/))return e;o(/\\??>\\s*/),e.content=i();for(var u;u=r();)e.children.push(u);return o(/^<\\/[\\w-:.]+>\\s*/),e}}function i(){var t=o($S);return t?t[1]:\"\"}function n(){var t=o(HS);if(t)return{name:t[1],value:uu(t[2])}}function o(e){var r=t.match(e);if(r)return t=t.slice(r[0].length),r}function a(){return 0===t.length}function s(e){return 0===t.indexOf(e)}return t=t.trim().replace(//g,\"\"),function(){return{declaration:e(),root:r()}}()}function lu(t,e,r){var i=t.icode.value,n=t.chain.value,o=t.altcode.value,a=t.resnum.value;return i.trim()&&(a+=\"^\"+i),n.trim()&&(a+=\":\"+n),e&&(a+=\".\"+e),r&&o.trim()&&(a+=\"%\"+o),a+=\"/\"+(parseInt(t.model.value)-1)}function pu(t,e,r){void 0===t[e]?t[e]=r:t[e]|=r}function du(t,e){return void 0!==t&&t.value===e}function fu(t){var e=t.inscode,r=t.chainname,i=t.atomname,n=t.altloc,o=t.resno;return e&&(o+=\"^\"+e),r&&(o+=\":\"+r),i&&(o+=\".\"+i),n&&(o+=\"%\"+n),o+=\"/\"+t.modelIndex}function mu(t,e,r){for(var i=0,n=e.getElementsByTagName(\"clash\"),o=0,a=n.length;o0&&(i+=1),e.getElementsByTagName(\"bond-outlier\").length>0&&(i+=1),e.getElementsByTagName(\"plane-outlier\").length>0&&(i+=1),du(r.rota,\"OUTLIER\")&&(i+=1),du(r.rama,\"OUTLIER\")&&(i+=1),du(r.RNApucker,\"outlier\")&&(i+=1),i}function gu(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(\"object\"!=typeof r)throw new TypeError(r+\"must be non-object\");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}}return t}function vu(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}function yu(t,e,r,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+i),n);for(var o=0;o>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(n=n+e[i++]|0)|0}while(--a);n%=65521,o%=65521}return n|o<<16|0}function _u(t,e,r,i){var n=QS,o=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e[a])];return-1^t}function wu(t,e){var r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_,w,S,A,M,E;r=t.state,i=t.next_in,M=t.input,n=i+(t.avail_in-5),o=t.next_out,E=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),c=r.dmax,u=r.wsize,h=r.whave,l=r.wnext,p=r.window,d=r.hold,f=r.bits,m=r.lencode,g=r.distcode,v=(1<>>24,d>>>=x,f-=x,0===(x=b>>>16&255))E[o++]=65535&b;else{if(!(16&x)){if(0==(64&x)){b=m[(65535&b)+(d&(1<>>=x,f-=x),f<15&&(d+=M[i++]<>>24,d>>>=x,f-=x,!(16&(x=b>>>16&255))){if(0==(64&x)){b=g[(65535&b)+(d&(1<c){t.msg=\"invalid distance too far back\",r.mode=JS;break t}if(d>>>=x,f-=x,x=o-a,w>x){if((x=w-x)>h&&r.sane){t.msg=\"invalid distance too far back\",r.mode=JS;break t}if(S=0,A=p,0===l){if(S+=u-x,x<_){_-=x;do{E[o++]=p[S++]}while(--x);S=o-w,A=E}}else if(l2;)E[o++]=A[S++],E[o++]=A[S++],E[o++]=A[S++],_-=3;_&&(E[o++]=A[S++],_>1&&(E[o++]=A[S++]))}else{S=o-w;do{E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],_-=3}while(_>2);_&&(E[o++]=E[S++],_>1&&(E[o++]=E[S++]))}break}}break}}while(i>3,d&=(1<<(f-=_<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i=1&&0===I[_];_--);if(w>_&&(w=_),0===_)return n[o++]=20971520,n[o++]=20971520,s.bits=1,0;for(x=1;x<_&&0===I[x];x++);for(w0&&(t===nA||1!==_))return-1;for(R[1]=0,y=1;yrA||t===aA&&E>iA)return 1;for(var D=0;;){D++,f=y-A,a[b]d?(m=L[O+a[b]],g=P[C+a[b]]):(m=96,g=0),c=1<>A)+(u-=c)]=f<<24|m<<16|g|0}while(0!==u);for(c=1<>=1;if(0!==c?(T&=c-1,T+=c):T=0,b++,0==--I[y]){if(y===_)break;y=e[r+a[b]]}if(y>w&&(T&l)!==h){for(0===A&&(A=w),p+=x,M=1<<(S=y-A);S+A<_&&!((M-=I[S+A])<=0);)S++,M<<=1;if(E+=1<rA||t===aA&&E>iA)return 1;n[h=T&l]=w<<24|S<<16|p-o|0}}return 0!==T&&(n[p+T]=y-A<<24|64<<16|0),s.bits=w,0}function Au(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Mu(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Eu(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg=\"\",e.wrap&&(t.adler=1&e.wrap),e.mode=MA,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(iM),e.distcode=e.distdyn=new Int32Array(nM),e.sane=1,e.back=-1,vA):xA}function Tu(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,Eu(t)):xA}function Pu(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?xA:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,Tu(t))):xA}function Cu(t,e){var r,i;return t?(i=new Mu,t.state=i,i.window=null,(r=Pu(t,e))!==vA&&(t.state=null),r):xA}function Iu(t){if(oM){var e;for(ZS=new Int32Array(512),KS=new Int32Array(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Su(pA,t.lens,0,288,ZS,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Su(dA,t.lens,0,32,KS,0,t.work,{bits:5}),oM=!1}t.lencode=ZS,t.lenbits=9,t.distcode=KS,t.distbits=5}function Ru(t,e,r,i){var n,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(yu(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>i&&(n=i),yu(o.window,e,r-i,n,o.wnext),(i-=n)?(yu(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=_u(r.check,T,2,0),u=0,h=0,r.mode=EA;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg=\"incorrect header check\",r.mode=tM;break}if((15&u)!==AA){t.msg=\"unknown compression method\",r.mode=tM;break}if(u>>>=4,h-=4,w=8+(15&u),0===r.wbits)r.wbits=w;else if(w>r.wbits){t.msg=\"invalid window size\",r.mode=tM;break}r.dmax=1<>8&1),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0,r.mode=TA;case TA:for(;h<32;){if(0===s)break t;s--,u+=i[o++]<>>8&255,T[2]=u>>>16&255,T[3]=u>>>24&255,r.check=_u(r.check,T,4,0)),u=0,h=0,r.mode=PA;case PA:for(;h<16;){if(0===s)break t;s--,u+=i[o++]<>8),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0,r.mode=CA;case CA:if(1024&r.flags){for(;h<16;){if(0===s)break t;s--,u+=i[o++]<>>8&255,r.check=_u(r.check,T,2,0)),u=0,h=0}else r.head&&(r.head.extra=null);r.mode=IA;case IA:if(1024&r.flags&&((d=r.length)>s&&(d=s),d&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),yu(r.head.extra,i,o,d,w)),512&r.flags&&(r.check=_u(r.check,i,d,o)),s-=d,o+=d,r.length-=d),r.length))break t;r.length=0,r.mode=RA;case RA:if(2048&r.flags){if(0===s)break t;d=0;do{w=i[o+d++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w))}while(w&&d>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=kA;break;case DA:for(;h<32;){if(0===s)break t;s--,u+=i[o++]<>>=7&h,h-=7&h,r.mode=KA;break}for(;h<3;){if(0===s)break t;s--,u+=i[o++]<>>=1,h-=1,3&u){case 0:r.mode=BA;break;case 1:if(Iu(r),r.mode=$A,e===gA){u>>>=2,h-=2;break t}break;case 2:r.mode=jA;break;case 3:t.msg=\"invalid block type\",r.mode=tM}u>>>=2,h-=2;break;case BA:for(u>>>=7&h,h-=7&h;h<32;){if(0===s)break t;s--,u+=i[o++]<>>16^65535)){t.msg=\"invalid stored block lengths\",r.mode=tM;break}if(r.length=65535&u,u=0,h=0,r.mode=zA,e===gA)break t;case zA:r.mode=UA;case UA:if(d=r.length){if(d>s&&(d=s),d>c&&(d=c),0===d)break t;yu(n,i,o,d,a),s-=d,o+=d,c-=d,a+=d,r.length-=d;break}r.mode=kA;break;case jA:for(;h<14;){if(0===s)break t;s--,u+=i[o++]<>>=5,h-=5,r.ndist=1+(31&u),u>>>=5,h-=5,r.ncode=4+(15&u),u>>>=4,h-=4,r.nlen>286||r.ndist>30){t.msg=\"too many length or distance symbols\",r.mode=tM;break}r.have=0,r.mode=GA;case GA:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},S=Su(lA,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,S){t.msg=\"invalid code lengths set\",r.mode=tM;break}r.have=0,r.mode=VA;case VA:for(;r.have>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=g,h-=g,r.lens[r.have++]=y;else{if(16===y){for(M=g+2;h>>=g,h-=g,0===r.have){t.msg=\"invalid bit length repeat\",r.mode=tM;break}w=r.lens[r.have-1],d=3+(3&u),u>>>=2,h-=2}else if(17===y){for(M=g+3;h>>=g)),u>>>=3,h-=3}else{for(M=g+7;h>>=g)),u>>>=7,h-=7}if(r.have+d>r.nlen+r.ndist){t.msg=\"invalid bit length repeat\",r.mode=tM;break}for(;d--;)r.lens[r.have++]=w}}if(r.mode===tM)break;if(0===r.lens[256]){t.msg=\"invalid code -- missing end-of-block\",r.mode=tM;break}if(r.lenbits=9,A={bits:r.lenbits},S=Su(pA,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,S){t.msg=\"invalid literal/lengths set\",r.mode=tM;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},S=Su(dA,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,S){t.msg=\"invalid distances set\",r.mode=tM;break}if(r.mode=$A,e===gA)break t;case $A:r.mode=HA;case HA:if(s>=6&&c>=258){t.next_out=a,t.avail_out=c,t.next_in=o,t.avail_in=s,r.hold=u,r.bits=h,wu(t,p),a=t.next_out,n=t.output,c=t.avail_out,o=t.next_in,i=t.input,s=t.avail_in,u=r.hold,h=r.bits,r.mode===kA&&(r.back=-1);break}for(r.back=0;E=r.lencode[u&(1<>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=b,h-=b,r.back+=b}if(u>>>=g,h-=g,r.back+=g,r.length=y,0===v){r.mode=ZA;break}if(32&v){r.back=-1,r.mode=kA;break}if(64&v){t.msg=\"invalid literal/length code\",r.mode=tM;break}r.extra=15&v,r.mode=WA;case WA:if(r.extra){for(M=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=XA;case XA:for(;E=r.distcode[u&(1<>>24,v=E>>>16&255,y=65535&E,!(g<=h);){if(0===s)break t;s--,u+=i[o++]<>b)],g=E>>>24,v=E>>>16&255,y=65535&E,!(b+g<=h);){if(0===s)break t;s--,u+=i[o++]<>>=b,h-=b,r.back+=b}if(u>>>=g,h-=g,r.back+=g,64&v){t.msg=\"invalid distance code\",r.mode=tM;break}r.offset=y,r.extra=15&v,r.mode=qA;case qA:if(r.extra){for(M=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg=\"invalid distance too far back\",r.mode=tM;break}r.mode=YA;case YA:if(0===c)break t;if(d=p-c,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){t.msg=\"invalid distance too far back\",r.mode=tM;break}d>r.wnext?(d-=r.wnext,f=r.wsize-d):f=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=n,f=a-r.offset,d=r.length;d>c&&(d=c),c-=d,r.length-=d;do{n[a++]=m[f++]}while(--d);0===r.length&&(r.mode=HA);break;case ZA:if(0===c)break t;n[a++]=r.length,c--,r.mode=HA;break;case KA:if(r.wrap){for(;h<32;){if(0===s)break t;s--,u|=i[o++]<>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e}function Fu(t,e){if(e<65537&&(t.subarray&&sM||!t.subarray&&aM))return String.fromCharCode.apply(null,vu(t,e));for(var r=\"\",i=0;i4)s[i++]=65533,r+=o-1;else{for(n&=2===o?31:3===o?15:7;o>1&&r1?s[i++]=65533:n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|1023&n)}return Fu(s,i)}function Uu(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+cM[t[r]]>e?r:e}function ju(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}function Gu(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}function Vu(t){if(!(this instanceof Vu))return new Vu(t);this.options=gu({chunkSize:16384,windowBits:0,to:\"\"},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new ju,this.strm.avail_out=0;var r=Cu(this.strm,e.windowBits);if(r!==hM)throw new Error(lM[r]);this.header=new Gu,Du(this.strm,this.header)}function $u(t,e){var r=new Vu(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function Hu(t){var e;t instanceof ArrayBuffer&&(t=new Uint8Array(t));try{e=$u(t)}catch(r){e=t}return e}\"undefined\"!=typeof window&&function(){window.console=window.console||{};for(var t,e,r=window.console,i={},n=function(){},o=\"memory\".split(\",\"),a=\"assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn\".split(\",\");t=o.pop();)r[t]||(r[t]=i);for(;e=a.pop();)r[e]||(r[e]=n)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,\"toBlob\",{value:function(t,e,r){for(var i=window.atob(this.toDataURL(e,r).split(\",\")[1]),n=i.length,o=n>>2,a=new Uint8Array(n),s=new Uint32Array(a.buffer,0,o),c=0,u=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return\"number\"==typeof t&&isFinite(t)&&t>-9007199254740992&&t<9007199254740992&&Math.floor(t)===t}),Number.isNaN||(Number.isNaN=function(t){return t!==t}),Object.assign||Object.defineProperty(Object,\"assign\",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=arguments;if(void 0===t||null===t)throw new TypeError(\"Cannot convert first argument to object\");for(var r,i=Object(t),n=!1,o=1;o1?arguments[1]:void 0,s=a?Number(a):0;Number.isNaN(s)&&(s=0);var c=Math.min(Math.max(s,0),i);if(o+c>i)return!1;for(var u=-1;++ur.length)&&(e=r.length),e-=t.length;var i=r.indexOf(t,e);return-1!==i&&i===e}),String.prototype.repeat||(String.prototype.repeat=function(t){if(null===this)throw new TypeError(\"can't convert \"+this+\" to object\");var e=\"\"+this;if(t=+t,Number.isNaN(t)&&(t=0),t<0)throw new RangeError(\"repeat count must be non-negative\");if(t===1/0)throw new RangeError(\"repeat count must be less than infinity\");if(t=Math.floor(t),0===e.length||0===t)return\"\";if(e.length*t>=1<<28)throw new RangeError(\"repeat count must not overflow maximum string size\");for(var r=\"\";1==(1&t)&&(r+=e),0!==(t>>>=1);)e+=e;return r}),String.prototype.includes||(String.prototype.includes=function(t,e){return\"number\"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.includes||(Array.prototype.includes=function(t){if(null==this)throw new TypeError(\"Array.prototype.includes called on null or undefined\");var e=Object(this),r=parseInt(e.length,10)||0;if(0===r)return!1;var i,n=parseInt(arguments[1],10)||0;n>=0?i=n:(i=r+n)<0&&(i=0);for(var o;i0?1:-1)*Math.floor(Math.abs(e)):e},i=Math.pow(2,53)-1,n=function(t){var e=r(t);return Math.min(Math.max(e,0),i)};return function(t){var r=this,i=Object(t);if(null==t)throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");var o,a=arguments.length>1?arguments[1]:void 0;if(void 0!==a){if(!e(a))throw new TypeError(\"Array.from: when provided, the second argument must be a function\");arguments.length>2&&(o=arguments[2])}for(var s,c=n(i.length),u=e(r)?Object(new r(c)):new Array(c),h=0;h0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,\"name\",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&function(){Object.assign=function(t){var e=arguments;if(void 0===t||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var r=Object(t),i=1;i>=4,r[n]=e[19===n?3&t|8:t]);return r.join(\"\")}}(),clamp:function(t,e,r){return Math.max(e,Math.min(r,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,r,i,n){return i+(t-e)*(n-i)/(r-e)},lerp:function(t,e,r){return(1-r)*t+r*e},smoothstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*(3-2*t)},smootherstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Ql.DEG2RAD},radToDeg:function(t){return t*Ql.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}};Object.defineProperties(l.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(l.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error(\"index is out of range: \"+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error(\"index is out of range: \"+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn(\"THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn(\"THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new l,e=new l;return function(r,i){return t.set(r,r),e.set(i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,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(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y;return e*e+r*r},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn(\"THREE.Vector2: offset has been removed from .fromBufferAttribute().\"),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var r=Math.cos(e),i=Math.sin(e),n=this.x-t.x,o=this.y-t.y;return this.x=n*r-o*i+t.x,this.y=n*i+o*r+t.y,this}});var Jl=0;p.DEFAULT_IMAGE=void 0,p.DEFAULT_MAPPING=300,Object.defineProperty(p.prototype,\"needsUpdate\",{set:function(t){!0===t&&this.version++}}),Object.assign(p.prototype,h.prototype,{constructor:p,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){if(void 0!==t.textures[this.uuid])return t.textures[this.uuid];var e={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],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ql.generateUUID()),void 0===t.images[r.uuid]&&(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;return void 0!==t.toDataURL?e=t:((e=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\")).width=t.width,e.height=t.height,e.getContext(\"2d\").drawImage(t,0,0,t.width,t.height)),e.width>2048||e.height>2048?e.toDataURL(\"image/jpeg\",.6):e.toDataURL(\"image/png\")}(r)}),e.image=r.uuid}return t.textures[this.uuid]=e,e},dispose:function(){this.dispatchEvent({type:\"dispose\"})},transformUv:function(t){if(300===this.mapping){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case el:t.x=t.x-Math.floor(t.x);break;case rl:t.x=t.x<0?0:1;break;case il:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case el:t.y=t.y-Math.floor(t.y);break;case rl:t.y=t.y<0?0:1;break;case il:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.assign(d.prototype,{isVector4:!0,set:function(t,e,r,i){return this.x=t,this.y=e,this.z=r,this.w=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error(\"index is out of range: \"+t)}return this},getComponent:function(t){switch(t){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: \"+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn(\"THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn(\"THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=this.w,o=t.elements;return this.x=o[0]*e+o[4]*r+o[8]*i+o[12]*n,this.y=o[1]*e+o[5]*r+o[9]*i+o[13]*n,this.z=o[2]*e+o[6]*r+o[10]*i+o[14]*n,this.w=o[3]*e+o[7]*r+o[11]*i+o[15]*n,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,r,i,n,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],h=o[5],l=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(l-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(l+d)<.1&&Math.abs(a+h+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,g=(h+1)/2,v=(f+1)/2,y=(s+u)/4,b=(c+p)/4,x=(l+d)/4;return m>g&&m>v?m<.01?(r=0,i=.707106781,n=.707106781):(i=y/(r=Math.sqrt(m)),n=b/r):g>v?g<.01?(r=.707106781,i=0,n=.707106781):(r=y/(i=Math.sqrt(g)),n=x/i):v<.01?(r=.707106781,i=.707106781,n=0):(r=b/(n=Math.sqrt(v)),i=x/n),this.set(r,i,n,e),this}var _=Math.sqrt((d-l)*(d-l)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(_)<.001&&(_=1),this.x=(d-l)/_,this.y=(c-p)/_,this.z=(u-s)/_,this.w=Math.acos((a+h+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(r,i){return void 0===t&&(t=new d,e=new d),t.set(r,r,r,r),e.set(i,i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn(\"THREE.Vector4: offset has been removed from .fromBufferAttribute().\"),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),Object.assign(f.prototype,h.prototype,{isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}}),Object.assign(m,{slerp:function(t,e,r,i){return r.copy(t).slerp(e,i)},slerpFlat:function(t,e,r,i,n,o,a){var s=r[i+0],c=r[i+1],u=r[i+2],h=r[i+3],l=n[o+0],p=n[o+1],d=n[o+2],f=n[o+3];if(h!==f||s!==l||c!==p||u!==d){var m=1-a,g=s*l+c*p+u*d+h*f,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var b=Math.sqrt(y),x=Math.atan2(b,g*v);m=Math.sin(m*x)/b,a=Math.sin(a*x)/b}var _=a*v;if(s=s*m+l*_,c=c*m+p*_,u=u*m+d*_,h=h*m+f*_,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+h*h);s*=w,c*=w,u*=w,h*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=h}}),Object.defineProperties(m.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(m.prototype,{set:function(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._w=i,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error(\"THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.\");var r=t._x,i=t._y,n=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(r/2),u=a(i/2),h=a(n/2),l=s(r/2),p=s(i/2),d=s(n/2);return\"XYZ\"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h-l*p*d):\"YXZ\"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h+l*p*d):\"ZXY\"===o?(this._x=l*u*h-c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h-l*p*d):\"ZYX\"===o?(this._x=l*u*h-c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h+l*p*d):\"YZX\"===o?(this._x=l*u*h+c*p*d,this._y=c*p*h+l*u*d,this._z=c*u*d-l*p*h,this._w=c*u*h-l*p*d):\"XZY\"===o&&(this._x=l*u*h-c*p*d,this._y=c*p*h-l*u*d,this._z=c*u*d+l*p*h,this._w=c*u*h+l*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var r=e/2,i=Math.sin(r);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(r),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,r=t.elements,i=r[0],n=r[4],o=r[8],a=r[1],s=r[5],c=r[9],u=r[2],h=r[6],l=r[10],p=i+s+l;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(h-c)*e,this._y=(o-u)*e,this._z=(a-n)*e):i>s&&i>l?(e=2*Math.sqrt(1+i-s-l),this._w=(h-c)/e,this._x=.25*e,this._y=(n+a)/e,this._z=(o+u)/e):s>l?(e=2*Math.sqrt(1+s-i-l),this._w=(o-u)/e,this._x=(n+a)/e,this._y=.25*e,this._z=(c+h)/e):(e=2*Math.sqrt(1+l-i-s),this._w=(a-n)/e,this._x=(o+u)/e,this._y=(c+h)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new g;return function(r,i){return void 0===e&&(e=new g),t=r.dot(i)+1,t<1e-6?(t=0,Math.abs(r.x)>Math.abs(r.z)?e.set(-r.y,r.x,0):e.set(0,-r.z,r.y)):e.crossVectors(r,i),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn(\"THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.\"),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var r=t._x,i=t._y,n=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=r*u+o*a+i*c-n*s,this._y=i*u+o*s+n*a-r*c,this._z=n*u+o*c+r*s-i*a,this._w=o*u-r*a-i*s-n*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var r=this._x,i=this._y,n=this._z,o=this._w,a=o*t._w+r*t._x+i*t._y+n*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=r,this._y=i,this._z=n,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(r+this._x),this._y=.5*(i+this._y),this._z=.5*(n+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,h=Math.sin(e*c)/s;return this._w=o*u+this._w*h,this._x=r*u+this._x*h,this._y=i*u+this._y*h,this._z=n*u+this._z*h,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(g.prototype,{isVector3:!0,set:function(t,e,r){return this.x=t,this.y=e,this.z=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error(\"index is out of range: \"+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error(\"index is out of range: \"+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn(\"THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.\"),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn(\"THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.\"),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn(\"THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.\"),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new m;return function(e){return e&&e.isEuler||console.error(\"THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.\"),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new m;return function(e,r){return this.applyQuaternion(t.setFromAxisAngle(e,r))}}(),applyMatrix3:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[3]*r+n[6]*i,this.y=n[1]*e+n[4]*r+n[7]*i,this.z=n[2]*e+n[5]*r+n[8]*i,this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements,o=1/(n[3]*e+n[7]*r+n[11]*i+n[15]);return this.x=(n[0]*e+n[4]*r+n[8]*i+n[12])*o,this.y=(n[1]*e+n[5]*r+n[9]*i+n[13])*o,this.z=(n[2]*e+n[6]*r+n[10]*i+n[14])*o,this},applyQuaternion:function(t){var e=this.x,r=this.y,i=this.z,n=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*i-a*r,u=s*r+a*e-n*i,h=s*i+n*r-o*e,l=-n*e-o*r-a*i;return this.x=c*s+l*-n+u*-a-h*-o,this.y=u*s+l*-o+h*-n-c*-a,this.z=h*s+l*-a+c*-o-u*-n,this},project:function(){var t=new v;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new v;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[4]*r+n[8]*i,this.y=n[1]*e+n[5]*r+n[9]*i,this.z=n[2]*e+n[6]*r+n[10]*i,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new g,e=new g;return function(r,i){return t.set(r,r,r),e.set(i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,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(t){return this.x*t.x+this.y*t.y+this.z*t.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)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t)},cross:function(t,e){if(void 0!==e)return console.warn(\"THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.\"),this.crossVectors(t,e);var r=this.x,i=this.y,n=this.z;return this.x=i*t.z-n*t.y,this.y=n*t.x-r*t.z,this.z=r*t.y-i*t.x,this},crossVectors:function(t,e){var r=t.x,i=t.y,n=t.z,o=e.x,a=e.y,s=e.z;return this.x=i*s-n*a,this.y=n*o-r*s,this.z=r*a-i*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new g;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new g;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ql.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return e*e+r*r+i*i},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=r,this.z=i,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,r){return void 0!==r&&console.warn(\"THREE.Vector3: offset has been removed from .fromBufferAttribute().\"),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(v.prototype,{isMatrix4:!0,set:function(t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=i,g[1]=n,g[5]=o,g[9]=a,g[13]=s,g[2]=c,g[6]=u,g[10]=h,g[14]=l,g[3]=p,g[7]=d,g[11]=f,g[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 v).fromArray(this.elements)},copy:function(t){var e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],this},copyPosition:function(t){var e=this.elements,r=t.elements;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this},extractBasis:function(t,e,r){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this},extractRotation:function(){var t=new g;return function(e){var r=this.elements,i=e.elements,n=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,2).length();return r[0]=i[0]*n,r[1]=i[1]*n,r[2]=i[2]*n,r[4]=i[4]*o,r[5]=i[5]*o,r[6]=i[6]*o,r[8]=i[8]*a,r[9]=i[9]*a,r[10]=i[10]*a,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error(\"THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.\");var e=this.elements,r=t.x,i=t.y,n=t.z,o=Math.cos(r),a=Math.sin(r),s=Math.cos(i),c=Math.sin(i),u=Math.cos(n),h=Math.sin(n);if(\"XYZ\"===t.order){var l=o*u,p=o*h,d=a*u,f=a*h;e[0]=s*u,e[4]=-s*h,e[8]=c,e[1]=p+d*c,e[5]=l-f*c,e[9]=-a*s,e[2]=f-l*c,e[6]=d+p*c,e[10]=o*s}else if(\"YXZ\"===t.order){var m=s*u,g=s*h,v=c*u,y=c*h;e[0]=m+y*a,e[4]=v*a-g,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=g*a-v,e[6]=y+m*a,e[10]=o*s}else if(\"ZXY\"===t.order){var m=s*u,g=s*h,v=c*u,y=c*h;e[0]=m-y*a,e[4]=-o*h,e[8]=v+g*a,e[1]=g+v*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if(\"ZYX\"===t.order){var l=o*u,p=o*h,d=a*u,f=a*h;e[0]=s*u,e[4]=d*c-p,e[8]=l*c+f,e[1]=s*h,e[5]=f*c+l,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if(\"YZX\"===t.order){var b=o*s,x=o*c,_=a*s,w=a*c;e[0]=s*u,e[4]=w-b*h,e[8]=_*h+x,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=x*h+_,e[10]=b-w*h}else if(\"XZY\"===t.order){var b=o*s,x=o*c,_=a*s,w=a*c;e[0]=s*u,e[4]=-h,e[8]=c*u,e[1]=b*h+w,e[5]=o*u,e[9]=x*h-_,e[2]=_*h-x,e[6]=a*u,e[10]=w*h+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,r=t._x,i=t._y,n=t._z,o=t._w,a=r+r,s=i+i,c=n+n,u=r*a,h=r*s,l=r*c,p=i*s,d=i*c,f=n*c,m=o*a,g=o*s,v=o*c;return e[0]=1-(p+f),e[4]=h-v,e[8]=l+g,e[1]=h+v,e[5]=1-(u+f),e[9]=d-m,e[2]=l-g,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t=new g,e=new g,r=new g;return function(i,n,o){var a=this.elements;return r.subVectors(i,n),0===r.lengthSq()&&(r.z=1),r.normalize(),t.crossVectors(o,r),0===t.lengthSq()&&(1===Math.abs(o.z)?r.x+=1e-4:r.z+=1e-4,r.normalize(),t.crossVectors(o,r)),t.normalize(),e.crossVectors(r,t),a[0]=t.x,a[4]=e.x,a[8]=r.x,a[1]=t.y,a[5]=e.y,a[9]=r.y,a[2]=t.z,a[6]=e.z,a[10]=r.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn(\"THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.\"),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var r=t.elements,i=e.elements,n=this.elements,o=r[0],a=r[4],s=r[8],c=r[12],u=r[1],h=r[5],l=r[9],p=r[13],d=r[2],f=r[6],m=r[10],g=r[14],v=r[3],y=r[7],b=r[11],x=r[15],_=i[0],w=i[4],S=i[8],A=i[12],M=i[1],E=i[5],T=i[9],P=i[13],C=i[2],I=i[6],R=i[10],L=i[14],O=i[3],D=i[7],N=i[11],k=i[15];return n[0]=o*_+a*M+s*C+c*O,n[4]=o*w+a*E+s*I+c*D,n[8]=o*S+a*T+s*R+c*N,n[12]=o*A+a*P+s*L+c*k,n[1]=u*_+h*M+l*C+p*O,n[5]=u*w+h*E+l*I+p*D,n[9]=u*S+h*T+l*R+p*N,n[13]=u*A+h*P+l*L+p*k,n[2]=d*_+f*M+m*C+g*O,n[6]=d*w+f*E+m*I+g*D,n[10]=d*S+f*T+m*R+g*N,n[14]=d*A+f*P+m*L+g*k,n[3]=v*_+y*M+b*C+x*O,n[7]=v*w+y*E+b*I+x*D,n[11]=v*S+y*T+b*R+x*N,n[15]=v*A+y*P+b*L+x*k,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new g;return function(e){for(var r=this,i=0,n=e.count;i>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,r){return this.r=t,this.g=e,this.b=r,this},setHSL:function(){function t(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+6*(e-t)*(2/3-r):t}return function(e,r,i){if(e=Ql.euclideanModulo(e,1),r=Ql.clamp(r,0,1),i=Ql.clamp(i,0,1),0===r)this.r=this.g=this.b=i;else{var n=i<=.5?i*(1+r):i+r-i*r,o=2*i-n;this.r=t(o,n,e+1/3),this.g=t(o,n,e),this.b=t(o,n,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn(\"THREE.Color: Alpha component of \"+t+\" will be ignored.\")}var r;if(r=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var i,n=r[1],o=r[2];switch(n){case\"rgb\":case\"rgba\":if(i=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case\"hsl\":case\"hsla\":if(i=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(i[1])/360,s=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(a,s,c)}}}else if(r=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u=(h=r[1]).length;if(3===u)return this.r=parseInt(h.charAt(0)+h.charAt(0),16)/255,this.g=parseInt(h.charAt(1)+h.charAt(1),16)/255,this.b=parseInt(h.charAt(2)+h.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(h.charAt(0)+h.charAt(1),16)/255,this.g=parseInt(h.charAt(2)+h.charAt(3),16)/255,this.b=parseInt(h.charAt(4)+h.charAt(5),16)/255,this}if(t&&t.length>0){var h=sp[t];void 0!==h?this.setHex(h):console.warn(\"THREE.Color: Unknown color \"+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var r=e>0?1/e:1;return this.r=Math.pow(t.r,r),this.g=Math.pow(t.g,r),this.b=Math.pow(t.b,r),this},convertGammaToLinear:function(){var t=this.r,e=this.g,r=this.b;return this.r=t*t,this.g=e*e,this.b=r*r,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),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(t){var e,r,i=t||{h:0,s:0,l:0},n=this.r,o=this.g,a=this.b,s=Math.max(n,o,a),c=Math.min(n,o,a),u=(c+s)/2;if(c===s)e=0,r=0;else{var h=s-c;switch(r=u<=.5?h/(s+c):h/(2-s-c),s){case n:e=(o-a)/h+(o 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat theta = acos( dot( N, V ) );\\n\\tvec2 uv = vec2(\\n\\t\\tsqrt( saturate( roughness ) ),\\n\\t\\tsaturate( theta / ( 0.5 * PI ) ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.86267 + (0.49788 + 0.01436 * y ) * y;\\n\\tfloat b = 3.45068 + (4.18814 + y) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\\n\\treturn result;\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n\",bumpmap_pars_fragment:\"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n\",clipping_planes_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\\n\\t\\tvec4 plane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t\\t\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\\n\\t\\t\\tvec4 plane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t\\n\\t#endif\\n#endif\\n\",clipping_planes_pars_fragment:\"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n\",clipping_planes_pars_vertex:\"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n\",clipping_planes_vertex:\"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n\",color_fragment:\"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\",color_pars_fragment:\"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n\",color_pars_vertex:\"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\",color_vertex:\"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif\",common:\"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transpose( const in mat3 v ) {\\n\\tmat3 tmp;\\n\\ttmp[0] = vec3(v[0].x, v[1].x, v[2].x);\\n\\ttmp[1] = vec3(v[0].y, v[1].y, v[2].y);\\n\\ttmp[2] = vec3(v[0].z, v[1].z, v[2].z);\\n\\treturn tmp;\\n}\\n\",cube_uv_reflection_fragment:\"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale = bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n\",defaultnormal_vertex:\"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n\",displacementmap_pars_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n\",displacementmap_vertex:\"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n\",emissivemap_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n\",emissivemap_pars_fragment:\"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n\",encodings_fragment:\" gl_FragColor = linearToOutputTexel( gl_FragColor );\\n\",encodings_pars_fragment:\"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D = max( maxRange / maxRGB, 1.0 );\\n\\tD = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value ) {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n\",envmap_fragment:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\tsampleUV.y = asin( flipNormal * reflectVec.y ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\tvec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n\",envmap_pars_fragment:\"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n\",envmap_pars_vertex:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n\",envmap_vertex:\"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n\",fog_vertex:\"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif\",fog_pars_vertex:\"#ifdef USE_FOG\\n varying float fogDepth;\\n#endif\\n\",fog_fragment:\"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n\",fog_pars_fragment:\"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n\",gradientmap_pars_fragment:\"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",lightmap_fragment:\"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n\",lightmap_pars_fragment:\"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\",lights_lambert_vertex:\"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",lights_pars:\"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltcMat;\\tuniform sampler2D ltcMag;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = saturate( reflectVec.y * 0.5 + 0.5 );\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n\",lights_phong_fragment:\"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n\",lights_phong_pars_fragment:\"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n\",lights_physical_fragment:\"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n\",lights_physical_pars_fragment:\"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tfloat norm = texture2D( ltcMag, uv ).a;\\n\\t\\tvec4 t = texture2D( ltcMat, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( 1, 0, t.y ),\\n\\t\\t\\tvec3( 0, t.z, 0 ),\\n\\t\\t\\tvec3( t.w, 0, t.x )\\n\\t\\t);\\n\\t\\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n\",lights_template:\"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\\n\\t#endif\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\\n\\t#ifndef STANDARD\\n\\t\\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\\n\\t#else\\n\\t\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n\\t#endif\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n\",logdepthbuf_fragment:\"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\\n\\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\\n#endif\",logdepthbuf_pars_fragment:\"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n\",logdepthbuf_pars_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif\",logdepthbuf_vertex:\"#ifdef USE_LOGDEPTHBUF\\n\\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\\n\\t#endif\\n#endif\\n\",map_fragment:\"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n\",map_pars_fragment:\"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n\",map_particle_fragment:\"#ifdef USE_MAP\\n\\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n\",map_particle_pars_fragment:\"#ifdef USE_MAP\\n\\tuniform vec4 offsetRepeat;\\n\\tuniform sampler2D map;\\n#endif\\n\",metalnessmap_fragment:\"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n\",metalnessmap_pars_fragment:\"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\",morphnormal_vertex:\"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n\",morphtarget_pars_vertex:\"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif\",morphtarget_vertex:\"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n\",normal_flip:\"#ifdef DOUBLE_SIDED\\n\\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n#else\\n\\tfloat flipNormal = 1.0;\\n#endif\\n\",normal_fragment:\"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal ) * flipNormal;\\n#endif\\n#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n\",normalmap_pars_fragment:\"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\\n\\t\\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n\",packing:\"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 1.0 - 2.0 * rgb.xyz;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n\",premultiplied_alpha_fragment:\"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n\",project_vertex:\"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n\",dithering_fragment:\"#if defined( DITHERING )\\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n\",dithering_pars_fragment:\"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n\",roughnessmap_fragment:\"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n\",roughnessmap_pars_fragment:\"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\",shadowmap_pars_fragment:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n\",shadowmap_pars_vertex:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n\",shadowmap_vertex:\"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n\",shadowmask_pars_fragment:\"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n\",skinbase_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\",skinning_pars_vertex:\"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n\",skinning_vertex:\"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n\",skinnormal_vertex:\"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n\",specularmap_fragment:\"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\",specularmap_pars_fragment:\"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\",tonemapping_fragment:\"#if defined( TONE_MAPPING )\\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n\",tonemapping_pars_fragment:\"#define saturate(a) clamp( a, 0.0, 1.0 )\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n\",uv_pars_fragment:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif\",uv_pars_vertex:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform vec4 offsetRepeat;\\n#endif\\n\",uv_vertex:\"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\\n#endif\",uv2_pars_fragment:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\",uv2_pars_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif\",uv2_vertex:\"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif\",worldpos_vertex:\"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n\",cube_frag:\"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\n#include \\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n\",cube_vert:\"varying vec3 vWorldPosition;\\n#include \\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n}\\n\",depth_frag:\"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n\",depth_vert:\"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include \\n\\t\\t#include \\n\\t\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",distanceRGBA_frag:\"uniform vec3 lightPos;\\nvarying vec4 vWorldPosition;\\n#include \\n#include \\n#include \\nvoid main () {\\n\\t#include \\n\\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\\n}\\n\",distanceRGBA_vert:\"varying vec4 vWorldPosition;\\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvWorldPosition = worldPosition;\\n}\\n\",equirect_frag:\"uniform sampler2D tEquirect;\\nuniform float tFlip;\\nvarying vec3 vWorldPosition;\\n#include \\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n\",equirect_vert:\"varying vec3 vWorldPosition;\\n#include \\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include \\n\\t#include \\n}\\n\",linedashed_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",linedashed_vert:\"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshbasic_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include \\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include \\n\\t#include \\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshbasic_vert:\"#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#ifdef USE_ENVMAP\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshlambert_frag:\"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include \\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include \\n\\t#include \\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshlambert_vert:\"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshphong_frag:\"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include \\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshphong_vert:\"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshphysical_frag:\"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",meshphysical_vert:\"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",normal_frag:\"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n\",normal_vert:\"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n\",points_frag:\"uniform vec3 diffuse;\\nuniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",points_vert:\"uniform float size;\\nuniform float scale;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\",shadow_frag:\"uniform float opacity;\\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nvoid main() {\\n\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) );\\n}\\n\",shadow_vert:\"#include \\nvoid main() {\\n\\t#include \\n\\t#include \\n\\t#include \\n\\t#include \\n}\\n\"},lp={basic:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.fog]),vertexShader:hp.meshbasic_vert,fragmentShader:hp.meshbasic_frag},lambert:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.fog,cp.lights,{emissive:{value:new tt(0)}}]),vertexShader:hp.meshlambert_vert,fragmentShader:hp.meshlambert_frag},phong:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.bumpmap,cp.normalmap,cp.displacementmap,cp.gradientmap,cp.fog,cp.lights,{emissive:{value:new tt(0)},specular:{value:new tt(1118481)},shininess:{value:30}}]),vertexShader:hp.meshphong_vert,fragmentShader:hp.meshphong_frag},standard:{uniforms:up.merge([cp.common,cp.aomap,cp.lightmap,cp.emissivemap,cp.bumpmap,cp.normalmap,cp.displacementmap,cp.roughnessmap,cp.metalnessmap,cp.fog,cp.lights,{emissive:{value:new tt(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:hp.meshphysical_vert,fragmentShader:hp.meshphysical_frag},points:{uniforms:up.merge([cp.points,cp.fog]),vertexShader:hp.points_vert,fragmentShader:hp.points_frag},dashed:{uniforms:up.merge([cp.common,cp.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hp.linedashed_vert,fragmentShader:hp.linedashed_frag},depth:{uniforms:up.merge([cp.common,cp.displacementmap]),vertexShader:hp.depth_vert,fragmentShader:hp.depth_frag},normal:{uniforms:up.merge([cp.common,cp.bumpmap,cp.normalmap,cp.displacementmap,{opacity:{value:1}}]),vertexShader:hp.normal_vert,fragmentShader:hp.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:hp.cube_vert,fragmentShader:hp.cube_frag},equirect:{uniforms:{tEquirect:{value:null},tFlip:{value:-1}},vertexShader:hp.equirect_vert,fragmentShader:hp.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new g}},vertexShader:hp.distanceRGBA_vert,fragmentShader:hp.distanceRGBA_frag}};lp.physical={uniforms:up.merge([lp.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:hp.meshphysical_vert,fragmentShader:hp.meshphysical_frag},Object.assign(et.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){var e=this;this.makeEmpty();for(var r=0,i=t.length;rthis.max.x||t.ythis.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return(e||new l).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)},clampPoint:function(t,e){return(e||new l).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new l;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}});var pp=0;Object.assign(nt.prototype,h.prototype,{isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){var e=this;if(void 0!==t)for(var r in t){var i=t[r];if(void 0!==i){var n=e[r];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):e[r]=\"overdraw\"===r?Number(i):i:console.warn(\"THREE.\"+e.type+\": '\"+r+\"' is not a property of this material.\")}else console.warn(\"THREE.Material: '\"+r+\"' parameter is undefined.\")}},toJSON:function(t){function e(t){var e=[];for(var r in t){var i=t[r];delete i.metadata,e.push(i)}return e}var r=void 0===t;r&&(t={textures:{},images:{}});var i={metadata:{version:4.5,type:\"Material\",generator:\"Material.toJSON\"}};if(i.uuid=this.uuid,i.type=this.type,\"\"!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearCoat&&(i.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(i.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,i.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==lh&&(i.blending=this.blending),this.shading!==ah&&(i.shading=this.shading),this.side!==rh&&(i.side=this.side),this.vertexColors!==sh&&(i.vertexColors=this.vertexColors),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),\"round\"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),\"round\"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),i.skinning=this.skinning,i.morphTargets=this.morphTargets,i.dithering=this.dithering,r){var n=e(t.textures),o=e(t.images);n.length>0&&(i.textures=n),o.length>0&&(i.images=o)}return i},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.shading=t.shading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,r=null;if(null!==e){var i=e.length;r=new Array(i);for(var n=0;n!==i;++n)r[n]=e[n].clone()}return this.clippingPlanes=r,this},dispose:function(){this.dispatchEvent({type:\"dispose\"})}}),ot.prototype=Object.create(nt.prototype),ot.prototype.constructor=ot,ot.prototype.isShaderMaterial=!0,ot.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=up.clone(t.uniforms),this.defines=t.defines,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},ot.prototype.toJSON=function(t){var e=nt.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},at.prototype=Object.create(nt.prototype),at.prototype.constructor=at,at.prototype.isMeshDepthMaterial=!0,at.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Object.assign(st.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,r=1/0,i=1/0,n=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;sn&&(n=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,r,i),this.max.set(n,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,r=1/0,i=1/0,n=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;sn&&(n=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,r,i),this.max.set(n,o,a),this},setFromPoints:function(t){var e=this;this.makeEmpty();for(var r=0,i=t.length;rthis.max.x||t.ythis.max.y||t.zthis.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return(e||new g).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)},intersectsSphere:function(){var t=new g;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,r;return t.normal.x>0?(e=t.normal.x*this.min.x,r=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,r=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,r+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,r+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,r+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,r+=t.normal.z*this.min.z),e<=t.constant&&r>=t.constant},clampPoint:function(t,e){return(e||new g).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new g;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new g;return function(e){var r=e||new ct;return this.getCenter(r.center),r.radius=.5*this.getSize(t).length(),r}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new g,new g,new g,new g,new g,new g,new g,new g];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(ct.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new st;return function(e,r){var i=this.center;void 0!==r?i.copy(r):t.setFromPoints(e).getCenter(i);for(var n=0,o=0,a=e.length;othis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i},getBoundingBox:function(t){var e=t||new st;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(ut.prototype,{isMatrix3:!0,set:function(t,e,r,i,n,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=n,u[5]=s,u[6]=r,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new g;return function(e){for(var r=this,i=0,n=e.count;i1))return i.copy(n).multiplyScalar(a).add(e.start)}else if(0===this.distanceToPoint(e.start))return i.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),r=this.distanceToPoint(t.end);return e<0&&r>0||r<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return(t||new g).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new g,e=new ut;return function(r,i){var n=this.coplanarPoint(t).applyMatrix4(r),o=i||e.getNormalMatrix(r),a=this.normal.applyMatrix3(o).normalize();return this.constant=-n.dot(a),this}}(),translate:function(t){return this.constant=this.constant-t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(lt.prototype,{set:function(t,e,r,i,n,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(r),a[3].copy(i),a[4].copy(n),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,r=0;r<6;r++)e[r].copy(t.planes[r]);return this},setFromMatrix:function(t){var e=this.planes,r=t.elements,i=r[0],n=r[1],o=r[2],a=r[3],s=r[4],c=r[5],u=r[6],h=r[7],l=r[8],p=r[9],d=r[10],f=r[11],m=r[12],g=r[13],v=r[14],y=r[15];return e[0].setComponents(a-i,h-s,f-l,y-m).normalize(),e[1].setComponents(a+i,h+s,f+l,y+m).normalize(),e[2].setComponents(a+n,h+c,f+p,y+g).normalize(),e[3].setComponents(a-n,h-c,f-p,y-g).normalize(),e[4].setComponents(a-o,h-u,f-d,y-v).normalize(),e[5].setComponents(a+o,h+u,f+d,y+v).normalize(),this},intersectsObject:function(){var t=new ct;return function(e){var r=e.geometry;return null===r.boundingSphere&&r.computeBoundingSphere(),t.copy(r.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new ct;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,r=t.center,i=-t.radius,n=0;n<6;n++)if(e[n].distanceToPoint(r)0?r.min.x:r.max.x,e.x=o.normal.x>0?r.max.x:r.min.x,t.y=o.normal.y>0?r.min.y:r.max.y,e.y=o.normal.y>0?r.max.y:r.min.y,t.z=o.normal.z>0?r.min.z:r.max.z,e.z=o.normal.z>0?r.max.z:r.min.z;var a=o.distanceToPoint(t),s=o.distanceToPoint(e);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,r=0;r<6;r++)if(e[r].distanceToPoint(t)<0)return!1;return!0}}),ft.RotationOrders=[\"XYZ\",\"YZX\",\"ZXY\",\"XZY\",\"YXZ\",\"ZYX\"],ft.DefaultOrder=\"XYZ\",Object.defineProperties(ft.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(ft.prototype,{isEuler:!0,set:function(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._order=i||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,r){var i=Ql.clamp,n=t.elements,o=n[0],a=n[4],s=n[8],c=n[1],u=n[5],h=n[9],l=n[2],p=n[6],d=n[10];return e=e||this._order,\"XYZ\"===e?(this._y=Math.asin(i(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):\"YXZ\"===e?(this._x=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-l,o),this._z=0)):\"ZXY\"===e?(this._x=Math.asin(i(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-l,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):\"ZYX\"===e?(this._y=Math.asin(-i(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):\"YZX\"===e?(this._z=Math.asin(i(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-l,o)):(this._x=0,this._y=Math.atan2(s,d))):\"XZY\"===e?(this._z=Math.asin(-i(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-h,d),this._y=0)):console.warn(\"THREE.Euler: .setFromRotationMatrix() given unsupported order: \"+e),this._order=e,!1!==r&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new v;return function(e,r,i){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,r,i)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new m;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new g(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(mt.prototype,{set:function(t){this.mask=1<1){for(var i=0;i1){for(var i=0;i0){a.children=[];for(c=0;c0&&(o.geometries=h),l.length>0&&(o.materials=l),p.length>0&&(o.textures=p),d.length>0&&(o.images=d)}return o.object=a,o},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){var r=this;if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var i=0;i0)for(f=0;f0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,r,i=this;for(this.computeFaceNormals(),t=0,e=this.faces.length;t0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,r,i,n,o=this;for(r=0,i=this.faces.length;r0&&(e+=r[i].distanceTo(r[i-1])),t.lineDistances[i]=e},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new st),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ct),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,r){if(!t||!t.isGeometry)return void console.error(\"THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.\",t);var i,n=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],h=t.faceVertexUvs[0],l=this.colors,p=t.colors;void 0===r&&(r=0),void 0!==e&&(i=(new ut).getNormalMatrix(e));for(var d=0,f=a.length;d=0;r--){var m=d[r];for(c.faces.splice(m,1),a=0,s=this.faceVertexUvs.length;a0,_=y.vertexNormals.length>0,w=1!==y.color.r||1!==y.color.g||1!==y.color.b,S=y.vertexColors.length>0,A=0;if(A=t(A,0,0),A=t(A,1,!0),A=t(A,2,!1),A=t(A,3,b),A=t(A,4,x),A=t(A,5,_),A=t(A,6,w),A=t(A,7,S),l.push(A),l.push(y.a,y.b,y.c),l.push(y.materialIndex),b){var M=n.faceVertexUvs[0][u];l.push(i(M[0]),i(M[1]),i(M[2]))}if(x&&l.push(e(y.normal)),_){var E=y.vertexNormals;l.push(e(E[0]),e(E[1]),e(E[2]))}if(w&&l.push(r(y.color)),S){var T=y.vertexColors;l.push(r(T[0]),r(T[1]),r(T[2]))}}return o.data={},o.data.vertices=c,o.data.normals=p,f.length>0&&(o.data.colors=f),g.length>0&&(o.data.uvs=[g]),o.data.faces=l,o},clone:function(){return(new wt).copy(this)},copy:function(t){var e,r,i,n,o,a,s=this;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=t.name;var c=t.vertices;for(e=0,r=c.length;e0,s=o[1]&&o[1].length>0,c=t.morphTargets,u=c.length;if(u>0){e=[];for(y=0;y0){h=[];for(y=0;y65535?Mt:At)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?\"index\"===t?(console.warn(\"THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.\"),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn(\"THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).\"),void this.addAttribute(t,new St(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,r){this.groups.push({start:t,count:e,materialIndex:void 0!==r?r:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var r=this.attributes.normal;return void 0!==r&&((new ut).getNormalMatrix(t).applyToBufferAttribute(r),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new v;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new v;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new v;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new v;return function(e,r,i){return t.makeTranslation(e,r,i),this.applyMatrix(t),this}}(),scale:function(){var t=new v;return function(e,r,i){return t.makeScale(e,r,i),this.applyMatrix(t),this}}(),lookAt:function(){var t=new gt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var r=new Et(3*e.vertices.length,3),i=new Et(3*e.colors.length,3);if(this.addAttribute(\"position\",r.copyVector3sArray(e.vertices)),this.addAttribute(\"color\",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var n=new Et(e.lineDistances.length,1);this.addAttribute(\"lineDistance\",n.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var r=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(r=void 0,e.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(e);r.verticesNeedUpdate=e.verticesNeedUpdate,r.normalsNeedUpdate=e.normalsNeedUpdate,r.colorsNeedUpdate=e.colorsNeedUpdate,r.uvsNeedUpdate=e.uvsNeedUpdate,r.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=r}var i;return!0===e.verticesNeedUpdate&&(void 0!==(i=this.attributes.position)&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),!0===e.normalsNeedUpdate&&(void 0!==(i=this.attributes.normal)&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),!0===e.colorsNeedUpdate&&(void 0!==(i=this.attributes.color)&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(void 0!==(i=this.attributes.uv)&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(void 0!==(i=this.attributes.lineDistance)&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Tt).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=this,r=new Float32Array(3*t.vertices.length);if(this.addAttribute(\"position\",new St(r,3).copyVector3sArray(t.vertices)),t.normals.length>0){var i=new Float32Array(3*t.normals.length);this.addAttribute(\"normal\",new St(i,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var n=new Float32Array(3*t.colors.length);this.addAttribute(\"color\",new St(n,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var o=new Float32Array(2*t.uvs.length);this.addAttribute(\"uv\",new St(o,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var a=new Float32Array(2*t.uvs2.length);this.addAttribute(\"uv2\",new St(a,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var s=new(Pt(t.indices)>65535?Uint32Array:Uint16Array)(3*t.indices.length);this.setIndex(new St(s,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var c in t.morphTargets){for(var u=[],h=t.morphTargets[c],l=0,p=h.length;l0){var m=new Et(4*t.skinIndices.length,4);this.addAttribute(\"skinIndex\",m.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var g=new Et(4*t.skinWeights.length,4);this.addAttribute(\"skinWeight\",g.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new st);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new st,e=new g;return function(){null===this.boundingSphere&&(this.boundingSphere=new ct);var r=this.attributes.position;if(r){var i=this.boundingSphere.center;t.setFromBufferAttribute(r),t.getCenter(i);for(var n=0,o=0,a=r.count;o0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Ct).copy(this)},copy:function(t){var e,r,i,n=this;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var o=t.index;null!==o&&this.setIndex(o.clone());var a=t.attributes;for(e in a){var s=a[e];n.addAttribute(e,s.clone())}var c=t.morphAttributes;for(e in c){var u=[],h=c[e];for(r=0,i=h.length;r0)if(s=p*f-d,c=p*d-f,h=l*g,s>=0)if(c>=-h)if(c<=h){var v=1/g;u=(s*=v)*(s+p*(c*=v)+2*d)+c*(p*s+c+2*f)+m}else c=l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;else c=-l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;else c<=-h?u=-(s=Math.max(0,-(-p*l+d)))*s+(c=s>0?-l:Math.min(Math.max(-l,-f),l))*(c+2*f)+m:c<=h?(s=0,u=(c=Math.min(Math.max(-l,-f),l))*(c+2*f)+m):u=-(s=Math.max(0,-(p*l+d)))*s+(c=s>0?l:Math.min(Math.max(-l,-f),l))*(c+2*f)+m;else c=p>0?-l:l,u=-(s=Math.max(0,-(p*c+d)))*s+c*(c+2*f)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(c).add(t),u}}(),intersectSphere:function(){var t=new g;return function(e,r){t.subVectors(e.center,this.origin);var i=t.dot(this.direction),n=t.dot(t)-i*i,o=e.radius*e.radius;if(n>o)return null;var a=Math.sqrt(o-n),s=i-a,c=i+a;return s<0&&c<0?null:s<0?this.at(c,r):this.at(s,r)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var r=-(this.origin.dot(t.normal)+t.constant)/e;return r>=0?r:null},intersectPlane:function(t,e){var r=this.distanceToPlane(t);return null===r?null:this.at(r,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var r,i,n,o,a,s,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,l=this.origin;return c>=0?(r=(t.min.x-l.x)*c,i=(t.max.x-l.x)*c):(r=(t.max.x-l.x)*c,i=(t.min.x-l.x)*c),u>=0?(n=(t.min.y-l.y)*u,o=(t.max.y-l.y)*u):(n=(t.max.y-l.y)*u,o=(t.min.y-l.y)*u),r>o||n>i?null:((n>r||r!==r)&&(r=n),(o=0?(a=(t.min.z-l.z)*h,s=(t.max.z-l.z)*h):(a=(t.max.z-l.z)*h,s=(t.min.z-l.z)*h),r>s||a>i?null:((a>r||r!==r)&&(r=a),(s=0?r:i,e)))},intersectsBox:function(){var t=new g;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new g,e=new g,r=new g,i=new g;return function(n,o,a,s,c){e.subVectors(o,n),r.subVectors(a,n),i.crossVectors(e,r);var u,h=this.direction.dot(i);if(h>0){if(s)return null;u=1}else{if(!(h<0))return null;u=-1,h=-h}t.subVectors(this.origin,n);var l=u*this.direction.dot(r.crossVectors(t,r));if(l<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(l+p>h)return null;var d=-u*t.dot(i);return d<0?null:this.at(d/h,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(kt.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return(t||new g).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return(t||new g).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var r=e||new g;return this.delta(r).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new g,e=new g;return function(r,i){t.subVectors(r,this.start),e.subVectors(this.end,this.start);var n=e.dot(e),o=e.dot(t)/n;return i&&(o=Ql.clamp(o,0,1)),o}}(),closestPointToPoint:function(t,e,r){var i=this.closestPointToPointParameter(t,e),n=r||new g;return this.delta(n).multiplyScalar(i).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(Ft,{normal:function(){var t=new g;return function(e,r,i,n){var o=n||new g;o.subVectors(i,r),t.subVectors(e,r),o.cross(t);var a=o.lengthSq();return a>0?o.multiplyScalar(1/Math.sqrt(a)):o.set(0,0,0)}}(),barycoordFromPoint:function(){var t=new g,e=new g,r=new g;return function(i,n,o,a,s){t.subVectors(a,n),e.subVectors(o,n),r.subVectors(i,n);var c=t.dot(t),u=t.dot(e),h=t.dot(r),l=e.dot(e),p=e.dot(r),d=c*l-u*u,f=s||new g;if(0===d)return f.set(-2,-1,-1);var m=1/d,v=(l*h-u*p)*m,y=(c*p-u*h)*m;return f.set(1-v-y,y,v)}}(),containsPoint:function(){var t=new g;return function(e,r,i,n){var o=Ft.barycoordFromPoint(e,r,i,n,t);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}()}),Object.assign(Ft.prototype,{set:function(t,e,r){return this.a.copy(t),this.b.copy(e),this.c.copy(r),this},setFromPointsAndIndices:function(t,e,r,i){return this.a.copy(t[e]),this.b.copy(t[r]),this.c.copy(t[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new g,e=new g;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){return(t||new g).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return Ft.normal(this.a,this.b,this.c,t)},plane:function(t){return(t||new ht).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return Ft.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ft.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t=new ht,e=[new kt,new kt,new kt],r=new g,i=new g;return function(n,o){var a=o||new g,s=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(n,r),!0===this.containsPoint(r))a.copy(r);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var c=0;c0){var s=o[a[0]];if(void 0!==s)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=c.length;te.far?null:{distance:c,point:x.clone(),object:t}}function r(r,i,n,o,u,h,l,p){a.fromBufferAttribute(o,h),s.fromBufferAttribute(o,l),c.fromBufferAttribute(o,p);var g=e(r,i,n,a,s,c,b);return g&&(u&&(d.fromBufferAttribute(u,h),f.fromBufferAttribute(u,l),m.fromBufferAttribute(u,p),g.uv=t(b,a,s,c,d,f,m)),g.face=new xt(h,l,p,Ft.normal(a,s,c)),g.faceIndex=h),g}var i=new v,n=new Nt,o=new ct,a=new g,s=new g,c=new g,u=new g,h=new g,p=new g,d=new l,f=new l,m=new l,y=new g,b=new g,x=new g;return function(l,g){var v=this,y=this.geometry,x=this.material,_=this.matrixWorld;if(void 0!==x&&(null===y.boundingSphere&&y.computeBoundingSphere(),o.copy(y.boundingSphere),o.applyMatrix4(_),!1!==l.ray.intersectsSphere(o)&&(i.getInverse(_),n.copy(l.ray).applyMatrix4(i),null===y.boundingBox||!1!==n.intersectsBox(y.boundingBox)))){var w;if(y.isBufferGeometry){var S,A,M,E,T,P=y.index,C=y.attributes.position,I=y.attributes.uv;if(null!==P)for(E=0,T=P.count;E0&&(D=B);for(var z=0,U=F.length;zo)){var a=i.ray.origin.distanceTo(t);ai.far||n.push({distance:a,point:t.clone(),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),Me.prototype=Object.assign(Object.create(gt.prototype),{constructor:Me,copy:function(t){var e=this;gt.prototype.copy.call(this,t,!1);for(var r=t.levels,i=0,n=r.length;i1){t.setFromMatrixPosition(r.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var n=t.distanceTo(e);i[0].object.visible=!0;for(var o=1,a=i.length;o=i[o].distance;o++)i[o-1].object.visible=!1,i[o].object.visible=!0;for(;os||(d.applyMatrix4(o.matrixWorld),(E=i.ray.origin.distanceTo(d))i.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o}))}else for(var b=0,x=v.length/3-1;bs||(d.applyMatrix4(o.matrixWorld),(E=i.ray.origin.distanceTo(d))i.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o}))}else if(c.isGeometry)for(var S=c.vertices,A=S.length,b=0;bs)){d.applyMatrix4(o.matrixWorld);var E=i.ray.origin.distanceTo(d);Ei.far||n.push({distance:E,point:p.clone().applyMatrix4(o.matrixWorld),index:b,face:null,faceIndex:null,object:o})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Re.prototype=Object.assign(Object.create(Ie.prototype),{constructor:Re,isLineSegments:!0}),Le.prototype=Object.assign(Object.create(Ie.prototype),{constructor:Le,isLineLoop:!0}),Oe.prototype=Object.create(nt.prototype),Oe.prototype.constructor=Oe,Oe.prototype.isPointsMaterial=!0,Oe.prototype.copy=function(t){return nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},De.prototype=Object.assign(Object.create(gt.prototype),{constructor:De,isPoints:!0,raycast:function(){var t=new v,e=new Nt,r=new ct;return function(i,n){function o(t,r){var o=e.distanceSqToPoint(t);if(oi.far)return;n.push({distance:u,distanceToRay:Math.sqrt(o),point:s.clone(),index:r,face:null,object:a})}}var a=this,s=this.geometry,c=this.matrixWorld,u=i.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),r.copy(s.boundingSphere),r.applyMatrix4(c),r.radius+=u,!1!==i.ray.intersectsSphere(r)){t.getInverse(c),e.copy(i.ray).applyMatrix4(t);var h=u/((this.scale.x+this.scale.y+this.scale.z)/3),l=h*h,p=new g;if(s.isBufferGeometry){var d=s.index,f=s.attributes.position.array;if(null!==d)for(var m=d.array,v=0,y=m.length;v=-Number.EPSILON&&P>=-Number.EPSILON&&T>=-Number.EPSILON))return!1;return!0}return function(e,r){var i=e.length;if(i<3)return null;var n,o,a,s=[],c=[],u=[];if(gp.area(e)>0)for(o=0;o2;){if(l--<=0)return console.warn(\"THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()\"),r?u:s;if(n=o,h<=n&&(n=0),o=n+1,h<=o&&(o=0),a=o+1,h<=a&&(a=0),t(e,n,o,a,h,c)){var p,d,f,m,g;for(p=c[n],d=c[o],f=c[a],s.push([e[p],e[d],e[f]]),u.push([c[n],c[o],c[a]]),m=o,g=o+1;g2&&t[e-1].equals(t[0])&&t.pop()}function i(t,e,r){return t.x!==e.x?t.xNumber.EPSILON){var f;if(p>0){if(d<0||d>p)return[];if((f=u*h-c*l)<0||f>p)return[]}else{if(d>0||d0||fM?[]:x===M?o?[]:[y]:_<=M?[y,b]:[y,S]}function o(t,e,r,i){var n=e.x-t.x,o=e.y-t.y,a=r.x-t.x,s=r.y-t.y,c=i.x-t.x,u=i.y-t.y,h=n*s-o*a,l=n*u-o*c;if(Math.abs(h)>Number.EPSILON){var p=c*s-u*a;return h>0?l>=0&&p>=0:l>=0||p>=0}return l>0}r(t),e.forEach(r);for(var a,s,c,u,h,l,p={},d=t.concat(),f=0,m=e.length;f0;){if(--_<0){console.log(\"Infinite Loop! Holes left:\"+g.length+\", Probably Hole outside Shape!\");break}for(a=x;ai&&(a=0);var s=o(m[t],m[n],m[a],r[e]);if(!s)return!1;var c=r.length-1,u=e-1;u<0&&(u=c);var h=e+1;return h>c&&(h=0),!!(s=o(r[e],r[u],r[h],m[t]))}(a,w)&&!function(t,e){var r,i;for(r=0;r0)return!0;return!1}(s,c)&&!function(t,r){var i,o,a,s;for(i=0;i0)return!0;return!1}(s,c)){i=w,g.splice(y,1),l=m.slice(0,a+1),p=m.slice(a),d=r.slice(i),f=r.slice(0,i+1),m=l.concat(d).concat(f).concat(p),x=a;break}if(i>=0)break;v[h]=!0}if(i>=0)break}}return m}(t,e),v=gp.triangulate(g,!1);for(a=0,s=v.length;aNumber.EPSILON){var d=Math.sqrt(h),f=Math.sqrt(c*c+u*u),m=e.x-s/d,g=e.y+a/d,v=((r.x-u/f-m)*u-(r.y+c/f-g)*c)/(a*u-s*c),y=(i=m+a*v-t.x)*i+(n=g+s*v-t.y)*n;if(y<=2)return new l(i,n);o=Math.sqrt(y/2)}else{var b=!1;a>Number.EPSILON?c>Number.EPSILON&&(b=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(u)&&(b=!0),b?(i=-s,n=a,o=Math.sqrt(h)):(i=a,n=s,o=Math.sqrt(h/2))}return new l(i/o,n/o)}function n(t,e){var r,i;for(Z=t.length;--Z>=0;){r=Z,(i=Z-1)<0&&(i=t.length-1);var n=0,o=P+2*M;for(n=0;n=0;j--){for(V=j/M,$=S*Math.cos(V*Math.PI/2),G=A*Math.sin(V*Math.PI/2),Z=0,K=U.length;Z0||0===t.search(/^data\\:image\\/jpeg/);o.format=r?Sl:Al,o.needsUpdate=!0,void 0!==e&&e(o)},r,i),o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Br.prototype=Object.assign(Object.create(gt.prototype),{constructor:Br,isLight:!0,copy:function(t){return gt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=gt.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),zr.prototype=Object.assign(Object.create(Br.prototype),{constructor:zr,isHemisphereLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Ur.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),jr.prototype=Object.assign(Object.create(Ur.prototype),{constructor:jr,isSpotLightShadow:!0,update:function(t){var e=this.camera,r=2*Ql.RAD2DEG*t.angle,i=this.mapSize.width/this.mapSize.height,n=t.distance||e.far;r===e.fov&&i===e.aspect&&n===e.far||(e.fov=r,e.aspect=i,e.far=n,e.updateProjectionMatrix())}}),Gr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Gr,isSpotLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Vr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Vr,isPointLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),$r.prototype=Object.assign(Object.create(Ur.prototype),{constructor:$r}),Hr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Hr,isDirectionalLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Wr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Wr,isAmbientLight:!0}),Xr.prototype=Object.assign(Object.create(Br.prototype),{constructor:Xr,isRectAreaLight:!0,copy:function(t){return Br.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=Br.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}});var _p={arraySlice:function(t,e,r){return _p.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==r?r:t.length)):t.slice(e,r)},convertArray:function(t,e,r){return!t||!r&&t.constructor===e?t:\"number\"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(e,r){return t[e]-t[r]}for(var r=t.length,i=new Array(r),n=0;n!==r;++n)i[n]=n;return i.sort(e),i},sortedArray:function(t,e,r){for(var i=t.length,n=new t.constructor(i),o=0,a=0;a!==i;++o)for(var s=r[o]*e,c=0;c!==e;++c)n[a++]=t[s+c];return n},flattenJSON:function(t,e,r,i){for(var n=1,o=t[0];void 0!==o&&void 0===o[i];)o=t[n++];if(void 0!==o){var a=o[i];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[i])&&(e.push(o.time),r.push.apply(r,a)),o=t[n++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[i])&&(e.push(o.time),a.toArray(r,r.length)),o=t[n++]}while(void 0!==o);else do{void 0!==(a=o[i])&&(e.push(o.time),r.push(a)),o=t[n++]}while(void 0!==o)}}};Object.assign(qr.prototype,{evaluate:function(t){var e=this,r=this.parameterPositions,i=this._cachedIndex,n=r[i],o=r[i-1];t:{e:{var a;r:{i:if(!(t=o)break t;var s=r[1];t=o)break e}a=i,i=0}}for(;i>>1;te;)--o;if(++o,0!==n||o!==i){n>=o&&(n=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=_p.arraySlice(r,n,o),this.values=_p.arraySlice(this.values,n*a,o*a)}return this},validate:function(){var t=this,e=!0,r=this.getValueSize();r-Math.floor(r)!=0&&(console.error(\"THREE.KeyframeTrackPrototype: Invalid value size in track.\",this),e=!1);var i=this.times,n=this.values,o=i.length;0===o&&(console.error(\"THREE.KeyframeTrackPrototype: Track is empty.\",this),e=!1);for(var a=null,s=0;s!==o;s++){var c=i[s];if(\"number\"==typeof c&&isNaN(c)){console.error(\"THREE.KeyframeTrackPrototype: Time is not a valid number.\",t,s,c),e=!1;break}if(null!==a&&a>c){console.error(\"THREE.KeyframeTrackPrototype: Out of order keys.\",t,s,c,a),e=!1;break}a=c}if(void 0!==n&&_p.isTypedArray(n))for(var s=0,u=n.length;s!==u;++s){var h=n[s];if(isNaN(h)){console.error(\"THREE.KeyframeTrackPrototype: Value is not a valid number.\",t,s,h),e=!1;break}}return e},optimize:function(){for(var t=this.times,e=this.values,r=this.getValueSize(),i=2302===this.getInterpolation(),n=1,o=t.length-1,a=1;a0){t[n]=t[o];for(var f=o*r,m=n*r,p=0;p!==r;++p)e[m+p]=e[f+p];++n}return n!==t.length&&(this.times=_p.arraySlice(t,0,n),this.values=_p.arraySlice(e,0,n*r)),this}},Jr.prototype=Object.assign(Object.create(wp),{constructor:Jr,ValueTypeName:\"vector\"}),ti.prototype=Object.assign(Object.create(qr.prototype),{constructor:ti,interpolate_:function(t,e,r,i){for(var n=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(r-e)/(i-e),u=s+a;s!==u;s+=4)m.slerpFlat(n,0,o,s-a,o,s,c);return n}}),ei.prototype=Object.assign(Object.create(wp),{constructor:ei,ValueTypeName:\"quaternion\",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new ti(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),ri.prototype=Object.assign(Object.create(wp),{constructor:ri,ValueTypeName:\"number\"}),ii.prototype=Object.assign(Object.create(wp),{constructor:ii,ValueTypeName:\"string\",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ni.prototype=Object.assign(Object.create(wp),{constructor:ni,ValueTypeName:\"bool\",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),oi.prototype=Object.assign(Object.create(wp),{constructor:oi,ValueTypeName:\"color\"}),ai.prototype=wp,wp.constructor=ai,Object.assign(ai,{parse:function(t){if(void 0===t.type)throw new Error(\"track type undefined, can not parse\");var e=ai._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var r=[],i=[];_p.flattenJSON(t.keys,r,i,\"value\"),t.times=r,t.values=i}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,r=t.constructor;if(void 0!==r.toJSON)e=r.toJSON(t);else{e={name:t.name,times:_p.convertArray(t.times,Array),values:_p.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case\"scalar\":case\"double\":case\"float\":case\"number\":case\"integer\":return ri;case\"vector\":case\"vector2\":case\"vector3\":case\"vector4\":return Jr;case\"color\":return oi;case\"quaternion\":return ei;case\"bool\":case\"boolean\":return ni;case\"string\":return ii}throw new Error(\"Unsupported typeName: \"+t)}}),Object.assign(si,{parse:function(t){for(var e=[],r=t.tracks,i=1/(t.fps||1),n=0,o=r.length;n!==o;++n)e.push(ai.parse(r[n]).scale(i));return new si(t.name,t.duration,e)},toJSON:function(t){for(var e=[],r=t.tracks,i={name:t.name,duration:t.duration,tracks:e},n=0,o=r.length;n!==o;++n)e.push(ai.toJSON(r[n]));return i},CreateFromMorphTargetSequence:function(t,e,r,i){for(var n=e.length,o=[],a=0;a1){var c=i[h=s[1]];c||(i[h]=c=[]),c.push(a)}}var u=[];for(var h in i)u.push(si.CreateFromMorphTargetSequence(h,i[h],e,r));return u},parseAnimation:function(t,e){if(!t)return console.error(\"THREE.AnimationClip: No animation in JSONLoader data.\"),null;for(var r=function(t,e,r,i,n){if(0!==r.length){var o=[],a=[];_p.flattenJSON(r,o,a,i),0!==o.length&&n.push(new t(e,o,a))}},i=[],n=t.name||\"default\",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c1?t.skinWeights[i+1]:0,s=r>2?t.skinWeights[i+2]:0,c=r>3?t.skinWeights[i+3]:0;e.skinWeights.push(new d(o,a,s,c))}if(t.skinIndices)for(var i=0,n=t.skinIndices.length;i1?t.skinIndices[i+1]:0,l=r>2?t.skinIndices[i+2]:0,p=r>3?t.skinIndices[i+3]:0;e.skinIndices.push(new d(u,h,l,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn(\"When skinning, number of vertices (\"+e.vertices.length+\"), skinIndices (\"+e.skinIndices.length+\"), and skinWeights (\"+e.skinWeights.length+\") should match.\")}function r(t,e){var r=t.scale;if(void 0!==t.morphTargets)for(var i=0,n=t.morphTargets.length;i0){console.warn('THREE.JSONLoader: \"morphColors\" no longer supported. Using them as face colors.');for(var h=e.faces,l=t.morphColors[0].colors,i=0,n=h.length;i0&&(e.animations=r)}return function(n,o){void 0!==n.data&&(n=n.data),void 0!==n.scale?n.scale=1/n.scale:n.scale=1;var a=new wt;return t(n,a),e(n,a),r(n,a),i(n,a),a.computeFaceNormals(),a.computeBoundingSphere(),void 0===n.materials||0===n.materials.length?{geometry:a}:{geometry:a,materials:hi.prototype.initMaterials(n.materials,o,this.crossOrigin)}}}()}),Object.assign(pi.prototype,{load:function(t,e,r,i){\"\"===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf(\"/\")+1));var n=this;new Lr(n.manager).load(t,function(r){var o=null;try{o=JSON.parse(r)}catch(e){return void 0!==i&&i(e),void console.error(\"THREE:ObjectLoader: Can't parse \"+t+\".\",e.message)}var a=o.metadata;if(void 0===a||void 0===a.type||\"geometry\"===a.type.toLowerCase())return void console.error(\"THREE.ObjectLoader: Can't load \"+t+\". Use THREE.JSONLoader instead.\");n.parse(o,e)},r,i)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var r=this.parseGeometries(t.geometries),i=this.parseImages(t.images,function(){void 0!==e&&e(a)}),n=this.parseTextures(t.textures,i),o=this.parseMaterials(t.materials,n),a=this.parseObject(t.object,r,o);return t.animations&&(a.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(a),a},parseGeometries:function(t){var e=this,r={};if(void 0!==t)for(var i=new li,n=new ui,o=0,a=t.length;o0){var n=new Nr(new Rr(e));n.setCrossOrigin(this.crossOrigin);for(var o=0,a=t.length;o0?new Pe(c,u):new Bt(c,u);break;case\"LOD\":a=new Me;break;case\"Line\":a=new Ie(n(e.geometry),o(e.material),e.mode);break;case\"LineLoop\":a=new Le(n(e.geometry),o(e.material));break;case\"LineSegments\":a=new Re(n(e.geometry),o(e.material));break;case\"PointCloud\":case\"Points\":a=new De(n(e.geometry),o(e.material));break;case\"Sprite\":a=new Ae(o(e.material));break;case\"Group\":a=new Ne;break;default:a=new gt}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.children)for(var h in e.children)a.add(s.parseObject(e.children[h],r,i));if(\"LOD\"===e.type)for(var l=e.levels,p=0;p0)){c=n;break}c=n-1}if(n=c,i[n]===r)return n/(o-1);var u=i[n];return(n+(r-u)/(i[n+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,r=t+1e-4;e<0&&(e=0),r>1&&(r=1);var i=this.getPoint(e);return this.getPoint(r).clone().sub(i).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var r,i,n,o=this,a=new g,s=[],c=[],u=[],h=new g,l=new v;for(r=0;r<=t;r++)i=r/t,s[r]=o.getTangentAt(i),s[r].normalize();c[0]=new g,u[0]=new g;var p=Number.MAX_VALUE,d=Math.abs(s[0].x),f=Math.abs(s[0].y),m=Math.abs(s[0].z);for(d<=p&&(p=d,a.set(1,0,0)),f<=p&&(p=f,a.set(0,1,0)),m<=p&&a.set(0,0,1),h.crossVectors(s[0],a).normalize(),c[0].crossVectors(s[0],h),u[0].crossVectors(s[0],c[0]),r=1;r<=t;r++)c[r]=c[r-1].clone(),u[r]=u[r-1].clone(),h.crossVectors(s[r-1],s[r]),h.length()>Number.EPSILON&&(h.normalize(),n=Math.acos(Ql.clamp(s[r-1].dot(s[r]),-1,1)),c[r].applyMatrix4(l.makeRotationAxis(h,n))),u[r].crossVectors(s[r],c[r]);if(!0===e)for(n=Math.acos(Ql.clamp(c[0].dot(c[t]),-1,1)),n/=t,s[0].dot(h.crossVectors(c[0],c[t]))>0&&(n=-n),r=1;r<=t;r++)c[r].applyMatrix4(l.makeRotationAxis(s[r],n*r)),u[r].crossVectors(s[r],c[r]);return{tangents:s,normals:c,binormals:u}}}),Ai.prototype=Object.create(Si.prototype),Ai.prototype.constructor=Ai,Ai.prototype.isLineCurve=!0,Ai.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},Ai.prototype.getPointAt=function(t){return this.getPoint(t)},Ai.prototype.getTangent=function(t){return this.v2.clone().sub(this.v1).normalize()},Mi.prototype=Object.assign(Object.create(Si.prototype),{constructor:Mi,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Ai(e,t))},getPoint:function(t){for(var e=this,r=t*this.getLength(),i=this.getCurveLengths(),n=0;n=r){var o=i[n]-r,a=e.curves[n],s=a.getLength(),c=0===s?0:1-o/s;return a.getPointAt(c)}n++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){var t=this;if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],r=0,i=0,n=this.curves.length;i1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r},createPointsGeometry:function(t){var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){for(var e=new wt,r=0,i=t.length;re;)r-=e;re.length-2?e.length-1:i+1],c=e[i>e.length-3?e.length-1:i+2];return new l(di(n,o.x,a.x,s.x,c.x),di(n,o.y,a.y,s.y,c.y))},Pi.prototype=Object.create(Si.prototype),Pi.prototype.constructor=Pi,Pi.prototype.getPoint=function(t){var e=this.v0,r=this.v1,i=this.v2,n=this.v3;return new l(wi(t,e.x,r.x,i.x,n.x),wi(t,e.y,r.y,i.y,n.y))},Ci.prototype=Object.create(Si.prototype),Ci.prototype.constructor=Ci,Ci.prototype.getPoint=function(t){var e=this.v0,r=this.v1,i=this.v2;return new l(vi(t,e.x,r.x,i.x),vi(t,e.y,r.y,i.y))};var Tp=Object.assign(Object.create(Mi.prototype),{fromPoints:function(t){var e=this;this.moveTo(t[0].x,t[0].y);for(var r=1,i=t.length;r0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var h=c.getPoint(1);this.currentPoint.copy(h)}});Ii.prototype=Tp,Tp.constructor=Ii,Ri.prototype=Object.assign(Object.create(Tp),{constructor:Ri,getPointsHoles:function(t){for(var e=this,r=[],i=0,n=this.holes.length;i1){for(var v=!1,y=[],b=0,x=p.length;bNumber.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[n],u=-u),t.ys.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var h=u*(t.x-a.x)-c*(t.y-a.y);if(0===h)return!0;if(h<0)continue;i=!i}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return i})(S.p,p[M].p)&&(b!==M&&y.push({froms:b,tos:M,hole:w}),A?(A=!1,l[M].push(S)):v=!0);A&&l[b].push(S)}y.length>0&&(v||(d=l))}for(var E,m=0,T=p.length;m0){this.source.connect(this.filters[0]);for(var e=1,r=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,r=this.filters.length;e=.5)for(var o=0;o!==n;++o)t[e+o]=t[r+o]},_slerp:function(t,e,r,i){m.slerpFlat(t,e,t,e,t,r,i)},_lerp:function(t,e,r,i,n){for(var o=1-i,a=0;a!==n;++a){var s=e+a;t[s]=t[s]*o+t[r+a]*i}}}),Object.assign(Gi.prototype,{getValue:function(t,e){this.bind();var r=this._targetGroup.nCachedObjects_,i=this._bindings[r];void 0!==i&&i.getValue(t,e)},setValue:function(t,e){for(var r=this._bindings,i=this._targetGroup.nCachedObjects_,n=r.length;i!==n;++i)r[i].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,r=t.length;e!==r;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,r=t.length;e!==r;++e)t[e].unbind()}}),Object.assign(Vi,{Composite:Gi,create:function(t,e,r){return t&&t.isAnimationObjectGroup?new Vi.Composite(t,e,r):new Vi(t,e,r)},sanitizeNodeName:function(t){return t.replace(/\\s/g,\"_\").replace(/[^\\w-]/g,\"\")},parseTrackName:function(){var t=new RegExp(\"^\"+/((?:[\\w-]+[\\/:])*)/.source+/([\\w-\\.]+)?/.source+/(?:\\.([\\w-]+)(?:\\[(.+)\\])?)?/.source+/\\.([\\w-]+)(?:\\[(.+)\\])?/.source+\"$\"),e=[\"material\",\"materials\",\"bones\"];return function(r){var i=t.exec(r);if(!i)throw new Error(\"PropertyBinding: Cannot parse trackName: \"+r);var n={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},o=n.nodeName&&n.nodeName.lastIndexOf(\".\");if(void 0!==o&&-1!==o){var a=n.nodeName.substring(o+1);-1!==e.indexOf(a)&&(n.nodeName=n.nodeName.substring(0,o),n.objectName=a)}if(null===n.propertyName||0===n.propertyName.length)throw new Error(\"PropertyBinding: can not parse propertyName from trackName: \"+r);return n}}(),findNode:function(t,e){if(!e||\"\"===e||\"root\"===e||\".\"===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var r=function(t){for(var r=0;r=i){var p=i++,d=r[p];n[d.uuid]=l,r[l]=d,n[h]=p,r[p]=u;for(var f=0,m=a;f!==m;++f){var g=o[f],v=g[p],y=g[l];g[l]=v,g[p]=y}}}this.nCachedObjects_=i},uncache:function(t){for(var e=arguments,r=this._objects,i=r.length,n=this.nCachedObjects_,o=this._indicesByUUID,a=this._bindings,s=a.length,c=0,u=arguments.length;c!==u;++c){var h=e[c].uuid,l=o[h];if(void 0!==l)if(delete o[h],l0)for(var c=this._interpolants,u=this._propertyBindings,h=0,l=c.length;h!==l;++h)c[h].evaluate(a),u[h].accumulate(i,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var r=this._weightInterpolant;if(null!==r){var i=r.evaluate(t)[0];e*=i,t>r.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var r=this._timeScaleInterpolant;null!==r&&(e*=r.evaluate(t)[0],t>r.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var r=this._clip.duration,i=this.loop,n=this._loopCount;if(2200===i){-1===n&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=r)e=r;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:\"finished\",action:this,direction:t<0?-1:1})}}else{var o=2202===i;if(-1===n&&(t>=0?(n=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=r||e<0){var a=Math.floor(e/r);e-=r*a,n+=Math.abs(a);var s=this.repetitions-n;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?r:0,this._mixer.dispatchEvent({type:\"finished\",action:this,direction:t>0?1:-1});else{if(0===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=n,this._mixer.dispatchEvent({type:\"loop\",action:this,loopDelta:a})}}if(o&&1==(1&n))return this.time=e,r-e}return this.time=e,e},_setEndings:function(t,e,r){var i=this._interpolantSettings;r?(i.endingStart=2401,i.endingEnd=2401):(i.endingStart=t?this.zeroSlopeAtStart?2401:zl:2402,i.endingEnd=e?this.zeroSlopeAtEnd?2401:zl:2402)},_scheduleFading:function(t,e,r){var i=this._mixer,n=i.time,o=this._weightInterpolant;null===o&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=n,s[0]=e,a[1]=n+t,s[1]=r,this}}),Object.assign(Wi.prototype,h.prototype,{_bindAction:function(t,e){var r=this,i=t._localRoot||this._root,n=t._clip.tracks,o=n.length,a=t._propertyBindings,s=t._interpolants,c=i.uuid,u=this._bindingsByRootAndName,h=u[c];void 0===h&&(h={},u[c]=h);for(var l=0;l!==o;++l){var p=n[l],d=p.name,f=h[d];if(void 0!==f)a[l]=f;else{if(void 0!==(f=a[l])){null===f._cacheIndex&&(++f.referenceCount,r._addInactiveBinding(f,c,d));continue}var m=e&&e._propertyBindings[l].binding.parsedPath;++(f=new ji(Vi.create(i,d,m),p.ValueTypeName,p.getValueSize())).referenceCount,r._addInactiveBinding(f,c,d),a[l]=f}s[l].resultBuffer=f.buffer}},_activateAction:function(t){var e=this;if(!this._isActiveAction(t)){if(null===t._cacheIndex){var r=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,r)}for(var o=t._propertyBindings,a=0,s=o.length;a!==s;++a){var c=o[a];0==c.useCount++&&(e._lendBinding(c),c.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){var e=this;if(this._isActiveAction(t)){for(var r=t._propertyBindings,i=0,n=r.length;i!==n;++i){var o=r[i];0==--o.useCount&&(o.restoreOriginalState(),e._takeBackBinding(o))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e0?0:(Math.floor(Math.abs(n)/e.length)+1)*e.length:0===o&&n===r-1&&(n=r-2,o=1);var a,s,c,u;if(this.closed||n>0?a=e[(n-1)%r]:(Ip.subVectors(e[0],e[1]).add(e[0]),a=Ip),s=e[n%r],c=e[(n+1)%r],this.closed||n+2r&&(t=r),t},nf=function(t){return t.length>=3?[].slice.call(t):t[0]},ed=function(t){var e,r;for(t._clipped=!1,t._unclipped=t.slice(0),e=r=0;r<3;e=++r)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]<0&&(t[e]=0),t[e]>255&&(t[e]=255)):3===e&&(t[e]<0&&(t[e]=0),t[e]>1&&(t[e]=1));return t._clipped||delete t._unclipped,t},zp=Math.PI,Kd=Math.round,id=Math.cos,cd=Math.floor,Nd=Math.pow,Td=Math.log,Jd=Math.sin,tf=Math.sqrt,qp=Math.atan2,Id=Math.max,Xp=Math.abs,Gp=2*zp,Up=zp/3,Fp=zp/180,jp=180/zp,Wp=[],(td=function(){return arguments[0]instanceof kp?arguments[0]:function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,arguments,function(){})}).version=\"1.3.3\",Hp={},Vp=[],$p=!1,kp=function(){function t(){var t,e,r,i,n,o,a,s,c,u=arguments;for(o=this,e=[],s=0,i=arguments.length;s3?e[3]:1]},sf=function(t){return 255*(t<=.00304?12.92*t:1.055*Nd(t,1/2.4)-.055)},wd=function(t){return t>Bp.t1?t*t*t:Bp.t2*(t-Bp.t0)},Bp={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Vd=function(){var t,e,r,i,n,o,a,s;return i=nf(arguments),r=i[0],e=i[1],t=i[2],n=qd(r,e,t),o=n[0],a=n[1],s=n[2],[116*a-16,500*(o-a),200*(a-s)]},Yd=function(t){return(t/=255)<=.04045?t/12.92:Nd((t+.055)/1.055,2.4)},af=function(t){return t>Bp.t3?Nd(t,1/3):t/Bp.t2+Bp.t0},qd=function(){var t,e,r,i,n,o,a;return i=nf(arguments),r=i[0],e=i[1],t=i[2],r=Yd(r),e=Yd(e),t=Yd(t),n=af((.4124564*r+.3575761*e+.1804375*t)/Bp.Xn),o=af((.2126729*r+.7151522*e+.072175*t)/Bp.Yn),a=af((.0193339*r+.119192*e+.9503041*t)/Bp.Zn),[n,o,a]},td.lab=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"lab\"]),function(){})},Hp.lab=_d,kp.prototype.lab=function(){return Vd(this._rgb)},Yp=function(t){var e,r,i,n,o,a,s,c,u,h,l;return t=function(){var e,r,i;for(i=[],r=0,e=t.length;r=360;)r-=360;d[u]=r}return td(d,e).alpha(i/h)},Hp.rgb=function(){var t,e,r,i;e=nf(arguments),r=[];for(t in e)i=e[t],r.push(i);return r},td.rgb=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"rgb\"]),function(){})},kp.prototype.rgb=function(t){return null==t&&(t=!0),t?this._rgb.map(Math.round).slice(0,3):this._rgb.slice(0,3)},kp.prototype.rgba=function(t){return null==t&&(t=!0),t?[Math.round(this._rgb[0]),Math.round(this._rgb[1]),Math.round(this._rgb[2]),this._rgb[3]]:this._rgb.slice(0)},Vp.push({p:3,test:function(t){var e;return e=nf(arguments),\"array\"===rf(e)&&3===e.length?\"rgb\":4===e.length&&\"number\"===rf(e[3])&&e[3]>=0&&e[3]<=1?\"rgb\":void 0}}),hd=function(t){var e,r,i,n,o,a;if(t.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(\"\"))[0]+t[0]+t[1]+t[1]+t[2]+t[2]),a=parseInt(t,16),n=a>>16,i=a>>8&255,r=255&a,[n,i,r,1];if(t.match(/^#?([A-Fa-f0-9]{8})$/))return 9===t.length&&(t=t.substr(1)),a=parseInt(t,16),n=a>>24&255,i=a>>16&255,r=a>>8&255,e=Kd((255&a)/255*100)/100,[n,i,r,e];if(null!=Hp.css&&(o=Hp.css(t)))return o;throw\"unknown color: \"+t},zd=function(t,e){var r,i,n,o,a,s,c;return null==e&&(e=\"rgb\"),a=t[0],n=t[1],i=t[2],r=t[3],a=Math.round(a),n=Math.round(n),i=Math.round(i),c=a<<16|n<<8|i,s=\"000000\"+c.toString(16),s=s.substr(s.length-6),o=\"0\"+Kd(255*r).toString(16),o=o.substr(o.length-2),\"#\"+function(){switch(e.toLowerCase()){case\"rgba\":return s+o;case\"argb\":return o+s;default:return s}}()},Hp.hex=function(t){return hd(t)},td.hex=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"hex\"]),function(){})},kp.prototype.hex=function(t){return null==t&&(t=\"rgb\"),zd(this._rgb,t)},Vp.push({p:4,test:function(t){if(1===arguments.length&&\"string\"===rf(t))return\"hex\"}}),dd=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d;if(t=nf(arguments),n=t[0],h=t[1],a=t[2],0===h)c=i=e=255*a;else{for(d=[0,0,0],r=[0,0,0],l=2*a-(p=a<.5?a*(1+h):a+h-a*h),n/=360,d[0]=n+1/3,d[1]=n,d[2]=n-1/3,o=s=0;s<=2;o=++s)d[o]<0&&(d[o]+=1),d[o]>1&&(d[o]-=1),6*d[o]<1?r[o]=l+6*(p-l)*d[o]:2*d[o]<1?r[o]=p:3*d[o]<2?r[o]=l+(p-l)*(2/3-d[o])*6:r[o]=l;c=(u=[Kd(255*r[0]),Kd(255*r[1]),Kd(255*r[2])])[0],i=u[1],e=u[2]}return t.length>3?[c,i,e,t[3]]:[c,i,e]},jd=function(t,e,r){var i,n,o,a,s;return void 0!==t&&t.length>=3&&(t=(a=t)[0],e=a[1],r=a[2]),t/=255,e/=255,r/=255,o=Math.min(t,e,r),Id=Math.max(t,e,r),n=(Id+o)/2,Id===o?(s=0,i=Number.NaN):s=n<.5?(Id-o)/(Id+o):(Id-o)/(2-Id-o),t===Id?i=(e-r)/(Id-o):e===Id?i=2+(r-t)/(Id-o):r===Id&&(i=4+(t-e)/(Id-o)),(i*=60)<0&&(i+=360),[i,s,n]},td.hsl=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"hsl\"]),function(){})},Hp.hsl=dd,kp.prototype.hsl=function(){return jd(this._rgb)},fd=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v;if(t=nf(arguments),n=t[0],m=t[1],v=t[2],v*=255,0===m)c=i=e=v;else switch(360===n&&(n=0),n>360&&(n-=360),n<0&&(n+=360),n/=60,o=cd(n),r=n-o,a=v*(1-m),s=v*(1-m*r),g=v*(1-m*(1-r)),o){case 0:c=(u=[v,g,a])[0],i=u[1],e=u[2];break;case 1:c=(h=[s,v,a])[0],i=h[1],e=h[2];break;case 2:c=(l=[a,v,g])[0],i=l[1],e=l[2];break;case 3:c=(p=[a,s,v])[0],i=p[1],e=p[2];break;case 4:c=(d=[g,a,v])[0],i=d[1],e=d[2];break;case 5:c=(f=[v,a,s])[0],i=f[1],e=f[2]}return[c,i,e,t.length>3?t[3]:1]},Gd=function(){var t,e,r,i,n,o,a,s,c;return a=nf(arguments),o=a[0],r=a[1],t=a[2],n=Math.min(o,r,t),Id=Math.max(o,r,t),e=Id-n,c=Id/255,0===Id?(i=Number.NaN,s=0):(s=e/Id,o===Id&&(i=(r-t)/e),r===Id&&(i=2+(t-o)/e),t===Id&&(i=4+(o-r)/e),(i*=60)<0&&(i+=360)),[i,s,c]},td.hsv=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"hsv\"]),function(){})},Hp.hsv=fd,kp.prototype.hsv=function(){return Gd(this._rgb)},Od=function(t){var e,r,i;return\"number\"===rf(t)&&t>=0&&t<=16777215?(i=t>>16,r=t>>8&255,e=255&t,[i,r,e,1]):(console.warn(\"unknown num color: \"+t),[0,0,0,1])},Wd=function(){var t,e,r,i;return i=nf(arguments),r=i[0],e=i[1],t=i[2],(r<<16)+(e<<8)+t},td.num=function(t){return new kp(t,\"num\")},kp.prototype.num=function(t){return null==t&&(t=\"rgb\"),Wd(this._rgb,t)},Hp.num=Od,Vp.push({p:1,test:function(t){if(1===arguments.length&&\"number\"===rf(t)&&t>=0&&t<=16777215)return\"num\"}}),ud=function(){var t,e,r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b;if(r=nf(arguments),s=r[0],n=r[1],e=r[2],n/=100,a=a/100*255,t=255*n,0===n)l=a=i=e;else switch(360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360),s/=60,c=cd(s),o=s-c,u=e*(1-n),h=u+t*(1-o),y=u+t*o,b=u+t,c){case 0:l=(p=[b,y,u])[0],a=p[1],i=p[2];break;case 1:l=(d=[h,b,u])[0],a=d[1],i=d[2];break;case 2:l=(f=[u,b,y])[0],a=f[1],i=f[2];break;case 3:l=(m=[u,h,b])[0],a=m[1],i=m[2];break;case 4:l=(g=[y,u,b])[0],a=g[1],i=g[2];break;case 5:l=(v=[b,u,h])[0],a=v[1],i=v[2]}return[l,a,i,r.length>3?r[3]:1]},Bd=function(){var t,e,r,i,n,o,a,s,c;return c=nf(arguments),s=c[0],n=c[1],e=c[2],a=Math.min(s,n,e),Id=Math.max(s,n,e),i=Id-a,r=100*i/255,t=a/(255-i)*100,0===i?o=Number.NaN:(s===Id&&(o=(n-e)/i),n===Id&&(o=2+(e-s)/i),e===Id&&(o=4+(s-n)/i),(o*=60)<0&&(o+=360)),[o,r,t]},td.hcg=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"hcg\"]),function(){})},Hp.hcg=ud,kp.prototype.hcg=function(){return Bd(this._rgb)},nd=function(t){var e,r,i,n,o,a,s,c;if(t=t.toLowerCase(),null!=td.colors&&td.colors[t])return hd(td.colors[t]);if(o=t.match(/rgb\\(\\s*(\\-?\\d+),\\s*(\\-?\\d+)\\s*,\\s*(\\-?\\d+)\\s*\\)/)){for(s=o.slice(1,4),n=a=0;a<=2;n=++a)s[n]=+s[n];s[3]=1}else if(o=t.match(/rgba\\(\\s*(\\-?\\d+),\\s*(\\-?\\d+)\\s*,\\s*(\\-?\\d+)\\s*,\\s*([01]|[01]?\\.\\d+)\\)/))for(s=o.slice(1,5),n=c=0;c<=3;n=++c)s[n]=+s[n];else if(o=t.match(/rgb\\(\\s*(\\-?\\d+(?:\\.\\d+)?)%,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*\\)/)){for(s=o.slice(1,4),n=e=0;e<=2;n=++e)s[n]=Kd(2.55*s[n]);s[3]=1}else if(o=t.match(/rgba\\(\\s*(\\-?\\d+(?:\\.\\d+)?)%,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)/)){for(s=o.slice(1,5),n=r=0;r<=2;n=++r)s[n]=Kd(2.55*s[n]);s[3]=+s[3]}else(o=t.match(/hsl\\(\\s*(\\-?\\d+(?:\\.\\d+)?),\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*\\)/))?((i=o.slice(1,4))[1]*=.01,i[2]*=.01,(s=dd(i))[3]=1):(o=t.match(/hsla\\(\\s*(\\-?\\d+(?:\\.\\d+)?),\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(\\-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)/))&&((i=o.slice(1,4))[1]*=.01,i[2]*=.01,(s=dd(i))[3]=+o[4]);return s},Fd=function(t){var e;return e=t[3]<1?\"rgba\":\"rgb\",\"rgb\"===e?e+\"(\"+t.slice(0,3).map(Kd).join(\",\")+\")\":\"rgba\"===e?e+\"(\"+t.slice(0,3).map(Kd).join(\",\")+\",\"+t[3]+\")\":void 0},Zd=function(t){return Kd(100*t)/100},pd=function(t,e){var r;return r=e<1?\"hsla\":\"hsl\",t[0]=Zd(t[0]||0),t[1]=Zd(100*t[1])+\"%\",t[2]=Zd(100*t[2])+\"%\",\"hsla\"===r&&(t[3]=e),r+\"(\"+t.join(\",\")+\")\"},Hp.css=function(t){return nd(t)},td.css=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"css\"]),function(){})},kp.prototype.css=function(t){return null==t&&(t=\"rgb\"),\"rgb\"===t.slice(0,3)?Fd(this._rgb):\"hsl\"===t.slice(0,3)?pd(this.hsl(),this.alpha()):void 0},Hp.named=function(t){return hd(of[t])},Vp.push({p:5,test:function(t){if(1===arguments.length&&null!=of[t])return\"named\"}}),kp.prototype.name=function(t){var e,r;arguments.length&&(of[t]&&(this._rgb=hd(of[t])),this._rgb[3]=1),e=this.hex();for(r in of)if(e===of[r])return r;return e},Sd=function(){var t,e,r,i;return i=nf(arguments),r=i[0],t=i[1],e=i[2],e*=Fp,[r,id(e)*t,Jd(e)*t]},Ad=function(){var t,e,r,i,n,o,a,s,c,u,h;return r=nf(arguments),s=r[0],n=r[1],a=r[2],u=Sd(s,n,a),t=u[0],e=u[1],i=u[2],h=_d(t,e,i),c=h[0],o=h[1],i=h[2],[c,o,i,r.length>3?r[3]:1]},xd=function(){var t,e,r,i,n,o;return o=nf(arguments),n=o[0],t=o[1],e=o[2],r=tf(t*t+e*e),i=(qp(e,t)*jp+360)%360,0===Kd(1e4*r)&&(i=Number.NaN),[n,r,i]},$d=function(){var t,e,r,i,n,o,a;return o=nf(arguments),n=o[0],r=o[1],e=o[2],a=Vd(n,r,e),i=a[0],t=a[1],e=a[2],xd(i,t,e)},td.lch=function(){var t;return t=nf(arguments),new kp(t,\"lch\")},td.hcl=function(){var t;return t=nf(arguments),new kp(t,\"hcl\")},Hp.lch=Ad,Hp.hcl=function(){var t,e,r,i;return i=nf(arguments),e=i[0],t=i[1],r=i[2],Ad([r,t,e])},kp.prototype.lch=function(){return $d(this._rgb)},kp.prototype.hcl=function(){return $d(this._rgb).reverse()},kd=function(t){var e,r,i,n,o,a,s,c,u;return null==t&&(t=\"rgb\"),c=nf(arguments),s=c[0],n=c[1],e=c[2],s/=255,n/=255,e/=255,o=1-Math.max(s,Math.max(n,e)),i=o<1?1/(1-o):0,r=(1-s-o)*i,a=(1-n-o)*i,u=(1-e-o)*i,[r,a,u,o]},rd=function(){var t,e,r,i,n,o,a,s,c;return e=nf(arguments),i=e[0],a=e[1],c=e[2],o=e[3],t=e.length>4?e[4]:1,1===o?[0,0,0,t]:(s=i>=1?0:255*(1-i)*(1-o),n=a>=1?0:255*(1-a)*(1-o),r=c>=1?0:255*(1-c)*(1-o),[s,n,r,t])},Hp.cmyk=function(){return rd(nf(arguments))},td.cmyk=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"cmyk\"]),function(){})},kp.prototype.cmyk=function(){return kd(this._rgb)},Hp.gl=function(){var t,e,r,i,n;for(i=function(){var t,r;t=nf(arguments),r=[];for(e in t)n=t[e],r.push(n);return r}.apply(this,arguments),t=r=0;r<=2;t=++r)i[t]*=255;return i},td.gl=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"gl\"]),function(){})},kp.prototype.gl=function(){var t;return t=this._rgb,[t[0]/255,t[1]/255,t[2]/255,t[3]]},Hd=function(t,e,r){var i;return i=nf(arguments),t=i[0],e=i[1],r=i[2],t=Pd(t),e=Pd(e),r=Pd(r),.2126*t+.7152*e+.0722*r},Pd=function(t){return t/=255,t<=.03928?t/12.92:Nd((t+.055)/1.055,2.4)},Wp=[],md=function(t,e,r,i){var n,o,a,s;for(null==r&&(r=.5),null==i&&(i=\"rgb\"),\"object\"!==rf(t)&&(t=td(t)),\"object\"!==rf(e)&&(e=td(e)),a=0,o=Wp.length;at?o(r,c):o(c,a)},r=Hd(this._rgb),this._rgb=(r>t?o(td(\"black\"),this):o(this,td(\"white\"))).rgba()),this):Hd(this._rgb)},ef=function(t){var e,r,i,n;return n=t/100,n<66?(i=255,r=-155.25485562709179-.44596950469579133*(r=n-2)+104.49216199393888*Td(r),e=n<20?0:.8274096064007395*(e=n-10)-254.76935184120902+115.67994401066147*Td(e)):(i=351.97690566805693+.114206453784165*(i=n-55)-40.25366309332127*Td(i),r=325.4494125711974+.07943456536662342*(r=n-50)-28.0852963507957*Td(r),e=255),[i,r,e]},Xd=function(){var t,e,r,i,n,o,a;for(i=(n=nf(arguments))[0],n[1],t=n[2],r=1e3,e=4e4,.4;e-r>.4;)(o=ef(a=.5*(e+r)))[2]/o[0]>=t/i?e=a:r=a;return Kd(a)},td.temperature=td.kelvin=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"temperature\"]),function(){})},Hp.temperature=Hp.kelvin=Hp.K=ef,kp.prototype.temperature=function(){return Xd(this._rgb)},kp.prototype.kelvin=kp.prototype.temperature,td.contrast=function(t,e){var r,i,n,o;return\"string\"!==(n=rf(t))&&\"number\"!==n||(t=new kp(t)),\"string\"!==(o=rf(e))&&\"number\"!==o||(e=new kp(e)),r=t.luminance(),i=e.luminance(),r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)},td.distance=function(t,e,r){var i,n,o,a,s,c,u;null==r&&(r=\"lab\"),\"string\"!==(s=rf(t))&&\"number\"!==s||(t=new kp(t)),\"string\"!==(c=rf(e))&&\"number\"!==c||(e=new kp(e)),o=t.get(r),a=e.get(r),u=0;for(n in o)u+=(i=(o[n]||0)-(a[n]||0))*i;return Math.sqrt(u)},td.deltaE=function(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_,w,S,A,M,E,T,P,C,I;for(null==r&&(r=1),null==i&&(i=1),\"string\"!==(x=rf(t))&&\"number\"!==x||(t=new kp(t)),\"string\"!==(_=rf(e))&&\"number\"!==_||(e=new kp(e)),n=(w=t.lab())[0],a=w[1],c=w[2],o=(S=e.lab())[0],s=S[1],u=S[2],h=tf(a*a+c*c),l=tf(s*s+u*u),E=n<16?.511:.040975*n/(1+.01765*n),A=.0638*h/(1+.0131*h)+.638,b=h<1e-6?0:180*qp(c,a)/zp;b<0;)b+=360;for(;b>=360;)b-=360;return T=b>=164&&b<=345?.56+Xp(.2*id(zp*(b+168)/180)):.36+Xp(.4*id(zp*(b+35)/180)),p=h*h*h*h,y=tf(p/(p+1900)),M=A*(y*T+1-y),v=n-o,g=h-l,f=a-s,m=c-u,d=f*f+m*m-g*g,P=v/(r*E),C=g/(i*A),I=M,tf(P*P+C*C+d/(I*I))},kp.prototype.get=function(t){var e,r,i,n,o,a;return i=this,o=t.split(\".\"),n=o[0],e=o[1],a=i[n](),e?(r=n.indexOf(e),r>-1?a[r]:console.warn(\"unknown channel \"+e+\" in mode \"+n)):a},kp.prototype.set=function(t,e){var r,i,n,o,a,s;if(n=this,a=t.split(\".\"),o=a[0],r=a[1])if(s=n[o](),(i=o.indexOf(r))>-1)if(\"string\"===rf(e))switch(e.charAt(0)){case\"+\":case\"-\":s[i]+=+e;break;case\"*\":s[i]*=+e.substr(1);break;case\"/\":s[i]/=+e.substr(1);break;default:s[i]=+e}else s[i]=e;else console.warn(\"unknown channel \"+r+\" in mode \"+o);else s=e;return td(s,o).alpha(n.alpha())},kp.prototype.clipped=function(){return this._rgb._clipped||!1},kp.prototype.alpha=function(t){return arguments.length?td.rgb([this._rgb[0],this._rgb[1],this._rgb[2],t]):this._rgb[3]},kp.prototype.darken=function(t){var e,r;return null==t&&(t=1),r=this,e=r.lab(),e[0]-=Bp.Kn*t,td.lab(e).alpha(r.alpha())},kp.prototype.brighten=function(t){return null==t&&(t=1),this.darken(-t)},kp.prototype.darker=kp.prototype.darken,kp.prototype.brighter=kp.prototype.brighten,kp.prototype.saturate=function(t){var e,r;return null==t&&(t=1),r=this,e=r.lch(),e[1]+=t*Bp.Kn,e[1]<0&&(e[1]=0),td.lch(e).alpha(r.alpha())},kp.prototype.desaturate=function(t){return null==t&&(t=1),this.saturate(-t)},kp.prototype.premultiply=function(){var t,e;return e=this.rgb(),t=this.alpha(),td(e[0]*t,e[1]*t,e[2]*t,t)},Kp=function(t){return function(e,r){var i,n;return i=td(r).rgb(),n=td(e).rgb(),td(t(i,n),\"rgb\")}},sd=function(t){return function(e,r){var i,n,o;for(o=[],i=n=0;n<=3;i=++n)o[i]=t(e[i],r[i]);return o}},Ld=function(t,e){return t},Rd=function(t,e){return t*e/255},od=function(t,e){return t>e?e:t},Md=function(t,e){return t>e?t:e},Qd=function(t,e){return 255*(1-(1-t/255)*(1-e/255))},Dd=function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))},Jp=function(t,e){return 255*(1-(1-e/255)/(t/255))},ad=function(t,e){return 255===t?255:(t=e/255*255/(1-t/255),t>255?255:t)},(Zp=function(t,e,r){if(!Zp[r])throw\"unknown blend mode \"+r;return Zp[r](t,e)}).normal=Kp(sd(Ld)),Zp.multiply=Kp(sd(Rd)),Zp.screen=Kp(sd(Qd)),Zp.overlay=Kp(sd(Dd)),Zp.darken=Kp(sd(od)),Zp.lighten=Kp(sd(Md)),Zp.dodge=Kp(sd(ad)),Zp.burn=Kp(sd(Jp)),td.blend=Zp,td.analyze=function(t){var e,r,i,n;for(i={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},r=0,e=t.length;ri.max&&(i.max=n),i.count+=1);return i.domain=[i.min,i.max],i.limits=function(t,e){return td.limits(i,t,e)},i},td.scale=function(t,e){var r,i,n,o,a,s,c,u,h,l,p,d,f,m,g,v,y,b,x,_;return u=\"rgb\",h=td(\"#ccc\"),f=0,!1,a=[0,1],d=[],p=[0,0],r=!1,n=[],l=!1,c=0,s=1,o=!1,i={},m=!0,x=function(t){var e,r,i,o,a,s;if(null==t&&(t=[\"#fff\",\"#000\"]),null!=t&&\"string\"===rf(t)&&null!=td.brewer&&(t=td.brewer[t]||td.brewer[t.toLowerCase()]||t),\"array\"===rf(t)){for(e=i=0,o=(t=t.slice(0)).length-1;0<=o?i<=o:i>=o;e=0<=o?++i:--i)r=t[e],\"string\"===rf(r)&&(t[e]=td(r));for(d.length=0,e=s=0,a=t.length-1;0<=a?s<=a:s>=a;e=0<=a?++s:--s)d.push(e/(t.length-1))}return b(),n=t},v=function(t){var e,i;if(null!=r){for(i=r.length-1,e=0;e=r[e];)e++;return e-1}return 0},_=function(t){return t},function(t){var e,i,n,o,a;return a=t,r.length>2&&(o=r.length-1,e=v(t),n=r[0]+(r[1]-r[0])*(0+.5*f),i=r[o-1]+(r[o]-r[o-1])*(1-.5*f),a=c+(r[e]+.5*(r[e+1]-r[e])-n)/(i-n)*(s-c)),a},y=function(t,e){var o,a,l,f,g,y,b;if(null==e&&(e=!1),isNaN(t))return h;if(e?b=t:r&&r.length>2?(b=v(t)/(r.length-2),b=p[0]+b*(1-p[0]-p[1])):s!==c?(b=(t-c)/(s-c),b=p[0]+b*(1-p[0]-p[1]),b=Math.min(1,Math.max(0,b))):b=1,e||(b=_(b)),l=Math.floor(1e4*b),m&&i[l])o=i[l];else{if(\"array\"===rf(n))for(a=f=0,y=d.length-1;0<=y?f<=y:f>=y;a=0<=y?++f:--f){if(g=d[a],b<=g){o=n[a];break}if(b>=g&&a===d.length-1){o=n[a];break}if(b>g&&b=h;e=0<=h?++l:--l)d.push(e/(i-1));return a=[c,s],g},g.mode=function(t){return arguments.length?(u=t,b(),g):u},g.range=function(t,e){return x(t),g},g.out=function(t){return l=t,g},g.spread=function(t){return arguments.length?(f=t,g):f},g.correctLightness=function(t){return null==t&&(t=!0),o=t,b(),_=o?function(t){var e,r,i,n,o,a,s,c,u;for(e=y(0,!0).lab()[0],r=y(1,!0).lab()[0],s=e>r,i=y(t,!0).lab()[0],n=i-(o=e+(r-e)*t),c=0,u=1,a=20;Math.abs(n)>.01&&a-- >0;)!function(){s&&(n*=-1),n<0?(c=t,t+=.5*(u-t)):(u=t,t+=.5*(c-t)),i=y(t,!0).lab()[0],n=i-o}();return t}:function(t){return t},g},g.padding=function(t){return null!=t?(\"number\"===rf(t)&&(t=[t,t]),p=t,g):p},g.colors=function(e,i){var o,s,c,u,h,l,p;if(null==i&&(i=\"hex\"),0===arguments.length)return n.map(function(t){return t[i]()});if(e)return 1===e?g(.5)[i]():(s=a[0],o=a[1]-s,function(){h=[];for(var t=0;0<=e?te;0<=e?t++:t--)h.push(t);return h}.apply(this).map(function(t){return g(s+t/(e-1)*o)[i]()}));if(t=[],l=[],r&&r.length>2)for(c=p=1,u=r.length;1<=u?pu;c=1<=u?++p:--p)l.push(.5*(r[c-1]+r[c]));else l=a;return l.map(function(t){return g(t)[i]()})},g.cache=function(t){return null!=t?m=t:m},g},null==td.scales&&(td.scales={}),td.scales.cool=function(){return td.scale([td.hsl(180,1,.9),td.hsl(250,.7,.4)])},td.scales.hot=function(){return td.scale([\"#000\",\"#f00\",\"#ff0\",\"#fff\"],[0,.25,.75,1]).mode(\"rgb\")},td.analyze=function(t,e,r){var i,n,o,a,s,c;if(s={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==r&&(r=function(){return!0}),i=function(t){null==t||isNaN(t)||(s.values.push(t),s.sum+=t,ts.max&&(s.max=t),s.count+=1)},c=function(t,n){if(r(t,n))return i(null!=e&&\"function\"===rf(e)?e(t):null!=e&&\"string\"===rf(e)||\"number\"===rf(e)?t[e]:t)},\"array\"===rf(t))for(a=0,o=t.length;a=F;w=1<=F?++O:--O)M.push(T+w/r*(Id-T));M.push(Id)}else if(\"l\"===e.substr(0,1)){if(T<=0)throw\"Logarithmic scales are only possible for values > 0\";for(P=Math.LOG10E*Td(T),E=Math.LOG10E*Td(Id),M.push(T),w=it=1,B=r-1;1<=B?it<=B:it>=B;w=1<=B?++it:--it)M.push(Nd(10,P+w/r*(E-P)));M.push(Id)}else if(\"q\"===e.substr(0,1)){for(M.push(T),w=i=1,$=r-1;1<=$?i<=$:i>=$;w=1<=$?++i:--i)D=(rt.length-1)*w/r,(N=cd(D))===D?M.push(rt[N]):(k=D-N,M.push(rt[N]*(1-k)+rt[N+1]*k));M.push(Id)}else if(\"k\"===e.substr(0,1)){for(I=rt.length,g=new Array(I),x=new Array(r),Q=!0,R=0,y=null,(y=[]).push(T),w=n=1,H=r-1;1<=H?n<=H:n>=H;w=1<=H?++n:--n)y.push(T+w/r*(Id-T));for(y.push(Id);Q;){for(S=o=0,W=r-1;0<=W?o<=W:o>=W;S=0<=W?++o:--o)x[S]=0;for(w=a=0,X=I-1;0<=X?a<=X:a>=X;w=0<=X?++a:--a){for(et=rt[w],C=Number.MAX_VALUE,S=s=0,q=r-1;0<=q?s<=q:s>=q;S=0<=q?++s:--s)(_=Xp(y[S]-et))=Y;S=0<=Y?++c:--c)L[S]=null;for(w=u=0,Z=I-1;0<=Z?u<=Z:u>=Z;w=0<=Z?++u:--u)null===L[b=g[w]]?L[b]=rt[w]:L[b]+=rt[w];for(S=h=0,K=r-1;0<=K?h<=K:h>=K;S=0<=K?++h:--h)L[S]*=1/x[S];for(Q=!1,S=l=0,z=r-1;0<=z?l<=z:l>=z;S=0<=z?++l:--l)if(L[S]!==y[w]){Q=!0;break}y=L,++R>200&&(Q=!1)}for(A={},S=p=0,U=r-1;0<=U?p<=U:p>=U;S=0<=U?++p:--p)A[S]=[];for(w=d=0,j=I-1;0<=j?d<=j:d>=j;w=0<=j?++d:--d)A[b=g[w]].push(rt[w]);for(J=[],S=f=0,G=r-1;0<=G?f<=G:f>=G;S=0<=G?++f:--f)J.push(A[S][0]),J.push(A[S][A[S].length-1]);for(J=J.sort(function(t,e){return t-e}),M.push(J[0]),w=m=1,V=J.length-1;m<=V;w=m+=2)tt=J[w],isNaN(tt)||-1!==M.indexOf(tt)||M.push(tt)}return M},ld=function(t,e,r){var i,n,o,a;return i=nf(arguments),t=i[0],e=i[1],r=i[2],isNaN(t)&&(t=0),t/=360,t<1/3?o=1-((n=(1-e)/3)+(a=(1+e*id(Gp*t)/id(Up-Gp*t))/3)):t<2/3?n=1-((a=(1-e)/3)+(o=(1+e*id(Gp*(t-=1/3))/id(Up-Gp*t))/3)):a=1-((o=(1-e)/3)+(n=(1+e*id(Gp*(t-=2/3))/id(Up-Gp*t))/3)),a=Ed(r*a*3),o=Ed(r*o*3),n=Ed(r*n*3),[255*a,255*o,255*n,i.length>3?i[3]:1]},Ud=function(){var t,e,r,i,n,o,a,s;return a=nf(arguments),o=a[0],e=a[1],t=a[2],Gp=2*Math.PI,o/=255,e/=255,t/=255,n=Math.min(o,e,t),i=(o+e+t)/3,s=1-n/i,0===s?r=0:(r=(o-e+(o-t))/2,r/=Math.sqrt((o-e)*(o-e)+(o-t)*(e-t)),r=Math.acos(r),t>e&&(r=Gp-r),r/=Gp),[360*r,s,i]},td.hsi=function(){return function(t,e,r){r.prototype=t.prototype;var i=new r,n=t.apply(i,e);return Object(n)===n?n:i}(kp,hf.call(arguments).concat([\"hsi\"]),function(){})},Hp.hsi=ld,kp.prototype.hsi=function(){return Ud(this._rgb)},gd=function(t,e,r,i){var n,o,a,s,c,u,h,l,p,d,f;return\"hsl\"===i?(d=t.hsl(),f=e.hsl()):\"hsv\"===i?(d=t.hsv(),f=e.hsv()):\"hcg\"===i?(d=t.hcg(),f=e.hcg()):\"hsi\"===i?(d=t.hsi(),f=e.hsi()):\"lch\"!==i&&\"hcl\"!==i||(i=\"hcl\",d=t.hcl(),f=e.hcl()),\"h\"===i.substr(0,1)&&(o=d[0],l=d[1],c=d[2],a=f[0],p=f[1],u=f[2]),isNaN(o)||isNaN(a)?isNaN(o)?isNaN(a)?n=Number.NaN:(n=a,1!==c&&0!==c||\"hsv\"===i||(h=p)):(n=o,1!==u&&0!==u||\"hsv\"===i||(h=l)):n=o+r*(a>o&&a-o>180?a-(o+360):a180?a+360-o:a-o),null==h&&(h=l+r*(p-l)),s=c+r*(u-c),td[i](n,h,s)},yd=function(t,e,r,i){var n,o;return n=t.num(),o=e.num(),td.num(n+(o-n)*r,\"num\")},(Wp=Wp.concat(function(){var t,e,r,i;for(i=[],e=0,t=(r=[\"hsv\",\"hsl\",\"hsi\",\"hcl\",\"lch\",\"hcg\"]).length;e>16&255)/255,e[r+1]=(t>>8&255)/255,e[r+2]=(255&t)/255,e},pf.prototype.atomColorToArray=function(t,e,r){return this.colorToArray(this.atomColor(t),e,r)},pf.prototype.bondColor=function(t,e){return this.atomProxy.index=e?t.atomIndex1:t.atomIndex2,this.atomColor(this.atomProxy)},pf.prototype.bondColorToArray=function(t,e,r,i){return this.colorToArray(this.bondColor(t,e),r,i)},pf.prototype.volumeColorToArray=function(t,e,r){return this.colorToArray(this.volumeColor(t),e,r)},pf.prototype.positionColorToArray=function(t,e,r){return this.colorToArray(this.positionColor(t),e,r)},ro.prototype={active:!0,params:null,execute:function(t){var e,r;return this.active&&this._listener&&(r=this.params?this.params.concat(t):t,e=this._listener.apply(this.context,r),this._isOnce&&this.detach()),e},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return\"[SignalBinding isOnce:\"+this._isOnce+\", isBound:\"+this.isBound()+\", active:\"+this.active+\"]\"}},no.prototype={VERSION:\"1.0.0\",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(t,e,r,i){var n,o=this._indexOfListener(t,r);if(-1!==o){if((n=this._bindings[o]).isOnce()!==e)throw new Error(\"You cannot add\"+(e?\"\":\"Once\")+\"() then add\"+(e?\"Once\":\"\")+\"() the same listener without removing the relationship first.\")}else n=new ro(this,t,e,r,i),this._addBinding(n);return this.memorize&&this._prevParams&&n.execute(this._prevParams),n},_addBinding:function(t){var e=this._bindings.length;do{--e}while(this._bindings[e]&&t._priority<=this._bindings[e]._priority);this._bindings.splice(e+1,0,t)},_indexOfListener:function(t,e){for(var r,i=this,n=this._bindings.length;n--;)if((r=i._bindings[n])._listener===t&&r.context===e)return n;return-1},has:function(t,e){return-1!==this._indexOfListener(t,e)},add:function(t,e,r){return io(t,\"add\"),this._registerListener(t,!1,e,r)},addOnce:function(t,e,r){return io(t,\"addOnce\"),this._registerListener(t,!0,e,r)},remove:function(t,e){io(t,\"remove\");var r=this._indexOfListener(t,e);return-1!==r&&(this._bindings[r]._destroy(),this._bindings.splice(r,1)),t},removeAll:function(){for(var t=this,e=this._bindings.length;e--;)t._bindings[e]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(t){if(this.active){var e,r=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=r),i){e=this._bindings.slice(),this._shouldPropagate=!0;do{i--}while(e[i]&&this._shouldPropagate&&!1!==e[i].execute(r))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return\"[Signal active:\"+this.active+\" numListeners:\"+this.getNumListeners()+\"]\"}};var df={PROTEIN:1,NUCLEIC:2,RNA:3,DNA:4,POLYMER:5,WATER:6,HELIX:7,SHEET:8,TURN:9,BACKBONE:10,SIDECHAIN:11,ALL:12,HETERO:13,ION:14,SACCHARIDE:15,SUGAR:15,BONDED:16,RING:17},ff=[\"*\",\"\",\"ALL\"],mf=[df.BACKBONE,df.SIDECHAIN,df.BONDED,df.RING],gf=[df.POLYMER,df.WATER],vf=[\"ALA\",\"GLY\",\"SER\"],yf=[\"CYS\",\"SER\",\"THR\"],bf=[\"ALA\",\"ILE\",\"LEU\",\"MET\",\"PHE\",\"PRO\",\"TRP\",\"VAL\"],xf=[\"PHE\",\"TRP\",\"TYR\",\"HIS\"],_f=[\"ASN\",\"GLN\"],wf=[\"ASP\",\"GLU\"],Sf=[\"ARG\",\"HIS\",\"LYS\"],Af=[\"ARG\",\"ASP\",\"GLU\",\"HIS\",\"LYS\"],Mf=[\"ASN\",\"ARG\",\"ASP\",\"CYS\",\"GLY\",\"GLN\",\"GLU\",\"HIS\",\"LYS\",\"SER\",\"THR\",\"TYR\"],Ef=[\"ALA\",\"ILE\",\"LEU\",\"MET\",\"PHE\",\"PRO\",\"TRP\",\"VAL\"],Tf=[\"HIS\",\"PHE\",\"PRO\",\"TRP\",\"TYR\"],Pf=[\"ALA\",\"GLY\",\"ILE\",\"LEU\",\"VAL\"],Cf=function(t){this.signals={stringChanged:new no},this.setString(t)},If={type:{}};If.type.get=function(){return\"selection\"},Cf.prototype.setString=function(t,e){if(void 0===t&&(t=this.string||\"\"),t!==this.string){try{this.selection=oo(t)}catch(t){this.selection={error:t.message}}var r=this.selection;this.string=t,this.test=po(r),this.residueTest=fo(r),this.chainTest=mo(r),this.modelTest=go(r),this.atomOnlyTest=po(r,!0),this.residueOnlyTest=fo(r,!0),this.chainOnlyTest=mo(r,!0),this.modelOnlyTest=go(r,!0),e||this.signals.stringChanged.dispatch(this.string)}},Object.defineProperties(Cf.prototype,If);var Rf=function(t){function e(e){var r=this;t.call(this,e);var i=e.dataList||[];this.colormakerList=[],this.selectionList=[],i.forEach(function(t){var e=t[0],i=t[1],n=t[2];void 0===n&&(n={}),Hf.hasScheme(e)?Object.assign(n,{scheme:e,structure:r.structure}):Object.assign(n,{scheme:\"uniform\",value:new tt(e).getHex()}),r.colormakerList.push(Hf.getScheme(n)),r.selectionList.push(new Cf(i))})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){for(var e=this,r=0,i=this.selectionList.length;ri).lines},tm.prototype.chunkCount=function(){return Math.floor(this.data.length/this.chunkSize)+1},tm.prototype.asText=function(){return this.isBinary()?In(this.data):this.data},tm.prototype.chunkToLines=function(t,e,r){var i=this.newline;if(!this.isBinary()&&t.length===this.data.length)return{lines:t.split(i),partialLine:\"\"};var n=[],o=this.isBinary()?In(t):t,a=o.lastIndexOf(i);if(-1===a)e+=o;else{var s=e+o.substr(0,a);n=n.concat(s.split(i)),e=a===o.length-i.length?\"\":o.substr(a+i.length)}return r&&\"\"!==e&&n.push(e),{lines:n,partialLine:e}},tm.prototype.nextChunk=function(){var t=this.__pointer;if(!(t>this.data.length))return this.__pointer+=this.chunkSize,this.chunk(t)},tm.prototype.nextChunkOfLines=function(){var t=this.nextChunk();if(void 0!==t){var e=this.__pointer>this.data.length,r=this.chunkToLines(t,this.__partialLine,e);return this.__partialLine=r.partialLine,r.lines}},tm.prototype.eachChunk=function(t){for(var e=this,r=this.chunkSize,i=this.data.length,n=this.chunkCount(),o=0;o>>0:0,o=t.byteLength-n,a=n;t.buffer&&(t.byteLength!==t.buffer.byteLength&&(a=t.byteOffset+n),t=t.buffer),this._lastWrittenByte=i?o:0,this.buffer=t,this.length=o,this.byteLength=o,this.byteOffset=a,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,a,o),this._mark=0,this._marks=[]};vm.prototype.available=function(t){return void 0===t&&(t=1),this.offset+t<=this.length},vm.prototype.isLittleEndian=function(){return this.littleEndian},vm.prototype.setLittleEndian=function(){return this.littleEndian=!0,this},vm.prototype.isBigEndian=function(){return!this.littleEndian},vm.prototype.setBigEndian=function(){return this.littleEndian=!1,this},vm.prototype.skip=function(t){return void 0===t&&(t=1),this.offset+=t,this},vm.prototype.seek=function(t){return this.offset=t,this},vm.prototype.mark=function(){return this._mark=this.offset,this},vm.prototype.reset=function(){return this.offset=this._mark,this},vm.prototype.pushMark=function(){return this._marks.push(this.offset),this},vm.prototype.popMark=function(){var t=this._marks.pop();if(void 0===t)throw new Error(\"Mark stack empty\");return this.seek(t),this},vm.prototype.rewind=function(){return this.offset=0,this},vm.prototype.ensureAvailable=function(t){if(void 0===t&&(t=1),!this.available(t)){var e=2*(this.offset+t),r=new Uint8Array(e);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=this.byteLength=e,this._data=new DataView(this.buffer)}return this},vm.prototype.readBoolean=function(){return 0!==this.readUint8()},vm.prototype.readInt8=function(){return this._data.getInt8(this.offset++)},vm.prototype.readUint8=function(){return this._data.getUint8(this.offset++)},vm.prototype.readByte=function(){return this.readUint8()},vm.prototype.readBytes=function(t){var e=this;void 0===t&&(t=1);for(var r=new Uint8Array(t),i=0;ithis._lastWrittenByte&&(this._lastWrittenByte=this.offset)};var ym=function(t){function e(e){t.call(this),this.surface=e,this._records=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mimeType:{},defaultName:{},defaultExt:{}};return r.mimeType.get=function(){return\"application/vnd.ms-pki.stl\"},r.defaultName.get=function(){return\"surface\"},r.defaultExt.get=function(){return\"stl\"},e.prototype.getData=function(){var t=this,e=this.surface.index.length/3,r=new vm(2*e+3*e*4*4+80+4);r.skip(80),r.writeUint32(e);for(var i=new g,n=new g,o=new g,a=new g,s=0;sthis.prevFpsTime+1e3&&(this.lastFps=this.frames,this.prevFpsTime=t,this.frames=0),t}},Yf.add(\"shader/chunk/dull_interior_fragment.glsl\",\"#ifdef DULL_INTERIOR\\nif( gl_FrontFacing == false ){\\nnormal = vec3( 0.0, 0.0, 0.4 );\\n}\\n#endif\"),Yf.add(\"shader/chunk/fog_fragment.glsl\",\"#ifdef USE_FOG\\nfloat depth = length( vViewPosition );\\n#ifdef FOG_EXP2\\nfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\\n#else\\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\\n#endif\\ngl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\"),Yf.add(\"shader/chunk/matrix_scale.glsl\",\"float matrixScale( in mat4 m ){\\nvec4 r = m[ 0 ];\\nreturn sqrt( r[ 0 ] * r[ 0 ] + r[ 1 ] * r[ 1 ] + r[ 2 ] * r[ 2 ] );\\n}\"),Yf.add(\"shader/chunk/nearclip_vertex.glsl\",\"#ifdef NEAR_CLIP\\nif( vViewPosition.z < nearClip - 5.0 )\\ngl_Position.z = 2.0 * gl_Position.w;\\n#endif\"),Yf.add(\"shader/chunk/nearclip_fragment.glsl\",\"#ifdef NEAR_CLIP\\nif( vViewPosition.z < nearClip )\\ndiscard;\\n#endif\"),Yf.add(\"shader/chunk/opaque_back_fragment.glsl\",\"#ifdef OPAQUE_BACK\\n#ifdef FLIP_SIDED\\nif( gl_FrontFacing == true ){\\ngl_FragColor.a = 1.0;\\n}\\n#else\\nif( gl_FrontFacing == false ){\\ngl_FragColor.a = 1.0;\\n}\\n#endif\\n#endif\"),Yf.add(\"shader/chunk/radiusclip_vertex.glsl\",\"#ifdef RADIUS_CLIP\\nif( distance( vViewPosition, vClipCenter ) > clipRadius + 5.0 )\\ngl_Position.z = 2.0 * gl_Position.w;\\n#endif\"),Yf.add(\"shader/chunk/radiusclip_fragment.glsl\",\"#ifdef RADIUS_CLIP\\nif( distance( vViewPosition, vClipCenter ) > clipRadius )\\ndiscard;\\n#endif\"),Yf.add(\"shader/chunk/unpack_color.glsl\",\"vec3 unpackColor(float f) {\\nvec3 color;\\ncolor.r = floor(f / 256.0 / 256.0);\\ncolor.g = floor((f - color.r * 256.0 * 256.0) / 256.0);\\ncolor.b = floor(f - color.r * 256.0 * 256.0 - color.g * 256.0);\\nreturn color / 255.0;\\n}\");var xm=/^(?!\\/\\/)\\s*#include\\s+(\\S+)/gim,_m={};if(\"undefined\"!=typeof window&&window.WebGLRenderingContext){var wm=window.WebGLRenderingContext.prototype,Sm=wm.getShaderParameter;wm.getShaderParameter=function(){return!t.Debug||Sm.apply(this,arguments)};var Am=wm.getShaderInfoLog;wm.getShaderInfoLog=function(){return t.Debug?Am.apply(this,arguments):\"\"};var Mm=wm.getProgramParameter;wm.getProgramParameter=function(e,r){return!t.Debug&&r===wm.LINK_STATUS||Mm.apply(this,arguments)};var Em=wm.getProgramInfoLog;wm.getProgramInfoLog=function(){return t.Debug?Em.apply(this,arguments):\"\"}}var Tm=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];Tm.forEach(function(t){t.forEach(function(t){t[0]*=.0625,t[1]*=.0625})}),Lo.prototype.constructor=Lo;var Pm=2*Math.PI,Cm=(new Float32Array(4),new Float32Array(4),new g),Im=new v,Rm=new v,Lm=new v,Om=new v,Dm=new Float32Array(4),Nm=new Uint8Array(4),km=new v;ea.prototype.constructor=ea;var Fm=function(t,e){this.signals={moved:new no,scrolled:new no,dragged:new no,dropped:new no,clicked:new no,hovered:new no,doubleClicked:new no};var r=Object.assign({},e);this.hoverTimeout=gn(r.hoverTimeout,50),this.handleScroll=gn(r.handleScroll,!0),this.doubleClickSpeed=gn(r.doubleClickSpeed,500),this.domElement=t,this.position=new l,this.prevPosition=new l,this.down=new l,this.canvasPosition=new l,this.moving=!1,this.hovering=!0,this.scrolled=!1,this.lastMoved=1/0,this.which=void 0,this.buttons=void 0,this.pressed=void 0,this.altKey=void 0,this.ctrlKey=void 0,this.metaKey=void 0,this.shiftKey=void 0,this._listen=this._listen.bind(this),this._onMousewheel=this._onMousewheel.bind(this),this._onMousemove=this._onMousemove.bind(this),this._onMousedown=this._onMousedown.bind(this),this._onMouseup=this._onMouseup.bind(this),this._onContextmenu=this._onContextmenu.bind(this),this._onTouchstart=this._onTouchstart.bind(this),this._onTouchend=this._onTouchend.bind(this),this._onTouchmove=this._onTouchmove.bind(this),this._listen(),document.addEventListener(\"mousewheel\",this._onMousewheel),document.addEventListener(\"wheel\",this._onMousewheel),document.addEventListener(\"MozMousePixelScroll\",this._onMousewheel),document.addEventListener(\"mousemove\",this._onMousemove),document.addEventListener(\"mousedown\",this._onMousedown),document.addEventListener(\"mouseup\",this._onMouseup),document.addEventListener(\"contextmenu\",this._onContextmenu),document.addEventListener(\"touchstart\",this._onTouchstart),document.addEventListener(\"touchend\",this._onTouchend),document.addEventListener(\"touchmove\",this._onTouchmove),this.prevClickCP=new l},Bm={key:{}};Bm.key.get=function(){var t=0;return this.altKey&&(t+=1),this.ctrlKey&&(t+=2),this.metaKey&&(t+=4),this.shiftKey&&(t+=8),t},Fm.prototype.setParameters=function(t){var e=Object.assign({},t);this.hoverTimeout=gn(e.hoverTimeout,this.hoverTimeout)},Fm.prototype._listen=function(){var t=window.performance.now(),e=this.canvasPosition;this.doubleClickPending&&t-this.lastClicked>this.doubleClickSpeed&&(this.doubleClickPending=!1),t-this.lastMoved>this.hoverTimeout&&(this.moving=!1),(this.scrolled||!this.moving&&!this.hovering)&&(this.scrolled=!1,-1!==this.hoverTimeout&&this.overElement&&(this.hovering=!0,this.signals.hovered.dispatch(e.x,e.y))),window.requestAnimationFrame(this._listen)},Fm.prototype._onMousewheel=function(t){var e=this;if(t.target===this.domElement&&this.handleScroll){t.preventDefault(),this._setKeys(t);var r=0;r=t.wheelDelta?t.wheelDelta/40:t.detail?-t.detail/3:-t.deltaY/(t.deltaMode?.33:30),this.signals.scrolled.dispatch(r),setTimeout(function(){e.scrolled=!0},this.hoverTimeout)}},Fm.prototype._onMousemove=function(t){t.target===this.domElement?(t.preventDefault(),this.overElement=!0):this.overElement=!1,this._setKeys(t),this.moving=!0,this.hovering=!1,this.lastMoved=window.performance.now(),this.prevPosition.copy(this.position),this.position.set(t.clientX,t.clientY),this._setCanvasPosition(t);var e=this.prevPosition.x-this.position.x,r=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(e,r),this.pressed&&this.signals.dragged.dispatch(e,r)},Fm.prototype._onMousedown=function(t){t.target===this.domElement&&(t.preventDefault(),this._setKeys(t),this.moving=!1,this.hovering=!1,this.down.set(t.clientX,t.clientY),this.position.set(t.clientX,t.clientY),this.which=t.which,this.buttons=ia(t),this.pressed=!0,this._setCanvasPosition(t))},Fm.prototype._onMouseup=function(t){t.target===this.domElement&&t.preventDefault(),this._setKeys(t);var e=this.canvasPosition;this._distance()<4&&(this.lastClicked=window.performance.now(),this.doubleClickPending&&this.prevClickCP.distanceTo(e)<4?(this.signals.doubleClicked.dispatch(e.x,e.y),this.doubleClickPending=!1):(this.signals.clicked.dispatch(e.x,e.y),this.doubleClickPending=!0),this.prevClickCP.copy(e)),this.which=void 0,this.buttons=void 0,this.pressed=void 0},Fm.prototype._onContextmenu=function(t){t.target===this.domElement&&t.preventDefault()},Fm.prototype._onTouchstart=function(t){if(t.target===this.domElement)switch(t.preventDefault(),this.pressed=!0,t.touches.length){case 1:this.moving=!1,this.hovering=!1,this.down.set(t.touches[0].pageX,t.touches[0].pageY),this.position.set(t.touches[0].pageX,t.touches[0].pageY),this._setCanvasPosition(t.touches[0]);break;case 2:this.down.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),this.position.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),this.lastTouchDistance=ra(t)}},Fm.prototype._onTouchend=function(t){t.target===this.domElement&&t.preventDefault(),this.which=void 0,this.buttons=void 0,this.pressed=void 0},Fm.prototype._onTouchmove=function(t){switch(t.target===this.domElement?(t.preventDefault(),this.overElement=!0):this.overElement=!1,t.touches.length){case 1:this._setKeys(t),this.which=1,this.buttons=1,this.moving=!0,this.hovering=!1,this.lastMoved=window.performance.now(),this.prevPosition.copy(this.position),this.position.set(t.touches[0].pageX,t.touches[0].pageY),this._setCanvasPosition(t.touches[0]);var e=this.prevPosition.x-this.position.x,r=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(e,r),this.pressed&&this.signals.dragged.dispatch(e,r);break;case 2:var i=ra(t),n=i-this.lastTouchDistance;if(this.lastTouchDistance=i,this.prevPosition.copy(this.position),this.position.set((t.touches[0].pageX+t.touches[1].pageX)/2,(t.touches[0].pageY+t.touches[1].pageY)/2),Math.abs(n)>2&&this.handleScroll&&this.position.distanceTo(this.prevPosition)<2)this.which=0,this.buttons=0,this.signals.scrolled.dispatch(n/2);else{this.which=3,this.buttons=2;var o=this.prevPosition.x-this.position.x,a=this.prevPosition.y-this.position.y;this.signals.moved.dispatch(o,a),this.pressed&&this.signals.dragged.dispatch(o,a)}}},Fm.prototype._distance=function(){return this.position.distanceTo(this.down)},Fm.prototype._setCanvasPosition=function(t){var e,r,i=this.domElement.getBoundingClientRect();\"offsetX\"in t&&\"offsetY\"in t?(e=t.offsetX,r=t.offsetY):(e=t.clientX-i.left,r=t.clientY-i.top),this.canvasPosition.set(e,i.height-r)},Fm.prototype._setKeys=function(t){this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey},Fm.prototype.dispose=function(){document.removeEventListener(\"mousewheel\",this._onMousewheel),document.removeEventListener(\"wheel\",this._onMousewheel),document.removeEventListener(\"MozMousePixelScroll\",this._onMousewheel),document.removeEventListener(\"mousemove\",this._onMousemove),document.removeEventListener(\"mousedown\",this._onMousedown),document.removeEventListener(\"mouseup\",this._onMouseup),document.removeEventListener(\"contextmenu\",this._onContextmenu),document.removeEventListener(\"touchstart\",this._onTouchstart),document.removeEventListener(\"touchend\",this._onTouchend),document.removeEventListener(\"touchmove\",this._onTouchmove)},Object.defineProperties(Fm.prototype,Bm);var zm=new v,Um=new v,jm=new v,Gm=new g,Vm=new m,$m=new v,Hm=new g,Wm=new g,Xm=function(t,e){var r=e||{};this.rotateSpeed=gn(r.rotateSpeed,2),this.zoomSpeed=gn(r.zoomSpeed,1.2),this.panSpeed=gn(r.panSpeed,1),this.stage=t,this.viewer=t.viewer,this.mouse=t.mouseObserver,this.controls=t.viewerControls},qm={component:{},atom:{}};qm.component.get=function(){return this.stage.transformComponent},qm.atom.get=function(){return this.stage.transformAtom},Xm.prototype._setPanVector=function(t,e,r){var i,n=this.viewer.camera;if(r=-r||0,r+=n.position.z,\"OrthographicCamera\"===n.type)i=1/n.zoom;else{var o=$n(n.fov);i=-2*r*Math.tan(o/2)/this.viewer.height}Hm.set(t,e,0),Hm.multiplyScalar(this.panSpeed*i)},Xm.prototype._getRotateXY=function(t,e){return[this.rotateSpeed*-t*.01,this.rotateSpeed*e*.01]},Xm.prototype._transformPanVector=function(){$m.extractRotation(this.component.transform),$m.premultiply(this.viewer.rotationGroup.matrix),$m.getInverse($m),Hm.applyMatrix4($m)},Xm.prototype.zoom=function(t){this.controls.zoom(this.zoomSpeed*t*.02)},Xm.prototype.pan=function(t,e){this._setPanVector(t,e),$m.getInverse(this.viewer.rotationGroup.matrix),Hm.applyMatrix4($m),this.controls.translate(Hm)},Xm.prototype.panComponent=function(t,e){this.component&&(this._setPanVector(t,e),this._transformPanVector(),this.component.position.add(Hm),this.component.updateMatrix())},Xm.prototype.panAtom=function(t,e){this.atom&&this.component&&(this.atom.positionToVector3(Wm),Wm.add(this.viewer.translationGroup.position),Wm.applyMatrix4(this.viewer.rotationGroup.matrix),this._setPanVector(t,e,Wm.z),this._transformPanVector(),this.atom.positionAdd(Hm),this.component.updateRepresentations({position:!0}))},Xm.prototype.rotate=function(t,e){var r=this._getRotateXY(t,e),i=r[0],n=r[1];zm.makeRotationX(n),Um.makeRotationY(i),zm.multiply(Um),this.controls.applyMatrix(zm)},Xm.prototype.rotateComponent=function(t,e){if(this.component){var r=this._getRotateXY(t,e),i=r[0],n=r[1];jm.extractRotation(this.component.transform),jm.premultiply(this.viewer.rotationGroup.matrix),jm.getInverse(jm),Gm.set(1,0,0),Gm.applyMatrix4(jm),zm.makeRotationAxis(Gm,n),Gm.set(0,1,0),Gm.applyMatrix4(jm),Um.makeRotationAxis(Gm,i),zm.multiply(Um),Vm.setFromRotationMatrix(zm),this.component.quaternion.premultiply(Vm),this.component.updateMatrix()}},Object.defineProperties(Xm.prototype,qm);var Ym=function(t,e){this.pid=t.pid,this.picker=t.picker,this.instance=t.instance,this.stage=e,this.controls=e.viewerControls,this.mouse=e.mouseObserver},Zm={type:{},altKey:{},ctrlKey:{},metaKey:{},shiftKey:{},canvasPosition:{},component:{},object:{},position:{},closestBondAtom:{},arrow:{},atom:{},axes:{},bond:{},box:{},cone:{},clash:{},contact:{},cylinder:{},distance:{},ellipsoid:{},octahedron:{},mesh:{},slice:{},sphere:{},tetrahedron:{},torus:{},surface:{},unitcell:{},unknown:{},volume:{}};Zm.type.get=function(){return this.picker.type},Zm.altKey.get=function(){return this.mouse.altKey},Zm.ctrlKey.get=function(){return this.mouse.ctrlKey},Zm.metaKey.get=function(){return this.mouse.metaKey},Zm.shiftKey.get=function(){return this.mouse.shiftKey},Zm.canvasPosition.get=function(){return this.mouse.canvasPosition},Zm.component.get=function(){return this.stage.getComponentsByObject(this.picker.data).list[0]},Zm.object.get=function(){return this.picker.getObject(this.pid)},Zm.position.get=function(){return this.picker.getPosition(this.pid,this.instance,this.component)},Zm.closestBondAtom.get=function(){if(\"bond\"===this.type){var t=this.bond,e=this.controls;return na(this.canvasPosition,e.getPositionOnCanvas(t.atom1),e.getPositionOnCanvas(t.atom2))?t.atom1:t.atom2}},Zm.arrow.get=function(){return this._objectIfType(\"arrow\")},Zm.atom.get=function(){return this._objectIfType(\"atom\")},Zm.axes.get=function(){return this._objectIfType(\"axes\")},Zm.bond.get=function(){return this._objectIfType(\"bond\")},Zm.box.get=function(){return this._objectIfType(\"box\")},Zm.cone.get=function(){return this._objectIfType(\"cone\")},Zm.clash.get=function(){return this._objectIfType(\"clash\")},Zm.contact.get=function(){return this._objectIfType(\"contact\")},Zm.cylinder.get=function(){return this._objectIfType(\"cylinder\")},Zm.distance.get=function(){return this._objectIfType(\"distance\")},Zm.ellipsoid.get=function(){return this._objectIfType(\"ellipsoid\")},Zm.octahedron.get=function(){return this._objectIfType(\"octahedron\")},Zm.mesh.get=function(){return this._objectIfType(\"mesh\")},Zm.slice.get=function(){return this._objectIfType(\"slice\")},Zm.sphere.get=function(){return this._objectIfType(\"sphere\")},Zm.tetrahedron.get=function(){return this._objectIfType(\"tetrahedron\")},Zm.torus.get=function(){return this._objectIfType(\"torus\")},Zm.surface.get=function(){return this._objectIfType(\"surface\")},Zm.unitcell.get=function(){return this._objectIfType(\"unitcell\")},Zm.unknown.get=function(){return this._objectIfType(\"unknown\")},Zm.volume.get=function(){return this._objectIfType(\"volume\")},Ym.prototype._objectIfType=function(t){return this.type===t?this.object:void 0},Ym.prototype.getLabel=function(){var t=\"nothing\";return this.arrow?t=\"arrow: \"+(this.arrow.name||this.pid)+\" (\"+this.arrow.shape.name+\")\":this.atom?t=\"atom: \"+this.atom.qualifiedName()+\" (\"+this.atom.structure.name+\")\":this.axes?t=\"axes\":this.bond?t=\"bond: \"+this.bond.atom1.qualifiedName()+\" - \"+this.bond.atom2.qualifiedName()+\" (\"+this.bond.structure.name+\")\":this.box?t=\"box: \"+(this.box.name||this.pid)+\" (\"+this.box.shape.name+\")\":this.cone?t=\"cone: \"+(this.cone.name||this.pid)+\" (\"+this.cone.shape.name+\")\":this.clash?t=\"clash: \"+this.clash.clash.sele1+\" - \"+this.clash.clash.sele2:this.contact?t=\"contact: \"+this.contact.atom1.qualifiedName()+\" - \"+this.contact.atom2.qualifiedName()+\" (\"+this.contact.structure.name+\")\":this.cylinder?t=\"cylinder: \"+(this.cylinder.name||this.pid)+\" (\"+this.cylinder.shape.name+\")\":this.distance?t=\"distance: \"+this.distance.atom1.qualifiedName()+\" - \"+this.distance.atom2.qualifiedName()+\" (\"+this.distance.structure.name+\")\":this.ellipsoid?t=\"ellipsoid: \"+(this.ellipsoid.name||this.pid)+\" (\"+this.ellipsoid.shape.name+\")\":this.octahedron?t=\"octahedron: \"+(this.octahedron.name||this.pid)+\" (\"+this.octahedron.shape.name+\")\":this.mesh?t=\"mesh: \"+(this.mesh.name||this.mesh.serial)+\" (\"+this.mesh.shape.name+\")\":this.slice?t=\"slice: \"+this.slice.value.toPrecision(3)+\" (\"+this.slice.volume.name+\")\":this.sphere?t=\"sphere: \"+(this.sphere.name||this.pid)+\" (\"+this.sphere.shape.name+\")\":this.surface?t=\"surface: \"+this.surface.surface.name:this.tetrahedron?t=\"tetrahedron: \"+(this.tetrahedron.name||this.pid)+\" (\"+this.tetrahedron.shape.name+\")\":this.torus?t=\"torus: \"+(this.torus.name||this.pid)+\" (\"+this.torus.shape.name+\")\":this.unitcell?t=\"unitcell: \"+this.unitcell.unitcell.spacegroup+\" (\"+this.unitcell.structure.name+\")\":this.unknown?t=\"unknown\":this.volume&&(t=\"volume: \"+this.volume.value.toPrecision(3)+\" (\"+this.volume.volume.name+\")\"),t},Object.defineProperties(Ym.prototype,Zm);var Km=function(t){this.stage=t,this.viewer=t.viewer};Km.prototype.pick=function(t,e){var r=this.viewer.pick(t,e);if(r.picker&&\"ignore\"!==r.picker.type&&void 0!==r.pid){var i=r.picker.array;if(!(i&&r.pid>=i.length))return new Ym(r,this.stage);console.error(\"pid >= picker.array.length\")}};var Qm=new m,Jm=new g,tg=new g,eg=new g,rg=new g,ig=new v,ng=new g,og=new v,ag=function(t){this.stage=t,this.viewer=t.viewer,this.signals={changed:new no}},sg={position:{},rotation:{}};sg.position.get=function(){return this.viewer.translationGroup.position},sg.rotation.get=function(){return this.viewer.rotationGroup.quaternion},ag.prototype.changed=function(){this.viewer.requestRender(),this.signals.changed.dispatch()},ag.prototype.getPositionOnCanvas=function(t,e){var r=Bn(e),i=this.viewer;return eg.copy(t).add(i.translationGroup.position).applyMatrix4(i.rotationGroup.matrix).project(i.camera),r.set((eg.x+1)*i.width/2,(eg.y+1)*i.height/2)},ag.prototype.getOrientation=function(t){var e=Un(t);e.copy(this.viewer.rotationGroup.matrix);var r=-this.viewer.camera.position.z;return e.scale(rg.set(r,r,r)),e.setPosition(this.viewer.translationGroup.position),e},ag.prototype.orient=function(t){Un(t).decompose(Jm,Qm,tg);var e=this.viewer;e.rotationGroup.setRotationFromQuaternion(Qm),e.translationGroup.position.copy(Jm),e.camera.position.z=-tg.z,e.updateZoom(),this.changed()},ag.prototype.translate=function(t){this.viewer.translationGroup.position.add(zn(t)),this.changed()},ag.prototype.center=function(t){this.viewer.translationGroup.position.copy(zn(t)).negate(),this.changed()},ag.prototype.zoom=function(t){this.distance(this.viewer.camera.position.z*(1-t))},ag.prototype.distance=function(t){this.viewer.camera.position.z=t,this.viewer.updateZoom(),this.changed()},ag.prototype.spin=function(t,e){ig.getInverse(this.viewer.rotationGroup.matrix),ng.copy(zn(t)).applyMatrix4(ig),this.viewer.rotationGroup.rotateOnAxis(ng,e),this.changed()},ag.prototype.rotate=function(t){this.viewer.rotationGroup.setRotationFromQuaternion(jn(t)),this.changed()},ag.prototype.align=function(t){og.getInverse(Un(t)),this.viewer.rotationGroup.setRotationFromMatrix(og),this.changed()},ag.prototype.applyMatrix=function(t){this.viewer.rotationGroup.applyMatrix(Un(t)),this.changed()},Object.defineProperties(ag.prototype,sg);var cg=function(t,e){for(var r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];this.duration=gn(t,1e3),this.controls=e,this.startTime=window.performance.now(),this.pausedTime=-1,this.elapsedDuration=0,this.pausedDuration=0,this.ignoreGlobalToggle=!1,this._paused=!1,this._resolveList=[],(n=this)._init.apply(n,r);var n},ug={done:{},paused:{}};ug.done.get=function(){return 1===this.alpha},ug.paused.get=function(){return this._paused},cg.prototype._init=function(){},cg.prototype._tick=function(){},cg.prototype.tick=function(t){if(!this._paused)return this.elapsedDuration=t.currentTime-this.startTime-this.pausedDuration,0===this.duration?this.alpha=1:this.alpha=to(0,1,this.elapsedDuration/this.duration),this._tick(t),this.done&&this._resolveList.forEach(function(t){return t()}),this.done},cg.prototype.pause=function(t){t&&(this._hold=!0),-1===this.pausedTime&&(this.pausedTime=window.performance.now()),this._paused=!0},cg.prototype.resume=function(t){!t&&this._hold||(this.pausedDuration+=window.performance.now()-this.pausedTime,this._paused=!1,this._hold=!1,this.pausedTime=-1)},cg.prototype.toggle=function(){this._paused?this.resume():this.pause()},cg.prototype.then=function(t){var e=this;return(this.done?Promise.resolve():new Promise(function(t){return e._resolveList.push(t)})).then(t)},Object.defineProperties(cg.prototype,ug);var hg=function(t){function e(e){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];t.apply(this,[gn(e,1/0)].concat(r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){Array.isArray(t)?this.axis=(new g).fromArray(t):this.axis=gn(t,new g(0,1,0)),this.angle=gn(e,.01)},e.prototype._tick=function(t){this.axis&&this.angle&&this.controls.spin(this.axis,this.angle*t.lastDuration/16)},e}(cg),lg=function(t){function e(e){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];t.apply(this,[gn(e,1/0)].concat(r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e,r){Array.isArray(t)?this.axis=(new g).fromArray(t):this.axis=gn(t,new g(0,1,0)),this.angleStep=gn(e,.01),this.angleEnd=gn(r,.2),this.angleSum=0,this.direction=1},e.prototype._tick=function(t){if(this.axis&&this.angleStep&&this.angleEnd){var e=to(0,1,Math.abs(this.angleSum)/this.angleEnd),r=this.angleStep*this.direction*(1.1-e);this.controls.spin(this.axis,r*t.lastDuration/16),this.angleSum+=this.angleStep,this.angleSum>=this.angleEnd&&(this.direction*=-1,this.angleSum=-this.angleEnd)}},e}(cg),pg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.moveFrom=zn(gn(t,new g)),this.moveTo=zn(gn(e,new g))},e.prototype._tick=function(){this.controls.position.lerpVectors(this.moveFrom,this.moveTo,this.alpha).negate(),this.controls.changed()},e}(cg),dg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.zoomFrom=t,this.zoomTo=e},e.prototype._tick=function(){this.controls.distance(Qn(this.zoomFrom,this.zoomTo,this.alpha))},e}(cg),fg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e){this.rotateFrom=jn(t),this.rotateTo=jn(e),this._currentRotation=new m},e.prototype._tick=function(){this._currentRotation.copy(this.rotateFrom).slerp(this.rotateTo,this.alpha),this.controls.rotate(this._currentRotation)},e}(cg),mg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t,e,r){this.valueFrom=t,this.valueTo=e,this.callback=r},e.prototype._tick=function(){this.callback(Qn(this.valueFrom,this.valueTo,this.alpha))},e}(cg),gg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._init=function(t){this.callback=t},e.prototype._tick=function(){1===this.alpha&&this.callback()},e}(cg),vg=function(t){this._list=t||[],this._resolveList=[]},yg={done:{}};yg.done.get=function(){return this._list.every(function(t){return t.done})},vg.prototype.then=function(t){var e=this;return(this.done?Promise.resolve():new Promise(function(t){e._resolveList.push(t),e._list.forEach(function(t){t.then(function(){e._resolveList.forEach(function(t){t()}),e._resolveList.length=0})})})).then(t)},Object.defineProperties(vg.prototype,yg);var bg=function(t){this.stage=t,this.viewer=t.viewer,this.controls=t.viewerControls,this.animationList=[],this.finishedList=[]},xg={paused:{}};xg.paused.get=function(){return this.animationList.every(function(t){return t.paused})},bg.prototype.add=function(t){return 0===t.duration?t.tick(this.viewer.stats):this.animationList.push(t),t},bg.prototype.remove=function(t){var e=this.animationList,r=e.indexOf(t);r>-1&&e.splice(r,1)},bg.prototype.run=function(t){for(var e=this,r=this.finishedList,i=this.animationList,n=i.length,o=0;o0;)r[i]=arguments[i+1];if(!this.disabled){var n=this.mouse.key||0,o=this.mouse.buttons||0;this.actionList.forEach(function(i){i.type===t&&i.key===n&&i.button===o&&i.callback.apply(i,[e.stage].concat(r))})}},Sg.prototype.add=function(t,e){var r=oa(t),i=r[0],n=r[1],o=r[2];this.actionList.push({type:i,key:n,button:o,callback:e})},Sg.prototype.remove=function(t,e){var r=t.includes(\"*\"),i=oa(t),n=i[0],o=i[1],a=i[2],s=this.actionList.filter(function(t){return!((t.type===n||r&&\"\"===n)&&(t.key===o||r&&0===o)&&(t.button===a||r&&0===a)&&(t.callback===e||void 0===e))});this.actionList=s},Sg.prototype.preset=function(t){var e=this;this.clear(),(wg[t]||[]).forEach(function(t){return(r=e).add.apply(r,t);var r})},Sg.prototype.clear=function(){this.actionList.length=0};var Ag=function(){};Ag.autoView=function(t){t.autoView(1e3)},Ag.toggleAnimations=function(t){t.animationControls.toggle()},Ag.toggleRock=function(t){t.toggleRock()};var Mg={default:[[\"i\",Ag.toggleSpin=function(t){t.toggleSpin()}],[\"k\",Ag.toggleRock],[\"p\",Ag.toggleAnimations],[\"r\",Ag.autoView]]},Eg=function(t,e){var r=e||{};this.stage=t,this.actionList=[],this.disabled=r.disabled||!1,this.preset(r.preset||\"default\")};Eg.prototype.run=function(t){var e=this;this.disabled||this.actionList.forEach(function(r){r.keyCode===t&&r.callback(e.stage)})},Eg.prototype.add=function(t,e){var r=t.charCodeAt(0);this.actionList.push({keyCode:r,callback:e})},Eg.prototype.remove=function(t,e){var r=t.charCodeAt(0),i=this.actionList.filter(function(t){return!(t.keyCode===r&&(t.callback===e||void 0===e))});this.actionList=i},Eg.prototype.preset=function(t){var e=this;this.clear(),(Mg[t]||[]).forEach(function(t){return(r=e).add.apply(r,t);var r})},Eg.prototype.clear=function(){this.actionList.length=0};var Tg=function(t){this.stage=t,this.mouse=t.mouseObserver,this.controls=t.mouseControls,this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this)};Tg.prototype._onClick=function(t,e){var r=this.stage.pickingControls.pick(t,e);this.stage.signals.clicked.dispatch(r),this.controls.run(\"clickPick\",r)},Tg.prototype._onHover=function(t,e){var r=this.stage.pickingControls.pick(t,e);r&&this.mouse.down.equals(this.mouse.position)&&(this.stage.transformComponent=r.component,this.stage.transformAtom=r.atom),this.stage.signals.hovered.dispatch(r),this.controls.run(\"hoverPick\",r)},Tg.prototype.dispose=function(){this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var Pg=function(t){this.stage=t,this.mouse=t.mouseObserver,this.controls=t.mouseControls,this.mouse.signals.moved.add(this._onMove,this),this.mouse.signals.scrolled.add(this._onScroll,this),this.mouse.signals.dragged.add(this._onDrag,this),this.mouse.signals.clicked.add(this._onClick,this),this.mouse.signals.hovered.add(this._onHover,this),this.mouse.signals.doubleClicked.add(this._onDblclick,this)};Pg.prototype._onMove=function(){this.stage.tooltip.style.display=\"none\"},Pg.prototype._onScroll=function(t){this.controls.run(\"scroll\",t)},Pg.prototype._onDrag=function(t,e){this.controls.run(\"drag\",t,e)},Pg.prototype._onClick=function(t,e){this.controls.run(\"click\",t,e)},Pg.prototype._onDblclick=function(t,e){this.controls.run(\"doubleClick\",t,e)},Pg.prototype._onHover=function(t,e){this.controls.run(\"hover\",t,e)},Pg.prototype.dispose=function(){this.mouse.signals.moved.remove(this._onMove,this),this.mouse.signals.scrolled.remove(this._onScroll,this),this.mouse.signals.dragged.remove(this._onDrag,this),this.mouse.signals.clicked.remove(this._onClick,this),this.mouse.signals.hovered.remove(this._onHover,this)};var Cg=function(t){this.viewer=t.viewer,this.animationControls=t.animationControls,this.viewer.signals.ticked.add(this._onTick,this)};Cg.prototype._onTick=function(t){this.animationControls.run(t)},Cg.prototype.dispose=function(){this.viewer.signals.ticked.remove(this._onTick,this)};var Ig=function(t){this.stage=t,this.controls=t.keyControls,this.domElement=t.viewer.renderer.domElement,this.domElement.setAttribute(\"tabIndex\",\"-1\"),this.domElement.style.outline=\"none\",this.domElement.autofocus=!0,this.domElement.focus(),this._focusDomElement=this._focusDomElement.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this),this._onKeypress=this._onKeypress.bind(this),this.domElement.addEventListener(\"mousedown\",this._focusDomElement),this.domElement.addEventListener(\"touchstart\",this._focusDomElement),this.domElement.addEventListener(\"keydown\",this._onKeydown),this.domElement.addEventListener(\"keyup\",this._onKeyup),this.domElement.addEventListener(\"keypress\",this._onKeypress)};Ig.prototype._onKeydown=function(){},Ig.prototype._onKeyup=function(){},Ig.prototype._onKeypress=function(t){this.controls.run(t.keyCode)},Ig.prototype._focusDomElement=function(){this.domElement.focus()},Ig.prototype.dispose=function(){this.domElement.removeEventListener(\"mousedown\",this._focusDomElement),this.domElement.removeEventListener(\"touchstart\",this._focusDomElement),this.domElement.removeEventListener(\"keydown\",this._onKeypress),this.domElement.removeEventListener(\"keyup\",this._onKeypress),this.domElement.removeEventListener(\"keypress\",this._onKeypress)};var Rg=function(t,e,r,i){var n=i||{};this.offsetX=gn(n.offsetX,0),this.offsetY=gn(n.offsetY,0),this.visible=gn(n.visible,!0),this.component=t,this.stage=t.stage,this.viewer=this.stage.viewer,this.position=e,this._viewerPosition=new g,this._updateViewerPosition(),this._canvasPosition=new g,this._cameraPosition=new g,this.element=document.createElement(\"div\"),Object.assign(this.element.style,{display:\"block\",position:\"fixed\",zIndex:1+(parseInt(this.viewer.container.style.zIndex)||0),pointerEvents:\"none\",backgroundColor:\"rgba( 0, 0, 0, 0.6 )\",color:\"lightgrey\",padding:\"8px\",fontFamily:\"sans-serif\",left:\"-10000px\"}),this.viewer.container.appendChild(this.element),this.setContent(r),this.updateVisibility(),this.viewer.signals.ticked.add(this._update,this),this.component.signals.matrixChanged.add(this._updateViewerPosition,this)};Rg.prototype.setContent=function(t){var e=this.element.style.display;\"none\"===e&&(this.element.style.left=\"-10000px\",this.element.style.display=\"block\"),t instanceof window.Element?(this.element.innerHTML=\"\",this.element.appendChild(t)):this.element.innerHTML=t,this._clientRect=this.element.getBoundingClientRect(),\"none\"===e&&(this.element.style.display=e)},Rg.prototype.setVisibility=function(t){this.visible=t,this.updateVisibility()},Rg.prototype.getVisibility=function(){return this.visible&&this.component.visible},Rg.prototype.updateVisibility=function(){this.element.style.display=this.getVisibility()?\"block\":\"none\"},Rg.prototype._updateViewerPosition=function(){this._viewerPosition.copy(this.position).applyMatrix4(this.component.matrix)},Rg.prototype._update=function(){if(this.getVisibility()){var t=this.element.style,e=this._canvasPosition,r=this._viewerPosition,i=this._clientRect;if(this._cameraPosition.copy(r).add(this.viewer.translationGroup.position).applyMatrix4(this.viewer.rotationGroup.matrix).sub(this.viewer.camera.position),this._cameraPosition.z<0)return void(t.display=\"none\");t.display=\"block\",t.opacity=1-to(this.viewer.scene.fog.near,this.viewer.scene.fog.far,this._cameraPosition.length()),this.stage.viewerControls.getPositionOnCanvas(r,e),t.bottom=this.offsetX+e.y+i.height/2+\"px\",t.left=this.offsetY+e.x-i.width/2+\"px\"}},Rg.prototype.dispose=function(){this.viewer.container.removeChild(this.element),this.viewer.signals.ticked.remove(this._update,this),this.component.signals.matrixChanged.remove(this._updateViewerPosition,this)};var Lg=new v,Og=new g,Dg=new m,Ng=function(t){this.component=t,this.stage=t.stage,this.viewer=t.stage.viewer,this.signals={changed:new no}},kg={position:{},rotation:{}};kg.position.get=function(){return this.component.position},kg.rotation.get=function(){return this.component.quaternion},Ng.prototype.changed=function(){this.component.updateMatrix(),this.viewer.requestRender(),this.signals.changed.dispatch()},Ng.prototype.spin=function(t,e){Lg.getInverse(this.viewer.rotationGroup.matrix),Og.copy(zn(t)).applyMatrix4(Lg),Lg.extractRotation(this.component.transform),Lg.premultiply(this.viewer.rotationGroup.matrix),Lg.getInverse(Lg),Og.copy(zn(t)),Og.applyMatrix4(Lg),Lg.makeRotationAxis(Og,e),Dg.setFromRotationMatrix(Lg),this.component.quaternion.premultiply(Dg),this.changed()},Object.defineProperties(Ng.prototype,kg),va.__deps=[ya],ba.__deps=[ya,ga];var Fg=new g,Bg=function(){},zg={Picker:{},Buffer:{}};zg.Picker.get=function(){return Jf.get(this.type)},zg.Buffer.get=function(){return Qf.get(this.type)},Bg.getShapeKey=function(t){return this.type+t[0].toUpperCase()+t.substr(1)},Bg.valueToShape=function(t,e,r){var i=t[this.getShapeKey(e)];switch(this.fields[e]){case\"v3\":case\"c\":Ma(r,i);break;default:i.push(r)}},Bg.objectToShape=function(t,e){var r=this;Object.keys(this.fields).forEach(function(i){r.valueToShape(t,i,e[i])}),this.valueToShape(t,\"name\",e.name),this.expandBoundingBox(t.boundingBox,e)},Bg.valueFromShape=function(t,e,r){var i=t[this.getShapeKey(r)];switch(this.fields[r]){case\"v3\":return(new g).fromArray(i,3*e);case\"c\":return(new tt).fromArray(i,3*e);default:return i[e]}},Bg.objectFromShape=function(t,e){var r=this,i={shape:t,name:this.valueFromShape(t,e,\"name\")};return Object.keys(this.fields).forEach(function(n){i[n]=r.valueFromShape(t,e,n)}),i},Bg.arrayFromShape=function(t,e){var r=t[this.getShapeKey(e)];switch(this.fields[e]){case\"s\":return r;default:return new Float32Array(r)}},Bg.dataFromShape=function(t){var e=this,r={};return this.Picker&&(r.picking=new this.Picker(t)),Object.keys(this.fields).forEach(function(i){r[i]=e.arrayFromShape(t,i)}),r},Bg.bufferFromShape=function(t,e){return new this.Buffer(this.dataFromShape(t),e)},Object.defineProperties(Bg,zg);var Ug=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return\"sphere\"},r.fields.get=function(){return{position:\"v3\",color:\"c\",radius:\"f\"}},e.positionFromShape=function(t,e){return this.valueFromShape(t,e,\"position\")},e.expandBoundingBox=function(t,e){t.expandByPoint(Fg.fromArray(e.position))},Object.defineProperties(e,r),e}(Bg),jg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return\"box\"},r.fields.get=function(){return{position:\"v3\",color:\"c\",size:\"f\",heightAxis:\"v3\",depthAxis:\"v3\"}},Object.defineProperties(e,r),e}(Ug),Gg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"octahedron\"},Object.defineProperties(e,r),e}(jg),Vg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"tetrahedron\"},Object.defineProperties(e,r),e}(jg),$g=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return\"cylinder\"},r.fields.get=function(){return{position1:\"v3\",position2:\"v3\",color:\"c\",radius:\"f\"}},e.positionFromShape=function(t,e){var r=this.valueFromShape(t,e,\"position1\"),i=this.valueFromShape(t,e,\"position2\");return r.add(i).multiplyScalar(.5)},e.expandBoundingBox=function(t,e){t.expandByPoint(Fg.fromArray(e.position1)),t.expandByPoint(Fg.fromArray(e.position2))},Object.defineProperties(e,r),e}(Bg),Hg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"arrow\"},Object.defineProperties(e,r),e}($g),Wg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"cone\"},Object.defineProperties(e,r),e}($g),Xg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return\"ellipsoid\"},r.fields.get=function(){return{position:\"v3\",color:\"c\",radius:\"f\",majorAxis:\"v3\",minorAxis:\"v3\"}},Object.defineProperties(e,r),e}(Ug),qg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"torus\"},Object.defineProperties(e,r),e}(Xg),Yg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},fields:{}};return r.type.get=function(){return\"text\"},r.fields.get=function(){return{position:\"v3\",color:\"c\",size:\"f\",text:\"s\"}},Object.defineProperties(e,r),e}(Ug),Zg=function(t){this.array=t};Zg.prototype.getIndex=function(t){return this.array?this.array[t]:t},Zg.prototype.getObject=function(){return{}},Zg.prototype._applyTransformations=function(t,e,r){return e&&t.applyMatrix4(e.matrix),r&&t.applyMatrix4(r.matrix),t},Zg.prototype._getPosition=function(){return new g},Zg.prototype.getPosition=function(t,e,r){return this._applyTransformations(this._getPosition(t),e,r)};var Kg=function(t){function e(e){t.call(this),this.shape=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{},data:{},type:{}};return r.primitive.get=function(){},r.data.get=function(){return this.shape},r.type.get=function(){return this.primitive.type},e.prototype.getObject=function(t){return this.primitive.objectFromShape(this.shape,t)},e.prototype._getPosition=function(t){return this.primitive.positionFromShape(this.shape,t)},Object.defineProperties(e.prototype,r),e}(Zg),Qg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return $g},Object.defineProperties(e.prototype,r),e}(Kg),Jg=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Hg},Object.defineProperties(e.prototype,r),e}(Kg),tv=function(t){function e(e,r){t.call(this,e),this.structure=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return\"atom\"},r.data.get=function(){return this.structure},e.prototype.getObject=function(t){return this.structure.getAtomProxy(this.getIndex(t))},e.prototype._getPosition=function(t){return(new g).copy(this.getObject(t))},Object.defineProperties(e.prototype,r),e}(Zg),ev=function(t){function e(e){t.call(this),this.axes=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return\"axes\"},r.data.get=function(){return this.axes},e.prototype.getObject=function(){return{axes:this.axes}},e.prototype._getPosition=function(){return this.axes.center.clone()},Object.defineProperties(e.prototype,r),e}(Zg),rv=function(t){function e(e,r,i){t.call(this,e),this.structure=r,this.bondStore=i||r.bondStore}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return\"bond\"},r.data.get=function(){return this.structure},e.prototype.getObject=function(t){var e=this.structure.getBondProxy(this.getIndex(t));return e.bondStore=this.bondStore,e},e.prototype._getPosition=function(t){var e=this.getObject(t);return(new g).copy(e.atom1).add(e.atom2).multiplyScalar(.5)},Object.defineProperties(e.prototype,r),e}(Zg),iv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"contact\"},Object.defineProperties(e.prototype,r),e}(rv),nv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Wg},Object.defineProperties(e.prototype,r),e}(Kg),ov=function(t){function e(e,r,i){t.call(this,e),this.validation=r,this.structure=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return\"clash\"},r.data.get=function(){return this.validation},e.prototype.getObject=function(t){var e=this.validation,r=this.getIndex(t);return{validation:e,index:r,clash:e.clashArray[r]}},e.prototype._getAtomProxyFromSele=function(t){var e=new Cf(t),r=this.structure.getAtomIndices(e)[0];return this.structure.getAtomProxy(r)},e.prototype._getPosition=function(t){var e=this.getObject(t).clash,r=this._getAtomProxyFromSele(e.sele1),i=this._getAtomProxyFromSele(e.sele2);return(new g).copy(r).add(i).multiplyScalar(.5)},Object.defineProperties(e.prototype,r),e}(Zg),av=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"distance\"},Object.defineProperties(e.prototype,r),e}(rv),sv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Xg},Object.defineProperties(e.prototype,r),e}(Kg),cv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Gg},Object.defineProperties(e.prototype,r),e}(Kg),uv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return jg},Object.defineProperties(e.prototype,r),e}(Kg),hv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"ignore\"},Object.defineProperties(e.prototype,r),e}(Zg),lv=function(t){function e(e,r){t.call(this,e),this.mesh=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"mesh\"},e.prototype.getObject=function(){var t=this.mesh;return{shape:this.shape,name:t.name,serial:t.serial}},e.prototype._getPosition=function(){return this.__position||(this.__position=aa(this.mesh.position)),this.__position},Object.defineProperties(e.prototype,r),e}(Kg),pv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Ug},Object.defineProperties(e.prototype,r),e}(Kg),dv=function(t){function e(e,r){t.call(this,e),this.surface=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return\"surface\"},r.data.get=function(){return this.surface},e.prototype.getObject=function(t){return{surface:this.surface,index:this.getIndex(t)}},e.prototype._getPosition=function(){return this.surface.center.clone()},Object.defineProperties(e.prototype,r),e}(Zg),fv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return Vg},Object.defineProperties(e.prototype,r),e}(Kg),mv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={primitive:{}};return r.primitive.get=function(){return qg},Object.defineProperties(e.prototype,r),e}(Kg),gv=function(t){function e(e,r){t.call(this),this.unitcell=e,this.structure=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return\"unitcell\"},r.data.get=function(){return this.unitcell},e.prototype.getObject=function(){return{unitcell:this.unitcell,structure:this.structure}},e.prototype._getPosition=function(){return this.unitcell.getCenter(this.structure)},Object.defineProperties(e.prototype,r),e}(Zg),vv=(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};r.type.get=function(){return\"unknown\"},Object.defineProperties(e.prototype,r)}(Zg),function(t){function e(e,r){t.call(this,e),this.volume=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},data:{}};return r.type.get=function(){return\"volume\"},r.data.get=function(){return this.volume},e.prototype.getObject=function(t){var e=this.volume,r=this.getIndex(t);return{volume:e,index:r,value:e.data[r]}},e.prototype._getPosition=function(t){var e=this.volume.position,r=this.getIndex(t);return new g(e[3*r],e[3*r+1],e[3*r+2])},Object.defineProperties(e.prototype,r),e}(Zg)),yv=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"slice\"},Object.defineProperties(e.prototype,r),e}(vv);Jf.add(\"arrow\",Jg),Jf.add(\"box\",uv),Jf.add(\"cone\",nv),Jf.add(\"cylinder\",Qg),Jf.add(\"ellipsoid\",sv),Jf.add(\"octahedron\",cv),Jf.add(\"sphere\",pv),Jf.add(\"tetrahedron\",fv),Jf.add(\"torus\",mv);var bv=function(t,e){this.length=t,this._words=new Uint32Array(t+32>>>5),!0===e&&this.setAll()};bv.prototype.get=function(t){return 0!=(this._words[t>>>5]&1<>>5]|=1<>>5]&=~(1<>>5]^=1<>>5,a=e>>>5,s=o;s>>5]|=1<>>5]|=1<>>5]|=1<>>5]&=~(1<>>5]&=~(1<>>5]&=~(1<>>5]|=1<>>5]&=~(1<>>r,this},bv.prototype._isRangeValue=function(t,e,r){for(var i=this._words,n=!0===r?4294967295:0,o=t>>>5,a=e>>>5,s=o;s>>5]&1<>>5]&1<>>5]&1<>>5]&1<>>5]&1<0?f>e&&(e=f):f>r&&(r=f),sa(s.copy(t),l,u);var m=c.subVectors(s,u).normalize().dot(l),g=s.distanceTo(u);m>0?g>i&&(i=g):g>n&&(n=g),sa(s.copy(t),p,u);var v=c.subVectors(s,u).normalize().dot(p),y=s.distanceTo(u);v>0?y>o&&(o=y):y>a&&(a=y)}),{d1a:e,d2a:i,d3a:o,d1b:-r,d2b:-n,d3b:-a}},Za.prototype.constructor=Za,Ka.prototype.constructor=Ka,es.__deps=[Qa,Ja,ts,On],rs.__deps=[is],is.__deps=[fa,da,ma,la],os.__deps=[$n,xa,_a,va,ya,wa,Sa,fa,Aa,ja,Va,Ha,$a,Wa];var ey=function(t,e,r){this.name=t||\"\",this.path=e||\"\",this.info={},this.center=new g,this.boundingBox=new st,r instanceof wt||r instanceof Ct||r instanceof Ne?this.fromGeometry(r):r&&(this.set(r.position,r.index,r.normal,r.color,r.atomindex,r.contour),this.boundingBox.setFromArray(r.position),this.boundingBox.getCenter(this.center))},ry={type:{}};ry.type.get=function(){return\"Surface\"},ey.prototype.set=function(t,e,r,i,n,o){this.position=t,this.index=e,this.normal=r,this.color=i,this.atomindex=n,this.size=t.length/3,this.contour=o},ey.prototype.fromGeometry=function(e){t.Debug&&jf.time(\"GeometrySurface.fromGeometry\");var r;e instanceof wt?(e.computeVertexNormals(!0),r=(new Ct).fromGeometry(e)):r=e instanceof Ct?e:e[0],r.boundingBox||r.computeBoundingBox(),this.boundingBox.copy(r.boundingBox),this.boundingBox.getCenter(this.center);var i,n,o;if(r instanceof Ct){var a=r.attributes,s=!!a.normal&&a.normal.array;(!s||0===s[0]&&0===s[1]&&0===s[2])&&r.computeVertexNormals(),i=a.position.array,n=a.index?a.index.array:null,o=a.normal.array}this.set(i,n,o,void 0,void 0),t.Debug&&jf.timeEnd(\"GeometrySurface.setGeometry\")},ey.prototype.getPosition=function(){return this.position},ey.prototype.getColor=function(t){var e=t||{};e.surface=this;var r=this.size,i=new Float32Array(3*r),n=Hf.getScheme(e);if(n.volumeColor||\"random\"===e.scheme)for(var o=0;o=t&&f<=e||r&&(fe)){var m=3*l;u[l]=f,h[m+0]=n[d+0],h[m+1]=n[d+1],h[m+2]=n[d+2],o&&(c[l]=o[p]),l+=1}}this.data=new Float32Array(this._dataBuffer,0,l),this.position=new Float32Array(this._positionBuffer,0,3*l),o&&(this.atomindex=new Float32Array(this._atomindexBuffer,0,l))}this._filterHash=a}},Object.defineProperties(oy.prototype,ay),oy.prototype.getValueForSigma=iy.prototype.getValueForSigma,oy.prototype.getSigmaForValue=iy.prototype.getSigmaForValue,oy.prototype.getDataAtomindex=iy.prototype.getDataAtomindex,oy.prototype.getDataPosition=iy.prototype.getDataPosition,oy.prototype.getDataColor=iy.prototype.getDataColor,oy.prototype.getDataPicking=iy.prototype.getDataPicking,oy.prototype.getDataSize=iy.prototype.getDataSize;var sy=function(e,r){t.Debug&&jf.time(\"BondHash init\");for(var i=e.count,n=e.atomIndex1,o=e.atomIndex2,a=new Uint8Array(r),s=new Int32Array(r),c=0;ca?s.set(e[n].subarray(0,a)):s.set(e[n]),e[n]=s}},cy.prototype.growIfFull=function(){if(this.count>=this.length){var t=Math.round(1.5*this.length);this.resize(Math.max(256,t))}},cy.prototype.copyFrom=function(t,e,r,i){for(var n=this,o=0,a=this._fields.length;o0;)s-=1;a<=s&&(a===o?o=s:s===o&&(o=a),e(a,s),a+=1,s-=1)}while(a<=s);r(i,s),r(a,n)}}jf.time(\"Store.sort\");var i=this,n=new this.constructor(1);r(0,this.count-1),jf.timeEnd(\"Store.sort\")},cy.prototype.clear=function(){this.count=0},cy.prototype.dispose=function(){var t=this;delete this.length,delete this.count;for(var e=0,r=this._fields.length;e0&&(l[r]=M.angleTo(E)),t=Math.cos(x.angleTo(_)),f[r]=180/Math.PI*Math.acos(t),i=x.length(),n=_.length(),p[r]=Math.sqrt(n*i)/Math.max(2,2*(1-t)),d[r]=Math.abs(y.dot(M)),w.copy(x).multiplyScalar(p[r]/i),S.copy(_).multiplyScalar(p[r]/n),w.subVectors(R,w),S.subVectors(L,S),w.toArray(u,e+3),S.toArray(u,e+6),T.subVectors(I,P),T.toArray(m,e),E.copy(M),P.copy(w);for(w.fromArray(u,3),S.fromArray(u,6),M.subVectors(w,S).normalize(),I.index=o.getAtomIndexByType(0,C),P.copy(I),A.copy(I),sa(A,M,w),A.toArray(u,0),T.subVectors(P,w),T.toArray(m,0),w.fromArray(u,3*s-6),S.fromArray(u,3*s-9),M.subVectors(w,S).normalize(),I.index=o.getAtomIndexByType(s-1,C),P.copy(I),A.copy(I),sa(A,M,w),A.toArray(u,3*s-3),r=s-3;re?F=!0:h.bending[B]>t&&(F=!0)),F){if(B-v<4){v=B,F=!1;continue}D.index=L.traceAtomIndex,P=h.axis.subarray(3*v+3,3*B),C=h.center.subarray(3*v,3*B+3),p=aa(P).normalize(),d=aa(C),I.fromArray(C),sa(I,p,d),R.fromArray(C,C.length-3),sa(R,p,d),p.subVectors(R,I),p.toArray(b,y),d.toArray(x,y),I.toArray(_,y),R.toArray(w,y),f.atomColorToArray(D,S,y),A.push(D.index),M.push(m.atomRadius(D)),E.push(u+v),T.push(u+B+1-v),y+=3,v=B,F=!1}var z=new Float32Array(A);return{axis:new Float32Array(b),center:new Float32Array(x),begin:new Float32Array(_),end:new Float32Array(w),color:new Float32Array(S),picking:new tv(z,s),size:new Float32Array(M),residueOffset:E,residueCount:T}}},us.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},peek:function(){return this.content[0]},remove:function(t){for(var e=this,r=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=e.content[i];if(!(e.scoreFunction(r)\":\"3/4-Z\",\"?\":\"X-Y\",\"@\":\"Y-X\",A:\"Z+1/3\",B:\"Z+2/3\",C:\"X+2/3\",D:\"Y+1/3\",E:\"-Y+2/3\",F:\"X-Y+1/3\",G:\"Y-X+2/3\",H:\"-X+1/3\",I:\"X+1/3\",J:\"Y+2/3\",K:\"-Y+1/3\",L:\"X-Y+2/3\",M:\"Y-X+1/3\",N:\"-X+2/3\",O:\"2/3+X\",P:\"1/3+Y\",Q:\"1/3+Z\",R:\"2/3-Y\",S:\"1/3+X-Y\",T:\"2/3+Y-X\",U:\"1/3-X\",V:\"2/3-X\",W:\"1/3-Y\",X:\"1/3-Z\",Y:\"2/3+Y\",Z:\"1/3+Y-X\",\"[\":\"2/3+X-Y\",\"]\":\"1/3+X\",\"^\":\"2/3+Z\",_:\"2/3-Z\",\"`\":\"5/6+Z\",a:\"1/6+Z\",b:\"5/6-Z\",c:\"1/6-Z\",d:\"Z+5/6\",e:\"Z+1/6\",f:\"Z+1/4\",g:\"+Y\"},my={\"P 1\":\" !#\",\"P -1\":\" !#$%&\",\"P 1 2 1\":\" !#$!&\",\"P 1 21 1\":\" !#$'&\",\"C 1 2 1\":\" !#$!&()#*)&\",\"P 1 m 1\":\" !# %#\",\"P 1 c 1\":\" !# %+\",\"C 1 m 1\":\" !# %#()#(,#\",\"C 1 c 1\":\" !# %+()#(,+\",\"P 1 2/m 1\":\" !# %#$!&$%&\",\"P 1 21/m 1\":\" !#$)&$%& ,#\",\"C 1 2/m 1\":\" !# %#$!&$%&()#(,#*)&*,&\",\"P 1 2/c 1\":\" !#$!-$%& %+\",\"P 1 21/c 1\":\" !#$%&$)- ,+\",\"C 1 2/c 1\":\" !#$!-$%& %+()#*)-*,&(,+\",\"P 2 2 2\":\" !#$%#$!& %&\",\"P 2 2 21\":\" !#$%+$!- %&\",\"P 21 21 2\":\" !#$%#*)&(,&\",\"P 21 21 21\":\" !#*%+$)-(,&\",\"C 2 2 21\":\" !#$%+$!- %&()#*,+*)-(,&\",\"C 2 2 2\":\" !#$%#$!& %&()#*,#*)&(,&\",\"F 2 2 2\":\" !#$%#$!& %& )+$,+$)- ,-(!+*%+*!-(%-()#*,#*)&(,&\",\"I 2 2 2\":\" !#$%# %&$!&.'/01/.120'2\",\"I 21 21 21\":\" !#*%+$)-(,&()+$,#*!& %-\",\"P m m 2\":\" !#$%# %#$!#\",\"P m c 21\":\" !#$%+ %+$!#\",\"P c c 2\":\" !#$%# %+$!+\",\"P m a 2\":\" !#$%#(%#*!#\",\"P c a 21\":\" !#$%+(%#*!+\",\"P n c 2\":\" !#$%# ,+$)+\",\"P m n 21\":\" !#*%+(%+$!#\",\"P b a 2\":\" !#$%#(,#*)#\",\"P n a 21\":\" !#$%+(,#*)+\",\"P n n 2\":\" !#$%#(,+*)+\",\"C m m 2\":\" !#$%# %#$!#()#*,#(,#*)#\",\"C m c 21\":\" !#$%+ %+$!#()#*,+(,+*)#\",\"C c c 2\":\" !#$%# %+$!+()#*,#(,+*)+\",\"A m m 2\":\" !#$%# %#$!# )+$,+ ,+$)+\",\"A b m 2\":\" !#$%# ,#$)# )+$,+ %+$!+\",\"A m a 2\":\" !#$%#(%#*!# )+$,+(,+*)+\",\"A b a 2\":\" !#$%#(,#*)# )+$,+(%+*!+\",\"F m m 2\":\" !#$%# %#$!# )+$,+ ,+$)+(!+*%+(%+*!+()#*,#(,#*)#\",\"F d d 2\":\" !#$%#345675 )+$,+3896:9(!+*%+;49<79()#*,#;85<:5\",\"I m m 2\":\" !#$%# %#$!#()+*,+(,+*)+\",\"I b a 2\":\" !#$%#(,#*)#()+*,+ %+$!+\",\"I m a 2\":\" !#$%#(%#*!#()+*,+ ,+$)+\",\"P 2/m 2/m 2/m\":\" !#$%#$!& %&$%& !& %#$!#\",\"P 2/n 2/n 2/n\":\" !#$%#$!& %&*,-()-(,+*)+\",\"P 2/c 2/c 2/m\":\" !#$%#$!- %-$%& !& %+$!+\",\"P 2/b 2/a 2/n\":\" !#$%#$!& %&*,&()&(,#*)#\",\"P 21/m 2/m 2/a\":\" !#*%#$!&(%&$%&(!& %#*!#\",\"P 2/n 21/n 2/a\":\" !#*%#*)- ,-$%&(!&(,+$)+\",\"P 2/m 2/n 21/a\":\" !#*%+*!- %&$%&(!-(%+$!#\",\"P 21/c 2/c 2/a\":\" !#*%#$!-(%-$%&(!& %+*!+\",\"P 21/b 21/a 2/m\":\" !#$%#*)&(,&$%& !&(,#*)#\",\"P 21/c 21/c 2/n\":\" !#*,#$)-(%-$%&()& ,+*!+\",\"P 2/b 21/c 21/m\":\" !#$%+$)- ,&$%& !- ,+$)#\",\"P 21/n 21/n 2/m\":\" !#$%#*)-(,-$%& !&(,+*)+\",\"P 21/m 21/m 2/n\":\" !#$%#*'&.,&*,&.'& %#$!#\",\"P 21/b 2/c 21/n\":\" !#*,+$!-(,&$%&()- %+*)#\",\"P 21/b 21/c 21/a\":\" !#*%+$)-(,&$%&(!- ,+*)#\",\"P 21/n 21/m 21/a\":\" !#0%/$'&.12$%&.!2 1#0'/\",\"C 2/m 2/c 21/m\":\" !#$%+$!- %&$%& !- %+$!#()#*,+*)-(,&*,&()-(,+*)#\",\"C 2/m 2/c 21/a\":\" !#$,+$)- %&$%& )- ,+$!#()#*%+*!-(,&*,&(!-(%+*)#\",\"C 2/m 2/m 2/m\":\" !#$%#$!& %&$%& !& %#$!#()#*,#*)&(,&*,&()&(,#*)#\",\"C 2/c 2/c 2/m\":\" !#$%#$!- %-$%& !& %+$!+()#*,#*)-(,-*,&()&(,+*)+\",\"C 2/m 2/m 2/a\":\" !#$,#$)& %&$%& )& ,#$!#()#*%#*!&(,&*,&(!&(%#*)#\",\"C 2/c 2/c 2/a\":\" !#*,#$!&(,&$,-(!- ,+*!+()#$%#*)& %&*%- )-(%+$)+\",\"F 2/m 2/m 2/m\":\" !#$%#$!& %&$%& !& %#$!# )+$,+$)- ,-$,- )- ,+$)+(!+*%+*!-(%-*%-(!-(%+*!+()#*,#*)&(,&*,&()&(,#*)#\",\"F 2/d 2/d 2/d\":\" !#$%#$!& %&64=37=345675 )+$,+$)- ,-68>3:>3896:9(!+*%+*!-(%-<4>;7>;49<79()#*,#*)&(,&<8=;:=;85<:5\",\"I 2/m 2/m 2/m\":\" !#$%#$!& %&$%& !& %#$!#()+*,+*)-(,-*,-()-(,+*)+\",\"I 2/b 2/a 2/m\":\" !#$%#*)&(,&$%& !&(,#*)#()+*,+$!- %-*,-()- %+$!+\",\"I 21/b 21/c 21/a\":\" !#*%+$)-(,&$%&(!- ,+*)#()+$,#*!& %-*,- )&(%#$!+\",\"I 21/m 21/m 21/a\":\" !#$,#$)& %&$%& )& ,#$!#()+*%+*!-(,-*,-(!-(%+*)+\",\"P 4\":\" !#$%#% #!$#\",\"P 41\":\" !#$%+% 5!$9\",\"P 42\":\" !#$%#% +!$+\",\"P 43\":\" !#$%+% 9!$5\",\"I 4\":\" !#$%#% #!$#()+*,+,(+)*+\",\"I 41\":\" !#*,+%(5)$9()+$%#, 9!*5\",\"P -4\":\" !#$%#!$&% &\",\"I -4\":\" !#$%#!$&% &()+*,+)*-,(-\",\"P 4/m\":\" !#$%#% #!$#$%& !&!$&% &\",\"P 42/m\":\" !#$%#% +!$+$%& !&!$-% -\",\"P 4/n\":\" !#$%#,(#)*#*,&()&!$&% &\",\"P 42/n\":\" !#$%#,(+)*+*,-()-!$&% &\",\"I 4/m\":\" !#$%#% #!$#$%& !&!$&% &()+*,+,(+)*+*,-()-)*-,(-\",\"I 41/a\":\" !#*,+%(5)$9$,=(!>!$&,(-()+$%#, 9!*5*%> )=)*-% &\",\"P 4 2 2\":\" !#$%#% #!$#$!& %&! &%$&\",\"P 4 21 2\":\" !#$%#,(#)*#*)&(,&! &%$&\",\"P 41 2 2\":\" !#$%+% 5!$9$!& %-! >%$=\",\"P 41 21 2\":\" !#$%+,(5)*9*)=(,>! &%$-\",\"P 42 2 2\":\" !#$%#% +!$+$!& %&! -%$-\",\"P 42 21 2\":\" !#$%#,(+)*+*)-(,-! &%$&\",\"P 43 2 2\":\" !#$%+% 9!$5$!& %-! =%$>\",\"P 43 21 2\":\" !#$%+,(9)*5*)>(,=! &%$-\",\"I 4 2 2\":\" !#$%#% #!$#$!& %&! &%$&()+*,+,(+)*+*)-(,-)(-,*-\",\"I 41 2 2\":\" !#*,+%(5)$9*!> ,=)(-%$&()+$%#, 9!*5$)=(%>! &,*-\",\"P 4 m m\":\" !#$%#% #!$# %#$!#%$#! #\",\"P 4 b m\":\" !#$%#% #!$#(,#*)#,*#)(#\",\"P 42 c m\":\" !#$%#% +!$+ %+$!+%$#! #\",\"P 42 n m\":\" !#$%#,(+)*+(,+*)+%$#! #\",\"P 4 c c\":\" !#$%#% #!$# %+$!+%$+! +\",\"P 4 n c\":\" !#$%#% #!$#(,+*)+,*+)(+\",\"P 42 m c\":\" !#$%#% +!$+ %#$!#%$+! +\",\"P 42 b c\":\" !#$%#% +!$+(,#*)#,*+)(+\",\"I 4 m m\":\" !#$%#% #!$# %#$!#%$#! #()+*,+,(+)*+(,+*)+,*+)(+\",\"I 4 c m\":\" !#$%#% #!$# %+$!+%$+! +()+*,+,(+)*+(,#*)#,*#)(#\",\"I 41 m d\":\" !#*,+%(5)$9 %#*)+%*5) 9()+$%#, 9!*5(,+$!#,$9!(5\",\"I 41 c d\":\" !#*,+%(5)$9 %+*)#%*9) 5()+$%#, 9!*5(,#$!+,$5!(9\",\"P -4 2 m\":\" !#$%#% &!$&$!& %&%$#! #\",\"P -4 2 c\":\" !#$%#% &!$&$!- %-%$+! +\",\"P -4 21 m\":\" !#$%#% &!$&*)&(,&,*#)(#\",\"P -4 21 c\":\" !#$%#% &!$&*)-(,-,*+)(+\",\"P -4 m 2\":\" !#$%#!$&% & %#$!#! &%$&\",\"P -4 c 2\":\" !#$%#% &!$& %+$!+! -%$-\",\"P -4 b 2\":\" !#$%#% &!$&(,#*)#)(&,*&\",\"P -4 n 2\":\" !#$%#% &!$&(,+*)+)(-,*-\",\"I -4 m 2\":\" !#$%#% &!$& %#$!#! &%$&()+*,+,(-)*-(,+*)+)(-,*-\",\"I -4 c 2\":\" !#$%#% &!$& %+$!+! -%$-()+*,+,(-)*-(,#*)#)(&,*&\",\"I -4 2 m\":\" !#$%#% &!$&$!& %&%$#! #()+*,+,(-)*-*)-(,-,*+)(+\",\"I -4 2 d\":\" !#$%#% &!$&*!>(%>,$9) 9()+*,+,(-)*-$)= ,=%*5!(5\",\"P 4/m 2/m 2/m\":\" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #\",\"P 4/m 2/c 2/c\":\" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +\",\"P 4/n 2/b 2/m\":\" !#$%#% #!$#$!& %&! &%$&*,&()&)*&,(&(,#*)#,*#)(#\",\"P 4/n 2/n 2/c\":\" !#$%#% #!$#$!& %&! &%$&*,-()-)*-,(-(,+*)+,*+)(+\",\"P 4/m 21/b 2/m\":\" !#$%#% #!$#*)&(,&)(&,*&$%& !&!$&% &(,#*)#,*#)(#\",\"P 4/m 21/n 2/c\":\" !#$%#% #!$#*)-(,-)(-,*-$%& !&!$&% &(,+*)+,*+)(+\",\"P 4/n 21/m 2/m\":\" !#$%#,(#)*#*)&(,&! &%$&*,&()&!$&% & %#$!#,*#)(#\",\"P 4/n 2/c 2/c\":\" !#$%#,(#)*#*)-(,-! -%$-*,&()&!$&% & %+$!+,*+)(+\",\"P 42/m 2/m 2/c\":\" !#$%#% +!$+$!& %&! -%$-$%& !&!$-% - %#$!#%$+! +\",\"P 42/m 2/c 2/m\":\" !#$%#% +!$+$!- %-! &%$&$%& !&!$-% - %+$!+%$#! #\",\"P 42/n 2/b 2/c\":\" !#$%#,(+)*+$!- %-)(&,*&*,-()-!$&% &(,#*)#%$+! +\",\"P 42/n 2/n 2/m\":\" !#$%#,(+)*+$!& %&)(-,*-*,-()-!$&% &(,+*)+%$#! #\",\"P 42/m 21/b 2/c\":\" !#$%#% +!$+*)&(,&)(-,*-$%& !&!$-% -(,#*)#,*+)(+\",\"P 42/m 21/n 2/m\":\" !#$%#,./'*/*'-.,-! &%$&$%& !&'*-,.-.,/*'/%$#! #\",\"P 42/n 21/m 2/c\":\" !#$%#,(+)*+*)-(,-! &%$&*,-()-!$&% & %#$!#,*+)(+\",\"P 42/n 21/c 2/m\":\" !#$%#,(+)*+*)&(,&! -%$-*,-()-!$&% & %+$!+,*#)(#\",\"I 4/m 2/m 2/m\":\" !#$%#% #!$#$!& %&! &%$&$%& !&!$&% & %#$!#%$#! #()+*,+,(+)*+*)-(,-)(-,*-*,-()-)*-,(-(,+*)+,*+)(+\",\"I 4/m 2/c 2/m\":\" !#$%#% #!$#$!- %-! -%$-$%& !&!$&% & %+$!+%$+! +()+*,+,(+)*+*)&(,&)(&,*&*,-()-)*-,(-(,#*)#,*#)(#\",\"I 41/a 2/m 2/d\":\" !#*,+%(5)$9*!> ,=)(-%$&$,=(!>!$&,(-(,+$!#,$9!(5()+$%#, 9!*5$)=(%>! &,*-*%> )=)*-% & %#*)+%*5) 9\",\"I 41/a 2/c 2/d\":\" !#*,+%(5)$9*!= ,>)(&%$-$,=(!>!$&,(-(,#$!+,$5!(9()+$%#, 9!*5$)>(%=! -,*&*%> )=)*-% & %+*)#%*9) 5\",\"P 3\":\" !#%?#@$#\",\"P 31\":\" !#%?A@$B\",\"P 32\":\" !#%?B@$A\",\"H 3\":\" !#%?#@$#CDAEFAGHAIJBKLBMNB\",\"R 3\":\" !## !!# \",\"P -3\":\" !#%?#@$#$%&!@&? &\",\"H -3\":\" !#%?#@$#$%&!@&? &OPQRSQTUQVWXYZX[]X]Y^W[^ZV^UR_PT_SO_\",\"R -3\":\" !## !!# $%&&$%%&$\",\"P 3 1 2\":\" !#%?#@$#%$&@!& ?&\",\"P 3 2 1\":\" !#%?#@$#! &?%&$@&\",\"P 31 1 2\":\" !#%?Q@$^%$_@!X ?&\",\"P 31 2 1\":\" !#%?A@$B! &?%_$@X\",\"P 32 1 2\":\" !#%?^@$Q%$X@!_ ?&\",\"P 32 2 1\":\" !#%?B@$A! &?%X$@_\",\"H 3 2\":\" !#%?#@$#! &?%&$@&OPQRSQTUQY]X[WXVZX]Y^W[^ZV^PO_SR_UT_\",\"R 3 2\":\" !## !!# %$&$&%&%$\",\"P 3 m 1\":\" !#%?#@$#%$#@!# ?#\",\"P 3 1 m\":\" !#%?#@$#! #?%#$@#\",\"P 3 c 1\":\" !#%?#@$#%$+@!+ ?+\",\"P 3 1 c\":\" !#%?#@$#! +?%+$@+\",\"H 3 m\":\" !#%?#@$#%$#@!# ?#OPQRSQTUQRUQTPQOSQ]Y^W[^ZV^WV^ZY^][^\",\"R 3 m\":\" !## !!# ! # #!#! \",\"H 3 c\":\" !#%?#@$#%$+@!+ ?+OPQRSQTUQRU`TP`OS`]Y^W[^ZV^WVaZYa][a\",\"R 3 c\":\" !## !!# '././'/'.\",\"P -3 1 2/m\":\" !#%?#@$#%$&@!& ?&$%&!@&? &! #?%#$@#\",\"P -3 1 2/c\":\" !#%?#@$#%$-@!- ?-$%&!@&? &! +?%+$@+\",\"P -3 2/m 1\":\" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#\",\"P -3 2/c 1\":\" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+\",\"H -3 2/m\":\" !#%?#@$#! &?%&$@&$%&!@&? &%$#@!# ?#OPQRSQTUQY]X[WXVZXVWXYZX[]XRUQTPQOSQ]Y^W[^ZV^PO_SR_UT_UR_PT_SO_WV^ZY^][^\",\"R -3 2/m\":\" !## !!# %$&$&%&%$$%&&$%%&$! # #!#! \",\"H -3 2/c\":\" !#%?#@$#! -?%-$@-$%&!@&? &%$+@!+ ?+OPQRSQTUQY]b[WbVZbVWXYZX[]XRU`TP`OS`]Y^W[^ZV^POcSRcUTcUR_PT_SO_WVaZYa][a\",\"R -3 2/c\":\" !## !!# 102021210$%&&$%%&$'././'/'.\",\"P 6\":\" !#%?#@$#$%#!@#? #\",\"P 61\":\" !#%?A@$B$%/!@d? e\",\"P 65\":\" !#%?B@$A$%/!@e? d\",\"P 62\":\" !#%?^@$Q$%#!@^? Q\",\"P 64\":\" !#%?Q@$^$%#!@Q? ^\",\"P 63\":\" !#%?#@$#$%+!@+? +\",\"P -6\":\" !#%?#@$# !&%?&@$&\",\"P 6/m\":\" !#%?#@$#$%#!@#? #$%&!@&? & !&%?&@$&\",\"P 63/m\":\" !#%?#@$#$%+!@+? +$%&!@&? & !-%?-@$-\",\"P 6 2 2\":\" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&\",\"P 61 2 2\":\" !#%?Q@$^$%+!@`? a! X?%&$@_%$b@!- ?c\",\"P 65 2 2\":\" !#%?^@$Q$%+!@a? `! _?%&$@X%$c@!- ?b\",\"P 62 2 2\":\" !#%?^@$Q$%#!@^? Q! _?%&$@X%$_@!& ?X\",\"P 64 2 2\":\" !#%?Q@$^$%#!@Q? ^! X?%&$@_%$X@!& ?_\",\"P 63 2 2\":\" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-\",\"P 6 m m\":\" !#%?#@$#$%#!@#? #%$#@!# ?#! #?%#$@#\",\"P 6 c c\":\" !#%?#@$#$%#!@#? #%$+@!+ ?+! +?%+$@+\",\"P 63 c m\":\" !#%?#@$#$%+!@+? +%$+@!+ ?+! #?%#$@#\",\"P 63 m c\":\" !#%?#@$#$%+!@+? +%$#@!# ?#! +?%+$@+\",\"P -6 m 2\":\" !#%?#@$# !&%?&@$&%$#@!# ?#%$&@!& ?&\",\"P -6 c 2\":\" !#%?#@$# !-%?-@$-%$+@!+ ?+%$&@!& ?&\",\"P -6 2 m\":\" !#%?#@$# !&%?&@$&! &?%&$@&! #?%#$@#\",\"P -6 2 c\":\" !#%?#@$# !-%?-@$-! &?%&$@&! +?%+$@+\",\"P 6/m 2/m 2/m\":\" !#%?#@$#$%#!@#? #! &?%&$@&%$&@!& ?&$%&!@&? & !&@$&%?&%$#@!# ?#! #?%#$@#\",\"P 6/m 2/c 2/c\":\" !#%?#@$#$%#!@#? #! -?%-$@-%$-@!- ?-$%&!@&? & !&@$&%?&%$+@!+ ?+! +?%+$@+\",\"P 63/m 2/c 2/m\":\" !#%?#@$#$%+!@+? +! -?%-$@-%$&@!& ?&$%&!@&? & !-@$-%?-%$+@!+ ?+! #?%#$@#\",\"P 63/m 2/m 2/c\":\" !#%?#@$#$%+!@+? +! &?%&$@&%$-@!- ?-$%&!@&? & !-@$-%?-%$#@!# ?#! +?%+$@+\",\"P 2 3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& \",\"F 2 3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- \",\"I 2 3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(\",\"P 21 3\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(\",\"I 21 3\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- \",\"P 2/m -3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$\",\"P 2/n -3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& *,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*\",\"F 2/m -3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-($,- )- ,+$)+&*,&()#(,#*)%-*!-(%+(!+*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(*%-(!-(%+*!+-$,- )+ ,+$),&*)&(,#()#*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- *,&()&(,#*)#-*%-(!+(%+*!,-$)- ,+ )+$\",\"F 2/d -3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& 64=37=345675=64=375345674=67=3453756 )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(68>3:>3896:9=<8=;:5;85<:4><7>;49;79<(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(<4>;7>;49<79>68>3:93896:8=<:=;85;:5<()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- <8=;:=;8f<:f><4>;79;49<78>6:>3893:96\",\"I 2/m -3\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& $%& !& %#$!#&$%& !# %#$!%&$!& %# !#$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-(*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*\",\"P 21/a -3\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*\",\"I 21/a -3\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&($%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*()+$,#*g& %-+()#$,&*!- %)+(,#$!&*%- *,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$\",\"P 4 3 2\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$\",\"P 42 3 2\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*\",\"F 4 3 2\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$ )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(-%*-!*+%(+ +,$+)$-, -)#)*#,(&)(&,*(!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() -,$-)$+, +(#,*#)*&,(&)+!*+%(-!(-%*()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(&,*&)*#,(#(+%*+!*-%(-!+)$+, -) -,$\",\"F 41 3 2\":\" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46 )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<(!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86\",\"I 4 3 2\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*\",\"P 43 3 2\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7;>46=:<5839398<5:6=4;>75:<983>7;=46\",\"P 41 3 2\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<\",\"I 41 3 2\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46\",\"P -4 3 m\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% \",\"F -4 3 m\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-(!(+%*+!*-%(- +)$+,$-) -,#)(#,*&)*&,((!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&() +,$+)$-, -(#)*#,*&)(&,+!(+%*-!*-%(()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- )(#,*#)*&,(&(+!*+%*-!(-%+) +,$-)$-, \",\"I -4 3 m\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! #%$#!$&% & #!$#%$&! &%#! #%$&!$&% ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(\",\"P -4 3 n\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,(\",\"F -4 3 c\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(+,*+)*-,(-(+)*+,*-)(-,+)(+,*-)*-,( )+$,+$)- ,-#()#*,&*)&(,!+(%+*!-*%-() #,$#)$&, &(#!*#%*&!(&%+! +%$-!$-% (!+*%+*!-(%-+ )+$,-$)- ,)#(,#*)&*,&(!(#%*#!*&%(& +!$+%$-! -%#) #,$&)$&, ()#*,#*)&(,&+(!+*%-*!-(%)+ ,+$)-$,- ! +%$+!$-% - #)$#,$&) &,#!(#%*&!*&%(\",\"I -4 3 d\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(7354<9:6>8;=357<946>:;=857394<>:6=8;()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- :;98657<=43>;9:658<=73>49:;586=7<>43\",\"P 4/m -3 2/m\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! \",\"P 4/n -3 2/n\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$*,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(\",\"P 42/m -3 2/n\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,*$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(\",\"P 42/n -3 2/m\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& )(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! \",\"F 4/m -3 2/m\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%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,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=4664=3:>;85<79=64>3:5;89<74=6:>385;79<,$+! #%(-)*&*&)(-% #!$+,-%(&)*+,$#! )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<68>37=;49<:5=<8>;753496:4><:=;893756,*#!(+% &)$-*-!(&, +)$#%-, &!$+%*#)((!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<<4>;:=389675>68=379;45<:8=<7>;453:96%$#) +,(&!*-$&! -,(#)*+%&% -)$#,*+!(()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>86<8=;7>3456:9><4=;:9385678>67=349;:5<%*+)(#, -!$&$-) &%(+!*#,&,(-!*#%$+) \",\"F 41/d -3 2/c\":\" !#$,+*)&(%-# !+$,&*)-(%!# ,+$)&*%-(:3>46=7<98;5;58<976=43>:97<58;>:3=46<8>;7=3496:5><8=;793456:8><7=;493:56%*#)(+, &!$-$-! &,(+)*#%&, -!$#%*+)( )+$%#*!-(,&#()+*%&$!- ,!+(,#*)-$%& :;=4<>765839;94<5:6>83=79:6543>7;=8<<4=;:>385679>64=3:9;85<78=67>345;:9<%$+) #,(-!*&$&) -%(#!*+,&%(-)*#,$+! (!+*,#$)- %&+ )#$%-*!&(,)#(%+*!&$,- 73=86>:<54;935469:<=8;>7576983=:;>4<68=37>;45<:9=<4>;:5389674>6:=389;75<,*+!(#% -)$&*-)(&% +!$#,-,(&!*+%$#) ()#*%+$!& ,-+(!#*,-$)& %)+ %#$!-*,&(7;>8<=:69435398657<>4;=:5:<94;=73>8664>3:=;89<75=68>375;49<:4=<:>;853796,$#! +%(&)*-*&!(-, #)$+%-% &)$+,*#!(\",\"I 4/m -3 2/m\":\" !#$%#$!& %&# !#$%&$!& %!# %#$!&$%& ! &%$&!$#% # #%$#!$&% &!#!$#% &! &%$$%& !& %#$!#&$%& !# %#$!%&$!& %# !#$%$#! #% &!$&$&! &% #!$#%&% &!$#%$#! ()+*,+*)-(,-+()+*,-*)-(,)+(,+*)-*,-()(-,*-)*+,(+(+,*+)*-,(-)+)*+,(-)(-,**,-()-(,+*)+-*,-()+(,+*),-*)-(,+()+*,*+)(+,(-)*-*-)(-,(+)*+,-,(-)*+,*+)(\",\"I 41/a -3 2/d\":\" !#*%+$)-(,&# !+*%-$)&(,!# %+*)-$,&(:3=8<>7694;5;54697<>83=:97654;=:3>8<$%&(!- ,+*)#&$%-(!+ ,#*)%&$!-(,+ )#*4<97358;=:6>6>:;=8357<94=8;>:694<573()+$,#*!& %-+()#$,&*!- %)+(,#$!&*%- 7;>46=:<5839398<5:6=4;>75:<983>7;=46*,- )&(%#$!+-*,& )#(%+$!,-*)& %#(!+$865:;943>7<=<=73>4;9:658>43=7<5869:;\",\"P 1 1 2\":\" !#$%#\",\"P 1 1 21\":\" !#$%+\",\"B 1 1 2\":\" !#$%#(g+*%+\",\"A 1 2 1\":\" !#$!& )+$)-\",\"C 1 21 1\":\" !#$)&()#*!&\",\"I 1 2 1\":\" !#$!&.'/0'2\",\"I 1 21 1\":\" !#$)&.'/0!-\",\"P 1 1 m\":\" !# !&\",\"P 1 1 b\":\" !# )&\",\"B 1 1 m\":\" !# !&(!+(!-\",\"B 1 1 b\":\" !# )&(!+()-\",\"P 1 1 2/m\":\" !# !&$%#$%&\",\"P 1 1 21/m\":\" !#$%+$%& !-\",\"B 1 1 2/m\":\" !# !&$%#$%&(!+(!-*%+*%-\",\"P 1 1 2/b\":\" !#$,#$%& )&\",\"P 1 1 21/b\":\" !#$%&$,+ )-\",\"B 1 1 2/b\":\" !#$,#$%& )&(!+*,+*%-()-\",\"P 21 2 2\":\" !#$!&(%&*%#\",\"P 2 21 2\":\" !# ,&$)&$%#\",\"P 21 21 2 (a)\":\" !#*,#.%&$'&\",\"P 21 2 21\":\" !#$!&(%-*%+\",\"P 2 21 21\":\" !# %&$)-$,+\",\"C 2 2 21a)\":\" !#*%+(,&$)-()#$,+ %&*!-\",\"C 2 2 2a\":\" !#*,#.%&$'&()#$%# ,&*!&\",\"F 2 2 2a\":\" !#*,#.%&$'& '/*%/.12$!2.!/$,/ %20'2.'#$%# 1&0!&\",\"I 2 2 2a\":\" !#*,#.%&$'&()+$%+*!- ,-\",\"P 21/m 21/m 2/n a\":\" !#*,#$)&(%&$%&.'& ,#*!#\",\"P 42 21 2a\":\" !#*,#%.+'$+$'&.%&! -,*-\",\"I 2 3a\":\" !#*,#.%&$'&!# ,- '&$%/$# !-*!/$%&.%()+$%+ ,-*!-)+(%&(!-*,#*+()&$)#*,- ,\"},gy=function(t){this.name=t||\"\",this.partList=[]},vy={type:{}};vy.type.get=function(){return\"Assembly\"},gy.prototype.addPart=function(t,e){var r=new yy(t,e);return this.partList.push(r),r},gy.prototype._getCount=function(t,e){var r=0;return this.partList.forEach(function(i){r+=i[e](t)}),r},gy.prototype.getAtomCount=function(t){return this._getCount(t,\"getAtomCount\")},gy.prototype.getResidueCount=function(t){return this._getCount(t,\"getResidueCount\")},gy.prototype.getInstanceCount=function(){var t=0;return this.partList.forEach(function(e){t+=e.matrixList.length}),t},gy.prototype.isIdentity=function(t){if(1!==this.partList.length)return!1;var e=this.partList[0];if(1!==e.matrixList.length)return!1;if(!(new v).equals(e.matrixList[0]))return!1;var r=[];return t.eachChain(function(t){r.push(t.chainname)}),r=Cn(r),e.chainList.length===r.length},gy.prototype.getBoundingBox=function(t){var e=new st;return this.partList.forEach(function(r){var i=r.getBoundingBox(t);e.expandByPoint(i.min),e.expandByPoint(i.max)}),e},gy.prototype.getCenter=function(t){return this.getBoundingBox(t).getCenter()},gy.prototype.getSelection=function(){var t=[];return this.partList.forEach(function(e){t=t.concat(e.chainList)}),ds(t)},Object.defineProperties(gy.prototype,vy);var yy=function(t,e){this.matrixList=t||[],this.chainList=e||[]},by={type:{}};by.type.get=function(){return\"AssemblyPart\"},yy.prototype._getCount=function(t,e){var r=0,i=this.chainList;return t.eachChain(function(t){(0===i.length||i.includes(t.chainname))&&(r+=t[e])}),this.matrixList.length*r},yy.prototype.getAtomCount=function(t){return this._getCount(t,\"atomCount\")},yy.prototype.getResidueCount=function(t){return this._getCount(t,\"residueCount\")},yy.prototype.getBoundingBox=function(t){var e=new st,r=new st,i=this.getSelection(),n=t.getBoundingBox(i);return this.matrixList.forEach(function(t){r.copy(n).applyMatrix4(t),e.expandByPoint(r.min),e.expandByPoint(r.max)}),e},yy.prototype.getSelection=function(){return ds(this.chainList)},yy.prototype.getView=function(t){var e=this.getSelection();return e?t.getView(e):t},yy.prototype.getInstanceList=function(){for(var t=this,e=[],r=0,i=this.matrixList.length;r=t.residueCount)){a.index=o+h,s.index=o+h+l,c.index=a.traceAtomIndex,u.index=s.traceAtomIndex;var p=c.distanceTo(u);if(Math.abs(p-r[l-2])>i)return!1}return!0},r=function(t,r){return e(t,r,[5.45,5.18,6.37],2.1)},i=function(t,r){return e(t,r,[6.1,10.4,13],1.42)},n=function(t){for(var e=t.residueStore,n=t.residueIndexStart,o=0,a=t.residueCount;o1&&i.bending[a]<20&&(e.sstruc[r+a]=\"h\".charCodeAt(0),e.sstruc[r+a+1]=\"h\".charCodeAt(0))}};return function(e){t.Debug&&jf.time(\"calculateSecondaryStructure\"),e.eachPolymer(function(t){if(!(t.residueCount<4)){if(t.isCg())o(t);else{if(!t.isProtein())return;n(t)}var e,r=0;t.eachResidue(function(t){t.sstruc===e?r+=1:(1===r&&(t.index-=1,t.sstruc=\"c\"),r=1,e=t.sstruc)})}}),t.Debug&&jf.timeEnd(\"calculateSecondaryStructure\")}}(),_y=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",wy=[\"H\",\"C\",\"O\",\"N\",\"S\",\"P\"],Sy=[\"NA\",\"CL\",\"FE\"],Ay=function(t,e,r){this.structure=t,r=r||Ss(e),this.atomname=e,this.element=r,this.vdw=Nv[r],this.covalent=kv[r]},My=function(t){this.structure=t,this.dict={},this.list=[]};My.prototype.add=function(t,e){var r=Ms(t=t.toUpperCase(),e=e?e.toUpperCase():Ss(t)),i=this.dict[r];if(void 0===i){var n=new Ay(this.structure,t,e);i=this.list.length,this.dict[r]=i,this.list.push(n)}return i},My.prototype.get=function(t){return this.list[t]};var Ey=function(t,e,r,i,n,o){this.structure=t,this.resname=e,this.atomTypeIdList=r,this.hetero=i?1:0,this.chemCompType=n,this.bonds=o,this.rings=void 0,this.atomCount=r.length,this.moleculeType=this.getMoleculeType(),this.backboneType=this.getBackboneType(0),this.backboneEndType=this.getBackboneType(-1),this.backboneStartType=this.getBackboneType(1),this.backboneIndexList=this.getBackboneIndexList();var a=Yv[this.backboneType],s=Yv[this.backboneStartType],c=Yv[this.backboneEndType],u=this.getAtomIndexByName(a.trace);this.traceAtomIndex=void 0!==u?u:-1;var h=this.getAtomIndexByName(a.direction1);this.direction1AtomIndex=void 0!==h?h:-1;var l=this.getAtomIndexByName(a.direction2);this.direction2AtomIndex=void 0!==l?l:-1;var p=this.getAtomIndexByName(s.backboneStart);this.backboneStartAtomIndex=void 0!==p?p:-1;var d=this.getAtomIndexByName(c.backboneEnd);this.backboneEndAtomIndex=void 0!==d?d:-1;var f;f=Vv.includes(e)?this.getAtomIndexByName(\"N1\"):this.getAtomIndexByName(\"N3\"),this.rungEndAtomIndex=void 0!==f?f:-1,this.bondReferenceAtomIndices=[]};Ey.prototype.getBackboneIndexList=function(){var t,e=[];switch(this.moleculeType){case 3:t=Xv;break;case 4:case 5:t=qv;break;default:return e}for(var r=this.structure.atomMap,i=this.atomTypeIdList,n=0,o=this.atomCount;n=2?t(l,e[l],a):r[l]=2;else if(1===r[l]&&c&&c!==l){var p=[l];i[l]=1,n.push(p);for(var d=o.length-1;d>=0;--d){var f=o[d];if(f===l)break;p.push(f),i[f]=1}}}r[a]=2,o.pop()}for(var e=this.getBondGraph(),r=new Int8Array(this.atomCount),i=new Int8Array(this.atomCount),n=[],o=[],a=0;a1)for(var y=0;y1)for(var x=0;x0){var e=this.residueStore.atomOffset[this.residueIndex];return t.includes(this.index-e)}return!1},Iy.prototype.isPolymer=function(){if(this.structure.entityList.length>0)return this.entity.isPolymer();var t=this.residueType.moleculeType;return 3===t||4===t||5===t},Iy.prototype.isSidechain=function(){return this.isPolymer()&&!this.isBackbone()},Iy.prototype.isCg=function(){var t=this.residueType.backboneType;return 4===t||5===t||6===t},Iy.prototype.isHetero=function(){return 1===this.residueType.hetero},Iy.prototype.isProtein=function(){return 3===this.residueType.moleculeType},Iy.prototype.isNucleic=function(){var t=this.residueType.moleculeType;return 4===t||5===t},Iy.prototype.isRna=function(){return 4===this.residueType.moleculeType},Iy.prototype.isDna=function(){return 5===this.residueType.moleculeType},Iy.prototype.isWater=function(){return 1===this.residueType.moleculeType},Iy.prototype.isIon=function(){return 2===this.residueType.moleculeType},Iy.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},Iy.prototype.isHelix=function(){return Lv.includes(this.sstruc)},Iy.prototype.isSheet=function(){return Ov.includes(this.sstruc)},Iy.prototype.isTurn=function(){return Dv.includes(this.sstruc)&&this.isProtein()},Iy.prototype.isBonded=function(){return 0!==this.bondHash.countArray[this.index]},Iy.prototype.isRing=function(){return 1===this.residueType.getRings().flags[this.index-this.residueAtomOffset]},Iy.prototype.distanceTo=function(t){var e=this.atomStore,r=t.atomStore,i=this.index,n=t.index,o=e.x[i]-r.x[n],a=e.y[i]-r.y[n],s=e.z[i]-r.z[n],c=o*o+a*a+s*s;return Math.sqrt(c)},Iy.prototype.connectedTo=function(t){var e=this.atomStore,r=t.atomStore,i=this.index,n=t.index;if(e.altloc&&r.altloc){var o=e.altloc[i],a=r.altloc[n];if(0!==o&&0!==a&&32!==o&&32!==a&&o!==a)return!1}var s=e.x[i]-r.x[n],c=e.y[i]-r.y[n],u=e.z[i]-r.z[n],h=s*s+c*c+u*u;if(h<64&&this.isCg())return!0;if(isNaN(h))return!1;var l=this.covalent+t.covalent,p=l+.3,d=l-.5;return hd*d},Iy.prototype.positionFromArray=function(t,e){return void 0===e&&(e=0),this.x=t[e+0],this.y=t[e+1],this.z=t[e+2],this},Iy.prototype.positionToArray=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var r=this.index,i=this.atomStore;return t[e+0]=i.x[r],t[e+1]=i.y[r],t[e+2]=i.z[r],t},Iy.prototype.positionToVector3=function(t){return void 0===t&&(t=new g),t.x=this.x,t.y=this.y,t.z=this.z,t},Iy.prototype.positionFromVector3=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},Iy.prototype.positionAdd=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},Iy.prototype.positionSub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},Iy.prototype.getResidueBonds=function(t){var e,r,i,n,o=this.residueAtomOffset,a=this.index-this.residueAtomOffset,s=this.residueType.getBonds(),c=s.atomIndices1,u=s.atomIndices2;for(t||(n=[]),e=c.indexOf(a);-1!==e;){if(i=u[e]+o,t)return i;n.push(i),e=c.indexOf(a,e+1)}for(r=u.indexOf(a);-1!==r;){if(i=c[r]+o,t)return i;n.push(i),r=u.indexOf(a,r+1)}return n},Iy.prototype.qualifiedName=function(t){var e=\"\";return this.resname&&!t&&(e+=\"[\"+this.resname+\"]\"),void 0!==this.resno&&(e+=this.resno),this.inscode&&(e+=\"^\"+this.inscode),this.chainname&&(e+=\":\"+this.chainname),this.atomname&&(e+=\".\"+this.atomname),this.altloc&&(e+=\"%\"+this.altloc),this.structure.modelStore.count>1&&(e+=\"/\"+this.modelIndex),e},Iy.prototype.clone=function(){return new this.constructor(this.structure,this.index)},Iy.prototype.toObject=function(){return{index:this.index,residueIndex:this.residueIndex,atomno:this.atomno,resname:this.resname,x:this.x,y:this.y,z:this.z,element:this.element,chainname:this.chainname,resno:this.resno,serial:this.serial,vdw:this.vdw,covalent:this.covalent,hetero:this.hetero,bfactor:this.bfactor,altloc:this.altloc,atomname:this.atomname,modelindex:this.modelindex}},Object.defineProperties(Iy.prototype,Ry);var Ly=function(t,e){this.structure=t,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.atomStore=t.atomStore,this.residueMap=t.residueMap,this.atomMap=t.atomMap,this.index=e},Oy={entity:{},entityIndex:{},chain:{},chainIndex:{},atomOffset:{},atomCount:{},atomEnd:{},modelIndex:{},chainname:{},chainid:{},resno:{},sstruc:{},inscode:{},residueType:{},resname:{},hetero:{},moleculeType:{},backboneType:{},backboneStartType:{},backboneEndType:{},traceAtomIndex:{},direction1AtomIndex:{},direction2AtomIndex:{},backboneStartAtomIndex:{},backboneEndAtomIndex:{},rungEndAtomIndex:{}};Oy.entity.get=function(){return this.structure.entityList[this.entityIndex]},Oy.entityIndex.get=function(){return this.chainStore.entityIndex[this.chainIndex]},Oy.chain.get=function(){return this.structure.getChainProxy(this.chainIndex)},Oy.chainIndex.get=function(){return this.residueStore.chainIndex[this.index]},Oy.chainIndex.set=function(t){this.residueStore.chainIndex[this.index]=t},Oy.atomOffset.get=function(){return this.residueStore.atomOffset[this.index]},Oy.atomOffset.set=function(t){this.residueStore.atomOffset[this.index]=t},Oy.atomCount.get=function(){return this.residueStore.atomCount[this.index]},Oy.atomCount.set=function(t){this.residueStore.atomCount[this.index]=t},Oy.atomEnd.get=function(){return this.atomOffset+this.atomCount-1},Oy.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},Oy.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},Oy.chainid.get=function(){return this.chainStore.getChainid(this.chainIndex)},Oy.resno.get=function(){return this.residueStore.resno[this.index]},Oy.resno.set=function(t){this.residueStore.resno[this.index]=t},Oy.sstruc.get=function(){return this.residueStore.getSstruc(this.index)},Oy.sstruc.set=function(t){this.residueStore.setSstruc(this.index,t)},Oy.inscode.get=function(){return this.residueStore.getInscode(this.index)},Oy.inscode.set=function(t){this.residueStore.getInscode(this.index,t)},Oy.residueType.get=function(){return this.residueMap.get(this.residueStore.residueTypeId[this.index])},Oy.resname.get=function(){return this.residueType.resname},Oy.hetero.get=function(){return this.residueType.hetero},Oy.moleculeType.get=function(){return this.residueType.moleculeType},Oy.backboneType.get=function(){return this.residueType.backboneType},Oy.backboneStartType.get=function(){return this.residueType.backboneStartType},Oy.backboneEndType.get=function(){return this.residueType.backboneEndType},Oy.traceAtomIndex.get=function(){return this.residueType.traceAtomIndex+this.atomOffset},Oy.direction1AtomIndex.get=function(){return this.residueType.direction1AtomIndex+this.atomOffset},Oy.direction2AtomIndex.get=function(){return this.residueType.direction2AtomIndex+this.atomOffset},Oy.backboneStartAtomIndex.get=function(){return this.residueType.backboneStartAtomIndex+this.atomOffset},Oy.backboneEndAtomIndex.get=function(){return this.residueType.backboneEndAtomIndex+this.atomOffset},Oy.rungEndAtomIndex.get=function(){return this.residueType.rungEndAtomIndex+this.atomOffset},Ly.prototype.eachAtom=function(t,e){var r,i=this.atomCount,n=this.atomOffset,o=this.structure._ap,a=n+i;if(e&&e.atomOnlyTest){var s=e.atomOnlyTest;for(r=n;r0)return this.entity.isPolymer();var t=this.residueType.moleculeType;return 3===t||4===t||5===t},Ly.prototype.isHetero=function(){return 1===this.residueType.hetero},Ly.prototype.isWater=function(){return 1===this.residueType.moleculeType},Ly.prototype.isIon=function(){return 2===this.residueType.moleculeType},Ly.prototype.isSaccharide=function(){return 6===this.residueType.moleculeType},Ly.prototype.isHelix=function(){return Lv.includes(this.sstruc)},Ly.prototype.isSheet=function(){return Ov.includes(this.sstruc)},Ly.prototype.isTurn=function(){return Dv.includes(this.sstruc)&&this.isProtein()},Ly.prototype.getAtomType=function(t){return this.atomMap.get(this.atomStore.atomTypeId[t])},Ly.prototype.getResname1=function(){return zv[this.resname.toUpperCase()]||\"X\"},Ly.prototype.getBackboneType=function(t){switch(t){case-1:return this.residueType.backboneStartType;case 1:return this.residueType.backboneEndType;default:return this.residueType.backboneType}},Ly.prototype.getAtomIndexByName=function(t){var e=this.residueType.getAtomIndexByName(t);return void 0!==e&&(e+=this.atomOffset),e},Ly.prototype.getAtomByName=function(t){return this.residueType.getAtomByName(t)},Ly.prototype.hasAtomWithName=function(t){return this.residueType.hasAtomWithName(t)},Ly.prototype.getAtomnameList=function(){var t=this;console.warn(\"getAtomnameList - might be expensive\");for(var e=this.atomCount,r=this.atomOffset,i=new Array(e),n=0;n=t){var r=this.structure.getResidueProxy(e);if(r.connectedTo(this))return r}else if(e===t-1){var i=this.chainStore.residueCount[this.chainIndex],n=this.structure.getResidueProxy(t+i-1);if(n.connectedTo(this))return n}},Ly.prototype.getBonds=function(){return this.residueType.getBonds(this)},Ly.prototype.getRings=function(){return this.residueType.getRings()},Ly.prototype.qualifiedName=function(t){var e=\"\";return this.resname&&!t&&(e+=\"[\"+this.resname+\"]\"),void 0!==this.resno&&(e+=this.resno),this.inscode&&(e+=\"^\"+this.inscode),this.chain&&(e+=\":\"+this.chainname),e+=\"/\"+this.modelIndex},Ly.prototype.clone=function(){return new this.constructor(this.structure,this.index)},Ly.prototype.toObject=function(){return{index:this.index,chainIndex:this.chainIndex,atomOffset:this.atomOffset,atomCount:this.atomCount,resno:this.resno,resname:this.resname,sstruc:this.sstruc}},Object.defineProperties(Ly.prototype,Oy);var Dy=function(t,e,r){this.structure=t,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.atomStore=t.atomStore,this.residueIndexStart=e,this.residueIndexEnd=r,this.residueCount=r-e+1;var i=this.structure.getResidueProxy(this.residueIndexStart),n=this.structure.getResidueProxy(this.residueIndexEnd);this.isPrevConnected=void 0!==i.getPreviousConnectedResidue();var o=n.getNextConnectedResidue();this.isNextConnected=void 0!==o,this.isNextNextConnected=this.isNextConnected&&void 0!==o.getNextConnectedResidue(),this.isCyclic=n.connectedTo(i),this.__residueProxy=this.structure.getResidueProxy()},Ny={chainIndex:{},modelIndex:{},chainname:{}};Ny.chainIndex.get=function(){return this.residueStore.chainIndex[this.residueIndexStart]},Ny.modelIndex.get=function(){return this.chainStore.modelIndex[this.chainIndex]},Ny.chainname.get=function(){return this.chainStore.getChainname(this.chainIndex)},Dy.prototype.isProtein=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isProtein()},Dy.prototype.isCg=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isCg()},Dy.prototype.isNucleic=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.isNucleic()},Dy.prototype.getMoleculeType=function(){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.moleculeType},Dy.prototype.getBackboneType=function(t){return this.__residueProxy.index=this.residueIndexStart,this.__residueProxy.getBackboneType(t)},Dy.prototype.getAtomIndexByType=function(t,e){this.isCyclic?-1===t?t=this.residueCount-1:t===this.residueCount&&(t=0):(-1!==t||this.isPrevConnected||(t+=1),t!==this.residueCount||this.isNextNextConnected||(t-=1));var r=this.__residueProxy;r.index=this.residueIndexStart+t;var i;switch(e){case\"trace\":i=r.traceAtomIndex;break;case\"direction1\":i=r.direction1AtomIndex;break;case\"direction2\":i=r.direction2AtomIndex;break;default:var n=r.getAtomByName(e);i=n?n.index:void 0}return i},Dy.prototype.eachAtom=function(t,e){this.eachResidue(function(r){r.eachAtom(t,e)},e)},Dy.prototype.eachAtomN=function(t,e,r){var i,n=this,o=this.residueCount,a=new Array(t);for(i=0;i=n&&r=t&&e.apply(this,s)}})}},Dy.prototype.eachResidue=function(t){for(var e=this.structure.getResidueProxy(),r=this.residueCount,i=this.residueIndexStart,n=0;n1&&t(new Dy(o,r,u.index)),r=i)):(m!==Mv&&u.index-r>1&&t(new Dy(o,r,u.index)),r=i)}i-r>1&&this.structure.getResidueProxy(r).backboneStartType&&t(new Dy(o,r,i))},ky.prototype.qualifiedName=function(){return\":\"+this.chainname+\"/\"+this.modelIndex},ky.prototype.clone=function(){return new this.constructor(this.structure,this.index)},ky.prototype.toObject=function(){return{index:this.index,residueOffset:this.residueOffset,residueCount:this.residueCount,chainname:this.chainname}},Object.defineProperties(ky.prototype,Fy);var By=function(t,e){this.structure=t,this.modelStore=t.modelStore,this.chainStore=t.chainStore,this.residueStore=t.residueStore,this.index=e},zy={chainOffset:{},chainCount:{},residueOffset:{},atomOffset:{},chainEnd:{},residueEnd:{},atomEnd:{},residueCount:{},atomCount:{}};zy.chainOffset.get=function(){return this.modelStore.chainOffset[this.index]},zy.chainOffset.set=function(t){this.modelStore.chainOffset[this.index]=t},zy.chainCount.get=function(){return this.modelStore.chainCount[this.index]},zy.chainCount.set=function(t){this.modelStore.chainCount[this.index]=t},zy.residueOffset.get=function(){return this.chainStore.residueOffset[this.chainOffset]},zy.atomOffset.get=function(){return this.residueStore.atomOffset[this.residueOffset]},zy.chainEnd.get=function(){return this.chainOffset+this.chainCount-1},zy.residueEnd.get=function(){return this.chainStore.residueOffset[this.chainEnd]+this.chainStore.residueCount[this.chainEnd]-1},zy.atomEnd.get=function(){return this.residueStore.atomOffset[this.residueEnd]+this.residueStore.atomCount[this.residueEnd]-1},zy.residueCount.get=function(){return 0===this.chainCount?0:this.residueEnd-this.residueOffset+1},zy.atomCount.get=function(){return 0===this.residueCount?0:this.atomEnd-this.atomOffset+1},By.prototype.eachAtom=function(t,e){this.eachChain(function(r){r.eachAtom(t,e)},e)},By.prototype.eachResidue=function(t,e){this.eachChain(function(r){r.eachResidue(t,e)},e)},By.prototype.eachPolymer=function(t,e){if(e&&e.chainOnlyTest){var r=e.chainOnlyTest;this.eachChain(function(i){r(i)&&i.eachPolymer(t,e)})}else this.eachChain(function(r){r.eachPolymer(t,e)})},By.prototype.eachChain=function(t,e){var r,i=this.chainCount,n=this.chainOffset,o=this.structure._cp,a=n+i;if(e&&e.test){var s=e.chainOnlyTest;if(s)for(r=n;r1?(C=r.atomRadius(w),I=C*v/(.5*P),x.calculateShiftDir(N),m?(R=2*y*C,N.multiplyScalar(R),N.negate(),D.subVectors(S,w).multiplyScalar(Math.max(.1,R/1.88)),w.positionToArray(n,E),S.positionToArray(o,E),P>=2&&(O.addVectors(w,N).add(D).toArray(n,E+3),O.addVectors(S,N).sub(D).toArray(o,E+3),P>=3&&(O.subVectors(w,N).add(D).toArray(n,E+6),O.subVectors(S,N).sub(D).toArray(o,E+6)))):(R=(y-v)*C,N.multiplyScalar(R),2===P?(O.addVectors(w,N).toArray(n,E),O.subVectors(w,N).toArray(n,E+3),O.addVectors(S,N).toArray(o,E),O.subVectors(S,N).toArray(o,E+3)):3===P?(w.positionToArray(n,E),O.addVectors(w,N).toArray(n,E+3),O.subVectors(w,N).toArray(n,E+6),S.positionToArray(o,E),O.addVectors(S,N).toArray(o,E+3),O.subVectors(S,N).toArray(o,E+6)):(w.positionToArray(n,E),S.positionToArray(o,E)))):(w.positionToArray(n,E),S.positionToArray(o,E))),a&&(i.bondColorToArray(x,1,a,E),i.bondColorToArray(x,0,s,E),f&&P>1))for(M=1;M1))for(M=1;M1))for(I=u[L]*v/(m?1:.5*P),M=m?1:0;M1))for(I=h[L]*v/(m?1:.5*P),M=m?1:0;Ma&&(a=e),r>s&&(s=r),u>c&&(c=u)},e),r.min.set(i,n,o),r.max.set(a,s,c),t.Debug&&jf.timeEnd(\"getBoundingBox\"),r},Uy.prototype.getPrincipalAxes=function(e){t.Debug&&jf.time(\"getPrincipalAxes\");var r=0,i=new Pa(3,this.atomCount),n=i.data;return this.eachAtom(function(t){n[r+0]=t.x,n[r+1]=t.y,n[r+2]=t.z,r+=3},e),t.Debug&&jf.timeEnd(\"getPrincipalAxes\"),new ty(i)},Uy.prototype.atomCenter=function(t){return t?this.getBoundingBox(t).getCenter():this.center.clone()},Uy.prototype.getSequence=function(t){var e=[],r=this.getResidueProxy();return this.eachAtom(function(t){r.index=t.residueIndex,t.index===r.traceAtomIndex&&e.push(r.getResname1())},t),e},Uy.prototype.getAtomIndices=function(t){var e;if(t&&t.string)e=[],this.eachAtom(function(t){e.push(t.index)},t);else{var r={what:{index:!0}};e=this.getAtomData(r).index}return e},Uy.prototype.getChainnameCount=function(t){var e=new Set;return this.eachChain(function(t){t.residueCount&&e.add(t.chainname)},t),e.size},Uy.prototype.updatePosition=function(t){var e=0;this.eachAtom(function(r){r.positionFromArray(t,e),e+=3})},Uy.prototype.refreshPosition=function(){this.getBoundingBox(void 0,this.boundingBox),this.boundingBox.getCenter(this.center),this.spatialHash=new Ya(this.atomStore,this.boundingBox)},Uy.prototype.dispose=function(){this.frames&&(this.frames.length=0),this.boxes&&(this.boxes.length=0),this.bondStore.dispose(),this.backboneBondStore.dispose(),this.rungBondStore.dispose(),this.atomStore.dispose(),this.residueStore.dispose(),this.chainStore.dispose(),this.modelStore.dispose(),delete this.bondStore,delete this.atomStore,delete this.residueStore,delete this.chainStore,delete this.modelStore,delete this.frames,delete this.boxes,delete this.cif,delete this.bondSet,delete this.atomSet},Object.defineProperties(Uy.prototype,jy);var Gy=function(t,e){var r;\"function\"==typeof t.eachAtom?r=t.atomCount:t instanceof Float32Array&&(r=t.length/3);var i=new Pa(3,r),n=new Pa(3,r);this.coords1t=new Pa(r,3),this.coords2t=new Pa(r,3),this.A=new Pa(3,3),this.W=new Pa(1,3),this.U=new Pa(3,3),this.V=new Pa(3,3),this.VH=new Pa(3,3),this.R=new Pa(3,3),this.tmp=new Pa(3,3),this.c=new Pa(3,3),this.c.data.set([1,0,0,0,1,0,0,0,-1]),this.prepCoords(t,i),this.prepCoords(e,n),this._superpose(i,n)};Gy.prototype._superpose=function(e,r){this.mean1=Da(e),this.mean2=Da(r),Na(e,this.mean1),Na(r,this.mean2),Ca(this.coords1t,e),Ca(this.coords2t,r),Ia(this.A,this.coords2t,this.coords1t),Ua(this.A,this.W,this.U,this.V),Ra(this.V,this.VH),Oa(this.R,this.U,this.VH),La(this.R)<0&&(t.Debug&&jf.log(\"R not a right handed system\"),Oa(this.tmp,this.c,this.VH),Oa(this.R,this.U,this.tmp))},Gy.prototype.prepCoords=function(t,e){var r=0,i=e.data;\"function\"==typeof t.eachAtom?t.eachAtom(function(t){i[r+0]=t.x,i[r+1]=t.y,i[r+2]=t.z,r+=3}):t instanceof Float32Array?i.set(t):jf.warn(\"prepCoords: input type unknown\")},Gy.prototype.transform=function(t){var e;\"function\"==typeof t.eachAtom?e=t.atomCount:t instanceof Float32Array&&(e=t.length/3);var r=new Pa(3,e),i=new Pa(e,3);this.prepCoords(t,r),Na(r,this.mean1),Ia(i,this.R,r),Ca(r,i),ka(r,this.mean2);var n=0,o=r.data;\"function\"==typeof t.eachAtom?t.eachAtom(function(t){t.x=o[n+0],t.y=o[n+1],t.z=o[n+2],n+=3}):t instanceof Float32Array?t.set(o.subarray(0,3*e)):jf.warn(\"transform: input type unknown\")};var Vy=function(t,e){this.signals={startedRunning:new no,haltedRunning:new no},t.signals.playerChanged.add(function(t){t!==this&&this.pause()},this);var r=Object.assign({},e),i=gn(t.frameCount,1);this.traj=t,this.start=gn(r.start,0),this.end=Math.min(gn(r.end,i-1),i-1),this.step=gn(r.step,Math.ceil((i+1)/100)),this.timeout=gn(r.timeout,50),this.interpolateType=gn(r.interpolateType,\"\"),this.interpolateStep=gn(r.interpolateStep,5),this.mode=gn(r.mode,\"loop\"),this.direction=gn(r.direction,\"forward\"),this._run=!1,this._previousTime=0,this._currentTime=0,this._currentStep=1,this._currentFrame=this.start,this._direction=\"bounce\"===this.direction?\"forward\":this.direction,t.signals.countChanged.add(function(t){this.end=Math.min(gn(this.end,t-1),t-1)},this),this._animate=this._animate.bind(this)},$y={isRunning:{}};$y.isRunning.get=function(){return this._run},Vy.prototype.setParameters=function(t){var e=Object.assign({},t);void 0!==e.start&&(this.start=e.start),void 0!==e.end&&(this.end=e.end),void 0!==e.step&&(this.step=e.step),void 0!==e.timeout&&(this.timeout=e.timeout),void 0!==e.interpolateType&&(this.interpolateType=e.interpolateType),void 0!==e.interpolateStep&&(this.interpolateStep=e.interpolateStep),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.direction&&(this.direction=e.direction,\"bounce\"!==this.direction&&(this._direction=this.direction))},Vy.prototype._animate=function(){if(this._run){this._currentTime=window.performance.now();var t=this._currentTime-this._previousTime,e=this.interpolateType?this.interpolateStep:1,r=this.timeout/e,i=this.traj;if(i&&i.frameCount&&!i.inProgress&&t>=r)if(this.interpolateType)if(this._currentStep>this.interpolateStep&&(this._currentStep=1),1===this._currentStep&&(this._currentFrame=this._nextInterpolated()),i.hasFrame(this._currentFrame)){this._currentStep+=1;var n=this._currentStep/(this.interpolateStep+1);i.setFrameInterpolated.apply(i,this._currentFrame.concat([n],[this.interpolateType])),this._previousTime=this._currentTime}else i.loadFrame(this._currentFrame);else{var o=this._next();i.hasFrame(o)?(i.setFrame(o),this._previousTime=this._currentTime):i.loadFrame(o)}window.requestAnimationFrame(this._animate)}},Vy.prototype._next=function(){var t;return((t=\"forward\"===this._direction?this.traj.currentFrame+this.step:this.traj.currentFrame-this.step)>this.end||t=this.end?e=this.start:\"backward\"===this.direction&&t<=this.start&&(e=this.end),this.traj.setFrame(e),this._run=!0,this._animate(),this.signals.startedRunning.dispatch()}},Vy.prototype.pause=function(){this._run=!1,this.signals.haltedRunning.dispatch()},Vy.prototype.stop=function(){this.pause(),this.traj.setFrame(this.start)},Object.defineProperties(Vy.prototype,$y);var Hy=function(t,e,r){this.signals={countChanged:new no,frameChanged:new no,playerChanged:new no};var i=r||{};this.deltaTime=gn(i.deltaTime,0),this.timeOffset=gn(i.timeOffset,0),this.centerPbc=gn(i.centerPbc,!1),this.removePbc=gn(i.removePbc,!1),this.superpose=gn(i.superpose,!1),this.name=t.replace(/^.*[\\\\/]/,\"\"),this.trajPath=t,this.initialCoords=null,this.structureCoords=null,this.selection=new Cf(gn(i.sele,\"backbone and not hydrogen\")),this.selection.signals.stringChanged.add(function(){this.selectionIndices=this.structure.getAtomIndices(this.selection),this._resetCache(),this._saveInitialCoords(),this.setFrame(this._currentFrame)},this),this._frameCount=0,this._currentFrame=-1},Wy={frameCount:{},currentFrame:{}};Wy.frameCount.get=function(){return this._frameCount},Wy.currentFrame.get=function(){return this._currentFrame},Hy.prototype._init=function(t){this.setStructure(t),this._loadFrameCount(),this.setPlayer(new Vy(this))},Hy.prototype.setStructure=function(t){this.structure=t,this.atomCount=t.atomCount,this.backboneIndices=this._getIndices(new Cf(\"backbone and not hydrogen\")),this._makeAtomIndices(),this._saveStructureCoords(),this.selectionIndices=this._getIndices(this.selection),this._resetCache(),this._saveInitialCoords(),this.setFrame(this._currentFrame)},Hy.prototype._saveInitialCoords=function(){var t=this;0!==Ho(this.structureCoords)||0!==$o(this.structureCoords)?(this.initialCoords=new Float32Array(this.structureCoords),this._makeSuperposeCoords()):this.frameCache[0]?(this.initialCoords=new Float32Array(this.frameCache[0]),this._makeSuperposeCoords()):this.loadFrame(0,function(){return t._saveInitialCoords()})},Hy.prototype._saveStructureCoords=function(){var t={what:{position:!0}};this.structureCoords=this.structure.getAtomData(t).position},Hy.prototype.setSelection=function(t){return this.selection.setString(t),this},Hy.prototype._getIndices=function(t){var e=0,r=t.test,i=[];return this.structure.eachAtom(function(t){r(t)&&i.push(e),e+=1}),i},Hy.prototype._makeSuperposeCoords=function(){var t=this,e=3*this.selectionIndices.length;this.coords1=new Float32Array(e),this.coords2=new Float32Array(e);for(var r=this.initialCoords,i=this.coords2,n=0;n0&&this.centerPbc){var n=[e[0],e[4],e[8]];Ts(r,Cs(this.backboneIndices,r,n),n)}this.removePbc&&Ps(r,e)}this.selectionIndices.length>0&&this.coords1&&this.superpose&&this._doSuperpose(r),this.frameCache[t]=r,this.boxCache[t]=e,this.frameCacheSize+=1},Hy.prototype._setFrameCount=function(t){t!==this._frameCount&&(this._frameCount=t,this.signals.countChanged.dispatch(t))},Hy.prototype.dispose=function(){this._resetCache(),this._disposed=!0,this.player&&this.player.stop()},Hy.prototype.setPlayer=function(t){this.player=t,this.signals.playerChanged.dispatch(t)},Hy.prototype.getPath=function(t,e){jf.error(\"Trajectory.getPath not implemented\",t,e)},Hy.prototype.getFrameTime=function(t){return this.timeOffset+t*this.deltaTime},Object.defineProperties(Hy.prototype,Wy),Yf.add(\"shader/Mesh.vert\",\"#define STANDARD\\nuniform float nearClip;\\nuniform vec3 clipCenter;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\\nvarying vec3 vViewPosition;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\n#if defined( PICKING )\\n#include unpack_color\\nattribute float primitiveId;\\nvarying vec3 vPickingColor;\\n#elif defined( NOLIGHT )\\nvarying vec3 vColor;\\n#else\\n#include color_pars_vertex\\n#ifndef FLAT_SHADED\\nvarying vec3 vNormal;\\n#endif\\n#endif\\n#include common\\nvoid main(){\\n#if defined( PICKING )\\nvPickingColor = unpackColor( primitiveId );\\n#elif defined( NOLIGHT )\\nvColor = color;\\n#else\\n#include color_vertex\\n#include beginnormal_vertex\\n#include defaultnormal_vertex\\n#ifndef FLAT_SHADED\\nvNormal = normalize( transformedNormal );\\n#endif\\n#endif\\n#include begin_vertex\\n#include project_vertex\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\\nvViewPosition = -mvPosition.xyz;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\\n#endif\\n#include nearclip_vertex\\n}\"),Yf.add(\"shader/Mesh.frag\",\"#define STANDARD\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\nuniform float nearClip;\\nuniform float clipRadius;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\\nvarying vec3 vViewPosition;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\n#if defined( PICKING )\\nuniform float objectId;\\nvarying vec3 vPickingColor;\\n#elif defined( NOLIGHT )\\nvarying vec3 vColor;\\n#else\\n#ifndef FLAT_SHADED\\nvarying vec3 vNormal;\\n#endif\\n#include common\\n#include color_pars_fragment\\n#include fog_pars_fragment\\n#include bsdfs\\n#include lights_pars\\n#include lights_physical_pars_fragment\\n#endif\\nvoid main(){\\n#include nearclip_fragment\\n#include radiusclip_fragment\\n#if defined( PICKING )\\nif( opacity < 0.7 )\\ndiscard;\\ngl_FragColor = vec4( vPickingColor, objectId );\\n#elif defined( NOLIGHT )\\ngl_FragColor = vec4( vColor, opacity );\\n#else\\nvec4 diffuseColor = vec4( diffuse, opacity );\\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\nvec3 totalEmissiveLight = emissive;\\n#include color_fragment\\n#include roughnessmap_fragment\\n#include metalnessmap_fragment\\n#include normal_flip\\n#include normal_fragment\\n#include dull_interior_fragment\\n#include lights_physical_fragment\\n#include lights_template\\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n#include premultiplied_alpha_fragment\\n#include tonemapping_fragment\\n#include encodings_fragment\\n#include fog_fragment\\n#include opaque_back_fragment\\n#endif\\n}\");var Xy={f:1,v2:2,v3:3,c:3},qy=function(t,e){var r=t||{},i=e||{};this.opaqueBack=gn(i.opaqueBack,!1),this.dullInterior=gn(i.dullInterior,!1),this.side=gn(i.side,\"double\"),this.opacity=gn(i.opacity,1),this.depthWrite=gn(i.depthWrite,!0),this.clipNear=gn(i.clipNear,0),this.clipRadius=gn(i.clipRadius,0),this.clipCenter=gn(i.clipCenter,new g),this.flatShaded=gn(i.flatShaded,!1),this.background=gn(i.background,!1),this.linewidth=gn(i.linewidth,1),this.wireframe=gn(i.wireframe,!1),this.wireframeLinewidth=gn(i.wireframeLinewidth,1),this.roughness=gn(i.roughness,.4),this.metalness=gn(i.metalness,0),this.diffuse=gn(i.diffuse,16777215),this.forceTransparent=gn(i.forceTransparent,!1),this.disablePicking=gn(i.disablePicking,!1),this.geometry=new Ct,this.indexVersion=0,this.wireframeIndexVersion=-1,this.uniforms=up.merge([cp.common,{fogColor:{value:null},fogNear:{value:0},fogFar:{value:0},opacity:{value:this.opacity},nearClip:{value:0},clipRadius:{value:this.clipRadius},clipCenter:{value:this.clipCenter}},{emissive:{value:new tt(0)},roughness:{value:this.roughness},metalness:{value:this.metalness}},cp.ambient,cp.lights]),this.uniforms.diffuse.value.set(this.diffuse),this.pickingUniforms={nearClip:{value:0},objectId:{value:0},opacity:{value:this.opacity}},this.group=new Ne,this.wireframeGroup=new Ne,this.pickingGroup=new Ne,this.matrix=gn(i.matrix,new v);var n=r.position||r.position1;this._positionDataSize=n?n.length/3:0,this.addAttributes({position:{type:\"v3\",value:r.position},color:{type:\"c\",value:r.color},primitiveId:{type:\"f\",value:r.primitiveId}}),r.index&&this.initIndex(r.index),this.picking=r.picking,this.makeWireframeGeometry()},Yy={parameters:{},matrix:{},transparent:{},size:{},attributeSize:{},pickable:{},dynamic:{},vertexShader:{},fragmentShader:{}};Yy.parameters.get=function(){return{opaqueBack:{updateShader:!0},dullInterior:{updateShader:!0},side:{updateShader:!0,property:!0},opacity:{uniform:!0},depthWrite:{property:!0},clipNear:{updateShader:!0,property:!0},clipRadius:{updateShader:!0,property:!0,uniform:!0},clipCenter:{uniform:!0},flatShaded:{updateShader:!0},background:{updateShader:!0},linewidth:{property:!0},wireframe:{updateVisibility:!0},roughness:{uniform:!0},metalness:{uniform:!0},diffuse:{uniform:!0},matrix:{}}},Yy.matrix.set=function(t){this.setMatrix(t)},Yy.matrix.get=function(){return this.group.matrix.clone()},Yy.transparent.get=function(){return this.opacity<1||this.forceTransparent},Yy.size.get=function(){return this._positionDataSize},Yy.attributeSize.get=function(){return this.size},Yy.pickable.get=function(){return!!this.picking&&!this.disablePicking},Yy.dynamic.get=function(){return!0},Yy.vertexShader.get=function(){},Yy.fragmentShader.get=function(){},qy.prototype.setMatrix=function(t){Os(this.group,t),Os(this.wireframeGroup,t),Os(this.pickingGroup,t)},qy.prototype.initIndex=function(t){this.geometry.setIndex(new St(t,1)),this.geometry.getIndex().setDynamic(this.dynamic)},qy.prototype.makeMaterial=function(){var t=Ls(this.side),e=new ot({uniforms:this.uniforms,vertexShader:\"\",fragmentShader:\"\",depthTest:!0,transparent:this.transparent,depthWrite:this.depthWrite,lights:!0,fog:!0,side:t,linewidth:this.linewidth});e.vertexColors=uh,e.extensions.derivatives=this.flatShaded,e.extensions.fragDepth=this.isImpostor,e.clipNear=this.clipNear;var r=new ot({uniforms:this.uniforms,vertexShader:\"\",fragmentShader:\"\",depthTest:!0,transparent:this.transparent,depthWrite:this.depthWrite,lights:!1,fog:!0,side:t,linewidth:this.linewidth});r.vertexColors=uh,r.clipNear=this.clipNear;var i=new ot({uniforms:this.pickingUniforms,vertexShader:\"\",fragmentShader:\"\",depthTest:!0,transparent:!1,depthWrite:this.depthWrite,lights:!1,fog:!1,side:t,linewidth:this.linewidth,blending:hh});i.vertexColors=uh,i.extensions.fragDepth=this.isImpostor,i.clipNear=this.clipNear,this.material=e,this.wireframeMaterial=r,this.pickingMaterial=i,this.updateShader()},qy.prototype.makeWireframeGeometry=function(){this.makeWireframeIndex();var t=this.geometry,e=this.wireframeIndex,r=new Ct;r.attributes=t.attributes,e&&(r.setIndex(new St(e,1).setDynamic(this.dynamic)),r.setDrawRange(0,this.wireframeIndexCount)),this.wireframeGeometry=r},qy.prototype.makeWireframeIndex=function(){function t(t,r){if(t>r){var i=t;t=r,r=i}var n=e[t];return void 0===n?(e[t]=[r],!0):!n.includes(r)&&(n.push(r),!0)}var e=[],r=this.geometry,i=r.index;if(this.wireframe)if(i){var n=i.array,o=n.length;r.drawRange.count!==1/0&&(o=r.drawRange.count);var a;a=this.wireframeIndex&&this.wireframeIndex.length>2*o?this.wireframeIndex:On(2*o,r.attributes.position.count);var s=0;e.length=0;for(var c=0;c2*d?this.wireframeIndex:On(2*d,d);for(var f=0,m=0;fthis.wireframeGeometry.index.array.length)this.wireframeGeometry.setIndex(new St(this.wireframeIndex,1).setDynamic(this.dynamic));else{var t=this.wireframeGeometry.getIndex();t.set(this.wireframeIndex),t.needsUpdate=this.wireframeIndexCount>0,t.updateRange.count=this.wireframeIndexCount}this.wireframeGeometry.setDrawRange(0,this.wireframeIndexCount)},qy.prototype.getRenderOrder=function(){var t=0;return this.isText?t=1:this.transparent&&(t=this.isSurface?3:2),t},qy.prototype._getMesh=function(t){this.material||this.makeMaterial();var e,r=this.geometry,i=this[t];return this.isLine?e=new Re(r,i):this.isPoint?(e=new De(r,i),this.sortParticles&&(e.sortParticles=!0)):e=new Bt(r,i),e.frustumCulled=!1,e.renderOrder=this.getRenderOrder(),e},qy.prototype.getMesh=function(){return this._getMesh(\"material\")},qy.prototype.getWireframeMesh=function(){var t;return this.material||this.makeMaterial(),this.wireframeGeometry||this.makeWireframeGeometry(),t=new Re(this.wireframeGeometry,this.wireframeMaterial),t.frustumCulled=!1,t.renderOrder=this.getRenderOrder(),t},qy.prototype.getPickingMesh=function(){return this._getMesh(\"pickingMaterial\")},qy.prototype.getShader=function(t,e){return Ro(t,this.getDefines(e))},qy.prototype.getVertexShader=function(t){return this.getShader(this.vertexShader,t)},qy.prototype.getFragmentShader=function(t){return this.getShader(this.fragmentShader,t)},qy.prototype.getDefines=function(t){var e={};return this.clipNear&&(e.NEAR_CLIP=1),this.clipRadius&&(e.RADIUS_CLIP=1),\"picking\"===t?e.PICKING=1:((\"background\"===t||this.background)&&(e.NOLIGHT=1),this.flatShaded&&(e.FLAT_SHADED=1),this.opaqueBack&&(e.OPAQUE_BACK=1),this.dullInterior&&(e.DULL_INTERIOR=1)),e},qy.prototype.getParameters=function(){var t=this,e={};for(var r in t.parameters)e[r]=t[r];return e},qy.prototype.addUniforms=function(t){this.uniforms=up.merge([this.uniforms,t]),this.pickingUniforms=up.merge([this.pickingUniforms,t])},qy.prototype.addAttributes=function(t){var e=this;for(var r in t){var i=void 0,n=t[r],o=e.attributeSize*Xy[n.type];n.value?(o!==n.value.length&&jf.error(\"attribute value has wrong length\",r),i=n.value):i=Ln(\"float32\",o),e.geometry.addAttribute(r,new St(i,Xy[n.type]).setDynamic(e.dynamic))}},qy.prototype.updateRenderOrder=function(){function t(t){t.renderOrder=e}var e=this.getRenderOrder();this.group.children.forEach(t),this.pickingGroup&&this.pickingGroup.children.forEach(t)},qy.prototype.updateShader=function(){var t=this.material,e=this.wireframeMaterial,r=this.pickingMaterial;t.vertexShader=this.getVertexShader(),t.fragmentShader=this.getFragmentShader(),t.needsUpdate=!0,e.vertexShader=this.getShader(\"Line.vert\"),e.fragmentShader=this.getShader(\"Line.frag\"),e.needsUpdate=!0,r.vertexShader=this.getVertexShader(\"picking\"),r.fragmentShader=this.getFragmentShader(\"picking\"),r.needsUpdate=!0},qy.prototype.setParameters=function(t){var e=this;if(t){var r=t,i=this.parameters,n={},o={},a=!1,s=!1;for(var c in r){var u=r[c];void 0!==u&&(void 0!==i[c]&&(e[c]=u,i[c].property&&(!0!==i[c].property?n[i[c].property]=u:n[c]=u),i[c].uniform&&(!0!==i[c].uniform?o[i[c].uniform]=u:o[c]=u),i[c].updateShader&&(a=!0),i[c].updateVisibility&&(s=!0),e.dynamic&&\"wireframe\"===c&&!0===u&&e.updateWireframeIndex(),\"flatShaded\"===c&&(e.material.extensions.derivatives=e.flatShaded),\"forceTransparent\"===c&&(n.transparent=e.transparent)))}this.setProperties(n),this.setUniforms(o),a&&this.updateShader(),s&&this.setVisibility(this.visible)}},qy.prototype.setAttributes=function(t){var e=this,r=this.geometry,i=r.attributes;for(var n in t)if(\"picking\"!==n){var o=t[n],a=o.length;if(\"index\"===n){var s=r.getIndex();r.setDrawRange(0,1/0),a>s.array.length?r.setIndex(new St(o,1).setDynamic(e.dynamic)):(s.set(o),s.needsUpdate=a>0,s.updateRange.count=a,r.setDrawRange(0,a)),e.indexVersion++,e.wireframe&&e.updateWireframeIndex()}else{var c=i[n];a>c.array.length?r.addAttribute(n,new St(o,c.itemSize).setDynamic(e.dynamic)):(i[n].set(o),i[n].needsUpdate=a>0,i[n].updateRange.count=a)}}},qy.prototype.setUniforms=function(t){var e=this;if(t){var r=this.material.uniforms,i=this.wireframeMaterial.uniforms,n=this.pickingMaterial.uniforms;for(var o in t)\"opacity\"===o&&e.setProperties({transparent:e.transparent}),void 0!==r[o]&&(r[o].value.isVector3?r[o].value.copy(t[o]):r[o].value.set?r[o].value.set(t[o]):r[o].value=t[o]),void 0!==i[o]&&(i[o].value.isVector3?i[o].value.copy(t[o]):i[o].value.set?i[o].value.set(t[o]):i[o].value=t[o]),void 0!==n[o]&&(n[o].value.isVector3?n[o].value.copy(t[o]):n[o].value.set?n[o].value.set(t[o]):n[o].value=t[o])}},qy.prototype.setProperties=function(t){var e=this;if(t){var r=this.material,i=this.wireframeMaterial,n=this.pickingMaterial;for(var o in t){var a=t[o];\"transparent\"===o?e.updateRenderOrder():\"side\"===o&&(a=Ls(a)),void 0!==r[o]&&(r[o]=a),void 0!==i[o]&&(i[o]=a),void 0!==n[o]&&(n[o]=a)}r.needsUpdate=!0,i.needsUpdate=!0,n.needsUpdate=!0}},qy.prototype.setVisibility=function(t){this.visible=t,this.wireframe?(this.group.visible=!1,this.wireframeGroup.visible=t,this.pickable&&(this.pickingGroup.visible=!1)):(this.group.visible=t,this.wireframeGroup.visible=!1,this.pickable&&(this.pickingGroup.visible=t))},qy.prototype.dispose=function(){this.material&&this.material.dispose(),this.wireframeMaterial&&this.wireframeMaterial.dispose(),this.pickingMaterial&&this.pickingMaterial.dispose(),this.geometry.dispose(),this.wireframeGeometry&&this.wireframeGeometry.dispose()},Object.defineProperties(qy.prototype,Yy);var Zy=function(t){function e(e,r){var i=e||{};!i.primitiveId&&i.position&&(i.primitiveId=Bo(i.position.length/3)),t.call(this,i,r),this.addAttributes({normal:{type:\"v3\",value:i.normal}}),void 0===i.normal&&this.geometry.computeVertexNormals()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertexShader:{},fragmentShader:{}};return r.vertexShader.get=function(){return\"Mesh.vert\"},r.fragmentShader.get=function(){return\"Mesh.frag\"},Object.defineProperties(e.prototype,r),e}(qy),Ky=new st,Qy=[Hg,jg,Wg,$g,Xg,Gg,Ug,Vg,Yg,qg],Jy=function(t,e){var r=this;this.name=gn(t,\"shape\");var i=e||{};this.aspectRatio=gn(i.aspectRatio,1.5),this.sphereDetail=gn(i.sphereDetail,2),this.radialSegments=gn(i.radialSegments,50),this.disableImpostor=gn(i.disableImpostor,!1),this.openEnded=gn(i.openEnded,!1),this.labelParams=gn(i.labelParams,{}),this.boundingBox=new st,this.bufferList=[],this.meshCount=0,Qy.forEach(function(t){Object.keys(t.fields).forEach(function(e){r[t.getShapeKey(e)]=[]}),r[t.getShapeKey(\"name\")]=[]})},tb={center:{},type:{}};Jy.prototype.addBuffer=function(t){this.bufferList.push(t);var e=t.geometry;return e.boundingBox||e.computeBoundingBox(),this.boundingBox.union(e.boundingBox),this},Jy.prototype.addMesh=function(t,e,r,i,n){t=Gn(t),e=Gn(e),Array.isArray(r)&&(r=On(r,t.length)),i&&(i=Gn(i));var o={position:t,color:e,index:r,normal:i},a=new lv(this,Object.assign({serial:this.meshCount,name:n},o)),s=new Zy(Object.assign({picking:a},o));return this.bufferList.push(s),Ky.setFromArray(t),this.boundingBox.union(Ky),this.meshCount+=1,this},Jy.prototype.addSphere=function(t,e,r,i){return Ug.objectToShape(this,{position:t,color:e,radius:r,name:i}),this},Jy.prototype.addEllipsoid=function(t,e,r,i,n,o){return Xg.objectToShape(this,{position:t,color:e,radius:r,majorAxis:i,minorAxis:n,name:o}),this},Jy.prototype.addTorus=function(t,e,r,i,n,o){return qg.objectToShape(this,{position:t,color:e,radius:r,majorAxis:i,minorAxis:n,name:o}),this},Jy.prototype.addCylinder=function(t,e,r,i,n){return $g.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addCone=function(t,e,r,i,n){return Wg.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addArrow=function(t,e,r,i,n){return Hg.objectToShape(this,{position1:t,position2:e,color:r,radius:i,name:n}),this},Jy.prototype.addBox=function(t,e,r,i,n,o){return jg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addOctahedron=function(t,e,r,i,n,o){return Gg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addTetrahedron=function(t,e,r,i,n,o){return Vg.objectToShape(this,{position:t,color:e,size:r,heightAxis:i,depthAxis:n,name:o}),this},Jy.prototype.addText=function(t,e,r,i){return Yg.objectToShape(this,{position:t,color:e,size:r,text:i}),this},Jy.prototype.addLabel=function(t,e,r,i){return console.warn(\"Shape.addLabel is deprecated, use .addText instead\"),this.addText(t,e,r,i)},Jy.prototype.getBufferList=function(){var t=this,e=[],r={aspectRatio:this.aspectRatio,sphereDetail:this.sphereDetail,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,openEnded:this.openEnded,labelParams:this.labelParams};return Qy.forEach(function(i){t[i.getShapeKey(\"color\")].length&&e.push(i.bufferFromShape(t,r))}),this.bufferList.concat(e)},Jy.prototype.dispose=function(){var t=this;this.bufferList.forEach(function(t){t.dispose()}),this.bufferList.length=0,Qy.forEach(function(e){Object.keys(e.fields).forEach(function(r){t[e.getShapeKey(r)].length=0}),t[e.getShapeKey(\"name\")].length=0})},tb.center.get=function(){return this._center||(this._center=this.boundingBox.getCenter()),this._center},tb.type.get=function(){return\"Shape\"},Object.defineProperties(Jy.prototype,tb);var eb=function(t,e,r){this.type=\"\",this.parameters={lazy:{type:\"boolean\"},clipNear:{type:\"range\",step:1,max:100,min:0,buffer:!0},clipRadius:{type:\"number\",precision:1,max:1e3,min:0,buffer:!0},clipCenter:{type:\"vector3\",precision:1,buffer:!0},flatShaded:{type:\"boolean\",buffer:!0},opacity:{type:\"range\",step:.01,max:1,min:0,buffer:!0},depthWrite:{type:\"boolean\",buffer:!0},side:{type:\"select\",buffer:!0,options:{front:\"front\",back:\"back\",double:\"double\"}},wireframe:{type:\"boolean\",buffer:!0},linewidth:{type:\"integer\",max:50,min:1,buffer:!0},colorScheme:{type:\"select\",update:\"color\",options:{}},colorScale:{type:\"select\",update:\"color\",options:Hf.getScales()},colorReverse:{type:\"boolean\",update:\"color\"},colorValue:{type:\"color\",update:\"color\"},colorDomain:{type:\"hidden\",update:\"color\"},colorMode:{type:\"select\",update:\"color\",options:Hf.getModes()},roughness:{type:\"range\",step:.01,max:1,min:0,buffer:!0},metalness:{type:\"range\",step:.01,max:1,min:0,buffer:!0},diffuse:{type:\"color\",buffer:!0},matrix:{type:\"hidden\",buffer:!0},disablePicking:{type:\"boolean\",rebuild:!0}},this.viewer=e,this.tasks=new bm,this.queue=new Ds(this.make.bind(this)),this.bufferList=[],this.parameters.colorScheme&&(this.parameters.colorScheme.options=Hf.getSchemes())};eb.prototype.init=function(t){var e=t||{};this.clipNear=gn(e.clipNear,0),this.clipRadius=gn(e.clipRadius,0),this.clipCenter=gn(e.clipCenter,new g),this.flatShaded=gn(e.flatShaded,!1),this.side=gn(e.side,\"double\"),this.opacity=gn(e.opacity,1),this.depthWrite=gn(e.depthWrite,!0),this.wireframe=gn(e.wireframe,!1),this.linewidth=gn(e.linewidth,2),this.setColor(e.color,e),this.colorScheme=gn(e.colorScheme,\"uniform\"),this.colorScale=gn(e.colorScale,\"\"),this.colorReverse=gn(e.colorReverse,!1),this.colorValue=gn(e.colorValue,9474192),this.colorDomain=gn(e.colorDomain,void 0),this.colorMode=gn(e.colorMode,\"hcl\"),this.visible=gn(e.visible,!0),this.quality=gn(e.quality,void 0),this.roughness=gn(e.roughness,.4),this.metalness=gn(e.metalness,0),this.diffuse=gn(e.diffuse,16777215),this.lazy=gn(e.lazy,!1),this.lazyProps={build:!1,bufferParams:{},what:{}},this.matrix=gn(e.matrix,new v),this.disablePicking=gn(e.disablePicking,!1);var r=this.parameters;!0===r.sphereDetail&&(r.sphereDetail={type:\"integer\",max:3,min:0,rebuild:\"impostor\"}),!0===r.radialSegments&&(r.radialSegments={type:\"integer\",max:25,min:5,rebuild:\"impostor\"}),!0===r.openEnded&&(r.openEnded={type:\"boolean\",rebuild:\"impostor\",buffer:!0}),!0===r.disableImpostor&&(r.disableImpostor={type:\"boolean\",rebuild:!0}),\"low\"===e.quality?(r.sphereDetail&&(this.sphereDetail=0),r.radialSegments&&(this.radialSegments=5)):\"medium\"===e.quality?(r.sphereDetail&&(this.sphereDetail=1),r.radialSegments&&(this.radialSegments=10)):\"high\"===e.quality?(r.sphereDetail&&(this.sphereDetail=2),r.radialSegments&&(this.radialSegments=20)):(r.sphereDetail&&(this.sphereDetail=gn(e.sphereDetail,1)),r.radialSegments&&(this.radialSegments=gn(e.radialSegments,10))),r.openEnded&&(this.openEnded=gn(e.openEnded,!0)),r.disableImpostor&&(this.disableImpostor=gn(e.disableImpostor,!1))},eb.prototype.getColorParams=function(t){return Object.assign({scheme:this.colorScheme,scale:this.colorScale,reverse:this.colorReverse,value:this.colorValue,domain:this.colorDomain,mode:this.colorMode},t)},eb.prototype.getBufferParams=function(t){return Object.assign({clipNear:this.clipNear,clipRadius:this.clipRadius,clipCenter:this.clipCenter,flatShaded:this.flatShaded,opacity:this.opacity,depthWrite:this.depthWrite,side:this.side,wireframe:this.wireframe,linewidth:this.linewidth,roughness:this.roughness,metalness:this.metalness,diffuse:this.diffuse,matrix:this.matrix,disablePicking:this.disablePicking},t)},eb.prototype.setColor=function(t,e){var r=Object.keys(Hf.getSchemes());return\"string\"==typeof t&&r.includes(t.toLowerCase())?e?e.colorScheme=t:this.setParameters({colorScheme:t}):void 0!==t&&(t=new tt(t).getHex(),e?(e.colorScheme=\"uniform\",e.colorValue=t):this.setParameters({colorScheme:\"uniform\",colorValue:t})),this},eb.prototype.create=function(){},eb.prototype.update=function(){this.build()},eb.prototype.build=function(t){return this.lazy&&!this.visible?void(this.lazyProps.build=!0):this.prepare?(this.queue.length()>0?(this.tasks.change(1-this.queue.length()),this.queue.kill()):this.tasks.increment(),void this.queue.push(t||!1)):(this.tasks.increment(),void this.make())},eb.prototype.make=function(e,r){t.Debug&&jf.time(\"Representation.make \"+this.type);var i=function(){e?(this.update(e),this.viewer.requestRender(),this.tasks.decrement(),r&&r()):(this.clear(),this.create(),this.manualAttach||this.disposed||(t.Debug&&jf.time(\"Representation.attach \"+this.type),this.attach(function(){t.Debug&&jf.timeEnd(\"Representation.attach \"+this.type),this.tasks.decrement(),r&&r()}.bind(this)))),t.Debug&&jf.timeEnd(\"Representation.make \"+this.type)}.bind(this);this.prepare?this.prepare(i):i()},eb.prototype.attach=function(t){this.setVisibility(this.visible),t()},eb.prototype.setVisibility=function(t,e){if(this.visible=t,this.visible){var r=this.lazyProps,i=r.bufferParams,n=r.what;if(r.build)return r.build=!1,void this.build();(Object.keys(i).length||Object.keys(n).length)&&(r.bufferParams={},r.what={},this.updateParameters(i,n))}return this.bufferList.forEach(function(e){e.setVisibility(t)}),e||this.viewer.requestRender(),this},eb.prototype.setParameters=function(t,e,r){var i=this,n=t||{},o=this.parameters;e=e||{},r=r||!1;var a={};for(var s in n)void 0!==n[s]&&void 0!==o[s]&&(o[s].int&&(n[s]=parseInt(n[s])),o[s].float&&(n[s]=parseFloat(n[s])),(n[s]!==i[s]||n[s].equals&&!n[s].equals(i[s]))&&(i[s]&&i[s].set?i[s].set(n[s]):i[s]=n[s],o[s].buffer&&(!0===o[s].buffer?a[s]=n[s]:a[o[s].buffer]=n[s]),o[s].update&&(e[o[s].update]=!0),!o[s].rebuild||\"impostor\"===o[s].rebuild&&Uf&&!i.disableImpostor||(r=!0)));return r?this.build():this.updateParameters(a,e),this},eb.prototype.updateParameters=function(t,e){if(this.lazy&&!this.visible)return Object.assign(this.lazyProps.bufferParams,t),void Object.assign(this.lazyProps.what,e);this.bufferList.forEach(function(e){e.setParameters(t)}),Object.keys(e).length&&this.update(e),this.viewer.requestRender()},eb.prototype.getParameters=function(){var t=this,e={lazy:this.lazy,visible:this.visible,quality:this.quality};return Object.keys(this.parameters).forEach(function(r){null!==t.parameters[r]&&(e[r]=t[r])}),e},eb.prototype.clear=function(){var t=this;this.bufferList.forEach(function(e){t.viewer.remove(e),e.dispose()}),this.bufferList.length=0,this.viewer.requestRender()},eb.prototype.dispose=function(){this.disposed=!0,this.queue.kill(),this.tasks.dispose(),this.clear()};var rb=function(t){function e(e,r,i){Array.isArray(e)||(e=[e]),t.call(this,e,r,i),this.type=\"buffer\",this.parameters=Object.assign({},this.parameters,{colorScheme:null,colorScale:null,colorValue:null,colorDomain:null,colorMode:null}),this.buffer=e,this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){t.prototype.init.call(this,e),this.build()},e.prototype.create=function(){this.bufferList.push.apply(this.bufferList,this.buffer)},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t),t.setParameters(e.getBufferParams())}),this.setVisibility(this.visible),t()},e}(eb),ib=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isSurface:{}};return r.isSurface.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(Zy),nb=function(t){this.size=t.size,this.side=t.side,this.wireframe=t.wireframe,this.visible=t.visible,this.geometry=t.geometry,this.picking=t.picking,this.background=t.background,this.disablePicking=t.disablePicking,this.group=new Ne,this.wireframeGroup=new Ne,this.pickingGroup=new Ne,this.matrix=t.matrix,this.frontMeshes=[],this.backMeshes=[];var e=t,r=new t.constructor;e.makeMaterial(),r.makeMaterial(),r.picking=t.picking,r.geometry=t.geometry,r.wireframeGeometry=t.wireframeGeometry,r.setParameters(t.getParameters()),r.updateShader(),e.setParameters({side:\"front\"}),r.setParameters({side:\"back\",opacity:r.opacity}),this.buffer=t,this.frontBuffer=e,this.backBuffer=r},ob={matrix:{},pickable:{}};ob.matrix.set=function(t){qy.prototype.setMatrix.call(this,t)},ob.matrix.get=function(){return this.group.matrix.clone()},ob.pickable.get=function(){return!!this.picking&&!this.disablePicking},nb.prototype.getMesh=function(t){var e,r;return t?(r=this.backBuffer.getPickingMesh(),e=this.frontBuffer.getPickingMesh()):(r=this.backBuffer.getMesh(),e=this.frontBuffer.getMesh()),this.frontMeshes.push(e),this.backMeshes.push(r),this.setParameters({side:this.side}),(new Ne).add(r,e)},nb.prototype.getWireframeMesh=function(){return this.buffer.getWireframeMesh()},nb.prototype.getPickingMesh=function(){return this.getMesh(!0)},nb.prototype.setAttributes=function(t){this.buffer.setAttributes(t)},nb.prototype.setParameters=function(t){\"front\"===(t=Object.assign({},t)).side?(this.frontMeshes.forEach(Ns),this.backMeshes.forEach(ks)):\"back\"===t.side?(this.frontMeshes.forEach(ks),this.backMeshes.forEach(Ns)):\"double\"===t.side&&(this.frontMeshes.forEach(Ns),this.backMeshes.forEach(Ns)),void 0!==t.matrix&&(this.matrix=t.matrix),delete t.matrix,void 0!==t.side&&(this.side=t.side),delete t.side,this.frontBuffer.setParameters(t),void 0!==t.wireframe&&(this.wireframe=t.wireframe,this.setVisibility(this.visible)),delete t.wireframe,this.backBuffer.setParameters(t)},nb.prototype.dispose=function(){this.frontBuffer.dispose(),this.backBuffer.dispose()},Object.defineProperties(nb.prototype,ob),nb.prototype.setVisibility=qy.prototype.setVisibility,Yf.add(\"shader/Line.vert\",\"uniform float nearClip;\\nuniform vec3 clipCenter;\\nvarying vec3 vViewPosition;\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\n#include color_pars_vertex\\nvoid main(){\\n#include color_vertex\\n#include begin_vertex\\n#include project_vertex\\nvViewPosition = -mvPosition.xyz;\\n#if defined( RADIUS_CLIP )\\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\\n#endif\\n#include nearclip_vertex\\n}\"),Yf.add(\"shader/Line.frag\",\"uniform float opacity;\\nuniform float nearClip;\\nuniform float clipRadius;\\nvarying vec3 vViewPosition;\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\n#include common\\n#include color_pars_fragment\\n#include fog_pars_fragment\\nvoid main(){\\n#include nearclip_fragment\\n#include radiusclip_fragment\\ngl_FragColor = vec4( vColor, opacity );\\n#include premultiplied_alpha_fragment\\n#include tonemapping_fragment\\n#include encodings_fragment\\n#include fog_fragment\\n}\");var ab=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return r.isLine.get=function(){return!0},r.vertexShader.get=function(){return\"Line.vert\"},r.fragmentShader.get=function(){return\"Line.frag\"},Object.defineProperties(e.prototype,r),e}(qy),sb=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"surface\",this.parameters=Object.assign({isolevelType:{type:\"select\",options:{value:\"value\",sigma:\"sigma\"}},isolevel:{type:\"number\",precision:2,max:1e3,min:-1e3},negateIsolevel:{type:\"boolean\"},smooth:{type:\"integer\",precision:1,max:10,min:0},background:{type:\"boolean\",rebuild:!0},opaqueBack:{type:\"boolean\",buffer:!0},boxSize:{type:\"integer\",precision:1,max:100,min:0},colorVolume:{type:\"hidden\"},contour:{type:\"boolean\",rebuild:!0},useWorker:{type:\"boolean\",rebuild:!0},wrap:{type:\"boolean\",rebuild:!0}},this.parameters),e instanceof iy?(this.surface=void 0,this.volume=e):(this.surface=e,this.volume=void 0),this.boxCenter=new g,this.__boxCenter=new g,this.box=new st,this.__box=new st,this._position=new g,this.setBox=function(){this._position.copy(r.translationGroup.position).negate(),this._position.equals(this.boxCenter)||this.setParameters({boxCenter:this._position})},this.viewer.signals.ticked.add(this.setBox,this),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,\"uniform\"),r.colorValue=gn(r.colorValue,14540253),this.isolevelType=gn(r.isolevelType,\"sigma\"),this.isolevel=gn(r.isolevel,2),this.negateIsolevel=gn(r.negateIsolevel,!1),this.smooth=gn(r.smooth,0),this.background=gn(r.background,!1),this.opaqueBack=gn(r.opaqueBack,!0),this.boxSize=gn(r.boxSize,0),this.colorVolume=gn(r.colorVolume,void 0),this.contour=gn(r.contour,!1),this.useWorker=gn(r.useWorker,!0),this.wrap=gn(r.wrap,!1),t.prototype.init.call(this,r),this.build()},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t)}),this.setVisibility(this.visible),t()},e.prototype.prepare=function(t){var e=this;if(this.volume){var r;if(r=\"sigma\"===this.isolevelType?this.volume.getValueForSigma(this.isolevel):this.isolevel,this.negateIsolevel&&(r*=-1),!this.surface||this.__isolevel!==r||this.__smooth!==this.smooth||this.__contour!==this.contour||this.__wrap!==this.wrap||this.__boxSize!==this.boxSize||this.boxSize>0&&!this.__boxCenter.equals(this.boxCenter)){this.__isolevel=r,this.__smooth=this.smooth,this.__contour=this.contour,this.__wrap=this.wrap,this.__boxSize=this.boxSize,this.__boxCenter.copy(this.boxCenter),this.__box.copy(this.box);var i=function(r){e.surface=r,t()};this.useWorker?this.volume.getSurfaceWorker(r,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap,i):i(this.volume.getSurface(r,this.smooth,this.boxCenter,this.boxSize,this.contour,this.wrap))}else t()}else t()},e.prototype.create=function(){var t,e={position:this.surface.getPosition(),color:this.surface.getColor(this.getColorParams()),index:this.surface.getIndex()};if(this.contour)t=new ab(e,this.getBufferParams({wireframe:!1}));else{e.normal=this.surface.getNormal(),e.picking=this.surface.getPicking();var r=new ib(e,this.getBufferParams({background:this.background,opaqueBack:this.opaqueBack,dullInterior:!1}));t=new nb(r)}this.bufferList.push(t)},e.prototype.update=function(t){if(0!==this.bufferList.length){var e={};(t=t||{}).position&&(e.position=this.surface.getPosition()),t.color&&(e.color=this.surface.getColor(this.getColorParams())),t.index&&(e.index=this.surface.getIndex()),t.normal&&(e.normal=this.surface.getNormal()),this.bufferList.forEach(function(t){t.setAttributes(e)})}},e.prototype.setParameters=function(e,r,i){return e&&void 0!==e.isolevelType&&this.volume&&(\"value\"===this.isolevelType&&\"sigma\"===e.isolevelType?this.isolevel=this.volume.getSigmaForValue(this.isolevel):\"sigma\"===this.isolevelType&&\"value\"===e.isolevelType&&(this.isolevel=this.volume.getValueForSigma(this.isolevel)),this.isolevelType=e.isolevelType),e&&e.boxCenter&&(this.boxCenter.copy(e.boxCenter),delete e.boxCenter),e&&e.wireframe&&(e.contour||void 0===e.contour&&this.contour)&&(e.wireframe=!1),t.prototype.setParameters.call(this,e,r,i),this.volume&&this.volume.getBox(this.boxCenter,this.boxSize,this.box),e&&void 0!==e.colorVolume&&(r.color=!0),this.surface&&(void 0!==e.isolevel||void 0!==e.negateIsolevel||void 0!==e.smooth||void 0!==e.wrap||void 0!==e.boxSize||this.boxSize>0&&!this.__box.equals(this.box))&&this.build({position:!0,color:!0,index:!0,normal:!this.contour}),this},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.volume=this.colorVolume,e},e.prototype.dispose=function(){this.viewer.signals.ticked.remove(this.setBox,this),t.prototype.dispose.call(this)},e}(eb),cb=new v,ub=new ut,hb=function(t){function e(e,r,i){var n,o=e||{},a=r||{},s=i.attributes.position.array,c=i.attributes.normal.array,u=i.index?i.index.array:void 0,h=o.position.length/3,l=s.length/3,p=h*l,d=new Float32Array(3*p),f=new Float32Array(3*p),m=new Float32Array(3*p);u&&(n=On(h*u.length,p)),t.call(this,{position:d,color:m,index:n,normal:f,primitiveId:o.primitiveId||zo(h,l),picking:o.picking},a),this.setAttributes(o),this.geoPosition=s,this.geoNormal=c,this.geoIndex=u,this.positionCount=h,this.geoPositionCount=l,this.transformedGeoPosition=new Float32Array(3*l),this.transformedGeoNormal=new Float32Array(3*l),this.meshPosition=d,this.meshColor=m,this.meshIndex=n,this.meshNormal=f,this.meshIndex=n,this.makeIndex()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={updateNormals:{}};return e.prototype.applyPositionTransform=function(){},e.prototype.setAttributes=function(t,e){var r,i,n,o,a,s,c,u,h,l=this,p=this.geometry.attributes,d=this.updateNormals;t.position&&(r=t.position,n=this.geoPosition,c=this.meshPosition,a=this.transformedGeoPosition,p.position.needsUpdate=!0,(d||e)&&(o=this.geoNormal,h=this.meshNormal,s=this.transformedGeoNormal,p.normal.needsUpdate=!0)),t.color&&(i=t.color,u=this.meshColor,p.color.needsUpdate=!0);for(var f=this.positionCount,m=this.geoPositionCount,g=0;g 0.0 ){\\ncameraPos = rayDirection * posT + rayOrigin;\\ninterior = true;\\nflag2 = true;\\nreturn false;\\n}else{\\ncameraNormal = normalize( cameraPos - cameraSpherePos );\\n}\\n#else\\nif( calcDepth( cameraPos ) <= 0.0 ){\\ncameraPos = rayDirection * posT + rayOrigin;\\ninterior = true;\\nreturn false;\\n}else{\\ncameraNormal = normalize( cameraPos - cameraSpherePos );\\n}\\n#endif\\nreturn true;\\n}\\nreturn false;\\n}\\nvoid main(void){\\nbool flag = Impostor( cameraPos, cameraNormal );\\n#ifdef NEAR_CLIP\\nif( calcClip( cameraPos ) > 0.0 )\\ndiscard;\\n#endif\\ngl_FragDepthEXT = calcDepth( cameraPos );\\nif( !flag ){\\n#ifdef NEAR_CLIP\\nif( flag2 ){\\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\\n}else if( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\\n}\\n#else\\nif( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\\n}\\n#endif\\n}\\nif (gl_FragDepthEXT < 0.0)\\ndiscard;\\nif (gl_FragDepthEXT > 1.0)\\ndiscard;\\n#ifdef PICKING\\ngl_FragColor = vec4( vPickingColor, objectId );\\n#else\\nvec3 vNormal = cameraNormal;\\nvec3 vViewPosition = -cameraPos;\\nvec4 diffuseColor = vec4( diffuse, opacity );\\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\nvec3 totalEmissiveLight = emissive;\\n#include color_fragment\\n#include roughnessmap_fragment\\n#include metalnessmap_fragment\\n#include normal_flip\\n#include normal_fragment\\nif( interior ){\\nnormal = vec3( 0.0, 0.0, 0.4 );\\n}\\n#include lights_physical_fragment\\n#include lights_template\\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n#include premultiplied_alpha_fragment\\n#include tonemapping_fragment\\n#include encodings_fragment\\n#include fog_fragment\\n#endif\\n}\");var db=function(t){function e(e,r){t.call(this,e,r),this.index=On(this.indexSize,this.attributeSize),this.makeIndex(),this.initIndex(this.index,1),this.addAttributes({mapping:{type:this.mappingType,value:null}}),this.setAttributes({primitiveId:Bo(this.size)})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={attributeSize:{},indexSize:{},mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.attributeSize.get=function(){return this.size*this.mappingSize},r.indexSize.get=function(){return this.size*this.mappingIndicesSize},r.mapping.get=function(){},r.mappingIndices.get=function(){},r.mappingIndicesSize.get=function(){},r.mappingType.get=function(){},r.mappingSize.get=function(){},r.mappingItemSize.get=function(){},e.prototype.addAttributes=function(e){var r={};for(var i in e){var n=e[i];r[i]={type:n.type,value:null}}t.prototype.addAttributes.call(this,r)},e.prototype.getAttributeIndex=function(t){return 3*t*this.mappingSize},e.prototype.setAttributes=function(t){t&&!t.position&&t.position1&&t.position2&&(t.position=Do(t.position1,t.position2));var e,r,i,n,o,a,s,c=this.size,u=this.mappingSize,h=this.geometry.attributes;for(var l in t)if(\"index\"!==l&&\"picking\"!==l){r=t[l],i=(e=h[l]).itemSize,n=e.array;for(var p=0;p0&&this.alphaTest<=1&&(r.ALPHATEST=this.alphaTest.toPrecision(2)),r},e.prototype.setUniforms=function(e){e&&void 0!==e.edgeBleach&&(this.makeTexture(),e.map=this.tex),t.prototype.setUniforms.call(this,e)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.tex&&this.tex.dispose()},r.isPoint.get=function(){return!0},r.vertexShader.get=function(){return\"Point.vert\"},r.fragmentShader.get=function(){return\"Point.frag\"},Object.defineProperties(e.prototype,r),e}(qy),xb=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"dot\",this.parameters=Object.assign({thresholdType:{type:\"select\",rebuild:!0,options:{value:\"value\",sigma:\"sigma\"}},thresholdMin:{type:\"number\",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdMax:{type:\"number\",precision:3,max:1/0,min:-1/0,rebuild:!0},thresholdOut:{type:\"boolean\",rebuild:!0},dotType:{type:\"select\",rebuild:!0,options:{\"\":\"\",sphere:\"sphere\",point:\"point\"}},radiusType:{type:\"select\",options:{\"\":\"\",value:\"value\",\"abs-value\":\"abs-value\",\"value-min\":\"value-min\",deviation:\"deviation\",size:\"size\"}},radius:{type:\"number\",precision:3,max:10,min:.001,property:\"size\"},scale:{type:\"number\",precision:3,max:10,min:.001},sphereDetail:!0,disableImpostor:!0,pointSize:{type:\"number\",precision:1,max:100,min:0,buffer:!0},sizeAttenuation:{type:\"boolean\",buffer:!0},sortParticles:{type:\"boolean\",rebuild:!0},useTexture:{type:\"boolean\",buffer:!0},alphaTest:{type:\"range\",step:.001,max:1,min:0,buffer:!0},forceTransparent:{type:\"boolean\",buffer:!0},edgeBleach:{type:\"range\",step:.001,max:1,min:0,buffer:!0}},this.parameters,{colorScheme:{type:\"select\",update:\"color\",options:{\"\":\"\",value:\"value\",uniform:\"uniform\",random:\"random\"}}}),e instanceof iy?(this.surface=void 0,this.volume=new oy(e)):(this.surface=e,this.volume=void 0),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,\"uniform\"),r.colorValue=gn(r.colorValue,14540253),this.thresholdType=gn(r.thresholdType,\"sigma\"),this.thresholdMin=gn(r.thresholdMin,2),this.thresholdMax=gn(r.thresholdMax,1/0),this.thresholdOut=gn(r.thresholdOut,!1),this.dotType=gn(r.dotType,\"point\"),this.radius=gn(r.radius,.1),this.scale=gn(r.scale,1),this.pointSize=gn(r.pointSize,1),this.sizeAttenuation=gn(r.sizeAttenuation,!0),this.sortParticles=gn(r.sortParticles,!1),this.useTexture=gn(r.useTexture,!1),this.alphaTest=gn(r.alphaTest,.5),this.forceTransparent=gn(r.forceTransparent,!1),this.edgeBleach=gn(r.edgeBleach,0),t.prototype.init.call(this,r),this.build()},e.prototype.attach=function(t){var e=this;this.bufferList.forEach(function(t){e.viewer.add(t)}),this.setVisibility(this.visible),t()},e.prototype.create=function(){var t={};if(this.volume){var e,r,i=this.volume;\"sigma\"===this.thresholdType?(e=i.getValueForSigma(this.thresholdMin),r=i.getValueForSigma(this.thresholdMax)):(e=this.thresholdMin,r=this.thresholdMax),i.setFilter(e,r,this.thresholdOut),t.position=i.getDataPosition(),t.color=i.getDataColor(this.getColorParams()),\"sphere\"===this.dotType&&(t.radius=i.getDataSize(this.radius,this.scale),t.picking=i.getDataPicking())}else{var n=this.surface;t.position=n.getPosition(),t.color=n.getColor(this.getColorParams()),\"sphere\"===this.dotType&&(t.radius=n.getSize(this.radius,this.scale),t.picking=n.getPicking())}\"sphere\"===this.dotType?this.dotBuffer=new yb(t,this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!1})):this.dotBuffer=new bb(t,this.getBufferParams({pointSize:this.pointSize,sizeAttenuation:this.sizeAttenuation,sortParticles:this.sortParticles,useTexture:this.useTexture,alphaTest:this.alphaTest,forceTransparent:this.forceTransparent,edgeBleach:this.edgeBleach})),this.bufferList.push(this.dotBuffer)},e.prototype.update=function(t){if(0!==this.bufferList.length){var e={};(t=t||{}).color&&(this.volume?e.color=this.volume.getDataColor(this.getColorParams()):e.color=this.surface.getColor(this.getColorParams())),\"sphere\"===this.dotType&&(t.radius||t.scale)&&(this.volume?e.radius=this.volume.getDataSize(this.radius,this.scale):e.radius=this.surface.getSize(this.radius,this.scale)),this.dotBuffer.setAttributes(e)}},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&void 0!==e.thresholdType&&this.volume instanceof iy&&(\"value\"===this.thresholdType&&\"sigma\"===e.thresholdType?(this.thresholdMin=this.volume.getSigmaForValue(this.thresholdMin),this.thresholdMax=this.volume.getSigmaForValue(this.thresholdMax)):\"sigma\"===this.thresholdType&&\"value\"===e.thresholdType&&(this.thresholdMin=this.volume.getValueForSigma(this.thresholdMin),this.thresholdMax=this.volume.getValueForSigma(this.thresholdMax)),this.thresholdType=e.thresholdType),e&&void 0!==e.radiusType&&(\"radius\"===e.radiusType?this.radius=.1:this.radius=e.radiusType,r.radius=!0,\"sphere\"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.radius&&(r.radius=!0,\"sphere\"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.scale&&(r.scale=!0,\"sphere\"!==this.dotType||Uf&&!this.disableImpostor||(i=!0)),t.prototype.setParameters.call(this,e,r,i),this},e}(eb);Yf.add(\"shader/Image.vert\",\"uniform float clipRadius;\\nuniform vec3 clipCenter;\\nvarying vec2 vUv;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\\nvarying vec3 vViewPosition;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\nvoid main() {\\n#include begin_vertex\\n#include project_vertex\\nvUv = uv;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\\nvViewPosition = -mvPosition.xyz;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\\n#endif\\n}\"),Yf.add(\"shader/Image.frag\",\"uniform sampler2D map;\\nuniform float opacity;\\nuniform vec2 mapSize;\\nuniform float nearClip;\\nuniform float clipRadius;\\nvarying vec2 vUv;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\\nvarying vec3 vViewPosition;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\n#if defined( PICKING )\\nuniform sampler2D pickingMap;\\nuniform float objectId;\\n#else\\n#include fog_pars_fragment\\n#endif\\n#if defined( CUBIC_INTERPOLATION )\\n#if defined( CATMULROM_FILTER ) || defined( MITCHELL_FILTER )\\n#if defined( CATMULROM_FILTER )\\nconst float B = 0.0;\\nconst float C = 0.5;\\n#elif defined( MITCHELL_FILTER )\\nconst float B = 0.333;\\nconst float C = 0.333;\\n#endif\\nfloat filter( float x ){\\nfloat f = x;\\nif( f < 0.0 ){\\nf = -f;\\n}\\nif( f < 1.0 ){\\nreturn ( ( 12.0 - 9.0 * B - 6.0 * C ) * ( f * f * f ) +\\n( -18.0 + 12.0 * B + 6.0 *C ) * ( f * f ) +\\n( 6.0 - 2.0 * B ) ) / 6.0;\\n}else if( f >= 1.0 && f < 2.0 ){\\nreturn ( ( -B - 6.0 * C ) * ( f * f * f )\\n+ ( 6.0 * B + 30.0 * C ) * ( f *f ) +\\n( - ( 12.0 * B ) - 48.0 * C ) * f +\\n8.0 * B + 24.0 * C ) / 6.0;\\n}else{\\nreturn 0.0;\\n}\\n}\\n#elif defined( BSPLINE_FILTER )\\nfloat filter( float x ){\\nfloat f = x;\\nif( f < 0.0 ){\\nf = -f;\\n}\\nif( f >= 0.0 && f <= 1.0 ){\\nreturn ( 2.0 / 3.0 ) + ( 0.5 ) * ( f * f * f ) - ( f * f );\\n}else if( f > 1.0 && f <= 2.0 ){\\nreturn 1.0 / 6.0 * pow( ( 2.0 - f ), 3.0 );\\n}\\nreturn 1.0;\\n}\\n#else\\nfloat filter( float x ){\\nreturn 1.0;\\n}\\n#endif\\nvec4 biCubic( sampler2D tex, vec2 texCoord ){\\nvec2 texelSize = 1.0 / mapSize;\\ntexCoord -= texelSize / 2.0;\\nvec4 nSum = vec4( 0.0 );\\nfloat nDenom = 0.0;\\nvec2 cell = fract( texCoord * mapSize );\\nfor( float m = -1.0; m <= 2.0; ++m ){\\nfor( float n = -1.0; n <= 2.0; ++n ){\\nvec4 vecData = texture2D(\\ntex, texCoord + texelSize * vec2( m, n )\\n);\\nfloat c = filter( m - cell.x ) * filter( -n + cell.y );\\nnSum += vecData * c;\\nnDenom += c;\\n}\\n}\\nreturn nSum / nDenom;\\n}\\n#endif\\nvoid main(){\\n#include nearclip_fragment\\n#include radiusclip_fragment\\n#if defined( CUBIC_INTERPOLATION )\\ngl_FragColor = biCubic( map, vUv );\\n#else\\ngl_FragColor = texture2D( map, vUv );\\n#endif\\n#if defined( PICKING )\\nif( gl_FragColor.a < 0.7 )\\ndiscard;\\ngl_FragColor = vec4( texture2D( pickingMap, vUv ).xyz, objectId );\\n#else\\nif( gl_FragColor.a < 0.01 )\\ndiscard;\\ngl_FragColor.a *= opacity;\\n#include fog_fragment\\n#endif\\n}\");var _b=new Uint16Array([0,1,2,1,3,2]),wb=new Float32Array([0,1,0,0,1,1,1,0]),Sb=function(t){function e(e,r){var i=e||{},n=r||{};t.call(this,{position:i.position,index:_b,picking:i.picking},n),this.forceTransparent=!0,this.filter=gn(n.filter,\"nearest\");var o=new y(i.imageData,i.width,i.height);o.flipY=!0,this.tex=o;for(var a=i.imageData.length,s=new Uint8Array(a),c=0;c>16&255,s[c+1]=u>>8&255,s[c+2]=255&u}var h=new y(s,i.width,i.height);h.flipY=!0,h.minFilter=nl,h.magFilter=nl,this.pickingTex=h,this.addUniforms({map:{value:o},pickingMap:{value:h},mapSize:{value:new l(i.width,i.height)}}),this.geometry.addAttribute(\"uv\",new St(wb,2))}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{filter:{updateShader:!0,uniform:!0}},t.prototype.parameters)},e.prototype.getDefines=function(e){var r=t.prototype.getDefines.call(this,e);return this.filter.startsWith(\"cubic\")&&(r.CUBIC_INTERPOLATION=1,this.filter.endsWith(\"bspline\")?r.BSPLINE_FILTER=1:this.filter.endsWith(\"catmulrom\")?r.CATMULROM_FILTER=1:this.filter.endsWith(\"mitchell\")&&(r.MITCHELL_FILTER=1)),r},e.prototype.updateTexture=function(){var t=this.tex;this.filter.startsWith(\"cubic\")?(t.minFilter=nl,t.magFilter=nl):\"linear\"===this.filter?(t.minFilter=sl,t.magFilter=sl):(t.minFilter=nl,t.magFilter=nl),t.needsUpdate=!0,this.pickingTex.needsUpdate=!0},e.prototype.makeMaterial=function(){t.prototype.makeMaterial.call(this),this.updateTexture();var e=this.material;e.uniforms.map.value=this.tex,e.blending=lh,e.needsUpdate=!0;var r=this.wireframeMaterial;r.uniforms.map.value=this.tex,r.blending=lh,r.needsUpdate=!0;var i=this.pickingMaterial;i.uniforms.map.value=this.tex,i.uniforms.pickingMap.value=this.pickingTex,i.blending=lh,i.needsUpdate=!0},e.prototype.setUniforms=function(e){e&&void 0!==e.filter&&(this.updateTexture(),e.map=this.tex),t.prototype.setUniforms.call(this,e)},r.vertexShader.get=function(){return\"Image.vert\"},r.fragmentShader.get=function(){return\"Image.frag\"},Object.defineProperties(e.prototype,r),e}(qy),Ab=function(t,e){var r=e||{};this.dimension=gn(r.dimension,\"x\"),this.positionType=gn(r.positionType,\"percent\"),this.position=gn(r.position,30),this.thresholdType=gn(r.thresholdType,\"sigma\"),this.thresholdMin=gn(r.thresholdMin,-1/0),this.thresholdMax=gn(r.thresholdMax,1/0),this.normalize=gn(r.normalize,!1),this.volume=t};Ab.prototype.getPositionFromCoordinate=function(t){var e,r=this.dimension,i=this.volume,n=i.matrix,o=(new g).setFromMatrixPosition(n)[r],a=(new g).setFromMatrixScale(n)[r];return e=\"x\"===r?i.nx:\"y\"===r?i.ny:i.nz,Math.round(((t-o)/(e/100)+1)/a)},Ab.prototype.getData=function(t){function e(t){return Math.round(t/100*(o-1))}function r(t,e,r,i){return 3*(r*a.ny*a.nx+e*a.nx+t)+i}function i(t,e,r,i){m.set(t,e,r).applyMatrix4(c).toArray(f,i)}var n=this;t=t||{};var o,a=this.volume,s=a.data,c=a.matrix;o=\"coordinate\"===this.positionType?this.getPositionFromCoordinate(this.position):this.position;var u,h,l,p,d,f=new Float32Array(12),m=new g,v=0,y=0,b=0,x=a.nx,_=a.ny,w=a.nz;\"x\"===this.dimension?(l=e(a.nx),p=a.ny-1,d=a.nz-1,u=a.nz,h=a.ny,x=(v=l)+1,i(l,0,0,0),i(l,p,0,3),i(l,0,d,6),i(l,p,d,9)):\"y\"===this.dimension?(l=a.nx-1,p=e(a.ny),d=a.nz-1,u=a.nz,h=a.nx,_=(y=p)+1,i(0,p,0,0),i(l,p,0,3),i(0,p,d,6),i(l,p,d,9)):\"z\"===this.dimension&&(l=a.nx-1,p=a.ny-1,d=e(a.nz),u=a.nx,h=a.ny,w=(b=d)+1,i(0,0,d,0),i(0,p,d,3),i(l,0,d,6),i(l,p,d,9));var S,A,M=0,E=0,T=new Uint8Array(u*h*4),P=new Float32Array(u*h);\"sigma\"===this.thresholdType?(S=a.getValueForSigma(this.thresholdMin),A=a.getValueForSigma(this.thresholdMax)):(S=this.thresholdMin,A=this.thresholdMax);var C=Object.assign({},t.colorParams,{volume:a});this.normalize&&(C.domain=[0,1]);var I,R,L,O=Hf.getScheme(C),D=new Float32Array(3),N=O.getScale();if(this.normalize){I=1/0,R=-1/0;for(var k=y;k<_;++k)for(var F=v;FR&&(R=z)}L=R-I}for(var U=y;U<_;++U)for(var j=v;jS&&$0&&this.updateData(t,e)},this)},e.prototype.updateData=function(){this.build()},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.structure=this.structure,e},e.prototype.getAtomParams=function(t,e){return Object.assign({what:t,colorParams:this.getColorParams(),radiusParams:{radius:this.radius,scale:this.scale}},e)},e.prototype.getBondParams=function(t,e){return Object.assign({what:t,colorParams:this.getColorParams(),radiusParams:{radius:this.radius,scale:this.scale}},e)},e.prototype.setSelection=function(t,e){return this.selection.setString(t,e),this},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&void 0!==e.radiusType&&(\"size\"===e.radiusType?this.radius=1:this.radius=e.radiusType,delete e.radiusType,r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.radius&&(r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.scale&&(r.radius=!0,Uf&&!this.disableImpostor||(i=!0)),e&&void 0!==e.defaultAssembly&&(i=!0),t.prototype.setParameters.call(this,e,r,i),this},e.prototype.getParameters=function(){return Object.assign(t.prototype.getParameters.call(this),{sele:this.selection?this.selection.string:void 0,defaultAssembly:this.defaultAssembly})},e.prototype.attach=function(t){var e=this.viewer,r=this.bufferList;this.dataList.forEach(function(t){t.bufferList.forEach(function(i){r.push(i),e.add(i,t.instanceList)})}),this.setVisibility(this.visible),t()},e.prototype.clear=function(){this.dataList.length=0,t.prototype.clear.call(this)},e.prototype.dispose=function(){this.structureView.dispose(),delete this.structure,delete this.structureView,t.prototype.dispose.call(this)},Object.defineProperties(e.prototype,r),e}(eb),Tb=new g,Pb=new g,Cb=new g,Ib=new g(0,1,0),Rb=function(t){function e(e,r){var i=e||{},n=r||{},o=gn(n.radialSegments,10),a=gn(n.openEnded,!0),s=(new v).makeRotationX(Math.PI/2),c=new vr(1,1,1,o,1,a);c.applyMatrix(s);var u=i.position1.length,h=i.radius.length,l=c.attributes.position.array.length/3,p=u/3,d=new Float32Array(2*p*l);zo(p,l,0,d),zo(p,l,p*l,d);var f=new Float32Array(2*u),m=new Float32Array(2*u);t.call(this,{position:f,color:m,primitiveId:d,picking:i.picking},n,c),this.__center=new Float32Array(u),this._position=f,this._color=m,this._from=new Float32Array(2*u),this._to=new Float32Array(2*u),this._radius=new Float32Array(2*h),this.setAttributes(i,!0)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={updateNormals:{}};return e.prototype.applyPositionTransform=function(t,e,r){Pb.fromArray(this._from,r),Cb.fromArray(this._to,r),t.lookAt(Pb,Cb,Ib);var i=this._radius[e];Tb.set(i,i,Pb.distanceTo(Cb)),t.scale(Tb)},e.prototype.setAttributes=function(e,r){var i={};e.position1&&e.position2&&(Do(e.position1,e.position2,this.__center),Do(e.position1,this.__center,this._position),Do(this.__center,e.position2,this._position,e.position1.length),this._from.set(e.position1),this._from.set(this.__center,e.position1.length),this._to.set(this.__center),this._to.set(e.position2,this.__center.length),i.position=this._position),e.color&&e.color2&&(this._color.set(e.color),this._color.set(e.color2,e.color.length),i.color=this._color),e.radius&&(this._radius.set(e.radius),this._radius.set(e.radius,e.radius.length),i.radius=this._radius),t.prototype.setAttributes.call(this,i,r)},r.updateNormals.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(hb);Yf.add(\"shader/CylinderImpostor.vert\",\"\\nattribute vec3 mapping;\\nattribute vec3 position1;\\nattribute vec3 position2;\\nattribute float radius;\\nvarying vec3 axis;\\nvarying vec4 base_radius;\\nvarying vec4 end_b;\\nvarying vec3 U;\\nvarying vec3 V;\\nvarying vec4 w;\\n#ifdef PICKING\\n#include unpack_color\\nattribute float primitiveId;\\nvarying vec3 vPickingColor;\\n#else\\nattribute vec3 color2;\\nvarying vec3 vColor1;\\nvarying vec3 vColor2;\\n#endif\\nuniform mat4 modelViewMatrixInverse;\\nuniform float ortho;\\n#include matrix_scale\\nvoid main(){\\n#ifdef PICKING\\nvPickingColor = unpackColor( primitiveId );\\n#else\\nvColor1 = color;\\nvColor2 = color2;\\n#endif\\nbase_radius.w = radius * matrixScale( modelViewMatrix );\\nvec3 center = position;\\nvec3 dir = normalize( position2 - position1 );\\nfloat ext = length( position2 - position1 ) / 2.0;\\nvec3 cam_dir;\\nif( ortho == 0.0 ){\\ncam_dir = ( modelViewMatrixInverse * vec4( 0, 0, 0, 1 ) ).xyz - center;\\n}else{\\ncam_dir = ( modelViewMatrixInverse * vec4( 0, 0, 1, 0 ) ).xyz;\\n}\\ncam_dir = normalize( cam_dir );\\nvec3 ldir;\\nfloat b = dot( cam_dir, dir );\\nend_b.w = b;\\nif( b < 0.0 )\\nldir = -ext * dir;\\nelse\\nldir = ext * dir;\\nvec3 left = normalize( cross( cam_dir, ldir ) );\\nleft = radius * left;\\nvec3 up = radius * normalize( cross( left, ldir ) );\\naxis = normalize( normalMatrix * ldir );\\nU = normalize( normalMatrix * up );\\nV = normalize( normalMatrix * left );\\nvec4 base4 = modelViewMatrix * vec4( center - ldir, 1.0 );\\nbase_radius.xyz = base4.xyz / base4.w;\\nvec4 top_position = modelViewMatrix * vec4( center + ldir, 1.0 );\\nvec4 end4 = top_position;\\nend_b.xyz = end4.xyz / end4.w;\\nw = modelViewMatrix * vec4(\\ncenter + mapping.x*ldir + mapping.y*left + mapping.z*up, 1.0\\n);\\ngl_Position = projectionMatrix * w;\\ngl_Position.z = 0.99;\\n}\"),Yf.add(\"shader/CylinderImpostor.frag\",\"#define STANDARD\\n#define IMPOSTOR\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\nuniform float nearClip;\\nuniform mat4 projectionMatrix;\\nuniform float ortho;\\nvarying vec3 axis;\\nvarying vec4 base_radius;\\nvarying vec4 end_b;\\nvarying vec3 U;\\nvarying vec3 V;\\nvarying vec4 w;\\n#ifdef PICKING\\nuniform float objectId;\\nvarying vec3 vPickingColor;\\n#else\\nvarying vec3 vColor1;\\nvarying vec3 vColor2;\\n#include common\\n#include fog_pars_fragment\\n#include bsdfs\\n#include lights_pars\\n#include lights_physical_pars_fragment\\n#endif\\nbool interior = false;\\nfloat distSq3( vec3 v3a, vec3 v3b ){\\nreturn (\\n( v3a.x - v3b.x ) * ( v3a.x - v3b.x ) +\\n( v3a.y - v3b.y ) * ( v3a.y - v3b.y ) +\\n( v3a.z - v3b.z ) * ( v3a.z - v3b.z )\\n);\\n}\\nfloat calcDepth( in vec3 cameraPos ){\\nvec2 clipZW = cameraPos.z * projectionMatrix[2].zw + projectionMatrix[3].zw;\\nreturn 0.5 + 0.5 * clipZW.x / clipZW.y;\\n}\\nfloat calcClip( vec3 cameraPos ){\\nreturn dot( vec4( cameraPos, 1.0 ), vec4( 0.0, 0.0, 1.0, nearClip - 0.5 ) );\\n}\\nvoid main(){\\nvec3 point = w.xyz / w.w;\\nvec3 base = base_radius.xyz;\\nfloat vRadius = base_radius.w;\\nvec3 end = end_b.xyz;\\nfloat b = end_b.w;\\nvec3 end_cyl = end;\\nvec3 surface_point = point;\\nvec3 ray_target = surface_point;\\nvec3 ray_origin = vec3(0.0);\\nvec3 ray_direction = mix(normalize(ray_origin - ray_target), vec3(0.0, 0.0, 1.0), ortho);\\nmat3 basis = mat3( U, V, axis );\\nvec3 diff = ray_target - 0.5 * (base + end_cyl);\\nvec3 P = diff * basis;\\nfloat dz = dot( axis, ray_direction );\\nfloat radius2 = vRadius*vRadius;\\nvec3 D = vec3(dot(U, ray_direction),\\ndot(V, ray_direction),\\ndz);\\nfloat a0 = P.x*P.x + P.y*P.y - radius2;\\nfloat a1 = P.x*D.x + P.y*D.y;\\nfloat a2 = D.x*D.x + D.y*D.y;\\nfloat d = a1*a1 - a0*a2;\\nif (d < 0.0)\\ndiscard;\\nfloat dist = (-a1 + sqrt(d)) / a2;\\nvec3 new_point = ray_target + dist * ray_direction;\\nvec3 tmp_point = new_point - base;\\nvec3 _normal = normalize( tmp_point - axis * dot(tmp_point, axis) );\\nray_origin = mix( ray_origin, surface_point, ortho );\\nfloat front_cap_test = dot( tmp_point, axis );\\nfloat end_cap_test = dot((new_point - end_cyl), axis);\\n#ifndef CAP\\nvec3 new_point2 = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\\nvec3 tmp_point2 = new_point2 - base;\\n#endif\\nif (front_cap_test < 0.0)\\n{\\nfloat dNV = dot(-axis, ray_direction);\\nif (dNV < 0.0)\\ndiscard;\\nfloat near = dot(-axis, (base)) / dNV;\\nvec3 front_point = ray_direction * near + ray_origin;\\nif (dot(front_point - base, front_point-base) > radius2)\\ndiscard;\\n#ifdef CAP\\nnew_point = front_point;\\n_normal = axis;\\n#else\\nnew_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\\ndNV = dot(-axis, ray_direction);\\nnear = dot(axis, end_cyl) / dNV;\\nnew_point2 = ray_direction * near + ray_origin;\\nif (dot(new_point2 - end_cyl, new_point2-base) < radius2)\\ndiscard;\\ninterior = true;\\n#endif\\n}\\nif( end_cap_test > 0.0 )\\n{\\nfloat dNV = dot(axis, ray_direction);\\nif (dNV < 0.0)\\ndiscard;\\nfloat near = dot(axis, end_cyl) / dNV;\\nvec3 end_point = ray_direction * near + ray_origin;\\nif( dot(end_point - end_cyl, end_point-base) > radius2 )\\ndiscard;\\n#ifdef CAP\\nnew_point = end_point;\\n_normal = axis;\\n#else\\nnew_point = ray_target + ( (-a1 - sqrt(d)) / a2 ) * ray_direction;\\ndNV = dot(-axis, ray_direction);\\nnear = dot(-axis, (base)) / dNV;\\nnew_point2 = ray_direction * near + ray_origin;\\nif (dot(new_point2 - base, new_point2-base) < radius2)\\ndiscard;\\ninterior = true;\\n#endif\\n}\\ngl_FragDepthEXT = calcDepth( new_point );\\n#ifdef NEAR_CLIP\\nif( calcClip( new_point ) > 0.0 ){\\ndist = (-a1 - sqrt(d)) / a2;\\nnew_point = ray_target + dist * ray_direction;\\nif( calcClip( new_point ) > 0.0 )\\ndiscard;\\ninterior = true;\\ngl_FragDepthEXT = calcDepth( new_point );\\nif( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / vRadius ) );\\n}\\n}else if( gl_FragDepthEXT <= 0.0 ){\\ndist = (-a1 - sqrt(d)) / a2;\\nnew_point = ray_target + dist * ray_direction;\\ninterior = true;\\ngl_FragDepthEXT = calcDepth( new_point );\\nif( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\\n}\\n}\\n#else\\nif( gl_FragDepthEXT <= 0.0 ){\\ndist = (-a1 - sqrt(d)) / a2;\\nnew_point = ray_target + dist * ray_direction;\\ninterior = true;\\ngl_FragDepthEXT = calcDepth( new_point );\\nif( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / vRadius );\\n}\\n}\\n#endif\\nif (gl_FragDepthEXT < 0.0)\\ndiscard;\\nif (gl_FragDepthEXT > 1.0)\\ndiscard;\\n#ifdef PICKING\\ngl_FragColor = vec4( vPickingColor, objectId );\\n#else\\nvec3 vViewPosition = -new_point;\\nvec3 vNormal = _normal;\\nvec3 vColor;\\nif( distSq3( new_point, end_cyl ) < distSq3( new_point, base ) ){\\nif( b < 0.0 ){\\nvColor = vColor1;\\n}else{\\nvColor = vColor2;\\n}\\n}else{\\nif( b > 0.0 ){\\nvColor = vColor1;\\n}else{\\nvColor = vColor2;\\n}\\n}\\nvec4 diffuseColor = vec4( diffuse, opacity );\\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\nvec3 totalEmissiveLight = emissive;\\n#include color_fragment\\n#include roughnessmap_fragment\\n#include metalnessmap_fragment\\nvec3 normal = normalize( vNormal );\\nif( interior ){\\nnormal = vec3( 0.0, 0.0, 0.4 );\\n}\\n#include lights_physical_fragment\\n#include lights_template\\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n#include premultiplied_alpha_fragment\\n#include tonemapping_fragment\\n#include encodings_fragment\\n#include fog_fragment\\n#endif\\n}\");var Lb=new Float32Array([-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1]),Ob=new Uint16Array([0,1,2,1,4,2,2,4,3,4,5,3]),Db=function(t){function e(e,r){t.call(this,e,r);var i=r||{};this.openEnded=gn(i.openEnded,!1),this.addUniforms({modelViewMatrixInverse:{value:new v},ortho:{value:0}}),this.addAttributes({position1:{type:\"v3\",value:null},position2:{type:\"v3\",value:null},color2:{type:\"c\",value:null},radius:{type:\"f\",value:null}}),this.setAttributes(e),this.makeMapping()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},isImpostor:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{openEnded:{updateShader:!0}},t.prototype.parameters)},e.prototype.getDefines=function(e){var r=t.prototype.getDefines.call(this,e);return this.openEnded||(r.CAP=1),r},r.isImpostor.get=function(){return!0},r.vertexShader.get=function(){return\"CylinderImpostor.vert\"},r.fragmentShader.get=function(){return\"CylinderImpostor.frag\"},Object.defineProperties(e.prototype,r),e}(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.mapping.get=function(){return Lb},r.mappingIndices.get=function(){return Ob},r.mappingIndicesSize.get=function(){return 12},r.mappingType.get=function(){return\"v3\"},r.mappingSize.get=function(){return 6},r.mappingItemSize.get=function(){return 3},Object.defineProperties(e.prototype,r),e}(db)),Nb=function(t,e){return t.color2||(t.color2=t.color),!Uf||e&&e.disableImpostor?new Rb(t,e):new Db(t,e)};Qf.add(\"cylinder\",Nb);var kb=function(t){function e(e,r){var i=4*(e.position1.length/3);t.call(this,{position:new Float32Array(3*i),color:new Float32Array(3*i)},r),this.setAttributes(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n,o,a,s=this.geometry.attributes;t.position1&&t.position2&&(e=t.position1,r=t.position2,o=s.position.array,s.position.needsUpdate=!0),t.color&&t.color2&&(i=t.color,n=t.color2,a=s.color.array,s.color.needsUpdate=!0);for(var c,u,h,l,p,d,f,m,g,v,y,b=this.size,x=0;x5&&s>15e3||s>7e5){var p=Math.min(1.5,Math.max(.1,2e3/(s/n)));c&&(p=Math.min(p,.15)),e.addRepresentation(\"surface\",{sele:\"polymer\",surfaceType:\"sas\",probeRadius:1.4,scaleFactor:p,colorScheme:u,colorScale:h,colorReverse:l,useWorker:!1})}else s>25e4?e.addRepresentation(\"backbone\",{lineOnly:!0,colorScheme:u,colorScale:h,colorReverse:l}):s>1e5?e.addRepresentation(\"backbone\",{quality:\"low\",disableImpostor:!0,colorScheme:u,colorScale:h,colorReverse:l,scale:2}):s>8e4?e.addRepresentation(\"backbone\",{colorScheme:u,colorScale:h,colorReverse:l,scale:2}):(e.addRepresentation(\"cartoon\",{colorScheme:u,colorScale:h,colorReverse:l,scale:.7,aspectRatio:5,quality:\"auto\"}),s<5e4&&e.addRepresentation(\"base\",{colorScheme:u,colorScale:h,colorReverse:l,quality:\"auto\"}),e.addRepresentation(\"ball+stick\",{sele:\"ligand\",colorScheme:\"element\",scale:2,aspectRatio:1.5,bondScale:.3,bondSpacing:.75,quality:\"auto\"}));e.structure.frames.length&&e.addTrajectory()}else\"surface\"!==e.type&&\"volume\"!==e.type||e.addRepresentation(\"surface\");this.tasks.onZeroOnce(this.autoView,this)},qb.prototype.loadFile=function(t,e){var r=Object.assign({},this.defaultFileParams,e),i=new jb(this,r);i.name=wn(t).name,this.addComponent(i);var n=this.tasks;n.increment();var o=function(t){return this.removeComponent(i),i=this.addComponentFromObject(t,r),\"script\"===i.type?i.run():r.defaultRepresentation&&this.defaultFileRepresentation(i),n.decrement(),i}.bind(this),a=function(t){throw i.setStatus(t),n.decrement(),t},s=gn(r.ext,wn(t).ext);return(qf.isTrajectory(s)?Promise.reject(new Error('loadFile: ext \"'+s+'\" is a trajectory and must be loaded into a structure component')):Mo(t,r)).then(o,a)},qb.prototype.addComponent=function(t){if(!t)return void jf.warn(\"Stage.addComponent: no component given\");this.compList.push(t),this.signals.componentAdded.dispatch(t)},qb.prototype.addComponentFromObject=function(t,e){var r=Kf.get(t.type);if(r){var i=new r(this,t,e);return this.addComponent(i),i}jf.warn(\"no component for object type\",t.type)},qb.prototype.removeComponent=function(t){var e=this.compList.indexOf(t);-1!==e&&(this.compList.splice(e,1),t.dispose(),this.signals.componentRemoved.dispatch(t))},qb.prototype.removeAllComponents=function(t){this.compList.slice().forEach(function(e){t&&e.type!==t||this.removeComponent(e)},this)},qb.prototype.handleResize=function(){this.viewer.handleResize()},qb.prototype.setSize=function(t,e){var r=this.viewer.container;r!==document.body&&(void 0!==t&&(r.style.width=t),void 0!==e&&(r.style.height=e),this.handleResize())},qb.prototype.toggleFullscreen=function(t){function e(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}function r(){if(!e()&&i.lastFullscreenElement){var t=i.lastFullscreenElement;t.style.width=t.dataset.normalWidth,t.style.height=t.dataset.normalHeight,document.removeEventListener(\"fullscreenchange\",r),document.removeEventListener(\"mozfullscreenchange\",r),document.removeEventListener(\"webkitfullscreenchange\",r),document.removeEventListener(\"MSFullscreenChange\",r),i.handleResize(),i.signals.fullscreenChanged.dispatch(!1)}}if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled))return void jf.log(\"fullscreen mode (currently) not possible\");var i=this;t=t||this.viewer.container,this.lastFullscreenElement=t,e()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(t.dataset.normalWidth=t.style.width,t.dataset.normalHeight=t.style.height,t.style.width=window.screen.width+\"px\",t.style.height=window.screen.height+\"px\",t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(),document.addEventListener(\"fullscreenchange\",r),document.addEventListener(\"mozfullscreenchange\",r),document.addEventListener(\"webkitfullscreenchange\",r),document.addEventListener(\"MSFullscreenChange\",r),this.handleResize(),this.signals.fullscreenChanged.dispatch(!0),setTimeout(function(){i.handleResize()},100))},qb.prototype.setSpin=function(t){t?(this.spinAnimation.resume(!0),this.rockAnimation.pause(!0)):this.spinAnimation.pause(!0)},qb.prototype.setRock=function(t){t?(this.rockAnimation.resume(!0),this.spinAnimation.pause(!0)):this.rockAnimation.pause(!0)},qb.prototype.toggleSpin=function(){this.setSpin(this.spinAnimation.paused)},qb.prototype.toggleRock=function(){this.setRock(this.rockAnimation.paused)},qb.prototype.setFocus=function(t){var e=Yn(t/2,0,49.9),r=100-e,i=(r-e)/2;this.setParameters({clipNear:e,clipFar:r,fogNear:Zn(r-i),fogFar:Zn(r+i)})},qb.prototype.getZoomForBox=function(t){var e=t.getSize(Xb),r=Math.max(e.x,e.y,e.z),i=Math.min(e.x,e.y,e.z),n=r+Math.sqrt(i),o=$n(this.viewer.perspectiveCamera.fov),a=this.viewer.width,s=this.viewer.height,c=a/s,u=s=this.V[n][o]?(r=\"S\",this.score=this.S[n][o]):this.V[n][o]>=this.H[n][o]?(r=\"V\",this.score=this.V[n][o]):(r=\"H\",this.score=this.H[n][o]),t.Debug&&jf.log(\"Alignment: SCORE\",this.score),t.Debug&&jf.log(\"Alignment: S, V, H\",this.S[n][o],this.V[n][o],this.H[n][o]);n>0&&o>0;)\"S\"===r?e.S[n][o]===e.S[n-1][o-1]+i(n-1,o-1)?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--n,--o,r=\"S\"):e.S[n][o]===e.V[n][o]?r=\"V\":e.S[n][o]===e.H[n][o]?r=\"H\":(--n,--o):\"V\"===r?e.V[n][o]===e.V[n-1][o]+e.gapExtensionPenalty?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2=\"-\"+e.ali2,--n,r=\"V\"):e.V[n][o]===e.S[n-1][o]+e.gap(0)?(e.ali1=e.seq1[n-1]+e.ali1,e.ali2=\"-\"+e.ali2,--n,r=\"S\"):--n:\"H\"===r?e.H[n][o]===e.H[n][o-1]+e.gapExtensionPenalty?(e.ali1=\"-\"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o,r=\"H\"):e.H[n][o]===e.S[n][o-1]+e.gap(0)?(e.ali1=\"-\"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o,r=\"S\"):--o:jf.error(\"Alignment: no matrix\");for(;n>0;)e.ali1=e.seq1[n-1]+e.ali1,e.ali2=\"-\"+e.ali2,--n;for(;o>0;)e.ali1=\"-\"+e.ali1,e.ali2=e.seq2[o-1]+e.ali2,--o;t.Debug&&jf.timeEnd(\"Alignment.trace\"),t.Debug&&jf.log([this.ali1,this.ali2])};var Jb=function(t){function e(e){var r=this;t.call(this,e),e.scale||(this.scale=\"rainbow\",this.reverse=gn(e.reverse,!0)),this.scalePerModel={},this.structure.eachModel(function(t){r.domain=[t.atomOffset,t.atomEnd],r.scalePerModel[t.index]=r.getScale()})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.scalePerModel[t.modelIndex](t.index)},e}(pf);Hf.add(\"atomindex\",Jb);var tx=function(t){function e(e){if(t.call(this,e),e.scale||(this.scale=\"OrRd\"),!e.domain){var r,i=1/0,n=-1/0;e.sele&&(r=new Cf(e.sele)),this.structure.eachAtom(function(t){var e=t.bfactor;i=Math.min(i,e),n=Math.max(n,e)},r),this.domain=[i,n]}this.bfactorScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.bfactorScale(t.bfactor)},e}(pf);Hf.add(\"bfactor\",tx);var ex=function(t){function e(e){t.call(this,e),e.scale||(this.scale=\"Spectral\");var r={},i={};this.structure.eachModel(function(t){var e=0,n={};t.eachChain(function(t){void 0===n[t.chainid]&&(n[t.chainid]=e,e+=1)}),this.domain=[0,e-1],r[t.index]=n,i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){var e=r[t.modelIndex];return i[t.modelIndex](e[t.chainid])}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add(\"chainid\",ex);var rx=function(t){function e(e){if(t.call(this,e),e.scale||(this.scale=\"Spectral\"),e.domain){var r=this.getScale();this.atomColor=function(t){return r(t.chainIndex)}}else{var i={};this.structure.eachModel(function(t){this.domain=[t.chainOffset,t.chainEnd],i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){return i[t.modelIndex](t.chainIndex)}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add(\"chainindex\",rx);var ix=function(t){function e(e){t.call(this,e),e.scale||(this.scale=\"Spectral\");var r={},i={};this.structure.eachModel(function(t){var e=0,n={};t.eachChain(function(t){void 0===n[t.chainname]&&(n[t.chainname]=e,e+=1)}),this.domain=[0,e-1],r[t.index]=n,i[t.index]=this.getScale()}.bind(this)),this.atomColor=function(t){var e=r[t.modelIndex];return i[t.modelIndex](e[t.chainname])}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add(\"chainname\",ix);var nx=function(t){function e(e){t.call(this,e),e.scale||(this.scale=\"RdYlBu\"),this.rsrzScale=this.getScale({domain:[2,0]}),this.rsccScale=this.getScale({domain:[.678,1]});var r=e.structure.validation||{};this.rsrzDict=r.rsrzDict||{},this.rsccDict=r.rsccDict||{}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){var e=t.resno;t.inscode&&(e+=\"^\"+t.inscode),t.chainname&&(e+=\":\"+t.chainname),e+=\"/\"+t.modelIndex;var r=this.rsrzDict[e];if(void 0!==r)return this.rsrzScale(r);var i=this.rsccDict[e];return void 0!==i?this.rsccScale(i):9474192},e}(pf);Hf.add(\"densityfit\",nx);var ox={ARG:{CD:.1,CZ:.5,NE:-.1},ASN:{CG:.55,OD1:-.55},ASP:{CB:-.16,CG:.36,OD1:-.6,OD2:-.6},CYS:{CB:.19,SG:-.19},GLN:{CD:.55,OE1:-.55},GLU:{CD:.36,CG:-.16,OE1:-.6,OE2:-.6},HIS:{CB:.1,CD2:.2,CE1:.45,CG:.15,ND1:.05,NE2:.05},LYS:{CE:.25,NZ:.75},MET:{CE:.06,CG:.06,SD:-.12},PTR:{C:.55,CA:.1,CZ:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SEP:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,O1P:-.85,O2P:-.85,O3P:-.85,OG1:-1.1,P:1.4},SER:{CB:.25,OG:-.25},THR:{CB:.25,OG1:-.25},TPO:{C:.55,CA:.1,CB:.25,N:-.35,O:-.55,OG1:-1.1,O1P:-.85,O2P:-.85,O3P:-.85,P:1.4},TRP:{CD1:.06,CD2:.1,CE2:-.04,CE3:-.03,CG:-.03,NE1:-.06},TYR:{CZ:.25,OH:-.25},backbone:{C:.55,O:-.55,N:-.35,CA:.1}},ax=12,sx=1.04,cx=.25,ux=function(t){function e(e){function r(t){return t.isProtein()?ox[t.resname]&&ox[t.resname][t.atomname]||ox.backbone[t.atomname]||0:0}t.call(this,e),e.scale||(this.scale=\"rwb\"),e.domain||(this.domain=[-.5,0,.5]);var i=this.getScale(),n=this.structure,o=new Float32Array(n.atomCount),a=[],s=[];n.eachAtom(function(t){if(o[t.index]=r(t)*t.occupancy,\"N\"===t.atomname){var e=$s(t);void 0!==e&&(a.push(e),s.push(cx*t.occupancy))}});var c=this.structure.getBoundingBox();c.expandByScalar(sx);var u=Hs(a),h=new Ya(u,c),l=new Ya(this.structure.atomStore,c),p=this.atomProxy,d=new g,f=ax*ax;this.positionColor=function(t){for(var e=0,r=l.within(t.x,t.y,t.z,ax),n=0;n=3?10813478:9474192},e}(pf);Hf.add(\"geoquality\",fx);var mx=function(t){function e(e){t.call(this,e),e.scale||(this.scale=\"RdYlGn\");var r,i={};for(r in Fv)i[r]=Fv[r][0];if(!e.domain){var n,o=1/0,a=-1/0;for(r in i)n=i[r],o=Math.min(o,n),a=Math.max(a,n);this.domain=[o,0,a]}var s=this.getScale();this.atomColor=function(t){return s(i[t.resname]||Bv)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add(\"hydrophobicity\",mx);var gx=function(t){function e(e){t.call(this,e),e.scale||(this.scale=\"rainbow\"),e.domain||(this.domain=[0,this.structure.modelStore.count]);var r=this.getScale();this.atomColor=function(t){return r(t.modelIndex)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add(\"modelindex\",gx);var vx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){switch(t.residueType.moleculeType){case 1:return 3697840;case 2:return 15729279;case 3:return 12496596;case 4:return 16629894;case 5:return 12540695;case 6:return 8374655;default:return 16777113}},e}(pf);Hf.add(\"moleculetype\",vx);var yx=function(t){function e(e){t.call(this,e),e.scale||(this.scale=\"PuBu\"),e.domain||(this.domain=[0,1]);var r=this.getScale();this.atomColor=function(t){return r(t.occupancy)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add(\"occupancy\",yx);var bx=function(t){function e(e){t.call(this,e),e.scale||(this.scale=\"rwb\"),e.domain||(this.domain=[-1,1]),this.partialchargeScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return this.partialchargeScale(t.partialCharge)},e}(pf);Hf.add(\"partialcharge\",bx);var xx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(){return Ws()},e.prototype.volumeColor=function(){return Ws()},e.prototype.positionColor=function(){return Ws()},e}(pf);Hf.add(\"random\",xx);var _x=function(t){function e(e){var r=this;if(t.call(this,e),e.scale||(this.scale=\"rainbow\",this.reverse=gn(e.reverse,!0)),e.domain){var i=this.getScale();this.atomColor=function(t){return i(t.residueIndex)}}else{var n={};this.structure.eachChain(function(t){r.domain=[t.residueOffset,t.residueEnd],n[t.index]=r.getScale()}),this.atomColor=function(t){return n[t.chainIndex](t.residueIndex)}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(pf);Hf.add(\"residueindex\",_x);var wx={ALA:9240460,ARG:124,ASN:16743536,ASP:10485826,CYS:16777072,GLN:16731212,GLU:6684672,GLY:16777215,HIS:7368959,ILE:19456,LEU:4546117,LYS:4671416,MET:12099650,PHE:5459026,PRO:5395026,SER:16740418,THR:12078080,TRP:5195264,TYR:9203788,VAL:16747775,ASX:16711935,GLX:16711935,ASH:16711935,GLH:16711935,A:10526975,G:16740464,I:8454143,C:16747595,T:10551200,U:16744576,DA:10526975,DG:16740464,DI:8454143,DC:16747595,DT:10551200,DU:16744576},Sx=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){return wx[t.resname]||16711935},e}(pf);Hf.add(\"resname\",Sx);var Ax={alphaHelix:16711808,threeTenHelix:10485888,piHelix:6291584,betaStrand:16762880,betaTurn:6324479,coil:16777215,dna:11403518,rna:16580962,carbohydrate:10921722},Mx=function(t){function e(e){t.call(this,e),this.rp=this.structure.getResidueProxy()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(t){var e=t.sstruc,r=this.rp;return\"h\"===e?Ax.alphaHelix:\"g\"===e?Ax.threeTenHelix:\"i\"===e?Ax.piHelix:\"e\"===e||\"b\"===e?Ax.betaStrand:\"t\"===e?Ax.betaTurn:(r.index=t.residueIndex,r.isDna()?Ax.dna:r.isRna()?Ax.rna:r.isSaccharide()?Ax.carbohydrate:r.isProtein()||\"s\"===e||\"l\"===e?Ax.coil:8421504)},e}(pf);Hf.add(\"sstruc\",Mx);var Ex=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.atomColor=function(){return this.value},e.prototype.bondColor=function(){return this.value},e.prototype.valueColor=function(){return this.value},e.prototype.volumeColor=function(){return this.value},e}(pf);Hf.add(\"uniform\",Ex);var Tx=function(t){function e(e){t.call(this,e),this.valueScale=this.getScale()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.volumeColor=function(t){return this.valueScale(this.volume.data[t])},e}(pf);Hf.add(\"value\",Tx);var Px=function(t){function e(e){t.call(this,e);var r=this.volume;if(r&&r.inverseMatrix){var i=this.getScale(),n=r.inverseMatrix,o=r.data,a=r.nx,s=r.ny,c=a*s,u=new g;this.positionColor=function(t){u.copy(t),u.applyMatrix4(n);var e=Math.floor(u.x),r=Math.floor(u.y),h=Math.floor(u.z),l=(h*s+r)*a+e,p=l+1,d=l+a,f=l+c,m=d+1,g=f+1,v=d+c,y=v+1,b=o[l],x=o[p],_=o[d],w=o[f],S=o[m],A=o[g],M=o[v],E=o[y],T=u.x-e,P=u.y-r,C=u.z-h,I=Qn(b,x,T),R=Qn(w,A,T),L=Qn(_,S,T),O=Qn(M,E,T),D=Qn(Qn(I,L,P),Qn(R,O,P),C);return i(D)}}else{var h=this.value;this.positionColor=function(){return h}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.positionColor=function(){},e}(pf);Hf.add(\"volume\",Px);var Cx=function(t){function e(e,r,i){var n=this,o=i||{};o.name=gn(o.name,r.name),t.call(this,e,o),this.script=r,this.status=\"loaded\",this.script.signals.nameChanged.add(function(t){n.setName(t)})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"script\"},e.prototype.addRepresentation=function(){},e.prototype.removeRepresentation=function(){},e.prototype.run=function(){var t=this;this.setStatus(\"running\"),this.script.call(this.stage).then(function(){t.setStatus(\"finished\")}),this.setStatus(\"called\")},e.prototype.dispose=function(){this.signals.disposed.dispatch()},e.prototype.setVisibility=function(){},e.prototype.getCenter=function(){},e.prototype.getZoom=function(){},e.prototype.getBox=function(){},Object.defineProperties(e.prototype,r),e}(jb);Kf.add(\"script\",Cx);var Ix=function(t){function e(e,r,i){var n=i||{};n.name=gn(n.name,r.name),t.call(this,e,n),this.shape=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"shape\"},e.prototype.addRepresentation=function(e,r){return t.prototype.addRepresentation.call(this,e,this.shape,r)},e.prototype.getBoxUntransformed=function(){return this.shape.boundingBox},e.prototype.getCenterUntransformed=function(){return this.shape.center},e.prototype.dispose=function(){this.shape.dispose(),t.prototype.dispose.call(this)},Object.defineProperties(e.prototype,r),e}(jb);Kf.add(\"shape\",Ix);var Rx=function(t){function e(e,r,i,n){var o=this,a=i||{};a.name=gn(a.name,r.name),t.call(this,e,a),this.signals=Object.assign(this.signals,{frameChanged:new no,playerChanged:new no,countChanged:new no,parametersChanged:new no}),this.trajectory=r,this.parent=n,this.status=\"loaded\",this.defaultStep=gn(a.defaultStep,void 0),this.defaultTimeout=gn(a.defaultTimeout,50),this.defaultInterpolateType=gn(a.defaultInterpolateType,\"\"),this.defaultInterpolateStep=gn(a.defaultInterpolateStep,5),this.defaultMode=gn(a.defaultMode,\"loop\"),this.defaultDirection=gn(a.defaultDirection,\"forward\"),r.signals.frameChanged.add(function(t){o.signals.frameChanged.dispatch(t)}),r.signals.playerChanged.add(function(t){o.signals.playerChanged.dispatch(t)}),r.signals.countChanged.add(function(t){o.signals.countChanged.dispatch(t)}),void 0!==a.initialFrame&&this.setFrame(a.initialFrame)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"trajectory\"},e.prototype.addRepresentation=function(e,r){return t.prototype.addRepresentation.call(this,e,this.trajectory,r)},e.prototype.setFrame=function(t){this.trajectory.setFrame(t)},e.prototype.setParameters=function(t){this.trajectory.setParameters(t),this.signals.parametersChanged.dispatch(t)},e.prototype.dispose=function(){this.trajectory.dispose(),t.prototype.dispose.call(this)},e.prototype.getCenter=function(){},Object.defineProperties(e.prototype,r),e}(jb),Lx=function(t){function e(e,r,i){var n=i||{};n.timeOffset=gn(n.timeOffset,e.timeOffset),n.deltaTime=gn(n.deltaTime,e.deltaTime),t.call(this,\"\",r,n),this.name=e.name,this.path=e.path,this.frames=e.coordinates,this.boxes=e.boxes,this._init(r)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"frames\"},e.prototype._makeAtomIndices=function(){\"StructureView\"===this.structure.type?this.atomIndices=this.structure.getAtomIndices():this.atomIndices=null},e.prototype._loadFrame=function(t,e){var r,i=this.frames[t];if(this.atomIndices){var n=this.atomIndices,o=n.length;r=new Float32Array(3*o);for(var a=0;a0&&(i=\"( \"+e.join(\" ) AND ( \")+\" )\"),new Cf(i)},r.prototype.getStructure=function(){return this.structure.getStructure()},r.prototype.eachBond=function(t,e){this.structure.eachBond(t,this.getSelection(e))},r.prototype.eachAtom=function(t,e){var r=this.getAtomProxy(),i=this.getAtomSet(e),n=this.atomStore.count;if(i.getSize()0&&re)&&(s=!0,n.set(i.index),o.addBond(a,i,1))}s&&n.set(a.index)});var a=new bv(o.count,!0);return jf.timeEnd(\"Contact within\"),{atomSet:n,bondSet:a,bondStore:o}};var qx=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"contact\",this.parameters=Object.assign({contactType:{type:\"select\",rebuild:!0,options:{polar:\"polar\",polarBackbone:\"polar backbone\"}},maxDistance:{type:\"number\",precision:1,max:10,min:.1,rebuild:!0},maxAngle:{type:\"integer\",max:180,min:0,rebuild:!0},radialSegments:!0,disableImpostor:!0},this.parameters),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.radius=gn(r.radius,.25),this.contactType=gn(r.contactType,\"polarBackbone\"),this.maxDistance=gn(r.maxDistance,3.5),this.maxAngle=gn(r.maxAngle,40),t.prototype.init.call(this,r)},e.prototype.getContactData=function(t){return{polar:Zs,polarBackbone:Ks}[this.contactType](t,this.maxDistance,this.maxAngle)},e.prototype.getBondData=function(t,e,r){var i=t.getBondData(this.getBondParams(e,r));return i.picking&&(i.picking=new iv(i.picking.array,i.picking.structure,r.bondStore)),i},e.prototype.createData=function(t){var e=this.getContactData(t);return{bufferList:[new Nb(this.getBondData(t,void 0,{bondSet:e.bondSet,bondStore:e.bondStore}),this.getBufferParams({openEnded:!1,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0}))],bondSet:e.bondSet,bondStore:e.bondStore}},e.prototype.updateData=function(t,e){if(!t||t.position){var r=this.getContactData(e.sview);e.bondSet=r.bondSet,e.bondStore=r.bondStore}var i={bondSet:e.bondSet,bondStore:e.bondStore},n=this.getBondData(e.sview,t,i),o={};t&&!t.position||(o.position=Do(n.position1,n.position2),o.position1=n.position1,o.position2=n.position2),t&&!t.color||(o.color=n.color,o.color2=n.color2),t&&!t.radius||(o.radius=n.radius),e.bufferList[0].setAttributes(o)},e}(Eb);Xf.add(\"contact\",qx),Yf.add(\"shader/SDFFont.vert\",\"uniform float nearClip;\\nuniform float clipRadius;\\nuniform vec3 clipCenter;\\nuniform float xOffset;\\nuniform float yOffset;\\nuniform float zOffset;\\nuniform bool ortho;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\\nvarying vec3 vViewPosition;\\n#endif\\nvarying vec2 texCoord;\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\n#if defined( PICKING )\\n#include unpack_color\\nattribute float primitiveId;\\nvarying vec3 vPickingColor;\\n#else\\n#include color_pars_vertex\\n#endif\\nattribute vec2 mapping;\\nattribute vec2 inputTexCoord;\\nattribute float inputSize;\\n#include matrix_scale\\n#include common\\nvoid main(void){\\n#if defined( PICKING )\\nvPickingColor = unpackColor( primitiveId );\\n#else\\n#include color_vertex\\n#endif\\ntexCoord = inputTexCoord;\\nfloat scale = matrixScale( modelViewMatrix );\\nfloat _zOffset = zOffset * scale;\\nif( texCoord.x == 10.0 ){\\n_zOffset -= 0.001;\\n}\\nvec3 pos = position;\\nif( ortho ){\\npos += normalize( cameraPosition ) * _zOffset;\\n}\\nvec4 cameraPos = modelViewMatrix * vec4( pos, 1.0 );\\nvec4 cameraCornerPos = vec4( cameraPos.xyz, 1.0 );\\ncameraCornerPos.xy += mapping * inputSize * 0.01 * scale;\\ncameraCornerPos.x += xOffset * scale;\\ncameraCornerPos.y += yOffset * scale;\\nif( !ortho ){\\ncameraCornerPos.xyz += normalize( -cameraCornerPos.xyz ) * _zOffset;\\n}\\ngl_Position = projectionMatrix * cameraCornerPos;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || ( !defined( PICKING ) && !defined( NOLIGHT ) )\\nvViewPosition = -cameraCornerPos.xyz;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\\n#endif\\n#include nearclip_vertex\\n#include radiusclip_vertex\\n}\"),Yf.add(\"shader/SDFFont.frag\",\"uniform sampler2D fontTexture;\\nuniform float opacity;\\nuniform bool showBorder;\\nuniform vec3 borderColor;\\nuniform float borderWidth;\\nuniform vec3 backgroundColor;\\nuniform float backgroundOpacity;\\nuniform float nearClip;\\nuniform float clipRadius;\\nvarying vec3 vViewPosition;\\nvarying vec2 texCoord;\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\n#if defined( PICKING )\\nuniform float objectId;\\nvarying vec3 vPickingColor;\\nconst vec3 vColor = vec3( 0.0 );\\n#else\\n#include common\\n#include color_pars_fragment\\n#include fog_pars_fragment\\n#endif\\n#ifdef SDF\\nconst float smoothness = 16.0;\\n#else\\nconst float smoothness = 256.0;\\n#endif\\nconst float gamma = 2.2;\\nvoid main(){\\n#include nearclip_fragment\\n#include radiusclip_fragment\\nif( texCoord.x > 1.0 ){\\ngl_FragColor = vec4( backgroundColor, backgroundOpacity );\\n}else{\\nfloat sdf = texture2D( fontTexture, texCoord ).a;\\nif( showBorder ) sdf += borderWidth;\\nfloat w = clamp(\\nsmoothness * ( abs( dFdx( texCoord.x ) ) + abs( dFdy( texCoord.y ) ) ),\\n0.0,\\n0.5\\n);\\nfloat a = smoothstep( 0.5 - w, 0.5 + w, sdf );\\na = pow( a, 1.0 / gamma );\\nif( a < 0.2 ) discard;\\na *= opacity;\\nvec3 outgoingLight = vColor;\\nif( showBorder && sdf < ( 0.5 + borderWidth ) ){\\noutgoingLight = borderColor;\\n}\\ngl_FragColor = vec4( outgoingLight, a );\\n}\\n#if defined( PICKING )\\ngl_FragColor = vec4( vPickingColor, objectId );\\n#else\\n#include premultiplied_alpha_fragment\\n#include tonemapping_fragment\\n#include encodings_fragment\\n#include fog_fragment\\n#endif\\n}\");var Yx={},Zx=function(t){var e=Object.assign({},t);if(this.font=gn(e.font,[\"sans-serif\"]),this.size=gn(e.size,36),this.style=gn(e.style,\"normal\"),this.variant=gn(e.variant,\"normal\"),this.weight=gn(e.weight,\"normal\"),this.outline=gn(e.outline,0),this.width=gn(e.width,2048),this.height=gn(e.height,2048),this.gamma=1,\"undefined\"!=typeof navigator){var r=navigator.userAgent;r.match(/Chrome/)&&r.match(/OS X/)&&(this.gamma=.5)}this.mapped={},this.scratchW=0,this.scratchH=0,this.currentX=0,this.currentY=0,this.build(),this.populate(),this.texture=new Fe(this.canvas2),this.texture.flipY=!1,this.texture.needsUpdate=!0};Zx.prototype.build=function(){var t=this.size+2*this.outline+Math.round(this.size/4),e=this.width/4,r=document.createElement(\"canvas\");r.width=e,r.height=t;var i=r.getContext(\"2d\");i.font=this.style+\" \"+this.variant+\" \"+this.weight+\" \"+this.size+\"px \"+this.font,i.fillStyle=\"#FF0000\",i.textAlign=\"left\",i.textBaseline=\"bottom\",i.lineJoin=\"round\";for(var n=[],o=3*this.outline,a=0;athis.width&&(this.currentX=0,this.currentY+=this.scratchH),this.currentY+this.scratchH>this.height&&console.warn(\"canvas to small\"),this.mapped[t]={x:this.currentX,y:this.currentY,w:this.scratchW,h:this.scratchH},this.context2.drawImage(this.canvas,0,0,this.scratchW,this.scratchH,this.currentX,this.currentY,this.scratchW,this.scratchH),this.currentX+=this.scratchW),this.mapped[t]},Zx.prototype.get=function(t){return this.mapped[t]||this.placeholder},Zx.prototype.draw=function(t){var e=this.lineHeight,r=this.outline,i=this.context,n=this.scratch,o=this.maxWidth,a=this.colors,s=r,c=e-this.outline,u=i.measureText(t),h=Math.min(o,Math.ceil(u.width+2*s+1));i.clearRect(0,0,h,e);var l,p,d,f,m;if(0===this.outline)for(i.fillText(t,s,c),d=3,l=0,p=(m=(f=i.getImageData(0,0,h,e)).data).length/4;l0;--l)d=l>1?2*l-2:l,i.strokeStyle=a[d-1],i.lineWidth=d,i.strokeText(t,s,c);i.globalCompositeOperation=\"multiply\",i.fillStyle=\"#FF00FF\",i.fillText(t,s,c),m=(f=i.getImageData(0,0,h,e)).data,d=0;var g=this.gamma;for(l=0,p=m.length/4;l0&&(r-=h,n=n.subarray(0,3*r));var l=new bv(s.count,!0);return{text:i,position:n,bondSet:l,bondStore:s}},e.prototype.getBondData=function(t,e,r){var i=t.getBondData(this.getBondParams(e,r));return i.picking&&(i.picking=new av(i.picking.array,i.picking.structure,r.bondStore)),i},e.prototype.create=function(){if(0!==this.structureView.atomCount){var t=this.atomPair.length;if(0!==t){var e=this.getDistanceData(this.structureView,this.atomPair),r=new tt(this.labelColor);this.textBuffer=new Kx({position:e.position,size:No(t,this.labelSize),color:ko(t,r.r,r.g,r.b),text:e.text},this.getBufferParams({fontFamily:this.fontFamily,fontStyle:this.fontStyle,fontWeight:this.fontWeight,sdf:this.sdf,zOffset:this.labelZOffset,opacity:1,visible:this.labelVisible}));var i={bondSet:e.bondSet,bondStore:e.bondStore},n=this.getBondData(this.structureView,void 0,i);this.cylinderBuffer=new Nb(n,this.getBufferParams({openEnded:!1,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0})),this.dataList.push({sview:this.structureView,bondSet:e.bondSet,bondStore:e.bondStore,position:e.position,bufferList:[this.textBuffer,this.cylinderBuffer]})}}},e.prototype.update=function(e){e.position?this.build():t.prototype.update.call(this,e)},e.prototype.updateData=function(t,e){var r={bondSet:e.bondSet,bondStore:e.bondStore},i=this.getBondData(e.sview,t,r),n={},o={},a=this.atomPair.length;if(t.labelSize&&(o.size=No(a,this.labelSize)),t.labelColor){var s=new tt(this.labelColor);o.color=ko(a,s.r,s.g,s.b)}t.color&&(n.color=i.color,n.color2=i.color2),(t.radius||t.scale)&&(n.radius=i.radius),this.textBuffer.setAttributes(o),this.cylinderBuffer.setAttributes(n)},e.prototype.setVisibility=function(e,r){return t.prototype.setVisibility.call(this,e,!0),this.textBuffer&&this.textBuffer.setVisibility(this.labelVisible&&this.visible),r||this.viewer.requestRender(),this},e.prototype.setParameters=function(e){var r={};return e&&e.labelSize&&(r.labelSize=!0),e&&(e.labelColor||0===e.labelColor)&&(r.labelColor=!0),t.prototype.setParameters.call(this,e,r,!1),e&&void 0!==e.labelVisible&&this.setVisibility(this.visible),this},e}(Eb);Xf.add(\"distance\",Qx);var Jx=function(t){function e(e,r){var i=r||{},n=2*(e.position.length/3),o=new tt(gn(i.color,\"grey\")),a=new Float32Array(3*n),s=ko(n,o.r,o.g,o.b);t.call(this,{position:a,color:s},i),this.scale=gn(i.scale,1),this.setAttributes(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLine:{},vertexShader:{},fragmentShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n=this.geometry.attributes;t.position&&t.vector&&(e=t.position,r=t.vector,i=n.position.array,n.position.needsUpdate=!0);var o,a,s=this.size/2,c=this.scale;if(t.position&&t.vector)for(var u=0;u radius2) {\\nspaceposition.y = mapping.y * 1.5 * radius1;\\nspaceposition.x = mapping.x * 1.5 * radius1;\\n} else {\\nspaceposition.y = mapping.y * 1.5 * radius2;\\nspaceposition.x = mapping.x * 1.5 * radius2;\\n}\\nspaceposition.w = 1.0;\\nvec4 e3 = vec4( 1.0 );\\nvec3 e1, e1_temp, e2, e2_temp;\\ne3.xyz = normalize(position_atom1-position_atom2);\\nif (e3.z == 0.0) { e3.z = 0.0000000000001;}\\nif ( (position_atom1.x - position_atom2.x) == 0.0) { position_atom1.x += 0.001;}\\nif ( (position_atom1.y - position_atom2.y) == 0.0) { position_atom1.y += 0.001;}\\nif ( (position_atom1.z - position_atom2.z) == 0.0) { position_atom1.z += 0.001;}\\nvec4 focus = vec4( 1.0 );\\nfocus.x = ( position_atom1.x*position_atom1.x - position_atom2.x*position_atom2.x +\\n( radius2*radius2 - radius1*radius1 )*e3.x*e3.x/shrink )/(2.0*(position_atom1.x - position_atom2.x));\\nfocus.y = ( position_atom1.y*position_atom1.y - position_atom2.y*position_atom2.y +\\n( radius2*radius2 - radius1*radius1 )*e3.y*e3.y/shrink )/(2.0*(position_atom1.y - position_atom2.y));\\nfocus.z = ( position_atom1.z*position_atom1.z - position_atom2.z*position_atom2.z +\\n( radius2*radius2 - radius1*radius1 )*e3.z*e3.z/shrink )/(2.0*(position_atom1.z - position_atom2.z));\\ne1.x = 1.0;\\ne1.y = 1.0;\\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\\ne1_temp = e1 - focus.xyz;\\ne1 = normalize(e1_temp);\\ne2_temp = e1.yzx * e3.zxy - e1.zxy * e3.yzx;\\ne2 = normalize(e2_temp);\\nmat3 R= mat3( e1.xyz, e2.xyz, e3.xyz );\\nvertex_position.xyz = R * spaceposition.xyz;\\nvertex_position.w = 1.0;\\nvertex_position.x += (position_atom1.x+position_atom2.x) / 2.0;\\nvertex_position.y += (position_atom1.y+position_atom2.y) / 2.0;\\nvertex_position.z += (position_atom1.z+position_atom2.z) / 2.0;\\ngl_Position = modelViewProjectionMatrix * vertex_position;\\nvec4 i_near, i_far;\\nvec4 near = gl_Position;\\nnear.z = 0.0 ;\\nnear = modelViewProjectionMatrixInverse * near;\\ni_near = near;\\nvec4 far = gl_Position;\\nfar.z = far.w ;\\ni_far = modelViewProjectionMatrixInverse * far;\\nprime1 = vec4( position_atom1 - (position_atom1 - focus.xyz)*shrink, 1.0 );\\nprime2 = vec4( position_atom2 - (position_atom2 - focus.xyz)*shrink, 1.0 );\\nfloat Rsquare = (radius1*radius1/shrink) - (\\n(position_atom1.x - focus.x)*(position_atom1.x - focus.x) +\\n(position_atom1.y - focus.y)*(position_atom1.y - focus.y) +\\n(position_atom1.z - focus.z)*(position_atom1.z - focus.z)\\n);\\nfocus.w = Rsquare;\\nmatrix_near = mat4( i_near, i_far, focus, e3 );\\ngl_Position.z = 1.0;\\n}\"),Yf.add(\"shader/HyperballStickImpostor.frag\",\"#define STANDARD\\n#define IMPOSTOR\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\nuniform float nearClip;\\nuniform float shrink;\\nuniform mat4 modelViewMatrix;\\nuniform mat4 modelViewProjectionMatrix;\\nuniform mat4 modelViewMatrixInverseTranspose;\\nuniform mat4 projectionMatrix;\\nvarying mat4 matrix_near;\\nvarying vec4 prime1;\\nvarying vec4 prime2;\\nvarying float vRadius;\\nvarying float vRadius2;\\n#ifdef PICKING\\nuniform float objectId;\\nvarying vec3 vPickingColor;\\n#else\\nvarying vec3 vColor1;\\nvarying vec3 vColor2;\\n#include common\\n#include fog_pars_fragment\\n#include bsdfs\\n#include lights_pars\\n#include lights_physical_pars_fragment\\n#endif\\nbool interior = false;\\nfloat calcClip( vec4 cameraPos ){\\nreturn dot( cameraPos, vec4( 0.0, 0.0, 1.0, nearClip - 0.5 ) );\\n}\\nfloat calcClip( vec3 cameraPos ){\\nreturn calcClip( vec4( cameraPos, 1.0 ) );\\n}\\nfloat calcDepth( in vec3 cameraPos ){\\nvec2 clipZW = cameraPos.z * projectionMatrix[2].zw + projectionMatrix[3].zw;\\nreturn 0.5 + 0.5 * clipZW.x / clipZW.y;\\n}\\nstruct Ray {\\nvec3 origin ;\\nvec3 direction ;\\n};\\nbool cutoff_plane (vec3 M, vec3 cutoff, vec3 x3){\\nfloat a = x3.x;\\nfloat b = x3.y;\\nfloat c = x3.z;\\nfloat d = -x3.x*cutoff.x-x3.y*cutoff.y-x3.z*cutoff.z;\\nfloat l = a*M.x+b*M.y+c*M.z+d;\\nif (l<0.0) {return true;}\\nelse{return false;}\\n}\\nvec3 isect_surf(Ray r, mat4 matrix_coef){\\nvec4 direction = vec4(r.direction, 0.0);\\nvec4 origin = vec4(r.origin, 1.0);\\nfloat a = dot(direction,(matrix_coef*direction));\\nfloat b = dot(origin,(matrix_coef*direction));\\nfloat c = dot(origin,(matrix_coef*origin));\\nfloat delta =b*b-a*c;\\ngl_FragColor.a = 1.0;\\nif (delta<0.0){\\ndiscard;\\n}\\nfloat t1 =(-b-sqrt(delta))/a;\\nreturn r.origin+t1*r.direction;\\n}\\nvec3 isect_surf2(Ray r, mat4 matrix_coef){\\nvec4 direction = vec4(r.direction, 0.0);\\nvec4 origin = vec4(r.origin, 1.0);\\nfloat a = dot(direction,(matrix_coef*direction));\\nfloat b = dot(origin,(matrix_coef*direction));\\nfloat c = dot(origin,(matrix_coef*origin));\\nfloat delta =b*b-a*c;\\ngl_FragColor.a = 1.0;\\nif (delta<0.0){\\ndiscard;\\n}\\nfloat t2 =(-b+sqrt(delta))/a;\\nreturn r.origin+t2*r.direction;\\n}\\nRay primary_ray(vec4 near1, vec4 far1){\\nvec3 near=near1.xyz/near1.w;\\nvec3 far=far1.xyz/far1.w;\\nreturn Ray(near,far-near);\\n}\\nfloat update_z_buffer(vec3 M, mat4 ModelViewP){\\nfloat depth1;\\nvec4 Ms=(ModelViewP*vec4(M,1.0));\\nreturn depth1=(1.0+Ms.z/Ms.w)/2.0;\\n}\\nvoid main(){\\nfloat radius = max( vRadius, vRadius2 );\\nvec4 i_near, i_far, focus;\\nvec3 e3, e1, e1_temp, e2;\\ni_near = vec4(matrix_near[0][0],matrix_near[0][1],matrix_near[0][2],matrix_near[0][3]);\\ni_far = vec4(matrix_near[1][0],matrix_near[1][1],matrix_near[1][2],matrix_near[1][3]);\\nfocus = vec4(matrix_near[2][0],matrix_near[2][1],matrix_near[2][2],matrix_near[2][3]);\\ne3 = vec3(matrix_near[3][0],matrix_near[3][1],matrix_near[3][2]);\\ne1.x = 1.0;\\ne1.y = 1.0;\\ne1.z = ( (e3.x*focus.x + e3.y*focus.y + e3.z*focus.z) - e1.x*e3.x - e1.y*e3.y)/e3.z;\\ne1_temp = e1 - focus.xyz;\\ne1 = normalize(e1_temp);\\ne2 = normalize(cross(e1,e3));\\nvec4 equation = focus;\\nfloat shrinkfactor = shrink;\\nfloat t1 = -1.0/(1.0-shrinkfactor);\\nfloat t2 = 1.0/(shrinkfactor);\\nvec4 colonne1, colonne2, colonne3, colonne4;\\nmat4 mat;\\nvec3 equation1 = vec3(t2,t2,t1);\\nfloat A1 = - e1.x*equation.x - e1.y*equation.y - e1.z*equation.z;\\nfloat A2 = - e2.x*equation.x - e2.y*equation.y - e2.z*equation.z;\\nfloat A3 = - e3.x*equation.x - e3.y*equation.y - e3.z*equation.z;\\nfloat A11 = equation1.x*e1.x*e1.x + equation1.y*e2.x*e2.x + equation1.z*e3.x*e3.x;\\nfloat A21 = equation1.x*e1.x*e1.y + equation1.y*e2.x*e2.y + equation1.z*e3.x*e3.y;\\nfloat A31 = equation1.x*e1.x*e1.z + equation1.y*e2.x*e2.z + equation1.z*e3.x*e3.z;\\nfloat A41 = equation1.x*e1.x*A1 + equation1.y*e2.x*A2 + equation1.z*e3.x*A3;\\nfloat A22 = equation1.x*e1.y*e1.y + equation1.y*e2.y*e2.y + equation1.z*e3.y*e3.y;\\nfloat A32 = equation1.x*e1.y*e1.z + equation1.y*e2.y*e2.z + equation1.z*e3.y*e3.z;\\nfloat A42 = equation1.x*e1.y*A1 + equation1.y*e2.y*A2 + equation1.z*e3.y*A3;\\nfloat A33 = equation1.x*e1.z*e1.z + equation1.y*e2.z*e2.z + equation1.z*e3.z*e3.z;\\nfloat A43 = equation1.x*e1.z*A1 + equation1.y*e2.z*A2 + equation1.z*e3.z*A3;\\nfloat A44 = equation1.x*A1*A1 + equation1.y*A2*A2 + equation1.z*A3*A3 - equation.w;\\ncolonne1 = vec4(A11,A21,A31,A41);\\ncolonne2 = vec4(A21,A22,A32,A42);\\ncolonne3 = vec4(A31,A32,A33,A43);\\ncolonne4 = vec4(A41,A42,A43,A44);\\nmat = mat4(colonne1,colonne2,colonne3,colonne4);\\nRay ray = primary_ray(i_near,i_far) ;\\nvec3 M;\\nM = isect_surf(ray, mat);\\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\\nvec4 M1 = vec4(M,1.0);\\nvec4 M2 = mat*M1;\\nvec3 _normal = ( modelViewMatrixInverseTranspose * M2 ).xyz;\\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\\n#ifdef NEAR_CLIP\\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 ){\\nM = isect_surf2(ray, mat);\\nif( calcClip( modelViewMatrix * vec4( M, 1.0 ) ) > 0.0 )\\ndiscard;\\ninterior = true;\\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\\nif( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = max( 0.0, calcDepth( vec3( - ( nearClip - 0.5 ) ) ) + ( 0.0000001 / radius ) );\\n}\\n}else if( gl_FragDepthEXT <= 0.0 ){\\nM = isect_surf2(ray, mat);\\ninterior = true;\\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix);\\nif( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\\n}\\n}\\n#else\\nif( gl_FragDepthEXT <= 0.0 ){\\nM = isect_surf2(ray, mat);\\ninterior = true;\\ngl_FragDepthEXT = update_z_buffer(M, modelViewProjectionMatrix) ;\\nif( gl_FragDepthEXT >= 0.0 ){\\ngl_FragDepthEXT = 0.0 + ( 0.0000001 / radius );\\n}\\n}\\n#endif\\nif (cutoff_plane(M, prime1.xyz, -e3) || cutoff_plane(M, prime2.xyz, e3)){ discard; }\\nif (gl_FragDepthEXT < 0.0)\\ndiscard;\\nif (gl_FragDepthEXT > 1.0)\\ndiscard;\\nfloat distance_ratio = ((M.x-prime2.x)*e3.x + (M.y-prime2.y)*e3.y +(M.z-prime2.z)*e3.z) /\\ndistance(prime2.xyz,prime1.xyz);\\n#ifdef PICKING\\ngl_FragColor = vec4( vPickingColor, objectId );\\n#else\\nvec3 vViewPosition = -( modelViewMatrix * vec4( M, 1.0 ) ).xyz;\\nvec3 vNormal = _normal;\\nvec3 vColor;\\nif( distance_ratio>0.5 ){\\nvColor = vColor1;\\n}else{\\nvColor = vColor2;\\n}\\nvec4 diffuseColor = vec4( diffuse, opacity );\\nReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\nvec3 totalEmissiveLight = emissive;\\n#include color_fragment\\n#include roughnessmap_fragment\\n#include metalnessmap_fragment\\nvec3 normal = normalize( vNormal );\\nif( interior ){\\nnormal = vec3( 0.0, 0.0, 0.4 );\\n}\\n#include lights_physical_fragment\\n#include lights_template\\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;\\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n#include premultiplied_alpha_fragment\\n#include tonemapping_fragment\\n#include encodings_fragment\\n#include fog_fragment\\n#endif\\n}\");var r_=new Float32Array([-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1]),i_=new Uint16Array([0,1,2,0,2,3,1,5,6,1,6,2,4,6,5,4,7,6,0,7,4,0,3,7,0,5,1,0,4,5,3,2,6,3,6,7]),n_=function(t){function e(e,r){t.call(this,e,r);var i=e||{},n=gn((r||{}).shrink,.14);this.addUniforms({modelViewProjectionMatrix:{value:new v},modelViewProjectionMatrixInverse:{value:new v},modelViewMatrixInverseTranspose:{value:new v},shrink:{value:n}}),this.addAttributes({position1:{type:\"v3\",value:null},position2:{type:\"v3\",value:null},color2:{type:\"c\",value:null},radius:{type:\"f\",value:null},radius2:{type:\"f\",value:null}}),this.setAttributes(i),this.makeMapping()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={parameters:{},isImpostor:{},vertexShader:{},fragmentShader:{}};return r.parameters.get=function(){return Object.assign.call(this,{shrink:{uniform:!0}},t.prototype.parameters)},r.isImpostor.get=function(){return!0},r.vertexShader.get=function(){return\"HyperballStickImpostor.vert\"},r.fragmentShader.get=function(){return\"HyperballStickImpostor.frag\"},Object.defineProperties(e.prototype,r),e}(function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mapping:{},mappingIndices:{},mappingIndicesSize:{},mappingType:{},mappingSize:{},mappingItemSize:{}};return r.mapping.get=function(){return r_},r.mappingIndices.get=function(){return i_},r.mappingIndicesSize.get=function(){return 36},r.mappingType.get=function(){return\"v3\"},r.mappingSize.get=function(){return 8},r.mappingItemSize.get=function(){return 3},Object.defineProperties(e.prototype,r),e}(db)),o_=function(t,e){return!Uf||e&&e.disableImpostor?(t.radius=Uo(t.radius,t.radius2),new Rb(t,e)):new n_(t,e)},a_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"hyperball\",this.parameters=Object.assign({shrink:{type:\"number\",precision:3,max:1,min:.001,buffer:!0}},this.parameters,{multipleBond:null,bondSpacing:null})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.scale=gn(r.scale,.2),r.radius=gn(r.radius,\"vdw\"),this.shrink=gn(r.shrink,.12),t.prototype.init.call(this,r)},e.prototype.getBondParams=function(e,r){return e&&!e.radius||(r=Object.assign({radius2:!0},r)),t.prototype.getBondParams.call(this,e,r)},e.prototype.createData=function(t){var e=new yb(t.getAtomData(this.getAtomParams()),this.getBufferParams({sphereDetail:this.sphereDetail,disableImpostor:this.disableImpostor,dullInterior:!0}));return this.__center=new Float32Array(3*t.bondCount),{bufferList:[e,new o_(t.getBondData(this.getBondParams()),this.getBufferParams({shrink:this.shrink,radialSegments:this.radialSegments,disableImpostor:this.disableImpostor,dullInterior:!0}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams()),i=e.sview.getBondData(this.getBondParams()),n={},o={};if(!t||t.position){n.position=r.position;var a=i.position1,s=i.position2;o.position=Do(a,s,this.__center),o.position1=a,o.position2=s}t&&!t.color||(n.color=r.color,o.color=i.color,o.color2=i.color2),t&&!t.radius||(n.radius=r.radius,o.radius=i.radius,o.radius2=i.radius2),e.bufferList[0].setAttributes(n),e.bufferList[1].setAttributes(o)},e}(e_);Xf.add(\"hyperball\",a_),Js.prototype={constructor:Js,atomLabel:function(t){var e;switch(this.type){case\"atomname\":e=t.atomname;break;case\"atomindex\":e=\"\"+t.index;break;case\"occupancy\":e=t.occupancy.toFixed(2);break;case\"bfactor\":e=t.bfactor.toFixed(2);break;case\"serial\":e=\"\"+t.serial;break;case\"element\":e=t.element;break;case\"atom\":e=t.atomname+\"|\"+t.index;break;case\"resname\":e=t.resname;break;case\"resno\":e=\"\"+t.resno;break;case\"res\":var r=t.resname.toUpperCase();e=(zv[r]||r)+t.resno;break;case\"text\":e=this.text[t.index];break;default:e=t.qualifiedName()}return void 0===e?\"\":e}},Js.types={\"\":\"\",atomname:\"atom name\",atomindex:\"atom index\",occupancy:\"occupancy\",bfactor:\"b-factor\",serial:\"serial\",element:\"element\",atom:\"atom name + index\",resname:\"residue name\",resno:\"residue no\",res:\"residue name + no\",text:\"text\",qualified:\"qualified name\"};var s_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"label\",this.parameters=Object.assign({labelType:{type:\"select\",options:Js.types,rebuild:!0},labelText:{type:\"hidden\",rebuild:!0},fontFamily:{type:\"select\",options:{\"sans-serif\":\"sans-serif\",monospace:\"monospace\",serif:\"serif\"},buffer:!0},fontStyle:{type:\"select\",options:{normal:\"normal\",italic:\"italic\"},buffer:!0},fontWeight:{type:\"select\",options:{normal:\"normal\",bold:\"bold\"},buffer:!0},sdf:{type:\"boolean\",buffer:!0},xOffset:{type:\"number\",precision:1,max:20,min:-20,buffer:!0},yOffset:{type:\"number\",precision:1,max:20,min:-20,buffer:!0},zOffset:{type:\"number\",precision:1,max:20,min:-20,buffer:!0},attachment:{type:\"select\",options:{\"bottom-left\":\"bottom-left\",\"bottom-center\":\"bottom-center\",\"bottom-right\":\"bottom-right\",\"middle-left\":\"middle-left\",\"middle-center\":\"middle-center\",\"middle-right\":\"middle-right\",\"top-left\":\"top-left\",\"top-center\":\"top-center\",\"top-right\":\"top-right\"},rebuild:!0},showBorder:{type:\"boolean\",buffer:!0},borderColor:{type:\"color\",buffer:!0},borderWidth:{type:\"number\",precision:2,max:.3,min:0,buffer:!0},showBackground:{type:\"boolean\",rebuild:!0},backgroundColor:{type:\"color\",buffer:!0},backgroundMargin:{type:\"number\",precision:2,max:2,min:0,rebuild:!0},backgroundOpacity:{type:\"range\",step:.01,max:1,min:0,buffer:!0}},this.parameters,{side:null,flatShaded:null,wireframe:null,linewidth:null,roughness:null,metalness:null,diffuse:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.labelType=gn(r.labelType,\"res\"),this.labelText=gn(r.labelText,{}),this.fontFamily=gn(r.fontFamily,\"sans-serif\"),this.fontStyle=gn(r.fontStyle,\"normal\"),this.fontWeight=gn(r.fontWeight,\"bold\"),this.sdf=gn(r.sdf,\"Chrome\"===Ff),this.xOffset=gn(r.xOffset,0),this.yOffset=gn(r.yOffset,0),this.zOffset=gn(r.zOffset,.5),this.attachment=gn(r.attachment,\"bottom-left\"),this.showBorder=gn(r.showBorder,!1),this.borderColor=gn(r.borderColor,\"lightgrey\"),this.borderWidth=gn(r.borderWidth,.15),this.showBackground=gn(r.showBackground,!1),this.backgroundColor=gn(r.backgroundColor,\"lightgrey\"),this.backgroundMargin=gn(r.backgroundMargin,.5),this.backgroundOpacity=gn(r.backgroundOpacity,1),t.prototype.init.call(this,r)},e.prototype.createData=function(t){var e={position:!0,color:!0,radius:!0},r=t.getAtomData(this.getAtomParams(e)),i=[],n=new Js(this.labelType,this.labelText);return t.eachAtom(function(t){i.push(n.atomLabel(t))}),{bufferList:[new Kx({position:r.position,size:r.radius,color:r.color,text:i},this.getBufferParams({fontFamily:this.fontFamily,fontStyle:this.fontStyle,fontWeight:this.fontWeight,sdf:this.sdf,xOffset:this.xOffset,yOffset:this.yOffset,zOffset:this.zOffset,attachment:this.attachment,showBorder:this.showBorder,borderColor:this.borderColor,borderWidth:this.borderWidth,showBackground:this.showBackground,backgroundColor:this.backgroundColor,backgroundMargin:this.backgroundMargin,backgroundOpacity:this.backgroundOpacity}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams(t)),i={};t&&!t.position||(i.position=r.position),t&&!t.radius||(i.size=r.radius),t&&!t.color||(i.color=r.color),e.bufferList[0].setAttributes(i)},e}(Eb);Xf.add(\"label\",s_);var c_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"line\",this.parameters=Object.assign({multipleBond:{type:\"select\",rebuild:!0,options:{off:\"off\",symmetric:\"symmetric\",offset:\"offset\"}},bondSpacing:{type:\"number\",precision:2,max:2,min:.5}},this.parameters,{flatShaded:null,side:null,wireframe:null,roughness:null,metalness:null,diffuse:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.multipleBond=gn(r.multipleBond,\"off\"),this.bondSpacing=gn(r.bondSpacing,1),t.prototype.init.call(this,r)},e.prototype.getBondParams=function(e,r){return r=Object.assign({multipleBond:this.multipleBond,bondSpacing:this.bondSpacing,radiusParams:{radius:.1,scale:1}},r),t.prototype.getBondParams.call(this,e,r)},e.prototype.createData=function(t){var e={position:!0,color:!0},r=t.getBondData(this.getBondParams(e));return{bufferList:[new kb(r,this.getBufferParams())]}},e.prototype.updateData=function(t,e){var r=e.sview.getBondData(this.getBondParams(t)),i={};t&&!t.position||(i.position1=r.position1,i.position2=r.position2),t&&!t.color||(i.color=r.color,i.color2=r.color2),e.bufferList[0].setAttributes(i)},e.prototype.setParameters=function(e){var r={};return e&&e.bondSpacing&&(r.position=!0),t.prototype.setParameters.call(this,e,r,!1),this},e}(Eb);Xf.add(\"line\",c_),ec.__deps=[os,ns,as,ca,tc],ic.__deps=[os,as,No,ca,ya,da,ba,rc,gn],$f.add(\"molsurf\",function(t,e){var r=t.data.args,i=t.data.params;if(r&&i){var n=new(\"av\"===i.type?ic:ec)(r.coordList,r.radiusList,r.indexList).getSurface(i.type,i.probeRadius,i.scaleFactor,i.cutoff,!0,i.smooth,i.contour),o=[n.position.buffer,n.index.buffer];n.normal&&o.push(n.normal.buffer),n.atomindex&&o.push(n.atomindex.buffer),e({sd:n,p:i},o)}},[ec,ic]);var u_=function(t){this.structure=t};u_.prototype._getAtomData=function(){return this.structure.getAtomData({what:{position:!0,radius:!0,index:!0},radiusParams:{radius:\"vdw\",scale:1}})},u_.prototype._makeSurface=function(t,e){var r=new ey(e.name,\"\",t);return r.info.type=e.type,r.info.probeRadius=e.probeRadius,r.info.scaleFactor=e.scaleFactor,r.info.smooth=e.smooth,r.info.cutoff=e.cutoff,r},u_.prototype.getSurface=function(t){var e=t||{},r=this._getAtomData(),i=r.position,n=r.radius,o=r.index,a=new(\"av\"===e.type?ic:ec)(i,n,o).getSurface(e.type,e.probeRadius,e.scaleFactor,e.cutoff,!0,e.smooth,e.contour);return this._makeSurface(a,e)},u_.prototype.getSurfaceWorker=function(t,e){var r=this,i=Object.assign({},t);if(window.Worker){void 0===this.worker&&(this.worker=new Za(\"molsurf\"));var n=this._getAtomData(),o=n.position,a=n.radius,s=n.index,c={args:{coordList:o,radiusList:a,indexList:s},params:i},u=[o.buffer,a.buffer,s.buffer];this.worker.post(c,u,function(t){e(r._makeSurface(t.data.sd,i))},function(t){console.warn(\"MolecularSurface.getSurfaceWorker error - trying without worker\",t),r.worker.terminate(),r.worker=void 0;var n=r.getSurface(i);e(n)})}else{var h=this.getSurface(i);e(h)}},u_.prototype.dispose=function(){this.worker&&this.worker.terminate()};var h_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"surface\",this.parameters=Object.assign({surfaceType:{type:\"select\",rebuild:!0,options:{vws:\"vws\",sas:\"sas\",ms:\"ms\",ses:\"ses\",av:\"av\"}},probeRadius:{type:\"number\",precision:1,max:20,min:0,rebuild:!0},smooth:{type:\"integer\",precision:1,max:10,min:0,rebuild:!0},scaleFactor:{type:\"number\",precision:1,max:5,min:0,rebuild:!0},cutoff:{type:\"number\",precision:2,max:50,min:0,rebuild:!0},contour:{type:\"boolean\",rebuild:!0},background:{type:\"boolean\",rebuild:!0},opaqueBack:{type:\"boolean\",buffer:!0},filterSele:{type:\"text\",rebuild:!0},colorVolume:{type:\"hidden\"},useWorker:{type:\"boolean\",rebuild:!0}},this.parameters,{radiusType:null,radius:null,scale:null}),this.__infoList=[],this.structure.signals.refreshed.add(function(){this.__forceNewMolsurf=!0},this),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};r.colorScheme=gn(r.colorScheme,\"uniform\"),r.colorValue=gn(r.colorValue,14540253),r.disablePicking=gn(r.disablePicking,!0),this.surfaceType=gn(r.surfaceType,\"ms\"),this.probeRadius=gn(r.probeRadius,1.4),this.smooth=gn(r.smooth,2),this.scaleFactor=gn(r.scaleFactor,2),this.cutoff=gn(r.cutoff,0),this.contour=gn(r.contour,!1),this.background=gn(r.background,!1),this.opaqueBack=gn(r.opaqueBack,!0),this.filterSele=gn(r.filterSele,\"\"),this.colorVolume=gn(r.colorVolume,void 0),this.useWorker=gn(r.useWorker,!0),t.prototype.init.call(this,e)},e.prototype.prepareData=function(t,e,r){var i=this.__infoList[e];if(i||(i={},this.__infoList[e]=i),i.molsurf&&i.sele===t.selection.string)r(e);else{if(this.filterSele){var n=t.structure.getView(new Cf(this.filterSele)),o=n.boundingBox.getSize(),a=Math.max(o.x,o.y,o.z),s=t.getAtomSetWithinPoint(n.center,a/2+6);t=t.getView(new Cf(t.getAtomSetWithinSelection(s,3).toSeleString()))}i.sele=t.selection.string,i.molsurf=new u_(t);var c=this.getSurfaceParams(),u=function(t){i.surface=t,r(e)};this.useWorker?i.molsurf.getSurfaceWorker(c,u):u(i.molsurf.getSurface(c))}},e.prototype.prepare=function(t){var e=this;if((this.__forceNewMolsurf||this.__sele!==this.selection.string||this.__surfaceParams!==JSON.stringify(this.getSurfaceParams()))&&(this.__infoList.forEach(function(t){t.molsurf.dispose()}),this.__infoList.length=0),0===this.structureView.atomCount)return void t();var r=function(){this.__sele=this.selection.string,this.__surfaceParams=JSON.stringify(this.getSurfaceParams()),this.__forceNewMolsurf=!1,t()}.bind(this),i=\"default\"===this.assembly?this.defaultAssembly:this.assembly,n=this.structure.biomolDict[i];n?n.partList.forEach(function(t,i){var o=t.getView(e.structureView);e.prepareData(o,i,function(t){t===n.partList.length-1&&r()})}):this.prepareData(this.structureView,0,r)},e.prototype.createData=function(t,e){var r=this.__infoList[e],i=r.surface,n={position:i.getPosition(),color:i.getColor(this.getColorParams()),index:i.getFilteredIndex(this.filterSele,t)},o=[];if(i.contour){var a=new ab(n,this.getBufferParams({wireframe:!1}));o.push(a)}else{n.normal=i.getNormal(),n.picking=i.getPicking(t.getStructure());var s=new ib(n,this.getBufferParams({background:this.background,opaqueBack:this.opaqueBack,dullInterior:!1})),c=new nb(s);o.push(c)}return{bufferList:o,info:r}},e.prototype.updateData=function(t,e){var r={};if(t.position)return this.__forceNewMolsurf=!0,void this.build();t.color&&(r.color=e.info.surface.getColor(this.getColorParams())),t.index&&(r.index=e.info.surface.getFilteredIndex(this.filterSele,e.sview)),e.bufferList[0].setAttributes(r)},e.prototype.setParameters=function(e,r,i){return r=r||{},e&&e.filterSele&&(r.index=!0),e&&void 0!==e.colorVolume&&(r.color=!0),e&&e.wireframe&&(e.contour||void 0===e.contour&&this.contour)&&(e.wireframe=!1),t.prototype.setParameters.call(this,e,r,i),this},e.prototype.getSurfaceParams=function(t){return Object.assign({type:this.surfaceType,probeRadius:this.probeRadius,scaleFactor:this.scaleFactor,smooth:this.smooth&&!this.contour,cutoff:this.cutoff,contour:this.contour,useWorker:this.useWorker},t)},e.prototype.getColorParams=function(){var e=t.prototype.getColorParams.call(this);return e.volume=this.colorVolume,e},e.prototype.clear=function(){t.prototype.clear.call(this)},e.prototype.dispose=function(){this.__infoList.forEach(function(t){t.molsurf.dispose()}),this.__infoList.length=0,t.prototype.dispose.call(this)},e}(Eb);Xf.add(\"surface\",h_);var l_=function(t){function e(e,r,i){t.call(this,e,r,i),this.type=\"point\",this.parameters=Object.assign({pointSize:{type:\"number\",precision:1,max:100,min:0,buffer:!0},sizeAttenuation:{type:\"boolean\",buffer:!0},sortParticles:{type:\"boolean\",rebuild:!0},useTexture:{type:\"boolean\",buffer:!0},alphaTest:{type:\"range\",step:.001,max:1,min:0,buffer:!0},forceTransparent:{type:\"boolean\",buffer:!0},edgeBleach:{type:\"range\",step:.001,max:1,min:0,buffer:!0}},this.parameters,{flatShaded:null,wireframe:null,linewidth:null,roughness:null,metalness:null}),this.init(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.init=function(e){var r=e||{};this.pointSize=gn(r.pointSize,1),this.sizeAttenuation=gn(r.sizeAttenuation,!0),this.sortParticles=gn(r.sortParticles,!1),this.useTexture=gn(r.useTexture,!1),this.alphaTest=gn(r.alphaTest,.5),this.forceTransparent=gn(r.forceTransparent,!1),this.edgeBleach=gn(r.edgeBleach,0),t.prototype.init.call(this,r)},e.prototype.createData=function(t){var e={position:!0,color:!0,picking:!0},r=t.getAtomData(this.getAtomParams(e));return{bufferList:[new bb(r,this.getBufferParams({pointSize:this.pointSize,sizeAttenuation:this.sizeAttenuation,sortParticles:this.sortParticles,useTexture:this.useTexture,alphaTest:this.alphaTest,forceTransparent:this.forceTransparent,edgeBleach:this.edgeBleach}))]}},e.prototype.updateData=function(t,e){var r=e.sview.getAtomData(this.getAtomParams(t)),i={};t&&!t.position||(i.position=r.position),t&&!t.color||(i.color=r.color),e.bufferList[0].setAttributes(i)},e}(Eb);Xf.add(\"point\",l_),Yf.add(\"shader/Ribbon.vert\",\"#define STANDARD\\nuniform float nearClip;\\nuniform vec3 clipCenter;\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\\nvarying vec3 vViewPosition;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvarying vec3 vClipCenter;\\n#endif\\nattribute vec3 dir;\\nattribute float size;\\n#ifdef PICKING\\n#include unpack_color\\nattribute float primitiveId;\\nvarying vec3 vPickingColor;\\n#else\\n#include color_pars_vertex\\n#ifndef FLAT_SHADED\\nvarying vec3 vNormal;\\n#endif\\n#endif\\n#include common\\nvoid main(void){\\n#ifdef PICKING\\nvPickingColor = unpackColor( primitiveId );\\n#else\\n#include color_vertex\\n#include beginnormal_vertex\\n#include defaultnormal_vertex\\n#ifndef FLAT_SHADED\\nvNormal = normalize( transformedNormal );\\n#endif\\n#endif\\n#include begin_vertex\\ntransformed += normalize( dir ) * size;\\n#include project_vertex\\n#if defined( NEAR_CLIP ) || defined( RADIUS_CLIP ) || !defined( PICKING )\\nvViewPosition = -mvPosition.xyz;\\n#endif\\n#if defined( RADIUS_CLIP )\\nvClipCenter = -( modelViewMatrix * vec4( clipCenter, 1.0 ) ).xyz;\\n#endif\\n#include nearclip_vertex\\n}\");var p_=new Uint16Array([0,1,2,1,3,2]),d_=function(t){function e(e,r){var i=e||{},n=i.position.length/3-1,o=4*n,a=3*o,s=new Float32Array(a),c=new Float32Array(a),u=new Float32Array(a),h=On(a,a/3);t.call(this,{position:s,color:c,index:h,normal:u,picking:i.picking},r),this.addAttributes({dir:{type:\"v3\",value:new Float32Array(a)}}),this.addAttributes({size:{type:\"f\",value:new Float32Array(o)}}),i.primitiveId=Bo(n),this.setAttributes(i),this.meshIndex=h,this.makeIndex()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertexShader:{}};return e.prototype.setAttributes=function(t){var e,r,i,n,o,a,s,c,u,h,l,p,d=this.size/4,f=this.geometry.attributes;t.position&&(e=t.position,s=f.position.array,f.position.needsUpdate=!0),t.normal&&(r=t.normal,c=f.normal.array,f.normal.needsUpdate=!0),t.size&&(i=t.size,u=f.size.array,f.size.needsUpdate=!0),t.dir&&(n=t.dir,h=f.dir.array,f.dir.needsUpdate=!0),t.color&&(o=t.color,l=f.color.array,f.color.needsUpdate=!0),t.primitiveId&&(a=t.primitiveId,p=f.primitiveId.array,f.primitiveId.needsUpdate=!0);var m,g,v,y,b,x,_,w=i?i[0]:null;for(m=0;m0)continue;var o=void 0,st=void 0,vt=void 0,yt=void 0,bt=void 0;if(U){if(yt=l.split(dw),bt=10===yt.length?1:0,x=yt[2],q&&\"CA\"!==x)continue;o=parseFloat(yt[6-bt]),st=parseFloat(yt[7-bt]),vt=parseFloat(yt[8-bt])}else{if(x=l.substr(12,4).trim(),q&&\"CA\"!==x)continue;o=parseFloat(l.substr(30,8)),st=parseFloat(l.substr(38,8)),vt=parseFloat(l.substr(46,8))}if(X){var xt=3*s;if(a[xt+0]=o,a[xt+1]=st,a[xt+2]=vt,s+=1,K)continue}var _t=void 0;U?(d=parseInt(yt[1]),_t=\"\",_=\"H\"===l[0]?1:0,f=bt?\"\":yt[4],m=parseInt(yt[5-bt]),b=\"\",g=yt[3],S=\"\",y=0):(d=parseInt(l.substr(6,5),$),V&&99999===d&&($=16),_=\"H\"===l[0]?1:0,f=l[21].trim(),m=parseInt(l.substr(22,4),H)||1,V&&9999===m&&(H=16),b=l[26].trim(),g=l.substr(17,4).trim()||\"MOL\",w=parseFloat(l.substr(60,6)),S=l[16].trim(),y=parseFloat(l.substr(54,6)),r||(_t=l.substr(76,2).trim(),f||(f=l.substr(72,4).trim()))),lt.growIfFull(),lt.atomTypeId[ft]=ht.add(x,_t),lt.x[ft]=o,lt.y[ft]=st,lt.z[ft]=vt,lt.serial[ft]=d,lt.altloc[ft]=S.charCodeAt(0),lt.occupancy[ft]=isNaN(y)?0:y,U?(lt.partialCharge[ft]=parseFloat(yt[9-bt]),lt.radius[ft]=parseFloat(yt[10-bt])):lt.bfactor[ft]=isNaN(w)?0:w;var wt=ac(m,f,b);!_||nt[wt]||lw.includes(g)?D||N===f||(O=(L+=1).toString()):N===f&&F===g&&($v.includes(g)||k===m&&B===b)||(O=(L+=1).toString(),k=m,F=g,B=b),G.addAtom(mt,f,O,g,m,_,void 0,b),J[d]=ft,ft+=1,D=!1,N=f}else if(\"CONECT\"===p){var St=J[parseInt(l.substr(6,5))],At=[11,16,21,26],Mt={};if(void 0===St)continue;for(var Et=0;Et<4;++Et){var Tt=parseInt(l.substr(At[Et],5));if(!Number.isNaN(Tt)&&void 0!==(Tt=J[Tt]))if(St0)continue;var ot=it[c].replace(vw,\"\");if(T&&\"CA\"!==ot)continue;var at=parseFloat(it[y]),st=parseFloat(it[b]),ct=parseFloat(it[x]);if(E){var ut=3*i;if(r[ut+0]=at,r[ut+1]=st,r[ut+2]=ct,i+=1,X>0)continue}var ht=it[u],lt=parseInt(it[s]),pt=it[v];pt=\"?\"===pt?\"\":pt;var dt=it[a],ft=it[h],mt=\"H\"===it[d][0]?1:0,gt=it[m],vt=parseFloat(it[_]),yt=parseFloat(it[w]),bt=it[p];if(bt=\".\"===bt?\"\":bt,$.growIfFull(),$.atomTypeId[W]=V.add(ot,gt),$.x[W]=at,$.y[W]=st,$.z[W]=ct,$.serial[W]=parseInt(it[f]),$.bfactor[W]=isNaN(vt)?0:vt,$.occupancy[W]=isNaN(yt)?0:yt,$.altloc[W]=bt.charCodeAt(0),A.addAtom(X,dt,ft,ht,lt,mt,void 0,pt),t.Debug){var xt=I[ft];void 0!==xt&&xt!==dt&&t.Debug&&jf.warn(xt,dt)}I[ft]=dt;var _t=it[l];R[_t]||(R[_t]=new Set),R[_t].add(S.chainStore.count-1),W+=1}else{var wt=o.match(gw),St=wt.length;B===F.length&&(B=0);for(var At=0;At_)continue}d=P.substr(5,5).trim(),f=parseInt(P.substr(0,5)),m=parseInt(P.substr(15,5)),S.growIfFull(),S.atomTypeId[A]=w.add(p),S.x[A]=R,S.y[A]=L,S.z[A]=O,S.serial[A]=m,o.addAtom(M,\"\",\"\",d,f,0,\"l\"),A+=1}}}t.Debug&&jf.time(\"GroParser._parse \"+this.name);var r,i,n=this.structure,o=this.structureBuilder,a=this.firstModelOnly,s=this.asTrajectory,c=this.cAlphaOnly,u=n.frames,h=n.boxes,l=this.streamer.peekLines(3);n.title=l[0].trim();var p,d,f,m,g=5+(l[2].length-l[2].lastIndexOf(\".\")-1),v=20,y=20+g,b=20+2*g,x=parseInt(l[1]),_=x+3,w=n.atomMap,S=n.atomStore;S.resize(x);var A=0,M=0,E=0;this.streamer.eachChunkOfLines(function(t){e(0,t.length,t)}),o.finalize(),n.finalizeAtoms(),gs(n),vs(n),n.finalizeBonds(),xy(n),t.Debug&&jf.timeEnd(\"GroParser._parse \"+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add(\"gro\",xw);var _w=[\"xCoordList\",\"yCoordList\",\"zCoordList\",\"groupIdList\",\"groupTypeList\",\"chainIdList\",\"bFactorList\",\"atomIdList\",\"altLocList\",\"occupancyList\",\"secStructList\",\"insCodeList\",\"sequenceIndexList\",\"chainNameList\",\"bondAtomList\",\"bondOrderList\"],ww=[\"mmtfVersion\",\"mmtfProducer\",\"unitCell\",\"spaceGroup\",\"structureId\",\"title\",\"depositionDate\",\"releaseDate\",\"experimentalMethods\",\"resolution\",\"rFree\",\"rWork\",\"bioAssemblyList\",\"ncsOperatorList\",\"entityList\",\"groupList\",\"numBonds\",\"numAtoms\",\"numGroups\",\"numChains\",\"numModels\",\"groupsPerChain\",\"chainsPerModel\"].concat(_w),Sw={0:\"i\".charCodeAt(0),1:\"s\".charCodeAt(0),2:\"h\".charCodeAt(0),3:\"e\".charCodeAt(0),4:\"g\".charCodeAt(0),5:\"b\".charCodeAt(0),6:\"t\".charCodeAt(0),7:\"l\".charCodeAt(0),\"-1\":\"\".charCodeAt(0)},Aw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return\"mmtf\"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time(\"MmtfParser._parse \"+this.name);var e,r,i,n,o,a=this.structure,s=zc(Fc(this.streamer.data));[\"depositionDate\",\"releaseDate\",\"resolution\",\"rFree\",\"rWork\",\"experimentalMethods\"].forEach(function(t){void 0!==s[t]&&(a.header[t]=s[t])});var c,u,h,l,p,d;if(a.id=s.structureId,a.title=s.title,this.firstModelOnly||this.asTrajectory){for(p=1,h=0,e=0,r=l=s.chainsPerModel[0];e0&&(a.biomolDict.NCS=at)}var ct=s.unitCell;ct&&Array.isArray(ct)&&ct[0]?a.unitcell=new uw({a:ct[0],b:ct[1],c:ct[2],alpha:ct[3],beta:ct[4],gamma:ct[5],spacegroup:s.spaceGroup}):a.unitcell=void 0,_s(a,!0),xs(a,!0),a.finalizeAtoms(),a.finalizeBonds(),ws(a),t.Debug&&jf.timeEnd(\"MmtfParser._parse \"+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add(\"mmtf\",Aw);var Mw=/\\s+/,Ew={1:1,2:2,3:3,am:1,ar:1,du:1,un:1,nc:0},Tw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return\"mol2\"},r.prototype._parse=function(){function e(t,e,S){for(var A=t;AMOLECULE\"===M?(v=y,d=0,++m):\"@ATOM\"===M?(v=b,f=l.count,s&&(i=0,r=new Float32Array(3*g),c.push(r),m>0&&(u=!0))):v=\"@BOND\"===M?x:0;else if(v===y){if(0===d)n.title=M,n.id=M;else if(1===d){var E=M.split(Mw);g=parseInt(E[0])}++d}else if(v===b){var T=M.split(Mw);if(a&&m>0)continue;var P=parseFloat(T[2]),C=parseFloat(T[3]),I=parseFloat(T[4]);if(s){var R=3*i;if(r[R+0]=P,r[R+1]=C,r[R+2]=I,i+=1,u)continue}var L=T[0],O=T[1],D=T[5].split(\".\")[0],N=T[6]?parseInt(T[6]):1,k=T[7]?T[7]:\"\",F=T[8]?parseFloat(T[8]):0;l.growIfFull(),l.atomTypeId[p]=h.add(O,D),l.x[p]=P,l.y[p]=C,l.z[p]=I,l.serial[p]=L,l.partialCharge[p]=F,o.addAtom(m,\"\",\"\",k,N,1),p+=1}else if(v===x){if(a&&m>0)continue;if(s&&m>0)continue;var B=M.split(Mw);_.index=parseInt(B[1])-1+f,w.index=parseInt(B[2])-1+f;var z=Ew[B[3]];n.bondStore.addBond(_,w,z)}}}t.Debug&&jf.time(\"Mol2Parser._parse \"+this.name);var r,i,n=this.structure,o=this.structureBuilder,a=this.firstModelOnly,s=this.asTrajectory,c=n.frames,u=!1,h=n.atomMap,l=n.atomStore;l.resize(Math.round(this.streamer.data.length/60)),l.addField(\"partialCharge\",1,\"float32\");var p=0,d=0,f=0,m=-1,g=0,v=0,y=1,b=2,x=3,_=n.getAtomProxy(),w=n.getAtomProxy();this.streamer.eachChunkOfLines(function(t){e(0,t.length,t)}),o.finalize(),n.finalizeAtoms(),gs(n),xs(n,!0),_s(n,!0),n.finalizeBonds(),As(n),xy(n),t.Debug&&jf.timeEnd(\"Mol2Parser._parse \"+this.name)},Object.defineProperties(r.prototype,i),r}(aw);qf.add(\"mol2\",Tw);var Pw=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"pqr\"},Object.defineProperties(e.prototype,r),e}(fw);qf.add(\"pqr\",Pw);var Cw=/> <(.+)>/,Iw=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return\"sdf\"},r.prototype._parse=function(){function e(t,e,a){for(var C=t;C0&&(h=!0));else if(v>=M&&v0)continue;var R=parseFloat(I.substr(0,10)),L=parseFloat(I.substr(10,10)),O=parseFloat(I.substr(20,10));if(o){var D=3*c;if(s[D+0]=R,s[D+1]=L,s[D+2]=O,c+=1,h)continue}var N=I.substr(31,3).trim(),k=N+(g+1);p.growIfFull(),p.atomTypeId[g]=l.add(k,N),p.x[g]=R,p.y[g]=L,p.z[g]=O,p.serial[g]=g,p.formalCharge[g]=0,i.addAtom(y,\"\",\"\",\"HET\",1,1),g+=1}else if(v>=T&&v0)continue;if(o&&y>0)continue;f.index=parseInt(I.substr(0,3))-1+b,m.index=parseInt(I.substr(3,3))-1+b;var F=parseInt(I.substr(6,3));r.bondStore.addBond(f,m,F)}else if(I.match(/M {2}CHG/))for(var B=parseInt(I.substr(6,3)),z=0,U=10;z0)return void jf.error(\"dcd format with fixed atoms unsupported, aborting\");for(var v=a.NATOM,y=4*v,b=0,x=a.NSET;b=1&&(i.timeOffset=(a.ISTART-1)*i.deltaTime),t.Debug&&jf.timeEnd(\"DcdParser._parse \"+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add(\"dcd\",uS);var hS={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6},lS=0,pS=10,dS=11,fS=12,mS=function(t){var e=new vm(t);e.setBigEndian(),jc(\"CDF\"!==e.readChars(3),\"should start with CDF\");var r=e.readByte();jc(r>2,\"unknown version\"),this.header=Qc(e,r),this.buffer=e},gS={version:{},recordDimension:{},dimensions:{},globalAttributes:{},variables:{}};gS.version.get=function(){return 1===this.header.version?\"classic format\":\"64-bit offset format\"},gS.recordDimension.get=function(){return this.header.recordDimension},gS.dimensions.get=function(){return this.header.dimensions},gS.globalAttributes.get=function(){return this.header.globalAttributes},gS.variables.get=function(){return this.header.variables},mS.prototype.hasDataVariable=function(t){return-1!==this.header.variables.findIndex(function(e){return e.name===t})},mS.prototype.getDataVariable=function(t){var e;return e=\"string\"==typeof t?this.header.variables.find(function(e){return e.name===t}):t,jc(void 0===e,\"variable not found\"),this.buffer.seek(e.offset),e.record?Kc(this.buffer,e,this.header.recordDimension):Zc(this.buffer,e)},Object.defineProperties(mS.prototype,gS);var vS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return\"nctraj\"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time(\"NctrajParser._parse \"+this.name);var e=new mS(this.streamer.data),r=this.frames,i=r.coordinates,n=r.boxes,o=r.times;e.getDataVariable(\"coordinates\").forEach(function(t){i.push(new Float32Array(t))}),e.hasDataVariable(\"cell_lengths\")&&e.getDataVariable(\"cell_lengths\").forEach(function(t){n.push(new Float32Array(t))}),e.hasDataVariable(\"time\")&&e.getDataVariable(\"time\").forEach(function(t){o.push(t)}),o.length>=1&&(r.timeOffset=o[0]),o.length>=2&&(r.deltaTime=o[1]-o[0]),t.Debug&&jf.timeEnd(\"NctrajParser._parse \"+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add(\"nctraj\",vS),qf.add(\"ncdf\",vS),qf.add(\"nc\",vS);var yS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return\"trr\"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time(\"TrrParser._parse \"+this.name);for(var e=Nn(this.streamer.data),r=new DataView(e),i=this.frames,n=i.coordinates,o=i.boxes,a=i.times,s=0;;){s+=8;var c=r.getInt32(s);s+=4,s+=c;var u=r.getInt32(s+8),h=r.getInt32(s+12),l=r.getInt32(s+16),p=r.getInt32(s+28),d=r.getInt32(s+32),f=r.getInt32(s+36),m=r.getInt32(s+40);s+=52;var g=u/9,v=3*m;if(8===g?a.push(r.getFloat64(s)):a.push(r.getFloat32(s)),s+=2*g,u){var y=new Float32Array(9);if(8===g)for(var b=0;b<9;++b)y[b]=10*r.getFloat64(s),s+=8;else for(var x=0;x<9;++x)y[x]=10*r.getFloat32(s),s+=4;o.push(y)}if(s+=h,s+=l,p){var _=void 0;if(8===g){_=new Float32Array(v);for(var w=0;w>8&65280|M>>24&255}_=new Float32Array(e,s,v);for(var E=0;E=e.byteLength)break}a.length>=1&&(i.timeOffset=a[0]),a.length>=2&&(i.deltaTime=a[1]-a[0]),t.Debug&&jf.timeEnd(\"TrrParser._parse \"+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add(\"trr\",yS);var bS=new Uint32Array([0,0,0,0,0,0,0,0,0,8,10,12,16,20,25,32,40,50,64,80,101,128,161,203,256,322,406,512,645,812,1024,1290,1625,2048,2580,3250,4096,5060,6501,8192,10321,13003,16384,20642,26007,32768,41285,52015,65536,82570,104031,131072,165140,208063,262144,330280,416127,524287,660561,832255,1048576,1321122,1664510,2097152,2642245,3329021,4194304,5284491,6658042,8388607,10568983,13316085,16777216]),xS=new Uint8Array(32),_S=new Int32Array(32),wS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return\"xtc\"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time(\"XtcParser._parse \"+this.name);for(var e=Nn(this.streamer.data),r=new DataView(e),i=this.frames,n=i.coordinates,o=i.boxes,a=i.times,s=new Int32Array(6),c=new Int32Array(3),u=new Int32Array(3),h=new Uint32Array(3),l=new Float32Array(3),p=new Float32Array(3),d=0,f=new Int32Array(3),m=new Uint32Array(f.buffer);;){var g=void 0,v=r.getInt32(d+4);d+=12;var y=3*v;a.push(r.getFloat32(d)),d+=4;for(var b=new Float32Array(9),x=0;x<9;++x)b[x]=10*r.getFloat32(d),d+=4;if(o.push(b),v<=9)for(var _=0;_16777215?(u[0]=ru(c[0]),u[1]=ru(c[1]),u[2]=ru(c[2]),M=0):M=iu(3,c);var E=r.getInt32(d);d+=4;var T=E-1,P=bS[T=9>T?9:T]/2|0,C=bS[E]/2|0;h[0]=h[1]=h[2]=bS[E];var I=4*Math.ceil(r.getInt32(d)/4);d+=4;var R=1/A,L=0,O=0,D=new Uint8Array(e,d);for(l[0]=l[1]=l[2]=0;O0){l[0]=l[1]=l[2]=0;for(var k=0;k9?bS[E-1]/2|0:0):N>0&&(P=C,C=bS[E]/2|0),h[0]=h[1]=h[2]=bS[E],0===h[0]||0===h[1]||0===h[2])return void console.error(\"(xdrfile error) Undefined error.\")}d+=I}for(var B=0;B=e.byteLength)break}a.length>=1&&(i.timeOffset=a[0]),a.length>=2&&(i.deltaTime=a[1]-a[0]),t.Debug&&jf.timeEnd(\"XtcParser._parse \"+this.name)},Object.defineProperties(r.prototype,i),r}(cS);qf.add(\"xtc\",wS);var SS=function(t){function e(e,r){var i=r||{};t.call(this,e,i),this.volume=new iy(this.name,this.path),this.voxelSize=gn(i.voxelSize,1)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{},__objName:{}};return r.type.get=function(){return\"volume\"},r.__objName.get=function(){return\"volume\"},e.prototype._afterParse=function(){this.volume.setMatrix(this.getMatrix()),t.prototype._afterParse.call(this)},e.prototype.getMatrix=function(){return new v},Object.defineProperties(e.prototype,r),e}(nw),AS=/\\s+/,MS=/-?\\d+(?:\\.\\d*)?(?:[eE][+-]?\\d+)?/g,ES=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{}};return i.type.get=function(){return\"cube\"},r.prototype._parse=function(){function e(t,e){var r=n[t].trim().split(AS)[e];return parseFloat(r)}function r(t,e,r){for(var i=t;i=o.atomCount+6+h)for(var a=n.match(MS),l=0,p=a.length;l0?0:1;this.streamer.eachChunkOfLines(function(t){r(0,t.length,t)}),i.header=o,i.setData(s,o.NVZ,o.NVY,o.NVX),t.Debug&&jf.timeEnd(\"CubeParser._parse \"+this.name)},r.prototype.getMatrix=function(){var t=this.volume.header,e=new v;return e.multiply((new v).makeTranslation(t.originX,t.originY,t.originZ)),e.multiply((new v).makeBasis(t.basisZ,t.basisY,t.basisX)),e},Object.defineProperties(r.prototype,i),r}(SS);qf.add(\"cub\",ES),qf.add(\"cube\",ES);var TS=function(e){function r(){e.apply(this,arguments)}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var i={type:{},isBinary:{}};return i.type.get=function(){return\"dsn6\"},i.isBinary.get=function(){return!0},r.prototype._parse=function(){t.Debug&&jf.time(\"Dsn6Parser._parse \"+this.name);var e,r,i=this.volume,n={},o=Nn(this.streamer.data),a=new Int16Array(o),s=new Uint8Array(o),c=String.fromCharCode.apply(null,s.subarray(0,512));if(c.startsWith(\":-)\"))n.xStart=parseInt(c.substr(10,5)),n.yStart=parseInt(c.substr(15,5)),n.zStart=parseInt(c.substr(20,5)),n.xExtent=parseInt(c.substr(32,5)),n.yExtent=parseInt(c.substr(38,5)),n.zExtent=parseInt(c.substr(42,5)),n.xRate=parseInt(c.substr(52,5)),n.yRate=parseInt(c.substr(58,5)),n.zRate=parseInt(c.substr(62,5)),n.xlen=parseFloat(c.substr(73,10))*this.voxelSize,n.ylen=parseFloat(c.substr(83,10))*this.voxelSize,n.zlen=parseFloat(c.substr(93,10))*this.voxelSize,n.alpha=parseFloat(c.substr(103,10)),n.beta=parseFloat(c.substr(113,10)),n.gamma=parseFloat(c.substr(123,10)),e=parseFloat(c.substr(138,12))/100,r=parseInt(c.substr(155,8)),n.sigma=100*parseFloat(c.substr(170,12));else{if(100!==a[18])for(var u=0,h=a.length;u>8&255}n.xStart=a[0],n.yStart=a[1],n.zStart=a[2],n.xExtent=a[3],n.yExtent=a[4],n.zExtent=a[5],n.xRate=a[6],n.yRate=a[7],n.zRate=a[8];var p=1/a[17],d=p*this.voxelSize;n.xlen=a[9]*d,n.ylen=a[10]*d,n.zlen=a[11]*d,n.alpha=a[12]*p,n.beta=a[13]*p,n.gamma=a[14]*p,e=a[15]/100,r=a[16],n.gamma=a[14]*p}i.header=n,t.Debug&&jf.log(n,e,r);for(var f=new Float32Array(n.xExtent*n.yExtent*n.zExtent),m=512,g=Math.ceil(n.xExtent/8),v=Math.ceil(n.yExtent/8),y=Math.ceil(n.zExtent/8),b=0;ba){var n=r[i].trim();if(\"\"!==n)for(var o=n.split(PS),l=0,p=o.length;l=a&&(g-a)%f!=0&&m=0?r-1:r+e/3)},parseNormalIndex:function(t,e){var r=parseInt(t,10);return 3*(r>=0?r-1:r+e/3)},addVertex:function(t,e,r){var i=this.vertices,n=this.object.geometry.vertices;n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2]),n.push(i[r+0]),n.push(i[r+1]),n.push(i[r+2])},addVertexLine:function(t){var e=this.vertices,r=this.object.geometry.vertices;r.push(e[t+0]),r.push(e[t+1]),r.push(e[t+2])},addNormal:function(t,e,r){var i=this.normals,n=this.object.geometry.normals;n.push(i[t+0]),n.push(i[t+1]),n.push(i[t+2]),n.push(i[e+0]),n.push(i[e+1]),n.push(i[e+2]),n.push(i[r+0]),n.push(i[r+1]),n.push(i[r+2])},addFace:function(t,e,r,i,n,o,a,s){var c,u=this.vertices.length,h=this.parseVertexIndex(t,u),l=this.parseVertexIndex(e,u),p=this.parseVertexIndex(r,u);if(void 0===i?this.addVertex(h,l,p):(c=this.parseVertexIndex(i,u),this.addVertex(h,l,c),this.addVertex(l,p,c)),void 0!==n){var d=this.normals.length;h=this.parseNormalIndex(n,d),l=n===o?h:this.parseNormalIndex(o,d),p=n===a?h:this.parseNormalIndex(a,d),void 0===i?this.addNormal(h,l,p):(c=this.parseNormalIndex(s,d),this.addNormal(h,l,c),this.addNormal(l,p,c))}},addLineGeometry:function(t){var e=this;this.object.geometry.type=\"Line\";for(var r=this.vertices.length,i=0,n=t.length;i0?x.addAttribute(\"normal\",new St(new Float32Array(b.normals),3)):x.computeVertexNormals(),y.push(x)}}return y}};var NS=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={type:{}};return r.type.get=function(){return\"obj\"},e.prototype.getLoader=function(){return new su},Object.defineProperties(e.prototype,r),e}(DS);qf.add(\"obj\",NS),cu.prototype={constructor:cu,setPropertyNameMapping:function(t){this.propertyNameMapping=t},bin2str:function(t){for(var e=new Uint8Array(t),r=\"\",i=0;i=n.elements[s].count&&(s++,c=0);var l=r.parseASCIIElement(n.elements[s].properties,h);r.handleElement(i,n.elements[s].name,l),c++}}return this.postProcess(i)},postProcess:function(t){if(t.useColor){for(var e=0;e0&&(a[C]=I)}else{var R=T.getElementsByTagName(\"clash\"),L=T.getElementsByTagName(\"mog-bond-outlier\"),O=T.getElementsByTagName(\"mog-angle-outlier\");if(L.length>0||O.length>0||R.length>0){var D={};s[C]=D;for(var N=0,k=R.length;N>>1:t>>>1;e[r]=t}return e}(),JS=30,tA=12,eA=15,rA=852,iA=592,nA=0,oA=1,aA=2,sA=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],cA=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],uA=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],hA=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],lA=0,pA=1,dA=2,fA=4,mA=5,gA=6,vA=0,yA=1,bA=2,xA=-2,_A=-3,wA=-4,SA=-5,AA=8,MA=1,EA=2,TA=3,PA=4,CA=5,IA=6,RA=7,LA=8,OA=9,DA=10,NA=11,kA=12,FA=13,BA=14,zA=15,UA=16,jA=17,GA=18,VA=19,$A=20,HA=21,WA=22,XA=23,qA=24,YA=25,ZA=26,KA=27,QA=28,JA=29,tM=30,eM=31,rM=32,iM=852,nM=592,oM=!0,aM=!0,sM=!0;try{String.fromCharCode.apply(null,[0])}catch(t){aM=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){sM=!1}for(var cM=new Uint8Array(256),uM=0;uM<256;uM++)cM[uM]=uM>=252?6:uM>=248?5:uM>=240?4:uM>=224?3:uM>=192?2:1;cM[254]=cM[254]=1;var hM=0,lM={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"},pM=Object.prototype.toString;Vu.prototype.push=function(t,e){var r,i,n,o,a,s,c=this,u=this.strm,h=this.options.chunkSize,l=this.options.dictionary,p=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,\"string\"==typeof t?u.input=Bu(t):\"[object ArrayBuffer]\"===pM.call(t)?u.input=new Uint8Array(t):u.input=t,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new Uint8Array(h),u.next_out=0,u.avail_out=h),2===(r=Lu(u,0))&&l&&(s=\"string\"==typeof l?ku(l):\"[object ArrayBuffer]\"===pM.call(l)?new Uint8Array(l):l,r=Nu(c.strm,s)),-5===r&&!0===p&&(r=hM,p=!1),1!==r&&r!==hM)return c.onEnd(r),c.ended=!0,!1;u.next_out&&(0!==u.avail_out&&1!==r&&(0!==u.avail_in||4!==i&&2!==i)||(\"string\"===c.options.to?(n=Uu(u.output,u.next_out),o=u.next_out-n,a=zu(u.output,n),u.next_out=o,u.avail_out=h-o,o&&yu(u.output,u.output,n,o,0),c.onData(a)):c.onData(vu(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(p=!0)}while((u.avail_in>0||0===u.avail_out)&&1!==r);return 1===r&&(i=4),4===i?(r=Ou(this.strm),this.onEnd(r),this.ended=!0,r===hM):2!==i||(this.onEnd(hM),u.avail_out=0,!0)},Vu.prototype.onData=function(t){this.chunks.push(t)},Vu.prototype.onEnd=function(t){t===hM&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=bu(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},Zf.add(\"gz\",Hu);var dM=function(){};dM.prototype.getUrl=function(t){},dM.prototype.getExt=function(t){};var fM=\"//mmtf.rcsb.org/v1.0/full/\",mM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e,r=wn(t),i=r.name.substr(0,4);return![\"pdb\",\"cif\"].includes(r.ext)||!1!==r.compressed&&\"gz\"!==r.compressed?\"mmtf\"===r.ext?e=r.base.endsWith(\".bb\")?\"//mmtf.rcsb.org/v1.0/reduced/\"+i:fM+i:r.ext?(jf.warn(\"unsupported ext\",r.ext),e=fM+i):e=fM+i:e=\"//files.rcsb.org/download/\"+r.path,yn()+e},e.prototype.getExt=function(t){var e=wn(t);if(\"mmtf\"===e.ext||!e.ext)return\"mmtf\"},e}(dM);Wf.add(\"rcsb\",new mM);var gM=\"//pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/\",vM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e,r=wn(t),i=r.name;return r.ext&&\"sdf\"!==r.ext?(jf.warn(\"unsupported ext\",r.ext),e=gM+i+\"/SDF?record_type=3d\"):e=gM+i+\"/SDF?record_type=3d\",yn()+e},e.prototype.getExt=function(t){var e=wn(t);if(!e.ext||\"sdf\"===e.ext)return\"sdf\"},e}(dM);Wf.add(\"pubchem\",new vM);var yM=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){return t},e}(dM);Wf.add(\"ftp\",new yM),Wf.add(\"http\",new yM),Wf.add(\"https\",new yM);var bM=/^((http|https|ftp):)*\\/\\//,xM=function(t){function e(e){t.call(this),this.baseUrl=e||\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUrl=function(t){var e=wn(t),r=this.baseUrl+e.path;return bM.test(this.baseUrl)||(r=xn(r)),r},e}(dM),_M=function(t){function e(e){t.call(this),this.baseUrl=e||\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getListing=function(t){t=t||\"\";var e=this.baseUrl+\"dir/\"+t;return\"/\"!==e[e.length-1]&&(e+=\"/\"),Mo(e,{ext:\"json\"}).then(function(e){return{path:t,data:e.data}})},e.prototype.getUrl=function(t){var e=wn(t);return this.baseUrl+\"file/\"+e.path},e.prototype.getCountUrl=function(t){var e=wn(t);return this.baseUrl+\"traj/numframes/\"+e.path},e.prototype.getFrameUrl=function(t,e){var r=wn(t);return this.baseUrl+\"traj/frame/\"+e+\"/\"+r.path},e.prototype.getFrameParams=function(t,e){return\"atomIndices=\"+e.join(\";\")},e.prototype.getPathUrl=function(t,e){var r=wn(t);return this.baseUrl+\"traj/path/\"+e+\"/\"+r.path},e}(dM);\"undefined\"==typeof window||window.Promise||(window.Promise=i),t.Version=\"0.10.5-19\",t.setDebug=So,t.ScriptExtensions=Vf,t.DatasourceRegistry=Wf,t.DecompressorRegistry=Zf,t.StaticDatasource=xM,t.MdsrvDatasource=_M,t.ParserRegistry=qf,t.autoLoad=Mo,t.RepresentationRegistry=Xf,t.ColormakerRegistry=Hf,t.Colormaker=pf,t.Selection=Cf,t.PdbWriter=fm,t.SdfWriter=mm,t.StlWriter=ym,t.Stage=qb,t.Collection=$b,t.ComponentCollection=Hb,t.RepresentationCollection=Wb,t.Assembly=gy,t.TrajectoryPlayer=Vy,t.superpose=Vs,t.guessElement=Ss,t.flatten=vn,t.Queue=Ds,t.Counter=bm,t.throttle=Sn,t.download=_n,t.getQuery=mn,t.getDataInfo=Ao,t.getFileInfo=wn,t.uniqueArray=Cn,t.BufferRepresentation=rb,t.ArrowBuffer=I_,t.BoxBuffer=k_,t.ConeBuffer=P_,t.CylinderBuffer=Nb,t.EllipsoidBuffer=G_,t.OctahedronBuffer=X_,t.SphereBuffer=yb,t.TetrahedronBuffer=Q_,t.TextBuffer=Kx,t.TorusBuffer=iw,t.Shape=Jy,t.Structure=Uy,t.Kdtree=ls,t.SpatialHash=Ya,t.MolecularSurface=u_,t.Volume=iy,t.LeftMouseButton=1,t.MiddleMouseButton=2,t.RightMouseButton=3,t.MouseActions=_g,t.KeyActions=Ag,t.Signal=no,t.Matrix3=ut,t.Matrix4=v,t.Vector2=l,t.Vector3=g,t.Box3=st,t.Quaternion=m,t.Euler=ft,t.Plane=ht,t.Color=tt,Object.defineProperty(t,\"__esModule\",{value:!0})});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ngl/dist/ngl.js\n// module id = 3\n// module chunks = 0","var apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\nexports.setImmediate = setImmediate;\nexports.clearImmediate = clearImmediate;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/timers-browserify/main.js\n// module id = 4\n// module chunks = 0","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a