UNPKG

@meese-os/website

Version:

meeseOS, implemented in OS.js

2 lines 630 kB
/*! For license information please see three-js.af2eb9a87907ae0b674c.bundle.js.LICENSE.txt */ "use strict";(self.webpackChunk_meese_os_website=self.webpackChunk_meese_os_website||[]).push([[83],{976:(e,t,i)=>{i.r(t),i.d(t,{ACESFilmicToneMapping:()=>te,AddEquation:()=>E,AddOperation:()=>J,AdditiveAnimationBlendMode:()=>Lt,AdditiveBlending:()=>y,AlphaFormat:()=>Ue,AlwaysDepth:()=>H,AlwaysStencilFunc:()=>ai,AmbientLight:()=>Ju,AmbientLightProbe:()=>pd,AnimationAction:()=>Bd,AnimationClip:()=>Mu,AnimationLoader:()=>Cu,AnimationMixer:()=>Gd,AnimationObjectGroup:()=>Fd,AnimationUtils:()=>lu,ArcCurve:()=>Uh,ArrayCamera:()=>sl,ArrowHelper:()=>Lp,Audio:()=>Td,AudioAnalyser:()=>Pd,AudioContext:()=>cd,AudioListener:()=>Ed,AudioLoader:()=>ud,AxesHelper:()=>Pp,BackSide:()=>f,BasicDepthPacking:()=>Ot,BasicShadowMap:()=>c,Bone:()=>Yl,BooleanKeyframeTrack:()=>mu,Box2:()=>Qd,Box3:()=>dr,Box3Helper:()=>Tp,BoxBufferGeometry:()=>Up,BoxGeometry:()=>ba,BoxHelper:()=>Ep,BufferAttribute:()=>zn,BufferGeometry:()=>ra,BufferGeometryLoader:()=>rd,ByteType:()=>be,Cache:()=>Su,Camera:()=>Ca,CameraHelper:()=>Mp,CanvasTexture:()=>Lh,CapsuleBufferGeometry:()=>Dp,CapsuleGeometry:()=>ec,CatmullRomCurve3:()=>zh,CineonToneMapping:()=>ee,CircleBufferGeometry:()=>Np,CircleGeometry:()=>tc,ClampToEdgeWrapping:()=>ce,Clock:()=>_d,Color:()=>Ln,ColorKeyframeTrack:()=>fu,ColorManagement:()=>Yi,CompressedArrayTexture:()=>Ch,CompressedTexture:()=>Rh,CompressedTextureLoader:()=>Lu,ConeBufferGeometry:()=>Op,ConeGeometry:()=>rc,CubeCamera:()=>Pa,CubeReflectionMapping:()=>ne,CubeRefractionMapping:()=>ae,CubeTexture:()=>Ia,CubeTextureLoader:()=>Iu,CubeUVReflectionMapping:()=>le,CubicBezierCurve:()=>Vh,CubicBezierCurve3:()=>Wh,CubicInterpolant:()=>cu,CullFaceBack:()=>o,CullFaceFront:()=>l,CullFaceFrontBack:()=>h,CullFaceNone:()=>s,Curve:()=>Ph,CurvePath:()=>Kh,CustomBlending:()=>b,CustomToneMapping:()=>ie,CylinderBufferGeometry:()=>Fp,CylinderGeometry:()=>ic,Cylindrical:()=>Jd,Data3DTexture:()=>ar,DataArrayTexture:()=>rr,DataTexture:()=>Zl,DataTextureLoader:()=>Uu,DataUtils:()=>On,DecrementStencilOp:()=>Yt,DecrementWrapStencilOp:()=>Jt,DefaultLoadingManager:()=>Eu,DepthFormat:()=>Fe,DepthStencilFormat:()=>Be,DepthTexture:()=>cl,DirectionalLight:()=>Zu,DirectionalLightHelper:()=>_p,DiscreteInterpolant:()=>du,DisplayP3ColorSpace:()=>Vt,DodecahedronBufferGeometry:()=>Bp,DodecahedronGeometry:()=>ac,DoubleSide:()=>g,DstAlphaFactor:()=>N,DstColorFactor:()=>F,DynamicCopyUsage:()=>pi,DynamicDrawUsage:()=>oi,DynamicReadUsage:()=>ci,EdgesGeometry:()=>cc,EllipseCurve:()=>Ih,EqualDepth:()=>W,EqualStencilFunc:()=>ei,EquirectangularReflectionMapping:()=>se,EquirectangularRefractionMapping:()=>oe,Euler:()=>Zr,EventDispatcher:()=>_i,ExtrudeBufferGeometry:()=>zp,ExtrudeGeometry:()=>Ic,FileLoader:()=>Ru,Float16BufferAttribute:()=>qn,Float32BufferAttribute:()=>Yn,Float64BufferAttribute:()=>Zn,FloatType:()=>Re,Fog:()=>vl,FogExp2:()=>gl,FramebufferTexture:()=>Ah,FrontSide:()=>m,Frustum:()=>Ga,GLBufferAttribute:()=>Xd,GLSL1:()=>fi,GLSL3:()=>gi,GreaterDepth:()=>j,GreaterEqualDepth:()=>X,GreaterEqualStencilFunc:()=>ni,GreaterStencilFunc:()=>ii,GridHelper:()=>pp,Group:()=>ol,HalfFloatType:()=>Ce,HemisphereLight:()=>Ou,HemisphereLightHelper:()=>dp,HemisphereLightProbe:()=>dd,IcosahedronBufferGeometry:()=>Gp,IcosahedronGeometry:()=>Dc,ImageBitmapLoader:()=>ld,ImageLoader:()=>Pu,ImageUtils:()=>Ji,IncrementStencilOp:()=>qt,IncrementWrapStencilOp:()=>Zt,InstancedBufferAttribute:()=>$l,InstancedBufferGeometry:()=>id,InstancedInterleavedBuffer:()=>Wd,InstancedMesh:()=>oh,Int16BufferAttribute:()=>Vn,Int32BufferAttribute:()=>Xn,Int8BufferAttribute:()=>Gn,IntType:()=>we,InterleavedBuffer:()=>xl,InterleavedBufferAttribute:()=>Ml,Interpolant:()=>hu,InterpolateDiscrete:()=>bt,InterpolateLinear:()=>Et,InterpolateSmooth:()=>Tt,InvertStencilOp:()=>Kt,KeepStencilOp:()=>Xt,KeyframeTrack:()=>pu,LOD:()=>Gl,LatheBufferGeometry:()=>Hp,LatheGeometry:()=>$h,Layers:()=>Jr,LessDepth:()=>k,LessEqualDepth:()=>V,LessEqualStencilFunc:()=>ti,LessStencilFunc:()=>$t,Light:()=>Nu,LightProbe:()=>$u,Line:()=>mh,Line3:()=>tp,LineBasicMaterial:()=>lh,LineCurve:()=>Xh,LineCurve3:()=>jh,LineDashedMaterial:()=>tu,LineLoop:()=>_h,LineSegments:()=>vh,LinearEncoding:()=>Dt,LinearFilter:()=>ve,LinearInterpolant:()=>uu,LinearMipMapLinearFilter:()=>Me,LinearMipMapNearestFilter:()=>xe,LinearMipmapLinearFilter:()=>ye,LinearMipmapNearestFilter:()=>_e,LinearSRGBColorSpace:()=>kt,LinearToneMapping:()=>Q,Loader:()=>Tu,LoaderUtils:()=>td,LoadingManager:()=>bu,LoopOnce:()=>yt,LoopPingPong:()=>St,LoopRepeat:()=>Mt,LuminanceAlphaFormat:()=>Oe,LuminanceFormat:()=>Ne,MOUSE:()=>n,Material:()=>Tn,MaterialLoader:()=>ed,MathUtils:()=>Ii,Matrix3:()=>Di,Matrix4:()=>zr,MaxEquation:()=>R,Mesh:()=>Ma,MeshBasicMaterial:()=>In,MeshDepthMaterial:()=>el,MeshDistanceMaterial:()=>tl,MeshLambertMaterial:()=>$c,MeshMatcapMaterial:()=>eu,MeshNormalMaterial:()=>Qc,MeshPhongMaterial:()=>Jc,MeshPhysicalMaterial:()=>Zc,MeshStandardMaterial:()=>Yc,MeshToonMaterial:()=>Kc,MinEquation:()=>A,MirroredRepeatWrapping:()=>ue,MixOperation:()=>Z,MultiplyBlending:()=>S,MultiplyOperation:()=>Y,NearestFilter:()=>de,NearestMipMapLinearFilter:()=>ge,NearestMipMapNearestFilter:()=>me,NearestMipmapLinearFilter:()=>fe,NearestMipmapNearestFilter:()=>pe,NeverDepth:()=>G,NeverStencilFunc:()=>Qt,NoBlending:()=>_,NoColorSpace:()=>Gt,NoToneMapping:()=>K,NormalAnimationBlendMode:()=>Ct,NormalBlending:()=>x,NotEqualDepth:()=>q,NotEqualStencilFunc:()=>ri,NumberKeyframeTrack:()=>gu,Object3D:()=>un,ObjectLoader:()=>nd,ObjectSpaceNormalMap:()=>zt,OctahedronBufferGeometry:()=>kp,OctahedronGeometry:()=>Nc,OneFactor:()=>L,OneMinusDstAlphaFactor:()=>O,OneMinusDstColorFactor:()=>B,OneMinusSrcAlphaFactor:()=>D,OneMinusSrcColorFactor:()=>I,OrthographicCamera:()=>es,PCFShadowMap:()=>u,PCFSoftShadowMap:()=>d,PMREMGenerator:()=>ss,Path:()=>Qh,PerspectiveCamera:()=>La,Plane:()=>Fa,PlaneBufferGeometry:()=>Vp,PlaneGeometry:()=>Va,PlaneHelper:()=>wp,PointLight:()=>qu,PointLightHelper:()=>lp,Points:()=>Eh,PointsMaterial:()=>xh,PolarGridHelper:()=>mp,PolyhedronBufferGeometry:()=>Wp,PolyhedronGeometry:()=>nc,PositionalAudio:()=>Ld,PropertyBinding:()=>Od,PropertyMixer:()=>Id,QuadraticBezierCurve:()=>qh,QuadraticBezierCurve3:()=>Yh,Quaternion:()=>lr,QuaternionKeyframeTrack:()=>_u,QuaternionLinearInterpolant:()=>vu,RED_GREEN_RGTC2_Format:()=>_t,RED_RGTC1_Format:()=>gt,REVISION:()=>r,RGBADepthPacking:()=>Ft,RGBAFormat:()=>De,RGBAIntegerFormat:()=>Ve,RGBA_ASTC_10x10_Format:()=>dt,RGBA_ASTC_10x5_Format:()=>ht,RGBA_ASTC_10x6_Format:()=>ct,RGBA_ASTC_10x8_Format:()=>ut,RGBA_ASTC_12x10_Format:()=>pt,RGBA_ASTC_12x12_Format:()=>mt,RGBA_ASTC_4x4_Format:()=>tt,RGBA_ASTC_5x4_Format:()=>it,RGBA_ASTC_5x5_Format:()=>rt,RGBA_ASTC_6x5_Format:()=>nt,RGBA_ASTC_6x6_Format:()=>at,RGBA_ASTC_8x5_Format:()=>st,RGBA_ASTC_8x6_Format:()=>ot,RGBA_ASTC_8x8_Format:()=>lt,RGBA_BPTC_Format:()=>ft,RGBA_ETC2_EAC_Format:()=>et,RGBA_PVRTC_2BPPV1_Format:()=>Ke,RGBA_PVRTC_4BPPV1_Format:()=>Je,RGBA_S3TC_DXT1_Format:()=>Xe,RGBA_S3TC_DXT3_Format:()=>je,RGBA_S3TC_DXT5_Format:()=>qe,RGB_ETC1_Format:()=>Qe,RGB_ETC2_Format:()=>$e,RGB_PVRTC_2BPPV1_Format:()=>Ze,RGB_PVRTC_4BPPV1_Format:()=>Ye,RGB_S3TC_DXT1_Format:()=>We,RGFormat:()=>He,RGIntegerFormat:()=>ke,RawShaderMaterial:()=>qc,Ray:()=>Br,Raycaster:()=>jd,RectAreaLight:()=>Ku,RedFormat:()=>ze,RedIntegerFormat:()=>Ge,ReinhardToneMapping:()=>$,RepeatWrapping:()=>he,ReplaceStencilOp:()=>jt,ReverseSubtractEquation:()=>w,RingBufferGeometry:()=>Xp,RingGeometry:()=>Oc,SIGNED_RED_GREEN_RGTC2_Format:()=>xt,SIGNED_RED_RGTC1_Format:()=>vt,SRGBColorSpace:()=>Ht,Scene:()=>_l,ShaderChunk:()=>Wa,ShaderLib:()=>ja,ShaderMaterial:()=>Ra,ShadowMaterial:()=>jc,Shape:()=>uc,ShapeBufferGeometry:()=>jp,ShapeGeometry:()=>Fc,ShapePath:()=>Ip,ShapeUtils:()=>Cc,ShortType:()=>Ee,Skeleton:()=>Ql,SkeletonHelper:()=>op,SkinnedMesh:()=>ql,Source:()=>Ki,Sphere:()=>Lr,SphereBufferGeometry:()=>qp,SphereGeometry:()=>Bc,Spherical:()=>Zd,SphericalHarmonics3:()=>Qu,SplineCurve:()=>Zh,SpotLight:()=>ku,SpotLightHelper:()=>rp,Sprite:()=>Ol,SpriteMaterial:()=>Sl,SrcAlphaFactor:()=>U,SrcAlphaSaturateFactor:()=>z,SrcColorFactor:()=>P,StaticCopyUsage:()=>di,StaticDrawUsage:()=>si,StaticReadUsage:()=>hi,StereoCamera:()=>vd,StreamCopyUsage:()=>mi,StreamDrawUsage:()=>li,StreamReadUsage:()=>ui,StringKeyframeTrack:()=>xu,SubtractEquation:()=>T,SubtractiveBlending:()=>M,TOUCH:()=>a,TangentSpaceNormalMap:()=>Bt,TetrahedronBufferGeometry:()=>Yp,TetrahedronGeometry:()=>zc,Texture:()=>er,TextureLoader:()=>Du,TorusBufferGeometry:()=>Zp,TorusGeometry:()=>Gc,TorusKnotBufferGeometry:()=>Jp,TorusKnotGeometry:()=>Hc,Triangle:()=>bn,TriangleFanDrawMode:()=>Ut,TriangleStripDrawMode:()=>It,TrianglesDrawMode:()=>Pt,TubeBufferGeometry:()=>Kp,TubeGeometry:()=>kc,TwoPassDoubleSide:()=>v,UVMapping:()=>re,Uint16BufferAttribute:()=>Wn,Uint32BufferAttribute:()=>jn,Uint8BufferAttribute:()=>Hn,Uint8ClampedBufferAttribute:()=>kn,Uniform:()=>Hd,UniformsGroup:()=>Vd,UniformsLib:()=>Xa,UniformsUtils:()=>Aa,UnsignedByteType:()=>Se,UnsignedInt248Type:()=>Ie,UnsignedIntType:()=>Ae,UnsignedShort4444Type:()=>Le,UnsignedShort5551Type:()=>Pe,UnsignedShortType:()=>Te,VSMShadowMap:()=>p,Vector2:()=>Ui,Vector3:()=>hr,Vector4:()=>tr,VectorKeyframeTrack:()=>yu,VideoTexture:()=>wh,WebGL1Renderer:()=>fl,WebGL3DRenderTarget:()=>sr,WebGLArrayRenderTarget:()=>nr,WebGLCubeRenderTarget:()=>Ua,WebGLMultipleRenderTargets:()=>or,WebGLRenderTarget:()=>ir,WebGLRenderer:()=>ml,WebGLUtils:()=>al,WireframeGeometry:()=>Vc,WrapAroundEnding:()=>Rt,ZeroCurvatureEnding:()=>wt,ZeroFactor:()=>C,ZeroSlopeEnding:()=>At,ZeroStencilOp:()=>Wt,_SRGBAFormat:()=>vi,sRGBEncoding:()=>Nt});const r="152",n={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},a={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},s=0,o=1,l=2,h=3,c=0,u=1,d=2,p=3,m=0,f=1,g=2,v=2,_=0,x=1,y=2,M=3,S=4,b=5,E=100,T=101,w=102,A=103,R=104,C=200,L=201,P=202,I=203,U=204,D=205,N=206,O=207,F=208,B=209,z=210,G=0,H=1,k=2,V=3,W=4,X=5,j=6,q=7,Y=0,Z=1,J=2,K=0,Q=1,$=2,ee=3,te=4,ie=5,re=300,ne=301,ae=302,se=303,oe=304,le=306,he=1e3,ce=1001,ue=1002,de=1003,pe=1004,me=1004,fe=1005,ge=1005,ve=1006,_e=1007,xe=1007,ye=1008,Me=1008,Se=1009,be=1010,Ee=1011,Te=1012,we=1013,Ae=1014,Re=1015,Ce=1016,Le=1017,Pe=1018,Ie=1020,Ue=1021,De=1023,Ne=1024,Oe=1025,Fe=1026,Be=1027,ze=1028,Ge=1029,He=1030,ke=1031,Ve=1033,We=33776,Xe=33777,je=33778,qe=33779,Ye=35840,Ze=35841,Je=35842,Ke=35843,Qe=36196,$e=37492,et=37496,tt=37808,it=37809,rt=37810,nt=37811,at=37812,st=37813,ot=37814,lt=37815,ht=37816,ct=37817,ut=37818,dt=37819,pt=37820,mt=37821,ft=36492,gt=36283,vt=36284,_t=36285,xt=36286,yt=2200,Mt=2201,St=2202,bt=2300,Et=2301,Tt=2302,wt=2400,At=2401,Rt=2402,Ct=2500,Lt=2501,Pt=0,It=1,Ut=2,Dt=3e3,Nt=3001,Ot=3200,Ft=3201,Bt=0,zt=1,Gt="",Ht="srgb",kt="srgb-linear",Vt="display-p3",Wt=0,Xt=7680,jt=7681,qt=7682,Yt=7683,Zt=34055,Jt=34056,Kt=5386,Qt=512,$t=513,ei=514,ti=515,ii=516,ri=517,ni=518,ai=519,si=35044,oi=35048,li=35040,hi=35045,ci=35049,ui=35041,di=35046,pi=35050,mi=35042,fi="100",gi="300 es",vi=1035;class _i{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){var i;return void 0!==this._listeners&&void 0!==(i=this._listeners)[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){var i;void 0!==this._listeners&&void 0!==(e=this._listeners[e])&&-1!==(i=e.indexOf(t))&&e.splice(i,1)}dispatchEvent(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;var i=t.slice(0);for(let t=0,r=i.length;t<r;t++)i[t].call(this,e);e.target=null}}}}const xi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let yi=1234567;const Mi=Math.PI/180,Si=180/Math.PI;function bi(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,i=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(xi[255&e]+xi[e>>8&255]+xi[e>>16&255]+xi[e>>24&255]+"-"+xi[255&t]+xi[t>>8&255]+"-"+xi[t>>16&15|64]+xi[t>>24&255]+"-"+xi[63&i|128]+xi[i>>8&255]+"-"+xi[i>>16&255]+xi[i>>24&255]+xi[255&r]+xi[r>>8&255]+xi[r>>16&255]+xi[r>>24&255]).toLowerCase()}function Ei(e,t,i){return Math.max(t,Math.min(i,e))}function Ti(e,t){return(e%t+t)%t}function wi(e,t,i){return(1-i)*e+i*t}function Ai(e){return 0==(e&e-1)&&0!==e}function Ri(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Ci(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Li(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Pi(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Ii={DEG2RAD:Mi,RAD2DEG:Si,generateUUID:bi,clamp:Ei,euclideanModulo:Ti,mapLinear:function(e,t,i,r,n){return r+(e-t)*(n-r)/(i-t)},inverseLerp:function(e,t,i){return e!==t?(i-e)/(t-e):0},lerp:wi,damp:function(e,t,i,r){return wi(e,t,1-Math.exp(-i*r))},pingpong:function(e,t=1){return t-Math.abs(Ti(e,2*t)-t)},smoothstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-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&&(yi=e),e=yi+=1831565813,e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/4294967296},degToRad:function(e){return e*Mi},radToDeg:function(e){return e*Si},isPowerOfTwo:Ai,ceilPowerOfTwo:Ri,floorPowerOfTwo:Ci,setQuaternionFromProperEuler:function(e,t,i,r,n){var a=Math.cos,s=Math.sin,o=a(i/2),l=s(i/2),h=a((t+r)/2),c=s((t+r)/2),u=a((t-r)/2),d=s((t-r)/2),p=a((r-t)/2),m=s((r-t)/2);switch(n){case"XYX":e.set(o*c,l*u,l*d,o*h);break;case"YZY":e.set(l*d,o*c,l*u,o*h);break;case"ZXZ":e.set(l*u,l*d,o*c,o*h);break;case"XZX":e.set(o*c,l*m,l*p,o*h);break;case"YXY":e.set(l*p,o*c,l*m,o*h);break;case"ZYZ":e.set(l*m,l*p,o*c,o*h);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+n)}},normalize:Pi,denormalize:Li};class Ui{constructor(e=0,t=0){Ui.prototype.isVector2=!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){return 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){return 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){var t=this.x,i=this.y;return e=e.elements,this.x=e[0]*t+e[3]*i+e[6],this.y=e[1]*t+e[4]*i+e[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){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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}angleTo(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:(e=this.dot(e)/t,Math.acos(Ei(e,-1,1)))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){var t=this.x-e.x;return t*t+(e=this.y-e.y)*e}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,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){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){var i=Math.cos(t),r=(t=Math.sin(t),this.x-e.x),n=this.y-e.y;return this.x=r*i-n*t+e.x,this.y=r*t+n*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Di{constructor(){Di.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,n,a,s,o,l){var h=this.elements;return h[0]=e,h[1]=r,h[2]=s,h[3]=t,h[4]=n,h[5]=o,h[6]=i,h[7]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){var t=this.elements;return e=e.elements,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){return e=e.elements,this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){e=e.elements,t=t.elements;var i=this.elements,r=e[0],n=e[3],a=e[6],s=e[1],o=e[4],l=e[7],h=e[2],c=e[5],u=(e=e[8],t[0]),d=t[3],p=t[6],m=t[1],f=t[4],g=t[7],v=t[2],_=t[5];return t=t[8],i[0]=r*u+n*m+a*v,i[3]=r*d+n*f+a*_,i[6]=r*p+n*g+a*t,i[1]=s*u+o*m+l*v,i[4]=s*d+o*f+l*_,i[7]=s*p+o*g+l*t,i[2]=h*u+c*m+e*v,i[5]=h*d+c*f+e*_,i[8]=h*p+c*g+e*t,this}multiplyScalar(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){var e,t=(e=this.elements)[0],i=e[1],r=e[2],n=e[3],a=e[4],s=e[5],o=e[6],l=e[7];return t*a*(e=e[8])-t*s*l-i*n*e+i*s*o+r*n*l-r*a*o}invert(){var e=this.elements,t=e[0],i=e[1],r=e[2],n=e[3],a=e[4],s=e[5],o=e[6],l=e[7],h=e[8],c=h*a-s*l,u=s*o-h*n,d=l*n-a*o,p=t*c+i*u+r*d;return 0==p?this.set(0,0,0,0,0,0,0,0,0):(e[0]=c*(c=1/p),e[1]=(r*l-h*i)*c,e[2]=(s*i-r*a)*c,e[3]=u*c,e[4]=(h*t-r*o)*c,e[5]=(r*n-s*t)*c,e[6]=d*c,e[7]=(i*o-l*t)*c,e[8]=(a*t-i*n)*c,this)}transpose(){var e=this.elements,t=e[1];return e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,n,a,s){var o=Math.cos(n);return n=Math.sin(n),this.set(i*o,i*n,-i*(o*a+n*s)+a+e,-r*n,r*o,-r*(-n*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Ni.makeScale(e,t)),this}rotate(e){return this.premultiply(Ni.makeRotation(-e)),this}translate(e,t){return this.premultiply(Ni.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){var t=Math.cos(e);return e=Math.sin(e),this.set(t,-e,0,e,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){var t=this.elements,i=e.elements;for(let e=0;e<9;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){var i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Ni=new Di;function Oi(e){for(let t=e.length-1;0<=t;--t)if(65535<=e[t])return 1}const Fi={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Bi(e,t){return new Fi[e](t)}function zi(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const Gi={};function Hi(e){e in Gi||(Gi[e]=!0,console.warn(e))}function ki(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Vi(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const Wi=(new Di).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Xi=(new Di).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]),ji={[kt]:e=>e,[Ht]:e=>e.convertSRGBToLinear(),[Vt]:function(e){return e.convertSRGBToLinear().applyMatrix3(Xi)}},qi={[kt]:e=>e,[Ht]:e=>e.convertLinearToSRGB(),[Vt]:function(e){return e.applyMatrix3(Wi).convertLinearToSRGB()}},Yi={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return kt},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,i){if(!1===this.enabled||t===i||!t||!i)return e;var r=ji[t],n=qi[i];if(void 0===r||void 0===n)throw new Error(`Unsupported color space conversion, "${t}" to "${i}".`);return n(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}};let Zi;class Ji{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;var i;return 2048<(t=e instanceof HTMLCanvasElement?e:((Zi=void 0===Zi?zi("canvas"):Zi).width=e.width,Zi.height=e.height,i=Zi.getContext("2d"),e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),Zi)).width||2048<t.height?(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){var t=zi("canvas"),i=(t.width=e.width,t.height=e.height,t.getContext("2d")),r=(i.drawImage(e,0,0,e.width,e.height),i.getImageData(0,0,e.width,e.height)),n=r.data;for(let e=0;e<n.length;e++)n[e]=255*ki(n[e]/255);return i.putImageData(r,0,0),t}if(e.data){var a=e.data.slice(0);for(let e=0;e<a.length;e++)a instanceof Uint8Array||a instanceof Uint8ClampedArray?a[e]=Math.floor(255*ki(a[e]/255)):a[e]=ki(a[e]);return{data:a,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}class Ki{constructor(e=null){this.isSource=!0,this.uuid=bi(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];var i={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,i=r.length;t<i;t++)r[t].isDataTexture?e.push(Qi(r[t].image)):e.push(Qi(r[t]))}else e=Qi(r);i.url=e}return t||(e.images[this.uuid]=i),i}}function Qi(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?Ji.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let $i=0;class er extends _i{constructor(e=er.DEFAULT_IMAGE,t=er.DEFAULT_MAPPING,i=ce,r=ce,n=ve,a=ye,s=De,o=Se,l=er.DEFAULT_ANISOTROPY,h=Gt){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:$i++}),this.uuid=bi(),this.name="",this.source=new Ki(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=n,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new Ui(0,0),this.repeat=new Ui(1,1),this.center=new Ui(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Di,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"==typeof h?this.colorSpace=h:(Hi("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=h===Nt?Ht:Gt),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}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.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,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.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){var t,i=void 0===e||"string"==typeof e;return i||void 0===e.textures[this.uuid]?(t={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment},0<Object.keys(this.userData).length&&(t.userData=this.userData),i||(e.textures[this.uuid]=t),t):e.textures[this.uuid]}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping===re){if(e.applyMatrix3(this.matrix),e.x<0||1<e.x)switch(this.wrapS){case he:e.x=e.x-Math.floor(e.x);break;case ce:e.x=e.x<0?0:1;break;case ue: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||1<e.y)switch(this.wrapT){case he:e.y=e.y-Math.floor(e.y);break;case ce:e.y=e.y<0?0:1;break;case ue:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}return e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Hi("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ht?Nt:Dt}set encoding(e){Hi("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Nt?Ht:Gt}}er.DEFAULT_IMAGE=null,er.DEFAULT_MAPPING=re,er.DEFAULT_ANISOTROPY=1;class tr{constructor(e=0,t=0,i=0,r=1){tr.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,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,i,r){return this.x=e,this.y=t,this.z=i,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){return 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){return 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){var t=this.x,i=this.y,r=this.z,n=this.w;return e=e.elements,this.x=e[0]*t+e[4]*i+e[8]*r+e[12]*n,this.y=e[1]*t+e[5]*i+e[9]*r+e[13]*n,this.z=e[2]*t+e[6]*i+e[10]*r+e[14]*n,this.w=e[3]*t+e[7]*i+e[11]*r+e[15]*n,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,n;var a,s,o,l,h,c,u=(e=e.elements)[0],d=e[4],p=e[8],m=e[1],f=e[5],g=e[9],v=e[2],_=e[6];if(e=e[10],Math.abs(d-m)<.01&&Math.abs(p-v)<.01&&Math.abs(g-_)<.01)Math.abs(d+m)<.1&&Math.abs(p+v)<.1&&Math.abs(g+_)<.1&&Math.abs(u+f+e-3)<.1?this.set(1,0,0,0):(t=Math.PI,o=(e+1)/2,l=(d+m)/4,h=(p+v)/4,c=(g+_)/4,(s=(f+1)/2)<(a=(u+1)/2)&&o<a?n=a<.01?(i=0,r=.707106781):(i=Math.sqrt(a),r=l/i,h/i):o<s?n=s<.01?(i=.707106781,r=0,.707106781):(r=Math.sqrt(s),i=l/r,c/r):o<.01?(i=.707106781,r=.707106781,n=0):(n=Math.sqrt(o),i=h/n,r=c/n),this.set(i,r,n,t));else{let t=Math.sqrt((_-g)*(_-g)+(p-v)*(p-v)+(m-d)*(m-d));Math.abs(t)<.001&&(t=1),this.x=(_-g)/t,this.y=(p-v)/t,this.z=(m-d)/t,this.w=Math.acos((u+f+e-1)/2)}return 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){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,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){return 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}}class ir extends _i{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new tr(0,0,e,t),this.scissorTest=!1,this.viewport=new tr(0,0,e,t),e={width:e,height:t,depth:1},void 0!==i.encoding&&(Hi("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===Nt?Ht:Gt),this.texture=new er(e,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==i.generateMipmaps&&i.generateMipmaps,this.texture.internalFormat=void 0!==i.internalFormat?i.internalFormat:null,this.texture.minFilter=void 0!==i.minFilter?i.minFilter:ve,this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0!==i.stencilBuffer&&i.stencilBuffer,this.depthTexture=void 0!==i.depthTexture?i.depthTexture:null,this.samples=void 0!==i.samples?i.samples:0}setSize(e,t,i=1){this.width===e&&this.height===t&&this.depth===i||(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,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){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;var t=Object.assign({},e.texture.image);return this.texture.source=new Ki(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class rr extends er{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=de,this.minFilter=de,this.wrapR=ce,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class nr extends ir{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new rr(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class ar extends er{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=de,this.minFilter=de,this.wrapR=ce,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class sr extends ir{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new ar(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class or extends ir{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;var n=this.texture;this.texture=[];for(let e=0;e<i;e++)this.texture[e]=n.clone(),this.texture[e].isRenderTargetTexture=!0}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let r=0,n=this.texture.length;r<n;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=i;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.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone());for(let t=this.texture.length=0,i=e.texture.length;t<i;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}}class lr{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,n,a,s){let o=i[r+0],l=i[r+1],h=i[r+2],c=i[r+3];i=n[a+0],r=n[a+1];var u=n[a+2];if(n=n[a+3],0===s)e[t+0]=o,e[t+1]=l,e[t+2]=h,e[t+3]=c;else if(1===s)e[t+0]=i,e[t+1]=r,e[t+2]=u,e[t+3]=n;else{if(c!==n||o!==i||l!==r||h!==u){let e=1-s;var d=0<=(a=o*i+l*r+h*u+c*n)?1:-1,p=1-a*a;p>Number.EPSILON&&(p=Math.sqrt(p),a=Math.atan2(p,a*d),e=Math.sin(e*a)/p,s=Math.sin(s*a)/p),o=o*e+i*(a=s*d),l=l*e+r*a,h=h*e+u*a,c=c*e+n*a,e===1-s&&(o*=p=1/Math.sqrt(o*o+l*l+h*h+c*c),l*=p,h*=p,c*=p)}e[t]=o,e[t+1]=l,e[t+2]=h,e[t+3]=c}}static multiplyQuaternionsFlat(e,t,i,r,n,a){var s=i[r],o=i[r+1],l=i[r+2],h=(i=i[r+3],r=n[a],n[a+1]),c=n[a+2];return n=n[a+3],e[t]=s*n+i*r+o*c-l*h,e[t+1]=o*n+i*h+l*r-s*c,e[t+2]=l*n+i*c+s*h-o*r,e[t+3]=i*n-s*r-o*h-l*c,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,i,r){return this._x=e,this._y=t,this._z=i,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){var i=e._x,r=e._y,n=e._z,a=e._order,s=(e=Math.cos,Math.sin),o=e(i/2),l=e(r/2),h=e(n/2),c=s(i/2),u=s(r/2),d=s(n/2);switch(a){case"XYZ":this._x=c*l*h+o*u*d,this._y=o*u*h-c*l*d,this._z=o*l*d+c*u*h,this._w=o*l*h-c*u*d;break;case"YXZ":this._x=c*l*h+o*u*d,this._y=o*u*h-c*l*d,this._z=o*l*d-c*u*h,this._w=o*l*h+c*u*d;break;case"ZXY":this._x=c*l*h-o*u*d,this._y=o*u*h+c*l*d,this._z=o*l*d+c*u*h,this._w=o*l*h-c*u*d;break;case"ZYX":this._x=c*l*h-o*u*d,this._y=o*u*h+c*l*d,this._z=o*l*d-c*u*h,this._w=o*l*h+c*u*d;break;case"YZX":this._x=c*l*h+o*u*d,this._y=o*u*h+c*l*d,this._z=o*l*d-c*u*h,this._w=o*l*h-c*u*d;break;case"XZY":this._x=c*l*h-o*u*d,this._y=o*u*h-c*l*d,this._z=o*l*d+c*u*h,this._w=o*l*h+c*u*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){t/=2;var i=Math.sin(t);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(t),this._onChangeCallback(),this}setFromRotationMatrix(e){var t=(e=e.elements)[0],i=e[4],r=e[8],n=e[1],a=e[5],s=e[9],o=e[2],l=e[6],h=t+a+(e=e[10]);return 0<h?(h=.5/Math.sqrt(h+1),this._w=.25/h,this._x=(l-s)*h,this._y=(r-o)*h,this._z=(n-i)*h):a<t&&e<t?(h=2*Math.sqrt(1+t-a-e),this._w=(l-s)/h,this._x=.25*h,this._y=(i+n)/h,this._z=(r+o)/h):e<a?(h=2*Math.sqrt(1+a-t-e),this._w=(r-o)/h,this._x=(i+n)/h,this._y=.25*h,this._z=(s+l)/h):(h=2*Math.sqrt(1+e-t-a),this._w=(n-i)/h,this._x=(r+o)/h,this._y=(s+l)/h,this._z=.25*h),this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(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=i,this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ei(this.dot(e),-1,1)))}rotateTowards(e,t){var i=this.angleTo(e);return 0!==i&&(t=Math.min(1,t/i),this.slerp(e,t)),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(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(this._x=this._x*(e=1/e),this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){var i=e._x,r=e._y,n=e._z,a=(e=e._w,t._x),s=t._y,o=t._z;return t=t._w,this._x=i*t+e*a+r*o-n*s,this._y=r*t+e*s+n*a-i*o,this._z=n*t+e*o+i*s-r*a,this._w=e*t-i*a-r*s-n*o,this._onChangeCallback(),this}slerp(e,t){if(0!==t){if(1===t)return this.copy(e);var i,r,n=this._x,a=this._y,s=this._z,o=this._w;let l=o*e._w+n*e._x+a*e._y+s*e._z;l<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,l=-l):this.copy(e),1<=l?(this._w=o,this._x=n,this._y=a,this._z=s):((e=1-l*l)<=Number.EPSILON?(this._w=(i=1-t)*o+t*this._w,this._x=i*n+t*this._x,this._y=i*a+t*this._y,this._z=i*s+t*this._z,this.normalize()):(i=Math.sqrt(e),e=Math.atan2(i,l),r=Math.sin((1-t)*e)/i,t=Math.sin(t*e)/i,this._w=o*r+this._w*t,this._x=n*r+this._x*t,this._y=a*r+this._y*t,this._z=s*r+this._z*t),this._onChangeCallback())}return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){var e=Math.random(),t=Math.sqrt(1-e),i=(e=Math.sqrt(e),2*Math.PI*Math.random()),r=2*Math.PI*Math.random();return this.set(t*Math.cos(i),e*Math.sin(r),e*Math.cos(r),t*Math.sin(i))}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}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class hr{constructor(e=0,t=0,i=0){hr.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,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){return 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){return 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){return 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 this.applyQuaternion(ur.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(ur.setFromAxisAngle(e,t))}applyMatrix3(e){var t=this.x,i=this.y,r=this.z;return e=e.elements,this.x=e[0]*t+e[3]*i+e[6]*r,this.y=e[1]*t+e[4]*i+e[7]*r,this.z=e[2]*t+e[5]*i+e[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){var t=this.x,i=this.y,r=this.z,n=1/((e=e.elements)[3]*t+e[7]*i+e[11]*r+e[15]);return this.x=(e[0]*t+e[4]*i+e[8]*r+e[12])*n,this.y=(e[1]*t+e[5]*i+e[9]*r+e[13])*n,this.z=(e[2]*t+e[6]*i+e[10]*r+e[14])*n,this}applyQuaternion(e){var t=this.x,i=this.y,r=this.z,n=e.x,a=e.y,s=e.z,o=(e=e.w)*t+a*r-s*i,l=e*i+s*t-n*r,h=e*r+n*i-a*t;return t=-n*t-a*i-s*r,this.x=o*e+t*-n+l*-s-h*-a,this.y=l*e+t*-a+h*-n-o*-s,this.z=h*e+t*-s+o*-a-l*-n,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){var t=this.x,i=this.y,r=this.z;return e=e.elements,this.x=e[0]*t+e[4]*i+e[8]*r,this.y=e[1]*t+e[5]*i+e[9]*r,this.z=e[2]*t+e[6]*i+e[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){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){var i=e.x,r=e.y,n=(e=e.z,t.x),a=t.y;return t=t.z,this.x=r*t-e*a,this.y=e*n-i*t,this.z=i*a-r*n,this}projectOnVector(e){var t=e.lengthSq();return 0===t?this.set(0,0,0):(t=e.dot(this)/t,this.copy(e).multiplyScalar(t))}projectOnPlane(e){return cr.copy(this).projectOnVector(e),this.sub(cr)}reflect(e){return this.sub(cr.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:(e=this.dot(e)/t,Math.acos(Ei(e,-1,1)))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i+(e=this.z-e.z)*e}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,i){var r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){return e=e.elements,this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(e){var t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).