NtopngGlobe/public/react-globe.js

21 lines
1022 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Version 2.20.2 react-globe.gl - https://github.com/vasturiano/react-globe.gl
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Globe=t(e.React)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(e,t){var n=new Set(t);return Object.assign.apply(Object,[{}].concat(i(Object.entries(e).filter((function(e){var t=r(e,1)[0];return!n.has(t)})).map((function(e){var t=r(e,2);return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t[0],t[1])})))))};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l=function(e){return[...e].reduce(((e,[t,n])=>(e[t]=n,e)),{})};function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const p="137",m={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},g=0,v=1,y=2,x=3,b=100,_=301,w=302,M=306,S=1e3,E=1001,T=1002,C=1003,R=1006,P=1008,L=1009,q=1012,D=1014,I=1015,O=1016,B=1020,k=1023,N=1026,z=1027,U=33776,F=33777,H=33778,G=33779,V=2300,j=2301,W=2302,Q=2400,Y=2401,X=2402,Z=2500,J=3e3,K=3001,$=7680,ee=35044,te=35048,ne="300 es",re=1035;class ie{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const oe=[];for(let e=0;e<256;e++)oe[e]=(e<16?"0":"")+e.toString(16);let ae=1234567;const se=Math.PI/180,Ae=180/Math.PI;function le(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(oe[255&e]+oe[e>>8&255]+oe[e>>16&255]+oe[e>>24&255]+"-"+oe[255&t]+oe[t>>8&255]+"-"+oe[t>>16&15|64]+oe[t>>24&255]+"-"+oe[63&n|128]+oe[n>>8&255]+"-"+oe[n>>16&255]+oe[n>>24&255]+oe[255&r]+oe[r>>8&255]+oe[r>>16&255]+oe[r>>24&255]).toUpperCase()}function ce(e,t,n){return Math.max(t,Math.min(n,e))}function ue(e,t){return(e%t+t)%t}function he(e,t,n){return(1-n)*e+n*t}function de(e){return 0==(e&e-1)&&0!==e}function fe(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var pe=Object.freeze({__proto__:null,DEG2RAD:se,RAD2DEG:Ae,generateUUID:le,clamp:ce,euclideanModulo:ue,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:he,damp:function(e,t,n,r){return he(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(ue(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){return void 0!==e&&(ae=e%2147483647),ae=16807*ae%2147483647,(ae-1)/2147483646},degToRad:function(e){return e*se},radToDeg:function(e){return e*Ae},isPowerOfTwo:de,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:fe,setQuaternionFromProperEuler:function(e,t,n,r,i){const o=Math.cos,a=Math.sin,s=o(n/2),A=a(n/2),l=o((t+r)/2),c=a((t+r)/2),u=o((t-r)/2),h=a((t-r)/2),d=o((r-t)/2),f=a((r-t)/2);switch(i){case"XYX":e.set(s*c,A*u,A*h,s*l);break;case"YZY":e.set(A*h,s*c,A*u,s*l);break;case"ZXZ":e.set(A*u,A*h,s*c,s*l);break;case"XZX":e.set(s*c,A*f,A*d,s*l);break;case"YXY":e.set(A*d,s*c,A*f,s*l);break;case"ZYZ":e.set(A*f,A*d,s*c,s*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}});class me{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}me.prototype.isVector2=!0;class ge{constructor(){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.")}set(e,t,n,r,i,o,a,s,A){const l=this.elements;return l[0]=e,l[1]=r,l[2]=a,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=o,l[8]=A,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],A=n[1],l=n[4],c=n[7],u=n[2],h=n[5],d=n[8],f=r[0],p=r[3],m=r[6],g=r[1],v=r[4],y=r[7],x=r[2],b=r[5],_=r[8];return i[0]=o*f+a*g+s*x,i[3]=o*p+a*v+s*b,i[6]=o*m+a*y+s*_,i[1]=A*f+l*g+c*x,i[4]=A*p+l*v+c*b,i[7]=A*m+l*y+c*_,i[2]=u*f+h*g+d*x,i[5]=u*p+h*v+d*b,i[8]=u*m+h*y+d*_,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],A=e[7],l=e[8];return t*o*l-t*a*A-n*i*l+n*a*s+r*i*A-r*o*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],A=e[7],l=e[8],c=l*o-a*A,u=a*s-l*i,h=A*i-o*s,d=t*c+n*u+r*h;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const f=1/d;return e[0]=c*f,e[1]=(r*A-l*n)*f,e[2]=(a*n-r*o)*f,e[3]=u*f,e[4]=(l*t-r*s)*f,e[5]=(r*i-a*t)*f,e[6]=h*f,e[7]=(n*s-A*t)*f,e[8]=(o*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,a){const s=Math.cos(i),A=Math.sin(i);return this.set(n*s,n*A,-n*(s*o+A*a)+o+e,-r*A,r*s,-r*(-A*o+s*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],A=r[4],l=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*A,r[6]=t*a+n*l,r[1]=-n*i+t*s,r[4]=-n*o+t*A,r[7]=-n*a+t*l,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}function ve(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}function ye(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}ge.prototype.isMatrix3=!0;const xe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},be={h:0,s:0,l:0},_e={h:0,s:0,l:0};function we(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Me(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Se(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Ee{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=ue(e,1),t=ce(t,0,1),n=ce(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=we(i,r,e+1/3),this.g=we(i,r,e),this.b=we(i,r,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const r=n[1],i=n[2];switch(r){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i)){const n=parseFloat(e[1])/360,r=parseInt(e[2],10)/100,i=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(n,r,i)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=n[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=xe[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Me(e.r),this.g=Me(e.g),this.b=Me(e.b),this}copyLinearToSRGB(e){return this.r=Se(e.r),this.g=Se(e.g),this.b=Se(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),o=Math.min(t,n,r);let a,s;const A=(o+i)/2;if(o===i)a=0,s=0;else{const e=i-o;switch(s=A<=.5?e/(i+o):e/(2-i-o),i){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return e.h=a,e.s=s,e.l=A,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(be),be.h+=e,be.s+=t,be.l+=n,this.setHSL(be.h,be.s,be.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(be),e.getHSL(_e);const n=he(be.h,_e.h,t),r=he(be.s,_e.s,t),i=he(be.l,_e.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}let Te;Ee.NAMES=xe,Ee.prototype.isColor=!0,Ee.prototype.r=1,Ee.prototype.g=1,Ee.prototype.b=1;class Ce{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Te&&(Te=ye("canvas")),Te.width=e.width,Te.height=e.height;const n=Te.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Te}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=ye("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*Me(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Me(t[e]/255)):t[e]=Me(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let Re=0;class Pe extends ie{constructor(e=Pe.DEFAULT_IMAGE,t=Pe.DEFAULT_MAPPING,n=1001,r=1001,i=1006,o=1008,a=1023,s=1009,A=1,l=3e3){super(),Object.defineProperty(this,"id",{value:Re++}),this.uuid=le(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=A,this.format=a,this.internalFormat=null,this.type=s,this.offset=new me(0,0),this.repeat=new me(1,1),this.center=new me(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ge,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=l,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const r=this.image;if(void 0===r.uuid&&(r.uuid=le()),!t&&void 0===e.images[r.uuid]){let t;if(Array.isArray(r)){t=[];for(let e=0,n=r.length;e<n;e++)r[e].isDataTexture?t.push(Le(r[e].image)):t.push(Le(r[e]))}else t=Le(r);e.images[r.uuid]={uuid:r.uuid,url:t}}n.image=r.uuid}return"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case S:e.x=e.x-Math.floor(e.x);break;case E:e.x=e.x<0?0:1;break;case T:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case S:e.y=e.y-Math.floor(e.y);break;case E:e.y=e.y<0?0:1;break;case T:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&this.version++}}function Le(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?Ce.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Pe.DEFAULT_IMAGE=void 0,Pe.DEFAULT_MAPPING=300,Pe.prototype.isTexture=!0;class qe{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=.01,a=.1,s=e.elements,A=s[0],l=s[4],c=s[8],u=s[1],h=s[5],d=s[9],f=s[2],p=s[6],m=s[10];if(Math.abs(l-u)<o&&Math.abs(c-f)<o&&Math.abs(d-p)<o){if(Math.abs(l+u)<a&&Math.abs(c+f)<a&&Math.abs(d+p)<a&&Math.abs(A+h+m-3)<a)return this.set(1,0,0,0),this;t=Math.PI;const e=(A+1)/2,s=(h+1)/2,g=(m+1)/2,v=(l+u)/4,y=(c+f)/4,x=(d+p)/4;return e>s&&e>g?e<o?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=v/n,i=y/n):s>g?s<o?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=v/r,i=x/r):g<o?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(g),n=y/i,r=x/i),this.set(n,r,i,t),this}let g=Math.sqrt((p-d)*(p-d)+(c-f)*(c-f)+(u-l)*(u-l));return Math.abs(g)<.001&&(g=1),this.x=(p-d)/g,this.y=(c-f)/g,this.z=(u-l)/g,this.w=Math.acos((A+h+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}qe.prototype.isVector4=!0;class De extends ie{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new qe(0,0,e,t),this.scissorTest=!1,this.viewport=new qe(0,0,e,t),this.texture=new Pe(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:R,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=Object.assign({},e.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}De.prototype.isWebGLRenderTarget=!0;(class extends De{constructor(e,t,n){super(e,t);const r=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=r.clone()}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}).prototype.isWebGLMultipleRenderTargets=!0;class Ie extends De{constructor(e,t,n={}){super(e,t,n),this.samples=4,this.ignoreDepthForMultisampleCopy=void 0===n.ignoreDepth||n.ignoreDepth,this.useRenderToTexture=void 0!==n.useRenderToTexture&&n.useRenderToTexture,this.useRenderbuffer=!1===this.useRenderToTexture}copy(e){return super.copy.call(this,e),this.samples=e.samples,this.useRenderToTexture=e.useRenderToTexture,this.useRenderbuffer=e.useRenderbuffer,this}}Ie.prototype.isWebGLMultisampleRenderTarget=!0;class Oe{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,a){let s=n[r+0],A=n[r+1],l=n[r+2],c=n[r+3];const u=i[o+0],h=i[o+1],d=i[o+2],f=i[o+3];if(0===a)return e[t+0]=s,e[t+1]=A,e[t+2]=l,void(e[t+3]=c);if(1===a)return e[t+0]=u,e[t+1]=h,e[t+2]=d,void(e[t+3]=f);if(c!==f||s!==u||A!==h||l!==d){let e=1-a;const t=s*u+A*h+l*d+c*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*e+u*i,A=A*e+h*i,l=l*e+d*i,c=c*e+f*i,e===1-a){const e=1/Math.sqrt(s*s+A*A+l*l+c*c);s*=e,A*=e,l*=e,c*=e}}e[t]=s,e[t+1]=A,e[t+2]=l,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,o){const a=n[r],s=n[r+1],A=n[r+2],l=n[r+3],c=i[o],u=i[o+1],h=i[o+2],d=i[o+3];return e[t]=a*d+l*c+s*h-A*u,e[t+1]=s*d+l*u+A*c-a*h,e[t+2]=A*d+l*h+a*u-s*c,e[t+3]=l*d-a*c-s*u-A*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,A=a(n/2),l=a(r/2),c=a(i/2),u=s(n/2),h=s(r/2),d=s(i/2);switch(o){case"XYZ":this._x=u*l*c+A*h*d,this._y=A*h*c-u*l*d,this._z=A*l*d+u*h*c,this._w=A*l*c-u*h*d;break;case"YXZ":this._x=u*l*c+A*h*d,this._y=A*h*c-u*l*d,this._z=A*l*d-u*h*c,this._w=A*l*c+u*h*d;break;case"ZXY":this._x=u*l*c-A*h*d,this._y=A*h*c+u*l*d,this._z=A*l*d+u*h*c,this._w=A*l*c-u*h*d;break;case"ZYX":this._x=u*l*c-A*h*d,this._y=A*h*c+u*l*d,this._z=A*l*d-u*h*c,this._w=A*l*c+u*h*d;break;case"YZX":this._x=u*l*c+A*h*d,this._y=A*h*c+u*l*d,this._z=A*l*d-u*h*c,this._w=A*l*c-u*h*d;break;case"XZY":this._x=u*l*c-A*h*d,this._y=A*h*c-u*l*d,this._z=A*l*d+u*h*c,this._w=A*l*c+u*h*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],A=t[2],l=t[6],c=t[10],u=n+a+c;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-A)*e,this._z=(o-r)*e}else if(n>a&&n>c){const e=2*Math.sqrt(1+n-a-c);this._w=(l-s)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+A)/e}else if(a>c){const e=2*Math.sqrt(1+a-n-c);this._w=(i-A)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(s+l)/e}else{const e=2*Math.sqrt(1+c-n-a);this._w=(o-r)/e,this._x=(i+A)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ce(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,A=t._z,l=t._w;return this._x=n*l+o*a+r*A-i*s,this._y=r*l+o*s+i*a-n*A,this._z=i*l+o*A+n*s-r*a,this._w=o*l-n*a-r*s-i*A,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const s=1-a*a;if(s<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const A=Math.sqrt(s),l=Math.atan2(A,a),c=Math.sin((1-t)*l)/A,u=Math.sin(t*l)/A;return this._w=o*c+this._w*u,this._x=n*c+this._x*u,this._y=r*c+this._y*u,this._z=i*c+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}Oe.prototype.isQuaternion=!0;class Be{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Ne.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Ne.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,A=s*t+o*r-a*n,l=s*n+a*t-i*r,c=s*r+i*n-o*t,u=-i*t-o*n-a*r;return this.x=A*s+u*-i+l*-a-c*-o,this.y=l*s+u*-o+c*-i-A*-a,this.z=c*s+u*-a+A*-o-l*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ke.copy(this).projectOnVector(e),this.sub(ke)}reflect(e){return this.sub(ke.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ce(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}Be.prototype.isVector3=!0;const ke=new Be,Ne=new Oe;class ze{constructor(e=new Be(1/0,1/0,1/0),t=new Be(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,A=e.length;s<A;s+=3){const A=e[s],l=e[s+1],c=e[s+2];A<t&&(t=A),l<n&&(n=l),c<r&&(r=c),A>i&&(i=A),l>o&&(o=l),c>a&&(a=c)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,A=e.count;s<A;s++){const A=e.getX(s),l=e.getY(s),c=e.getZ(s);A<t&&(t=A),l<n&&(n=l),c<r&&(r=c),A>i&&(i=A),l>o&&(o=l),c>a&&(a=c)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Fe.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n)if(t&&null!=n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,r=t.count;n<r;n++)Fe.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(Fe)}else null===n.boundingBox&&n.computeBoundingBox(),He.copy(n.boundingBox),He.applyMatrix4(e.matrixWorld),this.union(He);const r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Fe),Fe.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Xe),Ze.subVectors(this.max,Xe),Ge.subVectors(e.a,Xe),Ve.subVectors(e.b,Xe),je.subVectors(e.c,Xe),We.subVectors(Ve,Ge),Qe.subVectors(je,Ve),Ye.subVectors(Ge,je);let t=[0,-We.z,We.y,0,-Qe.z,Qe.y,0,-Ye.z,Ye.y,We.z,0,-We.x,Qe.z,0,-Qe.x,Ye.z,0,-Ye.x,-We.y,We.x,0,-Qe.y,Qe.x,0,-Ye.y,Ye.x,0];return!!$e(t,Ge,Ve,je,Ze)&&(t=[1,0,0,0,1,0,0,0,1],!!$e(t,Ge,Ve,je,Ze)&&(Je.crossVectors(We,Qe),t=[Je.x,Je.y,Je.z],$e(t,Ge,Ve,je,Ze)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Fe.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(Fe).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(Ue[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ue[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ue[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ue[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ue[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ue[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ue[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ue[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ue)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}ze.prototype.isBox3=!0;const Ue=[new Be,new Be,new Be,new Be,new Be,new Be,new Be,new Be],Fe=new Be,He=new ze,Ge=new Be,Ve=new Be,je=new Be,We=new Be,Qe=new Be,Ye=new Be,Xe=new Be,Ze=new Be,Je=new Be,Ke=new Be;function $e(e,t,n,r,i){for(let o=0,a=e.length-3;o<=a;o+=3){Ke.fromArray(e,o);const a=i.x*Math.abs(Ke.x)+i.y*Math.abs(Ke.y)+i.z*Math.abs(Ke.z),s=t.dot(Ke),A=n.dot(Ke),l=r.dot(Ke);if(Math.max(-Math.max(s,A,l),Math.min(s,A,l))>a)return!1}return!0}const et=new ze,tt=new Be,nt=new Be,rt=new Be;class it{constructor(e=new Be,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):et.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){rt.subVectors(e,this.center);const t=rt.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(rt.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return!0===this.center.equals(e.center)?nt.set(0,0,1).multiplyScalar(e.radius):nt.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(tt.copy(e.center).add(nt)),this.expandByPoint(tt.copy(e.center).sub(nt)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ot=new Be,at=new Be,st=new Be,At=new Be,lt=new Be,ct=new Be,ut=new Be;class ht{constructor(e=new Be,t=new Be(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ot)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ot.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ot.copy(this.direction).multiplyScalar(t).add(this.origin),ot.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){at.copy(e).add(t).multiplyScalar(.5),st.copy(t).sub(e).normalize(),At.copy(this.origin).sub(at);const i=.5*e.distanceTo(t),o=-this.direction.dot(st),a=At.dot(this.direction),s=-At.dot(st),A=At.lengthSq(),l=Math.abs(1-o*o);let c,u,h,d;if(l>0)if(c=o*s-a,u=o*a-s,d=i*l,c>=0)if(u>=-d)if(u<=d){const e=1/l;c*=e,u*=e,h=c*(c+o*u+2*a)+u*(o*c+u+2*s)+A}else u=i,c=Math.max(0,-(o*u+a)),h=-c*c+u*(u+2*s)+A;else u=-i,c=Math.max(0,-(o*u+a)),h=-c*c+u*(u+2*s)+A;else u<=-d?(c=Math.max(0,-(-o*i+a)),u=c>0?-i:Math.min(Math.max(-i,-s),i),h=-c*c+u*(u+2*s)+A):u<=d?(c=0,u=Math.min(Math.max(-i,-s),i),h=u*(u+2*s)+A):(c=Math.max(0,-(o*i+a)),u=c>0?i:Math.min(Math.max(-i,-s),i),h=-c*c+u*(u+2*s)+A);else u=o>0?-i:i,c=Math.max(0,-(o*u+a)),h=-c*c+u*(u+2*s)+A;return n&&n.copy(this.direction).multiplyScalar(c).add(this.origin),r&&r.copy(st).multiplyScalar(u).add(at),h}intersectSphere(e,t){ot.subVectors(e.center,this.origin);const n=ot.dot(this.direction),r=ot.dot(ot)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,a,s;const A=1/this.direction.x,l=1/this.direction.y,c=1/this.direction.z,u=this.origin;return A>=0?(n=(e.min.x-u.x)*A,r=(e.max.x-u.x)*A):(n=(e.max.x-u.x)*A,r=(e.min.x-u.x)*A),l>=0?(i=(e.min.y-u.y)*l,o=(e.max.y-u.y)*l):(i=(e.max.y-u.y)*l,o=(e.min.y-u.y)*l),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),c>=0?(a=(e.min.z-u.z)*c,s=(e.max.z-u.z)*c):(a=(e.max.z-u.z)*c,s=(e.min.z-u.z)*c),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,ot)}intersectTriangle(e,t,n,r,i){lt.subVectors(t,e),ct.subVectors(n,e),ut.crossVectors(lt,ct);let o,a=this.direction.dot(ut);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}At.subVectors(this.origin,e);const s=o*this.direction.dot(ct.crossVectors(At,ct));if(s<0)return null;const A=o*this.direction.dot(lt.cross(At));if(A<0)return null;if(s+A>a)return null;const l=-o*At.dot(ut);return l<0?null:this.at(l/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class dt{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,a,s,A,l,c,u,h,d,f,p){const m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=i,m[5]=o,m[9]=a,m[13]=s,m[2]=A,m[6]=l,m[10]=c,m[14]=u,m[3]=h,m[7]=d,m[11]=f,m[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new dt).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/ft.setFromMatrixColumn(e,0).length(),i=1/ft.setFromMatrixColumn(e,1).length(),o=1/ft.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),A=Math.sin(r),l=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){const e=o*l,n=o*c,r=a*l,i=a*c;t[0]=s*l,t[4]=-s*c,t[8]=A,t[1]=n+r*A,t[5]=e-i*A,t[9]=-a*s,t[2]=i-e*A,t[6]=r+n*A,t[10]=o*s}else if("YXZ"===e.order){const e=s*l,n=s*c,r=A*l,i=A*c;t[0]=e+i*a,t[4]=r*a-n,t[8]=o*A,t[1]=o*c,t[5]=o*l,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=o*s}else if("ZXY"===e.order){const e=s*l,n=s*c,r=A*l,i=A*c;t[0]=e-i*a,t[4]=-o*c,t[8]=r+n*a,t[1]=n+r*a,t[5]=o*l,t[9]=i-e*a,t[2]=-o*A,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){const e=o*l,n=o*c,r=a*l,i=a*c;t[0]=s*l,t[4]=r*A-n,t[8]=e*A+i,t[1]=s*c,t[5]=i*A+e,t[9]=n*A-r,t[2]=-A,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){const e=o*s,n=o*A,r=a*s,i=a*A;t[0]=s*l,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=o*l,t[9]=-a*l,t[2]=-A*l,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){const e=o*s,n=o*A,r=a*s,i=a*A;t[0]=s*l,t[4]=-c,t[8]=A*l,t[1]=e*c+i,t[5]=o*l,t[9]=n*c-r,t[2]=r*c-n,t[6]=a*l,t[10]=i*c+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(mt,e,gt)}lookAt(e,t,n){const r=this.elements;return xt.subVectors(e,t),0===xt.lengthSq()&&(xt.z=1),xt.normalize(),vt.crossVectors(n,xt),0===vt.lengthSq()&&(1===Math.abs(n.z)?xt.x+=1e-4:xt.z+=1e-4,xt.normalize(),vt.crossVectors(n,xt)),vt.normalize(),yt.crossVectors(xt,vt),r[0]=vt.x,r[4]=yt.x,r[8]=xt.x,r[1]=vt.y,r[5]=yt.y,r[9]=xt.y,r[2]=vt.z,r[6]=yt.z,r[10]=xt.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],A=n[12],l=n[1],c=n[5],u=n[9],h=n[13],d=n[2],f=n[6],p=n[10],m=n[14],g=n[3],v=n[7],y=n[11],x=n[15],b=r[0],_=r[4],w=r[8],M=r[12],S=r[1],E=r[5],T=r[9],C=r[13],R=r[2],P=r[6],L=r[10],q=r[14],D=r[3],I=r[7],O=r[11],B=r[15];return i[0]=o*b+a*S+s*R+A*D,i[4]=o*_+a*E+s*P+A*I,i[8]=o*w+a*T+s*L+A*O,i[12]=o*M+a*C+s*q+A*B,i[1]=l*b+c*S+u*R+h*D,i[5]=l*_+c*E+u*P+h*I,i[9]=l*w+c*T+u*L+h*O,i[13]=l*M+c*C+u*q+h*B,i[2]=d*b+f*S+p*R+m*D,i[6]=d*_+f*E+p*P+m*I,i[10]=d*w+f*T+p*L+m*O,i[14]=d*M+f*C+p*q+m*B,i[3]=g*b+v*S+y*R+x*D,i[7]=g*_+v*E+y*P+x*I,i[11]=g*w+v*T+y*L+x*O,i[15]=g*M+v*C+y*q+x*B,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],A=e[13],l=e[2],c=e[6],u=e[10],h=e[14];return e[3]*(+i*s*c-r*A*c-i*a*u+n*A*u+r*a*h-n*s*h)+e[7]*(+t*s*h-t*A*u+i*o*u-r*o*h+r*A*l-i*s*l)+e[11]*(+t*A*c-t*a*h-i*o*c+n*o*h+i*a*l-n*A*l)+e[15]*(-r*a*l-t*s*c+t*a*u+r*o*c-n*o*u+n*s*l)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],A=e[7],l=e[8],c=e[9],u=e[10],h=e[11],d=e[12],f=e[13],p=e[14],m=e[15],g=c*p*A-f*u*A+f*s*h-a*p*h-c*s*m+a*u*m,v=d*u*A-l*p*A-d*s*h+o*p*h+l*s*m-o*u*m,y=l*f*A-d*c*A+d*a*h-o*f*h-l*a*m+o*c*m,x=d*c*s-l*f*s-d*a*u+o*f*u+l*a*p-o*c*p,b=t*g+n*v+r*y+i*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/b;return e[0]=g*_,e[1]=(f*u*i-c*p*i-f*r*h+n*p*h+c*r*m-n*u*m)*_,e[2]=(a*p*i-f*s*i+f*r*A-n*p*A-a*r*m+n*s*m)*_,e[3]=(c*s*i-a*u*i-c*r*A+n*u*A+a*r*h-n*s*h)*_,e[4]=v*_,e[5]=(l*p*i-d*u*i+d*r*h-t*p*h-l*r*m+t*u*m)*_,e[6]=(d*s*i-o*p*i-d*r*A+t*p*A+o*r*m-t*s*m)*_,e[7]=(o*u*i-l*s*i+l*r*A-t*u*A-o*r*h+t*s*h)*_,e[8]=y*_,e[9]=(d*c*i-l*f*i-d*n*h+t*f*h+l*n*m-t*c*m)*_,e[10]=(o*f*i-d*a*i+d*n*A-t*f*A-o*n*m+t*a*m)*_,e[11]=(l*a*i-o*c*i-l*n*A+t*c*A+o*n*h-t*a*h)*_,e[12]=x*_,e[13]=(l*f*r-d*c*r+d*n*u-t*f*u-l*n*p+t*c*p)*_,e[14]=(d*a*r-o*f*r-d*n*s+t*f*s+o*n*p-t*a*p)*_,e[15]=(o*c*r-l*a*r+l*n*s-t*c*s-o*n*u+t*a*u)*_,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,A=i*o,l=i*a;return this.set(A*o+n,A*a-r*s,A*s+r*a,0,A*a+r*s,l*a+n,l*s-r*o,0,A*s-r*a,l*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,A=i+i,l=o+o,c=a+a,u=i*A,h=i*l,d=i*c,f=o*l,p=o*c,m=a*c,g=s*A,v=s*l,y=s*c,x=n.x,b=n.y,_=n.z;return r[0]=(1-(f+m))*x,r[1]=(h+y)*x,r[2]=(d-v)*x,r[3]=0,r[4]=(h-y)*b,r[5]=(1-(u+m))*b,r[6]=(p+g)*b,r[7]=0,r[8]=(d+v)*_,r[9]=(p-g)*_,r[10]=(1-(u+f))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=ft.set(r[0],r[1],r[2]).length();const o=ft.set(r[4],r[5],r[6]).length(),a=ft.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],pt.copy(this);const s=1/i,A=1/o,l=1/a;return pt.elements[0]*=s,pt.elements[1]*=s,pt.elements[2]*=s,pt.elements[4]*=A,pt.elements[5]*=A,pt.elements[6]*=A,pt.elements[8]*=l,pt.elements[9]*=l,pt.elements[10]*=l,t.setFromRotationMatrix(pt),n.x=i,n.y=o,n.z=a,this}makePerspective(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,s=2*i/(t-e),A=2*i/(n-r),l=(t+e)/(t-e),c=(n+r)/(n-r),u=-(o+i)/(o-i),h=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=l,a[12]=0,a[1]=0,a[5]=A,a[9]=c,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,o){const a=this.elements,s=1/(t-e),A=1/(n-r),l=1/(o-i),c=(t+e)*s,u=(n+r)*A,h=(o+i)*l;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-c,a[1]=0,a[5]=2*A,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*l,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}dt.prototype.isMatrix4=!0;const ft=new Be,pt=new dt,mt=new Be(0,0,0),gt=new Be(1,1,1),vt=new Be,yt=new Be,xt=new Be,bt=new dt,_t=new Oe;class wt{constructor(e=0,t=0,n=0,r=wt.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],o=r[4],a=r[8],s=r[1],A=r[5],l=r[9],c=r[2],u=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(ce(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-l,h),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(u,A),this._z=0);break;case"YXZ":this._x=Math.asin(-ce(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(s,A)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(ce(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-c,h),this._z=Math.atan2(-o,A)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-ce(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(u,h),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-o,A));break;case"YZX":this._z=Math.asin(ce(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,A),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-ce(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,A),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-l,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return bt.makeRotationFromQuaternion(e),this.setFromRotationMatrix(bt,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _t.setFromEuler(this),this.setFromQuaternion(_t,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new Be(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}wt.prototype.isEuler=!0,wt.DefaultOrder="XYZ",wt.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Mt{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let St=0;const Et=new Be,Tt=new Oe,Ct=new dt,Rt=new Be,Pt=new Be,Lt=new Be,qt=new Oe,Dt=new Be(1,0,0),It=new Be(0,1,0),Ot=new Be(0,0,1),Bt={type:"added"},kt={type:"removed"};class Nt extends ie{constructor(){super(),Object.defineProperty(this,"id",{value:St++}),this.uuid=le(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Nt.DefaultUp.clone();const e=new Be,t=new wt,n=new Oe,r=new Be(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new dt},normalMatrix:{value:new ge}}),this.matrix=new dt,this.matrixWorld=new dt,this.matrixAutoUpdate=Nt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Mt,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Tt.setFromAxisAngle(e,t),this.quaternion.multiply(Tt),this}rotateOnWorldAxis(e,t){return Tt.setFromAxisAngle(e,t),this.quaternion.premultiply(Tt),this}rotateX(e){return this.rotateOnAxis(Dt,e)}rotateY(e){return this.rotateOnAxis(It,e)}rotateZ(e){return this.rotateOnAxis(Ot,e)}translateOnAxis(e,t){return Et.copy(e).applyQuaternion(this.quaternion),this.position.add(Et.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Dt,e)}translateY(e){return this.translateOnAxis(It,e)}translateZ(e){return this.translateOnAxis(Ot,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(Ct.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Rt.copy(e):Rt.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Pt.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ct.lookAt(Pt,Rt,this.up):Ct.lookAt(Rt,Pt,this.up),this.quaternion.setFromRotationMatrix(Ct),r&&(Ct.extractRotation(r.matrixWorld),Tt.setFromRotationMatrix(Ct),this.quaternion.premultiply(Tt.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(Bt)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(kt)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(kt)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),Ct.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Ct.multiply(e.parent.matrixWorld)),e.applyMatrix4(Ct),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Pt,e,Lt),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Pt,qt,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),a=o(e.images),s=o(e.shapes),A=o(e.skeletons),l=o(e.animations);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),A.length>0&&(n.skeletons=A),l.length>0&&(n.animations=l)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}Nt.DefaultUp=new Be(0,1,0),Nt.DefaultMatrixAutoUpdate=!0,Nt.prototype.isObject3D=!0;const zt=new Be,Ut=new Be,Ft=new Be,Ht=new Be,Gt=new Be,Vt=new Be,jt=new Be,Wt=new Be,Qt=new Be,Yt=new Be;class Xt{constructor(e=new Be,t=new Be,n=new Be){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),zt.subVectors(e,t),r.cross(zt);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){zt.subVectors(r,t),Ut.subVectors(n,t),Ft.subVectors(e,t);const o=zt.dot(zt),a=zt.dot(Ut),s=zt.dot(Ft),A=Ut.dot(Ut),l=Ut.dot(Ft),c=o*A-a*a;if(0===c)return i.set(-2,-1,-1);const u=1/c,h=(A*s-a*l)*u,d=(o*l-a*s)*u;return i.set(1-h-d,d,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Ht),Ht.x>=0&&Ht.y>=0&&Ht.x+Ht.y<=1}static getUV(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,Ht),s.set(0,0),s.addScaledVector(i,Ht.x),s.addScaledVector(o,Ht.y),s.addScaledVector(a,Ht.z),s}static isFrontFacing(e,t,n,r){return zt.subVectors(n,t),Ut.subVectors(e,t),zt.cross(Ut).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return zt.subVectors(this.c,this.b),Ut.subVectors(this.a,this.b),.5*zt.cross(Ut).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Xt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Xt.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return Xt.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return Xt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Xt.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,a;Gt.subVectors(r,n),Vt.subVectors(i,n),Wt.subVectors(e,n);const s=Gt.dot(Wt),A=Vt.dot(Wt);if(s<=0&&A<=0)return t.copy(n);Qt.subVectors(e,r);const l=Gt.dot(Qt),c=Vt.dot(Qt);if(l>=0&&c<=l)return t.copy(r);const u=s*c-l*A;if(u<=0&&s>=0&&l<=0)return o=s/(s-l),t.copy(n).addScaledVector(Gt,o);Yt.subVectors(e,i);const h=Gt.dot(Yt),d=Vt.dot(Yt);if(d>=0&&h<=d)return t.copy(i);const f=h*A-s*d;if(f<=0&&A>=0&&d<=0)return a=A/(A-d),t.copy(n).addScaledVector(Vt,a);const p=l*d-h*c;if(p<=0&&c-l>=0&&h-d>=0)return jt.subVectors(i,r),a=(c-l)/(c-l+(h-d)),t.copy(r).addScaledVector(jt,a);const m=1/(p+f+u);return o=f*m,a=u*m,t.copy(n).addScaledVector(Gt,o).addScaledVector(Vt,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Zt=0;class Jt extends ie{constructor(){super(),Object.defineProperty(this,"id",{value:Zt++}),this.uuid=le(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=b,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=$,this.stencilZFail=$,this.stencilZPass=$,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}Jt.prototype.isMaterial=!0;class Kt extends Jt{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Ee(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}Kt.prototype.isMeshBasicMaterial=!0;const $t=new Be,en=new me;class tn{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=ee,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new Ee),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new me),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new Be),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new qe),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)en.fromBufferAttribute(this,t),en.applyMatrix3(e),this.setXY(t,en.x,en.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)$t.fromBufferAttribute(this,t),$t.applyMatrix3(e),this.setXYZ(t,$t.x,$t.y,$t.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)$t.x=this.getX(t),$t.y=this.getY(t),$t.z=this.getZ(t),$t.applyMatrix4(e),this.setXYZ(t,$t.x,$t.y,$t.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)$t.x=this.getX(t),$t.y=this.getY(t),$t.z=this.getZ(t),$t.applyNormalMatrix(e),this.setXYZ(t,$t.x,$t.y,$t.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)$t.x=this.getX(t),$t.y=this.getY(t),$t.z=this.getZ(t),$t.transformDirection(e),this.setXYZ(t,$t.x,$t.y,$t.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==ee&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}tn.prototype.isBufferAttribute=!0;class nn extends tn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class rn extends tn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}(class extends tn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}).prototype.isFloat16BufferAttribute=!0;class on extends tn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let an=0;const sn=new dt,An=new Nt,ln=new Be,cn=new ze,un=new ze,hn=new Be;class dn extends ie{constructor(){super(),Object.defineProperty(this,"id",{value:an++}),this.uuid=le(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(ve(e)?rn:nn)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new ge).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return sn.makeRotationFromQuaternion(e),this.applyMatrix4(sn),this}rotateX(e){return sn.makeRotationX(e),this.applyMatrix4(sn),this}rotateY(e){return sn.makeRotationY(e),this.applyMatrix4(sn),this}rotateZ(e){return sn.makeRotationZ(e),this.applyMatrix4(sn),this}translate(e,t,n){return sn.makeTranslation(e,t,n),this.applyMatrix4(sn),this}scale(e,t,n){return sn.makeScale(e,t,n),this.applyMatrix4(sn),this}lookAt(e){return An.lookAt(e),An.updateMatrix(),this.applyMatrix4(An.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ln).negate(),this.translate(ln.x,ln.y,ln.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new on(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new ze);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new Be(-1/0,-1/0,-1/0),new Be(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];cn.setFromBufferAttribute(n),this.morphTargetsRelative?(hn.addVectors(this.boundingBox.min,cn.min),this.boundingBox.expandByPoint(hn),hn.addVectors(this.boundingBox.max,cn.max),this.boundingBox.expandByPoint(hn)):(this.boundingBox.expandByPoint(cn.min),this.boundingBox.expandByPoint(cn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new it);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new Be,1/0);if(e){const n=this.boundingSphere.center;if(cn.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];un.setFromBufferAttribute(n),this.morphTargetsRelative?(hn.addVectors(cn.min,un.min),cn.expandByPoint(hn),hn.addVectors(cn.max,un.max),cn.expandByPoint(hn)):(cn.expandByPoint(un.min),cn.expandByPoint(un.max))}cn.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)hn.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(hn));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],a=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)hn.fromBufferAttribute(o,t),a&&(ln.fromBufferAttribute(e,t),hn.add(ln)),r=Math.max(r,n.distanceToSquared(hn))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new tn(new Float32Array(4*a),4));const s=t.tangent.array,A=[],l=[];for(let e=0;e<a;e++)A[e]=new Be,l[e]=new Be;const c=new Be,u=new Be,h=new Be,d=new me,f=new me,p=new me,m=new Be,g=new Be;function v(e,t,n){c.fromArray(r,3*e),u.fromArray(r,3*t),h.fromArray(r,3*n),d.fromArray(o,2*e),f.fromArray(o,2*t),p.fromArray(o,2*n),u.sub(c),h.sub(c),f.sub(d),p.sub(d);const i=1/(f.x*p.y-p.x*f.y);isFinite(i)&&(m.copy(u).multiplyScalar(p.y).addScaledVector(h,-f.y).multiplyScalar(i),g.copy(h).multiplyScalar(f.x).addScaledVector(u,-p.x).multiplyScalar(i),A[e].add(m),A[t].add(m),A[n].add(m),l[e].add(g),l[t].add(g),l[n].add(g))}let y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(let e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)v(n[e+0],n[e+1],n[e+2])}const x=new Be,b=new Be,_=new Be,w=new Be;function M(e){_.fromArray(i,3*e),w.copy(_);const t=A[e];x.copy(t),x.sub(_.multiplyScalar(_.dot(t))).normalize(),b.crossVectors(w,t);const n=b.dot(l[e])<0?-1:1;s[4*e]=x.x,s[4*e+1]=x.y,s[4*e+2]=x.z,s[4*e+3]=n}for(let e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)M(n[e+0]),M(n[e+1]),M(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new tn(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new Be,i=new Be,o=new Be,a=new Be,s=new Be,A=new Be,l=new Be,c=new Be;if(e)for(let u=0,h=e.count;u<h;u+=3){const h=e.getX(u+0),d=e.getX(u+1),f=e.getX(u+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,d),o.fromBufferAttribute(t,f),l.subVectors(o,i),c.subVectors(r,i),l.cross(c),a.fromBufferAttribute(n,h),s.fromBufferAttribute(n,d),A.fromBufferAttribute(n,f),a.add(l),s.add(l),A.add(l),n.setXYZ(h,a.x,a.y,a.z),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(f,A.x,A.y,A.z)}else for(let e=0,a=t.count;e<a;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),l.subVectors(o,i),c.subVectors(r,i),l.cross(c),n.setXYZ(e+0,l.x,l.y,l.z),n.setXYZ(e+1,l.x,l.y,l.z),n.setXYZ(e+2,l.x,l.y,l.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,A=Math.min(a.length,i.length-s);for(let e=0,t=s;e<A;e++,t++)i[t]=a[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)hn.fromBufferAttribute(e,t),hn.normalize(),e.setXYZ(t,hn.x,hn.y,hn.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let a=0,s=0;for(let i=0,A=t.length;i<A;i++){a=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)o[s++]=n[a++]}return new tn(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new dn,n=this.index.array,r=this.attributes;for(const i in r){const o=e(r[i],n);t.setAttribute(i,o)}const i=this.morphAttributes;for(const r in i){const o=[],a=i[r];for(let t=0,r=a.length;t<r;t++){const r=e(a[t],n);o.push(r)}t.morphAttributes[r]=o}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let e=0,n=o.length;e<n;e++){const n=o[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],o=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];o.push(r.toJSON(e.data))}o.length>0&&(r[t]=o,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let e=0,t=o.length;e<t;e++){const t=o[e];this.addGroup(t.start,t.count,t.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}dn.prototype.isBufferGeometry=!0;const fn=new dt,pn=new ht,mn=new it,gn=new Be,vn=new Be,yn=new Be,xn=new Be,bn=new Be,_n=new Be,wn=new Be,Mn=new Be,Sn=new Be,En=new me,Tn=new me,Cn=new me,Rn=new Be,Pn=new Be;class Ln extends Nt{constructor(e=new dn,t=new Kt){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),mn.copy(n.boundingSphere),mn.applyMatrix4(i),!1===e.ray.intersectsSphere(mn))return;if(fn.copy(i).invert(),pn.copy(e.ray).applyMatrix4(fn),null!==n.boundingBox&&!1===pn.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,A=n.morphTargetsRelative,l=n.attributes.uv,c=n.attributes.uv2,u=n.groups,h=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,d=u.length;n<d;n++){const d=u[n],f=r[d.materialIndex];for(let n=Math.max(d.start,h.start),r=Math.min(i.count,Math.min(d.start+d.count,h.start+h.count));n<r;n+=3){const r=i.getX(n),u=i.getX(n+1),h=i.getX(n+2);o=qn(this,f,e,pn,a,s,A,l,c,r,u,h),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=d.materialIndex,t.push(o))}}else{for(let n=Math.max(0,h.start),u=Math.min(i.count,h.start+h.count);n<u;n+=3){const u=i.getX(n),h=i.getX(n+1),d=i.getX(n+2);o=qn(this,r,e,pn,a,s,A,l,c,u,h,d),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}else if(void 0!==a)if(Array.isArray(r))for(let n=0,i=u.length;n<i;n++){const i=u[n],d=r[i.materialIndex];for(let n=Math.max(i.start,h.start),r=Math.min(a.count,Math.min(i.start+i.count,h.start+h.count));n<r;n+=3){o=qn(this,d,e,pn,a,s,A,l,c,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}}else{for(let n=Math.max(0,h.start),i=Math.min(a.count,h.start+h.count);n<i;n+=3){o=qn(this,r,e,pn,a,s,A,l,c,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function qn(e,t,n,r,i,o,a,s,A,l,c,u){gn.fromBufferAttribute(i,l),vn.fromBufferAttribute(i,c),yn.fromBufferAttribute(i,u);const h=e.morphTargetInfluences;if(o&&h){wn.set(0,0,0),Mn.set(0,0,0),Sn.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=h[e],n=o[e];0!==t&&(xn.fromBufferAttribute(n,l),bn.fromBufferAttribute(n,c),_n.fromBufferAttribute(n,u),a?(wn.addScaledVector(xn,t),Mn.addScaledVector(bn,t),Sn.addScaledVector(_n,t)):(wn.addScaledVector(xn.sub(gn),t),Mn.addScaledVector(bn.sub(vn),t),Sn.addScaledVector(_n.sub(yn),t)))}gn.add(wn),vn.add(Mn),yn.add(Sn)}e.isSkinnedMesh&&(e.boneTransform(l,gn),e.boneTransform(c,vn),e.boneTransform(u,yn));const d=function(e,t,n,r,i,o,a,s){let A;if(A=1===t.side?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,2!==t.side,s),null===A)return null;Pn.copy(s),Pn.applyMatrix4(e.matrixWorld);const l=n.ray.origin.distanceTo(Pn);return l<n.near||l>n.far?null:{distance:l,point:Pn.clone(),object:e}}(e,t,n,r,gn,vn,yn,Rn);if(d){s&&(En.fromBufferAttribute(s,l),Tn.fromBufferAttribute(s,c),Cn.fromBufferAttribute(s,u),d.uv=Xt.getUV(Rn,gn,vn,yn,En,Tn,Cn,new me)),A&&(En.fromBufferAttribute(A,l),Tn.fromBufferAttribute(A,c),Cn.fromBufferAttribute(A,u),d.uv2=Xt.getUV(Rn,gn,vn,yn,En,Tn,Cn,new me));const e={a:l,b:c,c:u,normal:new Be,materialIndex:0};Xt.getNormal(gn,vn,yn,e.normal),d.face=e}return d}Ln.prototype.isMesh=!0;class Dn extends dn{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],A=[],l=[],c=[];let u=0,h=0;function d(e,t,n,r,i,o,d,f,p,m,g){const v=o/p,y=d/m,x=o/2,b=d/2,_=f/2,w=p+1,M=m+1;let S=0,E=0;const T=new Be;for(let o=0;o<M;o++){const a=o*y-b;for(let s=0;s<w;s++){const u=s*v-x;T[e]=u*r,T[t]=a*i,T[n]=_,A.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[n]=f>0?1:-1,l.push(T.x,T.y,T.z),c.push(s/p),c.push(1-o/m),S+=1}}for(let e=0;e<m;e++)for(let t=0;t<p;t++){const n=u+t+w*e,r=u+t+w*(e+1),i=u+(t+1)+w*(e+1),o=u+(t+1)+w*e;s.push(n,r,o),s.push(r,i,o),E+=6}a.addGroup(h,E,g),h+=E,u+=S}d("z","y","x",-1,-1,n,t,e,o,i,0),d("z","y","x",1,-1,n,t,-e,o,i,1),d("x","z","y",1,1,e,n,t,r,o,2),d("x","z","y",1,-1,e,n,-t,r,o,3),d("x","y","z",1,-1,e,t,n,r,i,4),d("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new on(A,3)),this.setAttribute("normal",new on(l,3)),this.setAttribute("uv",new on(c,2))}static fromJSON(e){return new Dn(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function In(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function On(e){const t={};for(let n=0;n<e.length;n++){const r=In(e[n]);for(const e in r)t[e]=r[e]}return t}const Bn={clone:In,merge:On};class kn extends Jt{constructor(e){super(),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.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=In(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}kn.prototype.isShaderMaterial=!0;class Nn extends Nt{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new dt,this.projectionMatrix=new dt,this.projectionMatrixInverse=new dt}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}Nn.prototype.isCamera=!0;class zn extends Nn{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Ae*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*se*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Ae*Math.atan(Math.tan(.5*se*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*se*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/a,r*=o.width/e,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}zn.prototype.isPerspectiveCamera=!0;const Un=90;class Fn extends Nt{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new zn(Un,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new Be(1,0,0)),this.add(r);const i=new zn(Un,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new Be(-1,0,0)),this.add(i);const o=new zn(Un,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new Be(0,1,0)),this.add(o);const a=new zn(Un,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new Be(0,-1,0)),this.add(a);const s=new zn(Un,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new Be(0,0,1)),this.add(s);const A=new zn(Un,1,e,t);A.layers=this.layers,A.up.set(0,-1,0),A.lookAt(new Be(0,0,-1)),this.add(A)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,A]=this.children,l=e.xr.enabled,c=e.getRenderTarget();e.xr.enabled=!1;const u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=u,e.setRenderTarget(n,5),e.render(t,A),e.setRenderTarget(c),e.xr.enabled=l,n.texture.needsPMREMUpdate=!0}}class Hn extends Pe{constructor(e,t,n,r,i,o,a,s,A,l){super(e=void 0!==e?e:[],t=void 0!==t?t:_,n,r,i,o,a,s,A,l),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}Hn.prototype.isCubeTexture=!0;class Gn extends De{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new Hn(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:R}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=k,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new Dn(5,5,5),i=new kn({name:"CubemapFromEquirect",uniforms:In(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;const o=new Ln(r,i),a=t.minFilter;t.minFilter===P&&(t.minFilter=R);return new Fn(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}Gn.prototype.isWebGLCubeRenderTarget=!0;const Vn=new Be,jn=new Be,Wn=new ge;class Qn{constructor(e=new Be(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=Vn.subVectors(n,t).cross(jn.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(Vn),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||Wn.getNormalMatrix(e),r=this.coplanarPoint(Vn).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}Qn.prototype.isPlane=!0;const Yn=new it,Xn=new Be;class Zn{constructor(e=new Qn,t=new Qn,n=new Qn,r=new Qn,i=new Qn,o=new Qn){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],A=n[5],l=n[6],c=n[7],u=n[8],h=n[9],d=n[10],f=n[11],p=n[12],m=n[13],g=n[14],v=n[15];return t[0].setComponents(a-r,c-s,f-u,v-p).normalize(),t[1].setComponents(a+r,c+s,f+u,v+p).normalize(),t[2].setComponents(a+i,c+A,f+h,v+m).normalize(),t[3].setComponents(a-i,c-A,f-h,v-m).normalize(),t[4].setComponents(a-o,c-l,f-d,v-g).normalize(),t[5].setComponents(a+o,c+l,f+d,v+g).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Yn.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Yn)}intersectsSprite(e){return Yn.center.set(0,0,0),Yn.radius=.7071067811865476,Yn.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yn)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Xn.x=r.normal.x>0?e.max.x:e.min.x,Xn.y=r.normal.y>0?e.max.y:e.min.y,Xn.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Xn)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Jn(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Kn(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:(i instanceof Uint8Array||i instanceof Uint8ClampedArray)&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(!function(t,r,i){const o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class $n extends dn{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,a=Math.floor(n),s=Math.floor(r),A=a+1,l=s+1,c=e/a,u=t/s,h=[],d=[],f=[],p=[];for(let e=0;e<l;e++){const t=e*u-o;for(let n=0;n<A;n++){const r=n*c-i;d.push(r,-t,0),f.push(0,0,1),p.push(n/a),p.push(1-e/s)}}for(let e=0;e<s;e++)for(let t=0;t<a;t++){const n=t+A*e,r=t+A*(e+1),i=t+1+A*(e+1),o=t+1+A*e;h.push(n,r,o),h.push(r,i,o)}this.setIndex(h),this.setAttribute("position",new on(d,3)),this.setAttribute("normal",new on(f,3)),this.setAttribute("uv",new on(p,2))}static fromJSON(e){return new $n(e.width,e.height,e.widthSegments,e.heightSegments)}}const er={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_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_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\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_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\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 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\treturn texture2D( envMap, uv ).rgb;\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, 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_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, 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 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\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.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform vec2 morphTargetsTextureSize;\n\t\tvec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {\n\t\t\tfloat texelIndex = float( vertexIndex * stride + offset );\n\t\t\tfloat y = floor( texelIndex / morphTargetsTextureSize.x );\n\t\t\tfloat x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tvec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );\n\t\t\treturn texture( morphTargetsTexture, morphUV ).xyz;\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\t#ifndef USE_MORPHNORMALS\n\t\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];\n\t\t\t#else\n\t\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];\n\t\t\t#endif\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\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 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_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_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},tr={common:{diffuse:{value:new Ee(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new ge},uv2Transform:{value:new ge},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new me(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ee(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ee(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ge}},sprite:{diffuse:{value:new Ee(16777215)},opacity:{value:1},center:{value:new me(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ge}}},nr={basic:{uniforms:On([tr.common,tr.specularmap,tr.envmap,tr.aomap,tr.lightmap,tr.fog]),vertexShader:er.meshbasic_vert,fragmentShader:er.meshbasic_frag},lambert:{uniforms:On([tr.common,tr.specularmap,tr.envmap,tr.aomap,tr.lightmap,tr.emissivemap,tr.fog,tr.lights,{emissive:{value:new Ee(0)}}]),vertexShader:er.meshlambert_vert,fragmentShader:er.meshlambert_frag},phong:{uniforms:On([tr.common,tr.specularmap,tr.envmap,tr.aomap,tr.lightmap,tr.emissivemap,tr.bumpmap,tr.normalmap,tr.displacementmap,tr.fog,tr.lights,{emissive:{value:new Ee(0)},specular:{value:new Ee(1118481)},shininess:{value:30}}]),vertexShader:er.meshphong_vert,fragmentShader:er.meshphong_frag},standard:{uniforms:On([tr.common,tr.envmap,tr.aomap,tr.lightmap,tr.emissivemap,tr.bumpmap,tr.normalmap,tr.displacementmap,tr.roughnessmap,tr.metalnessmap,tr.fog,tr.lights,{emissive:{value:new Ee(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:er.meshphysical_vert,fragmentShader:er.meshphysical_frag},toon:{uniforms:On([tr.common,tr.aomap,tr.lightmap,tr.emissivemap,tr.bumpmap,tr.normalmap,tr.displacementmap,tr.gradientmap,tr.fog,tr.lights,{emissive:{value:new Ee(0)}}]),vertexShader:er.meshtoon_vert,fragmentShader:er.meshtoon_frag},matcap:{uniforms:On([tr.common,tr.bumpmap,tr.normalmap,tr.displacementmap,tr.fog,{matcap:{value:null}}]),vertexShader:er.meshmatcap_vert,fragmentShader:er.meshmatcap_frag},points:{uniforms:On([tr.points,tr.fog]),vertexShader:er.points_vert,fragmentShader:er.points_frag},dashed:{uniforms:On([tr.common,tr.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:er.linedashed_vert,fragmentShader:er.linedashed_frag},depth:{uniforms:On([tr.common,tr.displacementmap]),vertexShader:er.depth_vert,fragmentShader:er.depth_frag},normal:{uniforms:On([tr.common,tr.bumpmap,tr.normalmap,tr.displacementmap,{opacity:{value:1}}]),vertexShader:er.meshnormal_vert,fragmentShader:er.meshnormal_frag},sprite:{uniforms:On([tr.sprite,tr.fog]),vertexShader:er.sprite_vert,fragmentShader:er.sprite_frag},background:{uniforms:{uvTransform:{value:new ge},t2D:{value:null}},vertexShader:er.background_vert,fragmentShader:er.background_frag},cube:{uniforms:On([tr.envmap,{opacity:{value:1}}]),vertexShader:er.cube_vert,fragmentShader:er.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:er.equirect_vert,fragmentShader:er.equirect_frag},distanceRGBA:{uniforms:On([tr.common,tr.displacementmap,{referencePosition:{value:new Be},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:er.distanceRGBA_vert,fragmentShader:er.distanceRGBA_frag},shadow:{uniforms:On([tr.lights,tr.fog,{color:{value:new Ee(0)},opacity:{value:1}}]),vertexShader:er.shadow_vert,fragmentShader:er.shadow_frag}};function rr(e,t,n,r,i,o){const a=new Ee(0);let s,A,l=!0===i?0:1,c=null,u=0,h=null;function d(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,o)}return{getClearColor:function(){return a},setClearColor:function(e,t=1){a.set(e),l=t,d(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(e){l=e,d(a,l)},render:function(n,i){let o=!1,f=!0===i.isScene?i.background:null;f&&f.isTexture&&(f=t.get(f));const p=e.xr,m=p.getSession&&p.getSession();m&&"additive"===m.environmentBlendMode&&(f=null),null===f?d(a,l):f&&f.isColor&&(d(f,1),o=!0),(e.autoClear||o)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),f&&(f.isCubeTexture||f.mapping===M)?(void 0===A&&(A=new Ln(new Dn(1,1,1),new kn({name:"BackgroundCubeMaterial",uniforms:In(nr.cube.uniforms),vertexShader:nr.cube.vertexShader,fragmentShader:nr.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),A.geometry.deleteAttribute("normal"),A.geometry.deleteAttribute("uv"),A.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(A.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(A)),A.material.uniforms.envMap.value=f,A.material.uniforms.flipEnvMap.value=f.isCubeTexture&&!1===f.isRenderTargetTexture?-1:1,c===f&&u===f.version&&h===e.toneMapping||(A.material.needsUpdate=!0,c=f,u=f.version,h=e.toneMapping),n.unshift(A,A.geometry,A.material,0,0,null)):f&&f.isTexture&&(void 0===s&&(s=new Ln(new $n(2,2),new kn({name:"BackgroundMaterial",uniforms:In(nr.background.uniforms),vertexShader:nr.background.vertexShader,fragmentShader:nr.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),Object.defineProperty(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(s)),s.material.uniforms.t2D.value=f,!0===f.matrixAutoUpdate&&f.updateMatrix(),s.material.uniforms.uvTransform.value.copy(f.matrix),c===f&&u===f.version&&h===e.toneMapping||(s.material.needsUpdate=!0,c=f,u=f.version,h=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null))}}}function ir(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},A=h(null);let l=A;function c(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function u(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function h(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function d(){const e=l.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function f(e){p(e,0)}function p(n,i){const o=l.newAttributes,a=l.enabledAttributes,s=l.attributeDivisors;if(o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i}}function m(){const t=l.newAttributes,n=l.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function g(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function v(){y(),l!==A&&(l=A,c(l.object))}function y(){A.geometry=null,A.program=null,A.wireframe=!1}return{setup:function(i,A,u,v,y){let x=!1;if(a){const t=function(t,n,i){const a=!0===i.wireframe;let A=s[t.id];void 0===A&&(A={},s[t.id]=A);let l=A[n.id];void 0===l&&(l={},A[n.id]=l);let c=l[a];void 0===c&&(c=h(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),l[a]=c);return c}(v,u,A);l!==t&&(l=t,c(l.object)),x=function(e,t){const n=l.attributes,r=e.attributes;let i=0;for(const e in r){const t=n[e],o=r[e];if(void 0===t)return!0;if(t.attribute!==o)return!0;if(t.data!==o.data)return!0;i++}return l.attributesNum!==i||l.index!==t}(v,y),x&&function(e,t){const n={},r=e.attributes;let i=0;for(const e in r){const t=r[e],o={};o.attribute=t,t.data&&(o.data=t.data),n[e]=o,i++}l.attributes=n,l.attributesNum=i,l.index=t}(v,y)}else{const e=!0===A.wireframe;l.geometry===v.id&&l.program===u.id&&l.wireframe===e||(l.geometry=v.id,l.program=u.id,l.wireframe=e,x=!0)}!0===i.isInstancedMesh&&(x=!0),null!==y&&n.update(y,34963),x&&(!function(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;d();const A=s.attributes,l=a.getAttributes(),c=o.defaultAttributeValues;for(const t in l){const r=l[t];if(r.location>=0){let o=A[t];if(void 0===o&&("instanceMatrix"===t&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const t=o.normalized,a=o.itemSize,A=n.get(o);if(void 0===A)continue;const l=A.buffer,c=A.type,u=A.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,A=n.stride,h=o.offset;if(n&&n.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)p(r.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<r.locationSize;e++)f(r.location+e);e.bindBuffer(34962,l);for(let e=0;e<r.locationSize;e++)g(r.location+e,a/r.locationSize,c,t,A*u,(h+a/r.locationSize*e)*u)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)p(r.location+e,o.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)}else for(let e=0;e<r.locationSize;e++)f(r.location+e);e.bindBuffer(34962,l);for(let e=0;e<r.locationSize;e++)g(r.location+e,a/r.locationSize,c,t,a*u,a/r.locationSize*e*u)}}else if(void 0!==c){const n=c[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r.location,n);break;case 3:e.vertexAttrib3fv(r.location,n);break;case 4:e.vertexAttrib4fv(r.location,n);break;default:e.vertexAttrib1fv(r.location,n)}}}}m()}(i,A,u,v),null!==y&&e.bindBuffer(34963,n.get(y).buffer))},reset:v,resetDefaultState:y,dispose:function(){v();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)u(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const e in t){const n=t[e];for(const e in n)u(n[e].object),delete n[e];delete t[e]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)u(r[e].object),delete r[e];delete n[e.id]}},initAttributes:d,enableAttribute:f,disableUnusedAttributes:m}}function or(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let A,l;if(i)A=e,l="drawArraysInstanced";else if(A=t.get("ANGLE_instanced_arrays"),l="drawArraysInstancedANGLE",null===A)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");A[l](o,r,a,s),n.update(a,o,s)}}function ar(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);const A=o||t.has("WEBGL_draw_buffers"),l=!0===n.logarithmicDepthBuffer,c=e.getParameter(34930),u=e.getParameter(35660),h=e.getParameter(3379),d=e.getParameter(34076),f=e.getParameter(34921),p=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),v=u>0,y=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:A,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:u,maxTextureSize:h,maxCubemapSize:d,maxAttributes:f,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?e.getParameter(36183):0}}function sr(e){const t=this;let n=null,r=0,i=!1,o=!1;const a=new Qn,s=new ge,A={value:null,needsUpdate:!1};function l(){A.value!==n&&(A.value=n,A.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function c(e,n,r,i){const o=null!==e?e.length:0;let l=null;if(0!==o){if(l=A.value,!0!==i||null===l){const t=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===l||l.length<t)&&(l=new Float32Array(t));for(let t=0,n=r;t!==o;++t,n+=4)a.copy(e[t]).applyMatrix4(i,s),a.normal.toArray(l,n),l[n+3]=a.constant}A.value=l,A.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,l}this.uniform=A,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const a=0!==e.length||t||0!==r||i;return i=t,n=c(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,c(null)},this.endShadows=function(){o=!1,l()},this.setState=function(t,a,s){const u=t.clippingPlanes,h=t.clipIntersection,d=t.clipShadows,f=e.get(t);if(!i||null===u||0===u.length||o&&!d)o?c(null):l();else{const e=o?0:r,t=4*e;let i=f.clippingState||null;A.value=i,i=c(u,a,t,s);for(let e=0;e!==t;++e)i[e]=n[e];f.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function Ar(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=_:304===t&&(e.mapping=w),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const o=i.mapping;if(303===o||304===o){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const a=new Gn(o.height/2);return a.fromEquirectangularTexture(e,i),t.set(i,a),i.addEventListener("dispose",r),n(a.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}nr.physical={uniforms:On([nr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new me(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new Ee(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new me},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ee(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Ee(1,1,1)},specularColorMap:{value:null}}]),vertexShader:er.meshphysical_vert,fragmentShader:er.meshphysical_frag};class lr extends Nn{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,a-=t*this.view.offsetY,s=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}lr.prototype.isOrthographicCamera=!0;class cr extends kn{constructor(e){super(e),this.type="RawShaderMaterial"}}cr.prototype.isRawShaderMaterial=!0;const ur=Math.pow(2,8),hr=[.125,.215,.35,.446,.526,.582],dr=5+hr.length,fr=20,pr=new lr,{_lodPlanes:mr,_sizeLods:gr,_sigmas:vr}=Sr(),yr=new Ee;let xr=null;const br=(1+Math.sqrt(5))/2,_r=1/br,wr=[new Be(1,1,1),new Be(-1,1,1),new Be(1,1,-1),new Be(-1,1,-1),new Be(0,br,_r),new Be(0,br,-_r),new Be(_r,0,br),new Be(-_r,0,br),new Be(br,_r,0),new Be(-br,_r,0)];class Mr{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){const t=new Float32Array(e),n=new Be(0,1,0);return new cr({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n}},vertexShader:Pr(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(fr),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){xr=this._renderer.getRenderTarget();const i=this._allocateTargets();return this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=Rr(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=Cr(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let e=0;e<mr.length;e++)mr[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(xr),e.scissorTest=!1,Tr(e,0,0,e.width,e.height)}_fromTexture(e,t){xr=this._renderer.getRenderTarget();const n=t||this._allocateTargets(e);return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(e){const t={magFilter:R,minFilter:R,generateMipmaps:!1,type:O,format:k,encoding:J,depthBuffer:!1},n=Er(t);return n.depthBuffer=!e,null===this._pingPongRenderTarget&&(this._pingPongRenderTarget=Er(t)),n}_compileMaterial(e){const t=new Ln(mr[0],e);this._renderer.compile(t,pr)}_sceneToCubeUV(e,t,n,r){const i=new zn(90,1,t,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,A=s.autoClear,l=s.toneMapping;s.getClearColor(yr),s.toneMapping=0,s.autoClear=!1;const c=new Kt({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),u=new Ln(new Dn,c);let h=!1;const d=e.background;d?d.isColor&&(c.color.copy(d),e.background=null,h=!0):(c.color.copy(yr),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,o[t],0),i.lookAt(a[t],0,0)):1===n?(i.up.set(0,0,o[t]),i.lookAt(0,a[t],0)):(i.up.set(0,o[t],0),i.lookAt(0,0,a[t])),Tr(r,n*ur,t>2?ur:0,ur,ur),s.setRenderTarget(r),h&&s.render(u,i),s.render(e,i)}u.geometry.dispose(),u.material.dispose(),s.toneMapping=l,s.autoClear=A,e.background=d}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===_||e.mapping===w;r?(null===this._cubemapShader&&(this._cubemapShader=Rr()),this._cubemapShader.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectShader&&(this._equirectShader=Cr());const i=r?this._cubemapShader:this._equirectShader,o=new Ln(mr[0],i),a=i.uniforms;a.envMap.value=e,r||a.texelSize.value.set(1/e.image.width,1/e.image.height),Tr(t,0,0,3*ur,2*ur),n.setRenderTarget(t),n.render(o,pr)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<dr;t++){const n=Math.sqrt(vr[t]*vr[t]-vr[t-1]*vr[t-1]),r=wr[(t-1)%wr.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,o,a){const s=this._renderer,A=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const l=new Ln(mr[r],A),c=A.uniforms,u=gr[n]-1,h=isFinite(i)?Math.PI/(2*u):2*Math.PI/39,d=i/h,f=isFinite(i)?1+Math.floor(3*d):fr;f>fr&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const p=[];let m=0;for(let e=0;e<fr;++e){const t=e/d,n=Math.exp(-t*t/2);p.push(n),0===e?m+=n:e<f&&(m+=2*n)}for(let e=0;e<p.length;e++)p[e]=p[e]/m;c.envMap.value=e.texture,c.samples.value=f,c.weights.value=p,c.latitudinal.value="latitudinal"===o,a&&(c.poleAxis.value=a),c.dTheta.value=h,c.mipInt.value=8-n;const g=gr[r];Tr(t,3*Math.max(0,ur-2*g),(0===r?0:2*ur)+2*g*(r>4?r-8+4:0),3*g,2*g),s.setRenderTarget(t),s.render(l,pr)}}function Sr(){const e=[],t=[],n=[];let r=8;for(let i=0;i<dr;i++){const o=Math.pow(2,r);t.push(o);let a=1/o;i>4?a=hr[i-8+4-1]:0===i&&(a=0),n.push(a);const s=1/(o-1),A=-s/2,l=1+s/2,c=[A,A,l,A,l,l,A,A,l,l,A,l],u=6,h=6,d=3,f=2,p=1,m=new Float32Array(d*h*u),g=new Float32Array(f*h*u),v=new Float32Array(p*h*u);for(let e=0;e<u;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];m.set(r,d*h*e),g.set(c,f*h*e);const i=[e,e,e,e,e,e];v.set(i,p*h*e)}const y=new dn;y.setAttribute("position",new tn(m,d)),y.setAttribute("uv",new tn(g,f)),y.setAttribute("faceIndex",new tn(v,p)),e.push(y),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function Er(e){const t=new De(3*ur,3*ur,e);return t.texture.mapping=M,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function Tr(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Cr(){const e=new me(1,1);return new cr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e}},vertexShader:Pr(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = texture2D ( envMap, uv ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Rr(){return new cr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Pr(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Pr(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Lr(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping,a=303===o||304===o,s=o===_||o===w;if(a||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new Mr(e)),r=a?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const o=i.image;if(a&&o&&o.height>0||s&&o&&function(e){let t=0;const n=6;for(let r=0;r<n;r++)void 0!==e[r]&&t++;return t===n}(o)){null===n&&(n=new Mr(e));const o=a?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,o),i.addEventListener("dispose",r),o.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function qr(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function Dr(e,t,n,r){const i={},o=new WeakMap;function a(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener("dispose",a),delete i[s.id];const A=o.get(s);A&&(t.remove(A),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let a=0;if(null!==r){const e=r.array;a=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;a=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(ve(n)?rn:nn)(n,1);s.version=a;const A=o.get(e);A&&t.remove(A),o.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const r=e.morphAttributes;for(const e in r){const n=r[e];for(let e=0,r=n.length;e<r;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function Ir(e,t,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(e){o=e},this.setIndex=function(e){a=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,a,t*s),n.update(r,o,1)},this.renderInstances=function(r,A,l){if(0===l)return;let c,u;if(i)c=e,u="drawElementsInstanced";else if(c=t.get("ANGLE_instanced_arrays"),u="drawElementsInstancedANGLE",null===c)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[u](o,A,a,r*s,l),n.update(A,o,l)}}function Or(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}class Br extends Pe{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=C,this.minFilter=C,this.wrapR=E,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}function kr(e,t){return e[0]-t[0]}function Nr(e,t){return Math.abs(t[1])-Math.abs(e[1])}function zr(e,t){let n=1;const r=t.isInterleavedBufferAttribute?t.data.array:t.array;r instanceof Int8Array?n=127:r instanceof Int16Array?n=32767:r instanceof Int32Array?n=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",r),e.divideScalar(n)}function Ur(e,t,n){const r={},i=new Float32Array(8),o=new WeakMap,a=new Be,s=[];for(let e=0;e<8;e++)s[e]=[e,0];return{update:function(A,l,c,u){const h=A.morphTargetInfluences;if(!0===t.isWebGL2){const r=l.morphAttributes.position.length;let i=o.get(l);if(void 0===i||i.count!==r){void 0!==i&&i.texture.dispose();const e=void 0!==l.morphAttributes.normal,n=l.morphAttributes.position,s=l.morphAttributes.normal||[],A=!0===e?2:1;let c=l.attributes.position.count*A,u=1;c>t.maxTextureSize&&(u=Math.ceil(c/t.maxTextureSize),c=t.maxTextureSize);const h=new Float32Array(c*u*4*r),d=new Br(h,c,u,r);d.format=k,d.type=I,d.needsUpdate=!0;const f=4*A;for(let t=0;t<r;t++){const r=n[t],i=s[t],o=c*u*4*t;for(let t=0;t<r.count;t++){a.fromBufferAttribute(r,t),!0===r.normalized&&zr(a,r);const n=t*f;h[o+n+0]=a.x,h[o+n+1]=a.y,h[o+n+2]=a.z,h[o+n+3]=0,!0===e&&(a.fromBufferAttribute(i,t),!0===i.normalized&&zr(a,i),h[o+n+4]=a.x,h[o+n+5]=a.y,h[o+n+6]=a.z,h[o+n+7]=0)}}function p(){d.dispose(),o.delete(l),l.removeEventListener("dispose",p)}i={count:r,texture:d,size:new me(c,u)},o.set(l,i),l.addEventListener("dispose",p)}let s=0;for(let e=0;e<h.length;e++)s+=h[e];const A=l.morphTargetsRelative?1:1-s;u.getUniforms().setValue(e,"morphTargetBaseInfluence",A),u.getUniforms().setValue(e,"morphTargetInfluences",h),u.getUniforms().setValue(e,"morphTargetsTexture",i.texture,n),u.getUniforms().setValue(e,"morphTargetsTextureSize",i.size)}else{const t=void 0===h?0:h.length;let n=r[l.id];if(void 0===n||n.length!==t){n=[];for(let e=0;e<t;e++)n[e]=[e,0];r[l.id]=n}for(let e=0;e<t;e++){const t=n[e];t[0]=e,t[1]=h[e]}n.sort(Nr);for(let e=0;e<8;e++)e<t&&n[e][1]?(s[e][0]=n[e][0],s[e][1]=n[e][1]):(s[e][0]=Number.MAX_SAFE_INTEGER,s[e][1]=0);s.sort(kr);const o=l.morphAttributes.position,a=l.morphAttributes.normal;let A=0;for(let e=0;e<8;e++){const t=s[e],n=t[0],r=t[1];n!==Number.MAX_SAFE_INTEGER&&r?(o&&l.getAttribute("morphTarget"+e)!==o[n]&&l.setAttribute("morphTarget"+e,o[n]),a&&l.getAttribute("morphNormal"+e)!==a[n]&&l.setAttribute("morphNormal"+e,a[n]),i[e]=r,A+=r):(o&&!0===l.hasAttribute("morphTarget"+e)&&l.deleteAttribute("morphTarget"+e),a&&!0===l.hasAttribute("morphNormal"+e)&&l.deleteAttribute("morphNormal"+e),i[e]=0)}const c=l.morphTargetsRelative?1:1-A;u.getUniforms().setValue(e,"morphTargetBaseInfluence",c),u.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function Fr(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const a=r.render.frame,s=e.geometry,A=t.get(e,s);return i.get(A)!==a&&(t.update(A),i.set(A,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),A},dispose:function(){i=new WeakMap}}}Br.prototype.isDataTexture2DArray=!0;class Hr extends Pe{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=C,this.minFilter=C,this.wrapR=E,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}Hr.prototype.isDataTexture3D=!0;const Gr=new Pe,Vr=new Br,jr=new Hr,Wr=new Hn,Qr=[],Yr=[],Xr=new Float32Array(16),Zr=new Float32Array(9),Jr=new Float32Array(4);function Kr(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=Qr[i];if(void 0===o&&(o=new Float32Array(i),Qr[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function $r(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function ei(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function ti(e,t){let n=Yr[t];void 0===n&&(n=new Int32Array(t),Yr[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function ni(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function ri(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if($r(n,t))return;e.uniform2fv(this.addr,t),ei(n,t)}}function ii(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if($r(n,t))return;e.uniform3fv(this.addr,t),ei(n,t)}}function oi(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if($r(n,t))return;e.uniform4fv(this.addr,t),ei(n,t)}}function ai(e,t){const n=this.cache,r=t.elements;if(void 0===r){if($r(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),ei(n,t)}else{if($r(n,r))return;Jr.set(r),e.uniformMatrix2fv(this.addr,!1,Jr),ei(n,r)}}function si(e,t){const n=this.cache,r=t.elements;if(void 0===r){if($r(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),ei(n,t)}else{if($r(n,r))return;Zr.set(r),e.uniformMatrix3fv(this.addr,!1,Zr),ei(n,r)}}function Ai(e,t){const n=this.cache,r=t.elements;if(void 0===r){if($r(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),ei(n,t)}else{if($r(n,r))return;Xr.set(r),e.uniformMatrix4fv(this.addr,!1,Xr),ei(n,r)}}function li(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function ci(e,t){const n=this.cache;$r(n,t)||(e.uniform2iv(this.addr,t),ei(n,t))}function ui(e,t){const n=this.cache;$r(n,t)||(e.uniform3iv(this.addr,t),ei(n,t))}function hi(e,t){const n=this.cache;$r(n,t)||(e.uniform4iv(this.addr,t),ei(n,t))}function di(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function fi(e,t){const n=this.cache;$r(n,t)||(e.uniform2uiv(this.addr,t),ei(n,t))}function pi(e,t){const n=this.cache;$r(n,t)||(e.uniform3uiv(this.addr,t),ei(n,t))}function mi(e,t){const n=this.cache;$r(n,t)||(e.uniform4uiv(this.addr,t),ei(n,t))}function gi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||Gr,i)}function vi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||jr,i)}function yi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||Wr,i)}function xi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Vr,i)}function bi(e,t){e.uniform1fv(this.addr,t)}function _i(e,t){const n=Kr(t,this.size,2);e.uniform2fv(this.addr,n)}function wi(e,t){const n=Kr(t,this.size,3);e.uniform3fv(this.addr,n)}function Mi(e,t){const n=Kr(t,this.size,4);e.uniform4fv(this.addr,n)}function Si(e,t){const n=Kr(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function Ei(e,t){const n=Kr(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Ti(e,t){const n=Kr(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function Ci(e,t){e.uniform1iv(this.addr,t)}function Ri(e,t){e.uniform2iv(this.addr,t)}function Pi(e,t){e.uniform3iv(this.addr,t)}function Li(e,t){e.uniform4iv(this.addr,t)}function qi(e,t){e.uniform1uiv(this.addr,t)}function Di(e,t){e.uniform2uiv(this.addr,t)}function Ii(e,t){e.uniform3uiv(this.addr,t)}function Oi(e,t){e.uniform4uiv(this.addr,t)}function Bi(e,t,n){const r=t.length,i=ti(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.safeSetTexture2D(t[e]||Gr,i[e])}function ki(e,t,n){const r=t.length,i=ti(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture3D(t[e]||jr,i[e])}function Ni(e,t,n){const r=t.length,i=ti(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.safeSetTextureCube(t[e]||Wr,i[e])}function zi(e,t,n){const r=t.length,i=ti(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture2DArray(t[e]||Vr,i[e])}function Ui(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return ni;case 35664:return ri;case 35665:return ii;case 35666:return oi;case 35674:return ai;case 35675:return si;case 35676:return Ai;case 5124:case 35670:return li;case 35667:case 35671:return ci;case 35668:case 35672:return ui;case 35669:case 35673:return hi;case 5125:return di;case 36294:return fi;case 36295:return pi;case 36296:return mi;case 35678:case 36198:case 36298:case 36306:case 35682:return gi;case 35679:case 36299:case 36307:return vi;case 35680:case 36300:case 36308:case 36293:return yi;case 36289:case 36303:case 36311:case 36292:return xi}}(t.type)}function Fi(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return bi;case 35664:return _i;case 35665:return wi;case 35666:return Mi;case 35674:return Si;case 35675:return Ei;case 35676:return Ti;case 5124:case 35670:return Ci;case 35667:case 35671:return Ri;case 35668:case 35672:return Pi;case 35669:case 35673:return Li;case 5125:return qi;case 36294:return Di;case 36295:return Ii;case 36296:return Oi;case 35678:case 36198:case 36298:case 36306:case 35682:return Bi;case 35679:case 36299:case 36307:return ki;case 35680:case 36300:case 36308:case 36293:return Ni;case 36289:case 36303:case 36311:case 36292:return zi}}(t.type)}function Hi(e){this.id=e,this.seq=[],this.map={}}Fi.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),ei(t,e)},Hi.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const Gi=/(\w+)(\])?(\[|\.)?/g;function Vi(e,t){e.seq.push(t),e.map[t.id]=t}function ji(e,t,n){const r=e.name,i=r.length;for(Gi.lastIndex=0;;){const o=Gi.exec(r),a=Gi.lastIndex;let s=o[1];const A="]"===o[2],l=o[3];if(A&&(s|=0),void 0===l||"["===l&&a+2===i){Vi(n,void 0===l?new Ui(s,e,t):new Fi(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new Hi(s),Vi(n,e)),n=e}}}function Wi(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);ji(n,e.getUniformLocation(t,n.name),this)}}function Qi(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}Wi.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},Wi.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},Wi.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(e,a.value,r)}},Wi.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let Yi=0;function Xi(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return r&&""===i?"":n.toUpperCase()+"\n\n"+i+"\n\n"+function(e){const t=e.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}(e.getShaderSource(t))}function Zi(e,t){const n=function(e){switch(e){case J:return["Linear","( value )"];case K:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Ji(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Ki(e){return""!==e}function $i(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function eo(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const to=/^[ \t]*#include +<([\w\d./]+)>/gm;function no(e){return e.replace(to,ro)}function ro(e,t){const n=er[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return no(n)}const io=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,oo=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function ao(e){return e.replace(oo,Ao).replace(io,so)}function so(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Ao(e,t,n,r)}function Ao(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function lo(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function co(e,t,n,r){const i=e.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const A=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),l=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case _:case w:t="ENVMAP_TYPE_CUBE";break;case M:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),c=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case w:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),u=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),h=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ki).join("\n")}(n),d=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),f=i.createProgram();let p,m,g=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(p=[d].filter(Ki).join("\n"),p.length>0&&(p+="\n"),m=[h,d].filter(Ki).join("\n"),m.length>0&&(m+="\n")):(p=[lo(n),"#define SHADER_NAME "+n.shaderName,d,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",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.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",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.morphTargets&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargets&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+A:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\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(Ki).join("\n"),m=[h,lo(n),"#define SHADER_NAME "+n.shaderName,d,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",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.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+A:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?er.tonemapping_pars_fragment:"",0!==n.toneMapping?Ji("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.transparent?"":"#define OPAQUE",er.encodings_pars_fragment,Zi("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Ki).join("\n")),a=no(a),a=$i(a,n),a=eo(a,n),s=no(s),s=$i(s,n),s=eo(s,n),a=ao(a),s=ao(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(g="#version 300 es\n",p=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+p,m=["#define varying in",n.glslVersion===ne?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===ne?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+m);const v=g+m+s,y=Qi(i,35633,g+p+a),x=Qi(i,35632,v);if(i.attachShader(f,y),i.attachShader(f,x),void 0!==n.index0AttributeName?i.bindAttribLocation(f,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(f,0,"position"),i.linkProgram(f),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(f).trim(),t=i.getShaderInfoLog(y).trim(),n=i.getShaderInfoLog(x).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(f,35714)){r=!1;const t=Xi(i,y,"vertex"),n=Xi(i,x,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(f,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+n)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:p},fragmentShader:{log:n,prefix:m}})}let b,S;return i.deleteShader(y),i.deleteShader(x),this.getUniforms=function(){return void 0===b&&(b=new Wi(i,f)),b},this.getAttributes=function(){return void 0===S&&(S=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),o=r.name;let a=1;35674===r.type&&(a=2),35675===r.type&&(a=3),35676===r.type&&(a=4),n[o]={type:r.type,location:e.getAttribLocation(t,o),locationSize:a}}return n}(i,f)),S},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(f),this.program=void 0},this.name=n.shaderName,this.id=Yi++,this.cacheKey=t,this.usedTimes=1,this.program=f,this.vertexShader=y,this.fragmentShader=x,this}let uo=0;class ho{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return!1===o.has(r)&&(o.add(r),r.usedTimes++),!1===o.has(i)&&(o.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;return!1===t.has(e)&&t.set(e,new Set),t.get(e)}_getShaderStage(e){const t=this.shaderCache;if(!1===t.has(e)){const n=new fo;t.set(e,n)}return t.get(e)}}class fo{constructor(){this.id=uo++,this.usedTimes=0}}function po(e,t,n,r,i,o,a){const s=new Mt,A=new ho,l=[],c=i.isWebGL2,u=i.logarithmicDepthBuffer,h=i.floatVertexTextures,d=i.maxVertexUniforms,f=i.vertexTextures;let p=i.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(o,s,l,g,v){const y=g.fog,x=o.isMeshStandardMaterial?g.environment:null,b=(o.isMeshStandardMaterial?n:t).get(o.envMap||x),_=m[o.type],w=v.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(h)return 1024;{const e=d,n=Math.floor((e-20)/4),r=Math.min(n,t.length);return r<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+r+"."),0):r}}(v):0;let S,E,T,C;if(null!==o.precision&&(p=i.getMaxPrecision(o.precision),p!==o.precision&&console.warn("THREE.WebGLProgram.getParameters:",o.precision,"not supported, using",p,"instead.")),_){const e=nr[_];S=e.vertexShader,E=e.fragmentShader}else S=o.vertexShader,E=o.fragmentShader,A.update(o),T=A.getVertexShaderID(o),C=A.getFragmentShaderID(o);const R=e.getRenderTarget(),P=o.alphaTest>0,L=o.clearcoat>0;return{isWebGL2:c,shaderID:_,shaderName:o.type,vertexShader:S,fragmentShader:E,defines:o.defines,customVertexShaderID:T,customFragmentShaderID:C,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:p,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:f,outputEncoding:null===R?e.outputEncoding:!0===R.isXRRenderTarget?R.texture.encoding:J,map:!!o.map,matcap:!!o.matcap,envMap:!!b,envMapMode:b&&b.mapping,envMapCubeUV:!!b&&(b.mapping===M||307===b.mapping),lightMap:!!o.lightMap,aoMap:!!o.aoMap,emissiveMap:!!o.emissiveMap,bumpMap:!!o.bumpMap,normalMap:!!o.normalMap,objectSpaceNormalMap:1===o.normalMapType,tangentSpaceNormalMap:0===o.normalMapType,decodeVideoTexture:!!o.map&&!0===o.map.isVideoTexture&&o.map.encoding===K,clearcoat:L,clearcoatMap:L&&!!o.clearcoatMap,clearcoatRoughnessMap:L&&!!o.clearcoatRoughnessMap,clearcoatNormalMap:L&&!!o.clearcoatNormalMap,displacementMap:!!o.displacementMap,roughnessMap:!!o.roughnessMap,metalnessMap:!!o.metalnessMap,specularMap:!!o.specularMap,specularIntensityMap:!!o.specularIntensityMap,specularColorMap:!!o.specularColorMap,transparent:o.transparent,alphaMap:!!o.alphaMap,alphaTest:P,gradientMap:!!o.gradientMap,sheen:o.sheen>0,sheenColorMap:!!o.sheenColorMap,sheenRoughnessMap:!!o.sheenRoughnessMap,transmission:o.transmission>0,transmissionMap:!!o.transmissionMap,thicknessMap:!!o.thicknessMap,combine:o.combine,vertexTangents:!!o.normalMap&&!!v.geometry&&!!v.geometry.attributes.tangent,vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!v.geometry&&!!v.geometry.attributes.color&&4===v.geometry.attributes.color.itemSize,vertexUvs:!!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatMap||o.clearcoatRoughnessMap||o.clearcoatNormalMap||o.displacementMap||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheenColorMap||o.sheenRoughnessMap),uvsVertexOnly:!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatNormalMap||o.transmission>0||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheen>0||o.sheenColorMap||o.sheenRoughnessMap||!o.displacementMap),fog:!!y,useFog:o.fog,fogExp2:y&&y.isFogExp2,flatShading:!!o.flatShading,sizeAttenuation:o.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===v.isSkinnedMesh&&w>0,maxBones:w,useVertexTexture:h,morphTargets:!!v.geometry&&!!v.geometry.morphAttributes.position,morphNormals:!!v.geometry&&!!v.geometry.morphAttributes.normal,morphTargetsCount:v.geometry&&v.geometry.morphAttributes.position?v.geometry.morphAttributes.position.length:0,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:o.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:o.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:o.premultipliedAlpha,doubleSided:2===o.side,flipSided:1===o.side,depthPacking:void 0!==o.depthPacking&&o.depthPacking,index0AttributeName:o.index0AttributeName,extensionDerivatives:o.extensions&&o.extensions.derivatives,extensionFragDepth:o.extensions&&o.extensions.fragDepth,extensionDrawBuffers:o.extensions&&o.extensions.drawBuffers,extensionShaderTextureLOD:o.extensions&&o.extensions.shaderTextureLOD,rendererExtensionFragDepth:c||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||r.has("EXT_shader_texture_lod"),customProgramCacheKey:o.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.maxBones),e.push(t.morphTargetsCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection)}(n,t),function(e,t){s.disableAll(),t.isWebGL2&&s.enable(0);t.supportsVertexTextures&&s.enable(1);t.instancing&&s.enable(2);t.instancingColor&&s.enable(3);t.map&&s.enable(4);t.matcap&&s.enable(5);t.envMap&&s.enable(6);t.envMapCubeUV&&s.enable(7);t.lightMap&&s.enable(8);t.aoMap&&s.enable(9);t.emissiveMap&&s.enable(10);t.bumpMap&&s.enable(11);t.normalMap&&s.enable(12);t.objectSpaceNormalMap&&s.enable(13);t.tangentSpaceNormalMap&&s.enable(14);t.clearcoat&&s.enable(15);t.clearcoatMap&&s.enable(16);t.clearcoatRoughnessMap&&s.enable(17);t.clearcoatNormalMap&&s.enable(18);t.displacementMap&&s.enable(19);t.specularMap&&s.enable(20);t.roughnessMap&&s.enable(21);t.metalnessMap&&s.enable(22);t.gradientMap&&s.enable(23);t.alphaMap&&s.enable(24);t.alphaTest&&s.enable(25);t.vertexColors&&s.enable(26);t.vertexAlphas&&s.enable(27);t.vertexUvs&&s.enable(28);t.vertexTangents&&s.enable(29);t.uvsVertexOnly&&s.enable(30);t.fog&&s.enable(31);e.push(s.mask),s.disableAll(),t.useFog&&s.enable(0);t.flatShading&&s.enable(1);t.logarithmicDepthBuffer&&s.enable(2);t.skinning&&s.enable(3);t.useVertexTexture&&s.enable(4);t.morphTargets&&s.enable(5);t.morphNormals&&s.enable(6);t.premultipliedAlpha&&s.enable(7);t.shadowMapEnabled&&s.enable(8);t.physicallyCorrectLights&&s.enable(9);t.doubleSided&&s.enable(10);t.flipSided&&s.enable(11);t.depthPacking&&s.enable(12);t.dithering&&s.enable(13);t.specularIntensityMap&&s.enable(14);t.specularColorMap&&s.enable(15);t.transmission&&s.enable(16);t.transmissionMap&&s.enable(17);t.thicknessMap&&s.enable(18);t.sheen&&s.enable(19);t.sheenColorMap&&s.enable(20);t.sheenRoughnessMap&&s.enable(21);t.decodeVideoTexture&&s.enable(22);t.transparent&&s.enable(23);e.push(s.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=m[e.type];let n;if(t){const e=nr[t];n=Bn.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=l.length;e<t;e++){const t=l[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new co(e,n,t,o),l.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=l.indexOf(e);l[t]=l[l.length-1],l.pop(),e.destroy()}},releaseShaderCache:function(e){A.remove(e)},programs:l,dispose:function(){A.dispose()}}}function mo(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function go(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function vo(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function yo(){const e=[];let t=0;const n=[],r=[],i=[];function o(n,r,i,o,a,s){let A=e[t];return void 0===A?(A={id:n.id,object:n,geometry:r,material:i,groupOrder:o,renderOrder:n.renderOrder,z:a,group:s},e[t]=A):(A.id=n.id,A.object=n,A.geometry=r,A.material=i,A.groupOrder=o,A.renderOrder=n.renderOrder,A.z=a,A.group=s),t++,A}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,a,s,A,l){const c=o(e,t,a,s,A,l);a.transmission>0?r.push(c):!0===a.transparent?i.push(c):n.push(c)},unshift:function(e,t,a,s,A,l){const c=o(e,t,a,s,A,l);a.transmission>0?r.unshift(c):!0===a.transparent?i.unshift(c):n.unshift(c)},finish:function(){for(let n=t,r=e.length;n<r;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||go),r.length>1&&r.sort(t||vo),i.length>1&&i.sort(t||vo)}}}function xo(){let e=new WeakMap;return{get:function(t,n){let r;return!1===e.has(t)?(r=new yo,e.set(t,[r])):n>=e.get(t).length?(r=new yo,e.get(t).push(r)):r=e.get(t)[n],r},dispose:function(){e=new WeakMap}}}function bo(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new Be,color:new Ee};break;case"SpotLight":n={position:new Be,direction:new Be,color:new Ee,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Be,color:new Ee,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Be,skyColor:new Ee,groundColor:new Ee};break;case"RectAreaLight":n={color:new Ee,position:new Be,halfWidth:new Be,halfHeight:new Be}}return e[t.id]=n,n}}}let _o=0;function wo(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Mo(e,t){const n=new bo,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new me};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new me,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let e=0;e<9;e++)i.probe.push(new Be);const o=new Be,a=new dt,s=new dt;return{setup:function(o,a){let s=0,A=0,l=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0;o.sort(wo);const v=!0!==a?Math.PI:1;for(let e=0,t=o.length;e<t;e++){const t=o[e],a=t.color,y=t.intensity,x=t.distance,b=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)s+=a.r*y*v,A+=a.g*y*v,l+=a.b*y*v;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],y);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*v),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[c]=n,i.directionalShadowMap[c]=b,i.directionalShadowMatrix[c]=t.shadow.matrix,p++}i.directional[c]=e,c++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(a).multiplyScalar(y*v),e.distance=x,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[h]=n,i.spotShadowMap[h]=b,i.spotShadowMatrix[h]=t.shadow.matrix,g++}i.spot[h]=e,h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(a).multiplyScalar(y),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[d]=e,d++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*v),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[u]=n,i.pointShadowMap[u]=b,i.pointShadowMatrix[u]=t.shadow.matrix,m++}i.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(y*v),e.groundColor.copy(t.groundColor).multiplyScalar(y*v),i.hemi[f]=e,f++}}d>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=tr.LTC_FLOAT_1,i.rectAreaLTC2=tr.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=tr.LTC_HALF_1,i.rectAreaLTC2=tr.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=s,i.ambient[1]=A,i.ambient[2]=l;const y=i.hash;y.directionalLength===c&&y.pointLength===u&&y.spotLength===h&&y.rectAreaLength===d&&y.hemiLength===f&&y.numDirectionalShadows===p&&y.numPointShadows===m&&y.numSpotShadows===g||(i.directional.length=c,i.spot.length=h,i.rectArea.length=d,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=p,i.directionalShadowMap.length=p,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=p,i.pointShadowMatrix.length=m,i.spotShadowMatrix.length=g,y.directionalLength=c,y.pointLength=u,y.spotLength=h,y.rectAreaLength=d,y.hemiLength=f,y.numDirectionalShadows=p,y.numPointShadows=m,y.numSpotShadows=g,i.version=_o++)},setupView:function(e,t){let n=0,r=0,A=0,l=0,c=0;const u=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){const h=e[t];if(h.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(u),n++}else if(h.isSpotLight){const e=i.spot[A];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(u),e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(u),A++}else if(h.isRectAreaLight){const e=i.rectArea[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(u),s.identity(),a.copy(h.matrixWorld),a.premultiply(u),s.extractRotation(a),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),l++}else if(h.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(u),r++}else if(h.isHemisphereLight){const e=i.hemi[c];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(u),e.direction.normalize(),c++}}},state:i}}function So(e,t){const n=new Mo(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Eo(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new So(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new So(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class To extends Jt{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}To.prototype.isMeshDepthMaterial=!0;class Co extends Jt{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new Be,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}Co.prototype.isMeshDistanceMaterial=!0;function Ro(e,t,n){let r=new Zn;const i=new me,o=new me,a=new qe,s=new To({depthPacking:3201}),A=new Co,l={},c=n.maxTextureSize,u={0:1,1:0,2:2},h=new kn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new me},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const f=new dn;f.setAttribute("position",new tn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Ln(f,h),m=this;function g(n,r){const i=t.update(p);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,d.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,d.needsUpdate=!0),h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,h,p,null),d.uniforms.shadow_pass.value=n.mapPass.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,d,p,null)}function v(t,n,r,i,o,a,c){let h=null;const d=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(h=void 0!==d?d:!0===i.isPointLight?A:s,e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length||r.displacementMap&&0!==r.displacementScale||r.alphaMap&&r.alphaTest>0){const e=h.uuid,t=r.uuid;let n=l[e];void 0===n&&(n={},l[e]=n);let i=n[t];void 0===i&&(i=h.clone(),n[t]=i),h=i}return h.visible=r.visible,h.wireframe=r.wireframe,h.side=3===c?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:u[r.side],h.alphaMap=r.alphaMap,h.alphaTest=r.alphaTest,h.clipShadows=r.clipShadows,h.clippingPlanes=r.clippingPlanes,h.clipIntersection=r.clipIntersection,h.displacementMap=r.displacementMap,h.displacementScale=r.displacementScale,h.displacementBias=r.displacementBias,h.wireframeLinewidth=r.wireframeLinewidth,h.linewidth=r.linewidth,!0===i.isPointLight&&!0===h.isMeshDistanceMaterial&&(h.referencePosition.setFromMatrixPosition(i.matrixWorld),h.nearDistance=o,h.farDistance=a),h}function y(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let A=0,l=t.length;A<l;A++){const l=t[A],c=i[l.materialIndex];if(c&&c.visible){const t=v(n,0,c,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,l)}}}else if(i.visible){const t=v(n,0,i,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,null)}}const A=n.children;for(let e=0,t=A.length;e<t;e++)y(A[e],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,s){if(!1===m.enabled)return;if(!1===m.autoUpdate&&!1===m.needsUpdate)return;if(0===t.length)return;const A=e.getRenderTarget(),l=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),h=e.state;h.setBlending(0),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);for(let A=0,l=t.length;A<l;A++){const l=t[A],u=l.shadow;if(void 0===u){console.warn("THREE.WebGLShadowMap:",l,"has no shadow.");continue}if(!1===u.autoUpdate&&!1===u.needsUpdate)continue;i.copy(u.mapSize);const d=u.getFrameExtents();if(i.multiply(d),o.copy(u.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(o.x=Math.floor(c/d.x),i.x=o.x*d.x,u.mapSize.x=o.x),i.y>c&&(o.y=Math.floor(c/d.y),i.y=o.y*d.y,u.mapSize.y=o.y)),null===u.map&&!u.isPointLightShadow&&3===this.type){const e={minFilter:R,magFilter:R,format:k};u.map=new De(i.x,i.y,e),u.map.texture.name=l.name+".shadowMap",u.mapPass=new De(i.x,i.y,e),u.camera.updateProjectionMatrix()}if(null===u.map){const e={minFilter:C,magFilter:C,format:k};u.map=new De(i.x,i.y,e),u.map.texture.name=l.name+".shadowMap",u.camera.updateProjectionMatrix()}e.setRenderTarget(u.map),e.clear();const f=u.getViewportCount();for(let e=0;e<f;e++){const t=u.getViewport(e);a.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),h.viewport(a),u.updateMatrices(l,e),r=u.getFrustum(),y(n,s,u.camera,l,this.type)}u.isPointLightShadow||3!==this.type||g(u,s),u.needsUpdate=!1}m.needsUpdate=!1,e.setRenderTarget(A,l,u)}}function Po(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new qe;let r=null;const i=new qe(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?z(2929):U(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:default:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},a=new function(){let t=!1,n=null,r=null,i=null,o=null,a=null,s=null,A=null,l=null;return{setTest:function(e){t||(e?z(2960):U(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&A===r||(e.stencilOp(t,n,r),a=t,s=n,A=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,A=null,l=null}}};let s={},A={},l=new WeakMap,c=[],u=null,h=!1,d=null,f=null,p=null,m=null,g=null,v=null,y=null,x=!1,_=null,w=null,M=null,S=null,E=null;const T=e.getParameter(35661);let C=!1,R=0;const P=e.getParameter(7938);-1!==P.indexOf("WebGL")?(R=parseFloat(/^WebGL (\d)/.exec(P)[1]),C=R>=1):-1!==P.indexOf("OpenGL ES")&&(R=parseFloat(/^OpenGL ES (\d)/.exec(P)[1]),C=R>=2);let L=null,q={};const D=e.getParameter(3088),I=e.getParameter(2978),O=(new qe).fromArray(D),B=(new qe).fromArray(I);function k(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t<r;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,i);return o}const N={};function z(t){!0!==s[t]&&(e.enable(t),s[t]=!0)}function U(t){!1!==s[t]&&(e.disable(t),s[t]=!1)}N[3553]=k(3553,3553,1),N[34067]=k(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),a.setClear(0),z(2929),o.setFunc(3),V(!1),j(1),z(2884),G(0);const F={[b]:32774,101:32778,102:32779};if(r)F[103]=32775,F[104]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(F[103]=e.MIN_EXT,F[104]=e.MAX_EXT)}const H={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function G(t,n,r,i,o,a,s,A){if(0!==t){if(!1===h&&(z(3042),h=!0),5===t)o=o||n,a=a||r,s=s||i,n===f&&o===g||(e.blendEquationSeparate(F[n],F[o]),f=n,g=o),r===p&&i===m&&a===v&&s===y||(e.blendFuncSeparate(H[r],H[i],H[a],H[s]),p=r,m=i,v=a,y=s),d=t,x=null;else if(t!==d||A!==x){if(f===b&&g===b||(e.blendEquation(32774),f=b,g=b),A)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,769,0,1);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFuncSeparate(0,769,0,1);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}p=null,m=null,v=null,y=null,d=t,x=A}}else!0===h&&(U(3042),h=!1)}function V(t){_!==t&&(t?e.frontFace(2304):e.frontFace(2305),_=t)}function j(t){0!==t?(z(2884),t!==w&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):U(2884),w=t}function W(t,n,r){t?(z(32823),S===n&&E===r||(e.polygonOffset(n,r),S=n,E=r)):U(32823)}function Q(t){void 0===t&&(t=33984+T-1),L!==t&&(e.activeTexture(t),L=t)}return{buffers:{color:i,depth:o,stencil:a},enable:z,disable:U,bindFramebuffer:function(t,n){return A[t]!==n&&(e.bindFramebuffer(t,n),A[t]=n,r&&(36009===t&&(A[36160]=n),36160===t&&(A[36009]=n)),!0)},drawBuffers:function(r,i){let o=c,a=!1;if(r)if(o=l.get(i),void 0===o&&(o=[],l.set(i,o)),r.isWebGLMultipleRenderTargets){const e=r.texture;if(o.length!==e.length||36064!==o[0]){for(let t=0,n=e.length;t<n;t++)o[t]=36064+t;o.length=e.length,a=!0}}else 36064!==o[0]&&(o[0]=36064,a=!0);else 1029!==o[0]&&(o[0]=1029,a=!0);a&&(n.isWebGL2?e.drawBuffers(o):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(o))},useProgram:function(t){return u!==t&&(e.useProgram(t),u=t,!0)},setBlending:G,setMaterial:function(e,t){2===e.side?U(2884):z(2884);let n=1===e.side;t&&(n=!n),V(n),1===e.blending&&!1===e.transparent?G(0):G(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;a.setTest(r),r&&(a.setMask(e.stencilWriteMask),a.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),a.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),W(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?z(32926):U(32926)},setFlipSided:V,setCullFace:j,setLineWidth:function(t){t!==M&&(C&&e.lineWidth(t),M=t)},setPolygonOffset:W,setScissorTest:function(e){e?z(3089):U(3089)},activeTexture:Q,bindTexture:function(t,n){null===L&&Q();let r=q[L];void 0===r&&(r={type:void 0,texture:void 0},q[L]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||N[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=q[L];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===O.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),O.copy(t))},viewport:function(t){!1===B.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),B.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),s={},L=null,q={},A={},l=new WeakMap,c=[],u=null,h=!1,d=null,f=null,p=null,m=null,g=null,v=null,y=null,x=!1,_=null,w=null,M=null,S=null,E=null,O.set(0,0,e.canvas.width,e.canvas.height),B.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),a.reset()}}}function Lo(e,t,n,r,i,o,a){const s=i.isWebGL2,A=i.maxTextures,l=i.maxCubemapSize,c=i.maxTextureSize,u=i.maxSamples,h=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):void 0,d=new WeakMap;let f,p=!1;try{p="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function m(e,t){return p?new OffscreenCanvas(e,t):ye("canvas")}function g(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?fe:Math.floor,o=r(i*e.width),a=r(i*e.height);void 0===f&&(f=m(o,a));const s=n?m(o,a):f;s.width=o,s.height=a;return s.getContext("2d").drawImage(e,0,0,o,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+a+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function v(e){return de(e.width)&&de(e.height)}function y(e,t){return e.generateMipmaps&&t&&e.minFilter!==C&&e.minFilter!==R}function x(t){e.generateMipmap(t)}function b(n,r,i,o,a=!1){if(!1===s)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let A=r;return 6403===r&&(5126===i&&(A=33326),5131===i&&(A=33325),5121===i&&(A=33321)),33319===r&&(5126===i&&(A=33328),5131===i&&(A=33327),5121===i&&(A=33323)),6408===r&&(5126===i&&(A=34836),5131===i&&(A=34842),5121===i&&(A=o===K&&!1===a?35907:32856),32819===i&&(A=32854),32820===i&&(A=32855)),33325!==A&&33326!==A&&33327!==A&&33328!==A&&34842!==A&&34836!==A||t.get("EXT_color_buffer_float"),A}function _(e,t,n){return!0===y(e,n)||e.isFramebufferTexture&&e.minFilter!==C&&e.minFilter!==R?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function w(e){return e===C||1004===e||1005===e?9728:9729}function M(t){const n=t.target;n.removeEventListener("dispose",M),function(t){const n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&d.delete(n),a.memory.textures--}function U(t){const n=t.target;n.removeEventListener("dispose",U),function(t){const n=t.texture,i=r.get(t),o=r.get(n);if(!t)return;void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),a.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}let F=0;function H(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=a.render.frame;d.get(e)!==t&&(d.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){const n=e.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void Y(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function G(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;Q(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),A=r.image[0]&&r.image[0].isDataTexture,c=[];for(let e=0;e<6;e++)c[e]=a||A?A?r.image[e].image:r.image[e]:g(r.image[e],!1,!0,l),c[e]=te(r,c[e]);const u=c[0],h=v(u)||s,d=o.convert(r.format,r.encoding),f=o.convert(r.type),p=b(r.internalFormat,d,f,r.encoding),m=s&&!0!==r.isVideoTexture,w=void 0===t.__version;let M,S=_(r,u,h);if(W(34067,r,h),a){m&&w&&n.texStorage2D(34067,S,p,u.width,u.height);for(let e=0;e<6;e++){M=c[e].mipmaps;for(let t=0;t<M.length;t++){const i=M[t];r.format!==k?null!==d?m?n.compressedTexSubImage2D(34069+e,t,0,0,i.width,i.height,d,i.data):n.compressedTexImage2D(34069+e,t,p,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):m?n.texSubImage2D(34069+e,t,0,0,i.width,i.height,d,f,i.data):n.texImage2D(34069+e,t,p,i.width,i.height,0,d,f,i.data)}}}else{M=r.mipmaps,m&&w&&(M.length>0&&S++,n.texStorage2D(34067,S,p,c[0].width,c[0].height));for(let e=0;e<6;e++)if(A){m?n.texSubImage2D(34069+e,0,0,0,c[e].width,c[e].height,d,f,c[e].data):n.texImage2D(34069+e,0,p,c[e].width,c[e].height,0,d,f,c[e].data);for(let t=0;t<M.length;t++){const r=M[t].image[e].image;m?n.texSubImage2D(34069+e,t+1,0,0,r.width,r.height,d,f,r.data):n.texImage2D(34069+e,t+1,p,r.width,r.height,0,d,f,r.data)}}else{m?n.texSubImage2D(34069+e,0,0,0,d,f,c[e]):n.texImage2D(34069+e,0,p,d,f,c[e]);for(let t=0;t<M.length;t++){const r=M[t];m?n.texSubImage2D(34069+e,t+1,0,0,d,f,r.image[e]):n.texImage2D(34069+e,t+1,p,d,f,r.image[e])}}}y(r,h)&&x(34067);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}const V={[S]:10497,[E]:33071,[T]:33648},j={[C]:9728,1004:9984,1005:9986,[R]:9729,1007:9985,[P]:9987};function W(n,o,a){if(a?(e.texParameteri(n,10242,V[o.wrapS]),e.texParameteri(n,10243,V[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,V[o.wrapR]),e.texParameteri(n,10240,j[o.magFilter]),e.texParameteri(n,10241,j[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),o.wrapS===E&&o.wrapT===E||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,w(o.magFilter)),e.texParameteri(n,10241,w(o.minFilter)),o.minFilter!==C&&o.minFilter!==R&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(o.type===I&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&o.type===O&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function Q(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",M),t.__webglTexture=e.createTexture(),a.memory.textures++)}function Y(t,r,i){let a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),Q(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const A=function(e){return!s&&(e.wrapS!==E||e.wrapT!==E||e.minFilter!==C&&e.minFilter!==R)}(r)&&!1===v(r.image);let l=g(r.image,A,!1,c);l=te(r,l);const u=v(l)||s,h=o.convert(r.format,r.encoding);let d,f=o.convert(r.type),p=b(r.internalFormat,h,f,r.encoding,r.isVideoTexture);W(a,r,u);const m=r.mipmaps,w=s&&!0!==r.isVideoTexture,M=void 0===t.__version,S=_(r,l,u);if(r.isDepthTexture)p=6402,s?p=r.type===I?36012:r.type===D?33190:r.type===B?35056:33189:r.type===I&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===N&&6402===p&&r.type!==q&&r.type!==D&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=q,f=o.convert(r.type)),r.format===z&&6402===p&&(p=34041,r.type!==B&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=B,f=o.convert(r.type))),w&&M?n.texStorage2D(3553,1,p,l.width,l.height):n.texImage2D(3553,0,p,l.width,l.height,0,h,f,null);else if(r.isDataTexture)if(m.length>0&&u){w&&M&&n.texStorage2D(3553,S,p,m[0].width,m[0].height);for(let e=0,t=m.length;e<t;e++)d=m[e],w?n.texSubImage2D(3553,0,0,0,d.width,d.height,h,f,d.data):n.texImage2D(3553,e,p,d.width,d.height,0,h,f,d.data);r.generateMipmaps=!1}else w?(M&&n.texStorage2D(3553,S,p,l.width,l.height),n.texSubImage2D(3553,0,0,0,l.width,l.height,h,f,l.data)):n.texImage2D(3553,0,p,l.width,l.height,0,h,f,l.data);else if(r.isCompressedTexture){w&&M&&n.texStorage2D(3553,S,p,m[0].width,m[0].height);for(let e=0,t=m.length;e<t;e++)d=m[e],r.format!==k?null!==h?w?n.compressedTexSubImage2D(3553,e,0,0,d.width,d.height,h,d.data):n.compressedTexImage2D(3553,e,p,d.width,d.height,0,d.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):w?n.texSubImage2D(3553,e,0,0,d.width,d.height,h,f,d.data):n.texImage2D(3553,e,p,d.width,d.height,0,h,f,d.data)}else if(r.isDataTexture2DArray)w?(M&&n.texStorage3D(35866,S,p,l.width,l.height,l.depth),n.texSubImage3D(35866,0,0,0,0,l.width,l.height,l.depth,h,f,l.data)):n.texImage3D(35866,0,p,l.width,l.height,l.depth,0,h,f,l.data);else if(r.isDataTexture3D)w?(M&&n.texStorage3D(32879,S,p,l.width,l.height,l.depth),n.texSubImage3D(32879,0,0,0,0,l.width,l.height,l.depth,h,f,l.data)):n.texImage3D(32879,0,p,l.width,l.height,l.depth,0,h,f,l.data);else if(r.isFramebufferTexture)w&&M?n.texStorage2D(3553,S,p,l.width,l.height):n.texImage2D(3553,0,p,l.width,l.height,0,h,f,null);else if(m.length>0&&u){w&&M&&n.texStorage2D(3553,S,p,m[0].width,m[0].height);for(let e=0,t=m.length;e<t;e++)d=m[e],w?n.texSubImage2D(3553,e,0,0,h,f,d):n.texImage2D(3553,e,p,h,f,d);r.generateMipmaps=!1}else w?(M&&n.texStorage2D(3553,S,p,l.width,l.height),n.texSubImage2D(3553,0,0,0,h,f,l)):n.texImage2D(3553,0,p,h,f,l);y(r,u)&&x(a),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function X(t,i,a,s,A){const l=o.convert(a.format,a.encoding),c=o.convert(a.type),u=b(a.internalFormat,l,c,a.encoding);r.get(i).__hasExternalTextures||(32879===A||35866===A?n.texImage3D(A,0,u,i.width,i.height,i.depth,0,l,c,null):n.texImage2D(A,0,u,i.width,i.height,0,l,c,null)),n.bindFramebuffer(36160,t),i.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,s,A,r.get(a).__webglTexture,0,ee(i)):e.framebufferTexture2D(36160,s,A,r.get(a).__webglTexture,0),n.bindFramebuffer(36160,null)}function Z(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r||n.useRenderToTexture){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===I?i=36012:t.type===D&&(i=33190));const r=ee(n);n.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,r,i,n.width,n.height):e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=ee(n);r&&n.useRenderbuffer?e.renderbufferStorageMultisample(36161,i,35056,n.width,n.height):n.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,i,35056,n.width,n.height):e.renderbufferStorage(36161,34041,n.width,n.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,i=o.convert(t.format,t.encoding),a=o.convert(t.type),s=b(t.internalFormat,i,a,t.encoding),A=ee(n);r&&n.useRenderbuffer?e.renderbufferStorageMultisample(36161,A,s,n.width,n.height):n.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,A,s,n.width,n.height):e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function $(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),H(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture,a=ee(i);if(i.depthTexture.format===N)i.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,36096,3553,o,0,a):e.framebufferTexture2D(36160,36096,3553,o,0);else{if(i.depthTexture.format!==z)throw new Error("Unknown depthTexture format");i.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,33306,3553,o,0,a):e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),Z(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),Z(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function ee(e){return s&&(e.useRenderbuffer||e.useRenderToTexture)?Math.min(u,e.samples):0}function te(e,n){const r=e.encoding,i=e.format,o=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===re||r!==J&&(r===K?!1===s?!0===t.has("EXT_sRGB")&&i===k?(e.format=re,e.minFilter=R,e.generateMipmaps=!1):n=Ce.sRGBToLinear(n):i===k&&o===L||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",r)),n}let ne=!1,ie=!1;this.allocateTextureUnit=function(){const e=F;return e>=A&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+A),F+=1,e},this.resetTextureUnits=function(){F=0},this.setTexture2D=H,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?Y(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?Y(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=G,this.rebindTextures=function(e,t,n){const i=r.get(e);void 0!==t&&X(i.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&$(e)},this.setupRenderTarget=function(t){const A=t.texture,l=r.get(t),c=r.get(A);t.addEventListener("dispose",U),!0!==t.isWebGLMultipleRenderTargets&&(void 0===c.__webglTexture&&(c.__webglTexture=e.createTexture()),c.__version=A.version,a.memory.textures++);const u=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultipleRenderTargets,d=A.isDataTexture3D||A.isDataTexture2DArray,f=v(t)||s;if(u){l.__webglFramebuffer=[];for(let t=0;t<6;t++)l.__webglFramebuffer[t]=e.createFramebuffer()}else if(l.__webglFramebuffer=e.createFramebuffer(),h)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(t.useRenderbuffer)if(s){l.__webglMultisampledFramebuffer=e.createFramebuffer(),l.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,l.__webglColorRenderbuffer);const r=o.convert(A.format,A.encoding),i=o.convert(A.type),a=b(A.internalFormat,r,i,A.encoding),s=ee(t);e.renderbufferStorageMultisample(36161,s,a,t.width,t.height),n.bindFramebuffer(36160,l.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,l.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(l.__webglDepthRenderbuffer=e.createRenderbuffer(),Z(l.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(u){n.bindTexture(34067,c.__webglTexture),W(34067,A,f);for(let e=0;e<6;e++)X(l.__webglFramebuffer[e],t,A,36064,34069+e);y(A,f)&&x(34067),n.unbindTexture()}else if(h){const e=t.texture;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=r.get(o);n.bindTexture(3553,a.__webglTexture),W(3553,o,f),X(l.__webglFramebuffer,t,o,36064+i,3553),y(o,f)&&x(3553)}n.unbindTexture()}else{let e=3553;if(d)if(s){e=A.isDataTexture3D?32879:35866}else console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.");n.bindTexture(e,c.__webglTexture),W(e,A,f),X(l.__webglFramebuffer,t,A,36064,e),y(A,f)&&x(e),n.unbindTexture()}t.depthBuffer&&$(t)},this.updateRenderTargetMipmap=function(e){const t=v(e)||s,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,a=i.length;o<a;o++){const a=i[o];if(y(a,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(a).__webglTexture;n.bindTexture(t,i),x(t),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(t.useRenderbuffer)if(s){const i=t.width,o=t.height;let a=16384;const s=[36064],A=t.stencilBuffer?33306:36096;t.depthBuffer&&s.push(A),t.ignoreDepthForMultisampleCopy||(t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024));const l=r.get(t);n.bindFramebuffer(36008,l.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,l.__webglFramebuffer),t.ignoreDepthForMultisampleCopy&&(e.invalidateFramebuffer(36008,[A]),e.invalidateFramebuffer(36009,[A])),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),e.invalidateFramebuffer(36008,s),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,l.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.setupDepthRenderbuffer=$,this.setupFrameBufferTexture=X,this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===ne&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),ne=!0),e=e.texture),H(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===ie&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),ie=!0),e=e.texture),G(e,t)}}function qo(e,t,n){const r=n.isWebGL2;return{convert:function(e,n=null){let i;if(e===L)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1010===e)return 5120;if(1011===e)return 5122;if(e===q)return 5123;if(1013===e)return 5124;if(e===D)return 5125;if(e===I)return 5126;if(e===O)return r?5131:(i=t.get("OES_texture_half_float"),null!==i?i.HALF_FLOAT_OES:null);if(1021===e)return 6406;if(e===k)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(e===N)return 6402;if(e===z)return 34041;if(1028===e)return 6403;if(1022===e)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),6408;if(e===re)return i=t.get("EXT_sRGB"),null!==i?i.SRGB_ALPHA_EXT:null;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1033===e)return 36249;if(e===U||e===F||e===H||e===G)if(n===K){if(i=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===i)return null;if(e===U)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(e===F)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(e===H)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(e===G)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(i=t.get("WEBGL_compressed_texture_s3tc"),null===i)return null;if(e===U)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===F)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===H)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===G)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(i=t.get("WEBGL_compressed_texture_pvrtc"),null===i)return null;if(35840===e)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return i=t.get("WEBGL_compressed_texture_etc1"),null!==i?i.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===e||37496===e){if(i=t.get("WEBGL_compressed_texture_etc"),null===i)return null;if(37492===e)return n===K?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(37496===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}if(37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e){if(i=t.get("WEBGL_compressed_texture_astc"),null===i)return null;if(37808===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===e)return n===K?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===e){if(i=t.get("EXT_texture_compression_bptc"),null===i)return null;if(36492===e)return n===K?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT}return e===B?r?34042:(i=t.get("WEBGL_depth_texture"),null!==i?i.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class Do extends zn{constructor(e=[]){super(),this.cameras=e}}Do.prototype.isArrayCamera=!0;class Io extends Nt{constructor(){super(),this.type="Group"}}Io.prototype.isGroup=!0;const Oo={type:"move"};class Bo{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Io,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Io,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Be,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Be),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Io,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Be,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Be),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,A=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==a&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Oo))),A&&e.hand){o=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n);if(void 0===A.joints[r.jointName]){const e=new Io;e.matrixAutoUpdate=!1,e.visible=!1,A.joints[r.jointName]=e,A.add(e)}const i=A.joints[r.jointName];null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=A.joints["index-finger-tip"],i=A.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,l=.005;A.inputState.pinching&&a>s+l?(A.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!A.inputState.pinching&&a<=s-l&&(A.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==A&&(A.visible=null!==o),this}}class ko extends Pe{constructor(e,t,n,r,i,o,a,s,A,l){if((l=void 0!==l?l:N)!==N&&l!==z)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===N&&(n=q),void 0===n&&l===z&&(n=B),super(null,r,i,o,a,s,l,n,A),this.image={width:e,height:t},this.magFilter=void 0!==a?a:C,this.minFilter=void 0!==s?s:C,this.flipY=!1,this.generateMipmaps=!1}}ko.prototype.isDepthTexture=!0;class No extends ie{constructor(e,t){super();const n=this;let r=null,i=1,o=null,a="local-floor";const s=e.extensions.has("WEBGL_multisampled_render_to_texture");let A=null,l=null,c=null,u=null,h=!1,d=null;const f=t.getContextAttributes();let p=null,m=null;const g=[],v=new Map,y=new zn;y.layers.enable(1),y.viewport=new qe;const x=new zn;x.layers.enable(2),x.viewport=new qe;const b=[y,x],_=new Do;_.layers.enable(1),_.layers.enable(2);let w=null,M=null;function S(e){const t=v.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function E(){v.forEach((function(e,t){e.disconnect(t)})),v.clear(),w=null,M=null,e.setRenderTarget(p),u=null,c=null,l=null,r=null,m=null,I.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function T(e){const t=r.inputSources;for(let e=0;e<g.length;e++)v.set(t[e],g[e]);for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=v.get(n);r&&(r.dispatchEvent({type:"disconnected",data:n}),v.delete(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t],r=v.get(n);r&&r.dispatchEvent({type:"connected",data:n})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=g[e];return void 0===t&&(t=new Bo,g[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=g[e];return void 0===t&&(t=new Bo,g[e]=t),t.getGripSpace()},this.getHand=function(e){let t=g[e];return void 0===t&&(t=new Bo,g[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){a=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return o},this.getBaseLayer=function(){return null!==c?c:u},this.getBinding=function(){return l},this.getFrame=function(){return d},this.getSession=function(){return r},this.setSession=async function(A){if(r=A,null!==r){if(p=e.getRenderTarget(),r.addEventListener("select",S),r.addEventListener("selectstart",S),r.addEventListener("selectend",S),r.addEventListener("squeeze",S),r.addEventListener("squeezestart",S),r.addEventListener("squeezeend",S),r.addEventListener("end",E),r.addEventListener("inputsourceschange",T),!0!==f.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||f.antialias,alpha:f.alpha,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};u=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:u}),m=new De(u.framebufferWidth,u.framebufferHeight,{format:k,type:L,encoding:e.outputEncoding})}else{h=f.antialias;let n=null,o=null,a=null;f.depth&&(a=f.stencil?35056:33190,n=f.stencil?z:N,o=f.stencil?B:q);const A={colorFormat:e.outputEncoding===K?35907:32856,depthFormat:a,scaleFactor:i};l=new XRWebGLBinding(r,t),c=l.createProjectionLayer(A),r.updateRenderState({layers:[c]}),m=h?new Ie(c.textureWidth,c.textureHeight,{format:k,type:L,depthTexture:new ko(c.textureWidth,c.textureHeight,o,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,ignoreDepth:c.ignoreDepthValues,useRenderToTexture:s,encoding:e.outputEncoding}):new De(c.textureWidth,c.textureHeight,{format:k,type:L,depthTexture:new ko(c.textureWidth,c.textureHeight,o,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,ignoreDepth:c.ignoreDepthValues,encoding:e.outputEncoding})}m.isXRRenderTarget=!0,this.setFoveation(1),o=await r.requestReferenceSpace(a),I.setContext(r),I.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const C=new Be,R=new Be;function P(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;_.near=x.near=y.near=e.near,_.far=x.far=y.far=e.far,w===_.near&&M===_.far||(r.updateRenderState({depthNear:_.near,depthFar:_.far}),w=_.near,M=_.far);const t=e.parent,n=_.cameras;P(_,t);for(let e=0;e<n.length;e++)P(n[e],t);_.matrixWorld.decompose(_.position,_.quaternion,_.scale),e.position.copy(_.position),e.quaternion.copy(_.quaternion),e.scale.copy(_.scale),e.matrix.copy(_.matrix),e.matrixWorld.copy(_.matrixWorld);const i=e.children;for(let e=0,t=i.length;e<t;e++)i[e].updateMatrixWorld(!0);2===n.length?function(e,t,n){C.setFromMatrixPosition(t.matrixWorld),R.setFromMatrixPosition(n.matrixWorld);const r=C.distanceTo(R),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),A=(i[9]+1)/i[5],l=(i[9]-1)/i[5],c=(i[8]-1)/i[0],u=(o[8]+1)/o[0],h=a*c,d=a*u,f=r/(-c+u),p=f*-c;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(p),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const m=a+f,g=s+f,v=h-p,y=d+(r-p),x=A*s/g*m,b=l*s/g*m;e.projectionMatrix.makePerspective(v,y,x,b,m,g)}(_,y,x):_.projectionMatrix.copy(y.projectionMatrix)},this.getCamera=function(){return _},this.getFoveation=function(){return null!==c?c.fixedFoveation:null!==u?u.fixedFoveation:void 0},this.setFoveation=function(e){null!==c&&(c.fixedFoveation=e),null!==u&&void 0!==u.fixedFoveation&&(u.fixedFoveation=e)};let D=null;const I=new Jn;I.setAnimationLoop((function(t,n){if(A=n.getViewerPose(o),d=n,null!==A){const t=A.views;null!==u&&(e.setRenderTargetFramebuffer(m,u.framebuffer),e.setRenderTarget(m));let n=!1;t.length!==_.cameras.length&&(_.cameras.length=0,n=!0);for(let r=0;r<t.length;r++){const i=t[r];let o=null;if(null!==u)o=u.getViewport(i);else{const t=l.getViewSubImage(c,i);o=t.viewport,0===r&&(e.setRenderTargetTextures(m,t.colorTexture,c.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(m))}const a=b[r];a.matrix.fromArray(i.transform.matrix),a.projectionMatrix.fromArray(i.projectionMatrix),a.viewport.set(o.x,o.y,o.width,o.height),0===r&&_.matrix.copy(a.matrix),!0===n&&_.cameras.push(a)}}const i=r.inputSources;for(let e=0;e<g.length;e++){const t=g[e],r=i[e];t.update(r,n,o)}D&&D(t,n),d=null})),this.setAnimationLoop=function(e){D=e},this.dispose=function(){}}}function zo(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap),n.alphaTest>0&&(t.alphaTest.value=n.alphaTest);const r=e.get(n).envMap;let i,o;r&&(t.envMap.value=r,t.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,t.reflectivity.value=n.reflectivity,t.ior.value=n.ior,t.refractionRatio.value=n.refractionRatio),n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?i=n.map:n.specularMap?i=n.specularMap:n.displacementMap?i=n.displacementMap:n.normalMap?i=n.normalMap:n.bumpMap?i=n.bumpMap:n.roughnessMap?i=n.roughnessMap:n.metalnessMap?i=n.metalnessMap:n.alphaMap?i=n.alphaMap:n.emissiveMap?i=n.emissiveMap:n.clearcoatMap?i=n.clearcoatMap:n.clearcoatNormalMap?i=n.clearcoatNormalMap:n.clearcoatRoughnessMap?i=n.clearcoatRoughnessMap:n.specularIntensityMap?i=n.specularIntensityMap:n.specularColorMap?i=n.specularColorMap:n.transmissionMap?i=n.transmissionMap:n.thicknessMap?i=n.thicknessMap:n.sheenColorMap?i=n.sheenColorMap:n.sheenRoughnessMap&&(i=n.sheenRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),t.uv2Transform.value.copy(o.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,1===n.side&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),1===n.side&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias);e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,a){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap);t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t,r){n(e,t),e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,1===t.side&&e.clearcoatNormalScale.value.negate()));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap);t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,a):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function Uo(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=ye("canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,A=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,l=void 0!==e.powerPreference?e.powerPreference:"default",c=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let u=null,h=null;const d=[],f=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=J,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const p=this;let m=!1,g=0,v=0,y=null,x=-1,b=null;const _=new qe,w=new qe;let M=null,S=t.width,T=t.height,R=1,q=null,D=null;const B=new qe(0,0,S,T),N=new qe(0,0,S,T);let z=!1;const U=new Zn;let F=!1,H=!1,G=null;const V=new dt,j=new Be,W={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Q(){return null===y?R:1}let Y,X,Z,K,$,ee,te,ne,re,ie,oe,ae,se,Ae,le,ce,ue,he,de,fe,pe,me,ge,ve=n;function xe(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:!0,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:A,powerPreference:l,failIfMajorPerformanceCaveat:c};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r137"),t.addEventListener("webglcontextlost",we,!1),t.addEventListener("webglcontextrestored",Me,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&t.shift(),ve=xe(t,e),null===ve)throw xe(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function be(){Y=new qr(ve),X=new ar(ve,Y,e),Y.init(X),me=new qo(ve,Y,X),Z=new Po(ve,Y,X),K=new Or(ve),$=new mo,ee=new Lo(ve,Y,Z,$,X,me,K),te=new Ar(p),ne=new Lr(p),re=new Kn(ve,X),ge=new ir(ve,Y,re,X),ie=new Dr(ve,re,K,ge),oe=new Fr(ve,ie,re,K),de=new Ur(ve,X,ee),ce=new sr($),ae=new po(p,te,ne,Y,X,ge,ce),se=new zo($),Ae=new xo,le=new Eo(Y,X),he=new rr(p,te,Z,oe,r,s),ue=new Ro(p,oe,X),fe=new or(ve,Y,K,X),pe=new Ir(ve,Y,K,X),K.programs=ae.programs,p.capabilities=X,p.extensions=Y,p.properties=$,p.renderLists=Ae,p.shadowMap=ue,p.state=Z,p.info=K}be();const _e=new No(p,ve);function we(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),m=!0}function Me(){console.log("THREE.WebGLRenderer: Context Restored."),m=!1;const e=K.autoReset,t=ue.enabled,n=ue.autoUpdate,r=ue.needsUpdate,i=ue.type;be(),K.autoReset=e,ue.enabled=t,ue.autoUpdate=n,ue.needsUpdate=r,ue.type=i}function Se(e){const t=e.target;t.removeEventListener("dispose",Se),function(e){(function(e){const t=$.get(e).programs;void 0!==t&&(t.forEach((function(e){ae.releaseProgram(e)})),e.isShaderMaterial&&ae.releaseShaderCache(e))})(e),$.remove(e)}(t)}this.xr=_e,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=Y.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=Y.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return R},this.setPixelRatio=function(e){void 0!==e&&(R=e,this.setSize(S,T,!1))},this.getSize=function(e){return e.set(S,T)},this.setSize=function(e,n,r){_e.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(S=e,T=n,t.width=Math.floor(e*R),t.height=Math.floor(n*R),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(S*R,T*R).floor()},this.setDrawingBufferSize=function(e,n,r){S=e,T=n,R=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(_)},this.getViewport=function(e){return e.copy(B)},this.setViewport=function(e,t,n,r){e.isVector4?B.set(e.x,e.y,e.z,e.w):B.set(e,t,n,r),Z.viewport(_.copy(B).multiplyScalar(R).floor())},this.getScissor=function(e){return e.copy(N)},this.setScissor=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),Z.scissor(w.copy(N).multiplyScalar(R).floor())},this.getScissorTest=function(){return z},this.setScissorTest=function(e){Z.setScissorTest(z=e)},this.setOpaqueSort=function(e){q=e},this.setTransparentSort=function(e){D=e},this.getClearColor=function(e){return e.copy(he.getClearColor())},this.setClearColor=function(){he.setClearColor.apply(he,arguments)},this.getClearAlpha=function(){return he.getClearAlpha()},this.setClearAlpha=function(){he.setClearAlpha.apply(he,arguments)},this.clear=function(e,t,n){let r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),ve.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",we,!1),t.removeEventListener("webglcontextrestored",Me,!1),Ae.dispose(),le.dispose(),$.dispose(),te.dispose(),ne.dispose(),oe.dispose(),ge.dispose(),ae.dispose(),_e.dispose(),_e.removeEventListener("sessionstart",Te),_e.removeEventListener("sessionend",Ce),G&&(G.dispose(),G=null),Re.stop()},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=W);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=function(e,t,n,r,i){!0!==t.isScene&&(t=W);ee.resetTextureUnits();const o=t.fog,a=r.isMeshStandardMaterial?t.environment:null,s=null===y?p.outputEncoding:!0===y.isXRRenderTarget?y.texture.encoding:J,A=(r.isMeshStandardMaterial?ne:te).get(r.envMap||a),l=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,c=!!r.normalMap&&!!n.attributes.tangent,u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,f=n.morphAttributes.position?n.morphAttributes.position.length:0,m=r.toneMapped?p.toneMapping:0,g=$.get(r),v=h.state.lights;if(!0===F&&(!0===H||e!==b)){const t=e===b&&r.id===x;ce.setState(r,e,t)}let _=!1;r.version===g.__version?g.needsLights&&g.lightsStateVersion!==v.state.version||g.outputEncoding!==s||i.isInstancedMesh&&!1===g.instancing?_=!0:i.isInstancedMesh||!0!==g.instancing?i.isSkinnedMesh&&!1===g.skinning?_=!0:i.isSkinnedMesh||!0!==g.skinning?g.envMap!==A||r.fog&&g.fog!==o?_=!0:void 0===g.numClippingPlanes||g.numClippingPlanes===ce.numPlanes&&g.numIntersection===ce.numIntersection?(g.vertexAlphas!==l||g.vertexTangents!==c||g.morphTargets!==u||g.morphNormals!==d||g.toneMapping!==m||!0===X.isWebGL2&&g.morphTargetsCount!==f)&&(_=!0):_=!0:_=!0:_=!0:(_=!0,g.__version=r.version);let w=g.currentProgram;!0===_&&(w=Ne(r,t,i));let M=!1,S=!1,E=!1;const C=w.getUniforms(),P=g.uniforms;Z.useProgram(w.program)&&(M=!0,S=!0,E=!0);r.id!==x&&(x=r.id,S=!0);if(M||b!==e){if(C.setValue(ve,"projectionMatrix",e.projectionMatrix),X.logarithmicDepthBuffer&&C.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),b!==e&&(b=e,S=!0,E=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){const t=C.map.cameraPosition;void 0!==t&&t.setValue(ve,j.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&C.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||i.isSkinnedMesh)&&C.setValue(ve,"viewMatrix",e.matrixWorldInverse)}if(i.isSkinnedMesh){C.setOptional(ve,i,"bindMatrix"),C.setOptional(ve,i,"bindMatrixInverse");const e=i.skeleton;e&&(X.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),C.setValue(ve,"boneTexture",e.boneTexture,ee),C.setValue(ve,"boneTextureSize",e.boneTextureSize)):C.setOptional(ve,e,"boneMatrices"))}!n||void 0===n.morphAttributes.position&&void 0===n.morphAttributes.normal||de.update(i,n,r,w);(S||g.receiveShadow!==i.receiveShadow)&&(g.receiveShadow=i.receiveShadow,C.setValue(ve,"receiveShadow",i.receiveShadow));S&&(C.setValue(ve,"toneMappingExposure",p.toneMappingExposure),g.needsLights&&(q=E,(L=P).ambientLightColor.needsUpdate=q,L.lightProbe.needsUpdate=q,L.directionalLights.needsUpdate=q,L.directionalLightShadows.needsUpdate=q,L.pointLights.needsUpdate=q,L.pointLightShadows.needsUpdate=q,L.spotLights.needsUpdate=q,L.spotLightShadows.needsUpdate=q,L.rectAreaLights.needsUpdate=q,L.hemisphereLights.needsUpdate=q),o&&r.fog&&se.refreshFogUniforms(P,o),se.refreshMaterialUniforms(P,r,R,T,G),Wi.upload(ve,g.uniformsList,P,ee));var L,q;r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(Wi.upload(ve,g.uniformsList,P,ee),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&C.setValue(ve,"center",i.center);return C.setValue(ve,"modelViewMatrix",i.modelViewMatrix),C.setValue(ve,"normalMatrix",i.normalMatrix),C.setValue(ve,"modelMatrix",i.matrixWorld),w}(e,t,n,r,i);Z.setMaterial(r,a);let A=n.index;const l=n.attributes.position;if(null===A){if(void 0===l||0===l.count)return}else if(0===A.count)return;let c,u=1;!0===r.wireframe&&(A=ie.getWireframeAttribute(n),u=2),ge.setup(i,r,s,n,A);let d=fe;null!==A&&(c=re.get(A),d=pe,d.setIndex(c));const f=null!==A?A.count:l.count,m=n.drawRange.start*u,g=n.drawRange.count*u,v=null!==o?o.start*u:0,_=null!==o?o.count*u:1/0,w=Math.max(m,v),M=Math.min(f,m+g,v+_)-1,S=Math.max(0,M-w+1);if(0!==S){if(i.isMesh)!0===r.wireframe?(Z.setLineWidth(r.wireframeLinewidth*Q()),d.setMode(1)):d.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),Z.setLineWidth(e*Q()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(w,S,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(w,S,e)}else d.render(w,S)}},this.compile=function(e,t){h=le.get(e),h.init(),f.push(h),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(h.pushLight(e),e.castShadow&&h.pushShadow(e))})),h.setupLights(p.physicallyCorrectLights),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){Ne(n[r],e,t)}else Ne(n,e,t)})),f.pop(),h=null};let Ee=null;function Te(){Re.stop()}function Ce(){Re.start()}const Re=new Jn;function Pe(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||U.intersectsSprite(e)){r&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);const t=oe.update(e),i=e.material;i.visible&&u.push(e,t,i,n,j.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==K.render.frame&&(e.skeleton.update(),e.skeleton.frame=K.render.frame),!e.frustumCulled||U.intersectsObject(e))){r&&j.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);const t=oe.update(e),i=e.material;if(Array.isArray(i)){const r=t.groups;for(let o=0,a=r.length;o<a;o++){const a=r[o],s=i[a.materialIndex];s&&s.visible&&u.push(e,t,s,n,j.z,a)}}else i.visible&&u.push(e,t,i,n,j.z,null)}const i=e.children;for(let e=0,o=i.length;e<o;e++)Pe(i[e],t,n,r)}function Le(e,t,n,r){const i=e.opaque,o=e.transmissive,s=e.transparent;h.setupLightsView(n),o.length>0&&function(e,t,n){if(null===G){const e=!0===a&&!0===X.isWebGL2;G=new(e?Ie:De)(1024,1024,{generateMipmaps:!0,type:null!==me.convert(O)?O:L,minFilter:P,magFilter:C,wrapS:E,wrapT:E,useRenderToTexture:Y.has("WEBGL_multisampled_render_to_texture")})}const r=p.getRenderTarget();p.setRenderTarget(G),p.clear();const i=p.toneMapping;p.toneMapping=0,Oe(e,t,n),p.toneMapping=i,ee.updateMultisampleRenderTarget(G),ee.updateRenderTargetMipmap(G),p.setRenderTarget(r)}(i,t,n),r&&Z.viewport(_.copy(r)),i.length>0&&Oe(i,t,n),o.length>0&&Oe(o,t,n),s.length>0&&Oe(s,t,n)}function Oe(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=o.object,s=o.geometry,A=null===r?o.material:r,l=o.group;a.layers.test(n.layers)&&ke(a,t,n,s,A,l)}}function ke(e,t,n,r,i,o){e.onBeforeRender(p,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(p,t,n,r,e,o),!0===i.transparent&&2===i.side?(i.side=1,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,o),i.side=0,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,o),i.side=2):p.renderBufferDirect(n,t,r,i,e,o),e.onAfterRender(p,t,n,r,i,o)}function Ne(e,t,n){!0!==t.isScene&&(t=W);const r=$.get(e),i=h.state.lights,o=h.state.shadowsArray,a=i.state.version,s=ae.getParameters(e,i.state,o,t,n),A=ae.getProgramCacheKey(s);let l=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?ne:te).get(e.envMap||r.environment),void 0===l&&(e.addEventListener("dispose",Se),l=new Map,r.programs=l);let c=l.get(A);if(void 0!==c){if(r.currentProgram===c&&r.lightsStateVersion===a)return ze(e,s),c}else s.uniforms=ae.getUniforms(e),e.onBuild(n,s,p),e.onBeforeCompile(s,p),c=ae.acquireProgram(s,A),l.set(A,c),r.uniforms=s.uniforms;const u=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=ce.uniform),ze(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(u.ambientLightColor.value=i.state.ambient,u.lightProbe.value=i.state.probe,u.directionalLights.value=i.state.directional,u.directionalLightShadows.value=i.state.directionalShadow,u.spotLights.value=i.state.spot,u.spotLightShadows.value=i.state.spotShadow,u.rectAreaLights.value=i.state.rectArea,u.ltc_1.value=i.state.rectAreaLTC1,u.ltc_2.value=i.state.rectAreaLTC2,u.pointLights.value=i.state.point,u.pointLightShadows.value=i.state.pointShadow,u.hemisphereLights.value=i.state.hemi,u.directionalShadowMap.value=i.state.directionalShadowMap,u.directionalShadowMatrix.value=i.state.directionalShadowMatrix,u.spotShadowMap.value=i.state.spotShadowMap,u.spotShadowMatrix.value=i.state.spotShadowMatrix,u.pointShadowMap.value=i.state.pointShadowMap,u.pointShadowMatrix.value=i.state.pointShadowMatrix);const d=c.getUniforms(),f=Wi.seqWithValue(d.seq,u);return r.currentProgram=c,r.uniformsList=f,c}function ze(e,t){const n=$.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Re.setAnimationLoop((function(e){Ee&&Ee(e)})),"undefined"!=typeof window&&Re.setContext(window),this.setAnimationLoop=function(e){Ee=e,_e.setAnimationLoop(e),null===e?Re.stop():Re.start()},_e.addEventListener("sessionstart",Te),_e.addEventListener("sessionend",Ce),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===m)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===_e.enabled&&!0===_e.isPresenting&&(!0===_e.cameraAutoUpdate&&_e.updateCamera(t),t=_e.getCamera()),!0===e.isScene&&e.onBeforeRender(p,e,t,y),h=le.get(e,f.length),h.init(),f.push(h),V.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),U.setFromProjectionMatrix(V),H=this.localClippingEnabled,F=ce.init(this.clippingPlanes,H,t),u=Ae.get(e,d.length),u.init(),d.push(u),Pe(e,t,0,p.sortObjects),u.finish(),!0===p.sortObjects&&u.sort(q,D),!0===F&&ce.beginShadows();const n=h.state.shadowsArray;if(ue.render(n,e,t),!0===F&&ce.endShadows(),!0===this.info.autoReset&&this.info.reset(),he.render(u,e),h.setupLights(p.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];Le(u,e,r,r.viewport)}}else Le(u,e,t);null!==y&&(ee.updateMultisampleRenderTarget(y),ee.updateRenderTargetMipmap(y)),!0===e.isScene&&e.onAfterRender(p,e,t),Z.buffers.depth.setTest(!0),Z.buffers.depth.setMask(!0),Z.buffers.color.setMask(!0),Z.setPolygonOffset(!1),ge.resetDefaultState(),x=-1,b=null,f.pop(),h=f.length>0?f[f.length-1]:null,d.pop(),u=d.length>0?d[d.length-1]:null},this.getActiveCubeFace=function(){return g},this.getActiveMipmapLevel=function(){return v},this.getRenderTarget=function(){return y},this.setRenderTargetTextures=function(e,t,n){$.get(e.texture).__webglTexture=t,$.get(e.depthTexture).__webglTexture=n;const r=$.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||e.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),e.useRenderToTexture=!1,e.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(e,t){const n=$.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){y=e,g=t,v=n;let r=!0;if(e){const t=$.get(e);void 0!==t.__useDefaultFramebuffer?(Z.bindFramebuffer(36160,null),r=!1):void 0===t.__webglFramebuffer?ee.setupRenderTarget(e):t.__hasExternalTextures&&ee.rebindTextures(e,$.get(e.texture).__webglTexture,$.get(e.depthTexture).__webglTexture)}let i=null,o=!1,a=!1;if(e){const n=e.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(a=!0);const r=$.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=r[t],o=!0):i=e.useRenderbuffer?$.get(e).__webglMultisampledFramebuffer:r,_.copy(e.viewport),w.copy(e.scissor),M=e.scissorTest}else _.copy(B).multiplyScalar(R).floor(),w.copy(N).multiplyScalar(R).floor(),M=z;if(Z.bindFramebuffer(36160,i)&&X.drawBuffers&&r&&Z.drawBuffers(e,i),Z.viewport(_),Z.scissor(w),Z.setScissorTest(M),o){const r=$.get(e.texture);ve.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(a){const r=$.get(e.texture),i=t||0;ve.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}x=-1},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=$.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){Z.bindFramebuffer(36160,s);try{const a=e.texture,s=a.format,A=a.type;if(s!==k&&me.convert(s)!==ve.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const l=A===O&&(Y.has("EXT_color_buffer_half_float")||X.isWebGL2&&Y.has("EXT_color_buffer_float"));if(!(A===L||me.convert(A)===ve.getParameter(35738)||A===I&&(X.isWebGL2||Y.has("OES_texture_float")||Y.has("WEBGL_color_buffer_float"))||l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ve.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ve.readPixels(t,n,r,i,me.convert(s),me.convert(A),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==y?$.get(y).__webglFramebuffer:null;Z.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){if(!0!==t.isFramebufferTexture)return void console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);ee.setTexture2D(t,0),ve.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,o),Z.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,a=me.convert(n.format),s=me.convert(n.type);ee.setTexture2D(n,0),ve.pixelStorei(37440,n.flipY),ve.pixelStorei(37441,n.premultiplyAlpha),ve.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ve.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&ve.generateMipmap(3553),Z.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(p.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,A=me.convert(r.format),l=me.convert(r.type);let c;if(r.isDataTexture3D)ee.setTexture3D(r,0),c=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ee.setTexture2DArray(r,0),c=35866}ve.pixelStorei(37440,r.flipY),ve.pixelStorei(37441,r.premultiplyAlpha),ve.pixelStorei(3317,r.unpackAlignment);const u=ve.getParameter(3314),h=ve.getParameter(32878),d=ve.getParameter(3316),f=ve.getParameter(3315),m=ve.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(3314,g.width),ve.pixelStorei(32878,g.height),ve.pixelStorei(3316,e.min.x),ve.pixelStorei(3315,e.min.y),ve.pixelStorei(32877,e.min.z),n.isDataTexture||n.isDataTexture3D?ve.texSubImage3D(c,i,t.x,t.y,t.z,o,a,s,A,l,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(c,i,t.x,t.y,t.z,o,a,s,A,g.data)):ve.texSubImage3D(c,i,t.x,t.y,t.z,o,a,s,A,l,g),ve.pixelStorei(3314,u),ve.pixelStorei(32878,h),ve.pixelStorei(3316,d),ve.pixelStorei(3315,f),ve.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ve.generateMipmap(c),Z.unbindTexture()},this.initTexture=function(e){ee.setTexture2D(e,0),Z.unbindTexture()},this.resetState=function(){g=0,v=0,y=null,Z.reset(),ge.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Uo.prototype.isWebGLRenderer=!0;(class extends Uo{}).prototype.isWebGL1Renderer=!0;class Fo extends Nt{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}Fo.prototype.isScene=!0;class Ho{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=ee,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=le()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=le()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=le()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}Ho.prototype.isInterleavedBuffer=!0;const Go=new Be;class Vo{constructor(e,t,n,r=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Go.x=this.getX(t),Go.y=this.getY(t),Go.z=this.getZ(t),Go.applyMatrix4(e),this.setXYZ(t,Go.x,Go.y,Go.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Go.x=this.getX(t),Go.y=this.getY(t),Go.z=this.getZ(t),Go.applyNormalMatrix(e),this.setXYZ(t,Go.x,Go.y,Go.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Go.x=this.getX(t),Go.y=this.getY(t),Go.z=this.getZ(t),Go.transformDirection(e),this.setXYZ(t,Go.x,Go.y,Go.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new tn(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Vo(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}Vo.prototype.isInterleavedBufferAttribute=!0;class jo extends Jt{constructor(e){super(),this.type="SpriteMaterial",this.color=new Ee(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let Wo;jo.prototype.isSpriteMaterial=!0;const Qo=new Be,Yo=new Be,Xo=new Be,Zo=new me,Jo=new me,Ko=new dt,$o=new Be,ea=new Be,ta=new Be,na=new me,ra=new me,ia=new me;function oa(e,t,n,r,i,o){Zo.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Jo.x=o*Zo.x-i*Zo.y,Jo.y=i*Zo.x+o*Zo.y):Jo.copy(Zo),e.copy(t),e.x+=Jo.x,e.y+=Jo.y,e.applyMatrix4(Ko)}(class extends Nt{constructor(e){if(super(),this.type="Sprite",void 0===Wo){Wo=new dn;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new Ho(e,5);Wo.setIndex([0,1,2,0,2,3]),Wo.setAttribute("position",new Vo(t,3,0,!1)),Wo.setAttribute("uv",new Vo(t,2,3,!1))}this.geometry=Wo,this.material=void 0!==e?e:new jo,this.center=new me(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Yo.setFromMatrixScale(this.matrixWorld),Ko.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Xo.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Yo.multiplyScalar(-Xo.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;oa($o.set(-.5,-.5,0),Xo,o,Yo,r,i),oa(ea.set(.5,-.5,0),Xo,o,Yo,r,i),oa(ta.set(.5,.5,0),Xo,o,Yo,r,i),na.set(0,0),ra.set(1,0),ia.set(1,1);let a=e.ray.intersectTriangle($o,ea,ta,!1,Qo);if(null===a&&(oa(ea.set(-.5,.5,0),Xo,o,Yo,r,i),ra.set(0,1),a=e.ray.intersectTriangle($o,ta,ea,!1,Qo),null===a))return;const s=e.ray.origin.distanceTo(Qo);s<e.near||s>e.far||t.push({distance:s,point:Qo.clone(),uv:Xt.getUV(Qo,$o,ea,ta,na,ra,ia,new me),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}).prototype.isSprite=!0;const aa=new Be,sa=new qe,Aa=new qe,la=new Be,ca=new dt;class ua extends Ln{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new dt,this.bindMatrixInverse=new dt}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new qe,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;sa.fromBufferAttribute(r.attributes.skinIndex,e),Aa.fromBufferAttribute(r.attributes.skinWeight,e),aa.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=Aa.getComponent(e);if(0!==r){const i=sa.getComponent(e);ca.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(la.copy(aa).applyMatrix4(ca),r)}}return t.applyMatrix4(this.bindMatrixInverse)}}ua.prototype.isSkinnedMesh=!0;(class extends Nt{constructor(){super(),this.type="Bone"}}).prototype.isBone=!0;(class extends Pe{constructor(e=null,t=1,n=1,r,i,o,a,s,A=1003,l=1003,c,u){super(null,o,a,s,A,l,r,i,c,u),this.image={data:e,width:t,height:n},this.magFilter=A,this.minFilter=l,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}).prototype.isDataTexture=!0;class ha extends tn{constructor(e,t,n,r=1){"number"==typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}ha.prototype.isInstancedBufferAttribute=!0;const da=new dt,fa=new dt,pa=[],ma=new Ln;(class extends Ln{constructor(e,t,n){super(e,t),this.instanceMatrix=new ha(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(ma.geometry=this.geometry,ma.material=this.material,void 0!==ma.material)for(let i=0;i<r;i++){this.getMatrixAt(i,da),fa.multiplyMatrices(n,da),ma.matrixWorld=fa,ma.raycast(e,pa);for(let e=0,n=pa.length;e<n;e++){const n=pa[e];n.instanceId=i,n.object=this,t.push(n)}pa.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new ha(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}).prototype.isInstancedMesh=!0;class ga extends Jt{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Ee(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this}}ga.prototype.isLineBasicMaterial=!0;const va=new Be,ya=new Be,xa=new dt,ba=new ht,_a=new it;class wa extends Nt{constructor(e=new dn,t=new ga){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)va.fromBufferAttribute(t,e-1),ya.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=va.distanceTo(ya);e.setAttribute("lineDistance",new on(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),_a.copy(n.boundingSphere),_a.applyMatrix4(r),_a.radius+=i,!1===e.ray.intersectsSphere(_a))return;xa.copy(r).invert(),ba.copy(e.ray).applyMatrix4(xa);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,A=new Be,l=new Be,c=new Be,u=new Be,h=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count)-1;n<a;n+=h){const o=r.getX(n),a=r.getX(n+1);A.fromBufferAttribute(i,o),l.fromBufferAttribute(i,a);if(ba.distanceSqToSegment(A,l,u,c)>s)continue;u.applyMatrix4(this.matrixWorld);const h=e.ray.origin.distanceTo(u);h<e.near||h>e.far||t.push({distance:h,point:c.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=h){A.fromBufferAttribute(i,n),l.fromBufferAttribute(i,n+1);if(ba.distanceSqToSegment(A,l,u,c)>s)continue;u.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(u);r<e.near||r>e.far||t.push({distance:r,point:c.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}wa.prototype.isLine=!0;const Ma=new Be,Sa=new Be;class Ea extends wa{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)Ma.fromBufferAttribute(t,e),Sa.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+Ma.distanceTo(Sa);e.setAttribute("lineDistance",new on(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}Ea.prototype.isLineSegments=!0;(class extends wa{constructor(e,t){super(e,t),this.type="LineLoop"}}).prototype.isLineLoop=!0;class Ta extends Jt{constructor(e){super(),this.type="PointsMaterial",this.color=new Ee(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this}}Ta.prototype.isPointsMaterial=!0;const Ca=new dt,Ra=new ht,Pa=new it,La=new Be;function qa(e,t,n,r,i,o,a){const s=Ra.distanceSqToPoint(e);if(s<n){const n=new Be;Ra.closestPointToPoint(e,n),n.applyMatrix4(r);const A=i.ray.origin.distanceTo(n);if(A<i.near||A>i.far)return;o.push({distance:A,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:a})}}(class extends Nt{constructor(e=new dn,t=new Ta){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Pa.copy(n.boundingSphere),Pa.applyMatrix4(r),Pa.radius+=i,!1===e.ray.intersectsSphere(Pa))return;Ca.copy(r).invert(),Ra.copy(e.ray).applyMatrix4(Ca);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i){for(let n=Math.max(0,o.start),A=Math.min(i.count,o.start+o.count);n<A;n++){const o=i.getX(n);La.fromBufferAttribute(a,o),qa(La,o,s,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);n<i;n++)La.fromBufferAttribute(a,n),qa(La,n,s,r,e,t,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}).prototype.isPoints=!0;(class extends Pe{constructor(e,t,n,r,i,o,a,s,A){super(e,t,n,r,i,o,a,s,A),this.minFilter=void 0!==o?o:R,this.magFilter=void 0!==i?i:R,this.generateMipmaps=!1;const l=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){l.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}).prototype.isVideoTexture=!0;(class extends Pe{constructor(e,t,n){super({width:e,height:t}),this.format=n,this.magFilter=C,this.minFilter=C,this.generateMipmaps=!1,this.needsUpdate=!0}}).prototype.isFramebufferTexture=!0;(class extends Pe{constructor(e,t,n,r,i,o,a,s,A,l,c,u){super(null,o,a,s,A,l,r,i,c,u),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}).prototype.isCompressedTexture=!0;(class extends Pe{constructor(e,t,n,r,i,o,a,s,A){super(e,t,n,r,i,o,a,s,A),this.needsUpdate=!0}}).prototype.isCanvasTexture=!0;class Da extends dn{constructor(e=1,t=8,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],o=[],a=[],s=[],A=new Be,l=new me;o.push(0,0,0),a.push(0,0,1),s.push(.5,.5);for(let i=0,c=3;i<=t;i++,c+=3){const u=n+i/t*r;A.x=e*Math.cos(u),A.y=e*Math.sin(u),o.push(A.x,A.y,A.z),a.push(0,0,1),l.x=(o[c]/e+1)/2,l.y=(o[c+1]/e+1)/2,s.push(l.x,l.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new on(o,3)),this.setAttribute("normal",new on(a,3)),this.setAttribute("uv",new on(s,2))}static fromJSON(e){return new Da(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Ia extends dn{constructor(e=1,t=1,n=1,r=8,i=1,o=!1,a=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};const A=this;r=Math.floor(r),i=Math.floor(i);const l=[],c=[],u=[],h=[];let d=0;const f=[],p=n/2;let m=0;function g(n){const i=d,o=new me,f=new Be;let g=0;const v=!0===n?e:t,y=!0===n?1:-1;for(let e=1;e<=r;e++)c.push(0,p*y,0),u.push(0,y,0),h.push(.5,.5),d++;const x=d;for(let e=0;e<=r;e++){const t=e/r*s+a,n=Math.cos(t),i=Math.sin(t);f.x=v*i,f.y=p*y,f.z=v*n,c.push(f.x,f.y,f.z),u.push(0,y,0),o.x=.5*n+.5,o.y=.5*i*y+.5,h.push(o.x,o.y),d++}for(let e=0;e<r;e++){const t=i+e,r=x+e;!0===n?l.push(r,r+1,t):l.push(r+1,r,t),g+=3}A.addGroup(m,g,!0===n?1:2),m+=g}!function(){const o=new Be,g=new Be;let v=0;const y=(t-e)/n;for(let A=0;A<=i;A++){const l=[],m=A/i,v=m*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+a,A=Math.sin(i),f=Math.cos(i);g.x=v*A,g.y=-m*n+p,g.z=v*f,c.push(g.x,g.y,g.z),o.set(A,y,f).normalize(),u.push(o.x,o.y,o.z),h.push(t,1-m),l.push(d++)}f.push(l)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=f[t][e],r=f[t+1][e],i=f[t+1][e+1],o=f[t][e+1];l.push(n,r,o),l.push(r,i,o),v+=6}A.addGroup(m,v,0),m+=v}(),!1===o&&(e>0&&g(!0),t>0&&g(!1)),this.setIndex(l),this.setAttribute("position",new on(c,3)),this.setAttribute("normal",new on(u,3)),this.setAttribute("uv",new on(h,2))}static fromJSON(e){return new Ia(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}new Be,new Be,new Be,new Xt;class Oa{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let a,s=0,A=i-1;for(;s<=A;)if(r=Math.floor(s+(A-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){A=r;break}A=r-1}if(r=A,n[r]===o)return r/(i-1);const l=n[r];return(r+(o-l)/(n[r+1]-l))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const o=this.getPoint(r),a=this.getPoint(i),s=t||(o.isVector2?new me:new Be);return s.copy(a).sub(o).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new Be,r=[],i=[],o=[],a=new Be,s=new dt;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new Be)}i[0]=new Be,o[0]=new Be;let A=Number.MAX_VALUE;const l=Math.abs(r[0].x),c=Math.abs(r[0].y),u=Math.abs(r[0].z);l<=A&&(A=l,n.set(1,0,0)),c<=A&&(A=c,n.set(0,1,0)),u<=A&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),o[t]=o[t-1].clone(),a.crossVectors(r[t-1],r[t]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(ce(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(a,e))}o[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(ce(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Ba extends Oa{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(e,t){const n=t||new me,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const a=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(a),A=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=A-this.aY;s=n*e-r*t+this.aX,A=n*t+r*e+this.aY}return n.set(s,A)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}Ba.prototype.isEllipseCurve=!0;class ka extends Ba{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function Na(){let e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){let A=(t-e)/o-(n-e)/(o+a)+(n-t)/a,l=(n-t)/a-(r-t)/(a+s)+(r-n)/s;A*=a,l*=a,i(t,n,A,l)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}ka.prototype.isArcCurve=!0;const za=new Be,Ua=new Na,Fa=new Na,Ha=new Na;class Ga extends Oa{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new Be){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let a,s,A=Math.floor(o),l=o-A;this.closed?A+=A>0?0:(Math.floor(Math.abs(A)/i)+1)*i:0===l&&A===i-1&&(A=i-2,l=1),this.closed||A>0?a=r[(A-1)%i]:(za.subVectors(r[0],r[1]).add(r[0]),a=za);const c=r[A%i],u=r[(A+1)%i];if(this.closed||A+2<i?s=r[(A+2)%i]:(za.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=za),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(a.distanceToSquared(c),e),n=Math.pow(c.distanceToSquared(u),e),r=Math.pow(u.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),Ua.initNonuniformCatmullRom(a.x,c.x,u.x,s.x,t,n,r),Fa.initNonuniformCatmullRom(a.y,c.y,u.y,s.y,t,n,r),Ha.initNonuniformCatmullRom(a.z,c.z,u.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(Ua.initCatmullRom(a.x,c.x,u.x,s.x,this.tension),Fa.initCatmullRom(a.y,c.y,u.y,s.y,this.tension),Ha.initCatmullRom(a.z,c.z,u.z,s.z,this.tension));return n.set(Ua.calc(l),Fa.calc(l),Ha.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Be).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Va(e,t,n,r,i){const o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function ja(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Wa(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}Ga.prototype.isCatmullRomCurve3=!0;class Qa extends Oa{constructor(e=new me,t=new me,n=new me,r=new me){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new me){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Wa(e,r.x,i.x,o.x,a.x),Wa(e,r.y,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Qa.prototype.isCubicBezierCurve=!0;class Ya extends Oa{constructor(e=new Be,t=new Be,n=new Be,r=new Be){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Be){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Wa(e,r.x,i.x,o.x,a.x),Wa(e,r.y,i.y,o.y,a.y),Wa(e,r.z,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Ya.prototype.isCubicBezierCurve3=!0;class Xa extends Oa{constructor(e=new me,t=new me){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new me){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new me;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Xa.prototype.isLineCurve=!0;class Za extends Oa{constructor(e=new me,t=new me,n=new me){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new me){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(ja(e,r.x,i.x,o.x),ja(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Za.prototype.isQuadraticBezierCurve=!0;class Ja extends Oa{constructor(e=new Be,t=new Be,n=new Be){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Be){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(ja(e,r.x,i.x,o.x),ja(e,r.y,i.y,o.y),ja(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ja.prototype.isQuadraticBezierCurve3=!0;class Ka extends Oa{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new me){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],A=r[o],l=r[o>r.length-2?r.length-1:o+1],c=r[o>r.length-3?r.length-1:o+2];return n.set(Va(a,s.x,A.x,l.x,c.x),Va(a,s.y,A.y,l.y,c.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new me).fromArray(n))}return this}}Ka.prototype.isSplineCurve=!0;var $a=Object.freeze({__proto__:null,ArcCurve:ka,CatmullRomCurve3:Ga,CubicBezierCurve:Qa,CubicBezierCurve3:Ya,EllipseCurve:Ba,LineCurve:Xa,LineCurve3:class extends Oa{constructor(e=new Be,t=new Be){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new Be){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},QuadraticBezierCurve:Za,QuadraticBezierCurve3:Ja,SplineCurve:Ka});class es extends Oa{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Xa(t,e))}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,o=this.curves[i],a=o.getLength(),s=0===a?0:1-e/a;return o.getPointAt(s,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new $a[n.type]).fromJSON(n))}return this}}class ts extends es{constructor(e){super(),this.type="Path",this.currentPoint=new me,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Xa(this.currentPoint.clone(),new me(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new Za(this.currentPoint.clone(),new me(e,t),new me(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const a=new Qa(this.currentPoint.clone(),new me(e,t),new me(n,r),new me(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Ka(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,a,s){const A=this.currentPoint.x,l=this.currentPoint.y;return this.absellipse(e+A,t+l,n,r,i,o,a,s),this}absellipse(e,t,n,r,i,o,a,s){const A=new Ba(e,t,n,r,i,o,a,s);if(this.curves.length>0){const e=A.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(A);const l=A.getPoint(1);return this.currentPoint.copy(l),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class ns extends ts{constructor(e){super(e),this.uuid=le(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new ts).fromJSON(n))}return this}}const rs=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let o=is(e,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,A,l,c,u,h,d;if(r&&(o=function(e,t,n,r){const i=[];let o,a,s,A,l;for(o=0,a=t.length;o<a;o++)s=t[o]*r,A=o<a-1?t[o+1]*r:e.length,l=is(e,s,A,r,!1),l===l.next&&(l.steiner=!0),i.push(ps(l));for(i.sort(us),o=0;o<i.length;o++)hs(i[o],n),n=os(n,n.next);return n}(e,t,o,n)),e.length>80*n){s=l=e[0],A=c=e[1];for(let t=n;t<i;t+=n)u=e[t],h=e[t+1],u<s&&(s=u),h<A&&(A=h),u>l&&(l=u),h>c&&(c=h);d=Math.max(l-s,c-A),d=0!==d?1/d:0}return as(o,a,n,s,A,d),a};function is(e,t,n,r,i){let o,a;if(i===function(e,t,n,r){let i=0;for(let o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=Ss(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=Ss(o,e[o],e[o+1],a);return a&&ys(a,a.next)&&(Es(a),a=a.next),a}function os(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!ys(r,r.next)&&0!==vs(r.prev,r,r.next))r=r.next;else{if(Es(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function as(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=fs(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,a,s,A,l=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<l&&(s++,r=r.nextZ,r);t++);for(A=l;s>0||A>0&&r;)0!==s&&(0===A||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,A--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(e,r,i,o);let s,A,l=e;for(;e.prev!==e.next;)if(s=e.prev,A=e.next,o?As(e,r,i,o):ss(e))t.push(s.i/n),t.push(e.i/n),t.push(A.i/n),Es(e),e=A.next,l=A.next;else if((e=A)===l){a?1===a?as(e=ls(os(e),t,n),t,n,r,i,o,2):2===a&&cs(e,t,n,r,i,o):as(os(e),t,n,r,i,o,1);break}}function ss(e){const t=e.prev,n=e,r=e.next;if(vs(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(ms(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&vs(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function As(e,t,n,r){const i=e.prev,o=e,a=e.next;if(vs(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,A=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,u=fs(s,A,t,n,r),h=fs(l,c,t,n,r);let d=e.prevZ,f=e.nextZ;for(;d&&d.z>=u&&f&&f.z<=h;){if(d!==e.prev&&d!==e.next&&ms(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&vs(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,f!==e.prev&&f!==e.next&&ms(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&vs(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&ms(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&vs(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&ms(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&vs(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function ls(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!ys(i,o)&&xs(i,r,r.next,o)&&ws(i,o)&&ws(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Es(r),Es(r.next),r=e=o),r=r.next}while(r!==e);return os(r)}function cs(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&gs(a,e)){let s=Ms(a,e);return a=os(a,a.next),s=os(s,s.next),as(a,t,n,r,i,o),void as(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function us(e,t){return e.x-t.x}function hs(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;const s=o,A=o.x,l=o.y;let c,u=1/0;n=o;do{r>=n.x&&n.x>=A&&r!==n.x&&ms(i<l?r:a,i,A,l,i<l?a:r,i,n.x,n.y)&&(c=Math.abs(i-n.y)/(r-n.x),ws(n,e)&&(c<u||c===u&&(n.x>o.x||n.x===o.x&&ds(o,n)))&&(o=n,u=c)),n=n.next}while(n!==s);return o}(e,t),t){const n=Ms(t,e);os(t,t.next),os(n,n.next)}}function ds(e,t){return vs(e.prev,e,t.prev)<0&&vs(t.next,e,e.next)<0}function fs(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function ps(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function ms(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function gs(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&xs(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(ws(e,t)&&ws(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(vs(e.prev,e,t.prev)||vs(e,t.prev,t))||ys(e,t)&&vs(e.prev,e,e.next)>0&&vs(t.prev,t,t.next)>0)}function vs(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function ys(e,t){return e.x===t.x&&e.y===t.y}function xs(e,t,n,r){const i=_s(vs(e,t,n)),o=_s(vs(e,t,r)),a=_s(vs(n,r,e)),s=_s(vs(n,r,t));return i!==o&&a!==s||(!(0!==i||!bs(e,n,t))||(!(0!==o||!bs(e,r,t))||(!(0!==a||!bs(n,e,r))||!(0!==s||!bs(n,t,r)))))}function bs(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function _s(e){return e>0?1:e<0?-1:0}function ws(e,t){return vs(e.prev,e,e.next)<0?vs(e,t,e.next)>=0&&vs(e,e.prev,t)>=0:vs(e,t,e.prev)<0||vs(e,e.next,t)<0}function Ms(e,t){const n=new Ts(e.i,e.x,e.y),r=new Ts(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Ss(e,t,n,r){const i=new Ts(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Es(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ts(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Cs{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return Cs.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];Rs(e),Ps(n,e);let o=e.length;t.forEach(Rs);for(let e=0;e<t.length;e++)r.push(o),o+=t[e].length,Ps(n,t[e]);const a=rs(n,r);for(let e=0;e<a.length;e+=3)i.push(a.slice(e,e+3));return i}}function Rs(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Ps(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Ls extends dn{constructor(e=new ns([new me(.5,.5),new me(-.5,.5),new me(-.5,-.5),new me(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let t=0,n=e.length;t<n;t++){o(e[t])}function o(e){const o=[],a=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let A=void 0!==t.depth?t.depth:1,l=void 0===t.bevelEnabled||t.bevelEnabled,c=void 0!==t.bevelThickness?t.bevelThickness:.2,u=void 0!==t.bevelSize?t.bevelSize:c-.1,h=void 0!==t.bevelOffset?t.bevelOffset:0,d=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,p=void 0!==t.UVGenerator?t.UVGenerator:qs;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),A=t.amount);let m,g,v,y,x,b=!1;f&&(m=f.getSpacedPoints(s),b=!0,l=!1,g=f.computeFrenetFrames(s,!1),v=new Be,y=new Be,x=new Be),l||(d=0,c=0,u=0,h=0);const _=e.extractPoints(a);let w=_.shape;const M=_.holes;if(!Cs.isClockWise(w)){w=w.reverse();for(let e=0,t=M.length;e<t;e++){const t=M[e];Cs.isClockWise(t)&&(M[e]=t.reverse())}}const S=Cs.triangulateShape(w,M),E=w;for(let e=0,t=M.length;e<t;e++){const t=M[e];w=w.concat(t)}function T(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const C=w.length,R=S.length;function P(e,t,n){let r,i,o;const a=e.x-t.x,s=e.y-t.y,A=n.x-e.x,l=n.y-e.y,c=a*a+s*s,u=a*l-s*A;if(Math.abs(u)>Number.EPSILON){const u=Math.sqrt(c),h=Math.sqrt(A*A+l*l),d=t.x-s/u,f=t.y+a/u,p=((n.x-l/h-d)*l-(n.y+A/h-f)*A)/(a*l-s*A);r=d+a*p-e.x,i=f+s*p-e.y;const m=r*r+i*i;if(m<=2)return new me(r,i);o=Math.sqrt(m/2)}else{let e=!1;a>Number.EPSILON?A>Number.EPSILON&&(e=!0):a<-Number.EPSILON?A<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(l)&&(e=!0),e?(r=-s,i=a,o=Math.sqrt(c)):(r=a,i=s,o=Math.sqrt(c/2))}return new me(r/o,i/o)}const L=[];for(let e=0,t=E.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),L[e]=P(E[e],E[n],E[r]);const q=[];let D,I=L.concat();for(let e=0,t=M.length;e<t;e++){const t=M[e];D=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),D[e]=P(t[e],t[r],t[i]);q.push(D),I=I.concat(D)}for(let e=0;e<d;e++){const t=e/d,n=c*Math.cos(t*Math.PI/2),r=u*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=T(E[e],L[e],r);k(t.x,t.y,-n)}for(let e=0,t=M.length;e<t;e++){const t=M[e];D=q[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],D[e],r);k(i.x,i.y,-n)}}}const O=u+h;for(let e=0;e<C;e++){const t=l?T(w[e],I[e],O):w[e];b?(y.copy(g.normals[0]).multiplyScalar(t.x),v.copy(g.binormals[0]).multiplyScalar(t.y),x.copy(m[0]).add(y).add(v),k(x.x,x.y,x.z)):k(t.x,t.y,0)}for(let e=1;e<=s;e++)for(let t=0;t<C;t++){const n=l?T(w[t],I[t],O):w[t];b?(y.copy(g.normals[e]).multiplyScalar(n.x),v.copy(g.binormals[e]).multiplyScalar(n.y),x.copy(m[e]).add(y).add(v),k(x.x,x.y,x.z)):k(n.x,n.y,A/s*e)}for(let e=d-1;e>=0;e--){const t=e/d,n=c*Math.cos(t*Math.PI/2),r=u*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=T(E[e],L[e],r);k(t.x,t.y,A+n)}for(let e=0,t=M.length;e<t;e++){const t=M[e];D=q[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],D[e],r);b?k(i.x,i.y+m[s-1].y,m[s-1].x+n):k(i.x,i.y,A+n)}}}function B(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*d;e<n;e++){const n=C*e,o=C*(e+1);z(t+r+n,t+i+n,t+i+o,t+r+o)}}}function k(e,t,n){o.push(e),o.push(t),o.push(n)}function N(e,t,i){U(e),U(t),U(i);const o=r.length/3,a=p.generateTopUV(n,r,o-3,o-2,o-1);F(a[0]),F(a[1]),F(a[2])}function z(e,t,i,o){U(e),U(t),U(o),U(t),U(i),U(o);const a=r.length/3,s=p.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);F(s[0]),F(s[1]),F(s[3]),F(s[1]),F(s[2]),F(s[3])}function U(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function F(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(l){let e=0,t=C*e;for(let e=0;e<R;e++){const n=S[e];N(n[2]+t,n[1]+t,n[0]+t)}e=s+2*d,t=C*e;for(let e=0;e<R;e++){const n=S[e];N(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<R;e++){const t=S[e];N(t[2],t[1],t[0])}for(let e=0;e<R;e++){const t=S[e];N(t[0]+C*s,t[1]+C*s,t[2]+C*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;B(E,t),t+=E.length;for(let e=0,n=M.length;e<n;e++){const n=M[e];B(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new on(r,3)),this.setAttribute("uv",new on(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.uuid)}else n.shapes.push(e.uuid);void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new $a[r.type]).fromJSON(r)),new Ls(n,e.options)}}const qs={generateTopUV:function(e,t,n,r,i){const o=t[3*n],a=t[3*n+1],s=t[3*r],A=t[3*r+1],l=t[3*i],c=t[3*i+1];return[new me(o,a),new me(s,A),new me(l,c)]},generateSideWallUV:function(e,t,n,r,i,o){const a=t[3*n],s=t[3*n+1],A=t[3*n+2],l=t[3*r],c=t[3*r+1],u=t[3*r+2],h=t[3*i],d=t[3*i+1],f=t[3*i+2],p=t[3*o],m=t[3*o+1],g=t[3*o+2];return Math.abs(s-c)<Math.abs(a-l)?[new me(a,1-A),new me(l,1-u),new me(h,1-f),new me(p,1-g)]:[new me(s,1-A),new me(c,1-u),new me(d,1-f),new me(m,1-g)]}};class Ds extends dn{constructor(e=new ns([new me(0,.5),new me(-.5,-.5),new me(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(e))A(e);else for(let t=0;t<e.length;t++)A(e[t]),this.addGroup(a,s,t),a+=s,s=0;function A(e){const a=r.length/3,A=e.extractPoints(t);let l=A.shape;const c=A.holes;!1===Cs.isClockWise(l)&&(l=l.reverse());for(let e=0,t=c.length;e<t;e++){const t=c[e];!0===Cs.isClockWise(t)&&(c[e]=t.reverse())}const u=Cs.triangulateShape(l,c);for(let e=0,t=c.length;e<t;e++){const t=c[e];l=l.concat(t)}for(let e=0,t=l.length;e<t;e++){const t=l[e];r.push(t.x,t.y,0),i.push(0,0,1),o.push(t.x,t.y)}for(let e=0,t=u.length;e<t;e++){const t=u[e],r=t[0]+a,i=t[1]+a,o=t[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new on(r,3)),this.setAttribute("normal",new on(i,3)),this.setAttribute("uv",new on(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new Ds(n,e.curveSegments)}}class Is extends dn{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(o+a,Math.PI);let A=0;const l=[],c=new Be,u=new Be,h=[],d=[],f=[],p=[];for(let h=0;h<=n;h++){const m=[],g=h/n;let v=0;0==h&&0==o?v=.5/t:h==n&&s==Math.PI&&(v=-.5/t);for(let n=0;n<=t;n++){const s=n/t;c.x=-e*Math.cos(r+s*i)*Math.sin(o+g*a),c.y=e*Math.cos(o+g*a),c.z=e*Math.sin(r+s*i)*Math.sin(o+g*a),d.push(c.x,c.y,c.z),u.copy(c).normalize(),f.push(u.x,u.y,u.z),p.push(s+v,1-g),m.push(A++)}l.push(m)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){const t=l[e][r+1],i=l[e][r],a=l[e+1][r],A=l[e+1][r+1];(0!==e||o>0)&&h.push(t,i,A),(e!==n-1||s<Math.PI)&&h.push(i,a,A)}this.setIndex(h),this.setAttribute("position",new on(d,3)),this.setAttribute("normal",new on(f,3)),this.setAttribute("uv",new on(p,2))}static fromJSON(e){return new Is(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Os extends dn{constructor(e=new Ja(new Be(-1,-1,0),new Be(-1,1,0),new Be(1,1,0)),t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new Be,s=new Be,A=new me;let l=new Be;const c=[],u=[],h=[],d=[];function f(i){l=e.getPointAt(i/t,l);const A=o.normals[i],h=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);s.x=o*A.x+i*h.x,s.y=o*A.y+i*h.y,s.z=o*A.z+i*h.z,s.normalize(),u.push(s.x,s.y,s.z),a.x=l.x+n*s.x,a.y=l.y+n*s.y,a.z=l.z+n*s.z,c.push(a.x,a.y,a.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)A.x=e/t,A.y=n/r,h.push(A.x,A.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;d.push(n,i,a),d.push(i,o,a)}}()}(),this.setIndex(d),this.setAttribute("position",new on(c,3)),this.setAttribute("normal",new on(u,3)),this.setAttribute("uv",new on(h,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Os((new $a[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}function Bs(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r,i),!0)}(class extends Jt{constructor(e){super(),this.type="ShadowMaterial",this.color=new Ee(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}).prototype.isShadowMaterial=!0;class ks extends Jt{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ee(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ee(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(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.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}ks.prototype.isMeshStandardMaterial=!0;(class extends ks{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new me(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return ce(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenColor=new Ee(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new Ee(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Ee(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}).prototype.isMeshPhysicalMaterial=!0;class Ns extends Jt{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Ee(16777215),this.specular=new Ee(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ee(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}}Ns.prototype.isMeshPhongMaterial=!0;(class extends Jt{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ee(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ee(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}).prototype.isMeshToonMaterial=!0;(class extends Jt{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}).prototype.isMeshNormalMaterial=!0;class zs extends Jt{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Ee(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ee(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}}zs.prototype.isMeshLambertMaterial=!0;(class extends Jt{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ee(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}}).prototype.isMeshMatcapMaterial=!0;(class extends ga{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}).prototype.isLineDashedMaterial=!0;const Us={arraySlice:function(e,t,n){return Us.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const a=[];for(let e=0;e<o.tracks.length;++e){const t=o.tracks[e],s=t.getValueSize(),A=[],l=[];for(let e=0;e<t.times.length;++e){const o=t.times[e]*i;if(!(o<n||o>=r)){A.push(t.times[e]);for(let n=0;n<s;++n)l.push(t.values[e*s+n])}}0!==A.length&&(t.times=Us.convertArray(A,t.times.constructor),t.values=Us.convertArray(l,t.values.constructor),a.push(t))}o.tracks=a;let s=1/0;for(let e=0;e<o.tracks.length;++e)s>o.tracks[e].times[0]&&(s=o.tracks[e].times[0]);for(let e=0;e<o.tracks.length;++e)o.tracks[e].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const a=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===a)continue;let s=0;const A=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=A/3);let l=0;const c=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(l=c/3);const u=r.times.length-1;let h;if(o<=r.times[0]){const e=s,t=A-s;h=Us.arraySlice(r.values,e,t)}else if(o>=r.times[u]){const e=u*A+s,t=e+A-s;h=Us.arraySlice(r.values,e,t)}else{const e=r.createInterpolant(),t=s,n=A-s;e.evaluate(o),h=Us.arraySlice(e.resultBuffer,t,n)}if("quaternion"===i){(new Oe).fromArray(h).normalize().conjugate().toArray(h)}const d=a.times.length;for(let e=0;e<d;++e){const t=e*c+l;if("quaternion"===i)Oe.multiplyQuaternionsFlat(a.values,t,h,0,a.values,t);else{const e=c-2*l;for(let n=0;n<e;++n)a.values[t+n]-=h[n]}}}return e.blendMode=2501,e}};class Fs{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const a=t[1];e<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}Fs.prototype.beforeStart_=Fs.prototype.copySampleValue_,Fs.prototype.afterEnd_=Fs.prototype.copySampleValue_;class Hs extends Fs{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Q,endingEnd:Q}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Y:i=e,a=2*t-n;break;case X:i=r.length-2,a=t+r[i]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Y:o=e,s=2*n-t;break;case X:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}const A=.5*(n-t),l=this.valueSize;this._weightPrev=A/(t-a),this._weightNext=A/(s-n),this._offsetPrev=i*l,this._offsetNext=o*l}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,A=s-a,l=this._offsetPrev,c=this._offsetNext,u=this._weightPrev,h=this._weightNext,d=(n-t)/(r-t),f=d*d,p=f*d,m=-u*p+2*u*f-u*d,g=(1+u)*p+(-1.5-2*u)*f+(-.5+u)*d+1,v=(-1-h)*p+(1.5+h)*f+.5*d,y=h*p-h*f;for(let e=0;e!==a;++e)i[e]=m*o[l+e]+g*o[A+e]+v*o[s+e]+y*o[c+e];return i}}class Gs extends Fs{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,A=s-a,l=(n-t)/(r-t),c=1-l;for(let e=0;e!==a;++e)i[e]=o[A+e]*c+o[s+e]*l;return i}}class Vs extends Fs{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class js{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Us.convertArray(t,this.TimeBufferType),this.values=Us.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Us.convertArray(e.times,Array),values:Us.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Vs(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Gs(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Hs(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case V:t=this.InterpolantFactoryMethodDiscrete;break;case j:t=this.InterpolantFactoryMethodLinear;break;case W:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return V;case this.InterpolantFactoryMethodLinear:return j;case this.InterpolantFactoryMethodSmooth:return W}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=Us.arraySlice(n,i,o),this.values=Us.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==o&&o>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,o),e=!1;break}o=r}if(void 0!==r&&Us.isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=Us.arraySlice(this.times),t=Us.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===W,i=e.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=e[a];if(s!==e[a+1]&&(1!==a||s!==e[0]))if(r)i=!0;else{const e=a*n,r=e-n,o=e+n;for(let a=0;a!==n;++a){const n=t[e+a];if(n!==t[r+a]||n!==t[o+a]){i=!0;break}}}if(i){if(a!==o){e[o]=e[a];const r=a*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,a=0;a!==n;++a)t[r+a]=t[e+a];++o}return o!==e.length?(this.times=Us.arraySlice(e,0,o),this.values=Us.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=Us.arraySlice(this.times,0),t=Us.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}js.prototype.TimeBufferType=Float32Array,js.prototype.ValueBufferType=Float32Array,js.prototype.DefaultInterpolation=j;class Ws extends js{}Ws.prototype.ValueTypeName="bool",Ws.prototype.ValueBufferType=Array,Ws.prototype.DefaultInterpolation=V,Ws.prototype.InterpolantFactoryMethodLinear=void 0,Ws.prototype.InterpolantFactoryMethodSmooth=void 0;class Qs extends js{}Qs.prototype.ValueTypeName="color";class Ys extends js{}Ys.prototype.ValueTypeName="number";class Xs extends Fs{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t);let A=e*a;for(let e=A+a;A!==e;A+=4)Oe.slerpFlat(i,0,o,A-a,o,A,s);return i}}class Zs extends js{InterpolantFactoryMethodLinear(e){return new Xs(this.times,this.values,this.getValueSize(),e)}}Zs.prototype.ValueTypeName="quaternion",Zs.prototype.DefaultInterpolation=j,Zs.prototype.InterpolantFactoryMethodSmooth=void 0;class Js extends js{}Js.prototype.ValueTypeName="string",Js.prototype.ValueBufferType=Array,Js.prototype.DefaultInterpolation=V,Js.prototype.InterpolantFactoryMethodLinear=void 0,Js.prototype.InterpolantFactoryMethodSmooth=void 0;class Ks extends js{}Ks.prototype.ValueTypeName="vector";class $s{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=le(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(eA(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(js.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let e=0;e<i;e++){let a=[],s=[];a.push((e+i-1)%i,e,(e+1)%i),s.push(0,1,0);const A=Us.getKeyframeOrder(a);a=Us.sortedArray(a,1,A),s=Us.sortedArray(s,1,A),r||0!==a[0]||(a.push(i),s.push(s[0])),o.push(new Ys(".morphTargetInfluences["+t[e].name+"]",a,s).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],o=n.name.match(i);if(o&&o.length>1){const e=o[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const o=[];for(const e in r)o.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],a=[];Us.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode;let s=e.length||-1;const A=e.hierarchy||[];for(let e=0;e<A.length;e++){const i=A[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],o=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),o.push(r.morphTarget===n?1:0)}r.push(new Ys(".morphTargetInfluence["+n+"]",e,o))}s=e.length*(o||1)}else{const o=".bones["+t[e].name+"]";n(Ks,o+".position",i,"pos",r),n(Zs,o+".quaternion",i,"rot",r),n(Ks,o+".scale",i,"scl",r)}}if(0===r.length)return null;return new this(i,s,r,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function eA(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ys;case"vector":case"vector2":case"vector3":case"vector4":return Ks;case"color":return Qs;case"quaternion":return Zs;case"bool":case"boolean":return Ws;case"string":return Js}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Us.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const tA={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};const nA=new class{constructor(e,t,n){const r=this;let i,o=!1,a=0,s=0;const A=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===o&&void 0!==r.onStart&&r.onStart(e,a,s),o=!0},this.itemEnd=function(e){a++,void 0!==r.onProgress&&r.onProgress(e,a,s),a===s&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return A.push(e,t),this},this.removeHandler=function(e){const t=A.indexOf(e);return-1!==t&&A.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=A.length;t<n;t+=2){const n=A[t],r=A[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}};class rA{constructor(e){this.manager=void 0!==e?e:nA,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const iA={};class oA extends rA{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=tA.get(e);if(void 0!==i)return this.manager.itemStart(e),setTimeout((()=>{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==iA[e])return void iA[e].push({onLoad:t,onProgress:n,onError:r});iA[e]=[],iA[e].push({onLoad:t,onProgress:n,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,s=this.responseType;fetch(o).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const n=iA[e],r=t.body.getReader(),i=t.headers.get("Content-Length"),o=i?parseInt(i):0,a=0!==o;let s=0;const A=new ReadableStream({start(e){!function t(){r.read().then((({done:r,value:i})=>{if(r)e.close();else{s+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:a,loaded:s,total:o});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}}))}()}});return new Response(A)}throw Error(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`)})).then((e=>{switch(s){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{tA.add(e,t);const n=iA[e];delete iA[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}})).catch((t=>{const n=iA[e];if(void 0===n)throw this.manager.itemError(e),t;delete iA[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)})).finally((()=>{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class aA extends rA{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=tA.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a=ye("img");function s(){l(),tA.add(e,this),t&&t(this),i.manager.itemEnd(e)}function A(t){l(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function l(){a.removeEventListener("load",s,!1),a.removeEventListener("error",A,!1)}return a.addEventListener("load",s,!1),a.addEventListener("error",A,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class sA extends rA{constructor(e){super(e)}load(e,t,n,r){const i=new Hn,o=new aA(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,a++,6===a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)s(t);return i}}class AA extends rA{constructor(e){super(e)}load(e,t,n,r){const i=new Pe,o=new aA(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class lA extends Nt{constructor(e,t=1){super(),this.type="Light",this.color=new Ee(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}lA.prototype.isLight=!0;(class extends lA{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(Nt.DefaultUp),this.updateMatrix(),this.groundColor=new Ee(t)}copy(e){return lA.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}).prototype.isHemisphereLight=!0;const cA=new dt,uA=new Be,hA=new Be;class dA{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new me(512,512),this.map=null,this.mapPass=null,this.matrix=new dt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Zn,this._frameExtents=new me(1,1),this._viewportCount=1,this._viewports=[new qe(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;uA.setFromMatrixPosition(e.matrixWorld),t.position.copy(uA),hA.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(hA),t.updateMatrixWorld(),cA.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(cA),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class fA extends dA{constructor(){super(new zn(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*Ae*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}fA.prototype.isSpotLightShadow=!0;(class extends lA{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(Nt.DefaultUp),this.updateMatrix(),this.target=new Nt,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new fA}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}).prototype.isSpotLight=!0;const pA=new dt,mA=new Be,gA=new Be;class vA extends dA{constructor(){super(new zn(90,1,.5,500)),this._frameExtents=new me(4,2),this._viewportCount=6,this._viewports=[new qe(2,1,1,1),new qe(0,1,1,1),new qe(3,1,1,1),new qe(1,1,1,1),new qe(3,0,1,1),new qe(1,0,1,1)],this._cubeDirections=[new Be(1,0,0),new Be(-1,0,0),new Be(0,0,1),new Be(0,0,-1),new Be(0,1,0),new Be(0,-1,0)],this._cubeUps=[new Be(0,1,0),new Be(0,1,0),new Be(0,1,0),new Be(0,1,0),new Be(0,0,1),new Be(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),mA.setFromMatrixPosition(e.matrixWorld),n.position.copy(mA),gA.copy(n.position),gA.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(gA),n.updateMatrixWorld(),r.makeTranslation(-mA.x,-mA.y,-mA.z),pA.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(pA)}}vA.prototype.isPointLightShadow=!0;(class extends lA{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new vA}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}).prototype.isPointLight=!0;class yA extends dA{constructor(){super(new lr(-5,5,5,-5,.5,500))}}yA.prototype.isDirectionalLightShadow=!0;class xA extends lA{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(Nt.DefaultUp),this.updateMatrix(),this.target=new Nt,this.shadow=new yA}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}xA.prototype.isDirectionalLight=!0;class bA extends lA{constructor(e,t){super(e,t),this.type="AmbientLight"}}bA.prototype.isAmbientLight=!0;(class extends lA{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}).prototype.isRectAreaLight=!0;class _A{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Be)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}_A.prototype.isSphericalHarmonics3=!0;class wA extends lA{constructor(e=new _A,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}wA.prototype.isLightProbe=!0;class MA extends dn{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}MA.prototype.isInstancedBufferGeometry=!0;let SA;(class extends rA{constructor(e){super(e),"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=tA.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){tA.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}).prototype.isImageBitmapLoader=!0;const EA=function(){return void 0===SA&&(SA=new(window.AudioContext||window.webkitAudioContext)),SA};class TA extends rA{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new oA(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{const e=n.slice(0);EA().decodeAudioData(e,(function(e){t(e)}))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}}(class extends wA{constructor(e,t,n=1){super(void 0,n);const r=(new Ee).set(e),i=(new Ee).set(t),o=new Be(r.r,r.g,r.b),a=new Be(i.r,i.g,i.b),s=Math.sqrt(Math.PI),A=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(A)}}).prototype.isHemisphereLightProbe=!0;(class extends wA{constructor(e,t=1){super(void 0,t);const n=(new Ee).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}).prototype.isAmbientLightProbe=!0;class CA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=RA(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=RA();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function RA(){return("undefined"==typeof performance?Date:performance).now()}class PA{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){Oe.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;Oe.multiplyQuaternionsFlat(e,o,e,t,e,n),Oe.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const LA="\\[\\]\\.:\\/",qA=new RegExp("[\\[\\]\\.:\\/]","g"),DA="[^\\[\\]\\.:\\/]",IA="[^"+LA.replace("\\.","")+"]",OA=/((?:WC+[\/:])*)/.source.replace("WC",DA),BA=/(WCOD+)?/.source.replace("WCOD",IA),kA=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",DA),NA=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",DA),zA=new RegExp("^"+OA+BA+kA+NA+"$"),UA=["material","materials","bones"];class FA{constructor(e,t,n){this.path=t,this.parsedPath=n||FA.parseTrackName(t),this.node=FA.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new FA.Composite(e,t,n):new FA(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(qA,"")}static parseTrackName(e){const t=zA.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==UA.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=FA.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let a=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}FA.Composite=class{constructor(e,t,n){const r=n||FA.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},FA.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},FA.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},FA.prototype.GetterByBindingType=[FA.prototype._getValue_direct,FA.prototype._getValue_array,FA.prototype._getValue_arrayElement,FA.prototype._getValue_toArray],FA.prototype.SetterByBindingTypeAndVersioning=[[FA.prototype._setValue_direct,FA.prototype._setValue_direct_setNeedsUpdate,FA.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[FA.prototype._setValue_array,FA.prototype._setValue_array_setNeedsUpdate,FA.prototype._setValue_array_setMatrixWorldNeedsUpdate],[FA.prototype._setValue_arrayElement,FA.prototype._setValue_arrayElement_setNeedsUpdate,FA.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[FA.prototype._setValue_fromArray,FA.prototype._setValue_fromArray_setNeedsUpdate,FA.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class HA{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,a=new Array(o),s={endingStart:Q,endingEnd:Q};for(let e=0;e!==o;++e){const t=i[e].createInterpolant(null);a[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,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}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,A=a.sampleValues;return s[0]=i,s[1]=i+n,A[0]=e/o,A[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(a);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,a)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=2202===n;if(0===e)return-1===i?r:o&&1==(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Y,r.endingEnd=Y):(r.endingStart=e?this.zeroSlopeAtStart?Y:Q:X,r.endingEnd=t?this.zeroSlopeAtEnd?Y:Q:X)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}(class extends ie{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,A=this._bindingsByRootAndName;let l=A[s];void 0===l&&(l={},A[s]=l);for(let e=0;e!==i;++e){const i=r[e],A=i.name;let c=l[A];if(void 0!==c)++c.referenceCount,o[e]=c;else{if(c=o[e],void 0!==c){null===c._cacheIndex&&(++c.referenceCount,this._addInactiveBinding(c,s,A));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;c=new PA(FA.create(n,A,r),i.ValueTypeName,i.getValueSize()),++c.referenceCount,this._addInactiveBinding(c,s,A),o[e]=c}a[e].resultBuffer=c.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,A=s[s.length-1],l=e._byClipCacheIndex;A._byClipCacheIndex=l,s[l]=A,s.pop(),e._byClipCacheIndex=null;delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],A=e._cacheIndex;s._cacheIndex=A,t[A]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new Gs(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"==typeof e?$s.findByName(r,e):e;const a=null!==o?o.uuid:e,s=this._actionsByClip[a];let A=null;if(void 0===n&&(n=null!==o?o.blendMode:Z),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;A=s.knownActions[0],null===o&&(o=A._clip)}if(null===o)return null;const l=new HA(this,o,t,n);return this._bindAction(l,A),this._addInactiveAction(l,a,i),l}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?$s.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let a=0;a!==n;++a){t[a]._update(r,e,i,o)}const a=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)a[e].apply(o);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}).prototype._controlInterpolantsResultBuffer=new Float32Array(1);class GA extends Ho{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}GA.prototype.isInstancedInterleavedBuffer=!0;function VA(e,t){return e.distance-t.distance}function jA(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)jA(r[e],t,n,!0)}}class WA{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(ce(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}const QA=new Be,YA=new Be;class XA{constructor(e=new Be,t=new Be){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){QA.subVectors(e,this.start),YA.subVectors(this.end,this.start);const n=YA.dot(YA);let r=YA.dot(QA)/n;return t&&(r=ce(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const ZA=new Be,JA=new dt,KA=new dt;function $A(e){const t=[];e&&e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,$A(e.children[n]));return t}class el{constructor(){this.type="ShapePath",this.color=new Ee,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ts,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new ns;i.curves=r.curves,t.push(i)}return t}function r(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],a=t[o],s=a.x-n.x,A=a.y-n.y;if(Math.abs(A)>Number.EPSILON){if(A<0&&(n=t[o],s=-s,a=t[i],A=-A),e.y<n.y||e.y>a.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=A*(e.x-n.x)-s*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const i=Cs.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let a,s,A;const l=[];if(1===o.length)return s=o[0],A=new ns,A.curves=s.curves,l.push(A),l;let c=!i(o[0].getPoints());c=e?!c:c;const u=[],h=[];let d,f,p=[],m=0;h[m]=void 0,p[m]=[];for(let t=0,n=o.length;t<n;t++)s=o[t],d=s.getPoints(),a=i(d),a=e?!a:a,a?(!c&&h[m]&&m++,h[m]={s:new ns,p:d},h[m].s.curves=s.curves,c&&m++,p[m]=[]):p[m].push({h:s,p:d[0]});if(!h[0])return n(o);if(h.length>1){let e=!1;const t=[];for(let e=0,t=h.length;e<t;e++)u[e]=[];for(let n=0,i=h.length;n<i;n++){const i=p[n];for(let o=0;o<i.length;o++){const a=i[o];let s=!0;for(let i=0;i<h.length;i++)r(a.p,h[i].p)&&(n!==i&&t.push({froms:n,tos:i,hole:o}),s?(s=!1,u[i].push(a)):e=!0);s&&u[n].push(a)}}t.length>0&&(e||(p=u))}for(let e=0,t=h.length;e<t;e++){A=h[e].s,l.push(A),f=p[e];for(let e=0,t=f.length;e<t;e++)A.holes.push(f[e].h)}return l}}const tl=new Float32Array(1);new Int32Array(tl.buffer);function nl(e,t,n){var r,i,o,a,s;function A(){var l=Date.now()-a;l<t&&l>=0?r=setTimeout(A,t-l):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var l=function(){o=this,i=arguments,a=Date.now();var l=n&&!r;return r||(r=setTimeout(A,t)),l&&(s=e.apply(o,i),o=i=null),s};return l.clear=function(){r&&(clearTimeout(r),r=null)},l.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},l}Oa.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Oa.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},ts.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},class extends Ea{constructor(e=10,t=10,n=4473924,r=8947848){n=new Ee(n),r=new Ee(r);const i=t/2,o=e/t,a=e/2,s=[],A=[];for(let e=0,l=0,c=-a;e<=t;e++,c+=o){s.push(-a,0,c,a,0,c),s.push(c,0,-a,c,0,a);const t=e===i?n:r;t.toArray(A,l),l+=3,t.toArray(A,l),l+=3,t.toArray(A,l),l+=3,t.toArray(A,l),l+=3}const l=new dn;l.setAttribute("position",new on(s,3)),l.setAttribute("color",new on(A,3));super(l,new ga({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},class extends Ea{constructor(e){const t=$A(e),n=new dn,r=[],i=[],o=new Ee(0,0,1),a=new Ee(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.setAttribute("position",new on(r,3)),n.setAttribute("color",new on(i,3));super(n,new ga({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");KA.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(JA.multiplyMatrices(KA,i.matrixWorld),ZA.setFromMatrixPosition(JA),r.setXYZ(n,ZA.x,ZA.y,ZA.z),JA.multiplyMatrices(KA,i.parent.matrixWorld),ZA.setFromMatrixPosition(JA),r.setXYZ(n+1,ZA.x,ZA.y,ZA.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},rA.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),class{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}.extractUrlBase(e)},rA.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},ze.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},ze.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},ze.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},ze.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},ze.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},it.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Zn.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},XA.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},ge.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},ge.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},ge.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},ge.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},ge.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},ge.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},dt.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},dt.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},dt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new Be).setFromMatrixColumn(this,3)},dt.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},dt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},dt.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},dt.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},dt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},dt.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},dt.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},dt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},dt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},dt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},dt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},dt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},dt.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},dt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},dt.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},dt.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Qn.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Oe.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Oe.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},ht.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},ht.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},ht.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},Xt.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Xt.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},Xt.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},Xt.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},Xt.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},Xt.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Xt.getBarycoord(e,t,n,r,i)},Xt.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Xt.getNormal(e,t,n,r)},ns.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},ns.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Ls(this,e)},ns.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Ds(this,e)},me.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},me.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},me.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Be.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},Be.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},Be.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},Be.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},Be.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},Be.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},Be.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},Be.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},Be.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},qe.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},qe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Nt.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},Nt.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Nt.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},Nt.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Nt.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Nt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Ln.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(Ln.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),ua.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},zn.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(lA.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(tn.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===te},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(te)}}}),tn.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?te:ee),this},tn.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},tn.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},dn.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},dn.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new tn(arguments[1],arguments[2])))},dn.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},dn.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},dn.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},dn.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},dn.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(dn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Ho.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?te:ee),this},Ho.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Ls.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Ls.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Ls.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},Fo.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Object.defineProperties(Jt.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ee}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(kn.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Uo.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},Uo.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},Uo.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},Uo.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},Uo.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},Uo.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},Uo.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},Uo.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},Uo.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},Uo.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},Uo.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},Uo.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},Uo.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},Uo.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},Uo.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},Uo.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},Uo.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},Uo.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},Uo.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},Uo.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},Uo.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},Uo.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},Uo.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},Uo.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},Uo.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(Uo.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?K:J}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}}),Object.defineProperties(Ro.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(De.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),class extends Nt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new TA).load(e,(function(e){t.setBuffer(e)})),this},Fn.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Fn.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},Ce.crossOrigin=void 0,Ce.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new AA;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Ce.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new sA;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Ce.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Ce.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:p}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=p),nl.debounce=nl;var rl=nl;function il(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ol(e,t,n){return t&&il(e.prototype,t),n&&il(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function al(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Al=ol((function e(t,n){var r=n.default,i=void 0===r?null:r,o=n.triggerUpdate,a=void 0===o||o,s=n.onChange,A=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=i,this.triggerUpdate=a,this.onChange=A}));function ll(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,i=void 0===r?{}:r,o=e.methods,a=void 0===o?{}:o,s=e.aliases,A=void 0===s?{}:s,l=e.init,c=void 0===l?function(){}:l,u=e.update,h=void 0===u?function(){}:u,d=Object.keys(i).map((function(e){return new Al(e,i[e])}));return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function i(t){return o(t,e),s(),i}var o=function(e,n){c.call(i,e,t,n),t.initialised=!0},s=rl((function(){t.initialised&&(h.call(i,t,r),r={})}),1);return d.forEach((function(e){i[e.name]=function(e){var n=e.name,o=e.triggerUpdate,a=void 0!==o&&o,A=e.onChange,l=void 0===A?function(e,t){}:A,c=e.defaultVal,u=void 0===c?null:c;return function(e){var o=t[n];if(!arguments.length)return o;var A=void 0===e?u:e;return t[n]=A,l.call(i,A,t,o),!r.hasOwnProperty(n)&&(r[n]=o),a&&s(),i}}(e)})),Object.keys(a).forEach((function(e){i[e]=function(){for(var n,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return(n=a[e]).call.apply(n,[i,t].concat(o))}})),Object.entries(A).forEach((function(e){var t=al(e,2),n=t[0],r=t[1];return i[n]=i[r]})),i.resetProps=function(){return d.forEach((function(e){i[e.name](e.defaultVal)})),i},i.resetProps(),t._rerender=s,i}}var cl,ul={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-ul.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*ul.Bounce.In(2*e):.5*ul.Bounce.Out(2*e-1)+.5}}},hl="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},dl=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=hl()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var i=this._tweens[n[r]],o=!t;i&&!1===i.update(e,o)&&!t&&delete this._tweens[n[r]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),fl={Linear:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),o=fl.Utils.Linear;return t<0?o(e[0],e[1],r):t>1?o(e[n],e[n-1],n-r):o(e[i],e[i+1>n?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,o=fl.Utils.Bernstein,a=0;a<=r;a++)n+=i(1-t,r-a)*i(t,a)*e[a]*o(r,a);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),o=fl.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),o(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(o(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):o(e[i?i-1:0],e[i],e[n<i+1?n:i+1],e[n<i+2?n:i+2],r-i)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=fl.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(cl=[1],function(e){var t=1;if(cl[e])return cl[e];for(var n=e;n>1;n--)t*=n;return cl[e]=t,t}),CatmullRom:function(e,t,n,r,i){var o=.5*(n-e),a=.5*(r-t),s=i*i;return(2*t-2*n+o+a)*(i*s)+(-3*t+3*n-2*o-a)*s+o*i+t}}},pl=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),ml=new dl,gl=function(){function e(e,t){void 0===t&&(t=ml),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ul.Linear.None,this._interpolationFunction=fl.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=pl.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"==typeof e?hl()+parseFloat(e):e:hl(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var i in n){var o=e[i],a=Array.isArray(o),s=a?"array":typeof o,A=!a&&Array.isArray(n[i]);if("undefined"!==s&&"function"!==s){if(A){var l=n[i];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,o)),n[i]=[o].concat(l)}if("object"!==s&&!a||!o||A)void 0===t[i]&&(t[i]=o),a||(t[i]*=1),r[i]=A?n[i].slice().reverse():t[i]||0;else{for(var c in t[i]=a?[]:{},o)t[i][c]=o[c];r[i]=a?[]:{},this._setupProperties(o,t[i],n[i],r[i])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=hl()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=hl()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=hl()),void 0===t&&(t=!0),this._isPaused)return!0;var n,r,i=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>i)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),r=(e-this._startTime)/this._duration,r=0===this._duration||r>1?1:r;var o=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,s=this._chainedTweens.length;a<s;a++)this._chainedTweens[a].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,r){for(var i in n)if(void 0!==t[i]){var o=t[i]||0,a=n[i],s=Array.isArray(e[i]),A=Array.isArray(a);!s&&A?e[i]=this._interpolationFunction(a,r):"object"==typeof a&&a?this._updateProperties(e[i],o,a,r):"number"==typeof(a=this._handleRelativeValue(o,a))&&(e[i]=o+(a-o)*r)}},e.prototype._handleRelativeValue=function(e,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"==typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),vl=pl.nextId,yl=ml,xl=yl.getAll.bind(yl),bl=yl.removeAll.bind(yl),_l=yl.add.bind(yl),wl=yl.remove.bind(yl),Ml=yl.update.bind(yl),Sl={Easing:ul,Group:dl,Interpolation:fl,now:hl,Sequence:pl,nextId:vl,Tween:gl,VERSION:"18.6.4",getAll:xl,removeAll:bl,add:_l,remove:wl,update:Ml},El={exports:{}};function Tl(e,t,n){n=n||2;var r,i,o,a,s,A,l,c=t&&t.length,u=c?t[0]*n:e.length,h=Cl(e,0,u,n,!0),d=[];if(!h||h.next===h.prev)return d;if(c&&(h=function(e,t,n,r){var i,o,a,s=[];for(i=0,o=t.length;i<o;i++)(a=Cl(e,t[i]*r,i<o-1?t[i+1]*r:e.length,r,!1))===a.next&&(a.steiner=!0),s.push(zl(a));for(s.sort(Ol),i=0;i<s.length;i++)n=Rl(n=Bl(s[i],n),n.next);return n}(e,t,h,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var f=n;f<u;f+=n)(s=e[f])<r&&(r=s),(A=e[f+1])<i&&(i=A),s>o&&(o=s),A>a&&(a=A);l=0!==(l=Math.max(o-r,a-i))?1/l:0}return Pl(h,d,n,r,i,l),d}function Cl(e,t,n,r,i){var o,a;if(i===Kl(e,t,n,r)>0)for(o=t;o<n;o+=r)a=Xl(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=Xl(o,e[o],e[o+1],a);return a&&Gl(a,a.next)&&(Zl(a),a=a.next),a}function Rl(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Gl(r,r.next)&&0!==Hl(r.prev,r,r.next))r=r.next;else{if(Zl(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function Pl(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=Nl(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,A,l=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<l&&(s++,r=r.nextZ);t++);for(A=l;s>0||A>0&&r;)0!==s&&(0===A||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,A--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(e,r,i,o);for(var s,A,l=e;e.prev!==e.next;)if(s=e.prev,A=e.next,o?ql(e,r,i,o):Ll(e))t.push(s.i/n),t.push(e.i/n),t.push(A.i/n),Zl(e),e=A.next,l=A.next;else if((e=A)===l){a?1===a?Pl(e=Dl(Rl(e),t,n),t,n,r,i,o,2):2===a&&Il(e,t,n,r,i,o):Pl(Rl(e),t,n,r,i,o,1);break}}}function Ll(e){var t=e.prev,n=e,r=e.next;if(Hl(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Ul(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Hl(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function ql(e,t,n,r){var i=e.prev,o=e,a=e.next;if(Hl(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,A=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,u=Nl(s,A,t,n,r),h=Nl(l,c,t,n,r),d=e.prevZ,f=e.nextZ;d&&d.z>=u&&f&&f.z<=h;){if(d!==e.prev&&d!==e.next&&Ul(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Hl(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,f!==e.prev&&f!==e.next&&Ul(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Hl(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&Ul(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Hl(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&Ul(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Hl(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Dl(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Gl(i,o)&&Vl(i,r,r.next,o)&&Ql(i,o)&&Ql(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Zl(r),Zl(r.next),r=e=o),r=r.next}while(r!==e);return Rl(r)}function Il(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Fl(a,s)){var A=Yl(a,s);return a=Rl(a,a.next),A=Rl(A,A.next),Pl(a,t,n,r,i,o),void Pl(A,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function Ol(e,t){return e.x-t.x}function Bl(e,t){var n=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n;var A,l=n,c=n.x,u=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&Ul(o<u?i:a,o,c,u,o<u?a:i,o,r.x,r.y)&&(A=Math.abs(o-r.y)/(i-r.x),Ql(r,e)&&(A<h||A===h&&(r.x>n.x||r.x===n.x&&kl(n,r)))&&(n=r,h=A)),r=r.next}while(r!==l);return n}(e,t);if(!n)return t;var r=Yl(n,e),i=Rl(n,n.next);return Rl(r,r.next),t===n?i:t}function kl(e,t){return Hl(e.prev,e,t.prev)<0&&Hl(t.next,e,e.next)<0}function Nl(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function zl(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Ul(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Fl(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Vl(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Ql(e,t)&&Ql(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Hl(e.prev,e,t.prev)||Hl(e,t.prev,t))||Gl(e,t)&&Hl(e.prev,e,e.next)>0&&Hl(t.prev,t,t.next)>0)}function Hl(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Gl(e,t){return e.x===t.x&&e.y===t.y}function Vl(e,t,n,r){var i=Wl(Hl(e,t,n)),o=Wl(Hl(e,t,r)),a=Wl(Hl(n,r,e)),s=Wl(Hl(n,r,t));return i!==o&&a!==s||(!(0!==i||!jl(e,n,t))||(!(0!==o||!jl(e,r,t))||(!(0!==a||!jl(n,e,r))||!(0!==s||!jl(n,t,r)))))}function jl(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Wl(e){return e>0?1:e<0?-1:0}function Ql(e,t){return Hl(e.prev,e,e.next)<0?Hl(e,t,e.next)>=0&&Hl(e,e.prev,t)>=0:Hl(e,t,e.prev)<0||Hl(e,e.next,t)<0}function Yl(e,t){var n=new Jl(e.i,e.x,e.y),r=new Jl(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Xl(e,t,n,r){var i=new Jl(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Zl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Jl(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Kl(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}El.exports=Tl,El.exports.default=Tl,Tl.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(Kl(e,0,o,n));if(i)for(var s=0,A=t.length;s<A;s++){var l=t[s]*n,c=s<A-1?t[s+1]*n:e.length;a-=Math.abs(Kl(e,l,c,n))}var u=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,d=r[s+1]*n,f=r[s+2]*n;u+=Math.abs((e[h]-e[f])*(e[d+1]-e[h+1])-(e[h]-e[d])*(e[f+1]-e[h+1]))}return 0===a&&0===u?0:Math.abs((u-a)/a)},Tl.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n};var $l=El.exports;function ec(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tc(e){let t=e,n=e,r=e;function i(e,t,i=0,o=e.length){if(i<o){if(0!==n(t,t))return o;do{const n=i+o>>>1;r(e[n],t)<0?i=n+1:o=n}while(i<o)}return i}return 2!==e.length&&(t=(t,n)=>e(t)-n,n=ec,r=(t,n)=>ec(e(t),n)),{left:i,center:function(e,n,r=0,o=e.length){const a=i(e,n,r,o-1);return a>r&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,i=0,o=e.length){if(i<o){if(0!==n(t,t))return o;do{const n=i+o>>>1;r(e[n],t)<=0?i=n+1:o=n}while(i<o)}return i}}}const nc=tc(ec).right;tc((function(e){return null===e?NaN:+e})).center;var rc=nc;function ic(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class oc{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],o=e+i,a=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);a&&(t[n++]=a),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,o=0;if(i>0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}var ac=Math.sqrt(50),sc=Math.sqrt(10),Ac=Math.sqrt(2);function lc(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=ac?10:o>=sc?5:o>=Ac?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ac?10:o>=sc?5:o>=Ac?2:1)}function cc(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function uc(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function hc(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}var dc=1e-6,fc=1e-12,pc=Math.PI,mc=pc/2,gc=pc/4,vc=2*pc,yc=180/pc,xc=pc/180,bc=Math.abs,_c=Math.atan,wc=Math.atan2,Mc=Math.cos,Sc=Math.ceil,Ec=Math.hypot,Tc=Math.sin,Cc=Math.sign||function(e){return e>0?1:e<0?-1:0},Rc=Math.sqrt;function Pc(e){return e>1?mc:e<-1?-mc:Math.asin(e)}function Lc(e){return(e=Tc(e/2))*e}function qc(){}function Dc(e,t){e&&Oc.hasOwnProperty(e.type)&&Oc[e.type](e,t)}var Ic={Feature:function(e,t){Dc(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Dc(n[r].geometry,t)}},Oc={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Bc(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Bc(n[r],t,0)},Polygon:function(e,t){kc(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)kc(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Dc(n[r],t)}};function Bc(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function kc(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Bc(e[n],t,1);t.polygonEnd()}function Nc(e,t){e&&Ic.hasOwnProperty(e.type)?Ic[e.type](e,t):Dc(e,t)}var zc,Uc,Fc,Hc,Gc,Vc,jc,Wc,Qc,Yc,Xc,Zc,Jc,Kc,$c,eu,tu=new oc,nu=new oc,ru={point:qc,lineStart:qc,lineEnd:qc,polygonStart:function(){tu=new oc,ru.lineStart=iu,ru.lineEnd=ou},polygonEnd:function(){var e=+tu;nu.add(e<0?vc+e:e),this.lineStart=this.lineEnd=this.point=qc},sphere:function(){nu.add(vc)}};function iu(){ru.point=au}function ou(){su(zc,Uc)}function au(e,t){ru.point=su,zc=e,Uc=t,Fc=e*=xc,Hc=Mc(t=(t*=xc)/2+gc),Gc=Tc(t)}function su(e,t){var n=(e*=xc)-Fc,r=n>=0?1:-1,i=r*n,o=Mc(t=(t*=xc)/2+gc),a=Tc(t),s=Gc*a,A=Hc*o+s*Mc(i),l=s*r*Tc(i);tu.add(wc(l,A)),Fc=e,Hc=o,Gc=a}function Au(e){return[wc(e[1],e[0]),Pc(e[2])]}function lu(e){var t=e[0],n=e[1],r=Mc(n);return[r*Mc(t),r*Tc(t),Tc(n)]}function cu(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function uu(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function hu(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function du(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function fu(e){var t=Rc(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var pu,mu,gu,vu,yu,xu,bu,_u,wu,Mu,Su,Eu,Tu,Cu,Ru,Pu,Lu={point:qu,lineStart:Iu,lineEnd:Ou,polygonStart:function(){Lu.point=Bu,Lu.lineStart=ku,Lu.lineEnd=Nu,Kc=new oc,ru.polygonStart()},polygonEnd:function(){ru.polygonEnd(),Lu.point=qu,Lu.lineStart=Iu,Lu.lineEnd=Ou,tu<0?(Vc=-(Wc=180),jc=-(Qc=90)):Kc>dc?Qc=90:Kc<-1e-6&&(jc=-90),eu[0]=Vc,eu[1]=Wc},sphere:function(){Vc=-(Wc=180),jc=-(Qc=90)}};function qu(e,t){$c.push(eu=[Vc=e,Wc=e]),t<jc&&(jc=t),t>Qc&&(Qc=t)}function Du(e,t){var n=lu([e*xc,t*xc]);if(Jc){var r=uu(Jc,n),i=uu([r[1],-r[0],0],r);fu(i),i=Au(i);var o,a=e-Yc,s=a>0?1:-1,A=i[0]*yc*s,l=bc(a)>180;l^(s*Yc<A&&A<s*e)?(o=i[1]*yc)>Qc&&(Qc=o):l^(s*Yc<(A=(A+360)%360-180)&&A<s*e)?(o=-i[1]*yc)<jc&&(jc=o):(t<jc&&(jc=t),t>Qc&&(Qc=t)),l?e<Yc?zu(Vc,e)>zu(Vc,Wc)&&(Wc=e):zu(e,Wc)>zu(Vc,Wc)&&(Vc=e):Wc>=Vc?(e<Vc&&(Vc=e),e>Wc&&(Wc=e)):e>Yc?zu(Vc,e)>zu(Vc,Wc)&&(Wc=e):zu(e,Wc)>zu(Vc,Wc)&&(Vc=e)}else $c.push(eu=[Vc=e,Wc=e]);t<jc&&(jc=t),t>Qc&&(Qc=t),Jc=n,Yc=e}function Iu(){Lu.point=Du}function Ou(){eu[0]=Vc,eu[1]=Wc,Lu.point=qu,Jc=null}function Bu(e,t){if(Jc){var n=e-Yc;Kc.add(bc(n)>180?n+(n>0?360:-360):n)}else Xc=e,Zc=t;ru.point(e,t),Du(e,t)}function ku(){ru.lineStart()}function Nu(){Bu(Xc,Zc),ru.lineEnd(),bc(Kc)>dc&&(Vc=-(Wc=180)),eu[0]=Vc,eu[1]=Wc,Jc=null}function zu(e,t){return(t-=e)<0?t+360:t}function Uu(e,t){return e[0]-t[0]}function Fu(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function Hu(e){var t,n,r,i,o,a,s;if(Qc=Wc=-(Vc=jc=1/0),$c=[],Nc(e,Lu),n=$c.length){for($c.sort(Uu),t=1,o=[r=$c[0]];t<n;++t)Fu(r,(i=$c[t])[0])||Fu(r,i[1])?(zu(r[0],i[1])>zu(r[0],r[1])&&(r[1]=i[1]),zu(i[0],r[1])>zu(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(s=zu(r[1],i[0]))>a&&(a=s,Vc=i[0],Wc=r[1])}return $c=eu=null,Vc===1/0||jc===1/0?[[NaN,NaN],[NaN,NaN]]:[[Vc,jc],[Wc,Qc]]}var Gu={sphere:qc,point:Vu,lineStart:Wu,lineEnd:Xu,polygonStart:function(){Gu.lineStart=Zu,Gu.lineEnd=Ju},polygonEnd:function(){Gu.lineStart=Wu,Gu.lineEnd=Xu}};function Vu(e,t){e*=xc;var n=Mc(t*=xc);ju(n*Mc(e),n*Tc(e),Tc(t))}function ju(e,t,n){++pu,gu+=(e-gu)/pu,vu+=(t-vu)/pu,yu+=(n-yu)/pu}function Wu(){Gu.point=Qu}function Qu(e,t){e*=xc;var n=Mc(t*=xc);Cu=n*Mc(e),Ru=n*Tc(e),Pu=Tc(t),Gu.point=Yu,ju(Cu,Ru,Pu)}function Yu(e,t){e*=xc;var n=Mc(t*=xc),r=n*Mc(e),i=n*Tc(e),o=Tc(t),a=wc(Rc((a=Ru*o-Pu*i)*a+(a=Pu*r-Cu*o)*a+(a=Cu*i-Ru*r)*a),Cu*r+Ru*i+Pu*o);mu+=a,xu+=a*(Cu+(Cu=r)),bu+=a*(Ru+(Ru=i)),_u+=a*(Pu+(Pu=o)),ju(Cu,Ru,Pu)}function Xu(){Gu.point=Vu}function Zu(){Gu.point=Ku}function Ju(){$u(Eu,Tu),Gu.point=Vu}function Ku(e,t){Eu=e,Tu=t,e*=xc,t*=xc,Gu.point=$u;var n=Mc(t);Cu=n*Mc(e),Ru=n*Tc(e),Pu=Tc(t),ju(Cu,Ru,Pu)}function $u(e,t){e*=xc;var n=Mc(t*=xc),r=n*Mc(e),i=n*Tc(e),o=Tc(t),a=Ru*o-Pu*i,s=Pu*r-Cu*o,A=Cu*i-Ru*r,l=Ec(a,s,A),c=Pc(l),u=l&&-c/l;wu.add(u*a),Mu.add(u*s),Su.add(u*A),mu+=c,xu+=c*(Cu+(Cu=r)),bu+=c*(Ru+(Ru=i)),_u+=c*(Pu+(Pu=o)),ju(Cu,Ru,Pu)}function eh(e){pu=mu=gu=vu=yu=xu=bu=_u=0,wu=new oc,Mu=new oc,Su=new oc,Nc(e,Gu);var t=+wu,n=+Mu,r=+Su,i=Ec(t,n,r);return i<fc&&(t=xu,n=bu,r=_u,mu<dc&&(t=gu,n=vu,r=yu),(i=Ec(t,n,r))<fc)?[NaN,NaN]:[wc(n,t)*yc,Pc(r/i)*yc]}function th(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function nh(e,t){return[bc(e)>pc?e+Math.round(-e/vc)*vc:e,t]}function rh(e,t,n){return(e%=vc)?t||n?th(oh(e),ah(t,n)):oh(e):t||n?ah(t,n):nh}function ih(e){return function(t,n){return[(t+=e)>pc?t-vc:t<-pc?t+vc:t,n]}}function oh(e){var t=ih(e);return t.invert=ih(-e),t}function ah(e,t){var n=Mc(e),r=Tc(e),i=Mc(t),o=Tc(t);function a(e,t){var a=Mc(t),s=Mc(e)*a,A=Tc(e)*a,l=Tc(t),c=l*n+s*r;return[wc(A*i-c*o,s*n-l*r),Pc(c*i+A*o)]}return a.invert=function(e,t){var a=Mc(t),s=Mc(e)*a,A=Tc(e)*a,l=Tc(t),c=l*i-A*o;return[wc(A*i+l*o,s*n+c*r),Pc(c*n-s*r)]},a}function sh(e,t){(t=lu(t))[0]-=e,fu(t);var n,r=(n=-t[1])>1?0:n<-1?pc:Math.acos(n);return((-t[2]<0?-r:r)+vc-dc)%vc}function Ah(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:qc,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function lh(e,t){return bc(e[0]-t[0])<dc&&bc(e[1]-t[1])<dc}function ch(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function uh(e,t,n,r,i){var o,a,s=[],A=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],a=e[t];if(lh(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<t;++o)i.point((r=e[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new ch(r,e,null,!0)),A.push(n.o=new ch(r,null,n,!1)),s.push(n=new ch(a,e,null,!1)),A.push(n.o=new ch(a,null,n,!0))}})),s.length){for(A.sort(t),hh(s),hh(A),o=0,a=A.length;o<a;++o)A[o].e=n=!n;for(var l,c,u=s[0];;){for(var h=u,d=!0;h.v;)if((h=h.n)===u)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=l.length;o<a;++o)i.point((c=l[o])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((c=l[o])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function hh(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function dh(e){return bc(e[0])<=pc?e[0]:Cc(e[0])*((bc(e[0])+pc)%vc-pc)}function fh(e,t){var n=dh(t),r=t[1],i=Tc(r),o=[Tc(n),-Mc(n),0],a=0,s=0,A=new oc;1===i?r=mc+dc:-1===i&&(r=-mc-dc);for(var l=0,c=e.length;l<c;++l)if(h=(u=e[l]).length)for(var u,h,d=u[h-1],f=dh(d),p=d[1]/2+gc,m=Tc(p),g=Mc(p),v=0;v<h;++v,f=x,m=_,g=w,d=y){var y=u[v],x=dh(y),b=y[1]/2+gc,_=Tc(b),w=Mc(b),M=x-f,S=M>=0?1:-1,E=S*M,T=E>pc,C=m*_;if(A.add(wc(C*S*Tc(E),g*w+C*Mc(E))),a+=T?M+S*vc:M,T^f>=n^x>=n){var R=uu(lu(d),lu(y));fu(R);var P=uu(o,R);fu(P);var L=(T^M>=0?-1:1)*Pc(P[2]);(r>L||r===L&&(R[0]||R[1]))&&(s+=T^M>=0?1:-1)}}return(a<-1e-6||a<dc&&A<-1e-12)^1&s}function ph(e,t,n,r){return function(i){var o,a,s,A=t(i),l=Ah(),c=t(l),u=!1,h={point:d,lineStart:p,lineEnd:m,polygonStart:function(){h.point=g,h.lineStart=v,h.lineEnd=y,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=p,h.lineEnd=m,a=uc(a);var e=fh(o,r);a.length?(u||(i.polygonStart(),u=!0),uh(a,gh,e,n,i)):e&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(t,n){e(t,n)&&i.point(t,n)}function f(e,t){A.point(e,t)}function p(){h.point=f,A.lineStart()}function m(){h.point=d,A.lineEnd()}function g(e,t){s.push([e,t]),c.point(e,t)}function v(){c.lineStart(),s=[]}function y(){g(s[0][0],s[0][1]),c.lineEnd();var e,t,n,r,A=c.clean(),h=l.result(),d=h.length;if(s.pop(),o.push(s),s=null,d)if(1&A){if((t=(n=h[0]).length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}}else d>1&&2&A&&h.push(h.pop().concat(h.shift())),a.push(h.filter(mh))}return h}}function mh(e){return e.length>1}function gh(e,t){return((e=e.x)[0]<0?e[1]-mc-dc:mc-e[1])-((t=t.x)[0]<0?t[1]-mc-dc:mc-t[1])}nh.invert=nh;var vh=ph((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?pc:-pc,A=bc(o-n);bc(A-pc)<dc?(e.point(n,r=(r+a)/2>0?mc:-mc),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&A>=pc&&(bc(n-i)<dc&&(n-=i*dc),bc(o-s)<dc&&(o-=s*dc),r=function(e,t,n,r){var i,o,a=Tc(e-n);return bc(a)>dc?_c((Tc(t)*(o=Mc(r))*Tc(n)-Tc(r)*(i=Mc(t))*Tc(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*mc,r.point(-pc,i),r.point(0,i),r.point(pc,i),r.point(pc,0),r.point(pc,-i),r.point(0,-i),r.point(-pc,-i),r.point(-pc,0),r.point(-pc,i);else if(bc(e[0]-t[0])>dc){var o=e[0]<t[0]?pc:-pc;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-pc,-mc]);function yh(e){var t=Mc(e),n=6*xc,r=t>0,i=bc(t)>dc;function o(e,n){return Mc(e)*Mc(n)>t}function a(e,n,r){var i=[1,0,0],o=uu(lu(e),lu(n)),a=cu(o,o),s=o[0],A=a-s*s;if(!A)return!r&&e;var l=t*a/A,c=-t*s/A,u=uu(i,o),h=du(i,l);hu(h,du(o,c));var d=u,f=cu(h,d),p=cu(d,d),m=f*f-p*(cu(h,h)-1);if(!(m<0)){var g=Rc(m),v=du(d,(-f-g)/p);if(hu(v,h),v=Au(v),!r)return v;var y,x=e[0],b=n[0],_=e[1],w=n[1];b<x&&(y=x,x=b,b=y);var M=b-x,S=bc(M-pc)<dc;if(!S&&w<_&&(y=_,_=w,w=y),S||M<dc?S?_+w>0^v[1]<(bc(v[0]-x)<dc?_:w):_<=v[1]&&v[1]<=w:M>pc^(x<=v[0]&&v[0]<=b)){var E=du(d,(-f+g)/p);return hu(E,h),[v,Au(E)]}}}function s(t,n){var i=r?e:pc-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return ph(o,(function(e){var t,n,A,l,c;return{lineStart:function(){l=A=!1,c=1},point:function(u,h){var d,f=[u,h],p=o(u,h),m=r?p?0:s(u,h):p?s(u+(u<0?pc:-pc),h):0;if(!t&&(l=A=p)&&e.lineStart(),p!==A&&(!(d=a(t,f))||lh(t,d)||lh(f,d))&&(f[2]=1),p!==A)c=0,p?(e.lineStart(),d=a(f,t),e.point(d[0],d[1])):(d=a(t,f),e.point(d[0],d[1],2),e.lineEnd()),t=d;else if(i&&t&&r^p){var g;m&n||!(g=a(f,t,!0))||(c=0,r?(e.lineStart(),e.point(g[0][0],g[0][1]),e.point(g[1][0],g[1][1]),e.lineEnd()):(e.point(g[1][0],g[1][1]),e.lineEnd(),e.lineStart(),e.point(g[0][0],g[0][1],3)))}!p||t&&lh(t,f)||e.point(f[0],f[1]),t=f,A=p,n=m},lineEnd:function(){A&&e.lineEnd(),t=null},clean:function(){return c|(l&&A)<<1}}}),(function(t,r,i,o){!function(e,t,n,r,i,o){if(n){var a=Mc(t),s=Tc(t),A=r*n;null==i?(i=t+r*vc,o=t-A/2):(i=sh(a,i),o=sh(a,o),(r>0?i<o:i>o)&&(i+=r*vc));for(var l,c=i;r>0?c>o:c<o;c-=A)l=Au([a,-s*Mc(c),-s*Tc(c)]),e.point(l[0],l[1])}}(o,e,n,i,t,r)}),r?[0,-e]:[-pc,e-pc])}var xh,bh,_h,wh,Mh=1e9,Sh=-Mh;function Eh(e,t,n,r){function i(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function o(i,o,s,l){var c=0,u=0;if(null==i||(c=a(i,s))!==(u=a(o,s))||A(i,o)<0^s>0)do{l.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==u);else l.point(o[0],o[1])}function a(r,i){return bc(r[0]-e)<dc?i>0?0:3:bc(r[0]-n)<dc?i>0?2:1:bc(r[1]-t)<dc?i>0?1:0:i>0?3:2}function s(e,t){return A(e.x,t.x)}function A(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var A,l,c,u,h,d,f,p,m,g,v,y=a,x=Ah(),b={point:_,lineStart:function(){b.point=w,l&&l.push(c=[]);g=!0,m=!1,f=p=NaN},lineEnd:function(){A&&(w(u,h),d&&m&&x.rejoin(),A.push(x.result()));b.point=_,m&&y.lineEnd()},polygonStart:function(){y=x,A=[],l=[],v=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=l.length;n<i;++n)for(var o,a,s=l[n],A=1,c=s.length,u=s[0],h=u[0],d=u[1];A<c;++A)o=h,a=d,h=(u=s[A])[0],d=u[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(e-o)&&++t:d<=r&&(h-o)*(r-a)<(d-a)*(e-o)&&--t;return t}(),n=v&&t,i=(A=uc(A)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&uh(A,s,t,o,a),a.polygonEnd());y=a,A=l=c=null}};function _(e,t){i(e,t)&&y.point(e,t)}function w(o,a){var s=i(o,a);if(l&&c.push([o,a]),g)u=o,h=a,d=s,g=!1,s&&(y.lineStart(),y.point(o,a));else if(s&&m)y.point(o,a);else{var A=[f=Math.max(Sh,Math.min(Mh,f)),p=Math.max(Sh,Math.min(Mh,p))],x=[o=Math.max(Sh,Math.min(Mh,o)),a=Math.max(Sh,Math.min(Mh,a))];!function(e,t,n,r,i,o){var a,s=e[0],A=e[1],l=0,c=1,u=t[0]-s,h=t[1]-A;if(a=n-s,u||!(a>0)){if(a/=u,u<0){if(a<l)return;a<c&&(c=a)}else if(u>0){if(a>c)return;a>l&&(l=a)}if(a=i-s,u||!(a<0)){if(a/=u,u<0){if(a>c)return;a>l&&(l=a)}else if(u>0){if(a<l)return;a<c&&(c=a)}if(a=r-A,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>l&&(l=a)}if(a=o-A,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<c&&(c=a)}return l>0&&(e[0]=s+l*u,e[1]=A+l*h),c<1&&(t[0]=s+c*u,t[1]=A+c*h),!0}}}}}(A,x,e,t,n,r)?s&&(y.lineStart(),y.point(o,a),v=!1):(m||(y.lineStart(),y.point(A[0],A[1])),y.point(x[0],x[1]),s||y.lineEnd(),v=!1)}f=o,p=a,m=s}return b}}var Th={sphere:qc,point:qc,lineStart:function(){Th.point=Rh,Th.lineEnd=Ch},lineEnd:qc,polygonStart:qc,polygonEnd:qc};function Ch(){Th.point=Th.lineEnd=qc}function Rh(e,t){bh=e*=xc,_h=Tc(t*=xc),wh=Mc(t),Th.point=Ph}function Ph(e,t){e*=xc;var n=Tc(t*=xc),r=Mc(t),i=bc(e-bh),o=Mc(i),a=r*Tc(i),s=wh*n-_h*r*o,A=_h*n+wh*r*o;xh.add(wc(Rc(a*a+s*s),A)),bh=e,_h=n,wh=r}var Lh=[null,null],qh={type:"LineString",coordinates:Lh};function Dh(e,t){return Lh[0]=e,Lh[1]=t,function(e){return xh=new oc,Nc(e,Th),+xh}(qh)}var Ih={Feature:function(e,t){return Bh(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Bh(n[r].geometry,t))return!0;return!1}},Oh={Sphere:function(){return!0},Point:function(e,t){return kh(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(kh(n[r],t))return!0;return!1},LineString:function(e,t){return Nh(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Nh(n[r],t))return!0;return!1},Polygon:function(e,t){return zh(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(zh(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Bh(n[r],t))return!0;return!1}};function Bh(e,t){return!(!e||!Oh.hasOwnProperty(e.type))&&Oh[e.type](e,t)}function kh(e,t){return 0===Dh(e,t)}function Nh(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(0===(r=Dh(e[o],t)))return!0;if(o>0&&(i=Dh(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<fc*i)return!0;n=r}return!1}function zh(e,t){return!!fh(e.map(Uh),Fh(t))}function Uh(e){return(e=e.map(Fh)).pop(),e}function Fh(e){return[e[0]*xc,e[1]*xc]}function Hh(e,t){return(e&&Ih.hasOwnProperty(e.type)?Ih[e.type]:Bh)(e,t)}function Gh(e,t,n){var r=hc(e,t-dc,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function Vh(e,t,n){var r=hc(e,t-dc,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function jh(){return function(){var e,t,n,r,i,o,a,s,A,l,c,u,h=10,d=h,f=90,p=360,m=2.5;function g(){return{type:"MultiLineString",coordinates:v()}}function v(){return hc(Sc(r/f)*f,n,f).map(c).concat(hc(Sc(s/p)*p,a,p).map(u)).concat(hc(Sc(t/h)*h,e,h).filter((function(e){return bc(e%f)>dc})).map(A)).concat(hc(Sc(o/d)*d,i,d).filter((function(e){return bc(e%p)>dc})).map(l))}return g.lines=function(){return v().map((function(e){return{type:"LineString",coordinates:e}}))},g.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(u(a).slice(1),c(n).reverse().slice(1),u(s).reverse().slice(1))]}},g.extent=function(e){return arguments.length?g.extentMajor(e).extentMinor(e):g.extentMinor()},g.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),s>a&&(e=s,s=a,a=e),g.precision(m)):[[r,s],[n,a]]},g.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],o=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),o>i&&(n=o,o=i,i=n),g.precision(m)):[[t,o],[e,i]]},g.step=function(e){return arguments.length?g.stepMajor(e).stepMinor(e):g.stepMinor()},g.stepMajor=function(e){return arguments.length?(f=+e[0],p=+e[1],g):[f,p]},g.stepMinor=function(e){return arguments.length?(h=+e[0],d=+e[1],g):[h,d]},g.precision=function(h){return arguments.length?(m=+h,A=Gh(o,i,90),l=Vh(t,e,m),c=Gh(s,a,90),u=Vh(r,n,m),g):m},g.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}function Wh(e,t){var n=e[0]*xc,r=e[1]*xc,i=t[0]*xc,o=t[1]*xc,a=Mc(r),s=Tc(r),A=Mc(o),l=Tc(o),c=a*Mc(n),u=a*Tc(n),h=A*Mc(i),d=A*Tc(i),f=2*Pc(Rc(Lc(o-r)+a*A*Lc(i-n))),p=Tc(f),m=f?function(e){var t=Tc(e*=f)/p,n=Tc(f-e)/p,r=n*c+t*h,i=n*u+t*d,o=n*s+t*l;return[wc(i,r)*yc,wc(o,Rc(r*r+i*i))*yc]}:function(){return[n*yc,r*yc]};return m.distance=f,m}var Qh=e=>e,Yh=1/0,Xh=Yh,Zh=-Yh,Jh=Zh;var Kh={point:function(e,t){e<Yh&&(Yh=e);e>Zh&&(Zh=e);t<Xh&&(Xh=t);t>Jh&&(Jh=t)},lineStart:qc,lineEnd:qc,polygonStart:qc,polygonEnd:qc,result:function(){var e=[[Yh,Xh],[Zh,Jh]];return Zh=Jh=-(Xh=Yh=1/0),e}};function $h(e){return function(t){var n=new ed;for(var r in e)n[r]=e[r];return n.stream=t,n}}function ed(){}function td(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),Nc(n,e.stream(Kh)),t(Kh.result()),null!=r&&e.clipExtent(r),e}function nd(e,t,n){return td(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+t[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])}),n)}ed.prototype={constructor:ed,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var rd=Mc(30*xc);function id(e,t){return+t?function(e,t){function n(r,i,o,a,s,A,l,c,u,h,d,f,p,m){var g=l-r,v=c-i,y=g*g+v*v;if(y>4*t&&p--){var x=a+h,b=s+d,_=A+f,w=Rc(x*x+b*b+_*_),M=Pc(_/=w),S=bc(bc(_)-1)<dc||bc(o-u)<dc?(o+u)/2:wc(b,x),E=e(S,M),T=E[0],C=E[1],R=T-r,P=C-i,L=v*R-g*P;(L*L/y>t||bc((g*R+v*P)/y-.5)>.3||a*h+s*d+A*f<rd)&&(n(r,i,o,a,s,A,T,C,S,x/=w,b/=w,_,p,m),m.point(T,C),n(T,C,S,x,b,_,l,c,u,h,d,f,p,m))}}return function(t){var r,i,o,a,s,A,l,c,u,h,d,f,p={point:m,lineStart:g,lineEnd:y,polygonStart:function(){t.polygonStart(),p.lineStart=x},polygonEnd:function(){t.polygonEnd(),p.lineStart=g}};function m(n,r){n=e(n,r),t.point(n[0],n[1])}function g(){c=NaN,p.point=v,t.lineStart()}function v(r,i){var o=lu([r,i]),a=e(r,i);n(c,u,l,h,d,f,c=a[0],u=a[1],l=r,h=o[0],d=o[1],f=o[2],16,t),t.point(c,u)}function y(){p.point=m,t.lineEnd()}function x(){g(),p.point=b,p.lineEnd=_}function b(e,t){v(r=e,t),i=c,o=u,a=h,s=d,A=f,p.point=v}function _(){n(c,u,l,h,d,f,i,o,r,a,s,A,16,t),p.lineEnd=y,y()}return p}}(e,t):function(e){return $h({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var od=$h({point:function(e,t){this.stream.point(e*xc,t*xc)}});function ad(e,t,n,r,i,o){if(!o)return function(e,t,n,r,i){function o(o,a){return[t+e*(o*=r),n-e*(a*=i)]}return o.invert=function(o,a){return[(o-t)/e*r,(n-a)/e*i]},o}(e,t,n,r,i);var a=Mc(o),s=Tc(o),A=a*e,l=s*e,c=a/e,u=s/e,h=(s*n-a*t)/e,d=(s*t+a*n)/e;function f(e,o){return[A*(e*=r)-l*(o*=i)+t,n-l*e-A*o]}return f.invert=function(e,t){return[r*(c*e-u*t+h),i*(d-u*e-c*t)]},f}function sd(e){return function(e){var t,n,r,i,o,a,s,A,l,c,u=150,h=480,d=250,f=0,p=0,m=0,g=0,v=0,y=0,x=1,b=1,_=null,w=vh,M=null,S=Qh,E=.5;function T(e){return A(e[0]*xc,e[1]*xc)}function C(e){return(e=A.invert(e[0],e[1]))&&[e[0]*yc,e[1]*yc]}function R(){var e=ad(u,0,0,x,b,y).apply(null,t(f,p)),r=ad(u,h-e[0],d-e[1],x,b,y);return n=rh(m,g,v),s=th(t,r),A=th(n,s),a=id(s,E),P()}function P(){return l=c=null,T}return T.stream=function(e){return l&&c===e?l:l=od(function(e){return $h({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(w(a(S(c=e)))))},T.preclip=function(e){return arguments.length?(w=e,_=void 0,P()):w},T.postclip=function(e){return arguments.length?(S=e,M=r=i=o=null,P()):S},T.clipAngle=function(e){return arguments.length?(w=+e?yh(_=e*xc):(_=null,vh),P()):_*yc},T.clipExtent=function(e){return arguments.length?(S=null==e?(M=r=i=o=null,Qh):Eh(M=+e[0][0],r=+e[0][1],i=+e[1][0],o=+e[1][1]),P()):null==M?null:[[M,r],[i,o]]},T.scale=function(e){return arguments.length?(u=+e,R()):u},T.translate=function(e){return arguments.length?(h=+e[0],d=+e[1],R()):[h,d]},T.center=function(e){return arguments.length?(f=e[0]%360*xc,p=e[1]%360*xc,R()):[f*yc,p*yc]},T.rotate=function(e){return arguments.length?(m=e[0]%360*xc,g=e[1]%360*xc,v=e.length>2?e[2]%360*xc:0,R()):[m*yc,g*yc,v*yc]},T.angle=function(e){return arguments.length?(y=e%360*xc,R()):y*yc},T.reflectX=function(e){return arguments.length?(x=e?-1:1,R()):x<0},T.reflectY=function(e){return arguments.length?(b=e?-1:1,R()):b<0},T.precision=function(e){return arguments.length?(a=id(s,E=e*e),P()):Rc(E)},T.fitExtent=function(e,t){return nd(T,e,t)},T.fitSize=function(e,t){return function(e,t,n){return nd(e,[[0,0],t],n)}(T,e,t)},T.fitWidth=function(e,t){return function(e,t,n){return td(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];e.scale(150*i).translate([o,a])}),n)}(T,e,t)},T.fitHeight=function(e,t){return function(e,t,n){return td(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,a])}),n)}(T,e,t)},function(){return t=e.apply(this,arguments),T.invert=t.invert&&C,R()}}((function(){return e}))()}function Ad(e,t){var n=Mc(t),r=1+Mc(e)*n;return[n*Tc(e)/r,Tc(t)/r]}function ld(){return sd(Ad).scale(250).clipAngle(142)}function cd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ud(e){return ud=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ud(e)}function hd(e,t){return hd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},hd(e,t)}function dd(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ud(e);if(t){var i=ud(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dd(this,n)}}function pd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||md(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function md(e,t){if(e){if("string"==typeof e)return gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gd(e,t):void 0}}function gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Ad.invert=function(e){return function(t,n){var r=Rc(t*t+n*n),i=e(r),o=Tc(i),a=Mc(i);return[wc(t*o,r*a),Pc(r&&n*o/r)]}}((function(e){return 2*_c(e)}));var vd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=null;return e.forEach((function(e){if(r){var i=180*Dh(e,r)/Math.PI;if(i>t)for(var o=Wh(r,e),a=1/Math.ceil(i/t),s=a;s<1;)n.push(o(s)),s+=a}n.push(r=e)})),n},yd="undefined"!=typeof window&&window.THREE?window.THREE:{BufferGeometry:dn,Float32BufferAttribute:on},xd=(new yd.BufferGeometry).setAttribute?"setAttribute":"addAttribute",bd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hd(e,t)}(n,e);var t=fd(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;cd(this,n),(r=t.call(this)).type="GeoJsonGeometry",r.parameters={geoJson:e,radius:i,resolution:o};var a=({Point:c,MultiPoint:u,LineString:h,MultiLineString:d,Polygon:f,MultiPolygon:p}[e.type]||function(){return[]})(e.coordinates,i),s=[],A=[],l=0;function c(e,t){return[{vertices:Md(e[1],e[0],t),indices:[]}]}function u(e,t){var n={vertices:[],indices:[]};return e.map((function(e){return c(e,t)})).forEach((function(e){var t=pd(e,1)[0];_d(n,t)})),[n]}function h(e,t){for(var n=vd(e,o).map((function(e){var n=pd(e,2),r=n[0];return Md(n[1],r,t)})),r=$l.flatten([n]).vertices,i=Math.round(r.length/3),a=[],s=1;s<i;s++)a.push(s-1,s);return[{vertices:r,indices:a}]}function d(e,t){var n={vertices:[],indices:[]};return e.map((function(e){return h(e,t)})).forEach((function(e){var t=pd(e,1)[0];_d(n,t)})),[n]}function f(e,t){for(var n=e.map((function(e){return vd(e,o).map((function(e){var n=pd(e,2),r=n[0];return Md(n[1],r,t)}))})),r=$l.flatten(n),i=r.vertices,a=r.holes,s=a[0]||1/0,A=i.slice(0,3*s),l=i.slice(3*s),c=new Set(a),u=Math.round(i.length/3),h=[],d=[],f=1;f<u;f++)c.has(f)||(f<s?h.push(f-1,f):d.push(f-1-s,f-s));var p=[{indices:h,vertices:A}];return a.length&&p.push({indices:d,vertices:l}),p}function p(e,t){var n={vertices:[],indices:[]},r={vertices:[],indices:[]};e.map((function(e){return f(e,t)})).forEach((function(e){var t=pd(e,2),i=t[0],o=t[1];_d(n,i),o&&_d(r,o)}));var i=[n];return r.vertices.length&&i.push(r),i}return a.forEach((function(e){var t=s.length;_d({indices:s,vertices:A},e),r.addGroup(t,s.length-t,l++)})),s.length&&r.setIndex(s),A.length&&r[xd]("position",new yd.Float32BufferAttribute(A,3)),r}return n}(yd.BufferGeometry);function _d(e,t){var n=Math.round(e.vertices.length/3);wd(e.vertices,t.vertices),wd(e.indices,t.indices.map((function(e){return e+n})))}function wd(e,t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=md(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.push(i)}}catch(e){r.e(e)}finally{r.f()}}function Md(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(90-e)*Math.PI/180,i=(90-t)*Math.PI/180;return[n*Math.sin(r)*Math.cos(i),n*Math.cos(r),n*Math.sin(r)*Math.sin(i)]}function Sd(e){let t,n,r,i=0;for(let o=0;o<e.length;++o){const a=e[o];if(a.isInterleavedBufferAttribute)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported."),null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;i+=a.array.length}const o=new t(i);let a=0;for(let t=0;t<e.length;++t)o.set(e[t].array,a),a+=e[t].array.length;return new tn(o,n,r)}var Ed=Object.freeze({__proto__:null,computeTangents:function(e){e.computeTangents(),console.warn("THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.")},mergeBufferGeometries:function(e,t=!1){const n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),o={},a={},s=e[0].morphTargetsRelative,A=new dn;let l=0;for(let c=0;c<e.length;++c){const u=e[c];let h=0;if(n!==(null!==u.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const e in u.attributes){if(!r.has(e))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+e+'" attribute exists among all geometries, or in none of them.'),null;void 0===o[e]&&(o[e]=[]),o[e].push(u.attributes[e]),h++}if(h!==r.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==u.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const e in u.morphAttributes){if(!i.has(e))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;void 0===a[e]&&(a[e]=[]),a[e].push(u.morphAttributes[e])}if(A.userData.mergedUserData=A.userData.mergedUserData||[],A.userData.mergedUserData.push(u.userData),t){let e;if(n)e=u.index.count;else{if(void 0===u.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;e=u.attributes.position.count}A.addGroup(l,e,c),l+=e}}if(n){let t=0;const n=[];for(let r=0;r<e.length;++r){const i=e[r].index;for(let e=0;e<i.count;++e)n.push(i.getX(e)+t);t+=e[r].attributes.position.count}A.setIndex(n)}for(const e in o){const t=Sd(o[e]);if(!t)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+e+" attribute."),null;A.setAttribute(e,t)}for(const e in a){const t=a[e][0].length;if(0===t)break;A.morphAttributes=A.morphAttributes||{},A.morphAttributes[e]=[];for(let n=0;n<t;++n){const t=[];for(let r=0;r<a[e].length;++r)t.push(a[e][r][n]);const r=Sd(t);if(!r)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+e+" morphAttribute."),null;A.morphAttributes[e].push(r)}}return A},mergeBufferAttributes:Sd,interleaveAttributes:function(e){let t,n=0,r=0;for(let i=0,o=e.length;i<o;++i){const o=e[i];if(void 0===t&&(t=o.array.constructor),t!==o.array.constructor)return console.error("AttributeBuffers of different types cannot be interleaved"),null;n+=o.array.length,r+=o.itemSize}const i=new Ho(new t(n),r);let o=0;const a=[],s=["getX","getY","getZ","getW"],A=["setX","setY","setZ","setW"];for(let t=0,n=e.length;t<n;t++){const n=e[t],r=n.itemSize,l=n.count,c=new Vo(i,r,o,n.normalized);a.push(c),o+=r;for(let e=0;e<l;e++)for(let t=0;t<r;t++)c[A[t]](e,n[s[t]](e))}return a},estimateBytesUsed:function(e){let t=0;for(const n in e.attributes){const r=e.getAttribute(n);t+=r.count*r.itemSize*r.array.BYTES_PER_ELEMENT}const n=e.getIndex();return t+=n?n.count*n.itemSize*n.array.BYTES_PER_ELEMENT:0,t},mergeVertices:function(e,t=1e-4){t=Math.max(t,Number.EPSILON);const n={},r=e.getIndex(),i=e.getAttribute("position"),o=r?r.count:i.count;let a=0;const s=Object.keys(e.attributes),A={},l={},c=[],u=["getX","getY","getZ","getW"];for(let t=0,n=s.length;t<n;t++){const n=s[t];A[n]=[];const r=e.morphAttributes[n];r&&(l[n]=new Array(r.length).fill().map((()=>[])))}const h=Math.log10(1/t),d=Math.pow(10,h);for(let t=0;t<o;t++){const i=r?r.getX(t):t;let o="";for(let t=0,n=s.length;t<n;t++){const n=s[t],r=e.getAttribute(n),a=r.itemSize;for(let e=0;e<a;e++)o+=~~(r[u[e]](i)*d)+","}if(o in n)c.push(n[o]);else{for(let t=0,n=s.length;t<n;t++){const n=s[t],r=e.getAttribute(n),o=e.morphAttributes[n],a=r.itemSize,c=A[n],h=l[n];for(let e=0;e<a;e++){const t=u[e];if(c.push(r[t](i)),o)for(let e=0,n=o.length;e<n;e++)h[e].push(o[e][t](i))}}n[o]=a,c.push(a),a++}}const f=e.clone();for(let t=0,n=s.length;t<n;t++){const n=s[t],r=e.getAttribute(n),i=new r.array.constructor(A[n]),o=new tn(i,r.itemSize,r.normalized);if(f.setAttribute(n,o),n in l)for(let t=0;t<l[n].length;t++){const r=e.morphAttributes[n][t],i=new r.array.constructor(l[n][t]),o=new tn(i,r.itemSize,r.normalized);f.morphAttributes[n][t]=o}}return f.setIndex(c),f},toTrianglesDrawMode:function(e,t){if(0===t)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(2===t||1===t){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const r=n.count-2,i=[];if(2===t)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=e.clone();return o.setIndex(i),o.clearGroups(),o}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e},computeMorphedAttributes:function(e){if(!0!==e.geometry.isBufferGeometry)return console.error("THREE.BufferGeometryUtils: Geometry is not of type BufferGeometry."),null;const t=new Be,n=new Be,r=new Be,i=new Be,o=new Be,a=new Be,s=new Be,A=new Be,l=new Be;function c(e,c,u,h,d,f,p,m,g){t.fromBufferAttribute(u,f),n.fromBufferAttribute(u,p),r.fromBufferAttribute(u,m);const v=e.morphTargetInfluences;if(c.morphTargets&&h&&v){s.set(0,0,0),A.set(0,0,0),l.set(0,0,0);for(let e=0,c=h.length;e<c;e++){const c=v[e],u=h[e];0!==c&&(i.fromBufferAttribute(u,f),o.fromBufferAttribute(u,p),a.fromBufferAttribute(u,m),d?(s.addScaledVector(i,c),A.addScaledVector(o,c),l.addScaledVector(a,c)):(s.addScaledVector(i.sub(t),c),A.addScaledVector(o.sub(n),c),l.addScaledVector(a.sub(r),c)))}t.add(s),n.add(A),r.add(l)}e.isSkinnedMesh&&(e.boneTransform(f,t),e.boneTransform(p,n),e.boneTransform(m,r)),g[3*f+0]=t.x,g[3*f+1]=t.y,g[3*f+2]=t.z,g[3*p+0]=n.x,g[3*p+1]=n.y,g[3*p+2]=n.z,g[3*m+0]=r.x,g[3*m+1]=r.y,g[3*m+2]=r.z}const u=e.geometry,h=e.material;let d,f,p;const m=u.index,g=u.attributes.position,v=u.morphAttributes.position,y=u.morphTargetsRelative,x=u.attributes.normal,b=u.morphAttributes.position,_=u.groups,w=u.drawRange;let M,S,E,T,C,R,P,L;const q=new Float32Array(g.count*g.itemSize),D=new Float32Array(x.count*x.itemSize);if(null!==m)if(Array.isArray(h))for(M=0,E=_.length;M<E;M++)for(C=_[M],R=h[C.materialIndex],P=Math.max(C.start,w.start),L=Math.min(C.start+C.count,w.start+w.count),S=P,T=L;S<T;S+=3)d=m.getX(S),f=m.getX(S+1),p=m.getX(S+2),c(e,R,g,v,y,d,f,p,q),c(e,R,x,b,y,d,f,p,D);else for(P=Math.max(0,w.start),L=Math.min(m.count,w.start+w.count),M=P,E=L;M<E;M+=3)d=m.getX(M),f=m.getX(M+1),p=m.getX(M+2),c(e,h,g,v,y,d,f,p,q),c(e,h,x,b,y,d,f,p,D);else if(void 0!==g)if(Array.isArray(h))for(M=0,E=_.length;M<E;M++)for(C=_[M],R=h[C.materialIndex],P=Math.max(C.start,w.start),L=Math.min(C.start+C.count,w.start+w.count),S=P,T=L;S<T;S+=3)d=S,f=S+1,p=S+2,c(e,R,g,v,y,d,f,p,q),c(e,R,x,b,y,d,f,p,D);else for(P=Math.max(0,w.start),L=Math.min(g.count,w.start+w.count),M=P,E=L;M<E;M+=3)d=M,f=M+1,p=M+2,c(e,h,g,v,y,d,f,p,q),c(e,h,x,b,y,d,f,p,D);return{positionAttribute:g,normalAttribute:x,morphedPositionAttribute:new on(q,3),morphedNormalAttribute:new on(D,3)}}}),Td=function(e){return e instanceof Function?e:"string"==typeof e?function(t){return t[e]}:function(t){return e}},Cd={exports:{}};!function(e){!function(t){var n=/^\s+/,r=/\s+$/,i=0,o=t.round,a=t.min,s=t.max,A=t.random;function l(e,A){if(A=A||{},(e=e||"")instanceof l)return e;if(!(this instanceof l))return new l(e,A);var c=function(e){var i={r:0,g:0,b:0},o=1,A=null,l=null,c=null,u=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(n,"").replace(r,"").toLowerCase();var t,i=!1;if(T[e])e=T[e],i=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:q(t[1]),g:q(t[2]),b:q(t[3]),a:B(t[4]),format:i?"name":"hex8"};if(t=U.hex6.exec(e))return{r:q(t[1]),g:q(t[2]),b:q(t[3]),format:i?"name":"hex"};if(t=U.hex4.exec(e))return{r:q(t[1]+""+t[1]),g:q(t[2]+""+t[2]),b:q(t[3]+""+t[3]),a:B(t[4]+""+t[4]),format:i?"name":"hex8"};if(t=U.hex3.exec(e))return{r:q(t[1]+""+t[1]),g:q(t[2]+""+t[2]),b:q(t[3]+""+t[3]),format:i?"name":"hex"};return!1}(e));"object"==typeof e&&(F(e.r)&&F(e.g)&&F(e.b)?(d=e.r,f=e.g,p=e.b,i={r:255*P(d,255),g:255*P(f,255),b:255*P(p,255)},u=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):F(e.h)&&F(e.s)&&F(e.v)?(A=I(e.s),l=I(e.v),i=function(e,n,r){e=6*P(e,360),n=P(n,100),r=P(r,100);var i=t.floor(e),o=e-i,a=r*(1-n),s=r*(1-o*n),A=r*(1-(1-o)*n),l=i%6;return{r:255*[r,s,a,a,A,r][l],g:255*[A,r,r,s,a,a][l],b:255*[a,a,A,r,r,s][l]}}(e.h,A,l),u=!0,h="hsv"):F(e.h)&&F(e.s)&&F(e.l)&&(A=I(e.s),c=I(e.l),i=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=P(e,360),t=P(t,100),n=P(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,A=2*n-s;r=a(A,s,e+1/3),i=a(A,s,e),o=a(A,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,A,c),u=!0,h="hsl"),e.hasOwnProperty("a")&&(o=e.a));var d,f,p;return o=R(o),{ok:u,format:e.format||h,r:a(255,s(i.r,0)),g:a(255,s(i.g,0)),b:a(255,s(i.b,0)),a:o}}(e);this._originalInput=e,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=o(100*this._a)/100,this._format=A.format||c.format,this._gradientType=A.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=c.ok,this._tc_id=i++}function c(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var r,i,o=s(e,t,n),A=a(e,t,n),l=(o+A)/2;if(o==A)r=i=0;else{var c=o-A;switch(i=l>.5?c/(2-o-A):c/(o+A),o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,l:l}}function u(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var r,i,o=s(e,t,n),A=a(e,t,n),l=o,c=o-A;if(i=0===o?0:c/o,o==A)r=0;else{switch(o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,v:l}}function h(e,t,n,r){var i=[D(o(e).toString(16)),D(o(t).toString(16)),D(o(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function d(e,t,n,r){return[D(O(r)),D(o(e).toString(16)),D(o(t).toString(16)),D(o(n).toString(16))].join("")}function f(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s-=t/100,n.s=L(n.s),l(n)}function p(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s+=t/100,n.s=L(n.s),l(n)}function m(e){return l(e).desaturate(100)}function g(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l+=t/100,n.l=L(n.l),l(n)}function v(e,t){t=0===t?0:t||10;var n=l(e).toRgb();return n.r=s(0,a(255,n.r-o(-t/100*255))),n.g=s(0,a(255,n.g-o(-t/100*255))),n.b=s(0,a(255,n.b-o(-t/100*255))),l(n)}function y(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l-=t/100,n.l=L(n.l),l(n)}function x(e,t){var n=l(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,l(n)}function b(e){var t=l(e).toHsl();return t.h=(t.h+180)%360,l(t)}function _(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+120)%360,s:t.s,l:t.l}),l({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+90)%360,s:t.s,l:t.l}),l({h:(n+180)%360,s:t.s,l:t.l}),l({h:(n+270)%360,s:t.s,l:t.l})]}function M(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+72)%360,s:t.s,l:t.l}),l({h:(n+216)%360,s:t.s,l:t.l})]}function S(e,t,n){t=t||6,n=n||30;var r=l(e).toHsl(),i=360/n,o=[l(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(l(r));return o}function E(e,t){t=t||6;for(var n=l(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(l({h:r,s:i,v:o})),o=(o+s)%1;return a}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,n,r,i=this.toRgb();return e=i.r/255,n=i.g/255,r=i.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=R(e),this._roundA=o(100*this._a)/100,this},toHsv:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=u(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=c(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return h(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[D(o(e).toString(16)),D(o(t).toString(16)),D(o(n).toString(16)),D(O(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*P(this._r,255))+"%",g:o(100*P(this._g,255))+"%",b:o(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*P(this._r,255))+"%, "+o(100*P(this._g,255))+"%, "+o(100*P(this._b,255))+"%)":"rgba("+o(100*P(this._r,255))+"%, "+o(100*P(this._g,255))+"%, "+o(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+d(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=l(e);n="#"+d(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return l(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},l.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:I(e[r]));e=n}return l(e,t)},l.equals=function(e,t){return!(!e||!t)&&l(e).toRgbString()==l(t).toRgbString()},l.random=function(){return l.fromRatio({r:A(),g:A(),b:A()})},l.mix=function(e,t,n){n=0===n?0:n||50;var r=l(e).toRgb(),i=l(t).toRgb(),o=n/100;return l({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
l.readability=function(e,n){var r=l(e),i=l(n);return(t.max(r.getLuminance(),i.getLuminance())+.05)/(t.min(r.getLuminance(),i.getLuminance())+.05)},l.isReadable=function(e,t,n){var r,i,o=l.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},l.mostReadable=function(e,t,n){var r,i,o,a,s=null,A=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=l.readability(e,t[c]))>A&&(A=r,s=l(t[c]));return l.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,l.mostReadable(e,["#fff","#000"],n))};var T=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},C=l.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(T);function R(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(e,n){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=a(n,s(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),t.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function L(e){return a(1,s(0,e))}function q(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function I(e){return e<=1&&(e=100*e+"%"),e}function O(e){return t.round(255*parseFloat(e)).toString(16)}function B(e){return q(e)/255}var k,N,z,U=(N="[\\s|\\(]+("+(k="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?",z="[\\s|\\(]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?",{CSS_UNIT:new RegExp(k),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function F(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=l:window.tinycolor=l}(Math)}(Cd);var Rd=Cd.exports;function Pd(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ld(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Dd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qd(e){return function(e){if(Array.isArray(e))return Id(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Dd(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dd(e,t){if(e){if("string"==typeof e)return Id(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Id(e,t):void 0}}function Id(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Od(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Bd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),o=e.reduce((function(e,t){var r=e,o=t;return i.forEach((function(e,t){var a,s=e.keyAccessor;if(e.isProp){var A=o,l=A[s],c=Pd(A,[s].map(Od));a=l,o=c}else a=s(o,t);t+1<i.length?(r.hasOwnProperty(a)||(r[a]={}),r=r[a]):n?(r.hasOwnProperty(a)||(r[a]=[]),r[a].push(o)):r[a]=o})),e}),{});n instanceof Function&&function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===i.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(o);var a=o;return r&&(a=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===i.length?a.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r=Ld(t,2),i=r[0],o=r[1];return e(o,[].concat(qd(n),[i]))}))}(o),t instanceof Array&&0===t.length&&1===a.length&&(a[0].keys=[])),a};function kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zd(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ud(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Hd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fd(e){return function(e){if(Array.isArray(e))return Gd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Hd(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hd(e,t){if(e){if("string"==typeof e)return Gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gd(e,t):void 0}}function Gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vd(e,t,n){var r=n.objBindAttr,i=void 0===r?"__obj":r,o=n.dataBindAttr,a=void 0===o?"__data":o,s=n.idAccessor,A=n.purge,l=void 0!==A&&A,c=function(e){return e.hasOwnProperty(a)},u=t.filter((function(e){return!c(e)})),h=t.filter(c).map((function(e){return e[a]})),d=l?{enter:e,exit:h,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var i=Bd(e,n,!1),o=Bd(t,n,!1),a=Object.assign({},i,o);Object.entries(a).forEach((function(e){var t=Ud(e,2),n=t[0],a=t[1],s=i.hasOwnProperty(n)?o.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[i[n],o[n]]:a)}))}else{var s=new Set(e),A=new Set(t);new Set([].concat(Fd(s),Fd(A))).forEach((function(e){var t=s.has(e)?A.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(h,e,s);return d.update=d.update.map((function(e){var t=Ud(e,2),n=t[0],r=t[1];return n!==r&&(r[i]=n[i],r[i][a]=r),r})),d.exit=d.exit.concat(u.map((function(e){return Nd({},i,e)}))),d}function jd(e,t,n,r,i){var o=i.createObj,a=void 0===o?function(e){return{}}:o,s=i.updateObj,A=void 0===s?function(e,t){}:s,l=i.exitObj,c=void 0===l?function(e){}:l,u=i.objBindAttr,h=void 0===u?"__obj":u,d=i.dataBindAttr,f=void 0===d?"__data":d,p=zd(i,["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"]),m=Vd(e,t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kd(Object(n),!0).forEach((function(t){Nd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({objBindAttr:h,dataBindAttr:f},p)),g=m.enter,v=m.update;m.exit.forEach((function(e){var t=e[h];delete e[h],c(t),r(t)}));var y=function(e){var t=[];return e.forEach((function(e){var n=a(e);n&&(n[f]=e,e[h]=n,t.push(n))})),t}(g);!function(e){e.forEach((function(e){var t=e[h];t&&(t[f]=e,A(t,e))}))}([].concat(Fd(g),Fd(v))),y.forEach(n)}var Wd={exports:{}};!function(e,t){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r=n(1),i=function(){function e(e,t,n){void 0===e&&(e=NaN),void 0===t&&(t=NaN),void 0===n&&(n=!1),this._minFPS=t,this._maxFPS=e,this._timeScale=1,this._currentTick=0,this._currentTime=0,this._tickDeltaTime=0,this._isRunning=!1,this._maxInterval=isNaN(this._minFPS)?NaN:1e3/this._minFPS,this._minInterval=isNaN(this._maxFPS)?NaN:1e3/this._maxFPS,this._onResume=new r.default,this._onPause=new r.default,this._onTick=new r.default,this._onTickOncePerFrame=new r.default,n||this.resume()}return e.prototype.updateOnce=function(e){e(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick)},e.prototype.resume=function(){this._isRunning||(this._isRunning=!0,this._lastTimeUpdated=this.getTimer(),this._onResume.dispatch(),this.animateOnce())},e.prototype.pause=function(){this._isRunning&&(this._isRunning=!1,this._onPause.dispatch(),window.cancelAnimationFrame(this._animationFrameHandle))},e.prototype.dispose=function(){this.pause(),this._onResume.removeAll(),this._onPause.removeAll(),this._onTick.removeAll()},Object.defineProperty(e.prototype,"currentTick",{get:function(){return this._currentTick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTimeSeconds",{get:function(){return this._currentTime/1e3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tickDeltaTimeSeconds",{get:function(){return this._tickDeltaTime/1e3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeScale",{get:function(){return this._timeScale},set:function(e){this._timeScale!==e&&(this._timeScale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onResume",{get:function(){return this._onResume},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onPause",{get:function(){return this._onPause},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTick",{get:function(){return this._onTick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTickOncePerFrame",{get:function(){return this._onTickOncePerFrame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRunning",{get:function(){return this._isRunning},enumerable:!0,configurable:!0}),e.prototype.animateOnce=function(){var e=this;this._animationFrameHandle=window.requestAnimationFrame((function(){return e.onFrame()}))},e.prototype.onFrame=function(){if(this._now=this.getTimer(),this._frameDeltaTime=this._now-this._lastTimeUpdated,isNaN(this._minInterval)||this._frameDeltaTime>=this._minInterval)if(isNaN(this._maxInterval))this.update(this._frameDeltaTime*this._timeScale,!0),this._lastTimeUpdated=this._now;else for(this._interval=Math.min(this._frameDeltaTime,this._maxInterval);this._now>=this._lastTimeUpdated+this._interval;)this.update(this._interval*this._timeScale,this._now<=this._lastTimeUpdated+2*this._maxInterval),this._lastTimeUpdated+=this._interval;this._isRunning&&this.animateOnce()},e.prototype.update=function(e,t){void 0===t&&(t=!0),this._currentTick++,this._currentTime+=e,this._tickDeltaTime=e,this._onTick.dispatch(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick),t&&this._onTickOncePerFrame.dispatch(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick)},e.prototype.getTimer=function(){return Date.now()},e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){!function(t,n){e.exports=n()}(0,(function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){var n=function(){function e(){this.functions=[]}return e.prototype.add=function(e){return-1===this.functions.indexOf(e)&&(this.functions.push(e),!0)},e.prototype.remove=function(e){var t=this.functions.indexOf(e);return t>-1&&(this.functions.splice(t,1),!0)},e.prototype.removeAll=function(){return this.functions.length>0&&(this.functions.length=0,!0)},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.functions.concat().forEach((function(t){t.apply(void 0,e)}))},Object.defineProperty(e.prototype,"numItems",{get:function(){return this.functions.length},enumerable:!0,configurable:!0}),e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=n}])}))}])}(Wd);var Qd=A(Wd.exports);function Yd(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Xd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Jd(){}var Kd=.7,$d=1/Kd,ef="\\s*([+-]?\\d+)\\s*",tf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",nf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rf=/^#([0-9a-f]{3,8})$/,of=new RegExp("^rgb\\("+[ef,ef,ef]+"\\)$"),af=new RegExp("^rgb\\("+[nf,nf,nf]+"\\)$"),sf=new RegExp("^rgba\\("+[ef,ef,ef,tf]+"\\)$"),Af=new RegExp("^rgba\\("+[nf,nf,nf,tf]+"\\)$"),lf=new RegExp("^hsl\\("+[tf,nf,nf]+"\\)$"),cf=new RegExp("^hsla\\("+[tf,nf,nf,tf]+"\\)$"),uf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function hf(){return this.rgb().formatHex()}function df(){return this.rgb().formatRgb()}function ff(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rf.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?pf(t):3===n?new yf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?mf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?mf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=of.exec(e))?new yf(t[1],t[2],t[3],1):(t=af.exec(e))?new yf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=sf.exec(e))?mf(t[1],t[2],t[3],t[4]):(t=Af.exec(e))?mf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=lf.exec(e))?wf(t[1],t[2]/100,t[3]/100,1):(t=cf.exec(e))?wf(t[1],t[2]/100,t[3]/100,t[4]):uf.hasOwnProperty(e)?pf(uf[e]):"transparent"===e?new yf(NaN,NaN,NaN,0):null}function pf(e){return new yf(e>>16&255,e>>8&255,255&e,1)}function mf(e,t,n,r){return r<=0&&(e=t=n=NaN),new yf(e,t,n,r)}function gf(e){return e instanceof Jd||(e=ff(e)),e?new yf((e=e.rgb()).r,e.g,e.b,e.opacity):new yf}function vf(e,t,n,r){return 1===arguments.length?gf(e):new yf(e,t,n,null==r?1:r)}function yf(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function xf(){return"#"+_f(this.r)+_f(this.g)+_f(this.b)}function bf(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function _f(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function wf(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Sf(e,t,n,r)}function Mf(e){if(e instanceof Sf)return new Sf(e.h,e.s,e.l,e.opacity);if(e instanceof Jd||(e=ff(e)),!e)return new Sf;if(e instanceof Sf)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,A=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=A<.5?o+i:2-o-i,a*=60):s=A>0&&A<1?0:a,new Sf(a,s,A,e.opacity)}function Sf(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ef(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Xd(Jd,ff,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:hf,formatHex:hf,formatHsl:function(){return Mf(this).formatHsl()},formatRgb:df,toString:df}),Xd(yf,vf,Zd(Jd,{brighter:function(e){return e=null==e?$d:Math.pow($d,e),new yf(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Kd:Math.pow(Kd,e),new yf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xf,formatHex:xf,formatRgb:bf,toString:bf})),Xd(Sf,(function(e,t,n,r){return 1===arguments.length?Mf(e):new Sf(e,t,n,null==r?1:r)}),Zd(Jd,{brighter:function(e){return e=null==e?$d:Math.pow($d,e),new Sf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Kd:Math.pow(Kd,e),new Sf(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new yf(Ef(e>=240?e-240:e+120,i,r),Ef(e,i,r),Ef(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Tf=e=>()=>e;function Cf(e){return 1==(e=+e)?Rf:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Tf(isNaN(t)?n:t)}}function Rf(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Tf(isNaN(e)?t:e)}var Pf=function e(t){var n=Cf(t);function r(e,t){var r=n((e=vf(e)).r,(t=vf(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Rf(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Lf(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function qf(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Df(e,t){return(qf(t)?Lf:If)(e,t)}function If(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ff(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Of(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Bf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function kf(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Ff(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Nf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zf=new RegExp(Nf.source,"g");function Uf(e,t){var n,r,i,o=Nf.lastIndex=zf.lastIndex=0,a=-1,s=[],A=[];for(e+="",t+="";(n=Nf.exec(e))&&(r=zf.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,A.push({i:a,x:Bf(n,r)})),o=zf.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?A[0]?function(e){return function(t){return e(t)+""}}(A[0].x):function(e){return function(){return e}}(t):(t=A.length,function(e){for(var n,r=0;r<t;++r)s[(n=A[r]).i]=n.x(e);return s.join("")})}function Ff(e,t){var n,r=typeof t;return null==t||"boolean"===r?Tf(t):("number"===r?Bf:"string"===r?(n=ff(t))?(t=n,Pf):Uf:t instanceof ff?Pf:t instanceof Date?Of:qf(t)?Lf:Array.isArray(t)?If:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?kf:Bf)(e,t)}function Hf(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Gf(e){return+e}var Vf=[0,1];function jf(e){return e}function Wf(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function Qf(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Wf(i,r),o=n(a,o)):(r=Wf(r,i),o=n(o,a)),function(e){return o(r(e))}}function Yf(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Wf(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=rc(e,t,1,r)-1;return o[n](i[n](t))}}function Xf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zf(){var e,t,n,r,i,o,a=Vf,s=Vf,A=Ff,l=jf;function c(){var e=Math.min(a.length,s.length);return l!==jf&&(l=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?Yf:Qf,i=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,A)))(e(l(t)))}return u.invert=function(n){return l(t((o||(o=r(s,a.map(e),Bf)))(n)))},u.domain=function(e){return arguments.length?(a=Array.from(e,Gf),c()):a.slice()},u.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},u.rangeRound=function(e){return s=Array.from(e),A=Hf,c()},u.clamp=function(e){return arguments.length?(l=!!e||jf,c()):l!==jf},u.interpolate=function(e){return arguments.length?(A=e,c()):A},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,c()}}function Jf(){return Zf()(jf,jf)}function Kf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function $f(e){return(e=Kf(Math.abs(e)))?e[1]:NaN}var ep,tp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function np(e){if(!(t=tp.exec(e)))throw new Error("invalid format: "+e);var t;return new rp({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function rp(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function ip(e,t){var n=Kf(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}np.prototype=rp.prototype,rp.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var op={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ip(100*e,t),r:ip,s:function(e,t){var n=Kf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(ep=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Kf(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ap(e){return e}var sp,Ap,lp,cp=Array.prototype.map,up=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hp(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?ap:(t=cp.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],A=0;i>0&&s>0&&(A+s+1>r&&(s=Math.max(1,r-A)),o.push(e.substring(i-=s,i+s)),!((A+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?ap:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(cp.call(e.numerals,String)),A=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=np(e)).fill,n=e.align,u=e.sign,h=e.symbol,d=e.zero,f=e.width,p=e.comma,m=e.precision,g=e.trim,v=e.type;"n"===v?(p=!0,v="g"):op[v]||(void 0===m&&(m=12),g=!0,v="g"),(d||"0"===t&&"="===n)&&(d=!0,t="0",n="=");var y="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?o:/[%p]/.test(v)?A:"",b=op[v],_=/[defgprs%]/.test(v);function w(e){var i,o,A,h=y,w=x;if("c"===v)w=b(e)+w,e="";else{var M=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:b(Math.abs(e),m),g&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0==+e&&"+"!==u&&(M=!1),h=(M?"("===u?u:l:"-"===u||"("===u?"":u)+h,w=("s"===v?up[8+ep/3]:"")+w+(M&&"("===u?")":""),_)for(i=-1,o=e.length;++i<o;)if(48>(A=e.charCodeAt(i))||A>57){w=(46===A?a+e.slice(i+1):e.slice(i))+w,e=e.slice(0,i);break}}p&&!d&&(e=r(e,1/0));var S=h.length+e.length+w.length,E=S<f?new Array(f-S+1).join(t):"";switch(p&&d&&(e=r(E+e,E.length?f-w.length:1/0),E=""),n){case"<":e=h+e+w+E;break;case"=":e=h+E+e+w;break;case"^":e=E.slice(0,S=E.length>>1)+h+e+w+E.slice(S);break;default:e=E+h+e+w}return s(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),w.toString=function(){return e+""},w}return{format:u,formatPrefix:function(e,t){var n=u(((e=np(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor($f(t)/3))),i=Math.pow(10,-r),o=up[8+r/3];return function(e){return n(i*e)+o}}}}function dp(e,t,n,r){var i,o=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=ac?i*=10:o>=sc?i*=5:o>=Ac&&(i*=2),t<e?-i:i}(e,t,n);switch((r=np(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($f(t)/3)))-$f(Math.abs(e)))}(o,a))||(r.precision=i),lp(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$f(t)-$f(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-$f(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Ap(r)}function fp(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=lc(e,t,n))||!isFinite(a))return[];if(a>0){let n=Math.round(e/a),r=Math.round(t/a);for(n*a<e&&++n,r*a>t&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)*a}else{a=-a;let n=Math.round(e*a),r=Math.round(t*a);for(n/a<e&&++n,r/a>t&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)/a}return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return dp(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,A=o[a],l=o[s],c=10;for(l<A&&(i=A,A=l,l=i,i=a,a=s,s=i);c-- >0;){if((i=lc(A,l,n))===r)return o[a]=A,o[s]=l,t(o);if(i>0)A=Math.floor(A/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;A=Math.ceil(A*i)/i,l=Math.floor(l*i)/i}r=i}return e},e}function pp(){var e=Jf();return e.copy=function(){return Xf(e,pp())},Yd.apply(e,arguments),fp(e)}sp=hp({thousands:",",grouping:[3],currency:["$",""]}),Ap=sp.format,lp=sp.formatPrefix;const mp=134217729;function gp(e,t,n,r,i){let o,a,s,A,l=t[0],c=r[0],u=0,h=0;c>l==c>-l?(o=l,l=t[++u]):(o=c,c=r[++h]);let d=0;if(u<e&&h<n)for(c>l==c>-l?(a=l+o,s=o-(a-l),l=t[++u]):(a=c+o,s=o-(a-c),c=r[++h]),o=a,0!==s&&(i[d++]=s);u<e&&h<n;)c>l==c>-l?(a=o+l,A=a-o,s=o-(a-A)+(l-A),l=t[++u]):(a=o+c,A=a-o,s=o-(a-A)+(c-A),c=r[++h]),o=a,0!==s&&(i[d++]=s);for(;u<e;)a=o+l,A=a-o,s=o-(a-A)+(l-A),l=t[++u],o=a,0!==s&&(i[d++]=s);for(;h<n;)a=o+c,A=a-o,s=o-(a-A)+(c-A),c=r[++h],o=a,0!==s&&(i[d++]=s);return 0===o&&0!==d||(i[d++]=o),d}function vp(e){return new Float64Array(e)}const yp=vp(4),xp=vp(8),bp=vp(12),_p=vp(16),wp=vp(4);function Mp(e,t,n,r,i,o){const a=(t-o)*(n-i),s=(e-i)*(r-o),A=a-s;if(0===a||0===s||a>0!=s>0)return A;const l=Math.abs(a+s);return Math.abs(A)>=33306690738754716e-32*l?A:-function(e,t,n,r,i,o,a){let s,A,l,c,u,h,d,f,p,m,g,v,y,x,b,_,w,M;const S=e-i,E=n-i,T=t-o,C=r-o;x=S*C,h=mp*S,d=h-(h-S),f=S-d,h=mp*C,p=h-(h-C),m=C-p,b=f*m-(x-d*p-f*p-d*m),_=T*E,h=mp*T,d=h-(h-T),f=T-d,h=mp*E,p=h-(h-E),m=E-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,yp[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,yp[1]=y-(g+u)+(u-_),M=v+g,u=M-v,yp[2]=v-(M-u)+(g-u),yp[3]=M;let R=function(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}(4,yp),P=22204460492503146e-32*a;if(R>=P||-R>=P)return R;if(u=e-S,s=e-(S+u)+(u-i),u=n-E,l=n-(E+u)+(u-i),u=t-T,A=t-(T+u)+(u-o),u=r-C,c=r-(C+u)+(u-o),0===s&&0===A&&0===l&&0===c)return R;if(P=11093356479670487e-47*a+33306690738754706e-32*Math.abs(R),R+=S*c+C*s-(T*l+E*A),R>=P||-R>=P)return R;x=s*C,h=mp*s,d=h-(h-s),f=s-d,h=mp*C,p=h-(h-C),m=C-p,b=f*m-(x-d*p-f*p-d*m),_=A*E,h=mp*A,d=h-(h-A),f=A-d,h=mp*E,p=h-(h-E),m=E-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,wp[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,wp[1]=y-(g+u)+(u-_),M=v+g,u=M-v,wp[2]=v-(M-u)+(g-u),wp[3]=M;const L=gp(4,yp,4,wp,xp);x=S*c,h=mp*S,d=h-(h-S),f=S-d,h=mp*c,p=h-(h-c),m=c-p,b=f*m-(x-d*p-f*p-d*m),_=T*l,h=mp*T,d=h-(h-T),f=T-d,h=mp*l,p=h-(h-l),m=l-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,wp[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,wp[1]=y-(g+u)+(u-_),M=v+g,u=M-v,wp[2]=v-(M-u)+(g-u),wp[3]=M;const q=gp(L,xp,4,wp,bp);x=s*c,h=mp*s,d=h-(h-s),f=s-d,h=mp*c,p=h-(h-c),m=c-p,b=f*m-(x-d*p-f*p-d*m),_=A*l,h=mp*A,d=h-(h-A),f=A-d,h=mp*l,p=h-(h-l),m=l-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,wp[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,wp[1]=y-(g+u)+(u-_),M=v+g,u=M-v,wp[2]=v-(M-u)+(g-u),wp[3]=M;const D=gp(q,bp,4,wp,_p);return _p[D-1]}(e,t,n,r,i,o,l)}const Sp=Math.pow(2,-52),Ep=new Uint32Array(512);class Tp{static from(e,t=Dp,n=Ip){const r=e.length,i=new Float64Array(2*r);for(let o=0;o<r;o++){const r=e[o];i[2*o]=t(r),i[2*o+1]=n(r)}return new Tp(i)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=e.length>>1;let a=1/0,s=1/0,A=-1/0,l=-1/0;for(let t=0;t<o;t++){const n=e[2*t],r=e[2*t+1];n<a&&(a=n),r<s&&(s=r),n>A&&(A=n),r>l&&(l=r),this._ids[t]=t}const c=(a+A)/2,u=(s+l)/2;let h,d,f,p=1/0;for(let t=0;t<o;t++){const n=Cp(c,u,e[2*t],e[2*t+1]);n<p&&(h=t,p=n)}const m=e[2*h],g=e[2*h+1];p=1/0;for(let t=0;t<o;t++){if(t===h)continue;const n=Cp(m,g,e[2*t],e[2*t+1]);n<p&&n>0&&(d=t,p=n)}let v=e[2*d],y=e[2*d+1],x=1/0;for(let t=0;t<o;t++){if(t===h||t===d)continue;const n=Pp(m,g,v,y,e[2*t],e[2*t+1]);n<x&&(f=t,x=n)}let b=e[2*f],_=e[2*f+1];if(x===1/0){for(let t=0;t<o;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];Lp(this._ids,this._dists,0,o-1);const t=new Uint32Array(o);let n=0;for(let e=0,r=-1/0;e<o;e++){const i=this._ids[e];this._dists[i]>r&&(t[n++]=i,r=this._dists[i])}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Mp(m,g,v,y,b,_)<0){const e=d,t=v,n=y;d=f,v=b,y=_,f=e,b=t,_=n}const w=function(e,t,n,r,i,o){const a=n-e,s=r-t,A=i-e,l=o-t,c=a*a+s*s,u=A*A+l*l,h=.5/(a*l-s*A);return{x:e+(l*c-s*u)*h,y:t+(a*u-A*c)*h}}(m,g,v,y,b,_);this._cx=w.x,this._cy=w.y;for(let t=0;t<o;t++)this._dists[t]=Cp(e[2*t],e[2*t+1],w.x,w.y);Lp(this._ids,this._dists,0,o-1),this._hullStart=h;let M=3;n[h]=t[f]=d,n[d]=t[h]=f,n[f]=t[d]=h,r[h]=0,r[d]=1,r[f]=2,i.fill(-1),i[this._hashKey(m,g)]=h,i[this._hashKey(v,y)]=d,i[this._hashKey(b,_)]=f,this.trianglesLen=0,this._addTriangle(h,d,f,-1,-1,-1);for(let o,a,s=0;s<this._ids.length;s++){const A=this._ids[s],l=e[2*A],c=e[2*A+1];if(s>0&&Math.abs(l-o)<=Sp&&Math.abs(c-a)<=Sp)continue;if(o=l,a=c,A===h||A===d||A===f)continue;let u=0;for(let e=0,t=this._hashKey(l,c);e<this._hashSize&&(u=i[(t+e)%this._hashSize],-1===u||u===n[u]);e++);u=t[u];let p,m=u;for(;p=n[m],Mp(l,c,e[2*m],e[2*m+1],e[2*p],e[2*p+1])>=0;)if(m=p,m===u){m=-1;break}if(-1===m)continue;let g=this._addTriangle(m,A,n[m],-1,-1,r[m]);r[A]=this._legalize(g+2),r[m]=g,M++;let v=n[m];for(;p=n[v],Mp(l,c,e[2*v],e[2*v+1],e[2*p],e[2*p+1])<0;)g=this._addTriangle(v,A,p,r[A],-1,r[v]),r[A]=this._legalize(g+2),n[v]=v,M--,v=p;if(m===u)for(;p=t[m],Mp(l,c,e[2*p],e[2*p+1],e[2*m],e[2*m+1])<0;)g=this._addTriangle(p,A,m,-1,r[m],r[p]),this._legalize(g+2),r[p]=g,n[m]=m,M--,m=p;this._hullStart=t[A]=m,n[m]=t[v]=A,n[A]=v,i[this._hashKey(l,c)]=A,i[this._hashKey(e[2*m],e[2*m+1])]=m}this.hull=new Uint32Array(M);for(let e=0,t=this._hullStart;e<M;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const a=n[e],s=e-e%3;if(o=s+(e+2)%3,-1===a){if(0===i)break;e=Ep[--i];continue}const A=a-a%3,l=s+(e+1)%3,c=A+(a+2)%3,u=t[o],h=t[e],d=t[l],f=t[c];if(Rp(r[2*u],r[2*u+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*f],r[2*f+1])){t[e]=f,t[a]=u;const r=n[c];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===c){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(a,n[o]),this._link(o,c);const s=A+(a+1)%3;i<Ep.length&&(Ep[i++]=s)}else{if(0===i)break;e=Ep[--i]}}return o}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,o){const a=this.trianglesLen;return this._triangles[a]=e,this._triangles[a+1]=t,this._triangles[a+2]=n,this._link(a,r),this._link(a+1,i),this._link(a+2,o),this.trianglesLen+=3,a}}function Cp(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}function Rp(e,t,n,r,i,o,a,s){const A=e-a,l=t-s,c=n-a,u=r-s,h=i-a,d=o-s,f=c*c+u*u,p=h*h+d*d;return A*(u*p-f*d)-l*(c*p-f*h)+(A*A+l*l)*(c*d-u*h)<0}function Pp(e,t,n,r,i,o){const a=n-e,s=r-t,A=i-e,l=o-t,c=a*a+s*s,u=A*A+l*l,h=.5/(a*l-s*A),d=(l*c-s*u)*h,f=(a*u-A*c)*h;return d*d+f*f}function Lp(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=e[i],o=t[r];let a=i-1;for(;a>=n&&t[e[a]]>o;)e[a+1]=e[a--];e[a+1]=r}else{let i=n+1,o=r;qp(e,n+r>>1,i),t[e[n]]>t[e[r]]&&qp(e,n,r),t[e[i]]>t[e[r]]&&qp(e,i,r),t[e[n]]>t[e[i]]&&qp(e,n,i);const a=e[i],s=t[a];for(;;){do{i++}while(t[e[i]]<s);do{o--}while(t[e[o]]>s);if(o<i)break;qp(e,i,o)}e[n+1]=e[o],e[o]=a,r-i+1>=o-n?(Lp(e,t,i,r),Lp(e,t,n,o-1)):(Lp(e,t,n,o-1),Lp(e,t,i,r))}}function qp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Dp(e){return e[0]}function Ip(e){return e[1]}function Op(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r,i=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),o="Feature"===(r=t).type?r.geometry:r,a=o.type,s=t.bbox,A=o.coordinates;if(s&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(i,s))return!1;"Polygon"===a&&(A=[A]);for(var l=!1,c=0;c<A.length&&!l;c++)if(Bp(i,A[c][0],n.ignoreBoundary)){for(var u=!1,h=1;h<A[c].length&&!u;)Bp(i,A[c][h],!n.ignoreBoundary)&&(u=!0),h++;u||(l=!0)}return l}function Bp(e,t,n){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,o=t.length-1;i<t.length;o=i++){var a=t[i][0],s=t[i][1],A=t[o][0],l=t[o][1];if(e[1]*(a-A)+s*(A-e[0])+l*(e[0]-a)==0&&(a-e[0])*(A-e[0])<=0&&(s-e[1])*(l-e[1])<=0)return!n;s>e[1]!=l>e[1]&&e[0]<(A-a)*(e[1]-s)/(l-s)+a&&(r=!r)}return r}const kp=1e-6;class Np{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const r=(e=+e)+(n=+n),i=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>kp||Math.abs(this._y1-i)>kp)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class zp{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class Up{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let t,r,o=0,a=0,s=n.length;o<s;o+=3,a+=2){const s=2*n[o],A=2*n[o+1],l=2*n[o+2],c=e[s],u=e[s+1],h=e[A],d=e[A+1],f=e[l],p=e[l+1],m=h-c,g=d-u,v=f-c,y=p-u,x=2*(m*y-g*v);if(Math.abs(x)<1e-9){let i=1e9;const o=2*n[0];i*=Math.sign((e[o]-c)*y-(e[o+1]-u)*v),t=(c+f)/2-i*y,r=(u+p)/2+i*v}else{const e=1/x,n=m*m+g*g,i=v*v+y*y;t=c+(y*n-g*i)*e,r=u+(m*i-v*n)*e}i[a]=t,i[a+1]=r}let o,a,s,A=t[t.length-1],l=4*A,c=e[2*A],u=e[2*A+1];r.fill(0);for(let n=0;n<t.length;++n)A=t[n],o=l,a=c,s=u,l=4*A,c=e[2*A],u=e[2*A+1],r[o+2]=r[l]=s-u,r[o+3]=r[l+1]=c-a}render(e){const t=null==e?e=new Np:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:o,vectors:a}=this;if(i.length<=1)return null;for(let t=0,r=n.length;t<r;++t){const r=n[t];if(r<t)continue;const i=2*Math.floor(t/3),a=2*Math.floor(r/3),s=o[i],A=o[i+1],l=o[a],c=o[a+1];this._renderSegment(s,A,l,c,e)}let s,A=i[i.length-1];for(let t=0;t<i.length;++t){s=A,A=i[t];const n=2*Math.floor(r[A]/3),l=o[n],c=o[n+1],u=4*s,h=this._project(l,c,a[u+2],a[u+3]);h&&this._renderSegment(l,c,h[0],h[1],e)}return t&&t.value()}renderBounds(e){const t=null==e?e=new Np:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=null==t?t=new Np:void 0,r=this._clip(e);if(null===r||!r.length)return;t.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let e=2;e<i;e+=2)r[e]===r[e-2]&&r[e+1]===r[e-1]||t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){const t=new zp;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,i){let o;const a=this._regioncode(e,t),s=this._regioncode(n,r);0===a&&0===s?(i.moveTo(e,t),i.lineTo(n,r)):(o=this._clipSegment(e,t,n,r,a,s))&&(i.moveTo(o[0],o[1]),i.lineTo(o[2],o[3]))}contains(e,t,n){return(t=+t)==t&&(n=+n)==n&&this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const e=this._clip(n);if(e)e:for(let r=0,i=t.length;r<i;r+=2)for(let o=0,a=e.length;o<a;o+=2)if(t[r]==e[o]&&t[r+1]==e[o+1]&&t[(r+2)%i]==e[(o+a-2)%a]&&t[(r+3)%i]==e[(o+a-1)%a]){yield n;break e}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,o=n[e];if(-1===o)return null;const a=[];let s=o;do{const n=Math.floor(s/3);if(a.push(t[2*n],t[2*n+1]),s=s%3==2?s-2:s+1,i[s]!==e)break;s=r[s]}while(s!==o&&-1!==s);return a}_clip(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(null===t)return null;const{vectors:n}=this,r=4*e;return n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t)}_clipFinite(e,t){const n=t.length;let r,i,o,a,s=null,A=t[n-2],l=t[n-1],c=this._regioncode(A,l),u=0;for(let h=0;h<n;h+=2)if(r=A,i=l,A=t[h],l=t[h+1],o=c,c=this._regioncode(A,l),0===o&&0===c)a=u,u=0,s?s.push(A,l):s=[A,l];else{let t,n,h,d,f;if(0===o){if(null===(t=this._clipSegment(r,i,A,l,o,c)))continue;[n,h,d,f]=t}else{if(null===(t=this._clipSegment(A,l,r,i,c,o)))continue;[d,f,n,h]=t,a=u,u=this._edgecode(n,h),a&&u&&this._edge(e,a,u,s,s.length),s?s.push(n,h):s=[n,h]}a=u,u=this._edgecode(d,f),a&&u&&this._edge(e,a,u,s,s.length),s?s.push(d,f):s=[d,f]}if(s)a=u,u=this._edgecode(s[0],s[1]),a&&u&&this._edge(e,a,u,s,s.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(e,t,n,r,i,o){for(;;){if(0===i&&0===o)return[e,t,n,r];if(i&o)return null;let a,s,A=i||o;8&A?(a=e+(n-e)*(this.ymax-t)/(r-t),s=this.ymax):4&A?(a=e+(n-e)*(this.ymin-t)/(r-t),s=this.ymin):2&A?(s=t+(r-t)*(this.xmax-e)/(n-e),a=this.xmax):(s=t+(r-t)*(this.xmin-e)/(n-e),a=this.xmin),i?(e=a,t=s,i=this._regioncode(e,t)):(n=a,r=s,o=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,i,o){let a,s=Array.from(t);if((a=this._project(s[0],s[1],n,r))&&s.unshift(a[0],a[1]),(a=this._project(s[s.length-2],s[s.length-1],i,o))&&s.push(a[0],a[1]),s=this._clipFinite(e,s))for(let t,n=0,r=s.length,i=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)t=i,i=this._edgecode(s[n],s[n+1]),t&&i&&(n=this._edge(e,t,i,s,n),r=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,t,n,r,i){for(;t!==n;){let n,o;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,o=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,o=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,o=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,o=this.ymin}r[i]===n&&r[i+1]===o||!this.contains(e,n,o)||(r.splice(i,0,n,o),i+=2)}if(r.length>4)for(let e=0;e<r.length;e+=2){const t=(e+2)%r.length,n=(e+4)%r.length;(r[e]===r[t]&&r[t]===r[n]||r[e+1]===r[t+1]&&r[t+1]===r[n+1])&&(r.splice(t,2),e-=2)}return i}_project(e,t,n,r){let i,o,a,s=1/0;if(r<0){if(t<=this.ymin)return null;(i=(this.ymin-t)/r)<s&&(a=this.ymin,o=e+(s=i)*n)}else if(r>0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)<s&&(a=this.ymax,o=e+(s=i)*n)}if(n>0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)<s&&(o=this.xmax,a=t+(s=i)*r)}else if(n<0){if(e<=this.xmin)return null;(i=(this.xmin-e)/n)<s&&(o=this.xmin,a=t+(s=i)*r)}return[o,a]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}}const Fp=2*Math.PI,Hp=Math.pow;function Gp(e){return e[0]}function Vp(e){return e[1]}function jp(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Wp{static from(e,t=Gp,n=Vp,r){return new Wp("length"in e?function(e,t,n,r){const i=e.length,o=new Float64Array(2*i);for(let a=0;a<i;++a){const i=e[a];o[2*a]=t.call(r,i,a,e),o[2*a+1]=n.call(r,i,a,e)}return o}(e,t,n,r):Float64Array.from(function*(e,t,n,r){let i=0;for(const o of e)yield t.call(r,o,i,e),yield n.call(r,o,i,e),++i}(e,t,n,r)))}constructor(e){this._delaunator=new Tp(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){const r=2*t[e],i=2*t[e+1],o=2*t[e+2];if((n[o]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[o+1]-n[r+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]));const e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){const n=jp(t[2*e],t[2*e+1],i);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new Tp(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){const t=i[e%3==2?e-2:e+1];-1!==n[e]&&-1!==o[t]||(o[t]=e)}for(let e=0,t=r.length;e<t;++e)a[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(e){return new Up(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const t=a.indexOf(e);return t>0&&(yield a[t-1]),void(t<a.length-1&&(yield a[t+1]))}const s=t[e];if(-1===s)return;let A=s,l=-1;do{if(yield l=o[A],A=A%3==2?A-2:A+1,o[A]!==e)return;if(A=i[A],-1===A){const t=n[(r[e]+1)%n.length];return void(t!==l&&(yield t))}}while(A!==s)}find(e,t,n=0){if((e=+e)!=e||(t=+t)!=t)return-1;const r=n;let i;for(;(i=this._step(n,e,t))>=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:s,points:A}=this;if(-1===r[e]||!A.length)return(e+1)%(A.length>>1);let l=e,c=Hp(t-A[2*e],2)+Hp(n-A[2*e+1],2);const u=r[e];let h=u;do{let r=s[h];const u=Hp(t-A[2*r],2)+Hp(n-A[2*r+1],2);if(u<c&&(c=u,l=r),h=h%3==2?h-2:h+1,s[h]!==e)break;if(h=a[h],-1===h){if(h=i[(o[e]+1)%i.length],h!==r&&Hp(t-A[2*h],2)+Hp(n-A[2*h+1],2)<c)return h;break}}while(h!==u);return l}render(e){const t=null==e?e=new Np:void 0,{points:n,halfedges:r,triangles:i}=this;for(let t=0,o=r.length;t<o;++t){const o=r[t];if(o<t)continue;const a=2*i[t],s=2*i[o];e.moveTo(n[a],n[a+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){void 0!==t||e&&"function"==typeof e.moveTo||(t=e,e=null),t=null==t?2:+t;const n=null==e?e=new Np:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){const i=r[n],o=r[n+1];e.moveTo(i+t,o),e.arc(i,o,t,0,Fp)}return n&&n.value()}renderHull(e){const t=null==e?e=new Np:void 0,{hull:n,points:r}=this,i=2*n[0],o=n.length;e.moveTo(r[i],r[i+1]);for(let t=1;t<o;++t){const i=2*n[t];e.lineTo(r[i],r[i+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new zp;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=null==t?t=new Np:void 0,{points:r,triangles:i}=this,o=2*i[e*=3],a=2*i[e+1],s=2*i[e+2];return t.moveTo(r[o],r[o+1]),t.lineTo(r[a],r[a+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new zp;return this.renderTriangle(e,t),t.value()}}const Qp=Math.PI,Yp=Qp/2,Xp=180/Qp,Zp=Qp/180,Jp=Math.atan2,Kp=Math.cos,$p=Math.max,em=Math.min,tm=Math.sin,nm=Math.sign||function(e){return e>0?1:e<0?-1:0},rm=Math.sqrt;function im(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function om(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function am(e,t){return[e[0]+t[0],e[1]+t[1],e[2]+t[2]]}function sm(e){var t=rm(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);return[e[0]/t,e[1]/t,e[2]/t]}function Am(e){return[Jp(e[1],e[0])*Xp,(t=$p(-1,em(1,e[2])),(t>1?Yp:t<-1?-Yp:Math.asin(t))*Xp)];var t}function lm(e){const t=e[0]*Zp,n=e[1]*Zp,r=Kp(n);return[r*Kp(t),r*tm(t),tm(n)]}function cm(e){return im((e=e.map((e=>lm(e))))[0],om(e[2],e[1]))}function um(e){const t=function(e){if(e.length<2)return{};let t=0;for(;isNaN(e[t][0]+e[t][1])&&t++<e.length;);const n=function(e){function t(t){return(t=e(t[0]*xc,t[1]*xc))[0]*=yc,t[1]*=yc,t}return e=rh(e[0]*xc,e[1]*xc,e.length>2?e[2]*xc:0),t.invert=function(t){return(t=e.invert(t[0]*xc,t[1]*xc))[0]*=yc,t[1]*=yc,t},t}(e[t]),r=ld().translate([0,0]).scale(1).rotate(n.invert([180,0]));e=e.map(r);const i=[];let o=1;for(let t=0,n=e.length;t<n;t++){let n=e[t][0]**2+e[t][1]**2;!isFinite(n)||n>1e32?i.push(t):n>o&&(o=n)}const a=1e6*rm(o);i.forEach((t=>e[t]=[a,0])),e.push([0,a]),e.push([-a,0]),e.push([0,-a]);const s=Wp.from(e);s.projection=r;const{triangles:A,halfedges:l,inedges:c}=s;for(let n=0,r=l.length;n<r;n++)if(l[n]<0){const e=n%3==2?n-2:n+1,r=n%3==0?n+2:n-1,i=l[e],o=l[r];l[i]=o,l[o]=i,l[e]=l[r]=-1,A[n]=A[e]=A[r]=t,c[A[i]]=i%3==0?i+2:i-1,c[A[o]]=o%3==0?o+2:o-1,n+=2-n%3}else A[n]>e.length-3-1&&(A[n]=t);return s}(e),n=function(e){const{triangles:t}=e;if(!t)return[];const n=[];for(let e=0,r=t.length/3;e<r;e++){const r=t[3*e],i=t[3*e+1],o=t[3*e+2];r!==i&&i!==o&&n.push([r,o,i])}return n}(t),r=function(e,t){const n=new Set;return 2===t.length?[[0,1]]:(e.forEach((e=>{if(e[0]!==e[1]&&!(cm(e.map((e=>t[e])))<0))for(let t,r=0;r<3;r++)t=(r+1)%3,n.add(ic([e[r],e[t]]).join("-"))})),Array.from(n,(e=>e.split("-").map(Number))))}(n,e),i=function(e,t){const n=[];e.forEach((e=>{for(let t=0;t<3;t++){const r=e[t],i=e[(t+1)%3];n[r]=n[r]||[],n[r].push(i)}})),0===e.length&&(2===t?(n[0]=[1],n[1]=[0]):1===t&&(n[0]=[]));return n}(n,e.length),o=function(e,t){function n(e,t){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}return function(r,i,o){void 0===o&&(o=0);let a,s,A=o;const l=lm([r,i]);do{a=o,o=null,s=n(l,lm(t[a])),e[a].forEach((e=>{let r=n(l,lm(t[e]));if(r<s)return s=r,o=e,void(A=e)}))}while(null!==o);return A}}(i,e),a=function(e,t){return e.map((e=>{const n=e.map((e=>t[e])).map(lm);return Am(sm(am(am(om(n[1],n[0]),om(n[2],n[1])),om(n[0],n[2]))))}))}(n,e),{polygons:s,centers:A}=function(e,t,n){const r=[],i=e.slice();if(0===t.length){if(n.length<2)return{polygons:r,centers:i};if(2===n.length){const e=lm(n[0]),t=lm(n[1]),a=sm(am(e,t)),s=sm(om(e,t)),A=om(a,s),l=[a,om(a,A),om(om(a,A),A),om(om(om(a,A),A),A)].map(Am).map(o);return r.push(l),r.push(l.slice().reverse()),{polygons:r,centers:i}}}t.forEach(((e,t)=>{for(let n=0;n<3;n++){const i=e[n],o=e[(n+1)%3],a=e[(n+2)%3];r[i]=r[i]||[],r[i].push([o,a,t,[i,o,a]])}}));function o(e){let n=-1;return i.slice(t.length,1/0).forEach(((r,i)=>{r[0]===e[0]&&r[1]===e[1]&&(n=i+t.length)})),n<0&&(n=i.length,i.push(e)),n}return{polygons:r.map((e=>{const t=[e[0][2]];let r=e[0][1];for(let n=1;n<e.length;n++)for(let n=0;n<e.length;n++)if(e[n][0]==r){r=e[n][1],t.push(e[n][2]);break}if(t.length>2)return t;if(2==t.length){const r=hm(n[e[0][3][0]],n[e[0][3][1]],i[t[0]]),a=hm(n[e[0][3][2]],n[e[0][3][0]],i[t[0]]),s=o(r),A=o(a);return[t[0],A,t[1],s]}})),centers:i}}(a,n,e),l=function(e){const t=[];return e.forEach((e=>{if(!e)return;let n=e[e.length-1];for(let r of e)r>n&&t.push([n,r]),n=r})),t}(s),c=function(e,t){const n=new Set,r=[];e.map((e=>{if(!(cm(e.map((e=>t[e>t.length?0:e])))>1e-12))for(let t=0;t<3;t++){let r=[e[t],e[(t+1)%3]],i=`${r[0]}-${r[1]}`;n.has(i)?n.delete(i):n.add(`${r[1]}-${r[0]}`)}}));const i=new Map;let o;if(n.forEach((e=>{e=e.split("-").map(Number),i.set(e[0],e[1]),o=e[0]})),void 0===o)return r;let a=o;do{r.push(a);let e=i.get(a);i.set(a,-1),a=e}while(a>-1&&a!==o);return r}(n,e),u=function(e,t){return function(n){const r=new Map,i=new Map;return e.forEach(((e,t)=>{const o=e.join("-");r.set(o,n[t]),i.set(o,!0)})),t.forEach((e=>{let t=0,n=-1;for(let i=0;i<3;i++){let o=ic([e[i],e[(i+1)%3]]).join("-");r.get(o)>t&&(t=r.get(o),n=o)}i.set(n,!1)})),e.map((e=>i.get(e.join("-"))))}}(r,n);return{delaunay:t,edges:r,triangles:n,centers:A,neighbors:i,polygons:s,mesh:l,hull:c,urquhart:u,find:o}}function hm(e,t,n){e=lm(e),t=lm(t),n=lm(n);const r=nm(im(om(t,e),n));return Am(sm(am(e,t)).map((e=>r*e)))}function dm(e){const t=function(e){if(t.delaunay=null,t._data=e,"object"==typeof t._data&&"FeatureCollection"===t._data.type&&(t._data=t._data.features),"object"==typeof t._data){const e=t._data.map((e=>[t._vx(e),t._vy(e),e])).filter((e=>isFinite(e[0]+e[1])));t.points=e.map((e=>[e[0],e[1]])),t.valid=e.map((e=>e[2])),t.delaunay=um(t.points)}return t};return t._vx=function(e){return"object"==typeof e&&"type"in e?eh(e)[0]:0 in e?e[0]:void 0},t._vy=function(e){return"object"==typeof e&&"type"in e?eh(e)[1]:1 in e?e[1]:void 0},t.x=function(e){return e?(t._vx=e,t):t._vx},t.y=function(e){return e?(t._vy=e,t):t._vy},t.polygons=function(e){if(void 0!==e&&t(e),!t.delaunay)return!1;const n={type:"FeatureCollection",features:[]};return 0===t.valid.length||(t.delaunay.polygons.forEach(((e,r)=>n.features.push({type:"Feature",geometry:e?{type:"Polygon",coordinates:[[...e,e[0]].map((e=>t.delaunay.centers[e]))]}:null,properties:{site:t.valid[r],sitecoordinates:t.points[r],neighbours:t.delaunay.neighbors[r]}}))),1===t.valid.length&&n.features.push({type:"Feature",geometry:{type:"Sphere"},properties:{site:t.valid[0],sitecoordinates:t.points[0],neighbours:[]}})),n},t.triangles=function(e){return void 0!==e&&t(e),!!t.delaunay&&{type:"FeatureCollection",features:t.delaunay.triangles.map(((e,n)=>((e=e.map((e=>t.points[e]))).center=t.delaunay.centers[n],e))).filter((e=>cm(e)>0)).map((e=>({type:"Feature",properties:{circumcenter:e.center},geometry:{type:"Polygon",coordinates:[[...e,e[0]]]}})))}},t.links=function(e){if(void 0!==e&&t(e),!t.delaunay)return!1;const n=t.delaunay.edges.map((e=>Dh(t.points[e[0]],t.points[e[1]]))),r=t.delaunay.urquhart(n);return{type:"FeatureCollection",features:t.delaunay.edges.map(((e,i)=>({type:"Feature",properties:{source:t.valid[e[0]],target:t.valid[e[1]],length:n[i],urquhart:!!r[i]},geometry:{type:"LineString",coordinates:[t.points[e[0]],t.points[e[1]]]}})))}},t.mesh=function(e){return void 0!==e&&t(e),!!t.delaunay&&{type:"MultiLineString",coordinates:t.delaunay.edges.map((e=>[t.points[e[0]],t.points[e[1]]]))}},t.cellMesh=function(e){if(void 0!==e&&t(e),!t.delaunay)return!1;const{centers:n,polygons:r}=t.delaunay,i=[];for(const e of r)if(e)for(let t=e.length,r=e[t-1],o=e[0],a=0;a<t;r=o,o=e[++a])o>r&&i.push([n[r],n[o]]);return{type:"MultiLineString",coordinates:i}},t._found=void 0,t.find=function(e,n,r){if(t._found=t.delaunay.find(e,n,t._found),!r||Dh([e,n],t.points[t._found])<r)return t._found},t.hull=function(e){void 0!==e&&t(e);const n=t.delaunay.hull,r=t.points;return 0===n.length?null:{type:"Polygon",coordinates:[[...n.map((e=>r[e])),r[n[0]]]]}},e?t(e):t}function fm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pm(e){return pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pm(e)}function mm(e,t){return mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},mm(e,t)}function gm(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pm(e);if(t){var i=pm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gm(this,n)}}function ym(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||bm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xm(e){return function(e){if(Array.isArray(e))return _m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||bm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bm(e,t){if(e){if("string"==typeof e)return _m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_m(e,t):void 0}}function _m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wm(e,t){return e.map((function(e){var n,r=[];return e.forEach((function(e){if(n){var i=180*Dh(e,n)/Math.PI;if(i>t)for(var o=Wh(n,e),a=1/Math.ceil(i/t),s=a;s<1;)r.push(o(s)),s+=a}r.push(n=e)})),r}))}function Mm(e,t){var n={type:"Polygon",coordinates:e},r=ym(Hu(n),2),i=ym(r[0],2),o=i[0],a=i[1],s=ym(r[1],2),A=s[0],l=s[1];if(Math.min(Math.abs(A-o),Math.abs(l-a))<t)return[];var c=o>A||l>=89||a<=-89;return function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minLng,r=t.maxLng,i=t.minLat,o=t.maxLat,a=Math.round(Math.pow(360/e,2)/Math.PI),s=(1+Math.sqrt(5))/2,A=function(e){return e/s*360%360-180},l=function(e){return Math.acos(2*e/a-1)/Math.PI*180-90},c=function(e){return a*(Math.cos((e+90)*Math.PI/180)+1)/2},u=[void 0!==o?Math.ceil(c(o)):0,void 0!==i?Math.floor(c(i)):a-1],h=void 0===n&&void 0===r?function(){return!0}:void 0===n?function(e){return e<=r}:void 0===r?function(e){return e>=n}:r>=n?function(e){return e>=n&&e<=r}:function(e){return e>=n||e<=r},d=[],f=u[0];f<=u[1];f++){var p=A(f);h(p)&&d.push([p,l(f)])}return d}(t,{minLng:o,maxLng:A,minLat:a,maxLat:l}).filter((function(e){return Sm(e,n,c)}))}function Sm(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n?Hh(t,e):Op(e,t)}var Em=window.THREE?window.THREE:{BufferGeometry:dn,Float32BufferAttribute:on},Tm=(new Em.BufferGeometry).setAttribute?"setAttribute":"addAttribute",Cm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mm(e,t)}(o,e);var t,n,r,i=vm(o);function o(e,t,n,r,a,s,A){var l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(l=i.call(this)).type="ConicPolygonBufferGeometry",l.parameters={polygonGeoJson:e,startHeight:t,endHeight:n,closedBottom:r,closedTop:a,includeSides:s,curvatureResolution:A},t=t||0,n=n||1,r=void 0===r||r,a=void 0===a||a,s=void 0===s||s;var c=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).resolution,n=void 0===t?1/0:t,r=wm(e,n),i=uc(r),o=Mm(e,n),a=[].concat(xm(i),xm(o)),s={type:"Polygon",coordinates:e},A=ym(Hu(s),2),l=ym(A[0],2),c=l[0],u=l[1],h=ym(A[1],2),d=h[0],f=h[1],p=c>d||f>=89||u<=-89,m=[];if(p){var g=dm(a).triangles(),v=new Map(a.map((function(e,t){var n=ym(e,2),r=n[0],i=n[1];return["".concat(r,"-").concat(i),t]})));g.features.forEach((function(e){var t,n=e.geometry.coordinates[0].slice(0,3).reverse(),r=[];if(n.forEach((function(e){var t=ym(e,2),n=t[0],i=t[1],o="".concat(n,"-").concat(i);v.has(o)&&r.push(v.get(o))})),3===r.length){if(r.some((function(e){return e<i.length}))&&!Sm(e.properties.circumcenter,s,p))return;(t=m).push.apply(t,r)}}))}else if(o.length)!function(){for(var e=Tp.from(a),t=function(t,n){var r,o=[2,1,0].map((function(n){return e.triangles[t+n]})),A=o.map((function(e){return a[e]}));if(o.some((function(e){return e<i.length}))&&!Sm([0,1].map((function(e){return cc(A,(function(t){return t[e]}))})),s,p))return"continue";(r=m).push.apply(r,xm(o))},n=0,r=e.triangles.length;n<r;n+=3)t(n)}();else{var y=$l.flatten(r),x=y.vertices,b=y.holes;m=$l(x,void 0===b?[]:b,2)}var _=pp(ic(a,(function(e){return e[0]})),[0,1]),w=pp(ic(a,(function(e){return e[1]})),[0,1]),M=a.map((function(e){var t=ym(e,2),n=t[0],r=t[1];return[_(n),w(r)]}));return{contour:r,triangles:{points:a,indices:m,uvs:M}}}(e,{resolution:A=A||5}),u=c.contour,h=c.triangles,d=uc(h.uvs),f=[],p=[],m=[],g=0,v=function(e){var t=Math.round(f.length/3),n=m.length;f=f.concat(e.vertices),p=p.concat(e.uvs),m=m.concat(t?e.indices.map((function(e){return e+t})):e.indices),l.addGroup(n,m.length-n,g++)};function y(e,t){var n=e.map((function(e){return e.map((function(e){var n=ym(e,2),r=n[0];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(90-e)*Math.PI/180,i=(90-t)*Math.PI/180;return[n*Math.sin(r)*Math.cos(i),n*Math.cos(r),n*Math.sin(r)*Math.sin(i)]}(n[1],r,t)}))}));return $l.flatten(n)}function x(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{indices:t?h.indices:h.indices.slice().reverse(),vertices:y([h.points],e).vertices,uvs:d}}return s&&v(function(){for(var e=y(u,t),r=e.vertices,i=e.holes,o=y(u,n).vertices,a=uc([o,r]),s=Math.round(o.length/3),A=new Set(i),l=0,c=[],h=0;h<s;h++){var d=h+1;if(d===s)d=l;else if(A.has(d)){var f=d;d=l,l=f}c.push(h,h+s,d+s),c.push(d+s,d,h)}for(var p=[],m=1;m>=0;m--)for(var g=0;g<s;g+=1)p.push(g/(s-1),m);return{indices:c,vertices:a,uvs:p}}()),r&&v(x(t,!1)),a&&v(x(n,!0)),l.setIndex(m),l[Tm]("position",new Em.Float32BufferAttribute(f,3)),l[Tm]("uv",new Em.Float32BufferAttribute(p,2)),l.computeVertexNormals(),l}return t=o,n&&fm(t.prototype,n),r&&fm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(Em.BufferGeometry);var Rm=function(e){var t,n=void 0!==(e=e||{})?e:{},r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);var i,o,a,s,A;i="object"==typeof window,o="function"==typeof importScripts,s="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,a=s&&!i&&!o,A=!i&&!a&&!o;var l,c,u,h,d,f="";a?(f=__dirname+"/",l=function(e,t){var n;return(n=ie(e))||(h||(h=require("fs")),d||(d=require("path")),e=d.normalize(e),n=h.readFileSync(e)),t?n:n.toString()},u=function(e){var t=l(e,!0);return t.buffer||(t=new Uint8Array(t)),x(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),n.inspect=function(){return"[Emscripten Module object]"}):A?("undefined"!=typeof read&&(l=function(e){var t=ie(e);return t?ne(t):read(e)}),u=function(e){var t;return(t=ie(e))?t:"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(x("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(i||o)&&(o?f=self.location.href:document.currentScript&&(f=document.currentScript.src),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",l=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(t){var n=ie(e);if(n)return ne(n);throw t}},o&&(u=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(t){var n=ie(e);if(n)return n;throw t}}),c=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)t(r.response);else{var i=ie(e);i?t(i.buffer):n()}},r.onerror=n,r.send(null)});var p=n.print||console.log.bind(console),m=n.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(n[t]=r[t]);r=null,n.arguments,n.thisProgram;var g=0,v=function(){return g};var y=!1;function x(e,t){e||ve("Assertion failed: "+t)}function b(e){var t=n["_"+e];return x(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function _(e,t,n,r,i){var o={string:function(e){var t=0;if(null!=e&&0!==e){var n=1+(e.length<<2);(function(e,t,n){(function(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}t[n]=0})(e,S,t,n)})(e,t=le(n),n)}return t},array:function(e){var t=le(e.length);return function(e,t){M.set(e,t)}(e,t),t}};var a=b(e),s=[],A=0;if(r)for(var l=0;l<r.length;l++){var c=o[n[l]];c?(0===A&&(A=ue()),s[l]=c(r[l])):s[l]=r[l]}var u=a.apply(null,s);return u=function(e){return"string"===t?L(e):"boolean"===t?Boolean(e):e}(u),0!==A&&ce(A),u}var w,M,S,E,T,C,R,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(e,t){return e?function(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&P)return P.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var A=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|A:(7&a)<<18|s<<12|A<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var l=a-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}(S,e,t):""}function q(e,t){return e%t>0&&(e+=t-e%t),e}function D(e){w=e,n.HEAP8=M=new Int8Array(e),n.HEAP16=E=new Int16Array(e),n.HEAP32=T=new Int32Array(e),n.HEAPU8=S=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=C=new Float32Array(e),n.HEAPF64=R=new Float64Array(e)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var I=n.TOTAL_MEMORY||33554432;function O(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}I=(w=n.buffer?n.buffer:new ArrayBuffer(I)).byteLength,D(w),T[6004]=5266928;var B=[],k=[],N=[],z=[];var U=Math.abs,F=Math.ceil,H=Math.floor,G=Math.min,V=0,j=null;n.preloadedImages={},n.preloadedAudios={};var W,Q,Y=null,X="data:application/octet-stream;base64,";function Z(e){return String.prototype.startsWith?e.startsWith(X):0===e.indexOf(X)}Y="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAABFAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/NFQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";function J(e){return e}function K(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))}function $(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function ee(){return M.length}function te(e){try{var t=new ArrayBuffer(e);if(t.byteLength!=e)return;return new Int8Array(t).set(M),ae(t),D(t),1}catch(e){}}function ne(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r>255&&(r&=255),t.push(String.fromCharCode(r))}return t.join("")}var re="function"==typeof atob?atob:function(e){var t,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="",l=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(l++))<<2|(i=s.indexOf(e.charAt(l++)))>>4,n=(15&i)<<4|(o=s.indexOf(e.charAt(l++)))>>2,r=(3&o)<<6|(a=s.indexOf(e.charAt(l++))),A+=String.fromCharCode(t),64!==o&&(A+=String.fromCharCode(n)),64!==a&&(A+=String.fromCharCode(r))}while(l<e.length);return A};function ie(e){if(Z(e))return function(e){if("boolean"==typeof a&&a){var t;try{t=Buffer.from(e,"base64")}catch(n){t=new Buffer(e,"base64")}return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}try{for(var n=re(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}catch(e){throw new Error("Converting base64 string to bytes failed.")}}(e.slice(X.length))}var oe=function(e,t,n){var r=new e.Int8Array(n),i=new e.Int32Array(n);new e.Uint8Array(n),new e.Float32Array(n);var o=new e.Float64Array(n),a=0|t.p,s=e.Math.floor,A=e.Math.abs,l=e.Math.sqrt,c=e.Math.pow,u=e.Math.cos,h=e.Math.sin,d=e.Math.tan,f=e.Math.acos,p=e.Math.asin,m=e.Math.atan,g=e.Math.atan2,v=e.Math.ceil,y=e.Math.imul,x=e.Math.min,b=e.Math.clz32,_=t.b,w=t.c,M=t.d,S=t.e,E=t.f,T=t.g,C=t.h,R=t.i,P=24048;function L(e,t,n,r){var i,o;0|q(e|=0,t|=0,n|=0,r|=0,0)&&(Rt(0|r,0,(o=1+(0|y(3*n|0,n+1|0))|0)<<3|0),(i=0|yt(o,4))&&(D(e,t,n,r,i,o,0),vt(i)))}function q(e,t,n,r,o){e|=0,t|=0,n|=0,o|=0;var a,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0;if(a=P,P=P+16|0,f=a,i[(s=r|=0)>>2]=e,i[s+4>>2]=t,(s=0!=(0|o))&&(i[o>>2]=0),0|Ie(e,t))return P=a,0|(f=1);i[f>>2]=0;e:do{if((0|n)>=1)if(s)for(u=0,h=1,d=1,A=0,s=e;;){if(!(A|u)){if(0==(0|(s=0|I(s,t,4,f)))&0==(0|(t=0|w()))){s=2;break e}if(0|Ie(s,t)){s=1;break e}}if(0==(0|(s=0|I(s,t,0|i[16+(u<<2)>>2],f)))&0==(0|(t=0|w()))){s=2;break e}if(i[(e=r+(d<<3)|0)>>2]=s,i[e+4>>2]=t,i[o+(d<<2)>>2]=h,e=(0|(A=A+1|0))==(0|h),c=6==(0|(l=u+1|0)),0|Ie(s,t)){s=1;break e}if((0|(h=h+(c&e&1)|0))>(0|n)){s=0;break}u=e?c?0:l:u,d=d+1|0,A=e?0:A}else for(u=0,h=1,d=1,A=0,s=e;;){if(!(A|u)){if(0==(0|(s=0|I(s,t,4,f)))&0==(0|(t=0|w()))){s=2;break e}if(0|Ie(s,t)){s=1;break e}}if(0==(0|(s=0|I(s,t,0|i[16+(u<<2)>>2],f)))&0==(0|(t=0|w()))){s=2;break e}if(i[(e=r+(d<<3)|0)>>2]=s,i[e+4>>2]=t,e=(0|(A=A+1|0))==(0|h),c=6==(0|(l=u+1|0)),0|Ie(s,t)){s=1;break e}if((0|(h=h+(c&e&1)|0))>(0|n)){s=0;break}u=e?c?0:l:u,d=d+1|0,A=e?0:A}else s=0}while(0);return P=a,0|(f=s)}function D(e,t,n,r,o,a,s){n|=0,r|=0,o|=0,a|=0,s|=0;var A,l,c=0,u=0,h=0,d=0,f=0;if(l=P,P=P+16|0,A=l,0==(0|(e|=0))&0==(0|(t|=0)))P=l;else{if(c=0|wt(0|e,0|t,0|a,((0|a)<0)<<31>>31|0),w(),!(0==(0|(f=0|i[(d=u=r+(c<<3)|0)>>2]))&0==(0|(d=0|i[d+4>>2]))|(h=(0|f)==(0|e)&(0|d)==(0|t))))do{h=(0|(d=0|i[(f=u=r+((c=(c+1|0)%(0|a)|0)<<3)|0)>>2]))==(0|e)&(0|(f=0|i[f+4>>2]))==(0|t)}while(!(0==(0|d)&0==(0|f)|h));c=o+(c<<2)|0,h&&(0|i[c>>2])<=(0|s)||(i[(f=u)>>2]=e,i[f+4>>2]=t,i[c>>2]=s,(0|s)>=(0|n)||(f=s+1|0,i[A>>2]=0,D(d=0|I(e,t,2,A),0|w(),n,r,o,a,f),i[A>>2]=0,D(d=0|I(e,t,3,A),0|w(),n,r,o,a,f),i[A>>2]=0,D(d=0|I(e,t,1,A),0|w(),n,r,o,a,f),i[A>>2]=0,D(d=0|I(e,t,5,A),0|w(),n,r,o,a,f),i[A>>2]=0,D(d=0|I(e,t,4,A),0|w(),n,r,o,a,f),i[A>>2]=0,D(d=0|I(e,t,6,A),0|w(),n,r,o,a,f))),P=l}}function I(e,t,n,r){e|=0,t|=0,n|=0;var o,a,s=0,A=0,l=0,c=0,u=0,h=0,d=0;if((0|i[(r|=0)>>2])>0){s=0;do{n=0|Ae(n),s=s+1|0}while((0|s)<(0|i[r>>2]))}o=0|Mt(0|e,0|t,45),w(),a=127&o,A=0|Oe(e,t),s=0|Mt(0|e,0|t,52),w(),s&=15;e:do{if(s)for(;;){if(h=0|Mt(0|e,0|t,0|(u=3*(15-s|0)|0)),w(),h&=7,d=0==(0|Ue(s)),s=s+-1|0,c=0|St(7,0,0|u),t&=~(0|w()),e=(u=0|St(0|i[(d?464:48)+(28*h|0)+(n<<2)>>2],0,0|u))|e&~c,t|=0|w(),!(n=0|i[(d?672:256)+(28*h|0)+(n<<2)>>2])){n=0;break e}if(!s){l=6;break}}else l=6}while(0);6==(0|l)&&(e|=h=0|St(0|(d=0|i[880+(28*a|0)+(n<<2)>>2]),0,45),t=0|w()|-1040385&t,n=0|i[4304+(28*a|0)+(n<<2)>>2],127==(127&d|0)&&(d=0|St(0|i[880+(28*a|0)+20>>2],0,45),t=0|w()|-1040385&t,n=0|i[4304+(28*a|0)+20>>2],e=0|ke(d|e,t),t=0|w(),i[r>>2]=1+(0|i[r>>2]))),l=0|Mt(0|e,0|t,45),w(),l&=127;e:do{if(0|B(l)){t:do{if(1==(0|Oe(e,t))){if((0|a)!=(0|l)){if(0|U(l,0|i[7728+(28*a|0)>>2])){e=0|ze(e,t),A=1,t=0|w();break}e=0|ke(e,t),A=1,t=0|w();break}switch(0|A){case 5:e=0|ze(e,t),t=0|w(),i[r>>2]=5+(0|i[r>>2]),A=0;break t;case 3:e=0|ke(e,t),t=0|w(),i[r>>2]=1+(0|i[r>>2]),A=0;break t;default:return d=0,_(0|(h=0)),0|d}}else A=0}while(0);if((0|n)>0){s=0;do{e=0|Be(e,t),t=0|w(),s=s+1|0}while((0|s)!=(0|n))}if((0|a)!=(0|l)){if(!(0|k(l))){if(0!=(0|A)|5!=(0|Oe(e,t)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&o){case 8:case 118:break e}3!=(0|Oe(e,t))&&(i[r>>2]=1+(0|i[r>>2]))}}else if((0|n)>0){s=0;do{e=0|ke(e,t),t=0|w(),s=s+1|0}while((0|s)!=(0|n))}}while(0);return i[r>>2]=((0|i[r>>2])+n|0)%6|0,d=e,_(0|(h=t)),0|d}function O(e,t,n,r,a,s){t|=0,n|=0,r|=0,a|=0,s|=0;var A,l,c,u,h,d,f,p,m,g=0,v=0,y=0,x=0,b=0,_=0,M=0,S=0,E=0,T=0,C=0,R=0,L=0,q=0;if(m=P,P=P+48|0,d=m+32|0,f=m+16|0,p=m,(0|(g=0|i[(e|=0)>>2]))<=0)return P=m,0|(R=0);A=e+4|0,l=d+8|0,c=f+8|0,u=p+8|0,h=((0|t)<0)<<31>>31,C=0;e:for(;;){E=(v=0|i[A>>2])+(C<<4)|0,i[d>>2]=i[E>>2],i[d+4>>2]=i[E+4>>2],i[d+8>>2]=i[E+8>>2],i[d+12>>2]=i[E+12>>2],(0|C)==(g+-1|0)?(i[f>>2]=i[v>>2],i[f+4>>2]=i[v+4>>2],i[f+8>>2]=i[v+8>>2],i[f+12>>2]=i[v+12>>2]):(E=v+(C+1<<4)|0,i[f>>2]=i[E>>2],i[f+4>>2]=i[E+4>>2],i[f+8>>2]=i[E+8>>2],i[f+12>>2]=i[E+12>>2]),E=0|W(d,f,n);t:do{if((0|E)>0){T=+(0|E),S=0;n:for(;;){q=+(E-S|0),L=+(0|S),o[p>>3]=+o[d>>3]*q/T+ +o[f>>3]*L/T,o[u>>3]=+o[l>>3]*q/T+ +o[c>>3]*L/T,v=0|wt(0|(_=0|Fe(p,n)),0|(M=0|w()),0|t,0|h),w(),x=0|i[(y=g=s+(v<<3)|0)>>2],y=0|i[y+4>>2];r:do{if(0==(0|x)&0==(0|y))R=14;else for(b=0;;){if((0|b)>(0|t)){g=1;break r}if((0|x)==(0|_)&(0|y)==(0|M)){g=7;break r}if(0==(0|(x=0|i[(y=g=s+((v=(v+1|0)%(0|t)|0)<<3)|0)>>2]))&0==(0|(y=0|i[y+4>>2]))){R=14;break}b=b+1|0}}while(0);switch(14==(0|R)&&(R=0,0==(0|_)&0==(0|M)?g=7:(i[g>>2]=_,i[g+4>>2]=M,g=0|i[r>>2],i[(b=a+(g<<3)|0)>>2]=_,i[b+4>>2]=M,i[r>>2]=g+1,g=0)),7&g){case 7:case 0:break;default:break n}if((0|E)<=(0|(S=S+1|0))){R=8;break t}}if(0|g){g=-1,R=20;break e}}else R=8}while(0);if(8==(0|R)&&(R=0),(0|(C=C+1|0))>=(0|(g=0|i[e>>2]))){g=0,R=20;break}}return 20==(0|R)?(P=m,0|g):0}function B(e){return 0|i[7728+(28*(e|=0)|0)+16>>2]}function k(e){return 4==(0|(e|=0))|117==(0|e)|0}function N(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)>>2]}function z(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)+4>>2]}function U(e,t){return t|=0,(0|i[7728+(28*(e|=0)|0)+20>>2])==(0|t)?0|(t=1):0|(t=(0|i[7728+(28*e|0)+24>>2])==(0|t))}function F(e,t){return 0|i[880+(28*(e|=0)|0)+((t|=0)<<2)>>2]}function H(e,t){return t|=0,(0|i[880+(28*(e|=0)|0)>>2])==(0|t)?0|(t=0):(0|i[880+(28*e|0)+4>>2])==(0|t)?0|(t=1):(0|i[880+(28*e|0)+8>>2])==(0|t)?0|(t=2):(0|i[880+(28*e|0)+12>>2])==(0|t)?0|(t=3):(0|i[880+(28*e|0)+16>>2])==(0|t)?0|(t=4):(0|i[880+(28*e|0)+20>>2])==(0|t)?0|(t=5):0|((0|i[880+(28*e|0)+24>>2])==(0|t)?6:7)}function G(e){return+o[(e|=0)+16>>3]<+o[e+24>>3]|0}function V(e,t){e|=0;var n,r,i=0;return(i=+o[(t|=0)>>3])>=+o[e+8>>3]&&i<=+o[e>>3]?(n=+o[e+16>>3],i=+o[e+24>>3],t=(r=+o[t+8>>3])>=i,e=r<=n&1,n<i?t&&(e=1):t||(e=0),0|(t=0!=(0|e))):0|(t=0)}function j(e,t){e|=0,t|=0;var n,r,a,s,l,c,u=0,h=0;s=P,P=P+288|0,n=s+264|0,r=s+96|0,h=(u=a=s)+96|0;do{i[u>>2]=0,u=u+4|0}while((0|u)<(0|h));return We(t,a),Ve(h=0|i[(u=a)>>2],u=0|i[u+4>>2],n),je(h,u,r),l=+Ce(n,r+8|0),o[n>>3]=+o[e>>3],o[(u=n+8|0)>>3]=+o[e+16>>3],o[r>>3]=+o[e+8>>3],o[(h=r+8|0)>>3]=+o[e+24>>3],c=+Ce(n,r),h=~~+v(+c*c/+Et(+ +A(+(+o[u>>3]-+o[h>>3])/(+o[n>>3]-+o[r>>3])),3)/(l*(2.59807621135*l)*.8)),P=s,0|(0==(0|h)?1:h)}function W(e,t,n){e|=0,t|=0,n|=0;var r,o,a,s,A,l=0,c=0;s=P,P=P+288|0,r=s+264|0,o=s+96|0,c=(l=a=s)+96|0;do{i[l>>2]=0,l=l+4|0}while((0|l)<(0|c));return We(n,a),Ve(l=0|i[(c=a)>>2],c=0|i[c+4>>2],r),je(l,c,o),A=+Ce(r,o+8|0),c=~~+v(+ +Ce(e,t)/(2*A)),P=s,0|(0==(0|c)?1:c)}function Q(e,t,n,r){t|=0,n|=0,r|=0,i[(e|=0)>>2]=t,i[e+4>>2]=n,i[e+8>>2]=r}function Y(e,t){e|=0;var n,r,a,s,l=0,c=0,u=0,h=0,d=0,f=0,p=0;i[(s=(t|=0)+8|0)>>2]=0,r=+o[e>>3],h=+A(+r),a=+o[e+8>>3],h+=.5*(d=+A(+a)/.8660254037844386),h-=+(0|(l=~~h)),d-=+(0|(e=~~d));do{if(h<.5){if(h<.3333333333333333){if(i[t>>2]=l,d<.5*(h+1)){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(e=(1&!(d<(p=1-h)))+e|0,i[t+4>>2]=e,p<=d&d<2*h){l=l+1|0,i[t>>2]=l;break}i[t>>2]=l;break}if(!(h<.6666666666666666)){if(l=l+1|0,i[t>>2]=l,d<.5*h){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(d<1-h){if(i[t+4>>2]=e,2*h-1<d){i[t>>2]=l;break}}else e=e+1|0,i[t+4>>2]=e;l=l+1|0,i[t>>2]=l}while(0);do{if(r<0){if(1&e){l=~~(+(0|l)-(2*(+((f=0|xt(0|l,((0|l)<0)<<31>>31|0,0|(f=(e+1|0)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|w()))+1)),i[t>>2]=l;break}l=~~(+(0|l)-2*(+((f=0|xt(0|l,((0|l)<0)<<31>>31|0,0|(f=(0|e)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|w()))),i[t>>2]=l;break}}while(0);f=t+4|0,a<0&&(l=l-((1|e<<1)/2|0)|0,i[t>>2]=l,e=0-e|0,i[f>>2]=e),c=e-l|0,(0|l)<0?(u=0-l|0,i[f>>2]=c,i[s>>2]=u,i[t>>2]=0,e=c,l=0):u=0,(0|e)<0&&(l=l-e|0,i[t>>2]=l,u=u-e|0,i[s>>2]=u,i[f>>2]=0,e=0),n=l-u|0,c=e-u|0,(0|u)<0&&(i[t>>2]=n,i[f>>2]=c,i[s>>2]=0,e=c,l=n,u=0),(0|(c=(0|u)<(0|(c=(0|e)<(0|l)?e:l))?u:c))<=0||(i[t>>2]=l-c,i[f>>2]=e-c,i[s>>2]=u-c)}function X(e){var t,n=0,r=0,o=0,a=0,s=0;n=0|i[(e|=0)>>2],r=0|i[(t=e+4|0)>>2],(0|n)<0&&(r=r-n|0,i[t>>2]=r,i[(s=e+8|0)>>2]=(0|i[s>>2])-n,i[e>>2]=0,n=0),(0|r)<0?(n=n-r|0,i[e>>2]=n,a=(0|i[(s=e+8|0)>>2])-r|0,i[s>>2]=a,i[t>>2]=0,r=0):(s=a=e+8|0,a=0|i[a>>2]),(0|a)<0&&(n=n-a|0,i[e>>2]=n,r=r-a|0,i[t>>2]=r,i[s>>2]=0,a=0),(0|(o=(0|a)<(0|(o=(0|r)<(0|n)?r:n))?a:o))<=0||(i[e>>2]=n-o,i[t>>2]=r-o,i[s>>2]=a-o)}function Z(e,t){t|=0;var n,r;r=0|i[(e|=0)+8>>2],n=+((0|i[e+4>>2])-r|0),o[t>>3]=+((0|i[e>>2])-r|0)-.5*n,o[t+8>>3]=.8660254037844386*n}function J(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[t>>2])+(0|i[e>>2]),i[n+4>>2]=(0|i[t+4>>2])+(0|i[e+4>>2]),i[n+8>>2]=(0|i[t+8>>2])+(0|i[e+8>>2])}function K(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[e>>2])-(0|i[t>>2]),i[n+4>>2]=(0|i[e+4>>2])-(0|i[t+4>>2]),i[n+8>>2]=(0|i[e+8>>2])-(0|i[t+8>>2])}function $(e,t){t|=0;var n,r=0;r=0|y(0|i[(e|=0)>>2],t),i[e>>2]=r,n=0|y(0|i[(r=e+4|0)>>2],t),i[r>>2]=n,t=0|y(0|i[(e=e+8|0)>>2],t),i[e>>2]=t}function ee(e){var t,n,r=0,o=0,a=0,s=0,A=0;A=(0|(n=0|i[(e|=0)>>2]))<0,e=(e=(o=(0|(s=((t=(0|(a=(0|i[e+4>>2])-(A?n:0)|0))<0)?0-a|0:0)+((0|i[e+8>>2])-(A?n:0))|0))<0)?0:s)-((a=(0|(o=(0|e)<(0|(o=(0|(r=(t?0:a)-(o?s:0)|0))<(0|(s=(A?0:n)-(t?a:0)-(o?s:0)|0))?r:s))?e:o))>0)?o:0)|0,r=r-(a?o:0)|0;e:do{switch(s-(a?o:0)|0){case 0:switch(0|r){case 0:return 0|(A=0==(0|e)?0:1==(0|e)?1:7);case 1:return 0|(A=0==(0|e)?2:1==(0|e)?3:7);default:break e}case 1:switch(0|r){case 0:return 0|(A=0==(0|e)?4:1==(0|e)?5:7);case 1:if(e)break e;return 0|(e=6);default:break e}}}while(0);return 0|(A=7)}function te(e){var t,n,r=0,o=0,a=0,s=0,A=0;o=0|i[(t=(e|=0)+8|0)>>2],a=0|mt(+((3*(r=(0|i[e>>2])-o|0)|0)-(o=(0|i[(n=e+4|0)>>2])-o|0)|0)/7),i[e>>2]=a,r=0|mt(+((o<<1)+r|0)/7),i[n>>2]=r,i[t>>2]=0,o=r-a|0,(0|a)<0?(A=0-a|0,i[n>>2]=o,i[t>>2]=A,i[e>>2]=0,r=o,a=0,o=A):o=0,(0|r)<0&&(a=a-r|0,i[e>>2]=a,o=o-r|0,i[t>>2]=o,i[n>>2]=0,r=0),A=a-o|0,s=r-o|0,(0|o)<0?(i[e>>2]=A,i[n>>2]=s,i[t>>2]=0,r=s,s=A,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=r-a,i[t>>2]=o-a)}function ne(e){var t,n,r=0,o=0,a=0,s=0,A=0;o=0|i[(t=(e|=0)+8|0)>>2],a=0|mt(+(((r=(0|i[e>>2])-o|0)<<1)+(o=(0|i[(n=e+4|0)>>2])-o|0)|0)/7),i[e>>2]=a,r=0|mt(+((3*o|0)-r|0)/7),i[n>>2]=r,i[t>>2]=0,o=r-a|0,(0|a)<0?(A=0-a|0,i[n>>2]=o,i[t>>2]=A,i[e>>2]=0,r=o,a=0,o=A):o=0,(0|r)<0&&(a=a-r|0,i[e>>2]=a,o=o-r|0,i[t>>2]=o,i[n>>2]=0,r=0),A=a-o|0,s=r-o|0,(0|o)<0?(i[e>>2]=A,i[n>>2]=s,i[t>>2]=0,r=s,s=A,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=r-a,i[t>>2]=o-a)}function re(e){var t,n,r,o=0,a=0,s=0,A=0;o=0|i[(e|=0)>>2],a=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],A=a+(3*o|0)|0,i[e>>2]=A,a=s+(3*a|0)|0,i[n>>2]=a,o=(3*s|0)+o|0,i[r>>2]=o,s=a-A|0,(0|A)<0?(o=o-A|0,i[n>>2]=s,i[r>>2]=o,i[e>>2]=0,a=s,s=0):s=A,(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,A=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,o=0):A=a,(0|(a=(0|o)<(0|(a=(0|A)<(0|s)?A:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=A-a,i[r>>2]=o-a)}function ie(e){var t,n,r,o=0,a=0,s=0,A=0;A=0|i[(e|=0)>>2],s=(3*(o=0|i[(n=e+4|0)>>2])|0)+A|0,A=(a=0|i[(r=e+8|0)>>2])+(3*A|0)|0,i[e>>2]=A,i[n>>2]=s,o=(3*a|0)+o|0,i[r>>2]=o,a=s-A|0,(0|A)<0?(o=o-A|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,A=0):a=s,(0|a)<0&&(A=A-a|0,i[e>>2]=A,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=A-o|0,s=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,A=t,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|A)?s:A))?o:a))<=0||(i[e>>2]=A-a,i[n>>2]=s-a,i[r>>2]=o-a)}function oe(e,t){e|=0;var n,r,o,a=0,s=0,A=0;((t|=0)+-1|0)>>>0>=6||(A=(0|i[15472+(12*t|0)>>2])+(0|i[e>>2])|0,i[e>>2]=A,o=e+4|0,s=(0|i[15472+(12*t|0)+4>>2])+(0|i[o>>2])|0,i[o>>2]=s,r=e+8|0,t=(0|i[15472+(12*t|0)+8>>2])+(0|i[r>>2])|0,i[r>>2]=t,a=s-A|0,(0|A)<0?(t=t-A|0,i[o>>2]=a,i[r>>2]=t,i[e>>2]=0,s=0):(a=s,s=A),(0|a)<0&&(s=s-a|0,i[e>>2]=s,t=t-a|0,i[r>>2]=t,i[o>>2]=0,a=0),n=s-t|0,A=a-t|0,(0|t)<0?(i[e>>2]=n,i[o>>2]=A,i[r>>2]=0,s=n,t=0):A=a,(0|(a=(0|t)<(0|(a=(0|A)<(0|s)?A:s))?t:a))<=0||(i[e>>2]=s-a,i[o>>2]=A-a,i[r>>2]=t-a))}function ae(e){var t,n,r,o=0,a=0,s=0,A=0;A=0|i[(e|=0)>>2],s=(o=0|i[(n=e+4|0)>>2])+A|0,A=(a=0|i[(r=e+8|0)>>2])+A|0,i[e>>2]=A,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-A|0,(0|A)<0?(o=o-A|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,s=0):(a=s,s=A),(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,A=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,o=0):A=a,(0|(a=(0|o)<(0|(a=(0|A)<(0|s)?A:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=A-a,i[r>>2]=o-a)}function se(e){var t,n,r,o=0,a=0,s=0,A=0;o=0|i[(e|=0)>>2],s=0|i[(n=e+4|0)>>2],a=0|i[(r=e+8|0)>>2],A=s+o|0,i[e>>2]=A,s=a+s|0,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-A|0,(0|A)<0?(o=o-A|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,s=0):(a=s,s=A),(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,A=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,o=0):A=a,(0|(a=(0|o)<(0|(a=(0|A)<(0|s)?A:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=A-a,i[r>>2]=o-a)}function Ae(e){switch(0|(e|=0)){case 1:e=5;break;case 5:e=4;break;case 4:e=6;break;case 6:e=2;break;case 2:e=3;break;case 3:e=1}return 0|e}function le(e){switch(0|(e|=0)){case 1:e=3;break;case 3:e=2;break;case 2:e=6;break;case 6:e=4;break;case 4:e=5;break;case 5:e=1}return 0|e}function ce(e){var t,n,r,o=0,a=0,s=0,A=0;o=0|i[(e|=0)>>2],a=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],A=a+(o<<1)|0,i[e>>2]=A,a=s+(a<<1)|0,i[n>>2]=a,o=(s<<1)+o|0,i[r>>2]=o,s=a-A|0,(0|A)<0?(o=o-A|0,i[n>>2]=s,i[r>>2]=o,i[e>>2]=0,a=s,s=0):s=A,(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,A=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,o=0):A=a,(0|(a=(0|o)<(0|(a=(0|A)<(0|s)?A:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=A-a,i[r>>2]=o-a)}function ue(e){var t,n,r,o=0,a=0,s=0,A=0;A=0|i[(e|=0)>>2],s=((o=0|i[(n=e+4|0)>>2])<<1)+A|0,A=(a=0|i[(r=e+8|0)>>2])+(A<<1)|0,i[e>>2]=A,i[n>>2]=s,o=(a<<1)+o|0,i[r>>2]=o,a=s-A|0,(0|A)<0?(o=o-A|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,A=0):a=s,(0|a)<0&&(A=A-a|0,i[e>>2]=A,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=A-o|0,s=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,A=t,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|A)?s:A))?o:a))<=0||(i[e>>2]=A-a,i[n>>2]=s-a,i[r>>2]=o-a)}function he(e,t){t|=0;var n,r,o,a=0,s=0,A=0;return o=(0|(r=(0|i[(e|=0)>>2])-(0|i[t>>2])|0))<0,n=(0|(s=(0|i[e+4>>2])-(0|i[t+4>>2])-(o?r:0)|0))<0,t=(t=(e=(0|(A=(o?0-r|0:0)+(0|i[e+8>>2])-(0|i[t+8>>2])+(n?0-s|0:0)|0))<0)?0:A)-((s=(0|(e=(0|t)<(0|(e=(0|(a=(n?0:s)-(e?A:0)|0))<(0|(A=(o?0:r)-(n?s:0)-(e?A:0)|0))?a:A))?t:e))>0)?e:0)|0,a=a-(s?e:0)|0,0|((0|(e=(0|(e=A-(s?e:0)|0))>-1?e:0-e|0))>(0|(t=(0|(a=(0|a)>-1?a:0-a|0))>(0|(t=(0|t)>-1?t:0-t|0))?a:t))?e:t)}function de(e,t){t|=0;var n;n=0|i[(e|=0)+8>>2],i[t>>2]=(0|i[e>>2])-n,i[t+4>>2]=(0|i[e+4>>2])-n}function fe(e,t){t|=0;var n,r,o,a=0,s=0,A=0;s=0|i[(e|=0)>>2],i[t>>2]=s,e=0|i[e+4>>2],i[(r=t+4|0)>>2]=e,i[(o=t+8|0)>>2]=0,a=e-s|0,(0|s)<0?(e=0-s|0,i[r>>2]=a,i[o>>2]=e,i[t>>2]=0,s=0):(a=e,e=0),(0|a)<0&&(s=s-a|0,i[t>>2]=s,e=e-a|0,i[o>>2]=e,i[r>>2]=0,a=0),n=s-e|0,A=a-e|0,(0|e)<0?(i[t>>2]=n,i[r>>2]=A,i[o>>2]=0,a=A,A=n,e=0):A=s,(0|(s=(0|e)<(0|(s=(0|a)<(0|A)?a:A))?e:s))<=0||(i[t>>2]=A-s,i[r>>2]=a-s,i[o>>2]=e-s)}function pe(e){var t,n,r,o;n=(o=0|i[(t=(e|=0)+8|0)>>2])-(0|i[e>>2])|0,i[e>>2]=n,e=(0|i[(r=e+4|0)>>2])-o|0,i[r>>2]=e,i[t>>2]=0-(e+n)}function me(e){var t,n,r=0,o=0,a=0,s=0,A=0;r=0-(o=0|i[(e|=0)>>2])|0,i[e>>2]=r,i[(t=e+8|0)>>2]=0,s=(a=0|i[(n=e+4|0)>>2])+o|0,(0|o)>0?(i[n>>2]=s,i[t>>2]=o,i[e>>2]=0,r=0,a=s):o=0,(0|a)<0?(A=r-a|0,i[e>>2]=A,o=o-a|0,i[t>>2]=o,i[n>>2]=0,s=A-o|0,r=0-o|0,(0|o)<0?(i[e>>2]=s,i[n>>2]=r,i[t>>2]=0,a=r,o=0):(a=0,s=A)):s=r,(0|(r=(0|o)<(0|(r=(0|a)<(0|s)?a:s))?o:r))<=0||(i[e>>2]=s-r,i[n>>2]=a-r,i[t>>2]=o-r)}function ge(e,t,n,r){t|=0,n|=0,r|=0;var a,s=0,A=0,l=0,c=0;if(a=P,P=P+32|0,function(e,t){t|=0;var n=0,r=0,i=0;n=+o[(e=e|0)>>3],r=+u(+n),n=+h(+n),o[t+16>>3]=n,n=+o[e+8>>3],i=r*+u(+n),o[t>>3]=i,n=r*+h(+n),o[t+8>>3]=n}(e|=0,A=a),i[n>>2]=0,s=+At(15888,A),(l=+At(15912,A))<s&&(i[n>>2]=1,s=l),(l=+At(15936,A))<s&&(i[n>>2]=2,s=l),(l=+At(15960,A))<s&&(i[n>>2]=3,s=l),(l=+At(15984,A))<s&&(i[n>>2]=4,s=l),(l=+At(16008,A))<s&&(i[n>>2]=5,s=l),(l=+At(16032,A))<s&&(i[n>>2]=6,s=l),(l=+At(16056,A))<s&&(i[n>>2]=7,s=l),(l=+At(16080,A))<s&&(i[n>>2]=8,s=l),(l=+At(16104,A))<s&&(i[n>>2]=9,s=l),(l=+At(16128,A))<s&&(i[n>>2]=10,s=l),(l=+At(16152,A))<s&&(i[n>>2]=11,s=l),(l=+At(16176,A))<s&&(i[n>>2]=12,s=l),(l=+At(16200,A))<s&&(i[n>>2]=13,s=l),(l=+At(16224,A))<s&&(i[n>>2]=14,s=l),(l=+At(16248,A))<s&&(i[n>>2]=15,s=l),(l=+At(16272,A))<s&&(i[n>>2]=16,s=l),(l=+At(16296,A))<s&&(i[n>>2]=17,s=l),(l=+At(16320,A))<s&&(i[n>>2]=18,s=l),(l=+At(16344,A))<s&&(i[n>>2]=19,s=l),(l=+f(+(1-.5*s)))<1e-16)return i[r>>2]=0,i[r+4>>2]=0,i[r+8>>2]=0,i[r+12>>2]=0,void(P=a);if(n=0|i[n>>2],s=+Ee((s=+o[16368+(24*n|0)>>3])-+Ee(+function(e,t){e|=0;var n=0,r=0,i=0,a=0,s=0;return a=+o[(t=t|0)>>3],r=+u(+a),i=+o[t+8>>3]-+o[e+8>>3],s=r*+h(+i),n=+o[e>>3],+ +g(+s,+(+h(+a)*+u(+n)-+u(+i)*(r*+h(+n))))}(15568+(n<<4)|0,e))),c=0|Ue(t)?+Ee(s+-.3334731722518321):s,s=+d(+l)/.381966011250105,(0|t)>0){A=0;do{s*=2.6457513110645907,A=A+1|0}while((0|A)!=(0|t))}l=+u(+c)*s,o[r>>3]=l,c=+h(+c)*s,o[r+8>>3]=c,P=a}function ve(e,t,n,r,a){t|=0,n|=0,r|=0,a|=0;var s=0,c=0;if(s=+function(e){var t=0,n=0;return n=+o[(e=e|0)>>3],t=+o[e+8>>3],+ +l(+(n*n+t*t))}(e|=0),s<1e-16)return t=15568+(t<<4)|0,i[a>>2]=i[t>>2],i[a+4>>2]=i[t+4>>2],i[a+8>>2]=i[t+8>>2],void(i[a+12>>2]=i[t+12>>2]);if(c=+g(+ +o[e+8>>3],+ +o[e>>3]),(0|n)>0){e=0;do{s/=2.6457513110645907,e=e+1|0}while((0|e)!=(0|n))}r?(s/=3,n=0==(0|Ue(n)),s=+m(.381966011250105*(n?s:s/2.6457513110645907))):(s=+m(.381966011250105*s),0|Ue(n)&&(c=+Ee(c+.3334731722518321))),function(e,t,n,r){e|=0,t=+t,r|=0;var a=0,s=0,l=0,c=0;if((n=+n)<1e-16)return i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],void(i[r+12>>2]=i[e+12>>2]);s=t<0?t+6.283185307179586:t,s=t>=6.283185307179586?s+-6.283185307179586:s;do{if(!(s<1e-16)){if(a=+A(+(s+-3.141592653589793))<1e-16,t=+o[e>>3],a){t-=n,o[r>>3]=t,a=r;break}if(l=+u(+n),n=+h(+n),t=l*+h(+t)+ +u(+s)*(n*+u(+t)),t=+p(+((t=t>1?1:t)<-1?-1:t)),o[r>>3]=t,+A(+(t+-1.5707963267948966))<1e-16)return o[r>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+A(+(t+1.5707963267948966))<1e-16)return o[r>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if(c=+u(+t),s=n*+h(+s)/c,n=+o[e>>3],t=(l-+h(+t)*+h(+n))/+u(+n)/c,l=s>1?1:s,t=t>1?1:t,(t=+o[e+8>>3]+ +g(+(l<-1?-1:l),+(t<-1?-1:t)))>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);return void(o[r+8>>3]=t)}t=+o[e>>3]+n,o[r>>3]=t,a=r}while(0);if(+A(+(t+-1.5707963267948966))<1e-16)return o[a>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+A(+(t+1.5707963267948966))<1e-16)return o[a>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if((t=+o[e+8>>3])>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);o[r+8>>3]=t}(15568+(t<<4)|0,+Ee(+o[16368+(24*t|0)>>3]-c),s,a)}function ye(e,t,n){t|=0,n|=0;var r,o;r=P,P=P+16|0,Z((e|=0)+4|0,o=r),ve(o,0|i[e>>2],t,0,n),P=r}function xe(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,A,l,c,u,h,d,f,p,m,g,v,y,x,b,_,w,S,E,T,C,R,L=0,q=0,D=0,I=0,O=0,B=0;if(R=P,P=P+272|0,I=R+240|0,E=R,T=R+224|0,C=R+208|0,g=R+176|0,v=R+160|0,y=R+192|0,x=R+144|0,b=R+128|0,_=R+112|0,w=R+96|0,S=R+80|0,i[(L=R+256|0)>>2]=t,i[I>>2]=i[e>>2],i[I+4>>2]=i[e+4>>2],i[I+8>>2]=i[e+8>>2],i[I+12>>2]=i[e+12>>2],be(I,L,E),i[a>>2]=0,(0|(I=r+n+(5==(0|r)&1)|0))<=(0|n))P=R;else{A=T+4|0,l=g+4|0,c=n+5|0,u=16848+((s=0|i[L>>2])<<2)|0,h=16928+(s<<2)|0,d=b+8|0,f=_+8|0,p=w+8|0,m=C+4|0,D=n;e:for(;;){q=E+(((0|D)%5|0)<<4)|0,i[C>>2]=i[q>>2],i[C+4>>2]=i[q+4>>2],i[C+8>>2]=i[q+8>>2],i[C+12>>2]=i[q+12>>2];do{}while(2==(0|_e(C,s,0,1)));if((0|D)>(0|n)&0!=(0|Ue(t))){if(i[g>>2]=i[C>>2],i[g+4>>2]=i[C+4>>2],i[g+8>>2]=i[C+8>>2],i[g+12>>2]=i[C+12>>2],Z(A,v),r=0|i[g>>2],L=0|i[17008+(80*r|0)+(i[T>>2]<<2)>>2],i[g>>2]=i[18608+(80*r|0)+(20*L|0)>>2],(0|(q=0|i[18608+(80*r|0)+(20*L|0)+16>>2]))>0){e=0;do{ae(l),e=e+1|0}while((0|e)<(0|q))}switch(q=18608+(80*r|0)+(20*L|0)+4|0,i[y>>2]=i[q>>2],i[y+4>>2]=i[q+4>>2],i[y+8>>2]=i[q+8>>2],$(y,3*(0|i[u>>2])|0),J(l,y,l),X(l),Z(l,x),O=+(0|i[h>>2]),o[b>>3]=3*O,o[d>>3]=0,B=-1.5*O,o[_>>3]=B,o[f>>3]=2.598076211353316*O,o[w>>3]=B,o[p>>3]=-2.598076211353316*O,0|i[17008+(80*(0|i[g>>2])|0)+(i[C>>2]<<2)>>2]){case 1:e=_,r=b;break;case 3:e=w,r=_;break;case 2:e=b,r=w;break;default:e=12;break e}at(v,x,r,e,S),ve(S,0|i[g>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])}if((0|D)<(0|c)&&(Z(m,g),ve(g,0|i[C>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),i[T>>2]=i[C>>2],i[T+4>>2]=i[C+4>>2],i[T+8>>2]=i[C+8>>2],i[T+12>>2]=i[C+12>>2],(0|(D=D+1|0))>=(0|I)){e=3;break}}3!=(0|e)?12==(0|e)&&M(22474,22521,581,22531):P=R}}function be(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,A=0,l=0;r=P,P=P+128|0,a=r,A=20208,l=(s=o=r+64|0)+60|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));A=20272,l=(s=a)+60|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));o=(l=0==(0|Ue(0|i[t>>2])))?o:a,ce(a=e+4|0),ue(a),0|Ue(0|i[t>>2])&&(ie(a),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],J(a,o,t=n+4|0),X(t),i[n+16>>2]=i[e>>2],J(a,o+12|0,t=n+20|0),X(t),i[n+32>>2]=i[e>>2],J(a,o+24|0,t=n+36|0),X(t),i[n+48>>2]=i[e>>2],J(a,o+36|0,t=n+52|0),X(t),i[n+64>>2]=i[e>>2],J(a,o+48|0,n=n+68|0),X(n),P=r}function _e(e,t,n,r){n|=0,r|=0;var o,a,s,A,l,c,u=0,h=0,d=0,f=0,p=0;if(c=P,P=P+32|0,l=c+12|0,a=c,p=(e|=0)+4|0,f=0|i[16928+((t|=0)<<2)>>2],f=(A=0!=(0|r))?3*f|0:f,u=0|i[p>>2],o=0|i[(s=e+8|0)>>2],A){if((0|(u=o+u+(r=0|i[(h=e+12|0)>>2])|0))==(0|f))return P=c,0|(p=1);d=h}else u=o+u+(r=0|i[(d=e+12|0)>>2])|0;if((0|u)<=(0|f))return P=c,0|(p=0);do{if((0|r)>0){if(r=0|i[e>>2],(0|o)>0){h=18608+(80*r|0)+60|0,r=e;break}r=18608+(80*r|0)+40|0,n?(Q(l,f,0,0),K(p,l,a),se(a),J(a,l,p),h=r,r=e):(h=r,r=e)}else h=18608+(80*(0|i[e>>2])|0)+20|0,r=e}while(0);if(i[r>>2]=i[h>>2],(0|i[(u=h+16|0)>>2])>0){r=0;do{ae(p),r=r+1|0}while((0|r)<(0|i[u>>2]))}return e=h+4|0,i[l>>2]=i[e>>2],i[l+4>>2]=i[e+4>>2],i[l+8>>2]=i[e+8>>2],t=0|i[16848+(t<<2)>>2],$(l,A?3*t|0:t),J(p,l,p),X(p),r=A&&((0|i[s>>2])+(0|i[p>>2])+(0|i[d>>2])|0)==(0|f)?1:2,P=c,0|(p=r)}function we(e,t){e|=0,t|=0;var n=0;do{n=0|_e(e,t,0,1)}while(2==(0|n));return 0|n}function Me(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,A,l,c,u,h,d,f,p,m,g,v,y,x,b,_,w,S,E=0,T=0,C=0,R=0,L=0;if(S=P,P=P+240|0,x=S+208|0,b=S,_=S+192|0,w=S+176|0,p=S+160|0,m=S+144|0,g=S+128|0,v=S+112|0,y=S+96|0,i[(E=S+224|0)>>2]=t,i[x>>2]=i[e>>2],i[x+4>>2]=i[e+4>>2],i[x+8>>2]=i[e+8>>2],i[x+12>>2]=i[e+12>>2],Se(x,E,b),i[a>>2]=0,(0|(f=r+n+(6==(0|r)&1)|0))<=(0|n))P=S;else{A=n+6|0,l=16928+((s=0|i[E>>2])<<2)|0,c=m+8|0,u=g+8|0,h=v+8|0,d=_+4|0,T=0,C=n,r=-1;e:for(;;){if(e=b+((E=(0|C)%6|0)<<4)|0,i[_>>2]=i[e>>2],i[_+4>>2]=i[e+4>>2],i[_+8>>2]=i[e+8>>2],i[_+12>>2]=i[e+12>>2],e=T,T=0|_e(_,s,0,1),(0|C)>(0|n)&0!=(0|Ue(t))&&(1!=(0|e)&&(0|i[_>>2])!=(0|r))){switch(Z(b+(((E+5|0)%6|0)<<4)+4|0,w),Z(b+(E<<4)+4|0,p),R=+(0|i[l>>2]),o[m>>3]=3*R,o[c>>3]=0,L=-1.5*R,o[g>>3]=L,o[u>>3]=2.598076211353316*R,o[v>>3]=L,o[h>>3]=-2.598076211353316*R,E=0|i[x>>2],0|i[17008+(80*E|0)+(((0|r)==(0|E)?0|i[_>>2]:r)<<2)>>2]){case 1:e=g,r=m;break;case 3:e=v,r=g;break;case 2:e=m,r=v;break;default:e=8;break e}at(w,p,r,e,y),0|st(w,y)||0|st(p,y)||(ve(y,0|i[x>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2]))}if((0|C)<(0|A)&&(Z(d,w),ve(w,0|i[_>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),(0|(C=C+1|0))>=(0|f)){e=3;break}r=0|i[_>>2]}3!=(0|e)?8==(0|e)&&M(22557,22521,746,22602):P=S}}function Se(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,A=0,l=0;r=P,P=P+160|0,a=r,A=20336,l=(s=o=r+80|0)+72|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));A=20416,l=(s=a)+72|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));o=(l=0==(0|Ue(0|i[t>>2])))?o:a,ce(a=e+4|0),ue(a),0|Ue(0|i[t>>2])&&(ie(a),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],J(a,o,t=n+4|0),X(t),i[n+16>>2]=i[e>>2],J(a,o+12|0,t=n+20|0),X(t),i[n+32>>2]=i[e>>2],J(a,o+24|0,t=n+36|0),X(t),i[n+48>>2]=i[e>>2],J(a,o+36|0,t=n+52|0),X(t),i[n+64>>2]=i[e>>2],J(a,o+48|0,t=n+68|0),X(t),i[n+80>>2]=i[e>>2],J(a,o+60|0,n=n+84|0),X(n),P=r}function Ee(e){var t;return t=(e=+e)<0?e+6.283185307179586:e,+(e>=6.283185307179586?t+-6.283185307179586:t)}function Te(e,t){return t|=0,+A(+(+o[(e|=0)>>3]-+o[t>>3]))<17453292519943298e-27?0|(t=+A(+(+o[e+8>>3]-+o[t+8>>3]))<17453292519943298e-27):0|(t=0)}function Ce(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+h(.5*(r-n)))*i+(a=+h(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+u(+r)*+u(+n)*a),2*+g(+ +l(+a),+ +l(+(1-a)))*6371.007180918475}function Re(e,t,n){e|=0,n|=0;var r,i,a,s,A=0,c=0,f=0,p=0,v=0,y=0;return y=+o[(t|=0)>>3],a=+o[e>>3],v=+h(.5*(y-a)),f=+o[t+8>>3],i=+o[e+8>>3],p=+h(.5*(f-i)),r=+u(+a),s=+u(+y),p=2*+g(+ +l(+(p=v*v+p*(s*r*p))),+ +l(+(1-p))),v=+o[n>>3],y=+h(.5*(v-y)),A=+o[n+8>>3],f=+h(.5*(A-f)),c=+u(+v),f=2*+g(+ +l(+(f=y*y+f*(s*c*f))),+ +l(+(1-f))),v=+h(.5*(a-v)),A=+h(.5*(i-A)),A=2*+g(+ +l(+(A=v*v+A*(r*c*A))),+ +l(+(1-A))),4*+m(+ +l(+ +d(.5*(c=.5*(p+f+A)))*+d(.5*(c-p))*+d(.5*(c-f))*+d(.5*(c-A))))}function Pe(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),45),w(),127&t|0}function Le(e,t){var n=0,r=0,i=0,o=0,a=0,s=0;if(!(!0&134217728==(-16777216&(t|=0)|0)))return 0|(t=0);if(a=0|Mt(0|(e|=0),0|t,45),w(),(a&=127)>>>0>121)return 0|(t=0);n=0|Mt(0|e,0|t,52),w(),n&=15;do{if(0|n){for(i=1,r=0;;){if(o=0|Mt(0|e,0|t,3*(15-i|0)|0),w(),0!=(0|(o&=7))&(1^r)){if(1==(0|o)&0!=(0|B(a))){s=0,r=13;break}r=1}if(7==(0|o)){s=0,r=13;break}if(!(i>>>0<n>>>0)){r=9;break}i=i+1|0}if(9==(0|r)){if(15!=(0|n))break;return 0|(s=1)}if(13==(0|r))return 0|s}}while(0);for(;;){if(s=0|Mt(0|e,0|t,3*(14-n|0)|0),w(),!(7==(7&s|0)&!0)){s=0,r=13;break}if(!(n>>>0<14)){s=1,r=13;break}n=n+1|0}return 13==(0|r)?0|s:0}function qe(e,t,n){n|=0;var r=0,i=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|(r&=15))>=(0|n)){if((0|r)!=(0|n))if(n>>>0<=15){if(e|=i=0|St(0|n,0,52),t=0|w()|-15728641&t,(0|r)>(0|n))do{i=0|St(7,0,3*(14-n|0)|0),n=n+1|0,e|=i,t=0|w()|t}while((0|n)<(0|r))}else t=0,e=0}else t=0,e=0;return _(0|t),0|e}function De(e,t,n,r){n|=0,r|=0;var o,a=0,s=0,A=0,l=0,c=0,u=0;if(A=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(A&=15))<=(0|n)){if((0|A)==(0|n))return i[(n=r)>>2]=e,void(i[n+4>>2]=t);if(o=(0|(c=0|tt(7,n-A|0)))/7|0,l=0|Mt(0|e,0|t,45),w(),0|B(127&l)){e:do{if(A)for(s=1;;){if(a=0|Mt(0|e,0|t,3*(15-s|0)|0),w(),0|(a&=7))break e;if(!(s>>>0<A>>>0)){a=0;break}s=s+1|0}else a=0}while(0);s=0==(0|a)}else s=0;if(u=0|St(A+1|0,0,52),a=0|w()|-15728641&t,De(t=(u|e)&~(t=0|St(7,0,0|(l=3*(14-A|0)|0))),A=a&~(0|w()),n,r),a=r+(o<<3)|0,!s)return De((u=0|St(1,0,0|l))|t,0|w()|A,n,a),u=a+(o<<3)|0,De((c=0|St(2,0,0|l))|t,0|w()|A,n,u),u=u+(o<<3)|0,De((c=0|St(3,0,0|l))|t,0|w()|A,n,u),u=u+(o<<3)|0,De((c=0|St(4,0,0|l))|t,0|w()|A,n,u),u=u+(o<<3)|0,De((c=0|St(5,0,0|l))|t,0|w()|A,n,u),void De((c=0|St(6,0,0|l))|t,0|w()|A,n,u+(o<<3)|0);s=a+(o<<3)|0,(0|c)>6&&(Rt(0|a,0,(u=(s>>>0>(c=a+8|0)>>>0?s:c)+-1+(0-a)|0)+8&-8|0),a=c+(u>>>3<<3)|0),De((u=0|St(2,0,0|l))|t,0|w()|A,n,a),u=a+(o<<3)|0,De((c=0|St(3,0,0|l))|t,0|w()|A,n,u),u=u+(o<<3)|0,De((c=0|St(4,0,0|l))|t,0|w()|A,n,u),u=u+(o<<3)|0,De((c=0|St(5,0,0|l))|t,0|w()|A,n,u),De((c=0|St(6,0,0|l))|t,0|w()|A,n,u+(o<<3)|0)}}function Ie(e,t){var n=0,r=0,i=0;if(i=0|Mt(0|(e|=0),0|(t|=0),45),w(),!(0|B(127&i)))return 0|(i=0);i=0|Mt(0|e,0|t,52),w(),i&=15;e:do{if(i)for(r=1;;){if(n=0|Mt(0|e,0|t,3*(15-r|0)|0),w(),0|(n&=7))break e;if(!(r>>>0<i>>>0)){n=0;break}r=r+1|0}else n=0}while(0);return 0|(i=0==(0|n)&1)}function Oe(e,t){var n=0,r=0,i=0;if(i=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(i&=15))return 0|(i=0);for(r=1;;){if(n=0|Mt(0|e,0|t,3*(15-r|0)|0),w(),0|(n&=7)){r=5;break}if(!(r>>>0<i>>>0)){n=0,r=5;break}r=r+1|0}return 5==(0|r)?0|n:0}function Be(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,A=0;if(A=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(A&=15))return A=e,_(0|(s=t)),0|A;for(s=1,n=0;;){r=0|St(7,0,0|(o=3*(15-s|0)|0)),i=0|w(),a=0|Mt(0|e,0|t,0|o),w(),e=(o=0|St(0|Ae(7&a),0,0|o))|e&~r,t=(a=0|w())|t&~i;e:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Mt(0|e,0|t,52),w(),r&=15){n=1;t:for(;;){switch(a=0|Mt(0|e,0|t,3*(15-n|0)|0),w(),7&a){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0<r>>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(i=0|Mt(0|e,0|t,0|(a=3*(15-n|0)|0)),w(),o=0|St(7,0,0|a),t&=~(0|w()),e=e&~o|(a=0|St(0|Ae(7&i),0,0|a)),t=0|t|w(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<A>>>0))break;s=s+1|0}return _(0|t),0|e}function ke(e,t){var n=0,r=0,i=0,o=0,a=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(r&=15))return r=e,_(0|(n=t)),0|r;for(n=1;a=0|Mt(0|e,0|t,0|(o=3*(15-n|0)|0)),w(),i=0|St(7,0,0|o),t&=~(0|w()),e=(o=0|St(0|Ae(7&a),0,0|o))|e&~i,t=0|w()|t,n>>>0<r>>>0;)n=n+1|0;return _(0|t),0|e}function Ne(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,A=0;if(A=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(A&=15))return A=e,_(0|(s=t)),0|A;for(s=1,n=0;;){r=0|St(7,0,0|(o=3*(15-s|0)|0)),i=0|w(),a=0|Mt(0|e,0|t,0|o),w(),e=(o=0|St(0|le(7&a),0,0|o))|e&~r,t=(a=0|w())|t&~i;e:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Mt(0|e,0|t,52),w(),r&=15){n=1;t:for(;;){switch(a=0|Mt(0|e,0|t,3*(15-n|0)|0),w(),7&a){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0<r>>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(o=0|St(7,0,0|(i=3*(15-n|0)|0)),a=t&~(0|w()),t=0|Mt(0|e,0|t,0|i),w(),e=e&~o|(t=0|St(0|le(7&t),0,0|i)),t=0|a|w(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<A>>>0))break;s=s+1|0}return _(0|t),0|e}function ze(e,t){var n=0,r=0,i=0,o=0,a=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(r&=15))return r=e,_(0|(n=t)),0|r;for(n=1;o=0|St(7,0,0|(a=3*(15-n|0)|0)),i=t&~(0|w()),t=0|Mt(0|e,0|t,0|a),w(),e=(t=0|St(0|le(7&t),0,0|a))|e&~o,t=0|w()|i,n>>>0<r>>>0;)n=n+1|0;return _(0|t),0|e}function Ue(e){return 0|(0|(e|=0))%2}function Fe(e,t){e|=0;var n,r;return r=P,P=P+16|0,n=r,(t|=0)>>>0<=15&&2146435072!=(2146435072&i[e+4>>2]|0)&&2146435072!=(2146435072&i[e+8+4>>2]|0)?(!function(e,t,n){var r,i;r=P,P=P+16|0,ge(e|=0,t|=0,n|=0,i=r),Y(i,n+4|0),P=r}(e,t,n),t=0|function(e,t){e|=0;var n,r=0,o=0,a=0,s=0,A=0,l=0,c=0,u=0;if(n=P,P=P+64|0,l=n+40|0,o=n+24|0,a=n+12|0,s=n,St(0|(t|=0),0,52),r=134225919|w(),!t)return(0|i[e+4>>2])>2||(0|i[e+8>>2])>2||(0|i[e+12>>2])>2?(l=0,_(0|(A=0)),P=n,0|l):(St(0|N(e),0,45),A=0|w()|r,l=-1,_(0|A),P=n,0|l);if(i[l>>2]=i[e>>2],i[l+4>>2]=i[e+4>>2],i[l+8>>2]=i[e+8>>2],i[l+12>>2]=i[e+12>>2],A=l+4|0,(0|t)>0)for(e=-1;i[o>>2]=i[A>>2],i[o+4>>2]=i[A+4>>2],i[o+8>>2]=i[A+8>>2],1&t?(te(A),i[a>>2]=i[A>>2],i[a+4>>2]=i[A+4>>2],i[a+8>>2]=i[A+8>>2],re(a)):(ne(A),i[a>>2]=i[A>>2],i[a+4>>2]=i[A+4>>2],i[a+8>>2]=i[A+8>>2],ie(a)),K(o,a,s),X(s),c=0|St(7,0,0|(u=3*(15-t|0)|0)),r&=~(0|w()),e=(u=0|St(0|ee(s),0,0|u))|e&~c,r=0|w()|r,(0|t)>1;)t=t+-1|0;else e=-1;e:do{if((0|i[A>>2])<=2&&(0|i[l+8>>2])<=2&&(0|i[l+12>>2])<=2){if(t=0|St(0|(o=0|N(l)),0,45),t|=e,e=0|w()|-1040385&r,s=0|z(l),!(0|B(o))){if((0|s)<=0)break;for(a=0;;){if(o=0|Mt(0|t,0|e,52),w(),o&=15)for(r=1;l=0|Mt(0|t,0|e,0|(u=3*(15-r|0)|0)),w(),c=0|St(7,0,0|u),e&=~(0|w()),t=t&~c|(u=0|St(0|Ae(7&l),0,0|u)),e=0|e|w(),r>>>0<o>>>0;)r=r+1|0;if((0|(a=a+1|0))==(0|s))break e}}a=0|Mt(0|t,0|e,52),w(),a&=15;t:do{if(a){r=1;n:for(;;){switch(u=0|Mt(0|t,0|e,3*(15-r|0)|0),w(),7&u){case 1:break n;case 0:break;default:break t}if(!(r>>>0<a>>>0))break t;r=r+1|0}if(0|U(o,0|i[l>>2]))for(r=1;c=0|St(7,0,0|(l=3*(15-r|0)|0)),u=e&~(0|w()),e=0|Mt(0|t,0|e,0|l),w(),t=t&~c|(e=0|St(0|le(7&e),0,0|l)),e=0|u|w(),r>>>0<a>>>0;)r=r+1|0;else for(r=1;l=0|Mt(0|t,0|e,0|(u=3*(15-r|0)|0)),w(),c=0|St(7,0,0|u),e&=~(0|w()),t=t&~c|(u=0|St(0|Ae(7&l),0,0|u)),e=0|e|w(),r>>>0<a>>>0;)r=r+1|0}}while(0);if((0|s)>0){r=0;do{t=0|Be(t,e),e=0|w(),r=r+1|0}while((0|r)!=(0|s))}}else t=0,e=0}while(0);return u=t,_(0|(c=e)),P=n,0|u}(n,t),e=0|w()):(e=0,t=0),_(0|e),P=r,0|t}function He(e,t,n){var r,o=0,a=0,s=0;if(r=(n|=0)+4|0,a=0|Mt(0|(e|=0),0|(t|=0),52),w(),a&=15,s=0|Mt(0|e,0|t,45),w(),o=0==(0|a),0|B(127&s)){if(o)return 0|(s=1);o=1}else{if(o)return 0|(s=0);o=0==(0|i[r>>2])&&0==(0|i[n+8>>2])?0!=(0|i[n+12>>2])&1:1}for(n=1;1&n?re(r):ie(r),s=0|Mt(0|e,0|t,3*(15-n|0)|0),w(),oe(r,7&s),n>>>0<a>>>0;)n=n+1|0;return 0|o}function Ge(e,t,n){n|=0;var r,o,a=0,s=0,A=0,l=0,c=0,u=0;o=P,P=P+16|0,r=o,u=0|Mt(0|(e|=0),0|(t|=0),45),w(),u&=127;e:do{if(0!=(0|B(u))&&(A=0|Mt(0|e,0|t,52),w(),0!=(0|(A&=15)))){a=1;t:for(;;){switch(c=0|Mt(0|e,0|t,3*(15-a|0)|0),w(),7&c){case 5:break t;case 0:break;default:a=t;break e}if(!(a>>>0<A>>>0)){a=t;break e}a=a+1|0}for(s=1,a=t;l=0|St(7,0,0|(t=3*(15-s|0)|0)),c=a&~(0|w()),a=0|Mt(0|e,0|a,0|t),w(),e=e&~l|(a=0|St(0|le(7&a),0,0|t)),a=0|c|w(),s>>>0<A>>>0;)s=s+1|0}else a=t}while(0);if(c=7728+(28*u|0)|0,i[n>>2]=i[c>>2],i[n+4>>2]=i[c+4>>2],i[n+8>>2]=i[c+8>>2],i[n+12>>2]=i[c+12>>2],0|He(e,a,n)){if(l=n+4|0,i[r>>2]=i[l>>2],i[r+4>>2]=i[l+4>>2],i[r+8>>2]=i[l+8>>2],A=0|Mt(0|e,0|a,52),w(),c=15&A,1&A?(ie(l),A=c+1|0):A=c,0|B(u)){e:do{if(c)for(t=1;;){if(s=0|Mt(0|e,0|a,3*(15-t|0)|0),w(),0|(s&=7)){a=s;break e}if(!(t>>>0<c>>>0)){a=0;break}t=t+1|0}else a=0}while(0);a=4==(0|a)&1}else a=0;if(0|_e(n,A,a,0)){if(0|B(u))do{}while(0!=(0|_e(n,A,0,0)));(0|A)!=(0|c)&&ne(l)}else(0|A)!=(0|c)&&(i[l>>2]=i[r>>2],i[l+4>>2]=i[r+4>>2],i[l+8>>2]=i[r+8>>2]);P=o}else P=o}function Ve(e,t,n){n|=0;var r,i;r=P,P=P+16|0,Ge(e|=0,t|=0,i=r),t=0|Mt(0|e,0|t,52),w(),ye(i,15&t,n),P=r}function je(e,t,n){n|=0;var r,i,o=0,a=0;i=P,P=P+16|0,Ge(e|=0,t|=0,r=i),o=0|Mt(0|e,0|t,45),w(),o=0==(0|B(127&o)),a=0|Mt(0|e,0|t,52),w(),a&=15;e:do{if(!o){if(0|a)for(o=1;;){if(!(0==((0|St(7,0,3*(15-o|0)|0))&e|0)&0==((0|w())&t|0)))break e;if(!(o>>>0<a>>>0))break;o=o+1|0}return xe(r,a,0,5,n),void(P=i)}}while(0);Me(r,a,0,6,n),P=i}function We(e,t){t|=0;var n,r=0,o=0,a=0,s=0,A=0,l=0;if(St(0|(e|=0),0,52),n=134225919|w(),(0|e)<1){o=0,r=0;do{0|B(o)&&(St(0|o,0,45),A=0|n|w(),i[(e=t+(r<<3)|0)>>2]=-1,i[e+4>>2]=A,r=r+1|0),o=o+1|0}while(122!=(0|o))}else{A=0,r=0;do{if(0|B(A)){for(St(0|A,0,45),o=1,a=-1,s=0|n|w();a&=~(l=0|St(7,0,3*(15-o|0)|0)),s&=~(0|w()),(0|o)!=(0|e);)o=o+1|0;i[(l=t+(r<<3)|0)>>2]=a,i[l+4>>2]=s,r=r+1|0}A=A+1|0}while(122!=(0|A))}}function Qe(e,t,n,r){var o,a=0,s=0,A=0,l=0,c=0;if(o=P,P=P+64|0,A=o,(0|(e|=0))==(0|(n|=0))&(0|(t|=0))==(0|(r|=0))|!1|134217728!=(2013265920&t|0)|!1|134217728!=(2013265920&r|0))return P=o,0|(A=0);if(a=0|Mt(0|e,0|t,52),w(),a&=15,s=0|Mt(0|n,0|r,52),w(),(0|a)!=(15&s|0))return P=o,0|(A=0);if(s=a+-1|0,a>>>0>1&&(c=0|qe(e,t,s),l=0|w(),(0|c)==(0|(s=0|qe(n,r,s)))&(0|l)==(0|w()))){if(a=0|Mt(0|e,0|t,0|(s=3*(15^a)|0)),w(),a&=7,s=0|Mt(0|n,0|r,0|s),w(),0==(0|a)|0==(0|(s&=7)))return P=o,0|(c=1);if((0|i[21136+(a<<2)>>2])==(0|s))return P=o,0|(c=1);if((0|i[21168+(a<<2)>>2])==(0|s))return P=o,0|(c=1)}s=(a=A)+56|0;do{i[a>>2]=0,a=a+4|0}while((0|a)<(0|s));return L(e,t,1,A),a=(0|i[(c=A)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+8|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+16|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+24|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+32|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+40|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)?1:1&((0|i[(a=A+48|0)>>2])==(0|n)?(0|i[a+4>>2])==(0|r):0),P=o,0|(c=a)}function Ye(e,t,n){n|=0;var r,o,a,s,A=0;if(a=P,P=P+16|0,o=a,A=0|Mt(0|(e|=0),0|(t|=0),56),w(),t=0|function(e,t,n){n|=0;var r=0,o=0;if(r=0|Ie(e=e|0,t=t|0),(n+-1|0)>>>0>5)return 0|(n=-1);if(1==(0|n)&(o=0!=(0|r)))return 0|(n=-1);return r=0|function(e,t){var n=0,r=0,o=0,a=0,s=0,A=0,l=0,c=0;if(c=P,P=P+32|0,a=c,Ge(e=e|0,t=t|0,o=c+16|0),s=0|Pe(e,t),l=0|Oe(e,t),function(e,t){e=7728+(28*(e|=0)|0)|0,i[(t|=0)>>2]=i[e>>2],i[t+4>>2]=i[e+4>>2],i[t+8>>2]=i[e+8>>2],i[t+12>>2]=i[e+12>>2]}(s,a),t=0|function(e,t){e|=0;var n=0,r=0;if((t|=0)>>>0>20)return-1;do{if((0|i[11152+(216*t|0)>>2])!=(0|e))if((0|i[11152+(216*t|0)+8>>2])!=(0|e))if((0|i[11152+(216*t|0)+16>>2])!=(0|e))if((0|i[11152+(216*t|0)+24>>2])!=(0|e))if((0|i[11152+(216*t|0)+32>>2])!=(0|e))if((0|i[11152+(216*t|0)+40>>2])!=(0|e))if((0|i[11152+(216*t|0)+48>>2])!=(0|e))if((0|i[11152+(216*t|0)+56>>2])!=(0|e))if((0|i[11152+(216*t|0)+64>>2])!=(0|e))if((0|i[11152+(216*t|0)+72>>2])!=(0|e))if((0|i[11152+(216*t|0)+80>>2])!=(0|e))if((0|i[11152+(216*t|0)+88>>2])!=(0|e))if((0|i[11152+(216*t|0)+96>>2])!=(0|e))if((0|i[11152+(216*t|0)+104>>2])!=(0|e))if((0|i[11152+(216*t|0)+112>>2])!=(0|e))if((0|i[11152+(216*t|0)+120>>2])!=(0|e))if((0|i[11152+(216*t|0)+128>>2])!=(0|e)){if((0|i[11152+(216*t|0)+136>>2])!=(0|e)){if((0|i[11152+(216*t|0)+144>>2])==(0|e)){e=0,n=2,r=0;break}if((0|i[11152+(216*t|0)+152>>2])==(0|e)){e=0,n=2,r=1;break}if((0|i[11152+(216*t|0)+160>>2])==(0|e)){e=0,n=2,r=2;break}if((0|i[11152+(216*t|0)+168>>2])==(0|e)){e=1,n=2,r=0;break}if((0|i[11152+(216*t|0)+176>>2])==(0|e)){e=1,n=2,r=1;break}if((0|i[11152+(216*t|0)+184>>2])==(0|e)){e=1,n=2,r=2;break}if((0|i[11152+(216*t|0)+192>>2])==(0|e)){e=2,n=2,r=0;break}if((0|i[11152+(216*t|0)+200>>2])==(0|e)){e=2,n=2,r=1;break}if((0|i[11152+(216*t|0)+208>>2])==(0|e)){e=2,n=2,r=2;break}return-1}e=2,n=1,r=2}else e=2,n=1,r=1;else e=2,n=1,r=0;else e=1,n=1,r=2;else e=1,n=1,r=1;else e=1,n=1,r=0;else e=0,n=1,r=2;else e=0,n=1,r=1;else e=0,n=1,r=0;else e=2,n=0,r=2;else e=2,n=0,r=1;else e=2,n=0,r=0;else e=1,n=0,r=2;else e=1,n=0,r=1;else e=1,n=0,r=0;else e=0,n=0,r=2;else e=0,n=0,r=1;else e=0,n=0,r=0}while(0);return 0|i[11152+(216*t|0)+(72*n|0)+(24*e|0)+(r<<3)+4>>2]}(s,0|i[o>>2]),!(0|B(s)))return P=c,0|(l=t);switch(0|s){case 4:e=0,n=14;break;case 14:e=1,n=14;break;case 24:e=2,n=14;break;case 38:e=3,n=14;break;case 49:e=4,n=14;break;case 58:e=5,n=14;break;case 63:e=6,n=14;break;case 72:e=7,n=14;break;case 83:e=8,n=14;break;case 97:e=9,n=14;break;case 107:e=10,n=14;break;case 117:e=11,n=14;break;default:A=0,r=0}14==(0|n)&&(A=0|i[22096+(24*e|0)+8>>2],r=0|i[22096+(24*e|0)+16>>2]);(0|(e=0|i[o>>2]))!=(0|i[a>>2])&&(s=0|k(s))|(0|(e=0|i[o>>2]))==(0|r)&&(t=(t+1|0)%6|0);if(3==(0|l)&(0|e)==(0|r))return P=c,0|(l=(t+5|0)%6|0);if(!(5==(0|l)&(0|e)==(0|A)))return P=c,0|(l=t);return P=c,0|(l=(t+1|0)%6|0)}(e,t),o?0|(n=(5-r+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-r+(0|i[22416+(n<<2)>>2])|0)%6|0)}(r=(s=!0&268435456==(2013265920&t|0))?e:0,e=s?-2130706433&t|134217728:0,7&A),-1==(0|t))return i[n>>2]=0,void(P=a);Ge(r,e,o),A=0|Mt(0|r,0|e,52),w(),A&=15,0|Ie(r,e)?xe(o,A,t,2,n):Me(o,A,t,2,n),P=a}function Xe(e){e|=0;var t,n,r=0;return(t=0|yt(1,12))||M(22691,22646,49,22704),0|(r=0|i[(n=e+4|0)>>2])?(i[(r=r+8|0)>>2]=t,i[n>>2]=t,0|t):(0|i[e>>2]&&M(22721,22646,61,22744),i[(r=e)>>2]=t,i[n>>2]=t,0|t)}function Ze(e,t){e|=0,t|=0;var n,r;return(r=0|gt(24))||M(22758,22646,78,22772),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[r+16>>2]=0,0|(n=0|i[(t=e+4|0)>>2])?(i[n+16>>2]=r,i[t>>2]=r,0|r):(0|i[e>>2]&&M(22787,22646,82,22772),i[e>>2]=r,i[t>>2]=r,0|r)}function Je(e){var t,n,r=0,a=0,s=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,w=0,S=0,E=0,T=0,C=0,R=0,P=0,L=0,q=0,D=0,I=0,O=0,B=0;if(0|i[(l=(e|=0)+8|0)>>2])return 0|(B=1);if(!(s=0|i[e>>2]))return 0|(B=0);r=s,a=0;do{a=a+1|0,r=0|i[r+8>>2]}while(0!=(0|r));if(a>>>0<2)return 0|(B=0);(n=0|gt(a<<2))||M(22807,22646,317,22826),(t=0|gt(a<<5))||M(22848,22646,321,22826),i[e>>2]=0,i[(C=e+4|0)>>2]=0,i[l>>2]=0,a=0,I=0,T=0,m=0;e:for(;;){if(p=0|i[s>>2]){c=0,u=p;do{if(d=+o[u+8>>3],r=u,u=0|i[u+16>>2],h=+o[(l=(f=0==(0|u))?p:u)+8>>3],+A(+(d-h))>3.141592653589793){B=14;break}c+=(h-d)*(+o[r>>3]+ +o[l>>3])}while(!f);if(14==(0|B)){B=0,c=0,r=p;do{E=+o[r+8>>3],q=0|i[(D=r+16|0)>>2],S=+o[(q=0==(0|q)?p:q)+8>>3],c+=(+o[r>>3]+ +o[q>>3])*((S<0?S+6.283185307179586:S)-(E<0?E+6.283185307179586:E)),r=0|i[(0==(0|r)?s:D)>>2]}while(0!=(0|r))}c>0?(i[n+(I<<2)>>2]=s,I=I+1|0,l=T,r=m):B=19}else B=19;if(19==(0|B)){B=0;do{if(!a){if(m){l=C,u=m+8|0,r=s,a=e;break}if(0|i[e>>2]){B=27;break e}l=C,u=e,r=s,a=e;break}if(0|i[(r=a+8|0)>>2]){B=21;break e}if(!(a=0|yt(1,12))){B=23;break e}i[r>>2]=a,l=a+4|0,u=a,r=m}while(0);if(i[u>>2]=s,i[l>>2]=s,u=t+(T<<5)|0,f=0|i[s>>2]){for(o[(p=t+(T<<5)+8|0)>>3]=17976931348623157e292,o[(m=t+(T<<5)+24|0)>>3]=17976931348623157e292,o[u>>3]=-17976931348623157e292,o[(g=t+(T<<5)+16|0)>>3]=-17976931348623157e292,_=17976931348623157e292,w=-17976931348623157e292,l=0,v=f,d=17976931348623157e292,x=17976931348623157e292,b=-17976931348623157e292,h=-17976931348623157e292;c=+o[v>>3],E=+o[v+8>>3],v=0|i[v+16>>2],S=+o[((y=0==(0|v))?f:v)+8>>3],c<d&&(o[p>>3]=c,d=c),E<x&&(o[m>>3]=E,x=E),c>b?o[u>>3]=c:c=b,E>h&&(o[g>>3]=E,h=E),_=E>0&E<_?E:_,w=E<0&E>w?E:w,l|=+A(+(E-S))>3.141592653589793,!y;)b=c;l&&(o[g>>3]=w,o[m>>3]=_)}else i[u>>2]=0,i[u+4>>2]=0,i[u+8>>2]=0,i[u+12>>2]=0,i[u+16>>2]=0,i[u+20>>2]=0,i[u+24>>2]=0,i[u+28>>2]=0;l=T+1|0}if(s=0|i[(D=s+8|0)>>2],i[D>>2]=0,!s){B=45;break}T=l,m=r}if(21==(0|B))M(22624,22646,35,22658);else if(23==(0|B))M(22678,22646,37,22658);else if(27==(0|B))M(22721,22646,61,22744);else if(45==(0|B)){e:do{if((0|I)>0){for(D=0==(0|l),L=l<<2,q=0==(0|e),P=0,r=0;;){if(R=0|i[n+(P<<2)>>2],D)B=73;else{if(!(T=0|gt(L))){B=50;break}if(!(C=0|gt(L))){B=52;break}t:do{if(q)a=0;else{for(l=0,a=0,u=e;s=t+(l<<5)|0,0|Ke(0|i[u>>2],s,0|i[R>>2])?(i[T+(a<<2)>>2]=u,i[C+(a<<2)>>2]=s,y=a+1|0):y=a,u=0|i[u+8>>2];)l=l+1|0,a=y;if((0|y)>0)if(s=0|i[T>>2],1==(0|y))a=s;else for(g=0,v=-1,a=s,m=s;;){for(f=0|i[m>>2],s=0,u=0;p=(0|(l=0|i[i[T+(u<<2)>>2]>>2]))==(0|f)?s:s+(1&(0|Ke(l,0|i[C+(u<<2)>>2],0|i[f>>2])))|0,(0|(u=u+1|0))!=(0|y);)s=p;if(a=(l=(0|p)>(0|v))?m:a,(0|(s=g+1|0))==(0|y))break t;g=s,v=l?p:v,m=0|i[T+(s<<2)>>2]}else a=0}}while(0);if(vt(T),vt(C),a){if(s=0|i[(l=a+4|0)>>2])a=s+8|0;else if(0|i[a>>2]){B=70;break}i[a>>2]=R,i[l>>2]=R}else B=73}if(73==(0|B)){if(B=0,0|(r=0|i[R>>2]))do{C=r,r=0|i[r+16>>2],vt(C)}while(0!=(0|r));vt(R),r=2}if((0|(P=P+1|0))>=(0|I)){O=r;break e}}50==(0|B)?M(22863,22646,249,22882):52==(0|B)?M(22901,22646,252,22882):70==(0|B)&&M(22721,22646,61,22744)}else O=0}while(0);return vt(n),vt(t),0|(B=O)}return 0}function Ke(e,t,n){e|=0;var r,a=0,s=0,A=0,l=0,c=0,u=0,h=0;if(!(0|V(t|=0,n|=0)))return 0|(e=0);if(t=0|G(t),r=+o[n>>3],a=t&(a=+o[n+8>>3])<0?a+6.283185307179586:a,!(e=0|i[e>>2]))return 0|(e=0);if(t){t=0,n=e;e:for(;;){for(;l=+o[n>>3],u=+o[n+8>>3],h=0|i[(n=n+16|0)>>2],A=+o[(h=0==(0|h)?e:h)>>3],s=+o[h+8>>3],l>A?(c=l,l=u):(c=A,A=l,l=s,s=u),r<A|r>c;)if(!(n=0|i[n>>2])){n=22;break e}if(a=(l=l<0?l+6.283185307179586:l)==a|(u=s<0?s+6.283185307179586:s)==a?a+-2220446049250313e-31:a,((u+=(r-A)/(c-A)*(l-u))<0?u+6.283185307179586:u)>a&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}else{t=0,n=e;e:for(;;){for(;l=+o[n>>3],u=+o[n+8>>3],h=0|i[(n=n+16|0)>>2],A=+o[(h=0==(0|h)?e:h)>>3],s=+o[h+8>>3],l>A?(c=l,l=u):(c=A,A=l,l=s,s=u),r<A|r>c;)if(!(n=0|i[n>>2])){n=22;break e}if(s+(r-A)/(c-A)*(l-s)>(a=l==a|s==a?a+-2220446049250313e-31:a)&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}return 0}function $e(e,t,n,o,a){n|=0,o|=0,a|=0;var s,A,l,c,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0;if(c=P,P=P+32|0,x=c+16|0,l=c,u=0|Mt(0|(e|=0),0|(t|=0),52),w(),u&=15,g=0|Mt(0|n,0|o,52),w(),(0|u)!=(15&g|0))return P=c,0|(x=1);if(p=0|Mt(0|e,0|t,45),w(),p&=127,m=0|Mt(0|n,0|o,45),w(),g=(0|p)!=(0|(m&=127))){if(7==(0|(d=0|H(p,m))))return P=c,0|(x=2);7==(0|(f=0|H(m,p)))?M(22925,22949,151,22959):(v=d,h=f)}else v=0,h=0;s=0|B(p),A=0|B(m),i[x>>2]=0,i[x+4>>2]=0,i[x+8>>2]=0,i[x+12>>2]=0;do{if(v){if(d=(0|(m=0|i[4304+(28*p|0)+(v<<2)>>2]))>0,A)if(d){p=0,f=n,d=o;do{f=0|Ne(f,d),d=0|w(),1==(0|(h=0|le(h)))&&(h=0|le(1)),p=p+1|0}while((0|p)!=(0|m));m=h,p=f,f=d}else m=h,p=n,f=o;else if(d){p=0,f=n,d=o;do{f=0|ze(f,d),d=0|w(),h=0|le(h),p=p+1|0}while((0|p)!=(0|m));m=h,p=f,f=d}else m=h,p=n,f=o;if(He(p,f,x),g||M(22972,22949,181,22959),(d=0!=(0|s))&(h=0!=(0|A))&&M(22999,22949,182,22959),d){if(h=0|Oe(e,t),0|r[22032+(7*h|0)+v>>0]){u=3;break}p=f=0|i[21200+(28*h|0)+(v<<2)>>2],y=26}else if(h){if(h=0|Oe(p,f),0|r[22032+(7*h|0)+m>>0]){u=4;break}p=0,f=0|i[21200+(28*m|0)+(h<<2)>>2],y=26}else h=0;if(26==(0|y))if((0|f)<=-1&&M(23030,22949,212,22959),(0|p)<=-1&&M(23053,22949,213,22959),(0|f)>0){d=x+4|0,h=0;do{se(d),h=h+1|0}while((0|h)!=(0|f));h=p}else h=p;if(i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,oe(l,v),0|u)for(;0|Ue(u)?re(l):ie(l),(0|u)>1;)u=u+-1|0;if((0|h)>0){u=0;do{se(l),u=u+1|0}while((0|u)!=(0|h))}J(y=x+4|0,l,y),X(y),y=50}else if(He(n,o,x),0!=(0|s)&0!=(0|A))if((0|m)!=(0|p)&&M(23077,22949,243,22959),h=0|Oe(e,t),u=0|Oe(n,o),0|r[22032+(7*h|0)+u>>0])u=5;else if((0|(h=0|i[21200+(28*h|0)+(u<<2)>>2]))>0){d=x+4|0,u=0;do{se(d),u=u+1|0}while((0|u)!=(0|h));y=50}else y=50;else y=50}while(0);return 50==(0|y)&&(u=x+4|0,i[a>>2]=i[u>>2],i[a+4>>2]=i[u+4>>2],i[a+8>>2]=i[u+8>>2],u=0),P=c,0|(x=u)}function et(e,t,n,r){n|=0,r|=0;var o,a,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0;if(a=P,P=P+48|0,l=a+36|0,c=a+24|0,u=a+12|0,h=a,A=0|Mt(0|(e|=0),0|(t|=0),52),w(),A&=15,f=0|Mt(0|e,0|t,45),w(),o=0|B(f&=127),St(0|A,0,52),g=134225919|w(),i[(m=r)>>2]=-1,i[m+4>>2]=g,!A)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(s=0|F(f,0|ee(n))))?(P=a,0|(g=1)):(p=0|St(0|s,0,45),m=0|w(),m=-1040385&i[(f=r)+4>>2]|m,i[(g=r)>>2]=i[f>>2]|p,i[g+4>>2]=m,P=a,0|(g=0));for(i[l>>2]=i[n>>2],i[l+4>>2]=i[n+4>>2],i[l+8>>2]=i[n+8>>2];i[c>>2]=i[l>>2],i[c+4>>2]=i[l+4>>2],i[c+8>>2]=i[l+8>>2],0|Ue(A)?(te(l),i[u>>2]=i[l>>2],i[u+4>>2]=i[l+4>>2],i[u+8>>2]=i[l+8>>2],re(u)):(ne(l),i[u>>2]=i[l>>2],i[u+4>>2]=i[l+4>>2],i[u+8>>2]=i[l+8>>2],ie(u)),K(c,u,h),X(h),v=0|i[(m=r)>>2],m=0|i[m+4>>2],n=0|St(7,0,0|(y=3*(15-A|0)|0)),m&=~(0|w()),y=0|St(0|ee(h),0,0|y),m=0|w()|m,i[(g=r)>>2]=y|v&~n,i[g+4>>2]=m,(0|A)>1;)A=A+-1|0;e:do{if((0|i[l>>2])<=1&&(0|i[l+4>>2])<=1&&(0|i[l+8>>2])<=1){h=127==(0|(c=0|F(f,A=0|ee(l))))?0:0|B(c);t:do{if(A){if(o){if(l=21408+(28*(0|Oe(e,t))|0)+(A<<2)|0,(0|(l=0|i[l>>2]))>0){n=0;do{A=0|Ae(A),n=n+1|0}while((0|n)!=(0|l))}if(1==(0|A)){s=3;break e}127==(0|(n=0|F(f,A)))&&M(23104,22949,376,23134),0|B(n)?M(23147,22949,377,23134):(p=l,d=A,s=n)}else p=0,d=A,s=c;if((0|(u=0|i[4304+(28*f|0)+(d<<2)>>2]))<=-1&&M(23178,22949,384,23134),!h){if((0|p)<=-1&&M(23030,22949,417,23134),0|p){A=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|ke(n,l),l=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=l,A=A+1|0}while((0|A)<(0|p))}if((0|u)<=0){A=54;break}for(A=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];;)if(n=0|ke(n,l),l=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=l,(0|(A=A+1|0))==(0|u)){A=54;break t}}if(7==(0|(c=0|H(s,f)))&&M(22925,22949,393,23134),n=0|i[(A=r)>>2],A=0|i[A+4>>2],(0|u)>0){l=0;do{n=0|ke(n,A),A=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=A,l=l+1|0}while((0|l)!=(0|u))}if(n=0|Oe(n,A),y=0|k(s),(0|(n=0|i[(y?21824:21616)+(28*c|0)+(n<<2)>>2]))<=-1&&M(23030,22949,412,23134),n){A=0,l=0|i[(c=r)>>2],c=0|i[c+4>>2];do{l=0|Be(l,c),c=0|w(),i[(y=r)>>2]=l,i[y+4>>2]=c,A=A+1|0}while((0|A)<(0|n));A=54}else A=54}else if(0!=(0|o)&0!=(0|h))if(A=21408+(28*(y=0|Oe(e,t))|0)+((0|Oe(0|i[(A=r)>>2],0|i[A+4>>2]))<<2)|0,(0|(A=0|i[A>>2]))<=-1&&M(23201,22949,433,23134),A){s=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|ke(n,l),l=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=l,s=s+1|0}while((0|s)<(0|A));s=c,A=54}else s=c,A=55;else s=c,A=54}while(0);if(54==(0|A)&&h&&(A=55),55==(0|A)&&1==(0|Oe(0|i[(y=r)>>2],0|i[y+4>>2]))){s=4;break}g=0|i[(y=r)>>2],y=-1040385&i[y+4>>2],v=0|St(0|s,0,45),y=0|y|w(),i[(s=r)>>2]=g|v,i[s+4>>2]=y,s=0}else s=2}while(0);return P=a,0|(y=s)}function tt(e,t){var n=0;if(!(t|=0))return 0|(n=1);n=e|=0,e=1;do{e=0|y(0==(1&t|0)?1:n,e),t>>=1,n=0|y(n,n)}while(0!=(0|t));return 0|e}function nt(e,t,n){e|=0;var r,a,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0;if(!(0|V(t|=0,n|=0)))return 0|(f=0);if(t=0|G(t),a=+o[n>>3],s=t&(s=+o[n+8>>3])<0?s+6.283185307179586:s,(0|(f=0|i[e>>2]))<=0)return 0|(f=0);if(r=0|i[e+4>>2],t){t=0,n=-1,e=0;e:for(;;){for(d=e;c=+o[r+(d<<4)>>3],h=+o[r+(d<<4)+8>>3],l=+o[r+((e=(n+2|0)%(0|f)|0)<<4)>>3],A=+o[r+(e<<4)+8>>3],c>l?(u=c,c=h):(u=l,l=c,c=A,A=h),a<l|a>u;){if(!((0|(n=d+1|0))<(0|f))){n=22;break e}e=d,d=n,n=e}if(s=(c=c<0?c+6.283185307179586:c)==s|(h=A<0?A+6.283185307179586:A)==s?s+-2220446049250313e-31:s,((h+=(a-l)/(u-l)*(c-h))<0?h+6.283185307179586:h)>s&&(t^=1),(0|(e=d+1|0))>=(0|f)){n=22;break}n=d}if(22==(0|n))return 0|t}else{t=0,n=-1,e=0;e:for(;;){for(d=e;c=+o[r+(d<<4)>>3],h=+o[r+(d<<4)+8>>3],l=+o[r+((e=(n+2|0)%(0|f)|0)<<4)>>3],A=+o[r+(e<<4)+8>>3],c>l?(u=c,c=h):(u=l,l=c,c=A,A=h),a<l|a>u;){if(!((0|(n=d+1|0))<(0|f))){n=22;break e}e=d,d=n,n=e}if(A+(a-l)/(u-l)*(c-A)>(s=c==s|A==s?s+-2220446049250313e-31:s)&&(t^=1),(0|(e=d+1|0))>=(0|f)){n=22;break}n=d}if(22==(0|n))return 0|t}return 0}function rt(e,t){t|=0;var n,r,a,s,l,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0;if(!(r=0|i[(e|=0)>>2]))return i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,void(i[t+28>>2]=0);if(o[(a=t+8|0)>>3]=17976931348623157e292,o[(s=t+24|0)>>3]=17976931348623157e292,o[t>>3]=-17976931348623157e292,o[(l=t+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[e+4>>2],g=17976931348623157e292,v=-17976931348623157e292,y=0,e=-1,d=17976931348623157e292,f=17976931348623157e292,m=-17976931348623157e292,u=-17976931348623157e292,x=0;c=+o[n+(x<<4)>>3],p=+o[n+(x<<4)+8>>3],h=+o[n+(((0|(e=e+2|0))==(0|r)?0:e)<<4)+8>>3],c<d&&(o[a>>3]=c,d=c),p<f&&(o[s>>3]=p,f=p),c>m?o[t>>3]=c:c=m,p>u&&(o[l>>3]=p,u=p),g=p>0&p<g?p:g,v=p<0&p>v?p:v,y|=+A(+(p-h))>3.141592653589793,(0|(e=x+1|0))!=(0|r);)b=x,m=c,x=e,e=b;y&&(o[l>>3]=v,o[s>>3]=g)}}function it(e,t){t|=0;var n,r=0,a=0,s=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,w=0,M=0,S=0,E=0;if(v=0|i[(e|=0)>>2]){if(o[(y=t+8|0)>>3]=17976931348623157e292,o[(x=t+24|0)>>3]=17976931348623157e292,o[t>>3]=-17976931348623157e292,o[(b=t+16|0)>>3]=-17976931348623157e292,(0|v)>0){for(s=0|i[e+4>>2],m=17976931348623157e292,g=-17976931348623157e292,a=0,r=-1,h=17976931348623157e292,d=17976931348623157e292,p=-17976931348623157e292,c=-17976931348623157e292,_=0;l=+o[s+(_<<4)>>3],f=+o[s+(_<<4)+8>>3],u=+o[s+(((0|(S=r+2|0))==(0|v)?0:S)<<4)+8>>3],l<h&&(o[y>>3]=l,h=l),f<d&&(o[x>>3]=f,d=f),l>p?o[t>>3]=l:l=p,f>c&&(o[b>>3]=f,c=f),m=f>0&f<m?f:m,g=f<0&f>g?f:g,a|=+A(+(f-u))>3.141592653589793,(0|(r=_+1|0))!=(0|v);)S=_,p=l,_=r,r=S;a&&(o[b>>3]=g,o[x>>3]=m)}}else i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,i[t+28>>2]=0;if(!((0|(r=0|i[(S=e+8|0)>>2]))<=0)){n=e+12|0,M=0;do{if(s=0|i[n>>2],a=M,x=t+((M=M+1|0)<<5)|0,b=0|i[s+(a<<3)>>2]){if(o[(_=t+(M<<5)+8|0)>>3]=17976931348623157e292,o[(e=t+(M<<5)+24|0)>>3]=17976931348623157e292,o[x>>3]=-17976931348623157e292,o[(w=t+(M<<5)+16|0)>>3]=-17976931348623157e292,(0|b)>0){for(v=0|i[s+(a<<3)+4>>2],m=17976931348623157e292,g=-17976931348623157e292,s=0,a=-1,y=0,h=17976931348623157e292,d=17976931348623157e292,f=-17976931348623157e292,c=-17976931348623157e292;l=+o[v+(y<<4)>>3],p=+o[v+(y<<4)+8>>3],u=+o[v+(((0|(a=a+2|0))==(0|b)?0:a)<<4)+8>>3],l<h&&(o[_>>3]=l,h=l),p<d&&(o[e>>3]=p,d=p),l>f?o[x>>3]=l:l=f,p>c&&(o[w>>3]=p,c=p),m=p>0&p<m?p:m,g=p<0&p>g?p:g,s|=+A(+(p-u))>3.141592653589793,(0|(a=y+1|0))!=(0|b);)E=y,y=a,f=l,a=E;s&&(o[w>>3]=g,o[e>>3]=m)}}else i[x>>2]=0,i[x+4>>2]=0,i[x+8>>2]=0,i[x+12>>2]=0,i[x+16>>2]=0,i[x+20>>2]=0,i[x+24>>2]=0,i[x+28>>2]=0,r=0|i[S>>2]}while((0|M)<(0|r))}}function ot(e,t,n){var r=0,o=0,a=0;if(!(0|nt(e|=0,t|=0,n|=0)))return 0|(o=0);if((0|i[(o=e+8|0)>>2])<=0)return 0|(o=1);for(r=e+12|0,e=0;;){if(a=e,e=e+1|0,0|nt((0|i[r>>2])+(a<<3)|0,t+(e<<5)|0,n)){e=0,r=6;break}if((0|e)>=(0|i[o>>2])){e=1,r=6;break}}return 6==(0|r)?0|e:0}function at(e,t,n,r,i){t|=0,n|=0,r|=0,i|=0;var a,s,A,l,c,u,h,d=0;l=+o[(e|=0)>>3],A=+o[t>>3]-l,s=+o[e+8>>3],a=+o[t+8>>3]-s,u=+o[n>>3],d=((d=+o[r>>3]-u)*(s-(h=+o[n+8>>3]))-(l-u)*(c=+o[r+8>>3]-h))/(A*c-a*d),o[i>>3]=l+A*d,o[i+8>>3]=s+a*d}function st(e,t){return t|=0,+o[(e|=0)>>3]!=+o[t>>3]?0|(t=0):0|(t=+o[e+8>>3]==+o[t+8>>3])}function At(e,t){t|=0;var n,r,i;return+((i=+o[(e|=0)>>3]-+o[t>>3])*i+(r=+o[e+8>>3]-+o[t+8>>3])*r+(n=+o[e+16>>3]-+o[t+16>>3])*n)}function lt(e,t,n){e|=0,n|=0;var r=0;(0|(t|=0))>0?(r=0|yt(t,4),i[e>>2]=r,r||M(23230,23253,40,23267)):i[e>>2]=0,i[e+4>>2]=t,i[e+8>>2]=0,i[e+12>>2]=n}function ct(e){var t,n,r,a=0,s=0,l=0,u=0;t=(e|=0)+4|0,n=e+12|0,r=e+8|0;e:for(;;){for(s=0|i[t>>2],a=0;;){if((0|a)>=(0|s))break e;if(l=0|i[e>>2],u=0|i[l+(a<<2)>>2])break;a=a+1|0}a=l+(~~(+A(+ +c(10,+ +(15-(0|i[n>>2])|0))*(+o[u>>3]+ +o[u+8>>3]))%+(0|s))>>>0<<2)|0,s=0|i[a>>2];t:do{if(0|s){if(l=u+32|0,(0|s)==(0|u))i[a>>2]=i[l>>2];else{if(!(a=0|i[(s=s+32|0)>>2]))break;for(;(0|a)!=(0|u);)if(!(a=0|i[(s=a+32|0)>>2]))break t;i[s>>2]=i[l>>2]}vt(u),i[r>>2]=(0|i[r>>2])-1}}while(0)}vt(0|i[e>>2])}function ut(e){var t,n=0,r=0;for(t=0|i[(e|=0)+4>>2],r=0;;){if((0|r)>=(0|t)){n=0,r=4;break}if(n=0|i[(0|i[e>>2])+(r<<2)>>2]){r=4;break}r=r+1|0}return 4==(0|r)?0|n:0}function ht(e,t){t|=0;var n=0,r=0,a=0,s=0;if(n=~~(+A(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,n=(0|i[e>>2])+(n<<2)|0,!(r=0|i[n>>2]))return 0|(s=1);s=t+32|0;do{if((0|r)!=(0|t)){if(!(n=0|i[r+32>>2]))return 0|(s=1);for(a=n;;){if((0|a)==(0|t)){a=8;break}if(!(n=0|i[a+32>>2])){n=1,a=10;break}r=a,a=n}if(8==(0|a)){i[r+32>>2]=i[s>>2];break}if(10==(0|a))return 0|n}else i[n>>2]=i[s>>2]}while(0);return vt(t),i[(s=e+8|0)>>2]=(0|i[s>>2])-1,0|(s=0)}function dt(e,t,n){e|=0,t|=0,n|=0;var r,a=0,s=0,l=0;(r=0|gt(40))||M(23283,23253,98,23296),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[(s=r+16|0)>>2]=i[n>>2],i[s+4>>2]=i[n+4>>2],i[s+8>>2]=i[n+8>>2],i[s+12>>2]=i[n+12>>2],i[r+32>>2]=0,s=~~(+A(+ +c(10,+ +(15-(0|i[e+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,s=(0|i[e>>2])+(s<<2)|0,a=0|i[s>>2];do{if(a){for(;!(0|Te(a,t)&&0|Te(a+16|0,n));)if(s=0|i[a+32>>2],!(0|i[(a=0==(0|s)?a:s)+32>>2])){l=10;break}if(10==(0|l)){i[a+32>>2]=r;break}return vt(r),0|(l=a)}i[s>>2]=r}while(0);return i[(l=e+8|0)>>2]=1+(0|i[l>>2]),0|(l=r)}function ft(e,t,n){t|=0,n|=0;var r=0,a=0;if(a=~~(+A(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(a=0|i[(0|i[e>>2])+(a<<2)>>2]))return 0|(n=0);if(!n){for(e=a;;){if(0|Te(e,t)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}if(10==(0|r))return 0|e}for(e=a;;){if(0|Te(e,t)&&0|Te(e+16|0,n)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}return 10==(0|r)?0|e:0}function pt(e,t){t|=0;var n=0;if(n=~~(+A(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(e=0|i[(0|i[e>>2])+(n<<2)>>2]))return 0|(n=0);for(;;){if(0|Te(e,t)){t=5;break}if(!(e=0|i[e+32>>2])){e=0,t=5;break}}return 5==(0|t)?0|e:0}function mt(e){return 0|~~+function(e){return+ +Pt(+(e=+e))}(e=+e)}function gt(e){e|=0;var t,n=0,r=0,o=0,a=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0;t=P,P=P+16|0,f=t;do{if(e>>>0<245){if(e=(u=e>>>0<11?16:e+11&-8)>>>3,3&(r=(d=0|i[5829])>>>e)|0)return o=0|i[(r=(e=23356+((n=(1&r^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|(s=0|i[(a=o+8|0)>>2]))==(0|e)?i[5829]=d&~(1<<n):(i[s+12>>2]=e,i[r>>2]=s),_=n<<3,i[o+4>>2]=3|_,i[(_=o+_+4|0)>>2]=1|i[_>>2],P=t,0|(_=a);if(u>>>0>(h=0|i[5831])>>>0){if(0|r)return n=((n=r<<e&((n=2<<e)|0-n))&0-n)-1|0,s=0|i[(e=(n=23356+((o=((r=(n>>>=l=n>>>12&16)>>>5&8)|l|(s=(n>>>=r)>>>2&4)|(e=(n>>>=s)>>>1&2)|(o=(n>>>=e)>>>1&1))+(n>>>o)|0)<<1<<2)|0)+8|0)>>2],(0|(r=0|i[(l=s+8|0)>>2]))==(0|n)?(e=d&~(1<<o),i[5829]=e):(i[r+12>>2]=n,i[e>>2]=r,e=d),A=(_=o<<3)-u|0,i[s+4>>2]=3|u,i[(a=s+u|0)+4>>2]=1|A,i[s+_>>2]=A,0|h&&(o=0|i[5834],r=23356+((n=h>>>3)<<1<<2)|0,e&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=A,i[5834]=a,P=t,0|(_=l);if(s=0|i[5830]){for(r=(s&0-s)-1|0,r=c=0|i[23620+(((o=(r>>>=a=r>>>12&16)>>>5&8)|a|(A=(r>>>=o)>>>2&4)|(l=(r>>>=A)>>>1&2)|(c=(r>>>=l)>>>1&1))+(r>>>c)<<2)>>2],l=c,c=(-8&i[c+4>>2])-u|0;(e=0|i[r+16>>2])||(e=0|i[r+20>>2]);)r=e,l=(a=(A=(-8&i[e+4>>2])-u|0)>>>0<c>>>0)?e:l,c=a?A:c;if((A=l+u|0)>>>0>l>>>0){a=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(e=l+20|0)>>2])&&!(n=0|i[(e=l+16|0)>>2])){r=0;break}for(;;)if(r=0|i[(o=n+20|0)>>2])n=r,e=o;else{if(!(r=0|i[(o=n+16|0)>>2]))break;n=r,e=o}i[e>>2]=0,r=n}else r=0|i[l+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|a){if(n=0|i[l+28>>2],(0|l)==(0|i[(e=23620+(n<<2)|0)>>2])){if(i[e>>2]=r,!r){i[5830]=s&~(1<<n);break}}else if(i[((0|i[(_=a+16|0)>>2])==(0|l)?_:a+20|0)>>2]=r,!r)break;i[r+24>>2]=a,0|(n=0|i[l+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[l+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return c>>>0<16?(_=c+u|0,i[l+4>>2]=3|_,i[(_=l+_+4|0)>>2]=1|i[_>>2]):(i[l+4>>2]=3|u,i[A+4>>2]=1|c,i[A+c>>2]=c,0|h&&(o=0|i[5834],r=23356+((n=h>>>3)<<1<<2)|0,(n=1<<n)&d?n=0|i[(e=r+8|0)>>2]:(i[5829]=n|d,n=r,e=r+8|0),i[e>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=c,i[5834]=A),P=t,0|(_=l+8|0)}d=u}else d=u}else d=u}else if(e>>>0<=4294967231)if(u=-8&(e=e+11|0),o=0|i[5830]){a=0-u|0,c=(e>>>=8)?u>>>0>16777215?31:u>>>((c=14-((l=((g=e<<(d=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|d|(c=((g<<=l)+245760|0)>>>16&2))+(g<<c>>>15)|0)+7|0)&1|c<<1:0,r=0|i[23620+(c<<2)>>2];e:do{if(r)for(e=0,l=u<<(31==(0|c)?0:25-(c>>>1)|0),s=0;;){if((A=(-8&i[r+4>>2])-u|0)>>>0<a>>>0){if(!A){e=r,a=0,g=65;break e}e=r,a=A}if(s=0==(0|(g=0|i[r+20>>2]))|(0|g)==(0|(r=0|i[r+16+(l>>>31<<2)>>2]))?s:g,!r){r=s,g=61;break}l<<=1}else r=0,e=0,g=61}while(0);if(61==(0|g)){if(0==(0|r)&0==(0|e)){if(!(e=((e=2<<c)|0-e)&o)){d=u;break}d=(e&0-e)-1|0,e=0,r=0|i[23620+(((s=(d>>>=A=d>>>12&16)>>>5&8)|A|(l=(d>>>=s)>>>2&4)|(c=(d>>>=l)>>>1&2)|(r=(d>>>=c)>>>1&1))+(d>>>r)<<2)>>2]}r?g=65:(l=e,A=a)}if(65==(0|g))for(s=r;;){if(a=(r=(d=(-8&i[s+4>>2])-u|0)>>>0<a>>>0)?d:a,e=r?s:e,(r=0|i[s+16>>2])||(r=0|i[s+20>>2]),!r){l=e,A=a;break}s=r}if(0!=(0|l)&&A>>>0<((0|i[5831])-u|0)>>>0&&(h=l+u|0)>>>0>l>>>0){s=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(e=l+20|0)>>2])&&!(n=0|i[(e=l+16|0)>>2])){n=0;break}for(;;)if(r=0|i[(a=n+20|0)>>2])n=r,e=a;else{if(!(r=0|i[(a=n+16|0)>>2]))break;n=r,e=a}i[e>>2]=0}else _=0|i[l+8>>2],i[_+12>>2]=n,i[n+8>>2]=_}while(0);do{if(s){if(e=0|i[l+28>>2],(0|l)==(0|i[(r=23620+(e<<2)|0)>>2])){if(i[r>>2]=n,!n){o&=~(1<<e),i[5830]=o;break}}else if(i[((0|i[(_=s+16|0)>>2])==(0|l)?_:s+20|0)>>2]=n,!n)break;i[n+24>>2]=s,0|(e=0|i[l+16>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),(e=0|i[l+20>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);e:do{if(A>>>0<16)_=A+u|0,i[l+4>>2]=3|_,i[(_=l+_+4|0)>>2]=1|i[_>>2];else{if(i[l+4>>2]=3|u,i[h+4>>2]=1|A,i[h+A>>2]=A,n=A>>>3,A>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=h,i[n+12>>2]=h,i[h+8>>2]=n,i[h+12>>2]=r;break}if(n=23620+((r=(n=A>>>8)?A>>>0>16777215?31:A>>>((r=14-((x=((_=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(r=((_<<=x)+245760|0)>>>16&2))+(_<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[h+28>>2]=r,i[(e=h+16|0)+4>>2]=0,i[e>>2]=0,!(o&(e=1<<r))){i[5830]=o|e,i[n>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break}n=0|i[n>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|A)){for(o=A<<(31==(0|r)?0:25-(r>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|A)){n=e;break t}o<<=1,n=e}i[r>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break e}}while(0);_=0|i[(b=n+8|0)>>2],i[_+12>>2]=h,i[b>>2]=h,i[h+8>>2]=_,i[h+12>>2]=n,i[h+24>>2]=0}}while(0);return P=t,0|(_=l+8|0)}d=u}else d=u;else d=-1}while(0);if((r=0|i[5831])>>>0>=d>>>0)return n=r-d|0,e=0|i[5834],n>>>0>15?(_=e+d|0,i[5834]=_,i[5831]=n,i[_+4>>2]=1|n,i[e+r>>2]=n,i[e+4>>2]=3|d):(i[5831]=0,i[5834]=0,i[e+4>>2]=3|r,i[(_=e+r+4|0)>>2]=1|i[_>>2]),P=t,0|(_=e+8|0);if((A=0|i[5832])>>>0>d>>>0)return x=A-d|0,i[5832]=x,b=(_=0|i[5835])+d|0,i[5835]=b,i[b+4>>2]=1|x,i[_+4>>2]=3|d,P=t,0|(_=_+8|0);if(0|i[5947]?e=0|i[5949]:(i[5949]=4096,i[5948]=4096,i[5950]=-1,i[5951]=-1,i[5952]=0,i[5940]=0,i[5947]=-16&f^1431655768,e=4096),l=d+48|0,(u=(s=e+(c=d+47|0)|0)&(a=0-e|0))>>>0<=d>>>0)return P=t,0|(_=0);if(0|(e=0|i[5939])&&(f=(h=0|i[5937])+u|0)>>>0<=h>>>0|f>>>0>e>>>0)return P=t,0|(_=0);e:do{if(4&i[5940])n=0,g=143;else{r=0|i[5835];t:do{if(r){for(o=23764;!((f=0|i[o>>2])>>>0<=r>>>0&&(f+(0|i[o+4>>2])|0)>>>0>r>>>0);){if(!(e=0|i[o+8>>2])){g=128;break t}o=e}if((n=s-A&a)>>>0<2147483647)if((0|(e=0|Lt(0|n)))==((0|i[o>>2])+(0|i[o+4>>2])|0)){if(-1!=(0|e)){A=n,s=e,g=145;break e}}else o=e,g=136;else n=0}else g=128}while(0);do{if(128==(0|g))if(-1!=(0|(r=0|Lt(0)))&&(n=r,m=(n=(0==((m=(p=0|i[5948])+-1|0)&n|0)?0:(m+n&0-p)-n|0)+u|0)+(p=0|i[5937])|0,n>>>0>d>>>0&n>>>0<2147483647)){if(0|(f=0|i[5939])&&m>>>0<=p>>>0|m>>>0>f>>>0){n=0;break}if((0|(e=0|Lt(0|n)))==(0|r)){A=n,s=r,g=145;break e}o=e,g=136}else n=0}while(0);do{if(136==(0|g)){if(r=0-n|0,!(l>>>0>n>>>0&n>>>0<2147483647&-1!=(0|o))){if(-1==(0|o)){n=0;break}A=n,s=o,g=145;break e}if((e=c-n+(e=0|i[5949])&0-e)>>>0>=2147483647){A=n,s=o,g=145;break e}if(-1==(0|Lt(0|e))){Lt(0|r),n=0;break}A=e+n|0,s=o,g=145;break e}}while(0);i[5940]=4|i[5940],g=143}}while(0);if(143==(0|g)&&u>>>0<2147483647&&!(-1==(0|(x=0|Lt(0|u)))|1^(y=(v=(m=0|Lt(0))-x|0)>>>0>(d+40|0)>>>0)|x>>>0<m>>>0&-1!=(0|x)&-1!=(0|m)^1)&&(A=y?v:n,s=x,g=145),145==(0|g)){n=(0|i[5937])+A|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),c=0|i[5835];e:do{if(c){for(n=23764;;){if((0|s)==((e=0|i[n>>2])+(r=0|i[n+4>>2])|0)){g=154;break}if(!(o=0|i[n+8>>2]))break;n=o}if(154==(0|g)&&(b=n+4|0,0==(8&i[n+12>>2]|0))&&s>>>0>c>>>0&e>>>0<=c>>>0){i[b>>2]=r+A,b=c+(x=0==(7&(x=c+8|0)|0)?0:0-x&7)|0,x=(_=(0|i[5832])+A|0)-x|0,i[5835]=b,i[5832]=x,i[b+4>>2]=1|x,i[c+_+4>>2]=40,i[5836]=i[5951];break}for(s>>>0<(0|i[5833])>>>0&&(i[5833]=s),r=s+A|0,n=23764;;){if((0|i[n>>2])==(0|r)){g=162;break}if(!(e=0|i[n+8>>2]))break;n=e}if(162==(0|g)&&0==(8&i[n+12>>2]|0)){i[n>>2]=s,i[(h=n+4|0)>>2]=(0|i[h>>2])+A,u=(h=s+(0==(7&(h=s+8|0)|0)?0:0-h&7)|0)+d|0,l=(n=r+(0==(7&(n=r+8|0)|0)?0:0-n&7)|0)-h-d|0,i[h+4>>2]=3|d;t:do{if((0|c)==(0|n))_=(0|i[5832])+l|0,i[5832]=_,i[5835]=u,i[u+4>>2]=1|_;else{if((0|i[5834])==(0|n)){_=(0|i[5831])+l|0,i[5831]=_,i[5834]=u,i[u+4>>2]=1|_,i[u+_>>2]=_;break}if(1==(3&(e=0|i[n+4>>2])|0)){A=-8&e,o=e>>>3;n:do{if(e>>>0<256){if(e=0|i[n+8>>2],(0|(r=0|i[n+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<o);break}i[e+12>>2]=r,i[r+8>>2]=e;break}s=0|i[n+24>>2],e=0|i[n+12>>2];do{if((0|e)==(0|n)){if(e=0|i[(o=(r=n+16|0)+4|0)>>2])r=o;else if(!(e=0|i[r>>2])){e=0;break}for(;;)if(o=0|i[(a=e+20|0)>>2])e=o,r=a;else{if(!(o=0|i[(a=e+16|0)>>2]))break;e=o,r=a}i[r>>2]=0}else _=0|i[n+8>>2],i[_+12>>2]=e,i[e+8>>2]=_}while(0);if(!s)break;o=23620+((r=0|i[n+28>>2])<<2)|0;do{if((0|i[o>>2])==(0|n)){if(i[o>>2]=e,0|e)break;i[5830]=i[5830]&~(1<<r);break n}if(i[((0|i[(_=s+16|0)>>2])==(0|n)?_:s+20|0)>>2]=e,!e)break n}while(0);if(i[e+24>>2]=s,0|(o=0|i[(r=n+16|0)>>2])&&(i[e+16>>2]=o,i[o+24>>2]=e),!(r=0|i[r+4>>2]))break;i[e+20>>2]=r,i[r+24>>2]=e}while(0);n=n+A|0,a=A+l|0}else a=l;if(i[(n=n+4|0)>>2]=-2&i[n>>2],i[u+4>>2]=1|a,i[u+a>>2]=a,n=a>>>3,a>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=u,i[n+12>>2]=u,i[u+8>>2]=n,i[u+12>>2]=r;break}n=a>>>8;do{if(n){if(a>>>0>16777215){o=31;break}o=a>>>((o=14-((x=((_=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(o=((_<<=x)+245760|0)>>>16&2))+(_<<o>>>15)|0)+7|0)&1|o<<1}else o=0}while(0);if(n=23620+(o<<2)|0,i[u+28>>2]=o,i[(e=u+16|0)+4>>2]=0,i[e>>2]=0,!((e=0|i[5830])&(r=1<<o))){i[5830]=e|r,i[n>>2]=u,i[u+24>>2]=n,i[u+12>>2]=u,i[u+8>>2]=u;break}n=0|i[n>>2];n:do{if((-8&i[n+4>>2]|0)!=(0|a)){for(o=a<<(31==(0|o)?0:25-(o>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|a)){n=e;break n}o<<=1,n=e}i[r>>2]=u,i[u+24>>2]=n,i[u+12>>2]=u,i[u+8>>2]=u;break t}}while(0);_=0|i[(b=n+8|0)>>2],i[_+12>>2]=u,i[b>>2]=u,i[u+8>>2]=_,i[u+12>>2]=n,i[u+24>>2]=0}}while(0);return P=t,0|(_=h+8|0)}for(n=23764;!((e=0|i[n>>2])>>>0<=c>>>0&&(_=e+(0|i[n+4>>2])|0)>>>0>c>>>0);)n=0|i[n+8>>2];n=(e=(e=(a=_+-47|0)+(0==(7&(e=a+8|0)|0)?0:0-e&7)|0)>>>0<(a=c+16|0)>>>0?c:e)+8|0,b=s+(x=0==(7&(x=s+8|0)|0)?0:0-x&7)|0,x=(r=A+-40|0)-x|0,i[5835]=b,i[5832]=x,i[b+4>>2]=1|x,i[s+r+4>>2]=40,i[5836]=i[5951],i[(r=e+4|0)>>2]=27,i[n>>2]=i[5941],i[n+4>>2]=i[5942],i[n+8>>2]=i[5943],i[n+12>>2]=i[5944],i[5941]=s,i[5942]=A,i[5944]=0,i[5943]=n,n=e+24|0;do{b=n,i[(n=n+4|0)>>2]=7}while((b+8|0)>>>0<_>>>0);if((0|e)!=(0|c)){if(s=e-c|0,i[r>>2]=-2&i[r>>2],i[c+4>>2]=1|s,i[e>>2]=s,n=s>>>3,s>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=c,i[n+12>>2]=c,i[c+8>>2]=n,i[c+12>>2]=r;break}if(r=23620+((o=(n=s>>>8)?s>>>0>16777215?31:s>>>((o=14-((x=((_=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(o=((_<<=x)+245760|0)>>>16&2))+(_<<o>>>15)|0)+7|0)&1|o<<1:0)<<2)|0,i[c+28>>2]=o,i[c+20>>2]=0,i[a>>2]=0,!((n=0|i[5830])&(e=1<<o))){i[5830]=n|e,i[r>>2]=c,i[c+24>>2]=r,i[c+12>>2]=c,i[c+8>>2]=c;break}n=0|i[r>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|s)){for(o=s<<(31==(0|o)?0:25-(o>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|s)){n=e;break t}o<<=1,n=e}i[r>>2]=c,i[c+24>>2]=n,i[c+12>>2]=c,i[c+8>>2]=c;break e}}while(0);_=0|i[(b=n+8|0)>>2],i[_+12>>2]=c,i[b>>2]=c,i[c+8>>2]=_,i[c+12>>2]=n,i[c+24>>2]=0}}else 0==(0|(_=0|i[5833]))|s>>>0<_>>>0&&(i[5833]=s),i[5941]=s,i[5942]=A,i[5944]=0,i[5838]=i[5947],i[5837]=-1,i[5842]=23356,i[5841]=23356,i[5844]=23364,i[5843]=23364,i[5846]=23372,i[5845]=23372,i[5848]=23380,i[5847]=23380,i[5850]=23388,i[5849]=23388,i[5852]=23396,i[5851]=23396,i[5854]=23404,i[5853]=23404,i[5856]=23412,i[5855]=23412,i[5858]=23420,i[5857]=23420,i[5860]=23428,i[5859]=23428,i[5862]=23436,i[5861]=23436,i[5864]=23444,i[5863]=23444,i[5866]=23452,i[5865]=23452,i[5868]=23460,i[5867]=23460,i[5870]=23468,i[5869]=23468,i[5872]=23476,i[5871]=23476,i[5874]=23484,i[5873]=23484,i[5876]=23492,i[5875]=23492,i[5878]=23500,i[5877]=23500,i[5880]=23508,i[5879]=23508,i[5882]=23516,i[5881]=23516,i[5884]=23524,i[5883]=23524,i[5886]=23532,i[5885]=23532,i[5888]=23540,i[5887]=23540,i[5890]=23548,i[5889]=23548,i[5892]=23556,i[5891]=23556,i[5894]=23564,i[5893]=23564,i[5896]=23572,i[5895]=23572,i[5898]=23580,i[5897]=23580,i[5900]=23588,i[5899]=23588,i[5902]=23596,i[5901]=23596,i[5904]=23604,i[5903]=23604,b=s+(x=0==(7&(x=s+8|0)|0)?0:0-x&7)|0,x=(_=A+-40|0)-x|0,i[5835]=b,i[5832]=x,i[b+4>>2]=1|x,i[s+_+4>>2]=40,i[5836]=i[5951]}while(0);if((n=0|i[5832])>>>0>d>>>0)return x=n-d|0,i[5832]=x,b=(_=0|i[5835])+d|0,i[5835]=b,i[b+4>>2]=1|x,i[_+4>>2]=3|d,P=t,0|(_=_+8|0)}return i[(_=23312)>>2]=12,P=t,0|(_=0)}function vt(e){var t=0,n=0,r=0,o=0,a=0,s=0,A=0,l=0;if(e|=0){n=e+-8|0,o=0|i[5833],l=n+(t=-8&(e=0|i[e+-4>>2]))|0;do{if(1&e)A=n,s=n;else{if(r=0|i[n>>2],!(3&e))return;if(a=r+t|0,(s=n+(0-r)|0)>>>0<o>>>0)return;if((0|i[5834])==(0|s)){if(3!=(3&(t=0|i[(e=l+4|0)>>2])|0)){A=s,t=a;break}return i[5831]=a,i[e>>2]=-2&t,i[s+4>>2]=1|a,void(i[s+a>>2]=a)}if(n=r>>>3,r>>>0<256){if(e=0|i[s+8>>2],(0|(t=0|i[s+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<n),A=s,t=a;break}i[e+12>>2]=t,i[t+8>>2]=e,A=s,t=a;break}o=0|i[s+24>>2],e=0|i[s+12>>2];do{if((0|e)==(0|s)){if(e=0|i[(n=(t=s+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){e=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0}else A=0|i[s+8>>2],i[A+12>>2]=e,i[e+8>>2]=A}while(0);if(o){if(t=0|i[s+28>>2],(0|i[(n=23620+(t<<2)|0)>>2])==(0|s)){if(i[n>>2]=e,!e){i[5830]=i[5830]&~(1<<t),A=s,t=a;break}}else if(i[((0|i[(A=o+16|0)>>2])==(0|s)?A:o+20|0)>>2]=e,!e){A=s,t=a;break}i[e+24>>2]=o,0|(n=0|i[(t=s+16|0)>>2])&&(i[e+16>>2]=n,i[n+24>>2]=e),(t=0|i[t+4>>2])?(i[e+20>>2]=t,i[t+24>>2]=e,A=s,t=a):(A=s,t=a)}else A=s,t=a}}while(0);if(!(s>>>0>=l>>>0)&&1&(r=0|i[(e=l+4|0)>>2])){if(2&r)i[e>>2]=-2&r,i[A+4>>2]=1|t,i[s+t>>2]=t,o=t;else{if((0|i[5835])==(0|l)){if(l=(0|i[5832])+t|0,i[5832]=l,i[5835]=A,i[A+4>>2]=1|l,(0|A)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|l))return l=(0|i[5831])+t|0,i[5831]=l,i[5834]=s,i[A+4>>2]=1|l,void(i[s+l>>2]=l);o=(-8&r)+t|0,n=r>>>3;do{if(r>>>0<256){if(t=0|i[l+8>>2],(0|(e=0|i[l+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<<n);break}i[t+12>>2]=e,i[e+8>>2]=t;break}a=0|i[l+24>>2],e=0|i[l+12>>2];do{if((0|e)==(0|l)){if(e=0|i[(n=(t=l+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){n=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0,n=e}else n=0|i[l+8>>2],i[n+12>>2]=e,i[e+8>>2]=n,n=e}while(0);if(0|a){if(e=0|i[l+28>>2],(0|i[(t=23620+(e<<2)|0)>>2])==(0|l)){if(i[t>>2]=n,!n){i[5830]=i[5830]&~(1<<e);break}}else if(i[((0|i[(r=a+16|0)>>2])==(0|l)?r:a+20|0)>>2]=n,!n)break;i[n+24>>2]=a,0|(t=0|i[(e=l+16|0)>>2])&&(i[n+16>>2]=t,i[t+24>>2]=n),0|(e=0|i[e+4>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);if(i[A+4>>2]=1|o,i[s+o>>2]=o,(0|A)==(0|i[5834]))return void(i[5831]=o)}if(e=o>>>3,o>>>0<256)return n=23356+(e<<1<<2)|0,(t=0|i[5829])&(e=1<<e)?e=0|i[(t=n+8|0)>>2]:(i[5829]=t|e,e=n,t=n+8|0),i[t>>2]=A,i[e+12>>2]=A,i[A+8>>2]=e,void(i[A+12>>2]=n);e=23620+((r=(e=o>>>8)?o>>>0>16777215?31:o>>>((r=14-((a=((l=e<<(s=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|s|(r=((l<<=a)+245760|0)>>>16&2))+(l<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[A+28>>2]=r,i[A+20>>2]=0,i[A+16>>2]=0,t=0|i[5830],n=1<<r;e:do{if(t&n){e=0|i[e>>2];t:do{if((-8&i[e+4>>2]|0)!=(0|o)){for(r=o<<(31==(0|r)?0:25-(r>>>1)|0);t=0|i[(n=e+16+(r>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|o)){e=t;break t}r<<=1,e=t}i[n>>2]=A,i[A+24>>2]=e,i[A+12>>2]=A,i[A+8>>2]=A;break e}}while(0);l=0|i[(s=e+8|0)>>2],i[l+12>>2]=A,i[s>>2]=A,i[A+8>>2]=l,i[A+12>>2]=e,i[A+24>>2]=0}else i[5830]=t|n,i[e>>2]=A,i[A+24>>2]=e,i[A+12>>2]=A,i[A+8>>2]=A}while(0);if(l=(0|i[5837])-1|0,i[5837]=l,!(0|l)){for(e=23772;e=0|i[e>>2];)e=e+8|0;i[5837]=-1}}}}function yt(e,t){t|=0;var n=0;return(e|=0)?(n=0|y(t,e),(t|e)>>>0>65535&&(n=(0|(n>>>0)/(e>>>0))==(0|t)?n:-1)):n=0,(e=0|gt(n))&&3&i[e+-4>>2]?(Rt(0|e,0,0|n),0|e):0|e}function xt(e,t,n,r){return 0|(_(0|(r=(t|=0)-(r|=0)-((n|=0)>>>0>(e|=0)>>>0|0)>>>0)),e-n>>>0|0)}function bt(e){return 0|((e|=0)?31-(0|b(e^e-1))|0:32)}function _t(e,t,n,r,o){o|=0;var a=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0;if(u=e|=0,s=n|=0,A=d=r|=0,!(c=l=t|=0))return a=0!=(0|o),A?a?(i[o>>2]=0|e,i[o+4>>2]=0&t,o=0,0|(_(0|(d=0)),o)):(o=0,0|(_(0|(d=0)),o)):(a&&(i[o>>2]=(u>>>0)%(s>>>0),i[o+4>>2]=0),o=(u>>>0)/(s>>>0)>>>0,0|(_(0|(d=0)),o));a=0==(0|A);do{if(s){if(!a){if((a=(0|b(0|A))-(0|b(0|c))|0)>>>0<=31){s=h=a+1|0,e=u>>>(h>>>0)&(t=a-31>>31)|c<<(A=31-a|0),t&=c>>>(h>>>0),a=0,A=u<<A;break}return o?(i[o>>2]=0|e,i[o+4>>2]=l|0&t,o=0,0|(_(0|(d=0)),o)):(o=0,0|(_(0|(d=0)),o))}if((a=s-1|0)&s|0){s=A=33+(0|b(0|s))-(0|b(0|c))|0,e=(h=32-A|0)-1>>31&c>>>((f=A-32|0)>>>0)|(c<<h|u>>>(A>>>0))&(t=f>>31),t&=c>>>(A>>>0),a=u<<(p=64-A|0)&(l=h>>31),A=(c<<p|u>>>(f>>>0))&l|u<<h&A-33>>31;break}return 0|o&&(i[o>>2]=a&u,i[o+4>>2]=0),1==(0|s)?(p=0|e,0|(_(0|(f=l|0&t)),p)):(f=c>>>((p=0|bt(0|s))>>>0)|0,p=c<<32-p|u>>>(p>>>0)|0,0|(_(0|f),p))}if(a)return 0|o&&(i[o>>2]=(c>>>0)%(s>>>0),i[o+4>>2]=0),p=(c>>>0)/(s>>>0)>>>0,0|(_(0|(f=0)),p);if(!u)return 0|o&&(i[o>>2]=0,i[o+4>>2]=(c>>>0)%(A>>>0)),p=(c>>>0)/(A>>>0)>>>0,0|(_(0|(f=0)),p);if(!((a=A-1|0)&A))return 0|o&&(i[o>>2]=0|e,i[o+4>>2]=a&c|0&t),f=0,p=c>>>((0|bt(0|A))>>>0),0|(_(0|f),p);if((a=(0|b(0|A))-(0|b(0|c))|0)>>>0<=30){s=t=a+1|0,e=c<<(A=31-a|0)|u>>>(t>>>0),t=c>>>(t>>>0),a=0,A=u<<A;break}return o?(i[o>>2]=0|e,i[o+4>>2]=l|0&t,p=0,0|(_(0|(f=0)),p)):(p=0,0|(_(0|(f=0)),p))}while(0);if(s){c=0|function(e,t,n,r){return 0|(_((t|=0)+(r|=0)+((n=(e|=0)+(n|=0)>>>0)>>>0<e>>>0|0)>>>0|0),0|n)}(0|(h=0|n),0|(u=d|0&r),-1,-1),n=0|w(),l=A,A=0;do{r=l,l=a>>>31|l<<1,a=A|a<<1,xt(0|c,0|n,0|(r=e<<1|r>>>31|0),0|(d=e>>>31|t<<1|0)),A=1&(f=(p=0|w())>>31|((0|p)<0?-1:0)<<1),e=0|xt(0|r,0|d,f&h|0,(((0|p)<0?-1:0)>>31|((0|p)<0?-1:0)<<1)&u|0),t=0|w(),s=s-1|0}while(0!=(0|s));c=l,l=0}else c=A,l=0,A=0;return s=0,0|o&&(i[o>>2]=e,i[o+4>>2]=t),p=-2&(a<<1|0)|A,0|(_(0|(f=(0|a)>>>31|(c|s)<<1|0&(s<<1|a>>>31)|l)),p)}function wt(e,t,n,r){var o,a;return a=P,P=P+16|0,_t(e|=0,t|=0,n|=0,r|=0,o=0|a),P=a,0|(_(0|i[o+4>>2]),0|i[o>>2])}function Mt(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(_(t>>>n|0),e>>>n|(t&(1<<n)-1)<<32-n):(_(0),t>>>n-32|0)}function St(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(_(t<<n|(e&(1<<n)-1<<32-n)>>>32-n|0),e<<n):(_(e<<n-32|0),0)}function Et(e,t){return t=+t,(e=+e)!=e?+t:t!=t?+e:+x(+e,+t)}function Tt(e){return(e=+e)>=0?+s(e+.5):+v(e-.5)}function Ct(e,t,n){e|=0,t|=0;var o,a,s=0;if((0|(n|=0))>=8192)return T(0|e,0|t,0|n),0|e;if(a=0|e,o=e+n|0,(3&e)==(3&t)){for(;3&e;){if(!n)return 0|a;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,n=n-1|0}for(s=(n=-4&o|0)-64|0;(0|e)<=(0|s);)i[e>>2]=i[t>>2],i[e+4>>2]=i[t+4>>2],i[e+8>>2]=i[t+8>>2],i[e+12>>2]=i[t+12>>2],i[e+16>>2]=i[t+16>>2],i[e+20>>2]=i[t+20>>2],i[e+24>>2]=i[t+24>>2],i[e+28>>2]=i[t+28>>2],i[e+32>>2]=i[t+32>>2],i[e+36>>2]=i[t+36>>2],i[e+40>>2]=i[t+40>>2],i[e+44>>2]=i[t+44>>2],i[e+48>>2]=i[t+48>>2],i[e+52>>2]=i[t+52>>2],i[e+56>>2]=i[t+56>>2],i[e+60>>2]=i[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|n);)i[e>>2]=i[t>>2],e=e+4|0,t=t+4|0}else for(n=o-4|0;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|o);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|a}function Rt(e,t,n){t|=0;var o,a=0,s=0,A=0;if(o=(e|=0)+(n|=0)|0,t&=255,(0|n)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(A=t|t<<8|t<<16|t<<24,s=(a=-4&o|0)-64|0;(0|e)<=(0|s);)i[e>>2]=A,i[e+4>>2]=A,i[e+8>>2]=A,i[e+12>>2]=A,i[e+16>>2]=A,i[e+20>>2]=A,i[e+24>>2]=A,i[e+28>>2]=A,i[e+32>>2]=A,i[e+36>>2]=A,i[e+40>>2]=A,i[e+44>>2]=A,i[e+48>>2]=A,i[e+52>>2]=A,i[e+56>>2]=A,i[e+60>>2]=A,e=e+64|0;for(;(0|e)<(0|a);)i[e>>2]=A,e=e+4|0}for(;(0|e)<(0|o);)r[e>>0]=t,e=e+1|0;return o-n|0}function Pt(e){return(e=+e)>=0?+s(e+.5):+v(e-.5)}function Lt(e){e|=0;var t,n,r;return r=0|E(),(0|e)>0&(0|(t=(n=0|i[a>>2])+e|0))<(0|n)|(0|t)<0?(R(0|t),S(12),-1):(0|t)>(0|r)&&!(0|C(0|t))?(S(12),-1):(i[a>>2]=t,0|n)}return{___uremdi3:wt,_bitshift64Lshr:Mt,_bitshift64Shl:St,_calloc:yt,_cellAreaKm2:function(e,t){var n,r,o,a=0;if(o=P,P=P+192|0,r=o,Ve(e|=0,t|=0,n=o+168|0),je(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+Re(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+Re(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else a=0;return P=o,6371.007180918475*a*6371.007180918475},_cellAreaM2:function(e,t){var n,r,o,a=0;if(o=P,P=P+192|0,r=o,Ve(e|=0,t|=0,n=o+168|0),je(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+Re(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+Re(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else a=0;return P=o,6371.007180918475*a*6371.007180918475*1e3*1e3},_cellAreaRads2:function(e,t){var n,r,o,a=0;if(o=P,P=P+192|0,r=o,Ve(e|=0,t|=0,n=o+168|0),je(e,t,r),(0|(t=0|i[r>>2]))<=0)return P=o,+(a=0);if(a=+Re(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1==(0|t))return P=o,+a;e=1;do{a+=+Re(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t));return P=o,+a},_compact:function(e,t,n){t|=0;var r,o=0,a=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,M=0,S=0,E=0;if(!(n|=0))return 0|(S=0);if(o=0|i[(a=e|=0)>>2],!0&0==(15728640&(a=0|i[a+4>>2])|0)){if((0|n)<=0)return 0|(S=0);if(i[(S=t)>>2]=o,i[S+4>>2]=a,1==(0|n))return 0|(S=0);o=1;do{M=0|i[(_=e+(o<<3)|0)+4>>2],i[(S=t+(o<<3)|0)>>2]=i[_>>2],i[S+4>>2]=M,o=o+1|0}while((0|o)!=(0|n));return 0|(o=0)}if(!(M=0|gt(_=n<<3)))return 0|(S=-3);if(Ct(0|M,0|e,0|_),!(r=0|yt(n,8)))return vt(M),0|(S=-3);o=n;e:for(;;){x=0|Mt(0|(h=0|i[(A=M)>>2]),0|(A=0|i[A+4>>2]),52),w(),b=(x&=15)+-1|0,y=(0|o)>0;t:do{if(y){if(v=((0|o)<0)<<31>>31,m=0|St(0|b,0,52),g=0|w(),b>>>0>15)for(a=0,e=h,n=A;;){if(!(0==(0|e)&0==(0|n))){if(s=0|Mt(0|e,0|n,52),w(),l=(0|(s&=15))<(0|b),s=(0|s)==(0|b),n=0|wt(0|(u=l?0:s?e:0),0|(e=l?0:s?n:0),0|o,0|v),w(),0==(0|(c=0|i[(l=s=r+(n<<3)|0)>>2]))&0==(0|(l=0|i[l+4>>2])))n=u;else for(m=0,p=n,f=l,n=u;;){if((0|m)>(0|o)){S=41;break e}if((0|c)==(0|n)&(-117440513&f|0)==(0|e)){u=0|Mt(0|c,0|f,56),w(),d=(u&=7)+1|0,g=0|Mt(0|c,0|f,45),w();n:do{if(0|B(127&g)){if(c=0|Mt(0|c,0|f,52),w(),!(c&=15)){l=6;break}for(l=1;;){if(!(0==((g=0|St(7,0,3*(15-l|0)|0))&n|0)&0==((0|w())&e|0))){l=7;break n}if(!(l>>>0<c>>>0)){l=6;break}l=l+1|0}}else l=7}while(0);if((u+2|0)>>>0>l>>>0){S=51;break e}g=0|St(0|d,0,56),e=0|w()|-117440513&e,i[(l=s)>>2]=0,i[l+4>>2]=0,l=p,n|=g}else l=(p+1|0)%(0|o)|0;if(0==(0|(c=0|i[(f=s=r+(l<<3)|0)>>2]))&0==(0|(f=0|i[f+4>>2])))break;m=m+1|0,p=l}i[(g=s)>>2]=n,i[g+4>>2]=e}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=M+(a<<3)|0)>>2],n=0|i[n+4>>2]}for(a=0,e=h,n=A;;){if(!(0==(0|e)&0==(0|n))){if(l=0|Mt(0|e,0|n,52),w(),(0|(l&=15))>=(0|b)){if((0|l)!=(0|b)&&(e|=m,n=-15728641&n|g,l>>>0>=x>>>0)){s=b;do{p=0|St(7,0,3*(14-s|0)|0),s=s+1|0,e|=p,n=0|w()|n}while(s>>>0<l>>>0)}}else e=0,n=0;if(l=0|wt(0|e,0|n,0|o,0|v),w(),!(0==(0|(u=0|i[(c=s=r+(l<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2]))))for(p=0;;){if((0|p)>(0|o)){S=41;break e}if((0|u)==(0|e)&(-117440513&c|0)==(0|n)){d=0|Mt(0|u,0|c,56),w(),f=(d&=7)+1|0,E=0|Mt(0|u,0|c,45),w();n:do{if(0|B(127&E)){if(u=0|Mt(0|u,0|c,52),w(),!(u&=15)){c=6;break}for(c=1;;){if(!(0==((E=0|St(7,0,3*(15-c|0)|0))&e|0)&0==((0|w())&n|0))){c=7;break n}if(!(c>>>0<u>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((d+2|0)>>>0>c>>>0){S=51;break e}E=0|St(0|f,0,56),n=0|w()|-117440513&n,i[(f=s)>>2]=0,i[f+4>>2]=0,e|=E}else l=(l+1|0)%(0|o)|0;if(0==(0|(u=0|i[(c=s=r+(l<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2])))break;p=p+1|0}i[(E=s)>>2]=e,i[E+4>>2]=n}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=M+(a<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((o+5|0)>>>0<11){S=99;break}if(!(g=0|yt((0|o)/6|0,8))){S=58;break}t:do{if(y){p=0,f=0;do{if(!(0==(0|(a=0|i[(e=l=r+(p<<3)|0)>>2]))&0==(0|(e=0|i[e+4>>2])))){c=0|Mt(0|a,0|e,56),w(),n=(c&=7)+1|0,u=-117440513&e,E=0|Mt(0|a,0|e,45),w();n:do{if(0|B(127&E)){if(d=0|Mt(0|a,0|e,52),w(),0|(d&=15))for(s=1;;){if(!(0==(a&(E=0|St(7,0,3*(15-s|0)|0))|0)&0==(u&(0|w())|0)))break n;if(!(s>>>0<d>>>0))break;s=s+1|0}a|=e=0|St(0|n,0,56),e=0|w()|u,i[(n=l)>>2]=a,i[n+4>>2]=e,n=c+2|0}}while(0);7==(0|n)&&(i[(E=g+(f<<3)|0)>>2]=a,i[E+4>>2]=-117440513&e,f=f+1|0)}p=p+1|0}while((0|p)!=(0|o));if(y){if(m=((0|o)<0)<<31>>31,d=0|St(0|b,0,52),p=0|w(),b>>>0>15)for(e=0,a=0;;){do{if(!(0==(0|h)&0==(0|A))){for(c=0|Mt(0|h,0|A,52),w(),s=(0|(c&=15))<(0|b),c=(0|c)==(0|b),s=0|wt(0|(l=s?0:c?h:0),0|(c=s?0:c?A:0),0|o,0|m),w(),n=0;;){if((0|n)>(0|o)){S=98;break e}if((-117440513&(u=0|i[(E=r+(s<<3)|0)+4>>2])|0)==(0|c)&&(0|i[E>>2])==(0|l)){S=70;break}if((0|i[(E=r+((s=(s+1|0)%(0|o)|0)<<3)|0)>>2])==(0|l)&&(0|i[E+4>>2])==(0|c))break;n=n+1|0}if(70==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;i[(E=t+(a<<3)|0)>>2]=h,i[E+4>>2]=A,a=a+1|0}}while(0);if((0|(e=e+1|0))>=(0|o)){o=f;break t}h=0|i[(A=M+(e<<3)|0)>>2],A=0|i[A+4>>2]}for(e=0,a=0;;){do{if(!(0==(0|h)&0==(0|A))){if(c=0|Mt(0|h,0|A,52),w(),(0|(c&=15))>=(0|b))if((0|c)!=(0|b))if(n=h|d,s=-15728641&A|p,c>>>0<x>>>0)c=s;else{l=b;do{E=0|St(7,0,3*(14-l|0)|0),l=l+1|0,n|=E,s=0|w()|s}while(l>>>0<c>>>0);c=s}else n=h,c=A;else n=0,c=0;for(l=0|wt(0|n,0|c,0|o,0|m),w(),s=0;;){if((0|s)>(0|o)){S=98;break e}if((-117440513&(u=0|i[(E=r+(l<<3)|0)+4>>2])|0)==(0|c)&&(0|i[E>>2])==(0|n)){S=93;break}if((0|i[(E=r+((l=(l+1|0)%(0|o)|0)<<3)|0)>>2])==(0|n)&&(0|i[E+4>>2])==(0|c))break;s=s+1|0}if(93==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;i[(E=t+(a<<3)|0)>>2]=h,i[E+4>>2]=A,a=a+1|0}}while(0);if((0|(e=e+1|0))>=(0|o)){o=f;break t}h=0|i[(A=M+(e<<3)|0)>>2],A=0|i[A+4>>2]}}else a=0,o=f}else a=0,o=0}while(0);if(Rt(0|r,0,0|_),Ct(0|M,0|g,o<<3|0),vt(g),!o)break;t=t+(a<<3)|0}return 41==(0|S)?(vt(M),vt(r),0|(E=-1)):51==(0|S)?(vt(M),vt(r),0|(E=-2)):58==(0|S)?(vt(M),vt(r),0|(E=-3)):98==(0|S)?(vt(g),vt(M),vt(r),0|(E=-1)):(99==(0|S)&&Ct(0|t,0|M,o<<3|0),vt(M),vt(r),0|(E=0))},_destroyLinkedPolygon:function(e){var t=0,n=0,r=0,o=0;if(e|=0)for(r=1;;){if(0|(t=0|i[e>>2]))do{if(0|(n=0|i[t>>2]))do{o=n,n=0|i[n+16>>2],vt(o)}while(0!=(0|n));o=t,t=0|i[t+8>>2],vt(o)}while(0!=(0|t));if(t=e,e=0|i[e+8>>2],r||vt(t),!e)break;r=0}},_edgeLengthKm:function(e){return+ +o[20752+((e|=0)<<3)>>3]},_edgeLengthM:function(e){return+ +o[20880+((e|=0)<<3)>>3]},_emscripten_replace_memory:function(e){return r=new Int8Array(e),i=new Int32Array(e),o=new Float64Array(e),n=e,!0},_exactEdgeLengthKm:function(e,t){var n,r,a=0,s=0,A=0,c=0,d=0,f=0;if(r=P,P=P+176|0,Ye(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(A=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],A=+o[n+16>>3];do{d=s,s=+o[n+8+((e=e+1|0)<<4)>>3],f=+h(.5*(s-d)),c=A,A=+o[n+8+(e<<4)+8>>3],c=f*f+(c=+h(.5*(A-c)))*(+u(+d)*+u(+s)*c),a+=2*+g(+ +l(+c),+ +l(+(1-c)))}while((0|e)!=(0|t));return P=r,+(f=6371.007180918475*a)},_exactEdgeLengthM:function(e,t){var n,r,a=0,s=0,A=0,c=0,d=0,f=0;if(r=P,P=P+176|0,Ye(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(A=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],A=+o[n+16>>3];do{d=s,s=+o[n+8+((e=e+1|0)<<4)>>3],f=+h(.5*(s-d)),c=A,A=+o[n+8+(e<<4)+8>>3],c=f*f+(c=+h(.5*(A-c)))*(+u(+d)*+u(+s)*c),a+=2*+g(+ +l(+c),+ +l(+(1-c)))}while((0|e)!=(0|t));return P=r,+(f=6371.007180918475*a*1e3)},_exactEdgeLengthRads:function(e,t){var n,r,a=0,s=0,A=0,c=0,d=0,f=0;if(r=P,P=P+176|0,Ye(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(A=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],A=+o[n+16>>3];do{d=s,s=+o[n+8+((e=e+1|0)<<4)>>3],f=+h(.5*(s-d)),c=A,A=+o[n+8+(e<<4)+8>>3],c=f*f+(c=+h(.5*(A-c)))*(+u(+s)*+u(+d)*c),a+=2*+g(+ +l(+c),+ +l(+(1-c)))}while((0|e)<(0|t));return P=r,+a},_experimentalH3ToLocalIj:function(e,t,n,r,i){var o,a;return i|=0,a=P,P=P+16|0,(e=0|$e(e|=0,t|=0,n|=0,r|=0,o=a))||(de(o,i),e=0),P=a,0|e},_experimentalLocalIjToH3:function(e,t,n,r){var i,o;return e|=0,t|=0,r|=0,i=P,P=P+16|0,fe(n|=0,o=i),r=0|et(e,t,o,r),P=i,0|r},_free:vt,_geoToH3:Fe,_getDestinationH3IndexFromUnidirectionalEdge:function(e,t){e|=0;var n,r,o=0;return n=P,P=P+16|0,o=n,!0&268435456==(2013265920&(t|=0)|0)?(r=0|Mt(0|e,0|t,56),w(),i[o>>2]=0,o=0|I(e,-2130706433&t|134217728,7&r,o),t=0|w(),_(0|t),P=n,0|o):(o=0,_(0|(t=0)),P=n,0|o)},_getH3IndexesFromUnidirectionalEdge:function(e,t,n){e|=0;var r,o,a,s,A=0;a=P,P=P+16|0,r=a,s=!0&268435456==(2013265920&(t|=0)|0),o=-2130706433&t|134217728,i[(A=n|=0)>>2]=s?e:0,i[A+4>>2]=s?o:0,s?(t=0|Mt(0|e,0|t,56),w(),i[r>>2]=0,e=0|I(e,o,7&t,r),t=0|w()):(e=0,t=0),i[(A=n+8|0)>>2]=e,i[A+4>>2]=t,P=a},_getH3UnidirectionalEdge:function(e,t,n,r){var o,a,s=0,A=0,l=0,c=0,u=0;if(a=P,P=P+16|0,o=a,!(0|Qe(e|=0,t|=0,n|=0,r|=0)))return c=0,_(0|(l=0)),P=a,0|c;for(l=-2130706433&t,s=(s=0==(0|Ie(e,t)))?1:2;i[o>>2]=0,A=s+1|0,!((0|(u=0|I(e,t,s,o)))==(0|n)&(0|w())==(0|r));){if(!(A>>>0<7)){s=0,e=0,c=6;break}s=A}return 6==(0|c)?(_(0|s),P=a,0|e):(u=0|St(0|s,0,56),c=0|l|w()|268435456,u|=e,_(0|c),P=a,0|u)},_getH3UnidirectionalEdgeBoundary:Ye,_getH3UnidirectionalEdgesFromHexagon:function(e,t,n){n|=0;var r,o=0;r=0==(0|Ie(e|=0,t|=0)),t&=-2130706433,i[(o=n)>>2]=r?e:0,i[o+4>>2]=r?285212672|t:0,i[(o=n+8|0)>>2]=e,i[o+4>>2]=301989888|t,i[(o=n+16|0)>>2]=e,i[o+4>>2]=318767104|t,i[(o=n+24|0)>>2]=e,i[o+4>>2]=335544320|t,i[(o=n+32|0)>>2]=e,i[o+4>>2]=352321536|t,i[(n=n+40|0)>>2]=e,i[n+4>>2]=369098752|t},_getOriginH3IndexFromUnidirectionalEdge:function(e,t){var n;return e|=0,_(0|((n=!0&268435456==(2013265920&(t|=0)|0))?-2130706433&t|134217728:0)),0|(n?e:0)},_getPentagonIndexes:We,_getRes0Indexes:function(e){e|=0;var t=0,n=0,r=0;t=0;do{St(0|t,0,45),r=134225919|w(),i[(n=e+(t<<3)|0)>>2]=-1,i[n+4>>2]=r,t=t+1|0}while(122!=(0|t))},_h3Distance:function(e,t,n,r){var i,o,a;return n|=0,r|=0,a=P,P=P+32|0,o=a,e=0==(0|$e(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|$e(e,t,n,r,o))?0|he(i,o):-1,P=a,0|e},_h3GetBaseCell:Pe,_h3GetFaces:function e(t,n,r){r|=0;var o,a=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0;o=P,P=P+128|0,h=o+112|0,A=o+96|0,d=o,s=0|Mt(0|(t|=0),0|(n|=0),52),w(),c=15&s,i[h>>2]=c,l=0|Mt(0|t,0|n,45),w(),l&=127;e:do{if(0|B(l)){if(0|c)for(a=1;;){if(!(0==((u=0|St(7,0,3*(15-a|0)|0))&t|0)&0==((0|w())&n|0))){s=0;break e}if(!(a>>>0<c>>>0))break;a=a+1|0}if(!(1&s))return u=0|St(c+1|0,0,52),d=0|w()|-15728641&n,e((u|t)&~(h=0|St(7,0,3*(14-c|0)|0)),d&~(0|w()),r),void(P=o);s=1}else s=0}while(0);Ge(t,n,A),s?(be(A,h,d),u=5):(Se(A,h,d),u=6);e:do{if(0|B(l))if(c)for(a=1;;){if(!(0==((l=0|St(7,0,3*(15-a|0)|0))&t|0)&0==((0|w())&n|0))){a=8;break e}if(!(a>>>0<c>>>0)){a=20;break}a=a+1|0}else a=20;else a=8}while(0);if(Rt(0|r,-1,0|a),s){s=0;do{for(we(A=d+(s<<4)|0,0|i[h>>2]),A=0|i[A>>2],a=0;!(-1==(0|(c=0|i[(l=r+(a<<2)|0)>>2]))|(0|c)==(0|A));)a=a+1|0;i[l>>2]=A,s=s+1|0}while((0|s)!=(0|u))}else{s=0;do{for(_e(A=d+(s<<4)|0,0|i[h>>2],0,1),A=0|i[A>>2],a=0;!(-1==(0|(c=0|i[(l=r+(a<<2)|0)>>2]))|(0|c)==(0|A));)a=a+1|0;i[l>>2]=A,s=s+1|0}while((0|s)!=(0|u))}P=o},_h3GetResolution:function(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),52),w(),15&t|0},_h3IndexesAreNeighbors:Qe,_h3IsPentagon:Ie,_h3IsResClassIII:function(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),52),w(),1&t|0},_h3IsValid:Le,_h3Line:function(e,t,n,r,o){n|=0,r|=0,o|=0;var a,s=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,w=0,M=0;if(a=P,P=P+48|0,l=a+12|0,w=a,0==(0|$e(e|=0,t|=0,e,t,s=a+24|0))&&0==(0|$e(e,t,n,r,l))){if((0|(_=0|he(s,l)))<0)return P=a,0|(w=_);for(i[s>>2]=0,i[s+4>>2]=0,i[s+8>>2]=0,i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,$e(e,t,e,t,s),$e(e,t,n,r,l),pe(s),pe(l),_?(m=+(0|_),b=s,n=d=0|i[s>>2],r=f=0|i[(y=s+4|0)>>2],s=p=0|i[(x=s+8|0)>>2],g=+((0|i[l>>2])-d|0)/m,v=+((0|i[l+4>>2])-f|0)/m,m=+((0|i[l+8>>2])-p|0)/m):(y=r=s+4|0,x=p=s+8|0,b=s,n=0|i[s>>2],r=0|i[r>>2],s=0|i[p>>2],g=0,v=0,m=0),i[w>>2]=n,i[(p=w+4|0)>>2]=r,i[(f=w+8|0)>>2]=s,d=0;;){M=g*(u=+(0|d))+ +(0|n),c=v*u+ +(0|i[y>>2]),u=m*u+ +(0|i[x>>2]),r=~~+Tt(+M),l=~~+Tt(+c),n=~~+Tt(+u),M=+A(+(+(0|r)-M)),c=+A(+(+(0|l)-c)),u=+A(+(+(0|n)-u));do{if(!(M>c&M>u)){if(h=0-r|0,c>u){s=h-n|0;break}s=l,n=h-l|0;break}r=0-(l+n)|0,s=l}while(0);if(i[w>>2]=r,i[p>>2]=s,i[f>>2]=n,me(w),et(e,t,w,o+(d<<3)|0),(0|d)==(0|_))break;d=d+1|0,n=0|i[b>>2]}return P=a,0|(w=0)}return P=a,0|(w=-1)},_h3LineSize:function(e,t,n,r){var i,o,a;return n|=0,r|=0,a=P,P=P+32|0,o=a,e=0==(0|$e(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|$e(e,t,n,r,o))?0|he(i,o):-1,P=a,(e>>>31^1)+e|0},_h3SetToLinkedGeo:function(e,t,n){n|=0;var r,o,a,s=0;if(a=P,P=P+32|0,r=a,function(e,t,n){e|=0,n|=0;var r,o,a=0,s=0,A=0,l=0,c=0;if(o=P,P=P+176|0,r=o,(0|(t|=0))<1)return lt(n,0,0),void(P=o);l=0|Mt(0|i[(l=e)>>2],0|i[l+4>>2],52),w(),lt(n,(0|t)>6?t:6,15&l),l=0;do{if(je(0|i[(a=e+(l<<3)|0)>>2],0|i[a+4>>2],r),(0|(a=0|i[r>>2]))>0){c=0;do{A=r+8+(c<<4)|0,(s=0|ft(n,a=r+8+(((0|(c=c+1|0))%(0|a)|0)<<4)|0,A))?ht(n,s):dt(n,A,a),a=0|i[r>>2]}while((0|c)<(0|a))}l=l+1|0}while((0|l)!=(0|t));P=o}(e|=0,t|=0,o=a+16|0),i[n>>2]=0,i[n+4>>2]=0,i[n+8>>2]=0,!(e=0|ut(o)))return Je(n),ct(o),void(P=a);do{t=0|Xe(n);do{Ze(t,e),s=e+16|0,i[r>>2]=i[s>>2],i[r+4>>2]=i[s+4>>2],i[r+8>>2]=i[s+8>>2],i[r+12>>2]=i[s+12>>2],ht(o,e),e=0|pt(o,r)}while(0!=(0|e));e=0|ut(o)}while(0!=(0|e));Je(n),ct(o),P=a},_h3ToCenterChild:function(e,t,n){n|=0;var r=0,i=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(e|=i=0|St(0|n,0,52),t=0|w()|-15728641&t,(0|r)<(0|n)))do{i=0|St(7,0,3*(14-r|0)|0),r=r+1|0,e&=~i,t&=~(0|w())}while((0|r)<(0|n))}else t=0,e=0;return _(0|t),0|e},_h3ToChildren:De,_h3ToGeo:Ve,_h3ToGeoBoundary:je,_h3ToParent:qe,_h3UnidirectionalEdgeIsValid:function(e,t){var n=0;if(!(!0&268435456==(2013265920&(t|=0)|0)))return 0|(n=0);switch(n=0|Mt(0|(e|=0),0|t,56),w(),7&n){case 0:case 7:return 0|(n=0)}return!0&16777216==(117440512&t|0)&0!=(0|Ie(e,n=-2130706433&t|134217728))?0|(n=0):0|(n=0|Le(e,n))},_hexAreaKm2:function(e){return+ +o[20496+((e|=0)<<3)>>3]},_hexAreaM2:function(e){return+ +o[20624+((e|=0)<<3)>>3]},_hexRing:function(e,t,n,r){e|=0,t|=0,r|=0;var o,a=0,s=0,A=0,l=0,c=0,u=0,h=0;if(o=P,P=P+16|0,h=o,!(n|=0))return i[(h=r)>>2]=e,i[h+4>>2]=t,P=o,0|(h=0);i[h>>2]=0;e:do{if(0|Ie(e,t))e=1;else{if(s=(0|n)>0){a=0,u=e;do{if(0==(0|(u=0|I(u,t,4,h)))&0==(0|(t=0|w()))){e=2;break e}if(a=a+1|0,0|Ie(u,t)){e=1;break e}}while((0|a)<(0|n));if(i[(c=r)>>2]=u,i[c+4>>2]=t,c=n+-1|0,s){s=0,A=1,a=u,e=t;do{if(0==(0|(a=0|I(a,e,2,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(A<<3)|0)>>2]=a,i[l+4>>2]=e,A=A+1|0,0|Ie(a,e)){e=1;break e}s=s+1|0}while((0|s)<(0|n));l=0,s=A;do{if(0==(0|(a=0|I(a,e,3,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(A=r+(s<<3)|0)>>2]=a,i[A+4>>2]=e,s=s+1|0,0|Ie(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));A=0;do{if(0==(0|(a=0|I(a,e,1,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=e,s=s+1|0,0|Ie(a,e)){e=1;break e}A=A+1|0}while((0|A)<(0|n));A=0;do{if(0==(0|(a=0|I(a,e,5,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=e,s=s+1|0,0|Ie(a,e)){e=1;break e}A=A+1|0}while((0|A)<(0|n));A=0;do{if(0==(0|(a=0|I(a,e,4,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=e,s=s+1|0,0|Ie(a,e)){e=1;break e}A=A+1|0}while((0|A)<(0|n));for(A=0;;){if(0==(0|(a=0|I(a,e,6,h)))&0==(0|(e=0|w()))){e=2;break e}if((0|A)!=(0|c)){if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=e,0|Ie(a,e)){e=1;break e}s=s+1|0}if((0|(A=A+1|0))>=(0|n)){A=u,s=t;break}}}else A=u,a=u,s=t,e=t}else i[(A=r)>>2]=e,i[A+4>>2]=t,A=e,a=e,s=t,e=t;e=1&((0|A)!=(0|a)|(0|s)!=(0|e))}}while(0);return P=o,0|(h=e)},_i64Subtract:xt,_kRing:L,_kRingDistances:function(e,t,n,r,i){var o;if(0|q(e|=0,t|=0,n|=0,r|=0,i|=0)){if(Rt(0|r,0,(o=1+(0|y(3*n|0,n+1|0))|0)<<3|0),0|i)return Rt(0|i,0,o<<2|0),void D(e,t,n,r,i,o,0);(i=0|yt(o,4))&&(D(e,t,n,r,i,o,0),vt(i))}},_llvm_minnum_f64:Et,_llvm_round_f64:Tt,_malloc:gt,_maxFaceCount:function(e,t){var n=0,r=0;if(r=0|Mt(0|(e|=0),0|(t|=0),45),w(),!(0|B(127&r)))return 0|(r=2);if(r=0|Mt(0|e,0|t,52),w(),!(r&=15))return 0|(r=5);for(n=1;;){if(!(0==((0|St(7,0,3*(15-n|0)|0))&e|0)&0==((0|w())&t|0))){n=2,e=6;break}if(!(n>>>0<r>>>0)){n=5,e=6;break}n=n+1|0}return 6==(0|e)?0|n:0},_maxH3ToChildrenSize:function(e,t,n){return n|=0,e=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(e&=15))<=(0|n)?0|(n=0|tt(7,n-e|0)):0|(n=0)},_maxKringSize:function(e){return 1+(0|y(3*(e|=0)|0,e+1|0))|0},_maxPolyfillSize:function(e,t){t|=0;var n,r=0,o=0,a=0,s=0,A=0;if(n=P,P=P+48|0,a=n+8|0,o=n,s=0|i[(A=e|=0)+4>>2],i[(r=o)>>2]=i[A>>2],i[r+4>>2]=s,rt(o,a),a=0|j(a,t),t=0|i[o>>2],(0|(o=0|i[e+8>>2]))<=0)return P=n,0|(A=(A=(s=(0|a)<(0|(A=t)))?A:a)+12|0);r=0|i[e+12>>2],e=0;do{t=(0|i[r+(e<<3)>>2])+t|0,e=e+1|0}while((0|e)<(0|o));return P=n,0|(A=(A=(A=(0|a)<(0|t))?t:a)+12|0)},_maxUncompactSize:function(e,t,n){e|=0,n|=0;var r=0,o=0,a=0,s=0;if((0|(t|=0))<=0)return 0|(n=0);if((0|n)>=16){for(r=0;;){if(!(0==(0|i[(s=e+(r<<3)|0)>>2])&0==(0|i[s+4>>2]))){r=-1,o=13;break}if((0|(r=r+1|0))>=(0|t)){r=0,o=13;break}}if(13==(0|o))return 0|r}r=0,s=0;e:for(;;){a=0|i[(o=e+(s<<3)|0)>>2],o=0|i[o+4>>2];do{if(!(0==(0|a)&0==(0|o))){if(o=0|Mt(0|a,0|o,52),w(),(0|(o&=15))>(0|n)){r=-1,o=13;break e}if((0|o)==(0|n)){r=r+1|0;break}r=(0|tt(7,n-o|0))+r|0;break}}while(0);if((0|(s=s+1|0))>=(0|t)){o=13;break}}return 13==(0|o)?0|r:0},_memcpy:Ct,_memset:Rt,_numHexagons:function(e){var t;return e=0|i[(t=21008+((e|=0)<<3)|0)>>2],_(0|i[t+4>>2]),0|e},_pentagonIndexCount:function(){return 12},_pointDistKm:Ce,_pointDistM:function(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+h(.5*(r-n)))*i+(a=+h(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+u(+r)*+u(+n)*a),2*+g(+ +l(+a),+ +l(+(1-a)))*6371.007180918475*1e3},_pointDistRads:function(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+h(.5*(r-n)))*i+(a=+h(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+u(+r)*+u(+n)*a),2*+g(+ +l(+a),+ +l(+(1-a)))},_polyfill:function(e,t,n){var r,o=0,a=0,s=0,A=0,l=0;if(r=P,P=P+48|0,o=r+8|0,a=r,0|function(e,t,n){t|=0,n|=0;var r=0,o=0,a=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,S=0,E=0,T=0,C=0,R=0,L=0,I=0,B=0,k=0,N=0,z=0;z=P,P=P+112|0,I=z+80|0,l=z+72|0,B=z,k=z+56|0,(N=0|gt(32+(i[(c=(e=e|0)+8|0)>>2]<<5)|0))||M(22848,22448,800,22456);if(it(e,N),r=0|i[(a=e)+4>>2],i[(A=l)>>2]=i[a>>2],i[A+4>>2]=r,rt(l,I),A=0|j(I,t),r=0|i[l>>2],(0|(a=0|i[c>>2]))>0){s=0|i[e+12>>2],o=0;do{r=(0|i[s+(o<<3)>>2])+r|0,o=o+1|0}while((0|o)!=(0|a))}if(o=0|yt(L=(A=(0|A)<(0|r)?r:A)+12|0,8),u=0|yt(L,8),i[I>>2]=0,R=0|i[(C=e)+4>>2],i[(r=l)>>2]=i[C>>2],i[r+4>>2]=R,0|(r=0|O(l,L,t,I,o,u)))return vt(o),vt(u),vt(N),P=z,0|(N=r);e:do{if((0|i[c>>2])>0){for(a=e+12|0,r=0;s=0|O((0|i[a>>2])+(r<<3)|0,L,t,I,o,u),r=r+1|0,!(0|s);)if((0|r)>=(0|i[c>>2]))break e;return vt(o),vt(u),vt(N),P=z,0|(N=s)}}while(0);(0|A)>-12&&Rt(0|u,0,((0|L)>1?L:1)<<3|0);e:do{if((0|i[I>>2])>0){R=((0|L)<0)<<31>>31,b=o,_=u,S=o,E=o,T=u,C=o,r=o,g=o,v=u,y=u,x=u,o=u;t:for(;;){for(m=0|i[I>>2],f=0,p=0,a=0;;){A=(s=B)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|A));if(0|q(l=0|i[(t=b+(f<<3)|0)>>2],t=0|i[t+4>>2],1,B,0)){A=(s=B)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|A));0|(s=0|yt(7,4))&&(D(l,t,1,B,s,7,0),vt(s))}d=0;do{u=0|i[(h=B+(d<<3)|0)>>2],h=0|i[h+4>>2];n:do{if(!(0==(0|u)&0==(0|h))){if(l=0|wt(0|u,0|h,0|L,0|R),w(),!(0==(0|(t=0|i[(A=s=n+(l<<3)|0)>>2]))&0==(0|(A=0|i[A+4>>2]))))for(c=0;;){if((0|c)>(0|L))break t;if((0|t)==(0|u)&(0|A)==(0|h))break n;if(0==(0|(t=0|i[(A=s=n+((l=(l+1|0)%(0|L)|0)<<3)|0)>>2]))&0==(0|(A=0|i[A+4>>2])))break;c=c+1|0}0==(0|u)&0==(0|h)||(Ve(u,h,k),0|ot(e,N,k)&&(i[(c=s)>>2]=u,i[c+4>>2]=h,i[(c=_+(a<<3)|0)>>2]=u,i[c+4>>2]=h,a=a+1|0))}}while(0);d=d+1|0}while(d>>>0<7);if((0|(p=p+1|0))>=(0|m))break;f=f+1|0}if((0|m)>0&&Rt(0|S,0,m<<3|0),i[I>>2]=a,!((0|a)>0))break e;u=o,h=x,d=C,f=y,p=v,m=_,o=g,x=r,y=E,v=S,g=u,r=h,C=T,T=d,E=f,S=p,_=b,b=m}return vt(E),vt(T),vt(N),P=z,0|(N=-1)}r=u}while(0);return vt(N),vt(o),vt(r),P=z,0|(N=0)}(e|=0,t|=0,n|=0)){if(s=0|i[(l=e)+4>>2],i[(A=a)>>2]=i[l>>2],i[A+4>>2]=s,rt(a,o),A=0|j(o,t),t=0|i[a>>2],(0|(s=0|i[e+8>>2]))>0){a=0|i[e+12>>2],o=0;do{t=(0|i[a+(o<<3)>>2])+t|0,o=o+1|0}while((0|o)!=(0|s))}(0|(t=(0|A)<(0|t)?t:A))<=-12||Rt(0|n,0,8+(((0|(l=t+11|0))>0?l:0)<<3)|0),P=r}else P=r},_res0IndexCount:function(){return 122},_round:Pt,_sbrk:Lt,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(e,t,n,r,o){e|=0,n|=0,r|=0,o|=0;var a=0,s=0,A=0,l=0,c=0,u=0;if((0|(t|=0))<=0)return 0|(o=0);if((0|o)>=16){for(a=0;;){if(!(0==(0|i[(u=e+(a<<3)|0)>>2])&0==(0|i[u+4>>2]))){a=14;break}if((0|(a=a+1|0))>=(0|t)){s=0,a=16;break}}if(14==(0|a))return 0|((0|r)>0?-2:-1);if(16==(0|a))return 0|s}a=0,u=0;e:for(;;){s=0|i[(A=c=e+(u<<3)|0)>>2],A=0|i[A+4>>2];do{if(!(0==(0|s)&0==(0|A))){if((0|a)>=(0|r)){s=-1,a=16;break e}if(l=0|Mt(0|s,0|A,52),w(),(0|(l&=15))>(0|o)){s=-2,a=16;break e}if((0|l)==(0|o)){i[(c=n+(a<<3)|0)>>2]=s,i[c+4>>2]=A,a=a+1|0;break}if((0|(s=(0|tt(7,o-l|0))+a|0))>(0|r)){s=-1,a=16;break e}De(0|i[c>>2],0|i[c+4>>2],o,n+(a<<3)|0),a=s}}while(0);if((0|(u=u+1|0))>=(0|t)){s=0,a=16;break}}return 16==(0|a)?0|s:0},establishStackSpace:function(e,t){P=e|=0},stackAlloc:function(e){var t;return t=P,P=(P=P+(e|=0)|0)+15&-16,0|t},stackRestore:function(e){P=e|=0},stackSave:function(){return 0|P}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:ve,b:function(e){g=e},c:v,d:function(e,t,n,r){ve("Assertion failed: "+L(e)+", at: "+[t?L(t):"unknown filename",n,r?L(r):"unknown function"])},e:function(e){return n.___errno_location&&(T[n.___errno_location()>>2]=e),e},f:ee,g:function(e,t,n){S.set(S.subarray(t,t+n),e)},h:function(e){var t=ee(),n=16777216,r=2130706432;if(e>r)return!1;for(var i=Math.max(t,16777216);i<e;)i=i<=536870912?q(2*i,n):Math.min(q((3*i+2147483648)/4,n),r);return!!te(i)},i:function(e){ve("OOM")},j:J,k:K,l:te,m:$,n:function(){var e=$();return n.extraStackTrace&&(e+="\n"+n.extraStackTrace()),K(e)},o:24032,p:24016},w);n.___uremdi3=oe.___uremdi3,n._bitshift64Lshr=oe._bitshift64Lshr,n._bitshift64Shl=oe._bitshift64Shl,n._calloc=oe._calloc,n._cellAreaKm2=oe._cellAreaKm2,n._cellAreaM2=oe._cellAreaM2,n._cellAreaRads2=oe._cellAreaRads2,n._compact=oe._compact,n._destroyLinkedPolygon=oe._destroyLinkedPolygon,n._edgeLengthKm=oe._edgeLengthKm,n._edgeLengthM=oe._edgeLengthM;var ae=n._emscripten_replace_memory=oe._emscripten_replace_memory;n._exactEdgeLengthKm=oe._exactEdgeLengthKm,n._exactEdgeLengthM=oe._exactEdgeLengthM,n._exactEdgeLengthRads=oe._exactEdgeLengthRads,n._experimentalH3ToLocalIj=oe._experimentalH3ToLocalIj,n._experimentalLocalIjToH3=oe._experimentalLocalIjToH3,n._free=oe._free,n._geoToH3=oe._geoToH3,n._getDestinationH3IndexFromUnidirectionalEdge=oe._getDestinationH3IndexFromUnidirectionalEdge,n._getH3IndexesFromUnidirectionalEdge=oe._getH3IndexesFromUnidirectionalEdge,n._getH3UnidirectionalEdge=oe._getH3UnidirectionalEdge,n._getH3UnidirectionalEdgeBoundary=oe._getH3UnidirectionalEdgeBoundary,n._getH3UnidirectionalEdgesFromHexagon=oe._getH3UnidirectionalEdgesFromHexagon,n._getOriginH3IndexFromUnidirectionalEdge=oe._getOriginH3IndexFromUnidirectionalEdge,n._getPentagonIndexes=oe._getPentagonIndexes,n._getRes0Indexes=oe._getRes0Indexes,n._h3Distance=oe._h3Distance,n._h3GetBaseCell=oe._h3GetBaseCell,n._h3GetFaces=oe._h3GetFaces,n._h3GetResolution=oe._h3GetResolution,n._h3IndexesAreNeighbors=oe._h3IndexesAreNeighbors,n._h3IsPentagon=oe._h3IsPentagon,n._h3IsResClassIII=oe._h3IsResClassIII,n._h3IsValid=oe._h3IsValid,n._h3Line=oe._h3Line,n._h3LineSize=oe._h3LineSize,n._h3SetToLinkedGeo=oe._h3SetToLinkedGeo,n._h3ToCenterChild=oe._h3ToCenterChild,n._h3ToChildren=oe._h3ToChildren,n._h3ToGeo=oe._h3ToGeo,n._h3ToGeoBoundary=oe._h3ToGeoBoundary,n._h3ToParent=oe._h3ToParent,n._h3UnidirectionalEdgeIsValid=oe._h3UnidirectionalEdgeIsValid,n._hexAreaKm2=oe._hexAreaKm2,n._hexAreaM2=oe._hexAreaM2,n._hexRing=oe._hexRing,n._i64Subtract=oe._i64Subtract,n._kRing=oe._kRing,n._kRingDistances=oe._kRingDistances,n._llvm_minnum_f64=oe._llvm_minnum_f64,n._llvm_round_f64=oe._llvm_round_f64,n._malloc=oe._malloc,n._maxFaceCount=oe._maxFaceCount,n._maxH3ToChildrenSize=oe._maxH3ToChildrenSize,n._maxKringSize=oe._maxKringSize,n._maxPolyfillSize=oe._maxPolyfillSize,n._maxUncompactSize=oe._maxUncompactSize,n._memcpy=oe._memcpy,n._memset=oe._memset,n._numHexagons=oe._numHexagons,n._pentagonIndexCount=oe._pentagonIndexCount,n._pointDistKm=oe._pointDistKm,n._pointDistM=oe._pointDistM,n._pointDistRads=oe._pointDistRads,n._polyfill=oe._polyfill,n._res0IndexCount=oe._res0IndexCount,n._round=oe._round,n._sbrk=oe._sbrk,n._sizeOfCoordIJ=oe._sizeOfCoordIJ,n._sizeOfGeoBoundary=oe._sizeOfGeoBoundary,n._sizeOfGeoCoord=oe._sizeOfGeoCoord,n._sizeOfGeoPolygon=oe._sizeOfGeoPolygon,n._sizeOfGeofence=oe._sizeOfGeofence,n._sizeOfH3Index=oe._sizeOfH3Index,n._sizeOfLinkedGeoPolygon=oe._sizeOfLinkedGeoPolygon,n._uncompact=oe._uncompact,n.establishStackSpace=oe.establishStackSpace;var se,Ae,le=n.stackAlloc=oe.stackAlloc,ce=n.stackRestore=oe.stackRestore,ue=n.stackSave=oe.stackSave;if(n.asm=oe,n.cwrap=function(e,t,n,r){var i=(n=n||[]).every((function(e){return"number"===e}));return"string"!==t&&i&&!r?b(e):function(){return _(e,t,n,arguments)}},n.setValue=function(e,t,n,r){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":M[e>>0]=t;break;case"i16":E[e>>1]=t;break;case"i32":T[e>>2]=t;break;case"i64":Q=[t>>>0,(W=t,+U(W)>=1?W>0?(0|G(+H(W/4294967296),4294967295))>>>0:~~+F((W-+(~~W>>>0))/4294967296)>>>0:0)],T[e>>2]=Q[0],T[e+4>>2]=Q[1];break;case"float":C[e>>2]=t;break;case"double":R[e>>3]=t;break;default:ve("invalid type for setValue: "+n)}},n.getValue=function(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return M[e>>0];case"i16":return E[e>>1];case"i32":case"i64":return T[e>>2];case"float":return C[e>>2];case"double":return R[e>>3];default:ve("invalid type for getValue: "+t)}return null},n.getTempRet0=v,Y)if(Z(Y)||(se=Y,Y=n.locateFile?n.locateFile(se,f):f+se),a||A){var he=u(Y);S.set(he,8)}else{V++,n.monitorRunDependencies&&n.monitorRunDependencies(V);var de=function(e){e.byteLength&&(e=new Uint8Array(e)),S.set(e,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(e){if(V--,n.monitorRunDependencies&&n.monitorRunDependencies(V),0==V&&j){var t=j;j=null,t()}}()},fe=function(){c(Y,de,(function(){throw"could not load memory initializer "+Y}))},pe=ie(Y);if(pe)de(pe.buffer);else if(n.memoryInitializerRequest){var me=function(){var e=n.memoryInitializerRequest,t=e.response;if(200!==e.status&&0!==e.status){var r=ie(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+e.status+", retrying "+Y),void fe();t=r.buffer}de(t)};n.memoryInitializerRequest.response?setTimeout(me,0):n.memoryInitializerRequest.addEventListener("load",me)}else fe()}function ge(e){function t(){Ae||(Ae=!0,y||(O(k),O(N),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),z.unshift(e);var e;O(z)}()))}V>0||(!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),B.unshift(e);var e;O(B)}(),V>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}function ve(e){throw n.onAbort&&n.onAbort(e),p(e+=""),m(e),y=!0,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}if(j=function e(){Ae||ge(),Ae||(j=e)},n.run=ge,n.abort=ve,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return ge(),e}("object"==typeof Rm?Rm:{}),Pm="number",Lm={};
/*
* Copyright 2018-2019 Uber Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/[["sizeOfH3Index",Pm],["sizeOfGeoCoord",Pm],["sizeOfGeoBoundary",Pm],["sizeOfGeoPolygon",Pm],["sizeOfGeofence",Pm],["sizeOfLinkedGeoPolygon",Pm],["sizeOfCoordIJ",Pm],["h3IsValid",Pm,[Pm,Pm]],["geoToH3",Pm,[Pm,Pm,Pm]],["h3ToGeo",null,[Pm,Pm,Pm]],["h3ToGeoBoundary",null,[Pm,Pm,Pm]],["maxKringSize",Pm,[Pm]],["kRing",null,[Pm,Pm,Pm,Pm]],["kRingDistances",null,[Pm,Pm,Pm,Pm,Pm]],["hexRing",null,[Pm,Pm,Pm,Pm]],["maxPolyfillSize",Pm,[Pm,Pm]],["polyfill",null,[Pm,Pm,Pm]],["h3SetToLinkedGeo",null,[Pm,Pm,Pm]],["destroyLinkedPolygon",null,[Pm]],["compact",Pm,[Pm,Pm,Pm]],["uncompact",Pm,[Pm,Pm,Pm,Pm,Pm]],["maxUncompactSize",Pm,[Pm,Pm,Pm]],["h3IsPentagon",Pm,[Pm,Pm]],["h3IsResClassIII",Pm,[Pm,Pm]],["h3GetBaseCell",Pm,[Pm,Pm]],["h3GetResolution",Pm,[Pm,Pm]],["maxFaceCount",Pm,[Pm,Pm]],["h3GetFaces",null,[Pm,Pm,Pm]],["h3ToParent",Pm,[Pm,Pm,Pm]],["h3ToChildren",null,[Pm,Pm,Pm,Pm]],["h3ToCenterChild",Pm,[Pm,Pm,Pm]],["maxH3ToChildrenSize",Pm,[Pm,Pm,Pm]],["h3IndexesAreNeighbors",Pm,[Pm,Pm,Pm,Pm]],["getH3UnidirectionalEdge",Pm,[Pm,Pm,Pm,Pm]],["getOriginH3IndexFromUnidirectionalEdge",Pm,[Pm,Pm]],["getDestinationH3IndexFromUnidirectionalEdge",Pm,[Pm,Pm]],["h3UnidirectionalEdgeIsValid",Pm,[Pm,Pm]],["getH3IndexesFromUnidirectionalEdge",null,[Pm,Pm,Pm]],["getH3UnidirectionalEdgesFromHexagon",null,[Pm,Pm,Pm]],["getH3UnidirectionalEdgeBoundary",null,[Pm,Pm,Pm]],["h3Distance",Pm,[Pm,Pm,Pm,Pm]],["h3Line",Pm,[Pm,Pm,Pm,Pm,Pm]],["h3LineSize",Pm,[Pm,Pm,Pm,Pm]],["experimentalH3ToLocalIj",Pm,[Pm,Pm,Pm,Pm,Pm]],["experimentalLocalIjToH3",Pm,[Pm,Pm,Pm,Pm]],["hexAreaM2",Pm,[Pm]],["hexAreaKm2",Pm,[Pm]],["edgeLengthM",Pm,[Pm]],["edgeLengthKm",Pm,[Pm]],["pointDistM",Pm,[Pm,Pm]],["pointDistKm",Pm,[Pm,Pm]],["pointDistRads",Pm,[Pm,Pm]],["cellAreaM2",Pm,[Pm,Pm]],["cellAreaKm2",Pm,[Pm,Pm]],["cellAreaRads2",Pm,[Pm,Pm]],["exactEdgeLengthM",Pm,[Pm,Pm]],["exactEdgeLengthKm",Pm,[Pm,Pm]],["exactEdgeLengthRads",Pm,[Pm,Pm]],["numHexagons",Pm,[Pm]],["getRes0Indexes",null,[Pm]],["res0IndexCount",Pm],["getPentagonIndexes",null,[Pm,Pm]],["pentagonIndexCount",Pm]].forEach((function(e){Lm[e[0]]=Rm.cwrap.apply(Rm,e)}));var qm=16,Dm=Lm.sizeOfH3Index(),Im=Lm.sizeOfGeoCoord(),Om=Lm.sizeOfGeoBoundary(),Bm=Lm.sizeOfGeoPolygon(),km=Lm.sizeOfGeofence();Lm.sizeOfLinkedGeoPolygon(),Lm.sizeOfCoordIJ();var Nm=/[^0-9a-fA-F]/;function zm(e){if(Array.isArray(e)&&2===e.length&&Number.isInteger(e[0])&&Number.isInteger(e[1]))return e;if("string"!=typeof e||Nm.test(e))return[0,0];var t=parseInt(e.substring(0,e.length-8),qm);return[parseInt(e.substring(e.length-8),qm),t]}function Um(e){if(e>=0)return e.toString(qm);var t=Hm(8,(e&=2147483647).toString(qm));return t=(parseInt(t[0],qm)+8).toString(qm)+t.substring(1)}function Fm(e,t){return Um(t)+Hm(8,Um(e))}function Hm(e,t){for(var n=e-t.length,r="",i=0;i<n;i++)r+="0";return r+=t}function Gm(e,t,n){for(var r=e.length,i=Rm._calloc(r,Im),o=n?1:0,a=n?0:1,s=0;s<2*r;s+=2)Rm.HEAPF64.set([e[s/2][o],e[s/2][a]].map($m),i/8+s);return Rm.HEAPU32.set([r,i],t/4),t}function Vm(e){var t=function(e){return[e,Rm.getTempRet0()]}(e),n=t[0],r=t[1];return r?Fm(n,r):null}function jm(e,t){void 0===t&&(t=0);var n=Rm.getValue(e+4*t*2,"i32"),r=Rm.getValue(e+4*(2*t+1),"i32");return r?Fm(n,r):null}function Wm(e){return 180*Rm.getValue(e,"double")/Math.PI}function Qm(e){return[Wm(e),Wm(e+8)]}function Ym(e){return[Wm(e+8),Wm(e)]}function Xm(e,t,n){var r=Rm._malloc(Im);Rm.HEAPF64.set([e,t].map($m),r/8);var i=Vm(Lm.geoToH3(r,n));return Rm._free(r),i}function Zm(e){var t=Rm._malloc(Im),n=zm(e),r=n[0],i=n[1];Lm.h3ToGeo(r,i,t);var o=Qm(t);return Rm._free(t),o}function Jm(e,t){var n=Rm._malloc(Om),r=zm(e),i=r[0],o=r[1];Lm.h3ToGeoBoundary(i,o,n);var a=function(e,t,n){for(var r=Rm.getValue(e,"i32"),i=e+8,o=[],a=t?Ym:Qm,s=0;s<2*r;s+=2)o.push(a(i+8*s));return n&&o.push(o[0]),o}(n,t,t);return Rm._free(n),a}function Km(e,t,n){if(function(e){if("number"!=typeof e||e<0||e>15||Math.floor(e)!==e)throw new Error("Invalid resolution: "+e)}(t),n=Boolean(n),0===e.length||0===e[0].length)return[];"number"==typeof e[0][0]&&(e=[e]);var r=function(e,t){var n,r=e.length-1,i=Rm._calloc(Bm),o=0+km,a=o+4;if(Gm(e[0],i+0,t),r>0){n=Rm._calloc(r,km);for(var s=0;s<r;s++)Gm(e[s+1],n+km*s,t)}return Rm.setValue(i+o,r,"i32"),Rm.setValue(i+a,n,"i32"),i}(e,n),i=Lm.maxPolyfillSize(r,t),o=Rm._calloc(i,Dm);Lm.polyfill(r,t,o);var a=function(e,t){for(var n=[],r=0;r<t;r++){var i=jm(e,r);null!==i&&n.push(i)}return n}(o,i);return Rm._free(o),function(e){var t=0+km,n=t+4;Rm._free(Rm.getValue(e+0+4,"i8*"));var r=Rm.getValue(e+t,"i32");if(r>0){for(var i=Rm.getValue(e+n,"i32"),o=0;o<r;o++)Rm._free(Rm.getValue(i+km*o+4,"i8*"));Rm._free(i)}Rm._free(e)}(r),a}function $m(e){return e*Math.PI/180}const eg=window.THREE?window.THREE:{Box3:ze,BufferGeometry:dn,Float32BufferAttribute:on,InstancedBufferGeometry:MA,InstancedInterleavedBuffer:GA,InterleavedBufferAttribute:Vo,Sphere:it,Vector3:Be,WireframeGeometry:class extends dn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new Be,i=new Be;if(null!==e.index){const o=e.attributes.position,a=e.index;let s=e.groups;0===s.length&&(s=[{start:0,count:a.count,materialIndex:0}]);for(let e=0,A=s.length;e<A;++e){const A=s[e],l=A.start;for(let e=l,s=l+A.count;e<s;e+=3)for(let s=0;s<3;s++){const A=a.getX(e+s),l=a.getX(e+(s+1)%3);r.fromBufferAttribute(o,A),i.fromBufferAttribute(o,l),!0===Bs(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const o=e.attributes.position;for(let e=0,a=o.count/3;e<a;e++)for(let a=0;a<3;a++){const s=3*e+a,A=3*e+(a+1)%3;r.fromBufferAttribute(o,s),i.fromBufferAttribute(o,A),!0===Bs(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new on(t,3))}}}};var tg=(new eg.BufferGeometry).setAttribute?"setAttribute":"addAttribute";const ng=new eg.Box3,rg=new eg.Vector3;class ig extends eg.InstancedBufferGeometry{constructor(){super(),this.type="LineSegmentsGeometry";this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this[tg]("position",new eg.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this[tg]("uv",new eg.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new eg.InstancedInterleavedBuffer(t,6,1);return this[tg]("instanceStart",new eg.InterleavedBufferAttribute(n,3,0)),this[tg]("instanceEnd",new eg.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new eg.InstancedInterleavedBuffer(t,6,1);return this[tg]("instanceColorStart",new eg.InterleavedBufferAttribute(n,3,0)),this[tg]("instanceColorEnd",new eg.InterleavedBufferAttribute(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new eg.WireframeGeometry(e.geometry)),this}fromLineSegments(e){const t=e.geometry;if(!t.isGeometry)return t.isBufferGeometry&&this.setPositions(t.attributes.position.array),this;console.error("LineSegmentsGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new eg.Box3);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),ng.setFromBufferAttribute(t),this.boundingBox.union(ng))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new eg.Sphere),null===this.boundingBox&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let i=0,o=e.count;i<o;i++)rg.fromBufferAttribute(e,i),r=Math.max(r,n.distanceToSquared(rg)),rg.fromBufferAttribute(t,i),r=Math.max(r,n.distanceToSquared(rg));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}ig.prototype.isLineSegmentsGeometry=!0;const og=window.THREE?window.THREE:{ShaderLib:nr,ShaderMaterial:kn,UniformsLib:tr,UniformsUtils:Bn,Vector2:me};og.UniformsLib.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new og.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},dashOffset:{value:0},gapSize:{value:1}},og.ShaderLib.line={uniforms:og.UniformsUtils.merge([og.UniformsLib.common,og.UniformsLib.fog,og.UniformsLib.line]),vertexShader:"\n\t\t#include <common>\n\t\t#include <color_pars_vertex>\n\t\t#include <fog_pars_vertex>\n\t\t#include <logdepthbuf_pars_vertex>\n\t\t#include <clipping_planes_pars_vertex>\n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 worldPos;\n\t\tvarying vec3 worldStart;\n\t\tvarying vec3 worldEnd;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\tworldStart = start.xyz;\n\t\t\tworldEnd = end.xyz;\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec3 ndcStart = clipStart.xyz / clipStart.w;\n\t\t\tvec3 ndcEnd = clipEnd.xyz / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd.xy - ndcStart.xy;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t// get the offset direction as perpendicular to the view vector\n\t\t\t\tvec3 worldDir = normalize( end.xyz - start.xyz );\n\t\t\t\tvec3 offset;\n\t\t\t\tif ( position.y < 0.5 ) {\n\n\t\t\t\t\toffset = normalize( cross( start.xyz, worldDir ) );\n\n\t\t\t\t} else {\n\n\t\t\t\t\toffset = normalize( cross( end.xyz, worldDir ) );\n\n\t\t\t\t}\n\n\t\t\t\t// sign flip\n\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\tfloat forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );\n\n\t\t\t\t// don't extend the line if we're rendering dashes because we\n\t\t\t\t// won't be rendering the endcaps\n\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t// extend the line bounds to encompass endcaps\n\t\t\t\t\tstart.xyz += - worldDir * linewidth * 0.5;\n\t\t\t\t\tend.xyz += worldDir * linewidth * 0.5;\n\n\t\t\t\t\t// shift the position of the quad so it hugs the forward edge of the line\n\t\t\t\t\toffset.xy -= dir * forwardOffset;\n\t\t\t\t\toffset.z += 0.5;\n\n\t\t\t\t#endif\n\n\t\t\t\t// endcaps\n\t\t\t\tif ( position.y > 1.0 || position.y < 0.0 ) {\n\n\t\t\t\t\toffset.xy += dir * 2.0 * forwardOffset;\n\n\t\t\t\t}\n\n\t\t\t\t// adjust for linewidth\n\t\t\t\toffset *= linewidth * 0.5;\n\n\t\t\t\t// set the world position\n\t\t\t\tworldPos = ( position.y < 0.5 ) ? start : end;\n\t\t\t\tworldPos.xyz += offset;\n\n\t\t\t\t// project the worldpos\n\t\t\t\tvec4 clip = projectionMatrix * worldPos;\n\n\t\t\t\t// shift the depth of the projected points so the line\n\t\t\t\t// segements overlap neatly\n\t\t\t\tvec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;\n\t\t\t\tclip.z = clipPose.z * clip.w;\n\n\t\t\t#else\n\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\t#endif\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include <logdepthbuf_vertex>\n\t\t\t#include <clipping_planes_vertex>\n\t\t\t#include <fog_vertex>\n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\t\tuniform float linewidth;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashOffset;\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\t\tvarying vec4 worldPos;\n\t\tvarying vec3 worldStart;\n\t\tvarying vec3 worldEnd;\n\n\t\t#include <common>\n\t\t#include <color_pars_fragment>\n\t\t#include <fog_pars_fragment>\n\t\t#include <logdepthbuf_pars_fragment>\n\t\t#include <clipping_planes_pars_fragment>\n\n\t\tvarying vec2 vUv;\n\n\t\tvec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {\n\n\t\t\tfloat mua;\n\t\t\tfloat mub;\n\n\t\t\tvec3 p13 = p1 - p3;\n\t\t\tvec3 p43 = p4 - p3;\n\n\t\t\tvec3 p21 = p2 - p1;\n\n\t\t\tfloat d1343 = dot( p13, p43 );\n\t\t\tfloat d4321 = dot( p43, p21 );\n\t\t\tfloat d1321 = dot( p13, p21 );\n\t\t\tfloat d4343 = dot( p43, p43 );\n\t\t\tfloat d2121 = dot( p21, p21 );\n\n\t\t\tfloat denom = d2121 * d4343 - d4321 * d4321;\n\n\t\t\tfloat numer = d1343 * d4321 - d1321 * d4343;\n\n\t\t\tmua = numer / denom;\n\t\t\tmua = clamp( mua, 0.0, 1.0 );\n\t\t\tmub = ( d1343 + d4321 * ( mua ) ) / d4343;\n\t\t\tmub = clamp( mub, 0.0, 1.0 );\n\n\t\t\treturn vec2( mua, mub );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#include <clipping_planes_fragment>\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tfloat alpha = opacity;\n\n\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t// Find the closest points on the view ray and the line segment\n\t\t\t\tvec3 rayEnd = normalize( worldPos.xyz ) * 1e5;\n\t\t\t\tvec3 lineDir = worldEnd - worldStart;\n\t\t\t\tvec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );\n\n\t\t\t\tvec3 p1 = worldStart + lineDir * params.x;\n\t\t\t\tvec3 p2 = rayEnd * params.y;\n\t\t\t\tvec3 delta = p1 - p2;\n\t\t\t\tfloat len = length( delta );\n\t\t\t\tfloat norm = len / linewidth;\n\n\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t#ifdef ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\tfloat dnorm = fwidth( norm );\n\t\t\t\t\t\talpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tif ( norm > 0.5 ) {\n\n\t\t\t\t\t\t\tdiscard;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t#endif\n\n\t\t\t#endif\n\n\t\t\t#else\n\n\t\t\t\t#ifdef ALPHA_TO_COVERAGE\n\n\t\t\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\tfloat len2 = a * a + b * b;\n\t\t\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t#else\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\t\t#endif\n\n\t\t\t#endif\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\n\t\t\t#include <logdepthbuf_fragment>\n\t\t\t#include <color_fragment>\n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, alpha );\n\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <encodings_fragment>\n\t\t\t#include <fog_fragment>\n\t\t\t#include <premultiplied_alpha_fragment>\n\n\t\t}\n\t\t"};class ag extends og.ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:og.UniformsUtils.clone(og.ShaderLib.line.uniforms),vertexShader:og.ShaderLib.line.vertexShader,fragmentShader:og.ShaderLib.line.fragmentShader,clipping:!0}),Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return Boolean("USE_DASH"in this.defines)},set(e){Boolean(e)!==Boolean("USE_DASH"in this.defines)&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return Boolean("ALPHA_TO_COVERAGE"in this.defines)},set:function(e){Boolean(e)!==Boolean("ALPHA_TO_COVERAGE"in this.defines)&&(this.needsUpdate=!0),!0===e?(this.defines.ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}ag.prototype.isLineMaterial=!0;const sg=window.THREE?window.THREE:{Box3:ze,BufferGeometry:dn,InstancedInterleavedBuffer:GA,InterleavedBufferAttribute:Vo,Line3:XA,MathUtils:pe,Matrix4:dt,Mesh:Ln,Sphere:it,Vector3:Be,Vector4:qe};var Ag=(new sg.BufferGeometry).setAttribute?"setAttribute":"addAttribute";const lg=new sg.Vector3,cg=new sg.Vector3,ug=new sg.Vector4,hg=new sg.Vector4,dg=new sg.Vector4,fg=new sg.Vector3,pg=new sg.Matrix4,mg=new sg.Line3,gg=new sg.Vector3,vg=new sg.Box3,yg=new sg.Sphere,xg=new sg.Vector4;class bg extends sg.Mesh{constructor(e=new ig,t=new ag({color:16777215*Math.random()})){super(e,t),this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,r=new Float32Array(2*t.count);for(let e=0,i=0,o=t.count;e<o;e++,i+=2)lg.fromBufferAttribute(t,e),cg.fromBufferAttribute(n,e),r[i]=0===i?0:r[i-1],r[i+1]=r[i]+lg.distanceTo(cg);const i=new sg.InstancedInterleavedBuffer(r,2,1);return e[Ag]("instanceDistanceStart",new sg.InterleavedBufferAttribute(i,1,0)),e[Ag]("instanceDistanceEnd",new sg.InterleavedBufferAttribute(i,1,1)),this}raycast(e,t){null===e.camera&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');const n=void 0!==e.params.Line2&&e.params.Line2.threshold||0,r=e.ray,i=e.camera,o=i.projectionMatrix,a=this.matrixWorld,s=this.geometry,A=this.material,l=A.resolution,c=A.linewidth+n,u=s.attributes.instanceStart,h=s.attributes.instanceEnd,d=-i.near,f=2*Math.max(c/l.width,c/l.height);null===s.boundingSphere&&s.computeBoundingSphere(),yg.copy(s.boundingSphere).applyMatrix4(a);const p=Math.max(i.near,yg.distanceToPoint(r.origin));xg.set(0,0,-p,1).applyMatrix4(i.projectionMatrix),xg.multiplyScalar(1/xg.w),xg.applyMatrix4(i.projectionMatrixInverse);const m=.5*Math.abs(f/xg.w);if(yg.radius+=m,!1===e.ray.intersectsSphere(yg))return;null===s.boundingBox&&s.computeBoundingBox(),vg.copy(s.boundingBox).applyMatrix4(a);const g=Math.max(i.near,vg.distanceToPoint(r.origin));xg.set(0,0,-g,1).applyMatrix4(i.projectionMatrix),xg.multiplyScalar(1/xg.w),xg.applyMatrix4(i.projectionMatrixInverse);const v=.5*Math.abs(f/xg.w);if(vg.max.x+=v,vg.max.y+=v,vg.max.z+=v,vg.min.x-=v,vg.min.y-=v,vg.min.z-=v,!1!==e.ray.intersectsBox(vg)){r.at(1,dg),dg.w=1,dg.applyMatrix4(i.matrixWorldInverse),dg.applyMatrix4(o),dg.multiplyScalar(1/dg.w),dg.x*=l.x/2,dg.y*=l.y/2,dg.z=0,fg.copy(dg),pg.multiplyMatrices(i.matrixWorldInverse,a);for(let e=0,n=u.count;e<n;e++){if(ug.fromBufferAttribute(u,e),hg.fromBufferAttribute(h,e),ug.w=1,hg.w=1,ug.applyMatrix4(pg),hg.applyMatrix4(pg),ug.z>d&&hg.z>d)continue;if(ug.z>d){const e=ug.z-hg.z,t=(ug.z-d)/e;ug.lerp(hg,t)}else if(hg.z>d){const e=hg.z-ug.z,t=(hg.z-d)/e;hg.lerp(ug,t)}ug.applyMatrix4(o),hg.applyMatrix4(o),ug.multiplyScalar(1/ug.w),hg.multiplyScalar(1/hg.w),ug.x*=l.x/2,ug.y*=l.y/2,hg.x*=l.x/2,hg.y*=l.y/2,mg.start.copy(ug),mg.start.z=0,mg.end.copy(hg),mg.end.z=0;const n=mg.closestPointToPointParameter(fg,!0);mg.at(n,gg);const i=sg.MathUtils.lerp(ug.z,hg.z,n),s=i>=-1&&i<=1,A=fg.distanceTo(gg)<.5*c;if(s&&A){mg.start.fromBufferAttribute(u,e),mg.end.fromBufferAttribute(h,e),mg.start.applyMatrix4(a),mg.end.applyMatrix4(a);const n=new sg.Vector3,i=new sg.Vector3;r.distanceSqToSegment(mg.start,mg.end,i,n),t.push({point:i,pointOnLine:n,distance:r.origin.distanceTo(i),object:this,face:null,faceIndex:e,uv:null,uv2:null})}}}}}bg.prototype.LineSegments2=!0;class _g extends ig{constructor(){super(),this.type="LineGeometry"}setPositions(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setPositions(n),this}setColors(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setColors(n),this}fromLine(e){var t=e.geometry;if(!t.isGeometry)return t.isBufferGeometry&&this.setPositions(t.attributes.position.array),this;console.error("THREE.LineGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")}}_g.prototype.isLineGeometry=!0;class wg extends bg{constructor(e=new _g,t=new ag({color:16777215*Math.random()})){super(e,t),this.type="Line2"}}wg.prototype.isLine2=!0;class Mg extends Ls{constructor(e,t={}){const n=t.font;if(void 0===n)super();else{const r=n.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(r,t)}this.type="TextGeometry"}}class Sg{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],r=function(e,t,n){const r=Array.from(e),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[];let s=0,A=0;for(let e=0;e<r.length;e++){const t=r[e];if("\n"===t)s=0,A-=o;else{const e=Eg(t,i,s,A,n);s+=e.offsetX,a.push(e.path)}}return a}(e,t,this.data);for(let e=0,t=r.length;e<t;e++)Array.prototype.push.apply(n,r[e].toShapes());return n}}function Eg(e,t,n,r,i){const o=i.glyphs[e]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const a=new el;let s,A,l,c,u,h,d,f;if(o.o){const e=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let i=0,o=e.length;i<o;){switch(e[i++]){case"m":s=e[i++]*t+n,A=e[i++]*t+r,a.moveTo(s,A);break;case"l":s=e[i++]*t+n,A=e[i++]*t+r,a.lineTo(s,A);break;case"q":l=e[i++]*t+n,c=e[i++]*t+r,u=e[i++]*t+n,h=e[i++]*t+r,a.quadraticCurveTo(u,h,l,c);break;case"b":l=e[i++]*t+n,c=e[i++]*t+r,u=e[i++]*t+n,h=e[i++]*t+r,d=e[i++]*t+n,f=e[i++]*t+r,a.bezierCurveTo(u,h,d,f,l,c)}}}return{offsetX:o.ha*t,path:a}}function Tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tg(Object(n),!0).forEach((function(t){qg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lg(e,t,n){return t&&Pg(e.prototype,t),n&&Pg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Og(e,t)}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ig(e)}function Og(e,t){return Og=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Og(e,t)}function Bg(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function kg(e,t,n){return kg=Bg()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Og(i,n.prototype),i},kg.apply(null,arguments)}function Ng(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ug(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return zg(e)}function Fg(e){var t=Bg();return function(){var n,r=Ig(e);if(t){var i=Ig(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ug(this,n)}}function Hg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Vg(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gg(e){return function(e){if(Array.isArray(e))return jg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Vg(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vg(e,t){if(e){if("string"==typeof e)return jg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jg(e,t):void 0}}function jg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Sg.prototype.isFont=!0;var Wg=function e(t){t instanceof Array?t.forEach(e):(t.map&&t.map.dispose(),t.dispose())},Qg=function e(t){t.geometry&&t.geometry.dispose(),t.material&&Wg(t.material),t.texture&&t.texture.dispose(),t.children&&t.children.forEach(e)},Yg=function(e){if(e&&e.children)for(;e.children.length;){var t=e.children[0];e.remove(t),Qg(t)}};function Xg(e,t){var n=new t;return{linkProp:function(t){return{default:n[t](),onChange:function(n,r){r[e][t](n)},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=n[e],i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=r[t].apply(r,o);return s===r?this:s}}}}var Zg=100;function Jg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(90-e)*Math.PI/180,i=(90-t)*Math.PI/180,o=Zg*(1+n);return{x:o*Math.sin(r)*Math.cos(i),y:o*Math.cos(r),z:o*Math.sin(r)*Math.sin(i)}}function Kg(e){var t=e.x,n=e.y,r=e.z,i=Math.sqrt(t*t+n*n+r*r),o=Math.acos(n/i),a=Math.atan2(r,t);return{lat:90-180*o/Math.PI,lng:90-180*a/Math.PI-(a<-Math.PI/2?360:0),altitude:i/Zg-1}}var $g=window.THREE?window.THREE:{BackSide:1,BufferAttribute:tn,Color:Ee,Mesh:Ln,ShaderMaterial:kn},ev={backside:!0,coefficient:.5,color:"gold",size:2,power:1};function tv(e,t,n){return new $g.ShaderMaterial({depthWrite:!1,fragmentShader:"\nuniform vec3 color;\nuniform float coefficient;\nuniform float power;\nvarying vec3 vVertexNormal;\nvarying vec3 vVertexWorldPosition;\nvoid main() {\n vec3 worldCameraToVertex = vVertexWorldPosition - cameraPosition;\n vec3 viewCameraToVertex\t= (viewMatrix * vec4(worldCameraToVertex, 0.0)).xyz;\n viewCameraToVertex = normalize(viewCameraToVertex);\n float intensity\t= pow(\n coefficient + dot(vVertexNormal, viewCameraToVertex),\n power\n );\n gl_FragColor = vec4(color, intensity);\n}",transparent:!0,uniforms:{coefficient:{value:e},color:{value:new $g.Color(t)},power:{value:n}},vertexShader:"\nvarying vec3 vVertexWorldPosition;\nvarying vec3 vVertexNormal;\nvoid main() {\n vVertexNormal\t= normalize(normalMatrix * normal);\n vVertexWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n gl_Position\t= projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"})}function nv(e,t){for(var n=e.clone(),r=new Float32Array(3*e.attributes.position.count),i=0,o=r.length;i<o;i++){var a=e.attributes.normal.array[i],s=e.attributes.position.array[i];r[i]=s+a*t}return n.setAttribute("position",new $g.BufferAttribute(r,3)),n}var rv=window.THREE?window.THREE:{Color:Ee,LineBasicMaterial:ga,LineSegments:Ea,Mesh:Ln,MeshPhongMaterial:Ns,SphereBufferGeometry:Is,TextureLoader:AA},iv=ll({props:{globeImageUrl:{},bumpImageUrl:{},showGlobe:{default:!0,onChange:function(e,t){t.globeObj.visible=!!e},triggerUpdate:!1},showGraticules:{default:!1,onChange:function(e,t){t.graticulesObj.visible=!!e},triggerUpdate:!1},showAtmosphere:{default:!0,onChange:function(e,t){t.atmosphereObj&&(t.atmosphereObj.visible=!!e)},triggerUpdate:!1},atmosphereColor:{default:"lightskyblue"},atmosphereAltitude:{default:.15},onReady:{default:function(){},triggerUpdate:!1}},methods:{globeMaterial:function(e,t){return void 0!==t?(e.globeObj.material=t||e.defaultGlobeMaterial,this):e.globeObj.material}},stateInit:function(){var e=new rv.SphereBufferGeometry(Zg,75,75),t=new rv.MeshPhongMaterial({color:0,transparent:!0}),n=new rv.Mesh(e,t);return n.rotation.y=-Math.PI/2,n.__globeObjType="globe",{globeObj:n,graticulesObj:new rv.LineSegments(new bd(jh(),Zg,2),new rv.LineBasicMaterial({color:"lightgrey",transparent:!0,opacity:.1})),defaultGlobeMaterial:t}},init:function(e,t){Yg(e),t.scene=e,t.scene.add(t.globeObj),t.scene.add(t.graticulesObj),t.ready=!1},update:function(e,t){var n=e.globeObj.material;if(t.hasOwnProperty("globeImageUrl")&&(e.globeImageUrl?(new rv.TextureLoader).load(e.globeImageUrl,(function(t){n.map=t,n.color=null,n.needsUpdate=!0,!e.ready&&(e.ready=!0)&&setTimeout(e.onReady)})):!n.color&&(n.color=new rv.Color(0))),t.hasOwnProperty("bumpImageUrl")&&(e.bumpImageUrl?e.bumpImageUrl&&(new rv.TextureLoader).load(e.bumpImageUrl,(function(e){n.bumpMap=e,n.needsUpdate=!0})):(n.bumpMap=null,n.needsUpdate=!0)),(t.hasOwnProperty("atmosphereColor")||t.hasOwnProperty("atmosphereAltitude"))&&(e.atmosphereObj&&(e.scene.remove(e.atmosphereObj),Yg(e.atmosphereObj)),e.atmosphereColor&&e.atmosphereAltitude)){var r=e.atmosphereObj=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ev,n=t.backside,r=t.coefficient,i=t.color,o=t.size,a=t.power,s=nv(e,o),A=tv(r,i,a);return n&&(A.side=$g.BackSide),new $g.Mesh(s,A)}(e.globeObj.geometry,{backside:!0,color:e.atmosphereColor,size:Zg*e.atmosphereAltitude,power:3.5,coefficient:.1});r.visible=!!e.showAtmosphere,r.__globeObjType="atmosphere",e.scene.add(r)}e.ready||e.globeImageUrl||(e.ready=!0,e.onReady())}}),ov=function(e){return isNaN(e)?parseInt(Rd(e).toHex(),16):e},av=function(e){return isNaN(e)?Rd(e).getAlpha():1},sv=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Rd(e).toRgb(),r=["r","g","b"].map((function(e){return n[e]/255}));return t?[].concat(Gg(r),[n.a]):r};function Av(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.removeDelay,o=void 0===i?0:i;return jd(e,t.children,(function(e){return t.add(e)}),(function(e){var n=function(){t.remove(e),Yg(e),e&&e.hasOwnProperty("__data")&&delete e.__data.__currentTargetD};o?setTimeout(n,o):n()}),Cg({objBindAttr:"__threeObj"},n))}var lv=window.THREE?window.THREE:{BufferAttribute:tn,BufferGeometry:dn,Color:Ee,CylinderBufferGeometry:Ia,Matrix4:dt,Mesh:Ln,MeshBasicMaterial:Kt,MeshLambertMaterial:zs,Object3D:Nt,Vector3:Be},cv=Object.assign({},Ed),uv=cv.BufferGeometryUtils||cv,hv=(new lv.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix",dv=ll({props:{pointsData:{default:[]},pointLat:{default:"lat"},pointLng:{default:"lng"},pointColor:{default:function(){return"#ffffaa"}},pointAltitude:{default:.1},pointRadius:{default:.25},pointResolution:{default:12,triggerUpdate:!1},pointsMerge:{default:!1},pointsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e},update:function(e){var t=Td(e.pointLat),n=Td(e.pointLng),r=Td(e.pointAltitude),i=Td(e.pointRadius),o=Td(e.pointColor),a=new lv.CylinderBufferGeometry(1,1,1,e.pointResolution);a[hv]((new lv.Matrix4).makeRotationX(Math.PI/2)),a[hv]((new lv.Matrix4).makeTranslation(0,0,-.5));var s=2*Math.PI*Zg/360,A={},l=e.pointsMerge?new lv.Object3D:e.scene;if(Av(e.pointsData,l,{createObj:function(){var e=new lv.Mesh(a);return e.__globeObjType="point",e},updateObj:function(a,l){var c=function(t){var n=a.__currentTargetD=t,r=n.r,i=n.alt,o=n.lat,A=n.lng;Object.assign(a.position,Jg(o,A));var l=e.pointsMerge?new lv.Vector3(0,0,0):e.scene.localToWorld(new lv.Vector3(0,0,0));a.lookAt(l),a.scale.x=a.scale.y=Math.min(30,r)*s,a.scale.z=Math.max(i*Zg,.1)},u={alt:+r(l),r:+i(l),lat:+t(l),lng:+n(l)},h=a.__currentTargetD||Object.assign({},u,{alt:-.001});Object.keys(u).some((function(e){return h[e]!==u[e]}))&&(e.pointsMerge||!e.pointsTransitionDuration||e.pointsTransitionDuration<0?c(u):new Sl.Tween(h).to(u,e.pointsTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(c).start());if(!e.pointsMerge){var d=o(l),f=d?av(d):0,p=!!f;a.visible=p,p&&(A.hasOwnProperty(d)||(A[d]=new lv.MeshLambertMaterial({color:ov(d),transparent:f<1,opacity:f})),a.material=A[d])}}}),e.pointsMerge){var c=e.pointsData.length?uv.mergeBufferGeometries(e.pointsData.map((function(e){var t=e.__threeObj;e.__threeObj=void 0;var n=t.geometry.clone();t.updateMatrix(),n[hv](t.matrix);for(var r=new lv.Color(o(e)),i=n.attributes.position.count,a=new Float32Array(3*i),s=0,A=i;s<A;s++){var l=3*s;a[l]=r.r,a[l+1]=r.g,a[l+2]=r.b}return n.setAttribute("color",new lv.BufferAttribute(a,3)),n}))):new lv.BufferGeometry,u=new lv.Mesh(c,new lv.MeshBasicMaterial({color:16777215,vertexColors:!0}));u.__globeObjType="points",u.__data=e.pointsData,Yg(e.scene),e.scene.add(u)}}}),fv=["stroke"],pv=window.THREE?window.THREE:{BufferGeometry:dn,CubicBezierCurve3:Ya,Curve:Oa,Float32BufferAttribute:on,Group:Io,Line:wa,Mesh:Ln,NormalBlending:1,QuadraticBezierCurve3:Ja,ShaderMaterial:kn,TubeBufferGeometry:Os,Vector3:Be},mv=(new pv.BufferGeometry).setAttribute?"setAttribute":"addAttribute",gv={uniforms:{dashOffset:{value:0},dashSize:{value:1},gapSize:{value:0},dashTranslate:{value:0}},vertexShader:"\n uniform float dashTranslate; \n\n attribute vec4 vertexColor;\n varying vec4 vColor;\n \n attribute float vertexRelDistance;\n varying float vRelDistance;\n\n void main() {\n // pass through colors and distances\n vColor = vertexColor;\n vRelDistance = vertexRelDistance + dashTranslate;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n uniform float dashOffset; \n uniform float dashSize;\n uniform float gapSize; \n \n varying vec4 vColor;\n varying float vRelDistance;\n \n void main() {\n // ignore pixels in the gap\n if (vRelDistance < dashOffset) discard;\n if (mod(vRelDistance - dashOffset, dashSize + gapSize) > dashSize) discard;\n \n // set px color: [r, g, b, a], interpolated between vertices \n gl_FragColor = vColor; \n }\n "},vv=ll({props:{arcsData:{default:[]},arcStartLat:{default:"startLat"},arcStartLng:{default:"startLng"},arcEndLat:{default:"endLat"},arcEndLng:{default:"endLng"},arcColor:{default:function(){return"#ffffaa"}},arcAltitude:{},arcAltitudeAutoScale:{default:.5},arcStroke:{},arcCurveResolution:{default:64,triggerUpdate:!1},arcCircularResolution:{default:6,triggerUpdate:!1},arcDashLength:{default:1},arcDashGap:{default:0},arcDashInitialGap:{default:0},arcDashAnimateTime:{default:0},arcsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e,(new Qd).onTick.add((function(e,n){t.arcsData.filter((function(e){return e.__threeObj&&e.__threeObj.children.length&&e.__threeObj.children[0].material&&e.__threeObj.children[0].__dashAnimateStep})).forEach((function(e){var t=e.__threeObj.children[0],r=t.__dashAnimateStep*n,i=t.material.uniforms.dashTranslate.value%1e9;t.material.uniforms.dashTranslate.value=i+r}))}))},update:function(e){var t=Td(e.arcStartLat),n=Td(e.arcStartLng),r=Td(e.arcEndLat),i=Td(e.arcEndLng),o=Td(e.arcAltitude),a=Td(e.arcAltitudeAutoScale),s=Td(e.arcStroke),A=Td(e.arcColor),l=Td(e.arcDashLength),c=Td(e.arcDashGap),u=Td(e.arcDashInitialGap),h=Td(e.arcDashAnimateTime),d=new pv.ShaderMaterial(Cg(Cg({},gv),{},{transparent:!0,blending:pv.NormalBlending}));Av(e.arcsData,e.scene,{createObj:function(){var e=new pv.Group;return e.__globeObjType="arc",e},updateObj:function(f,p){var m=s(p),g=null!=m;if(!f.children.length||g!==("Mesh"===f.children[0].type)){Yg(f);var v=g?new pv.Mesh:new pv.Line(new pv.BufferGeometry);v.material=d.clone(),f.add(v)}var y=f.children[0];Object.assign(y.material.uniforms,{dashSize:{value:l(p)},gapSize:{value:c(p)},dashOffset:{value:u(p)}});var x=h(p);y.__dashAnimateStep=x>0?1e3/x:0;var b=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=t+1;if(e instanceof Array||e instanceof Function){var o=e instanceof Array?pp().domain(e.map((function(t,n){return n/(e.length-1)}))).range(e):e;n=function(e){return sv(o(e))}}else{var a=sv(e);n=function(){return a}}for(var s=new pv.Float32BufferAttribute(4*i*r,4),A=0,l=i;A<l;A++)for(var c=n(A/(l-1)),u=0;u<r;u++)s.set(c,4*(A*r+u));return s}(A(p),e.arcCurveResolution,g?e.arcCircularResolution+1:1),_=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e+1,i=r*t,o=new pv.Float32BufferAttribute(i,1),a=0,s=r;a<s;a++)for(var A=a/(s-1),l=0;l<t;l++){var c=a*t+l,u=n?i-1-c:c;o.setX(u,A)}return o}(e.arcCurveResolution,g?e.arcCircularResolution+1:1,!0);y.geometry[mv]("vertexColor",b),y.geometry[mv]("vertexRelDistance",_);var w=function(t){var n=p.__currentTargetD=t,r=n.stroke,i=function(e){var t=e.alt,n=e.altAutoScale,r=e.startLat,i=e.startLng,o=e.endLat,a=e.endLng,s=function(e){var t=Hg(e,3),n=t[0],r=Jg(t[1],n,t[2]),i=r.x,o=r.y,a=r.z;return new pv.Vector3(i,o,a)},A=[i,r],l=[a,o],c=t;if(null==c&&(c=Dh(A,l)/2*n),c){var u=Wh(A,l),h=Hg([.25,.75].map((function(e){return[].concat(Gg(u(e)),[1.5*c])})),2),d=h[0],f=h[1];return kg(pv.CubicBezierCurve3,Gg([A,d,f,l].map(s)))}var p=.001;return m.apply(void 0,Gg([[].concat(A,[p]),[].concat(l,[p])].map(s)));function m(e,t){var n=e.angleTo(t),r=function(r){return(new pv.Vector3).addVectors(e.clone().multiplyScalar(Math.sin((1-r)*n)),t.clone().multiplyScalar(Math.sin(r*n))).divideScalar(Math.sin(n))},i=new pv.Curve;return i.getPoint=r,i}}(Ng(n,fv));g?(y.geometry&&y.geometry.dispose(),y.geometry=new pv.TubeBufferGeometry(i,e.arcCurveResolution,r/2,e.arcCircularResolution),y.geometry[mv]("vertexColor",b),y.geometry[mv]("vertexRelDistance",_)):y.geometry.setFromPoints(i.getPoints(e.arcCurveResolution))},M={stroke:m,alt:o(p),altAutoScale:+a(p),startLat:+t(p),startLng:+n(p),endLat:+r(p),endLng:+i(p)},S=p.__currentTargetD||Object.assign({},M,{altAutoScale:-.001});Object.keys(M).some((function(e){return S[e]!==M[e]}))&&(!e.arcsTransitionDuration||e.arcsTransitionDuration<0?w(M):new Sl.Tween(S).to(M,e.arcsTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(w).start())}})}}),yv=window.THREE?window.THREE:{BufferAttribute:tn,BufferGeometry:dn,Color:Ee,DoubleSide:2,Mesh:Ln,MeshBasicMaterial:Kt,MeshLambertMaterial:zs,Object3D:Nt},xv=Object.assign({},Ed),bv=xv.BufferGeometryUtils||xv,_v=(new yv.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix",wv=ll({props:{hexBinPointsData:{default:[]},hexBinPointLat:{default:"lat"},hexBinPointLng:{default:"lng"},hexBinPointWeight:{default:1},hexBinResolution:{default:4},hexMargin:{default:.2},hexTopCurvatureResolution:{default:5},hexTopColor:{default:function(){return"#ffffaa"}},hexSideColor:{default:function(){return"#ffffaa"}},hexAltitude:{default:function(e){return.01*e.sumWeight}},hexBinMerge:{default:!1},hexTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e},update:function(e){var t=Td(e.hexBinPointLat),n=Td(e.hexBinPointLng),r=Td(e.hexBinPointWeight),i=Td(e.hexAltitude),o=Td(e.hexTopColor),a=Td(e.hexSideColor),s=Td(e.hexMargin),A=Bd(e.hexBinPointsData.map((function(r){return Cg(Cg({},r),{},{h3Idx:Xm(t(r),n(r),e.hexBinResolution)})})),"h3Idx"),l=Object.entries(A).map((function(e){var t=Hg(e,2),n=t[0],i=t[1];return{h3Idx:n,points:i,sumWeight:i.reduce((function(e,t){return e+ +r(t)}),0)}})),c={};if(Av(l,e.hexBinMerge?new yv.Object3D:e.scene,{createObj:function(e){var t=new yv.Mesh;t.__hexCenter=Zm(e.h3Idx),t.__hexGeoJson=Jm(e.h3Idx,!0).reverse();var n=t.__hexCenter[1];return t.__hexGeoJson.forEach((function(e){var t=e[0];Math.abs(n-t)>170&&(e[0]+=n>t?360:-360)})),t.__globeObjType="hexbin",t},updateObj:function(t,n){var r=Math.max(0,Math.min(1,+s(n))),A=Hg(t.__hexCenter,2),l=A[0],u=A[1],h=0===r?t.__hexGeoJson:t.__hexGeoJson.map((function(e){var t=Hg(e,2),n=t[0],i=t[1];return[[n,u],[i,l]].map((function(e){var t=Hg(e,2);return function(e,t,n){return e-(e-t)*n}(t[0],t[1],r)}))})),d=e.hexTopCurvatureResolution;t.geometry=new Cm([h],0,Zg,!1,!0,!0,d);var f={alt:+i(n)},p=function(e){var n=(t.__currentTargetD=e).alt;t.scale.x=t.scale.y=t.scale.z=1+n},m=t.__currentTargetD||Object.assign({},f,{alt:-.001});Object.keys(f).some((function(e){return m[e]!==f[e]}))&&(e.hexBinMerge||!e.hexTransitionDuration||e.hexTransitionDuration<0?p(f):new Sl.Tween(m).to(f,e.hexTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(p).start());if(!e.hexBinMerge){var g=a(n),v=o(n);[g,v].forEach((function(e){if(!c.hasOwnProperty(e)){var t=av(e);c[e]=new yv.MeshLambertMaterial({color:ov(e),transparent:t<1,opacity:t,side:yv.DoubleSide})}})),t.material=[g,v].map((function(e){return c[e]}))}},idAccessor:function(e){return e.h3Idx}}),e.hexBinMerge){var u=l.length?bv.mergeBufferGeometries(l.map((function(e){var t=e.__threeObj;e.__threeObj=void 0;var n=t.geometry.toNonIndexed();t.updateMatrix(),n[_v](t.matrix);for(var r=new yv.Color(o(e)),i=new yv.Color(a(e)),s=n.attributes.position.count,A=n.groups[0].count,l=new Float32Array(3*s),c=0,u=s;c<u;c++){var h=3*c,d=c>=A?r:i;l[h]=d.r,l[h+1]=d.g,l[h+2]=d.b}return n.setAttribute("color",new yv.BufferAttribute(l,3)),n}))):new yv.BufferGeometry,h=new yv.Mesh(u,new yv.MeshBasicMaterial({color:16777215,vertexColors:!0,side:yv.DoubleSide}));h.__globeObjType="hexBinPoints",h.__data=l,Yg(e.scene),e.scene.add(h)}}}),Mv=window.THREE?window.THREE:{DoubleSide:2,Group:Io,LineBasicMaterial:ga,LineSegments:Ea,Mesh:Ln,MeshBasicMaterial:Kt},Sv=ll({props:{polygonsData:{default:[]},polygonGeoJsonGeometry:{default:"geometry"},polygonSideColor:{default:function(){return"#ffffaa"}},polygonSideMaterial:{},polygonCapColor:{default:function(){return"#ffffaa"}},polygonCapMaterial:{},polygonStrokeColor:{},polygonAltitude:{default:.01},polygonCapCurvatureResolution:{default:5},polygonsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e},update:function(e){var t=Td(e.polygonGeoJsonGeometry),n=Td(e.polygonAltitude),r=Td(e.polygonCapCurvatureResolution),i=Td(e.polygonCapColor),o=Td(e.polygonCapMaterial),a=Td(e.polygonSideColor),s=Td(e.polygonSideMaterial),A=Td(e.polygonStrokeColor),l=[];e.polygonsData.forEach((function(e){var c={data:e,capColor:i(e),capMaterial:o(e),sideColor:a(e),sideMaterial:s(e),strokeColor:A(e),altitude:+n(e),capCurvatureResolution:+r(e)},u=t(e),h=e.__id||"".concat(Math.round(1e9*Math.random()));e.__id=h,"Polygon"===u.type?l.push(Cg({id:"".concat(h,"_0"),coords:u.coordinates},c)):"MultiPolygon"===u.type?l.push.apply(l,Gg(u.coordinates.map((function(e,t){return Cg({id:"".concat(h,"_").concat(t),coords:e},c)})))):console.warn("Unsupported GeoJson geometry type: ".concat(u.type,". Skipping geometry..."))})),Av(l,e.scene,{idAccessor:function(e){return e.id},createObj:function(){var e=new Mv.Group;return e.__defaultSideMaterial=new Mv.MeshBasicMaterial({side:Mv.DoubleSide,depthWrite:!0}),e.__defaultCapMaterial=new Mv.MeshBasicMaterial({side:Mv.DoubleSide,depthWrite:!0}),e.add(new Mv.Mesh(void 0,[e.__defaultSideMaterial,e.__defaultCapMaterial])),e.add(new Mv.LineSegments(void 0,new Mv.LineBasicMaterial)),e.__globeObjType="polygon",e},updateObj:function(t,n){var r=n.coords,i=n.capColor,o=n.capMaterial,a=n.sideColor,s=n.sideMaterial,A=n.strokeColor,l=n.altitude,c=n.capCurvatureResolution,u=Hg(t.children,2),h=u[0],d=u[1],f=!!A;if(d.visible=f,!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return function(e,t){return e===t}};return Object.entries(t).every((function(t){var r=Hg(t,2),i=r[0],o=r[1];return e.hasOwnProperty(i)&&n(i)(e[i],o)}))}(h.geometry.parameters||{},{polygonGeoJson:r,curvatureResolution:c})&&(h.geometry=new Cm(r,0,Zg,!1,!0,!0,c)),f&&(!d.geometry.parameters||d.geometry.parameters.geoJson.coordinates!==r||d.geometry.parameters.resolution!==c)&&(d.geometry=new bd({type:"Polygon",coordinates:r},Zg,c)),h.material[0]=s||t.__defaultSideMaterial,h.material[1]=o||t.__defaultCapMaterial,[!s&&a,!o&&i].forEach((function(e,t){if(e){var n=h.material[t],r=av(e);n.color.set(ov(e)),n.transparent=r<1,n.opacity=r}})),f){var p=d.material,m=av(A);p.color.set(ov(A)),p.transparent=m<1,p.opacity=m}var g={alt:l},v=function(e){var n=(t.__currentTargetD=e).alt;h.scale.x=h.scale.y=h.scale.z=1+n,f&&(d.scale.x=d.scale.y=d.scale.z=1+n+1e-4)},y=t.__currentTargetD||Object.assign({},g,{alt:-.001});Object.keys(g).some((function(e){return y[e]!==g[e]}))&&(!e.polygonsTransitionDuration||e.polygonsTransitionDuration<0||y.alt===g.alt?v(g):new Sl.Tween(y).to(g,e.polygonsTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(v).start())}})}});var Ev=window.THREE?window.THREE:{BufferGeometry:dn,DoubleSide:2,Mesh:Ln,MeshLambertMaterial:zs},Tv=Object.assign({},Ed),Cv=Tv.BufferGeometryUtils||Tv,Rv=ll({props:{hexPolygonsData:{default:[]},hexPolygonGeoJsonGeometry:{default:"geometry"},hexPolygonColor:{default:function(){return"#ffffaa"}},hexPolygonAltitude:{default:.001},hexPolygonResolution:{default:3},hexPolygonMargin:{default:.2},hexPolygonCurvatureResolution:{default:5},hexPolygonsTransitionDuration:{default:0,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e},update:function(e){var t=Td(e.hexPolygonGeoJsonGeometry),n=Td(e.hexPolygonColor),r=Td(e.hexPolygonAltitude),i=Td(e.hexPolygonResolution),o=Td(e.hexPolygonMargin),a=Td(e.hexPolygonCurvatureResolution);Av(e.hexPolygonsData,e.scene,{createObj:function(e){var t=new Ev.Mesh(void 0,new Ev.MeshLambertMaterial({side:Ev.DoubleSide}));return t.__globeObjType="hexPolygon",t},updateObj:function(s,A){var l=t(A),c=i(A),u=r(A),h=Math.max(0,Math.min(1,+o(A))),d=a(A),f=n(A),p=av(f);s.material.color.set(ov(f)),s.material.transparent=p<1,s.material.opacity=p;var m=[];"Polygon"===l.type?Km(l.coordinates,c,!0).forEach((function(e){return m.push(e)})):"MultiPolygon"===l.type?l.coordinates.forEach((function(e){return Km(e,c,!0).forEach((function(e){return m.push(e)}))})):console.warn("Unsupported GeoJson geometry type: ".concat(l.type,". Skipping geometry..."));var g=m.map((function(e){var t=Zm(e),n=Jm(e,!0).reverse(),r=t[1];return n.forEach((function(e){var t=e[0];Math.abs(r-t)>170&&(e[0]+=r>t?360:-360)})),{h3Idx:e,hexCenter:t,hexGeoJson:n}})),v={alt:u,margin:h,curvatureResolution:d},y=function(e){var t=s.__currentTargetD=e,n=t.alt,r=t.margin,i=t.curvatureResolution;s.geometry=g.length?Cv.mergeBufferGeometries(g.map((function(e){var t=Hg(e.hexCenter,2),o=t[0],a=t[1],s=0===r?e.hexGeoJson:e.hexGeoJson.map((function(e){var t=Hg(e,2),n=t[0],i=t[1];return[[n,a],[i,o]].map((function(e){var t=Hg(e,2);return function(e,t,n){return e-(e-t)*n}(t[0],t[1],r)}))}));return new Cm([s],Zg,Zg*(1+n),!1,!0,!1,i)}))):new Ev.BufferGeometry},x=s.__currentTargetD||Object.assign({},v,{alt:-.001});Object.keys(v).some((function(e){return x[e]!==v[e]}))&&(!e.hexPolygonsTransitionDuration||e.hexPolygonsTransitionDuration<0?y(v):new Sl.Tween(x).to(v,e.hexPolygonsTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(y).start())}})}}),Pv=window.THREE?window.THREE:{Vector3:Be};function Lv(e,t){var n=Math.max(e.length,t.length),r=Df.apply(void 0,Gg([e,t].map((function(e){return e.map((function(e){return[e.x,e.y,e.z]}))})).map((function(e){return function(e,t){var n=e[e.length-1];return[].concat(Gg(e),Gg(Gg(new Array(t-e.length)).map((function(){return n}))))}(e,n)}))));return function(n){return 0===n?e:1===n?t:r(n).map((function(e){var t=Hg(e,3),n=t[0],r=t[1],i=t[2];return new Pv.Vector3(n,r,i)}))}}var qv=window.THREE?window.THREE:{BufferGeometry:dn,Color:Ee,Float32BufferAttribute:on,Group:Io,Line:wa,NoColors:0,NormalBlending:1,ShaderMaterial:kn,Vector3:Be,VertexColors:2},Dv=(new qv.BufferGeometry).setAttribute?"setAttribute":"addAttribute",Iv={uniforms:{dashOffset:{value:0},dashSize:{value:1},gapSize:{value:0},dashTranslate:{value:0}},vertexShader:"\n uniform float dashTranslate;\n\n attribute vec4 vertexColor;\n varying vec4 vColor;\n\n attribute float vertexRelDistance;\n varying float vRelDistance;\n\n void main() {\n // pass through colors and distances\n vColor = vertexColor;\n vRelDistance = vertexRelDistance + dashTranslate;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n uniform float dashOffset;\n uniform float dashSize;\n uniform float gapSize;\n\n varying vec4 vColor;\n varying float vRelDistance;\n\n void main() {\n // ignore pixels in the gap\n if (vRelDistance < dashOffset) discard;\n if (mod(vRelDistance - dashOffset, dashSize + gapSize) > dashSize) discard;\n\n // set px color: [r, g, b, a], interpolated between vertices\n gl_FragColor = vColor;\n }\n "},Ov=ll({props:{pathsData:{default:[]},pathPoints:{default:function(e){return e}},pathPointLat:{default:function(e){return e[0]}},pathPointLng:{default:function(e){return e[1]}},pathPointAlt:{default:.001},pathResolution:{default:2},pathColor:{default:function(){return"#ffffaa"}},pathStroke:{},pathDashLength:{default:1},pathDashGap:{default:0},pathDashInitialGap:{default:0},pathDashAnimateTime:{default:0},pathTransitionDuration:{default:1e3,triggerUpdate:!1},rendererSize:{}},init:function(e,t){Yg(e),t.scene=e,(new Qd).onTick.add((function(e,n){t.pathsData.filter((function(e){return e.__threeObj&&e.__threeObj.children.length&&e.__threeObj.children[0].material&&e.__threeObj.children[0].__dashAnimateStep})).forEach((function(e){var t=e.__threeObj.children[0],r=t.__dashAnimateStep*n;if("Line"===t.type){var i=t.material.uniforms.dashTranslate.value%1e9;t.material.uniforms.dashTranslate.value=i+r}else if("Line2"===t.type){for(var o=t.material.dashOffset-r,a=t.material.dashSize+t.material.gapSize;o<=-a;)o+=a;t.material.dashOffset=o}}))}))},update:function(e){var t=Td(e.pathPoints),n=Td(e.pathPointLat),r=Td(e.pathPointLng),i=Td(e.pathPointAlt),o=Td(e.pathStroke),a=Td(e.pathColor),s=Td(e.pathDashLength),A=Td(e.pathDashGap),l=Td(e.pathDashInitialGap),c=Td(e.pathDashAnimateTime),u=new qv.ShaderMaterial(Cg(Cg({},Iv),{},{transparent:!0,blending:qv.NormalBlending}));function h(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=t+1;if(e instanceof Array||e instanceof Function){var a=e instanceof Array?pp().domain(e.map((function(t,n){return n/(e.length-1)}))).range(e):e;n=function(e){return sv(a(e),i)}}else{var s=sv(e,i);n=function(){return s}}for(var A=i?4:3,l=new qv.Float32BufferAttribute(o*A*r,A),c=0,u=o;c<u;c++)for(var h=n(c/(u-1)),d=0;d<r;d++)l.set(h,(c*r+d)*A);return l}Av(e.pathsData,e.scene,{createObj:function(){var e=new qv.Group;return e.__globeObjType="path",e},updateObj:function(d,f){var p=o(f),m=null!=p;if(!d.children.length||m===("Line"===d.children[0].type)){Yg(d);var g=m?new wg(new _g,new ag):new qv.Line(new qv.BufferGeometry,u.clone());d.add(g)}var v,y,x=d.children[0],b=function(e,t,n,r,i){var o=function(e,t,n){for(var r=[],i=1;i<=n;i++)r.push(e+(t-e)*i/(n+1));return r},a=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=[],n=null;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(r){if(n){for(;Math.abs(n[1]-r[1])>180;)n[1]+=360*(n[1]<r[1]?1:-1);var i=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2));if(i>e)for(var a=Math.floor(i/e),s=o(n[0],r[0],a),A=o(n[1],r[1],a),l=o(n[2],r[2],a),c=0,u=s.length;c<u;c++)t.push([s[c],A[c],l[c]])}t.push(n=r)})),t},s=function(e){var t=Hg(e,3),n=Jg(t[0],t[1],t[2]),r=n.x,i=n.y,o=n.z;return new qv.Vector3(r,i,o)};return a(e.map((function(e){return[t(e),n(e),r(e)]})),i).map(s)}(t(f),n,r,i,e.pathResolution),_=c(f);if(x.__dashAnimateStep=_>0?1e3/_:0,m){x.material.resolution=e.rendererSize;var w=s(f),M=A(f),S=l(f);x.material.dashed=M>0,x.material.dashed?x.material.defines.USE_DASH="":delete x.material.defines.USE_DASH,x.material.dashed&&(x.material.dashScale=1/(y=0,b.forEach((function(e){v&&(y+=v.distanceTo(e)),v=e})),y),x.material.dashSize=w,x.material.gapSize=M,x.material.dashOffset=-S);var E=a(f);if(E instanceof Array){var T=h(a(f),b.length-1,1,!1);x.geometry.setColors(T.array),x.material.vertexColors=qv.VertexColors}else{var C=E,R=av(C);x.material.color=new qv.Color(ov(C)),x.material.transparent=R<1,x.material.opacity=R,x.material.vertexColors=qv.NoColors}x.material.needsUpdate=!0}else{Object.assign(x.material.uniforms,{dashSize:{value:s(f)},gapSize:{value:A(f)},dashOffset:{value:l(f)}});var P=h(a(f),b.length),L=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e+1,i=r*t,o=new qv.Float32BufferAttribute(i,1),a=0,s=r;a<s;a++)for(var A=a/(s-1),l=0;l<t;l++){var c=a*t+l,u=n?i-1-c:c;o.setX(u,A)}return o}(b.length,1,!0);x.geometry[Dv]("vertexColor",P),x.geometry[Dv]("vertexRelDistance",L)}var q=Lv(f.__currentTargetD&&f.__currentTargetD.points||[b[0]],b),D=function(e){var t,n=f.__currentTargetD=e,r=n.stroke,i=n.interpolK,o=f.__currentTargetD.points=q(i);m?(x.geometry.setPositions((t=[]).concat.apply(t,Gg(o.map((function(e){return[e.x,e.y,e.z]}))))),x.material.linewidth=r,x.material.dashed&&x.computeLineDistances()):(x.geometry.setFromPoints(o),x.geometry.computeBoundingSphere())},I={stroke:p,interpolK:1},O=Object.assign({},f.__currentTargetD||I,{interpolK:0});Object.keys(I).some((function(e){return O[e]!==I[e]}))&&(!e.pathTransitionDuration||e.pathTransitionDuration<0?D(I):new Sl.Tween(O).to(I,e.pathTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(D).start())}})}}),Bv=window.THREE?window.THREE:{Euler:wt,Mesh:Ln,MeshLambertMaterial:zs,SphereBufferGeometry:Is},kv=ll({props:{tilesData:{default:[]},tileLat:{default:"lat"},tileLng:{default:"lng"},tileAltitude:{default:.01},tileWidth:{default:1},tileHeight:{default:1},tileUseGlobeProjection:{default:!0},tileMaterial:{default:function(){return new Bv.MeshLambertMaterial({color:"#ffbb88",opacity:.4,transparent:!0})}},tileCurvatureResolution:{default:5},tilesTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e},update:function(e){var t=Td(e.tileLat),n=Td(e.tileLng),r=Td(e.tileAltitude),i=Td(e.tileWidth),o=Td(e.tileHeight),a=Td(e.tileUseGlobeProjection),s=Td(e.tileMaterial),A=Td(e.tileCurvatureResolution);Av(e.tilesData,e.scene,{createObj:function(){var e=new Bv.Mesh;return e.__globeObjType="tile",e},updateObj:function(l,c){l.material=s(c);var u=a(c),h=A(c),d=function(e){var t=l.__currentTargetD=e,n=t.lat,r=t.lng,i=t.alt,o=t.width,a=t.height,s=Nv(r),A=Nv(-n);l.geometry=new Bv.SphereBufferGeometry(Zg*(1+i),Math.ceil(o/(h||-1)),Math.ceil(a/(h||-1)),Nv(90-o/2)+(u?s:0),Nv(o),Nv(90-a/2)+(u?A:0),Nv(a)),u||l.setRotationFromEuler(new Bv.Euler(A,s,0,"YXZ"))},f={lat:+t(c),lng:+n(c),alt:+r(c),width:+i(c),height:+o(c)},p=l.__currentTargetD||Object.assign({},f,{width:0,height:0});Object.keys(f).some((function(e){return p[e]!==f[e]}))&&(!e.tilesTransitionDuration||e.tilesTransitionDuration<0?d(f):new Sl.Tween(p).to(f,e.tilesTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(d).start())}})}}),Nv=function(e){return e*Math.PI/180},zv={glyphs:{0:{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},1:{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},2:{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},3:{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},4:{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},5:{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},6:{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},7:{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},8:{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},9:{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},"ο":{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"¦":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},"Τ":{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},"Π":{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},"ΐ":{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"²":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},"Κ":{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},"ƒ":{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},"ό":{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"»":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"©":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},"ώ":{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"«":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"∙":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"ÿ":{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},"µ":{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},"Ι":{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},"Ύ":{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"Ν":{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},"ς":{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},"Ψ":{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},"ι":{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},"Ά":{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},"ε":{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},"Δ":{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"‰":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"—":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},"ρ":{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"¯":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},"Η":{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"Α":{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"…":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"ν":{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"¶":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},"β":{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},"Μ":{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},"Ό":{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ή":{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"•":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"¥":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},"γ":{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},"α":{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"­":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"Χ":{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"†":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"°":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},"Ξ":{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "}," ":{x_min:0,x_max:0,ha:853},"Ϋ":{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"”":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},"Ί":{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},"Β":{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},"υ":{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},"χ":{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"ί":{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},"Ζ":{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"¨":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"„":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},"δ":{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},"έ":{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},"ω":{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"´":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"±":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"ϋ":{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"§":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},"Ω":{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},"ύ":{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"™":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},"ή":{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},"Θ":{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"®":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},"Ε":{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"³":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},"σ":{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},"ζ":{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},"θ":{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},"Ο":{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},"Γ":{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},"Έ":{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ώ":{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},"Ϊ":{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"½":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},"Ρ":{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"ª":{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"΅":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},"Φ":{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"⁋":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},"Σ":{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"£":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"¬":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},"λ":{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},"τ":{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},"ξ":{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},"Λ":{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},"ΰ":{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"·":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"Υ":{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},"μ":{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"φ":{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"“":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},"ϊ":{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},"π":{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},"ά":{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"¤":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},"κ":{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"‡":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},"ψ":{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},"η":{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) Μagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"Μagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:'Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r\n\r\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r\n\r\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word "MgOpen", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r\n\r\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "MgOpen" name.\r\n\r\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r\n\r\nTHE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.',manufacturer_name:"Μagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50},Uv=Cg(Cg({},window.THREE?window.THREE:{CircleBufferGeometry:Da,Group:Io,Mesh:Ln,MeshLambertMaterial:zs,TextGeometry:Mg,Vector3:Be}),{},{Font:Sg,TextGeometry:Mg}),Fv=ll({props:{labelsData:{default:[]},labelLat:{default:"lat"},labelLng:{default:"lng"},labelAltitude:{default:0},labelText:{default:"text"},labelSize:{default:.5},labelTypeFace:{default:zv,onChange:function(e,t){t.font=new Uv.Font(e)}},labelColor:{default:function(){return"lightgrey"}},labelRotation:{default:0},labelResolution:{default:3},labelIncludeDot:{default:!0},labelDotRadius:{default:.1},labelDotOrientation:{default:function(){return"bottom"}},labelsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e},update:function(e){var t=Td(e.labelLat),n=Td(e.labelLng),r=Td(e.labelAltitude),i=Td(e.labelText),o=Td(e.labelSize),a=Td(e.labelRotation),s=Td(e.labelColor),A=Td(e.labelIncludeDot),l=Td(e.labelDotRadius),c=Td(e.labelDotOrientation),u=new Set(["right","top","bottom"]),h=2*Math.PI*Zg/360,d=new Uv.CircleBufferGeometry(1,16);Av(e.labelsData,e.scene,{createObj:function(){var e=new Uv.MeshLambertMaterial,t=new Uv.Group;return t.add(new Uv.Mesh(d,e)),t.add(new Uv.Mesh(void 0,e)),t.__globeObjType="label",t},updateObj:function(d,f){var p=Hg(d.children,2),m=p[0],g=p[1],v=s(f),y=av(v);g.material.color.set(ov(v)),g.material.transparent=y<1,g.material.opacity=y;var x=A(f),b=c(f);!x||!u.has(b)&&(b="bottom");var _=x?+l(f)*h:1e-12;m.scale.x=m.scale.y=_;var w=+o(f)*h;if(g.geometry=new Uv.TextGeometry(i(f),{font:e.font,size:w,height:0,curveSegments:e.labelResolution}),"right"!==b&&g.geometry.center(),x){var M=_+w/2;"right"===b&&(g.position.x=M),g.position.y={right:-w/2,top:M+w/2,bottom:-M-w/2}[b]}var S=function(t){var n=d.__currentTargetD=t,r=n.lat,i=n.lng,o=n.alt,a=n.rot,s=n.scale;Object.assign(d.position,Jg(r,i,o)),d.lookAt(e.scene.localToWorld(new Uv.Vector3(0,0,0))),d.rotateY(Math.PI),d.rotateZ(-a*Math.PI/180),d.scale.x=d.scale.y=d.scale.z=s},E={lat:+t(f),lng:+n(f),alt:+r(f),rot:+a(f),scale:1},T=d.__currentTargetD||Object.assign({},E,{scale:1e-12});Object.keys(E).some((function(e){return T[e]!==E[e]}))&&(!e.labelsTransitionDuration||e.labelsTransitionDuration<0?S(E):new Sl.Tween(T).to(E,e.labelsTransitionDuration).easing(Sl.Easing.Quadratic.InOut).onUpdate(S).start())}})}}),Hv=function(e){Dg(n,e);var t=Fg(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;Rg(this,n),(e=t.call(this)).type="CircleLineGeometry",e.parameters={radius:r,segmentCount:i};for(var o=[],a=0;a<=i;a++){var s=(a/i-.25)*Math.PI*2;o.push({x:Math.cos(s)*r,y:Math.sin(s)*r,z:0})}return e.setFromPoints(o),e}return Lg(n)}((window.THREE?window.THREE:{BufferGeometry:dn}).BufferGeometry),Gv=window.THREE?window.THREE:{Color:Ee,Group:Io,Line:wa,LineBasicMaterial:ga,Vector3:Be},Vv=ll({props:{ringsData:{default:[]},ringLat:{default:"lat"},ringLng:{default:"lng"},ringAltitude:{default:.0015},ringColor:{default:function(){return"#ffffaa"},triggerUpdate:!1},ringResolution:{default:64,triggerUpdate:!1},ringMaxRadius:{default:2,triggerUpdate:!1},ringPropagationSpeed:{default:1,triggerUpdate:!1},ringRepeatPeriod:{default:700,triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e,(new Qd).onTick.add((function(e){if(t.ringsData.length){var n=Td(t.ringColor),r=Td(t.ringAltitude),i=Td(t.ringMaxRadius),o=Td(t.ringPropagationSpeed),a=Td(t.ringRepeatPeriod);t.ringsData.filter((function(e){return e.__threeObj})).forEach((function(s){var A,l,c,u=s.__threeObj;if((u.__nextRingTime||0)<=e){var h=a(s)/1e3;u.__nextRingTime=e+(h<=0?1/0:h);var d,f=new Gv.Line(new Hv(1,t.ringResolution),new Gv.LineBasicMaterial),p=n(s),m=p instanceof Array||p instanceof Function;m?p instanceof Array?(d=pp().domain(p.map((function(e,t){return t/(p.length-1)}))).range(p),f.material.transparent=p.some((function(e){return av(e)<1}))):(d=p,f.material.transparent=!0):(f.material.color=new Gv.Color(ov(p)),A=f.material,l=av(p),A.opacity=l,A.transparent=l<1,A.depthWrite=void 0===c?l>=1:c);var g=Zg*(1+r(s)),v=i(s),y=v*Math.PI/180,x=o(s),b=x<=0,_=function(e){var t=e.t,n=(b?1-t:t)*y;if(f.scale.x=f.scale.y=g*Math.sin(n),f.position.z=g*(1-Math.cos(n)),m){var r=d(t);f.material.color=new Gv.Color(ov(r)),f.material.transparent&&(f.material.opacity=av(r))}};if(0===x)_({t:0}),u.add(f);else{var w=1e3*Math.abs(v/x);new Sl.Tween({t:0}).to({t:1},w).onUpdate(_).onStart((function(){return u.add(f)})).onComplete((function(){u.remove(f),Qg(f)})).start()}}}))}}))},update:function(e){var t=Td(e.ringLat),n=Td(e.ringLng),r=Td(e.ringAltitude),i=e.scene.localToWorld(new Gv.Vector3(0,0,0));Av(e.ringsData,e.scene,{createObj:function(){var e=new Gv.Group;return e.__globeObjType="ring",e},updateObj:function(e,o){var a=t(o),s=n(o),A=r(o);Object.assign(e.position,Jg(a,s,A)),e.lookAt(i)}},{removeDelay:3e4})}}),jv=ll({props:{customLayerData:{default:[]},customThreeObject:{},customThreeObjectUpdate:{triggerUpdate:!1}},init:function(e,t){Yg(e),t.scene=e},update:function(e){e.customThreeObjectUpdate||Yg(e.scene);var t=Td(e.customThreeObject),n=Td(e.customThreeObjectUpdate);Av(e.customLayerData,e.scene,{createObj:function(n){var r=t(n,Zg);return r&&(e.customThreeObject===r&&(r=r.clone()),r.__globeObjType="custom"),r},updateObj:function(e,t){return n(e,t,Zg)}})}}),Wv=window.THREE?window.THREE:{Group:Io,Vector2:me,Vector3:Be},Qv=["globeLayer","pointsLayer","arcsLayer","hexBinLayer","polygonsLayer","hexedPolygonsLayer","pathsLayer","tilesLayer","labelsLayer","ringsLayer","customLayer"],Yv=Xg("globeLayer",iv),Xv=Object.assign.apply(Object,Gg(["globeImageUrl","bumpImageUrl","showGlobe","showGraticules","showAtmosphere","atmosphereColor","atmosphereAltitude"].map((function(e){return qg({},e,Yv.linkProp(e))})))),Zv=Object.assign.apply(Object,Gg(["globeMaterial"].map((function(e){return qg({},e,Yv.linkMethod(e))})))),Jv=Xg("pointsLayer",dv),Kv=Object.assign.apply(Object,Gg(["pointsData","pointLat","pointLng","pointColor","pointAltitude","pointRadius","pointResolution","pointsMerge","pointsTransitionDuration"].map((function(e){return qg({},e,Jv.linkProp(e))})))),$v=Xg("arcsLayer",vv),ey=Object.assign.apply(Object,Gg(["arcsData","arcStartLat","arcStartLng","arcEndLat","arcEndLng","arcColor","arcAltitude","arcAltitudeAutoScale","arcStroke","arcCurveResolution","arcCircularResolution","arcDashLength","arcDashGap","arcDashInitialGap","arcDashAnimateTime","arcsTransitionDuration"].map((function(e){return qg({},e,$v.linkProp(e))})))),ty=Xg("hexBinLayer",wv),ny=Object.assign.apply(Object,Gg(["hexBinPointsData","hexBinPointLat","hexBinPointLng","hexBinPointWeight","hexBinResolution","hexMargin","hexTopCurvatureResolution","hexTopColor","hexSideColor","hexAltitude","hexBinMerge","hexTransitionDuration"].map((function(e){return qg({},e,ty.linkProp(e))})))),ry=Xg("hexedPolygonsLayer",Rv),iy=Object.assign.apply(Object,Gg(["hexPolygonsData","hexPolygonGeoJsonGeometry","hexPolygonColor","hexPolygonAltitude","hexPolygonResolution","hexPolygonMargin","hexPolygonCurvatureResolution","hexPolygonsTransitionDuration"].map((function(e){return qg({},e,ry.linkProp(e))})))),oy=Xg("polygonsLayer",Sv),ay=Object.assign.apply(Object,Gg(["polygonsData","polygonGeoJsonGeometry","polygonCapColor","polygonCapMaterial","polygonSideColor","polygonSideMaterial","polygonStrokeColor","polygonAltitude","polygonCapCurvatureResolution","polygonsTransitionDuration"].map((function(e){return qg({},e,oy.linkProp(e))})))),sy=Xg("pathsLayer",Ov),Ay=Object.assign.apply(Object,Gg(["pathsData","pathPoints","pathPointLat","pathPointLng","pathPointAlt","pathResolution","pathColor","pathStroke","pathDashLength","pathDashGap","pathDashInitialGap","pathDashAnimateTime","pathTransitionDuration"].map((function(e){return qg({},e,sy.linkProp(e))})))),ly=Xg("tilesLayer",kv),cy=Object.assign.apply(Object,Gg(["tilesData","tileLat","tileLng","tileAltitude","tileWidth","tileHeight","tileUseGlobeProjection","tileMaterial","tileCurvatureResolution","tilesTransitionDuration"].map((function(e){return qg({},e,ly.linkProp(e))})))),uy=Xg("labelsLayer",Fv),hy=Object.assign.apply(Object,Gg(["labelsData","labelLat","labelLng","labelAltitude","labelRotation","labelText","labelSize","labelTypeFace","labelColor","labelResolution","labelIncludeDot","labelDotRadius","labelDotOrientation","labelsTransitionDuration"].map((function(e){return qg({},e,uy.linkProp(e))})))),dy=Xg("ringsLayer",Vv),fy=Object.assign.apply(Object,Gg(["ringsData","ringLat","ringLng","ringAltitude","ringColor","ringResolution","ringMaxRadius","ringPropagationSpeed","ringRepeatPeriod"].map((function(e){return qg({},e,dy.linkProp(e))})))),py=Xg("customLayer",jv),my=Object.assign.apply(Object,Gg(["customLayerData","customThreeObject","customThreeObjectUpdate"].map((function(e){return qg({},e,py.linkProp(e))})))),gy=ll({props:Cg(Cg(Cg(Cg(Cg(Cg(Cg(Cg(Cg(Cg(Cg({onGlobeReady:{triggerUpdate:!1},rendererSize:{default:new Wv.Vector2(window.innerWidth,window.innerHeight),onChange:function(e,t){t.pathsLayer.rendererSize(e)},triggerUpdate:!1}},Xv),Kv),ey),ny),ay),iy),Ay),cy),hy),fy),my),methods:Cg({getCoords:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Jg.apply(void 0,n)},toGeoCoords:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Kg.apply(void 0,n)}},Zv),stateInit:function(){return{globeLayer:iv(),pointsLayer:dv(),arcsLayer:vv(),hexBinLayer:wv(),polygonsLayer:Sv(),hexedPolygonsLayer:Rv(),pathsLayer:Ov(),tilesLayer:kv(),labelsLayer:Fv(),ringsLayer:Vv(),customLayer:jv()}},init:function(e,t,n){var r=n.animateIn,i=void 0===r||r,o=n.waitForGlobeReady,a=void 0===o||o;Yg(e),e.add(t.scene=new Wv.Group),t.scene.visible=!1,Qv.forEach((function(e){var n=new Wv.Group;t.scene.add(n),t[e](n)}));var s=function(){if(i){t.scene.scale.set(1e-6,1e-6,1e-6),new Sl.Tween({k:1e-6}).to({k:1},600).easing(Sl.Easing.Quadratic.Out).onUpdate((function(e){var n=e.k;return t.scene.scale.set(n,n,n)})).start();var e=new Wv.Vector3(0,1,0);new Sl.Tween({rot:2*Math.PI}).to({rot:0},1200).easing(Sl.Easing.Quintic.Out).onUpdate((function(n){var r=n.rot;return t.scene.setRotationFromAxisAngle(e,r)})).start()}t.scene.visible=!0,t.onGlobeReady&&t.onGlobeReady()};a?t.globeLayer.onReady(s):s(),function e(){requestAnimationFrame(e),Sl.update()}()},update:function(e){}});var vy=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(t){Dg(i,t);var r=Fg(i);function i(){var t;Rg(this,i);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return(t=r.call.apply(r,[this].concat(a))).__kapsuleInstance=e.apply(void 0,a).apply(void 0,[].concat(Gg(n?[zg(t)]:[]),a)),t}return Lg(i)}(t);return Object.keys(e()).forEach((function(e){return r.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}})),r}(gy,(window.THREE?window.THREE:{Group:Io}).Group,!0);const yy={type:"change"},xy={type:"start"},by={type:"end"};class _y extends ie{constructor(e,t){super(),void 0===t&&console.warn('THREE.TrackballControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.TrackballControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.');const n=this,r=-1,i=0,o=1,a=2,s=3,A=4;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:m.ROTATE,MIDDLE:m.DOLLY,RIGHT:m.PAN},this.target=new Be;const l=1e-6,c=new Be;let u=1,h=r,d=r,f=0,p=0,g=0;const v=new Be,y=new me,x=new me,b=new Be,_=new me,w=new me,M=new me,S=new me,E=[],T={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const C=function(){const e=new me;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),R=function(){const e=new me;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function P(e){!1!==n.enabled&&(0===E.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",L),n.domElement.addEventListener("pointerup",q)),function(e){E.push(e)}(e),"touch"===e.pointerType?function(e){if(1===(z(e),E.length))h=s,x.copy(R(E[0].pageX,E[0].pageY)),y.copy(x);else{h=A;const e=E[0].pageX-E[1].pageX,t=E[0].pageY-E[1].pageY;p=f=Math.sqrt(e*e+t*t);const n=(E[0].pageX+E[1].pageX)/2,r=(E[0].pageY+E[1].pageY)/2;M.copy(C(n,r)),S.copy(M)}n.dispatchEvent(xy)}(e):function(e){if(h===r)switch(e.button){case n.mouseButtons.LEFT:h=i;break;case n.mouseButtons.MIDDLE:h=o;break;case n.mouseButtons.RIGHT:h=a;break;default:h=r}const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||(M.copy(C(e.pageX,e.pageY)),S.copy(M)):(_.copy(C(e.pageX,e.pageY)),w.copy(_)):(x.copy(R(e.pageX,e.pageY)),y.copy(x));n.dispatchEvent(xy)}(e))}function L(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){if(1===(z(e),E.length))y.copy(x),x.copy(R(e.pageX,e.pageY));else{const t=function(e){const t=e.pointerId===E[0].pointerId?E[1]:E[0];return T[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;p=Math.sqrt(n*n+r*r);const i=(e.pageX+t.x)/2,o=(e.pageY+t.y)/2;S.copy(C(i,o))}}(e):function(e){const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||S.copy(C(e.pageX,e.pageY)):w.copy(C(e.pageX,e.pageY)):(y.copy(x),x.copy(R(e.pageX,e.pageY)))}(e))}function q(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(E.length){case 0:h=r;break;case 1:h=s,x.copy(R(e.pageX,e.pageY)),y.copy(x);break;case 2:h=A,x.copy(R(e.pageX-y.pageX,e.pageY-y.pageY)),y.copy(x)}n.dispatchEvent(by)}(e):(h=r,n.dispatchEvent(by)),N(e),0===E.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",L),n.domElement.removeEventListener("pointerup",q)))}function D(e){N(e)}function I(e){!1!==n.enabled&&(window.removeEventListener("keydown",I),d===r&&(e.code!==n.keys[i]||n.noRotate?e.code!==n.keys[o]||n.noZoom?e.code!==n.keys[a]||n.noPan||(d=a):d=o:d=i))}function O(){!1!==n.enabled&&(d=r,window.addEventListener("keydown",I))}function B(e){if(!1!==n.enabled&&!0!==n.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:_.y-=.025*e.deltaY;break;case 1:_.y-=.01*e.deltaY;break;default:_.y-=25e-5*e.deltaY}n.dispatchEvent(xy),n.dispatchEvent(by)}}function k(e){!1!==n.enabled&&e.preventDefault()}function N(e){delete T[e.pointerId];for(let t=0;t<E.length;t++)if(E[t].pointerId==e.pointerId)return void E.splice(t,1)}function z(e){let t=T[e.pointerId];void 0===t&&(t=new me,T[e.pointerId]=t),t.set(e.pageX,e.pageY)}this.rotateCamera=function(){const e=new Be,t=new Oe,r=new Be,i=new Be,o=new Be,a=new Be;return function(){a.set(x.x-y.x,x.y-y.y,0);let s=a.length();s?(v.copy(n.object.position).sub(n.target),r.copy(v).normalize(),i.copy(n.object.up).normalize(),o.crossVectors(i,r).normalize(),i.setLength(x.y-y.y),o.setLength(x.x-y.x),a.copy(i.add(o)),e.crossVectors(a,v).normalize(),s*=n.rotateSpeed,t.setFromAxisAngle(e,s),v.applyQuaternion(t),n.object.up.applyQuaternion(t),b.copy(e),g=s):!n.staticMoving&&g&&(g*=Math.sqrt(1-n.dynamicDampingFactor),v.copy(n.object.position).sub(n.target),t.setFromAxisAngle(b,g),v.applyQuaternion(t),n.object.up.applyQuaternion(t)),y.copy(x)}}(),this.zoomCamera=function(){let e;h===A?(e=f/p,f=p,n.object.isPerspectiveCamera?v.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(e=1+(w.y-_.y)*n.zoomSpeed,1!==e&&e>0&&(n.object.isPerspectiveCamera?v.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?_.copy(w):_.y+=(w.y-_.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new me,t=new Be,r=new Be;return function(){if(e.copy(S).sub(M),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(v.length()*n.panSpeed),r.copy(v).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?M.copy(S):M.add(e.subVectors(S,M).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(v.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,v.setLength(n.maxDistance)),_.copy(w)),v.lengthSq()<n.minDistance*n.minDistance&&(n.object.position.addVectors(n.target,v.setLength(n.minDistance)),_.copy(w)))},this.update=function(){v.subVectors(n.object.position,n.target),n.noRotate||n.rotateCamera(),n.noZoom||n.zoomCamera(),n.noPan||n.panCamera(),n.object.position.addVectors(n.target,v),n.object.isPerspectiveCamera?(n.checkDistances(),n.object.lookAt(n.target),c.distanceToSquared(n.object.position)>l&&(n.dispatchEvent(yy),c.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(c.distanceToSquared(n.object.position)>l||u!==n.object.zoom)&&(n.dispatchEvent(yy),c.copy(n.object.position),u=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){h=r,d=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),v.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(yy),c.copy(n.object.position),u=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",k),n.domElement.removeEventListener("pointerdown",P),n.domElement.removeEventListener("pointercancel",D),n.domElement.removeEventListener("wheel",B),n.domElement.removeEventListener("pointermove",L),n.domElement.removeEventListener("pointerup",q),window.removeEventListener("keydown",I),window.removeEventListener("keyup",O)},this.domElement.addEventListener("contextmenu",k),this.domElement.addEventListener("pointerdown",P),this.domElement.addEventListener("pointercancel",D),this.domElement.addEventListener("wheel",B,{passive:!1}),window.addEventListener("keydown",I),window.addEventListener("keyup",O),this.handleResize(),this.update()}}const wy={type:"change"},My={type:"start"},Sy={type:"end"};class Ey extends ie{constructor(e,t){super(),void 0===t&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new Be,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:m.ROTATE,MIDDLE:m.DOLLY,RIGHT:m.PAN},this.touches={ONE:g,TWO:y},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",Y),this._domElementKeyEvents=e},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(wy),n.update(),i=r.NONE},this.update=function(){const t=new Be,u=(new Oe).setFromUnitVectors(e.up,new Be(0,1,0)),h=u.clone().invert(),d=new Be,f=new Oe,p=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(u),a.setFromVector3(t),n.autoRotate&&i===r.NONE&&C(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(a.theta+=s.theta*n.dampingFactor,a.phi+=s.phi*n.dampingFactor):(a.theta+=s.theta,a.phi+=s.phi);let m=n.minAzimuthAngle,g=n.maxAzimuthAngle;return isFinite(m)&&isFinite(g)&&(m<-Math.PI?m+=p:m>Math.PI&&(m-=p),g<-Math.PI?g+=p:g>Math.PI&&(g-=p),a.theta=m<=g?Math.max(m,Math.min(g,a.theta)):a.theta>(m+g)/2?Math.max(m,a.theta):Math.min(g,a.theta)),a.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,a.phi)),a.makeSafe(),a.radius*=A,a.radius=Math.max(n.minDistance,Math.min(n.maxDistance,a.radius)),!0===n.enableDamping?n.target.addScaledVector(l,n.dampingFactor):n.target.add(l),t.setFromSpherical(a),t.applyQuaternion(h),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,l.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),l.set(0,0,0)),A=1,!!(c||d.distanceToSquared(n.object.position)>o||8*(1-f.dot(n.object.quaternion))>o)&&(n.dispatchEvent(wy),d.copy(n.object.position),f.copy(n.object.quaternion),c=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",X),n.domElement.removeEventListener("pointerdown",G),n.domElement.removeEventListener("pointercancel",W),n.domElement.removeEventListener("wheel",Q),n.domElement.removeEventListener("pointermove",V),n.domElement.removeEventListener("pointerup",j),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",Y)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const o=1e-6,a=new WA,s=new WA;let A=1;const l=new Be;let c=!1;const u=new me,h=new me,d=new me,f=new me,p=new me,b=new me,_=new me,w=new me,M=new me,S=[],E={};function T(){return Math.pow(.95,n.zoomSpeed)}function C(e){s.theta-=e}function R(e){s.phi-=e}const P=function(){const e=new Be;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),l.add(e)}}(),L=function(){const e=new Be;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),l.add(e)}}(),q=function(){const e=new Be;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),P(2*t*a/i.clientHeight,n.object.matrix),L(2*r*a/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(P(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),L(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function D(e){n.object.isPerspectiveCamera?A/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),c=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function I(e){n.object.isPerspectiveCamera?A*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),c=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function O(e){u.set(e.clientX,e.clientY)}function B(e){f.set(e.clientX,e.clientY)}function k(){if(1===S.length)u.set(S[0].pageX,S[0].pageY);else{const e=.5*(S[0].pageX+S[1].pageX),t=.5*(S[0].pageY+S[1].pageY);u.set(e,t)}}function N(){if(1===S.length)f.set(S[0].pageX,S[0].pageY);else{const e=.5*(S[0].pageX+S[1].pageX),t=.5*(S[0].pageY+S[1].pageY);f.set(e,t)}}function z(){const e=S[0].pageX-S[1].pageX,t=S[0].pageY-S[1].pageY,n=Math.sqrt(e*e+t*t);_.set(0,n)}function U(e){if(1==S.length)h.set(e.pageX,e.pageY);else{const t=K(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);h.set(n,r)}d.subVectors(h,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;C(2*Math.PI*d.x/t.clientHeight),R(2*Math.PI*d.y/t.clientHeight),u.copy(h)}function F(e){if(1===S.length)p.set(e.pageX,e.pageY);else{const t=K(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);p.set(n,r)}b.subVectors(p,f).multiplyScalar(n.panSpeed),q(b.x,b.y),f.copy(p)}function H(e){const t=K(e),r=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(r*r+i*i);w.set(0,o),M.set(0,Math.pow(w.y/_.y,n.zoomSpeed)),D(M.y),_.copy(w)}function G(e){!1!==n.enabled&&(0===S.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",V),n.domElement.addEventListener("pointerup",j)),function(e){S.push(e)}(e),"touch"===e.pointerType?function(e){switch(J(e),S.length){case 1:switch(n.touches.ONE){case g:if(!1===n.enableRotate)return;k(),i=r.TOUCH_ROTATE;break;case v:if(!1===n.enablePan)return;N(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case y:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&z(),n.enablePan&&N(),i=r.TOUCH_DOLLY_PAN;break;case x:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&z(),n.enableRotate&&k(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(My)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case m.DOLLY:if(!1===n.enableZoom)return;!function(e){_.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case m.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;B(e),i=r.PAN}else{if(!1===n.enableRotate)return;O(e),i=r.ROTATE}break;case m.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;O(e),i=r.ROTATE}else{if(!1===n.enablePan)return;B(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(My)}(e))}function V(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(J(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;U(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;F(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&H(e),n.enablePan&&F(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&H(e),n.enableRotate&&U(e)}(e),n.update();break;default:i=r.NONE}}(e):function(e){if(!1===n.enabled)return;switch(i){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){h.set(e.clientX,e.clientY),d.subVectors(h,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;C(2*Math.PI*d.x/t.clientHeight),R(2*Math.PI*d.y/t.clientHeight),u.copy(h),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){w.set(e.clientX,e.clientY),M.subVectors(w,_),M.y>0?D(T()):M.y<0&&I(T()),_.copy(w),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){p.set(e.clientX,e.clientY),b.subVectors(p,f).multiplyScalar(n.panSpeed),q(b.x,b.y),f.copy(p),n.update()}(e)}}(e))}function j(e){Z(e),0===S.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",V),n.domElement.removeEventListener("pointerup",j)),n.dispatchEvent(Sy),i=r.NONE}function W(e){Z(e)}function Q(e){!1!==n.enabled&&!1!==n.enableZoom&&i===r.NONE&&(e.preventDefault(),n.dispatchEvent(My),function(e){e.deltaY<0?I(T()):e.deltaY>0&&D(T()),n.update()}(e),n.dispatchEvent(Sy))}function Y(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:q(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:q(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:q(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:q(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function X(e){!1!==n.enabled&&e.preventDefault()}function Z(e){delete E[e.pointerId];for(let t=0;t<S.length;t++)if(S[t].pointerId==e.pointerId)return void S.splice(t,1)}function J(e){let t=E[e.pointerId];void 0===t&&(t=new me,E[e.pointerId]=t),t.set(e.pageX,e.pageY)}function K(e){const t=e.pointerId===S[0].pointerId?S[1]:S[0];return E[t.pointerId]}n.domElement.addEventListener("contextmenu",X),n.domElement.addEventListener("pointerdown",G),n.domElement.addEventListener("pointercancel",W),n.domElement.addEventListener("wheel",Q,{passive:!1}),this.update()}}const Ty={type:"change"};class Cy extends ie{constructor(e,t){super(),void 0===t&&(console.warn('THREE.FlyControls: The second parameter "domElement" is now mandatory.'),t=document),this.object=e,this.domElement=t,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=1e-6,i=new Oe,o=new Be;this.tmpQuaternion=new Oe,this.mouseStatus=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new Be(0,0,0),this.rotationVector=new Be(0,0,0),this.keydown=function(e){if(!e.altKey){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.mousedown=function(e){if(this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.mousemove=function(e){if(!this.dragToLook||this.mouseStatus>0){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.mouseup=function(e){if(this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){const t=e*n.movementSpeed,a=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*a,n.rotationVector.y*a,n.rotationVector.z*a,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(o.distanceToSquared(n.object.position)>r||8*(1-i.dot(n.object.quaternion))>r)&&(n.dispatchEvent(Ty),i.copy(n.object.quaternion),o.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",Ry),this.domElement.removeEventListener("mousedown",s),this.domElement.removeEventListener("mousemove",a),this.domElement.removeEventListener("mouseup",A),window.removeEventListener("keydown",l),window.removeEventListener("keyup",c)};const a=this.mousemove.bind(this),s=this.mousedown.bind(this),A=this.mouseup.bind(this),l=this.keydown.bind(this),c=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",Ry),this.domElement.addEventListener("mousemove",a),this.domElement.addEventListener("mousedown",s),this.domElement.addEventListener("mouseup",A),window.addEventListener("keydown",l),window.addEventListener("keyup",c),this.updateMovementVector(),this.updateRotationVector()}}function Ry(e){e.preventDefault()}var Py={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\t\t}"};class Ly{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const qy=new lr(-1,1,1,-1,0,1),Dy=new dn;Dy.setAttribute("position",new on([-1,3,0,-1,-1,0,3,-1,0],3)),Dy.setAttribute("uv",new on([0,2,0,0,2,0],2));class Iy{constructor(e){this._mesh=new Ln(Dy,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,qy)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class Oy extends Ly{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof kn?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=Bn.clone(e.uniforms),this.material=new kn({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new Iy(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}}class By extends Ly{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let o,a;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),i.buffers.stencil.setClear(a),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class ky extends Ly{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class Ny{constructor(e,t){if(this.renderer=e,void 0===t){const n={minFilter:R,magFilter:R,format:k},r=e.getSize(new me);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new De(this._width*this._pixelRatio,this._height*this._pixelRatio,n)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],void 0===Py&&console.error("THREE.EffectComposer relies on CopyShader"),void 0===Oy&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new Oy(Py),this.clock=new CA}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let t=0,r=this.passes.length;t<r;t++){const r=this.passes[t];if(!1!==r.enabled){if(r.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(t),r.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),r.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==By&&(r instanceof By?n=!0:r instanceof ky&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new me);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(let e=0;e<this.passes.length;e++)this.passes[e].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}}new lr(-1,1,1,-1,0,1);const zy=new dn;zy.setAttribute("position",new on([-1,3,0,-1,-1,0,3,-1,0],3)),zy.setAttribute("uv",new on([0,2,0,0,2,0],2));class Uy extends Ly{constructor(e,t,n,r,i){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=void 0!==i?i:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new Ee}render(e,t,n){const r=e.autoClear;let i,o;e.autoClear=!1,void 0!==this.overrideMaterial&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),i=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,i),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=o),e.autoClear=r}}function Fy(){return Fy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fy.apply(this,arguments)}function Hy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gy(e,t){return Gy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Gy(e,t)}function Vy(e){return Vy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vy(e)}function jy(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Wy(e,t,n){return Wy=jy()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Gy(i,n.prototype),i},Wy.apply(null,arguments)}function Qy(e){var t="function"==typeof Map?new Map:void 0;return Qy=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Wy(e,arguments,Vy(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Gy(r,e)},Qy(e)}var Yy={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found and no default was provided.\n\n",75:"important requires a valid style object, got a %s instead.\n\n",76:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",77:'remToPx expects a value in "rem" but you provided it in "%s".\n\n',78:'base must be set in "px" or "%" but you set it in "%s".\n'};function Xy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0],o=[];for(r=1;r<t.length;r+=1)o.push(t[r]);return o.forEach((function(e){i=i.replace(/%[a-z]/,e)})),i}var Zy=function(e){var t,n;function r(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Hy(e.call(this,Xy.apply(void 0,[Yy[t]].concat(r)))||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Gy(t,n),r}(Qy(Error));function Jy(e){return Math.round(255*e)}function Ky(e,t,n){return Jy(e)+","+Jy(t)+","+Jy(n)}function $y(e,t,n,r){if(void 0===r&&(r=Ky),0===t)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,a=o*(1-Math.abs(i%2-1)),s=0,A=0,l=0;i>=0&&i<1?(s=o,A=a):i>=1&&i<2?(s=a,A=o):i>=2&&i<3?(A=o,l=a):i>=3&&i<4?(A=a,l=o):i>=4&&i<5?(s=a,l=o):i>=5&&i<6&&(s=o,l=a);var c=n-o/2;return r(s+c,A+c,l+c)}var ex={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var tx=/^#[a-fA-F0-9]{6}$/,nx=/^#[a-fA-F0-9]{8}$/,rx=/^#[a-fA-F0-9]{3}$/,ix=/^#[a-fA-F0-9]{4}$/,ox=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,ax=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,sx=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Ax=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function lx(e){if("string"!=typeof e)throw new Zy(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return ex[t]?"#"+ex[t]:e}(e);if(t.match(tx))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(nx)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(rx))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(ix)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=ox.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=ax.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var a=sx.exec(t);if(a){var s="rgb("+$y(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",A=ox.exec(s);if(!A)throw new Zy(4,t,s);return{red:parseInt(""+A[1],10),green:parseInt(""+A[2],10),blue:parseInt(""+A[3],10)}}var l=Ax.exec(t.substring(0,50));if(l){var c="rgb("+$y(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",u=ox.exec(c);if(!u)throw new Zy(4,t,c);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10),alpha:parseFloat(""+l[4])}}throw new Zy(5)}var cx=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function ux(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function hx(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return cx("#"+ux(e)+ux(t)+ux(n));if("object"==typeof e&&void 0===t&&void 0===n)return cx("#"+ux(e.red)+ux(e.green)+ux(e.blue));throw new Zy(6)}function dx(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):dx(e,t,r)}}function fx(e){return dx(e,e.length,[])}function px(e,t){if("transparent"===t)return t;var n,r,i,o=lx(t),a="number"==typeof o.alpha?o.alpha:1;return function(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var i=lx(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?hx(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?hx(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Zy(7)}(Fy({},o,{alpha:(n=0,r=1,i=(100*a+100*parseFloat(e))/100,Math.max(n,Math.min(r,i)))}))}var mx=fx(px);function gx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||xx(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yx(e){return function(e){if(Array.isArray(e))return bx(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xx(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xx(e,t){if(e){if("string"==typeof e)return bx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bx(e,t):void 0}}function bx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");var _x=window.THREE?window.THREE:{WebGLRenderer:Uo,Scene:Fo,PerspectiveCamera:zn,Raycaster:class{constructor(e,t,n=0,r=1/0){this.ray=new ht(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new Mt,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return jA(e,this,n,t),n.sort(VA),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)jA(e[r],this,n,t);return n.sort(VA),n}},TextureLoader:AA,Vector2:me,Vector3:Be,Box3:ze,Color:Ee,Mesh:Ln,SphereGeometry:Is,MeshBasicMaterial:Kt,BackSide:1,EventDispatcher:ie,MOUSE:m,Quaternion:Oe,Spherical:WA,Clock:CA},wx=ll({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&Td(e.tooltipContent)(t)||"",e.hoverObj=t)}Sl.update()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var i=e.camera;if(t&&e.initialised){var o=t,a=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},i.position),A=u();new Sl.Tween(s).to(o,r).easing(Sl.Easing.Quadratic.Out).onUpdate(l).start(),new Sl.Tween(A).to(a,r/3).easing(Sl.Easing.Quadratic.Out).onUpdate(c).start()}else l(o),c(a);return this}return Object.assign({},i.position,{lookAt:u()});function l(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(i.position.x=t),void 0!==n&&(i.position.y=n),void 0!==r&&(i.position.z=r)}function c(t){var n=new _x.Vector3(t.x,t.y,t.z);e.controls.target?e.controls.target=n:i.lookAt(n)}function u(){return Object.assign(new _x.Vector3(0,0,-1e3).applyQuaternion(i.quaternion).add(i.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return this.fitToBbox(this.getBbox.apply(this,i),t,n)},fitToBbox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,i=e.camera;if(t){var o=new _x.Vector3(0,0,0),a=2*Math.max.apply(Math,yx(Object.entries(t).map((function(e){var t=vx(e,2),n=t[0],r=t[1];return Math.max.apply(Math,yx(r.map((function(e){return Math.abs(o[n]-e)}))))})))),s=(1-2*r/e.height)*i.fov,A=a/Math.atan(s*Math.PI/180),l=A/i.aspect,c=Math.max(A,l);if(c>0){var u=o.clone().sub(i.position).normalize().multiplyScalar(-c);this.cameraPosition(u,o,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new _x.Box3(new _x.Vector3(0,0,0),new _x.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,yx(["x","y","z"].map((function(e){return gx({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var i=new _x.Vector3(t,n,r);return i.project(this.camera()),{x:(i.x+1)*e.width/2,y:-(i.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=new _x.Vector2(t/e.width*2-1,-n/e.height*2+1),o=new _x.Raycaster;return o.setFromCamera(i,e.camera),Object.assign({},o.ray.at(r,new _x.Vector3))},intersectingObjects:function(e,t,n){var r=new _x.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new _x.Raycaster;return i.params.Line.threshold=e.lineHoverPrecision,i.setFromCamera(r,e.camera),i.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new _x.Scene,camera:new _x.PerspectiveCamera,clock:new _x.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,o=n.rendererConfig,a=void 0===o?{}:o,s=n.extraRenderers,A=void 0===s?[]:s,l=n.waitForLoadComplete,c=void 0===l||l;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new _x.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=(i=t.container,o=i.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,{top:o.top+s,left:o.left+a});t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, 21px)")}var i,o,a,s}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new _x.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},a)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=A,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new Ny(t.renderer),t.postProcessingComposer.addPass(new Uy(t.scene,t.camera)),t.controls=new{trackball:_y,orbit:Ey,fly:Cy}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(yx(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new _x.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!c,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width=e.width,e.container.style.height=e.height,[e.renderer,e.postProcessingComposer].concat(yx(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=e.skyRadius),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new _x.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=lx(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new _x.Color(mx(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new _x.TextureLoader).load(e.backgroundImageUrl,(function(t){e.skysphere.material=new _x.MeshBasicMaterial({map:t,side:_x.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}});function Mx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mx(Object(n),!0).forEach((function(t){Ex(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ex(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tx(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Cx(e){return function(e){if(Array.isArray(e))return Rx(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rx(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Px(e,t){var n=new t;return{linkProp:function(t){return{default:n[t](),onChange:function(n,r){r[e][t](n)},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=n[e],i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=r[t].apply(r,o);return s===r?this:s}}}}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".scene-container .clickable {\n cursor: pointer;\n}");var Lx=["rendererConfig","waitForGlobeReady"],qx=window.THREE?window.THREE:{AmbientLight:bA,DirectionalLight:xA,Vector2:me},Dx=Px("globe",vy),Ix=Object.assign.apply(Object,Cx(["globeImageUrl","bumpImageUrl","showGlobe","showGraticules","showAtmosphere","atmosphereColor","atmosphereAltitude","globeMaterial","onGlobeReady","pointsData","pointLat","pointLng","pointColor","pointAltitude","pointRadius","pointResolution","pointsMerge","pointsTransitionDuration","arcsData","arcStartLat","arcStartLng","arcEndLat","arcEndLng","arcColor","arcAltitude","arcAltitudeAutoScale","arcStroke","arcCurveResolution","arcCircularResolution","arcDashLength","arcDashGap","arcDashInitialGap","arcDashAnimateTime","arcsTransitionDuration","polygonsData","polygonGeoJsonGeometry","polygonCapColor","polygonCapMaterial","polygonSideColor","polygonSideMaterial","polygonStrokeColor","polygonAltitude","polygonCapCurvatureResolution","polygonsTransitionDuration","pathsData","pathPoints","pathPointLat","pathPointLng","pathPointAlt","pathResolution","pathColor","pathStroke","pathDashLength","pathDashGap","pathDashInitialGap","pathDashAnimateTime","pathTransitionDuration","hexBinPointsData","hexBinPointLat","hexBinPointLng","hexBinPointWeight","hexBinResolution","hexMargin","hexTopCurvatureResolution","hexTopColor","hexSideColor","hexAltitude","hexBinMerge","hexTransitionDuration","hexPolygonsData","hexPolygonGeoJsonGeometry","hexPolygonColor","hexPolygonAltitude","hexPolygonResolution","hexPolygonMargin","hexPolygonCurvatureResolution","hexPolygonsTransitionDuration","tilesData","tileLat","tileLng","tileAltitude","tileWidth","tileHeight","tileUseGlobeProjection","tileMaterial","tileCurvatureResolution","tilesTransitionDuration","ringsData","ringLat","ringLng","ringAltitude","ringColor","ringResolution","ringMaxRadius","ringPropagationSpeed","ringRepeatPeriod","labelsData","labelLat","labelLng","labelAltitude","labelRotation","labelText","labelSize","labelTypeFace","labelColor","labelResolution","labelIncludeDot","labelDotRadius","labelDotOrientation","labelsTransitionDuration","customLayerData","customThreeObject","customThreeObjectUpdate"].map((function(e){return Ex({},e,Dx.linkProp(e))})))),Ox=Object.assign.apply(Object,Cx(["getCoords","toGeoCoords"].map((function(e){return Ex({},e,Dx.linkMethod(e))})))),Bx=Px("renderObjs",wx),kx=Object.assign.apply(Object,Cx(["width","height","backgroundColor","backgroundImageUrl","enablePointerInteraction"].map((function(e){return Ex({},e,Bx.linkProp(e))})))),Nx=Object.assign.apply(Object,Cx(["postProcessingComposer"].map((function(e){return Ex({},e,Bx.linkMethod(e))})))),zx=ll({props:Sx(Sx({onZoom:{triggerUpdate:!1},onGlobeClick:{triggerUpdate:!1},onGlobeRightClick:{triggerUpdate:!1},pointLabel:{default:"name",triggerUpdate:!1},onPointClick:{triggerUpdate:!1},onPointRightClick:{triggerUpdate:!1},onPointHover:{triggerUpdate:!1},arcLabel:{default:"name",triggerUpdate:!1},onArcClick:{triggerUpdate:!1},onArcRightClick:{triggerUpdate:!1},onArcHover:{triggerUpdate:!1},polygonLabel:{default:"name",triggerUpdate:!1},onPolygonClick:{triggerUpdate:!1},onPolygonRightClick:{triggerUpdate:!1},onPolygonHover:{triggerUpdate:!1},pathLabel:{default:"name",triggerUpdate:!1},onPathClick:{triggerUpdate:!1},onPathRightClick:{triggerUpdate:!1},onPathHover:{triggerUpdate:!1},hexLabel:{triggerUpdate:!1},onHexClick:{triggerUpdate:!1},onHexRightClick:{triggerUpdate:!1},onHexHover:{triggerUpdate:!1},hexPolygonLabel:{triggerUpdate:!1},onHexPolygonClick:{triggerUpdate:!1},onHexPolygonRightClick:{triggerUpdate:!1},onHexPolygonHover:{triggerUpdate:!1},tileLabel:{default:"name",triggerUpdate:!1},onTileClick:{triggerUpdate:!1},onTileRightClick:{triggerUpdate:!1},onTileHover:{triggerUpdate:!1},labelLabel:{triggerUpdate:!1},onLabelClick:{triggerUpdate:!1},onLabelRightClick:{triggerUpdate:!1},onLabelHover:{triggerUpdate:!1},customLayerLabel:{default:"name",triggerUpdate:!1},onCustomLayerClick:{triggerUpdate:!1},onCustomLayerRightClick:{triggerUpdate:!1},onCustomLayerHover:{triggerUpdate:!1},pointerEventsFilter:{default:function(){return!0},triggerUpdate:!1,onChange:function(e,t){return t.renderObjs.hoverFilter((function(t){return e(t,t.__data)}))}},lineHoverPrecision:{default:.2,triggerUpdate:!1,onChange:function(e,t){return t.renderObjs.lineHoverPrecision(e)}}},Ix),kx),methods:Sx(Sx({pauseAnimation:function(e){return null!==e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return null===e.animationFrameRequestId&&this._animationCycle(),this},_animationCycle:function(e){e.renderObjs.tick(),e.animationFrameRequestId=requestAnimationFrame(this._animationCycle)},pointOfView:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=o();if(void 0===t.lat&&void 0===t.lng&&void 0===t.altitude)return r;var i=Object.assign({},r,t);if(["lat","lng","altitude"].forEach((function(e){return i[e]=+i[e]})),n){for(;r.lng-i.lng>180;)r.lng-=360;for(;r.lng-i.lng<-180;)r.lng+=360;new Sl.Tween(r).to(i,n).easing(Sl.Easing.Cubic.InOut).onUpdate(a).start()}else a(i);return this;function o(){return e.globe.toGeoCoords(e.renderObjs.cameraPosition())}function a(t){var n=t.lat,r=t.lng,i=t.altitude;e.renderObjs.cameraPosition(e.globe.getCoords(n,r,i))}},getScreenCoords:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=(t=e.globe).getCoords.apply(t,r);return e.renderObjs.getScreenCoords(o.x,o.y,o.z)},toGlobeCoords:function(e,t,n){var r=e.renderObjs.intersectingObjects(t,n).find((function(e){return"globe"===e.object.__globeObjType}));if(!r)return null;var i=e.globe.toGeoCoords(r.point);return{lat:i.lat,lng:i.lng}},scene:function(e){return e.renderObjs.scene()},camera:function(e){return e.renderObjs.camera()},renderer:function(e){return e.renderObjs.renderer()},controls:function(e){return e.renderObjs.controls()},_destructor:function(){this.pauseAnimation(),this.pointsData([]),this.arcsData([]),this.polygonsData([]),this.pathsData([]),this.hexBinPointsData([]),this.hexPolygonsData([]),this.tilesData([]),this.labelsData([]),this.customLayerData([])}},Ox),Nx),stateInit:function(e){var t=e.rendererConfig,n=e.waitForGlobeReady,r=void 0===n||n,i=Tx(e,Lx);return{globe:new vy(Sx({waitForGlobeReady:r},i)),renderObjs:wx({controlType:"orbit",rendererConfig:t,waitForLoadComplete:r}).skyRadius(5e4).showNavInfo(!1)}},init:function(e,t){var n=this;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.style.position="relative";var r=document.createElement("div");t.container.appendChild(r),t.renderObjs(r),t.globe.rendererSize(t.renderObjs.renderer().getSize(new qx.Vector2)),this.pointOfView({altitude:2.5});var i=t.renderObjs.controls();i.minDistance=101,setTimeout((function(){return i.maxDistance=1e4})),i.enablePan=!1,i.enableDamping=!0,i.dampingFactor=.1,i.rotateSpeed=.3,i.zoomSpeed=.3,i.addEventListener("change",(function(){var e=n.pointOfView();i.rotateSpeed=.2*e.altitude,i.zoomSpeed=.1*(e.altitude+1),t.onZoom&&t.onZoom(e)}));var o=function(e){for(var t=e;t&&!t.hasOwnProperty("__globeObjType");)t=t.parent;return t},a={point:function(e){return e},arc:function(e){return e},polygon:function(e){return e.data},path:function(e){return e},hexbin:function(e){return e},hexPolygon:function(e){return e},tile:function(e){return e},label:function(e){return e},custom:function(e){return e}};t.renderObjs.objects([new qx.AmbientLight(12303291),new qx.DirectionalLight(16777215,.6),t.globe]).hoverOrderComparator((function(e,t){var n=o(e),r=o(t),i=function(e){return!e};return i(n)-i(r)})).tooltipContent((function(e){var n={point:t.pointLabel,arc:t.arcLabel,polygon:t.polygonLabel,path:t.pathLabel,hexbin:t.hexLabel,hexPolygon:t.hexPolygonLabel,tile:t.tileLabel,label:t.labelLabel,custom:t.customLayerLabel},r=o(e),i=r&&r.__globeObjType;return r&&i&&n.hasOwnProperty(i)&&a.hasOwnProperty(i)&&Td(n[i])(a[i](r.__data))||""})).onHover((function(e){var n={point:t.onPointHover,arc:t.onArcHover,polygon:t.onPolygonHover,path:t.onPathHover,hexbin:t.onHexHover,hexPolygon:t.onHexPolygonHover,tile:t.onTileHover,label:t.onLabelHover,custom:t.onCustomLayerHover},r={globe:t.onGlobeClick,point:t.onPointClick,arc:t.onArcClick,polygon:t.onPolygonClick,path:t.onPathClick,hexbin:t.onHexClick,hexPolygon:t.onHexPolygonClick,tile:t.onTileClick,label:t.onLabelClick,custom:t.onCustomLayerClick},i=o(e);if(i&&!n.hasOwnProperty(i.__globeObjType)&&(i=null),i!==t.hoverObj){var s=t.hoverObj?t.hoverObj.__globeObjType:null,A=t.hoverObj?a[s](t.hoverObj.__data):null,l=i?i.__globeObjType:null,c=i?a[l](i.__data):null;s&&s!==l&&n[s]&&n[s](null,A),l&&n[l]&&n[l](c,s===l?A:null),t.renderObjs.renderer().domElement.classList[l&&r[l]?"add":"remove"]("clickable"),t.hoverObj=i}})).onClick((function(e,r,i){if(e){var s={globe:t.onGlobeClick,point:t.onPointClick,arc:t.onArcClick,polygon:t.onPolygonClick,path:t.onPathClick,hexbin:t.onHexClick,hexPolygon:t.onHexPolygonClick,tile:t.onTileClick,label:t.onLabelClick,custom:t.onCustomLayerClick},A=o(e),l=A.__globeObjType;if(A&&s.hasOwnProperty(l)&&s[l]){var c=[r];if("globe"===l){var u=n.toGeoCoords(i),h=u.lat,d=u.lng;c.unshift({lat:h,lng:d})}else c.push(n.toGeoCoords(i));a.hasOwnProperty(l)&&c.unshift(a[l](A.__data)),s[l].apply(s,c)}}})).onRightClick((function(e,r,i){if(e){var s={globe:t.onGlobeRightClick,point:t.onPointRightClick,arc:t.onArcRightClick,polygon:t.onPolygonRightClick,path:t.onPathRightClick,hexbin:t.onHexRightClick,hexPolygon:t.onHexPolygonRightClick,tile:t.onTileRightClick,label:t.onLabelRightClick,custom:t.onCustomLayerRightClick},A=o(e),l=A.__globeObjType;if(A&&s.hasOwnProperty(l)&&s[l]){var c=[r];if("globe"===l){var u=n.toGeoCoords(i),h=u.lat,d=u.lng;c.unshift({lat:h,lng:d})}else c.push(n.toGeoCoords(i));a.hasOwnProperty(l)&&c.unshift(a[l](A.__data)),s[l].apply(s,c)}}})),this._animationCycle()}}),Ux={exports:{}},Fx={exports:{}},Hx={};!function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,A=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var p=e.type;switch(p){case A:case l:case r:case o:case i:case u:return p;default:var m=p&&p.$$typeof;switch(m){case s:case c:case f:case d:case a:return m;default:return h}}case n:return h}}}var x=A,b=l,_=s,w=a,M=t,S=c,E=r,T=f,C=d,R=n,P=o,L=i,q=u,D=!1;function I(e){return y(e)===l}Hx.AsyncMode=x,Hx.ConcurrentMode=b,Hx.ContextConsumer=_,Hx.ContextProvider=w,Hx.Element=M,Hx.ForwardRef=S,Hx.Fragment=E,Hx.Lazy=T,Hx.Memo=C,Hx.Portal=R,Hx.Profiler=P,Hx.StrictMode=L,Hx.Suspense=q,Hx.isAsyncMode=function(e){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(e)||y(e)===A},Hx.isConcurrentMode=I,Hx.isContextConsumer=function(e){return y(e)===s},Hx.isContextProvider=function(e){return y(e)===a},Hx.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Hx.isForwardRef=function(e){return y(e)===c},Hx.isFragment=function(e){return y(e)===r},Hx.isLazy=function(e){return y(e)===f},Hx.isMemo=function(e){return y(e)===d},Hx.isPortal=function(e){return y(e)===n},Hx.isProfiler=function(e){return y(e)===o},Hx.isStrictMode=function(e){return y(e)===i},Hx.isSuspense=function(e){return y(e)===u},Hx.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===o||e===i||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===p)},Hx.typeOf=y}(),Fx.exports=Hx;var Gx=Object.getOwnPropertySymbols,Vx=Object.prototype.hasOwnProperty,jx=Object.prototype.propertyIsEnumerable;function Wx(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var Qx,Yx=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=Wx(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))Vx.call(n,a)&&(i[a]=n[a]);if(Gx){r=Gx(n);for(var s=0;s<r.length;s++)jx.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},Xx="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Zx=Function.call.bind(Object.prototype.hasOwnProperty),Jx={},Kx=Zx;function $x(e,t,n,r,i){for(var o in e)if(Kx(e,o)){var a;try{if("function"!=typeof e[o]){var s=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[o](t,o,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}if(!a||a instanceof Error||Qx((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in Jx)){Jx[a.message]=!0;var A=i?i():"";Qx("Failed "+n+" type: "+a.message+(null!=A?A:""))}}}Qx=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},$x.resetWarningCache=function(){Jx={}};var eb,tb=$x,nb=Fx.exports,rb=Yx,ib=Xx,ob=Zx,ab=tb;function sb(){return null}eb=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};var Ab=Fx.exports;Ux.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r="<<anonymous>>",i={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:s(sb),arrayOf:function(e){return s((function(t,n,r,i,o){if("function"!=typeof e)return new a("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new a("Invalid "+i+" `"+o+"` of type `"+u(s)+"` supplied to `"+r+"`, expected an array.");for(var A=0;A<s.length;A++){var l=e(s,A,r,i,o+"["+A+"]",ib);if(l instanceof Error)return l}return null}))},element:s((function(t,n,r,i,o){var s=t[n];return e(s)?null:new a("Invalid "+i+" `"+o+"` of type `"+u(s)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:s((function(e,t,n,r,i){var o=e[t];return nb.isValidElementType(o)?null:new a("Invalid "+r+" `"+i+"` of type `"+u(o)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return s((function(t,n,i,o,s){if(!(t[n]instanceof e)){var A=e.name||r;return new a("Invalid "+o+" `"+s+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:r)+"` supplied to `"+i+"`, expected instance of `"+A+"`.")}var l;return null}))},node:s((function(e,t,n,r,i){return c(e[t])?null:new a("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return s((function(t,n,r,i,o){if("function"!=typeof e)return new a("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],A=u(s);if("object"!==A)return new a("Invalid "+i+" `"+o+"` of type `"+A+"` supplied to `"+r+"`, expected an object.");for(var l in s)if(ob(s,l)){var c=e(s,l,r,i,o+"."+l,ib);if(c instanceof Error)return c}return null}))},oneOf:function(e){if(!Array.isArray(e))return eb(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),sb;function t(t,n,r,i,s){for(var A=t[n],l=0;l<e.length;l++)if(o(A,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===h(t)?String(t):t}));return new a("Invalid "+i+" `"+s+"` of value `"+String(A)+"` supplied to `"+r+"`, expected one of "+c+".")}return s(t)},oneOfType:function(e){if(!Array.isArray(e))return eb("Invalid argument supplied to oneOfType, expected an instance of array."),sb;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return eb("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(n)+" at index "+t+"."),sb}return s((function(t,n,r,i,o){for(var s=[],A=0;A<e.length;A++){var l=(0,e[A])(t,n,r,i,o,ib);if(null==l)return null;l.data&&ob(l.data,"expectedType")&&s.push(l.data.expectedType)}return new a("Invalid "+i+" `"+o+"` supplied to `"+r+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return s((function(t,n,r,i,o){var s=t[n],A=u(s);if("object"!==A)return new a("Invalid "+i+" `"+o+"` of type `"+A+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return l(r,i,o,c,h(d));var f=d(s,c,r,i,o+"."+c,ib);if(f)return f}return null}))},exact:function(e){return s((function(t,n,r,i,o){var s=t[n],A=u(s);if("object"!==A)return new a("Invalid "+i+" `"+o+"` of type `"+A+"` supplied to `"+r+"`, expected `object`.");var c=rb({},t[n],e);for(var d in c){var f=e[d];if(ob(e,d)&&"function"!=typeof f)return l(r,i,o,d,h(f));if(!f)return new a("Invalid "+i+" `"+o+"` key `"+d+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=f(s,d,r,i,o+"."+d,ib);if(p)return p}return null}))}};function o(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function a(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function s(e){var n={},i=0;function o(o,s,A,l,c,u,h){if(l=l||r,u=u||A,h!==ib){if(t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("undefined"!=typeof console){var f=l+":"+A;!n[f]&&i<3&&(eb("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[f]=!0,i++)}}return null==s[A]?o?null===s[A]?new a("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `null`."):new a("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(s,A,l,c,u)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function A(e){return s((function(t,n,r,i,o,s){var A=t[n];return u(A)!==e?new a("Invalid "+i+" `"+o+"` of type `"+h(A)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function l(e,t,n,r,i){return new a((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!c(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function u(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function h(e){if(null==e)return""+e;var t=u(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=h(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return a.prototype=Error.prototype,i.checkPropTypes=ab,i.resetWarningCache=ab.resetWarningCache,i.PropTypes=i,i}(Ab.isElement,!0);var lb=Ux.exports,cb={width:lb.number,height:lb.number,backgroundColor:lb.string,backgroundImageUrl:lb.string,globeImageUrl:lb.string,bumpImageUrl:lb.string,showGlobe:lb.bool,showGraticules:lb.bool,showAtmosphere:lb.bool,atmosphereColor:lb.string,atmosphereAltitude:lb.number,globeMaterial:lb.object,onGlobeReady:lb.func,onGlobeClick:lb.func,onGlobeRightClick:lb.func,pointsData:lb.arrayOf(lb.object),pointLat:lb.oneOfType([lb.number,lb.string,lb.func]),pointLng:lb.oneOfType([lb.number,lb.string,lb.func]),pointColor:lb.oneOfType([lb.string,lb.func]),pointAltitude:lb.oneOfType([lb.number,lb.string,lb.func]),pointRadius:lb.oneOfType([lb.number,lb.string,lb.func]),pointResolution:lb.number,pointsMerge:lb.bool,pointsTransitionDuration:lb.number,pointLabel:lb.oneOfType([lb.string,lb.func]),onPointClick:lb.func,onPointRightClick:lb.func,onPointHover:lb.func,arcsData:lb.arrayOf(lb.object),arcStartLat:lb.oneOfType([lb.number,lb.string,lb.func]),arcStartLng:lb.oneOfType([lb.number,lb.string,lb.func]),arcEndLat:lb.oneOfType([lb.number,lb.string,lb.func]),arcEndLng:lb.oneOfType([lb.number,lb.string,lb.func]),arcColor:lb.oneOfType([lb.string,lb.arrayOf(lb.string),lb.func]),arcAltitude:lb.oneOfType([lb.number,lb.string,lb.func]),arcAltitudeAutoScale:lb.oneOfType([lb.number,lb.string,lb.func]),arcStroke:lb.oneOfType([lb.number,lb.string,lb.func]),arcCurveResolution:lb.number,arcCircularResolution:lb.number,arcDashLength:lb.oneOfType([lb.number,lb.string,lb.func]),arcDashGap:lb.oneOfType([lb.number,lb.string,lb.func]),arcDashInitialGap:lb.oneOfType([lb.number,lb.string,lb.func]),arcDashAnimateTime:lb.oneOfType([lb.number,lb.string,lb.func]),arcsTransitionDuration:lb.number,arcLabel:lb.oneOfType([lb.string,lb.func]),onArcClick:lb.func,onArcRightClick:lb.func,onArcHover:lb.func,polygonsData:lb.arrayOf(lb.object),polygonGeoJsonGeometry:lb.oneOfType([lb.string,lb.func]),polygonCapColor:lb.oneOfType([lb.string,lb.func]),polygonCapMaterial:lb.oneOfType([lb.object,lb.string,lb.func]),polygonSideColor:lb.oneOfType([lb.string,lb.func]),polygonSideMaterial:lb.oneOfType([lb.object,lb.string,lb.func]),polygonStrokeColor:lb.oneOfType([lb.string,lb.func]),polygonAltitude:lb.oneOfType([lb.number,lb.string,lb.func]),polygonCapCurvatureResolution:lb.oneOfType([lb.number,lb.string,lb.func]),polygonsTransitionDuration:lb.number,polygonLabel:lb.oneOfType([lb.string,lb.func]),onPolygonClick:lb.func,onPolygonRightClick:lb.func,onPolygonHover:lb.func,pathsData:lb.array,pathPoints:lb.oneOfType([lb.array,lb.string,lb.func]),pathPointLat:lb.oneOfType([lb.number,lb.string,lb.func]),pathPointLng:lb.oneOfType([lb.number,lb.string,lb.func]),pathPointAlt:lb.oneOfType([lb.number,lb.string,lb.func]),pathResolution:lb.number,pathColor:lb.oneOfType([lb.string,lb.arrayOf(lb.string),lb.func]),pathStroke:lb.oneOfType([lb.number,lb.string,lb.func]),pathDashLength:lb.oneOfType([lb.number,lb.string,lb.func]),pathDashGap:lb.oneOfType([lb.number,lb.string,lb.func]),pathDashInitialGap:lb.oneOfType([lb.number,lb.string,lb.func]),pathDashAnimateTime:lb.oneOfType([lb.number,lb.string,lb.func]),pathTransitionDuration:lb.number,pathLabel:lb.oneOfType([lb.string,lb.func]),onPathClick:lb.func,onPathRightClick:lb.func,onPathHover:lb.func,hexBinPointsData:lb.arrayOf(lb.object),hexBinPointLat:lb.oneOfType([lb.number,lb.string,lb.func]),hexBinPointLng:lb.oneOfType([lb.number,lb.string,lb.func]),hexBinPointWeight:lb.oneOfType([lb.number,lb.string,lb.func]),hexBinResolution:lb.number,hexMargin:lb.oneOfType([lb.number,lb.func]),hexTopColor:lb.func,hexSideColor:lb.func,hexAltitude:lb.oneOfType([lb.number,lb.func]),hexTopCurvatureResolution:lb.number,hexBinMerge:lb.bool,hexTransitionDuration:lb.number,hexLabel:lb.oneOfType([lb.string,lb.func]),onHexClick:lb.func,onHexRightClick:lb.func,onHexHover:lb.func,hexPolygonsData:lb.arrayOf(lb.object),hexPolygonGeoJsonGeometry:lb.oneOfType([lb.string,lb.func]),hexPolygonColor:lb.oneOfType([lb.string,lb.func]),hexPolygonAltitude:lb.oneOfType([lb.number,lb.string,lb.func]),hexPolygonResolution:lb.oneOfType([lb.number,lb.string,lb.func]),hexPolygonMargin:lb.oneOfType([lb.number,lb.string,lb.func]),hexPolygonCurvatureResolution:lb.oneOfType([lb.number,lb.string,lb.func]),hexPolygonsTransitionDuration:lb.number,hexPolygonLabel:lb.oneOfType([lb.string,lb.func]),onHexPolygonClick:lb.func,onHexPolygonRightClick:lb.func,onHexPolygonHover:lb.func,tilesData:lb.arrayOf(lb.object),tileLat:lb.oneOfType([lb.number,lb.string,lb.func]),tileLng:lb.oneOfType([lb.number,lb.string,lb.func]),tileAltitude:lb.oneOfType([lb.number,lb.string,lb.func]),tileWidth:lb.oneOfType([lb.number,lb.string,lb.func]),tileHeight:lb.oneOfType([lb.number,lb.string,lb.func]),tileUseGlobeProjection:lb.oneOfType([lb.bool,lb.string,lb.func]),tileMaterial:lb.oneOfType([lb.object,lb.string,lb.func]),tileCurvatureResolution:lb.oneOfType([lb.number,lb.string,lb.func]),tilesTransitionDuration:lb.number,tileLabel:lb.oneOfType([lb.string,lb.func]),onTileClick:lb.func,onTileRightClick:lb.func,onTileHover:lb.func,ringsData:lb.arrayOf(lb.object),ringLat:lb.oneOfType([lb.number,lb.string,lb.func]),ringLng:lb.oneOfType([lb.number,lb.string,lb.func]),ringAltitude:lb.oneOfType([lb.number,lb.string,lb.func]),ringColor:lb.oneOfType([lb.string,lb.arrayOf(lb.string),lb.func]),ringResolution:lb.number,ringMaxRadius:lb.oneOfType([lb.number,lb.string,lb.func]),ringPropagationSpeed:lb.oneOfType([lb.number,lb.string,lb.func]),ringRepeatPeriod:lb.oneOfType([lb.number,lb.string,lb.func]),labelsData:lb.arrayOf(lb.object),labelLat:lb.oneOfType([lb.number,lb.string,lb.func]),labelLng:lb.oneOfType([lb.number,lb.string,lb.func]),labelAltitude:lb.oneOfType([lb.number,lb.string,lb.func]),labelRotation:lb.oneOfType([lb.number,lb.string,lb.func]),labelText:lb.oneOfType([lb.string,lb.func]),labelSize:lb.oneOfType([lb.number,lb.string,lb.func]),labelTypeFace:lb.object,labelColor:lb.oneOfType([lb.string,lb.func]),labelResolution:lb.number,labelIncludeDot:lb.oneOfType([lb.bool,lb.string,lb.func]),labelDotRadius:lb.oneOfType([lb.number,lb.string,lb.func]),labelDotOrientation:lb.oneOfType([lb.string,lb.func]),labelsTransitionDuration:lb.number,labelLabel:lb.oneOfType([lb.string,lb.func]),onLabelClick:lb.func,onLabelRightClick:lb.func,onLabelHover:lb.func,customLayerData:lb.arrayOf(lb.object),customThreeObject:lb.oneOfType([lb.object,lb.string,lb.func]),customThreeObjectUpdate:lb.oneOfType([lb.string,lb.func]),customLayerLabel:lb.oneOfType([lb.string,lb.func]),onCustomLayerClick:lb.func,onCustomLayerRightClick:lb.func,onCustomLayerHover:lb.func,enablePointerInteraction:lb.bool,pointerEventsFilter:lb.func,lineHoverPrecision:lb.number,onZoom:lb.func},ub=function(t,r){var i="object"===c(r)?r:{wrapperElementType:r,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},o=i.wrapperElementType,a=void 0===o?"div":o,A=i.nodeMapper,d=void 0===A?function(e){return e}:A,f=i.methodNames,p=void 0===f?[]:f,m=i.initPropNames,g=void 0===m?[]:m;return e.forwardRef((function(r,i){var o=e.useRef(),A=u(e.useState({}),2),c=A[0],f=A[1];e.useEffect((function(){return f(r)}));var m=e.useMemo((function(){var e=l(g.filter((function(e){return r.hasOwnProperty(e)})).map((function(e){return[e,r[e]]})));return t(e)}),[]);e.useLayoutEffect((function(){m(d(o.current))}),[]),e.useEffect((function(){return m._destructor instanceof Function?m._destructor:void 0}),[]);var v=e.useCallback((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return m[e]instanceof Function?m[e].apply(m,n):void 0}),[m]),y=s(r,[].concat(h(p),h(g)));return Object.keys(y).filter((function(e){return c[e]!==r[e]})).forEach((function(e){return v(e,r[e])})),e.useImperativeHandle(i,(function(){return l(p.map((function(e){return[e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v.apply(void 0,[e].concat(n))}]})))})),n.default.createElement(a,{ref:o})}))}(zx,{methodNames:["pauseAnimation","resumeAnimation","pointOfView","scene","camera","renderer","postProcessingComposer","controls","getCoords","getScreenCoords","toGeoCoords","toGlobeCoords"],initPropNames:["animateIn","waitForGlobeReady","rendererConfig"]});return ub.displayName="Globe",ub.propTypes=cb,ub}));