soonspacejs 2.13.2 → 2.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +2 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import*as e from"three";import{Vector3 as t,Euler as n,Box3 as s,Scene as r,Quaternion as i,Object3D as o,MathUtils as a,CubeTextureLoader as l,HalfFloatType as c,EquirectangularReflectionMapping as h,Color as u,Texture as d,FileLoader as p,ImageLoader as m,TextureLoader as f,Vector2 as g,Matrix4 as y,BufferAttribute as v,BufferGeometry as w,Float32BufferAttribute as b,LineBasicMaterial as x,Line as T,Line3 as S,CurvePath as O,LineCurve as M,LineCurve3 as E,Bone as C,Uint16BufferAttribute as D,SkinnedMesh as P,Skeleton as I,AnimationClip as A,VectorKeyframeTrack as L,QuaternionKeyframeTrack as j,InterpolateLinear as _,InterpolateDiscrete as F,EventDispatcher as R,LoopPingPong as B,KeyframeTrack as U,BooleanKeyframeTrack as k,NumberKeyframeTrack as N,ColorKeyframeTrack as z,StringKeyframeTrack as G,NormalAnimationBlendMode as V,FogExp2 as H,Mesh as W,LineSegments as K,EdgesGeometry as q,MeshStandardMaterial as Y,OrthographicCamera as Q,PerspectiveCamera as X,InstancedMesh as Z,DynamicDrawUsage as J,SRGBColorSpace as $,NoToneMapping as ee,Vector4 as te,Frustum as ne,REVISION as se,WebGLRenderTarget as re,UnsignedByteType as ie,LinearMipmapLinearFilter as oe,ColorManagement as ae,DoubleSide as le,BackSide as ce,FrontSide as he,WebGLCoordinateSystem as ue,LinearSRGBColorSpace as de,RGBAIntegerFormat as pe,RGIntegerFormat as me,RedIntegerFormat as fe,UnsignedIntType as ge,UnsignedShortType as ye,UnsignedInt248Type as ve,UnsignedShort4444Type as we,UnsignedShort5551Type as be,PCFSoftShadowMap as xe,Spherical as Te,Sphere as Se,ShaderMaterial as Oe,LinearFilter as Me,RGBAFormat as Ee,DataTexture as Ce,NoColorSpace as De,RepeatWrapping as Pe,NearestFilter as Ie,RedFormat as Ae,FloatType as Le,DepthTexture as je,GLBufferAttribute as _e,InterleavedBufferAttribute as Fe,Raycaster as Re,BoxGeometry as Be,Sprite as Ue,MeshBasicMaterial as ke,CanvasTexture as Ne,SpriteMaterial as ze,Clock as Ge,PMREMGenerator as Ve,AnimationMixer as He,UVMapping as We,CubeTexture as Ke,ReinhardToneMapping as qe,CineonToneMapping as Ye,ACESFilmicToneMapping as Qe,AgXToneMapping as Xe,SphereGeometry as Ze,CircleGeometry as Je,PlaneGeometry as $e,ExtrudeGeometry as et,Shape as tt,Matrix3 as nt,Group as st,Box2 as rt,Triangle as it,ShapeGeometry as ot,Plane as at,VideoTexture as lt,MeshPhongMaterial as ct,AmbientLight as ht,DirectionalLight as ut,HemisphereLight as dt,SpotLight as pt,PointLight as mt,RectAreaLight as ft,Loader as gt,LoaderUtils as yt,ClampToEdgeWrapping as vt,PropertyBinding as wt,ShapeUtils as bt,Material as xt,PointsMaterial as Tt,Points as St,LoadingManager as Ot,GridHelper as Mt,AxesHelper as Et,Box3Helper as Ct,DirectionalLightHelper as Dt,HemisphereLightHelper as Pt,SpotLightHelper as It,PointLightHelper as At}from"three";import*as Lt from"three/examples/jsm/libs/tween.module.js";import jt,{Easing as _t,Tween as Ft}from"three/examples/jsm/libs/tween.module.js";import{RGBELoader as Rt}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFExporter as Bt}from"three/examples/jsm/exporters/GLTFExporter.js";import{Pass as Ut,EffectPass as kt,EffectComposer as Nt,RenderPass as zt,SMAAEffect as Gt,SMAAPreset as Vt,EdgeDetectionMode as Ht,ToneMappingEffect as Wt,ToneMappingMode as Kt,BloomEffect as qt,BlendFunction as Yt,OutlineEffect as Qt}from"postprocessing";import{RoomEnvironment as Xt}from"three/examples/jsm/environments/RoomEnvironment.js";import Zt from"three/examples/jsm/libs/stats.module.js";import{Sky as Jt}from"three/examples/jsm/objects/Sky.js";import{mergeGeometries as $t,deinterleaveGeometry as en}from"three/examples/jsm/utils/BufferGeometryUtils.js";import{WebGLAnimation as tn}from"three/src/renderers/webgl/WebGLAnimation.js";import{WebGLAttributes as nn}from"three/src/renderers/webgl/WebGLAttributes.js";import{WebGLBackground as sn}from"three/src/renderers/webgl/WebGLBackground.js";import{WebGLBindingStates as rn}from"three/src/renderers/webgl/WebGLBindingStates.js";import{WebGLBufferRenderer as on}from"three/src/renderers/webgl/WebGLBufferRenderer.js";import{WebGLCapabilities as an}from"three/src/renderers/webgl/WebGLCapabilities.js";import{WebGLClipping as ln}from"three/src/renderers/webgl/WebGLClipping.js";import{WebGLCubeMaps as cn}from"three/src/renderers/webgl/WebGLCubeMaps.js";import{WebGLCubeUVMaps as hn}from"three/src/renderers/webgl/WebGLCubeUVMaps.js";import{WebGLExtensions as un}from"three/src/renderers/webgl/WebGLExtensions.js";import{WebGLGeometries as dn}from"three/src/renderers/webgl/WebGLGeometries.js";import{WebGLIndexedBufferRenderer as pn}from"three/src/renderers/webgl/WebGLIndexedBufferRenderer.js";import{WebGLInfo as mn}from"three/src/renderers/webgl/WebGLInfo.js";import{WebGLMorphtargets as fn}from"three/src/renderers/webgl/WebGLMorphtargets.js";import{WebGLObjects as gn}from"three/src/renderers/webgl/WebGLObjects.js";import{WebGLPrograms as yn}from"three/src/renderers/webgl/WebGLPrograms.js";import{WebGLProperties as vn}from"three/src/renderers/webgl/WebGLProperties.js";import{WebGLRenderLists as wn}from"three/src/renderers/webgl/WebGLRenderLists.js";import{WebGLRenderStates as bn}from"three/src/renderers/webgl/WebGLRenderStates.js";import{WebGLShadowMap as xn}from"three/src/renderers/webgl/WebGLShadowMap.js";import{WebGLState as Tn}from"three/src/renderers/webgl/WebGLState.js";import{WebGLTextures as Sn}from"three/src/renderers/webgl/WebGLTextures.js";import{WebGLUniforms as On}from"three/src/renderers/webgl/WebGLUniforms.js";import{WebGLUtils as Mn}from"three/src/renderers/webgl/WebGLUtils.js";import{WebXRManager as En}from"three/src/renderers/webxr/WebXRManager.js";import{WebGLMaterials as Cn}from"three/src/renderers/webgl/WebGLMaterials.js";import{WebGLUniformsGroups as Dn}from"three/src/renderers/webgl/WebGLUniformsGroups.js";import{createCanvasElement as Pn,toNormalizedProjectionMatrix as In,toReversedProjectionMatrix as An,probeAsync as Ln,warnOnce as jn}from"three/src/utils.js";import"three/examples/jsm/postprocessing/Pass.js";import{WorkerPool as _n}from"three/examples/jsm/utils/WorkerPool.js";import{MeshBVH as Fn,computeBoundsTree as Rn,disposeBoundsTree as Bn,acceleratedRaycast as Un}from"three-mesh-bvh";import{RectAreaLightUniformsLib as kn}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{GLTFLoader as Nn}from"three/examples/jsm/loaders/GLTFLoader.js";import{STLLoader as zn}from"three/examples/jsm/loaders/STLLoader.js";import{TGALoader as Gn}from"three/examples/jsm/loaders/TGALoader.js";import{DRACOLoader as Vn}from"three/examples/jsm/loaders/DRACOLoader.js";import{KTX2Loader as Hn}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as Wn}from"three/examples/jsm/libs/meshopt_decoder.module.js";import*as Kn from"three/examples/jsm/utils/SkeletonUtils.js";import*as qn from"three/examples/jsm/libs/fflate.module.js";import{NURBSCurve as Yn}from"three/examples/jsm/curves/NURBSCurve.js";import{RectAreaLightHelper as Qn}from"three/examples/jsm/helpers/RectAreaLightHelper.js";var Xn="soonspacejs",Zn="2.13.
|
|
1
|
+
import*as e from"three";import{Vector3 as t,Euler as n,Box3 as s,Scene as r,Quaternion as i,Object3D as o,MathUtils as a,CubeTextureLoader as l,HalfFloatType as c,EquirectangularReflectionMapping as h,Color as u,Texture as d,FileLoader as p,ImageLoader as m,TextureLoader as f,Vector2 as g,Matrix4 as y,BufferAttribute as v,BufferGeometry as w,Float32BufferAttribute as b,LineBasicMaterial as x,Line as T,Line3 as S,CurvePath as O,LineCurve as M,LineCurve3 as E,Bone as C,Uint16BufferAttribute as D,SkinnedMesh as P,Skeleton as I,AnimationClip as A,VectorKeyframeTrack as L,QuaternionKeyframeTrack as j,InterpolateLinear as _,InterpolateDiscrete as F,EventDispatcher as R,LoopPingPong as B,KeyframeTrack as U,BooleanKeyframeTrack as k,NumberKeyframeTrack as N,ColorKeyframeTrack as z,StringKeyframeTrack as G,NormalAnimationBlendMode as V,FogExp2 as H,Mesh as W,LineSegments as K,EdgesGeometry as q,MeshStandardMaterial as Y,OrthographicCamera as Q,PerspectiveCamera as X,InstancedMesh as Z,DynamicDrawUsage as J,SRGBColorSpace as $,NoToneMapping as ee,Vector4 as te,Frustum as ne,REVISION as se,WebGLRenderTarget as re,UnsignedByteType as ie,LinearMipmapLinearFilter as oe,ColorManagement as ae,DoubleSide as le,BackSide as ce,FrontSide as he,WebGLCoordinateSystem as ue,LinearSRGBColorSpace as de,RGBAIntegerFormat as pe,RGIntegerFormat as me,RedIntegerFormat as fe,UnsignedIntType as ge,UnsignedShortType as ye,UnsignedInt248Type as ve,UnsignedShort4444Type as we,UnsignedShort5551Type as be,PCFSoftShadowMap as xe,Spherical as Te,Sphere as Se,ShaderMaterial as Oe,LinearFilter as Me,RGBAFormat as Ee,DataTexture as Ce,NoColorSpace as De,RepeatWrapping as Pe,NearestFilter as Ie,RedFormat as Ae,FloatType as Le,DepthTexture as je,GLBufferAttribute as _e,InterleavedBufferAttribute as Fe,Raycaster as Re,BoxGeometry as Be,Sprite as Ue,MeshBasicMaterial as ke,CanvasTexture as Ne,SpriteMaterial as ze,Clock as Ge,PMREMGenerator as Ve,AnimationMixer as He,UVMapping as We,CubeTexture as Ke,ReinhardToneMapping as qe,CineonToneMapping as Ye,ACESFilmicToneMapping as Qe,AgXToneMapping as Xe,SphereGeometry as Ze,CircleGeometry as Je,PlaneGeometry as $e,ExtrudeGeometry as et,Shape as tt,Matrix3 as nt,Group as st,Box2 as rt,Triangle as it,ShapeGeometry as ot,Plane as at,VideoTexture as lt,MeshPhongMaterial as ct,AmbientLight as ht,DirectionalLight as ut,HemisphereLight as dt,SpotLight as pt,PointLight as mt,RectAreaLight as ft,Loader as gt,LoaderUtils as yt,ClampToEdgeWrapping as vt,PropertyBinding as wt,ShapeUtils as bt,Material as xt,PointsMaterial as Tt,Points as St,LoadingManager as Ot,GridHelper as Mt,AxesHelper as Et,Box3Helper as Ct,DirectionalLightHelper as Dt,HemisphereLightHelper as Pt,SpotLightHelper as It,PointLightHelper as At}from"three";import*as Lt from"three/examples/jsm/libs/tween.module.js";import jt,{Easing as _t,Tween as Ft}from"three/examples/jsm/libs/tween.module.js";import{RGBELoader as Rt}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFExporter as Bt}from"three/examples/jsm/exporters/GLTFExporter.js";import{Pass as Ut,EffectPass as kt,EffectComposer as Nt,RenderPass as zt,SMAAEffect as Gt,SMAAPreset as Vt,EdgeDetectionMode as Ht,ToneMappingEffect as Wt,ToneMappingMode as Kt,BloomEffect as qt,BlendFunction as Yt,OutlineEffect as Qt}from"postprocessing";import{RoomEnvironment as Xt}from"three/examples/jsm/environments/RoomEnvironment.js";import Zt from"three/examples/jsm/libs/stats.module.js";import{Sky as Jt}from"three/examples/jsm/objects/Sky.js";import{mergeGeometries as $t,deinterleaveGeometry as en}from"three/examples/jsm/utils/BufferGeometryUtils.js";import{WebGLAnimation as tn}from"three/src/renderers/webgl/WebGLAnimation.js";import{WebGLAttributes as nn}from"three/src/renderers/webgl/WebGLAttributes.js";import{WebGLBackground as sn}from"three/src/renderers/webgl/WebGLBackground.js";import{WebGLBindingStates as rn}from"three/src/renderers/webgl/WebGLBindingStates.js";import{WebGLBufferRenderer as on}from"three/src/renderers/webgl/WebGLBufferRenderer.js";import{WebGLCapabilities as an}from"three/src/renderers/webgl/WebGLCapabilities.js";import{WebGLClipping as ln}from"three/src/renderers/webgl/WebGLClipping.js";import{WebGLCubeMaps as cn}from"three/src/renderers/webgl/WebGLCubeMaps.js";import{WebGLCubeUVMaps as hn}from"three/src/renderers/webgl/WebGLCubeUVMaps.js";import{WebGLExtensions as un}from"three/src/renderers/webgl/WebGLExtensions.js";import{WebGLGeometries as dn}from"three/src/renderers/webgl/WebGLGeometries.js";import{WebGLIndexedBufferRenderer as pn}from"three/src/renderers/webgl/WebGLIndexedBufferRenderer.js";import{WebGLInfo as mn}from"three/src/renderers/webgl/WebGLInfo.js";import{WebGLMorphtargets as fn}from"three/src/renderers/webgl/WebGLMorphtargets.js";import{WebGLObjects as gn}from"three/src/renderers/webgl/WebGLObjects.js";import{WebGLPrograms as yn}from"three/src/renderers/webgl/WebGLPrograms.js";import{WebGLProperties as vn}from"three/src/renderers/webgl/WebGLProperties.js";import{WebGLRenderLists as wn}from"three/src/renderers/webgl/WebGLRenderLists.js";import{WebGLRenderStates as bn}from"three/src/renderers/webgl/WebGLRenderStates.js";import{WebGLShadowMap as xn}from"three/src/renderers/webgl/WebGLShadowMap.js";import{WebGLState as Tn}from"three/src/renderers/webgl/WebGLState.js";import{WebGLTextures as Sn}from"three/src/renderers/webgl/WebGLTextures.js";import{WebGLUniforms as On}from"three/src/renderers/webgl/WebGLUniforms.js";import{WebGLUtils as Mn}from"three/src/renderers/webgl/WebGLUtils.js";import{WebXRManager as En}from"three/src/renderers/webxr/WebXRManager.js";import{WebGLMaterials as Cn}from"three/src/renderers/webgl/WebGLMaterials.js";import{WebGLUniformsGroups as Dn}from"three/src/renderers/webgl/WebGLUniformsGroups.js";import{createCanvasElement as Pn,toNormalizedProjectionMatrix as In,toReversedProjectionMatrix as An,probeAsync as Ln,warnOnce as jn}from"three/src/utils.js";import"three/examples/jsm/postprocessing/Pass.js";import{WorkerPool as _n}from"three/examples/jsm/utils/WorkerPool.js";import{MeshBVH as Fn,computeBoundsTree as Rn,disposeBoundsTree as Bn,acceleratedRaycast as Un}from"three-mesh-bvh";import{RectAreaLightUniformsLib as kn}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{GLTFLoader as Nn}from"three/examples/jsm/loaders/GLTFLoader.js";import{STLLoader as zn}from"three/examples/jsm/loaders/STLLoader.js";import{TGALoader as Gn}from"three/examples/jsm/loaders/TGALoader.js";import{DRACOLoader as Vn}from"three/examples/jsm/loaders/DRACOLoader.js";import{KTX2Loader as Hn}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as Wn}from"three/examples/jsm/libs/meshopt_decoder.module.js";import*as Kn from"three/examples/jsm/utils/SkeletonUtils.js";import*as qn from"three/examples/jsm/libs/fflate.module.js";import{NURBSCurve as Yn}from"three/examples/jsm/curves/NURBSCurve.js";import{RectAreaLightHelper as Qn}from"three/examples/jsm/helpers/RectAreaLightHelper.js";var Xn="soonspacejs",Zn="2.13.4";
|
|
2
2
|
/*!
|
|
3
3
|
* camera-controls
|
|
4
4
|
* https://github.com/yomotsu/camera-controls
|
|
5
5
|
* (c) 2017 @yomotsu
|
|
6
6
|
* Released under the MIT License.
|
|
7
|
-
*/const Jn=1,$n=2,es=4,ts=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),ns=0,ss=1,rs=-1;function is(e){return e.isPerspectiveCamera}function os(e){return e.isOrthographicCamera}const as=2*Math.PI,ls=Math.PI/2,cs=1e-5,hs=Math.PI/180;function us(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t=cs){return Math.abs(e)<t}function ps(e,t,n=cs){return ds(e-t,n)}function ms(e,t){return Math.round(e/t)*t}function fs(e){return isFinite(e)?e:e<0?-Number.MAX_VALUE:Number.MAX_VALUE}function gs(e){return Math.abs(e)<Number.MAX_VALUE?e:e*(1/0)}function ys(e,t,n,s,r=1/0,i){const o=2/(s=Math.max(1e-4,s)),a=o*i,l=1/(1+a+.48*a*a+.235*a*a*a);let c=e-t;const h=t,u=r*s;c=us(c,-u,u),t=e-c;const d=(n.value+o*c)*i;n.value=(n.value-o*d)*l;let p=t+(c+d)*l;return h-e>0==p>h&&(p=h,n.value=(p-h)/i),p}function vs(e,t,n,s,r=1/0,i,o){const a=2/(s=Math.max(1e-4,s)),l=a*i,c=1/(1+l+.48*l*l+.235*l*l*l);let h=t.x,u=t.y,d=t.z,p=e.x-h,m=e.y-u,f=e.z-d;const g=h,y=u,v=d,w=r*s,b=p*p+m*m+f*f;if(b>w*w){const e=Math.sqrt(b);p=p/e*w,m=m/e*w,f=f/e*w}h=e.x-p,u=e.y-m,d=e.z-f;const x=(n.x+a*p)*i,T=(n.y+a*m)*i,S=(n.z+a*f)*i;n.x=(n.x-a*x)*c,n.y=(n.y-a*T)*c,n.z=(n.z-a*S)*c,o.x=h+(p+x)*c,o.y=u+(m+T)*c,o.z=d+(f+S)*c;const O=g-e.x,M=y-e.y,E=v-e.z;return O*(o.x-g)+M*(o.y-y)+E*(o.z-v)>0&&(o.x=g,o.y=y,o.z=v,n.x=(o.x-g)/i,n.y=(o.y-y)/i,n.z=(o.z-v)/i),o}function ws(e,t){t.set(0,0),e.forEach((e=>{t.x+=e.clientX,t.y+=e.clientY})),t.x/=e.length,t.y/=e.length}function bs(e,t){return!!os(e)&&(console.warn(`${t} is not supported in OrthographicCamera`),!0)}class xs{constructor(){this._listeners={}}addEventListener(e,t){const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}removeAllEventListeners(e){e?Array.isArray(this._listeners[e])&&(this._listeners[e].length=0):this._listeners={}}dispatchEvent(e){const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,s=n.length;t<s;t++)n[t].call(this,e)}}}var Ts;const Ss=1/8,Os=/Mac/.test(null===(Ts=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===Ts?void 0:Ts.platform);let Ms,Es,Cs,Ds,Ps,Is,As,Ls,js,_s,Fs,Rs,Bs,Us,ks,Ns,zs,Gs,Vs,Hs,Ws,Ks,qs;class Ys extends xs{static install(e){Ms=e.THREE,Es=Object.freeze(new Ms.Vector3(0,0,0)),Cs=Object.freeze(new Ms.Vector3(0,1,0)),Ds=Object.freeze(new Ms.Vector3(0,0,1)),Ps=new Ms.Vector2,Is=new Ms.Vector3,As=new Ms.Vector3,Ls=new Ms.Vector3,js=new Ms.Vector3,_s=new Ms.Vector3,Fs=new Ms.Vector3,Rs=new Ms.Vector3,Bs=new Ms.Vector3,Us=new Ms.Vector3,ks=new Ms.Spherical,Ns=new Ms.Spherical,zs=new Ms.Box3,Gs=new Ms.Box3,Vs=new Ms.Sphere,Hs=new Ms.Quaternion,Ws=new Ms.Quaternion,Ks=new Ms.Matrix4,qs=new Ms.Raycaster}static get ACTION(){return ts}constructor(e,t){super(),this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.minDistance=Number.EPSILON,this.maxDistance=1/0,this.infinityDolly=!1,this.minZoom=.01,this.maxZoom=1/0,this.smoothTime=.25,this.draggingSmoothTime=.125,this.maxSpeed=1/0,this.azimuthRotateSpeed=1,this.polarRotateSpeed=1,this.dollySpeed=1,this.dollyDragInverted=!1,this.truckSpeed=2,this.dollyToCursor=!1,this.dragToOffset=!1,this.verticalDragToForward=!1,this.boundaryFriction=0,this.restThreshold=.01,this.colliderMeshes=[],this.cancel=()=>{},this._enabled=!0,this._state=ts.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=ns,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new Ms.Vector3,this._focalOffsetVelocity=new Ms.Vector3,this._zoomVelocity={value:0},this._truckInternal=(e,t,n)=>{let s,r;if(is(this._camera)){const n=Is.copy(this._camera.position).sub(this._target),i=this._camera.getEffectiveFOV()*hs,o=n.length()*Math.tan(.5*i);s=this.truckSpeed*e*o/this._elementRect.height,r=this.truckSpeed*t*o/this._elementRect.height}else{if(!os(this._camera))return;{const n=this._camera;s=e*(n.right-n.left)/n.zoom/this._elementRect.width,r=t*(n.top-n.bottom)/n.zoom/this._elementRect.height}}this.verticalDragToForward?(n?this.setFocalOffset(this._focalOffsetEnd.x+s,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(s,0,!0),this.forward(-r,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+s,this._focalOffsetEnd.y+r,this._focalOffsetEnd.z,!0):this.truck(s,r,!0)},this._rotateInternal=(e,t)=>{const n=as*this.azimuthRotateSpeed*e/this._elementRect.height,s=as*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,s,!0)},this._dollyInternal=(e,t,n)=>{const s=Math.pow(.95,-e*this.dollySpeed),r=this._sphericalEnd.radius,i=this._sphericalEnd.radius*s,o=us(i,this.minDistance,this.maxDistance),a=o-i;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(i,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(a,!0),this._dollyToNoClamp(o,!0)):this._dollyToNoClamp(o,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?i:o)-r,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)},this._zoomInternal=(e,t,n)=>{const s=Math.pow(.95,e*this.dollySpeed),r=this._zoom,i=this._zoom*s;this.zoomTo(i,!0),this.dollyToCursor&&(this._changedZoom+=i-r,this._dollyControlCoord.set(t,n))},void 0===Ms&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=(new Ms.Quaternion).setFromUnitVectors(this._camera.up,Cs),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=ts.NONE,this._target=new Ms.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new Ms.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=(new Ms.Spherical).setFromVector3(Is.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new Ms.Vector3,new Ms.Vector3,new Ms.Vector3,new Ms.Vector3],this._updateNearPlaneCorners(),this._boundary=new Ms.Box3(new Ms.Vector3(-1/0,-1/0,-1/0),new Ms.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new Ms.Vector2,this.mouseButtons={left:ts.ROTATE,middle:ts.DOLLY,right:ts.TRUCK,wheel:is(this._camera)?ts.DOLLY:os(this._camera)?ts.ZOOM:ts.NONE},this.touches={one:ts.TOUCH_ROTATE,two:is(this._camera)?ts.TOUCH_DOLLY_TRUCK:os(this._camera)?ts.TOUCH_ZOOM_TRUCK:ts.NONE,three:ts.TOUCH_TRUCK};const n=new Ms.Vector2,s=new Ms.Vector2,r=new Ms.Vector2,i=e=>{if(!this._enabled||!this._domElement)return;if(0!==this._interactiveArea.left||0!==this._interactiveArea.top||1!==this._interactiveArea.width||1!==this._interactiveArea.height){const t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,s=e.clientY/t.height;if(n<this._interactiveArea.left||n>this._interactiveArea.right||s<this._interactiveArea.top||s>this._interactiveArea.bottom)return}const t="mouse"!==e.pointerType?null:(e.buttons&Jn)===Jn?Jn:(e.buttons&es)===es?es:(e.buttons&$n)===$n?$n:null;if(null!==t){const e=this._findPointerByMouseButton(t);e&&this._disposePointer(e)}if((e.buttons&Jn)===Jn&&this._lockedPointer)return;const n={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:t};this._activePointers.push(n),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",a),this._isDragging=!0,u(e)},o=e=>{e.cancelable&&e.preventDefault();const t=e.pointerId,n=this._lockedPointer||this._findPointerById(t);if(n){if(n.clientX=e.clientX,n.clientY=e.clientY,n.deltaX=e.movementX,n.deltaY=e.movementY,this._state=0,"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(e.buttons&Jn)===Jn)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(e.buttons&es)===es&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(e.buttons&$n)===$n&&(this._state=this._state|this.mouseButtons.right);d()}},a=e=>{const t=this._findPointerById(e.pointerId);if(!t||t!==this._lockedPointer){if(t&&this._disposePointer(t),"touch"===e.pointerType)switch(this._activePointers.length){case 0:this._state=ts.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._state=ts.NONE;p()}};let l=-1;const c=e=>{if(!this._domElement)return;if(!this._enabled||this.mouseButtons.wheel===ts.NONE)return;if(0!==this._interactiveArea.left||0!==this._interactiveArea.top||1!==this._interactiveArea.width||1!==this._interactiveArea.height){const t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,s=e.clientY/t.height;if(n<this._interactiveArea.left||n>this._interactiveArea.right||s<this._interactiveArea.top||s>this._interactiveArea.bottom)return}if(e.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===ts.ROTATE||this.mouseButtons.wheel===ts.TRUCK){const e=performance.now();l-e<1e3&&this._getClientRect(this._elementRect),l=e}const t=Os?-1:-3,n=1===e.deltaMode?e.deltaY/t:e.deltaY/(10*t),s=this.dollyToCursor?(e.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,r=this.dollyToCursor?(e.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case ts.ROTATE:this._rotateInternal(e.deltaX,e.deltaY),this._isUserControllingRotate=!0;break;case ts.TRUCK:this._truckInternal(e.deltaX,e.deltaY,!1),this._isUserControllingTruck=!0;break;case ts.OFFSET:this._truckInternal(e.deltaX,e.deltaY,!0),this._isUserControllingOffset=!0;break;case ts.DOLLY:this._dollyInternal(-n,s,r),this._isUserControllingDolly=!0;break;case ts.ZOOM:this._zoomInternal(-n,s,r),this._isUserControllingZoom=!0}this.dispatchEvent({type:"control"})},h=e=>{if(this._domElement&&this._enabled){if(this.mouseButtons.right===Ys.ACTION.NONE){const t=e instanceof PointerEvent?e.pointerId:0,n=this._findPointerById(t);return n&&this._disposePointer(n),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),void this._domElement.ownerDocument.removeEventListener("pointerup",a)}e.preventDefault()}},u=e=>{if(!this._enabled)return;ws(this._activePointers,Ps),this._getClientRect(this._elementRect),n.copy(Ps),s.copy(Ps);if(this._activePointers.length>=2){const e=Ps.x-this._activePointers[1].clientX,t=Ps.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t);r.set(0,n);const i=.5*(this._activePointers[0].clientX+this._activePointers[1].clientX),o=.5*(this._activePointers[0].clientY+this._activePointers[1].clientY);s.set(i,o)}if(this._state=0,e)if("pointerType"in e&&"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._lockedPointer||(e.buttons&Jn)!==Jn||(this._state=this._state|this.mouseButtons.left),(e.buttons&es)===es&&(this._state=this._state|this.mouseButtons.middle),(e.buttons&$n)===$n&&(this._state=this._state|this.mouseButtons.right);else this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);(this._state&ts.ROTATE)!==ts.ROTATE&&(this._state&ts.TOUCH_ROTATE)!==ts.TOUCH_ROTATE&&(this._state&ts.TOUCH_DOLLY_ROTATE)!==ts.TOUCH_DOLLY_ROTATE&&(this._state&ts.TOUCH_ZOOM_ROTATE)!==ts.TOUCH_ZOOM_ROTATE||(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),(this._state&ts.TRUCK)!==ts.TRUCK&&(this._state&ts.TOUCH_TRUCK)!==ts.TOUCH_TRUCK&&(this._state&ts.TOUCH_DOLLY_TRUCK)!==ts.TOUCH_DOLLY_TRUCK&&(this._state&ts.TOUCH_ZOOM_TRUCK)!==ts.TOUCH_ZOOM_TRUCK||(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),(this._state&ts.DOLLY)!==ts.DOLLY&&(this._state&ts.TOUCH_DOLLY)!==ts.TOUCH_DOLLY&&(this._state&ts.TOUCH_DOLLY_TRUCK)!==ts.TOUCH_DOLLY_TRUCK&&(this._state&ts.TOUCH_DOLLY_OFFSET)!==ts.TOUCH_DOLLY_OFFSET&&(this._state&ts.TOUCH_DOLLY_ROTATE)!==ts.TOUCH_DOLLY_ROTATE||(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),(this._state&ts.ZOOM)!==ts.ZOOM&&(this._state&ts.TOUCH_ZOOM)!==ts.TOUCH_ZOOM&&(this._state&ts.TOUCH_ZOOM_TRUCK)!==ts.TOUCH_ZOOM_TRUCK&&(this._state&ts.TOUCH_ZOOM_OFFSET)!==ts.TOUCH_ZOOM_OFFSET&&(this._state&ts.TOUCH_ZOOM_ROTATE)!==ts.TOUCH_ZOOM_ROTATE||(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),(this._state&ts.OFFSET)!==ts.OFFSET&&(this._state&ts.TOUCH_OFFSET)!==ts.TOUCH_OFFSET&&(this._state&ts.TOUCH_DOLLY_OFFSET)!==ts.TOUCH_DOLLY_OFFSET&&(this._state&ts.TOUCH_ZOOM_OFFSET)!==ts.TOUCH_ZOOM_OFFSET||(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},d=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,ws(this._activePointers,Ps);const e=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,t=e?-e.deltaX:s.x-Ps.x,i=e?-e.deltaY:s.y-Ps.y;if(s.copy(Ps),(this._state&ts.ROTATE)!==ts.ROTATE&&(this._state&ts.TOUCH_ROTATE)!==ts.TOUCH_ROTATE&&(this._state&ts.TOUCH_DOLLY_ROTATE)!==ts.TOUCH_DOLLY_ROTATE&&(this._state&ts.TOUCH_ZOOM_ROTATE)!==ts.TOUCH_ZOOM_ROTATE||(this._rotateInternal(t,i),this._isUserControllingRotate=!0),(this._state&ts.DOLLY)===ts.DOLLY||(this._state&ts.ZOOM)===ts.ZOOM){const e=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,t=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,s=this.dollyDragInverted?-1:1;(this._state&ts.DOLLY)===ts.DOLLY?(this._dollyInternal(s*i*Ss,e,t),this._isUserControllingDolly=!0):(this._zoomInternal(s*i*Ss,e,t),this._isUserControllingZoom=!0)}if((this._state&ts.TOUCH_DOLLY)===ts.TOUCH_DOLLY||(this._state&ts.TOUCH_ZOOM)===ts.TOUCH_ZOOM||(this._state&ts.TOUCH_DOLLY_TRUCK)===ts.TOUCH_DOLLY_TRUCK||(this._state&ts.TOUCH_ZOOM_TRUCK)===ts.TOUCH_ZOOM_TRUCK||(this._state&ts.TOUCH_DOLLY_OFFSET)===ts.TOUCH_DOLLY_OFFSET||(this._state&ts.TOUCH_ZOOM_OFFSET)===ts.TOUCH_ZOOM_OFFSET||(this._state&ts.TOUCH_DOLLY_ROTATE)===ts.TOUCH_DOLLY_ROTATE||(this._state&ts.TOUCH_ZOOM_ROTATE)===ts.TOUCH_ZOOM_ROTATE){const e=Ps.x-this._activePointers[1].clientX,t=Ps.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t),i=r.y-n;r.set(0,n);const o=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,a=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&ts.TOUCH_DOLLY)===ts.TOUCH_DOLLY||(this._state&ts.TOUCH_DOLLY_ROTATE)===ts.TOUCH_DOLLY_ROTATE||(this._state&ts.TOUCH_DOLLY_TRUCK)===ts.TOUCH_DOLLY_TRUCK||(this._state&ts.TOUCH_DOLLY_OFFSET)===ts.TOUCH_DOLLY_OFFSET?(this._dollyInternal(i*Ss,o,a),this._isUserControllingDolly=!0):(this._zoomInternal(i*Ss,o,a),this._isUserControllingZoom=!0)}(this._state&ts.TRUCK)!==ts.TRUCK&&(this._state&ts.TOUCH_TRUCK)!==ts.TOUCH_TRUCK&&(this._state&ts.TOUCH_DOLLY_TRUCK)!==ts.TOUCH_DOLLY_TRUCK&&(this._state&ts.TOUCH_ZOOM_TRUCK)!==ts.TOUCH_ZOOM_TRUCK||(this._truckInternal(t,i,!1),this._isUserControllingTruck=!0),(this._state&ts.OFFSET)!==ts.OFFSET&&(this._state&ts.TOUCH_OFFSET)!==ts.TOUCH_OFFSET&&(this._state&ts.TOUCH_DOLLY_OFFSET)!==ts.TOUCH_DOLLY_OFFSET&&(this._state&ts.TOUCH_ZOOM_OFFSET)!==ts.TOUCH_ZOOM_OFFSET||(this._truckInternal(t,i,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{ws(this._activePointers,Ps),s.copy(Ps),this._dragNeedsUpdate=!1,(0===this._activePointers.length||1===this._activePointers.length&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),0===this._activePointers.length&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{this._enabled&&this._domElement&&(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",m),this._domElement.ownerDocument.addEventListener("pointerlockerror",f),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",a),u())},this.unlockPointer=()=>{var e,t,n;null!==this._lockedPointer&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),null===(e=this._domElement)||void 0===e||e.ownerDocument.exitPointerLock(),null===(t=this._domElement)||void 0===t||t.ownerDocument.removeEventListener("pointerlockchange",m),null===(n=this._domElement)||void 0===n||n.ownerDocument.removeEventListener("pointerlockerror",f),this.cancel()};const m=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},f=()=>{this.unlockPointer()};this._addAllEventListeners=e=>{this._domElement=e,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",i),this._domElement.addEventListener("pointercancel",a),this._domElement.addEventListener("wheel",c,{passive:!1}),this._domElement.addEventListener("contextmenu",h)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",i),this._domElement.removeEventListener("pointercancel",a),this._domElement.removeEventListener("wheel",c,{passive:!1}),this._domElement.removeEventListener("contextmenu",h),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this._domElement.ownerDocument.removeEventListener("pointerlockchange",m),this._domElement.ownerDocument.removeEventListener("pointerlockerror",f))},this.cancel=()=>{this._state!==ts.NONE&&(this._state=ts.NONE,this._activePointers.length=0,p())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=us(e.width,0,1),this._interactiveArea.height=us(e.height,0,1),this._interactiveArea.x=us(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=us(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;const s=us(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=us(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=r,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const i=!n||ps(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ps(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(i)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=ns,this._changedDolly=0,this._dollyToNoClamp(us(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const t=this._collisionTest(),s=ps(t,this._spherical.radius);if(!(n>e)&&s)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,t)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const s=!t||ps(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(s)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(js).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=us(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||ps(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),_s.setFromMatrixColumn(this._camera.matrix,0),Fs.setFromMatrixColumn(this._camera.matrix,1),_s.multiplyScalar(e),Fs.multiplyScalar(-t);const s=Is.copy(_s).add(Fs),r=As.copy(this._targetEnd).add(s);return this.moveTo(r.x,r.y,r.z,n)}forward(e,t=!1){Is.setFromMatrixColumn(this._camera.matrix,0),Is.crossVectors(this._camera.up,Is),Is.multiplyScalar(e);const n=As.copy(this._targetEnd).add(Is);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return Is.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+Is.x,this._targetEnd.y+Is.y,this._targetEnd.z+Is.z,t)}moveTo(e,t,n,s=!1){this._isUserControllingTruck=!1;const r=Is.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const i=!s||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}lookInDirectionOf(e,t,n,s=!1){const r=Is.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(r.x,r.y,r.z,s)}fitToBox(e,t,{cover:n=!1,paddingLeft:s=0,paddingRight:r=0,paddingBottom:i=0,paddingTop:o=0}={}){const a=[],l=e.isBox3?zs.copy(e):zs.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const c=ms(this._sphericalEnd.theta,ls),h=ms(this._sphericalEnd.phi,ls);a.push(this.rotateTo(c,h,t));const u=Is.setFromSpherical(this._sphericalEnd).normalize(),d=Hs.setFromUnitVectors(u,Ds),p=ps(Math.abs(u.y),1);p&&d.multiply(Ws.setFromAxisAngle(Cs,c)),d.multiply(this._yAxisUpSpaceInverse);const m=Gs.makeEmpty();As.copy(l.min).applyQuaternion(d),m.expandByPoint(As),As.copy(l.min).setX(l.max.x).applyQuaternion(d),m.expandByPoint(As),As.copy(l.min).setY(l.max.y).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).setZ(l.min.z).applyQuaternion(d),m.expandByPoint(As),As.copy(l.min).setZ(l.max.z).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).setY(l.min.y).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).setX(l.min.x).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).applyQuaternion(d),m.expandByPoint(As),m.min.x-=s,m.min.y-=i,m.max.x+=r,m.max.y+=o,d.setFromUnitVectors(Ds,u),p&&d.premultiply(Ws.invert()),d.premultiply(this._yAxisUpSpace);const f=m.getSize(Is),g=m.getCenter(As).applyQuaternion(d);if(is(this._camera)){const e=this.getDistanceToFitBox(f.x,f.y,f.z,n);a.push(this.moveTo(g.x,g.y,g.z,t)),a.push(this.dollyTo(e,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(os(this._camera)){const e=this._camera,s=e.right-e.left,r=e.top-e.bottom,i=n?Math.max(s/f.x,r/f.y):Math.min(s/f.x,r/f.y);a.push(this.moveTo(g.x,g.y,g.z,t)),a.push(this.zoomTo(i,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const n=[],s="isObject3D"in e?Ys.createBoundingSphere(e,Vs):Vs.copy(e);if(n.push(this.moveTo(s.center.x,s.center.y,s.center.z,t)),is(this._camera)){const e=this.getDistanceToFitSphere(s.radius);n.push(this.dollyTo(e,t))}else if(os(this._camera)){const e=this._camera.right-this._camera.left,r=this._camera.top-this._camera.bottom,i=2*s.radius,o=Math.min(e/i,r/i);n.push(this.zoomTo(o,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,s,r,i,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=ns,this._changedDolly=0;const a=As.set(s,r,i),l=Is.set(e,t,n);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const c=!o||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold)&&ps(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ps(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ps(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(c)}lerpLookAt(e,t,n,s,r,i,o,a,l,c,h,u,d,p=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=ns,this._changedDolly=0;const m=Is.set(s,r,i),f=As.set(e,t,n);ks.setFromVector3(f.sub(m).applyQuaternion(this._yAxisUpSpace));const g=Ls.set(c,h,u),y=As.set(o,a,l);Ns.setFromVector3(y.sub(g).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(m.lerp(g,d));const v=Ns.theta-ks.theta,w=Ns.phi-ks.phi,b=Ns.radius-ks.radius;this._sphericalEnd.set(ks.radius+b*d,ks.phi+w*d,ks.theta+v*d),this.normalizeRotations(),this._needsUpdate=!0,p||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const x=!p||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold)&&ps(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ps(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ps(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(x)}setPosition(e,t,n,s=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,n,s=!1){const r=this.getPosition(Is),i=this.setLookAt(r.x,r.y,r.z,e,t,n,s);return this._sphericalEnd.phi=us(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),i}setFocalOffset(e,t,n,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const r=!s||ps(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&ps(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&ps(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),_s.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Fs.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Rs.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=Is.set(e,t,n),r=s.distanceTo(this._camera.position),i=s.sub(this._camera.position);_s.multiplyScalar(i.x),Fs.multiplyScalar(i.y),Rs.multiplyScalar(i.z),Is.copy(_s).add(Fs).add(Rs),Is.z=Is.z+r,this.dollyTo(r,!1),this.setFocalOffset(-Is.x,Is.y,-Is.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e)return this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),void(this._needsUpdate=!0);this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,s){null!==e?(this._viewport=this._viewport||new Ms.Vector4,"number"==typeof e?this._viewport.set(e,t,n,s):this._viewport.copy(e)):this._viewport=null}getDistanceToFitBox(e,t,n,s=!1){if(bs(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,i=this._camera.getEffectiveFOV()*hs,o=this._camera.aspect;return.5*((s?r>o:r<o)?t:e/o)/Math.tan(.5*i)+.5*n}getDistanceToFitSphere(e){if(bs(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*hs,n=2*Math.atan(Math.tan(.5*t)*this._camera.aspect),s=1<this._camera.aspect?t:n;return e/Math.sin(.5*s)}getTarget(e,t=!0){return(e&&e.isVector3?e:new Ms.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e,t=!0){return(e&&e.isVector3?e:new Ms.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e,t=!0){return(e||new Ms.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e,t=!0){return(e&&e.isVector3?e:new Ms.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){this._sphericalEnd.theta=this._sphericalEnd.theta%as,this._sphericalEnd.theta<0&&(this._sphericalEnd.theta+=as),this._spherical.theta+=as*Math.round((this._sphericalEnd.theta-this._spherical.theta)/as)}stop(){this._focalOffset.copy(this._focalOffsetEnd),this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd),this._zoom=this._zoomEnd}reset(e=!1){if(!ps(this._camera.up.x,this._cameraUp0.x)||!ps(this._camera.up.y,this._cameraUp0.y)||!ps(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const e=this.getPosition(Is);this.updateCameraUp(),this.setPosition(e.x,e.y,e.z)}const t=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,e),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,e),this.zoomTo(this._zoom0,e)];return Promise.all(t)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,Cs),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=Is.subVectors(this._target,this._camera.position).normalize(),t=As.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();const n=this.getPosition(Is);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}update(e){const t=this._sphericalEnd.theta-this._spherical.theta,n=this._sphericalEnd.phi-this._spherical.phi,s=this._sphericalEnd.radius-this._spherical.radius,r=Bs.subVectors(this._targetEnd,this._target),i=Us.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(ds(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=ys(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,t,1/0,e),this._needsUpdate=!0}if(ds(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=ys(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,t,1/0,e),this._needsUpdate=!0}if(ds(s))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const t=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=ys(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,t,this.maxSpeed,e),this._needsUpdate=!0}if(ds(r.x)&&ds(r.y)&&ds(r.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const t=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;vs(this._target,this._targetEnd,this._targetVelocity,t,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(ds(i.x)&&ds(i.y)&&ds(i.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const t=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;vs(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,t,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(ds(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const t=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=ys(this._zoom,this._zoomEnd,this._zoomVelocity,t,1/0,e)}if(this.dollyToCursor)if(is(this._camera)&&0!==this._changedDolly){const e=this._spherical.radius-this._lastDistance,t=this._camera,n=this._getCameraDirection(js),s=Is.copy(n).cross(t.up).normalize();0===s.lengthSq()&&(s.x=1);const r=As.crossVectors(s,n),i=this._sphericalEnd.radius*Math.tan(t.getEffectiveFOV()*hs*.5),o=(this._sphericalEnd.radius-e-this._sphericalEnd.radius)/this._sphericalEnd.radius,a=Ls.copy(this._targetEnd).add(s.multiplyScalar(this._dollyControlCoord.x*i*t.aspect)).add(r.multiplyScalar(this._dollyControlCoord.y*i)),l=Is.copy(this._targetEnd).lerp(a,o),c=this._lastDollyDirection===ss&&this._spherical.radius<=this.minDistance,h=this._lastDollyDirection===rs&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(c||h)){this._sphericalEnd.radius-=e,this._spherical.radius-=e;const t=As.copy(n).multiplyScalar(-e);l.add(t)}this._boundary.clampPoint(l,l);const u=As.subVectors(l,this._targetEnd);this._targetEnd.copy(l),this._target.add(u),this._changedDolly-=e,ds(this._changedDolly)&&(this._changedDolly=0)}else if(os(this._camera)&&0!==this._changedZoom){const e=this._zoom-this._lastZoom,t=this._camera,n=Is.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(t.near+t.far)/(t.near-t.far)).unproject(t),s=As.set(0,0,-1).applyQuaternion(t.quaternion),r=Ls.copy(n).add(s.multiplyScalar(-n.dot(t.up))),i=-(this._zoom-e-this._zoom)/this._zoom,o=this._getCameraDirection(js),a=this._targetEnd.dot(o),l=Is.copy(this._targetEnd).lerp(r,i),c=l.dot(o),h=o.multiplyScalar(c-a);l.sub(h),this._boundary.clampPoint(l,l);const u=As.subVectors(l,this._targetEnd);this._targetEnd.copy(l),this._target.add(u),this._changedZoom-=e,ds(this._changedZoom)&&(this._changedZoom=0)}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0),this._dragNeedsUpdate=!0;const a=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,a),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target);(!ds(this._focalOffset.x)||!ds(this._focalOffset.y)||!ds(this._focalOffset.z))&&(this._camera.updateMatrixWorld(),_s.setFromMatrixColumn(this._camera.matrix,0),Fs.setFromMatrixColumn(this._camera.matrix,1),Rs.setFromMatrixColumn(this._camera.matrix,2),_s.multiplyScalar(this._focalOffset.x),Fs.multiplyScalar(-this._focalOffset.y),Rs.multiplyScalar(this._focalOffset.z),Is.copy(_s).add(Fs).add(Rs),this._camera.position.add(Is)),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),Is.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const l=this._needsUpdate;return l&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):l?(this.dispatchEvent({type:"update"}),ds(t,this.restThreshold)&&ds(n,this.restThreshold)&&ds(s,this.restThreshold)&&ds(r.x,this.restThreshold)&&ds(r.y,this.restThreshold)&&ds(r.z,this.restThreshold)&&ds(i.x,this.restThreshold)&&ds(i.y,this.restThreshold)&&ds(i.z,this.restThreshold)&&ds(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!l&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=l,this._needsUpdate=!1,l}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:fs(this.maxDistance),minZoom:this.minZoom,maxZoom:fs(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:fs(this.maxPolarAngle),minAzimuthAngle:fs(this.minAzimuthAngle),maxAzimuthAngle:fs(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,verticalDragToForward:this.verticalDragToForward,target:this._targetEnd.toArray(),position:Is.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(e,t=!1){const n=JSON.parse(e);this.enabled=n.enabled,this.minDistance=n.minDistance,this.maxDistance=gs(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=gs(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=gs(n.maxPolarAngle),this.minAzimuthAngle=gs(n.minAzimuthAngle),this.maxAzimuthAngle=gs(n.maxAzimuthAngle),this.smoothTime=n.smoothTime,this.draggingSmoothTime=n.draggingSmoothTime,this.dollySpeed=n.dollySpeed,this.truckSpeed=n.truckSpeed,this.dollyToCursor=n.dollyToCursor,this.verticalDragToForward=n.verticalDragToForward,this._target0.fromArray(n.target0),this._position0.fromArray(n.position0),this._zoom0=n.zoom0,this._focalOffset0.fromArray(n.focalOffset0),this.moveTo(n.target[0],n.target[1],n.target[2],t),ks.setFromVector3(Is.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(ks.theta,ks.phi,t),this.dollyTo(ks.radius,t),this.zoomTo(n.zoom,t),this.setFocalOffset(n.focalOffset[0],n.focalOffset[1],n.focalOffset[2],t),this._needsUpdate=!0}connect(e){this._domElement?console.warn("camera-controls is already connected."):(e.setAttribute("data-camera-controls-version","2.9.0"),this._addAllEventListeners(e),this._getClientRect(this._elementRect))}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&(this._domElement.removeAttribute("data-camera-controls-version"),this._domElement=void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(e){return e.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(e){return this._getTargetDirection(e).negate()}_findPointerById(e){return this._activePointers.find((t=>t.pointerId===e))}_findPointerByMouseButton(e){return this._activePointers.find((t=>t.mouseButton===e))}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const s=t.lengthSq();if(0===s)return e;const r=As.copy(t).add(e),i=this._boundary.clampPoint(r,Ls).sub(r),o=i.lengthSq();if(0===o)return e.add(t);if(o===s)return e;if(0===n)return e.add(t).add(i);{const s=1+n*o/t.dot(i);return e.add(As.copy(t).multiplyScalar(s)).add(i.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(is(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*hs,s=Math.tan(.5*n)*t,r=s*e.aspect;this._nearPlaneCorners[0].set(-r,-s,0),this._nearPlaneCorners[1].set(r,-s,0),this._nearPlaneCorners[2].set(r,s,0),this._nearPlaneCorners[3].set(-r,s,0)}else if(os(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,s=e.right*t,r=e.top*t,i=e.bottom*t;this._nearPlaneCorners[0].set(n,r,0),this._nearPlaneCorners[1].set(s,r,0),this._nearPlaneCorners[2].set(s,i,0),this._nearPlaneCorners[3].set(n,i,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1))return e;if(bs(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(js);Ks.lookAt(Es,t,this._camera.up);for(let n=0;n<4;n++){const s=As.copy(this._nearPlaneCorners[n]);s.applyMatrix4(Ks);const r=Ls.addVectors(this._target,s);qs.set(r,t),qs.far=this._spherical.radius+1;const i=qs.intersectObjects(this.colliderMeshes);0!==i.length&&i[0].distance<e&&(e=i[0].distance)}return e}_getClientRect(e){if(!this._domElement)return;const t=this._domElement.getBoundingClientRect();return e.x=t.left,e.y=t.top,this._viewport?(e.x+=this._viewport.x,e.y+=t.height-this._viewport.w-this._viewport.y,e.width=this._viewport.z,e.height=this._viewport.w):(e.width=t.width,e.height=t.height),e}_createOnRestPromise(e){return e?Promise.resolve():(this._hasRested=!1,this.dispatchEvent({type:"transitionstart"}),new Promise((e=>{const t=()=>{this.removeEventListener("rest",t),e()};this.addEventListener("rest",t)})))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new Ms.Sphere){const n=t,s=n.center;zs.makeEmpty(),e.traverseVisible((e=>{e.isMesh&&zs.expandByObject(e)})),zs.getCenter(s);let r=0;return e.traverseVisible((e=>{if(!e.isMesh)return;const t=e,n=t.geometry.clone();n.applyMatrix4(t.matrixWorld);const i=n.attributes.position;for(let e=0,t=i.count;e<t;e++)Is.fromBufferAttribute(i,e),r=Math.max(r,s.distanceToSquared(Is))})),n.radius=Math.sqrt(r),n}}const Qs="[soonspacejs]: ";var Xs,Zs;!function(e){e.Group="Group",e.Light="Light",e.Model="Model",e.Poi="Poi",e.PoiNode="PoiNode",e.Canvas3D="Canvas3D",e.Topology="Topology",e.Helper="Helper",e.Decal="Decal",e.PluginObject="PluginObject"}(Xs||(Xs={})),function(e){e.sbm="SBM",e.sbmx="SBMX",e.glb="GLB",e.gltf="GLTF",e.fbx="FBX",e.obj="OBJ",e.stl="STL"}(Zs||(Zs={}));const Js="In soonspacejs: ",$s=(e,t)=>{let n="";for(const e in t)n+=`${e}: ${t[e]};`;console.log(`%c${e}`,n)},er={},tr=e=>{e in er||(er[e]=!0,console.warn(Js+e))},nr=e=>{e in er||(er[e]=!0,console.error(Js+e))};function sr(e){return e instanceof t?e:new t(e.x,e.y,e.z)}function rr(e){return e instanceof n?e:new n(e.x,e.y,e.z)}function ir(e,t){const n=new s;return e instanceof r?e.children.filter((e=>!("isTransformControls"in e))).reduce(((e,n)=>e.union((new s).setFromObject(n,t))),n):n.setFromObject(e,t),n.isEmpty()&&(e.getWorldPosition(n.min),n.max.copy(n.min)),n}function or(e,t,n){const s=n.clone();return Math.abs(t[e]-n[e])>Math.PI&&(t[e]>n[e]?s[e]+=2*Math.PI:s[e]-=2*Math.PI),s}function ar(e){return Math.PI/180*e}function lr(e,s=!0){return s?{position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new i)),scale:e.getWorldScale(new t)}:{position:e.position.clone(),rotation:e.rotation.clone(),scale:e.scale.clone()}}function cr(e,t,n=!0){const s=lr(t,n);e.position.copy(s.position),e.rotation.copy(s.rotation),e.scale.copy(s.scale)}function hr(e){return!!e.visible&&(!e.parent||hr(e.parent))}const ur=new t,dr=new t,pr=new t,mr=(e,t,n,s=1)=>{const r=ur.set(e.x/n.width*2-1,-e.y/n.height*2+1,s);return r.unproject(t),r},fr=(e,t,n,s)=>{const r=((e,t,n)=>{const s=n.width/2,r=n.height/2;t.updateMatrixWorld();const i=e.project(t);return i.x=i.x*s+s,i.y=-i.y*r+r,i})(pr.copy(e),n,s);let i=0;for(let o=0;o<2;++o){const a=dr.copy(r).setComponent(o,r.getComponent(o)+t),l=mr(a,n,s,a.z);i=Math.max(i,e.distanceTo(l))}return i};function gr(e,n,s=5){const r=new o,i=new t,a=new t;return r.position.set(e.x,e.y,e.z),r.rotation.set(n.x,n.y,n.z),r.getWorldDirection(i),i.multiplyScalar(s),a.subVectors(r.position,i),a}function yr(e,t){const n=e-t;return a.euclideanModulo(n+Math.PI,2*Math.PI)-Math.PI}class vr{constructor(){this.min=null,this.roots=[],this.nodes=new Map}shift(){const e=this.min;if(null===e||this.roots.length<1)return this.min=null,e;this.remove(e),this.roots.length>50&&this.consolidate();let t=1/0;const n=this.roots.length;for(let e=0;e<n;e++){const n=this.roots[e],s=this.getDistance(n);s<t&&(t=s,this.min=n)}return e}consolidate(){const e=[[],[],[],[],[],[],[]],t=e.length-1,n=this.roots.length;for(let s=0;s<n;s++){const n=this.roots[s],r=this.nodes.get(n);r&&r.depth<t&&e[r.depth].push(n)}for(let n=0;n<=t;n++)for(;e[n].length>1;){const s=e[n].shift(),r=e[n].shift(),i=n+1;let o=-1;if(void 0!==s&&void 0!==r){const n=this.nodes.get(s),a=this.nodes.get(r);n&&a&&(n.distance<a.distance?(n.depth=i,n.children.push(r),a.parent=s,i<=t&&e[i].push(s),o=this.roots.indexOf(r)):(a.depth=i,a.children.push(s),n.parent=r,i<=t&&e[i].push(r),o=this.roots.indexOf(s)))}o>-1&&this.roots.splice(o,1)}}add(e,t){if(this.nodes.set(e,{nodeIndex:e,distance:t,depth:0,parent:null,children:[]}),null===this.min)this.min=e;else{const n=this.nodes.get(this.min);n&&t<n.distance&&(this.min=e)}this.roots.push(e)}update(e,t){this.remove(e),this.add(e,t)}remove(e){var t,n;if(!this.nodes.has(e))return;const s=null===(t=this.nodes.get(e))||void 0===t?void 0:t.children;if(s&&s.length>0)for(let t=0;t<s.length;t++){const n=s[t],r=this.nodes.get(n),i=this.nodes.get(e);r&&i&&(r.parent=i.parent),r&&null===r.parent&&this.roots.push(n)}let r=null===(n=this.nodes.get(e))||void 0===n?void 0:n.parent;if(null===r){const t=this.roots.indexOf(e);t>-1&&this.roots.splice(t,1)}else for(;r;){const e=this.nodes.get(r);e&&(e.depth--,r=e.parent)}}getDistance(e){const t=this.nodes.get(e);return t?t.distance:1/0}}async function wr({path:e="",file:t}){if(Array.isArray(t))return(new l).setPath(e).loadAsync(t);{const n=Zr(t);if("hdr"===n||"pic"===n){const n=await Ir.setPath(e).setDataType(c).loadAsync(t);return n.mapping=h,n}{const n=await Pr.setPath(e).loadAsync(t);return n.mapping=h,n}}}function br(e){if(!e)return null;const{colors:t,stops:n,size:s=1024}=e,r=document.createElement("canvas"),i=r.getContext("2d");if(!i)return null;r.width=16,r.height=s;const o=i.createLinearGradient(0,0,0,s),a=new u,l=t.map((e=>a.set(e).getStyle()));for(let e=0,t=l.length-1;e<=t;e++)o.addColorStop(n?n[e]:e/t,l[e]);i.fillStyle=o,i.fillRect(0,0,16,s);const c=new d(r);return c.needsUpdate=!0,c}const xr=e=>{const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)};function Tr(e){return Wr(e)?function(e){return e.map((e=>Tr(e)))}(e):Kr(e)?function(e){if(Kr(e)){const t={};for(const n in e)t[n]=Tr(e[n]);return t}return e}(e):e}const Sr=e=>ti(e,(e=>e.clone())),Or=e=>ti(e,(e=>e.dispose())),Mr={},Er=new p;Er.setRequestHeader(Mr);const Cr=async(e,t)=>(Er.setResponseType(t),Er.loadAsync(e)),Dr=new m;Dr.load=(e,t,n,s)=>{const r=new Image;return Er.setResponseType("blob"),Er.load(e,(function(e){r.src=URL.createObjectURL(e),r.onload=()=>URL.revokeObjectURL(r.src),null==t||t(r)}),n,s),r};const Pr=new f;Pr.setRequestHeader(Mr);const Ir=new Rt;Ir.setRequestHeader(Mr);const Ar=new t,Lr=new t,jr=new t;function _r(e,t,n,s){const r=Ar.setFromMatrixPosition(e.matrixWorld),i=r.clone();i.project(t),n.setFromCamera(new g(i.x,i.y),t);const o=n.intersectObjects(s,!0);if(o.length){const e=o[0].distance;return r.distanceTo(n.ray.origin)<e}return!0}function Fr(e,t){const n=e.parent;if(!n.occlude)return;const{occludeThrottle:s}=n;let r=!0;if(Hr(s)&&Hr(e.userData.delta)&&(r=performance.now()-e.userData.delta>s),r&&n.occlude){let s=e.visible;const r=Ar.setFromMatrixPosition(e.matrixWorld),i=Lr.setFromMatrixPosition(t.camera.matrixWorld),o=r.clone().sub(i);if(!0===n.occlude||Wr(n.occlude)){const r=jr.setFromMatrixColumn(t.camera.matrixWorld,2).normalize().negate();s=!(o.dot(r)<0)&&_r(e,t.camera,t.raycaster,Wr(n.occlude)?n.occlude:t.scener.intersectsList.getAll())}else{const e=sr(n.occlude);s=o.dot(e)<0}e.visible=s,e.userData.delta=performance.now()}}const Rr=e=>{"function"==typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e)};var Br=function(){function e(){}return e.prototype.toJson=function(e,t){var n=this.xmlStringToXmlDom(e),s=this.xmlToJson(n);return t?(t.removeLineBreaks&&this.removeLineBreaks(s),t.removeComments&&this.removeCommentProperties(s),t.transformTextOnly&&this.transformTextOnly(s),s):s},e.prototype.xmlStringToXmlDom=function(e){return(new DOMParser).parseFromString(e,"text/xml")},e.prototype.removeLineBreaks=function(e){var t=this;Object.keys(e).forEach((function(n,s){"#text"===n&&Array.isArray(e[n])&&delete e[n],"object"==typeof e[n]&&t.removeLineBreaks(e[n])}))},e.prototype.removeCommentProperties=function(e){var t=this;Object.keys(e).forEach((function(n,s){"#comment"===n&&delete e[n],"object"==typeof e[n]&&t.removeCommentProperties(e[n])}))},e.prototype.transformTextOnly=function(e){var t=this;Object.keys(e).forEach((function(n,s){var r=Object.keys(e[n]).length>1,i=Object.keys(e[n])[0];r||"object"==typeof e[n][i]?t.transformTextOnly(e[n]):"object"==typeof e[n]&&e[n]["#text"]&&(e[n]=e[n]["#text"])}))},e.prototype.xmlToJson=function(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t._attributes={};for(var n=0;n<e.attributes.length;n++){var s=e.attributes.item(n);t._attributes[s.nodeName]=s.nodeValue}}}else 3==e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var r=0;r<e.childNodes.length;r++){var i=e.childNodes.item(r),o=i.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(i);else{if(void 0===t[o].push){var a=t[o];t[o]=[],t[o].push(a)}t[o].push(this.xmlToJson(i))}}return t},e}();function Ur(e){return Cr(e,"text").then((e=>Promise.resolve(function(e){return(new Br).toJson(e,{transformTextOnly:!0,removeComments:!0,removeLineBreaks:!0})}(e))))}function kr(e){const t=new DataView(e);for(let e=0;e<t.byteLength;e++){const n=t.getUint8(e),s=(n>>4&15)+(n<<4&240);t.setUint8(e,s)}return t.buffer}class Nr{name="EXT_mesh_gpu_instancing";constructor(e){this.writer=e}writeNode(e,n){if(!0!==e.isInstancedMesh)return;const s=e.count,r=new y,o=new Float32Array(3*s),a=new Float32Array(4*s),l=new Float32Array(3*s),c=new t,h=new i,u=new t;for(let t=0;t<s;t++)e.getMatrixAt(t,r),r.decompose(c,h,u),o[3*t]=c.x,o[3*t+1]=c.y,o[3*t+2]=c.z,a[4*t]=h.x,a[4*t+1]=h.y,a[4*t+2]=h.z,a[4*t+3]=h.w,l[3*t]=u.x,l[3*t+1]=u.y,l[3*t+2]=u.z;const d=this.writer,p={};p.attributes={TRANSLATION:d.processAccessor(new v(o,3)),ROTATION:d.processAccessor(new v(a,4)),SCALE:d.processAccessor(new v(l,3))},n.extensions=n.extensions||{},n.extensions[this.name]=p,d.extensionsUsed[this.name]=!0}}const zr=Object.prototype.hasOwnProperty,Gr=e=>"String"===Yr(e),Vr=e=>"Boolean"===Yr(e),Hr=e=>"Number"===Yr(e),Wr=Array.isArray,Kr=e=>"Object"===Yr(e),qr=e=>"Function"===Yr(e),Yr=e=>Object.prototype.toString.call(e).slice(8,-1),Qr=e=>(new TextDecoder).decode(new Uint8Array(e)),Xr=()=>Qs+Math.random().toString(36).substring(7).split("").join("_"),Zr=e=>{var t;const{href:n}=new URL(e,location.origin);if(n.includes(".")){const e=n.split(".").pop();if(!e)return;return e.includes("?")?null===(t=e.split("?").shift())||void 0===t?void 0:t.toLowerCase():e}},Jr=1e-5;function $r(e,t=Jr){return Math.abs(e)<t}function ei(e,t=50){let n=0;return function(...s){clearTimeout(n),n=self.setTimeout((()=>e.apply(this,s)),t)}}const ti=(e,t)=>Wr(e)?e.map(t):t(e);var ni=Object.freeze({__proto__:null,EPSILON:Jr,IVector3ToEuler:rr,IVector3ToVector3:sr,MinHeap:vr,absoluteAngle:yr,approxEquals:function(e,t,n=Jr){return $r(e-t,n)},approxZero:$r,calculateScaleFactor:fr,cloneDeep:Tr,cloneMaterials:Sr,computeTargetByRotation:gr,consoleSspTitle:Js,debounce:ei,deg2Euler:ar,disposeMaterials:Or,error:nr,euler2Deg:function(e){return e/(Math.PI/180)},exportGltf:function(e,t={}){return new Promise(((n,s)=>{const r=new Bt;r.register((e=>new Nr(e))),r.parse(e,(e=>n(e)),(e=>s(e)),t)}))},fetchFile:Cr,getAsciiString:Qr,getBoundingBox:ir,getExtension:Zr,getSpaceAttributeFromObject:lr,getTexture:wr,getValueType:Yr,gradientTexture:br,groupBy:function(e,t){const n=new Map;return e.reduce(((e,n)=>{const s=e.get(n[t]);return s?s.push(n):e.set(n[t],[n]),e}),n),n},hasOwn:(e,t)=>zr.call(e,t),idleTask:Rr,imageLoader:Dr,isArray:Wr,isBoolean:Vr,isDate:e=>"Date"===Yr(e),isFunction:qr,isNull:e=>"Null"===Yr(e),isNumber:Hr,isObject:Kr,isObjectBehindCamera:function(e,t){const n=jr.setFromMatrixColumn(t.matrixWorld,2).normalize().negate();return e.dot(n)<0},isObjectOccludeVisible:_r,isObjectVisible:hr,isPromise:e=>"Promise"===Yr(e),isString:Gr,isSymbol:e=>"Symbol"===Yr(e),isUndefined:e=>"Undefined"===Yr(e),log:$s,objectHandle:ti,parseFilePath:xr,poiNodeOccludeHandler:Fr,randomString:Xr,rgbeLoader:Ir,rotationAFix:function(e,t){const s=or("x",e,t),r=or("y",e,t),i=or("z",e,t);return new n(s.x,r.y,i.z,t.order)},rotationAxisFix:or,sleep:e=>new Promise((t=>setTimeout((()=>t()),e))),swapBytes:kr,syncSpaceAttributeToObject:cr,textureLoader:Pr,warn:tr,xmlToJson:Ur});const si={"Linear.None":_t.Linear.None,"Quadratic.In":_t.Quadratic.In,"Quadratic.Out":_t.Quadratic.Out,"Quadratic.InOut":_t.Quadratic.InOut,"Cubic.In":_t.Cubic.In,"Cubic.Out":_t.Cubic.Out,"Cubic.InOut":_t.Cubic.InOut,"Quartic.In":_t.Quartic.In,"Quartic.Out":_t.Quartic.Out,"Quartic.InOut":_t.Quartic.InOut,"Quintic.In":_t.Quintic.In,"Quintic.Out":_t.Quintic.Out,"Quintic.InOut":_t.Quintic.InOut,"Sinusoidal.In":_t.Sinusoidal.In,"Sinusoidal.Out":_t.Sinusoidal.Out,"Sinusoidal.InOut":_t.Sinusoidal.InOut,"Exponential.In":_t.Exponential.In,"Exponential.Out":_t.Exponential.Out,"Exponential.InOut":_t.Exponential.InOut,"Circular.In":_t.Circular.In,"Circular.Out":_t.Circular.Out,"Circular.InOut":_t.Circular.InOut,"Elastic.In":_t.Elastic.In,"Elastic.Out":_t.Elastic.Out,"Elastic.InOut":_t.Elastic.InOut,"Back.In":_t.Back.In,"Back.Out":_t.Back.Out,"Back.InOut":_t.Back.InOut,"Bounce.In":_t.Bounce.In,"Bounce.Out":_t.Bounce.Out,"Bounce.InOut":_t.Bounce.InOut};function ri(e,t,s={},r,i){return new Promise(((o,a)=>{const{duration:l=1e3,delay:c=0,repeat:h=!1,mode:u="Linear.None",yoyo:d=!1}=s,p=si[u],m=new Ft(e).to(t,l).easing(p).delay(c).onUpdate((s=>{e instanceof n&&t instanceof n&&s instanceof n&&(s.order=t.order),null==r||r(s,m)})).onComplete((()=>{o()})).onStop((()=>{a("animation stop")})).onStart((()=>{null==i||i(m)}));Hr(h)?m.repeat(h):Vr(h)&&h&&m.repeat(1/0),d&&m.repeatDelay(20),m.yoyo(d),m.start()}))}class ii{constructor(e,t,n={}){this.target=e,this.points=t,this.speed=1,this.reverse=!1,this.needsRotate=!0,this.index=1,this._tween=null,Object.assign(this,n)}get isPlaying(){var e;return!!(null===(e=this._tween)||void 0===e?void 0:e.isPlaying())}async play(){if(this.isPlaying)return!1;this.index=1;let e=this.points.slice();return this.reverse&&(e=e.reverse()),this._play(e)}async _play(e){var t,n;const{target:s}=this,r=null!==(t=this.speed)&&void 0!==t?t:1,i=this.index;let o=e[i-1];if(!o)return!0;o.isVector3||(o=sr(o)),o=o.clone();let a=e[i];if(!a)return!0;a.isVector3||(a=sr(a).clone()),a=a.clone();const l=o.distanceTo(a)/r;this.needsRotate&&(1===i&&s.parent&&s.position.copy(s.parent.worldToLocal(o.clone())),s.lookAt(a)),await ri(o,a,{duration:l},((e,t)=>{var n;if(s.parent){const t=s.parent.worldToLocal(e.clone());s.position.copy(t)}null===(n=this.onUpdate)||void 0===n||n.call(this,e,t)}),(e=>{var t,n;1===i&&(null===(t=this.onStart)||void 0===t||t.call(this,e)),null===(n=this.onEveryStart)||void 0===n||n.call(this,e),this._tween=e})),null===(n=this.onPoint)||void 0===n||n.call(this,i,a),this.index++,await this._play(e)}pause(){var e;null===(e=this._tween)||void 0===e||e.pause()}resume(){var e;null===(e=this._tween)||void 0===e||e.resume()}stop(){var e;null===(e=this._tween)||void 0===e||e.stop(),this._tween=null}}function oi(e){var t=typeof e;return null==e||"object"!==t&&"function"!==t}var ai,li=(e=>(e[e.x=0]="x",e[e.y=1]="y",e[e.z=2]="z",e))(li||{});(ai=li||(li={})).toKey=function(e){return ai[e]},ai.toIndex=function(e){return ai[e]},ai.getCrossAxiss=function(e){return[(e+1)%3,(e+2)%3]};var ci=(e=>(e[e.x=0]="x",e[e.y=1]="y",e[e.z=2]="z",e[e.w=3]="w",e))(ci||{});(e=>{e.toKey=function(t){return e[t]},e.toIndex=function(t){return e[t]},e.getCrossAxiss=function(e){return[(e+1)%4,(e+2)%4]}})(ci||(ci={}));var hi=Object.defineProperty,ui=(e,t,n)=>(((e,t,n)=>{t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function di(e,t){if(t=t??e.arcLengthDivisions,e.cacheArcULengths&&e.cacheArcULengths.length===t+1&&!e.needsUpdate){const n=e.cacheArcULengths;return{lengths:n,length:n[t]}}e.needsUpdate=!1;const n=[0];let s=e.getPoint(0),r=0;for(let i=1;i<=t;i++){const o=e.getPointAt(i/t);r+=o.distanceTo(s),n.push(r),s=o}return e.cacheArcULengths=n,{lengths:n,length:r}}function pi(e,t,n){const s=n?t=>e.getPointAt(t):t=>e.getPoint(t);let r=s(0),i=0;const o=[],a=t.length;for(let e=0;e<a;e++){const n=s(t[e]);i+=n.distanceTo(r),o.push(i),r=n}return{lengths:o,length:o[a-1]}}function mi(e,t){let n=e.sampleLength;if(!n){const t=e.sampleNum;if(t)return t;n=1}return Math.ceil(t/n)}function fi(e){const{curve:t}=e;let n=t.getLength();const s=mi(e,n);return t.arcLengthDivisions<s&&(t.arcLengthDivisions=s,t.updateArcLengths(),n=t.getLength()),{length:n,division:s}}function gi(e,t){const n=mi(t??{},e.getLength()),s=e.getPoints(n),r=e.getLengths(n);return yi(s,{...t,lengths:r})}function yi(e,t){const{startColor:n,endColor:s,color:r,lengths:i}=t??{},o=r?new u(r):null,a=n?new u(n):o??new u(0,1,0),l=s?new u(s):o??new u(0,0,1),c=[],h=[];e[0].toArray(c,0);const d=c.length,p=i??wi(e).lengths,m=p[p.length-1],f=new u;e.forEach(((e,t)=>{e.toArray(c,t*d);const n=p[t]/m;f.lerpColors(a,l,n),f.toArray(h,3*t)}));const g=new w;return g.setAttribute("position",new b(c,d)),g.setAttribute("color",new b(h,3)),g}function vi(e,t){t=t??{};let{material:n,linewidth:s}=t;s=s??1,n=n??new x({vertexColors:!0,linewidth:s});const r=Array.isArray(e)?yi(e,t):gi(e,t);return new T(r,n)}function wi(e){const t=bi(e),n=[0],s=t.reduce(((e,t)=>(e+=t.distance(),n.push(e),e)),0);return{lines:t,lengths:n,length:s}}function bi(e){const t=[];return e.reduce(((e,n)=>{const s=new S(e,n);return t.push(s),n})),t}function xi(e,t){const n=[];return{lines:t.filter(((t,s)=>{const r=t.closestPointToPointParameter(e),i=0<=r||r>=1;return i&&n.push(s),i})),indexs:n}}function Ti(e,t){const{distSortIndexs:n,clampDists:s,clampPoints:r,ts:i,clampTs:o}=Si(e,t),a=n[0];return{line:t[a],index:a,clampDist:s[a],clampPoint:r[a],t:i[a],clampT:o[a]}}function Si(e,n){const s={clampDists:[],clampPoints:[],distSortIndexs:[],ts:[],clampTs:[]};return n.forEach(((n,r)=>{const i=n.closestPointToPointParameter(e),o=a.clamp(i,0,1),l=n.at(o,new t),c=e.distanceTo(l);s.clampDists.push(c),s.clampPoints.push(l),s.distSortIndexs.push(r),s.ts.push(i),s.clampTs.push(o)})),s.distSortIndexs.sort(((e,t)=>s.clampDists[e]-s.clampDists[t])),s}function Oi(e){const t=new O,n=null==e[0].z?M:E;return e.reduce(((e,s)=>{const r=new n(e,s);return t.add(r),s})),t}var Mi=(e=>(e.back="back",e.front="front",e))(Mi||{});function Ei(e){const{curve:t,distance:n,fromU:s=0,side:r,tolerance:i=.1*n}=e,o=e.length??t.getLength(),a=t.getPointAt(s);let l=n/o;const c="front"===r?-1:1;let h=!0,u=s,d=a,p=0,m=!0;do{u=c*l+s;let e=!1;u>1?(u=1,e=!0):u<0&&(u=0,e=!0),d=t.getPointAt(u),p=d.distanceTo(a),h=Math.abs(n-p)>i;const r=n/p;if(e&&h&&r>1){m=!1;break}l*=r}while(h);return{succeed:m,u:u,point:d,distance:p}}function Ci(e){const{curve:t,distance:n,fromU:s=0,tolerance:r=.1*n,origin:i}=e,o=e.length??t.getLength(),a=t.getPointAt(s),l=a.distanceTo(i),c=n-l;let h=c/o,u=!0,d=s,p=a;do{d=h+s;let e=!1;d>1?(d=1,e=!0):d<0&&(d=0,e=!0),p=t.getPointAt(d);const o=p.distanceTo(i);u=Math.abs(n-o)>r;const a=c/(o-l);if(e&&u&&a>1)return null;h*=a}while(u);return{u:d,point:p}}const Di=new t,Pi=new t(1,1,1);new i;const Ii=new y;function Ai(e){const{joints:t,axials:n}=e;if(t)var s=ji(t);else s=n?Li(e):_i(e);return s}function Li(e){const{axials:t,start:n}=e,s=new C;n&&(s.position.copy(n),s.updateMatrix());const r=[s];return t.reduce(((e,t)=>{const n=new C;return n.position.copy(t),e.add(n),r.push(n),n.updateMatrix(),n}),s),s.updateWorldMatrix(!0,!0),r}function ji(e){const t=[];return e.reduce(((e,n)=>{const s=n.clone().sub(e);return t.push(s),n})),Li({axials:t,start:e[0]})}function _i(e){const{start:t,axial:n}=e;let s=e.number;const r=new Array(s-1);return r.fill(n),Li({axials:r,start:t})}function Fi(e){const{geometry:n,flexible:s=1,axial:r,number:o}=e,a=e.start??new t,l=r.clone().normalize(),c=r.length(),h=o-1,u=(new i).setFromUnitVectors(new t(1,0,0),l),d=(new y).compose(a,u,new t(1,1,1)).invert(),p=n.getAttribute("position").clone(),m=p.count;p.applyMatrix4(d);const f=[],g=[];for(let e=0;e<m;e++){const t=p.getX(e);if(t<0){f.push(0,0,0,0),g.push(1,0,0,0);continue}const n=Math.trunc(t/c);if(n<h){const e=t%c/c*s;f.push(n,n+1,0,0),g.push(1-e,e,0,0)}else f.push(h,0,0,0),g.push(1,0,0,0)}return n.setAttribute("skinIndex",new D(f,4)),n.setAttribute("skinWeight",new b(g,4)),n}function Ri(e){const{skeleton:n,geometryFrame:s}=e,r=n.boneInverses[0].clone().invert(),i=n.boneInverses[1].clone().invert();if(s){const e=s.clone().invert();r.premultiply(e),i.premultiply(e)}const o=(new t).setFromMatrixPosition(r),a=(new t).setFromMatrixPosition(i);return a.sub(o),Fi({...e,start:o,axial:a,number:n.bones.length})}function Bi(e){const{skeleton:n,geometry:s,flexible:r=1,geometryFrame:i}=e,o=(null==i?void 0:i.clone().invert())??Ii.clone(),a=bi(n.boneInverses.map((e=>{const n=e.clone().invert().premultiply(o);return(new t).setFromMatrixPosition(n)}))),l=s.getAttribute("position"),c=l.count,h=[],u=[],d=new t;for(let e=0;e<c;e++){d.fromBufferAttribute(l,e);const{index:t,clampT:n}=Ti(d,a),s=n*r;h.push(t,t+1,0,0),u.push(1-s,s,0,0)}return s.setAttribute("skinIndex",new D(h,4)),s.setAttribute("skinWeight",new b(u,4)),s}function Ui(e){const{geometry:t}=e,n=e.material??void 0,s=new P(t,n),r=Ai(e);s.add(r[0]);const i=new I(r);return s.bind(i),Bi({...e,skeleton:i}),s}function ki(e){const{skeleton:t}=e,n=Ni(e);return n.updateMatrix(),n.updateMatrixWorld(),n.bind(t),n}function Ni(e){const{target:t,skeleton:n}=e,s=t.geometry,r=new P;return t.copy.call(r,t,!1),Bi({...e,geometry:s,skeleton:n,geometryFrame:t.matrixWorld}),r}function zi(e){const{target:t}=e;let{skeleton:n}=e;if(n)var s=n.bones[0];else{const t=Ai(e);n=new I(t),s=t[0]}t.add(s),t.updateWorldMatrix(!1,!0),n.calculateInverses(),s.removeFromParent();const r=Gi({...e,target:t,skeleton:n});return r.add(s),{model:r,skeleton:n,rootBone:s}}function Gi(e){const{target:t,skeleton:n,parent:s,posOnBone:r}=e,i=t.isMesh,o=i?Ni({...e,skeleton:n}):t.clone(!1);s&&s.add(o),o.updateMatrixWorld(!0),i&&(o.bind(n,t.matrixWorld),r&&(o.frustumCulled=!1));const a=t.children;for(const t of a)Gi({...e,target:t,parent:o});return o}function Vi(e){return e.filter((e=>{var t;return!(null!=(t=e.parent)&&t.isBone)}))}function Hi(e){return e.find((e=>{var t;return!(null!=(t=e.parent)&&t.isBone)}))}function Wi(e){return Hi(e)??e[0]}function Ki(e){return e.curve?qi(e):$i(e)}function qi(e){const{keyframeTracks:t,duration:n,...s}=Yi(e);return{...s,clip:new A(e.name,n,t)}}function Yi(e){const{curve:t,lookDistance:n}=e,s=e.targetPath??"",r=fi(e).division,i=Qi(e,t.getLength()),o=_,a=[],l=Zi(r),c={...e,duration:i,division:r,ts:l,lookPoint:{distance:n}},h=Ji(c),{points:u,rotates:d,...p}=Xi(c);if(u.length){const e=[];u.forEach(((t,n)=>{t.toArray(e,3*n)}));const t=new L(`${s}.position`,h,e,o);a.push(t)}if(d.length){const e=[];d.forEach(((t,n)=>{t.toArray(e,4*n)}));const t=new j(`${s}.quaternion`,h,e,o);a.push(t)}return{...p,keyframeTracks:a,duration:i}}function Qi(e,t){let n=e.duration;if(!n){const s=e.speed;if(null==s)throw"缺少选项 duration 或者 speed";if(!t)throw"缺少参数 length";n=t/s}return n}function Xi(e){var n,s;const{curve:r,target:a,lookPoint:l,enableUp:c,fixUp:h}=e,u=e.position??!0,d=e.rotate??!0,p=[],m=[],f=[];if(!u&&!d)return{rotates:p,points:m,curveLength:void 0,lengths:void 0};const g=(e.anchor??Di).clone(),v=e.ts??e.us,w=!e.ts;if(!v)throw"缺少参数:至少传递 ts 和 us 任意之一";let b=Ii.clone(),x=Ii.clone(),T=Pi.clone(),S=o.DEFAULT_UP;a&&(a.updateWorldMatrix(!0,!1),b=a.matrix,x=a.matrixWorld,T=a.scale,S=a.up);const O=b.clone().invert(),M=x.clone().multiply(O).clone().invert(),E=r.getTangent(0);E.transformDirection(M);const C=(null==(n=e.front)?void 0:n.clone().normalize())??E,D=(null==(s=e.up)?void 0:s.clone().normalize())??S.clone().transformDirection(M);let P=b.clone().setPosition(0,0,0),I=e=>r.getPoint(e),A=e=>r.getTangent(e);w&&(I=e=>r.getPointAt(e),A=e=>r.getTangentAt(e));const L=v.length,j=L-1;let{distance:_,curveLength:F,lengths:R}=l??{};_=_??0;let B=A;0!==_&&(R||(R=pi(r,v,w).lengths),null==F&&(F=R[j]),B=(e,t)=>{const n=I(e);let s=(R[t]+_)/F;return s>1&&(s=1),r.getPointAt(s).sub(n).normalize()});let U=e=>{const t=v[e],n=B(t,e);n.transformDirection(M),f.push(n);const s=e-1,r=s<0,o=r?C:f[s],a=(new i).setFromUnitVectors(o,n);if(!r){const e=p[s];a.multiply(e)}return a.normalize()};if(c){const e=new t(0,1,0);U=h?function(t){const n=v[t],s=B(n,t);s.transformDirection(M),f.push(s);const r=t-1;let o;if(r<0)o=(new i).setFromUnitVectors(C,s);else{const e=p[r],t=C.clone().applyQuaternion(e).normalize();o=(new i).setFromUnitVectors(t,s),o.multiply(e)}const a=D.clone().applyQuaternion(o).normalize(),l=(new i).setFromUnitVectors(a,e);return o.premultiply(l),o.normalize()}:function(t){const n=v[t],s=B(n,t);s.transformDirection(M),f.push(s);const r=t-1,o=r<0,a=o?C:f[r],l=(new i).setFromUnitVectors(a,s);if(o){const t=D.clone().applyQuaternion(l);t.projectOnPlane(s).normalize();const n=e.clone().projectOnPlane(s).normalize(),r=(new i).setFromUnitVectors(t,n);l.premultiply(r)}else{const e=p[r];l.multiply(e)}return l.normalize()}}for(let e=0;e<L;e++){const t=v[e];if(d){const t=U(e);p.push(t),P=(new y).compose(Di,t,T)}if(u){const e=I(t);e.applyMatrix4(M);const n=g.clone().applyMatrix4(P);e.sub(n),m.push(e)}}return{rotates:p,points:m,curveLength:F??void 0,lengths:R??void 0}}function Zi(e){const t=[];for(let n=0;n<=e;n++)t.push(n/e);return t}function Ji(e){const{curve:t,division:n,duration:s}=e,r=t.getLengths(n),i=r[r.length-1];return r.map((e=>e/i*s))}function $i(e){const{smooth:t,points:n}=e;if(!1===t)var{keyframeTracks:s,duration:r,...i}=eo(e);else{const t=Oi(n);var{keyframeTracks:s,duration:r,...i}=Yi({...e,curve:t})}return{...i,clip:new A(e.name,r,s)}}function eo(e){const t=e.targetPath??"",n=e.points,{lines:s,length:r,lengths:i}=wi(n),o=Qi(e,r),a=[],l=i.map((e=>e/r*o)),{points:c,pointTimes:h,rotates:u,rotateTimes:d}=to({...e,times:l},s);if(c.length){const e=[];c.forEach(((t,n)=>{t.toArray(e,3*n)}));const n=new L(`${t}.position`,h,e,_);a.push(n)}if(u.length){const e=[];u.forEach(((t,n)=>{t.toArray(e,4*n)}));const n=new j(`${t}.quaternion`,d,e,F);a.push(n)}return{keyframeTracks:a,duration:o,lengths:i,curveLength:r}}function to(e,n){var s,r;const{points:a,target:l,times:c,enableUp:h,fixUp:u}=e,d=e.position??!0,p=e.rotate??!0,m=a.length,f=m-1;n=n??bi(a);const g=[],v=[],w=[],b=[],x={rotates:g,points:v,rotateTimes:c,pointTimes:w};if(!d&&!p)return x;const T=(e.anchor??Di).clone();let S=Ii.clone(),O=Ii.clone(),M=Pi.clone(),E=o.DEFAULT_UP;l&&(l.updateWorldMatrix(!0,!1),S=l.matrix,O=l.matrixWorld,M=l.scale,E=l.up);const C=S.clone().invert(),D=O.clone().multiply(C).clone().invert(),P=n[0].delta(new t);P.transformDirection(D);const I=(null==(s=e.front)?void 0:s.clone().normalize())??P,A=(null==(r=e.up)?void 0:r.clone().normalize())??E.clone().transformDirection(D);let L=S.clone().setPosition(0,0,0),j=L,_=e=>{const s=n[e].delta(new t).normalize();s.transformDirection(D),b.push(s);const r=e-1,o=r<0,a=o?I:b[r],l=(new i).setFromUnitVectors(a,s);if(!o){const e=g[r];l.multiply(e)}return l.normalize()};if(h){const e=new t(0,1,0);_=u?function(s){const r=n[s].delta(new t).normalize();r.transformDirection(D),b.push(r);const o=s-1;let a;if(o<0)a=(new i).setFromUnitVectors(I,r);else{const e=g[o],t=I.clone().applyQuaternion(e).normalize();a=(new i).setFromUnitVectors(t,r),a.multiply(e)}const l=A.clone().applyQuaternion(a).normalize(),c=(new i).setFromUnitVectors(l,e);return a.premultiply(c),a.normalize()}:function(s){const r=n[s].delta(new t).normalize();r.transformDirection(D),b.push(r);const o=s-1,a=o<0,l=a?I:b[o],c=(new i).setFromUnitVectors(l,r);if(a){const t=A.clone().applyQuaternion(c);t.projectOnPlane(r).normalize();const n=e.clone().projectOnPlane(r).normalize(),s=(new i).setFromUnitVectors(t,n);c.premultiply(s)}else{const e=g[o];c.multiply(e)}return c.normalize()}}for(let e=0;e<m;e++){if(p)if(e<f){const t=_(e);g.push(t),L=(new y).compose(Di,t,M)}else g.push(g[e-1].clone());if(d){const t=c[e],n=a[e].clone();if(n.applyMatrix4(D),e>0){const e=T.clone().applyMatrix4(j),s=n.clone().sub(e);v.push(s),w.push(t)}const s=T.clone().applyMatrix4(L);n.sub(s),v.push(n),w.push(t)}j=L}return x}function no(e){const t=e.mixer,n=zi(e),{model:s,skeleton:r}=n,i={...e,target:s,skeleton:r},{clip:o,...a}=e.posOnBone?so(i):oo(i);s.animations.push(o);const l=null==t?void 0:t.clipAction(o,s);return{...a,...n,clip:o,action:l}}function so(e){const{boneTracks:t,duration:n,...s}=ro(e),r=t.flat();return{...s,clip:new A(e.name,n,r)}}function ro(e){const{skeleton:t,targetPath:n}=e,s=t.bones,{times:r,boneSampleDatas:i,duration:o,...a}=io(e),l=r.length,c=_,h=i.map(((e,t)=>{const{points:i,rotates:o}=e,a=s[t],h=n?`${n}.skeleton.bones[${t}]`:`${a.name||a.uuid}`,u=[],d=[];for(let e=0;e<l;e++)i&&i[e].toArray(u,3*e),o[e].toArray(d,4*e);const p=[];if(i){const e=new L(`${h}.position`,r,u,c);p.push(e)}const m=new j(`${h}.quaternion`,r,d,c);return p.push(m),p}));return{...a,boneTracks:h,duration:o}}function io(e){var n;const{curve:s,skeleton:r,stretch:o}=e,{bones:a,boneInverses:l}=r,c=a[0],h=e.target??c.parent;if(!h)throw"target 或 根骨骼的 parent 不存在";const u=e.tolerance??.1;c.updateWorldMatrix(!0,!0);const{division:d,length:p}=fi(e),{matrixWorld:m}=h,f=m.clone().invert(),g=[],v=[];l.reduce(((e,t)=>{const n=t.clone().invert();g.push(n);const s=e.clone().multiply(n);return v.push(s),t}),f);const w=v[0],b=new t,x=new i,T=new t;w.decompose(b,x,T);const S=Qi(e,p),O=Zi(d),M=Ji({curve:s,division:d,duration:S}),E=O.length,C=[],D=(new t).setFromMatrixPosition(v[1]).negate(),P=l[0],I=null==(n=e.up)?void 0:n.clone().applyMatrix4(m).transformDirection(P),{points:A,rotates:L,...j}=Xi({...e,curve:s,ts:O,target:c,rotate:!0,front:D,up:I,anchor:null});for(let e=0;e<E;e++)C.push(m.clone());const _=A.map(((e,t)=>{const n=L[t];n.premultiply(x).normalize();const s=(new y).compose(e,n,T);return s.premultiply(m),s})),F=s.getLengths(d).map((e=>e/p)),R=[{points:A,rotates:L,us:F,matrixs:_}],B=o?function(e,t,n){const r=R[e].us[t]-n/p;return{u:r,point:r<0?null:s.getPointAt(r)}}:function(e,t,n){const r=R[e].us[t],{u:i,point:o,succeed:a}=Ei({curve:s,distance:n,fromU:r,length:p,side:Mi.front,tolerance:u*n});return{u:i,point:a?o:null}},U=l.length,k=U-1;for(let e=1;e<U;e++){const n=[],r=[],o=[],a=[];R.push({points:n,rotates:r,us:o,matrixs:a});const l=v[e],c=g[e],h=e-1,u=R[h],d=v[h],p=g[h],{matrixs:m,points:f,rotates:w}=u,b=(new t).setFromMatrixScale(d),x=h-1,T=x<0?C:R[x].matrixs,S=new t,O=new i,M=new t;l.decompose(S,O,M);const D=(new t).setFromMatrixPosition(c).sub((new t).setFromMatrixPosition(p)).length(),P=S.length();for(let t=0;t<E;t++){const{point:c,u:u}=B(h,t,D);o.push(u),r.push(O.clone());const d=m[t];if(u<0||!c){n.push(S);const e=d.clone().multiply(l);a.push(e);continue}const p=T[t];let g=p.clone().invert();const v=c.clone().applyMatrix4(g),x=f[t];v.sub(x).normalize();const E=w[t],C=(new y).compose(x,E,b),I=S.clone().transformDirection(C),A=(new i).setFromUnitVectors(I,v);E.premultiply(A).normalize(),d.compose(x,E,b),d.premultiply(p);const L=d.clone().invert();c.applyMatrix4(L);const j=c.length();c.copy(S).multiplyScalar(j/P),n.push(c);const _=(new y).compose(c,O,M);if(e===k){const e=s.getTangentAt(u);e.negate().transformDirection(L);const n=(new i).setFromUnitVectors(c.clone().normalize(),e);n.premultiply(O).normalize(),r[t]=n,_.compose(c,n,M)}_.premultiply(d),a.push(_)}}return{...j,times:M,boneSampleDatas:R,duration:S}}function oo(e){const{boneTracks:t,targetTracks:n,duration:s,...r}=ao(e),i=n.concat(t.flat());return{...r,clip:new A(e.name,s,i)}}function ao(e){const{skeleton:t,targetPath:n}=e,{times:s,boneSampleDatas:r,duration:i,targetSampleDatas:o,...a}=lo(e),l=s.length,c=t.bones,h=_,u=[],d=[],{points:p,rotates:m}=o;for(let e=0;e<l;e++)p[e].toArray(u,3*e),m[e].toArray(d,4*e);const f=n??"",g=[new L(`${f}.position`,s,u,h),new j(`${f}.quaternion`,s,d,h)],y=r.map(((e,t)=>{const{points:r,rotates:i}=e,o=c[t],a=n?`${n}.skeleton.bones[${t}]`:`${o.name||o.uuid}`,u=[],d=[];for(let e=0;e<l;e++)r&&r[e].toArray(u,3*e),i[e].toArray(d,4*e);const p=[];if(r){const e=new L(`${a}.position`,s,u,h);p.push(e)}const m=new j(`${a}.quaternion`,s,d,h);return p.push(m),p}));return{...a,boneTracks:y,targetTracks:g,duration:i}}function lo(e){const{curve:n,skeleton:s,stretch:r}=e,{bones:o,boneInverses:a}=s,l=o[0],c=e.target??l.parent;if(!c)throw"target 或 根骨骼的 parent 不存在";const h=e.tolerance??.1;l.updateWorldMatrix(!0,!0);const{division:u,length:d}=fi(e),{matrix:p,matrixWorld:m,scale:f}=c,g=m.clone().multiply(p.clone().invert()),v=m.clone().invert(),w=[],b=[];a.reduce(((e,t)=>{const n=t.clone().invert();w.push(n);const s=e.clone().multiply(n);return b.push(s),t}),v);const x=b[0],T=new t,S=new i,O=new t;x.decompose(T,S,O);const M=Qi(e,d),E=Zi(u),C=w[0],D=(new t).setFromMatrixPosition(b[1]).negate().transformDirection(C).transformDirection(v),{rotates:P,points:I,...A}=Xi({...e,curve:n,target:c,position:!0,rotate:!0,anchor:T,front:D,ts:E}),L=Ji({curve:n,division:u,duration:M}),j=I.map(((e,t)=>{const n=P[t],s=(new y).compose(e,n,f);return s.premultiply(g),s})),_={points:I,rotates:P,matrixs:j},F=[],R=j.map((e=>(F.push(S.clone()),e.clone().multiply(x)))),B=E.length,U=n.getLengths(u).map((e=>e/d)),k=[{rotates:F,us:U,matrixs:R}],N=r?function(e,t,s){const r=k[e].us[t]-s/d;return{u:r,point:r<0?null:n.getPointAt(r)}}:function(e,t,s){const r=k[e].us[t],{u:i,point:o,succeed:a}=Ei({curve:n,distance:s,fromU:r,length:d,side:Mi.front,tolerance:h*s});return{u:i,point:a?o:null}},z=a.length,G=z-1;for(let e=1;e<z;e++){const s=[],r=[],o=[],a=[];k.push({points:s,rotates:r,us:o,matrixs:a});const l=b[e],c=w[e],h=e-1,u=k[h],d=b[h],p=w[h],{matrixs:m,points:f,rotates:g}=u,v=new t,x=new i,T=new t;d.decompose(v,x,T);const S=h-1,O=S<0?j:k[S].matrixs,M=new t,E=new i,C=new t;l.decompose(M,E,C);const D=(new t).setFromMatrixPosition(c).sub((new t).setFromMatrixPosition(p)).length(),P=M.length();for(let t=0;t<B;t++){const{point:c,u:u}=N(h,t,D);o.push(u),r.push(E.clone());const d=m[t];if(u<0||!c){s.push(M);const e=d.clone().multiply(l);a.push(e);continue}const p=O[t];let w=p.clone().invert();const b=c.clone().applyMatrix4(w),S=(null==f?void 0:f[t])??v;b.sub(S).normalize();const I=g[t],A=(new y).compose(S,I,T),L=M.clone().transformDirection(A);I.setFromUnitVectors(L,b),I.premultiply(x).normalize(),d.compose(S,I,T),d.premultiply(p);const j=d.clone().invert();c.applyMatrix4(j);const _=c.length();c.copy(M).multiplyScalar(_/P),s.push(c);const F=(new y).compose(c,E,C);if(e===G){const e=n.getTangentAt(u);e.negate().transformDirection(j);const s=(new i).setFromUnitVectors(c.clone().normalize(),e);s.premultiply(E).normalize(),r[t]=s,F.compose(c,s,C)}F.premultiply(d),a.push(F)}}return{...A,times:L,boneSampleDatas:k,targetSampleDatas:_,duration:M}}class co{constructor(e){ui(this,"isAnimationClipKeyframe",!0),ui(this,"_tracksTimes",null),ui(this,"lastGetTime",0),ui(this,"lastGetKeyframeIndexs",[]),this.clip=e}get tracksTimes(){return this._tracksTimes??(this._tracksTimes=this.clip.tracks.map((e=>e.times)))}getTracksKeyframeIndexs(e){const{lastGetTime:t,tracksTimes:n}=this;e<t&&(this.lastGetKeyframeIndexs=[]),this.lastGetTime=e;const s=this.lastGetKeyframeIndexs;return this.lastGetKeyframeIndexs=n.map(((t,n)=>{const r=s[n]??0,i=t.length;for(let n=r;n<i;n++)if(e<t[n])return n-1;return i-1}))}getTracksKeyframes(e){const t=this.getTracksKeyframeIndexs(e),n=this.clip.tracks;return t.map(((e,t)=>{let s=null;if(-1!==e){const r=n[t],i=r.getValueSize(),o=e*i,a=o+i;s=Array.from(r.values.slice(o,a))}return{index:e,value:s}}))}}var ho=(e=>(e.keyframe="keyframe",e.position=".position",e.quaternion=".quaternion",e.rotation=".rotation",e.scale=".scale",e.loop="loop",e.finished="finished",e.point="point",e))(ho||{});const uo=["loop","finished"];class po extends co{constructor(e){super(e.getClip()),ui(this,"isAnimationActionKeyframe",!0),ui(this,"_trackNames"),ui(this,"_positionTrackName"),ui(this,"_quaternionTrackName"),ui(this,"_rotationTrackName"),ui(this,"_scaleTrackName"),ui(this,"event",new R),ui(this,"_frameEventNames",null),ui(this,"mixerListener",(e=>{(e.action.isAnimationActionKeyframe?e.action.action:e.action)===this.action&&this.event.dispatchEvent(e)})),ui(this,"_points",[]),ui(this,"_polyline"),ui(this,"_polylineLengths",[]),ui(this,"_pointsProgress",[]),ui(this,"lastGetProgress",0),ui(this,"lastGetPointIndex",0),ui(this,"_enablePointEvent",!0),ui(this,"_enableKeyframeEvent",!0),ui(this,"lastKeyframes",null),ui(this,"lastPolylineKeyframe",null),ui(this,"frameFun",(()=>{var e;if(this.enableKeyframeEvent){const{keyframes:e,lastKeyframes:t}=this;let n=!1;for(const[s,r]of Object.entries(e)){const e=null==t?void 0:t[s];r.index!==(null==e?void 0:e.index)&&(n=!0,this.event.dispatchEvent({type:s,preFrame:e,frame:r}))}n&&(this.event.dispatchEvent({type:"keyframe",preFrame:t,frame:e}),this.lastKeyframes=e)}if(this.pointEventEnabled){const{pointIndex:t,lastPolylineKeyframe:n}=this;if(t!==(null==n?void 0:n.index)){const s={index:t,value:this.points[t]??(null==(e=this.polyline)?void 0:e.getPoint(this.progress)),length:this.polylineLengths[t]};this.event.dispatchEvent({type:"point",preFrame:n,frame:s}),this.lastPolylineKeyframe=s}}})),ui(this,"_stopListenFun"),this.action=e}get time(){return this.action.time}get duration(){return this.clip.duration}get progressTime(){const{isReverseLoop:e,duration:t,time:n}=this;return e?t-n:n}set progressTime(e){const{action:t,isReverseLoop:n,duration:s}=this;n&&(e=s-e),t.time=e}get progress(){return this.progressTime/this.duration}set progress(e){this.progressTime=e*this.duration}get loopCount(){const e=this.action._loopCount;return-1===e?0:e}get isReverseLoop(){return this.action.loop===B&&this.loopCount%2==1}get loopDirFactor(){return this.isReverseLoop?-1:1}get isReverse(){const e=this.action.timeScale<0;return this.isReverseLoop?!e:e}get dirFactor(){return this.isReverse?-1:1}get trackNames(){return this._trackNames??(this._trackNames=this.clip.tracks.map((e=>e.name)))}get keyframeIndexs(){const e=this.getTracksKeyframeIndexs(this.progressTime);return this.trackNames.reduce(((t,n,s)=>(t[n]=e[s],t)),{})}get keyframes(){const e=this.getTracksKeyframes(this.progressTime);return this.trackNames.reduce(((t,n,s)=>(t[n]=e[s],t)),{})}get positionTrackName(){return void 0===this._positionTrackName&&(this._positionTrackName=this.trackNames.find((e=>e.endsWith(".position")))??null),this._positionTrackName}get positionkeyframeIndex(){const e=this.positionTrackName;return e?this.keyframeIndexs[e]:null}get positionKeyframe(){const e=this.positionTrackName;if(e){const{index:n,value:s}=this.keyframes[e];return{index:n,value:s?new t(...s):null}}return null}get quaternionTrackName(){return void 0===this._quaternionTrackName&&(this._quaternionTrackName=this.trackNames.find((e=>e.endsWith(".quaternion")))??null),this._quaternionTrackName}get quaternionKeyframeIndex(){const e=this.quaternionTrackName;return e?this.keyframeIndexs[e]:null}get quaternionKeyframe(){const e=this.quaternionTrackName;if(e){const{index:t,value:n}=this.keyframes[e];return{index:t,value:n?new i(...n):null}}return null}get rotationTrackName(){return void 0===this._rotationTrackName&&(this._rotationTrackName=this.trackNames.find((e=>e.endsWith(".rotation")))??null),this._rotationTrackName}get rotationkeyframeIndex(){const e=this.rotationTrackName;return e?this.keyframeIndexs[e]:null}get rotationKeyframe(){const e=this.rotationTrackName;if(e){const{index:t,value:s}=this.keyframes[e];return{index:t,value:s?new n(...s):null}}return null}get scaleTrackName(){return void 0===this._scaleTrackName&&(this._scaleTrackName=this.trackNames.find((e=>e.endsWith(".scale")))??null),this._scaleTrackName}get scaleKeyframeIndex(){const e=this.scaleTrackName;return e?this.keyframeIndexs[e]:null}get scaleKeyframe(){const e=this.scaleTrackName;if(e){const{index:n,value:s}=this.keyframes[e];return{index:n,value:s?new t(...s):null}}return null}get frameEventNames(){return this._frameEventNames??(this._frameEventNames=[...this.trackNames,"keyframe","point"])}get mixer(){return this.action._mixer}addEventListener(e,t){const n=this.mixerListener,s=uo.includes(e);s&&!this.mixer.hasEventListener(e,n)&&this.mixer.addEventListener(e,n);const r=this.frameEventNames.includes(e);return!(!s&&!r)&&(this.event.addEventListener(e,t),r&&!this._stopListenFun&&this.enableFrameEvent&&(this._stopListenFun=mo(this.frameFun)),!0)}removeEventListener(e,t){if(uo.includes(e)&&1===this.getListeners(e).length){const t=this.mixerListener;this.mixer.removeEventListener(e,t)}this.event.removeEventListener(e,t),this.stopListenFun&&!this.hasListeners&&(this.stopListenFun=null)}get points(){return this._points}set points(e){e.length>1?(this._points=e,this.polyline=Oi(e)):(this._points=[],this.polyline=null)}get polyline(){return this._polyline}set polyline(e){this._polyline=e;const t=(null==e?void 0:e.getCurveLengths())??[];this.polylineLengths=[0,...t]}get polylineLengths(){return this._polylineLengths}set polylineLengths(e){this._polylineLengths=e;const t=1/e[e.length-1];this.pointsProgress=e.map((e=>e*t))}get polylineLength(){return this.polylineLengths[this.polylineLengths.length-1]}get polylineProgressLength(){return this.polylineLength*this.progress}get pointsProgress(){return this._pointsProgress}set pointsProgress(e){this._pointsProgress=e}get pointIndex(){return this.getPointIndex(this.progress)}getPointIndex(e){const{lastGetProgress:t,pointsProgress:n}=this;e<t&&(this.lastGetPointIndex=0),this.lastGetProgress=e;const s=Math.max(this.lastGetPointIndex,0),r=n.length;for(let t=s;t<r;t++)if(e<n[t])return this.lastGetPointIndex=t-1;return this.lastGetPointIndex=r-1}get enablePointEvent(){return this._enablePointEvent}set enablePointEvent(e){this._enablePointEvent=e,e&&this.autoStartListen()}get pointEventEnabled(){return this.enablePointEvent&&this.pointsProgress.length>0&&this.getListeners("point").length>0}get enableKeyframeEvent(){return this._enableKeyframeEvent}set enableKeyframeEvent(e){this._enableKeyframeEvent=e,e&&this.autoStartListen()}get enableFrameEvent(){return this.enableKeyframeEvent||this.enablePointEvent}get stopListenFun(){return this._stopListenFun}set stopListenFun(e){const t=this._stopListenFun;t&&t(),this._stopListenFun=e}startListen(){this.stopListenFun||(this.stopListenFun=mo(this.frameFun))}stopListen(){this.stopListenFun=null}autoStartListen(){!this.stopListenFun&&this.enableFrameEvent&&this.hasListeners&&(this.stopListenFun=mo(this.frameFun))}get listeners(){return this.event._listeners}get hasListeners(){const e=this.listeners;return!!e&&Object.values(e).some((e=>e&&e.length>0))}getListeners(e){var t;return(null==(t=this.listeners)?void 0:t[e])??[]}destroy(e){const{action:t,mixer:n,mixerListener:s}=this;this.stopListen(),n.removeEventListener("loop",s),n.removeEventListener("finished",s),this.event._listeners=null,!e&&(t.stop(),t.reset(),n._deactivateAction(t),n._removeInactiveAction(t))}}function mo(e){let t;const n=s=>{e(s),t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>{cancelAnimationFrame(t)}}class fo extends po{constructor(){super(...arguments),ui(this,"isAnimationActionOperate",!0)}forward(e){const t=this.action;e=Math.abs(e??t.timeScale),t.timeScale=e}backward(e){const t=this.action;e=Math.abs(e??t.timeScale),t.timeScale=-e}}function go(e){const t=new fo(e);return new Proxy(t,{get:function(e,t,n){return t in e.action?e.action[t]:e[t]},set:function(e,t,n,s){return t in e.action?e.action[t]=n:e[t]=n,!0},deleteProperty:function(e,t){return t in e.action?Reflect.deleteProperty(e.action,t):Reflect.deleteProperty(e,t)},has:function(e,t){return t in e.action||t in e},ownKeys:function(e){return Reflect.ownKeys(e.action).concat(Reflect.ownKeys(e))}})}let yo=class{constructor(e){ui(this,"_action"),this.setAction(e)}get action(){return this._action}set action(e){this.setAction(e)}setAction(e){this._action=e&&go(e)}get play(){const e=this.action;return!(!e||!e._mixer._isActiveAction(e)||e.paused)}set play(e){const t=this.action;t&&(t.paused=!e,e&&0===t.time&&t.play())}stop(){var e;null==(e=this.action)||e.stop()}};function vo(e){var t;null==(t=e.reset)||t.call(e,!0)}class wo extends yo{constructor(e,t=[]){super(e),ui(this,"_updateGUI",null),this.guis=t}get updateGUI(){return this._updateGUI??this.constructor.updateGUI??vo}set updateGUI(e){this._updateGUI=e}get action(){return this._action}set action(e){this.setAction(e),this.updateAllGUI()}updateAllGUI(){for(const e of this.guis)this.updateGUI(e)}}function bo(e){const t=new wo(e);return new Proxy(t,{get:function(e,t,n){var s;return t in e?e[t]:null==(s=e.action)?void 0:s[t]},set:function(e,t,n,s){if(t in e)e[t]=n;else{if(!e.action)return!1;e.action[t]=n}return!0},deleteProperty:function(e,t){return t in e?Reflect.deleteProperty(e,t):!!e.action&&Reflect.deleteProperty(e.action,t)},has:function(e,t){return t in e||!!e.action&&t in e.action},ownKeys:function(e){return e.action?Reflect.ownKeys(e).concat(Reflect.ownKeys(e.action)):Reflect.ownKeys(e)}})}ui(wo,"updateGUI",vo);var xo=(e=>(e.position=".position",e.quaternion=".quaternion",e.rotationX=".rotation[x]",e.rotationY=".rotation[y]",e.rotationZ=".rotation[z]",e.scale=".scale",e.color=".material.color",e.mapRotation=".material.map[rotation]",e.opacity=".material[opacity]",e.visible=".visible",e))(xo||{}),To=(e=>(e.bool="bool",e.number="number",e.color="color",e.quaternion="quaternion",e.string="string",e.vector="vector",e))(To||{});const So={bool:k,number:N,color:z,quaternion:j,string:G,vector:L},Oo={blendMode:V,deduplication:!1,autoClear:!0,tracks:{".position":{valueTypeName:"vector"},".quaternion":{valueTypeName:"quaternion"},".scale":{valueTypeName:"vector"},".material.color":{valueTypeName:"color"},".material[opacity]":{valueTypeName:"number"},".material.map[rotation]":{valueTypeName:"number"},".visible":{valueTypeName:"bool"},".rotation[x]":{valueTypeName:"number"},".rotation[y]":{valueTypeName:"number"},".rotation[z]":{valueTypeName:"number"},".rotation[order]":{valueTypeName:"string"}}};class Mo{constructor(){ui(this,"_options",null),ui(this,"name"),ui(this,"duration"),ui(this,"tracksData",new Map),ui(this,"_tracks",null),ui(this,"_clip",null)}get globalOptions(){return this.constructor.options}get options(){return this._options??(this._options=structuredClone(this.globalOptions))}get blendMode(){return this.options.blendMode??(this.options.blendMode=this.globalOptions.blendMode)}set blendMode(e){this.blendMode!==e&&(this.options.blendMode=e,this.clipChanged())}get autoClear(){return this.options.autoClear??(this.options.autoClear=this.globalOptions.autoClear)}set autoClear(e){this.options.autoClear=e}get deduplication(){return this.options.deduplication??(this.options.deduplication=this.globalOptions.deduplication)}set deduplication(e){this.deduplication!==e&&(this.options.deduplication=e,this.tracksChanged())}get tracksConfig(){return this.options.tracks??(this.options.tracks=structuredClone(this.globalOptions.tracks))}set tracksConfig(e){const t=this.tracksConfig;this.options.tracks=e&&Object.assign(t,e)}clearKeyframes(){this.tracksData.clear(),this.tracksChanged()}tracksChanged(){this._tracks=null,this.clipChanged()}clipChanged(){this._clip=null}get tracks(){return this._tracks??(this._tracks=this.createTracks())}getTrackConfig(e){const t=this.tracksConfig;let n=t[e];if(n)return n;for(const n of Object.keys(t))if(e.endsWith(n))return t[n];return null}createTracks(){const{tracksData:e,deduplication:t,autoClear:n}=this,s=[];for(const[n,r]of e.entries()){r.sort(((e,t)=>e.time-t.time));const e=[],i=[];for(const{time:t,value:n}of r)e.push(t),i.push(...n);const{valueTypeName:o,...a}=this.getTrackConfig(n)??{};const l=new(So[o]??U)(n,e,i);for(const[e,t]of Object.entries(a))null!=t&&(l[e]=t);t&&l.optimize(),s.push(l)}return n&&this.clearKeyframes(),s}get clip(){return this._clip??(this._clip=this.createClip())}createClip(e,t){e=e??this.name??void 0,t=t??this.duration??void 0;const{blendMode:n,tracks:s}=this,r=new A(e,t,s);return null!=n&&(r.blendMode=n),r}updateClip(e){return e||(e=this._clip)?(e.tracks=this.tracks,e.resetDuration(),e):this.clip}addKeyframe(e,t,n){const s=this.tracksData;s.has(e)||s.set(e,[]),s.get(e).push({time:t,value:n}),this.tracksChanged()}addKeyframes(e,t,n){for(const[s,r]of Object.entries(n)){const n=`${e}.${s}`;Array.isArray(r)?this.addKeyframe(n,t,r):oi(r)?this.addKeyframe(n,t,[r]):this.addKeyframes(n,t,r)}}addPosition(e,t,n){const{x:s,y:r,z:i}=t;n=n??"",this.addKeyframe(`${n}.position`,e,[s,r,i])}addQuaternion(e,t,n){const{x:s,y:r,z:i,w:o}=t;n=n??"",this.addKeyframe(`${n}.quaternion`,e,[s,r,i,o])}addRotation(e,t,n){const{x:s,y:r,z:i,order:o}=t;n=n??"",this.addKeyframe(`${n}.rotation[x]`,e,[s]),this.addKeyframe(`${n}.rotation[y]`,e,[r]),this.addKeyframe(`${n}.rotation[z]`,e,[i]),o&&this.addKeyframe(`${n}.rotation[order]`,e,[o])}addRotationX(e,t,n){n=n??"",this.addKeyframe(`${n}.rotation[x]`,e,[t])}addRotationY(e,t,n){n=n??"",this.addKeyframe(`${n}.rotation[y]`,e,[t])}addRotationZ(e,t,n){n=n??"",this.addKeyframe(`${n}.rotation[z]`,e,[t])}addScale(e,t,n){const{x:s,y:r,z:i}=t;n=n??"",this.addKeyframe(`${n}.scale`,e,[s,r,i])}addColor(e,t,n){const{r:s,g:r,b:i}=t;n=n??"",this.addKeyframe(`${n}.material.color`,e,[s,r,i])}addOpacity(e,t,n){n=n??"",this.addKeyframe(`${n}.material[opacity]`,e,[t])}addMapRotation(e,t,n){n=n??"",this.addKeyframe(`${n}.material.map[rotation]`,e,[t])}addVisible(e,t,n){n=n??"",this.addKeyframe(`${n}.visible`,e,[t])}}ui(Mo,"options",Oo);class Eo extends Mo{constructor(e,t){super(),ui(this,"_mixer"),ui(this,"_root",null),ui(this,"_action",null),this.mixer=e,this.root=t}get mixer(){return this._mixer}set mixer(e){this._mixer!==e&&(this._mixer=e,this.actionChanged())}get root(){return this._root}set root(e){this._root!==e&&(this._root=e,this.actionChanged())}get loop(){return this.options.loop??(this.options.loop=this.globalOptions.loop)}set loop(e){this.loop!==e&&(this.options.loop=e,this.actionChanged())}get repetitions(){return this.options.repetitions??(this.options.repetitions=this.globalOptions.repetitions)}set repetitions(e){this.repetitions!==e&&(this.options.repetitions=e,this.actionChanged())}clipChanged(){super.clipChanged(),this.actionChanged()}actionChanged(){this._action=null}get action(){return this._action??(this._action=this.createAction())}createAction(e,t,n){t=t??void 0;const s=n??this.mixer,r=e??this.root??void 0,i=s.clipAction(this.clip,r,t),{loop:o,repetitions:a}=this;return null!=o&&(i.loop=o),null!=a&&(i.repetitions=a),i}}function Co(e,t=1){const n=e.slice().sort(((e,t)=>e-t)),s=[[]];return n.reduce((function(e,n){const r=e[e.length-1];return null==r||n-r<=t?e.push(n):(e=[n],s.push(e)),e}),s[0]),s}function Do(e,t){let{count:n=4,min:s=-1/0,max:r=1/0}=t??{};const i=e[0];s=Math.max(i-n+1,s),r=Math.min(i+n-1,r),n=Math.min(n,r-s+1);const o=[];for(const t of e)s<=t&&t<=r&&o.push(t);const a=Co(o);a.sort(((e,t)=>t.length-e.length));let l=a.find((e=>e.includes(i)));if(l.length>=n)return l.sort(((t,n)=>e.indexOf(t)-e.indexOf(n))),l=l.slice(0,n),l.sort(((e,t)=>e-t)),l;for(const e of o){s=l[0],r=l[l.length-1];let t=s-e,i=n-l.length;if(t>0&&t<=i)for(let t=e;t<s;t++)l.unshift(t);else if(t=e-r,t>0&&t<=i)for(let t=r+1;t<=e;t++)l.push(t);else;}return l}var Po="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Io(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),n}function Ao(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Lo={},jo={get exports(){return Lo},set exports(e){Lo=e}};jo.exports=function e(t,n,s){function r(o,a){if(!n[o]){if(!t[o]){if(!a&&Ao)return Ao(o);if(i)return i(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){var n=t[o][1][e];return r(n||e)}),c,c.exports,e,t,n,s)}return n[o].exports}for(var i=Ao,o=0;o<s.length;o++)r(s[o]);return r}({1:[function(e,t,n){(function(e){var n,s,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var i=0,o=new r(h),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),n=function(){a.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var l=new e.MessageChannel;l.port1.onmessage=h,n=function(){l.port2.postMessage(0)}}var c=[];function h(){var e,t;s=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}s=!1}function u(e){1!==c.push(e)||s||n()}t.exports=u}).call(this,void 0!==Po?Po:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var s=e(1);function r(){}var i={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&p(this,e)}function h(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function u(e,t,n){s((function(){var s;try{s=t(n)}catch(t){return i.reject(e,t)}s===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,s)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function s(t){n||(n=!0,i.reject(e,t))}function r(t){n||(n=!0,i.resolve(e,t))}function o(){t(r,s)}var a=m(o);"error"===a.status&&s(a.value)}function m(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}function f(e){return e instanceof this?e:i.resolve(new this(r),e)}function g(e){var t=new this(r);return i.reject(t,e)}function y(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,s=!1;if(!n)return this.resolve([]);for(var o=new Array(n),a=0,l=-1,c=new this(r);++l<n;)h(e[l],l);return c;function h(e,r){function l(e){o[r]=e,++a!==n||s||(s=!0,i.resolve(c,o))}t.resolve(e).then(l,(function(e){s||(s=!0,i.reject(c,e))}))}}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,s=!1;if(!n)return this.resolve([]);for(var o=-1,a=new this(r);++o<n;)l(e[o]);return a;function l(e){t.resolve(e).then((function(e){s||(s=!0,i.resolve(a,e))}),(function(e){s||(s=!0,i.reject(a,e))}))}}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var n=new this.constructor(r);return this.state!==l?u(n,this.state===a?e:t,this.outcome):this.queue.push(new h(n,e,t)),n},h.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){i.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=m(d,t);if("error"===n.status)return i.reject(e,n.value);var s=n.value;if(s)p(e,s);else{e.state=a,e.outcome=t;for(var r=-1,o=e.queue.length;++r<o;)e.queue[r].callFulfilled(t)}return e},i.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,s=e.queue.length;++n<s;)e.queue[n].callRejected(t);return e},c.resolve=f,c.reject=g,c.all=y,c.race=v},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==Po?Po:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var s="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};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var o=i();function a(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(r){if("TypeError"!==r.name)throw r;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),s=0;s<e.length;s+=1)n.append(e[s]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var c=Promise;function h(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function d(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function p(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var m="local-forage-detect-blob-support",f=void 0,g={},y=Object.prototype.toString,v="readonly",w="readwrite";function b(e){for(var t=e.length,n=new ArrayBuffer(t),s=new Uint8Array(n),r=0;r<t;r++)s[r]=e.charCodeAt(r);return n}function x(e){return new c((function(t){var n=e.transaction(m,w),s=l([""]);n.objectStore(m).put(s,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}function T(e){return"boolean"==typeof f?c.resolve(f):x(e).then((function(e){return f=e}))}function S(e){var t=g[e.name],n={};n.promise=new c((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function O(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function M(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new c((function(n,s){if(g[e.name]=g[e.name]||R(),e.db){if(!t)return n(e.db);S(e),e.db.close()}var r=[e.name];t&&r.push(e.version);var i=o.open.apply(o,r);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),s(i.error)},i.onsuccess=function(){n(i.result),O(e)}}))}function C(e){return E(e,!1)}function D(e){return E(e,!0)}function P(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),s=e.version<e.db.version,r=e.version>e.db.version;if(s&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function I(e){return new c((function(t,n){var s=new FileReader;s.onerror=n,s.onloadend=function(n){var s=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:s,type:e.type})},s.readAsBinaryString(e)}))}function A(e){return l([b(atob(e.data))],{type:e.type})}function L(e){return e&&e.__local_forage_encoded_blob}function j(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(n,e,e),n}function _(e){S(e);for(var t=g[e.name],n=t.forages,s=0;s<n.length;s++){var r=n[s];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return e.db=null,C(e).then((function(t){return e.db=t,P(e)?D(e):t})).then((function(s){e.db=t.db=s;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=s})).catch((function(t){throw M(e,t),t}))}function F(e,t,n,s){void 0===s&&(s=1);try{var r=e.db.transaction(e.storeName,t);n(null,r)}catch(r){if(s>0&&(!e.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return c.resolve().then((function(){if(!e.db||"NotFoundError"===r.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),D(e)})).then((function(){return _(e).then((function(){F(e,t,n,s-1)}))})).catch(n);n(r)}}function R(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(e){var t=this,n={db:null};if(e)for(var s in e)n[s]=e[s];var r=g[n.name];r||(r=R(),g[n.name]=r),r.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=j);var i=[];function o(){return c.resolve()}for(var a=0;a<r.forages.length;a++){var l=r.forages[a];l!==t&&i.push(l._initReady().catch(o))}var h=r.forages.slice(0);return c.all(i).then((function(){return n.db=r.db,C(n)})).then((function(e){return n.db=e,P(n,t._defaultConfig.version)?D(n):e})).then((function(e){n.db=r.db=e,t._dbInfo=n;for(var s=0;s<h.length;s++){var i=h[s];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}}))}function U(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){F(n._dbInfo,v,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),L(e)&&(e=A(e)),t(e)},o.onerror=function(){s(o.error)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function k(e,t){var n=this,s=new c((function(t,s){n.ready().then((function(){F(n._dbInfo,v,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var n=o.result;if(n){var s=n.value;L(s)&&(s=A(s));var r=e(s,n.key,a++);void 0!==r?t(r):n.continue()}else t()},o.onerror=function(){s(o.error)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function N(e,t,n){var s=this;e=d(e);var r=new c((function(n,r){var i;s.ready().then((function(){return i=s._dbInfo,"[object Blob]"===y.call(t)?T(i.db).then((function(e){return e?t:I(t)})):t})).then((function(t){F(s._dbInfo,w,(function(i,o){if(i)return r(i);try{var a=o.objectStore(s._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);o.oncomplete=function(){void 0===t&&(t=null),n(t)},o.onabort=o.onerror=function(){var e=l.error?l.error:l.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return h(r,n),r}function z(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){F(n._dbInfo,w,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){s(o.error)},i.onabort=function(){var e=o.error?o.error:o.transaction.error;s(e)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function G(e){var t=this,n=new c((function(e,n){t.ready().then((function(){F(t._dbInfo,w,(function(s,r){if(s)return n(s);try{var i=r.objectStore(t._dbInfo.storeName).clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){var e=i.error?i.error:i.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function V(e){var t=this,n=new c((function(e,n){t.ready().then((function(){F(t._dbInfo,v,(function(s,r){if(s)return n(s);try{var i=r.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function H(e,t){var n=this,s=new c((function(t,s){e<0?t(null):n.ready().then((function(){F(n._dbInfo,v,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){s(l.error)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function W(e){var t=this,n=new c((function(e,n){t.ready().then((function(){F(t._dbInfo,v,(function(s,r){if(s)return n(s);try{var i=r.objectStore(t._dbInfo.storeName).openKeyCursor(),o=[];i.onsuccess=function(){var t=i.result;t?(o.push(t.key),t.continue()):e(o)},i.onerror=function(){n(i.error)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function K(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var s,r=this;if(e.name){var i=e.name===n.name&&r._dbInfo.db?c.resolve(r._dbInfo.db):C(e).then((function(t){var n=g[e.name],s=n.forages;n.db=t;for(var r=0;r<s.length;r++)s[r]._dbInfo.db=t;return t}));s=e.storeName?i.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;S(e);var s=g[e.name],r=s.forages;t.close();for(var i=0;i<r.length;i++){var a=r[i];a._dbInfo.db=null,a._dbInfo.version=n}var l=new c((function(t,s){var r=o.open(e.name,n);r.onerror=function(e){r.result.close(),s(e)},r.onupgradeneeded=function(){r.result.deleteObjectStore(e.storeName)},r.onsuccess=function(){var e=r.result;e.close(),t(e)}}));return l.then((function(e){s.db=e;for(var t=0;t<r.length;t++){var n=r[t];n._dbInfo.db=e,O(n._dbInfo)}})).catch((function(t){throw(M(e,t)||c.resolve()).catch((function(){})),t}))}})):i.then((function(t){S(e);var n=g[e.name],s=n.forages;t.close();for(var r=0;r<s.length;r++)s[r]._dbInfo.db=null;var i=new c((function(t,n){var s=o.deleteDatabase(e.name);s.onerror=s.onblocked=function(e){var t=s.result;t&&t.close(),n(e)},s.onsuccess=function(){var e=s.result;e&&e.close(),t(e)}}));return i.then((function(e){n.db=e;for(var t=0;t<s.length;t++)O(s[t]._dbInfo)})).catch((function(t){throw(M(e,t)||c.resolve()).catch((function(){})),t}))}))}else s=c.reject("Invalid arguments");return h(s,t),s}var q={_driver:"asyncStorage",_initStorage:B,_support:a(),iterate:k,getItem:U,setItem:N,removeItem:z,clear:G,length:V,key:H,keys:W,dropInstance:K};function Y(){return"function"==typeof openDatabase}var Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X="~~local_forage_type~",Z=/^~~local_forage_type~([^~]+)~/,J="__lfsc__:",$=J.length,ee="arbf",te="blob",ne="si08",se="ui08",re="uic8",ie="si16",oe="si32",ae="ur16",le="ui32",ce="fl32",he="fl64",ue=$+ee.length,de=Object.prototype.toString;function pe(e){var t,n,s,r,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)n=Q.indexOf(e[t]),s=Q.indexOf(e[t+1]),r=Q.indexOf(e[t+2]),i=Q.indexOf(e[t+3]),h[l++]=n<<2|s>>4,h[l++]=(15&s)<<4|r>>2,h[l++]=(3&r)<<6|63&i;return c}function me(e){var t,n=new Uint8Array(e),s="";for(t=0;t<n.length;t+=3)s+=Q[n[t]>>2],s+=Q[(3&n[t])<<4|n[t+1]>>4],s+=Q[(15&n[t+1])<<2|n[t+2]>>6],s+=Q[63&n[t+2]];return n.length%3==2?s=s.substring(0,s.length-1)+"=":n.length%3==1&&(s=s.substring(0,s.length-2)+"=="),s}function fe(e,t){var n="";if(e&&(n=de.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===de.call(e.buffer))){var s,r=J;e instanceof ArrayBuffer?(s=e,r+=ee):(s=e.buffer,"[object Int8Array]"===n?r+=ne:"[object Uint8Array]"===n?r+=se:"[object Uint8ClampedArray]"===n?r+=re:"[object Int16Array]"===n?r+=ie:"[object Uint16Array]"===n?r+=ae:"[object Int32Array]"===n?r+=oe:"[object Uint32Array]"===n?r+=le:"[object Float32Array]"===n?r+=ce:"[object Float64Array]"===n?r+=he:t(new Error("Failed to get type for BinaryArray"))),t(r+me(s))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=X+e.type+"~"+me(this.result);t(J+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function ge(e){if(e.substring(0,$)!==J)return JSON.parse(e);var t,n=e.substring(ue),s=e.substring($,ue);if(s===te&&Z.test(n)){var r=n.match(Z);t=r[1],n=n.substring(r[0].length)}var i=pe(n);switch(s){case ee:return i;case te:return l([i],{type:t});case ne:return new Int8Array(i);case se:return new Uint8Array(i);case re:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case ae:return new Uint16Array(i);case oe:return new Int32Array(i);case le:return new Uint32Array(i);case ce:return new Float32Array(i);case he:return new Float64Array(i);default:throw new Error("Unkown type: "+s)}}var ye={serialize:fe,deserialize:ge,stringToBuffer:pe,bufferToString:me};function ve(e,t,n,s){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,s)}function we(e){var t=this,n={db:null};if(e)for(var s in e)n[s]="string"!=typeof e[s]?e[s].toString():e[s];var r=new c((function(e,s){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return s(e)}n.db.transaction((function(r){ve(r,n,(function(){t._dbInfo=n,e()}),(function(e,t){s(t)}))}),s)}));return n.serializer=ye,r}function be(e,t,n,s,r,i){e.executeSql(n,s,r,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?i(e,o):ve(e,t,(function(){e.executeSql(n,s,r,i)}),i)}),i):i(e,o)}),i)}function xe(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var s=n.rows.length?n.rows.item(0).value:null;s&&(s=r.serializer.deserialize(s)),t(s)}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Te(e,t){var n=this,s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName,[],(function(n,s){for(var i=s.rows,o=i.length,a=0;a<o;a++){var l=i.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Se(e,t,n,s){var r=this;e=d(e);var i=new c((function(i,o){r.ready().then((function(){void 0===t&&(t=null);var a=t,l=r._dbInfo;l.serializer.serialize(t,(function(t,c){c?o(c):l.db.transaction((function(n){be(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(a)}),(function(e,t){o(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(s>0)return void i(Se.apply(r,[e,a,n,s-1]));o(t)}}))}))})).catch(o)}));return h(i,n),i}function Oe(e,t,n){return Se.apply(this,[e,t,n,1])}function Me(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Ee(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var s=t._dbInfo;s.db.transaction((function(t){be(t,s,"DELETE FROM "+s.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ce(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var s=t._dbInfo;s.db.transaction((function(t){be(t,s,"SELECT COUNT(key) as c FROM "+s.storeName,[],(function(t,n){var s=n.rows.item(0).c;e(s)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function De(e,t){var n=this,s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var s=n.rows.length?n.rows.item(0).key:null;t(s)}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Pe(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var s=t._dbInfo;s.db.transaction((function(t){be(t,s,"SELECT key FROM "+s.storeName,[],(function(t,n){for(var s=[],r=0;r<n.rows.length;r++)s.push(n.rows.item(r).key);e(s)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ie(e){return new c((function(t,n){e.transaction((function(s){s.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,s){for(var r=[],i=0;i<s.rows.length;i++)r.push(s.rows.item(i).name);t({db:e,storeNames:r})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}function Ae(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var s,r=this;return s=e.name?new c((function(t){var s;s=e.name===n.name?r._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:s,storeNames:[e.storeName]}):t(Ie(s))})).then((function(e){return new c((function(t,n){e.db.transaction((function(s){function r(e){return new c((function(t,n){s.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var i=[],o=0,a=e.storeNames.length;o<a;o++)i.push(r(e.storeNames[o]));c.all(i).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):c.reject("Invalid arguments"),h(s,t),s}var Le={_driver:"webSQLStorage",_initStorage:we,_support:Y(),iterate:Te,getItem:xe,setItem:Oe,removeItem:Me,clear:Ee,length:Ce,key:De,keys:Pe,dropInstance:Ae};function je(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function _e(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Fe(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}function Re(){return!Fe()||localStorage.length>0}function Be(e){var t=this,n={};if(e)for(var s in e)n[s]=e[s];return n.keyPrefix=_e(e,t._defaultConfig),Re()?(t._dbInfo=n,n.serializer=ye,c.resolve()):c.reject()}function Ue(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var s=localStorage.key(n);0===s.indexOf(e)&&localStorage.removeItem(s)}}));return h(n,e),n}function ke(e,t){var n=this;e=d(e);var s=n.ready().then((function(){var t=n._dbInfo,s=localStorage.getItem(t.keyPrefix+e);return s&&(s=t.serializer.deserialize(s)),s}));return h(s,t),s}function Ne(e,t){var n=this,s=n.ready().then((function(){for(var t=n._dbInfo,s=t.keyPrefix,r=s.length,i=localStorage.length,o=1,a=0;a<i;a++){var l=localStorage.key(a);if(0===l.indexOf(s)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(r),o++)))return c}}}));return h(s,t),s}function ze(e,t){var n=this,s=n.ready().then((function(){var t,s=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(s.keyPrefix.length)),t}));return h(s,t),s}function Ge(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,s=[],r=0;r<n;r++){var i=localStorage.key(r);0===i.indexOf(e.keyPrefix)&&s.push(i.substring(e.keyPrefix.length))}return s}));return h(n,e),n}function Ve(e){var t=this.keys().then((function(e){return e.length}));return h(t,e),t}function He(e,t){var n=this;e=d(e);var s=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return h(s,t),s}function We(e,t,n){var s=this;e=d(e);var r=s.ready().then((function(){void 0===t&&(t=null);var n=t;return new c((function(r,i){var o=s._dbInfo;o.serializer.serialize(t,(function(t,s){if(s)i(s);else try{localStorage.setItem(o.keyPrefix+e,t),r(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}}))}))}));return h(r,n),r}function Ke(e,t){if(t=p.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var s,r=this;return s=e.name?new c((function(t){e.storeName?t(_e(e,r._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),h(s,t),s}var qe={_driver:"localStorageWrapper",_initStorage:Be,_support:je(),iterate:Ne,getItem:ke,setItem:We,removeItem:He,clear:Ue,length:Ve,key:ze,keys:Ge,dropInstance:Ke},Ye=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Qe=function(e,t){for(var n=e.length,s=0;s<n;){if(Ye(e[s],t))return!0;s++}return!1},Xe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Ze={},Je={},$e={INDEXEDDB:q,WEBSQL:Le,LOCALSTORAGE:qe},et=[$e.INDEXEDDB._driver,$e.WEBSQL._driver,$e.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),st={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function rt(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function it(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Xe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ot=function(){function e(t){for(var n in r(this,e),$e)if($e.hasOwnProperty(n)){var s=$e[n],i=s._driver;this[n]=i,Ze[i]||this.defineDriver(s)}this._defaultConfig=it({},st),this._config=it({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":s(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var s=new c((function(t,n){try{var s=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(r);for(var i=nt.concat("_initStorage"),o=0,a=i.length;o<a;o++){var l=i[o];if((!Qe(tt,l)||e[l])&&"function"!=typeof e[l])return void n(r)}var u=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=c.reject(t);return h(n,arguments[arguments.length-1]),n}},n=0,s=tt.length;n<s;n++){var r=tt[n];e[r]||(e[r]=t(r))}};u();var d=function(n){Ze[s]&&console.info("Redefining LocalForage driver: "+s),Ze[s]=e,Je[s]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(d,n):d(!!e._support):d(!0)}catch(e){n(e)}}));return u(s,t,n),s},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var s=Ze[e]?c.resolve(Ze[e]):c.reject(new Error("Driver not found."));return u(s,t,n),s},e.prototype.getSerializer=function(e){var t=c.resolve(ye);return u(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(n,e,e),n},e.prototype.setDriver=function(e,t,n){var s=this;Xe(e)||(e=[e]);var r=this._getSupportedDrivers(e);function i(){s._config.driver=s.driver()}function o(e){return s._extend(e),i(),s._ready=s._initStorage(s._config),s._ready}function a(e){return function(){var t=0;function n(){for(;t<e.length;){var r=e[t];return t++,s._dbInfo=null,s._ready=null,s.getDriver(r).then(o).catch(n)}i();var a=new Error("No available storage method found.");return s._driverSet=c.reject(a),s._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch((function(){return c.resolve()})):c.resolve();return this._driverSet=l.then((function(){var e=r[0];return s._dbInfo=null,s._ready=null,s.getDriver(e).then((function(e){s._driver=e._driver,i(),s._wrapLibraryMethodsWithReady(),s._initDriver=a(r)}))})).catch((function(){i();var e=new Error("No available storage method found.");return s._driverSet=c.reject(e),s._driverSet})),u(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Je[e]},e.prototype._extend=function(e){it(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,s=e.length;n<s;n++){var r=e[n];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)rt(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),at=new ot;t.exports=at},{3:3}]},{},[4])(4);const _o=new r;_o.name="Scene";class Fo{constructor(e,t){this.signals=e,this.viewportState=t,this.strokeStore=Lo.createInstance({name:"soonspace",storeName:"modelStrokeCache"}),this.scene=_o.clone(),this.selectedObjects={edge:new Set,stroke:new Set,opacity:new Set,highlight:new Set,emissive:new Set},this.intersectsList={meshOfModelList:[],poiIconList:[],otherObjList:[],getAll:function(){return[...this.meshOfModelList,...this.poiIconList,...this.otherObjList]}}}addObject(e,t){if(this.viewportState.isDisposed)return this.removeObject(e),void tr("Scene is disposed");t?t.add(e):this.scene.add(e),this._triggerObjectAdded(e),this.signals.objectAdded.dispatch(e)}attachObject(e,t){if(this.viewportState.isDisposed)return this.removeObject(e),void tr("Scene is disposed");t?t.attach(e):this.scene.attach(e),this._triggerObjectAdded(e),this.signals.objectAdded.dispatch(e)}removeObject(e){function t(e){var t;e.map&&((t=e.map)&&t.isTexture&&t.dispose()),e.dispose()}e.traverse((e=>{var n;if(e.geometry&&e.material){const n=e;n.geometry.dispose(),ti(n.material,t)}e instanceof Ya&&(null===(n=e.element)||void 0===n||n.remove());const{meshOfModelList:s,poiIconList:r,otherObjList:i}=this.intersectsList,o=s.findIndex((t=>t.uuid===e.uuid)),a=r.findIndex((t=>t.uuid===e.uuid)),l=i.findIndex((t=>t.uuid===e.uuid));o>-1&&this.intersectsList.meshOfModelList.splice(o,1),a>-1&&this.intersectsList.poiIconList.splice(a,1),l>-1&&this.intersectsList.otherObjList.splice(l,1)})),e.removeFromParent(),this.signals.objectRemoved.dispatch(e)}openSceneFog(e={}){const{color:t=13426943,density:n=.002}=e;this.scene.fog=new H(t,n),this.signals.sceneChanged.dispatch()}closeSceneFog(){this.scene.fog=null,this.signals.sceneChanged.dispatch()}edgeShow(e,t){const n=[],s=e=>{this.selectedObjects.edge.has(e)||n.push(e)};return Wr(e)?e.forEach((e=>s(e))):Kr(e)&&s(e),n.forEach((e=>this.selectedObjects.edge.add(e))),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge,options:t}),Promise.resolve()}unEdgeShow(e){e||(e=[...this.selectedObjects.edge]);const t=e=>this.selectedObjects.edge.has(e)?(this.selectedObjects.edge.delete(e),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge}),Promise.resolve()):Promise.resolve();return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}strokeShow(e,t={}){const{isOpacityShow:n=!0,color:s=4647927,opacity:r=.2,edgeColor:i=61183,edgeOpacity:o=1,modelCache:a=!0,firstChild:l=!1}=t,c=async e=>{var c;if(this.selectedObjects.stroke.has(e))return Promise.resolve();if(e.userData.strokeGroup)return Promise.resolve();const h=new Va({id:`${null!==(c=e.sid)&&void 0!==c?c:e.id}_stroke`,name:`${e.name}_stroke`}),u=new K,d=new x({color:i,transparent:!0,opacity:o});u.material=d,h.add(u);let p=null;const m=()=>{const t=[];if((l?e.children[0]:e).traverse((n=>{if("Mesh"===n.type&&n instanceof W){const s=new q(n.geometry,89);n.updateWorldMatrix(!0,!1);const r=n.matrixWorld.clone().premultiply(e.matrixWorld.clone().invert());s.applyMatrix4(r),t.push(s)}})),0!==t.length)return $t(t)};if(a&&e instanceof Qa&&e.sid){const t=`${e.sid}_stroke`;await this.strokeStore.ready();const n=await this.strokeStore.getItem(t);if(n)p=new w,p.setAttribute("position",new b(n,3));else{const e=m();if(e){p=e;const n=e.getAttribute("position");n.array instanceof Float32Array&&this.strokeStore.setItem(t,n.array.buffer)}}}else{const e=m();e&&(p=e)}return null!==p?(u.geometry=p,e.userData.strokeGroup=h,e.userData.strokeOptions=t,this.addObject(h,e),this.selectedObjects.stroke.add(e),n&&this.opacityShow(l?e.children[0]:e,{color:s,opacity:r}),Promise.resolve()):void 0};return Wr(e)?Promise.all(e.map((e=>c(e)))):Kr(e)?c(e):Promise.resolve()}unStrokeShow(e){e||(e=[...this.selectedObjects.stroke]);const t=e=>{if(!e.userData.strokeGroup)return Promise.resolve();if(this.removeObject(e.userData.strokeGroup),Reflect.deleteProperty(e.userData,"strokeGroup"),!this.selectedObjects.stroke.has(e))return Promise.resolve();this.selectedObjects.stroke.delete(e),this.signals.geometryChanged.dispatch();const{firstChild:t}=e.userData.strokeOptions;return this.unOpacityShow(t?e.children[0]:e),Reflect.deleteProperty(e.userData,"strokeOptions"),Promise.resolve()};return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}opacityShow(e,t={}){const{color:n="#fff",opacity:s=.8}=t;function r(e){const t=Sr(e);return t.map=null,t.transparent=s<1,t.depthWrite=!t.transparent,t.color.set(n),t.opacity=s,t}const i=e=>(this.selectedObjects.opacity.has(e)||(e.traverse((e=>{if(e instanceof W){if(e.userData.material)return;e.userData.material=e.material,e.material=ti(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.opacity.add(e)),Promise.resolve());return Wr(e)?Promise.all(e.map((e=>i(e)))):Kr(e)?i(e):Promise.resolve()}unOpacityShow(e){e||(e=[...this.selectedObjects.opacity]);const t=e=>new Promise((t=>{this.selectedObjects.opacity.has(e)||t(),this.selectedObjects.opacity.delete(e),e.traverse((e=>{if(e instanceof W){if(!e.userData.material)return;Or(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}highlightShow(e,t={}){const{color:n="red",opacity:s=1}=t;function r(e){e instanceof Y&&(e.color=new u(n),e.opacity=s,e.transparent=s<1,e.depthWrite=!e.transparent)}const i=e=>(this.selectedObjects.highlight.has(e)||(e.traverse((e=>{if(e instanceof W){if(e.userData.material)return;e.userData.material=e.material,e.material=Sr(e.material),ti(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.highlight.add(e)),Promise.resolve());return Wr(e)?Promise.all(e.map((e=>i(e)))):Kr(e)?i(e):Promise.resolve()}unHighlightShow(e){e||(e=[...this.selectedObjects.highlight]);const t=e=>new Promise((t=>{this.selectedObjects.highlight.has(e)||t(),this.selectedObjects.highlight.delete(e),e.traverse((e=>{if(e instanceof W){if(!e.userData.material)return;Or(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}emissiveShow(e,t={}){const{color:n="red",baseColor:s,maxOpacity:r=1,minOpacity:i=0,duration:o=1e3,yoyo:a=!1}=t;function l(e){e instanceof Y&&(s&&e.color.set(s),e.emissive.set(n),e.emissiveIntensity=r,0!==o&&ri({emissiveIntensity:r},{emissiveIntensity:i},{duration:o,yoyo:a,repeat:!0},(t=>e.emissiveIntensity=t.emissiveIntensity),(t=>e.userData.animation=t)))}const c=e=>(this.selectedObjects.emissive.has(e)||(e.traverse((e=>{if(e instanceof W){if(e.userData.material)return;e.userData.material=e.material,e.material=Sr(e.material),ti(e.material,l)}})),this.selectedObjects.emissive.add(e),this.signals.materialChanged.dispatch()),Promise.resolve());return Wr(e)?Promise.all(e.map((e=>c(e)))):Kr(e)?c(e):Promise.resolve()}unEmissiveShow(e){function t(e){e.userData.animation&&jt.remove(e.userData.animation)}e||(e=[...this.selectedObjects.emissive]);const n=e=>new Promise((n=>{this.selectedObjects.emissive.has(e)||n(),this.selectedObjects.emissive.delete(e),e.traverse((e=>{if(e instanceof W){if(!e.userData.material)return;ti(e.material,t),Or(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),n()}));return Wr(e)?Promise.all(e.map((e=>n(e)))):Kr(e)?n(e):Promise.resolve()}_triggerObjectAdded(e){if(e instanceof za)if("Model"===e.stype)e.traverse((e=>{if(e instanceof W){-1===this.intersectsList.meshOfModelList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.meshOfModelList.push(e)}}));else if("Poi"===e.stype&&e instanceof Xa){const t=this.intersectsList.poiIconList.findIndex((t=>{var n;return t.uuid===(null===(n=e.icon)||void 0===n?void 0:n.uuid)}));-1===t&&e.icon&&this.intersectsList.poiIconList.push(e.icon)}else"Group"===e.stype?e.children.forEach((e=>this._triggerObjectAdded(e))):e.isObject3D&&e.traverse((e=>{if(e instanceof W){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}));else e.isObject3D&&e.traverse((e=>{if(e instanceof W){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}))}}class Ro extends o{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof Ro&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}const Bo=new t,Uo=new y,ko=new y,No=new t,zo=new t;class Go{constructor(e){let t,n,s,r;this.viewport=e,this.domElement=document.createElement("div");const i={objects:new WeakMap};this.domElement.style.overflow="hidden",this.getSize=function(){return{width:t,height:n}},this.render=function(e,t){null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),Uo.copy(t.matrixWorldInverse),ko.multiplyMatrices(t.projectionMatrix,Uo);const n=[...e].filter((e=>Wa(e.elementType))).map((e=>e.children[0]));o(n,t),function(e){const t=e.sort((function(e,t){if(e.renderOrder!==t.renderOrder)return t.renderOrder-e.renderOrder;return i.objects.get(e).distanceToCameraSquared-i.objects.get(t).distanceToCameraSquared})),n=t.length;for(let e=0,s=t.length;e<s;e++)t[e].element.style.zIndex=""+(n-e)}(n)},this.setSize=(e,i)=>{t=e,n=i,s=t/2,r=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=i+"px"};const o=(e,t)=>{e.forEach((e=>{var n;Fr(e,this.viewport);const o=e.parent;Bo.setFromMatrixPosition(e.matrixWorld),Bo.applyMatrix4(ko);const l=hr(e)&&Bo.z>=-1&&Bo.z<=1&&!0===e.layers.test(t.layers);if(e.userData.prevVisible!==l&&(null===(n=o.onChange)||void 0===n||n.call(o,l),o.elementAutoDisplay&&(e.element.style.display=!0===l?"":"none")),e.userData.prevVisible=l,!0===l||!1===o.elementAutoDisplay){const t=e.element;t.style.transform="translate(-50%,-50%) translate("+(Bo.x*s+s)+"px,"+(-Bo.y*r+r)+"px)",t.parentNode!==this.domElement&&this.domElement.appendChild(t)}const c={distanceToCameraSquared:a(t,e)};i.objects.set(e,c)}))};function a(e,t){return No.setFromMatrixPosition(e.matrixWorld),zo.setFromMatrixPosition(t.matrixWorld),No.distanceToSquared(zo)}}}const Vo=new t,Ho=new i,Wo=new t;class Ko extends o{constructor(e=document.createElement("div")){super(),this.isCSS3DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof Ko&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}class qo extends Ko{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,t){return super.copy(e,t),this.rotation2D=e.rotation2D,this}}const Yo=new y,Qo=new y;class Xo{constructor(e){let t,n,s,r;this.viewport=e,this.domElement=document.createElement("div");const i={camera:{style:""},objects:new WeakMap};this.domElement.style.overflow="hidden";const o=document.createElement("div");o.style.transformOrigin="0 0",this.domElement.appendChild(o);const a=document.createElement("div");function l(e){return Math.abs(e)<1e-10?0:e}function c(e){const t=e.elements;return"matrix3d("+l(t[0])+","+l(-t[1])+","+l(t[2])+","+l(t[3])+","+l(t[4])+","+l(-t[5])+","+l(t[6])+","+l(t[7])+","+l(t[8])+","+l(-t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(-t[13])+","+l(t[14])+","+l(t[15])+")"}function h(e){const t=e.elements;return"translate(-50%,-50%)"+("matrix3d("+l(t[0])+","+l(t[1])+","+l(t[2])+","+l(t[3])+","+l(-t[4])+","+l(-t[5])+","+l(-t[6])+","+l(-t[7])+","+l(t[8])+","+l(t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(t[13])+","+l(t[14])+","+l(t[15])+")")}a.style.transformStyle="preserve-3d",o.appendChild(a),this.getSize=()=>({width:t,height:n}),this.render=(e,h)=>{const d=h.projectionMatrix.elements[5]*r;h.view&&h.view.enabled?(o.style.transform=`translate( ${-h.view.offsetX*(t/h.view.width)}px, ${-h.view.offsetY*(n/h.view.height)}px )`,o.style.transform+=`scale( ${h.view.fullWidth/h.view.width}, ${h.view.fullHeight/h.view.height} )`):o.style.transform="",null===h.parent&&!0===h.matrixWorldAutoUpdate&&h.updateMatrixWorld();let p=0,m=0;h instanceof Q&&(p=-(h.right+h.left)/2,m=(h.top+h.bottom)/2);const f=h.view&&h.view.enabled?h.view.height/h.view.fullHeight:1,g=h instanceof Q?`scale( ${f} )scale(`+d+")translate("+l(p)+"px,"+l(m)+"px)"+c(h.matrixWorldInverse):`scale( ${f} )translateZ(`+d+"px)"+c(h.matrixWorldInverse),y=(h instanceof X?"perspective("+d+"px) ":"")+g+"translate("+s+"px,"+r+"px)";i.camera.style!==y&&(a.style.transform=y,i.camera.style=y);const v=[...e].filter((e=>Ka(e.elementType)||qa(e.elementType))).map((e=>e.children[0]));u(v,h)},this.setSize=(e,i)=>{t=e,n=i,s=t/2,r=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=i+"px",o.style.width=e+"px",o.style.height=i+"px",a.style.width=e+"px",a.style.height=i+"px"};const u=(e,t)=>{e.forEach((e=>{var n;if(e instanceof Ko){Fr(e,this.viewport);const s=e.parent,r=hr(e)&&!0===e.layers.test(t.layers);if(e.userData.prevVisible!==r&&(null===(n=s.onChange)||void 0===n||n.call(s,r),s.elementAutoDisplay&&(e.element.style.display=!0===r?"":"none")),e.userData.prevVisible=r,!0===r||!1===s.elementAutoDisplay){let n;e instanceof qo?(Yo.copy(t.matrixWorldInverse),Yo.transpose(),0!==e.rotation2D&&Yo.multiply(Qo.makeRotationZ(e.rotation2D)),e.matrixWorld.decompose(Vo,Ho,Wo),Yo.setPosition(Vo),Yo.scale(Wo),Yo.elements[3]=0,Yo.elements[7]=0,Yo.elements[11]=0,Yo.elements[15]=1,n=h(Yo)):n=h(e.matrixWorld);const s=e.element,r=i.objects.get(e);if(void 0===r||r.style!==n){s.style.transform=n;const t={style:n};i.objects.set(e,t)}s.parentNode!==a&&a.appendChild(s)}}}))}}}class Zo{itemsMap=new Map;instancesCacheMap=new Map;constructor(e){this.objects=e}init(){this.itemsMap.clear()}push(e,t,n,s,r,i){const o=t.uuid+":"+n.uuid,{itemsMap:a}=this;let l=a.get(o);l||(l=[],a.set(o,l)),l.push({object:e,geometry:t,material:n,groupOrder:s,z:r,group:i})}build(e){this.itemsMap.forEach(((t,n)=>{if(t.length>1){let s=null;const r=this.instancesCacheMap.get(n);r&&r.count===t.length?s=r:(s=new Z(t[0].geometry,t[0].material,t.length),s.instanceMatrix.setUsage(J),s.name="auto-instanced",null==r||r.dispose(),this.instancesCacheMap.set(n,s)),t.forEach(((e,t)=>s.setMatrixAt(t,e.object.matrixWorld))),s.instanceMatrix.needsUpdate=!0,this.objects.update(s),e.push(s,s.geometry,s.material,t[0].groupOrder,t[0].z,t[0].group)}else e.push(t[0].object,t[0].geometry,t[0].material,t[0].groupOrder,t[0].z,t[0].group)}))}dispose(){this.itemsMap.clear(),this.instancesCacheMap.forEach((e=>e.dispose())),this.instancesCacheMap.clear()}}class Jo{constructor(e={}){const{canvas:n=Pn(),context:s=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:l=!1,premultipliedAlpha:h=!0,preserveDrawingBuffer:d=!1,powerPreference:p="default",failIfMajorPerformanceCaveat:m=!1,reverseDepthBuffer:f=!1}=e;let g;if(this.isWebGLRenderer=!0,null!==s){if("undefined"!=typeof WebGLRenderingContext&&s instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=s.getContextAttributes().alpha}else g=a;const v=new Uint32Array(4),w=new Int32Array(4);let b=null,x=null;const T=[],S=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=$,this.toneMapping=ee,this.toneMappingExposure=1,this.autoInstancing=!1;const O=this;let M=!1,E=0,C=0,D=null,P=-1,I=null;const A=new te,L=new te;let j=null;const _=new u(0);let F=0,R=n.width,B=n.height,U=1,k=null,N=null;const z=new te(0,0,R,B),G=new te(0,0,R,B);let V=!1;const H=new ne;let W=!1,K=!1;this.transmissionResolutionScale=1;const q=new y,Y=new y,Q=new t,X=new te,Z={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let J=!1;function ue(){return null===D?U:1}let xe,Te,Se,Oe,Me,Ee,Ce,De,Pe,Ie,Ae,Le,je,_e,Fe,Re,Be,Ue,ke,Ne,ze,Ge,Ve,He,We,Ke=s;function qe(e,t){return n.getContext(e,t)}try{const e={alpha:!0,depth:r,stencil:i,antialias:l,premultipliedAlpha:h,preserveDrawingBuffer:d,powerPreference:p,failIfMajorPerformanceCaveat:m};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${se}`),n.addEventListener("webglcontextlost",Xe,!1),n.addEventListener("webglcontextrestored",Ze,!1),n.addEventListener("webglcontextcreationerror",Je,!1),null===Ke){const t="webgl2";if(Ke=qe(t,e),null===Ke)throw qe(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function Ye(){xe=new un(Ke),xe.init(),Ge=new Mn(Ke,xe),Te=new an(Ke,xe,e,Ge),Se=new Tn(Ke,xe),Te.reverseDepthBuffer&&f&&Se.buffers.depth.setReversed(!0),Oe=new mn(Ke),Me=new vn,Ee=new Sn(Ke,xe,Se,Me,Te,Ge,Oe),Ce=new cn(O),De=new hn(O),Pe=new nn(Ke),Ve=new rn(Ke,Pe),Ie=new dn(Ke,Pe,Oe,Ve),Ae=new gn(Ke,Ie,Pe,Oe),ke=new fn(Ke,Te,Ee),Re=new ln(Me),Le=new yn(O,Ce,De,xe,Te,Ve,Re),je=new Cn(O,Me),_e=new wn,Fe=new bn(xe),Ue=new sn(O,Ce,De,Se,Ae,g,h),Be=new xn(O,Ae,Te),He=new Dn(Ke,Oe,Te,Se),Ne=new on(Ke,xe,Oe),ze=new pn(Ke,xe,Oe),We=new Zo(Ae),Oe.programs=Le.programs,O.capabilities=Te,O.extensions=xe,O.properties=Me,O.renderLists=_e,O.shadowMap=Be,O.state=Se,O.info=Oe}Ye();const Qe=new En(O,Ke);function Xe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function Ze(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;const e=Oe.autoReset,t=Be.enabled,n=Be.autoUpdate,s=Be.needsUpdate,r=Be.type;Ye(),Oe.autoReset=e,Be.enabled=t,Be.autoUpdate=n,Be.needsUpdate=s,Be.type=r}function Je(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function $e(e){const t=e.target;t.removeEventListener("dispose",$e),function(e){(function(e){const t=Me.get(e).programs;void 0!==t&&(t.forEach((function(e){Le.releaseProgram(e)})),e.isShaderMaterial&&Le.releaseShaderCache(e))})(e),Me.remove(e)}(t)}function et(e,t,n){!0===e.transparent&&e.side===le&&!1===e.forceSinglePass?(e.side=ce,e.needsUpdate=!0,ht(e,t,n),e.side=he,e.needsUpdate=!0,ht(e,t,n),e.side=le):ht(e,t,n)}this.xr=Qe,this.getContext=function(){return Ke},this.getContextAttributes=function(){return Ke.getContextAttributes()},this.forceContextLoss=function(){const e=xe.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=xe.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return U},this.setPixelRatio=function(e){void 0!==e&&(U=e,this.setSize(R,B,!1))},this.getSize=function(e){return e.set(R,B)},this.setSize=function(e,t,s=!0){Qe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=e,B=t,n.width=Math.floor(e*U),n.height=Math.floor(t*U),!0===s&&(n.style.width=e+"px",n.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return e.set(R*U,B*U).floor()},this.setDrawingBufferSize=function(e,t,s){R=e,B=t,U=s,n.width=Math.floor(e*s),n.height=Math.floor(t*s),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return e.copy(A)},this.getViewport=function(e){return e.copy(z)},this.setViewport=function(e,t,n,s){e.isVector4?z.set(e.x,e.y,e.z,e.w):z.set(e,t,n,s),Se.viewport(A.copy(z).multiplyScalar(U).round())},this.getScissor=function(e){return e.copy(G)},this.setScissor=function(e,t,n,s){e.isVector4?G.set(e.x,e.y,e.z,e.w):G.set(e,t,n,s),Se.scissor(L.copy(G).multiplyScalar(U).round())},this.getScissorTest=function(){return V},this.setScissorTest=function(e){Se.setScissorTest(V=e)},this.setOpaqueSort=function(e){k=e},this.setTransparentSort=function(e){N=e},this.getClearColor=function(e){return e.copy(Ue.getClearColor())},this.setClearColor=function(){Ue.setClearColor.apply(Ue,arguments)},this.getClearAlpha=function(){return Ue.getClearAlpha()},this.setClearAlpha=function(){Ue.setClearAlpha.apply(Ue,arguments)},this.clear=function(e=!0,t=!0,n=!0){let s=0;if(e){let e=!1;if(null!==D){const t=D.texture.format;e=t===pe||t===me||t===fe}if(e){const e=D.texture.type,t=e===ie||e===ge||e===ye||e===ve||e===we||e===be,n=Ue.getClearColor(),s=Ue.getClearAlpha(),r=n.r,i=n.g,o=n.b;t?(v[0]=r,v[1]=i,v[2]=o,v[3]=s,Ke.clearBufferuiv(Ke.COLOR,0,v)):(w[0]=r,w[1]=i,w[2]=o,w[3]=s,Ke.clearBufferiv(Ke.COLOR,0,w))}else s|=Ke.COLOR_BUFFER_BIT}t&&(s|=Ke.DEPTH_BUFFER_BIT),n&&(s|=Ke.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Ke.clear(s)},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(){n.removeEventListener("webglcontextlost",Xe,!1),n.removeEventListener("webglcontextrestored",Ze,!1),n.removeEventListener("webglcontextcreationerror",Je,!1),Ue.dispose(),_e.dispose(),Fe.dispose(),Me.dispose(),Ce.dispose(),De.dispose(),Ae.dispose(),Ve.dispose(),He.dispose(),Le.dispose(),We.dispose(),Qe.dispose(),Qe.removeEventListener("sessionstart",nt),Qe.removeEventListener("sessionend",st),rt.stop()},this.renderBufferDirect=function(e,t,n,s,r,i){null===t&&(t=Z);const o=r.isMesh&&r.matrixWorld.determinant()<0,a=function(e,t,n,s,r){!0!==t.isScene&&(t=Z);Ee.resetTextureUnits();const i=t.fog,o=s.isMeshStandardMaterial?t.environment:null,a=null===D?O.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:de,l=(s.isMeshStandardMaterial?De:Ce).get(s.envMap||o),c=!0===s.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,h=!!n.attributes.tangent&&(!!s.normalMap||s.anisotropy>0),u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,p=!!n.morphAttributes.color;let m=ee;s.toneMapped&&(null!==D&&!0!==D.isXRRenderTarget||(m=O.toneMapping));const f=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,g=void 0!==f?f.length:0,y=Me.get(s),v=x.state.lights;if(!0===W&&(!0===K||e!==I)){const t=e===I&&s.id===P;Re.setState(s,e,t)}let w=!1;s.version===y.__version?y.needsLights&&y.lightsStateVersion!==v.state.version||y.outputColorSpace!==a||r.isBatchedMesh&&!1===y.batching?w=!0:r.isBatchedMesh||!0!==y.batching?r.isBatchedMesh&&!0===y.batchingColor&&null===r.colorTexture||r.isBatchedMesh&&!1===y.batchingColor&&null!==r.colorTexture||r.isInstancedMesh&&!1===y.instancing?w=!0:r.isInstancedMesh||!0!==y.instancing?r.isSkinnedMesh&&!1===y.skinning?w=!0:r.isSkinnedMesh||!0!==y.skinning?r.isInstancedMesh&&!0===y.instancingColor&&null===r.instanceColor||r.isInstancedMesh&&!1===y.instancingColor&&null!==r.instanceColor||r.isInstancedMesh&&!0===y.instancingMorph&&null===r.morphTexture||r.isInstancedMesh&&!1===y.instancingMorph&&null!==r.morphTexture||y.envMap!==l||!0===s.fog&&y.fog!==i?w=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===Re.numPlanes&&y.numIntersection===Re.numIntersection?(y.vertexAlphas!==c||y.vertexTangents!==h||y.morphTargets!==u||y.morphNormals!==d||y.morphColors!==p||y.toneMapping!==m||y.morphTargetsCount!==g)&&(w=!0):w=!0:w=!0:w=!0:w=!0:(w=!0,y.__version=s.version);let b=y.currentProgram;!0===w&&(b=ht(s,t,r));let T=!1,S=!1,M=!1;const E=b.getUniforms(),C=y.uniforms;Se.useProgram(b.program)&&(T=!0,S=!0,M=!0);s.id!==P&&(P=s.id,S=!0);if(T||I!==e){Se.buffers.depth.getReversed()?(q.copy(e.projectionMatrix),In(q),An(q),E.setValue(Ke,"projectionMatrix",q)):E.setValue(Ke,"projectionMatrix",e.projectionMatrix),E.setValue(Ke,"viewMatrix",e.matrixWorldInverse);const t=E.map.cameraPosition;void 0!==t&&t.setValue(Ke,Q.setFromMatrixPosition(e.matrixWorld)),Te.logarithmicDepthBuffer&&E.setValue(Ke,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(s.isMeshPhongMaterial||s.isMeshToonMaterial||s.isMeshLambertMaterial||s.isMeshBasicMaterial||s.isMeshStandardMaterial||s.isShaderMaterial)&&E.setValue(Ke,"isOrthographic",!0===e.isOrthographicCamera),I!==e&&(I=e,S=!0,M=!0)}if(r.isSkinnedMesh){E.setOptional(Ke,r,"bindMatrix"),E.setOptional(Ke,r,"bindMatrixInverse");const e=r.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),E.setValue(Ke,"boneTexture",e.boneTexture,Ee))}r.isBatchedMesh&&(E.setOptional(Ke,r,"batchingTexture"),E.setValue(Ke,"batchingTexture",r._matricesTexture,Ee),E.setOptional(Ke,r,"batchingIdTexture"),E.setValue(Ke,"batchingIdTexture",r._indirectTexture,Ee),E.setOptional(Ke,r,"batchingColorTexture"),null!==r._colorsTexture&&E.setValue(Ke,"batchingColorTexture",r._colorsTexture,Ee));const A=n.morphAttributes;void 0===A.position&&void 0===A.normal&&void 0===A.color||ke.update(r,n,b);(S||y.receiveShadow!==r.receiveShadow)&&(y.receiveShadow=r.receiveShadow,E.setValue(Ke,"receiveShadow",r.receiveShadow));s.isMeshGouraudMaterial&&null!==s.envMap&&(C.envMap.value=l,C.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);s.isMeshStandardMaterial&&null===s.envMap&&null!==t.environment&&(C.envMapIntensity.value=t.environmentIntensity);S&&(E.setValue(Ke,"toneMappingExposure",O.toneMappingExposure),y.needsLights&&(j=M,(L=C).ambientLightColor.needsUpdate=j,L.lightProbe.needsUpdate=j,L.directionalLights.needsUpdate=j,L.directionalLightShadows.needsUpdate=j,L.pointLights.needsUpdate=j,L.pointLightShadows.needsUpdate=j,L.spotLights.needsUpdate=j,L.spotLightShadows.needsUpdate=j,L.rectAreaLights.needsUpdate=j,L.hemisphereLights.needsUpdate=j),i&&!0===s.fog&&je.refreshFogUniforms(C,i),je.refreshMaterialUniforms(C,s,U,B,x.state.transmissionRenderTarget[e.id]),On.upload(Ke,ut(y),C,Ee));var L,j;s.isShaderMaterial&&!0===s.uniformsNeedUpdate&&(On.upload(Ke,ut(y),C,Ee),s.uniformsNeedUpdate=!1);s.isSpriteMaterial&&E.setValue(Ke,"center",r.center);if(E.setValue(Ke,"modelViewMatrix",r.modelViewMatrix),E.setValue(Ke,"normalMatrix",r.normalMatrix),E.setValue(Ke,"modelMatrix",r.matrixWorld),s.isShaderMaterial||s.isRawShaderMaterial){const e=s.uniformsGroups;for(let t=0,n=e.length;t<n;t++){const n=e[t];He.update(n,b),He.bind(n,b)}}return b}(e,t,n,s,r);Se.setMaterial(s,o);let l=n.index,c=1;if(!0===s.wireframe){if(l=Ie.getWireframeAttribute(n),void 0===l)return;c=2}const h=n.drawRange,u=n.attributes.position;let d=h.start*c,p=(h.start+h.count)*c;null!==i&&(d=Math.max(d,i.start*c),p=Math.min(p,(i.start+i.count)*c)),null!==l?(d=Math.max(d,0),p=Math.min(p,l.count)):null!=u&&(d=Math.max(d,0),p=Math.min(p,u.count));const m=p-d;if(m<0||m===1/0)return;let f;Ve.setup(r,s,a,n,l);let g=Ne;if(null!==l&&(f=Pe.get(l),g=ze,g.setIndex(f)),r.isMesh)!0===s.wireframe?(Se.setLineWidth(s.wireframeLinewidth*ue()),g.setMode(Ke.LINES)):g.setMode(Ke.TRIANGLES);else if(r.isLine){let e=s.linewidth;void 0===e&&(e=1),Se.setLineWidth(e*ue()),r.isLineSegments?g.setMode(Ke.LINES):r.isLineLoop?g.setMode(Ke.LINE_LOOP):g.setMode(Ke.LINE_STRIP)}else r.isPoints?g.setMode(Ke.POINTS):r.isSprite&&g.setMode(Ke.TRIANGLES);if(r.isBatchedMesh)if(null!==r._multiDrawInstances)g.renderMultiDrawInstances(r._multiDrawStarts,r._multiDrawCounts,r._multiDrawCount,r._multiDrawInstances);else if(xe.get("WEBGL_multi_draw"))g.renderMultiDraw(r._multiDrawStarts,r._multiDrawCounts,r._multiDrawCount);else{const e=r._multiDrawStarts,t=r._multiDrawCounts,n=r._multiDrawCount,i=l?Pe.get(l).bytesPerElement:1,o=Me.get(s).currentProgram.getUniforms();for(let s=0;s<n;s++)o.setValue(Ke,"_gl_DrawID",s),g.render(e[s]/i,t[s])}else if(r.isInstancedMesh)g.renderInstances(d,m,r.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);g.renderInstances(d,m,t)}else g.render(d,m)},this.compile=function(e,t,n=null){null===n&&(n=e),x=Fe.get(n),x.init(t),S.push(x),n.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(x.pushLight(e),e.castShadow&&x.pushShadow(e))})),e!==n&&e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(x.pushLight(e),e.castShadow&&x.pushShadow(e))})),x.setupLights();const s=new Set;return e.traverse((function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;const t=e.material;if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++){const i=t[r];et(i,n,e),s.add(i)}else et(t,n,e),s.add(t)})),S.pop(),x=null,s},this.compileAsync=function(e,t,n=null){const s=this.compile(e,t,n);return new Promise((t=>{function n(){s.forEach((function(e){Me.get(e).currentProgram.isReady()&&s.delete(e)})),0!==s.size?setTimeout(n,10):t(e)}null!==xe.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let tt=null;function nt(){rt.stop()}function st(){rt.start()}const rt=new tn;function it(e,t,n,s,r=!0){if(!1===e.visible)return;if(e.layers.test(t.layers))if(r&&(Object.is(e.updateMatrixWorld,o.prototype.updateMatrixWorld)?(e.matrixAutoUpdate&&e.updateMatrix(),e.matrixWorldAutoUpdate&&(null===e.parent?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(e.parent.matrixWorld,e.matrix))):(r=!1,e.updateMatrixWorld(!0))),e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)x.pushLight(e),e.castShadow&&x.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||H.intersectsSprite(e)){s&&X.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Y);const t=Ae.update(e),r=e.material;r.visible&&b.push(e,t,r,n,X.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||H.intersectsObject(e))){const t=Ae.update(e),r=e.material;if(s&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),X.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),X.copy(t.boundingSphere.center)),X.applyMatrix4(e.matrixWorld).applyMatrix4(Y)),Array.isArray(r)){const s=t.groups;for(let i=0,o=s.length;i<o;i++){const o=s[i],a=r[o.materialIndex];a&&a.visible&&b.push(e,t,a,n,X.z,o)}}else r.visible&&(!0!==O.autoInstancing||"Mesh"!==e.type||e.isInstancedMesh?b.push(e,t,r,n,X.z,null):We.push(e,t,r,n,X.z,null))}const i=e.children;for(let e=0,o=i.length;e<o;e++)it(i[e],t,n,s,r)}function ot(e,t,n,s){const r=e.opaque,i=e.transmissive,o=e.transparent;x.setupLightsView(n),!0===W&&Re.setGlobalState(O.clippingPlanes,n),s&&Se.viewport(A.copy(s)),r.length>0&<(r,t,n),i.length>0&<(i,t,n),o.length>0&<(o,t,n),Se.buffers.depth.setTest(!0),Se.buffers.depth.setMask(!0),Se.buffers.color.setMask(!0),Se.setPolygonOffset(!1)}function at(e,t,n,s){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;void 0===x.state.transmissionRenderTarget[s.id]&&(x.state.transmissionRenderTarget[s.id]=new re(1,1,{generateMipmaps:!0,type:xe.has("EXT_color_buffer_half_float")||xe.has("EXT_color_buffer_float")?c:ie,minFilter:oe,samples:4,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ae.workingColorSpace}));const r=x.state.transmissionRenderTarget[s.id],o=s.viewport||A;r.setSize(o.z*O.transmissionResolutionScale,o.w*O.transmissionResolutionScale);const a=O.getRenderTarget();O.setRenderTarget(r),O.getClearColor(_),F=O.getClearAlpha(),F<1&&O.setClearColor(16777215,.5),O.clear(),J&&Ue.render(n);const l=O.toneMapping;O.toneMapping=ee;const h=s.viewport;if(void 0!==s.viewport&&(s.viewport=void 0),x.setupLightsView(s),!0===W&&Re.setGlobalState(O.clippingPlanes,s),lt(e,n,s),Ee.updateMultisampleRenderTarget(r),Ee.updateRenderTargetMipmap(r),!1===xe.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let r=0,i=t.length;r<i;r++){const i=t[r],o=i.object,a=i.geometry,l=i.material,c=i.group;if(l.side===le&&o.layers.test(s.layers)){const t=l.side;l.side=ce,l.needsUpdate=!0,ct(o,n,s,a,l,c),l.side=t,l.needsUpdate=!0,e=!0}}!0===e&&(Ee.updateMultisampleRenderTarget(r),Ee.updateRenderTargetMipmap(r))}O.setRenderTarget(a),O.setClearColor(_,F),void 0!==h&&(s.viewport=h),O.toneMapping=l}function lt(e,t,n){const s=!0===t.isScene?t.overrideMaterial:null;for(let r=0,i=e.length;r<i;r++){const i=e[r],o=i.object,a=i.geometry,l=null===s?i.material:s,c=i.group;o.layers.test(n.layers)&&ct(o,t,n,a,l,c)}}function ct(e,t,n,s,r,i){e.onBeforeRender(O,t,n,s,r,i),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(O,t,n,s,e,i),!0===r.transparent&&r.side===le&&!1===r.forceSinglePass?(r.side=ce,r.needsUpdate=!0,O.renderBufferDirect(n,t,s,r,e,i),r.side=he,r.needsUpdate=!0,O.renderBufferDirect(n,t,s,r,e,i),r.side=le):O.renderBufferDirect(n,t,s,r,e,i),e.onAfterRender(O,t,n,s,r,i)}function ht(e,t,n){!0!==t.isScene&&(t=Z);const s=Me.get(e),r=x.state.lights,i=x.state.shadowsArray,o=r.state.version,a=Le.getParameters(e,r.state,i,t,n),l=Le.getProgramCacheKey(a);let c=s.programs;s.environment=e.isMeshStandardMaterial?t.environment:null,s.fog=t.fog,s.envMap=(e.isMeshStandardMaterial?De:Ce).get(e.envMap||s.environment),s.envMapRotation=null!==s.environment&&null===e.envMap?t.environmentRotation:e.envMapRotation,void 0===c&&(e.addEventListener("dispose",$e),c=new Map,s.programs=c);let h=c.get(l);if(void 0!==h){if(s.currentProgram===h&&s.lightsStateVersion===o)return dt(e,a),h}else a.uniforms=Le.getUniforms(e),e.onBeforeCompile(a,O),h=Le.acquireProgram(a,l),c.set(l,h),s.uniforms=a.uniforms;const u=s.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=Re.uniform),dt(e,a),s.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),s.lightsStateVersion=o,s.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotLightMatrix.value=r.state.spotLightMatrix,u.spotLightMap.value=r.state.spotLightMap,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix),s.currentProgram=h,s.uniformsList=null,h}function ut(e){if(null===e.uniformsList){const t=e.currentProgram.getUniforms();e.uniformsList=On.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function dt(e,t){const n=Me.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.batchingColor=t.batchingColor,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.instancingMorph=t.instancingMorph,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}rt.setAnimationLoop((function(e){tt&&tt(e)})),"undefined"!=typeof self&&rt.setContext(self),this.setAnimationLoop=function(e){tt=e,Qe.setAnimationLoop(e),null===e?rt.stop():rt.start()},Qe.addEventListener("sessionstart",nt),Qe.addEventListener("sessionend",st),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;null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===Qe.enabled&&!0===Qe.isPresenting&&(!0===Qe.cameraAutoUpdate&&Qe.updateCamera(t),t=Qe.getCamera()),!0===e.isScene&&e.onBeforeRender(O,e,t,D),x=Fe.get(e,S.length),x.init(t),S.push(x),Y.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),H.setFromProjectionMatrix(Y),K=this.localClippingEnabled,W=Re.init(this.clippingPlanes,K),b=_e.get(e,T.length),b.init(),T.push(b),O.autoInstancing&&We.init(),it(e,t,0,O.sortObjects,!0),O.autoInstancing&&We.build(b),b.finish(),!0===O.sortObjects&&b.sort(k,N),J=!1===Qe.enabled||!1===Qe.isPresenting||!1===Qe.hasDepthSensing(),J&&Ue.addToRenderList(b,e),this.info.render.frame++,!0===W&&Re.beginShadows();const n=x.state.shadowsArray;Be.render(n,e,t),!0===W&&Re.endShadows(),!0===this.info.autoReset&&this.info.reset();const s=b.opaque,r=b.transmissive;if(x.setupLights(),t.isArrayCamera){const n=t.cameras;if(r.length>0)for(let t=0,i=n.length;t<i;t++){at(s,r,e,n[t])}J&&Ue.render(e);for(let t=0,s=n.length;t<s;t++){const s=n[t];ot(b,e,s,s.viewport)}}else r.length>0&&at(s,r,e,t),J&&Ue.render(e),ot(b,e,t);null!==D&&0===C&&(Ee.updateMultisampleRenderTarget(D),Ee.updateRenderTargetMipmap(D)),!0===e.isScene&&e.onAfterRender(O,e,t),Ve.resetDefaultState(),P=-1,I=null,S.pop(),S.length>0?(x=S[S.length-1],!0===W&&Re.setGlobalState(O.clippingPlanes,x.state.camera)):x=null,T.pop(),b=T.length>0?T[T.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return D},this.setRenderTargetTextures=function(e,t,n){Me.get(e.texture).__webglTexture=t,Me.get(e.depthTexture).__webglTexture=n;const s=Me.get(e);s.__hasExternalTextures=!0,s.__autoAllocateDepthBuffer=void 0===n,s.__autoAllocateDepthBuffer||!0===xe.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),s.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(e,t){const n=Me.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t};const pt=Ke.createFramebuffer();this.setRenderTarget=function(e,t=0,n=0){D=e,E=t,C=n;let s=!0,r=null,i=!1,o=!1;if(e){const a=Me.get(e);if(void 0!==a.__useDefaultFramebuffer)Se.bindFramebuffer(Ke.FRAMEBUFFER,null),s=!1;else if(void 0===a.__webglFramebuffer)Ee.setupRenderTarget(e);else if(a.__hasExternalTextures)Ee.rebindTextures(e,Me.get(e.texture).__webglTexture,Me.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){const t=e.depthTexture;if(a.__boundDepthTexture!==t){if(null!==t&&Me.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");Ee.setupDepthRenderbuffer(e)}}const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(o=!0);const c=Me.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=Array.isArray(c[t])?c[t][n]:c[t],i=!0):r=e.samples>0&&!1===Ee.useMultisampledRTT(e)?Me.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,A.copy(e.viewport),L.copy(e.scissor),j=e.scissorTest}else A.copy(z).multiplyScalar(U).floor(),L.copy(G).multiplyScalar(U).floor(),j=V;0!==n&&(r=pt);if(Se.bindFramebuffer(Ke.FRAMEBUFFER,r)&&s&&Se.drawBuffers(e,r),Se.viewport(A),Se.scissor(L),Se.setScissorTest(j),i){const s=Me.get(e.texture);Ke.framebufferTexture2D(Ke.FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_CUBE_MAP_POSITIVE_X+t,s.__webglTexture,n)}else if(o){const s=Me.get(e.texture),r=t;Ke.framebufferTextureLayer(Ke.FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,s.__webglTexture,n,r)}else if(null!==e&&0!==n){const t=Me.get(e.texture);Ke.framebufferTexture2D(Ke.FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_2D,t.__webglTexture,n)}P=-1},this.readRenderTargetPixels=function(e,t,n,s,r,i,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=Me.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(a=a[o]),a){Se.bindFramebuffer(Ke.FRAMEBUFFER,a);try{const o=e.texture,a=o.format,l=o.type;if(!Te.textureFormatReadable(a))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!Te.textureTypeReadable(l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-s&&n>=0&&n<=e.height-r&&Ke.readPixels(t,n,s,r,Ge.convert(a),Ge.convert(l),i)}finally{const e=null!==D?Me.get(D).__webglFramebuffer:null;Se.bindFramebuffer(Ke.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,s,r,i,o){if(!e||!e.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=Me.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(a=a[o]),a){const o=e.texture,l=o.format,c=o.type;if(!Te.textureFormatReadable(l))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Te.textureTypeReadable(c))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(t>=0&&t<=e.width-s&&n>=0&&n<=e.height-r){Se.bindFramebuffer(Ke.FRAMEBUFFER,a);const e=Ke.createBuffer();Ke.bindBuffer(Ke.PIXEL_PACK_BUFFER,e),Ke.bufferData(Ke.PIXEL_PACK_BUFFER,i.byteLength,Ke.STREAM_READ),Ke.readPixels(t,n,s,r,Ge.convert(l),Ge.convert(c),0);const o=null!==D?Me.get(D).__webglFramebuffer:null;Se.bindFramebuffer(Ke.FRAMEBUFFER,o);const h=Ke.fenceSync(Ke.SYNC_GPU_COMMANDS_COMPLETE,0);return Ke.flush(),await Ln(Ke,h,4),Ke.bindBuffer(Ke.PIXEL_PACK_BUFFER,e),Ke.getBufferSubData(Ke.PIXEL_PACK_BUFFER,0,i),Ke.deleteBuffer(e),Ke.deleteSync(h),i}throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(e,t=null,n=0){!0!==e.isTexture&&(jn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),t=arguments[0]||null,e=arguments[1]);const s=Math.pow(2,-n),r=Math.floor(e.image.width*s),i=Math.floor(e.image.height*s),o=null!==t?t.x:0,a=null!==t?t.y:0;Ee.setTexture2D(e,0),Ke.copyTexSubImage2D(Ke.TEXTURE_2D,n,0,0,o,a,r,i),Se.unbindTexture()};const mt=Ke.createFramebuffer(),ft=Ke.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,s=null,r=0,i=null){let o,a,l,c,h,u,d,p,m;!0!==e.isTexture&&(jn("WebGLRenderer: copyTextureToTexture function signature has changed."),s=arguments[0]||null,e=arguments[1],t=arguments[2],i=arguments[3]||0,n=null),null===i&&(0!==r?(jn("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),i=r,r=0):i=0);const f=e.isCompressedTexture?e.mipmaps[i]:e.image;if(null!==n)o=n.max.x-n.min.x,a=n.max.y-n.min.y,l=n.isBox3?n.max.z-n.min.z:1,c=n.min.x,h=n.min.y,u=n.isBox3?n.min.z:0;else{const t=Math.pow(2,-r);o=Math.floor(f.width*t),a=Math.floor(f.height*t),l=e.isDataArrayTexture?f.depth:e.isData3DTexture?Math.floor(f.depth*t):1,c=0,h=0,u=0}null!==s?(d=s.x,p=s.y,m=s.z):(d=0,p=0,m=0);const g=Ge.convert(t.format),y=Ge.convert(t.type);let v;t.isData3DTexture?(Ee.setTexture3D(t,0),v=Ke.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(Ee.setTexture2DArray(t,0),v=Ke.TEXTURE_2D_ARRAY):(Ee.setTexture2D(t,0),v=Ke.TEXTURE_2D),Ke.pixelStorei(Ke.UNPACK_FLIP_Y_WEBGL,t.flipY),Ke.pixelStorei(Ke.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),Ke.pixelStorei(Ke.UNPACK_ALIGNMENT,t.unpackAlignment);const w=Ke.getParameter(Ke.UNPACK_ROW_LENGTH),b=Ke.getParameter(Ke.UNPACK_IMAGE_HEIGHT),x=Ke.getParameter(Ke.UNPACK_SKIP_PIXELS),T=Ke.getParameter(Ke.UNPACK_SKIP_ROWS),S=Ke.getParameter(Ke.UNPACK_SKIP_IMAGES);Ke.pixelStorei(Ke.UNPACK_ROW_LENGTH,f.width),Ke.pixelStorei(Ke.UNPACK_IMAGE_HEIGHT,f.height),Ke.pixelStorei(Ke.UNPACK_SKIP_PIXELS,c),Ke.pixelStorei(Ke.UNPACK_SKIP_ROWS,h),Ke.pixelStorei(Ke.UNPACK_SKIP_IMAGES,u);const O=e.isDataArrayTexture||e.isData3DTexture,M=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){const n=Me.get(e),s=Me.get(t),f=Me.get(n.__renderTarget),g=Me.get(s.__renderTarget);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,f.__webglFramebuffer),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n<l;n++)O&&(Ke.framebufferTextureLayer(Ke.READ_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Me.get(e).__webglTexture,r,u+n),Ke.framebufferTextureLayer(Ke.DRAW_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Me.get(t).__webglTexture,i,m+n)),Ke.blitFramebuffer(c,h,o,a,d,p,o,a,Ke.DEPTH_BUFFER_BIT,Ke.NEAREST);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,null),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,null)}else if(0!==r||e.isRenderTargetTexture||Me.has(e)){const n=Me.get(e),s=Me.get(t);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,mt),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,ft);for(let e=0;e<l;e++)O?Ke.framebufferTextureLayer(Ke.READ_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,n.__webglTexture,r,u+e):Ke.framebufferTexture2D(Ke.READ_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_2D,n.__webglTexture,r),M?Ke.framebufferTextureLayer(Ke.DRAW_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,s.__webglTexture,i,m+e):Ke.framebufferTexture2D(Ke.DRAW_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_2D,s.__webglTexture,i),0!==r?Ke.blitFramebuffer(c,h,o,a,d,p,o,a,Ke.COLOR_BUFFER_BIT,Ke.NEAREST):M?Ke.copyTexSubImage3D(v,i,d,p,m+e,c,h,o,a):Ke.copyTexSubImage2D(v,i,d,p,c,h,o,a);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,null),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,null)}else M?e.isDataTexture||e.isData3DTexture?Ke.texSubImage3D(v,i,d,p,m,o,a,l,g,y,f.data):t.isCompressedArrayTexture?Ke.compressedTexSubImage3D(v,i,d,p,m,o,a,l,g,f.data):Ke.texSubImage3D(v,i,d,p,m,o,a,l,g,y,f):e.isDataTexture?Ke.texSubImage2D(Ke.TEXTURE_2D,i,d,p,o,a,g,y,f.data):e.isCompressedTexture?Ke.compressedTexSubImage2D(Ke.TEXTURE_2D,i,d,p,f.width,f.height,g,f.data):Ke.texSubImage2D(Ke.TEXTURE_2D,i,d,p,o,a,g,y,f);Ke.pixelStorei(Ke.UNPACK_ROW_LENGTH,w),Ke.pixelStorei(Ke.UNPACK_IMAGE_HEIGHT,b),Ke.pixelStorei(Ke.UNPACK_SKIP_PIXELS,x),Ke.pixelStorei(Ke.UNPACK_SKIP_ROWS,T),Ke.pixelStorei(Ke.UNPACK_SKIP_IMAGES,S),0===i&&t.generateMipmaps&&Ke.generateMipmap(v),Se.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n=null,s=null,r=0){return!0!==e.isTexture&&(jn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),n=arguments[0]||null,s=arguments[1]||null,e=arguments[2],t=arguments[3],r=arguments[4]||0),jn('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(e,t,n,s,r)},this.initRenderTarget=function(e){void 0===Me.get(e).__webglFramebuffer&&Ee.setupRenderTarget(e)},this.initTexture=function(e){e.isCubeTexture?Ee.setTextureCube(e,0):e.isData3DTexture?Ee.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Ee.setTexture2DArray(e,0):Ee.setTexture2D(e,0),Se.unbindTexture()},this.resetState=function(){E=0,C=0,D=null,Se.reset(),Ve.reset()},void 0!==self.__THREE_DEVTOOLS__&&self.__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ue}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorspace=ae._getDrawingBufferColorSpace(e),t.unpackColorSpace=ae._getUnpackColorSpace()}}class $o{constructor(e){this.viewport=e,this.internalOptions={enableRenderCss2D:!1,enableRenderCss3D:!1},this.container=this._initContainer(),this.renderer=this._initRenderer(),this.rendererCSS2D=this._initRenderCSS2D(),this.rendererCSS3D=this._initRenderCSS3D(),this.interactiveContainer=this._initInteractiveContainer()}setInternalState(e,t){this.internalOptions[e]=t}_initContainer(){const e=document.createElement("div");return e.style.position="relative",e.style.width="100%",e.style.height="100%",e}_initRenderer(){const e=new Jo({powerPreference:"high-performance",antialias:!1,stencil:!1,depth:!1,preserveDrawingBuffer:!0,logarithmicDepthBuffer:!0});return e.autoClear=!1,e.info.autoReset=!1,e.localClippingEnabled=!0,e.sortObjects=!0,e.shadowMap.enabled=!0,e.shadowMap.type=xe,e.setPixelRatio(self.devicePixelRatio),this.container.appendChild(e.domElement),e}_initRenderCSS2D(){const e=new Go(this.viewport);return e.domElement.id="ssp_view_2DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initRenderCSS3D(){const e=new Xo(this.viewport);return e.domElement.id="ssp_view_3DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initInteractiveContainer(){return this.rendererCSS3D.domElement}}const ea=new y,ta=(e,t)=>{const s=ea.clone(),r=ea.clone(),i=ea.clone();s.makeRotationY(e),r.makeRotationX(t);const o=new n;return i.multiplyMatrices(s,r),o.setFromRotationMatrix(i),o},na=ta(-Math.PI/2,-Math.PI/4),sa=ta(Math.PI/2,-Math.PI/4),ra=ta(-Math.PI/4,-Math.PI/4),ia=ta(Math.PI/4,-Math.PI/4),oa=ta(1.25*Math.PI,-Math.PI/4),aa=ta(.75*Math.PI,-Math.PI/4),la={LEFT:new n(0,-Math.PI/2,0),RIGHT:new n(0,Math.PI/2,0),FRONT:new n(0,0,0),BACK:new n(0,Math.PI,0),TOP:new n(-Math.PI/2,0,0),BOTTOM:new n(Math.PI/2,0,0),FRONTTOP:new n(-Math.PI/4,0,0),BACKTOP:new n(Math.PI/4,Math.PI,0),LEFTTOP:new n(na.x,na.y,na.z),RIGHTTOP:new n(sa.x,sa.y,sa.z),LEFTFRONTTOP:new n(ra.x,ra.y,ra.z),RIGHTFRONTTOP:new n(ia.x,ia.y,ia.z),LEFTBACKTOP:new n(oa.x,oa.y,oa.z),RIGHTBACKTOP:new n(aa.x,aa.y,aa.z)},ca={LEFT:new Te(0,Math.PI/2,-Math.PI/2),RIGHT:new Te(0,Math.PI/2,Math.PI/2),FRONT:new Te(0,Math.PI/2,0),BACK:new Te(0,Math.PI/2,Math.PI),TOP:new Te(0,0,0),BOTTOM:new Te(0,Math.PI,0),FRONTTOP:new Te(0,Math.PI/4,0),BACKTOP:new Te(0,Math.PI/4,Math.PI),LEFTTOP:new Te(0,Math.PI/4,-Math.PI/2),RIGHTTOP:new Te(0,Math.PI/4,Math.PI/2),LEFTFRONTTOP:new Te(0,Math.PI/4,-Math.PI/4),RIGHTFRONTTOP:new Te(0,Math.PI/4,Math.PI/4),LEFTBACKTOP:new Te(0,Math.PI/4,-Math.PI/4*3),RIGHTBACKTOP:new Te(0,Math.PI/4,Math.PI/4*3)},ha=new t,ua=new n,da=new X(50,1,.01,5e4);da.position.set(500,1e3,500),da.lookAt(ha.set(0,0,0)),da.name="SspCamera";const pa=new Q(-500,500,500,-500,.01,5e4);pa.position.set(500,1e3,500),pa.lookAt(ha.set(0,0,0)),da.name="SspCamera";class ma{constructor(e){this.viewport=e,this.mainCamera=da.clone(),this.mainCamera.name="CameraControls",this.currentCamera=this.mainCamera,this.cameras={}}createCamera(e){const t=da.clone();return t.name=e,this.cameras[e]=t,t}removeCamera(e){return"fullFreeCamera"!==e&&(delete this.cameras[e],!0)}setCurrentCamera(e){this.currentCamera=this.viewport.camera=e,this.viewport.signals.cameraObjectChange.dispatch()}async setCamera(e,t,n){let s=da.clone();const r="orthographic"===e;if(r&&(s=pa.clone()),this.mainCamera.type!==s.type){const{controls:e}=this.viewport;this.mainCamera=e.camera=s,r?e.mouseButtons.wheel=Ys.ACTION.ZOOM:(e.mouseButtons.wheel=Ys.ACTION.DOLLY,e.zoomTo(1)),this.setCurrentCamera(s)}t&&await this.setCameraViewpoint(t,n)}getCameraViewpoint(){const{controls:e}=this.viewport;return{position:e.getPosition(new t),target:e.getTarget(new t),zoom:e.camera.zoom}}async setCameraViewpoint(e,t){const{controls:n}=this.viewport,s=e,r=e;if(s.target){const{position:e,target:r,zoom:i=n.camera.zoom}=s;await Promise.all([n.zoomTo(i,t),n.setLookAt(e.x,e.y,e.z,r.x,r.y,r.z,t)])}else if(r.rotation){const{position:e,rotation:s}=r,i=gr(e,s);await n.setLookAt(e.x,e.y,e.z,i.x,i.y,i.z,t)}}async flyTo(e,t="frontTop",s={}){const{enableTransition:r=!0}=s;if(Gr(t)){const e=t.toLocaleUpperCase();"CURRENT"===e?ua.copy(this.currentCamera.rotation):la[e]&&ua.copy(la[e])}else t instanceof n?ua.copy(t):Kr(t)&&ua.set(t.x,t.y,t.z);return this.setCameraViewpoint({position:e,rotation:ua},r)}async flyToObj(e,n="frontTop",s={}){var r;let{padding:a="30%"}=s;const{enableTransition:l=!0,viewpointSpace:c="world",minPadding:h=1}=s;e instanceof Ya&&(a=null!==(r=s.padding)&&void 0!==r?r:50);const u=e instanceof o?ir(e):e,d=u.getSize(ha);if(Gr(a)){const e=Math.max(d.x,d.y,d.z,h);a=(Hr(p=a)?p:p.includes("%")?.01*Number(p.split("%")[0]):isNaN(+p)?0:Number(p))*e}var p;ha.setScalar(a/2),u.max.add(ha),u.min.sub(ha);const{controls:m}=this.viewport,f=[];if(m.azimuthAngle=yr(m.azimuthAngle,0),"current"!==n){f.push(m.fitToBox(u,l));const s=ca[n.toLocaleUpperCase()];let r=s.theta,a=s.phi;if("local"===c&&e instanceof o){const n=new t(0,0,1),o=e.getWorldQuaternion(new i),l=new Te;n.applyQuaternion(o),l.setFromVector3(n),l.phi-=Math.PI/2,r=s.theta+l.theta,a=s.phi+l.phi}f.push(m.rotateTo(r,a,l))}else{const e=new Se;u.getBoundingSphere(e),f.push(m.fitToSphere(e,l))}await Promise.all(f)}surroundOnTarget(e,t={}){const{duration:n=3e3,startAngle:s=0,endAngle:r=360,onStart:i}=t,o=sr(e),{controls:a}=this.viewport;return a.setTarget(o.x,o.y,o.z),ri({radian:ar(s)},{radian:ar(r)},{duration:n},(({radian:e})=>{a.rotateAzimuthTo(e,!1)}),i)}surroundOnObject(e,t={}){const n=ir(e).getCenter(ha);return this.surroundOnTarget(n,t)}getObjectLabelPos(e,n="frontTop",r={}){if(e instanceof o&&(e=(new s).setFromObject(e)),e.isEmpty())return tr("target box is empty"),new t;const{extendScale:i=1.6,mode:a="scene"}=r;if("scene"===a){const t=e.getCenter(ha),s=e.max.clone().sub(e.min),r=Math.max(s.x,s.y,s.z),o=t.clone(),a=e=>{const t=(i-.5)*Math.abs(r),n=Math.max(t,this.viewport.camera.near);o.add(e.multiplyScalar(n))};let l;return l=Gr(n)?la[n.toLocaleUpperCase()]:rr(n),a(ha.set(0,0,1).applyEuler(l)),o}return"screen"===a?e.getCenter(ha).clone():new t}}const fa=new w;fa.setAttribute("position",new v(new Float32Array([-1,-1,3,-1,-1,3]),2)),fa.setAttribute("uv",new v(new Float32Array([0,0,2,0,0,2]),2)),fa.boundingSphere=new Se,fa.computeBoundingSphere=function(){};const ga=new Q;class ya{constructor(e){this._mesh=new W(fa,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,ga)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const va={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new y},viewMat:{value:new y},projViewMat:{value:new y},projectionMatrixInv:{value:new y},viewMatrixInv:{value:new y},cameraPos:{value:new t},resolution:{value:new g},biasAdjustment:{value:new g},time:{value:0},samples:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1},frame:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n}",fragmentShader:"\n #define SAMPLES 16\n #define FSAMPLES 16.0\nuniform sampler2D sceneDiffuse;\nuniform highp sampler2D sceneNormal;\nuniform highp sampler2D sceneDepth;\nuniform mat4 projectionMatrixInv;\nuniform mat4 viewMatrixInv;\nuniform mat4 projMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\nuniform vec3 cameraPos;\nuniform vec2 resolution;\nuniform vec2 biasAdjustment;\nuniform float time;\nuniform vec3[SAMPLES] samples;\nuniform float radius;\nuniform float distanceFalloff;\nuniform float near;\nuniform float far;\nuniform float frame;\nuniform bool logDepth;\nuniform bool ortho;\nuniform bool screenSpaceRadius;\nuniform sampler2D bluenoise;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n /*return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);*/\n #ifdef ORTHO\n\n return linearize_depth_ortho(d, nearZ, farZ);\n\n #else\n return linearize_depth(linDepth, nearZ, farZ);\n #endif\n }\n\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n\n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n\n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n\n vec3 ce = getWorldPos(c0, vUv).xyz;\n\n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n\n return normalize(cross(dpdx, dpdy));\n}\n\nmat3 makeRotationZ(float theta) {\n\tfloat c = cos(theta);\n\tfloat s = sin(theta);\n\treturn mat3(c, - s, 0,\n\t\t\ts, c, 0,\n\t\t\t0, 0, 1);\n }\n\nvoid main() {\n vec4 diffuse = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(sceneDepth, vUv).x;\n if (depth == 1.0) {\n gl_FragColor = vec4(vec3(1.0), 1.0);\n return;\n }\n vec3 worldPos = getWorldPos(depth, vUv);\n #ifdef HALFRES\n vec3 normal = texture2D(sceneNormal, vUv).rgb;\n #else\n vec3 normal = computeNormal(worldPos, vUv);\n #endif\n vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0);\n vec2 harmoniousNumbers = vec2(\n 1.618033988749895,\n 1.324717957244746\n );\n noise.rg += harmoniousNumbers * frame;\n noise.rg = fract(noise.rg);\n vec3 helperVec = vec3(0.0, 1.0, 0.0);\n if (dot(helperVec, normal) > 0.99) {\n helperVec = vec3(1.0, 0.0, 0.0);\n }\n vec3 tangent = normalize(cross(helperVec, normal));\n vec3 bitangent = cross(normal, tangent);\n mediump mat3 tbn = mat3(tangent, bitangent, normal) * makeRotationZ( noise.r * 3.1415962 * 2.0) ;\n\n mediump float occluded = 0.0;\n mediump float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n float bias = (min(\n 0.1,\n distanceFalloffToUse * 0.1\n ) / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse;\n bias = biasAdjustment.x + biasAdjustment.y * bias;\n mediump float offsetMove = noise.g;\n mediump float offsetMoveInv = 1.0 / FSAMPLES;\n float farTimesNear = far * near;\n float farMinusNear = far - near;\n \n for(int i = 0; i < SAMPLES; i++) {\n mediump vec3 sampleDirection = tbn * samples[i];\n\n float moveAmt = fract(offsetMove);\n offsetMove += offsetMoveInv;\n vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection;\n vec4 offset = projMat * vec4(samplePos, 1.0);\n offset.xyz /= offset.w;\n offset.xyz = offset.xyz * 0.5 + 0.5;\n \n if (all(greaterThan(offset.xyz * (1.0 - offset.xyz), vec3(0.0)))) {\n float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x;\n\n /*#ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n #ifdef ORTHO\n float distSample = near + farMinusNear * sampleDepth;\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif*/\n #ifdef ORTHO\n float distSample = near + sampleDepth * farMinusNear;\n #else\n #ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif\n \n #ifdef ORTHO\n float distWorld = near + offset.z * farMinusNear;\n #else\n float distWorld = (farTimesNear) / (far - offset.z * farMinusNear);\n #endif\n \n mediump float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld)));\n vec2 diff = gl_FragCoord.xy - floor(offset.xy * resolution);\n occluded += rangeCheck * float(distSample != distWorld) * float(sampleDepth != depth) * step(distSample + bias, distWorld) * step(\n 1.0,\n dot(diff, diff)\n );\n \n totalWeight ++;\n }\n }\n float occ = clamp(1.0 - occluded / (totalWeight == 0.0 ? 1.0 : totalWeight), 0.0, 1.0);\n gl_FragColor = vec4(occ, 0.5 + 0.5 * normal);\n}"},wa={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},transparencyDWFalse:{value:null},transparencyDWTrue:{value:null},transparencyDWTrueDepth:{value:null},transparencyAware:{value:!1},projMat:{value:new y},viewMat:{value:new y},projectionMatrixInv:{value:new y},viewMatrixInv:{value:new y},cameraPos:{value:new t},resolution:{value:new g},color:{value:new t(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0},aoTones:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform highp sampler2D downsampledDepth;\n uniform highp sampler2D transparencyDWFalse;\n uniform highp sampler2D transparencyDWTrue;\n uniform highp sampler2D transparencyDWTrueDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform vec2 resolution;\n uniform vec3 color;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform float intensity;\n uniform float renderMode;\n uniform float near;\n uniform float far;\n uniform float aoTones;\n uniform bool gammaCorrection;\n uniform bool logDepth;\n uniform bool ortho;\n uniform bool screenSpaceRadius;\n uniform bool fog;\n uniform bool fogExp;\n uniform bool colorMultiply;\n uniform bool transparencyAware;\n uniform float fogDensity;\n uniform float fogNear;\n uniform float fogFar;\n uniform float radius;\n uniform float distanceFalloff;\n uniform vec3 cameraPos;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n // if (logDepth) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n // }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n\n #include <common>\n #include <dithering_pars_fragment>\n void main() {\n //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0);\n vec4 sceneTexel = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(\n sceneDepth,\n vUv\n ).x;\n #ifdef HALFRES \n vec4 texel;\n if (depth == 1.0) {\n texel = vec4(0.0, 0.0, 0.0, 1.0);\n } else {\n vec3 worldPos = getWorldPos(depth, vUv);\n vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv);\n // vec4 texel = texture2D(tDiffuse, vUv);\n // Find closest depth;\n float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n for(float x = -1.0; x <= 1.0; x++) {\n for(float y = -1.0; y <= 1.0; y++) {\n vec2 offset = vec2(x, y);\n ivec2 p = ivec2(\n (vUv * resolution * 0.5) + offset\n );\n vec2 pUv = vec2(p) / (resolution * 0.5);\n float sampleDepth = texelFetch(downsampledDepth,p, 0).x;\n vec4 sampleInfo = texelFetch(tDiffuse, p, 0);\n vec3 normalSample = sampleInfo.gba * 2.0 - 1.0;\n vec3 worldPosSample = getWorldPos(sampleDepth, pUv);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0);\n float weight = rangeCheck;\n totalWeight += weight;\n texel += sampleInfo * weight;\n }\n }\n if (totalWeight == 0.0) {\n texel = texture2D(tDiffuse, vUv);\n } else {\n texel /= totalWeight;\n }\n }\n #else\n vec4 texel = texture2D(tDiffuse, vUv);\n #endif\n\n #ifdef LOGDEPTH\n texel.r = clamp(texel.r, 0.0, 1.0);\n if (texel.r == 0.0) {\n texel.r = 1.0;\n }\n #endif\n \n float finalAo = pow(texel.r, intensity);\n if (aoTones > 0.0) {\n finalAo = ceil(finalAo * aoTones) / aoTones;\n }\n float fogFactor;\n float fogDepth = distance(\n cameraPos,\n getWorldPos(depth, vUv)\n );\n if (fog) {\n if (fogExp) {\n fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n } else {\n fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n }\n }\n if (transparencyAware) {\n float transparencyDWOff = texture2D(transparencyDWFalse, vUv).a;\n float transparencyDWOn = texture2D(transparencyDWTrue, vUv).a;\n float adjustmentFactorOff = transparencyDWOff;\n float adjustmentFactorOn = (1.0 - transparencyDWOn) * (\n texture2D(transparencyDWTrueDepth, vUv).r == texture2D(sceneDepth, vUv).r ? 1.0 : 0.0\n );\n float adjustmentFactor = max(adjustmentFactorOff, adjustmentFactorOn);\n finalAo = mix(finalAo, 1.0, adjustmentFactor);\n }\n finalAo = mix(finalAo, 1.0, fogFactor);\n vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply));\n if (renderMode == 0.0) {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 1.0) {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 2.0) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (renderMode == 3.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n } else if (renderMode == 4.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n }\n #include <dithering_fragment>\n if (gammaCorrection) {\n gl_FragColor = sRGBTransferOETF(gl_FragColor);\n }\n }\n "},ba={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new y},viewMat:{value:new y},projectionMatrixInv:{value:new y},viewMatrixInv:{value:new y},cameraPos:{value:new t},resolution:{value:new g},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1.0);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform vec2 resolution;\n uniform float r;\n uniform float radius;\n uniform float worldRadius;\n uniform float index;\n uniform float near;\n uniform float far;\n uniform float distanceFalloff;\n uniform bool logDepth;\n uniform bool screenSpaceRadius;\n varying vec2 vUv;\n\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n highp float z_n = 2.0 * d - 1.0;\n return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return linearize_depth(linDepth, nearZ, farZ);\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n \n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n #include <common>\n #define NUM_SAMPLES 16\n uniform vec2 poissonDisk[NUM_SAMPLES];\n void main() {\n const float pi = 3.14159;\n vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec2 uv = vUv;\n vec4 data = texture2D(tDiffuse, vUv);\n float occlusion = data.r;\n float baseOcc = data.r;\n vec3 normal = data.gba * 2.0 - 1.0;\n float count = 1.0;\n float d = texture2D(sceneDepth, vUv).x;\n if (d == 1.0) {\n gl_FragColor = data;\n return;\n }\n vec3 worldPos = getWorldPos(d, vUv);\n float size = radius;\n float angle;\n if (index == 0.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2;\n } else if (index == 1.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2;\n } else if (index == 2.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2;\n } else {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2;\n }\n\n mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(d, vUv +\n vec2(worldRadius, 0.0) / resolution)\n ) : worldRadius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n\n float invDistance = (1.0 / distanceFalloffToUse);\n for(int i = 0; i < NUM_SAMPLES; i++) {\n vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size;\n vec4 dataSample = texture2D(tDiffuse, uv + offset);\n float occSample = dataSample.r;\n vec3 normalSample = dataSample.gba * 2.0 - 1.0;\n float dSample = texture2D(sceneDepth, uv + offset).x;\n vec3 worldPosSample = getWorldPos(dSample, uv + offset);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = float(dSample != 1.0) * exp(-1.0 * tangentPlaneDist * invDistance ) * max(dot(normal, normalSample), 0.0);\n occlusion += occSample * rangeCheck;\n count += rangeCheck;\n }\n if (count > 0.0) {\n occlusion /= count;\n }\n #ifdef LOGDEPTH\n occlusion = clamp(occlusion, 0.0, 1.0);\n if (occlusion == 0.0) {\n occlusion = 1.0;\n }\n #endif\n gl_FragColor = vec4(occlusion, 0.5 + 0.5 * normal);\n }\n "},xa={uniforms:{sceneDepth:{value:null},resolution:{value:new g},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new y},projectionMatrixInv:{value:new y},logDepth:{value:!1},ortho:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform highp sampler2D sceneDepth;\n uniform vec2 resolution;\n uniform float near;\n uniform float far;\n uniform bool logDepth;\n uniform bool ortho;\n uniform mat4 viewMatrixInv;\n uniform mat4 projectionMatrixInv;\n varying vec2 vUv;\n layout(location = 1) out vec4 gNormal;\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n if (logDepth && !ortho) {\n return getWorldPosLog(vec3(coord, depth));\n }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n void main() {\n vec2 uv = vUv - vec2(0.5) / resolution;\n vec2 pixelSize = vec2(1.0) / resolution;\n highp vec2[4] uvSamples;\n uvSamples[0] = uv;\n uvSamples[1] = uv + vec2(pixelSize.x, 0.0);\n uvSamples[2] = uv + vec2(0.0, pixelSize.y);\n uvSamples[3] = uv + pixelSize;\n float depth00 = texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = texture2D(sceneDepth, uvSamples[3]).r;\n float minDepth = min(min(depth00, depth10), min(depth01, depth11));\n float maxDepth = max(max(depth00, depth10), max(depth01, depth11));\n float targetDepth = minDepth;\n // Checkerboard pattern to avoid artifacts\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { \n targetDepth = maxDepth;\n }\n int chosenIndex = 0;\n float[4] samples;\n samples[0] = depth00;\n samples[1] = depth10;\n samples[2] = depth01;\n samples[3] = depth11;\n for(int i = 0; i < 4; ++i) {\n if (samples[i] == targetDepth) {\n chosenIndex = i;\n break;\n }\n }\n gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex]\n ), 0.0);\n }"};var Ta="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHni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ViUZPVzzCmQHW2oVIwZjAoFl6+meO/pD8teO1E+1y03mCpYfW9S8qhtH2GhlFlebPf4NbezVv9xbXKWz0xezRNQWqUqtYRTUbuzK7KTvjG4rQHfzBpVmK4wDLnSIwdSzTSk1fPNeY0WOpPZTLlvQ59xwgfFrb326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const Sa=(()=>parseInt(se.replace(/\D+/g,"")))()>=162?class extends re{constructor(e=1,t=1,n=1,s={}){super(e,t,{...s,count:n}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}:class extends re{constructor(e=1,t=1,n=1,s={}){super(e,t,s),this.isWebGLMultipleRenderTargets=!0;const r=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=r.clone(),this.texture[e].isRenderTargetTexture=!0}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 s=0,r=this.texture.length;s<r;s++)this.texture[s].image.width=e,this.texture[s].image.height=t,this.texture[s].image.depth=n;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}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()),this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}},Oa=Uint8Array.from(atob(Ta),(e=>e.charCodeAt(0)));function Ma(e,t,n){if(t.getQueryParameter(e,t.QUERY_RESULT_AVAILABLE)){const s=t.getQueryParameter(e,t.QUERY_RESULT)/1e6;n.lastTime=0===n.lastTime?s:n.timeRollingAverage*n.lastTime+(1-n.timeRollingAverage)*s}else setTimeout((()=>{Ma(e,t,n)}),1)}class Ea extends Ut{constructor(e,t,n=512,s=512){super(),this.width=n,this.height=s,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,aoTones:0,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,biasOffset:0,biasMultiplier:0,color:new u(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0,transparencyAware:!1,accumulate:!1},{set:(e,t,n)=>{const s=e[t];return e[t]=n,n.equals?n.equals(s)||this.firstFrame():s!==n&&this.firstFrame(),"aoSamples"===t&&s!==n&&this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),"denoiseSamples"===t&&s!==n&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),"halfRes"===t&&s!==n&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.setSize(this.width,this.height)),"depthAwareUpsampling"===t&&s!==n&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),"gammaCorrection"===t&&(this.autosetGamma=!1),"transparencyAware"===t&&s!==n&&(this.autoDetectTransparency=!1,this.configureTransparencyTarget()),!0}}),this.samples=[],this.samplesDenoise=[],this.autoDetectTransparency=!0,this.frames=0,this.lastViewMatrix=new y,this.lastProjectionMatrix=new y,this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.detectTransparency(),this.configureTransparencyTarget(),this.copyQuad=new ya(new Oe({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n gl_FragColor = texture2D(tDiffuse, vUv);\n }\n "})),this.writeTargetInternal=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1,format:Ee}),this.readTargetInternal=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1,format:Ee}),this.outputTargetInternal=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1}),this.accumulationRenderTarget=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1,format:Ee,type:c,stencilBuffer:!1,depthBuffer:!1,alpha:!0}),this.accumulationQuad=new ya(new Oe({uniforms:{frame:{value:0},tDiffuse:{value:null}},transparent:!0,opacity:1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float frame;\n varying vec2 vUv;\n void main() {\n vec4 color = texture2D(tDiffuse, vUv);\n gl_FragColor = vec4(color.rgb, 1.0 / (frame + 1.0));\n }\n "})),this.bluenoise=new Ce(Oa,128,128),this.bluenoise.colorSpace=De,this.bluenoise.wrapS=Pe,this.bluenoise.wrapT=Pe,this.bluenoise.minFilter=Ie,this.bluenoise.magFilter=Ie,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.timeRollingAverage=.99,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new g,this._c=new u}configureHalfResTargets(){this.firstFrame(),this.configuration.halfRes?(this.depthDownsampleTarget=new Sa(this.width/2,this.height/2,2),se<=161&&(this.depthDownsampleTarget.textures=this.depthDownsampleTarget.texture),this.depthDownsampleTarget.textures[0].format=Ae,this.depthDownsampleTarget.textures[0].type=Le,this.depthDownsampleTarget.textures[0].minFilter=Ie,this.depthDownsampleTarget.textures[0].magFilter=Ie,this.depthDownsampleTarget.textures[0].depthBuffer=!1,this.depthDownsampleTarget.textures[1].format=Ee,this.depthDownsampleTarget.textures[1].type=c,this.depthDownsampleTarget.textures[1].minFilter=Ie,this.depthDownsampleTarget.textures[1].magFilter=Ie,this.depthDownsampleTarget.textures[1].depthBuffer=!1,this.depthDownsampleQuad=new ya(new Oe(xa))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}detectTransparency(){if(this.autoDetectTransparency){let e=!1;this.scene.traverse((t=>{t.material&&t.material.transparent&&(e=!0)})),e&&(this.configuration.transparencyAware=!0)}}configureTransparencyTarget(){this.configuration.transparencyAware?(this.transparencyRenderTargetDWFalse=new re(this.width,this.height,{minFilter:Me,magFilter:Ie,type:c,format:Ee}),this.transparencyRenderTargetDWTrue=new re(this.width,this.height,{minFilter:Me,magFilter:Ie,type:c,format:Ee}),this.transparencyRenderTargetDWTrue.depthTexture=new je(this.width,this.height,ge),this.depthCopyPass=new ya(new Oe({uniforms:{depthTexture:{value:this.depthTexture}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D depthTexture;\n varying vec2 vUv;\n void main() {\n gl_FragDepth = texture2D(depthTexture, vUv).r + 0.00001;\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n "}))):(this.transparencyRenderTargetDWFalse&&(this.transparencyRenderTargetDWFalse.dispose(),this.transparencyRenderTargetDWFalse=null),this.transparencyRenderTargetDWTrue&&(this.transparencyRenderTargetDWTrue.dispose(),this.transparencyRenderTargetDWTrue=null),this.depthCopyPass&&(this.depthCopyPass.dispose(),this.depthCopyPass=null))}renderTransparency(e){const t=this.scene.background,n=e.getClearColor(new u),s=e.getClearAlpha(),r=new Map,i=e.autoClearDepth;this.scene.traverse((e=>{r.set(e,e.visible)})),this.scene.background=null,e.autoClearDepth=!1,e.setClearColor(new u(0,0,0),0),this.depthCopyPass.material.uniforms.depthTexture.value=this.depthTexture,e.setRenderTarget(this.transparencyRenderTargetDWFalse),this.scene.traverse((e=>{e.material&&(e.visible=r.get(e)&&(e.material.transparent&&!e.material.depthWrite&&!e.userData.treatAsOpaque||!!e.userData.cannotReceiveAO))})),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),e.setRenderTarget(this.transparencyRenderTargetDWTrue),this.scene.traverse((e=>{e.material&&(e.visible=r.get(e)&&e.material.transparent&&e.material.depthWrite&&!e.userData.treatAsOpaque)})),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),this.scene.traverse((e=>{e.visible=r.get(e)})),e.setClearColor(n,s),this.scene.background=t,e.autoClearDepth=i}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera)}configureAOPass(e=!1,t=!1){this.firstFrame(),this.samples=this.generateHemisphereSamples(this.configuration.aoSamples);const n={...va};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(n.fragmentShader="#define LOGDEPTH\n"+n.fragmentShader),t&&(n.fragmentShader="#define ORTHO\n"+n.fragmentShader),this.configuration.halfRes&&(n.fragmentShader="#define HALFRES\n"+n.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new Oe(n)):this.effectShaderQuad=new ya(new Oe(n))}configureDenoisePass(e=!1,t=!1){this.firstFrame(),this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const n={...ba};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(n.fragmentShader="#define LOGDEPTH\n"+n.fragmentShader),t&&(n.fragmentShader="#define ORTHO\n"+n.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new Oe(n)):this.poissonBlurQuad=new ya(new Oe(n))}configureEffectCompositer(e=!1,t=!1){this.firstFrame();const n={...wa};e&&(n.fragmentShader="#define LOGDEPTH\n"+n.fragmentShader),t&&(n.fragmentShader="#define ORTHO\n"+n.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(n.fragmentShader="#define HALFRES\n"+n.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new Oe(n)):this.effectCompositerQuad=new ya(new Oe(n))}generateHemisphereSamples(e){const n=[];for(let s=0;s<e;s++){const r=2.399963*s,i=Math.sqrt(s+.5)/Math.sqrt(e),o=i*Math.cos(r),a=i*Math.sin(r),l=Math.sqrt(1-(o*o+a*a));n.push(new t(o,a,l))}return n}generateDenoiseSamples(e,t){const n=2*Math.PI*t/e,s=1/e,r=s,i=[];let o=s,a=0;for(let t=0;t<e;t++)i.push(new g(Math.cos(a),Math.sin(a)).multiplyScalar(Math.pow(o,.75))),o+=r,a+=n;return i}setSize(e,t){this.firstFrame(),this.width=e,this.height=t;const n=this.configuration.halfRes?.5:1;this.writeTargetInternal.setSize(e*n,t*n),this.readTargetInternal.setSize(e*n,t*n),this.accumulationRenderTarget.setSize(e*n,t*n),this.configuration.halfRes&&this.depthDownsampleTarget.setSize(e*n,t*n),this.configuration.transparencyAware&&(this.transparencyRenderTargetDWFalse.setSize(e,t),this.transparencyRenderTargetDWTrue.setSize(e,t)),this.outputTargetInternal.setSize(e,t)}setDepthTexture(e){this.depthTexture=e}firstFrame(){this.needsFrame=!0}render(e,n,s){const r=e.xr.enabled;let i,o,a;e.xr.enabled=!1,e.capabilities.logarithmicDepthBuffer!==this.configuration.logarithmicDepthBuffer&&(this.configuration.logarithmicDepthBuffer=e.capabilities.logarithmicDepthBuffer,this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera)),this.detectTransparency(),n.texture.type===this.outputTargetInternal.texture.type&&n.texture.format===this.outputTargetInternal.texture.format||(this.outputTargetInternal.texture.type=n.texture.type,this.outputTargetInternal.texture.format=n.texture.format,this.outputTargetInternal.texture.needsUpdate=!0),this.camera.updateMatrixWorld(),this.lastViewMatrix.equals(this.camera.matrixWorldInverse)&&this.lastProjectionMatrix.equals(this.camera.projectionMatrix)&&this.configuration.accumulate&&!this.needsFrame?this.frame++:(this.configuration.accumulate&&(e.setRenderTarget(this.accumulationRenderTarget),e.clear(!0,!0,!0)),this.frame=0,this.needsFrame=!1),this.lastViewMatrix.copy(this.camera.matrixWorldInverse),this.lastProjectionMatrix.copy(this.camera.projectionMatrix),this.debugMode&&(i=e.getContext(),o=i.getExtension("EXT_disjoint_timer_query_webgl2"),null===o&&(console.error("EXT_disjoint_timer_query_webgl2 not available, disabling debug mode."),this.debugMode=!1)),this.debugMode&&(a=i.createQuery(),i.beginQuery(o.TIME_ELAPSED_EXT,a)),this.configuration.transparencyAware&&this.renderTransparency(e),this._r.set(this.width,this.height);let l=this.configuration.aoRadius;if(this.configuration.halfRes&&this.configuration.screenSpaceRadius&&(l*=.5),this.frame<1024/this.configuration.aoSamples){this.configuration.halfRes&&(e.setRenderTarget(this.depthDownsampleTarget),this.depthDownsampleQuad.material.uniforms.sceneDepth.value=this.depthTexture,this.depthDownsampleQuad.material.uniforms.resolution.value=this._r,this.depthDownsampleQuad.material.uniforms.near.value=this.camera.near,this.depthDownsampleQuad.material.uniforms.far.value=this.camera.far,this.depthDownsampleQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.depthDownsampleQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.depthDownsampleQuad.material.uniforms.logDepth.value=this.configuration.logarithmicDepthBuffer,this.depthDownsampleQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.depthDownsampleQuad.render(e)),this.effectShaderQuad.material.uniforms.sceneDiffuse.value=n.texture,this.effectShaderQuad.material.uniforms.sceneDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[0]:this.depthTexture,this.effectShaderQuad.material.uniforms.sceneNormal.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[1]:null,this.effectShaderQuad.material.uniforms.projMat.value=this.camera.projectionMatrix,this.effectShaderQuad.material.uniforms.viewMat.value=this.camera.matrixWorldInverse,this.effectShaderQuad.material.uniforms.projViewMat.value=this.camera.projectionMatrix.clone().multiply(this.camera.matrixWorldInverse.clone()),this.effectShaderQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.effectShaderQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.effectShaderQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new t),this.effectShaderQuad.material.uniforms.biasAdjustment.value=new g(this.configuration.biasOffset,this.configuration.biasMultiplier),this.effectShaderQuad.material.uniforms.resolution.value=this.configuration.halfRes?this._r.clone().multiplyScalar(.5).floor():this._r,this.effectShaderQuad.material.uniforms.time.value=performance.now()/1e3,this.effectShaderQuad.material.uniforms.samples.value=this.samples,this.effectShaderQuad.material.uniforms.bluenoise.value=this.bluenoise,this.effectShaderQuad.material.uniforms.radius.value=l,this.effectShaderQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.effectShaderQuad.material.uniforms.near.value=this.camera.near,this.effectShaderQuad.material.uniforms.far.value=this.camera.far,this.effectShaderQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.effectShaderQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.effectShaderQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,this.effectShaderQuad.material.uniforms.frame.value=this.frame,e.setRenderTarget(this.writeTargetInternal),this.effectShaderQuad.render(e);for(let n=0;n<this.configuration.denoiseIterations;n++)[this.writeTargetInternal,this.readTargetInternal]=[this.readTargetInternal,this.writeTargetInternal],this.poissonBlurQuad.material.uniforms.tDiffuse.value=this.readTargetInternal.texture,this.poissonBlurQuad.material.uniforms.sceneDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[0]:this.depthTexture,this.poissonBlurQuad.material.uniforms.projMat.value=this.camera.projectionMatrix,this.poissonBlurQuad.material.uniforms.viewMat.value=this.camera.matrixWorldInverse,this.poissonBlurQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.poissonBlurQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.poissonBlurQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new t),this.poissonBlurQuad.material.uniforms.resolution.value=this.configuration.halfRes?this._r.clone().multiplyScalar(.5).floor():this._r,this.poissonBlurQuad.material.uniforms.time.value=performance.now()/1e3,this.poissonBlurQuad.material.uniforms.blueNoise.value=this.bluenoise,this.poissonBlurQuad.material.uniforms.radius.value=this.configuration.denoiseRadius*(this.configuration.halfRes?.5:1),this.poissonBlurQuad.material.uniforms.worldRadius.value=l,this.poissonBlurQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.poissonBlurQuad.material.uniforms.index.value=n,this.poissonBlurQuad.material.uniforms.poissonDisk.value=this.samplesDenoise,this.poissonBlurQuad.material.uniforms.near.value=this.camera.near,this.poissonBlurQuad.material.uniforms.far.value=this.camera.far,this.poissonBlurQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.poissonBlurQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,e.setRenderTarget(this.writeTargetInternal),this.poissonBlurQuad.render(e);e.setRenderTarget(this.accumulationRenderTarget);const s=e.autoClear;e.autoClear=!1,this.accumulationQuad.material.uniforms.tDiffuse.value=this.writeTargetInternal.texture,this.accumulationQuad.material.uniforms.frame.value=this.frame,this.accumulationQuad.render(e),e.autoClear=s}this.configuration.transparencyAware&&(this.effectCompositerQuad.material.uniforms.transparencyDWFalse.value=this.transparencyRenderTargetDWFalse.texture,this.effectCompositerQuad.material.uniforms.transparencyDWTrue.value=this.transparencyRenderTargetDWTrue.texture,this.effectCompositerQuad.material.uniforms.transparencyDWTrueDepth.value=this.transparencyRenderTargetDWTrue.depthTexture,this.effectCompositerQuad.material.uniforms.transparencyAware.value=!0),this.effectCompositerQuad.material.uniforms.sceneDiffuse.value=n.texture,this.effectCompositerQuad.material.uniforms.sceneDepth.value=this.depthTexture,this.effectCompositerQuad.material.uniforms.aoTones.value=this.configuration.aoTones,this.effectCompositerQuad.material.uniforms.near.value=this.camera.near,this.effectCompositerQuad.material.uniforms.far.value=this.camera.far,this.effectCompositerQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.effectCompositerQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.effectCompositerQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.effectCompositerQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.effectCompositerQuad.material.uniforms.downsampledDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[0]:this.depthTexture,this.effectCompositerQuad.material.uniforms.resolution.value=this._r,this.effectCompositerQuad.material.uniforms.blueNoise.value=this.bluenoise,this.effectCompositerQuad.material.uniforms.intensity.value=this.configuration.intensity,this.effectCompositerQuad.material.uniforms.renderMode.value=this.configuration.renderMode,this.effectCompositerQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,this.effectCompositerQuad.material.uniforms.radius.value=l,this.effectCompositerQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.effectCompositerQuad.material.uniforms.gammaCorrection.value=this.autosetGamma?this.renderToScreen:this.configuration.gammaCorrection,this.effectCompositerQuad.material.uniforms.tDiffuse.value=this.accumulationRenderTarget.texture,this.effectCompositerQuad.material.uniforms.color.value=this._c.copy(this.configuration.color).convertSRGBToLinear(),this.effectCompositerQuad.material.uniforms.colorMultiply.value=this.configuration.colorMultiply,this.effectCompositerQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new t),this.effectCompositerQuad.material.uniforms.fog.value=!!this.scene.fog,this.scene.fog&&(this.scene.fog.isFog?(this.effectCompositerQuad.material.uniforms.fogExp.value=!1,this.effectCompositerQuad.material.uniforms.fogNear.value=this.scene.fog.near,this.effectCompositerQuad.material.uniforms.fogFar.value=this.scene.fog.far):this.scene.fog.isFogExp2?(this.effectCompositerQuad.material.uniforms.fogExp.value=!0,this.effectCompositerQuad.material.uniforms.fogDensity.value=this.scene.fog.density):console.error(`Unsupported fog type ${this.scene.fog.constructor.name} in SSAOPass.`)),e.setRenderTarget(this.outputTargetInternal),this.effectCompositerQuad.render(e),e.setRenderTarget(this.renderToScreen?null:s),this.copyQuad.material.uniforms.tDiffuse.value=this.outputTargetInternal.texture,this.copyQuad.render(e),this.debugMode&&(i.endQuery(o.TIME_ELAPSED_EXT),Ma(a,i,this)),e.xr.enabled=r}enableDebugMode(){this.debugMode=!0}disableDebugMode(){this.debugMode=!1}setDisplayMode(e){this.configuration.renderMode=["Combined","AO","No AO","Split","Split AO"].indexOf(e)}setQualityMode(e){"Performance"===e?(this.configuration.aoSamples=8,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Low"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Medium"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=12):"High"===e?(this.configuration.aoSamples=64,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=6):"Ultra"===e&&(this.configuration.aoSamples=64,this.configuration.denoiseSamples=16,this.configuration.denoiseRadius=6)}}Uint8Array.from(atob(Ta),(e=>e.charCodeAt(0)));const Ca="EffectPass";class Da{constructor(e,t,n){this.renderer=e,this.scene=t,this.camera=n,this.passesMap=new Map,this.effectsMap=new Map,this.effectsNeedsUpdate=!0,this.effectComposer=this._initEffectComposer(),this._initPasses(),this._initEffects()}updateEffectPass(){if(!this.effectsNeedsUpdate)return;this.effectsNeedsUpdate=!1;const{effectComposer:e}=this,t=e.passes.find((e=>e.name===Ca));t&&(e.removePass(t),t.dispose());const n=Array.from(this.effectsMap).filter((([,{enabled:e}])=>e)).map((([,{effect:e}])=>e)),s=new kt(this.camera,...n);s.name=Ca,s.enabled=!!n.length,this.passesMap.set(Da.CONSTANTS.effectPass,s),e.addPass(s)}updateCamera(e){const{effectComposer:t}=this;t.setMainCamera(e),this.effectsMap.forEach((({effect:t})=>t.mainCamera=e))}_initEffectComposer(){return new Nt(this.renderer,{multisampling:8,frameBufferType:c})}_initPasses(){const{effectComposer:e}=this,t=this._initRenderPass(),n=this._initSSAOPass(),s=this._initEffectPass();this.passesMap.set(Da.CONSTANTS.renderPass,t),this.passesMap.set(Da.CONSTANTS.ssaoPass,n),this.passesMap.set(Da.CONSTANTS.effectPass,s),e.addPass(t),e.addPass(n),e.addPass(s)}_initRenderPass(){return new zt(this.scene,this.camera)}_initSSAOPass(){const e=new Ea(this.scene,this.camera);return e.enabled=!1,e.configuration.gammaCorrection=!1,e}_initEffectPass(){const e=new kt(this.camera);return e.name=Ca,e}_initEffects(){const{CONSTANTS:e}=Da,t=this._initSMAAEffect(),n=this._initToneMappingEffect(),s=this._initOutlineEffect(),r=this._initBloomEffect();this.effectsMap.set(e.smaaEffect,{enabled:!0,effect:t}),this.effectsMap.set(e.toneMappingEffect,{enabled:!0,effect:n}),this.effectsMap.set(e.outlineEffect,{enabled:!1,effect:s}),this.effectsMap.set(e.bloomEffect,{enabled:!1,effect:r})}_initSMAAEffect(){return new Gt({preset:Vt.HIGH,edgeDetectionMode:Ht.COLOR})}_initToneMappingEffect(){return new Wt({mode:Kt.ACES_FILMIC,resolution:256,whitePoint:16,middleGrey:.6,minLuminance:.01,averageLuminance:.001,adaptationRate:1})}_initBloomEffect(){return new qt({blendFunction:Yt.ADD})}_initOutlineEffect(){return new Qt(this.scene,this.camera,{blendFunction:Yt.SCREEN})}}Da.CONSTANTS={renderPass:"renderPass",ssaoPass:"ssaoPass",effectPass:"effectPass",smaaEffect:"smaaEffect",outlineEffect:"outlineEffect",bloomEffect:"bloomEffect",toneMappingEffect:"toneMappingEffect"};const Pa=new class{constructor(){this.workerPool=new _n(4)}generate(e,t={}){const{workerPool:n}=this;return new Promise(((r,i)=>{if(e.attributes.position instanceof _e)throw new Error("GenerateMeshBVHWorker: GLBufferAttribute are not supported for the geometry attributes.");en(e);const o=e.index?e.index.array:null,a=e.attributes.position.array;n.postMessage({index:o,position:a,options:Object.assign(Object.assign({},t),{onProgress:null,includedProgressCallback:Boolean(t.onProgress),groups:[...e.groups]})}).then((n=>{const{data:o}=n;if(o)if(o.error)i(new Error(o.error));else if(o.serialized){const{serialized:n,position:i}=o,a=Fn.deserialize(n,e,{setIndex:!1}),l=Object.assign({setBoundingBox:!1},t);if(e.attributes.position instanceof Fe?e.attributes.position.data.array=i:e.attributes.position instanceof v&&(e.attributes.position.array=i),e.index)e.index.array=n.index;else{const t=new v(n.index,1,!1);e.setIndex(t)}l.setBoundingBox&&(e.boundingBox=a.getBoundingBox(new s)),r(a)}else t.onProgress&&t.onProgress(o.progress)}))}))}dispose(){this.workerPool.dispose()}};class Ia{constructor(e){this.viewport=e,this.cameraChanging=!1,this.timer=null,this.computedGeometriesUuid=new Map,this.generateMeshBVHWorker=Pa,this.viewport.signals.cameraChange.add((()=>{this.cameraChanging=!0,this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=window.setTimeout((()=>{this.cameraChanging=!1}),1e3)}))}computeModelsBoundsTree(e={}){const{type:t="slice",force:n=!1,frameSliceCount:s=500,workerCreator:r}=e,{meshOfModelList:i}=this.viewport.scener.intersectsList,o=(e,t=(async e=>e.geometry.computeBoundsTree({setBoundingBox:!1})))=>{!n&&this.computedGeometriesUuid.has(e.geometry.uuid)||t(e).then((()=>{this.computedGeometriesUuid.set(e.geometry.uuid,e.geometry.uuid)}))};return new Promise(((e,n)=>{if("block"===t)i.forEach((e=>o(e))),e();else if("slice"===t){let t=0,n=0;const r=()=>{if(t=requestAnimationFrame(r),!this.cameraChanging){for(const e of i.slice(n,n+s))o(e),n+=1;n>=i.length&&(cancelAnimationFrame(t),e())}};r()}else if("worker"===t)if(r){this.generateMeshBVHWorker.workerPool.setWorkerCreator(r);const t=e=>this.generateMeshBVHWorker.generate(e.geometry).then((t=>t&&(e.geometry.boundsTree=t)));Promise.allSettled(i.map((e=>o(e,t)))).then((()=>e()))}else n("请设置 workerCreator")}))}dispose(){this.computedGeometriesUuid.clear(),this.generateMeshBVHWorker.dispose()}}Ys.install({THREE:e});class Aa extends Ys{constructor(e){super(e.cameraManager.mainCamera,e.interactiveContainer),this.viewport=e,this.dollySpeed=.2,this.azimuthRotateSpeed=.5,this.polarRotateSpeed=.5,this.truckSpeed=1,this.draggingSmoothTime=.1}setOptions(e){Object.assign(this,e)}}class La{constructor(e){this.viewport=e,this.touchLongUpMaxInterval=800,this.isTouchLongPressAsTouchRightClick=!1,this.timer=null,this.touchStartEvent=null,this.touchstartTimes=[0,0],this.selectModel=null,this.selectPoi=null,this.options=e.options,this.signals=e.signals,this.container=e.container,this.dblClickMaxInterval=300,this.mouseDownTimes=[0,0],this.mouseDownEvent=null,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.addEventListeners()}_getPoiAndModel(){const{meshOfModelList:e,poiIconList:t}=this.viewport.scener.intersectsList;return[...e,...t]}_triggerSceneEventInAllObject(e,t,n=this.viewport.scener.intersectsList.getAll()){const s=this.viewport.getIntersects(t,n);if(0===s.length)return this.selectModel&&this.signals.modelHover.numListeners>0&&this.signals.modelUnHover.dispatch(this.selectModel),this.selectPoi&&this.signals.poiHover.numListeners>0&&this.signals.poiUnHover.dispatch(this.selectPoi),this.selectModel=null,this.selectPoi=null,void("click"===e&&this.signals.sceneClick.dispatch({type:e,event:t}));const r={object:null,type:null,point:null},i=[],a=[];function l(e){return e.parent?"Model"===e.parent.stype?e.parent:l(e.parent):void 0}s.forEach((e=>{if(e.object.parent instanceof Xa){const t=e.object.parent;r.object||(r.type="Poi",r.object=e.object,r.point=e.point);-1===i.findIndex((e=>e.poi.uuid===t.uuid))&&i.push({poi:t,sourceData:e})}else if(e.object instanceof o){const t=l(e.object);t&&(r.object||(r.type="Model",r.object=e.object,r.point=e.point),a.push({model:t,sourceData:e}))}})),"click"===e&&r.point&&this.signals.selectPosition.dispatch(r.point);const c=e.slice(0,1).toUpperCase()+e.slice(1),h=(t,n,s,r)=>{if(t){if("Hover"===c)return void((null==s?void 0:s.uuid)!==t.uuid&&(this.signals[n].dispatch(r),this[`select${t.stype}`]=t));const i=t[`on${c}`];i?i(t):t.isEventPropagation=!0,t.isEventPropagation&&(this.signals[n].dispatch(r),t.isEventPropagation=!1),"hover"!==e&&t.dispatchEvent({type:e})}},u=e=>{const{model:n}=e[0];h(n,`model${c}`,this.selectModel,{target:n,currentTarget:r.object,intersects:e,event:t})},d=e=>{const{poi:n}=e[0];h(n,`poi${c}`,this.selectPoi,{target:n,event:t})};if("Hover"===c){if(a.length>0){const[{model:e}]=a;this.selectModel&&this.selectModel.uuid!==e.uuid&&(this.signals.modelUnHover.dispatch(this.selectModel),this.selectModel=null)}if(i.length>0){const[{poi:e}]=i;this.selectPoi&&this.selectPoi.uuid!==e.uuid&&(this.signals.poiUnHover.dispatch(this.selectPoi),this.selectPoi=null)}}"Model"===r.type?u(a):"Poi"===r.type&&d(i)}handleMouseDown(e){this.mouseDownEvent=e,this.signals.mouseDown.dispatch(e),0===this.mouseDownTimes[0]?this.mouseDownTimes[0]=performance.now():0===this.mouseDownTimes[1]&&(this.mouseDownTimes[1]=performance.now()),this.container.addEventListener("mouseup",this.handleMouseUp,!1)}handleMouseMove(e){this.signals.mouseMove.dispatch(e),this.options.hoverEnabled&&this._triggerSceneEventInAllObject("hover",e,this._getPoiAndModel())}handleMouseUp(e){var t,n,s,r;this.signals.mouseUp.dispatch(e);const i=e.offsetX-(null!==(n=null===(t=this.mouseDownEvent)||void 0===t?void 0:t.offsetX)&&void 0!==n?n:0),o=e.offsetY-(null!==(r=null===(s=this.mouseDownEvent)||void 0===s?void 0:s.offsetY)&&void 0!==r?r:0);if(Math.abs(i)>2||Math.abs(o)>2)return this.mouseDownTimes[0]=0,void(this.mouseDownTimes[1]=0);setTimeout((()=>{0!==this.mouseDownTimes[0]&&0===this.mouseDownTimes[1]?0===e.button?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):2===e.button&&(this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e,this._getPoiAndModel())):0!==this.mouseDownTimes[0]&&0!==this.mouseDownTimes[1]&&(this.mouseDownTimes[1],this.mouseDownTimes[0],this.dblClickMaxInterval),this.mouseDownTimes[0]=0,this.mouseDownTimes[1]=0}),this.dblClickMaxInterval),this.container.removeEventListener("mouseup",this.handleMouseUp,!1)}handleDblClick(e){this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e,this._getPoiAndModel())}handleMouseWheel(e){this.signals.mouseWheel.dispatch(e)}handleTouchStart(e){0===this.touchstartTimes[0]?this.touchstartTimes[0]=performance.now():0===this.touchstartTimes[1]&&(this.touchstartTimes[1]=performance.now()),this.touchStartEvent=e,this.timer&&clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.isTouchLongPressAsTouchRightClick=!0}),this.touchLongUpMaxInterval),this.container.addEventListener("touchend",this.handleTouchEnd,{once:!0})}handleTouchEnd(e){var t,n,s,r;this.timer&&clearTimeout(this.timer);const i=()=>{this.isTouchLongPressAsTouchRightClick=!1,this.touchstartTimes[0]=0,this.touchstartTimes[1]=0},o=e.changedTouches[0].clientX-(null!==(n=null===(t=this.touchStartEvent)||void 0===t?void 0:t.changedTouches[0].clientX)&&void 0!==n?n:0),a=e.changedTouches[0].clientY-(null!==(r=null===(s=this.touchStartEvent)||void 0===s?void 0:s.changedTouches[0].clientY)&&void 0!==r?r:0);Math.abs(o)>2||Math.abs(a)>2?i():this.isTouchLongPressAsTouchRightClick?(i(),this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e,this._getPoiAndModel())):setTimeout((()=>{0!==this.touchstartTimes[0]&&0===this.touchstartTimes[1]?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):0!==this.touchstartTimes[0]&&0!==this.touchstartTimes[1]&&this.touchstartTimes[1]-this.touchstartTimes[0]<=this.dblClickMaxInterval&&(this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e,this._getPoiAndModel())),i()}),this.dblClickMaxInterval)}handleContextmenu(e){e.preventDefault()}handleKeyDown(e){this.signals.keyDown.dispatch(e)}handleKeyUp(e){this.signals.keyUp.dispatch(e)}addEventListeners(){this.container.addEventListener("mousedown",this.handleMouseDown,!1),this.container.addEventListener("mousemove",this.handleMouseMove,!1),this.container.addEventListener("dblclick",this.handleDblClick,!1),this.container.addEventListener("wheel",this.handleMouseWheel,{passive:!0}),this.container.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),this.container.addEventListener("contextmenu",this.handleContextmenu,!1),document.addEventListener("keydown",this.handleKeyDown,!1),document.addEventListener("keyup",this.handleKeyUp,!1)}removeEventListeners(){this.container.removeEventListener("mousedown",this.handleMouseDown),this.container.removeEventListener("mousemove",this.handleMouseMove),this.container.removeEventListener("dblclick",this.handleDblClick),this.container.removeEventListener("wheel",this.handleMouseWheel),this.container.removeEventListener("touchstart",this.handleTouchStart),this.container.removeEventListener("contextmenu",this.handleContextmenu),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}dispose(){this.removeEventListeners()}}class ja{constructor(e,t){this.scene=e,this.signals=t;const n=document.createElement("div");n.style.position="absolute",n.style.left="12px",n.style.bottom="12px",n.style.fontSize="12px",n.style.color="#fff",n.style.pointerEvents="none",this.container=n,this.state={objects:0,meshes:0,vertices:0,triangles:0,frametime:0}}addListeners(){const{scene:e,signals:t}=this;function n(e,t=!0){const n=document.createElement("span");return t&&(n.style.marginLeft="6px"),n.innerText=e,n}function s(){return document.createElement("br")}const r=n("0"),i=n("0"),o=n("0"),a=n("0"),l=n("0");this.container.appendChild(n("objects",!1)),this.container.appendChild(r),this.container.appendChild(s()),this.container.appendChild(n("meshes",!1)),this.container.appendChild(i),this.container.appendChild(s()),this.container.appendChild(n("vertices",!1)),this.container.appendChild(a),this.container.appendChild(s()),this.container.appendChild(n("triangles",!1)),this.container.appendChild(o),this.container.appendChild(s()),this.container.appendChild(n("frametime",!1)),this.container.appendChild(l),this.container.appendChild(s());const c=()=>{this.state.objects=0,this.state.meshes=0,this.state.vertices=0,this.state.triangles=0;for(let t=0,n=e.children.length;t<n;t++){e.children[t].traverse((e=>{this.state.objects++;const t=e.geometry;(e.isMesh||e.isPoints)&&t.attributes.position&&(this.state.meshes++,this.state.vertices+=t.attributes.position.count,e.isMesh&&(null!==t.index?this.state.triangles+=t.index.count/3:this.state.triangles+=t.attributes.position.count/3))}))}r.innerText=""+~~this.state.objects,i.innerText=""+~~this.state.meshes,a.innerText=""+~~this.state.vertices,o.innerText=""+~~this.state.triangles};t.objectAdded.add(c),t.objectRemoved.add(c),t.geometryChanged.add(c);t.sceneRendered.add((e=>{this.state.frametime=e,l.innerText=Number(e).toFixed(2)+" ms"}))}}class _a extends o{constructor(e,n,s){super(),this.camera=e,this.controls=s,this.isViewHelper=!0,this.animating=!1;const r=new u("#ff3653"),i=new u("#8adb00"),o=new u("#2c8fff"),a=new u("#000000"),l={},c=[],h=new Re,d=new g,p=new Q(-2,2,2,-2,0,4);p.position.set(0,0,2);const m=new Be(.8,.05,.05).translate(.4,0,0),f=new W(m,L(r)),y=new W(m,L(i)),v=new W(m,L(o));y.rotation.z=Math.PI/2,v.rotation.y=-Math.PI/2,this.add(f),this.add(v),this.add(y);const w=j(r),b=j(i),x=j(o),T=j(a),S=new Ue(w),O=new Ue(b),M=new Ue(x),E=new Ue(T),C=new Ue(T),D=new Ue(T);S.userData.type="right",O.userData.type="top",M.userData.type="front",E.userData.type="left",C.userData.type="bottom",D.userData.type="back",S.position.x=1,O.position.y=1,M.position.z=1,E.position.x=-1,E.scale.setScalar(.8),C.position.y=-1,C.scale.setScalar(.8),D.position.z=-1,D.scale.setScalar(.8),this.add(S),this.add(O),this.add(M),this.add(E),this.add(C),this.add(D),c.push(S),c.push(O),c.push(M),c.push(E),c.push(C),c.push(D);const P=new t,I=new te,A=128;function L(e){return new ke({color:e,toneMapped:!1})}function j(e,t){const{font:n="24px Arial",color:s="#000000",radius:r=16}=l,i=document.createElement("canvas");i.width=64,i.height=64;const o=i.getContext("2d");o.beginPath(),o.arc(32,32,r,0,2*Math.PI),o.closePath(),o.fillStyle=e.getStyle(),o.fill(),t&&(o.font=n,o.textAlign="center",o.fillStyle=s,o.fillText(t,32,41));const a=new Ne(i);return a.colorSpace=$,new ze({map:a,toneMapped:!1})}function _(){var e,t,n;null===(e=S.material.map)||void 0===e||e.dispose(),null===(t=O.material.map)||void 0===t||t.dispose(),null===(n=M.material.map)||void 0===n||n.dispose(),S.material.dispose(),O.material.dispose(),M.material.dispose(),S.material=j(r,l.labelX),O.material=j(i,l.labelY),M.material=j(o,l.labelZ)}this.setLabels=function(e,t,n){l.labelX=e,l.labelY=t,l.labelZ=n,_()},this.setLabelStyle=function(e,t,n){l.font=e,l.color=t,l.radius=n,_()},this.render=function(e){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld(),P.set(0,0,1),P.applyQuaternion(this.camera.quaternion),P.x>=0?(S.material.opacity=1,E.material.opacity=.5):(S.material.opacity=.5,E.material.opacity=1),P.y>=0?(O.material.opacity=1,C.material.opacity=.5):(O.material.opacity=.5,C.material.opacity=1),P.z>=0?(M.material.opacity=1,D.material.opacity=.5):(M.material.opacity=.5,D.material.opacity=1);const t=n.offsetWidth-A;e.clearDepth(),e.getViewport(I),e.setViewport(t,0,A,A),e.render(this,p),e.setViewport(I.x,I.y,I.z,I.w)},this.handleClick=async function(e){if(!0===this.animating)return!1;const t=n.getBoundingClientRect(),r=t.left+(n.offsetWidth-A),i=t.top+(n.offsetHeight-A);d.x=(e.clientX-r)/(t.right-r)*2-1,d.y=-(e.clientY-i)/(t.bottom-i)*2+1,h.setFromCamera(d,p);const o=h.intersectObjects(c);if(o.length>0){const e=o[0].object,{type:t}=e.userData,n=ca[t.toLocaleUpperCase()];return n&&(s.normalizeRotations(),this.animating=!0,await s.rotateTo(n.theta,n.phi,!0),this.animating=!1),!0}return!1},this.dispose=function(){var e,t,n,s,r,i;m.dispose(),f.material.dispose(),y.material.dispose(),v.material.dispose(),null===(e=S.material.map)||void 0===e||e.dispose(),null===(t=O.material.map)||void 0===t||t.dispose(),null===(n=M.material.map)||void 0===n||n.dispose(),null===(s=E.material.map)||void 0===s||s.dispose(),null===(r=C.material.map)||void 0===r||r.dispose(),null===(i=D.material.map)||void 0===i||i.dispose(),S.material.dispose(),O.material.dispose(),M.material.dispose(),E.material.dispose(),C.material.dispose(),D.material.dispose()}}}const Fa={needsUpdate:!1};let Ra=0,Ba=0;const Ua=e=>{e instanceof d&&e.dispose()};class ka{constructor(e,t,n){this.options=e,this.signals=t,this.cache=n,this.clock=new Ge,this.raycaster=new Re,this.sky=null,this.resizeObserver=new ResizeObserver(ei((()=>{this.signals.windowResize.dispatch()}))),this.options=e,this.state={useFreq:1,delta:0,enabledPostprocessing:!0,isPausedRender:!1,isDisposed:!1},this.scener=new Fo(this.signals,this.state),this.scene=this.scener.scene,this.cameraManager=new ma(this),this.camera=this.cameraManager.currentCamera,this.rendererManager=new $o(this),this.container=this.rendererManager.container,this.interactiveContainer=this.rendererManager.interactiveContainer,this.renderer=this.rendererManager.renderer,this.rendererCSS3D=this.rendererManager.rendererCSS3D,this.rendererCSS2D=this.rendererManager.rendererCSS2D,this.pmremGenerator=new Ve(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.effectManager=new Da(this.renderer,this.scene,this.camera),this.effectComposer=this.effectManager.effectComposer,this.bvh=new Ia(this),this.controls=new Aa(this),this.info=new ja(this.scene,this.signals),this.stats=new Zt,this.mixer=new He(this.scene),this.clipsSet=new Set,this.postUpdate=new Map,this.postRender=new Map,this._loop=0,this.viewHelper=new _a(this.camera,this.container,this.controls),this.viewHelper.setLabels("x","y","z"),this.eventHandler=new La(this),this.resizeObserver.observe(this.container),this._initInfo(),this._initStats(),this._signalsEventListenr(),this.animate(0)}_initInfo(){if(this.options.showInfo){this.info.addListeners();const{container:e}=this.info;e.style.zIndex="1",this.container.appendChild(e)}}_initStats(){if(this.options.showStats){const{dom:e}=this.stats;e.style.zIndex="1",this.container.appendChild(e),this.signals.sceneRendered.add((()=>{this.stats.update()}))}}setAutoInstancing(e){this.renderer.autoInstancing=e}setBloom(e={}){var t;const{enabled:n=!0,mipmapBlur:s=!0,radius:r=.85,intensity:i=3,threshold:o=1,smoothing:a=.01,scalar:l=2,opacity:c=1,selection:h=[]}=e,{effectManager:u}=this,d=u.effectsMap.get(Da.CONSTANTS.bloomEffect);d.enabled!==n&&(d.enabled=n,u.effectsNeedsUpdate=!0);const{effect:p}=d;p.intensity=i;const{mipmapBlurPass:m,renderTarget:f}=p;m.enabled=s,m.radius=r;const g=p.uniforms.get("map");g&&(g.value=s?m.texture:f.texture),p.luminanceMaterial.threshold=o,p.luminanceMaterial.smoothing=a,p.blendMode.opacity.value=c,null===(t=p.luminanceMaterial.userData.bloomSelection)||void 0===t||t.forEach((e=>{e.toneMapped=!0,e.userData.prevEmissive&&(e.emissive.copy(e.userData.prevEmissive),Reflect.deleteProperty(e.userData,"prevEmissive"))})),p.luminanceMaterial.userData.bloomSelection=new Set,n&&h.forEach((e=>{e.traverse((e=>{e instanceof W&&e.material.color&&!p.luminanceMaterial.userData.bloomSelection.has(e.material)&&(e.material.toneMapped=!1,e.material.userData.prevEmissive=e.material.emissive.clone(),e.material.emissive.copy(e.material.color),e.material.emissive.multiplyScalar(l),p.luminanceMaterial.userData.bloomSelection.add(e.material))}))})),this.triggerRender()}setSSAO(e={}){const{enabled:t=!0,aoRadius:n=3,aoSamples:s=16,denoiseSamples:r=4,denoiseRadius:i=12,distanceFalloff:o=1,intensity:a=3,color:l="#333"}=e,{effectManager:c}=this,h=c.passesMap.get(Da.CONSTANTS.ssaoPass);h.enabled=t,h.configuration.aoRadius=n,h.configuration.aoSamples=s,h.configuration.denoiseSamples=r,h.configuration.denoiseRadius=i,h.configuration.distanceFalloff=o,h.configuration.intensity=a,l&&(h.configuration.color=new u(l)),this.triggerRender()}setColorSpace(e){this.renderer.outputColorSpace="sRGB"===e?$:de,this.signals.sceneChanged.dispatch()}setToneMapping(e={}){const{type:t="ACESFilmic",exposure:n=.8}=e,s=this.effectManager.effectsMap.get(Da.CONSTANTS.toneMappingEffect),r={Reinhard:Kt.REINHARD2_ADAPTIVE,Cineon:Kt.OPTIMIZED_CINEON,ACESFilmic:Kt.ACES_FILMIC,AGX:Kt.AGX},i={None:ee,Reinhard:qe,Cineon:Ye,ACESFilmic:Qe,AGX:Xe},o="None"!==t;s.enabled!==o&&(s.enabled=o,this.effectManager.effectsNeedsUpdate=!0),o&&(s.effect.mode=r[t]),this.renderer.toneMappingExposure=n,this.renderer.toneMapping=i[t],this.signals.sceneChanged.dispatch()}async setSphereSkyBackground(e){const t=await wr({file:e});Ua(this.scene.background),this.scene.background=t,this.signals.backgroundChanged.dispatch()}async setSkyBackground(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]){const n=await wr({path:e,file:t});Ua(this.scene.background),this.scene.background=n,this.signals.backgroundChanged.dispatch()}setBackgroundColor(e){Ua(this.scene.background),this.scene.background=new u(e),this.signals.backgroundChanged.dispatch()}setBackgroundColorAlpha(e,t){Ua(this.scene.background),this.scene.background=null,this.renderer.setClearColor(new u(e),t),this.signals.backgroundChanged.dispatch()}async setBackgroundImage(e){const t=await wr({file:e});t.mapping=We,this.scene.background=t,this.signals.backgroundChanged.dispatch()}setSky(e={}){const{enabled:n=!0,position:s={x:0,y:0,z:0},scalar:r=45e4,turbidity:i=10,rayleigh:o=3,elevation:a=2,azimuth:l=180}=e;if(!n)return void this.closeSky();this.sky||(this.sky=new Jt,this.scene.add(this.sky)),this.sky.name="sky",this.sky.position.set(s.x,s.y,s.z),this.sky.scale.setScalar(r);const c=this.sky.material.uniforms;c.turbidity.value=i,c.rayleigh.value=o,c.mieCoefficient.value=.005,c.mieDirectionalG.value=.7;const h=new t,u=ar(90-a),d=ar(l);return h.setFromSphericalCoords(1,u,d),c.sunPosition.value.copy(h),this.signals.objectAdded.dispatch(),this.sky}closeSky(){return!!this.sky&&(this.sky.removeFromParent(),this.sky=null,this.signals.objectRemoved.dispatch(),!0)}screenshot(){return new Promise((e=>{this.renderer.domElement.toBlob((t=>{e(t)}))}))}async setEnvironment(e){if(e){const{path:t,file:n,background:s}=e,r=await wr({path:t,file:n});this.scene.environment=r instanceof Ke?this.pmremGenerator.fromCubemap(r).texture:this.pmremGenerator.fromEquirectangular(r).texture,s&&(Ua(this.scene.background),this.scene.background=r)}else this.scene.environment=this.pmremGenerator.fromScene(new Xt,.04).texture;return this.signals.sceneChanged.dispatch(),this.scene.environment}playModelAnimation(e,t){let n;if(t instanceof A?n=t:Hr(t)?n=e.animations[t]:qr(t)&&(n=e.animations.find(t)),!n)return;const s=go(this.mixer.clipAction(n,e));return s.play(),this.clipsSet.add(n),s}stopModelAnimation(e,t){var n;let s;t instanceof A?s=t:Hr(t)?s=e.animations[t]:qr(t)&&(s=e.animations.find(t)),s&&(null===(n=this.mixer.existingAction(s,e))||void 0===n||n.stop(),this.mixer.uncacheAction(s,e),this.clipsSet.delete(s))}async render(e){return await(null==e?void 0:e()),new Promise((e=>{this.signals.sceneRendered.addOnce(e),this.triggerRender()}))}triggerRender(e=1){this.state.useFreq=e}async setPauseRender(e=!0){if(this.state.isPausedRender=e,!1===e)return this.render()}_passesObserver(){this.effectManager.updateEffectPass()}autoRender(){if((!(this.state.useFreq<=0)||Fa.needsUpdate)&&(this.state.useFreq>0&&this.state.useFreq--,Fa.needsUpdate&&(Fa.needsUpdate=!1),!this.state.isPausedRender)){if(Ra=performance.now(),this.signals.beforeRender.dispatch(),this._passesObserver(),this.renderer.info.reset(),this.state.enabledPostprocessing?this.effectComposer.render(this.state.delta):(this.renderer.clear(),this.renderer.render(this.scene,this.camera)),this.rendererCSS2D&&this.rendererManager.internalOptions.enableRenderCss2D&&this.rendererCSS2D.render(this.cache.classified.PoiNode,this.camera),this.rendererCSS3D&&this.rendererManager.internalOptions.enableRenderCss3D&&this.rendererCSS3D.render(this.cache.classified.PoiNode,this.camera),this.options.showViewHelper){const e=this.renderer.clippingPlanes;this.renderer.clippingPlanes=[],this.viewHelper.render(this.renderer),this.renderer.clippingPlanes=e}this.postRender.forEach((e=>e())),Ba=performance.now(),this.signals.sceneRendered.dispatch(Ba-Ra)}}animate(e){this._loop=requestAnimationFrame((e=>{this.animate(e)}));const t=this.clock.getDelta();this.state.delta=t,this.clipsSet.size>0&&(this.mixer.update(t),this.signals.modelAnimation.dispatch()),jt.update(e)&&this.signals.tweenUpdate.dispatch(),this.controls.update(t)&&this.signals.cameraChange.dispatch(),this.postUpdate.forEach((t=>t(e))),this.autoRender(),this.signals.getSceneInfo.dispatch(this.info.state)}getOffsetByPosition(e){const n=new t(e.x,e.y,e.z).project(this.camera),s=this.renderer.domElement.getBoundingClientRect();return{left:s.left+s.width/2*(n.x+1),top:s.top+s.height/2*(1-n.y)}}getPositionByOffset(e,n=.1,s){const r=new t(0,0,0),i=new t(0,0,0),o=this.renderer.domElement.getBoundingClientRect();return i.set(e.offsetX/o.width*2-1,-e.offsetY/o.height*2+1,n),i.unproject(this.camera),i.sub(this.camera.position).normalize(),r.copy(this.camera.position).add(i.multiplyScalar(null!=s?s:this.camera.position.length())),r}getIntersects(e,t=this.scener.intersectsList.getAll(),n={}){const{isFilterHideObject:s=!0}=n,r=this.container.getBoundingClientRect();let i={offsetX:0,offsetY:0};if(e instanceof MouseEvent)i={offsetX:e.clientX-r.left,offsetY:e.clientY-r.top};else if(e instanceof TouchEvent){const t=e.changedTouches[0];i={offsetX:t.clientX-r.left,offsetY:t.clientY-r.top}}else i=e;const o=new g;o.set(i.offsetX/r.width*2-1,-i.offsetY/r.height*2+1),this.raycaster.setFromCamera(o,this.camera);let a=[];return a=Wr(t)?this.raycaster.intersectObjects(t,!0):this.raycaster.intersectObject(t,!0),s&&(a=a.filter((({object:e})=>hr(e)))),a=a.filter((({point:e,object:t})=>{const n=this.renderer.clippingPlanes.every((t=>t.distanceToPoint(e)>0));let s=!0;const r=t;return r.material&&ti(r.material,(t=>{s&&Wr(t.clippingPlanes)&&(s=t.clippingPlanes.every((t=>t.distanceToPoint(e)>0)))})),n&&s})),a}rayClash(e=this.camera.position,n=new t(0,-1,0),s=this.scener.intersectsList.meshOfModelList){const r=new Re;return r.set(e,n),Wr(s)?r.intersectObjects(s,!0):r.intersectObject(s,!0)}clearSignals(){for(const e in this.signals)this.signals[e].removeAll()}dispose(){cancelAnimationFrame(this._loop),this.bvh.dispose(),this.mixer.stopAllAction(),this.clipsSet.forEach((e=>{this.mixer.uncacheAction(e),this.mixer.uncacheClip(e)})),this.mixer.uncacheRoot(this.scene),this.clipsSet.clear(),this.controls.dispose(),this.viewHelper.dispose(),jt.removeAll(),this.clearSignals(),this.scene.clear(),this.pmremGenerator.dispose(),this.effectComposer.dispose(),this.renderer.dispose(),this.rendererCSS2D.domElement.remove(),this.rendererCSS3D.domElement.remove(),this.renderer.forceContextLoss(),this.container.remove(),this.state.isDisposed=!0,this.eventHandler.dispose(),this.resizeObserver.disconnect()}_signalsEventListenr(){const e=()=>{const{clientWidth:e,clientHeight:t}=this.container;this.effectManager.updateCamera(this.camera),this.viewHelper.camera=this.camera,this.camera instanceof X&&(this.camera.aspect=e/t),this.camera instanceof Q&&(this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2),this.camera.updateProjectionMatrix(),this.effectComposer.setSize(e,t),this.rendererCSS3D&&this.rendererCSS3D.setSize(e,t),this.rendererCSS2D&&this.rendererCSS2D.setSize(e,t),this.triggerRender()};requestAnimationFrame((()=>{e()})),this.signals.windowResize.add(e),this.signals.cameraObjectChange.add(e);const t=()=>this.triggerRender();this.signals.sceneChanged.add(t),this.signals.backgroundChanged.add(t),this.signals.objectAdded.add(t),this.signals.objectRemoved.add(t),this.signals.objectChanged.add(t),this.signals.materialAdded.add(t),this.signals.materialRemoved.add(t),this.signals.materialChanged.add(t),this.signals.geometryChanged.add(t),this.signals.cameraChange.add(t),this.signals.tweenUpdate.add(t),this.signals.modelAnimation.add(t);this.signals.outlineChange.add((e=>{const{objects:t,options:n}=e,{color:s,hideColor:r,edgeThickness:i,edgeStrength:o}=Object.assign(Object.assign({},{color:16777215,hideColor:10066329,edgeThickness:3,edgeStrength:10}),n),{effectManager:a}=this,l=a.effectsMap.get(Da.CONSTANTS.outlineEffect),c=t.length>0;l.enabled!==c&&(l.enabled=c,a.effectsNeedsUpdate=!0);const{effect:h}=l,{uniforms:u}=h,d=[];t.forEach((e=>{e.traverse((e=>{e instanceof W&&d.push(e)}))})),h.selection.set(d),h.blur=i>0,h.blurPass.kernelSize=i;const p=u.get("visibleEdgeColor"),m=u.get("hiddenEdgeColor"),f=u.get("edgeStrength");p&&p.value.set(s),m&&m.value.set(r),f&&(f.value=o),this.triggerRender()}))}}const Na={onLoad:null,onClick:null,onDblClick:null,onRightClick:null};class za extends o{constructor(e={id:Xr()}){var t,n,s,r,i,o,a,l,c;super(),this.isEventPropagation=!1;const{id:h,name:u="",level:d={max:null,min:null},visible:p=!0,position:m={x:0,y:0,z:0},rotation:f={x:0,y:0,z:0},scale:g={x:1,y:1,z:1},userData:y={},onLoad:v,onClick:w,onDblClick:b,onRightClick:x}=Object.assign(Object.assign({},Na),e);if(void 0===h)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=h,this.name=u,this.stype="BaseObject3D",this.level=d,this.visible=null==p||p,this.handleHide=!p,this.position.set(null!==(t=m.x)&&void 0!==t?t:0,null!==(n=m.y)&&void 0!==n?n:0,null!==(s=m.z)&&void 0!==s?s:0),this.rotation.set(null!==(r=f.x)&&void 0!==r?r:0,null!==(i=f.y)&&void 0!==i?i:0,null!==(o=f.z)&&void 0!==o?o:0),this.scale.set(null!==(a=g.x)&&void 0!==a?a:1,null!==(l=g.y)&&void 0!==l?l:1,null!==(c=g.z)&&void 0!==c?c:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=y,this.onLoad=(null==v?void 0:v.bind(this))||null,this.onClick=(null==w?void 0:w.bind(this))||null,this.onDblClick=(null==b?void 0:b.bind(this))||null,this.onRightClick=(null==x?void 0:x.bind(this))||null}eventPropagation(){this.isEventPropagation=!0}show(){this.visible=!0,this.handleHide=!1,Fa.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Fa.needsUpdate=!0}setMove(e,t,n,s){return ri(this.position,sr(e),t,n,s)}setRotate(e,t,n,s){return ri(this.rotation,rr(e),t,n,s)}setScale(e,t,n,s){return ri(this.scale,sr(e),t,n,s)}getBoundingBox(){return ir(this)}getSpaceAttribute(e=!0){return lr(this,e)}syncSpaceAttribute(e,t=!0){cr(this,e,t)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class Ga extends W{constructor(e={id:Xr()},t,n){var s,r,i,o,a,l,c,h,u;super(t,n);const{id:d,name:p="",level:m={max:null,min:null},visible:f=!0,position:g={x:0,y:0,z:0},rotation:y={x:0,y:0,z:0},scale:v={x:1,y:1,z:1},userData:w={}}=e;if(void 0===d)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=d,this.name=p,this.stype="BaseMesh",this.level=m,this.visible=null==f||f,this.handleHide=!f,this.position.set(null!==(s=g.x)&&void 0!==s?s:0,null!==(r=g.y)&&void 0!==r?r:0,null!==(i=g.z)&&void 0!==i?i:0),this.rotation.set(null!==(o=y.x)&&void 0!==o?o:0,null!==(a=y.y)&&void 0!==a?a:0,null!==(l=y.z)&&void 0!==l?l:0),this.scale.set(null!==(c=v.x)&&void 0!==c?c:1,null!==(h=v.y)&&void 0!==h?h:1,null!==(u=v.z)&&void 0!==u?u:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=w}show(){this.visible=!0,this.handleHide=!1,Fa.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Fa.needsUpdate=!0}setMove(e,t,n,s){return ri(this.position,sr(e),t,n,s)}setRotate(e,t,n,s){return ri(this.rotation,rr(e),t,n,s)}setScale(e,t,n,s){return ri(this.scale,sr(e),t,n,s)}getBoundingBox(){return ir(this)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class Va extends za{constructor(e){super(e),this.stype="Group"}showAllChild(){this.children.forEach((e=>{e instanceof za&&e.show()}))}hideAllChild(){this.children.forEach((e=>{e instanceof za&&e.hide()}))}}class Ha extends za{constructor(e){super(e),this.stype="PluginObject"}}function Wa(e){return"2d"===e||"2D"===e}function Ka(e){return"2.5d"===e||"2.5D"===e}function qa(e){return"3D"===e||"3d"===e}class Ya extends za{constructor(e){super(e),this.stype="PoiNode";const{type:t="2D",element:n=document.createElement("div"),elementAutoDisplay:s=!0,occlude:r=!1,occludeThrottle:i=0,onChange:o,scaleFixed:a=null}=null!=e?e:{};this.elementType=t,this.element=n,this.elementAutoDisplay=s,this.occlude=r,this.occludeThrottle=i,this.onChange=o,this.scaleFixed=a,this.create(t)}create(e){Wa(e)?this._create2D():Ka(e)?this._create2DHalf():qa(e)&&this._create3D()}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,r=new t,i=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(i),r.add(i),new s(n,r)}_create2D(){this.add(new Ro(this.element))}_create2DHalf(){this.add(new qo(this.element))}_create3D(){this.add(new Ko(this.element))}}class Qa extends za{constructor(e){super(e),this.stype="Model";const{format:t}=null!=e?e:{};this.formatType=t}setEnvMap(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"],n={}){wr({path:e,file:t}).then((e=>{this.traverse((t=>{if(t instanceof W&&t.material instanceof Y){const{reflectivity:s=.5}=n;t.material.envMap=e,t.material.envMapIntensity=s,Fa.needsUpdate=!0}}))}))}copy(e,t){return super.copy(e,t),this.formatType=e.formatType,this}}class Xa extends za{constructor(e){super(e),this.stype="Poi";const{type:t,scaleFixed:n=null}=null!=e?e:{};this.iconType=t,this.scaleFixed=n,this.renderOrder=11}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,r=new t,i=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(i),r.add(i),new s(n,r)}copy(e,t=!1){var n,s;return super.copy(e,t),this.icon=null===(n=e.icon)||void 0===n?void 0:n.clone(),this.text=null===(s=e.text)||void 0===s?void 0:s.clone(),this.clear(),this.icon&&this.add(this.icon),this.text&&this.add(this.text),this.iconType=e.iconType,this.scaleFixed=e.scaleFixed,this}}const Za={position:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}};class Ja extends Ue{constructor(e,t){super(e),this.stype="Icon";const{position:n,scale:s}=Object.assign(Object.assign({},Za),t);this.position.set(n.x,n.y,n.z),this.scale.set(s.x,s.y,s.z),this.renderOrder=1}}class $a extends Ga{constructor(e){const{radius:t=10,color:n=16777215,opacity:s=1,gradient:r}=null!=e?e:{};super(e),this.params=e,this.material=new Y,this.updateGeometry(t),this.updateMaterialOpacity(s),this.updateMaterial(n,r),this.stype="Point"}updateGeometry(e){this.geometry.dispose(),this.geometry=new Ze(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:s,gradient:r}=e,i=this.material;t&&(i.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==s&&(this.geometry=new Ze(s,32,32)),r&&(i.map=br(r)),this.params&&Object.assign(this.params,e),i.needsUpdate=!0,Fa.needsUpdate=!0}}class el extends $a{constructor(e){super(e),this.graphs=[],this.stype="Node",e&&(this.graphs=e.graphs)}}class tl extends Ga{constructor(e){const{radius:t=50,color:n=16777215,opacity:s=1,gradient:r}=null!=e?e:{};super(e),this.params=e,this.material=new Y({side:le}),this.updateGeometry(t),this.updateMaterialOpacity(s),this.updateMaterial(n,r),this.stype="Circle",this.rotation.set(-Math.PI/2,0,0)}updateGeometry(e){this.geometry.dispose(),this.geometry=new Je(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:s,gradient:r}=e,i=this.material;t&&(i.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==s&&this.updateGeometry(s),r&&(i.map=br(r)),this.params&&Object.assign(this.params,e),i.needsUpdate=!0,Fa.needsUpdate=!0}}const nl=new Map;class sl extends Ga{constructor(e){const{start:t,end:n,imgUrl:s,color:r,transparent:i=!1,passable:o=0}=null!=e?e:{};super(e,void 0,void 0),this.params=e,this.geometry=new w,this.material=new Y({side:le}),this.passable=0,this.stype="Link",r&&this.material.color.set(r),this.material.transparent=i,this.material.depthWrite=!i,this.material.flatShading=!0;const a=this.createTexture(s);a&&(this.material.map=a),t&&n&&this.updateGeometry({start:t,end:n}),this.passable=o,this.addEventListener("removed",(()=>{this.geometry.dispose(),this.material.dispose(),null==a||a.dispose()}))}updateGeometry(e){this.params&&Object.assign(this.params,e),this.computeVertex();const t=this.material.map;t&&this.computeTextureRepeat(t)}computeVertex(){if(!this.params)return;const{start:e,end:n,width:s}=this.params,r=sr(e),i=sr(n),o=(new t).addVectors(r,i).divideScalar(2),a=r.distanceTo(i),l=new y;this.geometry.dispose(),this.geometry=new $e(s,a),this.geometry.rotateX(-Math.PI/2),l.lookAt(r,o,this.up),this.position.copy(o),this.quaternion.setFromRotationMatrix(l)}computeTextureRepeat(e){if(this.params&&e.image){const{start:t,end:n,width:s}=this.params,r=sr(t),i=sr(n),o=r.distanceTo(i)/(s*(e.image.height/e.image.width));e.repeat.set(-1,o)}}createTexture(e){if(e){const t=nl.get(e);if(t){return t.clone()}const n=Pr.load(e,(()=>{n.wrapS=Pe,n.wrapT=Pe,n.anisotropy=16,this.computeTextureRepeat(n),nl.set(e,n),Fa.needsUpdate=!0}));return n}}}class rl extends za{constructor(e){super(e),this.nodes=[],this.links=[],this.linksImgAnimation=null,this.info={type:"line",nodes:[],id:Xr()},this.stype="Topology";const{type:t="line"}=null!=e?e:{};this.topologyType=t,e&&(this.info=e),this.create(),this.addEventListener("removed",(()=>{var e;null===(e=this.linksImgAnimation)||void 0===e||e.stop(),this.linksImgAnimation=null}))}create(){var e;const{nodes:t,renderLink:n=!0,linkWidth:s=20,linkColor:r=65280,renderNode:i=!0,nodeColor:o=255,nodeRadius:a=s/2,imgUrl:l,animation:c=!1}=this.info,h=[];for(const c of t){const t=this.createNode(Object.assign(Object.assign({},c),{radius:a,color:o}));if(!1===i&&t.hide(),this.nodes.push(t),!l&&n&&!i){const n=il(r,null===(e=t.graphs[0])||void 0===e?void 0:e.passable);this.createCircle({id:`${c.id}_circle`,name:`${c.name||c.id}_circle`,position:c.position,radius:s/2,color:n})}if(n)for(let e=0;e<c.graphs.length;e++){const{linkInfo:t,targetNodeId:n,passable:i}=c.graphs[e],{id:o,name:a}=t,u=this.info.nodes.find((e=>e.id===n));if(!h.includes(o)&&u){h.push(o);const e=il(r,i),t=this.createLink({id:o,name:a,start:c.position,end:u.position,width:s,color:e,imgUrl:l,transparent:!!l,passable:i,userData:{startNodeId:c.id,endNodeId:u.id}});this.links.push(t)}}}this.updateLinksImgAnimation({imgUrl:l,animation:c})}createNode(e){const t=new el(Object.assign({},e));return this.add(t),t}createCircle(e){const t=new tl(Object.assign(Object.assign({},e),{rotation:{x:Math.PI/2,y:0,z:0}}));return this.add(t),t}createLink(e){const t=new sl(Object.assign({},e));return this.add(t),t}updateLinksImgAnimation(e={}){var t;const{imgUrl:n,animation:s}=e;if(n&&!this.linksImgAnimation){let e=null;Vr(s)&&s?e={repeat:!0,duration:500}:Kr(s)&&Hr(s.duration)&&s.duration>0&&(e=Object.assign({repeat:!0},s)),e&&ri(new g(0,0),new g(0,-1),e,(e=>{this.links.forEach((t=>{var n;null===(n=t.material.map)||void 0===n||n.offset.copy(e)}))}),(e=>{var t;null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=e})).catch((()=>{}))}n||(null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=null)}resetNodes(e){const{linkWidth:t=20,renderNode:n=!0,nodeColor:s=255,nodeRadius:r=t/2}=this.info,i=[...this.info.nodes];this.info.nodes=[...e];const o=[];for(let t=0;t<i.length;t++){const n=e.find((e=>e.id===i[t].id));n&&sr(n.position).equals(sr(i[t].position))||o.push(i[t])}for(let e=0;e<o.length;e++){const t=this.nodes.findIndex((t=>o[e].id===t.sid));this.remove(this.nodes[t]),this.nodes.splice(t,1)}const a=[];for(let t=0;t<e.length;t++){const n=i.find((n=>n.id===e[t].id));n&&sr(n.position).equals(sr(e[t].position))||a.push(e[t])}for(let e=0;e<a.length;e++){const t=this.createNode(Object.assign(Object.assign({},a[e]),{radius:r,color:s}));!1===n&&t.hide(),this.nodes.push(t)}this.updateLinks()}updateLinks(){const{renderLink:e=!0,linkWidth:t=20,linkColor:n=65280,imgUrl:s,animation:r=!1}=this.info,i=new Map,o=new Map;this.info.nodes.forEach((e=>{o.set(e.id,e)}));const a=[...this.links];for(const r of this.info.nodes)if(e)for(let e=0;e<r.graphs.length;e++){const{linkInfo:l,targetNodeId:c,passable:h}=r.graphs[e],{id:u,name:d}=l,p=o.get(c);if(!i.has(u)&&p){i.set(u,u);const e=il(n,h),o={id:u,name:d,start:r.position,end:p.position,width:t,color:e,imgUrl:s,transparent:!!s,passable:h},l=a.find((e=>e.sid===u));if(l)l.updateGeometry({start:o.start,end:o.end}),e&&l.material.color.set(e),l.passable=h;else{const e=this.createLink(o);this.links.push(e)}}}a.forEach((e=>{if(!1===i.has(e.sid)){const t=this.links.findIndex((t=>t===e));t>-1&&(e.removeFromParent(),this.links.splice(t,1))}})),this.updateLinksImgAnimation({imgUrl:s,animation:r})}getLength(){let e=0;for(let n=1;n<this.nodes.length;n++)e+=this.nodes[n].getWorldPosition(new t).distanceTo(this.nodes[n-1].getWorldPosition(new t));return e}}function il(e,t){return Wr(e)?e[t]?e[t]:e[0]:e}class ol extends Ga{constructor(e){const{points:t=[],width:n=20,color:s=16777215,opacity:r=1,gradient:i}=null!=e?e:{};super(e),this.params=e,this.material=new Y({side:le,flatShading:!0}),this.updateGeometry(t,n),this.updateMaterialOpacity(r),this.updateMaterial(s,i),this.stype="Line"}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}updateGeometry(e,n){if(e.length<2)return;const s=n/2;let r=[],i=[];for(let n=0;n<e.length-1;n++){const o=sr(e[n]),a=sr(e[n+1]),l=new t,c=new t,h=new y,u=this.up.clone();h.lookAt(o,a,this.up),u.applyMatrix4(h),l.subVectors(a,o),l.normalize(),c.crossVectors(l,u);const d=new t(c.x*s,c.y*s,c.z*s),p=new t(-c.x*s,-c.y*s,-c.z*s),m=new t;m.addVectors(o,d);const f=new t;f.addVectors(o,p);const g=new t;g.addVectors(a,p);const v=new t;v.addVectors(a,d),r=[...r,m.x,m.y,m.z,f.x,f.y,f.z,g.x,g.y,g.z,g.x,g.y,g.z,v.x,v.y,v.z,m.x,m.y,m.z],i=[...i,0,0,1,0,1,1,1,1,0,1,0,0]}this.geometry.setAttribute("position",new b(r,3)),this.geometry.setAttribute("uv",new b(i,2))}setOptions(e){var t,n,s,r;const{color:i,opacity:o,points:a,width:l,gradient:c}=e,h=this.material;i&&(h.color=new u(i)),void 0!==o&&this.updateMaterialOpacity(o),c&&(h.map=br(c)),a&&void 0!==l?this.updateGeometry(a,l):a?this.updateGeometry(a,null!==(n=null===(t=this.params)||void 0===t?void 0:t.width)&&void 0!==n?n:20):void 0!==l&&this.updateGeometry(null!==(r=null===(s=this.params)||void 0===s?void 0:s.points)&&void 0!==r?r:[],l),this.params&&Object.assign(this.params,e),h.needsUpdate=!0,Fa.needsUpdate=!0}}class al extends Ga{constructor(e){const{yHeight:t=1,points:n=[],depth:s=0,color:r=16777215,opacity:i=1,gradient:o}=null!=e?e:{};super(e),this.params=e,this.material=new Y,this.updateGeometry(n,s),this.updateMaterialOpacity(i),this.updateMaterial(r,o),this.stype="Polygon",this.position.set(0,t,0),this.rotation.set(-Math.PI/2,0,0)}updateGeometry(e,t){this.geometry.dispose();const n=[];for(let t=0;t<e.length;t++)n.push(new g(e[t].x,-e[t].z));this.geometry=n.length>2?new et(new tt(n),{depth:t,bevelEnabled:!1}):new w}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}setOptions(e){var t,n,s,r;const{color:i,opacity:o,yHeight:a,points:l,gradient:c,depth:h}=e,d=this.material;i&&(d.color=new u(i)),void 0!==o&&this.updateMaterialOpacity(o),c&&(d.map=br(c)),void 0!==a&&this.position.set(0,a,0),l&&void 0!==h?this.updateGeometry(l,h):l?this.updateGeometry(l,null!==(n=null===(t=this.params)||void 0===t?void 0:t.depth)&&void 0!==n?n:0):void 0!==h&&this.updateGeometry(null!==(r=null===(s=this.params)||void 0===s?void 0:s.points)&&void 0!==r?r:[],h),this.params&&Object.assign(this.params,e),d.needsUpdate=!0,Fa.needsUpdate=!0}}class ll extends za{constructor(e){super(e),this.stype="Canvas3D",this.create(e)}create(e){const{points:t=[],lines:n=[],polygons:s=[],circles:r=[]}=null!=e?e:{};for(let e=0;e<t.length;e++)this.createPoint(t[e]);for(let e=0;e<n.length;e++)this.createLine(n[e]);for(let e=0;e<s.length;e++)this.createPolygon(s[e]);for(let e=0;e<r.length;e++)this.createCircle(r[e])}createPoint(e){const t=new $a(e);return this.add(t),Fa.needsUpdate=!0,t}getPoint(e){return this.getChildForType("Point",e)}removePoint(e){const t=this.getPoint(e);t&&this.remove(t),Fa.needsUpdate=!0}createLine(e){const t=new ol(e);return this.add(t),Fa.needsUpdate=!0,t}getLine(e){return this.getChildForType("Line",e)}removeLine(e){const t=this.getLine(e);t&&this.remove(t),Fa.needsUpdate=!0}createPolygon(e){const t=new al(e);return this.add(t),Fa.needsUpdate=!0,t}getPolygon(e){return this.getChildForType("Polygon",e)}removePolygon(e){const t=this.getPolygon(e);t&&this.remove(t),Fa.needsUpdate=!0}createCircle(e){const t=new tl(e);return this.add(t),Fa.needsUpdate=!0,t}getCircle(e){return this.getChildForType("Circle",e)}removeCircle(e){const t=this.getCircle(e);t&&this.remove(t),Fa.needsUpdate=!0}getChildForType(e,t){for(let n=0;n<this.children.length;n++)if(this.children[n].stype===e&&this.children[n].sid===t)return this.children[n];return null}}class cl extends Ga{constructor(e,t,n){super(e,t,n),this.stype="Ground"}}var hl=Object.defineProperty,ul=(e,t,n)=>(((e,t,n)=>{t in e?hl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const dl=[new g,new g,new g,new g],pl=[new t,new t,new t,new t],ml=[new y,new y,new y,new y],fl=[new i,new i,new i,new i];function gl(e,t,n){return t.clone().sub(e).lengthSq()<=n**2}function yl(e,t,n){return t.clone().sub(e).lengthSq()<=n**2*Math.max(e.lengthSq(),t.length())}function vl(e,t){const{epsilon:n=0,relativeEpsilon:s}=t||{},r=0===n?(e,t)=>e.equals(t):s?yl:gl,i=e.length/3,o=new Array(i),[a,l]=pl;for(let t=0;t<i;t++){a.fromArray(e,3*t),o[t]=t;for(let s=0;s<t;s++)if(l.fromArray(e,3*s),r(a,l,n)){o[t]=s;break}}return o}function wl(e){const t={},n=e.length;for(let s=0;s<n;s++){const n=e[s];(t[n]||(t[n]=[])).push(s)}return t}function bl(e,t,n,s=!1){const r=e.slice(),i=!s;let o=!0;return Object.values(n).forEach((n=>{if(o=n.length>1,i&&!o)return;const a=new Array(t);if(a.fill(0),n.forEach((function(n){const s=n*t;for(let n=0;n<t;n++)a[n]+=e[s+n]})),o){const e=1/n.length;for(let n=0;n<t;n++)a[n]*=e}if(s){let e=Math.hypot(...a);0===e&&(e=1);const n=1/e;for(let e=0;e<t;e++)a[e]*=n}n.forEach((function(e){const n=e*t;for(let e=0;e<t;e++)r[n+e]=a[e]}))})),r}function xl(e){const t=new Array(e);for(let n=0;n<e;n++)t[n]=n;return t}class Tl extends o{constructor(e){super(),ul(this,"isFaceNode",!0),ul(this,"triangle"),ul(this,"faceIndex"),ul(this,"geometry"),ul(this,"a"),ul(this,"b"),ul(this,"c"),ul(this,"d"),ul(this,"order"),ul(this,"real"),ul(this,"branchFace"),ul(this,"_root",null),ul(this,"depth",0),ul(this,"childrenFaceIndexes"),ul(this,"_equalVertexIndexMap"),ul(this,"_equalVertexIndexes",null),Object.assign(this,e);const{geometry:n,a:s,b:r,c:i,real:o,faceIndex:a}=e,{attributes:{position:l}}=n,c=(new t).fromBufferAttribute(l,s),h=(new t).fromBufferAttribute(l,r),u=(new t).fromBufferAttribute(l,i);this.triangle=new it(c,h,u),o||(this.real={a:s,b:r,c:i}),null==a&&(this.faceIndex=Math.trunc(i/3))}get root(){return this._root||(this._root=this.parent?this.parent.root:this)}set root(e){this._root=e,this.depth=e?e.depth+1:0}isAncestor(e){let{parent:t}=this;for(;t;){if(t.faceIndex===e)return!0;t=t.parent}return!1}getAdjacentFaces(e,t){const{geometry:n,a:s,b:r,c:i,d:o,faceIndex:a,root:l,parent:c}=this,h=pl[3],u={indexes:n.index.array,a:s,b:r,c:i,faceIndex:a,isAncestor:e=>this.isAncestor(e),onlyC:null!=o,equalVertexIndexMap:t};return e&&(u.positions=n.attributes.position.array,u.getParentMidpoint=t=>e[t].triangle.getMidpoint(h),u.getDepth=t=>e[t].depth),l.branchFace&&(u.maxCount=1/0),function(e,t={}){const{indexes:n,a:s,b:r,c:i,equalVertexIndexMap:o,faceIndex:a,onlyC:l,maxCount:c=(l?2:3),positions:h,getParentMidpoint:u,isAncestor:d,getDepth:p}=e,m=n.length/3,f=a??Math.trunc(m/2),g=o?e=>o[e]:e=>e,y=g(s),v=g(r),w=g(i),b=[];let x=()=>0,T=0;null!=a&&p&&(T=p(a)+1,x=e=>T-p(e));const[S,O,M]=pl;let E=()=>null;function C(e){const s=3*e,r=n.slice(s,s+3);if(t[e]){const t=x(e);return t>0?null:t<0?{posIndexes:r,consumed:!0}:E(e,r)}return{posIndexes:r}}h&&(S.set(0,0,0),[s,r,i].forEach((e=>{M.fromArray(h,3*e),S.add(M)})),S.multiplyScalar(1/3),E=(e,t)=>{O.set(0,0,0);for(let e=0;e<t.length;e++)M.fromArray(h,3*e),O.add(M);return O.multiplyScalar(1/3),O.distanceToSquared(S)<O.distanceToSquared(u(e))?{posIndexes:t,consumed:!0}:null});const D=l?function(e){const t=C(e);if(!t)return!1;const{posIndexes:n,consumed:o}=t,a=n.map(g),l=a.indexOf(w);if(-1===l)return!1;const h=a.indexOf(y),u=a.indexOf(v),d=-1===h,p=-1===u;if(d+p!==1)return!1;switch(!0){case d:{const t=[l,u];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:i,b:r,c:a.c,d:s,order:t,real:a,faceIndex:e,consumed:o});break}case p:{const t=[h,l];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:s,b:i,c:a.c,d:r,order:t,real:a,faceIndex:e,consumed:o});break}}return b.length===c}:function(e){const t=C(e);if(!t)return!1;const{posIndexes:n,consumed:o}=t,a=n.map(g),l=a.indexOf(y),h=a.indexOf(v),u=a.indexOf(w),d=-1===l,p=-1===h;if(d+p+(-1===u)!==1)return!1;switch(!0){case d:{const t=[u,h];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:i,b:r,c:a.c,d:s,order:t,real:a,faceIndex:e,consumed:o});break}case p:{const t=[l,u];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:s,b:i,c:a.c,d:r,order:t,real:a,faceIndex:e,consumed:o});break}default:{const t=[h,l];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:r,b:s,c:a.c,d:i,order:t,real:a,faceIndex:e,consumed:o})}}return b.length===c};let P=f,I=f,A=!0,L=!0;for(;A||L;){if(A){if(P--,P<0&&(P+=m),P===I)break;if(P===f)A=!1;else if(!d(P)&&D(P))break}if(L){if(I++,I===m&&(I=0),P===I)break;if(I===f)L=!1;else if(!d(I)&&D(I))break}}return b}(u,e)}removeFromParent(){return super.removeFromParent(),this.root=null,this}removeFace(e,t=this.root.childrenFaceIndexes){if(!t)return!1;const n=t[e];if(!n)return!1;const s=[];return n.traverse((e=>{s.push(e)})),s.forEach((e=>{delete t[e.faceIndex],e.removeFromParent()})),!0}removeChildFaces(e){return this.children.slice().forEach((t=>{const n=t.faceIndex;this.removeFace(n,e)})),this}clear(){return this.removeChildFaces()}updateSelfChildren(e={},t=this.root.equalVertexIndexMap){const{geometry:n}=this;return this.removeChildFaces(e),this.getAdjacentFaces(e,t).forEach((t=>{t.consumed&&this.removeFace(t.faceIndex,e);const s=new Tl({geometry:n,...t});e[t.faceIndex]=s,this.add(s)})),e}updateChildrenDFS(e,t){const{geometry:n}=this;return e||(e=this.root.childrenFaceIndexes={[this.faceIndex]:this}),t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??vl(n.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((s=>{s.consumed&&this.removeFace(s.faceIndex,e);const r=new Tl({geometry:n,...s});return e[s.faceIndex]=r,this.add(r),r.updateChildrenDFS(e,t),r})),e}get equalVertexIndexMap(){return this._equalVertexIndexMap}set equalVertexIndexMap(e){this._equalVertexIndexMap=e,this._equalVertexIndexes=null}get equalVertexIndexes(){let{_equalVertexIndexes:e,equalVertexIndexMap:t}=this;return!e&&t&&(this._equalVertexIndexes=e=wl(t)),e}updateChildrenBFS(e){const t=this.childrenFaceIndexes={[this.faceIndex]:this},n=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:vl(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(t,n)})),t}traversalBFS(e){return function(e,t,n){const s=[e];for(;s.length;){const e=s.shift();if(n(e))return e;s.push(...e[t])}}(this,"children",e)}}var Sl=Object.defineProperty,Ol=(e,t,n)=>(((e,t,n)=>{t in e?Sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function Ml(e,t){const n=t.toArray(),s=n.findIndex((e=>0!==e));if(-1===s)return 0;const r=e.toArray()[s];return 0===r?1/0:n[s]/r}function El(e,t){const n=e.clone().cross(t);return"number"==typeof n?0===n:0===n.lengthSq()}function Cl(e,t,n){let s=function(e,t,n=0){let s=e.lengthSq()*t.lengthSq();if(0===s)return n;s=Math.sqrt(s);let r=e.dot(t)/s;return r=Math.max(-1,Math.min(1,r)),Math.acos(r)}(e,t);return 0===s?s:e.clone().cross(t).dot(n)<0?-s:s}const Dl=180/Math.PI,Pl={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Il={degrees:!0,map:Pl,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class Al{constructor(e){Ol(this,"_options"),Ol(this,"_listMap"),Ol(this,"_front"),Ol(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Il)}static set options(e){this._options=Object.assign({},structuredClone(Pl),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(Pl);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,s]of Object.entries(e))t[n]=Array.isArray(s)?s:Object.entries(s).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Il.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Il.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,s){const r=(new t).copy(e),i=(new t).copy(n??this.front),o=(new t).copy(s??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const s=t.clone().negate(),r=n.clone().projectOnPlane(t),i=Cl(t,e.clone().projectOnPlane(r),r),o=t.clone().cross(r);return{yaw:i,pitch:Cl(t,e.clone().projectOnPlane(o),o),roll:Cl(r,e.clone().projectOnPlane(s),s)}}(r,i,o);return this.degrees&&(a*=Dl,l*=Dl,c*=Dl),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],s=this.listMap[e];if(!s)return n;for(const{name:e,range:[r,i]}of s)(t>=r&&t<i||t<=r&&t>i)&&n.push(e);return n}}Ol(Al,"_options"),new Al,new y(1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1);var Ll=(e=>(e[e.ThroughIntersect=1]="ThroughIntersect",e[e.JointIntersect=2]="JointIntersect",e[e.Intersect=3]="Intersect",e[e.Tangency=4]="Tangency",e[e.Contain=8]="Contain",e[e.Dissociation=16]="Dissociation",e))(Ll||{});function jl(e,n){const[s,r]=e,i=r.clone().sub(s),[o,a]=n,l=a.clone().sub(o),c=i.clone().cross(l),[h,u]=function(e){return void 0!==e.w?[te,4]:void 0!==e.z?[t,3]:[g,2]}(s);if(2===u?0===c:c.equals(new h))return null;const d=o.clone().sub(s).cross(l),p=2===u?d/c:Ml(c,d);return i.clone().multiplyScalar(p).add(s)}function _l(e,t){const[n,s]=e,[r,i]=t,o=s.clone().sub(n),a=function(e,t){const[n,s]=e,r=s.clone().sub(n),[i,o]=t;if(El(o.clone().sub(i),r))return El(i.clone().sub(n),r)?Ll.Tangency:Ll.Dissociation;return Ll.Intersect}(e,t);if(a===Ll.Tangency){let e=0,t=0;const s=Ml(o,r.clone().sub(n));s<0?e++:s>1&&t++;const a=Ml(o,i.clone().sub(n));return a<0?e++:a>1&&t++,2===e||2===t?Ll.Dissociation:e+t===1?Ll.Tangency:Ll.Contain}if(a!==Ll.Intersect)return a;const l=jl(e,t),c=Ml(i.clone().sub(r),l.clone().sub(r));if(c<0||c>1)return Ll.Dissociation;if(0===c||1===c)return Ll.JointIntersect;const h=Ml(o,l.clone().sub(n));return h<0||h>1?Ll.Dissociation:0===h||1===h?Ll.JointIntersect:Ll.ThroughIntersect}function Fl(e,t){const n=t.length;let s,r=!1;for(let i=0;i<n;i++){const o=t[i];if(o.equals(e))return Ll.Tangency;let a=i+1;a===n&&(a=0);const l=t[a],c=(new g).subVectors(l,o),h=(new g).subVectors(e,o).cross(c);if(0===h){r=!0;continue}const u=Math.sign(h);if(void 0!==s&&s!==u)return Ll.Dissociation;s=u}return r?Ll.Tangency:Ll.Contain}function Rl(e,t){const n=e.length;let s=0;for(let r=0;r<n;r++){let i=r+1;i===n&&(i=0);const o=_l([e[r],e[i]],t);if(o&(Ll.ThroughIntersect|Ll.Tangency|Ll.Contain))return o;o===Ll.JointIntersect&&s++}const r=Fl(t[0],e);if(0===s||1===s&&r!==Ll.Tangency)return r;const i=r|Fl(t[1],e);return i===Ll.Tangency?Ll.Contain:i&Ll.Tangency?i&Ll.Contain?Ll.Contain:Ll.JointIntersect:r}new nt;const Bl=Ll.Contain|Ll.ThroughIntersect;class Ul extends Tl{constructor(e,t,n=!0){super(e),ul(this,"flatTriangle"),ul(this,"matrixInvert",new y),ul(this,"needUpdateFace",!0),this.matrixAutoUpdate=!1,t&&(t.add(this),n&&this.updateFace())}updateFace(e){if(!e&&!this.needUpdateFace)return;this.updateMatrix(),this.updateMatrixWorld(!0);const{triangle:t,matrixWorld:n}=this,{a:s,b:r,c:i}=t,o=s.clone().applyMatrix4(n),a=r.clone().applyMatrix4(n),l=i.clone().applyMatrix4(n);this.flatTriangle=new it(o,a,l),this.matrixInvert.copy(n).invert(),this.normalMatrix.getNormalMatrix(n),this.needUpdateFace=!1}updateMatrix(){const{triangle:e,parent:t,matrix:n,position:s,quaternion:r,scale:i,d:o}=this;if(t&&null!=o){const{triangle:o}=t,a=e.getNormal(pl[0]),l=o.getNormal(pl[1]);r.setFromUnitVectors(a,l);const{b:c}=e;s.copy(c).negate(),s.applyQuaternion(r),s.add(c),n.compose(s,r,i)}else n.identity();this.matrixWorldNeedsUpdate=!0}isOutFlatRange(e){const{flatTriangle:{a:t,b:n,c:s}}=this,[r,i,o]=dl;return r.copy(t),i.copy(n),o.copy(s),!(function(e,t){const n=e.length;let s=0,r=!1;for(let i=0;i<n;i++){let o=i+1;o===n&&(o=0);const a=Rl(t,[e[i],e[o]]);if(a===Ll.ThroughIntersect)return a;a===Ll.JointIntersect?s++:a===Ll.Tangency&&(r=!0)}if(r)return Ll.Tangency;if(s)return Ll.JointIntersect;let i=Fl(e[0],t);return i===Ll.Contain||(i=Fl(t[0],e),i===Ll.Contain)?Ll.Contain:Ll.Dissociation}([r,i,o],e)&Bl)}updateSelfChildren(e={},t=this.root.equalVertexIndexMap,n){this.updateFace();const{geometry:s}=this;return this.removeChildFaces(e),this.getAdjacentFaces(e,t).forEach((t=>{const r=new Ul({geometry:s,...t},this,!0);n&&r.isOutFlatRange(n)?this.remove(r):(t.consumed&&this.removeFace(t.faceIndex,e),e[t.faceIndex]=r)})),e}updateChildrenDFS(e,t,n){this.updateFace();const{geometry:s}=this;if(!e){if(e=this.root.childrenFaceIndexes={},n&&this.isOutFlatRange(n))return this.removeFromParent(),e;e[this.faceIndex]=this}return t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??vl(s.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((r=>{const i=new Ul({geometry:s,...r},this);n&&i.isOutFlatRange(n)?this.remove(i):(r.consumed&&this.removeFace(r.faceIndex,e),e[r.faceIndex]=i,i.updateChildrenDFS(e,t,n))})),e}updateChildrenBFS(e,t){this.updateFace();const n=this.childrenFaceIndexes={};if(t&&this.isOutFlatRange(t))return this.removeFromParent(),n;n[this.faceIndex]=this;const s=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:vl(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(n,s,t)})),n}appendVertex(e,n,s,r,i=!0){const{positions:o,normals:a,uvs:l}=n,{[e]:c,real:{[e]:h},normalMatrix:u,matrixWorld:d,geometry:p}=this,{[e]:m}=i?this.flatTriangle:this.triangle,f=s[r?h:c]=o.length;o.push(m.clone());const{attributes:{normal:y,uv:v}}=p;if(a){const e=new t;i?this.flatTriangle.getNormal(e):e.fromBufferAttribute(y,h),a.push(e)}if(l){const e=(new g).fromBufferAttribute(v,h);l.push(e)}return f}appendFace(e,t,n=!0){const{indexes:s}=e,{a:r,b:i,order:o}=this,a=this.appendVertex("c",e,t,!1,n);if(s){const e=s.length;s[e+o[0]]=t[r],s[e+o[1]]=t[i],s[e+o[2]]=a}return a}appendFaceVertices(e,t,n=!0){const{indexes:s}=e,{order:r}=this,i=this.appendVertex("a",e,t,!0,n),o=this.appendVertex("b",e,t,!0,n),a=this.appendVertex("c",e,t,!0,n);if(s){const e=s.length;s[e+r[0]]=i,s[e+r[1]]=o,s[e+r[2]]=a}return[i,o,a]}createFaceGeometry(e=!0){const t=[],n=[],s=[],r=[],i=new Array(3),{normal:o,uv:a}=this.geometry.attributes,l={positions:t,indexes:r};o&&(l.normals=n),a&&(l.uvs=s),this.appendFaceVertices(l,i,e);const c=[],h=[],u=[];for(let e=0;e<3;e++)t[e].toArray(c,c.length),o&&n[e].toArray(h,h.length),a&&s[e].toArray(u,u.length);const d=new w;return d.setAttribute("position",new b(c,3)),o&&d.setAttribute("normal",new b(h,3)),a&&d.setAttribute("uv",new b(u,2)),d.index=new D(r,1),d}createFaceFlatKeyframeTracks(e,t,n=0,s){const{uuid:r,position:i,quaternion:o,scale:a}=e,{matrixInvert:l,parent:c}=this;let h=l;if(!s&&c){const{matrixWorld:e}=c;h=e.clone().multiply(l)}const[u,d]=pl,p=fl[0];h.decompose(u,p,d);const m=[n,n+t],f=[];i.toArray(f),u.toArray(f,f.length);const g=[];o.toArray(g),p.toArray(g,g.length);const y=[];a.toArray(y),d.toArray(y,y.length);return[new L(`${r}.position`,m,f),new j(`${r}.quaternion`,m,g),new L(`${r}.scale`,m,y)]}createFaceMesh(e,t=!0){const n=this.createFaceGeometry(t);return new W(n,e)}createFlatFaceMeshTree(e,t,n){const s=this.createFaceMesh(e),r=n||[];let{duration:i,layer:o=0,byLayer:a}=t||{};if(i&&o>0){const e=a?i*(o-1):0,t=this.createFaceFlatKeyframeTracks(s,i,e);r.push(...t)}if(t={duration:i,layer:o+1,byLayer:a},this.children.forEach((n=>{const i=n.createFlatFaceMeshTree(e,t,r);s.add(i)})),!n&&r.length){const e=new A("展开",void 0,r);s.animations.push(e)}return s}}let kl=class e extends Ul{constructor(e){var n;const{geometry:s,faceIndex:r,origin:i,normal:o,angle:a=0,xyPlane:l=!1,meshMatrix:c,flatRange:h}=e;let u=null==(n=s.index)?void 0:n.array;u||(u=xl(s.attributes.position.count),s.index=new D(u,1));const d=3*r;super({geometry:s,a:u[d],b:u[d+1],c:u[d+2],faceIndex:r,order:[0,1,2]}),ul(this,"origin",new t),ul(this,"normal"),ul(this,"angle"),ul(this,"xyPlane"),ul(this,"xyPlaneMatrix",new y),ul(this,"meshMatrix",null),ul(this,"flatRange",null),ul(this,"_isBounded",!1);const{triangle:p}=this;if(this.origin.copy(i||p.b),this.normal=o||p.getNormal(new t),this.angle=a,this.meshMatrix=c,this.flatRange=h,h&&c){let e=c.getMaxScaleOnAxis();e=0===e?1:1/e,this.flatRange=h.map((t=>t.multiplyScalar(e)))}this.xyPlane=!!h||l,this.updateFace(),this.updateChildrenBFS(e,this.flatRange)}static createFlatFaceTreeByRay(t){const{object:n,origin:s,direction:r,angle:i,planeNormal:o,...a}=t,l=new Re(s,r),[c]=l.intersectObject(n);if(!c)return null;const{object:h,instanceId:u,point:d,normal:p,faceIndex:m,face:f}=c;if(null==f)return null;const{geometry:g,matrixWorld:v}=h,w=new y;null==u?w.copy(v):(h.getMatrixAt(u,w),w.premultiply(v));const b=ml[0].copy(w).invert();let x;switch(o){case 1:x=p;break;case 2:x=r.clone().negate(),x.transformDirection(b);break;default:x=f.normal}return d.applyMatrix4(b),new e({...a,geometry:g,origin:d,faceIndex:m,normal:x,angle:i,meshMatrix:w})}updateMatrix(){if(!this.xyPlane)return super.updateMatrix();const{origin:e,normal:t,angle:n,xyPlaneMatrix:s}=this,[r,i]=fl,o=pl[0];o.set(0,0,1),r.setFromUnitVectors(o,t),i.setFromAxisAngle(o,n),r.multiply(i),s.makeRotationFromQuaternion(r),s.setPosition(e),this.matrix.copy(s).invert()}averageEqualVectors(e,t){const n=e[0].toArray().length;let s=[];for(let t=0;t<e.length;t++)e[t].toArray(s,s.length);s=this.averageEqualVertices(s,n,t);for(let t=0;t<e.length;t++)e[t].fromArray(s,t*n);return e}averageEqualVertices(e,t,n){const{equalVertexIndexes:s,equalVertexIndexMap:r}=this,i={};for(let e=0;e<n.length;e++){const t=n[e],o=r[e],a=i[t]=[];s[o].forEach((e=>{const t=n[e];void 0!==t&&a.push(t)}))}return bl(e,t,i)}getVerticesByReuse(e,t=!0,n){const s=[];if(this.appendVertex("a",e,s,!1,t),this.appendVertex("b",e,s,!1,t),this.traversalBFS((n=>{n.appendFace(e,s,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e<t.length;e++)t[e].toArray(n,n.length);e.averagePositions=this.averageEqualVertices(n,3,s)}return s}getVerticesByAll(e,t=!0,n){const{geometry:s}=this,r=new Array(s.attributes.position.count);if(this.traversalBFS((n=>{n.appendFaceVertices(e,r,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e<t.length;e++)t[e].toArray(n,n.length);e.averagePositions=this.averageEqualVertices(n,3,r)}return r}getVertices(e,t,n,s){return n?(this.getVerticesByAll(e,!0,s),this.getVerticesByAll(t,!1)):(this.getVerticesByReuse(e,!0,s),this.getVerticesByReuse(t,!1))}generateGeometryData(e,t=!0,n){const{normal:s,uv:r}=this.geometry.attributes,i=["positions","indexes"];s&&i.push("normals"),r&&i.push("uvs");const o={};return i.forEach((e=>{o[e]=[]})),o.indexMap=e?this.getVerticesByAll(o,t,n):this.getVerticesByReuse(o,t,n),o}createGeometry(e,t=!0){const{normal:n,uv:s}=this.geometry.attributes,{positions:r,normals:i,uvs:o,indexes:a,indexMap:l}=this.generateGeometryData(e,t),c=r.length,h=[],u=[],d=[];for(let e=0;e<c;e++)r[e].toArray(h,h.length),n&&i[e].toArray(u,u.length),s&&o[e].toArray(d,d.length);const p=new w;return p.setAttribute("position",new b(h,3)),n&&p.setAttribute("normal",new b(u,3)),s&&p.setAttribute("uv",new b(d,2)),p.index=new D(a,1),{geometry:p,indexMap:l}}createUnattachedFlatFaceMeshes(e,t=0){const n=[],s=new st;if(this.traversalBFS((r=>{const i=r.createFaceMesh(e);if(s.add(i),t){const e=r.createFaceFlatKeyframeTracks(i,t,0,!0);n.push(...e)}})),n.length){const e=new A("独立展开",t,n);s.animations.push(e)}return this.transformFlatObjectToWorld(s)}createFlatFaceMeshTree(e,t,n){const s=super.createFlatFaceMeshTree(e,t,n);return this.transformFlatObjectToWorld(s)}transformFlatObjectToWorld(e){const{meshMatrix:t,xyPlaneMatrix:n}=this;return t&&e.matrix.copy(t),e.matrix.multiply(n),e.matrix.decompose(e.position,e.quaternion,e.scale),e}};function Nl(e,t,n,s,r){const i=e.length;if(!r){r=[];for(let e=0;e<i;e++)r[e]=[]}const o=e[0].length/t,a=e.map((e=>e.length/o|0));for(let t=0;t<o;t+=3){const o=[],l=[],c=[];for(let n=0;n<i;n++){const s=e[n],r=a[n];let i=t*r,h=i+r;o[n]=s.slice(i,h),i=h,h+=r,l[n]=s.slice(i,h),i=h,h+=r,c[n]=s.slice(i,h)}let h,u,d,p,m=o[0][n]-s>0,f=l[0][n]-s>0,g=c[0][n]-s>0;switch(s<0&&(m=!m,f=!f,g=!g),m+f+g){case 0:for(let e=0;e<i;e++)r[e].push(...o[e],...l[e],...c[e]);break;case 1:m?(h=l,u=c,d=zl(c,o,n,s),p=zl(l,o,n,s)):f?(h=c,u=o,d=zl(o,l,n,s),p=zl(c,l,n,s)):(h=o,u=l,d=zl(l,c,n,s),p=zl(o,c,n,s));for(let e=0;e<i;e++)r[e].push(...h[e],...u[e],...d[e]),r[e].push(...d[e],...p[e],...h[e]);break;case 2:m?f?(h=c,u=zl(o,c,n,s),d=zl(l,c,n,s)):(h=l,u=zl(c,l,n,s),d=zl(o,l,n,s)):(h=o,u=zl(l,o,n,s),d=zl(c,o,n,s));for(let e=0;e<i;e++)r[e].push(...h[e],...u[e],...d[e])}}return r}function zl(e,t,n,s,r=[]){const i=e[0],o=t[0],a=i[n],l=Math.abs((s-a)/(o[n]-a));for(let n=0;n<e.length;n++){const s=e[n],i=t[n],o=r[n]||(r[n]=[]);for(let e=0;e<s.length;e++)o[e]=l*(i[e]-s[e])+s[e]}return r}var Gl=(e=>(e[e.Projection=0]="Projection",e[e.Distance=1]="Distance",e[e.ContinuousDistance=2]="ContinuousDistance",e[e.UVIncrement=3]="UVIncrement",e[e.Mapping=4]="Mapping",e[e.Original=5]="Original",e))(Gl||{});class Vl extends w{constructor(){super(...arguments),ul(this,"isDecalGeometry",!0),ul(this,"originalUVs"),ul(this,"uvMap",1),ul(this,"offsetFactor",0),ul(this,"offsetUnits",0),ul(this,"epsilon",1e-8),ul(this,"relativeEpsilon",!1),ul(this,"_equalVertexIndexMap",null),ul(this,"_equalVertexIndexes",null),ul(this,"border",[])}get equalVertexIndexMap(){let{_equalVertexIndexMap:e}=this;if(!e){const{cutPositions:t,epsilon:n,relativeEpsilon:s}=this;this._equalVertexIndexMap=e=vl(t,{epsilon:n,relativeEpsilon:s}),this._equalVertexIndexes=null}return e}get equalVertexIndexes(){let{_equalVertexIndexes:e}=this;return e||(this._equalVertexIndexes=e=wl(this.equalVertexIndexMap)),e}empty(){const{normal:e,uv:t}=this.attributes;this.attributes={},this.setAttribute("position",new b([],3)),e&&this.setAttribute("normal",new b([],3)),t&&this.setAttribute("uv",new b([],3)),this.setIndex([])}clipGeometryData(e,t){return function(e,t,n){for(let s=0;s<n.length;s++){const r=n[s];e=Nl(e,t,s,r),e=Nl(e,t,s,-r)}return e}(e,t,this.border)}generateOffsetPosition(e,t){var n;const{offsetUnits:s,offsetFactor:r,equalVertexIndexes:i,attributes:o}=this;if(0===r&&0===s)return e;t.boundingBox||t.computeBoundingBox();let a=o.normal;if(!a){const t=function(e,t){const n=e.length,s=n/3;t||(t=xl(s));const r=t.length,[i,o,a]=pl,l=new Array(s);for(let n=0;n<r;n+=3){const s=t[n],r=t[n+1],c=t[n+2];i.fromArray(e,3*s),o.fromArray(e,3*r),a.fromArray(e,3*c),i.sub(o),a.sub(o),a.cross(i).normalize();const{x:h,y:u,z:d}=a;(l[s]||(l[s]=[])).push(h,u,d),(l[r]||(l[r]=[])).push(h,u,d),(l[c]||(l[c]=[])).push(h,u,d)}const c=new Array(n);for(let e=0;e<s;e++){const t=l[e];let n=t;if(t.length>3){n=[0,0,0];const e=t.length;for(let s=0;s<e;s+=3)n[0]+=t[s],n[1]+=t[s+1],n[2]+=t[s+2];const s=1/(e/3);n[0]*=s,n[1]*=s,n[2]*=s;const r=1/Math.hypot(...n);n[0]*=r,n[1]*=r,n[2]*=r}const s=3*e;c[s]=n[0],c[s+1]=n[1],c[s+2]=n[2]}return c}(e,null==(n=this.index)?void 0:n.array);o.normal=a=new b(t,3)}const{array:l,itemSize:c,count:h}=a,u=bl(l,c,i,!0),[d,p,m,f]=pl;t.boundingBox.getCenter(f);const g=new Array(e.length);for(let t=0;t<h;t++){const n=t*c;d.fromArray(u,n),p.fromArray(e,n);let i=s;0!==r&&(m.subVectors(p,f),i+=m.dot(d)*r),0!==i&&(m.copy(d).multiplyScalar(i),p.add(m)),p.toArray(g,n)}return g}generateDistanceUVs(e){const t=[],n=dl[0],s=new rt;for(let r=0;r<e.length;r+=3)n.fromArray(e,r),n.toArray(t,t.length),s.expandByPoint(n);const{x:r,y:i}=s.getSize(new g),{x:o,y:a}=s.min,l=new nt(1/r,0,-o/r,0,1/i,-a/i,0,0,1),c=new b(t,2);return c.applyMatrix3(l),c}generateProjectionUVs(e,t){const n=[],s=e.length,r=1/t.x,i=1/t.y;for(let t=0;t<s;t+=3){const s=e[t],o=e[t+1];n.push(s*r+.5,o*i+.5)}return new b(n,2)}computeMappingUVs(){const{originalUVs:e}=this;if(!e)throw"ProjectionDecalGeometry#mesh 缺少 uv; DecalUVMapType.Mapping 类型的 uvMap 需要 uv";const t=dl[0],n=new rt,s=e.length;for(let r=0;r<s;r+=2)t.fromArray(e,r),n.expandByPoint(t);const{x:r,y:i}=n.getSize(t),{x:o,y:a}=n.min,l=new nt(1/r,0,-o/r,0,1/i,-a/i,0,0,1),c=new b(e,2);return c.applyMatrix3(l),c}}class Hl extends Vl{constructor(e){super(),ul(this,"isRigidDecalGeometry",!0),ul(this,"object"),ul(this,"origin",new t),ul(this,"direction",new t),ul(this,"angle",-0),ul(this,"_size",new g),ul(this,"cutPositions",[]),ul(this,"flatPositions",[]),ul(this,"averageFlatPositions"),ul(this,"faceTree",null),ul(this,"branchFace",!1),this.setOptions(e)}get size(){return this._size}set size(e){this._size.copy(e),this.border=this._size.toArray().map((e=>.5*e))}get meshMatrix(){return this.faceTree.meshMatrix}get geometry(){return this.faceTree.geometry}setOptions(e){let{object:t,origin:n,direction:s,angle:r,size:i,uvMap:o,offsetFactor:a,offsetUnits:l,epsilon:c,relativeEpsilon:h,branchFace:u}=e,d=!1;t&&(this.object=t,d=!0),i&&(this.size=i,d=!0),c&&(this.epsilon=c,d=!0),h&&(this.relativeEpsilon=h,d=!0),n&&(this.origin.copy(n),d=!0),s&&(this.direction.copy(s),d=!0),null!=r&&(this.angle=r,d=!0),null!=u&&(this.branchFace=u,d=!0);let p=!1;if(a&&(p=!0,this.offsetFactor=a),l&&(p=!0,this.offsetUnits=l),null!=o&&(this.uvMap=o,o===Gl.ContinuousDistance&&(d=!0)),d)return this.updateGeometry();p&&this.updatePosition(),null!=o&&this.updateUV()}updateGeometry(){const{object:e,origin:t,direction:n,angle:s,border:[r,i],branchFace:o,epsilon:a,relativeEpsilon:l}=this,c=this.faceTree=kl.createFlatFaceTreeByRay({object:e,origin:t,direction:n,angle:s,flatRange:[new g(r,i),new g(-r,i),new g(-r,-i),new g(r,-i)],xyPlane:!0,branchFace:o,epsilon:a,relativeEpsilon:l});if(this._equalVertexIndexMap=this._equalVertexIndexes=null,!c)return this.empty();const{flatPositions:h,positions:u,normals:d,uvs:p,averagePositions:m}=this.generateDecalGeometryData(this.geometry);this.flatPositions=h,this.cutPositions=u,this.averageFlatPositions=m,this.originalUVs=p,d&&this.setAttribute("normal",new b(d,3)),this.updatePosition(),this.updateUV()}generateDecalGeometryData(e){const{faceTree:t}=this,{attributes:n}=e,s={positions:[]},r=["positions"];n.normal&&r.push("normals"),n.uv&&r.push("uvs");const i={},o=[s.positions];r.forEach((e=>o.push(i[e]=[])));const a=this.uvMap===Gl.ContinuousDistance;t.getVertices(s,i,!0,a);let l=[];const c=o.length,h=s.positions.length;for(let e=0;e<c;e++){const t=o[e],n=l[e]=[];for(let e=0;e<h;e++)t[e].toArray(n,n.length)}a&&l.push(s.averagePositions),l=this.clipGeometryData(l,3);const u={flatPositions:l[0]};return r.forEach(((e,t)=>{u[e]=l[t+1]})),u.normals&&function(e,t){const n=e.length/t|0;for(let s=0;s<t;s++){const t=s*n,r=e.slice(t,t+n);let i=Math.hypot(...r);i=0===i?1:1/i;for(let s=0;s<n;s++)e[t+s]*=i}}(u.normals,3),a&&(u.averagePositions=l.at(-1)),u}updatePosition(){const{cutPositions:e,geometry:t}=this,n=this.generateOffsetPosition(e,t),s=new b(n,3);this.setAttribute("position",s)}updateUV(){if(!this.attributes.position)return;const{originalUVs:e,uvMap:t}=this;let n;switch(t){case Gl.Mapping:n=this.computeMappingUVs();break;case Gl.Projection:n=this.computeProjectionUVs();break;case Gl.Distance:n=this.computeDistanceUVs();break;case Gl.ContinuousDistance:n=this.computeContinuousDistanceUVs();break;default:n=e&&new b(e,2)}this.setAttribute("uv",n)}computeProjectionUVs(){const{cutPositions:e,size:t}=this,n=this.faceTree.matrix,s=new b(e,3);return s.applyMatrix4(n),this.generateProjectionUVs(s.array,t)}computeDistanceUVs(){return this.generateDistanceUVs(this.flatPositions)}computeContinuousDistanceUVs(){return this.generateDistanceUVs(this.averageFlatPositions)}transformDecalToWorld(e){const{meshMatrix:t}=this;return t&&(e.matrix.copy(t),t.decompose(e.position,e.quaternion,e.scale)),e}}const Wl=new Map;class Kl extends za{constructor(e){super(e),this.params=e,this.decalMesh=new W(void 0,new Y),this.textureAspect=new t(1,1,1),this.stype="Decal";const{material:n}=this.decalMesh;n.transparent=!0,n.depthWrite=!1,n.polygonOffset=!0,n.polygonOffsetFactor=-4,this.add(this.decalMesh)}async updateTexture(e){var t;if(!e)return;const n=Wl.get(e),{material:s}=this.decalMesh;if(null===(t=s.map)||void 0===t||t.dispose(),n)s.map=n;else{const t=new d;t.image=await Dr.loadAsync(e),t.colorSpace=$,t.needsUpdate=!0,s.map=t,Wl.set(e,t)}s.needsUpdate=!0;const{image:r}=s.map;if(r){const{width:e,height:t}=r;e<t?(this.textureAspect.x=1,this.textureAspect.y=t/e):(this.textureAspect.x=e/t,this.textureAspect.y=1)}}updateMaterial(e={}){const{color:t="#fff",opacity:n=1}=e,{material:s}=this.decalMesh;s.color.set(t),s.opacity=n}}var ql=function(e,t){return ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ql(e,t)};function Yl(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ql(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ql=function(){return Ql=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ql.apply(this,arguments)};function Xl(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}function Zl(e,t,n,s){var r,i=arguments.length,o=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(i<3?r(o):i>3?r(t,n,o):r(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function Jl(e,t){return function(n,s){t(n,s,e)}}function $l(e,t,n,s,r,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=s.kind,c="getter"===l?"get":"setter"===l?"set":"value",h=!t&&e?s.static?e:e.prototype:null,u=t||(h?Object.getOwnPropertyDescriptor(h,s.name):{}),d=!1,p=n.length-1;p>=0;p--){var m={};for(var f in s)m[f]="access"===f?{}:s[f];for(var f in s.access)m.access[f]=s.access[f];m.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var g=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=o(g.get))&&(u.get=a),(a=o(g.set))&&(u.set=a),(a=o(g.init))&&r.unshift(a)}else(a=o(g))&&("field"===l?r.unshift(a):u[c]=a)}h&&Object.defineProperty(h,s.name,u),d=!0}function ec(e,t,n){for(var s=arguments.length>2,r=0;r<t.length;r++)n=s?t[r].call(e,n):t[r].call(e);return s?n:void 0}function tc(e){return"symbol"==typeof e?e:"".concat(e)}function nc(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function sc(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function rc(e,t,n,s){return new(n||(n=Promise))((function(r,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((s=s.apply(e,t||[])).next())}))}function ic(e,t){var n,s,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(i=0)),i;)try{if(n=1,s&&(r=2&a[0]?s.return:a[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;switch(s=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,s=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],s=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var oc=Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]};function ac(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||oc(t,e,n)}function lc(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],s=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function cc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var s,r,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(s=i.next()).done;)o.push(s.value)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}function hc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(cc(arguments[t]));return e}function uc(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var s=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],o=0,a=i.length;o<a;o++,r++)s[r]=i[o];return s}function dc(e,t,n){if(n||2===arguments.length)for(var s,r=0,i=t.length;r<i;r++)!s&&r in t||(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function pc(e){return this instanceof pc?(this.v=e,this):new pc(e)}function mc(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,r=n.apply(e,t||[]),i=[];return s=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),s[Symbol.asyncIterator]=function(){return this},s;function o(e,t){r[e]&&(s[e]=function(t){return new Promise((function(n,s){i.push([e,t,n,s])>1||a(e,t)}))},t&&(s[e]=t(s[e])))}function a(e,t){try{(n=r[e](t)).value instanceof pc?Promise.resolve(n.value.v).then(l,c):h(i[0][2],n)}catch(e){h(i[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function h(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function fc(e){var t,n;return t={},s("next"),s("throw",(function(e){throw e})),s("return"),t[Symbol.iterator]=function(){return this},t;function s(s,r){t[s]=e[s]?function(t){return(n=!n)?{value:pc(e[s](t)),done:!1}:r?r(t):t}:r}}function gc(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=lc(e),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,r){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,r,(t=e[n](t)).done,t.value)}))}}}function yc(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var vc=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},wc=function(e){return wc=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},wc(e)};function bc(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=wc(e),s=0;s<n.length;s++)"default"!==n[s]&&oc(t,e,n[s]);return vc(t,e),t}function xc(e){return e&&e.__esModule?e:{default:e}}function Tc(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)}function Sc(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n}function Oc(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Mc(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var s,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");s=t[Symbol.asyncDispose]}if(void 0===s){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");s=t[Symbol.dispose],n&&(r=s)}if("function"!=typeof s)throw new TypeError("Object not disposable.");r&&(s=function(){try{r.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:s,async:n})}else n&&e.stack.push({async:!0});return t}var Ec="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var s=new Error(n);return s.name="SuppressedError",s.error=e,s.suppressed=t,s};function Cc(e){function t(t){e.error=e.hasError?new Ec(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,s=0;return function r(){for(;n=e.stack.pop();)try{if(!n.async&&1===s)return s=0,e.stack.push(n),Promise.resolve().then(r);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return s|=2,Promise.resolve(i).then(r,(function(e){return t(e),r()}))}else s|=1}catch(e){t(e)}if(1===s)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function Dc(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,s,r,i){return n?t?".jsx":".js":!s||r&&i?s+r+"."+i.toLowerCase()+"js":e})):e}var Pc={__extends:Yl,__assign:Ql,__rest:Xl,__decorate:Zl,__param:Jl,__esDecorate:$l,__runInitializers:ec,__propKey:tc,__setFunctionName:nc,__metadata:sc,__awaiter:rc,__generator:ic,__createBinding:oc,__exportStar:ac,__values:lc,__read:cc,__spread:hc,__spreadArrays:uc,__spreadArray:dc,__await:pc,__asyncGenerator:mc,__asyncDelegator:fc,__asyncValues:gc,__makeTemplateObject:yc,__importStar:bc,__importDefault:xc,__classPrivateFieldGet:Tc,__classPrivateFieldSet:Sc,__classPrivateFieldIn:Oc,__addDisposableResource:Mc,__disposeResources:Cc,__rewriteRelativeImportExtension:Dc},Ic=Object.freeze({__proto__:null,__addDisposableResource:Mc,get __assign(){return Ql},__asyncDelegator:fc,__asyncGenerator:mc,__asyncValues:gc,__await:pc,__awaiter:rc,__classPrivateFieldGet:Tc,__classPrivateFieldIn:Oc,__classPrivateFieldSet:Sc,__createBinding:oc,__decorate:Zl,__disposeResources:Cc,__esDecorate:$l,__exportStar:ac,__extends:Yl,__generator:ic,__importDefault:xc,__importStar:bc,__makeTemplateObject:yc,__metadata:sc,__param:Jl,__propKey:tc,__read:cc,__rest:Xl,__rewriteRelativeImportExtension:Dc,__runInitializers:ec,__setFunctionName:nc,__spread:hc,__spreadArray:dc,__spreadArrays:uc,__values:lc,default:Pc});function Ac(e){const t=Lc(e),n=new y;n.setFromMatrix3(t);const s=e[0],r=n.clone();r.setPosition(s);const i=r.clone().invert(),o=e.map((e=>{const t=e.clone().applyMatrix4(i);return new g(t.x,t.y)})),a=new tt(o),l=new ot(a),c=new rt;c.setFromPoints(o);const h=jc(c);return l.getAttribute("uv").applyMatrix3(h),l.applyMatrix4(n),{geometry:l,polygonBox:c,modelMatrix:n,planeMatrix:r,projectionMatrix:i,position:s}}function Lc(e){const[n,s,r]=e,i=new at;i.setFromCoplanarPoints(s,n,r);const o=i.normal,a=o.clone().cross(new t(0,0,1));a.equals(new t)&&a.set(1,0,0);const l=o.clone().cross(a);a.normalize(),l.normalize(),o.normalize();const c=new nt;return c.elements=[a.x,a.y,a.z,l.x,l.y,l.z,o.x,o.y,o.z],c}function jc(e){const t=e.min,n=e.getSize(new g),s=new nt;return s.elements=[n.x,0,0,0,n.y,0,t.x,t.y,1],s.invert()}function _c(e,t){const n=ir(t);return e.intersectsBox(n)}function Fc(e,t,n){if("string"==typeof e){let s=t?null==n?void 0:n.get(e):null;return s||(s=Pr.load(e,(()=>{Fa.needsUpdate=!0})),null==n||n.set(e,s)),s}return e instanceof HTMLImageElement?new d(e):e instanceof HTMLCanvasElement?new Ne(e):new lt(e)}function Rc(e,t,n,s){const r=e.map,i=Fc(t,n,s);if(r){const e=i.source;i.copy(r),i.source=e}return e.map=i,i}function Bc(e,n){const{top:r,left:i,bottom:o,right:a,front:l,back:c}=e,h=new t(a,r,l),u=new t(i,o,c),d=new s;return function(e){return d.max.addVectors(e,h),d.min.subVectors(e,u),n.filter((e=>_c(d,e)))}}function Uc(e,n){const s=new Se(new t,e);return function(e){return s.center.copy(e),n.filter((e=>_c(s,e)))}}function kc(e,n){const s=e.length-1,r=[];for(let t=0;t<s;t++){const n=e[t],s=e[t+1],i=new S(n,s);r.push(i)}const i=new Se(new t,n);return function(e){return e.filter((e=>{const n=ir(e),s=new t;n.getCenter(s);const o=r.filter((e=>{const t=e.closestPointToPointParameter(s);return 0<=t||t>=1}));if(0===o.length)return!1;let a=1/0,l=s;for(const e of o){const n=e.closestPointToPoint(s,!0,new t),r=s.distanceToSquared(n);r<a&&(a=r,l=n)}return i.center.copy(l),i.intersectsBox(n)}))}}class Nc extends Ga{constructor(e,t){const{image:n,color:s,width:r,height:i,position:o,rotation:a,needLight:l,id:c,name:h,userData:u,level:d,visible:p,cache:m=!0}=e,f=Xl(e,["image","color","width","height","position","rotation","needLight","id","name","userData","level","visible","cache"]);super({id:c,name:h,position:o,rotation:a,userData:u,level:d,visible:p});const g=n?Object.assign(Object.assign({transparent:!0},f),{map:Fc(n,m,t)}):f;this.geometry=new $e(r,i),this.material=l?new ct(g):new ke(g),this.material.depthWrite=!this.material.transparent,this.image=n}}class zc extends Ga{constructor(e,n){const{points:s,image:r,color:i,needLight:o,id:a,name:l,userData:c,level:h,visible:u,cache:d}=e,p=Xl(e,["points","image","color","needLight","id","name","userData","level","visible","cache"]),m=s.map((e=>new t(e.x,e.y,e.z))),f=r?Object.assign(Object.assign({transparent:!0},p),{map:Fc(r,null==d||d,n)}):p,g=o?new ct(f):new ke(f),{geometry:y,position:v}=Ac(m);super({id:a,name:l,userData:c,level:h,visible:u},y,g),this.position.copy(v),this.material=g,this.geometry=y,this.image=r}}var Gc=Object.freeze({__proto__:null,BaseMesh:Ga,BaseObject3D:za,Canvas3D:ll,Circle:tl,Decal:Kl,DecalUVMapType:Gl,Ground:cl,Group:Va,Icon:Ja,Line:ol,Link:sl,Model:Qa,Node:el,PluginObject:Ha,Poi:Xa,PoiMesh:Nc,PoiNode:Ya,Point:$a,Polygon:al,PolygonPoiMesh:zc,Topology:rl,isPoiNode25D:Ka,isPoiNode2D:Wa,isPoiNode3D:qa}),Vc=Object.defineProperty,Hc=(e,t,n)=>(((e,t,n)=>{t in e?Vc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function Wc(e,n,s){const r=(s=s??0)+1;if(oi(e))return e;if(null!=e.x&&null!=e.y)return function(e){return null!=e.w?(new te).copy(e):null!=e.z?(new t).copy(e):(new g).copy(e)}(e);if(Array.isArray(e))return e.map((e=>Wc(e,n,r)));if(e instanceof Map){const t=new Map;for(const s of e.keys()){const i=Wc(e.get(s),n,r);t.set(s,i)}return t}if(function(e){return e&&"function"==typeof e[Symbol.iterator]}(e)){const t=[];for(const s of e){const e=Wc(s,n,r);t.push(e)}return t}if((n||0===s)&&"object"==typeof e){const t={};for(const s of Object.keys(e))t[s]=Wc(e[s],n,r);return t}return e}function Kc(e,t,n){let s=function(e,t){const n=Math.sqrt(e.lengthSq()*t.lengthSq());if(0===n)return 0;let s=e.dot(t)/n;return s=Math.max(-1,Math.min(1,s)),Math.acos(s)}(e,t);return 0===s?s:e.clone().cross(t).dot(n)<0?-s:s}const qc=180/Math.PI,Yc={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Qc={degrees:!0,map:Yc,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class Xc{constructor(e){Hc(this,"_options"),Hc(this,"_listMap"),Hc(this,"_front"),Hc(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Qc)}static set options(e){this._options=Object.assign({},structuredClone(Yc),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(Yc);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,s]of Object.entries(e))t[n]=Array.isArray(s)?s:Object.entries(s).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Qc.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Qc.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,s){const r=(new t).copy(e),i=(new t).copy(n??this.front),o=(new t).copy(s??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const s=t.clone().negate(),r=n.clone().projectOnPlane(t),i=Kc(t,e.clone().projectOnPlane(r),r),o=t.clone().cross(r);return{yaw:i,pitch:Kc(t,e.clone().projectOnPlane(o),o),roll:Kc(r,e.clone().projectOnPlane(s),s)}}(r,i,o);return this.degrees&&(a*=qc,l*=qc,c*=qc),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],s=this.listMap[e];if(!s)return n;for(const{name:e,range:[r,i]}of s)(t>=r&&t<i||t<=r&&t>i)&&n.push(e);return n}}function Zc(e){const n={};if(Array.isArray(e)){const s=e.map((e=>(new t).copy(e)));n.points=s}else if(e instanceof rl){const s=e.nodes.map((e=>e.getWorldPosition(new t)));n.points=s}else n.curve=e;return n}Hc(Xc,"_options"),new Xc,new nt;var Jc={},$c={},eh=Io(Ic),th={},nh={},sh={},rh={};Object.defineProperty(rh,"__esModule",{value:!0});var ih=function(){function e(t,n){if(void 0===n&&(n=null),this.nonEmpty=!1,t||n){if(!t)throw new Error("Parameter head cannot be null.");this.head=t,this.tail=n||e.NIL,this.nonEmpty=!0}else{if(e.NIL)throw new Error("Parameters head and tail are null. Use the NIL element instead.");this.nonEmpty=!1}}return Object.defineProperty(e.prototype,"length",{get:function(){if(!this.nonEmpty)return 0;if(this.tail===e.NIL)return 1;for(var t=0,n=this;n.nonEmpty;)++t,n=n.tail;return t},enumerable:!0,configurable:!0}),e.prototype.prepend=function(t){return new e(t,this)},e.prototype.append=function(t){if(!t)return this;if(!this.nonEmpty)return new e(t);if(this.tail===e.NIL)return new e(t).prepend(this.head);for(var n=new e(this.head),s=n,r=this.tail;r.nonEmpty;)s=s.tail=new e(r.head),r=r.tail;return s.tail=new e(t),n},e.prototype.insertWithPriority=function(t){if(!this.nonEmpty)return new e(t);var n=t.priority;if(n>this.head.priority)return this.prepend(t);for(var s=new e(this.head),r=s,i=this.tail;i.nonEmpty;){if(n>i.head.priority)return r.tail=i.prepend(t),s;r=r.tail=new e(i.head),i=i.tail}return r.tail=new e(t),s},e.prototype.filterNot=function(t){if(!this.nonEmpty||null==t)return this;if(t===this.head.listener)return this.tail;for(var n=new e(this.head),s=n,r=this.tail;r.nonEmpty;){if(r.head.listener===t)return s.tail=r.tail,n;s=s.tail=new e(r.head),r=r.tail}return this},e.prototype.contains=function(e){if(!this.nonEmpty)return!1;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return!0;t=t.tail}return!1},e.prototype.find=function(e){if(!this.nonEmpty)return null;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return t.head;t=t.tail}return null},e.prototype.toString=function(){for(var e="",t=this;t.nonEmpty;)e+=t.head+" -> ",t=t.tail;return"[List "+(e+="NIL")+"]"},e.NIL=new e(null,null),e}();rh.SlotList=ih;var oh={};Object.defineProperty(oh,"__esModule",{value:!0});var ah=function(){function e(e,t,n,s){void 0===n&&(n=!1),void 0===s&&(s=0),this._enabled=!0,this._once=!1,this._priority=0,this._listener=e,this._once=n,this._signal=t,this._priority=s,this.verifyListener(e)}return e.prototype.execute0=function(){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,this._params):this._listener())},e.prototype.execute1=function(e){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,[e].concat(this._params)):this._listener(e))},e.prototype.execute=function(e){if(this._enabled){this._once&&this.remove(),this._params&&this._params.length&&(e=e.concat(this._params));var t=e.length;0===t?this._listener():1===t?this._listener(e[0]):2===t?this._listener(e[0],e[1]):3===t?this._listener(e[0],e[1],e[2]):this._listener.apply(null,e)}},Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){if(null==e)throw new Error("Given listener is null.\nDid you want to set enabled to false instead?");this.verifyListener(e),this._listener=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"once",{get:function(){return this._once},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"priority",{get:function(){return this._priority},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"[Slot listener: "+this._listener+", once: "+this._once+", priority: "+this._priority+", enabled: "+this._enabled+"]"},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this._signal.remove(this._listener)},e.prototype.verifyListener=function(e){if(null==e)throw new Error("Given listener is null.");if(null==this._signal)throw new Error("Internal signal reference has not been set yet.")},e}();oh.Slot=ah,Object.defineProperty(sh,"__esModule",{value:!0});var lh=rh,ch=oh,hh=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.slots=lh.SlotList.NIL,this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if(!(this._valueClasses[t]instanceof Object))throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+">."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slots.length},enumerable:!0,configurable:!0}),e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){var t=this.slots.find(e);return t?(this.slots=this.slots.filterNot(e),t):null},e.prototype.removeAll=function(){this.slots=lh.SlotList.NIL},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,s=e.length;if(s<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+s+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var i=this.slots;if(i.nonEmpty)for(;i.nonEmpty;)i.head.execute(e),i=i.tail},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.registrationPossible(e,t)){var n=new ch.Slot(e,this,t);return this.slots=this.slots.prepend(n),n}return this.slots.find(e)},e.prototype.registrationPossible=function(e,t){if(!this.slots.nonEmpty)return!0;var n=this.slots.find(e);if(!n)return!0;if(n.once!==t)throw new Error("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},e}();sh.OnceSignal=hh,Object.defineProperty(nh,"__esModule",{value:!0});var uh=eh,dh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh.__extends(t,e),t.prototype.add=function(e){return this.registerListener(e)},t}(sh.OnceSignal);nh.Signal=dh,Object.defineProperty(th,"__esModule",{value:!0});var ph=eh,mh=oh,fh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ph.__extends(t,e),t.prototype.addWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!1,t)},t.prototype.addOnceWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!0,t)},t.prototype.registerListener=function(e,t){return void 0===t&&(t=!1),this.registerListenerWithPriority(e,t)},t.prototype.registerListenerWithPriority=function(e,t,n){if(void 0===n&&(n=0),this.registrationPossible(e,t)){var s=new mh.Slot(e,this,t,n);return this.slots=this.slots.insertWithPriority(s),s}return this.slots.find(e)},t}(nh.Signal);th.PrioritySignal=fh,Object.defineProperty($c,"__esModule",{value:!0});var gh=eh,yh=function(e){function t(t){void 0===t&&(t=null);for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var r=this;return n=1===n.length&&n[0]instanceof Array?n[0]:n,(r=e.call(this,n)||this)._target=t,r}return gh.__extends(t,e),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){e!==this._target&&(this.removeAll(),this._target=e)},enumerable:!0,configurable:!0}),t.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,s=e.length;if(s<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+s+".");for(var r=0;r<n;r++)if(null!==e[r]&&e[r].constructor!==this._valueClasses[r])throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var i=e[0];i&&(i.target&&(i=i.clone(),e[0]=i),i.target=this.target,i.currentTarget=this.target,i.signal=this);for(var o=this.slots;o.nonEmpty;)o.head.execute(e),o=o.tail;if(i&&i.bubbles)for(var a=this.target;a&&a.hasOwnProperty("parent")&&(null===(a=a.parent).onEventBubbled||(i.currentTarget=a,a.onEventBubbled(i))););},t}(th.PrioritySignal);$c.DeluxeSignal=yh;var vh={};Object.defineProperty(vh,"__esModule",{value:!0});var wh=function(){function e(e){void 0===e&&(e=!1),this._bubbles=e}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},set:function(e){this._signal=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(e){this._target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},set:function(e){this._currentTarget=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bubbles",{get:function(){return this._bubbles},set:function(e){this._bubbles=e},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._bubbles)},e}();vh.GenericEvent=wh;var bh={};Object.defineProperty(bh,"__esModule",{value:!0}),bh.IOnceSignal=Symbol("IOnceSignal");var xh={};Object.defineProperty(xh,"__esModule",{value:!0}),xh.IPrioritySignal=Symbol("IPrioritySignal");var Th={};Object.defineProperty(Th,"__esModule",{value:!0}),Th.ISignal=Symbol("ISignal");var Sh={};Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.ISlot=Symbol("ISlot");var Oh={};Object.defineProperty(Oh,"__esModule",{value:!0});var Mh=oh,Eh=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if("function"!=typeof this._valueClasses[t])throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+"'>."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slot?1:0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){return this.registerListener(e)},e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){if(this.slot&&this.slot.listener===e){var t=this.slot;return this.slot=null,t}return null},e.prototype.removeAll=function(){this.slot&&this.slot.remove()},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,s=e.length;if(s<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+s+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");this.slot&&this.slot.execute(e)},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.slot)throw new Error("You cannot add or addOnce with a listener already added, remove the current listener first.");return this.slot=new Mh.Slot(e,this,t)},e}();Oh.MonoSignal=Eh;var Ch={};Object.defineProperty(Ch,"__esModule",{value:!0});var Dh=eh,Ph=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dh.__extends(t,e),t.prototype.addOnce=function(t){var n=e.prototype.addOnce.call(this,t);return this.isDispatched&&(n.execute(this.valueObjects),n.remove()),n},t.prototype.dispatch=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDispatched)throw new Error("You cannot dispatch() a Promise more than once");this.isDispatched=!0,this.valueObjects=t,e.prototype.dispatch.apply(this,t)},t}(sh.OnceSignal);Ch.Promise=Ph,Object.defineProperty(Jc,"__esModule",{value:!0});var Ih=$c;Jc.DeluxeSignal=Ih.DeluxeSignal;var Ah=vh;Jc.GenericEvent=Ah.GenericEvent;var Lh=bh;Jc.IOnceSignal=Lh.IOnceSignal;var jh=xh;Jc.IPrioritySignal=jh.IPrioritySignal;var _h=Th;Jc.ISignal=_h.ISignal;var Fh=Sh;Jc.ISlot=Fh.ISlot;var Rh=Oh;Jc.MonoSignal=Rh.MonoSignal;var Bh=sh;Jc.OnceSignal=Bh.OnceSignal;var Uh=th;Jc.PrioritySignal=Uh.PrioritySignal;var kh=Ch;Jc.Promise=kh.Promise;var Nh=nh,zh=Jc.Signal=Nh.Signal,Gh=oh;Jc.Slot=Gh.Slot;var Vh=rh;Jc.SlotList=Vh.SlotList;class Hh{constructor(){this.objects=new Map,this.classified={Group:new Set,Light:new Set,Model:new Set,Poi:new Set,PoiNode:new Set,Canvas3D:new Set,Topology:new Set,Helper:new Set,Decal:new Set,PluginObject:new Set}}dispose(){this.objects.clear(),Object.values(this.classified).forEach((e=>e.clear()))}}class Wh{constructor(e,t,n){this.type=e,this.viewport=t,this.objectsCache=n,this.scene=this.viewport.scene}createGroup(e,t){const n=new Va(e);return null!==t&&this.viewport.scener.addObject(n,t),n}clear(){this.getAll().forEach((e=>{this.viewport.scener.removeObject(e)}))}getAll(){return[...this.objectsCache]}hideAll(){this.getAll().forEach((e=>{e.hide?e.hide():e.visible=!1})),this.viewport.signals.objectChanged.dispatch()}showAll(){this.getAll().forEach((e=>{e.show?e.show():e.visible=!0})),this.viewport.signals.objectChanged.dispatch()}}class Kh extends Wh{constructor(e,t){super(Xs.Light,e,t.classified.Light),this.viewport=e,this.cache=t,kn.init()}createAmbientLight(e){const{id:t,name:n="",color:s=10132122,intensity:r=10}=e,i=new ht(s,r);return i.name=n,i.userData.sid=t,i.userData.stype="Light",this.viewport.scener.addObject(i,this.scene),i}setAmbientLight(e,t){const{name:n="",color:s=10132122,intensity:r=10}=t;return!!e&&(e.name=n,e.color=new u(s),e.intensity=r,this.viewport.signals.objectChanged.dispatch(),!0)}createDirectionalLight(e){const{id:t,name:n="",color:s=10132122,intensity:r=10,position:i={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new ut(s,r);if(h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(i.x,i.y,i.z),h.target.name=`${n}-target`,h.target.position.set(o.x,o.y,o.z),h.castShadow=a,a){const e=h.position.distanceTo(h.target.position);h.shadow.bias=-.005,h.shadow.camera.left=-e,h.shadow.camera.right=e,h.shadow.camera.top=e,h.shadow.camera.bottom=-e,h.shadow.camera.far=e,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(h,this.scene),this.viewport.scener.addObject(h.target,this.scene),h}setDirectionalLight(e,t){const{name:n="",color:s=10132122,intensity:r=10,position:i={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;if(!e)return!1;if(e.name=n,e.color=new u(s),e.intensity=r,e.position.set(i.x,i.y,i.z),e.target.position.set(o.x,o.y,o.z),e.castShadow=a,a){const t=e.position.distanceTo(e.target.position);e.shadow.bias=-.005,e.shadow.camera.left=-t,e.shadow.camera.right=t,e.shadow.camera.top=t,e.shadow.camera.bottom=-t,e.shadow.camera.far=t,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createHemisphereLight(e){const{id:t,name:n="",skyColor:s=16777215,groundColor:r=14540253,intensity:i=10,position:o={x:0,y:0,z:0}}=e,a=new dt(s,r,i);return a.name=n,a.position.set(o.x,o.y,o.z),a.userData.sid=t,a.userData.stype="Light",this.viewport.scener.addObject(a,this.scene),a}setHemisphereLight(e,t){const{name:n="",skyColor:s=16777215,groundColor:r=14540253,intensity:i=10,position:o={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(s),e.groundColor=new u(r),e.intensity=i,e.position.set(o.x,o.y,o.z),this.viewport.signals.objectChanged.dispatch(),!0)}createSpotLight(e){const{id:t,name:n="",color:s=16777215,intensity:r=10,angle:i=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=e,u=sr(o).distanceTo(sr(a)),d=new pt(s,r,u,Math.PI/360*i,0,0);if(d.name=n,d.position.set(o.x,o.y,o.z),d.userData.sid=t,d.userData.stype="Light",d.castShadow=l,d.target.position.set(a.x,a.y,a.z),d.target.castShadow=l,d.target.receiveShadow=!0,d.target.updateMatrixWorld(),l){const e=d.position.distanceTo(d.target.position);d.shadow.autoUpdate=c,d.shadow.needsUpdate=!c,d.shadow.mapSize.width=h,d.shadow.mapSize.height=h,d.shadow.bias=-.005,d.shadow.focus=.6,d.shadow.camera.far=e,d.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(d,this.scene),d}setSpotLight(e,t){const{name:n="",color:s=16777215,intensity:r=10,angle:i=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=t;if(!e)return!1;const d=sr(o).distanceTo(sr(a));if(e.name=n,e.color=new u(s),e.intensity=r,e.distance=d,e.angle=Math.PI/360*i,e.position.set(o.x,o.y,o.z),e.castShadow=l,e.target.position.set(a.x,a.y,a.z),e.target.castShadow=l,e.target.updateMatrixWorld(),l){const t=e.position.distanceTo(e.target.position);e.shadow.autoUpdate=c,e.shadow.needsUpdate=!c,e.shadow.mapSize.width=h,e.shadow.mapSize.height=h,e.shadow.bias=-.005,e.shadow.focus=.6,e.shadow.camera.far=t,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createPointLight(e){const{id:t,name:n="",color:s=16777215,intensity:r=10,distance:i=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new mt(s,r,i);return h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(o.x,o.y,o.z),h.castShadow=a,a&&(h.shadow.bias=-.005,h.shadow.camera.far=i,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()),this.viewport.scener.addObject(h,this.scene),h}setPointLight(e,t){const{name:n="",color:s=16777215,intensity:r=10,distance:i=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;return!!e&&(e.name=n,e.color=new u(s),e.intensity=r,e.distance=i,e.position.set(o.x,o.y,o.z),e.castShadow=a,a&&(e.shadow.bias=-.005,e.shadow.camera.far=i,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()),this.viewport.signals.objectChanged.dispatch(),!0)}createRectAreaLight(e){const{id:t,name:n="",color:s=16777215,intensity:r=10,width:i=10,height:o=10,position:a={x:0,y:0,z:0}}=e,l=new ft(s,r,i,o);return l.name=n,l.userData.sid=t,l.userData.stype="Light",l.position.set(a.x,a.y,a.z),this.viewport.scener.addObject(l,this.scene),l}setRectAreaLight(e,t){const{name:n="",color:s=16777215,intensity:r=10,width:i=10,height:o=10,position:a={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(s),e.intensity=r,e.width=i,e.height=o,e.position.set(a.x,a.y,a.z),this.viewport.signals.objectChanged.dispatch(),!0)}updateAllShadow(){this.getAll().forEach((e=>{var t;!1===(null===(t=e.shadow)||void 0===t?void 0:t.autoUpdate)&&(e.shadow.needsUpdate=!0)})),this.viewport.signals.objectChanged.dispatch()}dispose(){this.getAll().forEach((e=>{var t;null===(t=e.shadow)||void 0===t||t.dispose()}))}}let qh,Yh,Qh;class Xh extends gt{constructor(e){super(e)}load(e,t,n,s){const r=this,i=""===r.path?yt.extractUrlBase(e):r.path,o=new p(this.manager);o.setPath(r.path),o.setResponseType("arraybuffer"),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,(function(n){try{t(r.parse(n,i))}catch(t){s?s(t):console.error(t),r.manager.itemError(e)}}),n,s)}parse(e,t){if(function(e){const t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===pu(e,0,t.length)}(e))qh=(new tu).parse(e);else{const t=pu(e);if(!function(e){const t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let n=0;function s(t){const s=e[t-1];return e=e.slice(n+t),n++,s}for(let e=0;e<t.length;++e){if(s(1)===t[e])return!1}return!0}(t))throw new Error("THREE.FBXLoader: Unknown format.");if(ru(t)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+ru(t));qh=(new eu).parse(t)}const n=new f(this.manager).setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);return new Zh(n,this.manager).parse(qh)}}class Zh{constructor(e,t){this.textureLoader=e,this.manager=t}parse(){Yh=this.parseConnections();const e=this.parseImages(),t=this.parseTextures(e),n=this.parseMaterials(t),s=this.parseDeformers(),r=(new Jh).parse(s);return this.parseScene(s,r,n),Qh}parseConnections(){const e=new Map;if("Connections"in qh){qh.Connections.connections.forEach((function(t){const n=t[0],s=t[1],r=t[2];e.has(n)||e.set(n,{parents:[],children:[]});const i={ID:s,relationship:r};e.get(n).parents.push(i),e.has(s)||e.set(s,{parents:[],children:[]});const o={ID:n,relationship:r};e.get(s).children.push(o)}))}return e}parseImages(){const e={},t={};if("Video"in qh.Objects){const n=qh.Objects.Video;for(const s in n){const r=n[s];if(e[parseInt(s)]=r.RelativeFilename||r.Filename,"Content"in r){const e=r.Content instanceof ArrayBuffer&&r.Content.byteLength>0,i="string"==typeof r.Content&&""!==r.Content;if(e||i){const e=this.parseImage(n[s]);t[r.RelativeFilename||r.Filename]=e}}}}for(const n in e){const s=e[n];void 0!==t[s]?e[n]=t[s]:e[n]=e[n].split("\\").pop()}return e}parseImage(e){const t=e.Content,n=e.RelativeFilename||e.Filename,s=n.slice(n.lastIndexOf(".")+1).toLowerCase();let r;switch(s){case"bmp":r="image/bmp";break;case"jpg":case"jpeg":r="image/jpeg";break;case"png":r="image/png";break;case"tif":r="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",n),r="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+s+'" is not supported.')}if("string"==typeof t)return"data:"+r+";base64,"+t;{const e=new Uint8Array(t);return window.URL.createObjectURL(new Blob([e],{type:r}))}}parseTextures(e){const t=new Map;if("Texture"in qh.Objects){const n=qh.Objects.Texture;for(const s in n){const r=this.parseTexture(n[s],e);t.set(parseInt(s),r)}}return t}parseTexture(e,t){const n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;const s=e.WrapModeU,r=e.WrapModeV,i=void 0!==s?s.value:0,o=void 0!==r?r.value:0;if(n.wrapS=0===i?Pe:vt,n.wrapT=0===o?Pe:vt,"Scaling"in e){const t=e.Scaling.value;n.repeat.x=t[0],n.repeat.y=t[1]}if("Translation"in e){const t=e.Translation.value;n.offset.x=t[0],n.offset.y=t[1]}return n}loadTexture(e,t){let n;const s=this.textureLoader.path,r=Yh.get(e.id).children;let i;void 0!==r&&r.length>0&&void 0!==t[r[0].ID]&&(n=t[r[0].ID],0!==n.indexOf("blob:")&&0!==n.indexOf("data:")||this.textureLoader.setPath(void 0));const o=e.FileName.slice(-3).toLowerCase();if("tga"===o){const t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),i=new d):(t.setPath(this.textureLoader.path),i=t.load(n))}else"psd"===o?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),i=new d):i=this.textureLoader.load(n);return this.textureLoader.setPath(s),i}parseMaterials(e){const t=new Map;if("Material"in qh.Objects){const n=qh.Objects.Material;for(const s in n){const r=this.parseMaterial(n[s],e);null!==r&&t.set(parseInt(s),r)}}return t}parseMaterial(e,t){const n=e.id,s=e.attrName;let r=e.ShadingModel;if("object"==typeof r&&(r=r.value),!Yh.has(n))return null;const i=this.parseParameters(e,t,n);let o;return r.toLowerCase(),o=new Y,o.setValues(i),o.name=s,o}parseParameters(e,t,n){const s={};e.BumpFactor&&(s.bumpScale=e.BumpFactor.value),e.Diffuse?s.color=(new u).fromArray(e.Diffuse.value).convertSRGBToLinear():!e.DiffuseColor||"Color"!==e.DiffuseColor.type&&"ColorRGB"!==e.DiffuseColor.type||(s.color=(new u).fromArray(e.DiffuseColor.value).convertSRGBToLinear()),e.DisplacementFactor&&(s.displacementScale=e.DisplacementFactor.value),e.Emissive?s.emissive=(new u).fromArray(e.Emissive.value).convertSRGBToLinear():!e.EmissiveColor||"Color"!==e.EmissiveColor.type&&"ColorRGB"!==e.EmissiveColor.type||(s.emissive=(new u).fromArray(e.EmissiveColor.value).convertSRGBToLinear()),e.EmissiveFactor&&(s.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(s.opacity=parseFloat(e.Opacity.value)),s.opacity<1&&(s.transparent=!0),e.ReflectionFactor,e.Shininess,e.Specular||e.SpecularColor&&e.SpecularColor.type;const r=this;return Yh.get(n).children.forEach((function(e){const n=e.relationship;switch(n){case"Bump":s.bumpMap=r.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":s.aoMap=r.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":s.map=r.getTexture(t,e.ID),void 0!==s.map&&(s.map.colorSpace=$);break;case"DisplacementColor":s.displacementMap=r.getTexture(t,e.ID);break;case"EmissiveColor":s.emissiveMap=r.getTexture(t,e.ID),void 0!==s.emissiveMap&&(s.emissiveMap.colorSpace=$);break;case"NormalMap":case"Maya|TEX_normal_map":s.normalMap=r.getTexture(t,e.ID);break;case"ReflectionColor":s.envMap=r.getTexture(t,e.ID),void 0!==s.envMap&&(s.envMap.mapping=h,s.envMap.colorSpace=$);break;case"SpecularColor":s.specularMap=r.getTexture(t,e.ID),void 0!==s.specularMap&&(s.specularMap.colorSpace=$);break;case"TransparentColor":case"TransparencyFactor":s.alphaMap=r.getTexture(t,e.ID),s.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",n)}})),s}getTexture(e,t){return"LayeredTexture"in qh.Objects&&t in qh.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Yh.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in qh.Objects){const n=qh.Objects.Deformer;for(const s in n){const r=n[s],i=Yh.get(parseInt(s));if("Skin"===r.attrType){const t=this.parseSkeleton(i,n);t.ID=s,i.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=i.parents[0].ID,e[s]=t}else if("BlendShape"===r.attrType){const e={id:s};e.rawTargets=this.parseMorphTargets(i,n),e.id=s,i.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[s]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const n=[];return e.children.forEach((function(e){const s=t[e.ID];if("Cluster"!==s.attrType)return;const r={ID:e.ID,indices:[],weights:[],transformLink:(new y).fromArray(s.TransformLink.a)};"Indexes"in s&&(r.indices=s.Indexes.a,r.weights=s.Weights.a),n.push(r)})),{rawBones:n,bones:[]}}parseMorphTargets(e,t){const n=[];for(let s=0;s<e.children.length;s++){const r=e.children[s],i=t[r.ID],o={name:i.attrName,initialWeight:i.DeformPercent,id:i.id,fullWeights:i.FullWeights.a};if("BlendShapeChannel"!==i.attrType)return;o.geoID=Yh.get(parseInt(r.ID)).children.filter((function(e){return void 0===e.relationship}))[0].ID,n.push(o)}return n}parseScene(e,t,n){Qh=new st;const s=this.parseModels(e.skeletons,t,n),r=qh.Objects.Model,i=this;s.forEach((function(e){const t=r[e.ID];i.setLookAtProperties(e,t);Yh.get(e.ID).parents.forEach((function(t){const n=s.get(t.ID);void 0!==n&&n.add(e)})),null===e.parent&&Qh.add(e)})),this.bindSkeleton(e.skeletons,t,s),this.createAmbientLight(),Qh.traverse((function(e){if(e.userData.transformData){e.parent&&(e.userData.transformData.parentMatrix=e.parent.matrix,e.userData.transformData.parentMatrixWorld=e.parent.matrixWorld);const t=hu(e.userData.transformData);e.applyMatrix4(t),e.updateWorldMatrix()}}));const o=(new $h).parse();1===Qh.children.length&&Qh.children[0].isGroup&&(Qh.children[0].animations=o,Qh=Qh.children[0]),Qh.animations=o}parseModels(e,t,n){const s=new Map,r=qh.Objects.Model;for(const i in r){const o=parseInt(i),a=r[i],l=Yh.get(o);let c=this.buildSkeleton(l,e,o,a.attrName);if(!c){switch(a.attrType){case"Camera":c=this.createCamera(l);break;case"Light":c=this.createLight(l);break;case"Mesh":c=this.createMesh(l,t,n);break;case"NurbsCurve":c=this.createCurve(l,t);break;case"LimbNode":case"Root":c=new C;break;default:c=new st}c.name=a.attrName?wt.sanitizeNodeName(a.attrName):"",c.userData.originalName=a.attrName,c.ID=o}this.getTransformData(c,a),s.set(o,c)}return s}buildSkeleton(e,t,n,s){let r=null;return e.parents.forEach((function(e){for(const i in t){const o=t[i];o.rawBones.forEach((function(t,i){if(t.ID===e.ID){const e=r;r=new C,r.matrixWorld.copy(t.transformLink),r.name=s?wt.sanitizeNodeName(s):"",r.userData.originalName=s,r.ID=n,o.bones[i]=r,null!==e&&r.add(e)}}))}})),r}createCamera(e){let t,n;if(e.children.forEach((function(e){const t=qh.Objects.NodeAttribute[e.ID];void 0!==t&&(n=t)})),void 0===n)t=new o;else{let e=0;void 0!==n.CameraProjectionType&&1===n.CameraProjectionType.value&&(e=1);let s=1;void 0!==n.NearPlane&&(s=n.NearPlane.value/1e3);let r=1e3;void 0!==n.FarPlane&&(r=n.FarPlane.value/1e3);let i=window.innerWidth,a=window.innerHeight;void 0!==n.AspectWidth&&void 0!==n.AspectHeight&&(i=n.AspectWidth.value,a=n.AspectHeight.value);const l=i/a;let c=45;void 0!==n.FieldOfView&&(c=n.FieldOfView.value);const h=n.FocalLength?n.FocalLength.value:null;switch(e){case 0:t=new X(c,l,s,r),null!==h&&t.setFocalLength(h);break;case 1:t=new Q(-i/2,i/2,a/2,-a/2,s,r);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+e+"."),t=new o}}return t}createLight(e){let t,n;if(e.children.forEach((function(e){const t=qh.Objects.NodeAttribute[e.ID];void 0!==t&&(n=t)})),void 0===n)t=new o;else{let e;e=void 0===n.LightType?0:n.LightType.value;let s=16777215;void 0!==n.Color&&(s=(new u).fromArray(n.Color.value).convertSRGBToLinear());let r=void 0===n.Intensity?1:n.Intensity.value/100;void 0!==n.CastLightOnObject&&0===n.CastLightOnObject.value&&(r=0);let i=0;void 0!==n.FarAttenuationEnd&&(i=void 0!==n.EnableFarAttenuation&&0===n.EnableFarAttenuation.value?0:n.FarAttenuationEnd.value);const o=1;switch(e){case 0:t=new mt(s,r,i,o);break;case 1:t=new ut(s,r);break;case 2:let e=Math.PI/3;void 0!==n.InnerAngle&&(e=a.degToRad(n.InnerAngle.value));let l=0;void 0!==n.OuterAngle&&(l=a.degToRad(n.OuterAngle.value),l=Math.max(l,1)),t=new pt(s,r,i,e,l,o);break;default:console.warn("THREE.FBXLoader: Unknown light type "+n.LightType.value+", defaulting to a PointLight."),t=new mt(s,r)}void 0!==n.CastShadows&&1===n.CastShadows.value&&(t.castShadow=!0)}return t}createMesh(e,t,n){let s,r=null,i=null;const o=[];return e.children.forEach((function(e){t.has(e.ID)&&(r=t.get(e.ID)),n.has(e.ID)&&o.push(n.get(e.ID))})),o.length>1?i=o:o.length>0?i=o[0]:(i=new Y({name:gt.DEFAULT_MATERIAL_NAME,color:13421772}),o.push(i)),"color"in r.attributes&&o.forEach((function(e){e.vertexColors=!0})),r.FBX_Deformer?(s=new P(r,i),s.normalizeSkinWeights()):(s=new W(r,i),s.castShadow=!0,s.receiveShadow=!0),s}createCurve(e,t){const n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),s=new x({name:gt.DEFAULT_MATERIAL_NAME,color:3342591,linewidth:1});return new T(n,s)}getTransformData(e,t){const n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?uu(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n}setLookAtProperties(e,n){if("LookAtProperty"in n){Yh.get(e.ID).children.forEach((function(n){if("LookAtProperty"===n.relationship){const s=qh.Objects.Model[n.ID];if("Lcl_Translation"in s){const n=s.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(n),Qh.add(e.target)):e.lookAt((new t).fromArray(n))}}}))}}bindSkeleton(e,t,n){const s=this.parsePoseNodes();for(const r in e){const i=e[r];Yh.get(parseInt(i.ID)).parents.forEach((function(e){if(t.has(e.ID)){const t=e.ID;Yh.get(t).parents.forEach((function(e){if(n.has(e.ID)){n.get(e.ID).bind(new I(i.bones),s[e.ID])}}))}}))}}parsePoseNodes(){const e={};if("Pose"in qh.Objects){const t=qh.Objects.Pose;for(const n in t)if("BindPose"===t[n].attrType&&t[n].NbPoseNodes>0){const s=t[n].PoseNode;Array.isArray(s)?s.forEach((function(t){e[t.Node]=(new y).fromArray(t.Matrix.a)})):e[s.Node]=(new y).fromArray(s.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in qh&&"AmbientColor"in qh.GlobalSettings){const e=qh.GlobalSettings.AmbientColor.value,t=e[0],n=e[1],s=e[2];if(0!==t||0!==n||0!==s){const e=new u(t,n,s).convertSRGBToLinear();Qh.add(new ht(e,1))}}}}class Jh{constructor(){this.negativeMaterialIndices=!1}parse(e){const t=new Map;if("Geometry"in qh.Objects){const n=qh.Objects.Geometry;for(const s in n){const r=Yh.get(parseInt(s)),i=this.parseGeometry(r,n[s],e);t.set(parseInt(s),i)}}return!0===this.negativeMaterialIndices&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,n){const s=n.skeletons,r=[],i=e.parents.map((function(e){return qh.Objects.Model[e.ID]}));if(0===i.length)return;const o=e.children.reduce((function(e,t){return void 0!==s[t.ID]&&(e=s[t.ID]),e}),null);e.children.forEach((function(e){void 0!==n.morphTargets[e.ID]&&r.push(n.morphTargets[e.ID])}));const a=i[0],l={};"RotationOrder"in a&&(l.eulerOrder=uu(a.RotationOrder.value)),"InheritType"in a&&(l.inheritType=parseInt(a.InheritType.value)),"GeometricTranslation"in a&&(l.translation=a.GeometricTranslation.value),"GeometricRotation"in a&&(l.rotation=a.GeometricRotation.value),"GeometricScaling"in a&&(l.scale=a.GeometricScaling.value);const c=hu(l);return this.genGeometry(t,o,r,c)}genGeometry(e,t,n,s){const r=new w;e.attrName&&(r.name=e.attrName);const i=this.parseGeoNode(e,t),o=this.genBuffers(i),a=new b(o.vertex,3);if(a.applyMatrix4(s),r.setAttribute("position",a),o.colors.length>0&&r.setAttribute("color",new b(o.colors,3)),t&&(r.setAttribute("skinIndex",new D(o.weightsIndices,4)),r.setAttribute("skinWeight",new b(o.vertexWeights,4)),r.FBX_Deformer=t),o.normal.length>0){const e=(new nt).getNormalMatrix(s),t=new b(o.normal,3);t.applyNormalMatrix(e),r.setAttribute("normal",t)}if(o.uvs.forEach((function(e,t){const n=0===t?"uv":`uv${t}`;r.setAttribute(n,new b(o.uvs[t],2))})),i.material&&"AllSame"!==i.material.mappingType){let e=o.materialIndex[0],t=0;if(o.materialIndex.forEach((function(n,s){n!==e&&(r.addGroup(t,s-t,e),e=n,t=s)})),r.groups.length>0){const t=r.groups[r.groups.length-1],n=t.start+t.count;n!==o.materialIndex.length&&r.addGroup(n,o.materialIndex.length-n,e)}0===r.groups.length&&r.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(r,e,n,s),r}parseGeoNode(e,t){const n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&n.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(s,r){void 0===n.weightTable[s]&&(n.weightTable[s]=[]),n.weightTable[s].push({id:t,weight:e.weights[r]})}))}))),n}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let n=0,s=0,r=!1,i=[],o=[],a=[],l=[],c=[],h=[];const u=this;return e.vertexIndices.forEach((function(d,p){let m,f=!1;d<0&&(d^=-1,f=!0);let g=[],y=[];if(i.push(3*d,3*d+1,3*d+2),e.color){const t=au(p,n,d,e.color);a.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){y.push(e.weight),g.push(e.id)})),y.length>4){r||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),r=!0);const e=[0,0,0,0],t=[0,0,0,0];y.forEach((function(n,s){let r=n,i=g[s];t.forEach((function(t,n,s){if(r>t){s[n]=r,r=t;const o=e[n];e[n]=i,i=o}}))})),g=e,y=t}for(;y.length<4;)y.push(0),g.push(0);for(let e=0;e<4;++e)c.push(y[e]),h.push(g[e])}if(e.normal){const t=au(p,n,d,e.normal);o.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(m=au(p,n,d,e.material)[0],m<0&&(u.negativeMaterialIndices=!0,m=0)),e.uv&&e.uv.forEach((function(e,t){const s=au(p,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(s[0]),l[t].push(s[1])})),s++,f&&(u.genFace(t,e,i,m,o,a,l,c,h,s),n++,s=0,i=[],o=[],a=[],l=[],c=[],h=[])})),t}getNormalNewell(e){const n=new t(0,0,0);for(let t=0;t<e.length;t++){const s=e[t],r=e[(t+1)%e.length];n.x+=(s.y-r.y)*(s.z+r.z),n.y+=(s.z-r.z)*(s.x+r.x),n.z+=(s.x-r.x)*(s.y+r.y)}return n.normalize(),n}getNormalTangentAndBitangent(e){const n=this.getNormalNewell(e),s=(Math.abs(n.z)>.5?new t(0,1,0):new t(0,0,1)).cross(n).normalize(),r=n.clone().cross(s).normalize();return{normal:n,tangent:s,bitangent:r}}flattenVertex(e,t,n){return new g(e.dot(t),e.dot(n))}genFace(e,n,s,r,i,o,a,l,c,h){let u;if(h>3){const e=[];for(let r=0;r<s.length;r+=3)e.push(new t(n.vertexPositions[s[r]],n.vertexPositions[s[r+1]],n.vertexPositions[s[r+2]]));const{tangent:r,bitangent:i}=this.getNormalTangentAndBitangent(e),o=[];for(const t of e)o.push(this.flattenVertex(t,r,i));u=bt.triangulateShape(o,[])}else u=[[0,1,2]];for(const[t,h,d]of u)e.vertex.push(n.vertexPositions[s[3*t]]),e.vertex.push(n.vertexPositions[s[3*t+1]]),e.vertex.push(n.vertexPositions[s[3*t+2]]),e.vertex.push(n.vertexPositions[s[3*h]]),e.vertex.push(n.vertexPositions[s[3*h+1]]),e.vertex.push(n.vertexPositions[s[3*h+2]]),e.vertex.push(n.vertexPositions[s[3*d]]),e.vertex.push(n.vertexPositions[s[3*d+1]]),e.vertex.push(n.vertexPositions[s[3*d+2]]),n.skeleton&&(e.vertexWeights.push(l[4*t]),e.vertexWeights.push(l[4*t+1]),e.vertexWeights.push(l[4*t+2]),e.vertexWeights.push(l[4*t+3]),e.vertexWeights.push(l[4*h]),e.vertexWeights.push(l[4*h+1]),e.vertexWeights.push(l[4*h+2]),e.vertexWeights.push(l[4*h+3]),e.vertexWeights.push(l[4*d]),e.vertexWeights.push(l[4*d+1]),e.vertexWeights.push(l[4*d+2]),e.vertexWeights.push(l[4*d+3]),e.weightsIndices.push(c[4*t]),e.weightsIndices.push(c[4*t+1]),e.weightsIndices.push(c[4*t+2]),e.weightsIndices.push(c[4*t+3]),e.weightsIndices.push(c[4*h]),e.weightsIndices.push(c[4*h+1]),e.weightsIndices.push(c[4*h+2]),e.weightsIndices.push(c[4*h+3]),e.weightsIndices.push(c[4*d]),e.weightsIndices.push(c[4*d+1]),e.weightsIndices.push(c[4*d+2]),e.weightsIndices.push(c[4*d+3])),n.color&&(e.colors.push(o[3*t]),e.colors.push(o[3*t+1]),e.colors.push(o[3*t+2]),e.colors.push(o[3*h]),e.colors.push(o[3*h+1]),e.colors.push(o[3*h+2]),e.colors.push(o[3*d]),e.colors.push(o[3*d+1]),e.colors.push(o[3*d+2])),n.material&&"AllSame"!==n.material.mappingType&&(e.materialIndex.push(r),e.materialIndex.push(r),e.materialIndex.push(r)),n.normal&&(e.normal.push(i[3*t]),e.normal.push(i[3*t+1]),e.normal.push(i[3*t+2]),e.normal.push(i[3*h]),e.normal.push(i[3*h+1]),e.normal.push(i[3*h+2]),e.normal.push(i[3*d]),e.normal.push(i[3*d+1]),e.normal.push(i[3*d+2])),n.uv&&n.uv.forEach((function(n,s){void 0===e.uvs[s]&&(e.uvs[s]=[]),e.uvs[s].push(a[s][2*t]),e.uvs[s].push(a[s][2*t+1]),e.uvs[s].push(a[s][2*h]),e.uvs[s].push(a[s][2*h+1]),e.uvs[s].push(a[s][2*d]),e.uvs[s].push(a[s][2*d+1])}))}addMorphTargets(e,t,n,s){if(0===n.length)return;e.morphTargetsRelative=!0,e.morphAttributes.position=[];const r=this;n.forEach((function(n){n.rawTargets.forEach((function(n){const i=qh.Objects.Geometry[n.geoID];void 0!==i&&r.genMorphGeometry(e,t,i,s,n.name)}))}))}genMorphGeometry(e,t,n,s,r){const i=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],o=void 0!==n.Vertices?n.Vertices.a:[],a=void 0!==n.Indexes?n.Indexes.a:[],l=3*e.attributes.position.count,c=new Float32Array(l);for(let e=0;e<a.length;e++){const t=3*a[e];c[t]=o[3*e],c[t+1]=o[3*e+1],c[t+2]=o[3*e+2]}const h={vertexIndices:i,vertexPositions:c},u=this.genBuffers(h),d=new b(u.vertex,3);d.name=r||n.attrName,d.applyMatrix4(s),e.morphAttributes.position.push(d)}parseNormals(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,s=e.Normals.a;let r=[];return"IndexToDirect"===n&&("NormalIndex"in e?r=e.NormalIndex.a:"NormalsIndex"in e&&(r=e.NormalsIndex.a)),{dataSize:3,buffer:s,indices:r,mappingType:t,referenceType:n}}parseUVs(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,s=e.UV.a;let r=[];return"IndexToDirect"===n&&(r=e.UVIndex.a),{dataSize:2,buffer:s,indices:r,mappingType:t,referenceType:n}}parseVertexColors(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,s=e.Colors.a;let r=[];"IndexToDirect"===n&&(r=e.ColorIndex.a);for(let e=0,t=new u;e<s.length;e+=4)t.fromArray(s,e).convertSRGBToLinear().toArray(s,e);return{dataSize:4,buffer:s,indices:r,mappingType:t,referenceType:n}}parseMaterialIndices(e){const t=e.MappingInformationType,n=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};const s=e.Materials.a,r=[];for(let e=0;e<s.length;++e)r.push(e);return{dataSize:1,buffer:s,indices:r,mappingType:t,referenceType:n}}parseNurbsGeometry(e){const t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new w;const n=t-1,s=e.KnotVector.a,r=[],i=e.Points.a;for(let e=0,t=i.length;e<t;e+=4)r.push((new te).fromArray(i,e));let o,a;if("Closed"===e.Form)r.push(r[0]);else if("Periodic"===e.Form){o=n,a=s.length-1-o;for(let e=0;e<n;++e)r.push(r[e])}const l=new Yn(n,s,r,o,a).getPoints(12*r.length);return(new w).setFromPoints(l)}}class $h{parse(){const e=[],t=this.parseClips();if(void 0!==t)for(const n in t){const s=t[n],r=this.addClip(s);e.push(r)}return e}parseClips(){if(void 0===qh.Objects.AnimationCurve)return;const e=this.parseAnimationCurveNodes();this.parseAnimationCurves(e);const t=this.parseAnimationLayers(e);return this.parseAnimStacks(t)}parseAnimationCurveNodes(){const e=qh.Objects.AnimationCurveNode,t=new Map;for(const n in e){const s=e[n];if(null!==s.attrName.match(/S|R|T|DeformPercent/)){const e={id:s.id,attr:s.attrName,curves:{}};t.set(e.id,e)}}return t}parseAnimationCurves(e){const t=qh.Objects.AnimationCurve;for(const n in t){const s={id:t[n].id,times:t[n].KeyTime.a.map(iu),values:t[n].KeyValueFloat.a},r=Yh.get(s.id);if(void 0!==r){const t=r.parents[0].ID,n=r.parents[0].relationship;n.match(/X/)?e.get(t).curves.x=s:n.match(/Y/)?e.get(t).curves.y=s:n.match(/Z/)?e.get(t).curves.z=s:n.match(/DeformPercent/)&&e.has(t)&&(e.get(t).curves.morph=s)}}}parseAnimationLayers(e){const t=qh.Objects.AnimationLayer,n=new Map;for(const s in t){const t=[],r=Yh.get(parseInt(s));if(void 0!==r){r.children.forEach((function(n,s){if(e.has(n.ID)){const r=e.get(n.ID);if(void 0!==r.curves.x||void 0!==r.curves.y||void 0!==r.curves.z){if(void 0===t[s]){const e=Yh.get(n.ID).parents.filter((function(e){return void 0!==e.relationship}))[0].ID;if(void 0!==e){const r=qh.Objects.Model[e.toString()];if(void 0===r)return void console.warn("THREE.FBXLoader: Encountered a unused curve.",n);const i={modelName:r.attrName?wt.sanitizeNodeName(r.attrName):"",ID:r.id,initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};Qh.traverse((function(e){e.ID===r.id&&(i.transform=e.matrix,e.userData.transformData&&(i.eulerOrder=e.userData.transformData.eulerOrder))})),i.transform||(i.transform=new y),"PreRotation"in r&&(i.preRotation=r.PreRotation.value),"PostRotation"in r&&(i.postRotation=r.PostRotation.value),t[s]=i}}t[s]&&(t[s][r.attr]=r)}else if(void 0!==r.curves.morph){if(void 0===t[s]){const e=Yh.get(n.ID).parents.filter((function(e){return void 0!==e.relationship}))[0].ID,r=Yh.get(e).parents[0].ID,i=Yh.get(r).parents[0].ID,o=Yh.get(i).parents[0].ID,a=qh.Objects.Model[o],l={modelName:a.attrName?wt.sanitizeNodeName(a.attrName):"",morphName:qh.Objects.Deformer[e].attrName};t[s]=l}t[s][r.attr]=r}}})),n.set(parseInt(s),t)}}return n}parseAnimStacks(e){const t=qh.Objects.AnimationStack,n={};for(const s in t){const r=Yh.get(parseInt(s)).children;r.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const i=e.get(r[0].ID);n[s]={name:t[s].attrName,layer:i}}return n}addClip(e){let t=[];const n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new A(e.name,-1,t)}generateTracks(e){const n=[];let s=new t,r=new t;if(e.transform&&e.transform.decompose(s,new i,r),s=s.toArray(),r=r.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.T.curves,s,"position");void 0!==t&&n.push(t)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const t=this.generateRotationTrack(e.modelName,e.R.curves,e.preRotation,e.postRotation,e.eulerOrder);void 0!==t&&n.push(t)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.S.curves,r,"scale");void 0!==t&&n.push(t)}if(void 0!==e.DeformPercent){const t=this.generateMorphTrack(e);void 0!==t&&n.push(t)}return n}generateVectorTrack(e,t,n,s){const r=this.getTimesForAllAxes(t),i=this.getKeyframeTrackValues(r,t,n);return new L(e+"."+s,r,i)}generateRotationTrack(e,t,s,r,o){let l,c;if(void 0!==t.x&&void 0!==t.y&&void 0!==t.z){const e=this.interpolateRotations(t.x,t.y,t.z,o);l=e[0],c=e[1]}void 0!==s&&((s=s.map(a.degToRad)).push(o),s=(new n).fromArray(s),s=(new i).setFromEuler(s)),void 0!==r&&((r=r.map(a.degToRad)).push(o),r=(new n).fromArray(r),r=(new i).setFromEuler(r).invert());const h=new i,u=new n,d=[];if(!c||!l)return new j(e+".quaternion",[],[]);for(let e=0;e<c.length;e+=3){if(u.set(c[e],c[e+1],c[e+2],o),h.setFromEuler(u),void 0!==s&&h.premultiply(s),void 0!==r&&h.multiply(r),e>2){(new i).fromArray(d,(e-3)/3*4).dot(h)<0&&h.set(-h.x,-h.y,-h.z,-h.w)}h.toArray(d,e/3*4)}return new j(e+".quaternion",l,d)}generateMorphTrack(e){const t=e.DeformPercent.curves.morph,n=t.values.map((function(e){return e/100})),s=Qh.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new N(e.modelName+".morphTargetInfluences["+s+"]",t.times,n)}getTimesForAllAxes(e){let t=[];if(void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})),t.length>1){let e=1,n=t[0];for(let s=1;s<t.length;s++){const r=t[s];r!==n&&(t[e]=r,n=r,e++)}t=t.slice(0,e)}return t}getKeyframeTrackValues(e,t,n){const s=n,r=[];let i=-1,o=-1,a=-1;return e.forEach((function(e){if(t.x&&(i=t.x.times.indexOf(e)),t.y&&(o=t.y.times.indexOf(e)),t.z&&(a=t.z.times.indexOf(e)),-1!==i){const e=t.x.values[i];r.push(e),s[0]=e}else r.push(s[0]);if(-1!==o){const e=t.y.values[o];r.push(e),s[1]=e}else r.push(s[1]);if(-1!==a){const e=t.z.values[a];r.push(e),s[2]=e}else r.push(s[2])})),r}interpolateRotations(e,t,s,r){const o=[],l=[];o.push(e.times[0]),l.push(a.degToRad(e.values[0])),l.push(a.degToRad(t.values[0])),l.push(a.degToRad(s.values[0]));for(let c=1;c<e.values.length;c++){const h=[e.values[c-1],t.values[c-1],s.values[c-1]];if(isNaN(h[0])||isNaN(h[1])||isNaN(h[2]))continue;const u=h.map(a.degToRad),d=[e.values[c],t.values[c],s.values[c]];if(isNaN(d[0])||isNaN(d[1])||isNaN(d[2]))continue;const p=d.map(a.degToRad),m=[d[0]-h[0],d[1]-h[1],d[2]-h[2]],f=[Math.abs(m[0]),Math.abs(m[1]),Math.abs(m[2])];if(f[0]>=180||f[1]>=180||f[2]>=180){const t=Math.max(...f)/180,s=new n(...u,r),a=new n(...p,r),h=(new i).setFromEuler(s),d=(new i).setFromEuler(a);h.dot(d)&&d.set(-d.x,-d.y,-d.z,-d.w);const m=e.times[c-1],g=e.times[c]-m,y=new i,v=new n;for(let e=0;e<1;e+=1/t)y.copy(h.clone().slerp(d.clone(),e)),o.push(m+e*g),v.setFromQuaternion(y,r),l.push(v.x),l.push(v.y),l.push(v.z)}else o.push(e.times[c]),l.push(a.degToRad(e.values[c])),l.push(a.degToRad(t.values[c])),l.push(a.degToRad(s.values[c]))}return[o,l]}}class eu{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new su,this.nodeStack=[],this.currentProp=[],this.currentPropName="";const t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,s){const r=e.match(/^[\s\t]*;/),i=e.match(/^[\s\t]*$/);if(r||i)return;const o=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),a=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");o?t.parseNodeBegin(e,o):a?t.parseNodeProperty(e,a,n[++s]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)})),this.allNodes}parseNodeBegin(e,t){const n=t[1].trim().replace(/^"/,"").replace(/"$/,""),s=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),r={name:n},i=this.parseNodeAttr(s),o=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,r):n in o?("PoseNode"===n?o.PoseNode.push(r):void 0!==o[n].id&&(o[n]={},o[n][o[n].id]=o[n]),""!==i.id&&(o[n][i.id]=r)):"number"==typeof i.id?(o[n]={},o[n][i.id]=r):"Properties70"!==n&&(o[n]="PoseNode"===n?[r]:r),"number"==typeof i.id&&(r.id=i.id),""!==i.name&&(r.attrName=i.name),""!==i.type&&(r.attrType=i.type),this.pushStack(r)}parseNodeAttr(e){let t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));let n="",s="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),s=e[2]),{id:t,name:n,type:s}}parseNodeProperty(e,t,n){let s=t[1].replace(/^"/,"").replace(/"$/,"").trim(),r=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===s&&","===r&&(r=n.replace(/"/g,"").replace(/,$/,"").trim());const i=this.getCurrentNode();if("Properties70"!==i.name){if("C"===s){const e=r.split(",").slice(1),t=parseInt(e[0]),n=parseInt(e[1]);let o=r.split(",").slice(3);o=o.map((function(e){return e.trim().replace(/^"/,"")})),s="connections",r=[t,n],function(e,t){for(let n=0,s=e.length,r=t.length;n<r;n++,s++)e[s]=t[n]}(r,o),void 0===i[s]&&(i[s]=[])}"Node"===s&&(i.id=r),s in i&&Array.isArray(i[s])?i[s].push(r):"a"!==s?i[s]=r:i.a=r,this.setCurrentProp(i,s),"a"===s&&","!==r.slice(-1)&&(i.a=du(r))}else this.parseNodeSpecialProperty(e,s,r)}parseNodePropertyContinued(e){const t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=du(t.a))}parseNodeSpecialProperty(e,t,n){const s=n.split('",').map((function(e){return e.trim().replace(/^"/,"").replace(/\s/,"_")})),r=s[0],i=s[1],o=s[2],a=s[3];let l=s[4];switch(i){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=du(l)}this.getPrevNode()[r]={type:i,type2:o,flag:a,value:l},this.setCurrentProp(this.getPrevNode(),r)}}class tu{parse(e){const t=new nu(e);t.skip(23);const n=t.getUint32();if(n<6400)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+n);const s=new su;for(;!this.endOfContent(t);){const e=this.parseNode(t,n);null!==e&&s.add(e.name,e)}return s}endOfContent(e){return e.size()%16==0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const n={},s=t>=7500?e.getUint64():e.getUint32(),r=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const i=e.getUint8(),o=e.getString(i);if(0===s)return null;const a=[];for(let t=0;t<r;t++)a.push(this.parseProperty(e));const l=a.length>0?a[0]:"",c=a.length>1?a[1]:"",h=a.length>2?a[2]:"";for(n.singleProperty=1===r&&e.getOffset()===s;s>e.getOffset();){const s=this.parseNode(e,t);null!==s&&this.parseSubNode(o,n,s)}return n.propertyList=a,"number"==typeof l&&(n.id=l),""!==c&&(n.attrName=c),""!==h&&(n.attrType=h),""!==o&&(n.name=o),n}parseSubNode(e,t,n){if(!0===n.singleProperty){const e=n.propertyList[0];Array.isArray(e)?(t[n.name]=n,n.a=e):t[n.name]=e}else if("Connections"===e&&"C"===n.name){const e=[];n.propertyList.forEach((function(t,n){0!==n&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){let e=n.propertyList[0],s=n.propertyList[1];const r=n.propertyList[2],i=n.propertyList[3];let o;0===e.indexOf("Lcl ")&&(e=e.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[e]={type:s,type2:r,flag:i,value:o}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)}parseProperty(e){const t=e.getString(1);let n;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return n=e.getUint32(),e.getArrayBuffer(n);case"S":return n=e.getUint32(),e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const s=e.getUint32(),r=e.getUint32(),i=e.getUint32();if(0===r)switch(t){case"b":case"c":return e.getBooleanArray(s);case"d":return e.getFloat64Array(s);case"f":return e.getFloat32Array(s);case"i":return e.getInt32Array(s);case"l":return e.getInt64Array(s)}const o=qn.unzlibSync(new Uint8Array(e.getArrayBuffer(i))),a=new nu(o.buffer);switch(t){case"b":case"c":return a.getBooleanArray(s);case"d":return a.getFloat64Array(s);case"f":return a.getFloat32Array(s);case"i":return a.getInt32Array(s);case"l":return a.getInt64Array(s)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class nu{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let n=0;n<e;n++)t.push(this.getBoolean());return t}getUint8(){const e=this.dv.getUint8(this.offset);return this.offset+=1,e}getInt16(){const e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}getInt32(){const e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}getInt32Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getInt32());return t}getUint32(){const e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}getInt64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,e=4294967295&~e,4294967295===e&&(t=t+1&4294967295),e=e+1&4294967295,-(4294967296*t+e)):4294967296*t+e}getInt64Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getInt64());return t}getUint64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e}getFloat32(){const e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}getFloat32Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getFloat32());return t}getFloat64(){const e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}getFloat64Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getFloat64());return t}getArrayBuffer(e){const t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}getString(e){const t=this.offset;let n=new Uint8Array(this.dv.buffer,t,e);this.skip(e);const s=n.indexOf(0);return s>=0&&(n=new Uint8Array(this.dv.buffer,t,s)),this._textDecoder.decode(n)}}class su{add(e,t){this[e]=t}}function ru(e){const t=e.match(/FBXVersion: (\d+)/);if(t){return parseInt(t[1])}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function iu(e){return e/46186158e3}const ou=[];function au(e,t,n,s){let r;switch(s.mappingType){case"ByPolygonVertex":r=e;break;case"ByPolygon":r=t;break;case"ByVertice":r=n;break;case"AllSame":r=s.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+s.mappingType)}"IndexToDirect"===s.referenceType&&(r=s.indices[r]);const i=r*s.dataSize,o=i+s.dataSize;return function(e,t,n,s){for(let r=n,i=0;r<s;r++,i++)e[i]=t[r];return e}(ou,s.buffer,i,o)}const lu=new n,cu=new t;function hu(e){const s=new y,r=new y,i=new y,o=new y,l=new y,c=new y,h=new y,u=new y,d=new y,p=new y,m=new y,f=new y,g=e.inheritType?e.inheritType:0;if(e.translation&&s.setPosition(cu.fromArray(e.translation)),e.preRotation){const t=e.preRotation.map(a.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),r.makeRotationFromEuler(lu.fromArray(t))}if(e.rotation){const t=e.rotation.map(a.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),i.makeRotationFromEuler(lu.fromArray(t))}if(e.postRotation){const t=e.postRotation.map(a.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),o.makeRotationFromEuler(lu.fromArray(t)),o.invert()}e.scale&&l.scale(cu.fromArray(e.scale)),e.scalingOffset&&h.setPosition(cu.fromArray(e.scalingOffset)),e.scalingPivot&&c.setPosition(cu.fromArray(e.scalingPivot)),e.rotationOffset&&u.setPosition(cu.fromArray(e.rotationOffset)),e.rotationPivot&&d.setPosition(cu.fromArray(e.rotationPivot)),e.parentMatrixWorld&&(m.copy(e.parentMatrix),p.copy(e.parentMatrixWorld));const v=r.clone().multiply(i).multiply(o),w=new y;w.extractRotation(p);const b=new y;b.copyPosition(p);const x=b.clone().invert().multiply(p),T=w.clone().invert().multiply(x),S=l,O=new y;if(0===g)O.copy(w).multiply(v).multiply(T).multiply(S);else if(1===g)O.copy(w).multiply(T).multiply(v).multiply(S);else{const e=(new y).scale((new t).setFromMatrixScale(m)).clone().invert(),n=T.clone().multiply(e);O.copy(w).multiply(v).multiply(n).multiply(S)}const M=d.clone().invert(),E=c.clone().invert();let C=s.clone().multiply(u).multiply(d).multiply(r).multiply(i).multiply(o).multiply(M).multiply(h).multiply(c).multiply(l).multiply(E);const D=(new y).copyPosition(C),P=p.clone().multiply(D);return f.copyPosition(P),C=f.clone().multiply(O),C.premultiply(p.invert()),C}function uu(e){const t=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return 6===(e=e||0)?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),t[0]):t[e]}function du(e){return e.split(",").map((function(e){return parseFloat(e)}))}function pu(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.byteLength),(new TextDecoder).decode(new Uint8Array(e,t,n))}const mu=/^[og]\s*(.+)?/,fu=/^mtllib /,gu=/^usemtl /,yu=/^usemap /,vu=/\s+/,wu=new t,bu=new t,xu=new t,Tu=new t,Su=new t,Ou=new u;function Mu(){const e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){const n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);const s={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(s),s},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"==typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const s=this.vertices,r=this.object.geometry.vertices;r.push(s[e+0],s[e+1],s[e+2]),r.push(s[t+0],s[t+1],s[t+2]),r.push(s[n+0],s[n+1],s[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const s=this.normals,r=this.object.geometry.normals;r.push(s[e+0],s[e+1],s[e+2]),r.push(s[t+0],s[t+1],s[t+2]),r.push(s[n+0],s[n+1],s[n+2])},addFaceNormal:function(e,t,n){const s=this.vertices,r=this.object.geometry.normals;wu.fromArray(s,e),bu.fromArray(s,t),xu.fromArray(s,n),Su.subVectors(xu,bu),Tu.subVectors(wu,bu),Su.cross(Tu),Su.normalize(),r.push(Su.x,Su.y,Su.z),r.push(Su.x,Su.y,Su.z),r.push(Su.x,Su.y,Su.z)},addColor:function(e,t,n){const s=this.colors,r=this.object.geometry.colors;void 0!==s[e]&&r.push(s[e+0],s[e+1],s[e+2]),void 0!==s[t]&&r.push(s[t+0],s[t+1],s[t+2]),void 0!==s[n]&&r.push(s[n+0],s[n+1],s[n+2])},addUV:function(e,t,n){const s=this.uvs,r=this.object.geometry.uvs;r.push(s[e+0],s[e+1]),r.push(s[t+0],s[t+1]),r.push(s[n+0],s[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,s,r,i,o,a,l){const c=this.vertices.length;let h=this.parseVertexIndex(e,c),u=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(h,u,d),this.addColor(h,u,d),void 0!==o&&""!==o){const e=this.normals.length;h=this.parseNormalIndex(o,e),u=this.parseNormalIndex(a,e),d=this.parseNormalIndex(l,e),this.addNormal(h,u,d)}else this.addFaceNormal(h,u,d);if(void 0!==s&&""!==s){const e=this.uvs.length;h=this.parseUVIndex(s,e),u=this.parseUVIndex(r,e),d=this.parseUVIndex(i,e),this.addUV(h,u,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,s=e.length;n<s;n++){const s=this.parseVertexIndex(e[n],t);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";const n=this.vertices.length,s=this.uvs.length;for(let t=0,s=e.length;t<s;t++)this.addVertexLine(this.parseVertexIndex(e[t],n));for(let e=0,n=t.length;e<n;e++)this.addUVLine(this.parseUVIndex(t[e],s))}};return e.startObject("",!1),e}class Eu extends gt{constructor(e){super(e),this.materials=null}load(e,t,n,s){const r=this,i=new p(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,(function(n){try{t(r.parse(n))}catch(t){s?s(t):console.error(t),r.manager.itemError(e)}}),n,s)}setMaterials(e){return this.materials=e,this}parse(e){const t=new Mu;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));const n=e.split("\n");let s=[];for(let e=0,r=n.length;e<r;e++){const r=n[e].trimStart();if(0===r.length)continue;const i=r.charAt(0);if("#"!==i)if("v"===i){const e=r.split(vu);switch(e[0]){case"v":t.vertices.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])),e.length>=7?(Ou.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])).convertSRGBToLinear(),t.colors.push(Ou.r,Ou.g,Ou.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===i){const e=r.slice(1).trim().split(vu),n=[];for(let t=0,s=e.length;t<s;t++){const s=e[t];if(s.length>0){const e=s.split("/");n.push(e)}}const s=n[0];for(let e=1,r=n.length-1;e<r;e++){const r=n[e],i=n[e+1];t.addFace(s[0],r[0],i[0],s[1],r[1],i[1],s[2],r[2],i[2])}}else if("l"===i){const e=r.substring(1).trim().split(" ");let n=[];const s=[];if(-1===r.indexOf("/"))n=e;else for(let t=0,r=e.length;t<r;t++){const r=e[t].split("/");""!==r[0]&&n.push(r[0]),""!==r[1]&&s.push(r[1])}t.addLineGeometry(n,s)}else if("p"===i){const e=r.slice(1).trim().split(" ");t.addPointGeometry(e)}else if(null!==(s=mu.exec(r))){const e=(" "+s[0].slice(1).trim()).slice(1);t.startObject(e)}else if(gu.test(r))t.object.startMaterial(r.substring(7).trim(),t.materialLibraries);else if(fu.test(r))t.materialLibraries.push(r.substring(7).trim());else if(yu.test(r))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===i){if(s=r.split(" "),s.length>1){const e=s[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;const e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===r)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+r+'"')}}t.finalize();const r=new st;r.materialLibraries=[].concat(t.materialLibraries);if(!0===!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let e=0,n=t.objects.length;e<n;e++){const n=t.objects[e],s=n.geometry,i=n.materials,o="Line"===s.type,a="Points"===s.type;let l=!1;if(0===s.vertices.length)continue;const c=new w;c.setAttribute("position",new b(s.vertices,3)),s.normals.length>0&&c.setAttribute("normal",new b(s.normals,3)),s.colors.length>0&&(l=!0,c.setAttribute("color",new b(s.colors,3))),!0===s.hasUVIndices&&c.setAttribute("uv",new b(s.uvs,2));const h=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],s=n.name+"_"+n.smooth+"_"+l;let r=t.materials[s];if(null!==this.materials)if(r=this.materials.create(n.name),!o||!r||r instanceof x){if(a&&r&&!(r instanceof Tt)){const e=new Tt({size:10,sizeAttenuation:!1});xt.prototype.copy.call(e,r),e.color.copy(r.color),e.map=r.map,r=e}}else{const e=new x;xt.prototype.copy.call(e,r),e.color.copy(r.color),r=e}void 0===r&&(r=o?new x:a?new Tt({size:1,sizeAttenuation:!1}):new Y,r.name=n.name,r.flatShading=!n.smooth,r.vertexColors=l,t.materials[s]=r),h.push(r)}let u;if(h.length>1){for(let e=0,t=i.length;e<t;e++){const t=i[e];c.addGroup(t.groupStart,t.groupCount,e)}u=o?new K(c,h):a?new St(c,h):new W(c,h)}else u=o?new K(c,h[0]):a?new St(c,h[0]):new W(c,h[0]);u.name=n.name,r.add(u)}else if(t.vertices.length>0){const e=new Tt({size:1,sizeAttenuation:!1}),n=new w;n.setAttribute("position",new b(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute("color",new b(t.colors,3)),e.vertexColors=!0);const s=new St(n,e);r.add(s)}return r}}const Cu=new Map,Du=e=>{var t;return null!==(t=null==e?void 0:e.toLowerCase().endsWith(".png"))&&void 0!==t&&t},Pu=new TextDecoder,Iu=(e,t,n)=>{const s=e.buffer.slice(n,n+t);return Pu.decode(s).replace("\\","/")},Au=/^\w+:\/\//;const Lu=(e,t)=>{let n=t;const s=t.lastIndexOf("/");-1!==s&&(n=t.substring(s+1));let r=[];const i="http://guo.bin.yong",o=!Au.test(e);let a;if(o){r=function(e){let t=e.match(/(^[./]*)\/(.*)$/);return t?t.shift():t=[e],t}(e);const t=r.pop();a=new URL(t,i)}else a=new URL(e);const l=a.searchParams;let c=l.get("path"),h="";if(c){if(c.includes(".sbm")){const e=c.lastIndexOf("/");-1!==e&&(c=c.substring(0,e))}c+=`/Maps/${n}`,l.set("path",c),h=a.href}else{const e=a.href;h=new URL(`./Maps/${n}`,e).href}return o&&(h=h.substring(20)),h=h.replaceAll("#","%23"),h.length>0&&r.push(h),h=r.join("/"),h},ju=(e,t)=>{if(Cu.has(t)){const n=Cu.get(t);e.map=n,e.needsUpdate=!0,Fa.needsUpdate=!0}const n=new d;n.colorSpace=$,n.wrapS=Pe,n.wrapT=Pe,n.flipY=!1,n.anisotropy=16,n.mipmaps=[],n.generateMipmaps=!0,Dr.load(t,(s=>{n.image=s,n.needsUpdate=!0,Cu.set(t,n),e.map=n,e.needsUpdate=!0,Fa.needsUpdate=!0}))},_u=(e,t,n)=>{const[s,r,i,o,a]=t,l=n||o<1;return new Y({name:e,color:new u(s,r,i),opacity:o,transparent:l,alphaTest:.01,side:a})},Fu=new TextDecoder,Ru=new TextEncoder;function Bu(e){let t=8;const n=new Uint8Array(e,0,t);if("SBK-----"!==Fu.decode(n))return e;t+=130;const s=new Uint8Array(e,0,t);if(1===s[40]){const n=Ru.encode("SBM-----"),r=new Uint8Array([s[41]]),i=function(e){const t=new Uint8Array(64);return t.set(e.slice(0,8),0),t.set(e.slice(24,32),8),t.set(e.slice(40,56),16),t.set(e.slice(64,88),32),t.set(e.slice(96,104),56),t}(function(e){const t=new Uint8Array(128);return t.set(e.slice(42,74),0),t.set(e.slice(74,138),32),t.set(e.slice(8,40),96),t}(s));let o=66%i.length;const a=new Uint8Array(e,t+66),l=new Uint8Array(a.length);for(let e=0;e<a.length;e++)l[e]=a[e]^i[o],o=(o+1)%i.length;const c=new Uint8Array(n.length+r.length+l.length);return c.set(n),c.set(r,n.length),c.set(l,n.length+r.length),c.buffer}}const Uu=new TextDecoder;class ku{constructor(){this.materials=new Map,this.sbmInfo=null,this.isLE=!0}parseBuffer(e,t,n){const s=Bu(e);s&&(e=s),this.sbmInfo=t;const r=new DataView(e);let i=0;i+=8;const o=r.getUint8(i);return i+=1,1===o||2===o?this._parseV2(r,i,n):3===o?this._parseV3(r,i,n):Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})版本错误!`)}_parseV2(e,n,s){const r=performance.now(),i={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Qa(Object.assign(Object.assign({},this.sbmInfo),{format:Zs.sbm})),a=new Va({id:Xr()});o.add(a);const l=e.getUint16(n,this.isLE);n+=2;const c=e.getUint16(n,this.isLE);n+=2,i.total=c;const h={};for(let t=0;t<l;++t){const t=e.getUint16(n,this.isLE).toString();n+=2,h[t]={materialInfo:[]},e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;const s=e.getFloat32(n,this.isLE);n+=4;const r=e.getFloat32(n,this.isLE);n+=4;const i=e.getFloat32(n,this.isLE);n+=4;const o=e.getFloat32(n,this.isLE);n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;let a=e.getUint8(n);n+=1,0===a?a=he:1===a?a=ce:2===a&&(a=le);const l=e.getUint16(n,this.isLE);n+=2;const c=l>0?Iu(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[s,r,i,o,a],n=_u(t,e,Du(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,s=Lu(e,c);h[t].textureUrl=s,ju(n,s)}}}const u={};for(let o=0;o<c;++o){const o=e.getUint16(n,this.isLE).toString();n+=2;const l=e.getUint16(n,this.isLE).toString();n+=2,u[o]={materialId:l,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const c=[],h=[],d=[],p=[],m=e.getUint16(n,this.isLE);if(n+=2,m>0)for(let s=0;s<m;s++){const s=new t;s.setX(e.getFloat32(n,this.isLE)),n+=4,s.setY(e.getFloat32(n,this.isLE)),n+=4,s.setZ(e.getFloat32(n,this.isLE)),n+=4,c.push(s)}const f=e.getUint16(n,this.isLE);if(n+=2,f>0)for(let e=0;e<f;e++)n+=4,n+=4,n+=4;const y=e.getUint16(n,this.isLE);if(n+=2,y>0)for(let t=0;t<y;t++){const t=new g;t.setX(e.getFloat32(n,this.isLE)),n+=4,t.setY(e.getFloat32(n,this.isLE)),n+=4,h.push(t)}const b=e.getUint16(n,this.isLE);if(n+=2,b>0)for(let t=0;t<b;t++){const t=e.getUint16(n,this.isLE);n+=2;const s=e.getUint16(n,this.isLE);n+=2;const r=e.getUint16(n,this.isLE);n+=2;const i=[t,s,r];d.push(i),h.length>0&&p.push([h[i[0]],h[i[1]],h[i[2]]])}const x=[],T=[];for(let e=0;e<d.length;e++){const t=d[e],n=c[t[0]],s=c[t[1]],r=c[t[2]];x.push(...n.toArray(),...s.toArray(),...r.toArray());let i=new g,o=new g,a=new g;const l=p[e];void 0!==l&&(i=l[0],o=l[1],a=l[2]),T.push(...i.toArray(),...o.toArray(),...a.toArray())}const S=new Float32Array(x),O=new Float32Array(T);u[o].position=S.buffer,u[o].uv=O.buffer;const M=new w;S.length>0&&M.setAttribute("position",new v(S,3)),O.length>0&&M.setAttribute("uv",new v(O,2)),M.computeVertexNormals();const E=M.getAttribute("normal").array.buffer;if(u[o].normal=E,this.materials.has(l)){const e=new W(M,this.materials.get(l));e.name=o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}i.loaded++,i.timeStamp=performance.now()-r,null==s||s(i)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}_parseV3(e,n,s){const r=performance.now(),i={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Qa(Object.assign(Object.assign({},this.sbmInfo),{format:Zs.sbm})),a=new Va({id:Xr()});o.add(a);const l=e.getUint16(n,this.isLE);n+=2;const c=e.getUint16(n,this.isLE);n+=2,i.total=c;const h={};for(let t=0;t<l;++t){const t=e.getUint16(n,this.isLE).toString();n+=2,h[t]={materialInfo:[]},e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;const s=e.getFloat32(n,this.isLE);n+=4;const r=e.getFloat32(n,this.isLE);n+=4;const i=e.getFloat32(n,this.isLE);n+=4;const o=e.getFloat32(n,this.isLE);n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;let a=e.getUint8(n);n+=1,0===a?a=he:1===a?a=ce:2===a&&(a=le);const l=e.getUint16(n,this.isLE);n+=2;const c=l>0?Iu(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[s,r,i,o,a],n=_u(t,e,Du(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,s=Lu(e,c);h[t].textureUrl=s,ju(n,s)}}}const u={};for(let o=0;o<c;++o){const o=e.getUint16(n,this.isLE).toString();n+=2;const l=e.getUint16(n,this.isLE);n+=2;let c="";if(l>0){const t=new Uint8Array(e.buffer,n,l);c=Uu.decode(t),n+=l}const h=e.getUint16(n,this.isLE).toString();n+=2,u[o]={meshName:c,materialId:h,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const d=[],p=[],m=[],f=[],y=e.getUint32(n,this.isLE);if(n+=4,y>0)for(let s=0;s<y;s++){const s=new t;s.setX(e.getFloat32(n,this.isLE)),n+=4,s.setY(e.getFloat32(n,this.isLE)),n+=4,s.setZ(e.getFloat32(n,this.isLE)),n+=4,d.push(s)}const b=e.getUint32(n,this.isLE);if(n+=4,b>0)for(let s=0;s<b;s++){const s=new t;s.setX(e.getFloat32(n,this.isLE)),n+=4,s.setY(e.getFloat32(n,this.isLE)),n+=4,s.setZ(e.getFloat32(n,this.isLE)),n+=4}const x=e.getUint32(n,this.isLE);if(n+=4,x>0)for(let t=0;t<x;t++){const t=new g;t.setX(e.getFloat32(n,this.isLE)),n+=4,t.setY(e.getFloat32(n,this.isLE)),n+=4,p.push(t)}const T=e.getUint32(n,this.isLE);if(n+=4,T>0)for(let t=0;t<T;t++){const t=e.getUint32(n,this.isLE);n+=4;const s=e.getUint32(n,this.isLE);n+=4;const r=e.getUint32(n,this.isLE);n+=4;const i=[t,s,r];m.push(i),p.length>0&&f.push([p[i[0]],p[i[1]],p[i[2]]])}const S=[],O=[];for(let e=0;e<m.length;e++){const t=m[e],n=d[t[0]],s=d[t[1]],r=d[t[2]];S.push(...n.toArray(),...s.toArray(),...r.toArray());let i=new g,o=new g,a=new g;const l=f[e];void 0!==l&&(i=l[0],o=l[1],a=l[2]),O.push(...i.toArray(),...o.toArray(),...a.toArray())}const M=new Float32Array(S),E=new Float32Array(O);u[o].position=M.buffer,u[o].uv=E.buffer;const C=new w;M.length>0&&C.setAttribute("position",new v(M,3)),E.length>0&&C.setAttribute("uv",new v(E,2)),C.computeVertexNormals();const D=C.getAttribute("normal").array.buffer;if(u[o].normal=D,this.materials.has(h)){const e=new W(C,this.materials.get(h));e.name=c||o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}i.loaded++,i.timeStamp=performance.now()-r,null==s||s(i)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}}const Nu=new TextDecoder;class zu{parseBuffer(e,t){switch(Nu.decode(e.slice(0,8))){case"SBK-----":case"SBM-----":return(new ku).parseBuffer(e,t);default:return Promise.reject(`In soonspacejs: sbm 资源模型(${t.url})格式或数据错误!`)}}}class Gu{constructor(){this.materials=new Map}parseObject(e,t){const n=new Qa(Object.assign(Object.assign({},t),{format:Zs.sbm})),s=new Va({id:Xr()});n.add(s);const{materialsCache:r,meshsCache:i}=e;for(const[e,t]of Object.entries(r)){if(this.materials.has(e))continue;const{textureUrl:n,materialInfo:s}=t,r=_u(e,s,Du(n));this.materials.set(e,r),n&&ju(r,n)}for(const[e,t]of Object.entries(i)){const{meshName:n,materialId:r,position:i,uv:o,normal:a}=t,l=this.materials.get(r.toString());if(l){const t=new w,r=new Float32Array(i),c=new Float32Array(o),h=a&&new Float32Array(a);r.length>0&&t.setAttribute("position",new v(r,3)),c.length>0&&t.setAttribute("uv",new v(c,2)),h&&h.length>0?t.setAttribute("normal",new v(h,3)):t.computeVertexNormals();const u=new W(t,l);u.name=n||e,u.castShadow=!0,u.receiveShadow=!0,s.add(u)}}return n}}class Vu extends Wh{constructor(e,t){super(Xs.Model,e,t.classified.Model),this.viewport=e,this.cache=t,this.isDisposed=!1,this.modelsPromiseMap=new Map,this.modelsMap=new Map,this._dbReady=!1,this.store=Lo.createInstance({name:"soonspace",storeName:"modelData"}),this.cacheStore=Lo.createInstance({name:"soonspace",storeName:"modelCache"}),this.loadingManager=new Ot,this.gltfLoader=new Nn(this.loadingManager),this.fbxLoader=new Xh(this.loadingManager),this.objLoader=new Eu(this.loadingManager),this.stlLoader=new zn(this.loadingManager),this.gltfLoader.setMeshoptDecoder(Wn),this._initLoadingManager(this.loadingManager)}setDracoDecoderPath(e){const t=(new Vn).setDecoderPath(e);this.gltfLoader.setDRACOLoader(t)}setKtx2DecoderPath(e){const t=(new Hn).setTranscoderPath(e).detectSupport(this.viewport.renderer).setWorkerLimit(2);this.gltfLoader.setKTX2Loader(t)}async load(e,t){const{url:n}=e,s=this.modelsPromiseMap.get(n);if(s){if(await s,this.isDisposed)return this.dispose(),null;const r=this.modelsMap.get(n);return r?this.clone(r,e,t):null}const r=this._innerLoad(e,t);return this.modelsPromiseMap.set(n,r),r}async parse(e){var t;const{url:n,id:s,format:r}=e;if(!n)return tr(`id: ${s} url: ${n} is empty`),null;await this._checkDbReady();switch(null===(t=null!=r?r:Zr(n))||void 0===t?void 0:t.toLocaleUpperCase()){case"SBM":return this._parseSbm(e);case"SBMX":return this._parseSbmx(e);case"GLB":case"GLTF":return this._parseGltf(e);case"FBX":return this._parseFbx(e);case"OBJ":return this._parseObj(e);case"STL":return this._parseStl(e);default:return nr(`模型资源( id: ${s}, url: ${n} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`),null}}clone(e,t,n){return new Promise(((s,r)=>{var i;"Model"!==e.stype&&r("In soonspacejs: 方法 cloneModel 参入对象类型错误!");const{id:o,name:a,level:l,visible:c,position:h,rotation:u,scale:d,onClick:p,onDblClick:m,onRightClick:f,onLoad:g,userData:y}=t,v=Kn.clone(e);v.animations=v.animations.map((e=>e.clone())),o&&(v.sid=o),a&&(v.name=a),l&&(v.level=l),!1===c?v.hide():!0===c&&v.show(),h&&v.position.set(h.x,h.y,h.z),u&&v.rotation.set(u.x,u.y,u.z),d&&v.scale.set(d.x,d.y,d.z),v.onClick=p?p.bind(v):null,v.onDblClick=m?m.bind(v):null,v.onRightClick=f?f.bind(v):null,v.onLoad=g?g.bind(v):null,null===(i=v.onLoad)||void 0===i||i.call(v,v),y&&(v.userData=y),null!==n&&this.viewport.scener.addObject(v,n||this.scene||e.parent),s(v)}))}async loadToGroup(e,t){const n=this.createGroup(e,null);return await Promise.allSettled(t.map((e=>this.load(e,null).then((e=>e&&n.add(e))).catch(console.error)))),this.viewport.scener.addObject(n,this.scene),n}async addForGroup(e,t){return e&&await Promise.allSettled(t.map((async t=>this.load(t,null).then((t=>t&&this.viewport.scener.addObject(t,e))).catch(console.error)))),e}async clearIdb(){await this._checkDbReady(),await this.store.clear(),await this.cacheStore.clear()}dispose(){var e,t;this.isDisposed=!0,this.modelsPromiseMap.clear(),this.modelsMap.clear(),null===(e=this.gltfLoader.dracoLoader)||void 0===e||e.dispose(),null===(t=this.gltfLoader.ktx2Loader)||void 0===t||t.dispose()}async _checkDbReady(){this._dbReady||(await Promise.all([this.store.ready(),this.cacheStore.ready()]),this._dbReady=!0)}_initLoadingManager(e){e.addHandler(/\.tga$/i,new Gn)}_setModelsMap(e,t){this.modelsMap.has(e)||this.modelsMap.set(e,Kn.clone(t))}async _parseSbm(e){const{useIndexedDB:t}=this.viewport.options,{url:n}=e,s=async t=>{const s=await(new zu).parseBuffer(t,e),{model:r,caches:i}=s;return i&&Rr((()=>{this.cacheStore.setItem(n,i)})),r},r=e=>{var t;null===(t=e.onLoad)||void 0===t||t.call(e,e),e.dispatchEvent({type:"load"})};if(t){const t=await this.cacheStore.getItem(n);if(t){const n=(new Gu).parseObject(t,e);return r(n),n}{const e=await this.store.getItem(n)||await this._fetchBuffer(n),t=await s(e);return r(t),t}}{const e=await this._fetchBuffer(n),t=await s(e);return r(t),t}}async _parseSbmx(e){const{url:t}=e,n=await this._getBuffer(t);if("SBMG----"===Qr(n.slice(0,8))){const t=kr(n.slice(8));return this._parseGltf(e,t)}return this._parseGltf(e,n)}async _parseGltf(e,t){const{url:n}=e,s=xr(n),r=t||await this._getBuffer(n),i=new Qa(Object.assign(Object.assign({},e),{format:Zs.gltf}));try{const e=await this.gltfLoader.parseAsync(r,s),{animations:t}=e;t&&t.length>0&&(i.animations=t),e.scene.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e instanceof Z&&(e.frustumCulled=!0),e.castShadow=!0,e.receiveShadow=!0})),i.add(e.scene)}catch(e){if(e.message.includes("No DRACOLoader"))throw new Error(`${Js}请使用 setModelDracoDecoderPath 设置 draco 解压库路径`);if(e.message.includes("setKTX2Loader"))throw new Error(`${Js}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`);throw e}return i}async _parseFbx(e){const{url:t}=e,n=xr(t),s=await this._getBuffer(t);if("ssp"===Qr(kr(s.slice(0,3)))){const t=kr(s.slice(3));return this._parseGltf(e,t)}const r=new Qa(Object.assign(Object.assign({},e),{format:Zs.fbx})),i=this.fbxLoader.parse(s,n),{animations:o}=i;return o&&o.length>0&&(r.animations=o),r.add(i),r}async _parseObj(e){const{url:t}=e,n=await this._getBuffer(t),s=await new Blob([n]).text(),r=new Qa(Object.assign(Object.assign({},e),{format:Zs.obj})),i=this.objLoader.parse(s);return r.add(i),r}async _parseStl(e){const{url:t}=e,n=await this._getBuffer(t),s=new Qa(Object.assign(Object.assign({},e),{format:Zs.stl})),r=this.stlLoader.parse(n),i=new Va({id:Xr()}),o=new W(r,new Y);return i.add(o),s.add(i),s}async _innerLoad(e,t){var n;const{url:s}=e,r=await this.parse(e);return r?(null===(n=r.onLoad)||void 0===n||n.call(r,r),this._setModelsMap(s,r),null!==t&&this.viewport.scener.addObject(r,t),r):null}async _fetchBuffer(e){const{useIndexedDB:t}=this.viewport.options,n=await Cr(e,"arraybuffer");return t&&this.store.setItem(e,n),n}async _getBuffer(e){const{useIndexedDB:t}=this.viewport.options;if(t){const t=await this.store.getItem(e);return t||this._fetchBuffer(e)}return this._fetchBuffer(e)}}const Hu=new $e(1,1);class Wu extends Wh{constructor(e,t){super(Xs.Poi,e,t.classified.Poi),this.viewport=e,this.cache=t,this.textures=new Map}_createIcon(e){const t=this._createIconMaterial(e),n={scale:e.iconScale};let s;return Ku(e.type)?(s=new W,s.renderOrder=1,s.geometry=Hu,s.material=t,e.iconScale&&s.scale.set(e.iconScale.x,e.iconScale.y,e.iconScale.z)):(s=new Ja(t,n),this._computeMaterialSizeAttenuation(t,e.type)),s.name="icon",s}_createIconMaterial({url:e,type:t}){if(!e)return;let n=this.textures.get(e);if(n||(n=Pr.load(e,(t=>{this.textures.set(e,t),Fa.needsUpdate=!0})),n.colorSpace=$,n.flipY=!0),Ku(t)){return new ke({map:n,transparent:!0,depthWrite:!1,side:le})}return new ze({map:n,depthWrite:!1})}_createText(e){const t=this._createTextMaterial(e),n={position:e.namePosition,scale:e.nameScale};let s;return Ku(e.type)?(s=new W,s.renderOrder=1,s.geometry=Hu,s.material=t,e.namePosition&&s.position.set(e.namePosition.x,e.namePosition.y,e.namePosition.z),e.nameScale&&s.scale.set(e.nameScale.x,e.nameScale.y,e.nameScale.z)):(s=new Ja(t,n),this._computeMaterialSizeAttenuation(t,e.type)),s.name="text",s}_createTextMaterial(e){const t=this._createTextTexture(e);if(Ku(e.type)){return new ke({map:t,transparent:!0,depthWrite:!1,side:le})}return new ze({map:t,depthWrite:!1})}_createTextTexture(e){const t=this._createTextCanvas(e.name||"",e.nameCanvasInfo),n=new Ne(t);return n.colorSpace=$,n}_createTextCanvas(e,t={}){const{canvasWidth:n=256,canvasHeight:s=256,font:r="32px Microsoft YaHei",fillStyle:i="#fff",strokeStyle:o="#000",textAlign:a="center",textBaseline:l="middle",backgroundStyle:c,borderStyle:h,borderWidth:u=3}=t,d=document.createElement("canvas");d.width=n,d.height=s;const p=d.getContext("2d"),m=.5*n,f=.5*s;return p&&(c&&(p.fillStyle=c,p.fillRect(0,0,n,s)),h&&(p.strokeStyle=h,p.lineWidth=u,p.strokeRect(0,0,n,s),p.lineWidth=1),p.font=r,p.fillStyle=i,p.strokeStyle=o,p.textAlign=a,p.textBaseline=l,p.strokeText(e,m,f,n),p.fillText(e,m,f,n)),d}_computeMaterialSizeAttenuation(e,t){return"2D"===t||"2d"===t?e.sizeAttenuation=!1:"2.5D"!==t&&"2.5d"!==t||(e.sizeAttenuation=!0),e}_create(e){e=Object.assign({type:"2.5d",namePosition:{x:0,y:10,z:0},nameScale:{x:16,y:16,z:1},iconScale:{x:16,y:16,z:1}},e);const t=new Xa(e),n=this._createText(e);if(t.text=n,t.add(n),e.url){const n=this._createIcon(e);t.icon=n,t.add(n)}return t}create(e){const t=this._create(e);return this.viewport.scener.addObject(t,this.scene),t}clone(e,t,n){var s,r,i;"Poi"!==e.stype&&console.error("In soonspacejs: 方法 clonePoi 参入对象类型错误!");const{id:o,name:a,level:l,namePosition:c,nameScale:h,iconScale:u,scaleFixed:d,visible:p,position:m,rotation:f,scale:g,onClick:y,onDblClick:v,onRightClick:w,userData:b}=t,x=e.clone();if(a!==x.name&&x.text){const e=x.text.material.clone();e.map=this._createTextTexture(t),x.text.material=e}return c&&(null===(s=x.text)||void 0===s||s.position.set(c.x,c.y,c.z)),h&&(null===(r=x.text)||void 0===r||r.scale.set(h.x,h.y,h.z)),u&&(null===(i=x.icon)||void 0===i||i.scale.set(u.x,u.y,u.z)),o&&(x.sid=o),a&&(x.name=a),l&&(x.level=l),d&&(x.scaleFixed=d),Vr(p)&&(x.visible=p),m&&x.position.set(m.x,m.y,m.z),f&&x.rotation.set(f.x,f.y,f.z),g&&x.scale.set(g.x,g.y,g.z),x.onClick=y?y.bind(x):null,x.onDblClick=v?v.bind(x):null,x.onRightClick=w?w.bind(x):null,b&&(x.userData=b),null!==n&&this.viewport.scener.addObject(x,n||this.scene||e.parent),x}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this._create(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this._create(t);this.viewport.scener.addObject(n,e)})),e}}function Ku(e){return"3D"===e||"3d"===e}class qu extends Wh{constructor(e,t){super(Xs.PoiNode,e,t.classified.PoiNode),this.viewport=e,this.cache=t}create(e){this._openEnableRenderCss(e);const t=new Ya(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{this._openEnableRenderCss(e);const t=new Ya(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{this._openEnableRenderCss(t);const n=new Ya(t);this.viewport.scener.addObject(n,e)})),e}_openEnableRenderCss(e){switch(e.type){case"2d":case"2D":this.viewport.rendererManager.setInternalState("enableRenderCss2D",!0);break;case"2.5d":case"2.5D":case"3d":case"3D":this.viewport.rendererManager.setInternalState("enableRenderCss3D",!0)}}}class Yu extends Wh{constructor(e,t){super(Xs.Canvas3D,e,t.classified.Canvas3D),this.viewport=e,this.cache=t}create(e,t){const n=new ll(e);return null!==t&&this.viewport.scener.addObject(n,t),n}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=new ll(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=new ll(t);this.viewport.scener.addObject(n,e)})),e}}let Qu=class Dijkstras{constructor(){this.graph=new Map,this.queue=null,this.previous=new Map}setGraph(e){if(!(e.length<1))for(const t of e){const[e,n]=t;this.graph.set(e,new Map);for(const t of n){const[n,s]=t,r=this.graph.get(e);null==r||r.set(n,s)}}}getPath(e,t){var n;if(e===t)return[];const s=this.queue=new vr;s.add(e,0),this.previous.set(e,null);let r=null;for(;r=s.shift();){if(r===t){const e=[];for(;null!==r&&null!==this.previous.get(r);)e.unshift(r),r=null!==(n=this.previous.get(r))&&void 0!==n?n:null;return e}const e=s.getDistance(r);if(e===1/0)return[];const i=this.graph.get(r);i&&i.forEach(((t,n)=>{const i=s.getDistance(n),o=e+t;o<i&&(s.update(n,o),this.previous.set(n,r))}))}return[]}};function Xu(){const e=new Dijkstras;onmessage=function({data:t}){const{type:n}=t;switch(n){case"setGraph":e.graph=t.graph,postMessage({type:"done"});break;case"getPath":{const n=e.getPath(...t.st);postMessage({type:"done",pathIds:n});break}}}}class Zu{constructor(e){this.dijkstra=e,this.workerPool=new _n(4),this.workerSourceURL=null,this._mainThreadGraph=[],this._needsUpdateGraph=!1,this.workerPool.setWorkerCreator((()=>{if(!this.workerSourceURL){const e=Xu.toString(),t=["/* deps */",vr.toString(),Qu.toString(),"/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([t]))}return new Worker(this.workerSourceURL)}))}async getPath(e,t){await this.workerPool.postMessage({type:"setGraph",graph:this.dijkstra.graph});const{data:{pathIds:n}}=await this.workerPool.postMessage({type:"getPath",st:[e,t]});return n}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL)}}class Ju extends Wh{constructor(e,t){super(Xs.Topology,e,t.classified.Topology),this.viewport=e,this.cache=t,this.dijkstra=new Qu,this.dijkstraWorker=new Zu(this.dijkstra)}async createFromGml(e){const{url:t,linkWidth:n=20,linkColor:s=65280,renderNode:r=!0,nodeColor:i=255}=e;return Ur(t).then((t=>{if(!t||!t.MultiLayeredGraph)return Promise.reject('In soonspace: createTopologyFromGml "url" path error!');const o=[],a=new Map;let l=[],c=[];const h=t.MultiLayeredGraph.SpaceLayerMember.SpaceLayer.X_floor;Wr(h)?h.forEach((e=>{l=[...l,...e.state],c=[...c,...e.transition]})):(l=[...l,...h.state],c=[...c,...h.transition]),l.forEach(((e,t)=>{const n=e.State._attributes["gml:id"],s=e.State.topoNode["gml:Node"].node_name;o.push({id:Gr(n)?n:"",name:Gr(s)?s:"",position:{x:Number(e.State.topoNode["gml:Node"].xcoord["#text"]),y:Number(e.State.topoNode["gml:Node"].zcoord["#text"]),z:-1*Number(e.State.topoNode["gml:Node"].ycoord["#text"])},graphs:[]}),a.set(n,t)})),c.forEach((e=>{const t=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"],n=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"],s=e.Transition.topoEdge["gml:Edge"].passable["#text"],r=a.get(t),i=a.get(n),l=e.Transition._attributes["gml:id"],c=e.Transition.topoEdge["gml:Edge"].link_name["#text"];void 0!==r&&void 0!==i&&("2"!==s&&"3"!==s&&o[r].graphs.push({targetNodeId:n,linkInfo:{id:l,name:c},passable:+s}),"1"!==s&&"3"!==s&&o[i].graphs.push({targetNodeId:t,linkInfo:{id:l,name:c},passable:+s}))}));const u=new rl(Object.assign(Object.assign({},e),{type:"network",nodes:o,linkWidth:n,renderLink:!0,linkColor:s,renderNode:r,nodeColor:i}));return this.setDijkstraGraph(u.nodes),this.viewport.scener.addObject(u,this.scene),Promise.resolve(u)}))}create(e){const t=this.generateLineTopologyInfoNodeGraphs(e),n=new rl(t);return this.setDijkstraGraph(n.nodes),this.viewport.scener.addObject(n,this.scene),n}setPassable(e,t){if("line"===e.topologyType)return void nr("只支持 network 类型");const n=Tr(e.info.nodes),s=n.reduce(((e,t)=>(e.set(t.id,t),e)),new Map),r=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);t.forEach((({sourceNodeId:e,targetNodeId:t,passable:n})=>{const r=s.get(e),i=s.get(t);if(!r||!i)return void tr(`sourceNodeId:${e} 或 targetNodeId:${t} 未找到对应节点`);const o=r.graphs.findIndex((e=>e.targetNodeId===i.id)),a=i.graphs.findIndex((e=>e.targetNodeId===r.id));switch(n){case 0:-1===o?r.graphs.push({targetNodeId:i.id,linkInfo:{id:Xr()},passable:n}):r.graphs[o].passable=n,-1===a?i.graphs.push({targetNodeId:r.id,linkInfo:{id:Xr()},passable:n}):i.graphs[a].passable=n;break;case 1:-1===o?r.graphs.push({targetNodeId:i.id,linkInfo:{id:Xr()},passable:n}):r.graphs[o].passable=n,-1!==a&&i.graphs.splice(a,1);break;case 2:-1!==o&&r.graphs.splice(o,1),-1===a?i.graphs.push({targetNodeId:r.id,linkInfo:{id:Xr()},passable:n}):i.graphs[a].passable=n;break;case 3:-1!==o&&r.graphs.splice(o,1),-1!==a&&i.graphs.splice(a,1)}})),e.info.nodes=n,n.forEach((e=>{const t=r.get(e.id);t&&(t.graphs=e.graphs)})),e.updateLinks(),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch()}resetNodes(e,t){const n=this.generateLineTopologyInfoNodeGraphs(Object.assign(Object.assign({},e.info),{nodes:t}));return e.resetNodes(n.nodes),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch(),e}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this.generateLineTopologyInfoNodeGraphs(e),s=new rl(t);this.setDijkstraGraph(s.nodes),n.add(s)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this.generateLineTopologyInfoNodeGraphs(t),s=new rl(n);this.setDijkstraGraph(s.nodes),this.viewport.scener.addObject(s,e)})),e}_getPath(e,n){const s=sr(n.start),r=sr(n.end);let i=null,o=1/0,a=null,l=1/0;const c=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(s),h=n.distanceTo(r);c<o&&(o=c,i=e),h<l&&(l=h,a=e)}if(!i||!a||i.sid===a.sid)return null;const h=i.sid,u=a.sid,d=this.dijkstra.getPath(h,u);if(0===d.length)return null;d.unshift(h);const p=[];for(let e=0;e<d.length;e++){const t=c.get(d[e]);t&&p.push(t)}return p}async _getPathAsync(e,n){const s=sr(n.start),r=sr(n.end);let i=null,o=1/0,a=null,l=1/0;const c=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(s),h=n.distanceTo(r);c<o&&(o=c,i=e),h<l&&(l=h,a=e)}if(!i||!a||i.sid===a.sid)return null;const h=i.sid,u=a.sid,d=await this.dijkstraWorker.getPath(h,u);if(0===d.length)return null;d.unshift(h);const p=[];for(let e=0;e<d.length;e++){const t=c.get(d[e]);t&&p.push(t)}return p}_generateNodesInfo(e){return e.map((e=>{const t=e.position.clone();return t.y+=.01,{id:`${e.sid}_${Xr()}`,name:e.name,position:t,graphs:e.graphs}}))}getShortestPath(e,t){const n=this._getPath(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const s=this._generateNodesInfo(n),r=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:s});this.generateLineTopologyInfoNodeGraphs(r);const i=new rl(r);return this.viewport.scener.addObject(i,this.scene),i}async getShortestPathAsync(e,t){const n=await this._getPathAsync(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const s=this._generateNodesInfo(n),r=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:s});this.generateLineTopologyInfoNodeGraphs(r);const i=new rl(r);return this.viewport.scener.addObject(i,this.scene),i}_getShortestPathByMultiplePoints(e,n,s,r,i){const o=[];s.forEach((n=>{const s={start:"start"===i?n:r,end:"end"===i?n:r},a=this._getPath(e,s);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const s=a[n+1];s&&(l+=e.getWorldPosition(new t).distanceTo(s.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})}));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t<l&&(l=t,a=e)})),a.length>0){const t=this._generateNodesInfo(a),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(s);const r=new rl(s);return this.viewport.scener.addObject(r,this.scene),r}return null}async _getShortestPathByMultiplePointsAsync(e,n,s,r,i){const o=[];await Promise.all(s.map((async n=>{const s={start:"start"===i?n:r,end:"end"===i?n:r},a=await this._getPathAsync(e,s);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const s=a[n+1];s&&(l+=e.getWorldPosition(new t).distanceTo(s.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})})));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t<l&&(l=t,a=e)})),a.length>0){const t=this._generateNodesInfo(a),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(s);const r=new rl(s);return this.viewport.scener.addObject(r,this.scene),r}return null}getShortestPathByMultipleStartPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.end,t.start,"end")}getShortestPathByMultipleStartPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.end,t.start,"end")}setDijkstraGraph(e){const n=[];for(let s=0;s<e.length;s++){const r=e[s];if(0===r.graphs.length)continue;const i=[],o=e.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(let e=0;e<r.graphs.length;e++){const n=r.graphs[e],s=o.get(n.targetNodeId);if(!s)continue;const a=r.getWorldPosition(new t),l=s.getWorldPosition(new t);i.push([n.targetNodeId,a.distanceTo(l)])}n.push([r.sid,i])}this.dijkstra.setGraph(n)}generateLineTopologyInfoNodeGraphs(e){const{type:t,nodes:n}=e;if("line"===t)for(let t=0;t<n.length;t++)if(t===n.length-1)n[t].graphs=[];else{const s=e.nodes[t],r=e.nodes[t+1];n[t].graphs=[{targetNodeId:r.id,linkInfo:{id:`${s.id}_to_${r.id}`,name:`${s.name||s.id}_to_${r.name||r.id}`},passable:1}]}return Object.assign(Object.assign({},e),{nodes:n})}dispose(){this.dijkstraWorker.dispose()}}class $u extends Wh{constructor(e,t){super(Xs.Helper,e,t.classified.Helper),this.viewport=e,this.cache=t}addGridHelper(e){const{id:t,size:n=1e3,divisions:s=20,color:r="#fff",position:i={x:0,y:0,z:0},rotation:o={x:0,y:0,z:0},scale:a={x:1,y:1,z:1}}=e,l=new Mt(n,s,r,r);return l.position.set(i.x,i.y,i.z),l.rotation.set(o.x,o.y,o.z),l.scale.set(a.x,a.y,a.z),l.userData.sid=t,l.userData.stype="Helper",this.viewport.scener.addObject(l,this.scene),l}addAxesHelper(e){const{id:t,axesLength:n=1e3}=e,s=new Et(n);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addBoxHelper(e){const{id:t,box:n,color:s="#00ff00"}=e,r=new Ct(n,new u(s));return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPlaneHelper(e){const{id:t,width:n=500,height:s=500,color:r="#00ff00",opacity:i=.2,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1}}=e,c=i<1,h=new Ga({id:t,position:o,rotation:a,scale:l},new $e(n,s),new ke({color:r,opacity:i,transparent:c,depthWrite:!c,side:le}));return h.userData.sid=t,h.userData.stype="Helper",this.viewport.scener.addObject(h,this.scene),h}async addGroundHelper(e){const{imgUrl:t,id:n,width:s=500,height:r=500,opacity:i=1,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1},repeat:c={x:10,y:10}}=e,h=await Pr.loadAsync(t),u=new $e(s,r);u.computeBoundingBox();const d=new Y({side:le,map:h,transparent:i<1,opacity:i,roughness:.8});d.map&&(d.map.repeat.set(c.x,c.x),d.map.wrapS=Pe,d.map.wrapT=Pe,d.map.version++),a.x-=Math.PI/2,d.version++;const p=new cl({id:n,position:o,rotation:a,scale:l},u,d);return p.userData.sid=n,p.userData.stype="Helper",this.viewport.scener.addObject(p,this.scene),p}addDirectionalLightHelper(e){const{id:t,light:n,color:s,size:r=50}=e,i=new Dt(n,r,s);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addHemisphereLightHelper(e){const{id:t,light:n,color:s,size:r=20}=e,i=new Pt(n,r,s);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addSpotLightHelper(e){const{id:t,light:n,color:s}=e,r=new It(n,s);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPointLightHelper(e){const{id:t,light:n,color:s,size:r=20}=e,i=new At(n,r,s);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addRectAreaLightHelper(e){const{id:t,light:n,color:s}=e,r=new Qn(n,s);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}}class ed extends Wh{constructor(e,t){super(Xs.PluginObject,e,t.classified.PluginObject),this.viewport=e,this.cache=t}createObject(e,t){const n=new Ha(e);return t&&n.add(t),this.viewport.scener.addObject(n,this.scene),n}addToObject(e,t){return e?(this.viewport.scener.addObject(t,e),e):null}}class td extends Wh{constructor(e,t){super(Xs.Group,e,t.classified.Group),this.viewport=e,this.cache=t}}const nd=new Re;class sd extends Wh{constructor(e,t){super(Xs.Decal,e,t.classified.Decal),this.viewport=e,this.cache=t}async create(e,t){const n=new Kl(e);return null!==t&&this.viewport.scener.addObject(n,t),await n.updateTexture(e.url),n.updateMaterial(e),this.updateGeometry(n,e),n}updateAllGeometry(e={}){this.getAll().forEach((t=>this.updateGeometry(t,e)))}updateGeometry(e,s={}){const{meshOfModelList:r}=this.viewport.scener.intersectsList,{snapping:o=!0,snappingDistance:a=1,snappingTargets:l=r,offsetUnits:c=.01}=s,{decalMesh:h}=e;if(h.geometry.dispose(),this.viewport.render(),o){h.updateWorldMatrix(!0,!1);const r=new t,o=new t,u=h.matrixWorld.elements,d={position:new t,quaternion:new i,scale:new t};h.matrixWorld.decompose(d.position,d.quaternion,d.scale),d.scale.multiply(e.textureAspect),h.getWorldPosition(r),o.set(-u[8],-u[9],-u[10]).normalize(),nd.set(r,o),nd.near=0,nd.far=a;const[p]=nd.intersectObjects(l).filter((({object:e})=>!(e instanceof Kl)));if(p){const{object:t}=p,i=(new n).setFromRotationMatrix(h.matrixWorld,"XYZ"),a=new Hl(Object.assign(Object.assign({offsetUnits:c},s),{object:t,origin:r,direction:o,angle:i.z,size:(new g).copy(d.scale)})),l=h.matrixWorld.clone().invert();return a.meshMatrix&&l.multiply(a.meshMatrix),a.applyMatrix4(l),h.geometry=a,e}}const{x:u,y:d}=e.textureAspect;return h.geometry=new $e(u,d),e}}class rd{constructor(e,t){this.viewport=e,this.cache=t,this.scene=this.viewport.scene,this.store={groupManager:new td(this.viewport,this.cache),lightManager:new Kh(this.viewport,this.cache),modelManager:new Vu(this.viewport,this.cache),poiManager:new Wu(this.viewport,this.cache),poiNodeManager:new qu(this.viewport,this.cache),canvas3DManager:new Yu(this.viewport,this.cache),topologyManager:new Ju(this.viewport,this.cache),helperManager:new $u(this.viewport,this.cache),decalManager:new sd(this.viewport,this.cache),pluginObjectManager:new ed(this.viewport,this.cache)},e.signals.beforeRender.add(this.update.bind(this)),e.signals.objectAdded.add(this.setObjectCache.bind(this)),e.signals.objectRemoved.add(this.deleteObjectCache.bind(this))}levelUpdate(){const e=(e,t)=>{e.visible!==t&&(e.visible=t,this.viewport.signals.objectChanged.dispatch())},n=n=>{const{level:s,handleHide:r}=n,{max:i=null,min:o=null}=s;if(!r&&(Hr(i)||Hr(o))){const s=new t;s.setFromMatrixPosition(n.matrixWorld);const r=this.viewport.camera.position.distanceTo(s);Hr(i)&&r>i||Hr(o)&&r<o?e(n,!1):e(n,!0)}};this.cache.objects.forEach((e=>{(e instanceof za||e instanceof Ga)&&n(e)}))}scaleFixedUpdate(){this.cache.objects.forEach((e=>{if(e instanceof Xa||e instanceof Ya){const{scaleFixed:n}=e;if(n){const s=new t;if(s.setFromMatrixPosition(e.matrixWorld),s.distanceTo(this.viewport.camera.position)>n.distance){const t=fr(s,n.fixedScale,this.viewport.camera,this.viewport.renderer.getSize(new g));e.scale.setScalar(t)}else e.scale.setScalar(n.originScale)}}}))}update(){this.viewport.options.levelEnabled&&this.levelUpdate(),this.viewport.options.scaleFixedEnabled&&this.scaleFixedUpdate()}isObjectInScene(e){let t=!1;return e.traverseAncestors((e=>{e===this.scene&&(t=!0)})),t}getObjectById(e){const t=this.getObjectCache(e);if(t){if(this.isObjectInScene(t))return t}return null}getObjectByName(e){return this._getObjectByProps("name",e)}getObjectByUserDataProperty(e,t){const n=[];return this.cache.objects.forEach((s=>{this.isObjectInScene(s)&&Kr(s)&&(s instanceof za||s instanceof Ga||s.userData.stype)&&(qr(e)&&e(s.userData)||Gr(e)&&s.userData[e]===t)&&n.push(s)})),n}removeObjectById(e){const t=this.getObjectById(e);return!!t&&(this.viewport.scener.removeObject(t),!0)}_getObjectByProps(e,t){const n=[];return this.cache.objects.forEach((s=>{this.isObjectInScene(s)&&((s instanceof za||s instanceof Ga)&&Kr(s)&&s[e]===t||Kr(s)&&s.userData.stype&&("name"===e&&s.name===t||"sid"===e&&s.userData.sid===t))&&n.push(s)})),n}getObjectCache(e){return this.cache.objects.get(e)}setObjectCache(e){const t=(e,t)=>{const n=this.cache.objects.get(t);n&&n!==e&&tr(`object id ${t} already exists in scene`)};null==e||e.traverse((n=>{if(n instanceof za||n instanceof Ga){if("string"==typeof n.sid&&n.sid.startsWith(Qs))return;t(n,n.sid),this.cache.objects.set(n.sid,n);const e=n.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}else if(n.userData.sid&&e.userData.stype){t(n,n.userData.sid),this.cache.objects.set(n.userData.sid,n);const e=n.userData.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}}))}deleteObjectCache(e){null==e||e.traverse((t=>{if(t instanceof za||t instanceof Ga){this.cache.objects.delete(t.sid);const e=t.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}else if(t.userData.sid&&e.userData.stype){this.cache.objects.delete(t.userData.sid);const e=t.userData.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}}))}clearObject(){this.store.modelManager.clear(),this.store.poiManager.clear(),this.store.poiNodeManager.clear(),this.store.canvas3DManager.clear(),this.store.topologyManager.clear(),this.store.helperManager.clear(),this.store.decalManager.clear(),this.store.pluginObjectManager.clear()}clear(){this.clearObject(),this.store.lightManager.clear()}dispose(){this.store.modelManager.dispose(),this.store.topologyManager.dispose(),this.store.lightManager.dispose(),this.clear()}}w.prototype.computeBoundsTree=Rn,w.prototype.disposeBoundsTree=Bn,W.prototype.raycast=Un,Re.prototype.firstHitOnly=!0,e.ColorManagement.enabled=!0;class id{constructor(t){var n;this.THREE=e,this.TWEEN=Lt,this.utils=ni,this.animation=ri,this.library=Gc,this.version=Zn,this.domElement=null,this.plugins={},this.textureCache=new Map;const{el:s,options:r={},events:i={}}=t;if(this.options=Object.assign(Object.assign({},{showInfo:!1,showStats:!1,showViewHelper:!1,showGrid:!1,background:{color:11459572,alpha:!1},fog:!1,hoverEnabled:!1,levelEnabled:!1,scaleFixedEnabled:!1,fileCacheEnabled:!0,closeInfoLog:!1,closeWarnLog:!1,useIndexedDB:!0}),r),this.signals={windowResize:new zh,cameraObjectChange:new zh,sceneChanged:new zh,backgroundChanged:new zh,beforeRender:new zh,sceneRendered:new zh,tweenUpdate:new zh,hover:new zh,click:new zh,dblClick:new zh,rightClick:new zh,mouseDown:new zh,mouseMove:new zh,mouseUp:new zh,mouseWheel:new zh,keyDown:new zh,keyUp:new zh,modelHover:new zh,modelUnHover:new zh,modelClick:new zh,modelDblClick:new zh,modelRightClick:new zh,poiHover:new zh,poiUnHover:new zh,poiClick:new zh,poiDblClick:new zh,poiRightClick:new zh,selectPosition:new zh,sceneClick:new zh,objectAdded:new zh,objectRemoved:new zh,objectChanged:new zh,geometryChanged:new zh,materialAdded:new zh,materialChanged:new zh,materialRemoved:new zh,cameraChange:new zh,outlineChange:new zh,modelAnimation:new zh,getSceneInfo:new zh},this.objectsCache=new Hh,this.viewport=new ka(this.options,this.signals,this.objectsCache),this.controls=this.viewport.controls,this.manager=new rd(this.viewport,this.objectsCache),s&&(this.domElement=s instanceof HTMLElement?s:document.querySelector(s),null===(n=this.domElement)||void 0===n||n.appendChild(this.viewport.container)),!this.domElement)throw new Error("In SoonSpace: Can't find container!");this._init(),this._initEvents(i),this._initDefaultSettings()}_init(){const{showGrid:e,background:t,fog:n,controls:s,fileCacheEnabled:r,closeInfoLog:i,closeWarnLog:o,useIndexedDB:a}=this.options;if(!i){$s(" ____ ____ _ \n / ___| ___ ___ _ __ / ___| _ __ __ _ ___ ___ (_)___ \n \\___ \\ / _ \\ / _ \\| '_ \\\\___ \\| '_ \\ / _` |/ __/ _ \\ | / __| \n ___) | (_) | (_) | | | |___) | |_) | (_| | (_| __/_ | \\__ \\ \n |____/ \\___/ \\___/|_| |_|____/| .__/ \\__,_|\\___\\___(_)/ |___/ \n |_| |__/ \n",{color:"#3eaf7c"}),$s(Xn,{color:"#3eaf7c","font-size":"24px"}),$s(`当前版本: ${this.version}`,{color:"#3eaf7c","font-size":"12px"}),$s("文档: https://www.xwbuilders.com/soonspacejs/",{color:"#3eaf7c","font-size":"12px"}),$s("样例: https://www.xwbuilders.com/soonspacejs/examples/",{color:"#3eaf7c","font-size":"12px"}),$s("GitHub: https://github.com/soonspacejs",{color:"#3eaf7c","font-size":"12px"})}e&&this.addGridHelper(!0===e?{id:"defaultGridHelper"}:e),(null==t?void 0:t.skyBox)?Gr(null==t?void 0:t.skyBox)?this.setSphereSkyBackground(null==t?void 0:t.skyBox):Kr(null==t?void 0:t.skyBox)&&this.setSkyBackground(t.skyBox.dirPath,t.skyBox.fileNames):(null==t?void 0:t.img)?this.setBackgroundImage(t.img):(null==t?void 0:t.color)?this.setBackgroundColor(t.color):!0===(null==t?void 0:t.alpha)&&this.setBackgroundColorAlpha("#000",0),n&&this.openSceneFog(!0===n?void 0:n),s&&this.setControlsOptions(s),void 0!==r&&this.setFileCacheEnabled(r),o&&(window.console.warn=function(){}),a&&!window.indexedDB&&(this.options.useIndexedDB=!1,window.console.warn("Your browser doesn't support a stable version of IndexedDB. Such and such feature will not be available."))}_initEvents(e){const t={modelHover:this.signals.modelHover,modelUnHover:this.signals.modelUnHover,modelClick:this.signals.modelClick,modelRightClick:this.signals.modelRightClick,modelDblClick:this.signals.modelDblClick,poiHover:this.signals.poiHover,poiUnHover:this.signals.poiUnHover,poiClick:this.signals.poiClick,poiRightClick:this.signals.poiRightClick,poiDblClick:this.signals.poiDblClick,selectPosition:this.signals.selectPosition,sceneClick:this.signals.sceneClick};for(const[n,s]of Object.entries(t)){const t=e[n];t&&s.add(t)}}_initDefaultSettings(){this.setEnvironment(),this.setColorSpace("sRGB"),this.setToneMapping({type:"ACESFilmic",exposure:.8})}setHoverEnabled(e){this.options.hoverEnabled=e}setLevelEnabled(e){this.options.levelEnabled=e}setScaleFixedEnabled(e){this.options.scaleFixedEnabled=e}setFileCacheEnabled(t){e.Cache.enabled=t}registerPlugin(e,t,n){const s=new e(this,n);return this.plugins[t]=s,s}getPlugin(e){return this.plugins[e]?this.plugins[e]:null}createPluginObject(e,t){return this.manager.store.pluginObjectManager.createObject(e,t)}addToPluginObject(e,t){const n=this.getObjectById(e);return this.manager.store.pluginObjectManager.addToObject(n,t)}getPluginObjectById(e){return tr("getPluginObjectById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPluginObjectByName(e){return tr("getPluginObjectByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}removePluginObjectById(e){return tr("removePluginObjectById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}setAutoInstancing(e){this.viewport.setAutoInstancing(e)}setBloom(e){this.viewport.setBloom(e)}setSSAO(e){this.viewport.setSSAO(e)}setColorSpace(e){this.viewport.setColorSpace(e)}setToneMapping(e){this.viewport.setToneMapping(e)}setBackgroundColor(e){this.viewport.setBackgroundColor(e)}setBackgroundColorAlpha(e,t){this.viewport.setBackgroundColorAlpha(e,t)}setBackgroundImage(e){return this.viewport.setBackgroundImage(e)}setSphereSkyBackground(e){return this.viewport.setSphereSkyBackground(e)}setSkyBackground(e,t){return this.viewport.setSkyBackground(e,t)}setEnvironment(e){return this.viewport.setEnvironment(e)}playModelAnimation(e,t){return this.viewport.playModelAnimation(e,t)}stopModelAnimation(e,t){this.viewport.stopModelAnimation(e,t)}getOffsetByPosition(e){return this.viewport.getOffsetByPosition(e)}getPositionByOffset(e,t,n){return this.viewport.getPositionByOffset(e,t,n)}render(e){return this.viewport.render(e)}clearSignals(){this.viewport.clearSignals()}dispose(){this.manager.dispose(),this.viewport.dispose(),this.objectsCache.dispose()}async setCamera(e,t,n=!0){return this.viewport.cameraManager.setCamera(e,t,n)}getCameraViewpoint(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraViewpoint(e,t=!1){return this.viewport.cameraManager.setCameraViewpoint(e,t)}flyTo(e,t="frontTop",n){return this.viewport.cameraManager.flyTo(e,t,n)}flyToBoundingBox(e,t="frontTop",n){return this.flyToObj(e,t,n)}flyToObj(e,t="frontTop",n){return this.viewport.cameraManager.flyToObj(e,t,n)}flyMainViewpoint(e="frontTop",t){return this.flyToObj(this.manager.scene,e,t)}surroundOnTarget(e,t){return this.viewport.cameraManager.surroundOnTarget(e,t)}surroundOnObject(e,t){return this.viewport.cameraManager.surroundOnObject(e,t)}getObjectLabelPos(e,t="frontTop",n){return this.viewport.cameraManager.getObjectLabelPos(e,t,n)}setControlsOptions(e){return this.controls.setOptions(e)}addObject(e,t){this.viewport.scener.addObject(e,t)}attachObject(e,t){this.viewport.scener.attachObject(e,t)}removeObject(e){this.viewport.scener.removeObject(e)}openSceneFog(e){this.viewport.scener.openSceneFog(e)}closeSceneFog(){this.viewport.scener.closeSceneFog()}setSky(e){return this.viewport.setSky(e)}getScreenshot(){return this.screenshot()}screenshot(){return this.viewport.screenshot()}edgeShow(e,t){return this.viewport.scener.edgeShow(e,t)}unEdgeShow(e){return this.viewport.scener.unEdgeShow(e)}strokeShow(e,t){return this.viewport.scener.strokeShow(e,t)}unStrokeShow(e){return this.viewport.scener.unStrokeShow(e)}opacityShow(e,t){return this.viewport.scener.opacityShow(e,t)}unOpacityShow(e){return this.viewport.scener.unOpacityShow(e)}highlightShow(e,t){return this.viewport.scener.highlightShow(e,t)}unHighlightShow(e){return this.viewport.scener.unHighlightShow(e)}emissiveShow(e,t){return this.viewport.scener.emissiveShow(e,t)}unEmissiveShow(e){return this.viewport.scener.unEmissiveShow(e)}clearObject(){this.manager.clearObject()}clear(){this.manager.clear()}createAmbientLight(e){return this.manager.store.lightManager.createAmbientLight(e)}setAmbientLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setAmbientLight(t,e)}createDirectionalLight(e){return this.manager.store.lightManager.createDirectionalLight(e)}setDirectionalLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setDirectionalLight(t,e)}createHemisphereLight(e){return this.manager.store.lightManager.createHemisphereLight(e)}setHemisphereLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setHemisphereLight(t,e)}createSpotLight(e){return this.manager.store.lightManager.createSpotLight(e)}setSpotLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setSpotLight(t,e)}createPointLight(e){return this.manager.store.lightManager.createPointLight(e)}setPointLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setPointLight(t,e)}createRectAreaLight(e){return this.manager.store.lightManager.createRectAreaLight(e)}setRectAreaLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setRectAreaLight(t,e)}getLightById(e){return tr("getLightById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeLightById(e){return tr("removeLightById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}getAllLight(){return this.manager.store.lightManager.getAll()}clearLight(){return this.manager.store.lightManager.clear()}showAllLight(){return this.manager.store.lightManager.showAll()}hideAllLight(){return this.manager.store.lightManager.hideAll()}updateAllShadow(){return this.manager.store.lightManager.updateAllShadow()}getObjectById(e){return this.manager.getObjectById(e)}getObjectByName(e){return this.manager.getObjectByName(e)}getObjectByUserDataProperty(e,t){return this.manager.getObjectByUserDataProperty(e,t)}removeObjectById(e){return this.manager.removeObjectById(e)}createGroup(e,t){return this.manager.store.groupManager.createGroup(e,t)}getGroupById(e){return tr("getGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getGroupByName(e){return tr("getGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllGroup(){return this.manager.store.groupManager.getAll()}showAllGroup(){return this.manager.store.groupManager.showAll()}hideAllGroup(){return this.manager.store.groupManager.hideAll()}removeGroupById(e){return tr("removeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}loadSbm(e){return tr("loadSbm is deprecated, use loadModel instead"),this.loadModel(e)}parseSbm(){tr("parseSbm is deprecated!")}cloneSbm(e,t,n){return tr("cloneSbm is deprecated, use cloneModel instead"),this.cloneModel(e,t,n)}getSbmById(e){return tr("getSbmById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmByName(e){return tr("getSbmByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getSbmByUserDataProperty(e,t){return tr("getSbmByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeSbmById(e){return tr("removeSbmById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForSbm(e){return tr("createGroupForSbm is deprecated, use createGroup instead"),this.createGroup(e)}loadSbmToGroup(e,t){return tr("loadSbmToGroup is deprecated, use loadModelToGroup instead"),this.loadModelToGroup(e,t)}addSbmForGroup(e,t){return tr("addSbmForGroup is deprecated, use addModelForGroup instead"),this.addModelForGroup(e,t)}createSbmGroupFromXml(){tr("createGroupForSbm is deprecated!")}getSbmGroupById(e){return tr("getSbmGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmGroupByName(e){return tr("getSbmGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllSbmGroup(){return tr("getAllSbmGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeSbmGroupById(e){return tr("removeSbmGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearSbm(){return tr("clearSbm is deprecated, use clearModel instead"),this.clearModel()}getAllSbm(){return tr("getAllSbm is deprecated, use getAllModel instead"),this.getAllModel()}showAllSbm(){return tr("showAllSbm is deprecated, use showAllModel instead"),this.showAllModel()}hideAllSbm(){return tr("hideAllSbm is deprecated, use hideAllModel instead"),this.hideAllModel()}getSbmModelMaps(){return tr("getSbmModelMaps is deprecated, use getModelsMap instead"),this.getModelsMap()}setSbmModelMaps(e){return tr("setSbmModelMaps is deprecated, use setModelsMap instead"),this.setModelsMap(e)}setModelDracoDecoderPath(e){return this.manager.store.modelManager.setDracoDecoderPath(e)}setModelKtx2DecoderPath(e){return this.manager.store.modelManager.setKtx2DecoderPath(e)}loadModel(e,t){return this.manager.store.modelManager.load(e,t)}cloneModel(e,t,n){return this.manager.store.modelManager.clone(e,t,n)}getModelById(e){return tr("getModelById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelByName(e){return tr("getModelByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getModelByUserDataProperty(e,t){return tr("getModelByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeModelById(e){return tr("removeModelById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForModel(e){return tr("createGroupForModel is deprecated, use createGroup instead"),this.createGroup(e)}loadModelToGroup(e,t){return this.manager.store.modelManager.loadToGroup(e,t)}addModelForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.modelManager.addForGroup(n,t)}getModelGroupById(e){return tr("getModelGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelGroupByName(e){return tr("getModelGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllModelGroup(){return tr("getAllModelGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeModelGroupById(e){return tr("removeModelGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearModel(){return this.manager.store.modelManager.clear()}getAllModel(){return this.manager.store.modelManager.getAll()}showAllModel(){return this.manager.store.modelManager.showAll()}hideAllModel(){return this.manager.store.modelManager.hideAll()}computeModelsBoundsTree(e){return this.viewport.bvh.computeModelsBoundsTree(e)}clearIdb(){return this.manager.store.modelManager.clearIdb()}getModelsMap(){return this.manager.store.modelManager.modelsMap}setModelsMap(e){this.manager.store.modelManager.modelsMap=e}createPoi(e){return this.manager.store.poiManager.create(e)}clonePoi(e,t,n){return this.manager.store.poiManager.clone(e,t,n)}getPoiById(e){return tr("getPoiById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiByName(e){return tr("getPoiByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiByUserDataProperty(e,t){return tr("getPoiByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiById(e){return tr("removePoiById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoi(e){return tr("createGroupForPoi is deprecated, use createGroup instead"),this.createGroup(e)}createPoiToGroup(e,t){return this.manager.store.poiManager.createToGroup(e,t)}addPoiForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiManager.addForGroup(n,t)}getPoiGroupById(e){return tr("getPoiGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiGroupByName(e){return tr("getPoiGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiGroup(){return tr("getAllPoiGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiGroupById(e){return tr("removePoiGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoi(){return this.manager.store.poiManager.clear()}getAllPoi(){return this.manager.store.poiManager.getAll()}showAllPoi(){return this.manager.store.poiManager.showAll()}hideAllPoi(){return this.manager.store.poiManager.hideAll()}createPoiNode(e){return this.manager.store.poiNodeManager.create(e)}getPoiNodeById(e){return tr("getPoiNodeById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeByName(e){return tr("getPoiNodeByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiNodeByUserDataProperty(e,t){return tr("getPoiNodeByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiNodeById(e){return tr("removePoiNodeById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoiNode(e){return tr("createGroupForPoiNode is deprecated, use createGroup instead"),this.createGroup(e)}createPoiNodeToGroup(e,t){return this.manager.store.poiNodeManager.createToGroup(e,t)}addPoiNodeForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiNodeManager.addForGroup(n,t)}getPoiNodeGroupById(e){return tr("getPoiNodeGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeGroupByName(e){return tr("getPoiNodeGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiNodeGroup(){return tr("getAllPoiNodeGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiNodeGroupById(e){return tr("removePoiNodeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoiNode(){return this.manager.store.poiNodeManager.clear()}getAllPoiNode(){return this.manager.store.poiNodeManager.getAll()}showAllPoiNode(){return this.manager.store.poiNodeManager.showAll()}hideAllPoiNode(){return this.manager.store.poiNodeManager.hideAll()}createPoiMesh(e){const t=new Nc(e,this.textureCache);return this.addObject(t),t}createPolygonPoiMesh(e){const t=new zc(e,this.textureCache);return this.addObject(t),t}setTexture(e,t,n={}){const{cache:s=!0,independ:r=!0}=n||{};let i=e.material;if(r&&(i=i.clone(),e.material=i),null===t)return i.map=null,this.render(),null;const o=Rc(i,t,s,this.textureCache);return this.render(),o}createCanvas3D(e,t){return this.manager.store.canvas3DManager.create(e,t)}getCanvas3DById(e){return tr("getCanvas3DById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DByName(e){return tr("getCanvas3DByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getCanvas3DByUserDataProperty(e,t){return tr("getCanvas3DByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeCanvas3DById(e){return tr("removeCanvas3DById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForCanvas3D(e){return tr("createGroupForCanvas3D is deprecated, use createGroup instead"),this.createGroup(e)}createCanvas3DToGroup(e,t){return this.manager.store.canvas3DManager.createToGroup(e,t)}addCanvas3DForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.canvas3DManager.addForGroup(n,t)}getCanvas3DGroupById(e){return tr("getCanvas3DGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DGroupByName(e){return tr("getCanvas3DGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllCanvas3DGroup(){return tr("getAllCanvas3DGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeCanvas3DGroupById(e){return tr("removeCanvas3DGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearCanvas3D(){return this.manager.store.canvas3DManager.clear()}getAllCanvas3D(){return this.manager.store.canvas3DManager.getAll()}showAllCanvas3D(){return this.manager.store.canvas3DManager.showAll()}hideAllCanvas3D(){return this.manager.store.canvas3DManager.hideAll()}getShortestPath(e,t){return this.manager.store.topologyManager.getShortestPath(e,t)}getShortestPathAsync(e,t){return this.manager.store.topologyManager.getShortestPathAsync(e,t)}getShortestPathByMultipleStartPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPoints(e,t)}getShortestPathByMultipleStartPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPointsAsync(e,t)}getShortestPathByMultipleEndPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPoints(e,t)}getShortestPathByMultipleEndPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPointsAsync(e,t)}createTopologyFromGml(e){return this.manager.store.topologyManager.createFromGml(e)}createTopology(e){return this.manager.store.topologyManager.create(e)}setTopologyPassable(e,t){this.manager.store.topologyManager.setPassable(e,t)}resetTopologyNodes(e,t){return this.manager.store.topologyManager.resetNodes(e,t)}getTopologyById(e){return tr("getTopologyById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyByName(e){return tr("getTopologyByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getTopologyByUserDataProperty(e,t){return tr("getTopologyByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeTopologyById(e){return tr("removeTopologyById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForTopology(e){return tr("createGroupForTopology is deprecated, use createGroup instead"),this.createGroup(e)}createTopologyToGroup(e,t){return this.manager.store.topologyManager.createToGroup(e,t)}addTopologyForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.topologyManager.addForGroup(n,t)}getTopologyGroupById(e){return tr("getTopologyGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyGroupByName(e){return tr("getTopologyGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllTopologyGroup(){return tr("getAllTopologyGroup is deprecated, use getAllGroups instead"),this.getAllGroup()}removeTopologyGroupById(e){return tr("removeTopologyGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearTopology(){return this.manager.store.topologyManager.clear()}getAllTopology(){return this.manager.store.topologyManager.getAll()}showAllTopology(){return this.manager.store.topologyManager.showAll()}hideAllTopology(){return this.manager.store.topologyManager.hideAll()}addGridHelper(e){return this.manager.store.helperManager.addGridHelper(e)}addAxesHelper(e){return this.manager.store.helperManager.addAxesHelper(e)}addBoxHelper(e){return this.manager.store.helperManager.addBoxHelper(e)}addPlaneHelper(e){return this.manager.store.helperManager.addPlaneHelper(e)}createGround(e){return tr("In soonspacejs: 'createGround' 已弃用,请使用 'addGroundHelper'!"),this.addGroundHelper(e)}addGroundHelper(e){return this.manager.store.helperManager.addGroundHelper(e)}addDirectionalLightHelper(e){return this.manager.store.helperManager.addDirectionalLightHelper(e)}addHemisphereLightHelper(e){return this.manager.store.helperManager.addHemisphereLightHelper(e)}addSpotLightHelper(e){return this.manager.store.helperManager.addSpotLightHelper(e)}addPointLightHelper(e){return this.manager.store.helperManager.addPointLightHelper(e)}addRectAreaLightHelper(e){return this.manager.store.helperManager.addRectAreaLightHelper(e)}getHelperById(e){return tr("getHelperById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeHelperById(e){return tr("removeHelperById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearHelper(){return this.manager.store.helperManager.clear()}showAllHelper(){return this.manager.store.helperManager.showAll()}hideAllHelper(){return this.manager.store.helperManager.hideAll()}createDecal(e,t){return this.manager.store.decalManager.create(e,t)}updateDecalGeometry(e,t={}){return this.manager.store.decalManager.updateGeometry(e,t)}updateAllDecalGeometry(e={}){return this.manager.store.decalManager.updateAllGeometry(e)}clearDecal(){return this.manager.store.decalManager.clear()}getAllDecal(){return this.manager.store.decalManager.getAll()}showAllDecal(){return this.manager.store.decalManager.showAll()}hideAllDecal(){return this.manager.store.decalManager.hideAll()}createFindObjectsInBoxNearPosition(e,t){return Bc(e,t)}createFindObjectsInSphereNearPosition(e,t){return Uc(e,t)}createFindObjectsNearPath(e,t){return kc(e,t)}createPathAnimation(e,t,n){return new ii(e,t,n)}createTopologyAnimation(e,n,s){const r=n.nodes.map((e=>e.getWorldPosition(new t)));return new ii(e,r,s)}createPathAnimationAction(e,t,n){return function(e,t,n,s){const r=s?Wc(s,!1):null,i=Zc(t),{clip:o}=Ki(Object.assign(Object.assign(Object.assign({},r),i),{target:e})),a=n.playModelAnimation(e,o),{points:l}=i;return l?(a.enableKeyframeEvent=!1,a.points=l):a.enablePointEvent=!1,a}(e,t,this,n)}createPathAnimationActionForCamera(e,t){}createBonePathAnimation(e,t,n){return function(e,t,n,s){const r=s?Wc(s,!1):null,i=Zc(t),o=no(Object.assign(Object.assign(Object.assign({},r),i),{target:e})),{model:a,clip:l}=o,c=n.playModelAnimation(a,l);return Object.assign(Object.assign({},o),{action:c})}(e,t,this,n)}createChainSkeletalModel(e,t){return function(e,t){const n=zi(Object.assign(Object.assign({},t),{target:e})),{model:s,skeleton:r}=n;return{skeletalModel:s,skeleton:r}}(e,t)}createPathAnimationForBones(e,t,n){const s=function(e,t,n,s){const r=so(Object.assign(Object.assign({},s),{target:e,skeleton:t}));return n.playModelAnimation(t,r)}(e,t,this,n);return s}}id.THREE=e,id.TWEEN=Lt,id.utils=ni,id.animation=ri,id.library=Gc,id.ACTION=Ys.ACTION;export{yo as AnimationActionController,Eo as AnimationActionCreator,po as AnimationActionKeyframe,fo as AnimationActionOperate,Mo as AnimationClipCreator,co as AnimationClipKeyframe,ho as AnimationEventBaseType,Ga as BaseMesh,za as BaseObject3D,ll as Canvas3D,tl as Circle,Kl as Decal,Gl as DecalUVMapType,Mi as DirectionSide,Mr as FileRequestHeaders,cl as Ground,Va as Group,wo as GuiAnimationActionController,Qs as INNER_ID,Ja as Icon,ol as Line,sl as Link,Qa as Model,Zs as ModelFormat,el as Node,Xs as ObjecType,Ha as PluginObject,Xa as Poi,Nc as PoiMesh,Ya as PoiNode,$a as Point,al as Polygon,zc as PolygonPoiMesh,rl as Topology,xo as TrackProperty_Common,To as ValueTypeNames,_c as boundingIsIntersected,Fi as configVertexWeightByEquallyDivided,Bi as configVertexWeightForChainBones,Ri as configVertexWeightForEqualChainBones,go as createAnimationOperate,no as createBonePathAnimation,Ai as createChainBones,Li as createChainBonesByAxials,ji as createChainBonesByJoints,zi as createChainSkeletalModel,Ui as createChainSkinnedMesh,ki as createChainSkinnedMeshForMesh,Ki as createCurveAnimationClip,qi as createCurveAnimationClipByCurve,$i as createCurveAnimationClipByPolyline,so as createCurveAnimationClipForBones,oo as createCurveAnimationClipForBonesTarget,gi as createCurveBufferGeometry,_i as createEqualChainBones,Bc as createFindObjectsInBoxNearPosition,Uc as createFindObjectsInSphereNearPosition,kc as createFindObjectsNearPath,bo as createGuiAnimationController,ro as createKeyframeTracksForBones,ao as createKeyframeTracksForBonesTarget,Yi as createKeyframeTracksOfCurveAnimation,eo as createKeyframeTracksOfCurveAnimationByPolyline,vi as createLineSegmentsByCurve,bi as createLines,Lc as createPlaneMatrix,yi as createPolylineBufferGeometry,Oi as createPolylineCurve,Fc as createTexture,jc as createUVMatrix,id as default,Vi as getAllRootBones,Do as getClosestContinuousIndexes,Ti as getClosestDistanceInfoOfPointToLines,Co as getContinuousNumsList,fi as getCurveDivisionLength,Ei as getCurvePointAwayFrom,Ci as getCurvePointAwayFromOrigin,di as getCurveULengths,Si as getDistanceInfoOfPointToLines,Qi as getDurationOfPathAnimationOptions,Hi as getFirstRootBone,Xi as getKeyframeTransformDatas,to as getKeyframeTransformDatasByPolyline,pi as getLengthsOfTs,wi as getLinesInfo,Ac as getPolygonGeometryInfo,xi as getProjectionLines,Wi as getRootBone,io as getSampleDataForBones,lo as getSampleDataForBonesTarget,mi as getSampleNum,Zi as getTS,Ji as getTimes,Ka as isPoiNode25D,Wa as isPoiNode2D,qa as isPoiNode3D,mo as requestAnimation,Rc as setTexture};
|
|
7
|
+
*/const Jn=1,$n=2,es=4,ts=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),ns=0,ss=1,rs=-1;function is(e){return e.isPerspectiveCamera}function os(e){return e.isOrthographicCamera}const as=2*Math.PI,ls=Math.PI/2,cs=1e-5,hs=Math.PI/180;function us(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t=cs){return Math.abs(e)<t}function ps(e,t,n=cs){return ds(e-t,n)}function ms(e,t){return Math.round(e/t)*t}function fs(e){return isFinite(e)?e:e<0?-Number.MAX_VALUE:Number.MAX_VALUE}function gs(e){return Math.abs(e)<Number.MAX_VALUE?e:e*(1/0)}function ys(e,t,n,s,r=1/0,i){const o=2/(s=Math.max(1e-4,s)),a=o*i,l=1/(1+a+.48*a*a+.235*a*a*a);let c=e-t;const h=t,u=r*s;c=us(c,-u,u),t=e-c;const d=(n.value+o*c)*i;n.value=(n.value-o*d)*l;let p=t+(c+d)*l;return h-e>0==p>h&&(p=h,n.value=(p-h)/i),p}function vs(e,t,n,s,r=1/0,i,o){const a=2/(s=Math.max(1e-4,s)),l=a*i,c=1/(1+l+.48*l*l+.235*l*l*l);let h=t.x,u=t.y,d=t.z,p=e.x-h,m=e.y-u,f=e.z-d;const g=h,y=u,v=d,w=r*s,b=p*p+m*m+f*f;if(b>w*w){const e=Math.sqrt(b);p=p/e*w,m=m/e*w,f=f/e*w}h=e.x-p,u=e.y-m,d=e.z-f;const x=(n.x+a*p)*i,T=(n.y+a*m)*i,S=(n.z+a*f)*i;n.x=(n.x-a*x)*c,n.y=(n.y-a*T)*c,n.z=(n.z-a*S)*c,o.x=h+(p+x)*c,o.y=u+(m+T)*c,o.z=d+(f+S)*c;const O=g-e.x,M=y-e.y,E=v-e.z;return O*(o.x-g)+M*(o.y-y)+E*(o.z-v)>0&&(o.x=g,o.y=y,o.z=v,n.x=(o.x-g)/i,n.y=(o.y-y)/i,n.z=(o.z-v)/i),o}function ws(e,t){t.set(0,0),e.forEach((e=>{t.x+=e.clientX,t.y+=e.clientY})),t.x/=e.length,t.y/=e.length}function bs(e,t){return!!os(e)&&(console.warn(`${t} is not supported in OrthographicCamera`),!0)}class xs{constructor(){this._listeners={}}addEventListener(e,t){const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}removeAllEventListeners(e){e?Array.isArray(this._listeners[e])&&(this._listeners[e].length=0):this._listeners={}}dispatchEvent(e){const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,s=n.length;t<s;t++)n[t].call(this,e)}}}var Ts;const Ss=1/8,Os=/Mac/.test(null===(Ts=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===Ts?void 0:Ts.platform);let Ms,Es,Cs,Ds,Ps,Is,As,Ls,js,_s,Fs,Rs,Bs,Us,ks,Ns,zs,Gs,Vs,Hs,Ws,Ks,qs;class Ys extends xs{static install(e){Ms=e.THREE,Es=Object.freeze(new Ms.Vector3(0,0,0)),Cs=Object.freeze(new Ms.Vector3(0,1,0)),Ds=Object.freeze(new Ms.Vector3(0,0,1)),Ps=new Ms.Vector2,Is=new Ms.Vector3,As=new Ms.Vector3,Ls=new Ms.Vector3,js=new Ms.Vector3,_s=new Ms.Vector3,Fs=new Ms.Vector3,Rs=new Ms.Vector3,Bs=new Ms.Vector3,Us=new Ms.Vector3,ks=new Ms.Spherical,Ns=new Ms.Spherical,zs=new Ms.Box3,Gs=new Ms.Box3,Vs=new Ms.Sphere,Hs=new Ms.Quaternion,Ws=new Ms.Quaternion,Ks=new Ms.Matrix4,qs=new Ms.Raycaster}static get ACTION(){return ts}constructor(e,t){super(),this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.minDistance=Number.EPSILON,this.maxDistance=1/0,this.infinityDolly=!1,this.minZoom=.01,this.maxZoom=1/0,this.smoothTime=.25,this.draggingSmoothTime=.125,this.maxSpeed=1/0,this.azimuthRotateSpeed=1,this.polarRotateSpeed=1,this.dollySpeed=1,this.dollyDragInverted=!1,this.truckSpeed=2,this.dollyToCursor=!1,this.dragToOffset=!1,this.verticalDragToForward=!1,this.boundaryFriction=0,this.restThreshold=.01,this.colliderMeshes=[],this.cancel=()=>{},this._enabled=!0,this._state=ts.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=ns,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new Ms.Vector3,this._focalOffsetVelocity=new Ms.Vector3,this._zoomVelocity={value:0},this._truckInternal=(e,t,n)=>{let s,r;if(is(this._camera)){const n=Is.copy(this._camera.position).sub(this._target),i=this._camera.getEffectiveFOV()*hs,o=n.length()*Math.tan(.5*i);s=this.truckSpeed*e*o/this._elementRect.height,r=this.truckSpeed*t*o/this._elementRect.height}else{if(!os(this._camera))return;{const n=this._camera;s=e*(n.right-n.left)/n.zoom/this._elementRect.width,r=t*(n.top-n.bottom)/n.zoom/this._elementRect.height}}this.verticalDragToForward?(n?this.setFocalOffset(this._focalOffsetEnd.x+s,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(s,0,!0),this.forward(-r,!0)):n?this.setFocalOffset(this._focalOffsetEnd.x+s,this._focalOffsetEnd.y+r,this._focalOffsetEnd.z,!0):this.truck(s,r,!0)},this._rotateInternal=(e,t)=>{const n=as*this.azimuthRotateSpeed*e/this._elementRect.height,s=as*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(n,s,!0)},this._dollyInternal=(e,t,n)=>{const s=Math.pow(.95,-e*this.dollySpeed),r=this._sphericalEnd.radius,i=this._sphericalEnd.radius*s,o=us(i,this.minDistance,this.maxDistance),a=o-i;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(i,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(a,!0),this._dollyToNoClamp(o,!0)):this._dollyToNoClamp(o,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?i:o)-r,this._dollyControlCoord.set(t,n)),this._lastDollyDirection=Math.sign(-e)},this._zoomInternal=(e,t,n)=>{const s=Math.pow(.95,e*this.dollySpeed),r=this._zoom,i=this._zoom*s;this.zoomTo(i,!0),this.dollyToCursor&&(this._changedZoom+=i-r,this._dollyControlCoord.set(t,n))},void 0===Ms&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=(new Ms.Quaternion).setFromUnitVectors(this._camera.up,Cs),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=ts.NONE,this._target=new Ms.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new Ms.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=(new Ms.Spherical).setFromVector3(Is.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new Ms.Vector3,new Ms.Vector3,new Ms.Vector3,new Ms.Vector3],this._updateNearPlaneCorners(),this._boundary=new Ms.Box3(new Ms.Vector3(-1/0,-1/0,-1/0),new Ms.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new Ms.Vector2,this.mouseButtons={left:ts.ROTATE,middle:ts.DOLLY,right:ts.TRUCK,wheel:is(this._camera)?ts.DOLLY:os(this._camera)?ts.ZOOM:ts.NONE},this.touches={one:ts.TOUCH_ROTATE,two:is(this._camera)?ts.TOUCH_DOLLY_TRUCK:os(this._camera)?ts.TOUCH_ZOOM_TRUCK:ts.NONE,three:ts.TOUCH_TRUCK};const n=new Ms.Vector2,s=new Ms.Vector2,r=new Ms.Vector2,i=e=>{if(!this._enabled||!this._domElement)return;if(0!==this._interactiveArea.left||0!==this._interactiveArea.top||1!==this._interactiveArea.width||1!==this._interactiveArea.height){const t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,s=e.clientY/t.height;if(n<this._interactiveArea.left||n>this._interactiveArea.right||s<this._interactiveArea.top||s>this._interactiveArea.bottom)return}const t="mouse"!==e.pointerType?null:(e.buttons&Jn)===Jn?Jn:(e.buttons&es)===es?es:(e.buttons&$n)===$n?$n:null;if(null!==t){const e=this._findPointerByMouseButton(t);e&&this._disposePointer(e)}if((e.buttons&Jn)===Jn&&this._lockedPointer)return;const n={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:t};this._activePointers.push(n),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",a),this._isDragging=!0,u(e)},o=e=>{e.cancelable&&e.preventDefault();const t=e.pointerId,n=this._lockedPointer||this._findPointerById(t);if(n){if(n.clientX=e.clientX,n.clientY=e.clientY,n.deltaX=e.movementX,n.deltaY=e.movementY,this._state=0,"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(e.buttons&Jn)===Jn)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(e.buttons&es)===es&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(e.buttons&$n)===$n&&(this._state=this._state|this.mouseButtons.right);d()}},a=e=>{const t=this._findPointerById(e.pointerId);if(!t||t!==this._lockedPointer){if(t&&this._disposePointer(t),"touch"===e.pointerType)switch(this._activePointers.length){case 0:this._state=ts.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._state=ts.NONE;p()}};let l=-1;const c=e=>{if(!this._domElement)return;if(!this._enabled||this.mouseButtons.wheel===ts.NONE)return;if(0!==this._interactiveArea.left||0!==this._interactiveArea.top||1!==this._interactiveArea.width||1!==this._interactiveArea.height){const t=this._domElement.getBoundingClientRect(),n=e.clientX/t.width,s=e.clientY/t.height;if(n<this._interactiveArea.left||n>this._interactiveArea.right||s<this._interactiveArea.top||s>this._interactiveArea.bottom)return}if(e.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===ts.ROTATE||this.mouseButtons.wheel===ts.TRUCK){const e=performance.now();l-e<1e3&&this._getClientRect(this._elementRect),l=e}const t=Os?-1:-3,n=1===e.deltaMode?e.deltaY/t:e.deltaY/(10*t),s=this.dollyToCursor?(e.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,r=this.dollyToCursor?(e.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case ts.ROTATE:this._rotateInternal(e.deltaX,e.deltaY),this._isUserControllingRotate=!0;break;case ts.TRUCK:this._truckInternal(e.deltaX,e.deltaY,!1),this._isUserControllingTruck=!0;break;case ts.OFFSET:this._truckInternal(e.deltaX,e.deltaY,!0),this._isUserControllingOffset=!0;break;case ts.DOLLY:this._dollyInternal(-n,s,r),this._isUserControllingDolly=!0;break;case ts.ZOOM:this._zoomInternal(-n,s,r),this._isUserControllingZoom=!0}this.dispatchEvent({type:"control"})},h=e=>{if(this._domElement&&this._enabled){if(this.mouseButtons.right===Ys.ACTION.NONE){const t=e instanceof PointerEvent?e.pointerId:0,n=this._findPointerById(t);return n&&this._disposePointer(n),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),void this._domElement.ownerDocument.removeEventListener("pointerup",a)}e.preventDefault()}},u=e=>{if(!this._enabled)return;ws(this._activePointers,Ps),this._getClientRect(this._elementRect),n.copy(Ps),s.copy(Ps);if(this._activePointers.length>=2){const e=Ps.x-this._activePointers[1].clientX,t=Ps.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t);r.set(0,n);const i=.5*(this._activePointers[0].clientX+this._activePointers[1].clientX),o=.5*(this._activePointers[0].clientY+this._activePointers[1].clientY);s.set(i,o)}if(this._state=0,e)if("pointerType"in e&&"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._lockedPointer||(e.buttons&Jn)!==Jn||(this._state=this._state|this.mouseButtons.left),(e.buttons&es)===es&&(this._state=this._state|this.mouseButtons.middle),(e.buttons&$n)===$n&&(this._state=this._state|this.mouseButtons.right);else this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);(this._state&ts.ROTATE)!==ts.ROTATE&&(this._state&ts.TOUCH_ROTATE)!==ts.TOUCH_ROTATE&&(this._state&ts.TOUCH_DOLLY_ROTATE)!==ts.TOUCH_DOLLY_ROTATE&&(this._state&ts.TOUCH_ZOOM_ROTATE)!==ts.TOUCH_ZOOM_ROTATE||(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),(this._state&ts.TRUCK)!==ts.TRUCK&&(this._state&ts.TOUCH_TRUCK)!==ts.TOUCH_TRUCK&&(this._state&ts.TOUCH_DOLLY_TRUCK)!==ts.TOUCH_DOLLY_TRUCK&&(this._state&ts.TOUCH_ZOOM_TRUCK)!==ts.TOUCH_ZOOM_TRUCK||(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),(this._state&ts.DOLLY)!==ts.DOLLY&&(this._state&ts.TOUCH_DOLLY)!==ts.TOUCH_DOLLY&&(this._state&ts.TOUCH_DOLLY_TRUCK)!==ts.TOUCH_DOLLY_TRUCK&&(this._state&ts.TOUCH_DOLLY_OFFSET)!==ts.TOUCH_DOLLY_OFFSET&&(this._state&ts.TOUCH_DOLLY_ROTATE)!==ts.TOUCH_DOLLY_ROTATE||(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),(this._state&ts.ZOOM)!==ts.ZOOM&&(this._state&ts.TOUCH_ZOOM)!==ts.TOUCH_ZOOM&&(this._state&ts.TOUCH_ZOOM_TRUCK)!==ts.TOUCH_ZOOM_TRUCK&&(this._state&ts.TOUCH_ZOOM_OFFSET)!==ts.TOUCH_ZOOM_OFFSET&&(this._state&ts.TOUCH_ZOOM_ROTATE)!==ts.TOUCH_ZOOM_ROTATE||(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),(this._state&ts.OFFSET)!==ts.OFFSET&&(this._state&ts.TOUCH_OFFSET)!==ts.TOUCH_OFFSET&&(this._state&ts.TOUCH_DOLLY_OFFSET)!==ts.TOUCH_DOLLY_OFFSET&&(this._state&ts.TOUCH_ZOOM_OFFSET)!==ts.TOUCH_ZOOM_OFFSET||(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},d=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,ws(this._activePointers,Ps);const e=this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,t=e?-e.deltaX:s.x-Ps.x,i=e?-e.deltaY:s.y-Ps.y;if(s.copy(Ps),(this._state&ts.ROTATE)!==ts.ROTATE&&(this._state&ts.TOUCH_ROTATE)!==ts.TOUCH_ROTATE&&(this._state&ts.TOUCH_DOLLY_ROTATE)!==ts.TOUCH_DOLLY_ROTATE&&(this._state&ts.TOUCH_ZOOM_ROTATE)!==ts.TOUCH_ZOOM_ROTATE||(this._rotateInternal(t,i),this._isUserControllingRotate=!0),(this._state&ts.DOLLY)===ts.DOLLY||(this._state&ts.ZOOM)===ts.ZOOM){const e=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,t=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,s=this.dollyDragInverted?-1:1;(this._state&ts.DOLLY)===ts.DOLLY?(this._dollyInternal(s*i*Ss,e,t),this._isUserControllingDolly=!0):(this._zoomInternal(s*i*Ss,e,t),this._isUserControllingZoom=!0)}if((this._state&ts.TOUCH_DOLLY)===ts.TOUCH_DOLLY||(this._state&ts.TOUCH_ZOOM)===ts.TOUCH_ZOOM||(this._state&ts.TOUCH_DOLLY_TRUCK)===ts.TOUCH_DOLLY_TRUCK||(this._state&ts.TOUCH_ZOOM_TRUCK)===ts.TOUCH_ZOOM_TRUCK||(this._state&ts.TOUCH_DOLLY_OFFSET)===ts.TOUCH_DOLLY_OFFSET||(this._state&ts.TOUCH_ZOOM_OFFSET)===ts.TOUCH_ZOOM_OFFSET||(this._state&ts.TOUCH_DOLLY_ROTATE)===ts.TOUCH_DOLLY_ROTATE||(this._state&ts.TOUCH_ZOOM_ROTATE)===ts.TOUCH_ZOOM_ROTATE){const e=Ps.x-this._activePointers[1].clientX,t=Ps.y-this._activePointers[1].clientY,n=Math.sqrt(e*e+t*t),i=r.y-n;r.set(0,n);const o=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,a=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&ts.TOUCH_DOLLY)===ts.TOUCH_DOLLY||(this._state&ts.TOUCH_DOLLY_ROTATE)===ts.TOUCH_DOLLY_ROTATE||(this._state&ts.TOUCH_DOLLY_TRUCK)===ts.TOUCH_DOLLY_TRUCK||(this._state&ts.TOUCH_DOLLY_OFFSET)===ts.TOUCH_DOLLY_OFFSET?(this._dollyInternal(i*Ss,o,a),this._isUserControllingDolly=!0):(this._zoomInternal(i*Ss,o,a),this._isUserControllingZoom=!0)}(this._state&ts.TRUCK)!==ts.TRUCK&&(this._state&ts.TOUCH_TRUCK)!==ts.TOUCH_TRUCK&&(this._state&ts.TOUCH_DOLLY_TRUCK)!==ts.TOUCH_DOLLY_TRUCK&&(this._state&ts.TOUCH_ZOOM_TRUCK)!==ts.TOUCH_ZOOM_TRUCK||(this._truckInternal(t,i,!1),this._isUserControllingTruck=!0),(this._state&ts.OFFSET)!==ts.OFFSET&&(this._state&ts.TOUCH_OFFSET)!==ts.TOUCH_OFFSET&&(this._state&ts.TOUCH_DOLLY_OFFSET)!==ts.TOUCH_DOLLY_OFFSET&&(this._state&ts.TOUCH_ZOOM_OFFSET)!==ts.TOUCH_ZOOM_OFFSET||(this._truckInternal(t,i,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{ws(this._activePointers,Ps),s.copy(Ps),this._dragNeedsUpdate=!1,(0===this._activePointers.length||1===this._activePointers.length&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),0===this._activePointers.length&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{this._enabled&&this._domElement&&(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",m),this._domElement.ownerDocument.addEventListener("pointerlockerror",f),this._domElement.ownerDocument.addEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",a),u())},this.unlockPointer=()=>{var e,t,n;null!==this._lockedPointer&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),null===(e=this._domElement)||void 0===e||e.ownerDocument.exitPointerLock(),null===(t=this._domElement)||void 0===t||t.ownerDocument.removeEventListener("pointerlockchange",m),null===(n=this._domElement)||void 0===n||n.ownerDocument.removeEventListener("pointerlockerror",f),this.cancel()};const m=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},f=()=>{this.unlockPointer()};this._addAllEventListeners=e=>{this._domElement=e,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",i),this._domElement.addEventListener("pointercancel",a),this._domElement.addEventListener("wheel",c,{passive:!1}),this._domElement.addEventListener("contextmenu",h)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",i),this._domElement.removeEventListener("pointercancel",a),this._domElement.removeEventListener("wheel",c,{passive:!1}),this._domElement.removeEventListener("contextmenu",h),this._domElement.ownerDocument.removeEventListener("pointermove",o,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",a),this._domElement.ownerDocument.removeEventListener("pointerlockchange",m),this._domElement.ownerDocument.removeEventListener("pointerlockerror",f))},this.cancel=()=>{this._state!==ts.NONE&&(this._state=ts.NONE,this._activePointers.length=0,p())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=us(e.width,0,1),this._interactiveArea.height=us(e.height,0,1),this._interactiveArea.x=us(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=us(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;const s=us(e,this.minAzimuthAngle,this.maxAzimuthAngle),r=us(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=r,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const i=!n||ps(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ps(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(i)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=ns,this._changedDolly=0,this._dollyToNoClamp(us(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const t=this._collisionTest(),s=ps(t,this._spherical.radius);if(!(n>e)&&s)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,t)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const s=!t||ps(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(s)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(js).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=us(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||ps(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),_s.setFromMatrixColumn(this._camera.matrix,0),Fs.setFromMatrixColumn(this._camera.matrix,1),_s.multiplyScalar(e),Fs.multiplyScalar(-t);const s=Is.copy(_s).add(Fs),r=As.copy(this._targetEnd).add(s);return this.moveTo(r.x,r.y,r.z,n)}forward(e,t=!1){Is.setFromMatrixColumn(this._camera.matrix,0),Is.crossVectors(this._camera.up,Is),Is.multiplyScalar(e);const n=As.copy(this._targetEnd).add(Is);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return Is.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+Is.x,this._targetEnd.y+Is.y,this._targetEnd.z+Is.z,t)}moveTo(e,t,n,s=!1){this._isUserControllingTruck=!1;const r=Is.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,r,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const i=!s||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}lookInDirectionOf(e,t,n,s=!1){const r=Is.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);return this.setPosition(r.x,r.y,r.z,s)}fitToBox(e,t,{cover:n=!1,paddingLeft:s=0,paddingRight:r=0,paddingBottom:i=0,paddingTop:o=0}={}){const a=[],l=e.isBox3?zs.copy(e):zs.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const c=ms(this._sphericalEnd.theta,ls),h=ms(this._sphericalEnd.phi,ls);a.push(this.rotateTo(c,h,t));const u=Is.setFromSpherical(this._sphericalEnd).normalize(),d=Hs.setFromUnitVectors(u,Ds),p=ps(Math.abs(u.y),1);p&&d.multiply(Ws.setFromAxisAngle(Cs,c)),d.multiply(this._yAxisUpSpaceInverse);const m=Gs.makeEmpty();As.copy(l.min).applyQuaternion(d),m.expandByPoint(As),As.copy(l.min).setX(l.max.x).applyQuaternion(d),m.expandByPoint(As),As.copy(l.min).setY(l.max.y).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).setZ(l.min.z).applyQuaternion(d),m.expandByPoint(As),As.copy(l.min).setZ(l.max.z).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).setY(l.min.y).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).setX(l.min.x).applyQuaternion(d),m.expandByPoint(As),As.copy(l.max).applyQuaternion(d),m.expandByPoint(As),m.min.x-=s,m.min.y-=i,m.max.x+=r,m.max.y+=o,d.setFromUnitVectors(Ds,u),p&&d.premultiply(Ws.invert()),d.premultiply(this._yAxisUpSpace);const f=m.getSize(Is),g=m.getCenter(As).applyQuaternion(d);if(is(this._camera)){const e=this.getDistanceToFitBox(f.x,f.y,f.z,n);a.push(this.moveTo(g.x,g.y,g.z,t)),a.push(this.dollyTo(e,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(os(this._camera)){const e=this._camera,s=e.right-e.left,r=e.top-e.bottom,i=n?Math.max(s/f.x,r/f.y):Math.min(s/f.x,r/f.y);a.push(this.moveTo(g.x,g.y,g.z,t)),a.push(this.zoomTo(i,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const n=[],s="isObject3D"in e?Ys.createBoundingSphere(e,Vs):Vs.copy(e);if(n.push(this.moveTo(s.center.x,s.center.y,s.center.z,t)),is(this._camera)){const e=this.getDistanceToFitSphere(s.radius);n.push(this.dollyTo(e,t))}else if(os(this._camera)){const e=this._camera.right-this._camera.left,r=this._camera.top-this._camera.bottom,i=2*s.radius,o=Math.min(e/i,r/i);n.push(this.zoomTo(o,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,s,r,i,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=ns,this._changedDolly=0;const a=As.set(s,r,i),l=Is.set(e,t,n);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const c=!o||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold)&&ps(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ps(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ps(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(c)}lerpLookAt(e,t,n,s,r,i,o,a,l,c,h,u,d,p=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=ns,this._changedDolly=0;const m=Is.set(s,r,i),f=As.set(e,t,n);ks.setFromVector3(f.sub(m).applyQuaternion(this._yAxisUpSpace));const g=Ls.set(c,h,u),y=As.set(o,a,l);Ns.setFromVector3(y.sub(g).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(m.lerp(g,d));const v=Ns.theta-ks.theta,w=Ns.phi-ks.phi,b=Ns.radius-ks.radius;this._sphericalEnd.set(ks.radius+b*d,ks.phi+w*d,ks.theta+v*d),this.normalizeRotations(),this._needsUpdate=!0,p||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const x=!p||ps(this._target.x,this._targetEnd.x,this.restThreshold)&&ps(this._target.y,this._targetEnd.y,this.restThreshold)&&ps(this._target.z,this._targetEnd.z,this.restThreshold)&&ps(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ps(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ps(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(x)}setPosition(e,t,n,s=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,n,s=!1){const r=this.getPosition(Is),i=this.setLookAt(r.x,r.y,r.z,e,t,n,s);return this._sphericalEnd.phi=us(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),i}setFocalOffset(e,t,n,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const r=!s||ps(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&ps(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&ps(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),_s.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Fs.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Rs.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=Is.set(e,t,n),r=s.distanceTo(this._camera.position),i=s.sub(this._camera.position);_s.multiplyScalar(i.x),Fs.multiplyScalar(i.y),Rs.multiplyScalar(i.z),Is.copy(_s).add(Fs).add(Rs),Is.z=Is.z+r,this.dollyTo(r,!1),this.setFocalOffset(-Is.x,Is.y,-Is.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e)return this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),void(this._needsUpdate=!0);this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,s){null!==e?(this._viewport=this._viewport||new Ms.Vector4,"number"==typeof e?this._viewport.set(e,t,n,s):this._viewport.copy(e)):this._viewport=null}getDistanceToFitBox(e,t,n,s=!1){if(bs(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const r=e/t,i=this._camera.getEffectiveFOV()*hs,o=this._camera.aspect;return.5*((s?r>o:r<o)?t:e/o)/Math.tan(.5*i)+.5*n}getDistanceToFitSphere(e){if(bs(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*hs,n=2*Math.atan(Math.tan(.5*t)*this._camera.aspect),s=1<this._camera.aspect?t:n;return e/Math.sin(.5*s)}getTarget(e,t=!0){return(e&&e.isVector3?e:new Ms.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e,t=!0){return(e&&e.isVector3?e:new Ms.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e,t=!0){return(e||new Ms.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e,t=!0){return(e&&e.isVector3?e:new Ms.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){this._sphericalEnd.theta=this._sphericalEnd.theta%as,this._sphericalEnd.theta<0&&(this._sphericalEnd.theta+=as),this._spherical.theta+=as*Math.round((this._sphericalEnd.theta-this._spherical.theta)/as)}stop(){this._focalOffset.copy(this._focalOffsetEnd),this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd),this._zoom=this._zoomEnd}reset(e=!1){if(!ps(this._camera.up.x,this._cameraUp0.x)||!ps(this._camera.up.y,this._cameraUp0.y)||!ps(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const e=this.getPosition(Is);this.updateCameraUp(),this.setPosition(e.x,e.y,e.z)}const t=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,e),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,e),this.zoomTo(this._zoom0,e)];return Promise.all(t)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,Cs),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=Is.subVectors(this._target,this._camera.position).normalize(),t=As.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e).normalize(),this._camera.updateMatrixWorld();const n=this.getPosition(Is);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}update(e){const t=this._sphericalEnd.theta-this._spherical.theta,n=this._sphericalEnd.phi-this._spherical.phi,s=this._sphericalEnd.radius-this._spherical.radius,r=Bs.subVectors(this._targetEnd,this._target),i=Us.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(ds(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=ys(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,t,1/0,e),this._needsUpdate=!0}if(ds(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const t=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=ys(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,t,1/0,e),this._needsUpdate=!0}if(ds(s))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const t=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=ys(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,t,this.maxSpeed,e),this._needsUpdate=!0}if(ds(r.x)&&ds(r.y)&&ds(r.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const t=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;vs(this._target,this._targetEnd,this._targetVelocity,t,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(ds(i.x)&&ds(i.y)&&ds(i.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const t=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;vs(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,t,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(ds(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const t=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=ys(this._zoom,this._zoomEnd,this._zoomVelocity,t,1/0,e)}if(this.dollyToCursor)if(is(this._camera)&&0!==this._changedDolly){const e=this._spherical.radius-this._lastDistance,t=this._camera,n=this._getCameraDirection(js),s=Is.copy(n).cross(t.up).normalize();0===s.lengthSq()&&(s.x=1);const r=As.crossVectors(s,n),i=this._sphericalEnd.radius*Math.tan(t.getEffectiveFOV()*hs*.5),o=(this._sphericalEnd.radius-e-this._sphericalEnd.radius)/this._sphericalEnd.radius,a=Ls.copy(this._targetEnd).add(s.multiplyScalar(this._dollyControlCoord.x*i*t.aspect)).add(r.multiplyScalar(this._dollyControlCoord.y*i)),l=Is.copy(this._targetEnd).lerp(a,o),c=this._lastDollyDirection===ss&&this._spherical.radius<=this.minDistance,h=this._lastDollyDirection===rs&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(c||h)){this._sphericalEnd.radius-=e,this._spherical.radius-=e;const t=As.copy(n).multiplyScalar(-e);l.add(t)}this._boundary.clampPoint(l,l);const u=As.subVectors(l,this._targetEnd);this._targetEnd.copy(l),this._target.add(u),this._changedDolly-=e,ds(this._changedDolly)&&(this._changedDolly=0)}else if(os(this._camera)&&0!==this._changedZoom){const e=this._zoom-this._lastZoom,t=this._camera,n=Is.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(t.near+t.far)/(t.near-t.far)).unproject(t),s=As.set(0,0,-1).applyQuaternion(t.quaternion),r=Ls.copy(n).add(s.multiplyScalar(-n.dot(t.up))),i=-(this._zoom-e-this._zoom)/this._zoom,o=this._getCameraDirection(js),a=this._targetEnd.dot(o),l=Is.copy(this._targetEnd).lerp(r,i),c=l.dot(o),h=o.multiplyScalar(c-a);l.sub(h),this._boundary.clampPoint(l,l);const u=As.subVectors(l,this._targetEnd);this._targetEnd.copy(l),this._target.add(u),this._changedZoom-=e,ds(this._changedZoom)&&(this._changedZoom=0)}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0),this._dragNeedsUpdate=!0;const a=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,a),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target);(!ds(this._focalOffset.x)||!ds(this._focalOffset.y)||!ds(this._focalOffset.z))&&(this._camera.updateMatrixWorld(),_s.setFromMatrixColumn(this._camera.matrix,0),Fs.setFromMatrixColumn(this._camera.matrix,1),Rs.setFromMatrixColumn(this._camera.matrix,2),_s.multiplyScalar(this._focalOffset.x),Fs.multiplyScalar(-this._focalOffset.y),Rs.multiplyScalar(this._focalOffset.z),Is.copy(_s).add(Fs).add(Rs),this._camera.position.add(Is)),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),Is.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const l=this._needsUpdate;return l&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):l?(this.dispatchEvent({type:"update"}),ds(t,this.restThreshold)&&ds(n,this.restThreshold)&&ds(s,this.restThreshold)&&ds(r.x,this.restThreshold)&&ds(r.y,this.restThreshold)&&ds(r.z,this.restThreshold)&&ds(i.x,this.restThreshold)&&ds(i.y,this.restThreshold)&&ds(i.z,this.restThreshold)&&ds(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!l&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=l,this._needsUpdate=!1,l}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:fs(this.maxDistance),minZoom:this.minZoom,maxZoom:fs(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:fs(this.maxPolarAngle),minAzimuthAngle:fs(this.minAzimuthAngle),maxAzimuthAngle:fs(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,verticalDragToForward:this.verticalDragToForward,target:this._targetEnd.toArray(),position:Is.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(e,t=!1){const n=JSON.parse(e);this.enabled=n.enabled,this.minDistance=n.minDistance,this.maxDistance=gs(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=gs(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=gs(n.maxPolarAngle),this.minAzimuthAngle=gs(n.minAzimuthAngle),this.maxAzimuthAngle=gs(n.maxAzimuthAngle),this.smoothTime=n.smoothTime,this.draggingSmoothTime=n.draggingSmoothTime,this.dollySpeed=n.dollySpeed,this.truckSpeed=n.truckSpeed,this.dollyToCursor=n.dollyToCursor,this.verticalDragToForward=n.verticalDragToForward,this._target0.fromArray(n.target0),this._position0.fromArray(n.position0),this._zoom0=n.zoom0,this._focalOffset0.fromArray(n.focalOffset0),this.moveTo(n.target[0],n.target[1],n.target[2],t),ks.setFromVector3(Is.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(ks.theta,ks.phi,t),this.dollyTo(ks.radius,t),this.zoomTo(n.zoom,t),this.setFocalOffset(n.focalOffset[0],n.focalOffset[1],n.focalOffset[2],t),this._needsUpdate=!0}connect(e){this._domElement?console.warn("camera-controls is already connected."):(e.setAttribute("data-camera-controls-version","2.9.0"),this._addAllEventListeners(e),this._getClientRect(this._elementRect))}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&(this._domElement.removeAttribute("data-camera-controls-version"),this._domElement=void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(e){return e.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(e){return this._getTargetDirection(e).negate()}_findPointerById(e){return this._activePointers.find((t=>t.pointerId===e))}_findPointerByMouseButton(e){return this._activePointers.find((t=>t.mouseButton===e))}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const s=t.lengthSq();if(0===s)return e;const r=As.copy(t).add(e),i=this._boundary.clampPoint(r,Ls).sub(r),o=i.lengthSq();if(0===o)return e.add(t);if(o===s)return e;if(0===n)return e.add(t).add(i);{const s=1+n*o/t.dot(i);return e.add(As.copy(t).multiplyScalar(s)).add(i.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(is(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*hs,s=Math.tan(.5*n)*t,r=s*e.aspect;this._nearPlaneCorners[0].set(-r,-s,0),this._nearPlaneCorners[1].set(r,-s,0),this._nearPlaneCorners[2].set(r,s,0),this._nearPlaneCorners[3].set(-r,s,0)}else if(os(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,s=e.right*t,r=e.top*t,i=e.bottom*t;this._nearPlaneCorners[0].set(n,r,0),this._nearPlaneCorners[1].set(s,r,0),this._nearPlaneCorners[2].set(s,i,0),this._nearPlaneCorners[3].set(n,i,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1))return e;if(bs(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(js);Ks.lookAt(Es,t,this._camera.up);for(let n=0;n<4;n++){const s=As.copy(this._nearPlaneCorners[n]);s.applyMatrix4(Ks);const r=Ls.addVectors(this._target,s);qs.set(r,t),qs.far=this._spherical.radius+1;const i=qs.intersectObjects(this.colliderMeshes);0!==i.length&&i[0].distance<e&&(e=i[0].distance)}return e}_getClientRect(e){if(!this._domElement)return;const t=this._domElement.getBoundingClientRect();return e.x=t.left,e.y=t.top,this._viewport?(e.x+=this._viewport.x,e.y+=t.height-this._viewport.w-this._viewport.y,e.width=this._viewport.z,e.height=this._viewport.w):(e.width=t.width,e.height=t.height),e}_createOnRestPromise(e){return e?Promise.resolve():(this._hasRested=!1,this.dispatchEvent({type:"transitionstart"}),new Promise((e=>{const t=()=>{this.removeEventListener("rest",t),e()};this.addEventListener("rest",t)})))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new Ms.Sphere){const n=t,s=n.center;zs.makeEmpty(),e.traverseVisible((e=>{e.isMesh&&zs.expandByObject(e)})),zs.getCenter(s);let r=0;return e.traverseVisible((e=>{if(!e.isMesh)return;const t=e,n=t.geometry.clone();n.applyMatrix4(t.matrixWorld);const i=n.attributes.position;for(let e=0,t=i.count;e<t;e++)Is.fromBufferAttribute(i,e),r=Math.max(r,s.distanceToSquared(Is))})),n.radius=Math.sqrt(r),n}}const Qs="[soonspacejs]: ";var Xs,Zs;!function(e){e.Group="Group",e.Light="Light",e.Model="Model",e.Poi="Poi",e.PoiNode="PoiNode",e.Canvas3D="Canvas3D",e.Topology="Topology",e.Helper="Helper",e.Decal="Decal",e.PluginObject="PluginObject"}(Xs||(Xs={})),function(e){e.sbm="SBM",e.sbmx="SBMX",e.glb="GLB",e.gltf="GLTF",e.fbx="FBX",e.obj="OBJ",e.stl="STL"}(Zs||(Zs={}));const Js="In soonspacejs: ",$s=(e,t)=>{let n="";for(const e in t)n+=`${e}: ${t[e]};`;console.log(`%c${e}`,n)},er={},tr=e=>{e in er||(er[e]=!0,console.warn(Js+e))},nr=e=>{e in er||(er[e]=!0,console.error(Js+e))};function sr(e){return e instanceof t?e:new t(e.x,e.y,e.z)}function rr(e){return e instanceof n?e:new n(e.x,e.y,e.z)}function ir(e,t){const n=new s;return e instanceof r?e.children.filter((e=>!("isTransformControls"in e))).reduce(((e,n)=>e.union((new s).setFromObject(n,t))),n):n.setFromObject(e,t),n.isEmpty()&&(e.getWorldPosition(n.min),n.max.copy(n.min)),n}function or(e,t,n){const s=n.clone();return Math.abs(t[e]-n[e])>Math.PI&&(t[e]>n[e]?s[e]+=2*Math.PI:s[e]-=2*Math.PI),s}function ar(e){return Math.PI/180*e}function lr(e,s=!0){return s?{position:e.getWorldPosition(new t),rotation:(new n).setFromQuaternion(e.getWorldQuaternion(new i)),scale:e.getWorldScale(new t)}:{position:e.position.clone(),rotation:e.rotation.clone(),scale:e.scale.clone()}}function cr(e,t,n=!0){const s=lr(t,n);e.position.copy(s.position),e.rotation.copy(s.rotation),e.scale.copy(s.scale)}function hr(e){return!!e.visible&&(!e.parent||hr(e.parent))}const ur=new t,dr=new t,pr=new t,mr=(e,t,n,s=1)=>{const r=ur.set(e.x/n.width*2-1,-e.y/n.height*2+1,s);return r.unproject(t),r},fr=(e,t,n,s)=>{const r=((e,t,n)=>{const s=n.width/2,r=n.height/2;t.updateMatrixWorld();const i=e.project(t);return i.x=i.x*s+s,i.y=-i.y*r+r,i})(pr.copy(e),n,s);let i=0;for(let o=0;o<2;++o){const a=dr.copy(r).setComponent(o,r.getComponent(o)+t),l=mr(a,n,s,a.z);i=Math.max(i,e.distanceTo(l))}return i};function gr(e,n,s=5){const r=new o,i=new t,a=new t;return r.position.set(e.x,e.y,e.z),r.rotation.set(n.x,n.y,n.z),r.getWorldDirection(i),i.multiplyScalar(s),a.subVectors(r.position,i),a}function yr(e,t){const n=e-t;return a.euclideanModulo(n+Math.PI,2*Math.PI)-Math.PI}class vr{constructor(){this.min=null,this.roots=[],this.nodes=new Map}shift(){const e=this.min;if(null===e||this.roots.length<1)return this.min=null,e;this.remove(e),this.roots.length>50&&this.consolidate();let t=1/0;const n=this.roots.length;for(let e=0;e<n;e++){const n=this.roots[e],s=this.getDistance(n);s<t&&(t=s,this.min=n)}return e}consolidate(){const e=[[],[],[],[],[],[],[]],t=e.length-1,n=this.roots.length;for(let s=0;s<n;s++){const n=this.roots[s],r=this.nodes.get(n);r&&r.depth<t&&e[r.depth].push(n)}for(let n=0;n<=t;n++)for(;e[n].length>1;){const s=e[n].shift(),r=e[n].shift(),i=n+1;let o=-1;if(void 0!==s&&void 0!==r){const n=this.nodes.get(s),a=this.nodes.get(r);n&&a&&(n.distance<a.distance?(n.depth=i,n.children.push(r),a.parent=s,i<=t&&e[i].push(s),o=this.roots.indexOf(r)):(a.depth=i,a.children.push(s),n.parent=r,i<=t&&e[i].push(r),o=this.roots.indexOf(s)))}o>-1&&this.roots.splice(o,1)}}add(e,t){if(this.nodes.set(e,{nodeIndex:e,distance:t,depth:0,parent:null,children:[]}),null===this.min)this.min=e;else{const n=this.nodes.get(this.min);n&&t<n.distance&&(this.min=e)}this.roots.push(e)}update(e,t){this.remove(e),this.add(e,t)}remove(e){var t,n;if(!this.nodes.has(e))return;const s=null===(t=this.nodes.get(e))||void 0===t?void 0:t.children;if(s&&s.length>0)for(let t=0;t<s.length;t++){const n=s[t],r=this.nodes.get(n),i=this.nodes.get(e);r&&i&&(r.parent=i.parent),r&&null===r.parent&&this.roots.push(n)}let r=null===(n=this.nodes.get(e))||void 0===n?void 0:n.parent;if(null===r){const t=this.roots.indexOf(e);t>-1&&this.roots.splice(t,1)}else for(;r;){const e=this.nodes.get(r);e&&(e.depth--,r=e.parent)}}getDistance(e){const t=this.nodes.get(e);return t?t.distance:1/0}}async function wr({path:e="",file:t}){if(Array.isArray(t))return(new l).setPath(e).loadAsync(t);{const n=Zr(t);if("hdr"===n||"pic"===n){const n=await Ir.setPath(e).setDataType(c).loadAsync(t);return n.mapping=h,n}{const n=await Pr.setPath(e).loadAsync(t);return n.mapping=h,n}}}function br(e){if(!e)return null;const{colors:t,stops:n,size:s=1024}=e,r=document.createElement("canvas"),i=r.getContext("2d");if(!i)return null;r.width=16,r.height=s;const o=i.createLinearGradient(0,0,0,s),a=new u,l=t.map((e=>a.set(e).getStyle()));for(let e=0,t=l.length-1;e<=t;e++)o.addColorStop(n?n[e]:e/t,l[e]);i.fillStyle=o,i.fillRect(0,0,16,s);const c=new d(r);return c.needsUpdate=!0,c}const xr=e=>{const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)};function Tr(e){return Wr(e)?function(e){return e.map((e=>Tr(e)))}(e):Kr(e)?function(e){if(Kr(e)){const t={};for(const n in e)t[n]=Tr(e[n]);return t}return e}(e):e}const Sr=e=>ti(e,(e=>e.clone())),Or=e=>ti(e,(e=>e.dispose())),Mr={},Er=new p;Er.setRequestHeader(Mr);const Cr=async(e,t)=>(Er.setResponseType(t),Er.loadAsync(e)),Dr=new m;Dr.load=(e,t,n,s)=>{const r=new Image;return Er.setResponseType("blob"),Er.load(e,(function(e){r.src=URL.createObjectURL(e),r.onload=()=>{URL.revokeObjectURL(r.src),null==t||t(r)}}),n,s),r};const Pr=new f;Pr.setRequestHeader(Mr);const Ir=new Rt;Ir.setRequestHeader(Mr);const Ar=new t,Lr=new t,jr=new t;function _r(e,t,n,s){const r=Ar.setFromMatrixPosition(e.matrixWorld),i=r.clone();i.project(t),n.setFromCamera(new g(i.x,i.y),t);const o=n.intersectObjects(s,!0);if(o.length){const e=o[0].distance;return r.distanceTo(n.ray.origin)<e}return!0}function Fr(e,t){const n=e.parent;if(!n.occlude)return;const{occludeThrottle:s}=n;let r=!0;if(Hr(s)&&Hr(e.userData.delta)&&(r=performance.now()-e.userData.delta>s),r&&n.occlude){let s=e.visible;const r=Ar.setFromMatrixPosition(e.matrixWorld),i=Lr.setFromMatrixPosition(t.camera.matrixWorld),o=r.clone().sub(i);if(!0===n.occlude||Wr(n.occlude)){const r=jr.setFromMatrixColumn(t.camera.matrixWorld,2).normalize().negate();s=!(o.dot(r)<0)&&_r(e,t.camera,t.raycaster,Wr(n.occlude)?n.occlude:t.scener.intersectsList.getAll())}else{const e=sr(n.occlude);s=o.dot(e)<0}e.visible=s,e.userData.delta=performance.now()}}const Rr=e=>{"function"==typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e)};var Br=function(){function e(){}return e.prototype.toJson=function(e,t){var n=this.xmlStringToXmlDom(e),s=this.xmlToJson(n);return t?(t.removeLineBreaks&&this.removeLineBreaks(s),t.removeComments&&this.removeCommentProperties(s),t.transformTextOnly&&this.transformTextOnly(s),s):s},e.prototype.xmlStringToXmlDom=function(e){return(new DOMParser).parseFromString(e,"text/xml")},e.prototype.removeLineBreaks=function(e){var t=this;Object.keys(e).forEach((function(n,s){"#text"===n&&Array.isArray(e[n])&&delete e[n],"object"==typeof e[n]&&t.removeLineBreaks(e[n])}))},e.prototype.removeCommentProperties=function(e){var t=this;Object.keys(e).forEach((function(n,s){"#comment"===n&&delete e[n],"object"==typeof e[n]&&t.removeCommentProperties(e[n])}))},e.prototype.transformTextOnly=function(e){var t=this;Object.keys(e).forEach((function(n,s){var r=Object.keys(e[n]).length>1,i=Object.keys(e[n])[0];r||"object"==typeof e[n][i]?t.transformTextOnly(e[n]):"object"==typeof e[n]&&e[n]["#text"]&&(e[n]=e[n]["#text"])}))},e.prototype.xmlToJson=function(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t._attributes={};for(var n=0;n<e.attributes.length;n++){var s=e.attributes.item(n);t._attributes[s.nodeName]=s.nodeValue}}}else 3==e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var r=0;r<e.childNodes.length;r++){var i=e.childNodes.item(r),o=i.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(i);else{if(void 0===t[o].push){var a=t[o];t[o]=[],t[o].push(a)}t[o].push(this.xmlToJson(i))}}return t},e}();function Ur(e){return Cr(e,"text").then((e=>Promise.resolve(function(e){return(new Br).toJson(e,{transformTextOnly:!0,removeComments:!0,removeLineBreaks:!0})}(e))))}function kr(e){const t=new DataView(e);for(let e=0;e<t.byteLength;e++){const n=t.getUint8(e),s=(n>>4&15)+(n<<4&240);t.setUint8(e,s)}return t.buffer}class Nr{name="EXT_mesh_gpu_instancing";constructor(e){this.writer=e}writeNode(e,n){if(!0!==e.isInstancedMesh)return;const s=e.count,r=new y,o=new Float32Array(3*s),a=new Float32Array(4*s),l=new Float32Array(3*s),c=new t,h=new i,u=new t;for(let t=0;t<s;t++)e.getMatrixAt(t,r),r.decompose(c,h,u),o[3*t]=c.x,o[3*t+1]=c.y,o[3*t+2]=c.z,a[4*t]=h.x,a[4*t+1]=h.y,a[4*t+2]=h.z,a[4*t+3]=h.w,l[3*t]=u.x,l[3*t+1]=u.y,l[3*t+2]=u.z;const d=this.writer,p={};p.attributes={TRANSLATION:d.processAccessor(new v(o,3)),ROTATION:d.processAccessor(new v(a,4)),SCALE:d.processAccessor(new v(l,3))},n.extensions=n.extensions||{},n.extensions[this.name]=p,d.extensionsUsed[this.name]=!0}}const zr=Object.prototype.hasOwnProperty,Gr=e=>"String"===Yr(e),Vr=e=>"Boolean"===Yr(e),Hr=e=>"Number"===Yr(e),Wr=Array.isArray,Kr=e=>"Object"===Yr(e),qr=e=>"Function"===Yr(e),Yr=e=>Object.prototype.toString.call(e).slice(8,-1),Qr=e=>(new TextDecoder).decode(new Uint8Array(e)),Xr=()=>Qs+Math.random().toString(36).substring(7).split("").join("_"),Zr=e=>{var t;const{href:n}=new URL(e,location.origin);if(n.includes(".")){const e=n.split(".").pop();if(!e)return;return e.includes("?")?null===(t=e.split("?").shift())||void 0===t?void 0:t.toLowerCase():e}},Jr=1e-5;function $r(e,t=Jr){return Math.abs(e)<t}function ei(e,t=50){let n=0;return function(...s){clearTimeout(n),n=self.setTimeout((()=>e.apply(this,s)),t)}}const ti=(e,t)=>Wr(e)?e.map(t):t(e);var ni=Object.freeze({__proto__:null,EPSILON:Jr,IVector3ToEuler:rr,IVector3ToVector3:sr,MinHeap:vr,absoluteAngle:yr,approxEquals:function(e,t,n=Jr){return $r(e-t,n)},approxZero:$r,calculateScaleFactor:fr,cloneDeep:Tr,cloneMaterials:Sr,computeTargetByRotation:gr,consoleSspTitle:Js,debounce:ei,deg2Euler:ar,disposeMaterials:Or,error:nr,euler2Deg:function(e){return e/(Math.PI/180)},exportGltf:function(e,t={}){return new Promise(((n,s)=>{const r=new Bt;r.register((e=>new Nr(e))),r.parse(e,(e=>n(e)),(e=>s(e)),t)}))},fetchFile:Cr,getAsciiString:Qr,getBoundingBox:ir,getExtension:Zr,getSpaceAttributeFromObject:lr,getTexture:wr,getValueType:Yr,gradientTexture:br,groupBy:function(e,t){const n=new Map;return e.reduce(((e,n)=>{const s=e.get(n[t]);return s?s.push(n):e.set(n[t],[n]),e}),n),n},hasOwn:(e,t)=>zr.call(e,t),idleTask:Rr,imageLoader:Dr,isArray:Wr,isBoolean:Vr,isDate:e=>"Date"===Yr(e),isFunction:qr,isNull:e=>"Null"===Yr(e),isNumber:Hr,isObject:Kr,isObjectBehindCamera:function(e,t){const n=jr.setFromMatrixColumn(t.matrixWorld,2).normalize().negate();return e.dot(n)<0},isObjectOccludeVisible:_r,isObjectVisible:hr,isPromise:e=>"Promise"===Yr(e),isString:Gr,isSymbol:e=>"Symbol"===Yr(e),isUndefined:e=>"Undefined"===Yr(e),log:$s,objectHandle:ti,parseFilePath:xr,poiNodeOccludeHandler:Fr,randomString:Xr,rgbeLoader:Ir,rotationAFix:function(e,t){const s=or("x",e,t),r=or("y",e,t),i=or("z",e,t);return new n(s.x,r.y,i.z,t.order)},rotationAxisFix:or,sleep:e=>new Promise((t=>setTimeout((()=>t()),e))),swapBytes:kr,syncSpaceAttributeToObject:cr,textureLoader:Pr,warn:tr,xmlToJson:Ur});const si={"Linear.None":_t.Linear.None,"Quadratic.In":_t.Quadratic.In,"Quadratic.Out":_t.Quadratic.Out,"Quadratic.InOut":_t.Quadratic.InOut,"Cubic.In":_t.Cubic.In,"Cubic.Out":_t.Cubic.Out,"Cubic.InOut":_t.Cubic.InOut,"Quartic.In":_t.Quartic.In,"Quartic.Out":_t.Quartic.Out,"Quartic.InOut":_t.Quartic.InOut,"Quintic.In":_t.Quintic.In,"Quintic.Out":_t.Quintic.Out,"Quintic.InOut":_t.Quintic.InOut,"Sinusoidal.In":_t.Sinusoidal.In,"Sinusoidal.Out":_t.Sinusoidal.Out,"Sinusoidal.InOut":_t.Sinusoidal.InOut,"Exponential.In":_t.Exponential.In,"Exponential.Out":_t.Exponential.Out,"Exponential.InOut":_t.Exponential.InOut,"Circular.In":_t.Circular.In,"Circular.Out":_t.Circular.Out,"Circular.InOut":_t.Circular.InOut,"Elastic.In":_t.Elastic.In,"Elastic.Out":_t.Elastic.Out,"Elastic.InOut":_t.Elastic.InOut,"Back.In":_t.Back.In,"Back.Out":_t.Back.Out,"Back.InOut":_t.Back.InOut,"Bounce.In":_t.Bounce.In,"Bounce.Out":_t.Bounce.Out,"Bounce.InOut":_t.Bounce.InOut};function ri(e,t,s={},r,i){return new Promise(((o,a)=>{const{duration:l=1e3,delay:c=0,repeat:h=!1,mode:u="Linear.None",yoyo:d=!1}=s,p=si[u],m=new Ft(e).to(t,l).easing(p).delay(c).onUpdate((s=>{e instanceof n&&t instanceof n&&s instanceof n&&(s.order=t.order),null==r||r(s,m)})).onComplete((()=>{o()})).onStop((()=>{a("animation stop")})).onStart((()=>{null==i||i(m)}));Hr(h)?m.repeat(h):Vr(h)&&h&&m.repeat(1/0),d&&m.repeatDelay(20),m.yoyo(d),m.start()}))}class ii{constructor(e,t,n={}){this.target=e,this.points=t,this.speed=1,this.reverse=!1,this.needsRotate=!0,this.index=1,this._tween=null,Object.assign(this,n)}get isPlaying(){var e;return!!(null===(e=this._tween)||void 0===e?void 0:e.isPlaying())}async play(){if(this.isPlaying)return!1;this.index=1;let e=this.points.slice();return this.reverse&&(e=e.reverse()),this._play(e)}async _play(e){var t,n;const{target:s}=this,r=null!==(t=this.speed)&&void 0!==t?t:1,i=this.index;let o=e[i-1];if(!o)return!0;o.isVector3||(o=sr(o)),o=o.clone();let a=e[i];if(!a)return!0;a.isVector3||(a=sr(a).clone()),a=a.clone();const l=o.distanceTo(a)/r;this.needsRotate&&(1===i&&s.parent&&s.position.copy(s.parent.worldToLocal(o.clone())),s.lookAt(a)),await ri(o,a,{duration:l},((e,t)=>{var n;if(s.parent){const t=s.parent.worldToLocal(e.clone());s.position.copy(t)}null===(n=this.onUpdate)||void 0===n||n.call(this,e,t)}),(e=>{var t,n;1===i&&(null===(t=this.onStart)||void 0===t||t.call(this,e)),null===(n=this.onEveryStart)||void 0===n||n.call(this,e),this._tween=e})),null===(n=this.onPoint)||void 0===n||n.call(this,i,a),this.index++,await this._play(e)}pause(){var e;null===(e=this._tween)||void 0===e||e.pause()}resume(){var e;null===(e=this._tween)||void 0===e||e.resume()}stop(){var e;null===(e=this._tween)||void 0===e||e.stop(),this._tween=null}}function oi(e){var t=typeof e;return null==e||"object"!==t&&"function"!==t}var ai,li=(e=>(e[e.x=0]="x",e[e.y=1]="y",e[e.z=2]="z",e))(li||{});(ai=li||(li={})).toKey=function(e){return ai[e]},ai.toIndex=function(e){return ai[e]},ai.getCrossAxiss=function(e){return[(e+1)%3,(e+2)%3]};var ci=(e=>(e[e.x=0]="x",e[e.y=1]="y",e[e.z=2]="z",e[e.w=3]="w",e))(ci||{});(e=>{e.toKey=function(t){return e[t]},e.toIndex=function(t){return e[t]},e.getCrossAxiss=function(e){return[(e+1)%4,(e+2)%4]}})(ci||(ci={}));var hi=Object.defineProperty,ui=(e,t,n)=>(((e,t,n)=>{t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function di(e,t){if(t=t??e.arcLengthDivisions,e.cacheArcULengths&&e.cacheArcULengths.length===t+1&&!e.needsUpdate){const n=e.cacheArcULengths;return{lengths:n,length:n[t]}}e.needsUpdate=!1;const n=[0];let s=e.getPoint(0),r=0;for(let i=1;i<=t;i++){const o=e.getPointAt(i/t);r+=o.distanceTo(s),n.push(r),s=o}return e.cacheArcULengths=n,{lengths:n,length:r}}function pi(e,t,n){const s=n?t=>e.getPointAt(t):t=>e.getPoint(t);let r=s(0),i=0;const o=[],a=t.length;for(let e=0;e<a;e++){const n=s(t[e]);i+=n.distanceTo(r),o.push(i),r=n}return{lengths:o,length:o[a-1]}}function mi(e,t){let n=e.sampleLength;if(!n){const t=e.sampleNum;if(t)return t;n=1}return Math.ceil(t/n)}function fi(e){const{curve:t}=e;let n=t.getLength();const s=mi(e,n);return t.arcLengthDivisions<s&&(t.arcLengthDivisions=s,t.updateArcLengths(),n=t.getLength()),{length:n,division:s}}function gi(e,t){const n=mi(t??{},e.getLength()),s=e.getPoints(n),r=e.getLengths(n);return yi(s,{...t,lengths:r})}function yi(e,t){const{startColor:n,endColor:s,color:r,lengths:i}=t??{},o=r?new u(r):null,a=n?new u(n):o??new u(0,1,0),l=s?new u(s):o??new u(0,0,1),c=[],h=[];e[0].toArray(c,0);const d=c.length,p=i??wi(e).lengths,m=p[p.length-1],f=new u;e.forEach(((e,t)=>{e.toArray(c,t*d);const n=p[t]/m;f.lerpColors(a,l,n),f.toArray(h,3*t)}));const g=new w;return g.setAttribute("position",new b(c,d)),g.setAttribute("color",new b(h,3)),g}function vi(e,t){t=t??{};let{material:n,linewidth:s}=t;s=s??1,n=n??new x({vertexColors:!0,linewidth:s});const r=Array.isArray(e)?yi(e,t):gi(e,t);return new T(r,n)}function wi(e){const t=bi(e),n=[0],s=t.reduce(((e,t)=>(e+=t.distance(),n.push(e),e)),0);return{lines:t,lengths:n,length:s}}function bi(e){const t=[];return e.reduce(((e,n)=>{const s=new S(e,n);return t.push(s),n})),t}function xi(e,t){const n=[];return{lines:t.filter(((t,s)=>{const r=t.closestPointToPointParameter(e),i=0<=r||r>=1;return i&&n.push(s),i})),indexs:n}}function Ti(e,t){const{distSortIndexs:n,clampDists:s,clampPoints:r,ts:i,clampTs:o}=Si(e,t),a=n[0];return{line:t[a],index:a,clampDist:s[a],clampPoint:r[a],t:i[a],clampT:o[a]}}function Si(e,n){const s={clampDists:[],clampPoints:[],distSortIndexs:[],ts:[],clampTs:[]};return n.forEach(((n,r)=>{const i=n.closestPointToPointParameter(e),o=a.clamp(i,0,1),l=n.at(o,new t),c=e.distanceTo(l);s.clampDists.push(c),s.clampPoints.push(l),s.distSortIndexs.push(r),s.ts.push(i),s.clampTs.push(o)})),s.distSortIndexs.sort(((e,t)=>s.clampDists[e]-s.clampDists[t])),s}function Oi(e){const t=new O,n=null==e[0].z?M:E;return e.reduce(((e,s)=>{const r=new n(e,s);return t.add(r),s})),t}var Mi=(e=>(e.back="back",e.front="front",e))(Mi||{});function Ei(e){const{curve:t,distance:n,fromU:s=0,side:r,tolerance:i=.1*n}=e,o=e.length??t.getLength(),a=t.getPointAt(s);let l=n/o;const c="front"===r?-1:1;let h=!0,u=s,d=a,p=0,m=!0;do{u=c*l+s;let e=!1;u>1?(u=1,e=!0):u<0&&(u=0,e=!0),d=t.getPointAt(u),p=d.distanceTo(a),h=Math.abs(n-p)>i;const r=n/p;if(e&&h&&r>1){m=!1;break}l*=r}while(h);return{succeed:m,u:u,point:d,distance:p}}function Ci(e){const{curve:t,distance:n,fromU:s=0,tolerance:r=.1*n,origin:i}=e,o=e.length??t.getLength(),a=t.getPointAt(s),l=a.distanceTo(i),c=n-l;let h=c/o,u=!0,d=s,p=a;do{d=h+s;let e=!1;d>1?(d=1,e=!0):d<0&&(d=0,e=!0),p=t.getPointAt(d);const o=p.distanceTo(i);u=Math.abs(n-o)>r;const a=c/(o-l);if(e&&u&&a>1)return null;h*=a}while(u);return{u:d,point:p}}const Di=new t,Pi=new t(1,1,1);new i;const Ii=new y;function Ai(e){const{joints:t,axials:n}=e;if(t)var s=ji(t);else s=n?Li(e):_i(e);return s}function Li(e){const{axials:t,start:n}=e,s=new C;n&&(s.position.copy(n),s.updateMatrix());const r=[s];return t.reduce(((e,t)=>{const n=new C;return n.position.copy(t),e.add(n),r.push(n),n.updateMatrix(),n}),s),s.updateWorldMatrix(!0,!0),r}function ji(e){const t=[];return e.reduce(((e,n)=>{const s=n.clone().sub(e);return t.push(s),n})),Li({axials:t,start:e[0]})}function _i(e){const{start:t,axial:n}=e;let s=e.number;const r=new Array(s-1);return r.fill(n),Li({axials:r,start:t})}function Fi(e){const{geometry:n,flexible:s=1,axial:r,number:o}=e,a=e.start??new t,l=r.clone().normalize(),c=r.length(),h=o-1,u=(new i).setFromUnitVectors(new t(1,0,0),l),d=(new y).compose(a,u,new t(1,1,1)).invert(),p=n.getAttribute("position").clone(),m=p.count;p.applyMatrix4(d);const f=[],g=[];for(let e=0;e<m;e++){const t=p.getX(e);if(t<0){f.push(0,0,0,0),g.push(1,0,0,0);continue}const n=Math.trunc(t/c);if(n<h){const e=t%c/c*s;f.push(n,n+1,0,0),g.push(1-e,e,0,0)}else f.push(h,0,0,0),g.push(1,0,0,0)}return n.setAttribute("skinIndex",new D(f,4)),n.setAttribute("skinWeight",new b(g,4)),n}function Ri(e){const{skeleton:n,geometryFrame:s}=e,r=n.boneInverses[0].clone().invert(),i=n.boneInverses[1].clone().invert();if(s){const e=s.clone().invert();r.premultiply(e),i.premultiply(e)}const o=(new t).setFromMatrixPosition(r),a=(new t).setFromMatrixPosition(i);return a.sub(o),Fi({...e,start:o,axial:a,number:n.bones.length})}function Bi(e){const{skeleton:n,geometry:s,flexible:r=1,geometryFrame:i}=e,o=(null==i?void 0:i.clone().invert())??Ii.clone(),a=bi(n.boneInverses.map((e=>{const n=e.clone().invert().premultiply(o);return(new t).setFromMatrixPosition(n)}))),l=s.getAttribute("position"),c=l.count,h=[],u=[],d=new t;for(let e=0;e<c;e++){d.fromBufferAttribute(l,e);const{index:t,clampT:n}=Ti(d,a),s=n*r;h.push(t,t+1,0,0),u.push(1-s,s,0,0)}return s.setAttribute("skinIndex",new D(h,4)),s.setAttribute("skinWeight",new b(u,4)),s}function Ui(e){const{geometry:t}=e,n=e.material??void 0,s=new P(t,n),r=Ai(e);s.add(r[0]);const i=new I(r);return s.bind(i),Bi({...e,skeleton:i}),s}function ki(e){const{skeleton:t}=e,n=Ni(e);return n.updateMatrix(),n.updateMatrixWorld(),n.bind(t),n}function Ni(e){const{target:t,skeleton:n}=e,s=t.geometry,r=new P;return t.copy.call(r,t,!1),Bi({...e,geometry:s,skeleton:n,geometryFrame:t.matrixWorld}),r}function zi(e){const{target:t}=e;let{skeleton:n}=e;if(n)var s=n.bones[0];else{const t=Ai(e);n=new I(t),s=t[0]}t.add(s),t.updateWorldMatrix(!1,!0),n.calculateInverses(),s.removeFromParent();const r=Gi({...e,target:t,skeleton:n});return r.add(s),{model:r,skeleton:n,rootBone:s}}function Gi(e){const{target:t,skeleton:n,parent:s,posOnBone:r}=e,i=t.isMesh,o=i?Ni({...e,skeleton:n}):t.clone(!1);s&&s.add(o),o.updateMatrixWorld(!0),i&&(o.bind(n,t.matrixWorld),r&&(o.frustumCulled=!1));const a=t.children;for(const t of a)Gi({...e,target:t,parent:o});return o}function Vi(e){return e.filter((e=>{var t;return!(null!=(t=e.parent)&&t.isBone)}))}function Hi(e){return e.find((e=>{var t;return!(null!=(t=e.parent)&&t.isBone)}))}function Wi(e){return Hi(e)??e[0]}function Ki(e){return e.curve?qi(e):$i(e)}function qi(e){const{keyframeTracks:t,duration:n,...s}=Yi(e);return{...s,clip:new A(e.name,n,t)}}function Yi(e){const{curve:t,lookDistance:n}=e,s=e.targetPath??"",r=fi(e).division,i=Qi(e,t.getLength()),o=_,a=[],l=Zi(r),c={...e,duration:i,division:r,ts:l,lookPoint:{distance:n}},h=Ji(c),{points:u,rotates:d,...p}=Xi(c);if(u.length){const e=[];u.forEach(((t,n)=>{t.toArray(e,3*n)}));const t=new L(`${s}.position`,h,e,o);a.push(t)}if(d.length){const e=[];d.forEach(((t,n)=>{t.toArray(e,4*n)}));const t=new j(`${s}.quaternion`,h,e,o);a.push(t)}return{...p,keyframeTracks:a,duration:i}}function Qi(e,t){let n=e.duration;if(!n){const s=e.speed;if(null==s)throw"缺少选项 duration 或者 speed";if(!t)throw"缺少参数 length";n=t/s}return n}function Xi(e){var n,s;const{curve:r,target:a,lookPoint:l,enableUp:c,fixUp:h}=e,u=e.position??!0,d=e.rotate??!0,p=[],m=[],f=[];if(!u&&!d)return{rotates:p,points:m,curveLength:void 0,lengths:void 0};const g=(e.anchor??Di).clone(),v=e.ts??e.us,w=!e.ts;if(!v)throw"缺少参数:至少传递 ts 和 us 任意之一";let b=Ii.clone(),x=Ii.clone(),T=Pi.clone(),S=o.DEFAULT_UP;a&&(a.updateWorldMatrix(!0,!1),b=a.matrix,x=a.matrixWorld,T=a.scale,S=a.up);const O=b.clone().invert(),M=x.clone().multiply(O).clone().invert(),E=r.getTangent(0);E.transformDirection(M);const C=(null==(n=e.front)?void 0:n.clone().normalize())??E,D=(null==(s=e.up)?void 0:s.clone().normalize())??S.clone().transformDirection(M);let P=b.clone().setPosition(0,0,0),I=e=>r.getPoint(e),A=e=>r.getTangent(e);w&&(I=e=>r.getPointAt(e),A=e=>r.getTangentAt(e));const L=v.length,j=L-1;let{distance:_,curveLength:F,lengths:R}=l??{};_=_??0;let B=A;0!==_&&(R||(R=pi(r,v,w).lengths),null==F&&(F=R[j]),B=(e,t)=>{const n=I(e);let s=(R[t]+_)/F;return s>1&&(s=1),r.getPointAt(s).sub(n).normalize()});let U=e=>{const t=v[e],n=B(t,e);n.transformDirection(M),f.push(n);const s=e-1,r=s<0,o=r?C:f[s],a=(new i).setFromUnitVectors(o,n);if(!r){const e=p[s];a.multiply(e)}return a.normalize()};if(c){const e=new t(0,1,0);U=h?function(t){const n=v[t],s=B(n,t);s.transformDirection(M),f.push(s);const r=t-1;let o;if(r<0)o=(new i).setFromUnitVectors(C,s);else{const e=p[r],t=C.clone().applyQuaternion(e).normalize();o=(new i).setFromUnitVectors(t,s),o.multiply(e)}const a=D.clone().applyQuaternion(o).normalize(),l=(new i).setFromUnitVectors(a,e);return o.premultiply(l),o.normalize()}:function(t){const n=v[t],s=B(n,t);s.transformDirection(M),f.push(s);const r=t-1,o=r<0,a=o?C:f[r],l=(new i).setFromUnitVectors(a,s);if(o){const t=D.clone().applyQuaternion(l);t.projectOnPlane(s).normalize();const n=e.clone().projectOnPlane(s).normalize(),r=(new i).setFromUnitVectors(t,n);l.premultiply(r)}else{const e=p[r];l.multiply(e)}return l.normalize()}}for(let e=0;e<L;e++){const t=v[e];if(d){const t=U(e);p.push(t),P=(new y).compose(Di,t,T)}if(u){const e=I(t);e.applyMatrix4(M);const n=g.clone().applyMatrix4(P);e.sub(n),m.push(e)}}return{rotates:p,points:m,curveLength:F??void 0,lengths:R??void 0}}function Zi(e){const t=[];for(let n=0;n<=e;n++)t.push(n/e);return t}function Ji(e){const{curve:t,division:n,duration:s}=e,r=t.getLengths(n),i=r[r.length-1];return r.map((e=>e/i*s))}function $i(e){const{smooth:t,points:n}=e;if(!1===t)var{keyframeTracks:s,duration:r,...i}=eo(e);else{const t=Oi(n);var{keyframeTracks:s,duration:r,...i}=Yi({...e,curve:t})}return{...i,clip:new A(e.name,r,s)}}function eo(e){const t=e.targetPath??"",n=e.points,{lines:s,length:r,lengths:i}=wi(n),o=Qi(e,r),a=[],l=i.map((e=>e/r*o)),{points:c,pointTimes:h,rotates:u,rotateTimes:d}=to({...e,times:l},s);if(c.length){const e=[];c.forEach(((t,n)=>{t.toArray(e,3*n)}));const n=new L(`${t}.position`,h,e,_);a.push(n)}if(u.length){const e=[];u.forEach(((t,n)=>{t.toArray(e,4*n)}));const n=new j(`${t}.quaternion`,d,e,F);a.push(n)}return{keyframeTracks:a,duration:o,lengths:i,curveLength:r}}function to(e,n){var s,r;const{points:a,target:l,times:c,enableUp:h,fixUp:u}=e,d=e.position??!0,p=e.rotate??!0,m=a.length,f=m-1;n=n??bi(a);const g=[],v=[],w=[],b=[],x={rotates:g,points:v,rotateTimes:c,pointTimes:w};if(!d&&!p)return x;const T=(e.anchor??Di).clone();let S=Ii.clone(),O=Ii.clone(),M=Pi.clone(),E=o.DEFAULT_UP;l&&(l.updateWorldMatrix(!0,!1),S=l.matrix,O=l.matrixWorld,M=l.scale,E=l.up);const C=S.clone().invert(),D=O.clone().multiply(C).clone().invert(),P=n[0].delta(new t);P.transformDirection(D);const I=(null==(s=e.front)?void 0:s.clone().normalize())??P,A=(null==(r=e.up)?void 0:r.clone().normalize())??E.clone().transformDirection(D);let L=S.clone().setPosition(0,0,0),j=L,_=e=>{const s=n[e].delta(new t).normalize();s.transformDirection(D),b.push(s);const r=e-1,o=r<0,a=o?I:b[r],l=(new i).setFromUnitVectors(a,s);if(!o){const e=g[r];l.multiply(e)}return l.normalize()};if(h){const e=new t(0,1,0);_=u?function(s){const r=n[s].delta(new t).normalize();r.transformDirection(D),b.push(r);const o=s-1;let a;if(o<0)a=(new i).setFromUnitVectors(I,r);else{const e=g[o],t=I.clone().applyQuaternion(e).normalize();a=(new i).setFromUnitVectors(t,r),a.multiply(e)}const l=A.clone().applyQuaternion(a).normalize(),c=(new i).setFromUnitVectors(l,e);return a.premultiply(c),a.normalize()}:function(s){const r=n[s].delta(new t).normalize();r.transformDirection(D),b.push(r);const o=s-1,a=o<0,l=a?I:b[o],c=(new i).setFromUnitVectors(l,r);if(a){const t=A.clone().applyQuaternion(c);t.projectOnPlane(r).normalize();const n=e.clone().projectOnPlane(r).normalize(),s=(new i).setFromUnitVectors(t,n);c.premultiply(s)}else{const e=g[o];c.multiply(e)}return c.normalize()}}for(let e=0;e<m;e++){if(p)if(e<f){const t=_(e);g.push(t),L=(new y).compose(Di,t,M)}else g.push(g[e-1].clone());if(d){const t=c[e],n=a[e].clone();if(n.applyMatrix4(D),e>0){const e=T.clone().applyMatrix4(j),s=n.clone().sub(e);v.push(s),w.push(t)}const s=T.clone().applyMatrix4(L);n.sub(s),v.push(n),w.push(t)}j=L}return x}function no(e){const t=e.mixer,n=zi(e),{model:s,skeleton:r}=n,i={...e,target:s,skeleton:r},{clip:o,...a}=e.posOnBone?so(i):oo(i);s.animations.push(o);const l=null==t?void 0:t.clipAction(o,s);return{...a,...n,clip:o,action:l}}function so(e){const{boneTracks:t,duration:n,...s}=ro(e),r=t.flat();return{...s,clip:new A(e.name,n,r)}}function ro(e){const{skeleton:t,targetPath:n}=e,s=t.bones,{times:r,boneSampleDatas:i,duration:o,...a}=io(e),l=r.length,c=_,h=i.map(((e,t)=>{const{points:i,rotates:o}=e,a=s[t],h=n?`${n}.skeleton.bones[${t}]`:`${a.name||a.uuid}`,u=[],d=[];for(let e=0;e<l;e++)i&&i[e].toArray(u,3*e),o[e].toArray(d,4*e);const p=[];if(i){const e=new L(`${h}.position`,r,u,c);p.push(e)}const m=new j(`${h}.quaternion`,r,d,c);return p.push(m),p}));return{...a,boneTracks:h,duration:o}}function io(e){var n;const{curve:s,skeleton:r,stretch:o}=e,{bones:a,boneInverses:l}=r,c=a[0],h=e.target??c.parent;if(!h)throw"target 或 根骨骼的 parent 不存在";const u=e.tolerance??.1;c.updateWorldMatrix(!0,!0);const{division:d,length:p}=fi(e),{matrixWorld:m}=h,f=m.clone().invert(),g=[],v=[];l.reduce(((e,t)=>{const n=t.clone().invert();g.push(n);const s=e.clone().multiply(n);return v.push(s),t}),f);const w=v[0],b=new t,x=new i,T=new t;w.decompose(b,x,T);const S=Qi(e,p),O=Zi(d),M=Ji({curve:s,division:d,duration:S}),E=O.length,C=[],D=(new t).setFromMatrixPosition(v[1]).negate(),P=l[0],I=null==(n=e.up)?void 0:n.clone().applyMatrix4(m).transformDirection(P),{points:A,rotates:L,...j}=Xi({...e,curve:s,ts:O,target:c,rotate:!0,front:D,up:I,anchor:null});for(let e=0;e<E;e++)C.push(m.clone());const _=A.map(((e,t)=>{const n=L[t];n.premultiply(x).normalize();const s=(new y).compose(e,n,T);return s.premultiply(m),s})),F=s.getLengths(d).map((e=>e/p)),R=[{points:A,rotates:L,us:F,matrixs:_}],B=o?function(e,t,n){const r=R[e].us[t]-n/p;return{u:r,point:r<0?null:s.getPointAt(r)}}:function(e,t,n){const r=R[e].us[t],{u:i,point:o,succeed:a}=Ei({curve:s,distance:n,fromU:r,length:p,side:Mi.front,tolerance:u*n});return{u:i,point:a?o:null}},U=l.length,k=U-1;for(let e=1;e<U;e++){const n=[],r=[],o=[],a=[];R.push({points:n,rotates:r,us:o,matrixs:a});const l=v[e],c=g[e],h=e-1,u=R[h],d=v[h],p=g[h],{matrixs:m,points:f,rotates:w}=u,b=(new t).setFromMatrixScale(d),x=h-1,T=x<0?C:R[x].matrixs,S=new t,O=new i,M=new t;l.decompose(S,O,M);const D=(new t).setFromMatrixPosition(c).sub((new t).setFromMatrixPosition(p)).length(),P=S.length();for(let t=0;t<E;t++){const{point:c,u:u}=B(h,t,D);o.push(u),r.push(O.clone());const d=m[t];if(u<0||!c){n.push(S);const e=d.clone().multiply(l);a.push(e);continue}const p=T[t];let g=p.clone().invert();const v=c.clone().applyMatrix4(g),x=f[t];v.sub(x).normalize();const E=w[t],C=(new y).compose(x,E,b),I=S.clone().transformDirection(C),A=(new i).setFromUnitVectors(I,v);E.premultiply(A).normalize(),d.compose(x,E,b),d.premultiply(p);const L=d.clone().invert();c.applyMatrix4(L);const j=c.length();c.copy(S).multiplyScalar(j/P),n.push(c);const _=(new y).compose(c,O,M);if(e===k){const e=s.getTangentAt(u);e.negate().transformDirection(L);const n=(new i).setFromUnitVectors(c.clone().normalize(),e);n.premultiply(O).normalize(),r[t]=n,_.compose(c,n,M)}_.premultiply(d),a.push(_)}}return{...j,times:M,boneSampleDatas:R,duration:S}}function oo(e){const{boneTracks:t,targetTracks:n,duration:s,...r}=ao(e),i=n.concat(t.flat());return{...r,clip:new A(e.name,s,i)}}function ao(e){const{skeleton:t,targetPath:n}=e,{times:s,boneSampleDatas:r,duration:i,targetSampleDatas:o,...a}=lo(e),l=s.length,c=t.bones,h=_,u=[],d=[],{points:p,rotates:m}=o;for(let e=0;e<l;e++)p[e].toArray(u,3*e),m[e].toArray(d,4*e);const f=n??"",g=[new L(`${f}.position`,s,u,h),new j(`${f}.quaternion`,s,d,h)],y=r.map(((e,t)=>{const{points:r,rotates:i}=e,o=c[t],a=n?`${n}.skeleton.bones[${t}]`:`${o.name||o.uuid}`,u=[],d=[];for(let e=0;e<l;e++)r&&r[e].toArray(u,3*e),i[e].toArray(d,4*e);const p=[];if(r){const e=new L(`${a}.position`,s,u,h);p.push(e)}const m=new j(`${a}.quaternion`,s,d,h);return p.push(m),p}));return{...a,boneTracks:y,targetTracks:g,duration:i}}function lo(e){const{curve:n,skeleton:s,stretch:r}=e,{bones:o,boneInverses:a}=s,l=o[0],c=e.target??l.parent;if(!c)throw"target 或 根骨骼的 parent 不存在";const h=e.tolerance??.1;l.updateWorldMatrix(!0,!0);const{division:u,length:d}=fi(e),{matrix:p,matrixWorld:m,scale:f}=c,g=m.clone().multiply(p.clone().invert()),v=m.clone().invert(),w=[],b=[];a.reduce(((e,t)=>{const n=t.clone().invert();w.push(n);const s=e.clone().multiply(n);return b.push(s),t}),v);const x=b[0],T=new t,S=new i,O=new t;x.decompose(T,S,O);const M=Qi(e,d),E=Zi(u),C=w[0],D=(new t).setFromMatrixPosition(b[1]).negate().transformDirection(C).transformDirection(v),{rotates:P,points:I,...A}=Xi({...e,curve:n,target:c,position:!0,rotate:!0,anchor:T,front:D,ts:E}),L=Ji({curve:n,division:u,duration:M}),j=I.map(((e,t)=>{const n=P[t],s=(new y).compose(e,n,f);return s.premultiply(g),s})),_={points:I,rotates:P,matrixs:j},F=[],R=j.map((e=>(F.push(S.clone()),e.clone().multiply(x)))),B=E.length,U=n.getLengths(u).map((e=>e/d)),k=[{rotates:F,us:U,matrixs:R}],N=r?function(e,t,s){const r=k[e].us[t]-s/d;return{u:r,point:r<0?null:n.getPointAt(r)}}:function(e,t,s){const r=k[e].us[t],{u:i,point:o,succeed:a}=Ei({curve:n,distance:s,fromU:r,length:d,side:Mi.front,tolerance:h*s});return{u:i,point:a?o:null}},z=a.length,G=z-1;for(let e=1;e<z;e++){const s=[],r=[],o=[],a=[];k.push({points:s,rotates:r,us:o,matrixs:a});const l=b[e],c=w[e],h=e-1,u=k[h],d=b[h],p=w[h],{matrixs:m,points:f,rotates:g}=u,v=new t,x=new i,T=new t;d.decompose(v,x,T);const S=h-1,O=S<0?j:k[S].matrixs,M=new t,E=new i,C=new t;l.decompose(M,E,C);const D=(new t).setFromMatrixPosition(c).sub((new t).setFromMatrixPosition(p)).length(),P=M.length();for(let t=0;t<B;t++){const{point:c,u:u}=N(h,t,D);o.push(u),r.push(E.clone());const d=m[t];if(u<0||!c){s.push(M);const e=d.clone().multiply(l);a.push(e);continue}const p=O[t];let w=p.clone().invert();const b=c.clone().applyMatrix4(w),S=(null==f?void 0:f[t])??v;b.sub(S).normalize();const I=g[t],A=(new y).compose(S,I,T),L=M.clone().transformDirection(A);I.setFromUnitVectors(L,b),I.premultiply(x).normalize(),d.compose(S,I,T),d.premultiply(p);const j=d.clone().invert();c.applyMatrix4(j);const _=c.length();c.copy(M).multiplyScalar(_/P),s.push(c);const F=(new y).compose(c,E,C);if(e===G){const e=n.getTangentAt(u);e.negate().transformDirection(j);const s=(new i).setFromUnitVectors(c.clone().normalize(),e);s.premultiply(E).normalize(),r[t]=s,F.compose(c,s,C)}F.premultiply(d),a.push(F)}}return{...A,times:L,boneSampleDatas:k,targetSampleDatas:_,duration:M}}class co{constructor(e){ui(this,"isAnimationClipKeyframe",!0),ui(this,"_tracksTimes",null),ui(this,"lastGetTime",0),ui(this,"lastGetKeyframeIndexs",[]),this.clip=e}get tracksTimes(){return this._tracksTimes??(this._tracksTimes=this.clip.tracks.map((e=>e.times)))}getTracksKeyframeIndexs(e){const{lastGetTime:t,tracksTimes:n}=this;e<t&&(this.lastGetKeyframeIndexs=[]),this.lastGetTime=e;const s=this.lastGetKeyframeIndexs;return this.lastGetKeyframeIndexs=n.map(((t,n)=>{const r=s[n]??0,i=t.length;for(let n=r;n<i;n++)if(e<t[n])return n-1;return i-1}))}getTracksKeyframes(e){const t=this.getTracksKeyframeIndexs(e),n=this.clip.tracks;return t.map(((e,t)=>{let s=null;if(-1!==e){const r=n[t],i=r.getValueSize(),o=e*i,a=o+i;s=Array.from(r.values.slice(o,a))}return{index:e,value:s}}))}}var ho=(e=>(e.keyframe="keyframe",e.position=".position",e.quaternion=".quaternion",e.rotation=".rotation",e.scale=".scale",e.loop="loop",e.finished="finished",e.point="point",e))(ho||{});const uo=["loop","finished"];class po extends co{constructor(e){super(e.getClip()),ui(this,"isAnimationActionKeyframe",!0),ui(this,"_trackNames"),ui(this,"_positionTrackName"),ui(this,"_quaternionTrackName"),ui(this,"_rotationTrackName"),ui(this,"_scaleTrackName"),ui(this,"event",new R),ui(this,"_frameEventNames",null),ui(this,"mixerListener",(e=>{(e.action.isAnimationActionKeyframe?e.action.action:e.action)===this.action&&this.event.dispatchEvent(e)})),ui(this,"_points",[]),ui(this,"_polyline"),ui(this,"_polylineLengths",[]),ui(this,"_pointsProgress",[]),ui(this,"lastGetProgress",0),ui(this,"lastGetPointIndex",0),ui(this,"_enablePointEvent",!0),ui(this,"_enableKeyframeEvent",!0),ui(this,"lastKeyframes",null),ui(this,"lastPolylineKeyframe",null),ui(this,"frameFun",(()=>{var e;if(this.enableKeyframeEvent){const{keyframes:e,lastKeyframes:t}=this;let n=!1;for(const[s,r]of Object.entries(e)){const e=null==t?void 0:t[s];r.index!==(null==e?void 0:e.index)&&(n=!0,this.event.dispatchEvent({type:s,preFrame:e,frame:r}))}n&&(this.event.dispatchEvent({type:"keyframe",preFrame:t,frame:e}),this.lastKeyframes=e)}if(this.pointEventEnabled){const{pointIndex:t,lastPolylineKeyframe:n}=this;if(t!==(null==n?void 0:n.index)){const s={index:t,value:this.points[t]??(null==(e=this.polyline)?void 0:e.getPoint(this.progress)),length:this.polylineLengths[t]};this.event.dispatchEvent({type:"point",preFrame:n,frame:s}),this.lastPolylineKeyframe=s}}})),ui(this,"_stopListenFun"),this.action=e}get time(){return this.action.time}get duration(){return this.clip.duration}get progressTime(){const{isReverseLoop:e,duration:t,time:n}=this;return e?t-n:n}set progressTime(e){const{action:t,isReverseLoop:n,duration:s}=this;n&&(e=s-e),t.time=e}get progress(){return this.progressTime/this.duration}set progress(e){this.progressTime=e*this.duration}get loopCount(){const e=this.action._loopCount;return-1===e?0:e}get isReverseLoop(){return this.action.loop===B&&this.loopCount%2==1}get loopDirFactor(){return this.isReverseLoop?-1:1}get isReverse(){const e=this.action.timeScale<0;return this.isReverseLoop?!e:e}get dirFactor(){return this.isReverse?-1:1}get trackNames(){return this._trackNames??(this._trackNames=this.clip.tracks.map((e=>e.name)))}get keyframeIndexs(){const e=this.getTracksKeyframeIndexs(this.progressTime);return this.trackNames.reduce(((t,n,s)=>(t[n]=e[s],t)),{})}get keyframes(){const e=this.getTracksKeyframes(this.progressTime);return this.trackNames.reduce(((t,n,s)=>(t[n]=e[s],t)),{})}get positionTrackName(){return void 0===this._positionTrackName&&(this._positionTrackName=this.trackNames.find((e=>e.endsWith(".position")))??null),this._positionTrackName}get positionkeyframeIndex(){const e=this.positionTrackName;return e?this.keyframeIndexs[e]:null}get positionKeyframe(){const e=this.positionTrackName;if(e){const{index:n,value:s}=this.keyframes[e];return{index:n,value:s?new t(...s):null}}return null}get quaternionTrackName(){return void 0===this._quaternionTrackName&&(this._quaternionTrackName=this.trackNames.find((e=>e.endsWith(".quaternion")))??null),this._quaternionTrackName}get quaternionKeyframeIndex(){const e=this.quaternionTrackName;return e?this.keyframeIndexs[e]:null}get quaternionKeyframe(){const e=this.quaternionTrackName;if(e){const{index:t,value:n}=this.keyframes[e];return{index:t,value:n?new i(...n):null}}return null}get rotationTrackName(){return void 0===this._rotationTrackName&&(this._rotationTrackName=this.trackNames.find((e=>e.endsWith(".rotation")))??null),this._rotationTrackName}get rotationkeyframeIndex(){const e=this.rotationTrackName;return e?this.keyframeIndexs[e]:null}get rotationKeyframe(){const e=this.rotationTrackName;if(e){const{index:t,value:s}=this.keyframes[e];return{index:t,value:s?new n(...s):null}}return null}get scaleTrackName(){return void 0===this._scaleTrackName&&(this._scaleTrackName=this.trackNames.find((e=>e.endsWith(".scale")))??null),this._scaleTrackName}get scaleKeyframeIndex(){const e=this.scaleTrackName;return e?this.keyframeIndexs[e]:null}get scaleKeyframe(){const e=this.scaleTrackName;if(e){const{index:n,value:s}=this.keyframes[e];return{index:n,value:s?new t(...s):null}}return null}get frameEventNames(){return this._frameEventNames??(this._frameEventNames=[...this.trackNames,"keyframe","point"])}get mixer(){return this.action._mixer}addEventListener(e,t){const n=this.mixerListener,s=uo.includes(e);s&&!this.mixer.hasEventListener(e,n)&&this.mixer.addEventListener(e,n);const r=this.frameEventNames.includes(e);return!(!s&&!r)&&(this.event.addEventListener(e,t),r&&!this._stopListenFun&&this.enableFrameEvent&&(this._stopListenFun=mo(this.frameFun)),!0)}removeEventListener(e,t){if(uo.includes(e)&&1===this.getListeners(e).length){const t=this.mixerListener;this.mixer.removeEventListener(e,t)}this.event.removeEventListener(e,t),this.stopListenFun&&!this.hasListeners&&(this.stopListenFun=null)}get points(){return this._points}set points(e){e.length>1?(this._points=e,this.polyline=Oi(e)):(this._points=[],this.polyline=null)}get polyline(){return this._polyline}set polyline(e){this._polyline=e;const t=(null==e?void 0:e.getCurveLengths())??[];this.polylineLengths=[0,...t]}get polylineLengths(){return this._polylineLengths}set polylineLengths(e){this._polylineLengths=e;const t=1/e[e.length-1];this.pointsProgress=e.map((e=>e*t))}get polylineLength(){return this.polylineLengths[this.polylineLengths.length-1]}get polylineProgressLength(){return this.polylineLength*this.progress}get pointsProgress(){return this._pointsProgress}set pointsProgress(e){this._pointsProgress=e}get pointIndex(){return this.getPointIndex(this.progress)}getPointIndex(e){const{lastGetProgress:t,pointsProgress:n}=this;e<t&&(this.lastGetPointIndex=0),this.lastGetProgress=e;const s=Math.max(this.lastGetPointIndex,0),r=n.length;for(let t=s;t<r;t++)if(e<n[t])return this.lastGetPointIndex=t-1;return this.lastGetPointIndex=r-1}get enablePointEvent(){return this._enablePointEvent}set enablePointEvent(e){this._enablePointEvent=e,e&&this.autoStartListen()}get pointEventEnabled(){return this.enablePointEvent&&this.pointsProgress.length>0&&this.getListeners("point").length>0}get enableKeyframeEvent(){return this._enableKeyframeEvent}set enableKeyframeEvent(e){this._enableKeyframeEvent=e,e&&this.autoStartListen()}get enableFrameEvent(){return this.enableKeyframeEvent||this.enablePointEvent}get stopListenFun(){return this._stopListenFun}set stopListenFun(e){const t=this._stopListenFun;t&&t(),this._stopListenFun=e}startListen(){this.stopListenFun||(this.stopListenFun=mo(this.frameFun))}stopListen(){this.stopListenFun=null}autoStartListen(){!this.stopListenFun&&this.enableFrameEvent&&this.hasListeners&&(this.stopListenFun=mo(this.frameFun))}get listeners(){return this.event._listeners}get hasListeners(){const e=this.listeners;return!!e&&Object.values(e).some((e=>e&&e.length>0))}getListeners(e){var t;return(null==(t=this.listeners)?void 0:t[e])??[]}destroy(e){const{action:t,mixer:n,mixerListener:s}=this;this.stopListen(),n.removeEventListener("loop",s),n.removeEventListener("finished",s),this.event._listeners=null,!e&&(t.stop(),t.reset(),n._deactivateAction(t),n._removeInactiveAction(t))}}function mo(e){let t;const n=s=>{e(s),t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>{cancelAnimationFrame(t)}}class fo extends po{constructor(){super(...arguments),ui(this,"isAnimationActionOperate",!0)}forward(e){const t=this.action;e=Math.abs(e??t.timeScale),t.timeScale=e}backward(e){const t=this.action;e=Math.abs(e??t.timeScale),t.timeScale=-e}}function go(e){const t=new fo(e);return new Proxy(t,{get:function(e,t,n){return t in e.action?e.action[t]:e[t]},set:function(e,t,n,s){return t in e.action?e.action[t]=n:e[t]=n,!0},deleteProperty:function(e,t){return t in e.action?Reflect.deleteProperty(e.action,t):Reflect.deleteProperty(e,t)},has:function(e,t){return t in e.action||t in e},ownKeys:function(e){return Reflect.ownKeys(e.action).concat(Reflect.ownKeys(e))}})}let yo=class{constructor(e){ui(this,"_action"),this.setAction(e)}get action(){return this._action}set action(e){this.setAction(e)}setAction(e){this._action=e&&go(e)}get play(){const e=this.action;return!(!e||!e._mixer._isActiveAction(e)||e.paused)}set play(e){const t=this.action;t&&(t.paused=!e,e&&0===t.time&&t.play())}stop(){var e;null==(e=this.action)||e.stop()}};function vo(e){var t;null==(t=e.reset)||t.call(e,!0)}class wo extends yo{constructor(e,t=[]){super(e),ui(this,"_updateGUI",null),this.guis=t}get updateGUI(){return this._updateGUI??this.constructor.updateGUI??vo}set updateGUI(e){this._updateGUI=e}get action(){return this._action}set action(e){this.setAction(e),this.updateAllGUI()}updateAllGUI(){for(const e of this.guis)this.updateGUI(e)}}function bo(e){const t=new wo(e);return new Proxy(t,{get:function(e,t,n){var s;return t in e?e[t]:null==(s=e.action)?void 0:s[t]},set:function(e,t,n,s){if(t in e)e[t]=n;else{if(!e.action)return!1;e.action[t]=n}return!0},deleteProperty:function(e,t){return t in e?Reflect.deleteProperty(e,t):!!e.action&&Reflect.deleteProperty(e.action,t)},has:function(e,t){return t in e||!!e.action&&t in e.action},ownKeys:function(e){return e.action?Reflect.ownKeys(e).concat(Reflect.ownKeys(e.action)):Reflect.ownKeys(e)}})}ui(wo,"updateGUI",vo);var xo=(e=>(e.position=".position",e.quaternion=".quaternion",e.rotationX=".rotation[x]",e.rotationY=".rotation[y]",e.rotationZ=".rotation[z]",e.scale=".scale",e.color=".material.color",e.mapRotation=".material.map[rotation]",e.opacity=".material[opacity]",e.visible=".visible",e))(xo||{}),To=(e=>(e.bool="bool",e.number="number",e.color="color",e.quaternion="quaternion",e.string="string",e.vector="vector",e))(To||{});const So={bool:k,number:N,color:z,quaternion:j,string:G,vector:L},Oo={blendMode:V,deduplication:!1,autoClear:!0,tracks:{".position":{valueTypeName:"vector"},".quaternion":{valueTypeName:"quaternion"},".scale":{valueTypeName:"vector"},".material.color":{valueTypeName:"color"},".material[opacity]":{valueTypeName:"number"},".material.map[rotation]":{valueTypeName:"number"},".visible":{valueTypeName:"bool"},".rotation[x]":{valueTypeName:"number"},".rotation[y]":{valueTypeName:"number"},".rotation[z]":{valueTypeName:"number"},".rotation[order]":{valueTypeName:"string"}}};class Mo{constructor(){ui(this,"_options",null),ui(this,"name"),ui(this,"duration"),ui(this,"tracksData",new Map),ui(this,"_tracks",null),ui(this,"_clip",null)}get globalOptions(){return this.constructor.options}get options(){return this._options??(this._options=structuredClone(this.globalOptions))}get blendMode(){return this.options.blendMode??(this.options.blendMode=this.globalOptions.blendMode)}set blendMode(e){this.blendMode!==e&&(this.options.blendMode=e,this.clipChanged())}get autoClear(){return this.options.autoClear??(this.options.autoClear=this.globalOptions.autoClear)}set autoClear(e){this.options.autoClear=e}get deduplication(){return this.options.deduplication??(this.options.deduplication=this.globalOptions.deduplication)}set deduplication(e){this.deduplication!==e&&(this.options.deduplication=e,this.tracksChanged())}get tracksConfig(){return this.options.tracks??(this.options.tracks=structuredClone(this.globalOptions.tracks))}set tracksConfig(e){const t=this.tracksConfig;this.options.tracks=e&&Object.assign(t,e)}clearKeyframes(){this.tracksData.clear(),this.tracksChanged()}tracksChanged(){this._tracks=null,this.clipChanged()}clipChanged(){this._clip=null}get tracks(){return this._tracks??(this._tracks=this.createTracks())}getTrackConfig(e){const t=this.tracksConfig;let n=t[e];if(n)return n;for(const n of Object.keys(t))if(e.endsWith(n))return t[n];return null}createTracks(){const{tracksData:e,deduplication:t,autoClear:n}=this,s=[];for(const[n,r]of e.entries()){r.sort(((e,t)=>e.time-t.time));const e=[],i=[];for(const{time:t,value:n}of r)e.push(t),i.push(...n);const{valueTypeName:o,...a}=this.getTrackConfig(n)??{};const l=new(So[o]??U)(n,e,i);for(const[e,t]of Object.entries(a))null!=t&&(l[e]=t);t&&l.optimize(),s.push(l)}return n&&this.clearKeyframes(),s}get clip(){return this._clip??(this._clip=this.createClip())}createClip(e,t){e=e??this.name??void 0,t=t??this.duration??void 0;const{blendMode:n,tracks:s}=this,r=new A(e,t,s);return null!=n&&(r.blendMode=n),r}updateClip(e){return e||(e=this._clip)?(e.tracks=this.tracks,e.resetDuration(),e):this.clip}addKeyframe(e,t,n){const s=this.tracksData;s.has(e)||s.set(e,[]),s.get(e).push({time:t,value:n}),this.tracksChanged()}addKeyframes(e,t,n){for(const[s,r]of Object.entries(n)){const n=`${e}.${s}`;Array.isArray(r)?this.addKeyframe(n,t,r):oi(r)?this.addKeyframe(n,t,[r]):this.addKeyframes(n,t,r)}}addPosition(e,t,n){const{x:s,y:r,z:i}=t;n=n??"",this.addKeyframe(`${n}.position`,e,[s,r,i])}addQuaternion(e,t,n){const{x:s,y:r,z:i,w:o}=t;n=n??"",this.addKeyframe(`${n}.quaternion`,e,[s,r,i,o])}addRotation(e,t,n){const{x:s,y:r,z:i,order:o}=t;n=n??"",this.addKeyframe(`${n}.rotation[x]`,e,[s]),this.addKeyframe(`${n}.rotation[y]`,e,[r]),this.addKeyframe(`${n}.rotation[z]`,e,[i]),o&&this.addKeyframe(`${n}.rotation[order]`,e,[o])}addRotationX(e,t,n){n=n??"",this.addKeyframe(`${n}.rotation[x]`,e,[t])}addRotationY(e,t,n){n=n??"",this.addKeyframe(`${n}.rotation[y]`,e,[t])}addRotationZ(e,t,n){n=n??"",this.addKeyframe(`${n}.rotation[z]`,e,[t])}addScale(e,t,n){const{x:s,y:r,z:i}=t;n=n??"",this.addKeyframe(`${n}.scale`,e,[s,r,i])}addColor(e,t,n){const{r:s,g:r,b:i}=t;n=n??"",this.addKeyframe(`${n}.material.color`,e,[s,r,i])}addOpacity(e,t,n){n=n??"",this.addKeyframe(`${n}.material[opacity]`,e,[t])}addMapRotation(e,t,n){n=n??"",this.addKeyframe(`${n}.material.map[rotation]`,e,[t])}addVisible(e,t,n){n=n??"",this.addKeyframe(`${n}.visible`,e,[t])}}ui(Mo,"options",Oo);class Eo extends Mo{constructor(e,t){super(),ui(this,"_mixer"),ui(this,"_root",null),ui(this,"_action",null),this.mixer=e,this.root=t}get mixer(){return this._mixer}set mixer(e){this._mixer!==e&&(this._mixer=e,this.actionChanged())}get root(){return this._root}set root(e){this._root!==e&&(this._root=e,this.actionChanged())}get loop(){return this.options.loop??(this.options.loop=this.globalOptions.loop)}set loop(e){this.loop!==e&&(this.options.loop=e,this.actionChanged())}get repetitions(){return this.options.repetitions??(this.options.repetitions=this.globalOptions.repetitions)}set repetitions(e){this.repetitions!==e&&(this.options.repetitions=e,this.actionChanged())}clipChanged(){super.clipChanged(),this.actionChanged()}actionChanged(){this._action=null}get action(){return this._action??(this._action=this.createAction())}createAction(e,t,n){t=t??void 0;const s=n??this.mixer,r=e??this.root??void 0,i=s.clipAction(this.clip,r,t),{loop:o,repetitions:a}=this;return null!=o&&(i.loop=o),null!=a&&(i.repetitions=a),i}}function Co(e,t=1){const n=e.slice().sort(((e,t)=>e-t)),s=[[]];return n.reduce((function(e,n){const r=e[e.length-1];return null==r||n-r<=t?e.push(n):(e=[n],s.push(e)),e}),s[0]),s}function Do(e,t){let{count:n=4,min:s=-1/0,max:r=1/0}=t??{};const i=e[0];s=Math.max(i-n+1,s),r=Math.min(i+n-1,r),n=Math.min(n,r-s+1);const o=[];for(const t of e)s<=t&&t<=r&&o.push(t);const a=Co(o);a.sort(((e,t)=>t.length-e.length));let l=a.find((e=>e.includes(i)));if(l.length>=n)return l.sort(((t,n)=>e.indexOf(t)-e.indexOf(n))),l=l.slice(0,n),l.sort(((e,t)=>e-t)),l;for(const e of o){s=l[0],r=l[l.length-1];let t=s-e,i=n-l.length;if(t>0&&t<=i)for(let t=e;t<s;t++)l.unshift(t);else if(t=e-r,t>0&&t<=i)for(let t=r+1;t<=e;t++)l.push(t);else;}return l}var Po="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Io(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),n}function Ao(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Lo={},jo={get exports(){return Lo},set exports(e){Lo=e}};jo.exports=function e(t,n,s){function r(o,a){if(!n[o]){if(!t[o]){if(!a&&Ao)return Ao(o);if(i)return i(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){var n=t[o][1][e];return r(n||e)}),c,c.exports,e,t,n,s)}return n[o].exports}for(var i=Ao,o=0;o<s.length;o++)r(s[o]);return r}({1:[function(e,t,n){(function(e){var n,s,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var i=0,o=new r(h),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),n=function(){a.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var l=new e.MessageChannel;l.port1.onmessage=h,n=function(){l.port2.postMessage(0)}}var c=[];function h(){var e,t;s=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}s=!1}function u(e){1!==c.push(e)||s||n()}t.exports=u}).call(this,void 0!==Po?Po:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var s=e(1);function r(){}var i={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&p(this,e)}function h(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function u(e,t,n){s((function(){var s;try{s=t(n)}catch(t){return i.reject(e,t)}s===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,s)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function s(t){n||(n=!0,i.reject(e,t))}function r(t){n||(n=!0,i.resolve(e,t))}function o(){t(r,s)}var a=m(o);"error"===a.status&&s(a.value)}function m(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}function f(e){return e instanceof this?e:i.resolve(new this(r),e)}function g(e){var t=new this(r);return i.reject(t,e)}function y(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,s=!1;if(!n)return this.resolve([]);for(var o=new Array(n),a=0,l=-1,c=new this(r);++l<n;)h(e[l],l);return c;function h(e,r){function l(e){o[r]=e,++a!==n||s||(s=!0,i.resolve(c,o))}t.resolve(e).then(l,(function(e){s||(s=!0,i.reject(c,e))}))}}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,s=!1;if(!n)return this.resolve([]);for(var o=-1,a=new this(r);++o<n;)l(e[o]);return a;function l(e){t.resolve(e).then((function(e){s||(s=!0,i.resolve(a,e))}),(function(e){s||(s=!0,i.reject(a,e))}))}}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var n=new this.constructor(r);return this.state!==l?u(n,this.state===a?e:t,this.outcome):this.queue.push(new h(n,e,t)),n},h.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){i.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=m(d,t);if("error"===n.status)return i.reject(e,n.value);var s=n.value;if(s)p(e,s);else{e.state=a,e.outcome=t;for(var r=-1,o=e.queue.length;++r<o;)e.queue[r].callFulfilled(t)}return e},i.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,s=e.queue.length;++n<s;)e.queue[n].callRejected(t);return e},c.resolve=f,c.reject=g,c.all=y,c.race=v},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==Po?Po:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var s="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};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var o=i();function a(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(r){if("TypeError"!==r.name)throw r;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),s=0;s<e.length;s+=1)n.append(e[s]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var c=Promise;function h(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function d(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function p(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var m="local-forage-detect-blob-support",f=void 0,g={},y=Object.prototype.toString,v="readonly",w="readwrite";function b(e){for(var t=e.length,n=new ArrayBuffer(t),s=new Uint8Array(n),r=0;r<t;r++)s[r]=e.charCodeAt(r);return n}function x(e){return new c((function(t){var n=e.transaction(m,w),s=l([""]);n.objectStore(m).put(s,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}function T(e){return"boolean"==typeof f?c.resolve(f):x(e).then((function(e){return f=e}))}function S(e){var t=g[e.name],n={};n.promise=new c((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function O(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function M(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new c((function(n,s){if(g[e.name]=g[e.name]||R(),e.db){if(!t)return n(e.db);S(e),e.db.close()}var r=[e.name];t&&r.push(e.version);var i=o.open.apply(o,r);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),s(i.error)},i.onsuccess=function(){n(i.result),O(e)}}))}function C(e){return E(e,!1)}function D(e){return E(e,!0)}function P(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),s=e.version<e.db.version,r=e.version>e.db.version;if(s&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function I(e){return new c((function(t,n){var s=new FileReader;s.onerror=n,s.onloadend=function(n){var s=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:s,type:e.type})},s.readAsBinaryString(e)}))}function A(e){return l([b(atob(e.data))],{type:e.type})}function L(e){return e&&e.__local_forage_encoded_blob}function j(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(n,e,e),n}function _(e){S(e);for(var t=g[e.name],n=t.forages,s=0;s<n.length;s++){var r=n[s];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return e.db=null,C(e).then((function(t){return e.db=t,P(e)?D(e):t})).then((function(s){e.db=t.db=s;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=s})).catch((function(t){throw M(e,t),t}))}function F(e,t,n,s){void 0===s&&(s=1);try{var r=e.db.transaction(e.storeName,t);n(null,r)}catch(r){if(s>0&&(!e.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return c.resolve().then((function(){if(!e.db||"NotFoundError"===r.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),D(e)})).then((function(){return _(e).then((function(){F(e,t,n,s-1)}))})).catch(n);n(r)}}function R(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(e){var t=this,n={db:null};if(e)for(var s in e)n[s]=e[s];var r=g[n.name];r||(r=R(),g[n.name]=r),r.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=j);var i=[];function o(){return c.resolve()}for(var a=0;a<r.forages.length;a++){var l=r.forages[a];l!==t&&i.push(l._initReady().catch(o))}var h=r.forages.slice(0);return c.all(i).then((function(){return n.db=r.db,C(n)})).then((function(e){return n.db=e,P(n,t._defaultConfig.version)?D(n):e})).then((function(e){n.db=r.db=e,t._dbInfo=n;for(var s=0;s<h.length;s++){var i=h[s];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}}))}function U(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){F(n._dbInfo,v,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),L(e)&&(e=A(e)),t(e)},o.onerror=function(){s(o.error)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function k(e,t){var n=this,s=new c((function(t,s){n.ready().then((function(){F(n._dbInfo,v,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var n=o.result;if(n){var s=n.value;L(s)&&(s=A(s));var r=e(s,n.key,a++);void 0!==r?t(r):n.continue()}else t()},o.onerror=function(){s(o.error)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function N(e,t,n){var s=this;e=d(e);var r=new c((function(n,r){var i;s.ready().then((function(){return i=s._dbInfo,"[object Blob]"===y.call(t)?T(i.db).then((function(e){return e?t:I(t)})):t})).then((function(t){F(s._dbInfo,w,(function(i,o){if(i)return r(i);try{var a=o.objectStore(s._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);o.oncomplete=function(){void 0===t&&(t=null),n(t)},o.onabort=o.onerror=function(){var e=l.error?l.error:l.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return h(r,n),r}function z(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){F(n._dbInfo,w,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){s(o.error)},i.onabort=function(){var e=o.error?o.error:o.transaction.error;s(e)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function G(e){var t=this,n=new c((function(e,n){t.ready().then((function(){F(t._dbInfo,w,(function(s,r){if(s)return n(s);try{var i=r.objectStore(t._dbInfo.storeName).clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){var e=i.error?i.error:i.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function V(e){var t=this,n=new c((function(e,n){t.ready().then((function(){F(t._dbInfo,v,(function(s,r){if(s)return n(s);try{var i=r.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function H(e,t){var n=this,s=new c((function(t,s){e<0?t(null):n.ready().then((function(){F(n._dbInfo,v,(function(r,i){if(r)return s(r);try{var o=i.objectStore(n._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){s(l.error)}}catch(e){s(e)}}))})).catch(s)}));return h(s,t),s}function W(e){var t=this,n=new c((function(e,n){t.ready().then((function(){F(t._dbInfo,v,(function(s,r){if(s)return n(s);try{var i=r.objectStore(t._dbInfo.storeName).openKeyCursor(),o=[];i.onsuccess=function(){var t=i.result;t?(o.push(t.key),t.continue()):e(o)},i.onerror=function(){n(i.error)}}catch(e){n(e)}}))})).catch(n)}));return h(n,e),n}function K(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var s,r=this;if(e.name){var i=e.name===n.name&&r._dbInfo.db?c.resolve(r._dbInfo.db):C(e).then((function(t){var n=g[e.name],s=n.forages;n.db=t;for(var r=0;r<s.length;r++)s[r]._dbInfo.db=t;return t}));s=e.storeName?i.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;S(e);var s=g[e.name],r=s.forages;t.close();for(var i=0;i<r.length;i++){var a=r[i];a._dbInfo.db=null,a._dbInfo.version=n}var l=new c((function(t,s){var r=o.open(e.name,n);r.onerror=function(e){r.result.close(),s(e)},r.onupgradeneeded=function(){r.result.deleteObjectStore(e.storeName)},r.onsuccess=function(){var e=r.result;e.close(),t(e)}}));return l.then((function(e){s.db=e;for(var t=0;t<r.length;t++){var n=r[t];n._dbInfo.db=e,O(n._dbInfo)}})).catch((function(t){throw(M(e,t)||c.resolve()).catch((function(){})),t}))}})):i.then((function(t){S(e);var n=g[e.name],s=n.forages;t.close();for(var r=0;r<s.length;r++)s[r]._dbInfo.db=null;var i=new c((function(t,n){var s=o.deleteDatabase(e.name);s.onerror=s.onblocked=function(e){var t=s.result;t&&t.close(),n(e)},s.onsuccess=function(){var e=s.result;e&&e.close(),t(e)}}));return i.then((function(e){n.db=e;for(var t=0;t<s.length;t++)O(s[t]._dbInfo)})).catch((function(t){throw(M(e,t)||c.resolve()).catch((function(){})),t}))}))}else s=c.reject("Invalid arguments");return h(s,t),s}var q={_driver:"asyncStorage",_initStorage:B,_support:a(),iterate:k,getItem:U,setItem:N,removeItem:z,clear:G,length:V,key:H,keys:W,dropInstance:K};function Y(){return"function"==typeof openDatabase}var Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X="~~local_forage_type~",Z=/^~~local_forage_type~([^~]+)~/,J="__lfsc__:",$=J.length,ee="arbf",te="blob",ne="si08",se="ui08",re="uic8",ie="si16",oe="si32",ae="ur16",le="ui32",ce="fl32",he="fl64",ue=$+ee.length,de=Object.prototype.toString;function pe(e){var t,n,s,r,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)n=Q.indexOf(e[t]),s=Q.indexOf(e[t+1]),r=Q.indexOf(e[t+2]),i=Q.indexOf(e[t+3]),h[l++]=n<<2|s>>4,h[l++]=(15&s)<<4|r>>2,h[l++]=(3&r)<<6|63&i;return c}function me(e){var t,n=new Uint8Array(e),s="";for(t=0;t<n.length;t+=3)s+=Q[n[t]>>2],s+=Q[(3&n[t])<<4|n[t+1]>>4],s+=Q[(15&n[t+1])<<2|n[t+2]>>6],s+=Q[63&n[t+2]];return n.length%3==2?s=s.substring(0,s.length-1)+"=":n.length%3==1&&(s=s.substring(0,s.length-2)+"=="),s}function fe(e,t){var n="";if(e&&(n=de.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===de.call(e.buffer))){var s,r=J;e instanceof ArrayBuffer?(s=e,r+=ee):(s=e.buffer,"[object Int8Array]"===n?r+=ne:"[object Uint8Array]"===n?r+=se:"[object Uint8ClampedArray]"===n?r+=re:"[object Int16Array]"===n?r+=ie:"[object Uint16Array]"===n?r+=ae:"[object Int32Array]"===n?r+=oe:"[object Uint32Array]"===n?r+=le:"[object Float32Array]"===n?r+=ce:"[object Float64Array]"===n?r+=he:t(new Error("Failed to get type for BinaryArray"))),t(r+me(s))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=X+e.type+"~"+me(this.result);t(J+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function ge(e){if(e.substring(0,$)!==J)return JSON.parse(e);var t,n=e.substring(ue),s=e.substring($,ue);if(s===te&&Z.test(n)){var r=n.match(Z);t=r[1],n=n.substring(r[0].length)}var i=pe(n);switch(s){case ee:return i;case te:return l([i],{type:t});case ne:return new Int8Array(i);case se:return new Uint8Array(i);case re:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case ae:return new Uint16Array(i);case oe:return new Int32Array(i);case le:return new Uint32Array(i);case ce:return new Float32Array(i);case he:return new Float64Array(i);default:throw new Error("Unkown type: "+s)}}var ye={serialize:fe,deserialize:ge,stringToBuffer:pe,bufferToString:me};function ve(e,t,n,s){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,s)}function we(e){var t=this,n={db:null};if(e)for(var s in e)n[s]="string"!=typeof e[s]?e[s].toString():e[s];var r=new c((function(e,s){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return s(e)}n.db.transaction((function(r){ve(r,n,(function(){t._dbInfo=n,e()}),(function(e,t){s(t)}))}),s)}));return n.serializer=ye,r}function be(e,t,n,s,r,i){e.executeSql(n,s,r,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?i(e,o):ve(e,t,(function(){e.executeSql(n,s,r,i)}),i)}),i):i(e,o)}),i)}function xe(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var s=n.rows.length?n.rows.item(0).value:null;s&&(s=r.serializer.deserialize(s)),t(s)}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Te(e,t){var n=this,s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT * FROM "+r.storeName,[],(function(n,s){for(var i=s.rows,o=i.length,a=0;a<o;a++){var l=i.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Se(e,t,n,s){var r=this;e=d(e);var i=new c((function(i,o){r.ready().then((function(){void 0===t&&(t=null);var a=t,l=r._dbInfo;l.serializer.serialize(t,(function(t,c){c?o(c):l.db.transaction((function(n){be(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(a)}),(function(e,t){o(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(s>0)return void i(Se.apply(r,[e,a,n,s-1]));o(t)}}))}))})).catch(o)}));return h(i,n),i}function Oe(e,t,n){return Se.apply(this,[e,t,n,1])}function Me(e,t){var n=this;e=d(e);var s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Ee(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var s=t._dbInfo;s.db.transaction((function(t){be(t,s,"DELETE FROM "+s.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ce(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var s=t._dbInfo;s.db.transaction((function(t){be(t,s,"SELECT COUNT(key) as c FROM "+s.storeName,[],(function(t,n){var s=n.rows.item(0).c;e(s)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function De(e,t){var n=this,s=new c((function(t,s){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){be(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var s=n.rows.length?n.rows.item(0).key:null;t(s)}),(function(e,t){s(t)}))}))})).catch(s)}));return h(s,t),s}function Pe(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var s=t._dbInfo;s.db.transaction((function(t){be(t,s,"SELECT key FROM "+s.storeName,[],(function(t,n){for(var s=[],r=0;r<n.rows.length;r++)s.push(n.rows.item(r).key);e(s)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ie(e){return new c((function(t,n){e.transaction((function(s){s.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,s){for(var r=[],i=0;i<s.rows.length;i++)r.push(s.rows.item(i).name);t({db:e,storeNames:r})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}function Ae(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var s,r=this;return s=e.name?new c((function(t){var s;s=e.name===n.name?r._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:s,storeNames:[e.storeName]}):t(Ie(s))})).then((function(e){return new c((function(t,n){e.db.transaction((function(s){function r(e){return new c((function(t,n){s.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var i=[],o=0,a=e.storeNames.length;o<a;o++)i.push(r(e.storeNames[o]));c.all(i).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):c.reject("Invalid arguments"),h(s,t),s}var Le={_driver:"webSQLStorage",_initStorage:we,_support:Y(),iterate:Te,getItem:xe,setItem:Oe,removeItem:Me,clear:Ee,length:Ce,key:De,keys:Pe,dropInstance:Ae};function je(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function _e(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Fe(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}function Re(){return!Fe()||localStorage.length>0}function Be(e){var t=this,n={};if(e)for(var s in e)n[s]=e[s];return n.keyPrefix=_e(e,t._defaultConfig),Re()?(t._dbInfo=n,n.serializer=ye,c.resolve()):c.reject()}function Ue(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var s=localStorage.key(n);0===s.indexOf(e)&&localStorage.removeItem(s)}}));return h(n,e),n}function ke(e,t){var n=this;e=d(e);var s=n.ready().then((function(){var t=n._dbInfo,s=localStorage.getItem(t.keyPrefix+e);return s&&(s=t.serializer.deserialize(s)),s}));return h(s,t),s}function Ne(e,t){var n=this,s=n.ready().then((function(){for(var t=n._dbInfo,s=t.keyPrefix,r=s.length,i=localStorage.length,o=1,a=0;a<i;a++){var l=localStorage.key(a);if(0===l.indexOf(s)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(r),o++)))return c}}}));return h(s,t),s}function ze(e,t){var n=this,s=n.ready().then((function(){var t,s=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(s.keyPrefix.length)),t}));return h(s,t),s}function Ge(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,s=[],r=0;r<n;r++){var i=localStorage.key(r);0===i.indexOf(e.keyPrefix)&&s.push(i.substring(e.keyPrefix.length))}return s}));return h(n,e),n}function Ve(e){var t=this.keys().then((function(e){return e.length}));return h(t,e),t}function He(e,t){var n=this;e=d(e);var s=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return h(s,t),s}function We(e,t,n){var s=this;e=d(e);var r=s.ready().then((function(){void 0===t&&(t=null);var n=t;return new c((function(r,i){var o=s._dbInfo;o.serializer.serialize(t,(function(t,s){if(s)i(s);else try{localStorage.setItem(o.keyPrefix+e,t),r(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}}))}))}));return h(r,n),r}function Ke(e,t){if(t=p.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var s,r=this;return s=e.name?new c((function(t){e.storeName?t(_e(e,r._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),h(s,t),s}var qe={_driver:"localStorageWrapper",_initStorage:Be,_support:je(),iterate:Ne,getItem:ke,setItem:We,removeItem:He,clear:Ue,length:Ve,key:ze,keys:Ge,dropInstance:Ke},Ye=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Qe=function(e,t){for(var n=e.length,s=0;s<n;){if(Ye(e[s],t))return!0;s++}return!1},Xe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Ze={},Je={},$e={INDEXEDDB:q,WEBSQL:Le,LOCALSTORAGE:qe},et=[$e.INDEXEDDB._driver,$e.WEBSQL._driver,$e.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),st={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function rt(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function it(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Xe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ot=function(){function e(t){for(var n in r(this,e),$e)if($e.hasOwnProperty(n)){var s=$e[n],i=s._driver;this[n]=i,Ze[i]||this.defineDriver(s)}this._defaultConfig=it({},st),this._config=it({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":s(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var s=new c((function(t,n){try{var s=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(r);for(var i=nt.concat("_initStorage"),o=0,a=i.length;o<a;o++){var l=i[o];if((!Qe(tt,l)||e[l])&&"function"!=typeof e[l])return void n(r)}var u=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=c.reject(t);return h(n,arguments[arguments.length-1]),n}},n=0,s=tt.length;n<s;n++){var r=tt[n];e[r]||(e[r]=t(r))}};u();var d=function(n){Ze[s]&&console.info("Redefining LocalForage driver: "+s),Ze[s]=e,Je[s]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(d,n):d(!!e._support):d(!0)}catch(e){n(e)}}));return u(s,t,n),s},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var s=Ze[e]?c.resolve(Ze[e]):c.reject(new Error("Driver not found."));return u(s,t,n),s},e.prototype.getSerializer=function(e){var t=c.resolve(ye);return u(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(n,e,e),n},e.prototype.setDriver=function(e,t,n){var s=this;Xe(e)||(e=[e]);var r=this._getSupportedDrivers(e);function i(){s._config.driver=s.driver()}function o(e){return s._extend(e),i(),s._ready=s._initStorage(s._config),s._ready}function a(e){return function(){var t=0;function n(){for(;t<e.length;){var r=e[t];return t++,s._dbInfo=null,s._ready=null,s.getDriver(r).then(o).catch(n)}i();var a=new Error("No available storage method found.");return s._driverSet=c.reject(a),s._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch((function(){return c.resolve()})):c.resolve();return this._driverSet=l.then((function(){var e=r[0];return s._dbInfo=null,s._ready=null,s.getDriver(e).then((function(e){s._driver=e._driver,i(),s._wrapLibraryMethodsWithReady(),s._initDriver=a(r)}))})).catch((function(){i();var e=new Error("No available storage method found.");return s._driverSet=c.reject(e),s._driverSet})),u(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Je[e]},e.prototype._extend=function(e){it(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,s=e.length;n<s;n++){var r=e[n];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)rt(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),at=new ot;t.exports=at},{3:3}]},{},[4])(4);const _o=new r;_o.name="Scene";class Fo{constructor(e,t){this.signals=e,this.viewportState=t,this.strokeStore=Lo.createInstance({name:"soonspace",storeName:"modelStrokeCache"}),this.scene=_o.clone(),this.selectedObjects={edge:new Set,stroke:new Set,opacity:new Set,highlight:new Set,emissive:new Set},this.intersectsList={meshOfModelList:[],poiIconList:[],otherObjList:[],getAll:function(){return[...this.meshOfModelList,...this.poiIconList,...this.otherObjList]}}}addObject(e,t){if(this.viewportState.isDisposed)return this.removeObject(e),void tr("Scene is disposed");t?t.add(e):this.scene.add(e),this._triggerObjectAdded(e),this.signals.objectAdded.dispatch(e)}attachObject(e,t){if(this.viewportState.isDisposed)return this.removeObject(e),void tr("Scene is disposed");t?t.attach(e):this.scene.attach(e),this._triggerObjectAdded(e),this.signals.objectAdded.dispatch(e)}removeObject(e){function t(e){var t;e.map&&((t=e.map)&&t.isTexture&&t.dispose()),e.dispose()}e.traverse((e=>{var n;if(e.geometry&&e.material){const n=e;n.geometry.dispose(),ti(n.material,t)}e instanceof Ya&&(null===(n=e.element)||void 0===n||n.remove());const{meshOfModelList:s,poiIconList:r,otherObjList:i}=this.intersectsList,o=s.findIndex((t=>t.uuid===e.uuid)),a=r.findIndex((t=>t.uuid===e.uuid)),l=i.findIndex((t=>t.uuid===e.uuid));o>-1&&this.intersectsList.meshOfModelList.splice(o,1),a>-1&&this.intersectsList.poiIconList.splice(a,1),l>-1&&this.intersectsList.otherObjList.splice(l,1)})),e.removeFromParent(),this.signals.objectRemoved.dispatch(e)}openSceneFog(e={}){const{color:t=13426943,density:n=.002}=e;this.scene.fog=new H(t,n),this.signals.sceneChanged.dispatch()}closeSceneFog(){this.scene.fog=null,this.signals.sceneChanged.dispatch()}edgeShow(e,t){const n=[],s=e=>{this.selectedObjects.edge.has(e)||n.push(e)};return Wr(e)?e.forEach((e=>s(e))):Kr(e)&&s(e),n.forEach((e=>this.selectedObjects.edge.add(e))),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge,options:t}),Promise.resolve()}unEdgeShow(e){e||(e=[...this.selectedObjects.edge]);const t=e=>this.selectedObjects.edge.has(e)?(this.selectedObjects.edge.delete(e),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge}),Promise.resolve()):Promise.resolve();return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}strokeShow(e,t={}){const{isOpacityShow:n=!0,color:s=4647927,opacity:r=.2,edgeColor:i=61183,edgeOpacity:o=1,modelCache:a=!0,firstChild:l=!1}=t,c=async e=>{var c;if(this.selectedObjects.stroke.has(e))return Promise.resolve();if(e.userData.strokeGroup)return Promise.resolve();const h=new Va({id:`${null!==(c=e.sid)&&void 0!==c?c:e.id}_stroke`,name:`${e.name}_stroke`}),u=new K,d=new x({color:i,transparent:!0,opacity:o});u.material=d,h.add(u);let p=null;const m=()=>{const t=[];if((l?e.children[0]:e).traverse((n=>{if("Mesh"===n.type&&n instanceof W){const s=new q(n.geometry,89);n.updateWorldMatrix(!0,!1);const r=n.matrixWorld.clone().premultiply(e.matrixWorld.clone().invert());s.applyMatrix4(r),t.push(s)}})),0!==t.length)return $t(t)};if(a&&e instanceof Qa&&e.sid){const t=`${e.sid}_stroke`;await this.strokeStore.ready();const n=await this.strokeStore.getItem(t);if(n)p=new w,p.setAttribute("position",new b(n,3));else{const e=m();if(e){p=e;const n=e.getAttribute("position");n.array instanceof Float32Array&&this.strokeStore.setItem(t,n.array.buffer)}}}else{const e=m();e&&(p=e)}return null!==p?(u.geometry=p,e.userData.strokeGroup=h,e.userData.strokeOptions=t,this.addObject(h,e),this.selectedObjects.stroke.add(e),n&&this.opacityShow(l?e.children[0]:e,{color:s,opacity:r}),Promise.resolve()):void 0};return Wr(e)?Promise.all(e.map((e=>c(e)))):Kr(e)?c(e):Promise.resolve()}unStrokeShow(e){e||(e=[...this.selectedObjects.stroke]);const t=e=>{if(!e.userData.strokeGroup)return Promise.resolve();if(this.removeObject(e.userData.strokeGroup),Reflect.deleteProperty(e.userData,"strokeGroup"),!this.selectedObjects.stroke.has(e))return Promise.resolve();this.selectedObjects.stroke.delete(e),this.signals.geometryChanged.dispatch();const{firstChild:t}=e.userData.strokeOptions;return this.unOpacityShow(t?e.children[0]:e),Reflect.deleteProperty(e.userData,"strokeOptions"),Promise.resolve()};return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}opacityShow(e,t={}){const{color:n="#fff",opacity:s=.8}=t;function r(e){const t=Sr(e);return t.map=null,t.transparent=s<1,t.depthWrite=!t.transparent,t.color.set(n),t.opacity=s,t}const i=e=>(this.selectedObjects.opacity.has(e)||(e.traverse((e=>{if(e instanceof W){if(e.userData.material)return;e.userData.material=e.material,e.material=ti(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.opacity.add(e)),Promise.resolve());return Wr(e)?Promise.all(e.map((e=>i(e)))):Kr(e)?i(e):Promise.resolve()}unOpacityShow(e){e||(e=[...this.selectedObjects.opacity]);const t=e=>new Promise((t=>{this.selectedObjects.opacity.has(e)||t(),this.selectedObjects.opacity.delete(e),e.traverse((e=>{if(e instanceof W){if(!e.userData.material)return;Or(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}highlightShow(e,t={}){const{color:n="red",opacity:s=1}=t;function r(e){e instanceof Y&&(e.color=new u(n),e.opacity=s,e.transparent=s<1,e.depthWrite=!e.transparent)}const i=e=>(this.selectedObjects.highlight.has(e)||(e.traverse((e=>{if(e instanceof W){if(e.userData.material)return;e.userData.material=e.material,e.material=Sr(e.material),ti(e.material,r)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.highlight.add(e)),Promise.resolve());return Wr(e)?Promise.all(e.map((e=>i(e)))):Kr(e)?i(e):Promise.resolve()}unHighlightShow(e){e||(e=[...this.selectedObjects.highlight]);const t=e=>new Promise((t=>{this.selectedObjects.highlight.has(e)||t(),this.selectedObjects.highlight.delete(e),e.traverse((e=>{if(e instanceof W){if(!e.userData.material)return;Or(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return Wr(e)?Promise.all(e.map((e=>t(e)))):Kr(e)?t(e):Promise.resolve()}emissiveShow(e,t={}){const{color:n="red",baseColor:s,maxOpacity:r=1,minOpacity:i=0,duration:o=1e3,yoyo:a=!1}=t;function l(e){e instanceof Y&&(s&&e.color.set(s),e.emissive.set(n),e.emissiveIntensity=r,0!==o&&ri({emissiveIntensity:r},{emissiveIntensity:i},{duration:o,yoyo:a,repeat:!0},(t=>e.emissiveIntensity=t.emissiveIntensity),(t=>e.userData.animation=t)))}const c=e=>(this.selectedObjects.emissive.has(e)||(e.traverse((e=>{if(e instanceof W){if(e.userData.material)return;e.userData.material=e.material,e.material=Sr(e.material),ti(e.material,l)}})),this.selectedObjects.emissive.add(e),this.signals.materialChanged.dispatch()),Promise.resolve());return Wr(e)?Promise.all(e.map((e=>c(e)))):Kr(e)?c(e):Promise.resolve()}unEmissiveShow(e){function t(e){e.userData.animation&&jt.remove(e.userData.animation)}e||(e=[...this.selectedObjects.emissive]);const n=e=>new Promise((n=>{this.selectedObjects.emissive.has(e)||n(),this.selectedObjects.emissive.delete(e),e.traverse((e=>{if(e instanceof W){if(!e.userData.material)return;ti(e.material,t),Or(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),n()}));return Wr(e)?Promise.all(e.map((e=>n(e)))):Kr(e)?n(e):Promise.resolve()}_triggerObjectAdded(e){if(e instanceof za)if("Model"===e.stype)e.traverse((e=>{if(e instanceof W){-1===this.intersectsList.meshOfModelList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.meshOfModelList.push(e)}}));else if("Poi"===e.stype&&e instanceof Xa){const t=this.intersectsList.poiIconList.findIndex((t=>{var n;return t.uuid===(null===(n=e.icon)||void 0===n?void 0:n.uuid)}));-1===t&&e.icon&&this.intersectsList.poiIconList.push(e.icon)}else"Group"===e.stype?e.children.forEach((e=>this._triggerObjectAdded(e))):e.isObject3D&&e.traverse((e=>{if(e instanceof W){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}));else e.isObject3D&&e.traverse((e=>{if(e instanceof W){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}))}}class Ro extends o{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof Ro&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}const Bo=new t,Uo=new y,ko=new y,No=new t,zo=new t;class Go{constructor(e){let t,n,s,r;this.viewport=e,this.domElement=document.createElement("div");const i={objects:new WeakMap};this.domElement.style.overflow="hidden",this.getSize=function(){return{width:t,height:n}},this.render=function(e,t){null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),Uo.copy(t.matrixWorldInverse),ko.multiplyMatrices(t.projectionMatrix,Uo);const n=[...e].filter((e=>Wa(e.elementType))).map((e=>e.children[0]));o(n,t),function(e){const t=e.sort((function(e,t){if(e.renderOrder!==t.renderOrder)return t.renderOrder-e.renderOrder;return i.objects.get(e).distanceToCameraSquared-i.objects.get(t).distanceToCameraSquared})),n=t.length;for(let e=0,s=t.length;e<s;e++)t[e].element.style.zIndex=""+(n-e)}(n)},this.setSize=(e,i)=>{t=e,n=i,s=t/2,r=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=i+"px"};const o=(e,t)=>{e.forEach((e=>{var n;Fr(e,this.viewport);const o=e.parent;Bo.setFromMatrixPosition(e.matrixWorld),Bo.applyMatrix4(ko);const l=hr(e)&&Bo.z>=-1&&Bo.z<=1&&!0===e.layers.test(t.layers);if(e.userData.prevVisible!==l&&(null===(n=o.onChange)||void 0===n||n.call(o,l),o.elementAutoDisplay&&(e.element.style.display=!0===l?"":"none")),e.userData.prevVisible=l,!0===l||!1===o.elementAutoDisplay){const t=e.element;t.style.transform="translate(-50%,-50%) translate("+(Bo.x*s+s)+"px,"+(-Bo.y*r+r)+"px)",t.parentNode!==this.domElement&&this.domElement.appendChild(t)}const c={distanceToCameraSquared:a(t,e)};i.objects.set(e,c)}))};function a(e,t){return No.setFromMatrixPosition(e.matrixWorld),zo.setFromMatrixPosition(t.matrixWorld),No.distanceToSquared(zo)}}}const Vo=new t,Ho=new i,Wo=new t;class Ko extends o{constructor(e=document.createElement("div")){super(),this.isCSS3DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof Ko&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}class qo extends Ko{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,t){return super.copy(e,t),this.rotation2D=e.rotation2D,this}}const Yo=new y,Qo=new y;class Xo{constructor(e){let t,n,s,r;this.viewport=e,this.domElement=document.createElement("div");const i={camera:{style:""},objects:new WeakMap};this.domElement.style.overflow="hidden";const o=document.createElement("div");o.style.transformOrigin="0 0",this.domElement.appendChild(o);const a=document.createElement("div");function l(e){return Math.abs(e)<1e-10?0:e}function c(e){const t=e.elements;return"matrix3d("+l(t[0])+","+l(-t[1])+","+l(t[2])+","+l(t[3])+","+l(t[4])+","+l(-t[5])+","+l(t[6])+","+l(t[7])+","+l(t[8])+","+l(-t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(-t[13])+","+l(t[14])+","+l(t[15])+")"}function h(e){const t=e.elements;return"translate(-50%,-50%)"+("matrix3d("+l(t[0])+","+l(t[1])+","+l(t[2])+","+l(t[3])+","+l(-t[4])+","+l(-t[5])+","+l(-t[6])+","+l(-t[7])+","+l(t[8])+","+l(t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(t[13])+","+l(t[14])+","+l(t[15])+")")}a.style.transformStyle="preserve-3d",o.appendChild(a),this.getSize=()=>({width:t,height:n}),this.render=(e,h)=>{const d=h.projectionMatrix.elements[5]*r;h.view&&h.view.enabled?(o.style.transform=`translate( ${-h.view.offsetX*(t/h.view.width)}px, ${-h.view.offsetY*(n/h.view.height)}px )`,o.style.transform+=`scale( ${h.view.fullWidth/h.view.width}, ${h.view.fullHeight/h.view.height} )`):o.style.transform="",null===h.parent&&!0===h.matrixWorldAutoUpdate&&h.updateMatrixWorld();let p=0,m=0;h instanceof Q&&(p=-(h.right+h.left)/2,m=(h.top+h.bottom)/2);const f=h.view&&h.view.enabled?h.view.height/h.view.fullHeight:1,g=h instanceof Q?`scale( ${f} )scale(`+d+")translate("+l(p)+"px,"+l(m)+"px)"+c(h.matrixWorldInverse):`scale( ${f} )translateZ(`+d+"px)"+c(h.matrixWorldInverse),y=(h instanceof X?"perspective("+d+"px) ":"")+g+"translate("+s+"px,"+r+"px)";i.camera.style!==y&&(a.style.transform=y,i.camera.style=y);const v=[...e].filter((e=>Ka(e.elementType)||qa(e.elementType))).map((e=>e.children[0]));u(v,h)},this.setSize=(e,i)=>{t=e,n=i,s=t/2,r=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=i+"px",o.style.width=e+"px",o.style.height=i+"px",a.style.width=e+"px",a.style.height=i+"px"};const u=(e,t)=>{e.forEach((e=>{var n;if(e instanceof Ko){Fr(e,this.viewport);const s=e.parent,r=hr(e)&&!0===e.layers.test(t.layers);if(e.userData.prevVisible!==r&&(null===(n=s.onChange)||void 0===n||n.call(s,r),s.elementAutoDisplay&&(e.element.style.display=!0===r?"":"none")),e.userData.prevVisible=r,!0===r||!1===s.elementAutoDisplay){let n;e instanceof qo?(Yo.copy(t.matrixWorldInverse),Yo.transpose(),0!==e.rotation2D&&Yo.multiply(Qo.makeRotationZ(e.rotation2D)),e.matrixWorld.decompose(Vo,Ho,Wo),Yo.setPosition(Vo),Yo.scale(Wo),Yo.elements[3]=0,Yo.elements[7]=0,Yo.elements[11]=0,Yo.elements[15]=1,n=h(Yo)):n=h(e.matrixWorld);const s=e.element,r=i.objects.get(e);if(void 0===r||r.style!==n){s.style.transform=n;const t={style:n};i.objects.set(e,t)}s.parentNode!==a&&a.appendChild(s)}}}))}}}class Zo{itemsMap=new Map;instancesCacheMap=new Map;constructor(e){this.objects=e}init(){this.itemsMap.clear()}push(e,t,n,s,r,i){const o=t.uuid+":"+n.uuid,{itemsMap:a}=this;let l=a.get(o);l||(l=[],a.set(o,l)),l.push({object:e,geometry:t,material:n,groupOrder:s,z:r,group:i})}build(e){this.itemsMap.forEach(((t,n)=>{if(t.length>1){let s=null;const r=this.instancesCacheMap.get(n);r&&r.count===t.length?s=r:(s=new Z(t[0].geometry,t[0].material,t.length),s.instanceMatrix.setUsage(J),s.name="auto-instanced",null==r||r.dispose(),this.instancesCacheMap.set(n,s)),t.forEach(((e,t)=>s.setMatrixAt(t,e.object.matrixWorld))),s.instanceMatrix.needsUpdate=!0,this.objects.update(s),e.push(s,s.geometry,s.material,t[0].groupOrder,t[0].z,t[0].group)}else e.push(t[0].object,t[0].geometry,t[0].material,t[0].groupOrder,t[0].z,t[0].group)}))}dispose(){this.itemsMap.clear(),this.instancesCacheMap.forEach((e=>e.dispose())),this.instancesCacheMap.clear()}}class Jo{constructor(e={}){const{canvas:n=Pn(),context:s=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:l=!1,premultipliedAlpha:h=!0,preserveDrawingBuffer:d=!1,powerPreference:p="default",failIfMajorPerformanceCaveat:m=!1,reverseDepthBuffer:f=!1}=e;let g;if(this.isWebGLRenderer=!0,null!==s){if("undefined"!=typeof WebGLRenderingContext&&s instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=s.getContextAttributes().alpha}else g=a;const v=new Uint32Array(4),w=new Int32Array(4);let b=null,x=null;const T=[],S=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=$,this.toneMapping=ee,this.toneMappingExposure=1,this.autoInstancing=!1;const O=this;let M=!1,E=0,C=0,D=null,P=-1,I=null;const A=new te,L=new te;let j=null;const _=new u(0);let F=0,R=n.width,B=n.height,U=1,k=null,N=null;const z=new te(0,0,R,B),G=new te(0,0,R,B);let V=!1;const H=new ne;let W=!1,K=!1;this.transmissionResolutionScale=1;const q=new y,Y=new y,Q=new t,X=new te,Z={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let J=!1;function ue(){return null===D?U:1}let xe,Te,Se,Oe,Me,Ee,Ce,De,Pe,Ie,Ae,Le,je,_e,Fe,Re,Be,Ue,ke,Ne,ze,Ge,Ve,He,We,Ke=s;function qe(e,t){return n.getContext(e,t)}try{const e={alpha:!0,depth:r,stencil:i,antialias:l,premultipliedAlpha:h,preserveDrawingBuffer:d,powerPreference:p,failIfMajorPerformanceCaveat:m};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${se}`),n.addEventListener("webglcontextlost",Xe,!1),n.addEventListener("webglcontextrestored",Ze,!1),n.addEventListener("webglcontextcreationerror",Je,!1),null===Ke){const t="webgl2";if(Ke=qe(t,e),null===Ke)throw qe(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function Ye(){xe=new un(Ke),xe.init(),Ge=new Mn(Ke,xe),Te=new an(Ke,xe,e,Ge),Se=new Tn(Ke,xe),Te.reverseDepthBuffer&&f&&Se.buffers.depth.setReversed(!0),Oe=new mn(Ke),Me=new vn,Ee=new Sn(Ke,xe,Se,Me,Te,Ge,Oe),Ce=new cn(O),De=new hn(O),Pe=new nn(Ke),Ve=new rn(Ke,Pe),Ie=new dn(Ke,Pe,Oe,Ve),Ae=new gn(Ke,Ie,Pe,Oe),ke=new fn(Ke,Te,Ee),Re=new ln(Me),Le=new yn(O,Ce,De,xe,Te,Ve,Re),je=new Cn(O,Me),_e=new wn,Fe=new bn(xe),Ue=new sn(O,Ce,De,Se,Ae,g,h),Be=new xn(O,Ae,Te),He=new Dn(Ke,Oe,Te,Se),Ne=new on(Ke,xe,Oe),ze=new pn(Ke,xe,Oe),We=new Zo(Ae),Oe.programs=Le.programs,O.capabilities=Te,O.extensions=xe,O.properties=Me,O.renderLists=_e,O.shadowMap=Be,O.state=Se,O.info=Oe}Ye();const Qe=new En(O,Ke);function Xe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function Ze(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;const e=Oe.autoReset,t=Be.enabled,n=Be.autoUpdate,s=Be.needsUpdate,r=Be.type;Ye(),Oe.autoReset=e,Be.enabled=t,Be.autoUpdate=n,Be.needsUpdate=s,Be.type=r}function Je(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function $e(e){const t=e.target;t.removeEventListener("dispose",$e),function(e){(function(e){const t=Me.get(e).programs;void 0!==t&&(t.forEach((function(e){Le.releaseProgram(e)})),e.isShaderMaterial&&Le.releaseShaderCache(e))})(e),Me.remove(e)}(t)}function et(e,t,n){!0===e.transparent&&e.side===le&&!1===e.forceSinglePass?(e.side=ce,e.needsUpdate=!0,ht(e,t,n),e.side=he,e.needsUpdate=!0,ht(e,t,n),e.side=le):ht(e,t,n)}this.xr=Qe,this.getContext=function(){return Ke},this.getContextAttributes=function(){return Ke.getContextAttributes()},this.forceContextLoss=function(){const e=xe.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=xe.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return U},this.setPixelRatio=function(e){void 0!==e&&(U=e,this.setSize(R,B,!1))},this.getSize=function(e){return e.set(R,B)},this.setSize=function(e,t,s=!0){Qe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=e,B=t,n.width=Math.floor(e*U),n.height=Math.floor(t*U),!0===s&&(n.style.width=e+"px",n.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return e.set(R*U,B*U).floor()},this.setDrawingBufferSize=function(e,t,s){R=e,B=t,U=s,n.width=Math.floor(e*s),n.height=Math.floor(t*s),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return e.copy(A)},this.getViewport=function(e){return e.copy(z)},this.setViewport=function(e,t,n,s){e.isVector4?z.set(e.x,e.y,e.z,e.w):z.set(e,t,n,s),Se.viewport(A.copy(z).multiplyScalar(U).round())},this.getScissor=function(e){return e.copy(G)},this.setScissor=function(e,t,n,s){e.isVector4?G.set(e.x,e.y,e.z,e.w):G.set(e,t,n,s),Se.scissor(L.copy(G).multiplyScalar(U).round())},this.getScissorTest=function(){return V},this.setScissorTest=function(e){Se.setScissorTest(V=e)},this.setOpaqueSort=function(e){k=e},this.setTransparentSort=function(e){N=e},this.getClearColor=function(e){return e.copy(Ue.getClearColor())},this.setClearColor=function(){Ue.setClearColor.apply(Ue,arguments)},this.getClearAlpha=function(){return Ue.getClearAlpha()},this.setClearAlpha=function(){Ue.setClearAlpha.apply(Ue,arguments)},this.clear=function(e=!0,t=!0,n=!0){let s=0;if(e){let e=!1;if(null!==D){const t=D.texture.format;e=t===pe||t===me||t===fe}if(e){const e=D.texture.type,t=e===ie||e===ge||e===ye||e===ve||e===we||e===be,n=Ue.getClearColor(),s=Ue.getClearAlpha(),r=n.r,i=n.g,o=n.b;t?(v[0]=r,v[1]=i,v[2]=o,v[3]=s,Ke.clearBufferuiv(Ke.COLOR,0,v)):(w[0]=r,w[1]=i,w[2]=o,w[3]=s,Ke.clearBufferiv(Ke.COLOR,0,w))}else s|=Ke.COLOR_BUFFER_BIT}t&&(s|=Ke.DEPTH_BUFFER_BIT),n&&(s|=Ke.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Ke.clear(s)},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(){n.removeEventListener("webglcontextlost",Xe,!1),n.removeEventListener("webglcontextrestored",Ze,!1),n.removeEventListener("webglcontextcreationerror",Je,!1),Ue.dispose(),_e.dispose(),Fe.dispose(),Me.dispose(),Ce.dispose(),De.dispose(),Ae.dispose(),Ve.dispose(),He.dispose(),Le.dispose(),We.dispose(),Qe.dispose(),Qe.removeEventListener("sessionstart",nt),Qe.removeEventListener("sessionend",st),rt.stop()},this.renderBufferDirect=function(e,t,n,s,r,i){null===t&&(t=Z);const o=r.isMesh&&r.matrixWorld.determinant()<0,a=function(e,t,n,s,r){!0!==t.isScene&&(t=Z);Ee.resetTextureUnits();const i=t.fog,o=s.isMeshStandardMaterial?t.environment:null,a=null===D?O.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:de,l=(s.isMeshStandardMaterial?De:Ce).get(s.envMap||o),c=!0===s.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,h=!!n.attributes.tangent&&(!!s.normalMap||s.anisotropy>0),u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,p=!!n.morphAttributes.color;let m=ee;s.toneMapped&&(null!==D&&!0!==D.isXRRenderTarget||(m=O.toneMapping));const f=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,g=void 0!==f?f.length:0,y=Me.get(s),v=x.state.lights;if(!0===W&&(!0===K||e!==I)){const t=e===I&&s.id===P;Re.setState(s,e,t)}let w=!1;s.version===y.__version?y.needsLights&&y.lightsStateVersion!==v.state.version||y.outputColorSpace!==a||r.isBatchedMesh&&!1===y.batching?w=!0:r.isBatchedMesh||!0!==y.batching?r.isBatchedMesh&&!0===y.batchingColor&&null===r.colorTexture||r.isBatchedMesh&&!1===y.batchingColor&&null!==r.colorTexture||r.isInstancedMesh&&!1===y.instancing?w=!0:r.isInstancedMesh||!0!==y.instancing?r.isSkinnedMesh&&!1===y.skinning?w=!0:r.isSkinnedMesh||!0!==y.skinning?r.isInstancedMesh&&!0===y.instancingColor&&null===r.instanceColor||r.isInstancedMesh&&!1===y.instancingColor&&null!==r.instanceColor||r.isInstancedMesh&&!0===y.instancingMorph&&null===r.morphTexture||r.isInstancedMesh&&!1===y.instancingMorph&&null!==r.morphTexture||y.envMap!==l||!0===s.fog&&y.fog!==i?w=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===Re.numPlanes&&y.numIntersection===Re.numIntersection?(y.vertexAlphas!==c||y.vertexTangents!==h||y.morphTargets!==u||y.morphNormals!==d||y.morphColors!==p||y.toneMapping!==m||y.morphTargetsCount!==g)&&(w=!0):w=!0:w=!0:w=!0:w=!0:(w=!0,y.__version=s.version);let b=y.currentProgram;!0===w&&(b=ht(s,t,r));let T=!1,S=!1,M=!1;const E=b.getUniforms(),C=y.uniforms;Se.useProgram(b.program)&&(T=!0,S=!0,M=!0);s.id!==P&&(P=s.id,S=!0);if(T||I!==e){Se.buffers.depth.getReversed()?(q.copy(e.projectionMatrix),In(q),An(q),E.setValue(Ke,"projectionMatrix",q)):E.setValue(Ke,"projectionMatrix",e.projectionMatrix),E.setValue(Ke,"viewMatrix",e.matrixWorldInverse);const t=E.map.cameraPosition;void 0!==t&&t.setValue(Ke,Q.setFromMatrixPosition(e.matrixWorld)),Te.logarithmicDepthBuffer&&E.setValue(Ke,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(s.isMeshPhongMaterial||s.isMeshToonMaterial||s.isMeshLambertMaterial||s.isMeshBasicMaterial||s.isMeshStandardMaterial||s.isShaderMaterial)&&E.setValue(Ke,"isOrthographic",!0===e.isOrthographicCamera),I!==e&&(I=e,S=!0,M=!0)}if(r.isSkinnedMesh){E.setOptional(Ke,r,"bindMatrix"),E.setOptional(Ke,r,"bindMatrixInverse");const e=r.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),E.setValue(Ke,"boneTexture",e.boneTexture,Ee))}r.isBatchedMesh&&(E.setOptional(Ke,r,"batchingTexture"),E.setValue(Ke,"batchingTexture",r._matricesTexture,Ee),E.setOptional(Ke,r,"batchingIdTexture"),E.setValue(Ke,"batchingIdTexture",r._indirectTexture,Ee),E.setOptional(Ke,r,"batchingColorTexture"),null!==r._colorsTexture&&E.setValue(Ke,"batchingColorTexture",r._colorsTexture,Ee));const A=n.morphAttributes;void 0===A.position&&void 0===A.normal&&void 0===A.color||ke.update(r,n,b);(S||y.receiveShadow!==r.receiveShadow)&&(y.receiveShadow=r.receiveShadow,E.setValue(Ke,"receiveShadow",r.receiveShadow));s.isMeshGouraudMaterial&&null!==s.envMap&&(C.envMap.value=l,C.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);s.isMeshStandardMaterial&&null===s.envMap&&null!==t.environment&&(C.envMapIntensity.value=t.environmentIntensity);S&&(E.setValue(Ke,"toneMappingExposure",O.toneMappingExposure),y.needsLights&&(j=M,(L=C).ambientLightColor.needsUpdate=j,L.lightProbe.needsUpdate=j,L.directionalLights.needsUpdate=j,L.directionalLightShadows.needsUpdate=j,L.pointLights.needsUpdate=j,L.pointLightShadows.needsUpdate=j,L.spotLights.needsUpdate=j,L.spotLightShadows.needsUpdate=j,L.rectAreaLights.needsUpdate=j,L.hemisphereLights.needsUpdate=j),i&&!0===s.fog&&je.refreshFogUniforms(C,i),je.refreshMaterialUniforms(C,s,U,B,x.state.transmissionRenderTarget[e.id]),On.upload(Ke,ut(y),C,Ee));var L,j;s.isShaderMaterial&&!0===s.uniformsNeedUpdate&&(On.upload(Ke,ut(y),C,Ee),s.uniformsNeedUpdate=!1);s.isSpriteMaterial&&E.setValue(Ke,"center",r.center);if(E.setValue(Ke,"modelViewMatrix",r.modelViewMatrix),E.setValue(Ke,"normalMatrix",r.normalMatrix),E.setValue(Ke,"modelMatrix",r.matrixWorld),s.isShaderMaterial||s.isRawShaderMaterial){const e=s.uniformsGroups;for(let t=0,n=e.length;t<n;t++){const n=e[t];He.update(n,b),He.bind(n,b)}}return b}(e,t,n,s,r);Se.setMaterial(s,o);let l=n.index,c=1;if(!0===s.wireframe){if(l=Ie.getWireframeAttribute(n),void 0===l)return;c=2}const h=n.drawRange,u=n.attributes.position;let d=h.start*c,p=(h.start+h.count)*c;null!==i&&(d=Math.max(d,i.start*c),p=Math.min(p,(i.start+i.count)*c)),null!==l?(d=Math.max(d,0),p=Math.min(p,l.count)):null!=u&&(d=Math.max(d,0),p=Math.min(p,u.count));const m=p-d;if(m<0||m===1/0)return;let f;Ve.setup(r,s,a,n,l);let g=Ne;if(null!==l&&(f=Pe.get(l),g=ze,g.setIndex(f)),r.isMesh)!0===s.wireframe?(Se.setLineWidth(s.wireframeLinewidth*ue()),g.setMode(Ke.LINES)):g.setMode(Ke.TRIANGLES);else if(r.isLine){let e=s.linewidth;void 0===e&&(e=1),Se.setLineWidth(e*ue()),r.isLineSegments?g.setMode(Ke.LINES):r.isLineLoop?g.setMode(Ke.LINE_LOOP):g.setMode(Ke.LINE_STRIP)}else r.isPoints?g.setMode(Ke.POINTS):r.isSprite&&g.setMode(Ke.TRIANGLES);if(r.isBatchedMesh)if(null!==r._multiDrawInstances)g.renderMultiDrawInstances(r._multiDrawStarts,r._multiDrawCounts,r._multiDrawCount,r._multiDrawInstances);else if(xe.get("WEBGL_multi_draw"))g.renderMultiDraw(r._multiDrawStarts,r._multiDrawCounts,r._multiDrawCount);else{const e=r._multiDrawStarts,t=r._multiDrawCounts,n=r._multiDrawCount,i=l?Pe.get(l).bytesPerElement:1,o=Me.get(s).currentProgram.getUniforms();for(let s=0;s<n;s++)o.setValue(Ke,"_gl_DrawID",s),g.render(e[s]/i,t[s])}else if(r.isInstancedMesh)g.renderInstances(d,m,r.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);g.renderInstances(d,m,t)}else g.render(d,m)},this.compile=function(e,t,n=null){null===n&&(n=e),x=Fe.get(n),x.init(t),S.push(x),n.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(x.pushLight(e),e.castShadow&&x.pushShadow(e))})),e!==n&&e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(x.pushLight(e),e.castShadow&&x.pushShadow(e))})),x.setupLights();const s=new Set;return e.traverse((function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;const t=e.material;if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++){const i=t[r];et(i,n,e),s.add(i)}else et(t,n,e),s.add(t)})),S.pop(),x=null,s},this.compileAsync=function(e,t,n=null){const s=this.compile(e,t,n);return new Promise((t=>{function n(){s.forEach((function(e){Me.get(e).currentProgram.isReady()&&s.delete(e)})),0!==s.size?setTimeout(n,10):t(e)}null!==xe.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let tt=null;function nt(){rt.stop()}function st(){rt.start()}const rt=new tn;function it(e,t,n,s,r=!0){if(!1===e.visible)return;if(e.layers.test(t.layers))if(r&&(Object.is(e.updateMatrixWorld,o.prototype.updateMatrixWorld)?(e.matrixAutoUpdate&&e.updateMatrix(),e.matrixWorldAutoUpdate&&(null===e.parent?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(e.parent.matrixWorld,e.matrix))):(r=!1,e.updateMatrixWorld(!0))),e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)x.pushLight(e),e.castShadow&&x.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||H.intersectsSprite(e)){s&&X.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Y);const t=Ae.update(e),r=e.material;r.visible&&b.push(e,t,r,n,X.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||H.intersectsObject(e))){const t=Ae.update(e),r=e.material;if(s&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),X.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),X.copy(t.boundingSphere.center)),X.applyMatrix4(e.matrixWorld).applyMatrix4(Y)),Array.isArray(r)){const s=t.groups;for(let i=0,o=s.length;i<o;i++){const o=s[i],a=r[o.materialIndex];a&&a.visible&&b.push(e,t,a,n,X.z,o)}}else r.visible&&(!0!==O.autoInstancing||"Mesh"!==e.type||e.isInstancedMesh?b.push(e,t,r,n,X.z,null):We.push(e,t,r,n,X.z,null))}const i=e.children;for(let e=0,o=i.length;e<o;e++)it(i[e],t,n,s,r)}function ot(e,t,n,s){const r=e.opaque,i=e.transmissive,o=e.transparent;x.setupLightsView(n),!0===W&&Re.setGlobalState(O.clippingPlanes,n),s&&Se.viewport(A.copy(s)),r.length>0&<(r,t,n),i.length>0&<(i,t,n),o.length>0&<(o,t,n),Se.buffers.depth.setTest(!0),Se.buffers.depth.setMask(!0),Se.buffers.color.setMask(!0),Se.setPolygonOffset(!1)}function at(e,t,n,s){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;void 0===x.state.transmissionRenderTarget[s.id]&&(x.state.transmissionRenderTarget[s.id]=new re(1,1,{generateMipmaps:!0,type:xe.has("EXT_color_buffer_half_float")||xe.has("EXT_color_buffer_float")?c:ie,minFilter:oe,samples:4,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ae.workingColorSpace}));const r=x.state.transmissionRenderTarget[s.id],o=s.viewport||A;r.setSize(o.z*O.transmissionResolutionScale,o.w*O.transmissionResolutionScale);const a=O.getRenderTarget();O.setRenderTarget(r),O.getClearColor(_),F=O.getClearAlpha(),F<1&&O.setClearColor(16777215,.5),O.clear(),J&&Ue.render(n);const l=O.toneMapping;O.toneMapping=ee;const h=s.viewport;if(void 0!==s.viewport&&(s.viewport=void 0),x.setupLightsView(s),!0===W&&Re.setGlobalState(O.clippingPlanes,s),lt(e,n,s),Ee.updateMultisampleRenderTarget(r),Ee.updateRenderTargetMipmap(r),!1===xe.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let r=0,i=t.length;r<i;r++){const i=t[r],o=i.object,a=i.geometry,l=i.material,c=i.group;if(l.side===le&&o.layers.test(s.layers)){const t=l.side;l.side=ce,l.needsUpdate=!0,ct(o,n,s,a,l,c),l.side=t,l.needsUpdate=!0,e=!0}}!0===e&&(Ee.updateMultisampleRenderTarget(r),Ee.updateRenderTargetMipmap(r))}O.setRenderTarget(a),O.setClearColor(_,F),void 0!==h&&(s.viewport=h),O.toneMapping=l}function lt(e,t,n){const s=!0===t.isScene?t.overrideMaterial:null;for(let r=0,i=e.length;r<i;r++){const i=e[r],o=i.object,a=i.geometry,l=null===s?i.material:s,c=i.group;o.layers.test(n.layers)&&ct(o,t,n,a,l,c)}}function ct(e,t,n,s,r,i){e.onBeforeRender(O,t,n,s,r,i),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(O,t,n,s,e,i),!0===r.transparent&&r.side===le&&!1===r.forceSinglePass?(r.side=ce,r.needsUpdate=!0,O.renderBufferDirect(n,t,s,r,e,i),r.side=he,r.needsUpdate=!0,O.renderBufferDirect(n,t,s,r,e,i),r.side=le):O.renderBufferDirect(n,t,s,r,e,i),e.onAfterRender(O,t,n,s,r,i)}function ht(e,t,n){!0!==t.isScene&&(t=Z);const s=Me.get(e),r=x.state.lights,i=x.state.shadowsArray,o=r.state.version,a=Le.getParameters(e,r.state,i,t,n),l=Le.getProgramCacheKey(a);let c=s.programs;s.environment=e.isMeshStandardMaterial?t.environment:null,s.fog=t.fog,s.envMap=(e.isMeshStandardMaterial?De:Ce).get(e.envMap||s.environment),s.envMapRotation=null!==s.environment&&null===e.envMap?t.environmentRotation:e.envMapRotation,void 0===c&&(e.addEventListener("dispose",$e),c=new Map,s.programs=c);let h=c.get(l);if(void 0!==h){if(s.currentProgram===h&&s.lightsStateVersion===o)return dt(e,a),h}else a.uniforms=Le.getUniforms(e),e.onBeforeCompile(a,O),h=Le.acquireProgram(a,l),c.set(l,h),s.uniforms=a.uniforms;const u=s.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=Re.uniform),dt(e,a),s.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),s.lightsStateVersion=o,s.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotLightMatrix.value=r.state.spotLightMatrix,u.spotLightMap.value=r.state.spotLightMap,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix),s.currentProgram=h,s.uniformsList=null,h}function ut(e){if(null===e.uniformsList){const t=e.currentProgram.getUniforms();e.uniformsList=On.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function dt(e,t){const n=Me.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.batchingColor=t.batchingColor,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.instancingMorph=t.instancingMorph,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}rt.setAnimationLoop((function(e){tt&&tt(e)})),"undefined"!=typeof self&&rt.setContext(self),this.setAnimationLoop=function(e){tt=e,Qe.setAnimationLoop(e),null===e?rt.stop():rt.start()},Qe.addEventListener("sessionstart",nt),Qe.addEventListener("sessionend",st),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;null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===Qe.enabled&&!0===Qe.isPresenting&&(!0===Qe.cameraAutoUpdate&&Qe.updateCamera(t),t=Qe.getCamera()),!0===e.isScene&&e.onBeforeRender(O,e,t,D),x=Fe.get(e,S.length),x.init(t),S.push(x),Y.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),H.setFromProjectionMatrix(Y),K=this.localClippingEnabled,W=Re.init(this.clippingPlanes,K),b=_e.get(e,T.length),b.init(),T.push(b),O.autoInstancing&&We.init(),it(e,t,0,O.sortObjects,!0),O.autoInstancing&&We.build(b),b.finish(),!0===O.sortObjects&&b.sort(k,N),J=!1===Qe.enabled||!1===Qe.isPresenting||!1===Qe.hasDepthSensing(),J&&Ue.addToRenderList(b,e),this.info.render.frame++,!0===W&&Re.beginShadows();const n=x.state.shadowsArray;Be.render(n,e,t),!0===W&&Re.endShadows(),!0===this.info.autoReset&&this.info.reset();const s=b.opaque,r=b.transmissive;if(x.setupLights(),t.isArrayCamera){const n=t.cameras;if(r.length>0)for(let t=0,i=n.length;t<i;t++){at(s,r,e,n[t])}J&&Ue.render(e);for(let t=0,s=n.length;t<s;t++){const s=n[t];ot(b,e,s,s.viewport)}}else r.length>0&&at(s,r,e,t),J&&Ue.render(e),ot(b,e,t);null!==D&&0===C&&(Ee.updateMultisampleRenderTarget(D),Ee.updateRenderTargetMipmap(D)),!0===e.isScene&&e.onAfterRender(O,e,t),Ve.resetDefaultState(),P=-1,I=null,S.pop(),S.length>0?(x=S[S.length-1],!0===W&&Re.setGlobalState(O.clippingPlanes,x.state.camera)):x=null,T.pop(),b=T.length>0?T[T.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return D},this.setRenderTargetTextures=function(e,t,n){Me.get(e.texture).__webglTexture=t,Me.get(e.depthTexture).__webglTexture=n;const s=Me.get(e);s.__hasExternalTextures=!0,s.__autoAllocateDepthBuffer=void 0===n,s.__autoAllocateDepthBuffer||!0===xe.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),s.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(e,t){const n=Me.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t};const pt=Ke.createFramebuffer();this.setRenderTarget=function(e,t=0,n=0){D=e,E=t,C=n;let s=!0,r=null,i=!1,o=!1;if(e){const a=Me.get(e);if(void 0!==a.__useDefaultFramebuffer)Se.bindFramebuffer(Ke.FRAMEBUFFER,null),s=!1;else if(void 0===a.__webglFramebuffer)Ee.setupRenderTarget(e);else if(a.__hasExternalTextures)Ee.rebindTextures(e,Me.get(e.texture).__webglTexture,Me.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){const t=e.depthTexture;if(a.__boundDepthTexture!==t){if(null!==t&&Me.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");Ee.setupDepthRenderbuffer(e)}}const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(o=!0);const c=Me.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=Array.isArray(c[t])?c[t][n]:c[t],i=!0):r=e.samples>0&&!1===Ee.useMultisampledRTT(e)?Me.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,A.copy(e.viewport),L.copy(e.scissor),j=e.scissorTest}else A.copy(z).multiplyScalar(U).floor(),L.copy(G).multiplyScalar(U).floor(),j=V;0!==n&&(r=pt);if(Se.bindFramebuffer(Ke.FRAMEBUFFER,r)&&s&&Se.drawBuffers(e,r),Se.viewport(A),Se.scissor(L),Se.setScissorTest(j),i){const s=Me.get(e.texture);Ke.framebufferTexture2D(Ke.FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_CUBE_MAP_POSITIVE_X+t,s.__webglTexture,n)}else if(o){const s=Me.get(e.texture),r=t;Ke.framebufferTextureLayer(Ke.FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,s.__webglTexture,n,r)}else if(null!==e&&0!==n){const t=Me.get(e.texture);Ke.framebufferTexture2D(Ke.FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_2D,t.__webglTexture,n)}P=-1},this.readRenderTargetPixels=function(e,t,n,s,r,i,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=Me.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(a=a[o]),a){Se.bindFramebuffer(Ke.FRAMEBUFFER,a);try{const o=e.texture,a=o.format,l=o.type;if(!Te.textureFormatReadable(a))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!Te.textureTypeReadable(l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-s&&n>=0&&n<=e.height-r&&Ke.readPixels(t,n,s,r,Ge.convert(a),Ge.convert(l),i)}finally{const e=null!==D?Me.get(D).__webglFramebuffer:null;Se.bindFramebuffer(Ke.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,s,r,i,o){if(!e||!e.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=Me.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(a=a[o]),a){const o=e.texture,l=o.format,c=o.type;if(!Te.textureFormatReadable(l))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Te.textureTypeReadable(c))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(t>=0&&t<=e.width-s&&n>=0&&n<=e.height-r){Se.bindFramebuffer(Ke.FRAMEBUFFER,a);const e=Ke.createBuffer();Ke.bindBuffer(Ke.PIXEL_PACK_BUFFER,e),Ke.bufferData(Ke.PIXEL_PACK_BUFFER,i.byteLength,Ke.STREAM_READ),Ke.readPixels(t,n,s,r,Ge.convert(l),Ge.convert(c),0);const o=null!==D?Me.get(D).__webglFramebuffer:null;Se.bindFramebuffer(Ke.FRAMEBUFFER,o);const h=Ke.fenceSync(Ke.SYNC_GPU_COMMANDS_COMPLETE,0);return Ke.flush(),await Ln(Ke,h,4),Ke.bindBuffer(Ke.PIXEL_PACK_BUFFER,e),Ke.getBufferSubData(Ke.PIXEL_PACK_BUFFER,0,i),Ke.deleteBuffer(e),Ke.deleteSync(h),i}throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(e,t=null,n=0){!0!==e.isTexture&&(jn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),t=arguments[0]||null,e=arguments[1]);const s=Math.pow(2,-n),r=Math.floor(e.image.width*s),i=Math.floor(e.image.height*s),o=null!==t?t.x:0,a=null!==t?t.y:0;Ee.setTexture2D(e,0),Ke.copyTexSubImage2D(Ke.TEXTURE_2D,n,0,0,o,a,r,i),Se.unbindTexture()};const mt=Ke.createFramebuffer(),ft=Ke.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,s=null,r=0,i=null){let o,a,l,c,h,u,d,p,m;!0!==e.isTexture&&(jn("WebGLRenderer: copyTextureToTexture function signature has changed."),s=arguments[0]||null,e=arguments[1],t=arguments[2],i=arguments[3]||0,n=null),null===i&&(0!==r?(jn("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),i=r,r=0):i=0);const f=e.isCompressedTexture?e.mipmaps[i]:e.image;if(null!==n)o=n.max.x-n.min.x,a=n.max.y-n.min.y,l=n.isBox3?n.max.z-n.min.z:1,c=n.min.x,h=n.min.y,u=n.isBox3?n.min.z:0;else{const t=Math.pow(2,-r);o=Math.floor(f.width*t),a=Math.floor(f.height*t),l=e.isDataArrayTexture?f.depth:e.isData3DTexture?Math.floor(f.depth*t):1,c=0,h=0,u=0}null!==s?(d=s.x,p=s.y,m=s.z):(d=0,p=0,m=0);const g=Ge.convert(t.format),y=Ge.convert(t.type);let v;t.isData3DTexture?(Ee.setTexture3D(t,0),v=Ke.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(Ee.setTexture2DArray(t,0),v=Ke.TEXTURE_2D_ARRAY):(Ee.setTexture2D(t,0),v=Ke.TEXTURE_2D),Ke.pixelStorei(Ke.UNPACK_FLIP_Y_WEBGL,t.flipY),Ke.pixelStorei(Ke.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),Ke.pixelStorei(Ke.UNPACK_ALIGNMENT,t.unpackAlignment);const w=Ke.getParameter(Ke.UNPACK_ROW_LENGTH),b=Ke.getParameter(Ke.UNPACK_IMAGE_HEIGHT),x=Ke.getParameter(Ke.UNPACK_SKIP_PIXELS),T=Ke.getParameter(Ke.UNPACK_SKIP_ROWS),S=Ke.getParameter(Ke.UNPACK_SKIP_IMAGES);Ke.pixelStorei(Ke.UNPACK_ROW_LENGTH,f.width),Ke.pixelStorei(Ke.UNPACK_IMAGE_HEIGHT,f.height),Ke.pixelStorei(Ke.UNPACK_SKIP_PIXELS,c),Ke.pixelStorei(Ke.UNPACK_SKIP_ROWS,h),Ke.pixelStorei(Ke.UNPACK_SKIP_IMAGES,u);const O=e.isDataArrayTexture||e.isData3DTexture,M=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){const n=Me.get(e),s=Me.get(t),f=Me.get(n.__renderTarget),g=Me.get(s.__renderTarget);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,f.__webglFramebuffer),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n<l;n++)O&&(Ke.framebufferTextureLayer(Ke.READ_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Me.get(e).__webglTexture,r,u+n),Ke.framebufferTextureLayer(Ke.DRAW_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Me.get(t).__webglTexture,i,m+n)),Ke.blitFramebuffer(c,h,o,a,d,p,o,a,Ke.DEPTH_BUFFER_BIT,Ke.NEAREST);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,null),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,null)}else if(0!==r||e.isRenderTargetTexture||Me.has(e)){const n=Me.get(e),s=Me.get(t);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,mt),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,ft);for(let e=0;e<l;e++)O?Ke.framebufferTextureLayer(Ke.READ_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,n.__webglTexture,r,u+e):Ke.framebufferTexture2D(Ke.READ_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_2D,n.__webglTexture,r),M?Ke.framebufferTextureLayer(Ke.DRAW_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,s.__webglTexture,i,m+e):Ke.framebufferTexture2D(Ke.DRAW_FRAMEBUFFER,Ke.COLOR_ATTACHMENT0,Ke.TEXTURE_2D,s.__webglTexture,i),0!==r?Ke.blitFramebuffer(c,h,o,a,d,p,o,a,Ke.COLOR_BUFFER_BIT,Ke.NEAREST):M?Ke.copyTexSubImage3D(v,i,d,p,m+e,c,h,o,a):Ke.copyTexSubImage2D(v,i,d,p,c,h,o,a);Se.bindFramebuffer(Ke.READ_FRAMEBUFFER,null),Se.bindFramebuffer(Ke.DRAW_FRAMEBUFFER,null)}else M?e.isDataTexture||e.isData3DTexture?Ke.texSubImage3D(v,i,d,p,m,o,a,l,g,y,f.data):t.isCompressedArrayTexture?Ke.compressedTexSubImage3D(v,i,d,p,m,o,a,l,g,f.data):Ke.texSubImage3D(v,i,d,p,m,o,a,l,g,y,f):e.isDataTexture?Ke.texSubImage2D(Ke.TEXTURE_2D,i,d,p,o,a,g,y,f.data):e.isCompressedTexture?Ke.compressedTexSubImage2D(Ke.TEXTURE_2D,i,d,p,f.width,f.height,g,f.data):Ke.texSubImage2D(Ke.TEXTURE_2D,i,d,p,o,a,g,y,f);Ke.pixelStorei(Ke.UNPACK_ROW_LENGTH,w),Ke.pixelStorei(Ke.UNPACK_IMAGE_HEIGHT,b),Ke.pixelStorei(Ke.UNPACK_SKIP_PIXELS,x),Ke.pixelStorei(Ke.UNPACK_SKIP_ROWS,T),Ke.pixelStorei(Ke.UNPACK_SKIP_IMAGES,S),0===i&&t.generateMipmaps&&Ke.generateMipmap(v),Se.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n=null,s=null,r=0){return!0!==e.isTexture&&(jn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),n=arguments[0]||null,s=arguments[1]||null,e=arguments[2],t=arguments[3],r=arguments[4]||0),jn('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(e,t,n,s,r)},this.initRenderTarget=function(e){void 0===Me.get(e).__webglFramebuffer&&Ee.setupRenderTarget(e)},this.initTexture=function(e){e.isCubeTexture?Ee.setTextureCube(e,0):e.isData3DTexture?Ee.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Ee.setTexture2DArray(e,0):Ee.setTexture2D(e,0),Se.unbindTexture()},this.resetState=function(){E=0,C=0,D=null,Se.reset(),Ve.reset()},void 0!==self.__THREE_DEVTOOLS__&&self.__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ue}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorspace=ae._getDrawingBufferColorSpace(e),t.unpackColorSpace=ae._getUnpackColorSpace()}}class $o{constructor(e){this.viewport=e,this.internalOptions={enableRenderCss2D:!1,enableRenderCss3D:!1},this.container=this._initContainer(),this.renderer=this._initRenderer(),this.rendererCSS2D=this._initRenderCSS2D(),this.rendererCSS3D=this._initRenderCSS3D(),this.interactiveContainer=this._initInteractiveContainer()}setInternalState(e,t){this.internalOptions[e]=t}_initContainer(){const e=document.createElement("div");return e.style.position="relative",e.style.width="100%",e.style.height="100%",e}_initRenderer(){const e=new Jo({powerPreference:"high-performance",antialias:!1,stencil:!1,depth:!1,preserveDrawingBuffer:!0,logarithmicDepthBuffer:!0});return e.autoClear=!1,e.info.autoReset=!1,e.localClippingEnabled=!0,e.sortObjects=!0,e.shadowMap.enabled=!0,e.shadowMap.type=xe,e.setPixelRatio(self.devicePixelRatio),this.container.appendChild(e.domElement),e}_initRenderCSS2D(){const e=new Go(this.viewport);return e.domElement.id="ssp_view_2DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initRenderCSS3D(){const e=new Xo(this.viewport);return e.domElement.id="ssp_view_3DPoi",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.width="100%",e.domElement.style.height="100%",e.setSize(this.container.offsetWidth,this.container.offsetHeight),this.container.appendChild(e.domElement),e}_initInteractiveContainer(){return this.rendererCSS3D.domElement}}const ea=new y,ta=(e,t)=>{const s=ea.clone(),r=ea.clone(),i=ea.clone();s.makeRotationY(e),r.makeRotationX(t);const o=new n;return i.multiplyMatrices(s,r),o.setFromRotationMatrix(i),o},na=ta(-Math.PI/2,-Math.PI/4),sa=ta(Math.PI/2,-Math.PI/4),ra=ta(-Math.PI/4,-Math.PI/4),ia=ta(Math.PI/4,-Math.PI/4),oa=ta(1.25*Math.PI,-Math.PI/4),aa=ta(.75*Math.PI,-Math.PI/4),la={LEFT:new n(0,-Math.PI/2,0),RIGHT:new n(0,Math.PI/2,0),FRONT:new n(0,0,0),BACK:new n(0,Math.PI,0),TOP:new n(-Math.PI/2,0,0),BOTTOM:new n(Math.PI/2,0,0),FRONTTOP:new n(-Math.PI/4,0,0),BACKTOP:new n(Math.PI/4,Math.PI,0),LEFTTOP:new n(na.x,na.y,na.z),RIGHTTOP:new n(sa.x,sa.y,sa.z),LEFTFRONTTOP:new n(ra.x,ra.y,ra.z),RIGHTFRONTTOP:new n(ia.x,ia.y,ia.z),LEFTBACKTOP:new n(oa.x,oa.y,oa.z),RIGHTBACKTOP:new n(aa.x,aa.y,aa.z)},ca={LEFT:new Te(0,Math.PI/2,-Math.PI/2),RIGHT:new Te(0,Math.PI/2,Math.PI/2),FRONT:new Te(0,Math.PI/2,0),BACK:new Te(0,Math.PI/2,Math.PI),TOP:new Te(0,0,0),BOTTOM:new Te(0,Math.PI,0),FRONTTOP:new Te(0,Math.PI/4,0),BACKTOP:new Te(0,Math.PI/4,Math.PI),LEFTTOP:new Te(0,Math.PI/4,-Math.PI/2),RIGHTTOP:new Te(0,Math.PI/4,Math.PI/2),LEFTFRONTTOP:new Te(0,Math.PI/4,-Math.PI/4),RIGHTFRONTTOP:new Te(0,Math.PI/4,Math.PI/4),LEFTBACKTOP:new Te(0,Math.PI/4,-Math.PI/4*3),RIGHTBACKTOP:new Te(0,Math.PI/4,Math.PI/4*3)},ha=new t,ua=new n,da=new X(50,1,.01,5e4);da.position.set(500,1e3,500),da.lookAt(ha.set(0,0,0)),da.name="SspCamera";const pa=new Q(-500,500,500,-500,.01,5e4);pa.position.set(500,1e3,500),pa.lookAt(ha.set(0,0,0)),da.name="SspCamera";class ma{constructor(e){this.viewport=e,this.mainCamera=da.clone(),this.mainCamera.name="CameraControls",this.currentCamera=this.mainCamera,this.cameras={}}createCamera(e){const t=da.clone();return t.name=e,this.cameras[e]=t,t}removeCamera(e){return"fullFreeCamera"!==e&&(delete this.cameras[e],!0)}setCurrentCamera(e){this.currentCamera=this.viewport.camera=e,this.viewport.signals.cameraObjectChange.dispatch()}async setCamera(e,t,n){let s=da.clone();const r="orthographic"===e;if(r&&(s=pa.clone()),this.mainCamera.type!==s.type){const{controls:e}=this.viewport;this.mainCamera=e.camera=s,r?e.mouseButtons.wheel=Ys.ACTION.ZOOM:(e.mouseButtons.wheel=Ys.ACTION.DOLLY,e.zoomTo(1)),this.setCurrentCamera(s)}t&&await this.setCameraViewpoint(t,n)}getCameraViewpoint(){const{controls:e}=this.viewport;return{position:e.getPosition(new t),target:e.getTarget(new t),zoom:e.camera.zoom}}async setCameraViewpoint(e,t){const{controls:n}=this.viewport,s=e,r=e;if(s.target){const{position:e,target:r,zoom:i=n.camera.zoom}=s;await Promise.all([n.zoomTo(i,t),n.setLookAt(e.x,e.y,e.z,r.x,r.y,r.z,t)])}else if(r.rotation){const{position:e,rotation:s}=r,i=gr(e,s);await n.setLookAt(e.x,e.y,e.z,i.x,i.y,i.z,t)}}async flyTo(e,t="frontTop",s={}){const{enableTransition:r=!0}=s;if(Gr(t)){const e=t.toLocaleUpperCase();"CURRENT"===e?ua.copy(this.currentCamera.rotation):la[e]&&ua.copy(la[e])}else t instanceof n?ua.copy(t):Kr(t)&&ua.set(t.x,t.y,t.z);return this.setCameraViewpoint({position:e,rotation:ua},r)}async flyToObj(e,n="frontTop",s={}){var r;let{padding:a="30%"}=s;const{enableTransition:l=!0,viewpointSpace:c="world",minPadding:h=1}=s;e instanceof Ya&&(a=null!==(r=s.padding)&&void 0!==r?r:50);const u=e instanceof o?ir(e):e,d=u.getSize(ha);if(Gr(a)){const e=Math.max(d.x,d.y,d.z,h);a=(Hr(p=a)?p:p.includes("%")?.01*Number(p.split("%")[0]):isNaN(+p)?0:Number(p))*e}var p;ha.setScalar(a/2),u.max.add(ha),u.min.sub(ha);const{controls:m}=this.viewport,f=[];if(m.azimuthAngle=yr(m.azimuthAngle,0),"current"!==n){f.push(m.fitToBox(u,l));const s=ca[n.toLocaleUpperCase()];let r=s.theta,a=s.phi;if("local"===c&&e instanceof o){const n=new t(0,0,1),o=e.getWorldQuaternion(new i),l=new Te;n.applyQuaternion(o),l.setFromVector3(n),l.phi-=Math.PI/2,r=s.theta+l.theta,a=s.phi+l.phi}f.push(m.rotateTo(r,a,l))}else{const e=new Se;u.getBoundingSphere(e),f.push(m.fitToSphere(e,l))}await Promise.all(f)}surroundOnTarget(e,t={}){const{duration:n=3e3,startAngle:s=0,endAngle:r=360,onStart:i}=t,o=sr(e),{controls:a}=this.viewport;return a.setTarget(o.x,o.y,o.z),ri({radian:ar(s)},{radian:ar(r)},{duration:n},(({radian:e})=>{a.rotateAzimuthTo(e,!1)}),i)}surroundOnObject(e,t={}){const n=ir(e).getCenter(ha);return this.surroundOnTarget(n,t)}getObjectLabelPos(e,n="frontTop",r={}){if(e instanceof o&&(e=(new s).setFromObject(e)),e.isEmpty())return tr("target box is empty"),new t;const{extendScale:i=1.6,mode:a="scene"}=r;if("scene"===a){const t=e.getCenter(ha),s=e.max.clone().sub(e.min),r=Math.max(s.x,s.y,s.z),o=t.clone(),a=e=>{const t=(i-.5)*Math.abs(r),n=Math.max(t,this.viewport.camera.near);o.add(e.multiplyScalar(n))};let l;return l=Gr(n)?la[n.toLocaleUpperCase()]:rr(n),a(ha.set(0,0,1).applyEuler(l)),o}return"screen"===a?e.getCenter(ha).clone():new t}}const fa=new w;fa.setAttribute("position",new v(new Float32Array([-1,-1,3,-1,-1,3]),2)),fa.setAttribute("uv",new v(new Float32Array([0,0,2,0,0,2]),2)),fa.boundingSphere=new Se,fa.computeBoundingSphere=function(){};const ga=new Q;class ya{constructor(e){this._mesh=new W(fa,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,ga)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const va={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new y},viewMat:{value:new y},projViewMat:{value:new y},projectionMatrixInv:{value:new y},viewMatrixInv:{value:new y},cameraPos:{value:new t},resolution:{value:new g},biasAdjustment:{value:new g},time:{value:0},samples:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1},frame:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n}",fragmentShader:"\n #define SAMPLES 16\n #define FSAMPLES 16.0\nuniform sampler2D sceneDiffuse;\nuniform highp sampler2D sceneNormal;\nuniform highp sampler2D sceneDepth;\nuniform mat4 projectionMatrixInv;\nuniform mat4 viewMatrixInv;\nuniform mat4 projMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\nuniform vec3 cameraPos;\nuniform vec2 resolution;\nuniform vec2 biasAdjustment;\nuniform float time;\nuniform vec3[SAMPLES] samples;\nuniform float radius;\nuniform float distanceFalloff;\nuniform float near;\nuniform float far;\nuniform float frame;\nuniform bool logDepth;\nuniform bool ortho;\nuniform bool screenSpaceRadius;\nuniform sampler2D bluenoise;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n /*return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);*/\n #ifdef ORTHO\n\n return linearize_depth_ortho(d, nearZ, farZ);\n\n #else\n return linearize_depth(linDepth, nearZ, farZ);\n #endif\n }\n\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n\n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n\n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n\n vec3 ce = getWorldPos(c0, vUv).xyz;\n\n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n\n return normalize(cross(dpdx, dpdy));\n}\n\nmat3 makeRotationZ(float theta) {\n\tfloat c = cos(theta);\n\tfloat s = sin(theta);\n\treturn mat3(c, - s, 0,\n\t\t\ts, c, 0,\n\t\t\t0, 0, 1);\n }\n\nvoid main() {\n vec4 diffuse = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(sceneDepth, vUv).x;\n if (depth == 1.0) {\n gl_FragColor = vec4(vec3(1.0), 1.0);\n return;\n }\n vec3 worldPos = getWorldPos(depth, vUv);\n #ifdef HALFRES\n vec3 normal = texture2D(sceneNormal, vUv).rgb;\n #else\n vec3 normal = computeNormal(worldPos, vUv);\n #endif\n vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0);\n vec2 harmoniousNumbers = vec2(\n 1.618033988749895,\n 1.324717957244746\n );\n noise.rg += harmoniousNumbers * frame;\n noise.rg = fract(noise.rg);\n vec3 helperVec = vec3(0.0, 1.0, 0.0);\n if (dot(helperVec, normal) > 0.99) {\n helperVec = vec3(1.0, 0.0, 0.0);\n }\n vec3 tangent = normalize(cross(helperVec, normal));\n vec3 bitangent = cross(normal, tangent);\n mediump mat3 tbn = mat3(tangent, bitangent, normal) * makeRotationZ( noise.r * 3.1415962 * 2.0) ;\n\n mediump float occluded = 0.0;\n mediump float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n float bias = (min(\n 0.1,\n distanceFalloffToUse * 0.1\n ) / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse;\n bias = biasAdjustment.x + biasAdjustment.y * bias;\n mediump float offsetMove = noise.g;\n mediump float offsetMoveInv = 1.0 / FSAMPLES;\n float farTimesNear = far * near;\n float farMinusNear = far - near;\n \n for(int i = 0; i < SAMPLES; i++) {\n mediump vec3 sampleDirection = tbn * samples[i];\n\n float moveAmt = fract(offsetMove);\n offsetMove += offsetMoveInv;\n vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection;\n vec4 offset = projMat * vec4(samplePos, 1.0);\n offset.xyz /= offset.w;\n offset.xyz = offset.xyz * 0.5 + 0.5;\n \n if (all(greaterThan(offset.xyz * (1.0 - offset.xyz), vec3(0.0)))) {\n float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x;\n\n /*#ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n #ifdef ORTHO\n float distSample = near + farMinusNear * sampleDepth;\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif*/\n #ifdef ORTHO\n float distSample = near + sampleDepth * farMinusNear;\n #else\n #ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif\n \n #ifdef ORTHO\n float distWorld = near + offset.z * farMinusNear;\n #else\n float distWorld = (farTimesNear) / (far - offset.z * farMinusNear);\n #endif\n \n mediump float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld)));\n vec2 diff = gl_FragCoord.xy - floor(offset.xy * resolution);\n occluded += rangeCheck * float(distSample != distWorld) * float(sampleDepth != depth) * step(distSample + bias, distWorld) * step(\n 1.0,\n dot(diff, diff)\n );\n \n totalWeight ++;\n }\n }\n float occ = clamp(1.0 - occluded / (totalWeight == 0.0 ? 1.0 : totalWeight), 0.0, 1.0);\n gl_FragColor = vec4(occ, 0.5 + 0.5 * normal);\n}"},wa={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},transparencyDWFalse:{value:null},transparencyDWTrue:{value:null},transparencyDWTrueDepth:{value:null},transparencyAware:{value:!1},projMat:{value:new y},viewMat:{value:new y},projectionMatrixInv:{value:new y},viewMatrixInv:{value:new y},cameraPos:{value:new t},resolution:{value:new g},color:{value:new t(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0},aoTones:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform highp sampler2D downsampledDepth;\n uniform highp sampler2D transparencyDWFalse;\n uniform highp sampler2D transparencyDWTrue;\n uniform highp sampler2D transparencyDWTrueDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform vec2 resolution;\n uniform vec3 color;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform float intensity;\n uniform float renderMode;\n uniform float near;\n uniform float far;\n uniform float aoTones;\n uniform bool gammaCorrection;\n uniform bool logDepth;\n uniform bool ortho;\n uniform bool screenSpaceRadius;\n uniform bool fog;\n uniform bool fogExp;\n uniform bool colorMultiply;\n uniform bool transparencyAware;\n uniform float fogDensity;\n uniform float fogNear;\n uniform float fogFar;\n uniform float radius;\n uniform float distanceFalloff;\n uniform vec3 cameraPos;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n // if (logDepth) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n // }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n\n #include <common>\n #include <dithering_pars_fragment>\n void main() {\n //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0);\n vec4 sceneTexel = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(\n sceneDepth,\n vUv\n ).x;\n #ifdef HALFRES \n vec4 texel;\n if (depth == 1.0) {\n texel = vec4(0.0, 0.0, 0.0, 1.0);\n } else {\n vec3 worldPos = getWorldPos(depth, vUv);\n vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv);\n // vec4 texel = texture2D(tDiffuse, vUv);\n // Find closest depth;\n float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n for(float x = -1.0; x <= 1.0; x++) {\n for(float y = -1.0; y <= 1.0; y++) {\n vec2 offset = vec2(x, y);\n ivec2 p = ivec2(\n (vUv * resolution * 0.5) + offset\n );\n vec2 pUv = vec2(p) / (resolution * 0.5);\n float sampleDepth = texelFetch(downsampledDepth,p, 0).x;\n vec4 sampleInfo = texelFetch(tDiffuse, p, 0);\n vec3 normalSample = sampleInfo.gba * 2.0 - 1.0;\n vec3 worldPosSample = getWorldPos(sampleDepth, pUv);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0);\n float weight = rangeCheck;\n totalWeight += weight;\n texel += sampleInfo * weight;\n }\n }\n if (totalWeight == 0.0) {\n texel = texture2D(tDiffuse, vUv);\n } else {\n texel /= totalWeight;\n }\n }\n #else\n vec4 texel = texture2D(tDiffuse, vUv);\n #endif\n\n #ifdef LOGDEPTH\n texel.r = clamp(texel.r, 0.0, 1.0);\n if (texel.r == 0.0) {\n texel.r = 1.0;\n }\n #endif\n \n float finalAo = pow(texel.r, intensity);\n if (aoTones > 0.0) {\n finalAo = ceil(finalAo * aoTones) / aoTones;\n }\n float fogFactor;\n float fogDepth = distance(\n cameraPos,\n getWorldPos(depth, vUv)\n );\n if (fog) {\n if (fogExp) {\n fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n } else {\n fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n }\n }\n if (transparencyAware) {\n float transparencyDWOff = texture2D(transparencyDWFalse, vUv).a;\n float transparencyDWOn = texture2D(transparencyDWTrue, vUv).a;\n float adjustmentFactorOff = transparencyDWOff;\n float adjustmentFactorOn = (1.0 - transparencyDWOn) * (\n texture2D(transparencyDWTrueDepth, vUv).r == texture2D(sceneDepth, vUv).r ? 1.0 : 0.0\n );\n float adjustmentFactor = max(adjustmentFactorOff, adjustmentFactorOn);\n finalAo = mix(finalAo, 1.0, adjustmentFactor);\n }\n finalAo = mix(finalAo, 1.0, fogFactor);\n vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply));\n if (renderMode == 0.0) {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 1.0) {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 2.0) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (renderMode == 3.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n } else if (renderMode == 4.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n }\n #include <dithering_fragment>\n if (gammaCorrection) {\n gl_FragColor = sRGBTransferOETF(gl_FragColor);\n }\n }\n "},ba={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new y},viewMat:{value:new y},projectionMatrixInv:{value:new y},viewMatrixInv:{value:new y},cameraPos:{value:new t},resolution:{value:new g},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1.0);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform vec2 resolution;\n uniform float r;\n uniform float radius;\n uniform float worldRadius;\n uniform float index;\n uniform float near;\n uniform float far;\n uniform float distanceFalloff;\n uniform bool logDepth;\n uniform bool screenSpaceRadius;\n varying vec2 vUv;\n\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n highp float z_n = 2.0 * d - 1.0;\n return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return linearize_depth(linDepth, nearZ, farZ);\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n \n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n #include <common>\n #define NUM_SAMPLES 16\n uniform vec2 poissonDisk[NUM_SAMPLES];\n void main() {\n const float pi = 3.14159;\n vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec2 uv = vUv;\n vec4 data = texture2D(tDiffuse, vUv);\n float occlusion = data.r;\n float baseOcc = data.r;\n vec3 normal = data.gba * 2.0 - 1.0;\n float count = 1.0;\n float d = texture2D(sceneDepth, vUv).x;\n if (d == 1.0) {\n gl_FragColor = data;\n return;\n }\n vec3 worldPos = getWorldPos(d, vUv);\n float size = radius;\n float angle;\n if (index == 0.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2;\n } else if (index == 1.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2;\n } else if (index == 2.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2;\n } else {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2;\n }\n\n mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(d, vUv +\n vec2(worldRadius, 0.0) / resolution)\n ) : worldRadius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n\n float invDistance = (1.0 / distanceFalloffToUse);\n for(int i = 0; i < NUM_SAMPLES; i++) {\n vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size;\n vec4 dataSample = texture2D(tDiffuse, uv + offset);\n float occSample = dataSample.r;\n vec3 normalSample = dataSample.gba * 2.0 - 1.0;\n float dSample = texture2D(sceneDepth, uv + offset).x;\n vec3 worldPosSample = getWorldPos(dSample, uv + offset);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = float(dSample != 1.0) * exp(-1.0 * tangentPlaneDist * invDistance ) * max(dot(normal, normalSample), 0.0);\n occlusion += occSample * rangeCheck;\n count += rangeCheck;\n }\n if (count > 0.0) {\n occlusion /= count;\n }\n #ifdef LOGDEPTH\n occlusion = clamp(occlusion, 0.0, 1.0);\n if (occlusion == 0.0) {\n occlusion = 1.0;\n }\n #endif\n gl_FragColor = vec4(occlusion, 0.5 + 0.5 * normal);\n }\n "},xa={uniforms:{sceneDepth:{value:null},resolution:{value:new g},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new y},projectionMatrixInv:{value:new y},logDepth:{value:!1},ortho:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform highp sampler2D sceneDepth;\n uniform vec2 resolution;\n uniform float near;\n uniform float far;\n uniform bool logDepth;\n uniform bool ortho;\n uniform mat4 viewMatrixInv;\n uniform mat4 projectionMatrixInv;\n varying vec2 vUv;\n layout(location = 1) out vec4 gNormal;\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n if (logDepth && !ortho) {\n return getWorldPosLog(vec3(coord, depth));\n }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n void main() {\n vec2 uv = vUv - vec2(0.5) / resolution;\n vec2 pixelSize = vec2(1.0) / resolution;\n highp vec2[4] uvSamples;\n uvSamples[0] = uv;\n uvSamples[1] = uv + vec2(pixelSize.x, 0.0);\n uvSamples[2] = uv + vec2(0.0, pixelSize.y);\n uvSamples[3] = uv + pixelSize;\n float depth00 = texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = texture2D(sceneDepth, uvSamples[3]).r;\n float minDepth = min(min(depth00, depth10), min(depth01, depth11));\n float maxDepth = max(max(depth00, depth10), max(depth01, depth11));\n float targetDepth = minDepth;\n // Checkerboard pattern to avoid artifacts\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { \n targetDepth = maxDepth;\n }\n int chosenIndex = 0;\n float[4] samples;\n samples[0] = depth00;\n samples[1] = depth10;\n samples[2] = depth01;\n samples[3] = depth11;\n for(int i = 0; i < 4; ++i) {\n if (samples[i] == targetDepth) {\n chosenIndex = i;\n break;\n }\n }\n gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex]\n ), 0.0);\n }"};var Ta="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHYTflbDTVXajtr68mwfRje6WueQ/6yWqmZMLWNH7P27zGFhMFqaqfg11Q88g/9UA/FROe9yfq0yOO0pnNAx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QLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const Sa=(()=>parseInt(se.replace(/\D+/g,"")))()>=162?class extends re{constructor(e=1,t=1,n=1,s={}){super(e,t,{...s,count:n}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}:class extends re{constructor(e=1,t=1,n=1,s={}){super(e,t,s),this.isWebGLMultipleRenderTargets=!0;const r=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=r.clone(),this.texture[e].isRenderTargetTexture=!0}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 s=0,r=this.texture.length;s<r;s++)this.texture[s].image.width=e,this.texture[s].image.height=t,this.texture[s].image.depth=n;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}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()),this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}},Oa=Uint8Array.from(atob(Ta),(e=>e.charCodeAt(0)));function Ma(e,t,n){if(t.getQueryParameter(e,t.QUERY_RESULT_AVAILABLE)){const s=t.getQueryParameter(e,t.QUERY_RESULT)/1e6;n.lastTime=0===n.lastTime?s:n.timeRollingAverage*n.lastTime+(1-n.timeRollingAverage)*s}else setTimeout((()=>{Ma(e,t,n)}),1)}class Ea extends Ut{constructor(e,t,n=512,s=512){super(),this.width=n,this.height=s,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,aoTones:0,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,biasOffset:0,biasMultiplier:0,color:new u(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0,transparencyAware:!1,accumulate:!1},{set:(e,t,n)=>{const s=e[t];return e[t]=n,n.equals?n.equals(s)||this.firstFrame():s!==n&&this.firstFrame(),"aoSamples"===t&&s!==n&&this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),"denoiseSamples"===t&&s!==n&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),"halfRes"===t&&s!==n&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.setSize(this.width,this.height)),"depthAwareUpsampling"===t&&s!==n&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),"gammaCorrection"===t&&(this.autosetGamma=!1),"transparencyAware"===t&&s!==n&&(this.autoDetectTransparency=!1,this.configureTransparencyTarget()),!0}}),this.samples=[],this.samplesDenoise=[],this.autoDetectTransparency=!0,this.frames=0,this.lastViewMatrix=new y,this.lastProjectionMatrix=new y,this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.detectTransparency(),this.configureTransparencyTarget(),this.copyQuad=new ya(new Oe({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n gl_FragColor = texture2D(tDiffuse, vUv);\n }\n "})),this.writeTargetInternal=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1,format:Ee}),this.readTargetInternal=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1,format:Ee}),this.outputTargetInternal=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1}),this.accumulationRenderTarget=new re(this.width,this.height,{minFilter:Me,magFilter:Me,depthBuffer:!1,format:Ee,type:c,stencilBuffer:!1,depthBuffer:!1,alpha:!0}),this.accumulationQuad=new ya(new Oe({uniforms:{frame:{value:0},tDiffuse:{value:null}},transparent:!0,opacity:1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float frame;\n varying vec2 vUv;\n void main() {\n vec4 color = texture2D(tDiffuse, vUv);\n gl_FragColor = vec4(color.rgb, 1.0 / (frame + 1.0));\n }\n "})),this.bluenoise=new Ce(Oa,128,128),this.bluenoise.colorSpace=De,this.bluenoise.wrapS=Pe,this.bluenoise.wrapT=Pe,this.bluenoise.minFilter=Ie,this.bluenoise.magFilter=Ie,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.timeRollingAverage=.99,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new g,this._c=new u}configureHalfResTargets(){this.firstFrame(),this.configuration.halfRes?(this.depthDownsampleTarget=new Sa(this.width/2,this.height/2,2),se<=161&&(this.depthDownsampleTarget.textures=this.depthDownsampleTarget.texture),this.depthDownsampleTarget.textures[0].format=Ae,this.depthDownsampleTarget.textures[0].type=Le,this.depthDownsampleTarget.textures[0].minFilter=Ie,this.depthDownsampleTarget.textures[0].magFilter=Ie,this.depthDownsampleTarget.textures[0].depthBuffer=!1,this.depthDownsampleTarget.textures[1].format=Ee,this.depthDownsampleTarget.textures[1].type=c,this.depthDownsampleTarget.textures[1].minFilter=Ie,this.depthDownsampleTarget.textures[1].magFilter=Ie,this.depthDownsampleTarget.textures[1].depthBuffer=!1,this.depthDownsampleQuad=new ya(new Oe(xa))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}detectTransparency(){if(this.autoDetectTransparency){let e=!1;this.scene.traverse((t=>{t.material&&t.material.transparent&&(e=!0)})),e&&(this.configuration.transparencyAware=!0)}}configureTransparencyTarget(){this.configuration.transparencyAware?(this.transparencyRenderTargetDWFalse=new re(this.width,this.height,{minFilter:Me,magFilter:Ie,type:c,format:Ee}),this.transparencyRenderTargetDWTrue=new re(this.width,this.height,{minFilter:Me,magFilter:Ie,type:c,format:Ee}),this.transparencyRenderTargetDWTrue.depthTexture=new je(this.width,this.height,ge),this.depthCopyPass=new ya(new Oe({uniforms:{depthTexture:{value:this.depthTexture}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D depthTexture;\n varying vec2 vUv;\n void main() {\n gl_FragDepth = texture2D(depthTexture, vUv).r + 0.00001;\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n "}))):(this.transparencyRenderTargetDWFalse&&(this.transparencyRenderTargetDWFalse.dispose(),this.transparencyRenderTargetDWFalse=null),this.transparencyRenderTargetDWTrue&&(this.transparencyRenderTargetDWTrue.dispose(),this.transparencyRenderTargetDWTrue=null),this.depthCopyPass&&(this.depthCopyPass.dispose(),this.depthCopyPass=null))}renderTransparency(e){const t=this.scene.background,n=e.getClearColor(new u),s=e.getClearAlpha(),r=new Map,i=e.autoClearDepth;this.scene.traverse((e=>{r.set(e,e.visible)})),this.scene.background=null,e.autoClearDepth=!1,e.setClearColor(new u(0,0,0),0),this.depthCopyPass.material.uniforms.depthTexture.value=this.depthTexture,e.setRenderTarget(this.transparencyRenderTargetDWFalse),this.scene.traverse((e=>{e.material&&(e.visible=r.get(e)&&(e.material.transparent&&!e.material.depthWrite&&!e.userData.treatAsOpaque||!!e.userData.cannotReceiveAO))})),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),e.setRenderTarget(this.transparencyRenderTargetDWTrue),this.scene.traverse((e=>{e.material&&(e.visible=r.get(e)&&e.material.transparent&&e.material.depthWrite&&!e.userData.treatAsOpaque)})),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),this.scene.traverse((e=>{e.visible=r.get(e)})),e.setClearColor(n,s),this.scene.background=t,e.autoClearDepth=i}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera)}configureAOPass(e=!1,t=!1){this.firstFrame(),this.samples=this.generateHemisphereSamples(this.configuration.aoSamples);const n={...va};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(n.fragmentShader="#define LOGDEPTH\n"+n.fragmentShader),t&&(n.fragmentShader="#define ORTHO\n"+n.fragmentShader),this.configuration.halfRes&&(n.fragmentShader="#define HALFRES\n"+n.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new Oe(n)):this.effectShaderQuad=new ya(new Oe(n))}configureDenoisePass(e=!1,t=!1){this.firstFrame(),this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const n={...ba};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(n.fragmentShader="#define LOGDEPTH\n"+n.fragmentShader),t&&(n.fragmentShader="#define ORTHO\n"+n.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new Oe(n)):this.poissonBlurQuad=new ya(new Oe(n))}configureEffectCompositer(e=!1,t=!1){this.firstFrame();const n={...wa};e&&(n.fragmentShader="#define LOGDEPTH\n"+n.fragmentShader),t&&(n.fragmentShader="#define ORTHO\n"+n.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(n.fragmentShader="#define HALFRES\n"+n.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new Oe(n)):this.effectCompositerQuad=new ya(new Oe(n))}generateHemisphereSamples(e){const n=[];for(let s=0;s<e;s++){const r=2.399963*s,i=Math.sqrt(s+.5)/Math.sqrt(e),o=i*Math.cos(r),a=i*Math.sin(r),l=Math.sqrt(1-(o*o+a*a));n.push(new t(o,a,l))}return n}generateDenoiseSamples(e,t){const n=2*Math.PI*t/e,s=1/e,r=s,i=[];let o=s,a=0;for(let t=0;t<e;t++)i.push(new g(Math.cos(a),Math.sin(a)).multiplyScalar(Math.pow(o,.75))),o+=r,a+=n;return i}setSize(e,t){this.firstFrame(),this.width=e,this.height=t;const n=this.configuration.halfRes?.5:1;this.writeTargetInternal.setSize(e*n,t*n),this.readTargetInternal.setSize(e*n,t*n),this.accumulationRenderTarget.setSize(e*n,t*n),this.configuration.halfRes&&this.depthDownsampleTarget.setSize(e*n,t*n),this.configuration.transparencyAware&&(this.transparencyRenderTargetDWFalse.setSize(e,t),this.transparencyRenderTargetDWTrue.setSize(e,t)),this.outputTargetInternal.setSize(e,t)}setDepthTexture(e){this.depthTexture=e}firstFrame(){this.needsFrame=!0}render(e,n,s){const r=e.xr.enabled;let i,o,a;e.xr.enabled=!1,e.capabilities.logarithmicDepthBuffer!==this.configuration.logarithmicDepthBuffer&&(this.configuration.logarithmicDepthBuffer=e.capabilities.logarithmicDepthBuffer,this.configureAOPass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer,this.camera.isOrthographicCamera)),this.detectTransparency(),n.texture.type===this.outputTargetInternal.texture.type&&n.texture.format===this.outputTargetInternal.texture.format||(this.outputTargetInternal.texture.type=n.texture.type,this.outputTargetInternal.texture.format=n.texture.format,this.outputTargetInternal.texture.needsUpdate=!0),this.camera.updateMatrixWorld(),this.lastViewMatrix.equals(this.camera.matrixWorldInverse)&&this.lastProjectionMatrix.equals(this.camera.projectionMatrix)&&this.configuration.accumulate&&!this.needsFrame?this.frame++:(this.configuration.accumulate&&(e.setRenderTarget(this.accumulationRenderTarget),e.clear(!0,!0,!0)),this.frame=0,this.needsFrame=!1),this.lastViewMatrix.copy(this.camera.matrixWorldInverse),this.lastProjectionMatrix.copy(this.camera.projectionMatrix),this.debugMode&&(i=e.getContext(),o=i.getExtension("EXT_disjoint_timer_query_webgl2"),null===o&&(console.error("EXT_disjoint_timer_query_webgl2 not available, disabling debug mode."),this.debugMode=!1)),this.debugMode&&(a=i.createQuery(),i.beginQuery(o.TIME_ELAPSED_EXT,a)),this.configuration.transparencyAware&&this.renderTransparency(e),this._r.set(this.width,this.height);let l=this.configuration.aoRadius;if(this.configuration.halfRes&&this.configuration.screenSpaceRadius&&(l*=.5),this.frame<1024/this.configuration.aoSamples){this.configuration.halfRes&&(e.setRenderTarget(this.depthDownsampleTarget),this.depthDownsampleQuad.material.uniforms.sceneDepth.value=this.depthTexture,this.depthDownsampleQuad.material.uniforms.resolution.value=this._r,this.depthDownsampleQuad.material.uniforms.near.value=this.camera.near,this.depthDownsampleQuad.material.uniforms.far.value=this.camera.far,this.depthDownsampleQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.depthDownsampleQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.depthDownsampleQuad.material.uniforms.logDepth.value=this.configuration.logarithmicDepthBuffer,this.depthDownsampleQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.depthDownsampleQuad.render(e)),this.effectShaderQuad.material.uniforms.sceneDiffuse.value=n.texture,this.effectShaderQuad.material.uniforms.sceneDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[0]:this.depthTexture,this.effectShaderQuad.material.uniforms.sceneNormal.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[1]:null,this.effectShaderQuad.material.uniforms.projMat.value=this.camera.projectionMatrix,this.effectShaderQuad.material.uniforms.viewMat.value=this.camera.matrixWorldInverse,this.effectShaderQuad.material.uniforms.projViewMat.value=this.camera.projectionMatrix.clone().multiply(this.camera.matrixWorldInverse.clone()),this.effectShaderQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.effectShaderQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.effectShaderQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new t),this.effectShaderQuad.material.uniforms.biasAdjustment.value=new g(this.configuration.biasOffset,this.configuration.biasMultiplier),this.effectShaderQuad.material.uniforms.resolution.value=this.configuration.halfRes?this._r.clone().multiplyScalar(.5).floor():this._r,this.effectShaderQuad.material.uniforms.time.value=performance.now()/1e3,this.effectShaderQuad.material.uniforms.samples.value=this.samples,this.effectShaderQuad.material.uniforms.bluenoise.value=this.bluenoise,this.effectShaderQuad.material.uniforms.radius.value=l,this.effectShaderQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.effectShaderQuad.material.uniforms.near.value=this.camera.near,this.effectShaderQuad.material.uniforms.far.value=this.camera.far,this.effectShaderQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.effectShaderQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.effectShaderQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,this.effectShaderQuad.material.uniforms.frame.value=this.frame,e.setRenderTarget(this.writeTargetInternal),this.effectShaderQuad.render(e);for(let n=0;n<this.configuration.denoiseIterations;n++)[this.writeTargetInternal,this.readTargetInternal]=[this.readTargetInternal,this.writeTargetInternal],this.poissonBlurQuad.material.uniforms.tDiffuse.value=this.readTargetInternal.texture,this.poissonBlurQuad.material.uniforms.sceneDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[0]:this.depthTexture,this.poissonBlurQuad.material.uniforms.projMat.value=this.camera.projectionMatrix,this.poissonBlurQuad.material.uniforms.viewMat.value=this.camera.matrixWorldInverse,this.poissonBlurQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.poissonBlurQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.poissonBlurQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new t),this.poissonBlurQuad.material.uniforms.resolution.value=this.configuration.halfRes?this._r.clone().multiplyScalar(.5).floor():this._r,this.poissonBlurQuad.material.uniforms.time.value=performance.now()/1e3,this.poissonBlurQuad.material.uniforms.blueNoise.value=this.bluenoise,this.poissonBlurQuad.material.uniforms.radius.value=this.configuration.denoiseRadius*(this.configuration.halfRes?.5:1),this.poissonBlurQuad.material.uniforms.worldRadius.value=l,this.poissonBlurQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.poissonBlurQuad.material.uniforms.index.value=n,this.poissonBlurQuad.material.uniforms.poissonDisk.value=this.samplesDenoise,this.poissonBlurQuad.material.uniforms.near.value=this.camera.near,this.poissonBlurQuad.material.uniforms.far.value=this.camera.far,this.poissonBlurQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.poissonBlurQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,e.setRenderTarget(this.writeTargetInternal),this.poissonBlurQuad.render(e);e.setRenderTarget(this.accumulationRenderTarget);const s=e.autoClear;e.autoClear=!1,this.accumulationQuad.material.uniforms.tDiffuse.value=this.writeTargetInternal.texture,this.accumulationQuad.material.uniforms.frame.value=this.frame,this.accumulationQuad.render(e),e.autoClear=s}this.configuration.transparencyAware&&(this.effectCompositerQuad.material.uniforms.transparencyDWFalse.value=this.transparencyRenderTargetDWFalse.texture,this.effectCompositerQuad.material.uniforms.transparencyDWTrue.value=this.transparencyRenderTargetDWTrue.texture,this.effectCompositerQuad.material.uniforms.transparencyDWTrueDepth.value=this.transparencyRenderTargetDWTrue.depthTexture,this.effectCompositerQuad.material.uniforms.transparencyAware.value=!0),this.effectCompositerQuad.material.uniforms.sceneDiffuse.value=n.texture,this.effectCompositerQuad.material.uniforms.sceneDepth.value=this.depthTexture,this.effectCompositerQuad.material.uniforms.aoTones.value=this.configuration.aoTones,this.effectCompositerQuad.material.uniforms.near.value=this.camera.near,this.effectCompositerQuad.material.uniforms.far.value=this.camera.far,this.effectCompositerQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.effectCompositerQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.effectCompositerQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.effectCompositerQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.effectCompositerQuad.material.uniforms.downsampledDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.textures[0]:this.depthTexture,this.effectCompositerQuad.material.uniforms.resolution.value=this._r,this.effectCompositerQuad.material.uniforms.blueNoise.value=this.bluenoise,this.effectCompositerQuad.material.uniforms.intensity.value=this.configuration.intensity,this.effectCompositerQuad.material.uniforms.renderMode.value=this.configuration.renderMode,this.effectCompositerQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,this.effectCompositerQuad.material.uniforms.radius.value=l,this.effectCompositerQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.effectCompositerQuad.material.uniforms.gammaCorrection.value=this.autosetGamma?this.renderToScreen:this.configuration.gammaCorrection,this.effectCompositerQuad.material.uniforms.tDiffuse.value=this.accumulationRenderTarget.texture,this.effectCompositerQuad.material.uniforms.color.value=this._c.copy(this.configuration.color).convertSRGBToLinear(),this.effectCompositerQuad.material.uniforms.colorMultiply.value=this.configuration.colorMultiply,this.effectCompositerQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new t),this.effectCompositerQuad.material.uniforms.fog.value=!!this.scene.fog,this.scene.fog&&(this.scene.fog.isFog?(this.effectCompositerQuad.material.uniforms.fogExp.value=!1,this.effectCompositerQuad.material.uniforms.fogNear.value=this.scene.fog.near,this.effectCompositerQuad.material.uniforms.fogFar.value=this.scene.fog.far):this.scene.fog.isFogExp2?(this.effectCompositerQuad.material.uniforms.fogExp.value=!0,this.effectCompositerQuad.material.uniforms.fogDensity.value=this.scene.fog.density):console.error(`Unsupported fog type ${this.scene.fog.constructor.name} in SSAOPass.`)),e.setRenderTarget(this.outputTargetInternal),this.effectCompositerQuad.render(e),e.setRenderTarget(this.renderToScreen?null:s),this.copyQuad.material.uniforms.tDiffuse.value=this.outputTargetInternal.texture,this.copyQuad.render(e),this.debugMode&&(i.endQuery(o.TIME_ELAPSED_EXT),Ma(a,i,this)),e.xr.enabled=r}enableDebugMode(){this.debugMode=!0}disableDebugMode(){this.debugMode=!1}setDisplayMode(e){this.configuration.renderMode=["Combined","AO","No AO","Split","Split AO"].indexOf(e)}setQualityMode(e){"Performance"===e?(this.configuration.aoSamples=8,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Low"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Medium"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=12):"High"===e?(this.configuration.aoSamples=64,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=6):"Ultra"===e&&(this.configuration.aoSamples=64,this.configuration.denoiseSamples=16,this.configuration.denoiseRadius=6)}}Uint8Array.from(atob(Ta),(e=>e.charCodeAt(0)));const Ca="EffectPass";class Da{constructor(e,t,n){this.renderer=e,this.scene=t,this.camera=n,this.passesMap=new Map,this.effectsMap=new Map,this.effectsNeedsUpdate=!0,this.effectComposer=this._initEffectComposer(),this._initPasses(),this._initEffects()}updateEffectPass(){if(!this.effectsNeedsUpdate)return;this.effectsNeedsUpdate=!1;const{effectComposer:e}=this,t=e.passes.find((e=>e.name===Ca));t&&(e.removePass(t),t.dispose());const n=Array.from(this.effectsMap).filter((([,{enabled:e}])=>e)).map((([,{effect:e}])=>e)),s=new kt(this.camera,...n);s.name=Ca,s.enabled=!!n.length,this.passesMap.set(Da.CONSTANTS.effectPass,s),e.addPass(s)}updateCamera(e){const{effectComposer:t}=this;t.setMainCamera(e),this.effectsMap.forEach((({effect:t})=>t.mainCamera=e))}_initEffectComposer(){return new Nt(this.renderer,{multisampling:8,frameBufferType:c})}_initPasses(){const{effectComposer:e}=this,t=this._initRenderPass(),n=this._initSSAOPass(),s=this._initEffectPass();this.passesMap.set(Da.CONSTANTS.renderPass,t),this.passesMap.set(Da.CONSTANTS.ssaoPass,n),this.passesMap.set(Da.CONSTANTS.effectPass,s),e.addPass(t),e.addPass(n),e.addPass(s)}_initRenderPass(){return new zt(this.scene,this.camera)}_initSSAOPass(){const e=new Ea(this.scene,this.camera);return e.enabled=!1,e.configuration.gammaCorrection=!1,e}_initEffectPass(){const e=new kt(this.camera);return e.name=Ca,e}_initEffects(){const{CONSTANTS:e}=Da,t=this._initSMAAEffect(),n=this._initToneMappingEffect(),s=this._initOutlineEffect(),r=this._initBloomEffect();this.effectsMap.set(e.smaaEffect,{enabled:!0,effect:t}),this.effectsMap.set(e.toneMappingEffect,{enabled:!0,effect:n}),this.effectsMap.set(e.outlineEffect,{enabled:!1,effect:s}),this.effectsMap.set(e.bloomEffect,{enabled:!1,effect:r})}_initSMAAEffect(){return new Gt({preset:Vt.HIGH,edgeDetectionMode:Ht.COLOR})}_initToneMappingEffect(){return new Wt({mode:Kt.ACES_FILMIC,resolution:256,whitePoint:16,middleGrey:.6,minLuminance:.01,averageLuminance:.001,adaptationRate:1})}_initBloomEffect(){return new qt({blendFunction:Yt.ADD})}_initOutlineEffect(){return new Qt(this.scene,this.camera,{blendFunction:Yt.SCREEN})}}Da.CONSTANTS={renderPass:"renderPass",ssaoPass:"ssaoPass",effectPass:"effectPass",smaaEffect:"smaaEffect",outlineEffect:"outlineEffect",bloomEffect:"bloomEffect",toneMappingEffect:"toneMappingEffect"};const Pa=new class{constructor(){this.workerPool=new _n(4)}generate(e,t={}){const{workerPool:n}=this;return new Promise(((r,i)=>{if(e.attributes.position instanceof _e)throw new Error("GenerateMeshBVHWorker: GLBufferAttribute are not supported for the geometry attributes.");en(e);const o=e.index?e.index.array:null,a=e.attributes.position.array;n.postMessage({index:o,position:a,options:Object.assign(Object.assign({},t),{onProgress:null,includedProgressCallback:Boolean(t.onProgress),groups:[...e.groups]})}).then((n=>{const{data:o}=n;if(o)if(o.error)i(new Error(o.error));else if(o.serialized){const{serialized:n,position:i}=o,a=Fn.deserialize(n,e,{setIndex:!1}),l=Object.assign({setBoundingBox:!1},t);if(e.attributes.position instanceof Fe?e.attributes.position.data.array=i:e.attributes.position instanceof v&&(e.attributes.position.array=i),e.index)e.index.array=n.index;else{const t=new v(n.index,1,!1);e.setIndex(t)}l.setBoundingBox&&(e.boundingBox=a.getBoundingBox(new s)),r(a)}else t.onProgress&&t.onProgress(o.progress)}))}))}dispose(){this.workerPool.dispose()}};class Ia{constructor(e){this.viewport=e,this.cameraChanging=!1,this.timer=null,this.computedGeometriesUuid=new Map,this.generateMeshBVHWorker=Pa,this.viewport.signals.cameraChange.add((()=>{this.cameraChanging=!0,this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=window.setTimeout((()=>{this.cameraChanging=!1}),1e3)}))}computeModelsBoundsTree(e={}){const{type:t="slice",force:n=!1,frameSliceCount:s=500,workerCreator:r}=e,{meshOfModelList:i}=this.viewport.scener.intersectsList,o=(e,t=(async e=>e.geometry.computeBoundsTree({setBoundingBox:!1})))=>{!n&&this.computedGeometriesUuid.has(e.geometry.uuid)||t(e).then((()=>{this.computedGeometriesUuid.set(e.geometry.uuid,e.geometry.uuid)}))};return new Promise(((e,n)=>{if("block"===t)i.forEach((e=>o(e))),e();else if("slice"===t){let t=0,n=0;const r=()=>{if(t=requestAnimationFrame(r),!this.cameraChanging){for(const e of i.slice(n,n+s))o(e),n+=1;n>=i.length&&(cancelAnimationFrame(t),e())}};r()}else if("worker"===t)if(r){this.generateMeshBVHWorker.workerPool.setWorkerCreator(r);const t=e=>this.generateMeshBVHWorker.generate(e.geometry).then((t=>t&&(e.geometry.boundsTree=t)));Promise.allSettled(i.map((e=>o(e,t)))).then((()=>e()))}else n("请设置 workerCreator")}))}dispose(){this.computedGeometriesUuid.clear(),this.generateMeshBVHWorker.dispose()}}Ys.install({THREE:e});class Aa extends Ys{constructor(e){super(e.cameraManager.mainCamera,e.interactiveContainer),this.viewport=e,this.dollySpeed=.2,this.azimuthRotateSpeed=.5,this.polarRotateSpeed=.5,this.truckSpeed=1,this.draggingSmoothTime=.1}setOptions(e){Object.assign(this,e)}}class La{constructor(e){this.viewport=e,this.touchLongUpMaxInterval=800,this.isTouchLongPressAsTouchRightClick=!1,this.timer=null,this.touchStartEvent=null,this.touchstartTimes=[0,0],this.selectModel=null,this.selectPoi=null,this.options=e.options,this.signals=e.signals,this.container=e.container,this.dblClickMaxInterval=300,this.mouseDownTimes=[0,0],this.mouseDownEvent=null,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.addEventListeners()}_getPoiAndModel(){const{meshOfModelList:e,poiIconList:t}=this.viewport.scener.intersectsList;return[...e,...t]}_triggerSceneEventInAllObject(e,t,n=this.viewport.scener.intersectsList.getAll()){const s=this.viewport.getIntersects(t,n);if(0===s.length)return this.selectModel&&this.signals.modelHover.numListeners>0&&this.signals.modelUnHover.dispatch(this.selectModel),this.selectPoi&&this.signals.poiHover.numListeners>0&&this.signals.poiUnHover.dispatch(this.selectPoi),this.selectModel=null,this.selectPoi=null,void("click"===e&&this.signals.sceneClick.dispatch({type:e,event:t}));const r={object:null,type:null,point:null},i=[],a=[];function l(e){return e.parent?"Model"===e.parent.stype?e.parent:l(e.parent):void 0}s.forEach((e=>{if(e.object.parent instanceof Xa){const t=e.object.parent;r.object||(r.type="Poi",r.object=e.object,r.point=e.point);-1===i.findIndex((e=>e.poi.uuid===t.uuid))&&i.push({poi:t,sourceData:e})}else if(e.object instanceof o){const t=l(e.object);t&&(r.object||(r.type="Model",r.object=e.object,r.point=e.point),a.push({model:t,sourceData:e}))}})),"click"===e&&r.point&&this.signals.selectPosition.dispatch(r.point);const c=e.slice(0,1).toUpperCase()+e.slice(1),h=(t,n,s,r)=>{if(t){if("Hover"===c)return void((null==s?void 0:s.uuid)!==t.uuid&&(this.signals[n].dispatch(r),this[`select${t.stype}`]=t));const i=t[`on${c}`];i?i(t):t.isEventPropagation=!0,t.isEventPropagation&&(this.signals[n].dispatch(r),t.isEventPropagation=!1),"hover"!==e&&t.dispatchEvent({type:e})}},u=e=>{const{model:n}=e[0];h(n,`model${c}`,this.selectModel,{target:n,currentTarget:r.object,intersects:e,event:t})},d=e=>{const{poi:n}=e[0];h(n,`poi${c}`,this.selectPoi,{target:n,event:t})};if("Hover"===c){if(a.length>0){const[{model:e}]=a;this.selectModel&&this.selectModel.uuid!==e.uuid&&(this.signals.modelUnHover.dispatch(this.selectModel),this.selectModel=null)}if(i.length>0){const[{poi:e}]=i;this.selectPoi&&this.selectPoi.uuid!==e.uuid&&(this.signals.poiUnHover.dispatch(this.selectPoi),this.selectPoi=null)}}"Model"===r.type?u(a):"Poi"===r.type&&d(i)}handleMouseDown(e){this.mouseDownEvent=e,this.signals.mouseDown.dispatch(e),0===this.mouseDownTimes[0]?this.mouseDownTimes[0]=performance.now():0===this.mouseDownTimes[1]&&(this.mouseDownTimes[1]=performance.now()),this.container.addEventListener("mouseup",this.handleMouseUp,!1)}handleMouseMove(e){this.signals.mouseMove.dispatch(e),this.options.hoverEnabled&&this._triggerSceneEventInAllObject("hover",e,this._getPoiAndModel())}handleMouseUp(e){var t,n,s,r;this.signals.mouseUp.dispatch(e);const i=e.offsetX-(null!==(n=null===(t=this.mouseDownEvent)||void 0===t?void 0:t.offsetX)&&void 0!==n?n:0),o=e.offsetY-(null!==(r=null===(s=this.mouseDownEvent)||void 0===s?void 0:s.offsetY)&&void 0!==r?r:0);if(Math.abs(i)>2||Math.abs(o)>2)return this.mouseDownTimes[0]=0,void(this.mouseDownTimes[1]=0);setTimeout((()=>{0!==this.mouseDownTimes[0]&&0===this.mouseDownTimes[1]?0===e.button?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):2===e.button&&(this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e,this._getPoiAndModel())):0!==this.mouseDownTimes[0]&&0!==this.mouseDownTimes[1]&&(this.mouseDownTimes[1],this.mouseDownTimes[0],this.dblClickMaxInterval),this.mouseDownTimes[0]=0,this.mouseDownTimes[1]=0}),this.dblClickMaxInterval),this.container.removeEventListener("mouseup",this.handleMouseUp,!1)}handleDblClick(e){this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e,this._getPoiAndModel())}handleMouseWheel(e){this.signals.mouseWheel.dispatch(e)}handleTouchStart(e){0===this.touchstartTimes[0]?this.touchstartTimes[0]=performance.now():0===this.touchstartTimes[1]&&(this.touchstartTimes[1]=performance.now()),this.touchStartEvent=e,this.timer&&clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.isTouchLongPressAsTouchRightClick=!0}),this.touchLongUpMaxInterval),this.container.addEventListener("touchend",this.handleTouchEnd,{once:!0})}handleTouchEnd(e){var t,n,s,r;this.timer&&clearTimeout(this.timer);const i=()=>{this.isTouchLongPressAsTouchRightClick=!1,this.touchstartTimes[0]=0,this.touchstartTimes[1]=0},o=e.changedTouches[0].clientX-(null!==(n=null===(t=this.touchStartEvent)||void 0===t?void 0:t.changedTouches[0].clientX)&&void 0!==n?n:0),a=e.changedTouches[0].clientY-(null!==(r=null===(s=this.touchStartEvent)||void 0===s?void 0:s.changedTouches[0].clientY)&&void 0!==r?r:0);Math.abs(o)>2||Math.abs(a)>2?i():this.isTouchLongPressAsTouchRightClick?(i(),this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e,this._getPoiAndModel())):setTimeout((()=>{0!==this.touchstartTimes[0]&&0===this.touchstartTimes[1]?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):0!==this.touchstartTimes[0]&&0!==this.touchstartTimes[1]&&this.touchstartTimes[1]-this.touchstartTimes[0]<=this.dblClickMaxInterval&&(this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e,this._getPoiAndModel())),i()}),this.dblClickMaxInterval)}handleContextmenu(e){e.preventDefault()}handleKeyDown(e){this.signals.keyDown.dispatch(e)}handleKeyUp(e){this.signals.keyUp.dispatch(e)}addEventListeners(){this.container.addEventListener("mousedown",this.handleMouseDown,!1),this.container.addEventListener("mousemove",this.handleMouseMove,!1),this.container.addEventListener("dblclick",this.handleDblClick,!1),this.container.addEventListener("wheel",this.handleMouseWheel,{passive:!0}),this.container.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),this.container.addEventListener("contextmenu",this.handleContextmenu,!1),document.addEventListener("keydown",this.handleKeyDown,!1),document.addEventListener("keyup",this.handleKeyUp,!1)}removeEventListeners(){this.container.removeEventListener("mousedown",this.handleMouseDown),this.container.removeEventListener("mousemove",this.handleMouseMove),this.container.removeEventListener("dblclick",this.handleDblClick),this.container.removeEventListener("wheel",this.handleMouseWheel),this.container.removeEventListener("touchstart",this.handleTouchStart),this.container.removeEventListener("contextmenu",this.handleContextmenu),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}dispose(){this.removeEventListeners()}}class ja{constructor(e,t){this.scene=e,this.signals=t;const n=document.createElement("div");n.style.position="absolute",n.style.left="12px",n.style.bottom="12px",n.style.fontSize="12px",n.style.color="#fff",n.style.pointerEvents="none",this.container=n,this.state={objects:0,meshes:0,vertices:0,triangles:0,frametime:0}}addListeners(){const{scene:e,signals:t}=this;function n(e,t=!0){const n=document.createElement("span");return t&&(n.style.marginLeft="6px"),n.innerText=e,n}function s(){return document.createElement("br")}const r=n("0"),i=n("0"),o=n("0"),a=n("0"),l=n("0");this.container.appendChild(n("objects",!1)),this.container.appendChild(r),this.container.appendChild(s()),this.container.appendChild(n("meshes",!1)),this.container.appendChild(i),this.container.appendChild(s()),this.container.appendChild(n("vertices",!1)),this.container.appendChild(a),this.container.appendChild(s()),this.container.appendChild(n("triangles",!1)),this.container.appendChild(o),this.container.appendChild(s()),this.container.appendChild(n("frametime",!1)),this.container.appendChild(l),this.container.appendChild(s());const c=()=>{this.state.objects=0,this.state.meshes=0,this.state.vertices=0,this.state.triangles=0;for(let t=0,n=e.children.length;t<n;t++){e.children[t].traverse((e=>{this.state.objects++;const t=e.geometry;(e.isMesh||e.isPoints)&&t.attributes.position&&(this.state.meshes++,this.state.vertices+=t.attributes.position.count,e.isMesh&&(null!==t.index?this.state.triangles+=t.index.count/3:this.state.triangles+=t.attributes.position.count/3))}))}r.innerText=""+~~this.state.objects,i.innerText=""+~~this.state.meshes,a.innerText=""+~~this.state.vertices,o.innerText=""+~~this.state.triangles};t.objectAdded.add(c),t.objectRemoved.add(c),t.geometryChanged.add(c);t.sceneRendered.add((e=>{this.state.frametime=e,l.innerText=Number(e).toFixed(2)+" ms"}))}}class _a extends o{constructor(e,n,s){super(),this.camera=e,this.controls=s,this.isViewHelper=!0,this.animating=!1;const r=new u("#ff3653"),i=new u("#8adb00"),o=new u("#2c8fff"),a=new u("#000000"),l={},c=[],h=new Re,d=new g,p=new Q(-2,2,2,-2,0,4);p.position.set(0,0,2);const m=new Be(.8,.05,.05).translate(.4,0,0),f=new W(m,L(r)),y=new W(m,L(i)),v=new W(m,L(o));y.rotation.z=Math.PI/2,v.rotation.y=-Math.PI/2,this.add(f),this.add(v),this.add(y);const w=j(r),b=j(i),x=j(o),T=j(a),S=new Ue(w),O=new Ue(b),M=new Ue(x),E=new Ue(T),C=new Ue(T),D=new Ue(T);S.userData.type="right",O.userData.type="top",M.userData.type="front",E.userData.type="left",C.userData.type="bottom",D.userData.type="back",S.position.x=1,O.position.y=1,M.position.z=1,E.position.x=-1,E.scale.setScalar(.8),C.position.y=-1,C.scale.setScalar(.8),D.position.z=-1,D.scale.setScalar(.8),this.add(S),this.add(O),this.add(M),this.add(E),this.add(C),this.add(D),c.push(S),c.push(O),c.push(M),c.push(E),c.push(C),c.push(D);const P=new t,I=new te,A=128;function L(e){return new ke({color:e,toneMapped:!1})}function j(e,t){const{font:n="24px Arial",color:s="#000000",radius:r=16}=l,i=document.createElement("canvas");i.width=64,i.height=64;const o=i.getContext("2d");o.beginPath(),o.arc(32,32,r,0,2*Math.PI),o.closePath(),o.fillStyle=e.getStyle(),o.fill(),t&&(o.font=n,o.textAlign="center",o.fillStyle=s,o.fillText(t,32,41));const a=new Ne(i);return a.colorSpace=$,new ze({map:a,toneMapped:!1})}function _(){var e,t,n;null===(e=S.material.map)||void 0===e||e.dispose(),null===(t=O.material.map)||void 0===t||t.dispose(),null===(n=M.material.map)||void 0===n||n.dispose(),S.material.dispose(),O.material.dispose(),M.material.dispose(),S.material=j(r,l.labelX),O.material=j(i,l.labelY),M.material=j(o,l.labelZ)}this.setLabels=function(e,t,n){l.labelX=e,l.labelY=t,l.labelZ=n,_()},this.setLabelStyle=function(e,t,n){l.font=e,l.color=t,l.radius=n,_()},this.render=function(e){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld(),P.set(0,0,1),P.applyQuaternion(this.camera.quaternion),P.x>=0?(S.material.opacity=1,E.material.opacity=.5):(S.material.opacity=.5,E.material.opacity=1),P.y>=0?(O.material.opacity=1,C.material.opacity=.5):(O.material.opacity=.5,C.material.opacity=1),P.z>=0?(M.material.opacity=1,D.material.opacity=.5):(M.material.opacity=.5,D.material.opacity=1);const t=n.offsetWidth-A;e.clearDepth(),e.getViewport(I),e.setViewport(t,0,A,A),e.render(this,p),e.setViewport(I.x,I.y,I.z,I.w)},this.handleClick=async function(e){if(!0===this.animating)return!1;const t=n.getBoundingClientRect(),r=t.left+(n.offsetWidth-A),i=t.top+(n.offsetHeight-A);d.x=(e.clientX-r)/(t.right-r)*2-1,d.y=-(e.clientY-i)/(t.bottom-i)*2+1,h.setFromCamera(d,p);const o=h.intersectObjects(c);if(o.length>0){const e=o[0].object,{type:t}=e.userData,n=ca[t.toLocaleUpperCase()];return n&&(s.normalizeRotations(),this.animating=!0,await s.rotateTo(n.theta,n.phi,!0),this.animating=!1),!0}return!1},this.dispose=function(){var e,t,n,s,r,i;m.dispose(),f.material.dispose(),y.material.dispose(),v.material.dispose(),null===(e=S.material.map)||void 0===e||e.dispose(),null===(t=O.material.map)||void 0===t||t.dispose(),null===(n=M.material.map)||void 0===n||n.dispose(),null===(s=E.material.map)||void 0===s||s.dispose(),null===(r=C.material.map)||void 0===r||r.dispose(),null===(i=D.material.map)||void 0===i||i.dispose(),S.material.dispose(),O.material.dispose(),M.material.dispose(),E.material.dispose(),C.material.dispose(),D.material.dispose()}}}const Fa={needsUpdate:!1};let Ra=0,Ba=0;const Ua=e=>{e instanceof d&&e.dispose()};class ka{constructor(e,t,n){this.options=e,this.signals=t,this.cache=n,this.clock=new Ge,this.raycaster=new Re,this.sky=null,this.resizeObserver=new ResizeObserver(ei((()=>{this.signals.windowResize.dispatch()}))),this.options=e,this.state={useFreq:1,delta:0,enabledPostprocessing:!0,isPausedRender:!1,isDisposed:!1},this.scener=new Fo(this.signals,this.state),this.scene=this.scener.scene,this.cameraManager=new ma(this),this.camera=this.cameraManager.currentCamera,this.rendererManager=new $o(this),this.container=this.rendererManager.container,this.interactiveContainer=this.rendererManager.interactiveContainer,this.renderer=this.rendererManager.renderer,this.rendererCSS3D=this.rendererManager.rendererCSS3D,this.rendererCSS2D=this.rendererManager.rendererCSS2D,this.pmremGenerator=new Ve(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.effectManager=new Da(this.renderer,this.scene,this.camera),this.effectComposer=this.effectManager.effectComposer,this.bvh=new Ia(this),this.controls=new Aa(this),this.info=new ja(this.scene,this.signals),this.stats=new Zt,this.mixer=new He(this.scene),this.clipsSet=new Set,this.postUpdate=new Map,this.postRender=new Map,this._loop=0,this.viewHelper=new _a(this.camera,this.container,this.controls),this.viewHelper.setLabels("x","y","z"),this.eventHandler=new La(this),this.resizeObserver.observe(this.container),this._initInfo(),this._initStats(),this._signalsEventListenr(),this.animate(0)}_initInfo(){if(this.options.showInfo){this.info.addListeners();const{container:e}=this.info;e.style.zIndex="1",this.container.appendChild(e)}}_initStats(){if(this.options.showStats){const{dom:e}=this.stats;e.style.zIndex="1",this.container.appendChild(e),this.signals.sceneRendered.add((()=>{this.stats.update()}))}}setAutoInstancing(e){this.renderer.autoInstancing=e}setBloom(e={}){var t;const{enabled:n=!0,mipmapBlur:s=!0,radius:r=.85,intensity:i=3,threshold:o=1,smoothing:a=.01,scalar:l=2,opacity:c=1,selection:h=[]}=e,{effectManager:u}=this,d=u.effectsMap.get(Da.CONSTANTS.bloomEffect);d.enabled!==n&&(d.enabled=n,u.effectsNeedsUpdate=!0);const{effect:p}=d;p.intensity=i;const{mipmapBlurPass:m,renderTarget:f}=p;m.enabled=s,m.radius=r;const g=p.uniforms.get("map");g&&(g.value=s?m.texture:f.texture),p.luminanceMaterial.threshold=o,p.luminanceMaterial.smoothing=a,p.blendMode.opacity.value=c,null===(t=p.luminanceMaterial.userData.bloomSelection)||void 0===t||t.forEach((e=>{e.toneMapped=!0,e.userData.prevEmissive&&(e.emissive.copy(e.userData.prevEmissive),Reflect.deleteProperty(e.userData,"prevEmissive"))})),p.luminanceMaterial.userData.bloomSelection=new Set,n&&h.forEach((e=>{e.traverse((e=>{e instanceof W&&e.material.color&&!p.luminanceMaterial.userData.bloomSelection.has(e.material)&&(e.material.toneMapped=!1,e.material.userData.prevEmissive=e.material.emissive.clone(),e.material.emissive.copy(e.material.color),e.material.emissive.multiplyScalar(l),p.luminanceMaterial.userData.bloomSelection.add(e.material))}))})),this.triggerRender()}setSSAO(e={}){const{enabled:t=!0,aoRadius:n=3,aoSamples:s=16,denoiseSamples:r=4,denoiseRadius:i=12,distanceFalloff:o=1,intensity:a=3,color:l="#333"}=e,{effectManager:c}=this,h=c.passesMap.get(Da.CONSTANTS.ssaoPass);h.enabled=t,h.configuration.aoRadius=n,h.configuration.aoSamples=s,h.configuration.denoiseSamples=r,h.configuration.denoiseRadius=i,h.configuration.distanceFalloff=o,h.configuration.intensity=a,l&&(h.configuration.color=new u(l)),this.triggerRender()}setColorSpace(e){this.renderer.outputColorSpace="sRGB"===e?$:de,this.signals.sceneChanged.dispatch()}setToneMapping(e={}){const{type:t="ACESFilmic",exposure:n=.8}=e,s=this.effectManager.effectsMap.get(Da.CONSTANTS.toneMappingEffect),r={Reinhard:Kt.REINHARD2_ADAPTIVE,Cineon:Kt.OPTIMIZED_CINEON,ACESFilmic:Kt.ACES_FILMIC,AGX:Kt.AGX},i={None:ee,Reinhard:qe,Cineon:Ye,ACESFilmic:Qe,AGX:Xe},o="None"!==t;s.enabled!==o&&(s.enabled=o,this.effectManager.effectsNeedsUpdate=!0),o&&(s.effect.mode=r[t]),this.renderer.toneMappingExposure=n,this.renderer.toneMapping=i[t],this.signals.sceneChanged.dispatch()}async setSphereSkyBackground(e){const t=await wr({file:e});Ua(this.scene.background),this.scene.background=t,this.signals.backgroundChanged.dispatch()}async setSkyBackground(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]){const n=await wr({path:e,file:t});Ua(this.scene.background),this.scene.background=n,this.signals.backgroundChanged.dispatch()}setBackgroundColor(e){Ua(this.scene.background),this.scene.background=new u(e),this.signals.backgroundChanged.dispatch()}setBackgroundColorAlpha(e,t){Ua(this.scene.background),this.scene.background=null,this.renderer.setClearColor(new u(e),t),this.signals.backgroundChanged.dispatch()}async setBackgroundImage(e){const t=await wr({file:e});t.mapping=We,this.scene.background=t,this.signals.backgroundChanged.dispatch()}setSky(e={}){const{enabled:n=!0,position:s={x:0,y:0,z:0},scalar:r=45e4,turbidity:i=10,rayleigh:o=3,elevation:a=2,azimuth:l=180}=e;if(!n)return void this.closeSky();this.sky||(this.sky=new Jt,this.scene.add(this.sky)),this.sky.name="sky",this.sky.position.set(s.x,s.y,s.z),this.sky.scale.setScalar(r);const c=this.sky.material.uniforms;c.turbidity.value=i,c.rayleigh.value=o,c.mieCoefficient.value=.005,c.mieDirectionalG.value=.7;const h=new t,u=ar(90-a),d=ar(l);return h.setFromSphericalCoords(1,u,d),c.sunPosition.value.copy(h),this.signals.objectAdded.dispatch(),this.sky}closeSky(){return!!this.sky&&(this.sky.removeFromParent(),this.sky=null,this.signals.objectRemoved.dispatch(),!0)}screenshot(){return new Promise((e=>{this.renderer.domElement.toBlob((t=>{e(t)}))}))}async setEnvironment(e){if(e){const{path:t,file:n,background:s}=e,r=await wr({path:t,file:n});this.scene.environment=r instanceof Ke?this.pmremGenerator.fromCubemap(r).texture:this.pmremGenerator.fromEquirectangular(r).texture,s&&(Ua(this.scene.background),this.scene.background=r)}else this.scene.environment=this.pmremGenerator.fromScene(new Xt,.04).texture;return this.signals.sceneChanged.dispatch(),this.scene.environment}playModelAnimation(e,t){let n;if(t instanceof A?n=t:Hr(t)?n=e.animations[t]:qr(t)&&(n=e.animations.find(t)),!n)return;const s=go(this.mixer.clipAction(n,e));return s.play(),this.clipsSet.add(n),s}stopModelAnimation(e,t){var n;let s;t instanceof A?s=t:Hr(t)?s=e.animations[t]:qr(t)&&(s=e.animations.find(t)),s&&(null===(n=this.mixer.existingAction(s,e))||void 0===n||n.stop(),this.mixer.uncacheAction(s,e),this.clipsSet.delete(s))}async render(e){return await(null==e?void 0:e()),new Promise((e=>{this.signals.sceneRendered.addOnce(e),this.triggerRender()}))}triggerRender(e=1){this.state.useFreq=e}async setPauseRender(e=!0){if(this.state.isPausedRender=e,!1===e)return this.render()}_passesObserver(){this.effectManager.updateEffectPass()}autoRender(){if((!(this.state.useFreq<=0)||Fa.needsUpdate)&&(this.state.useFreq>0&&this.state.useFreq--,Fa.needsUpdate&&(Fa.needsUpdate=!1),!this.state.isPausedRender)){if(Ra=performance.now(),this.signals.beforeRender.dispatch(),this._passesObserver(),this.renderer.info.reset(),this.state.enabledPostprocessing?this.effectComposer.render(this.state.delta):(this.renderer.clear(),this.renderer.render(this.scene,this.camera)),this.rendererCSS2D&&this.rendererManager.internalOptions.enableRenderCss2D&&this.rendererCSS2D.render(this.cache.classified.PoiNode,this.camera),this.rendererCSS3D&&this.rendererManager.internalOptions.enableRenderCss3D&&this.rendererCSS3D.render(this.cache.classified.PoiNode,this.camera),this.options.showViewHelper){const e=this.renderer.clippingPlanes;this.renderer.clippingPlanes=[],this.viewHelper.render(this.renderer),this.renderer.clippingPlanes=e}this.postRender.forEach((e=>e())),Ba=performance.now(),this.signals.sceneRendered.dispatch(Ba-Ra)}}animate(e){this._loop=requestAnimationFrame((e=>{this.animate(e)}));const t=this.clock.getDelta();this.state.delta=t,this.clipsSet.size>0&&(this.mixer.update(t),this.signals.modelAnimation.dispatch()),jt.update(e)&&this.signals.tweenUpdate.dispatch(),this.controls.update(t)&&this.signals.cameraChange.dispatch(),this.postUpdate.forEach((t=>t(e))),this.autoRender(),this.signals.getSceneInfo.dispatch(this.info.state)}getOffsetByPosition(e){const n=new t(e.x,e.y,e.z).project(this.camera),s=this.renderer.domElement.getBoundingClientRect();return{left:s.left+s.width/2*(n.x+1),top:s.top+s.height/2*(1-n.y)}}getPositionByOffset(e,n=.1,s){const r=new t(0,0,0),i=new t(0,0,0),o=this.renderer.domElement.getBoundingClientRect();return i.set(e.offsetX/o.width*2-1,-e.offsetY/o.height*2+1,n),i.unproject(this.camera),i.sub(this.camera.position).normalize(),r.copy(this.camera.position).add(i.multiplyScalar(null!=s?s:this.camera.position.length())),r}getIntersects(e,t=this.scener.intersectsList.getAll(),n={}){const{isFilterHideObject:s=!0}=n,r=this.container.getBoundingClientRect();let i={offsetX:0,offsetY:0};if(e instanceof MouseEvent)i={offsetX:e.clientX-r.left,offsetY:e.clientY-r.top};else if(e instanceof TouchEvent){const t=e.changedTouches[0];i={offsetX:t.clientX-r.left,offsetY:t.clientY-r.top}}else i=e;const o=new g;o.set(i.offsetX/r.width*2-1,-i.offsetY/r.height*2+1),this.raycaster.setFromCamera(o,this.camera);let a=[];return a=Wr(t)?this.raycaster.intersectObjects(t,!0):this.raycaster.intersectObject(t,!0),s&&(a=a.filter((({object:e})=>hr(e)))),a=a.filter((({point:e,object:t})=>{const n=this.renderer.clippingPlanes.every((t=>t.distanceToPoint(e)>0));let s=!0;const r=t;return r.material&&ti(r.material,(t=>{s&&Wr(t.clippingPlanes)&&(s=t.clippingPlanes.every((t=>t.distanceToPoint(e)>0)))})),n&&s})),a}rayClash(e=this.camera.position,n=new t(0,-1,0),s=this.scener.intersectsList.meshOfModelList){const r=new Re;return r.set(e,n),Wr(s)?r.intersectObjects(s,!0):r.intersectObject(s,!0)}clearSignals(){for(const e in this.signals)this.signals[e].removeAll()}dispose(){cancelAnimationFrame(this._loop),this.bvh.dispose(),this.mixer.stopAllAction(),this.clipsSet.forEach((e=>{this.mixer.uncacheAction(e),this.mixer.uncacheClip(e)})),this.mixer.uncacheRoot(this.scene),this.clipsSet.clear(),this.controls.dispose(),this.viewHelper.dispose(),jt.removeAll(),this.clearSignals(),this.scene.clear(),this.pmremGenerator.dispose(),this.effectComposer.dispose(),this.renderer.dispose(),this.rendererCSS2D.domElement.remove(),this.rendererCSS3D.domElement.remove(),this.renderer.forceContextLoss(),this.container.remove(),this.state.isDisposed=!0,this.eventHandler.dispose(),this.resizeObserver.disconnect()}_signalsEventListenr(){const e=()=>{const{clientWidth:e,clientHeight:t}=this.container;this.effectManager.updateCamera(this.camera),this.viewHelper.camera=this.camera,this.camera instanceof X&&(this.camera.aspect=e/t),this.camera instanceof Q&&(this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2),this.camera.updateProjectionMatrix(),this.effectComposer.setSize(e,t),this.rendererCSS3D&&this.rendererCSS3D.setSize(e,t),this.rendererCSS2D&&this.rendererCSS2D.setSize(e,t),this.triggerRender()};requestAnimationFrame((()=>{e()})),this.signals.windowResize.add(e),this.signals.cameraObjectChange.add(e);const t=()=>this.triggerRender();this.signals.sceneChanged.add(t),this.signals.backgroundChanged.add(t),this.signals.objectAdded.add(t),this.signals.objectRemoved.add(t),this.signals.objectChanged.add(t),this.signals.materialAdded.add(t),this.signals.materialRemoved.add(t),this.signals.materialChanged.add(t),this.signals.geometryChanged.add(t),this.signals.cameraChange.add(t),this.signals.tweenUpdate.add(t),this.signals.modelAnimation.add(t);this.signals.outlineChange.add((e=>{const{objects:t,options:n}=e,{color:s,hideColor:r,edgeThickness:i,edgeStrength:o}=Object.assign(Object.assign({},{color:16777215,hideColor:10066329,edgeThickness:3,edgeStrength:10}),n),{effectManager:a}=this,l=a.effectsMap.get(Da.CONSTANTS.outlineEffect),c=t.length>0;l.enabled!==c&&(l.enabled=c,a.effectsNeedsUpdate=!0);const{effect:h}=l,{uniforms:u}=h,d=[];t.forEach((e=>{e.traverse((e=>{e instanceof W&&d.push(e)}))})),h.selection.set(d),h.blur=i>0,h.blurPass.kernelSize=i;const p=u.get("visibleEdgeColor"),m=u.get("hiddenEdgeColor"),f=u.get("edgeStrength");p&&p.value.set(s),m&&m.value.set(r),f&&(f.value=o),this.triggerRender()}))}}const Na={onLoad:null,onClick:null,onDblClick:null,onRightClick:null};class za extends o{constructor(e={id:Xr()}){var t,n,s,r,i,o,a,l,c;super(),this.isEventPropagation=!1;const{id:h,name:u="",level:d={max:null,min:null},visible:p=!0,position:m={x:0,y:0,z:0},rotation:f={x:0,y:0,z:0},scale:g={x:1,y:1,z:1},userData:y={},onLoad:v,onClick:w,onDblClick:b,onRightClick:x}=Object.assign(Object.assign({},Na),e);if(void 0===h)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=h,this.name=u,this.stype="BaseObject3D",this.level=d,this.visible=null==p||p,this.handleHide=!p,this.position.set(null!==(t=m.x)&&void 0!==t?t:0,null!==(n=m.y)&&void 0!==n?n:0,null!==(s=m.z)&&void 0!==s?s:0),this.rotation.set(null!==(r=f.x)&&void 0!==r?r:0,null!==(i=f.y)&&void 0!==i?i:0,null!==(o=f.z)&&void 0!==o?o:0),this.scale.set(null!==(a=g.x)&&void 0!==a?a:1,null!==(l=g.y)&&void 0!==l?l:1,null!==(c=g.z)&&void 0!==c?c:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=y,this.onLoad=(null==v?void 0:v.bind(this))||null,this.onClick=(null==w?void 0:w.bind(this))||null,this.onDblClick=(null==b?void 0:b.bind(this))||null,this.onRightClick=(null==x?void 0:x.bind(this))||null}eventPropagation(){this.isEventPropagation=!0}show(){this.visible=!0,this.handleHide=!1,Fa.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Fa.needsUpdate=!0}setMove(e,t,n,s){return ri(this.position,sr(e),t,n,s)}setRotate(e,t,n,s){return ri(this.rotation,rr(e),t,n,s)}setScale(e,t,n,s){return ri(this.scale,sr(e),t,n,s)}getBoundingBox(){return ir(this)}getSpaceAttribute(e=!0){return lr(this,e)}syncSpaceAttribute(e,t=!0){cr(this,e,t)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class Ga extends W{constructor(e={id:Xr()},t,n){var s,r,i,o,a,l,c,h,u;super(t,n);const{id:d,name:p="",level:m={max:null,min:null},visible:f=!0,position:g={x:0,y:0,z:0},rotation:y={x:0,y:0,z:0},scale:v={x:1,y:1,z:1},userData:w={}}=e;if(void 0===d)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=d,this.name=p,this.stype="BaseMesh",this.level=m,this.visible=null==f||f,this.handleHide=!f,this.position.set(null!==(s=g.x)&&void 0!==s?s:0,null!==(r=g.y)&&void 0!==r?r:0,null!==(i=g.z)&&void 0!==i?i:0),this.rotation.set(null!==(o=y.x)&&void 0!==o?o:0,null!==(a=y.y)&&void 0!==a?a:0,null!==(l=y.z)&&void 0!==l?l:0),this.scale.set(null!==(c=v.x)&&void 0!==c?c:1,null!==(h=v.y)&&void 0!==h?h:1,null!==(u=v.z)&&void 0!==u?u:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=w}show(){this.visible=!0,this.handleHide=!1,Fa.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Fa.needsUpdate=!0}setMove(e,t,n,s){return ri(this.position,sr(e),t,n,s)}setRotate(e,t,n,s){return ri(this.rotation,rr(e),t,n,s)}setScale(e,t,n,s){return ri(this.scale,sr(e),t,n,s)}getBoundingBox(){return ir(this)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class Va extends za{constructor(e){super(e),this.stype="Group"}showAllChild(){this.children.forEach((e=>{e instanceof za&&e.show()}))}hideAllChild(){this.children.forEach((e=>{e instanceof za&&e.hide()}))}}class Ha extends za{constructor(e){super(e),this.stype="PluginObject"}}function Wa(e){return"2d"===e||"2D"===e}function Ka(e){return"2.5d"===e||"2.5D"===e}function qa(e){return"3D"===e||"3d"===e}class Ya extends za{constructor(e){super(e),this.stype="PoiNode";const{type:t="2D",element:n=document.createElement("div"),elementAutoDisplay:s=!0,occlude:r=!1,occludeThrottle:i=0,onChange:o,scaleFixed:a=null}=null!=e?e:{};this.elementType=t,this.element=n,this.elementAutoDisplay=s,this.occlude=r,this.occludeThrottle=i,this.onChange=o,this.scaleFixed=a,this.create(t)}create(e){Wa(e)?this._create2D():Ka(e)?this._create2DHalf():qa(e)&&this._create3D()}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,r=new t,i=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(i),r.add(i),new s(n,r)}_create2D(){this.add(new Ro(this.element))}_create2DHalf(){this.add(new qo(this.element))}_create3D(){this.add(new Ko(this.element))}}class Qa extends za{constructor(e){super(e),this.stype="Model";const{format:t}=null!=e?e:{};this.formatType=t}setEnvMap(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"],n={}){wr({path:e,file:t}).then((e=>{this.traverse((t=>{if(t instanceof W&&t.material instanceof Y){const{reflectivity:s=.5}=n;t.material.envMap=e,t.material.envMapIntensity=s,Fa.needsUpdate=!0}}))}))}copy(e,t){return super.copy(e,t),this.formatType=e.formatType,this}}class Xa extends za{constructor(e){super(e),this.stype="Poi";const{type:t,scaleFixed:n=null}=null!=e?e:{};this.iconType=t,this.scaleFixed=n,this.renderOrder=11}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,r=new t,i=new t(e,e,e);return n.copy(this.position),r.copy(this.position),n.sub(i),r.add(i),new s(n,r)}copy(e,t=!1){var n,s;return super.copy(e,t),this.icon=null===(n=e.icon)||void 0===n?void 0:n.clone(),this.text=null===(s=e.text)||void 0===s?void 0:s.clone(),this.clear(),this.icon&&this.add(this.icon),this.text&&this.add(this.text),this.iconType=e.iconType,this.scaleFixed=e.scaleFixed,this}}const Za={position:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}};class Ja extends Ue{constructor(e,t){super(e),this.stype="Icon";const{position:n,scale:s}=Object.assign(Object.assign({},Za),t);this.position.set(n.x,n.y,n.z),this.scale.set(s.x,s.y,s.z),this.renderOrder=1}}class $a extends Ga{constructor(e){const{radius:t=10,color:n=16777215,opacity:s=1,gradient:r}=null!=e?e:{};super(e),this.params=e,this.material=new Y,this.updateGeometry(t),this.updateMaterialOpacity(s),this.updateMaterial(n,r),this.stype="Point"}updateGeometry(e){this.geometry.dispose(),this.geometry=new Ze(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:s,gradient:r}=e,i=this.material;t&&(i.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==s&&(this.geometry=new Ze(s,32,32)),r&&(i.map=br(r)),this.params&&Object.assign(this.params,e),i.needsUpdate=!0,Fa.needsUpdate=!0}}class el extends $a{constructor(e){super(e),this.graphs=[],this.stype="Node",e&&(this.graphs=e.graphs)}}class tl extends Ga{constructor(e){const{radius:t=50,color:n=16777215,opacity:s=1,gradient:r}=null!=e?e:{};super(e),this.params=e,this.material=new Y({side:le}),this.updateGeometry(t),this.updateMaterialOpacity(s),this.updateMaterial(n,r),this.stype="Circle",this.rotation.set(-Math.PI/2,0,0)}updateGeometry(e){this.geometry.dispose(),this.geometry=new Je(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:s,gradient:r}=e,i=this.material;t&&(i.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==s&&this.updateGeometry(s),r&&(i.map=br(r)),this.params&&Object.assign(this.params,e),i.needsUpdate=!0,Fa.needsUpdate=!0}}const nl=new Map;class sl extends Ga{constructor(e){const{start:t,end:n,imgUrl:s,color:r,transparent:i=!1,passable:o=0}=null!=e?e:{};super(e,void 0,void 0),this.params=e,this.geometry=new w,this.material=new Y({side:le}),this.passable=0,this.stype="Link",r&&this.material.color.set(r),this.material.transparent=i,this.material.depthWrite=!i,this.material.flatShading=!0;const a=this.createTexture(s);a&&(this.material.map=a),t&&n&&this.updateGeometry({start:t,end:n}),this.passable=o,this.addEventListener("removed",(()=>{this.geometry.dispose(),this.material.dispose(),null==a||a.dispose()}))}updateGeometry(e){this.params&&Object.assign(this.params,e),this.computeVertex();const t=this.material.map;t&&this.computeTextureRepeat(t)}computeVertex(){if(!this.params)return;const{start:e,end:n,width:s}=this.params,r=sr(e),i=sr(n),o=(new t).addVectors(r,i).divideScalar(2),a=r.distanceTo(i),l=new y;this.geometry.dispose(),this.geometry=new $e(s,a),this.geometry.rotateX(-Math.PI/2),l.lookAt(r,o,this.up),this.position.copy(o),this.quaternion.setFromRotationMatrix(l)}computeTextureRepeat(e){if(this.params&&e.image){const{start:t,end:n,width:s}=this.params,r=sr(t),i=sr(n),o=r.distanceTo(i)/(s*(e.image.height/e.image.width));e.repeat.set(-1,o)}}createTexture(e){if(e){const t=nl.get(e);if(t){return t.clone()}const n=Pr.load(e,(()=>{n.wrapS=Pe,n.wrapT=Pe,n.anisotropy=16,this.computeTextureRepeat(n),nl.set(e,n),Fa.needsUpdate=!0}));return n}}}class rl extends za{constructor(e){super(e),this.nodes=[],this.links=[],this.linksImgAnimation=null,this.info={type:"line",nodes:[],id:Xr()},this.stype="Topology";const{type:t="line"}=null!=e?e:{};this.topologyType=t,e&&(this.info=e),this.create(),this.addEventListener("removed",(()=>{var e;null===(e=this.linksImgAnimation)||void 0===e||e.stop(),this.linksImgAnimation=null}))}create(){var e;const{nodes:t,renderLink:n=!0,linkWidth:s=20,linkColor:r=65280,renderNode:i=!0,nodeColor:o=255,nodeRadius:a=s/2,imgUrl:l,animation:c=!1}=this.info,h=[];for(const c of t){const t=this.createNode(Object.assign(Object.assign({},c),{radius:a,color:o}));if(!1===i&&t.hide(),this.nodes.push(t),!l&&n&&!i){const n=il(r,null===(e=t.graphs[0])||void 0===e?void 0:e.passable);this.createCircle({id:`${c.id}_circle`,name:`${c.name||c.id}_circle`,position:c.position,radius:s/2,color:n})}if(n)for(let e=0;e<c.graphs.length;e++){const{linkInfo:t,targetNodeId:n,passable:i}=c.graphs[e],{id:o,name:a}=t,u=this.info.nodes.find((e=>e.id===n));if(!h.includes(o)&&u){h.push(o);const e=il(r,i),t=this.createLink({id:o,name:a,start:c.position,end:u.position,width:s,color:e,imgUrl:l,transparent:!!l,passable:i,userData:{startNodeId:c.id,endNodeId:u.id}});this.links.push(t)}}}this.updateLinksImgAnimation({imgUrl:l,animation:c})}createNode(e){const t=new el(Object.assign({},e));return this.add(t),t}createCircle(e){const t=new tl(Object.assign(Object.assign({},e),{rotation:{x:Math.PI/2,y:0,z:0}}));return this.add(t),t}createLink(e){const t=new sl(Object.assign({},e));return this.add(t),t}updateLinksImgAnimation(e={}){var t;const{imgUrl:n,animation:s}=e;if(n&&!this.linksImgAnimation){let e=null;Vr(s)&&s?e={repeat:!0,duration:500}:Kr(s)&&Hr(s.duration)&&s.duration>0&&(e=Object.assign({repeat:!0},s)),e&&ri(new g(0,0),new g(0,-1),e,(e=>{this.links.forEach((t=>{var n;null===(n=t.material.map)||void 0===n||n.offset.copy(e)}))}),(e=>{var t;null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=e})).catch((()=>{}))}n||(null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=null)}resetNodes(e){const{linkWidth:t=20,renderNode:n=!0,nodeColor:s=255,nodeRadius:r=t/2}=this.info,i=[...this.info.nodes];this.info.nodes=[...e];const o=[];for(let t=0;t<i.length;t++){const n=e.find((e=>e.id===i[t].id));n&&sr(n.position).equals(sr(i[t].position))||o.push(i[t])}for(let e=0;e<o.length;e++){const t=this.nodes.findIndex((t=>o[e].id===t.sid));this.remove(this.nodes[t]),this.nodes.splice(t,1)}const a=[];for(let t=0;t<e.length;t++){const n=i.find((n=>n.id===e[t].id));n&&sr(n.position).equals(sr(e[t].position))||a.push(e[t])}for(let e=0;e<a.length;e++){const t=this.createNode(Object.assign(Object.assign({},a[e]),{radius:r,color:s}));!1===n&&t.hide(),this.nodes.push(t)}this.updateLinks()}updateLinks(){const{renderLink:e=!0,linkWidth:t=20,linkColor:n=65280,imgUrl:s,animation:r=!1}=this.info,i=new Map,o=new Map;this.info.nodes.forEach((e=>{o.set(e.id,e)}));const a=[...this.links];for(const r of this.info.nodes)if(e)for(let e=0;e<r.graphs.length;e++){const{linkInfo:l,targetNodeId:c,passable:h}=r.graphs[e],{id:u,name:d}=l,p=o.get(c);if(!i.has(u)&&p){i.set(u,u);const e=il(n,h),o={id:u,name:d,start:r.position,end:p.position,width:t,color:e,imgUrl:s,transparent:!!s,passable:h},l=a.find((e=>e.sid===u));if(l)l.updateGeometry({start:o.start,end:o.end}),e&&l.material.color.set(e),l.passable=h;else{const e=this.createLink(o);this.links.push(e)}}}a.forEach((e=>{if(!1===i.has(e.sid)){const t=this.links.findIndex((t=>t===e));t>-1&&(e.removeFromParent(),this.links.splice(t,1))}})),this.updateLinksImgAnimation({imgUrl:s,animation:r})}getLength(){let e=0;for(let n=1;n<this.nodes.length;n++)e+=this.nodes[n].getWorldPosition(new t).distanceTo(this.nodes[n-1].getWorldPosition(new t));return e}}function il(e,t){return Wr(e)?e[t]?e[t]:e[0]:e}class ol extends Ga{constructor(e){const{points:t=[],width:n=20,color:s=16777215,opacity:r=1,gradient:i}=null!=e?e:{};super(e),this.params=e,this.material=new Y({side:le,flatShading:!0}),this.updateGeometry(t,n),this.updateMaterialOpacity(r),this.updateMaterial(s,i),this.stype="Line"}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}updateGeometry(e,n){if(e.length<2)return;const s=n/2;let r=[],i=[];for(let n=0;n<e.length-1;n++){const o=sr(e[n]),a=sr(e[n+1]),l=new t,c=new t,h=new y,u=this.up.clone();h.lookAt(o,a,this.up),u.applyMatrix4(h),l.subVectors(a,o),l.normalize(),c.crossVectors(l,u);const d=new t(c.x*s,c.y*s,c.z*s),p=new t(-c.x*s,-c.y*s,-c.z*s),m=new t;m.addVectors(o,d);const f=new t;f.addVectors(o,p);const g=new t;g.addVectors(a,p);const v=new t;v.addVectors(a,d),r=[...r,m.x,m.y,m.z,f.x,f.y,f.z,g.x,g.y,g.z,g.x,g.y,g.z,v.x,v.y,v.z,m.x,m.y,m.z],i=[...i,0,0,1,0,1,1,1,1,0,1,0,0]}this.geometry.setAttribute("position",new b(r,3)),this.geometry.setAttribute("uv",new b(i,2))}setOptions(e){var t,n,s,r;const{color:i,opacity:o,points:a,width:l,gradient:c}=e,h=this.material;i&&(h.color=new u(i)),void 0!==o&&this.updateMaterialOpacity(o),c&&(h.map=br(c)),a&&void 0!==l?this.updateGeometry(a,l):a?this.updateGeometry(a,null!==(n=null===(t=this.params)||void 0===t?void 0:t.width)&&void 0!==n?n:20):void 0!==l&&this.updateGeometry(null!==(r=null===(s=this.params)||void 0===s?void 0:s.points)&&void 0!==r?r:[],l),this.params&&Object.assign(this.params,e),h.needsUpdate=!0,Fa.needsUpdate=!0}}class al extends Ga{constructor(e){const{yHeight:t=1,points:n=[],depth:s=0,color:r=16777215,opacity:i=1,gradient:o}=null!=e?e:{};super(e),this.params=e,this.material=new Y,this.updateGeometry(n,s),this.updateMaterialOpacity(i),this.updateMaterial(r,o),this.stype="Polygon",this.position.set(0,t,0),this.rotation.set(-Math.PI/2,0,0)}updateGeometry(e,t){this.geometry.dispose();const n=[];for(let t=0;t<e.length;t++)n.push(new g(e[t].x,-e[t].z));this.geometry=n.length>2?new et(new tt(n),{depth:t,bevelEnabled:!1}):new w}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=br(t),this.material.needsUpdate=!0}setOptions(e){var t,n,s,r;const{color:i,opacity:o,yHeight:a,points:l,gradient:c,depth:h}=e,d=this.material;i&&(d.color=new u(i)),void 0!==o&&this.updateMaterialOpacity(o),c&&(d.map=br(c)),void 0!==a&&this.position.set(0,a,0),l&&void 0!==h?this.updateGeometry(l,h):l?this.updateGeometry(l,null!==(n=null===(t=this.params)||void 0===t?void 0:t.depth)&&void 0!==n?n:0):void 0!==h&&this.updateGeometry(null!==(r=null===(s=this.params)||void 0===s?void 0:s.points)&&void 0!==r?r:[],h),this.params&&Object.assign(this.params,e),d.needsUpdate=!0,Fa.needsUpdate=!0}}class ll extends za{constructor(e){super(e),this.stype="Canvas3D",this.create(e)}create(e){const{points:t=[],lines:n=[],polygons:s=[],circles:r=[]}=null!=e?e:{};for(let e=0;e<t.length;e++)this.createPoint(t[e]);for(let e=0;e<n.length;e++)this.createLine(n[e]);for(let e=0;e<s.length;e++)this.createPolygon(s[e]);for(let e=0;e<r.length;e++)this.createCircle(r[e])}createPoint(e){const t=new $a(e);return this.add(t),Fa.needsUpdate=!0,t}getPoint(e){return this.getChildForType("Point",e)}removePoint(e){const t=this.getPoint(e);t&&this.remove(t),Fa.needsUpdate=!0}createLine(e){const t=new ol(e);return this.add(t),Fa.needsUpdate=!0,t}getLine(e){return this.getChildForType("Line",e)}removeLine(e){const t=this.getLine(e);t&&this.remove(t),Fa.needsUpdate=!0}createPolygon(e){const t=new al(e);return this.add(t),Fa.needsUpdate=!0,t}getPolygon(e){return this.getChildForType("Polygon",e)}removePolygon(e){const t=this.getPolygon(e);t&&this.remove(t),Fa.needsUpdate=!0}createCircle(e){const t=new tl(e);return this.add(t),Fa.needsUpdate=!0,t}getCircle(e){return this.getChildForType("Circle",e)}removeCircle(e){const t=this.getCircle(e);t&&this.remove(t),Fa.needsUpdate=!0}getChildForType(e,t){for(let n=0;n<this.children.length;n++)if(this.children[n].stype===e&&this.children[n].sid===t)return this.children[n];return null}}class cl extends Ga{constructor(e,t,n){super(e,t,n),this.stype="Ground"}}var hl=Object.defineProperty,ul=(e,t,n)=>(((e,t,n)=>{t in e?hl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const dl=[new g,new g,new g,new g],pl=[new t,new t,new t,new t],ml=[new y,new y,new y,new y],fl=[new i,new i,new i,new i];function gl(e,t,n){return t.clone().sub(e).lengthSq()<=n**2}function yl(e,t,n){return t.clone().sub(e).lengthSq()<=n**2*Math.max(e.lengthSq(),t.length())}function vl(e,t){const{epsilon:n=0,relativeEpsilon:s}=t||{},r=0===n?(e,t)=>e.equals(t):s?yl:gl,i=e.length/3,o=new Array(i),[a,l]=pl;for(let t=0;t<i;t++){a.fromArray(e,3*t),o[t]=t;for(let s=0;s<t;s++)if(l.fromArray(e,3*s),r(a,l,n)){o[t]=s;break}}return o}function wl(e){const t={},n=e.length;for(let s=0;s<n;s++){const n=e[s];(t[n]||(t[n]=[])).push(s)}return t}function bl(e,t,n,s=!1){const r=e.slice(),i=!s;let o=!0;return Object.values(n).forEach((n=>{if(o=n.length>1,i&&!o)return;const a=new Array(t);if(a.fill(0),n.forEach((function(n){const s=n*t;for(let n=0;n<t;n++)a[n]+=e[s+n]})),o){const e=1/n.length;for(let n=0;n<t;n++)a[n]*=e}if(s){let e=Math.hypot(...a);0===e&&(e=1);const n=1/e;for(let e=0;e<t;e++)a[e]*=n}n.forEach((function(e){const n=e*t;for(let e=0;e<t;e++)r[n+e]=a[e]}))})),r}function xl(e){const t=new Array(e);for(let n=0;n<e;n++)t[n]=n;return t}class Tl extends o{constructor(e){super(),ul(this,"isFaceNode",!0),ul(this,"triangle"),ul(this,"faceIndex"),ul(this,"geometry"),ul(this,"a"),ul(this,"b"),ul(this,"c"),ul(this,"d"),ul(this,"order"),ul(this,"real"),ul(this,"branchFace"),ul(this,"_root",null),ul(this,"depth",0),ul(this,"childrenFaceIndexes"),ul(this,"_equalVertexIndexMap"),ul(this,"_equalVertexIndexes",null),Object.assign(this,e);const{geometry:n,a:s,b:r,c:i,real:o,faceIndex:a}=e,{attributes:{position:l}}=n,c=(new t).fromBufferAttribute(l,s),h=(new t).fromBufferAttribute(l,r),u=(new t).fromBufferAttribute(l,i);this.triangle=new it(c,h,u),o||(this.real={a:s,b:r,c:i}),null==a&&(this.faceIndex=Math.trunc(i/3))}get root(){return this._root||(this._root=this.parent?this.parent.root:this)}set root(e){this._root=e,this.depth=e?e.depth+1:0}isAncestor(e){let{parent:t}=this;for(;t;){if(t.faceIndex===e)return!0;t=t.parent}return!1}getAdjacentFaces(e,t){const{geometry:n,a:s,b:r,c:i,d:o,faceIndex:a,root:l,parent:c}=this,h=pl[3],u={indexes:n.index.array,a:s,b:r,c:i,faceIndex:a,isAncestor:e=>this.isAncestor(e),onlyC:null!=o,equalVertexIndexMap:t};return e&&(u.positions=n.attributes.position.array,u.getParentMidpoint=t=>e[t].triangle.getMidpoint(h),u.getDepth=t=>e[t].depth),l.branchFace&&(u.maxCount=1/0),function(e,t={}){const{indexes:n,a:s,b:r,c:i,equalVertexIndexMap:o,faceIndex:a,onlyC:l,maxCount:c=(l?2:3),positions:h,getParentMidpoint:u,isAncestor:d,getDepth:p}=e,m=n.length/3,f=a??Math.trunc(m/2),g=o?e=>o[e]:e=>e,y=g(s),v=g(r),w=g(i),b=[];let x=()=>0,T=0;null!=a&&p&&(T=p(a)+1,x=e=>T-p(e));const[S,O,M]=pl;let E=()=>null;function C(e){const s=3*e,r=n.slice(s,s+3);if(t[e]){const t=x(e);return t>0?null:t<0?{posIndexes:r,consumed:!0}:E(e,r)}return{posIndexes:r}}h&&(S.set(0,0,0),[s,r,i].forEach((e=>{M.fromArray(h,3*e),S.add(M)})),S.multiplyScalar(1/3),E=(e,t)=>{O.set(0,0,0);for(let e=0;e<t.length;e++)M.fromArray(h,3*e),O.add(M);return O.multiplyScalar(1/3),O.distanceToSquared(S)<O.distanceToSquared(u(e))?{posIndexes:t,consumed:!0}:null});const D=l?function(e){const t=C(e);if(!t)return!1;const{posIndexes:n,consumed:o}=t,a=n.map(g),l=a.indexOf(w);if(-1===l)return!1;const h=a.indexOf(y),u=a.indexOf(v),d=-1===h,p=-1===u;if(d+p!==1)return!1;switch(!0){case d:{const t=[l,u];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:i,b:r,c:a.c,d:s,order:t,real:a,faceIndex:e,consumed:o});break}case p:{const t=[h,l];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:s,b:i,c:a.c,d:r,order:t,real:a,faceIndex:e,consumed:o});break}}return b.length===c}:function(e){const t=C(e);if(!t)return!1;const{posIndexes:n,consumed:o}=t,a=n.map(g),l=a.indexOf(y),h=a.indexOf(v),u=a.indexOf(w),d=-1===l,p=-1===h;if(d+p+(-1===u)!==1)return!1;switch(!0){case d:{const t=[u,h];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:i,b:r,c:a.c,d:s,order:t,real:a,faceIndex:e,consumed:o});break}case p:{const t=[l,u];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:s,b:i,c:a.c,d:r,order:t,real:a,faceIndex:e,consumed:o});break}default:{const t=[h,l];t.push(3-t[0]-t[1]);const a={a:n[t[0]],b:n[t[1]],c:n[t[2]]};b.push({a:r,b:s,c:a.c,d:i,order:t,real:a,faceIndex:e,consumed:o})}}return b.length===c};let P=f,I=f,A=!0,L=!0;for(;A||L;){if(A){if(P--,P<0&&(P+=m),P===I)break;if(P===f)A=!1;else if(!d(P)&&D(P))break}if(L){if(I++,I===m&&(I=0),P===I)break;if(I===f)L=!1;else if(!d(I)&&D(I))break}}return b}(u,e)}removeFromParent(){return super.removeFromParent(),this.root=null,this}removeFace(e,t=this.root.childrenFaceIndexes){if(!t)return!1;const n=t[e];if(!n)return!1;const s=[];return n.traverse((e=>{s.push(e)})),s.forEach((e=>{delete t[e.faceIndex],e.removeFromParent()})),!0}removeChildFaces(e){return this.children.slice().forEach((t=>{const n=t.faceIndex;this.removeFace(n,e)})),this}clear(){return this.removeChildFaces()}updateSelfChildren(e={},t=this.root.equalVertexIndexMap){const{geometry:n}=this;return this.removeChildFaces(e),this.getAdjacentFaces(e,t).forEach((t=>{t.consumed&&this.removeFace(t.faceIndex,e);const s=new Tl({geometry:n,...t});e[t.faceIndex]=s,this.add(s)})),e}updateChildrenDFS(e,t){const{geometry:n}=this;return e||(e=this.root.childrenFaceIndexes={[this.faceIndex]:this}),t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??vl(n.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((s=>{s.consumed&&this.removeFace(s.faceIndex,e);const r=new Tl({geometry:n,...s});return e[s.faceIndex]=r,this.add(r),r.updateChildrenDFS(e,t),r})),e}get equalVertexIndexMap(){return this._equalVertexIndexMap}set equalVertexIndexMap(e){this._equalVertexIndexMap=e,this._equalVertexIndexes=null}get equalVertexIndexes(){let{_equalVertexIndexes:e,equalVertexIndexMap:t}=this;return!e&&t&&(this._equalVertexIndexes=e=wl(t)),e}updateChildrenBFS(e){const t=this.childrenFaceIndexes={[this.faceIndex]:this},n=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:vl(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(t,n)})),t}traversalBFS(e){return function(e,t,n){const s=[e];for(;s.length;){const e=s.shift();if(n(e))return e;s.push(...e[t])}}(this,"children",e)}}var Sl=Object.defineProperty,Ol=(e,t,n)=>(((e,t,n)=>{t in e?Sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function Ml(e,t){const n=t.toArray(),s=n.findIndex((e=>0!==e));if(-1===s)return 0;const r=e.toArray()[s];return 0===r?1/0:n[s]/r}function El(e,t){const n=e.clone().cross(t);return"number"==typeof n?0===n:0===n.lengthSq()}function Cl(e,t,n){let s=function(e,t,n=0){let s=e.lengthSq()*t.lengthSq();if(0===s)return n;s=Math.sqrt(s);let r=e.dot(t)/s;return r=Math.max(-1,Math.min(1,r)),Math.acos(r)}(e,t);return 0===s?s:e.clone().cross(t).dot(n)<0?-s:s}const Dl=180/Math.PI,Pl={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Il={degrees:!0,map:Pl,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class Al{constructor(e){Ol(this,"_options"),Ol(this,"_listMap"),Ol(this,"_front"),Ol(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Il)}static set options(e){this._options=Object.assign({},structuredClone(Pl),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(Pl);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,s]of Object.entries(e))t[n]=Array.isArray(s)?s:Object.entries(s).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Il.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Il.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,s){const r=(new t).copy(e),i=(new t).copy(n??this.front),o=(new t).copy(s??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const s=t.clone().negate(),r=n.clone().projectOnPlane(t),i=Cl(t,e.clone().projectOnPlane(r),r),o=t.clone().cross(r);return{yaw:i,pitch:Cl(t,e.clone().projectOnPlane(o),o),roll:Cl(r,e.clone().projectOnPlane(s),s)}}(r,i,o);return this.degrees&&(a*=Dl,l*=Dl,c*=Dl),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],s=this.listMap[e];if(!s)return n;for(const{name:e,range:[r,i]}of s)(t>=r&&t<i||t<=r&&t>i)&&n.push(e);return n}}Ol(Al,"_options"),new Al,new y(1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1);var Ll=(e=>(e[e.ThroughIntersect=1]="ThroughIntersect",e[e.JointIntersect=2]="JointIntersect",e[e.Intersect=3]="Intersect",e[e.Tangency=4]="Tangency",e[e.Contain=8]="Contain",e[e.Dissociation=16]="Dissociation",e))(Ll||{});function jl(e,n){const[s,r]=e,i=r.clone().sub(s),[o,a]=n,l=a.clone().sub(o),c=i.clone().cross(l),[h,u]=function(e){return void 0!==e.w?[te,4]:void 0!==e.z?[t,3]:[g,2]}(s);if(2===u?0===c:c.equals(new h))return null;const d=o.clone().sub(s).cross(l),p=2===u?d/c:Ml(c,d);return i.clone().multiplyScalar(p).add(s)}function _l(e,t){const[n,s]=e,[r,i]=t,o=s.clone().sub(n),a=function(e,t){const[n,s]=e,r=s.clone().sub(n),[i,o]=t;if(El(o.clone().sub(i),r))return El(i.clone().sub(n),r)?Ll.Tangency:Ll.Dissociation;return Ll.Intersect}(e,t);if(a===Ll.Tangency){let e=0,t=0;const s=Ml(o,r.clone().sub(n));s<0?e++:s>1&&t++;const a=Ml(o,i.clone().sub(n));return a<0?e++:a>1&&t++,2===e||2===t?Ll.Dissociation:e+t===1?Ll.Tangency:Ll.Contain}if(a!==Ll.Intersect)return a;const l=jl(e,t),c=Ml(i.clone().sub(r),l.clone().sub(r));if(c<0||c>1)return Ll.Dissociation;if(0===c||1===c)return Ll.JointIntersect;const h=Ml(o,l.clone().sub(n));return h<0||h>1?Ll.Dissociation:0===h||1===h?Ll.JointIntersect:Ll.ThroughIntersect}function Fl(e,t){const n=t.length;let s,r=!1;for(let i=0;i<n;i++){const o=t[i];if(o.equals(e))return Ll.Tangency;let a=i+1;a===n&&(a=0);const l=t[a],c=(new g).subVectors(l,o),h=(new g).subVectors(e,o).cross(c);if(0===h){r=!0;continue}const u=Math.sign(h);if(void 0!==s&&s!==u)return Ll.Dissociation;s=u}return r?Ll.Tangency:Ll.Contain}function Rl(e,t){const n=e.length;let s=0;for(let r=0;r<n;r++){let i=r+1;i===n&&(i=0);const o=_l([e[r],e[i]],t);if(o&(Ll.ThroughIntersect|Ll.Tangency|Ll.Contain))return o;o===Ll.JointIntersect&&s++}const r=Fl(t[0],e);if(0===s||1===s&&r!==Ll.Tangency)return r;const i=r|Fl(t[1],e);return i===Ll.Tangency?Ll.Contain:i&Ll.Tangency?i&Ll.Contain?Ll.Contain:Ll.JointIntersect:r}new nt;const Bl=Ll.Contain|Ll.ThroughIntersect;class Ul extends Tl{constructor(e,t,n=!0){super(e),ul(this,"flatTriangle"),ul(this,"matrixInvert",new y),ul(this,"needUpdateFace",!0),this.matrixAutoUpdate=!1,t&&(t.add(this),n&&this.updateFace())}updateFace(e){if(!e&&!this.needUpdateFace)return;this.updateMatrix(),this.updateMatrixWorld(!0);const{triangle:t,matrixWorld:n}=this,{a:s,b:r,c:i}=t,o=s.clone().applyMatrix4(n),a=r.clone().applyMatrix4(n),l=i.clone().applyMatrix4(n);this.flatTriangle=new it(o,a,l),this.matrixInvert.copy(n).invert(),this.normalMatrix.getNormalMatrix(n),this.needUpdateFace=!1}updateMatrix(){const{triangle:e,parent:t,matrix:n,position:s,quaternion:r,scale:i,d:o}=this;if(t&&null!=o){const{triangle:o}=t,a=e.getNormal(pl[0]),l=o.getNormal(pl[1]);r.setFromUnitVectors(a,l);const{b:c}=e;s.copy(c).negate(),s.applyQuaternion(r),s.add(c),n.compose(s,r,i)}else n.identity();this.matrixWorldNeedsUpdate=!0}isOutFlatRange(e){const{flatTriangle:{a:t,b:n,c:s}}=this,[r,i,o]=dl;return r.copy(t),i.copy(n),o.copy(s),!(function(e,t){const n=e.length;let s=0,r=!1;for(let i=0;i<n;i++){let o=i+1;o===n&&(o=0);const a=Rl(t,[e[i],e[o]]);if(a===Ll.ThroughIntersect)return a;a===Ll.JointIntersect?s++:a===Ll.Tangency&&(r=!0)}if(r)return Ll.Tangency;if(s)return Ll.JointIntersect;let i=Fl(e[0],t);return i===Ll.Contain||(i=Fl(t[0],e),i===Ll.Contain)?Ll.Contain:Ll.Dissociation}([r,i,o],e)&Bl)}updateSelfChildren(e={},t=this.root.equalVertexIndexMap,n){this.updateFace();const{geometry:s}=this;return this.removeChildFaces(e),this.getAdjacentFaces(e,t).forEach((t=>{const r=new Ul({geometry:s,...t},this,!0);n&&r.isOutFlatRange(n)?this.remove(r):(t.consumed&&this.removeFace(t.faceIndex,e),e[t.faceIndex]=r)})),e}updateChildrenDFS(e,t,n){this.updateFace();const{geometry:s}=this;if(!e){if(e=this.root.childrenFaceIndexes={},n&&this.isOutFlatRange(n))return this.removeFromParent(),e;e[this.faceIndex]=this}return t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??vl(s.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((r=>{const i=new Ul({geometry:s,...r},this);n&&i.isOutFlatRange(n)?this.remove(i):(r.consumed&&this.removeFace(r.faceIndex,e),e[r.faceIndex]=i,i.updateChildrenDFS(e,t,n))})),e}updateChildrenBFS(e,t){this.updateFace();const n=this.childrenFaceIndexes={};if(t&&this.isOutFlatRange(t))return this.removeFromParent(),n;n[this.faceIndex]=this;const s=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:vl(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(n,s,t)})),n}appendVertex(e,n,s,r,i=!0){const{positions:o,normals:a,uvs:l}=n,{[e]:c,real:{[e]:h},normalMatrix:u,matrixWorld:d,geometry:p}=this,{[e]:m}=i?this.flatTriangle:this.triangle,f=s[r?h:c]=o.length;o.push(m.clone());const{attributes:{normal:y,uv:v}}=p;if(a){const e=new t;i?this.flatTriangle.getNormal(e):e.fromBufferAttribute(y,h),a.push(e)}if(l){const e=(new g).fromBufferAttribute(v,h);l.push(e)}return f}appendFace(e,t,n=!0){const{indexes:s}=e,{a:r,b:i,order:o}=this,a=this.appendVertex("c",e,t,!1,n);if(s){const e=s.length;s[e+o[0]]=t[r],s[e+o[1]]=t[i],s[e+o[2]]=a}return a}appendFaceVertices(e,t,n=!0){const{indexes:s}=e,{order:r}=this,i=this.appendVertex("a",e,t,!0,n),o=this.appendVertex("b",e,t,!0,n),a=this.appendVertex("c",e,t,!0,n);if(s){const e=s.length;s[e+r[0]]=i,s[e+r[1]]=o,s[e+r[2]]=a}return[i,o,a]}createFaceGeometry(e=!0){const t=[],n=[],s=[],r=[],i=new Array(3),{normal:o,uv:a}=this.geometry.attributes,l={positions:t,indexes:r};o&&(l.normals=n),a&&(l.uvs=s),this.appendFaceVertices(l,i,e);const c=[],h=[],u=[];for(let e=0;e<3;e++)t[e].toArray(c,c.length),o&&n[e].toArray(h,h.length),a&&s[e].toArray(u,u.length);const d=new w;return d.setAttribute("position",new b(c,3)),o&&d.setAttribute("normal",new b(h,3)),a&&d.setAttribute("uv",new b(u,2)),d.index=new D(r,1),d}createFaceFlatKeyframeTracks(e,t,n=0,s){const{uuid:r,position:i,quaternion:o,scale:a}=e,{matrixInvert:l,parent:c}=this;let h=l;if(!s&&c){const{matrixWorld:e}=c;h=e.clone().multiply(l)}const[u,d]=pl,p=fl[0];h.decompose(u,p,d);const m=[n,n+t],f=[];i.toArray(f),u.toArray(f,f.length);const g=[];o.toArray(g),p.toArray(g,g.length);const y=[];a.toArray(y),d.toArray(y,y.length);return[new L(`${r}.position`,m,f),new j(`${r}.quaternion`,m,g),new L(`${r}.scale`,m,y)]}createFaceMesh(e,t=!0){const n=this.createFaceGeometry(t);return new W(n,e)}createFlatFaceMeshTree(e,t,n){const s=this.createFaceMesh(e),r=n||[];let{duration:i,layer:o=0,byLayer:a}=t||{};if(i&&o>0){const e=a?i*(o-1):0,t=this.createFaceFlatKeyframeTracks(s,i,e);r.push(...t)}if(t={duration:i,layer:o+1,byLayer:a},this.children.forEach((n=>{const i=n.createFlatFaceMeshTree(e,t,r);s.add(i)})),!n&&r.length){const e=new A("展开",void 0,r);s.animations.push(e)}return s}}let kl=class e extends Ul{constructor(e){var n;const{geometry:s,faceIndex:r,origin:i,normal:o,angle:a=0,xyPlane:l=!1,meshMatrix:c,flatRange:h}=e;let u=null==(n=s.index)?void 0:n.array;u||(u=xl(s.attributes.position.count),s.index=new D(u,1));const d=3*r;super({geometry:s,a:u[d],b:u[d+1],c:u[d+2],faceIndex:r,order:[0,1,2]}),ul(this,"origin",new t),ul(this,"normal"),ul(this,"angle"),ul(this,"xyPlane"),ul(this,"xyPlaneMatrix",new y),ul(this,"meshMatrix",null),ul(this,"flatRange",null),ul(this,"_isBounded",!1);const{triangle:p}=this;if(this.origin.copy(i||p.b),this.normal=o||p.getNormal(new t),this.angle=a,this.meshMatrix=c,this.flatRange=h,h&&c){let e=c.getMaxScaleOnAxis();e=0===e?1:1/e,this.flatRange=h.map((t=>t.multiplyScalar(e)))}this.xyPlane=!!h||l,this.updateFace(),this.updateChildrenBFS(e,this.flatRange)}static createFlatFaceTreeByRay(t){const{object:n,origin:s,direction:r,angle:i,planeNormal:o,...a}=t,l=new Re(s,r),[c]=l.intersectObject(n);if(!c)return null;const{object:h,instanceId:u,point:d,normal:p,faceIndex:m,face:f}=c;if(null==f)return null;const{geometry:g,matrixWorld:v}=h,w=new y;null==u?w.copy(v):(h.getMatrixAt(u,w),w.premultiply(v));const b=ml[0].copy(w).invert();let x;switch(o){case 1:x=p;break;case 2:x=r.clone().negate(),x.transformDirection(b);break;default:x=f.normal}return d.applyMatrix4(b),new e({...a,geometry:g,origin:d,faceIndex:m,normal:x,angle:i,meshMatrix:w})}updateMatrix(){if(!this.xyPlane)return super.updateMatrix();const{origin:e,normal:t,angle:n,xyPlaneMatrix:s}=this,[r,i]=fl,o=pl[0];o.set(0,0,1),r.setFromUnitVectors(o,t),i.setFromAxisAngle(o,n),r.multiply(i),s.makeRotationFromQuaternion(r),s.setPosition(e),this.matrix.copy(s).invert()}averageEqualVectors(e,t){const n=e[0].toArray().length;let s=[];for(let t=0;t<e.length;t++)e[t].toArray(s,s.length);s=this.averageEqualVertices(s,n,t);for(let t=0;t<e.length;t++)e[t].fromArray(s,t*n);return e}averageEqualVertices(e,t,n){const{equalVertexIndexes:s,equalVertexIndexMap:r}=this,i={};for(let e=0;e<n.length;e++){const t=n[e],o=r[e],a=i[t]=[];s[o].forEach((e=>{const t=n[e];void 0!==t&&a.push(t)}))}return bl(e,t,i)}getVerticesByReuse(e,t=!0,n){const s=[];if(this.appendVertex("a",e,s,!1,t),this.appendVertex("b",e,s,!1,t),this.traversalBFS((n=>{n.appendFace(e,s,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e<t.length;e++)t[e].toArray(n,n.length);e.averagePositions=this.averageEqualVertices(n,3,s)}return s}getVerticesByAll(e,t=!0,n){const{geometry:s}=this,r=new Array(s.attributes.position.count);if(this.traversalBFS((n=>{n.appendFaceVertices(e,r,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e<t.length;e++)t[e].toArray(n,n.length);e.averagePositions=this.averageEqualVertices(n,3,r)}return r}getVertices(e,t,n,s){return n?(this.getVerticesByAll(e,!0,s),this.getVerticesByAll(t,!1)):(this.getVerticesByReuse(e,!0,s),this.getVerticesByReuse(t,!1))}generateGeometryData(e,t=!0,n){const{normal:s,uv:r}=this.geometry.attributes,i=["positions","indexes"];s&&i.push("normals"),r&&i.push("uvs");const o={};return i.forEach((e=>{o[e]=[]})),o.indexMap=e?this.getVerticesByAll(o,t,n):this.getVerticesByReuse(o,t,n),o}createGeometry(e,t=!0){const{normal:n,uv:s}=this.geometry.attributes,{positions:r,normals:i,uvs:o,indexes:a,indexMap:l}=this.generateGeometryData(e,t),c=r.length,h=[],u=[],d=[];for(let e=0;e<c;e++)r[e].toArray(h,h.length),n&&i[e].toArray(u,u.length),s&&o[e].toArray(d,d.length);const p=new w;return p.setAttribute("position",new b(h,3)),n&&p.setAttribute("normal",new b(u,3)),s&&p.setAttribute("uv",new b(d,2)),p.index=new D(a,1),{geometry:p,indexMap:l}}createUnattachedFlatFaceMeshes(e,t=0){const n=[],s=new st;if(this.traversalBFS((r=>{const i=r.createFaceMesh(e);if(s.add(i),t){const e=r.createFaceFlatKeyframeTracks(i,t,0,!0);n.push(...e)}})),n.length){const e=new A("独立展开",t,n);s.animations.push(e)}return this.transformFlatObjectToWorld(s)}createFlatFaceMeshTree(e,t,n){const s=super.createFlatFaceMeshTree(e,t,n);return this.transformFlatObjectToWorld(s)}transformFlatObjectToWorld(e){const{meshMatrix:t,xyPlaneMatrix:n}=this;return t&&e.matrix.copy(t),e.matrix.multiply(n),e.matrix.decompose(e.position,e.quaternion,e.scale),e}};function Nl(e,t,n,s,r){const i=e.length;if(!r){r=[];for(let e=0;e<i;e++)r[e]=[]}const o=e[0].length/t,a=e.map((e=>e.length/o|0));for(let t=0;t<o;t+=3){const o=[],l=[],c=[];for(let n=0;n<i;n++){const s=e[n],r=a[n];let i=t*r,h=i+r;o[n]=s.slice(i,h),i=h,h+=r,l[n]=s.slice(i,h),i=h,h+=r,c[n]=s.slice(i,h)}let h,u,d,p,m=o[0][n]-s>0,f=l[0][n]-s>0,g=c[0][n]-s>0;switch(s<0&&(m=!m,f=!f,g=!g),m+f+g){case 0:for(let e=0;e<i;e++)r[e].push(...o[e],...l[e],...c[e]);break;case 1:m?(h=l,u=c,d=zl(c,o,n,s),p=zl(l,o,n,s)):f?(h=c,u=o,d=zl(o,l,n,s),p=zl(c,l,n,s)):(h=o,u=l,d=zl(l,c,n,s),p=zl(o,c,n,s));for(let e=0;e<i;e++)r[e].push(...h[e],...u[e],...d[e]),r[e].push(...d[e],...p[e],...h[e]);break;case 2:m?f?(h=c,u=zl(o,c,n,s),d=zl(l,c,n,s)):(h=l,u=zl(c,l,n,s),d=zl(o,l,n,s)):(h=o,u=zl(l,o,n,s),d=zl(c,o,n,s));for(let e=0;e<i;e++)r[e].push(...h[e],...u[e],...d[e])}}return r}function zl(e,t,n,s,r=[]){const i=e[0],o=t[0],a=i[n],l=Math.abs((s-a)/(o[n]-a));for(let n=0;n<e.length;n++){const s=e[n],i=t[n],o=r[n]||(r[n]=[]);for(let e=0;e<s.length;e++)o[e]=l*(i[e]-s[e])+s[e]}return r}var Gl=(e=>(e[e.Projection=0]="Projection",e[e.Distance=1]="Distance",e[e.ContinuousDistance=2]="ContinuousDistance",e[e.UVIncrement=3]="UVIncrement",e[e.Mapping=4]="Mapping",e[e.Original=5]="Original",e))(Gl||{});class Vl extends w{constructor(){super(...arguments),ul(this,"isDecalGeometry",!0),ul(this,"originalUVs"),ul(this,"uvMap",1),ul(this,"offsetFactor",0),ul(this,"offsetUnits",0),ul(this,"epsilon",1e-8),ul(this,"relativeEpsilon",!1),ul(this,"_equalVertexIndexMap",null),ul(this,"_equalVertexIndexes",null),ul(this,"border",[])}get equalVertexIndexMap(){let{_equalVertexIndexMap:e}=this;if(!e){const{cutPositions:t,epsilon:n,relativeEpsilon:s}=this;this._equalVertexIndexMap=e=vl(t,{epsilon:n,relativeEpsilon:s}),this._equalVertexIndexes=null}return e}get equalVertexIndexes(){let{_equalVertexIndexes:e}=this;return e||(this._equalVertexIndexes=e=wl(this.equalVertexIndexMap)),e}empty(){const{normal:e,uv:t}=this.attributes;this.attributes={},this.setAttribute("position",new b([],3)),e&&this.setAttribute("normal",new b([],3)),t&&this.setAttribute("uv",new b([],3)),this.setIndex([])}clipGeometryData(e,t){return function(e,t,n){for(let s=0;s<n.length;s++){const r=n[s];e=Nl(e,t,s,r),e=Nl(e,t,s,-r)}return e}(e,t,this.border)}generateOffsetPosition(e,t){var n;const{offsetUnits:s,offsetFactor:r,equalVertexIndexes:i,attributes:o}=this;if(0===r&&0===s)return e;t.boundingBox||t.computeBoundingBox();let a=o.normal;if(!a){const t=function(e,t){const n=e.length,s=n/3;t||(t=xl(s));const r=t.length,[i,o,a]=pl,l=new Array(s);for(let n=0;n<r;n+=3){const s=t[n],r=t[n+1],c=t[n+2];i.fromArray(e,3*s),o.fromArray(e,3*r),a.fromArray(e,3*c),i.sub(o),a.sub(o),a.cross(i).normalize();const{x:h,y:u,z:d}=a;(l[s]||(l[s]=[])).push(h,u,d),(l[r]||(l[r]=[])).push(h,u,d),(l[c]||(l[c]=[])).push(h,u,d)}const c=new Array(n);for(let e=0;e<s;e++){const t=l[e];let n=t;if(t.length>3){n=[0,0,0];const e=t.length;for(let s=0;s<e;s+=3)n[0]+=t[s],n[1]+=t[s+1],n[2]+=t[s+2];const s=1/(e/3);n[0]*=s,n[1]*=s,n[2]*=s;const r=1/Math.hypot(...n);n[0]*=r,n[1]*=r,n[2]*=r}const s=3*e;c[s]=n[0],c[s+1]=n[1],c[s+2]=n[2]}return c}(e,null==(n=this.index)?void 0:n.array);o.normal=a=new b(t,3)}const{array:l,itemSize:c,count:h}=a,u=bl(l,c,i,!0),[d,p,m,f]=pl;t.boundingBox.getCenter(f);const g=new Array(e.length);for(let t=0;t<h;t++){const n=t*c;d.fromArray(u,n),p.fromArray(e,n);let i=s;0!==r&&(m.subVectors(p,f),i+=m.dot(d)*r),0!==i&&(m.copy(d).multiplyScalar(i),p.add(m)),p.toArray(g,n)}return g}generateDistanceUVs(e){const t=[],n=dl[0],s=new rt;for(let r=0;r<e.length;r+=3)n.fromArray(e,r),n.toArray(t,t.length),s.expandByPoint(n);const{x:r,y:i}=s.getSize(new g),{x:o,y:a}=s.min,l=new nt(1/r,0,-o/r,0,1/i,-a/i,0,0,1),c=new b(t,2);return c.applyMatrix3(l),c}generateProjectionUVs(e,t){const n=[],s=e.length,r=1/t.x,i=1/t.y;for(let t=0;t<s;t+=3){const s=e[t],o=e[t+1];n.push(s*r+.5,o*i+.5)}return new b(n,2)}computeMappingUVs(){const{originalUVs:e}=this;if(!e)throw"ProjectionDecalGeometry#mesh 缺少 uv; DecalUVMapType.Mapping 类型的 uvMap 需要 uv";const t=dl[0],n=new rt,s=e.length;for(let r=0;r<s;r+=2)t.fromArray(e,r),n.expandByPoint(t);const{x:r,y:i}=n.getSize(t),{x:o,y:a}=n.min,l=new nt(1/r,0,-o/r,0,1/i,-a/i,0,0,1),c=new b(e,2);return c.applyMatrix3(l),c}}class Hl extends Vl{constructor(e){super(),ul(this,"isRigidDecalGeometry",!0),ul(this,"object"),ul(this,"origin",new t),ul(this,"direction",new t),ul(this,"angle",-0),ul(this,"_size",new g),ul(this,"cutPositions",[]),ul(this,"flatPositions",[]),ul(this,"averageFlatPositions"),ul(this,"faceTree",null),ul(this,"branchFace",!1),this.setOptions(e)}get size(){return this._size}set size(e){this._size.copy(e),this.border=this._size.toArray().map((e=>.5*e))}get meshMatrix(){return this.faceTree.meshMatrix}get geometry(){return this.faceTree.geometry}setOptions(e){let{object:t,origin:n,direction:s,angle:r,size:i,uvMap:o,offsetFactor:a,offsetUnits:l,epsilon:c,relativeEpsilon:h,branchFace:u}=e,d=!1;t&&(this.object=t,d=!0),i&&(this.size=i,d=!0),c&&(this.epsilon=c,d=!0),h&&(this.relativeEpsilon=h,d=!0),n&&(this.origin.copy(n),d=!0),s&&(this.direction.copy(s),d=!0),null!=r&&(this.angle=r,d=!0),null!=u&&(this.branchFace=u,d=!0);let p=!1;if(a&&(p=!0,this.offsetFactor=a),l&&(p=!0,this.offsetUnits=l),null!=o&&(this.uvMap=o,o===Gl.ContinuousDistance&&(d=!0)),d)return this.updateGeometry();p&&this.updatePosition(),null!=o&&this.updateUV()}updateGeometry(){const{object:e,origin:t,direction:n,angle:s,border:[r,i],branchFace:o,epsilon:a,relativeEpsilon:l}=this,c=this.faceTree=kl.createFlatFaceTreeByRay({object:e,origin:t,direction:n,angle:s,flatRange:[new g(r,i),new g(-r,i),new g(-r,-i),new g(r,-i)],xyPlane:!0,branchFace:o,epsilon:a,relativeEpsilon:l});if(this._equalVertexIndexMap=this._equalVertexIndexes=null,!c)return this.empty();const{flatPositions:h,positions:u,normals:d,uvs:p,averagePositions:m}=this.generateDecalGeometryData(this.geometry);this.flatPositions=h,this.cutPositions=u,this.averageFlatPositions=m,this.originalUVs=p,d&&this.setAttribute("normal",new b(d,3)),this.updatePosition(),this.updateUV()}generateDecalGeometryData(e){const{faceTree:t}=this,{attributes:n}=e,s={positions:[]},r=["positions"];n.normal&&r.push("normals"),n.uv&&r.push("uvs");const i={},o=[s.positions];r.forEach((e=>o.push(i[e]=[])));const a=this.uvMap===Gl.ContinuousDistance;t.getVertices(s,i,!0,a);let l=[];const c=o.length,h=s.positions.length;for(let e=0;e<c;e++){const t=o[e],n=l[e]=[];for(let e=0;e<h;e++)t[e].toArray(n,n.length)}a&&l.push(s.averagePositions),l=this.clipGeometryData(l,3);const u={flatPositions:l[0]};return r.forEach(((e,t)=>{u[e]=l[t+1]})),u.normals&&function(e,t){const n=e.length/t|0;for(let s=0;s<t;s++){const t=s*n,r=e.slice(t,t+n);let i=Math.hypot(...r);i=0===i?1:1/i;for(let s=0;s<n;s++)e[t+s]*=i}}(u.normals,3),a&&(u.averagePositions=l.at(-1)),u}updatePosition(){const{cutPositions:e,geometry:t}=this,n=this.generateOffsetPosition(e,t),s=new b(n,3);this.setAttribute("position",s)}updateUV(){if(!this.attributes.position)return;const{originalUVs:e,uvMap:t}=this;let n;switch(t){case Gl.Mapping:n=this.computeMappingUVs();break;case Gl.Projection:n=this.computeProjectionUVs();break;case Gl.Distance:n=this.computeDistanceUVs();break;case Gl.ContinuousDistance:n=this.computeContinuousDistanceUVs();break;default:n=e&&new b(e,2)}this.setAttribute("uv",n)}computeProjectionUVs(){const{cutPositions:e,size:t}=this,n=this.faceTree.matrix,s=new b(e,3);return s.applyMatrix4(n),this.generateProjectionUVs(s.array,t)}computeDistanceUVs(){return this.generateDistanceUVs(this.flatPositions)}computeContinuousDistanceUVs(){return this.generateDistanceUVs(this.averageFlatPositions)}transformDecalToWorld(e){const{meshMatrix:t}=this;return t&&(e.matrix.copy(t),t.decompose(e.position,e.quaternion,e.scale)),e}}const Wl=new Map;class Kl extends za{constructor(e){super(e),this.params=e,this.decalMesh=new W(void 0,new Y),this.textureAspect=new t(1,1,1),this.stype="Decal";const{material:n}=this.decalMesh;n.transparent=!0,n.depthWrite=!1,n.polygonOffset=!0,n.polygonOffsetFactor=-4,this.add(this.decalMesh)}async updateTexture(e){var t;if(!e)return;const n=Wl.get(e),{material:s}=this.decalMesh;if(null===(t=s.map)||void 0===t||t.dispose(),n)s.map=n;else{const t=new d;t.image=await Dr.loadAsync(e),t.colorSpace=$,t.needsUpdate=!0,s.map=t,Wl.set(e,t)}s.needsUpdate=!0;const{image:r}=s.map;if(r){const{width:e,height:t}=r;e<t?(this.textureAspect.x=1,this.textureAspect.y=t/e):(this.textureAspect.x=e/t,this.textureAspect.y=1)}}updateMaterial(e={}){const{color:t="#fff",opacity:n=1}=e,{material:s}=this.decalMesh;s.color.set(t),s.opacity=n}}var ql=function(e,t){return ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ql(e,t)};function Yl(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ql(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ql=function(){return Ql=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ql.apply(this,arguments)};function Xl(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n}function Zl(e,t,n,s){var r,i=arguments.length,o=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(i<3?r(o):i>3?r(t,n,o):r(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function Jl(e,t){return function(n,s){t(n,s,e)}}function $l(e,t,n,s,r,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=s.kind,c="getter"===l?"get":"setter"===l?"set":"value",h=!t&&e?s.static?e:e.prototype:null,u=t||(h?Object.getOwnPropertyDescriptor(h,s.name):{}),d=!1,p=n.length-1;p>=0;p--){var m={};for(var f in s)m[f]="access"===f?{}:s[f];for(var f in s.access)m.access[f]=s.access[f];m.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var g=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=o(g.get))&&(u.get=a),(a=o(g.set))&&(u.set=a),(a=o(g.init))&&r.unshift(a)}else(a=o(g))&&("field"===l?r.unshift(a):u[c]=a)}h&&Object.defineProperty(h,s.name,u),d=!0}function ec(e,t,n){for(var s=arguments.length>2,r=0;r<t.length;r++)n=s?t[r].call(e,n):t[r].call(e);return s?n:void 0}function tc(e){return"symbol"==typeof e?e:"".concat(e)}function nc(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function sc(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function rc(e,t,n,s){return new(n||(n=Promise))((function(r,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((s=s.apply(e,t||[])).next())}))}function ic(e,t){var n,s,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(i=0)),i;)try{if(n=1,s&&(r=2&a[0]?s.return:a[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;switch(s=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,s=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(6===a[0]&&i.label<r[1]){i.label=r[1],r=a;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(a);break}r[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],s=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var oc=Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]};function ac(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||oc(t,e,n)}function lc(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],s=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function cc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var s,r,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(s=i.next()).done;)o.push(s.value)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}function hc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(cc(arguments[t]));return e}function uc(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var s=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],o=0,a=i.length;o<a;o++,r++)s[r]=i[o];return s}function dc(e,t,n){if(n||2===arguments.length)for(var s,r=0,i=t.length;r<i;r++)!s&&r in t||(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function pc(e){return this instanceof pc?(this.v=e,this):new pc(e)}function mc(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,r=n.apply(e,t||[]),i=[];return s=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),s[Symbol.asyncIterator]=function(){return this},s;function o(e,t){r[e]&&(s[e]=function(t){return new Promise((function(n,s){i.push([e,t,n,s])>1||a(e,t)}))},t&&(s[e]=t(s[e])))}function a(e,t){try{(n=r[e](t)).value instanceof pc?Promise.resolve(n.value.v).then(l,c):h(i[0][2],n)}catch(e){h(i[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function h(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function fc(e){var t,n;return t={},s("next"),s("throw",(function(e){throw e})),s("return"),t[Symbol.iterator]=function(){return this},t;function s(s,r){t[s]=e[s]?function(t){return(n=!n)?{value:pc(e[s](t)),done:!1}:r?r(t):t}:r}}function gc(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=lc(e),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,r){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,r,(t=e[n](t)).done,t.value)}))}}}function yc(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var vc=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},wc=function(e){return wc=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},wc(e)};function bc(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=wc(e),s=0;s<n.length;s++)"default"!==n[s]&&oc(t,e,n[s]);return vc(t,e),t}function xc(e){return e&&e.__esModule?e:{default:e}}function Tc(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)}function Sc(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n}function Oc(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Mc(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var s,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");s=t[Symbol.asyncDispose]}if(void 0===s){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");s=t[Symbol.dispose],n&&(r=s)}if("function"!=typeof s)throw new TypeError("Object not disposable.");r&&(s=function(){try{r.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:s,async:n})}else n&&e.stack.push({async:!0});return t}var Ec="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var s=new Error(n);return s.name="SuppressedError",s.error=e,s.suppressed=t,s};function Cc(e){function t(t){e.error=e.hasError?new Ec(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,s=0;return function r(){for(;n=e.stack.pop();)try{if(!n.async&&1===s)return s=0,e.stack.push(n),Promise.resolve().then(r);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return s|=2,Promise.resolve(i).then(r,(function(e){return t(e),r()}))}else s|=1}catch(e){t(e)}if(1===s)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function Dc(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,s,r,i){return n?t?".jsx":".js":!s||r&&i?s+r+"."+i.toLowerCase()+"js":e})):e}var Pc={__extends:Yl,__assign:Ql,__rest:Xl,__decorate:Zl,__param:Jl,__esDecorate:$l,__runInitializers:ec,__propKey:tc,__setFunctionName:nc,__metadata:sc,__awaiter:rc,__generator:ic,__createBinding:oc,__exportStar:ac,__values:lc,__read:cc,__spread:hc,__spreadArrays:uc,__spreadArray:dc,__await:pc,__asyncGenerator:mc,__asyncDelegator:fc,__asyncValues:gc,__makeTemplateObject:yc,__importStar:bc,__importDefault:xc,__classPrivateFieldGet:Tc,__classPrivateFieldSet:Sc,__classPrivateFieldIn:Oc,__addDisposableResource:Mc,__disposeResources:Cc,__rewriteRelativeImportExtension:Dc},Ic=Object.freeze({__proto__:null,__addDisposableResource:Mc,get __assign(){return Ql},__asyncDelegator:fc,__asyncGenerator:mc,__asyncValues:gc,__await:pc,__awaiter:rc,__classPrivateFieldGet:Tc,__classPrivateFieldIn:Oc,__classPrivateFieldSet:Sc,__createBinding:oc,__decorate:Zl,__disposeResources:Cc,__esDecorate:$l,__exportStar:ac,__extends:Yl,__generator:ic,__importDefault:xc,__importStar:bc,__makeTemplateObject:yc,__metadata:sc,__param:Jl,__propKey:tc,__read:cc,__rest:Xl,__rewriteRelativeImportExtension:Dc,__runInitializers:ec,__setFunctionName:nc,__spread:hc,__spreadArray:dc,__spreadArrays:uc,__values:lc,default:Pc});function Ac(e){const t=Lc(e),n=new y;n.setFromMatrix3(t);const s=e[0],r=n.clone();r.setPosition(s);const i=r.clone().invert(),o=e.map((e=>{const t=e.clone().applyMatrix4(i);return new g(t.x,t.y)})),a=new tt(o),l=new ot(a),c=new rt;c.setFromPoints(o);const h=jc(c);return l.getAttribute("uv").applyMatrix3(h),l.applyMatrix4(n),{geometry:l,polygonBox:c,modelMatrix:n,planeMatrix:r,projectionMatrix:i,position:s}}function Lc(e){const[n,s,r]=e,i=new at;i.setFromCoplanarPoints(s,n,r);const o=i.normal,a=o.clone().cross(new t(0,0,1));a.equals(new t)&&a.set(1,0,0);const l=o.clone().cross(a);a.normalize(),l.normalize(),o.normalize();const c=new nt;return c.elements=[a.x,a.y,a.z,l.x,l.y,l.z,o.x,o.y,o.z],c}function jc(e){const t=e.min,n=e.getSize(new g),s=new nt;return s.elements=[n.x,0,0,0,n.y,0,t.x,t.y,1],s.invert()}function _c(e,t){const n=ir(t);return e.intersectsBox(n)}function Fc(e,t,n){if("string"==typeof e){let s=t?null==n?void 0:n.get(e):null;return s||(s=Pr.load(e,(()=>{Fa.needsUpdate=!0})),null==n||n.set(e,s)),s}return e instanceof HTMLImageElement?new d(e):e instanceof HTMLCanvasElement?new Ne(e):new lt(e)}function Rc(e,t,n,s){const r=e.map,i=Fc(t,n,s);if(r){const e=i.source;i.copy(r),i.source=e}return e.map=i,i}function Bc(e,n){const{top:r,left:i,bottom:o,right:a,front:l,back:c}=e,h=new t(a,r,l),u=new t(i,o,c),d=new s;return function(e){return d.max.addVectors(e,h),d.min.subVectors(e,u),n.filter((e=>_c(d,e)))}}function Uc(e,n){const s=new Se(new t,e);return function(e){return s.center.copy(e),n.filter((e=>_c(s,e)))}}function kc(e,n){const s=e.length-1,r=[];for(let t=0;t<s;t++){const n=e[t],s=e[t+1],i=new S(n,s);r.push(i)}const i=new Se(new t,n);return function(e){return e.filter((e=>{const n=ir(e),s=new t;n.getCenter(s);const o=r.filter((e=>{const t=e.closestPointToPointParameter(s);return 0<=t||t>=1}));if(0===o.length)return!1;let a=1/0,l=s;for(const e of o){const n=e.closestPointToPoint(s,!0,new t),r=s.distanceToSquared(n);r<a&&(a=r,l=n)}return i.center.copy(l),i.intersectsBox(n)}))}}class Nc extends Ga{constructor(e,t){const{image:n,color:s,width:r,height:i,position:o,rotation:a,needLight:l,id:c,name:h,userData:u,level:d,visible:p,cache:m=!0}=e,f=Xl(e,["image","color","width","height","position","rotation","needLight","id","name","userData","level","visible","cache"]);super({id:c,name:h,position:o,rotation:a,userData:u,level:d,visible:p});const g=n?Object.assign(Object.assign({transparent:!0},f),{map:Fc(n,m,t)}):f;this.geometry=new $e(r,i),this.material=l?new ct(g):new ke(g),this.material.depthWrite=!this.material.transparent,this.image=n}}class zc extends Ga{constructor(e,n){const{points:s,image:r,color:i,needLight:o,id:a,name:l,userData:c,level:h,visible:u,cache:d}=e,p=Xl(e,["points","image","color","needLight","id","name","userData","level","visible","cache"]),m=s.map((e=>new t(e.x,e.y,e.z))),f=r?Object.assign(Object.assign({transparent:!0},p),{map:Fc(r,null==d||d,n)}):p,g=o?new ct(f):new ke(f),{geometry:y,position:v}=Ac(m);super({id:a,name:l,userData:c,level:h,visible:u},y,g),this.position.copy(v),this.material=g,this.geometry=y,this.image=r}}var Gc=Object.freeze({__proto__:null,BaseMesh:Ga,BaseObject3D:za,Canvas3D:ll,Circle:tl,Decal:Kl,DecalUVMapType:Gl,Ground:cl,Group:Va,Icon:Ja,Line:ol,Link:sl,Model:Qa,Node:el,PluginObject:Ha,Poi:Xa,PoiMesh:Nc,PoiNode:Ya,Point:$a,Polygon:al,PolygonPoiMesh:zc,Topology:rl,isPoiNode25D:Ka,isPoiNode2D:Wa,isPoiNode3D:qa}),Vc=Object.defineProperty,Hc=(e,t,n)=>(((e,t,n)=>{t in e?Vc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function Wc(e,n,s){const r=(s=s??0)+1;if(oi(e))return e;if(null!=e.x&&null!=e.y)return function(e){return null!=e.w?(new te).copy(e):null!=e.z?(new t).copy(e):(new g).copy(e)}(e);if(Array.isArray(e))return e.map((e=>Wc(e,n,r)));if(e instanceof Map){const t=new Map;for(const s of e.keys()){const i=Wc(e.get(s),n,r);t.set(s,i)}return t}if(function(e){return e&&"function"==typeof e[Symbol.iterator]}(e)){const t=[];for(const s of e){const e=Wc(s,n,r);t.push(e)}return t}if((n||0===s)&&"object"==typeof e){const t={};for(const s of Object.keys(e))t[s]=Wc(e[s],n,r);return t}return e}function Kc(e,t,n){let s=function(e,t){const n=Math.sqrt(e.lengthSq()*t.lengthSq());if(0===n)return 0;let s=e.dot(t)/n;return s=Math.max(-1,Math.min(1,s)),Math.acos(s)}(e,t);return 0===s?s:e.clone().cross(t).dot(n)<0?-s:s}const qc=180/Math.PI,Yc={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Qc={degrees:!0,map:Yc,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class Xc{constructor(e){Hc(this,"_options"),Hc(this,"_listMap"),Hc(this,"_front"),Hc(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Qc)}static set options(e){this._options=Object.assign({},structuredClone(Yc),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(Yc);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,s]of Object.entries(e))t[n]=Array.isArray(s)?s:Object.entries(s).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Qc.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Qc.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,s){const r=(new t).copy(e),i=(new t).copy(n??this.front),o=(new t).copy(s??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const s=t.clone().negate(),r=n.clone().projectOnPlane(t),i=Kc(t,e.clone().projectOnPlane(r),r),o=t.clone().cross(r);return{yaw:i,pitch:Kc(t,e.clone().projectOnPlane(o),o),roll:Kc(r,e.clone().projectOnPlane(s),s)}}(r,i,o);return this.degrees&&(a*=qc,l*=qc,c*=qc),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],s=this.listMap[e];if(!s)return n;for(const{name:e,range:[r,i]}of s)(t>=r&&t<i||t<=r&&t>i)&&n.push(e);return n}}function Zc(e){const n={};if(Array.isArray(e)){const s=e.map((e=>(new t).copy(e)));n.points=s}else if(e instanceof rl){const s=e.nodes.map((e=>e.getWorldPosition(new t)));n.points=s}else n.curve=e;return n}Hc(Xc,"_options"),new Xc,new nt;var Jc={},$c={},eh=Io(Ic),th={},nh={},sh={},rh={};Object.defineProperty(rh,"__esModule",{value:!0});var ih=function(){function e(t,n){if(void 0===n&&(n=null),this.nonEmpty=!1,t||n){if(!t)throw new Error("Parameter head cannot be null.");this.head=t,this.tail=n||e.NIL,this.nonEmpty=!0}else{if(e.NIL)throw new Error("Parameters head and tail are null. Use the NIL element instead.");this.nonEmpty=!1}}return Object.defineProperty(e.prototype,"length",{get:function(){if(!this.nonEmpty)return 0;if(this.tail===e.NIL)return 1;for(var t=0,n=this;n.nonEmpty;)++t,n=n.tail;return t},enumerable:!0,configurable:!0}),e.prototype.prepend=function(t){return new e(t,this)},e.prototype.append=function(t){if(!t)return this;if(!this.nonEmpty)return new e(t);if(this.tail===e.NIL)return new e(t).prepend(this.head);for(var n=new e(this.head),s=n,r=this.tail;r.nonEmpty;)s=s.tail=new e(r.head),r=r.tail;return s.tail=new e(t),n},e.prototype.insertWithPriority=function(t){if(!this.nonEmpty)return new e(t);var n=t.priority;if(n>this.head.priority)return this.prepend(t);for(var s=new e(this.head),r=s,i=this.tail;i.nonEmpty;){if(n>i.head.priority)return r.tail=i.prepend(t),s;r=r.tail=new e(i.head),i=i.tail}return r.tail=new e(t),s},e.prototype.filterNot=function(t){if(!this.nonEmpty||null==t)return this;if(t===this.head.listener)return this.tail;for(var n=new e(this.head),s=n,r=this.tail;r.nonEmpty;){if(r.head.listener===t)return s.tail=r.tail,n;s=s.tail=new e(r.head),r=r.tail}return this},e.prototype.contains=function(e){if(!this.nonEmpty)return!1;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return!0;t=t.tail}return!1},e.prototype.find=function(e){if(!this.nonEmpty)return null;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return t.head;t=t.tail}return null},e.prototype.toString=function(){for(var e="",t=this;t.nonEmpty;)e+=t.head+" -> ",t=t.tail;return"[List "+(e+="NIL")+"]"},e.NIL=new e(null,null),e}();rh.SlotList=ih;var oh={};Object.defineProperty(oh,"__esModule",{value:!0});var ah=function(){function e(e,t,n,s){void 0===n&&(n=!1),void 0===s&&(s=0),this._enabled=!0,this._once=!1,this._priority=0,this._listener=e,this._once=n,this._signal=t,this._priority=s,this.verifyListener(e)}return e.prototype.execute0=function(){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,this._params):this._listener())},e.prototype.execute1=function(e){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,[e].concat(this._params)):this._listener(e))},e.prototype.execute=function(e){if(this._enabled){this._once&&this.remove(),this._params&&this._params.length&&(e=e.concat(this._params));var t=e.length;0===t?this._listener():1===t?this._listener(e[0]):2===t?this._listener(e[0],e[1]):3===t?this._listener(e[0],e[1],e[2]):this._listener.apply(null,e)}},Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){if(null==e)throw new Error("Given listener is null.\nDid you want to set enabled to false instead?");this.verifyListener(e),this._listener=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"once",{get:function(){return this._once},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"priority",{get:function(){return this._priority},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"[Slot listener: "+this._listener+", once: "+this._once+", priority: "+this._priority+", enabled: "+this._enabled+"]"},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this._signal.remove(this._listener)},e.prototype.verifyListener=function(e){if(null==e)throw new Error("Given listener is null.");if(null==this._signal)throw new Error("Internal signal reference has not been set yet.")},e}();oh.Slot=ah,Object.defineProperty(sh,"__esModule",{value:!0});var lh=rh,ch=oh,hh=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.slots=lh.SlotList.NIL,this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if(!(this._valueClasses[t]instanceof Object))throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+">."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slots.length},enumerable:!0,configurable:!0}),e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){var t=this.slots.find(e);return t?(this.slots=this.slots.filterNot(e),t):null},e.prototype.removeAll=function(){this.slots=lh.SlotList.NIL},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,s=e.length;if(s<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+s+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var i=this.slots;if(i.nonEmpty)for(;i.nonEmpty;)i.head.execute(e),i=i.tail},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.registrationPossible(e,t)){var n=new ch.Slot(e,this,t);return this.slots=this.slots.prepend(n),n}return this.slots.find(e)},e.prototype.registrationPossible=function(e,t){if(!this.slots.nonEmpty)return!0;var n=this.slots.find(e);if(!n)return!0;if(n.once!==t)throw new Error("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},e}();sh.OnceSignal=hh,Object.defineProperty(nh,"__esModule",{value:!0});var uh=eh,dh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh.__extends(t,e),t.prototype.add=function(e){return this.registerListener(e)},t}(sh.OnceSignal);nh.Signal=dh,Object.defineProperty(th,"__esModule",{value:!0});var ph=eh,mh=oh,fh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ph.__extends(t,e),t.prototype.addWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!1,t)},t.prototype.addOnceWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!0,t)},t.prototype.registerListener=function(e,t){return void 0===t&&(t=!1),this.registerListenerWithPriority(e,t)},t.prototype.registerListenerWithPriority=function(e,t,n){if(void 0===n&&(n=0),this.registrationPossible(e,t)){var s=new mh.Slot(e,this,t,n);return this.slots=this.slots.insertWithPriority(s),s}return this.slots.find(e)},t}(nh.Signal);th.PrioritySignal=fh,Object.defineProperty($c,"__esModule",{value:!0});var gh=eh,yh=function(e){function t(t){void 0===t&&(t=null);for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var r=this;return n=1===n.length&&n[0]instanceof Array?n[0]:n,(r=e.call(this,n)||this)._target=t,r}return gh.__extends(t,e),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){e!==this._target&&(this.removeAll(),this._target=e)},enumerable:!0,configurable:!0}),t.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,s=e.length;if(s<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+s+".");for(var r=0;r<n;r++)if(null!==e[r]&&e[r].constructor!==this._valueClasses[r])throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");var i=e[0];i&&(i.target&&(i=i.clone(),e[0]=i),i.target=this.target,i.currentTarget=this.target,i.signal=this);for(var o=this.slots;o.nonEmpty;)o.head.execute(e),o=o.tail;if(i&&i.bubbles)for(var a=this.target;a&&a.hasOwnProperty("parent")&&(null===(a=a.parent).onEventBubbled||(i.currentTarget=a,a.onEventBubbled(i))););},t}(th.PrioritySignal);$c.DeluxeSignal=yh;var vh={};Object.defineProperty(vh,"__esModule",{value:!0});var wh=function(){function e(e){void 0===e&&(e=!1),this._bubbles=e}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},set:function(e){this._signal=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(e){this._target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},set:function(e){this._currentTarget=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bubbles",{get:function(){return this._bubbles},set:function(e){this._bubbles=e},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._bubbles)},e}();vh.GenericEvent=wh;var bh={};Object.defineProperty(bh,"__esModule",{value:!0}),bh.IOnceSignal=Symbol("IOnceSignal");var xh={};Object.defineProperty(xh,"__esModule",{value:!0}),xh.IPrioritySignal=Symbol("IPrioritySignal");var Th={};Object.defineProperty(Th,"__esModule",{value:!0}),Th.ISignal=Symbol("ISignal");var Sh={};Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.ISlot=Symbol("ISlot");var Oh={};Object.defineProperty(Oh,"__esModule",{value:!0});var Mh=oh,Eh=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.valueClasses=1===e.length&&e[0]instanceof Array?e[0]:e}return Object.defineProperty(e.prototype,"valueClasses",{get:function(){return this._valueClasses},set:function(e){this._valueClasses=e?e.slice():[];for(var t=this._valueClasses.length;t--;)if("function"!=typeof this._valueClasses[t])throw new Error("Invalid valueClasses argument: item at index "+t+" should be a Class but was:<"+this._valueClasses[t]+"'>."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slot?1:0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){return this.registerListener(e)},e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){if(this.slot&&this.slot.listener===e){var t=this.slot;return this.slot=null,t}return null},e.prototype.removeAll=function(){this.slot&&this.slot.remove()},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._valueClasses.length,s=e.length;if(s<n)throw new Error("Incorrect number of arguments. Expected at least "+n+" but received "+s+".");for(var r=0;r<n;r++)if(!(null===e[r]||e[r]instanceof this._valueClasses[r]||e[r].constructor===this._valueClasses[r]))throw new Error("Value object <"+e[r]+"> is not an instance of <"+this._valueClasses[r]+">.");this.slot&&this.slot.execute(e)},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.slot)throw new Error("You cannot add or addOnce with a listener already added, remove the current listener first.");return this.slot=new Mh.Slot(e,this,t)},e}();Oh.MonoSignal=Eh;var Ch={};Object.defineProperty(Ch,"__esModule",{value:!0});var Dh=eh,Ph=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dh.__extends(t,e),t.prototype.addOnce=function(t){var n=e.prototype.addOnce.call(this,t);return this.isDispatched&&(n.execute(this.valueObjects),n.remove()),n},t.prototype.dispatch=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDispatched)throw new Error("You cannot dispatch() a Promise more than once");this.isDispatched=!0,this.valueObjects=t,e.prototype.dispatch.apply(this,t)},t}(sh.OnceSignal);Ch.Promise=Ph,Object.defineProperty(Jc,"__esModule",{value:!0});var Ih=$c;Jc.DeluxeSignal=Ih.DeluxeSignal;var Ah=vh;Jc.GenericEvent=Ah.GenericEvent;var Lh=bh;Jc.IOnceSignal=Lh.IOnceSignal;var jh=xh;Jc.IPrioritySignal=jh.IPrioritySignal;var _h=Th;Jc.ISignal=_h.ISignal;var Fh=Sh;Jc.ISlot=Fh.ISlot;var Rh=Oh;Jc.MonoSignal=Rh.MonoSignal;var Bh=sh;Jc.OnceSignal=Bh.OnceSignal;var Uh=th;Jc.PrioritySignal=Uh.PrioritySignal;var kh=Ch;Jc.Promise=kh.Promise;var Nh=nh,zh=Jc.Signal=Nh.Signal,Gh=oh;Jc.Slot=Gh.Slot;var Vh=rh;Jc.SlotList=Vh.SlotList;class Hh{constructor(){this.objects=new Map,this.classified={Group:new Set,Light:new Set,Model:new Set,Poi:new Set,PoiNode:new Set,Canvas3D:new Set,Topology:new Set,Helper:new Set,Decal:new Set,PluginObject:new Set}}dispose(){this.objects.clear(),Object.values(this.classified).forEach((e=>e.clear()))}}class Wh{constructor(e,t,n){this.type=e,this.viewport=t,this.objectsCache=n,this.scene=this.viewport.scene}createGroup(e,t){const n=new Va(e);return null!==t&&this.viewport.scener.addObject(n,t),n}clear(){this.getAll().forEach((e=>{this.viewport.scener.removeObject(e)}))}getAll(){return[...this.objectsCache]}hideAll(){this.getAll().forEach((e=>{e.hide?e.hide():e.visible=!1})),this.viewport.signals.objectChanged.dispatch()}showAll(){this.getAll().forEach((e=>{e.show?e.show():e.visible=!0})),this.viewport.signals.objectChanged.dispatch()}}class Kh extends Wh{constructor(e,t){super(Xs.Light,e,t.classified.Light),this.viewport=e,this.cache=t,kn.init()}createAmbientLight(e){const{id:t,name:n="",color:s=10132122,intensity:r=10}=e,i=new ht(s,r);return i.name=n,i.userData.sid=t,i.userData.stype="Light",this.viewport.scener.addObject(i,this.scene),i}setAmbientLight(e,t){const{name:n="",color:s=10132122,intensity:r=10}=t;return!!e&&(e.name=n,e.color=new u(s),e.intensity=r,this.viewport.signals.objectChanged.dispatch(),!0)}createDirectionalLight(e){const{id:t,name:n="",color:s=10132122,intensity:r=10,position:i={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new ut(s,r);if(h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(i.x,i.y,i.z),h.target.name=`${n}-target`,h.target.position.set(o.x,o.y,o.z),h.castShadow=a,a){const e=h.position.distanceTo(h.target.position);h.shadow.bias=-.005,h.shadow.camera.left=-e,h.shadow.camera.right=e,h.shadow.camera.top=e,h.shadow.camera.bottom=-e,h.shadow.camera.far=e,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(h,this.scene),this.viewport.scener.addObject(h.target,this.scene),h}setDirectionalLight(e,t){const{name:n="",color:s=10132122,intensity:r=10,position:i={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;if(!e)return!1;if(e.name=n,e.color=new u(s),e.intensity=r,e.position.set(i.x,i.y,i.z),e.target.position.set(o.x,o.y,o.z),e.castShadow=a,a){const t=e.position.distanceTo(e.target.position);e.shadow.bias=-.005,e.shadow.camera.left=-t,e.shadow.camera.right=t,e.shadow.camera.top=t,e.shadow.camera.bottom=-t,e.shadow.camera.far=t,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createHemisphereLight(e){const{id:t,name:n="",skyColor:s=16777215,groundColor:r=14540253,intensity:i=10,position:o={x:0,y:0,z:0}}=e,a=new dt(s,r,i);return a.name=n,a.position.set(o.x,o.y,o.z),a.userData.sid=t,a.userData.stype="Light",this.viewport.scener.addObject(a,this.scene),a}setHemisphereLight(e,t){const{name:n="",skyColor:s=16777215,groundColor:r=14540253,intensity:i=10,position:o={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(s),e.groundColor=new u(r),e.intensity=i,e.position.set(o.x,o.y,o.z),this.viewport.signals.objectChanged.dispatch(),!0)}createSpotLight(e){const{id:t,name:n="",color:s=16777215,intensity:r=10,angle:i=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=e,u=sr(o).distanceTo(sr(a)),d=new pt(s,r,u,Math.PI/360*i,0,0);if(d.name=n,d.position.set(o.x,o.y,o.z),d.userData.sid=t,d.userData.stype="Light",d.castShadow=l,d.target.position.set(a.x,a.y,a.z),d.target.castShadow=l,d.target.receiveShadow=!0,d.target.updateMatrixWorld(),l){const e=d.position.distanceTo(d.target.position);d.shadow.autoUpdate=c,d.shadow.needsUpdate=!c,d.shadow.mapSize.width=h,d.shadow.mapSize.height=h,d.shadow.bias=-.005,d.shadow.focus=.6,d.shadow.camera.far=e,d.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(d,this.scene),d}setSpotLight(e,t){const{name:n="",color:s=16777215,intensity:r=10,angle:i=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=t;if(!e)return!1;const d=sr(o).distanceTo(sr(a));if(e.name=n,e.color=new u(s),e.intensity=r,e.distance=d,e.angle=Math.PI/360*i,e.position.set(o.x,o.y,o.z),e.castShadow=l,e.target.position.set(a.x,a.y,a.z),e.target.castShadow=l,e.target.updateMatrixWorld(),l){const t=e.position.distanceTo(e.target.position);e.shadow.autoUpdate=c,e.shadow.needsUpdate=!c,e.shadow.mapSize.width=h,e.shadow.mapSize.height=h,e.shadow.bias=-.005,e.shadow.focus=.6,e.shadow.camera.far=t,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createPointLight(e){const{id:t,name:n="",color:s=16777215,intensity:r=10,distance:i=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new mt(s,r,i);return h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(o.x,o.y,o.z),h.castShadow=a,a&&(h.shadow.bias=-.005,h.shadow.camera.far=i,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()),this.viewport.scener.addObject(h,this.scene),h}setPointLight(e,t){const{name:n="",color:s=16777215,intensity:r=10,distance:i=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;return!!e&&(e.name=n,e.color=new u(s),e.intensity=r,e.distance=i,e.position.set(o.x,o.y,o.z),e.castShadow=a,a&&(e.shadow.bias=-.005,e.shadow.camera.far=i,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()),this.viewport.signals.objectChanged.dispatch(),!0)}createRectAreaLight(e){const{id:t,name:n="",color:s=16777215,intensity:r=10,width:i=10,height:o=10,position:a={x:0,y:0,z:0}}=e,l=new ft(s,r,i,o);return l.name=n,l.userData.sid=t,l.userData.stype="Light",l.position.set(a.x,a.y,a.z),this.viewport.scener.addObject(l,this.scene),l}setRectAreaLight(e,t){const{name:n="",color:s=16777215,intensity:r=10,width:i=10,height:o=10,position:a={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(s),e.intensity=r,e.width=i,e.height=o,e.position.set(a.x,a.y,a.z),this.viewport.signals.objectChanged.dispatch(),!0)}updateAllShadow(){this.getAll().forEach((e=>{var t;!1===(null===(t=e.shadow)||void 0===t?void 0:t.autoUpdate)&&(e.shadow.needsUpdate=!0)})),this.viewport.signals.objectChanged.dispatch()}dispose(){this.getAll().forEach((e=>{var t;null===(t=e.shadow)||void 0===t||t.dispose()}))}}let qh,Yh,Qh;class Xh extends gt{constructor(e){super(e)}load(e,t,n,s){const r=this,i=""===r.path?yt.extractUrlBase(e):r.path,o=new p(this.manager);o.setPath(r.path),o.setResponseType("arraybuffer"),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,(function(n){try{t(r.parse(n,i))}catch(t){s?s(t):console.error(t),r.manager.itemError(e)}}),n,s)}parse(e,t){if(function(e){const t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===pu(e,0,t.length)}(e))qh=(new tu).parse(e);else{const t=pu(e);if(!function(e){const t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let n=0;function s(t){const s=e[t-1];return e=e.slice(n+t),n++,s}for(let e=0;e<t.length;++e){if(s(1)===t[e])return!1}return!0}(t))throw new Error("THREE.FBXLoader: Unknown format.");if(ru(t)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+ru(t));qh=(new eu).parse(t)}const n=new f(this.manager).setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);return new Zh(n,this.manager).parse(qh)}}class Zh{constructor(e,t){this.textureLoader=e,this.manager=t}parse(){Yh=this.parseConnections();const e=this.parseImages(),t=this.parseTextures(e),n=this.parseMaterials(t),s=this.parseDeformers(),r=(new Jh).parse(s);return this.parseScene(s,r,n),Qh}parseConnections(){const e=new Map;if("Connections"in qh){qh.Connections.connections.forEach((function(t){const n=t[0],s=t[1],r=t[2];e.has(n)||e.set(n,{parents:[],children:[]});const i={ID:s,relationship:r};e.get(n).parents.push(i),e.has(s)||e.set(s,{parents:[],children:[]});const o={ID:n,relationship:r};e.get(s).children.push(o)}))}return e}parseImages(){const e={},t={};if("Video"in qh.Objects){const n=qh.Objects.Video;for(const s in n){const r=n[s];if(e[parseInt(s)]=r.RelativeFilename||r.Filename,"Content"in r){const e=r.Content instanceof ArrayBuffer&&r.Content.byteLength>0,i="string"==typeof r.Content&&""!==r.Content;if(e||i){const e=this.parseImage(n[s]);t[r.RelativeFilename||r.Filename]=e}}}}for(const n in e){const s=e[n];void 0!==t[s]?e[n]=t[s]:e[n]=e[n].split("\\").pop()}return e}parseImage(e){const t=e.Content,n=e.RelativeFilename||e.Filename,s=n.slice(n.lastIndexOf(".")+1).toLowerCase();let r;switch(s){case"bmp":r="image/bmp";break;case"jpg":case"jpeg":r="image/jpeg";break;case"png":r="image/png";break;case"tif":r="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",n),r="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+s+'" is not supported.')}if("string"==typeof t)return"data:"+r+";base64,"+t;{const e=new Uint8Array(t);return window.URL.createObjectURL(new Blob([e],{type:r}))}}parseTextures(e){const t=new Map;if("Texture"in qh.Objects){const n=qh.Objects.Texture;for(const s in n){const r=this.parseTexture(n[s],e);t.set(parseInt(s),r)}}return t}parseTexture(e,t){const n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;const s=e.WrapModeU,r=e.WrapModeV,i=void 0!==s?s.value:0,o=void 0!==r?r.value:0;if(n.wrapS=0===i?Pe:vt,n.wrapT=0===o?Pe:vt,"Scaling"in e){const t=e.Scaling.value;n.repeat.x=t[0],n.repeat.y=t[1]}if("Translation"in e){const t=e.Translation.value;n.offset.x=t[0],n.offset.y=t[1]}return n}loadTexture(e,t){let n;const s=this.textureLoader.path,r=Yh.get(e.id).children;let i;void 0!==r&&r.length>0&&void 0!==t[r[0].ID]&&(n=t[r[0].ID],0!==n.indexOf("blob:")&&0!==n.indexOf("data:")||this.textureLoader.setPath(void 0));const o=e.FileName.slice(-3).toLowerCase();if("tga"===o){const t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),i=new d):(t.setPath(this.textureLoader.path),i=t.load(n))}else"psd"===o?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),i=new d):i=this.textureLoader.load(n);return this.textureLoader.setPath(s),i}parseMaterials(e){const t=new Map;if("Material"in qh.Objects){const n=qh.Objects.Material;for(const s in n){const r=this.parseMaterial(n[s],e);null!==r&&t.set(parseInt(s),r)}}return t}parseMaterial(e,t){const n=e.id,s=e.attrName;let r=e.ShadingModel;if("object"==typeof r&&(r=r.value),!Yh.has(n))return null;const i=this.parseParameters(e,t,n);let o;return r.toLowerCase(),o=new Y,o.setValues(i),o.name=s,o}parseParameters(e,t,n){const s={};e.BumpFactor&&(s.bumpScale=e.BumpFactor.value),e.Diffuse?s.color=(new u).fromArray(e.Diffuse.value).convertSRGBToLinear():!e.DiffuseColor||"Color"!==e.DiffuseColor.type&&"ColorRGB"!==e.DiffuseColor.type||(s.color=(new u).fromArray(e.DiffuseColor.value).convertSRGBToLinear()),e.DisplacementFactor&&(s.displacementScale=e.DisplacementFactor.value),e.Emissive?s.emissive=(new u).fromArray(e.Emissive.value).convertSRGBToLinear():!e.EmissiveColor||"Color"!==e.EmissiveColor.type&&"ColorRGB"!==e.EmissiveColor.type||(s.emissive=(new u).fromArray(e.EmissiveColor.value).convertSRGBToLinear()),e.EmissiveFactor&&(s.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(s.opacity=parseFloat(e.Opacity.value)),s.opacity<1&&(s.transparent=!0),e.ReflectionFactor,e.Shininess,e.Specular||e.SpecularColor&&e.SpecularColor.type;const r=this;return Yh.get(n).children.forEach((function(e){const n=e.relationship;switch(n){case"Bump":s.bumpMap=r.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":s.aoMap=r.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":s.map=r.getTexture(t,e.ID),void 0!==s.map&&(s.map.colorSpace=$);break;case"DisplacementColor":s.displacementMap=r.getTexture(t,e.ID);break;case"EmissiveColor":s.emissiveMap=r.getTexture(t,e.ID),void 0!==s.emissiveMap&&(s.emissiveMap.colorSpace=$);break;case"NormalMap":case"Maya|TEX_normal_map":s.normalMap=r.getTexture(t,e.ID);break;case"ReflectionColor":s.envMap=r.getTexture(t,e.ID),void 0!==s.envMap&&(s.envMap.mapping=h,s.envMap.colorSpace=$);break;case"SpecularColor":s.specularMap=r.getTexture(t,e.ID),void 0!==s.specularMap&&(s.specularMap.colorSpace=$);break;case"TransparentColor":case"TransparencyFactor":s.alphaMap=r.getTexture(t,e.ID),s.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",n)}})),s}getTexture(e,t){return"LayeredTexture"in qh.Objects&&t in qh.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Yh.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in qh.Objects){const n=qh.Objects.Deformer;for(const s in n){const r=n[s],i=Yh.get(parseInt(s));if("Skin"===r.attrType){const t=this.parseSkeleton(i,n);t.ID=s,i.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=i.parents[0].ID,e[s]=t}else if("BlendShape"===r.attrType){const e={id:s};e.rawTargets=this.parseMorphTargets(i,n),e.id=s,i.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[s]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const n=[];return e.children.forEach((function(e){const s=t[e.ID];if("Cluster"!==s.attrType)return;const r={ID:e.ID,indices:[],weights:[],transformLink:(new y).fromArray(s.TransformLink.a)};"Indexes"in s&&(r.indices=s.Indexes.a,r.weights=s.Weights.a),n.push(r)})),{rawBones:n,bones:[]}}parseMorphTargets(e,t){const n=[];for(let s=0;s<e.children.length;s++){const r=e.children[s],i=t[r.ID],o={name:i.attrName,initialWeight:i.DeformPercent,id:i.id,fullWeights:i.FullWeights.a};if("BlendShapeChannel"!==i.attrType)return;o.geoID=Yh.get(parseInt(r.ID)).children.filter((function(e){return void 0===e.relationship}))[0].ID,n.push(o)}return n}parseScene(e,t,n){Qh=new st;const s=this.parseModels(e.skeletons,t,n),r=qh.Objects.Model,i=this;s.forEach((function(e){const t=r[e.ID];i.setLookAtProperties(e,t);Yh.get(e.ID).parents.forEach((function(t){const n=s.get(t.ID);void 0!==n&&n.add(e)})),null===e.parent&&Qh.add(e)})),this.bindSkeleton(e.skeletons,t,s),this.createAmbientLight(),Qh.traverse((function(e){if(e.userData.transformData){e.parent&&(e.userData.transformData.parentMatrix=e.parent.matrix,e.userData.transformData.parentMatrixWorld=e.parent.matrixWorld);const t=hu(e.userData.transformData);e.applyMatrix4(t),e.updateWorldMatrix()}}));const o=(new $h).parse();1===Qh.children.length&&Qh.children[0].isGroup&&(Qh.children[0].animations=o,Qh=Qh.children[0]),Qh.animations=o}parseModels(e,t,n){const s=new Map,r=qh.Objects.Model;for(const i in r){const o=parseInt(i),a=r[i],l=Yh.get(o);let c=this.buildSkeleton(l,e,o,a.attrName);if(!c){switch(a.attrType){case"Camera":c=this.createCamera(l);break;case"Light":c=this.createLight(l);break;case"Mesh":c=this.createMesh(l,t,n);break;case"NurbsCurve":c=this.createCurve(l,t);break;case"LimbNode":case"Root":c=new C;break;default:c=new st}c.name=a.attrName?wt.sanitizeNodeName(a.attrName):"",c.userData.originalName=a.attrName,c.ID=o}this.getTransformData(c,a),s.set(o,c)}return s}buildSkeleton(e,t,n,s){let r=null;return e.parents.forEach((function(e){for(const i in t){const o=t[i];o.rawBones.forEach((function(t,i){if(t.ID===e.ID){const e=r;r=new C,r.matrixWorld.copy(t.transformLink),r.name=s?wt.sanitizeNodeName(s):"",r.userData.originalName=s,r.ID=n,o.bones[i]=r,null!==e&&r.add(e)}}))}})),r}createCamera(e){let t,n;if(e.children.forEach((function(e){const t=qh.Objects.NodeAttribute[e.ID];void 0!==t&&(n=t)})),void 0===n)t=new o;else{let e=0;void 0!==n.CameraProjectionType&&1===n.CameraProjectionType.value&&(e=1);let s=1;void 0!==n.NearPlane&&(s=n.NearPlane.value/1e3);let r=1e3;void 0!==n.FarPlane&&(r=n.FarPlane.value/1e3);let i=window.innerWidth,a=window.innerHeight;void 0!==n.AspectWidth&&void 0!==n.AspectHeight&&(i=n.AspectWidth.value,a=n.AspectHeight.value);const l=i/a;let c=45;void 0!==n.FieldOfView&&(c=n.FieldOfView.value);const h=n.FocalLength?n.FocalLength.value:null;switch(e){case 0:t=new X(c,l,s,r),null!==h&&t.setFocalLength(h);break;case 1:t=new Q(-i/2,i/2,a/2,-a/2,s,r);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+e+"."),t=new o}}return t}createLight(e){let t,n;if(e.children.forEach((function(e){const t=qh.Objects.NodeAttribute[e.ID];void 0!==t&&(n=t)})),void 0===n)t=new o;else{let e;e=void 0===n.LightType?0:n.LightType.value;let s=16777215;void 0!==n.Color&&(s=(new u).fromArray(n.Color.value).convertSRGBToLinear());let r=void 0===n.Intensity?1:n.Intensity.value/100;void 0!==n.CastLightOnObject&&0===n.CastLightOnObject.value&&(r=0);let i=0;void 0!==n.FarAttenuationEnd&&(i=void 0!==n.EnableFarAttenuation&&0===n.EnableFarAttenuation.value?0:n.FarAttenuationEnd.value);const o=1;switch(e){case 0:t=new mt(s,r,i,o);break;case 1:t=new ut(s,r);break;case 2:let e=Math.PI/3;void 0!==n.InnerAngle&&(e=a.degToRad(n.InnerAngle.value));let l=0;void 0!==n.OuterAngle&&(l=a.degToRad(n.OuterAngle.value),l=Math.max(l,1)),t=new pt(s,r,i,e,l,o);break;default:console.warn("THREE.FBXLoader: Unknown light type "+n.LightType.value+", defaulting to a PointLight."),t=new mt(s,r)}void 0!==n.CastShadows&&1===n.CastShadows.value&&(t.castShadow=!0)}return t}createMesh(e,t,n){let s,r=null,i=null;const o=[];return e.children.forEach((function(e){t.has(e.ID)&&(r=t.get(e.ID)),n.has(e.ID)&&o.push(n.get(e.ID))})),o.length>1?i=o:o.length>0?i=o[0]:(i=new Y({name:gt.DEFAULT_MATERIAL_NAME,color:13421772}),o.push(i)),"color"in r.attributes&&o.forEach((function(e){e.vertexColors=!0})),r.FBX_Deformer?(s=new P(r,i),s.normalizeSkinWeights()):(s=new W(r,i),s.castShadow=!0,s.receiveShadow=!0),s}createCurve(e,t){const n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),s=new x({name:gt.DEFAULT_MATERIAL_NAME,color:3342591,linewidth:1});return new T(n,s)}getTransformData(e,t){const n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?uu(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n}setLookAtProperties(e,n){if("LookAtProperty"in n){Yh.get(e.ID).children.forEach((function(n){if("LookAtProperty"===n.relationship){const s=qh.Objects.Model[n.ID];if("Lcl_Translation"in s){const n=s.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(n),Qh.add(e.target)):e.lookAt((new t).fromArray(n))}}}))}}bindSkeleton(e,t,n){const s=this.parsePoseNodes();for(const r in e){const i=e[r];Yh.get(parseInt(i.ID)).parents.forEach((function(e){if(t.has(e.ID)){const t=e.ID;Yh.get(t).parents.forEach((function(e){if(n.has(e.ID)){n.get(e.ID).bind(new I(i.bones),s[e.ID])}}))}}))}}parsePoseNodes(){const e={};if("Pose"in qh.Objects){const t=qh.Objects.Pose;for(const n in t)if("BindPose"===t[n].attrType&&t[n].NbPoseNodes>0){const s=t[n].PoseNode;Array.isArray(s)?s.forEach((function(t){e[t.Node]=(new y).fromArray(t.Matrix.a)})):e[s.Node]=(new y).fromArray(s.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in qh&&"AmbientColor"in qh.GlobalSettings){const e=qh.GlobalSettings.AmbientColor.value,t=e[0],n=e[1],s=e[2];if(0!==t||0!==n||0!==s){const e=new u(t,n,s).convertSRGBToLinear();Qh.add(new ht(e,1))}}}}class Jh{constructor(){this.negativeMaterialIndices=!1}parse(e){const t=new Map;if("Geometry"in qh.Objects){const n=qh.Objects.Geometry;for(const s in n){const r=Yh.get(parseInt(s)),i=this.parseGeometry(r,n[s],e);t.set(parseInt(s),i)}}return!0===this.negativeMaterialIndices&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,n){const s=n.skeletons,r=[],i=e.parents.map((function(e){return qh.Objects.Model[e.ID]}));if(0===i.length)return;const o=e.children.reduce((function(e,t){return void 0!==s[t.ID]&&(e=s[t.ID]),e}),null);e.children.forEach((function(e){void 0!==n.morphTargets[e.ID]&&r.push(n.morphTargets[e.ID])}));const a=i[0],l={};"RotationOrder"in a&&(l.eulerOrder=uu(a.RotationOrder.value)),"InheritType"in a&&(l.inheritType=parseInt(a.InheritType.value)),"GeometricTranslation"in a&&(l.translation=a.GeometricTranslation.value),"GeometricRotation"in a&&(l.rotation=a.GeometricRotation.value),"GeometricScaling"in a&&(l.scale=a.GeometricScaling.value);const c=hu(l);return this.genGeometry(t,o,r,c)}genGeometry(e,t,n,s){const r=new w;e.attrName&&(r.name=e.attrName);const i=this.parseGeoNode(e,t),o=this.genBuffers(i),a=new b(o.vertex,3);if(a.applyMatrix4(s),r.setAttribute("position",a),o.colors.length>0&&r.setAttribute("color",new b(o.colors,3)),t&&(r.setAttribute("skinIndex",new D(o.weightsIndices,4)),r.setAttribute("skinWeight",new b(o.vertexWeights,4)),r.FBX_Deformer=t),o.normal.length>0){const e=(new nt).getNormalMatrix(s),t=new b(o.normal,3);t.applyNormalMatrix(e),r.setAttribute("normal",t)}if(o.uvs.forEach((function(e,t){const n=0===t?"uv":`uv${t}`;r.setAttribute(n,new b(o.uvs[t],2))})),i.material&&"AllSame"!==i.material.mappingType){let e=o.materialIndex[0],t=0;if(o.materialIndex.forEach((function(n,s){n!==e&&(r.addGroup(t,s-t,e),e=n,t=s)})),r.groups.length>0){const t=r.groups[r.groups.length-1],n=t.start+t.count;n!==o.materialIndex.length&&r.addGroup(n,o.materialIndex.length-n,e)}0===r.groups.length&&r.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(r,e,n,s),r}parseGeoNode(e,t){const n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&n.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(s,r){void 0===n.weightTable[s]&&(n.weightTable[s]=[]),n.weightTable[s].push({id:t,weight:e.weights[r]})}))}))),n}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let n=0,s=0,r=!1,i=[],o=[],a=[],l=[],c=[],h=[];const u=this;return e.vertexIndices.forEach((function(d,p){let m,f=!1;d<0&&(d^=-1,f=!0);let g=[],y=[];if(i.push(3*d,3*d+1,3*d+2),e.color){const t=au(p,n,d,e.color);a.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){y.push(e.weight),g.push(e.id)})),y.length>4){r||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),r=!0);const e=[0,0,0,0],t=[0,0,0,0];y.forEach((function(n,s){let r=n,i=g[s];t.forEach((function(t,n,s){if(r>t){s[n]=r,r=t;const o=e[n];e[n]=i,i=o}}))})),g=e,y=t}for(;y.length<4;)y.push(0),g.push(0);for(let e=0;e<4;++e)c.push(y[e]),h.push(g[e])}if(e.normal){const t=au(p,n,d,e.normal);o.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(m=au(p,n,d,e.material)[0],m<0&&(u.negativeMaterialIndices=!0,m=0)),e.uv&&e.uv.forEach((function(e,t){const s=au(p,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(s[0]),l[t].push(s[1])})),s++,f&&(u.genFace(t,e,i,m,o,a,l,c,h,s),n++,s=0,i=[],o=[],a=[],l=[],c=[],h=[])})),t}getNormalNewell(e){const n=new t(0,0,0);for(let t=0;t<e.length;t++){const s=e[t],r=e[(t+1)%e.length];n.x+=(s.y-r.y)*(s.z+r.z),n.y+=(s.z-r.z)*(s.x+r.x),n.z+=(s.x-r.x)*(s.y+r.y)}return n.normalize(),n}getNormalTangentAndBitangent(e){const n=this.getNormalNewell(e),s=(Math.abs(n.z)>.5?new t(0,1,0):new t(0,0,1)).cross(n).normalize(),r=n.clone().cross(s).normalize();return{normal:n,tangent:s,bitangent:r}}flattenVertex(e,t,n){return new g(e.dot(t),e.dot(n))}genFace(e,n,s,r,i,o,a,l,c,h){let u;if(h>3){const e=[];for(let r=0;r<s.length;r+=3)e.push(new t(n.vertexPositions[s[r]],n.vertexPositions[s[r+1]],n.vertexPositions[s[r+2]]));const{tangent:r,bitangent:i}=this.getNormalTangentAndBitangent(e),o=[];for(const t of e)o.push(this.flattenVertex(t,r,i));u=bt.triangulateShape(o,[])}else u=[[0,1,2]];for(const[t,h,d]of u)e.vertex.push(n.vertexPositions[s[3*t]]),e.vertex.push(n.vertexPositions[s[3*t+1]]),e.vertex.push(n.vertexPositions[s[3*t+2]]),e.vertex.push(n.vertexPositions[s[3*h]]),e.vertex.push(n.vertexPositions[s[3*h+1]]),e.vertex.push(n.vertexPositions[s[3*h+2]]),e.vertex.push(n.vertexPositions[s[3*d]]),e.vertex.push(n.vertexPositions[s[3*d+1]]),e.vertex.push(n.vertexPositions[s[3*d+2]]),n.skeleton&&(e.vertexWeights.push(l[4*t]),e.vertexWeights.push(l[4*t+1]),e.vertexWeights.push(l[4*t+2]),e.vertexWeights.push(l[4*t+3]),e.vertexWeights.push(l[4*h]),e.vertexWeights.push(l[4*h+1]),e.vertexWeights.push(l[4*h+2]),e.vertexWeights.push(l[4*h+3]),e.vertexWeights.push(l[4*d]),e.vertexWeights.push(l[4*d+1]),e.vertexWeights.push(l[4*d+2]),e.vertexWeights.push(l[4*d+3]),e.weightsIndices.push(c[4*t]),e.weightsIndices.push(c[4*t+1]),e.weightsIndices.push(c[4*t+2]),e.weightsIndices.push(c[4*t+3]),e.weightsIndices.push(c[4*h]),e.weightsIndices.push(c[4*h+1]),e.weightsIndices.push(c[4*h+2]),e.weightsIndices.push(c[4*h+3]),e.weightsIndices.push(c[4*d]),e.weightsIndices.push(c[4*d+1]),e.weightsIndices.push(c[4*d+2]),e.weightsIndices.push(c[4*d+3])),n.color&&(e.colors.push(o[3*t]),e.colors.push(o[3*t+1]),e.colors.push(o[3*t+2]),e.colors.push(o[3*h]),e.colors.push(o[3*h+1]),e.colors.push(o[3*h+2]),e.colors.push(o[3*d]),e.colors.push(o[3*d+1]),e.colors.push(o[3*d+2])),n.material&&"AllSame"!==n.material.mappingType&&(e.materialIndex.push(r),e.materialIndex.push(r),e.materialIndex.push(r)),n.normal&&(e.normal.push(i[3*t]),e.normal.push(i[3*t+1]),e.normal.push(i[3*t+2]),e.normal.push(i[3*h]),e.normal.push(i[3*h+1]),e.normal.push(i[3*h+2]),e.normal.push(i[3*d]),e.normal.push(i[3*d+1]),e.normal.push(i[3*d+2])),n.uv&&n.uv.forEach((function(n,s){void 0===e.uvs[s]&&(e.uvs[s]=[]),e.uvs[s].push(a[s][2*t]),e.uvs[s].push(a[s][2*t+1]),e.uvs[s].push(a[s][2*h]),e.uvs[s].push(a[s][2*h+1]),e.uvs[s].push(a[s][2*d]),e.uvs[s].push(a[s][2*d+1])}))}addMorphTargets(e,t,n,s){if(0===n.length)return;e.morphTargetsRelative=!0,e.morphAttributes.position=[];const r=this;n.forEach((function(n){n.rawTargets.forEach((function(n){const i=qh.Objects.Geometry[n.geoID];void 0!==i&&r.genMorphGeometry(e,t,i,s,n.name)}))}))}genMorphGeometry(e,t,n,s,r){const i=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],o=void 0!==n.Vertices?n.Vertices.a:[],a=void 0!==n.Indexes?n.Indexes.a:[],l=3*e.attributes.position.count,c=new Float32Array(l);for(let e=0;e<a.length;e++){const t=3*a[e];c[t]=o[3*e],c[t+1]=o[3*e+1],c[t+2]=o[3*e+2]}const h={vertexIndices:i,vertexPositions:c},u=this.genBuffers(h),d=new b(u.vertex,3);d.name=r||n.attrName,d.applyMatrix4(s),e.morphAttributes.position.push(d)}parseNormals(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,s=e.Normals.a;let r=[];return"IndexToDirect"===n&&("NormalIndex"in e?r=e.NormalIndex.a:"NormalsIndex"in e&&(r=e.NormalsIndex.a)),{dataSize:3,buffer:s,indices:r,mappingType:t,referenceType:n}}parseUVs(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,s=e.UV.a;let r=[];return"IndexToDirect"===n&&(r=e.UVIndex.a),{dataSize:2,buffer:s,indices:r,mappingType:t,referenceType:n}}parseVertexColors(e){const t=e.MappingInformationType,n=e.ReferenceInformationType,s=e.Colors.a;let r=[];"IndexToDirect"===n&&(r=e.ColorIndex.a);for(let e=0,t=new u;e<s.length;e+=4)t.fromArray(s,e).convertSRGBToLinear().toArray(s,e);return{dataSize:4,buffer:s,indices:r,mappingType:t,referenceType:n}}parseMaterialIndices(e){const t=e.MappingInformationType,n=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};const s=e.Materials.a,r=[];for(let e=0;e<s.length;++e)r.push(e);return{dataSize:1,buffer:s,indices:r,mappingType:t,referenceType:n}}parseNurbsGeometry(e){const t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new w;const n=t-1,s=e.KnotVector.a,r=[],i=e.Points.a;for(let e=0,t=i.length;e<t;e+=4)r.push((new te).fromArray(i,e));let o,a;if("Closed"===e.Form)r.push(r[0]);else if("Periodic"===e.Form){o=n,a=s.length-1-o;for(let e=0;e<n;++e)r.push(r[e])}const l=new Yn(n,s,r,o,a).getPoints(12*r.length);return(new w).setFromPoints(l)}}class $h{parse(){const e=[],t=this.parseClips();if(void 0!==t)for(const n in t){const s=t[n],r=this.addClip(s);e.push(r)}return e}parseClips(){if(void 0===qh.Objects.AnimationCurve)return;const e=this.parseAnimationCurveNodes();this.parseAnimationCurves(e);const t=this.parseAnimationLayers(e);return this.parseAnimStacks(t)}parseAnimationCurveNodes(){const e=qh.Objects.AnimationCurveNode,t=new Map;for(const n in e){const s=e[n];if(null!==s.attrName.match(/S|R|T|DeformPercent/)){const e={id:s.id,attr:s.attrName,curves:{}};t.set(e.id,e)}}return t}parseAnimationCurves(e){const t=qh.Objects.AnimationCurve;for(const n in t){const s={id:t[n].id,times:t[n].KeyTime.a.map(iu),values:t[n].KeyValueFloat.a},r=Yh.get(s.id);if(void 0!==r){const t=r.parents[0].ID,n=r.parents[0].relationship;n.match(/X/)?e.get(t).curves.x=s:n.match(/Y/)?e.get(t).curves.y=s:n.match(/Z/)?e.get(t).curves.z=s:n.match(/DeformPercent/)&&e.has(t)&&(e.get(t).curves.morph=s)}}}parseAnimationLayers(e){const t=qh.Objects.AnimationLayer,n=new Map;for(const s in t){const t=[],r=Yh.get(parseInt(s));if(void 0!==r){r.children.forEach((function(n,s){if(e.has(n.ID)){const r=e.get(n.ID);if(void 0!==r.curves.x||void 0!==r.curves.y||void 0!==r.curves.z){if(void 0===t[s]){const e=Yh.get(n.ID).parents.filter((function(e){return void 0!==e.relationship}))[0].ID;if(void 0!==e){const r=qh.Objects.Model[e.toString()];if(void 0===r)return void console.warn("THREE.FBXLoader: Encountered a unused curve.",n);const i={modelName:r.attrName?wt.sanitizeNodeName(r.attrName):"",ID:r.id,initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};Qh.traverse((function(e){e.ID===r.id&&(i.transform=e.matrix,e.userData.transformData&&(i.eulerOrder=e.userData.transformData.eulerOrder))})),i.transform||(i.transform=new y),"PreRotation"in r&&(i.preRotation=r.PreRotation.value),"PostRotation"in r&&(i.postRotation=r.PostRotation.value),t[s]=i}}t[s]&&(t[s][r.attr]=r)}else if(void 0!==r.curves.morph){if(void 0===t[s]){const e=Yh.get(n.ID).parents.filter((function(e){return void 0!==e.relationship}))[0].ID,r=Yh.get(e).parents[0].ID,i=Yh.get(r).parents[0].ID,o=Yh.get(i).parents[0].ID,a=qh.Objects.Model[o],l={modelName:a.attrName?wt.sanitizeNodeName(a.attrName):"",morphName:qh.Objects.Deformer[e].attrName};t[s]=l}t[s][r.attr]=r}}})),n.set(parseInt(s),t)}}return n}parseAnimStacks(e){const t=qh.Objects.AnimationStack,n={};for(const s in t){const r=Yh.get(parseInt(s)).children;r.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const i=e.get(r[0].ID);n[s]={name:t[s].attrName,layer:i}}return n}addClip(e){let t=[];const n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new A(e.name,-1,t)}generateTracks(e){const n=[];let s=new t,r=new t;if(e.transform&&e.transform.decompose(s,new i,r),s=s.toArray(),r=r.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.T.curves,s,"position");void 0!==t&&n.push(t)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const t=this.generateRotationTrack(e.modelName,e.R.curves,e.preRotation,e.postRotation,e.eulerOrder);void 0!==t&&n.push(t)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.S.curves,r,"scale");void 0!==t&&n.push(t)}if(void 0!==e.DeformPercent){const t=this.generateMorphTrack(e);void 0!==t&&n.push(t)}return n}generateVectorTrack(e,t,n,s){const r=this.getTimesForAllAxes(t),i=this.getKeyframeTrackValues(r,t,n);return new L(e+"."+s,r,i)}generateRotationTrack(e,t,s,r,o){let l,c;if(void 0!==t.x&&void 0!==t.y&&void 0!==t.z){const e=this.interpolateRotations(t.x,t.y,t.z,o);l=e[0],c=e[1]}void 0!==s&&((s=s.map(a.degToRad)).push(o),s=(new n).fromArray(s),s=(new i).setFromEuler(s)),void 0!==r&&((r=r.map(a.degToRad)).push(o),r=(new n).fromArray(r),r=(new i).setFromEuler(r).invert());const h=new i,u=new n,d=[];if(!c||!l)return new j(e+".quaternion",[],[]);for(let e=0;e<c.length;e+=3){if(u.set(c[e],c[e+1],c[e+2],o),h.setFromEuler(u),void 0!==s&&h.premultiply(s),void 0!==r&&h.multiply(r),e>2){(new i).fromArray(d,(e-3)/3*4).dot(h)<0&&h.set(-h.x,-h.y,-h.z,-h.w)}h.toArray(d,e/3*4)}return new j(e+".quaternion",l,d)}generateMorphTrack(e){const t=e.DeformPercent.curves.morph,n=t.values.map((function(e){return e/100})),s=Qh.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new N(e.modelName+".morphTargetInfluences["+s+"]",t.times,n)}getTimesForAllAxes(e){let t=[];if(void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})),t.length>1){let e=1,n=t[0];for(let s=1;s<t.length;s++){const r=t[s];r!==n&&(t[e]=r,n=r,e++)}t=t.slice(0,e)}return t}getKeyframeTrackValues(e,t,n){const s=n,r=[];let i=-1,o=-1,a=-1;return e.forEach((function(e){if(t.x&&(i=t.x.times.indexOf(e)),t.y&&(o=t.y.times.indexOf(e)),t.z&&(a=t.z.times.indexOf(e)),-1!==i){const e=t.x.values[i];r.push(e),s[0]=e}else r.push(s[0]);if(-1!==o){const e=t.y.values[o];r.push(e),s[1]=e}else r.push(s[1]);if(-1!==a){const e=t.z.values[a];r.push(e),s[2]=e}else r.push(s[2])})),r}interpolateRotations(e,t,s,r){const o=[],l=[];o.push(e.times[0]),l.push(a.degToRad(e.values[0])),l.push(a.degToRad(t.values[0])),l.push(a.degToRad(s.values[0]));for(let c=1;c<e.values.length;c++){const h=[e.values[c-1],t.values[c-1],s.values[c-1]];if(isNaN(h[0])||isNaN(h[1])||isNaN(h[2]))continue;const u=h.map(a.degToRad),d=[e.values[c],t.values[c],s.values[c]];if(isNaN(d[0])||isNaN(d[1])||isNaN(d[2]))continue;const p=d.map(a.degToRad),m=[d[0]-h[0],d[1]-h[1],d[2]-h[2]],f=[Math.abs(m[0]),Math.abs(m[1]),Math.abs(m[2])];if(f[0]>=180||f[1]>=180||f[2]>=180){const t=Math.max(...f)/180,s=new n(...u,r),a=new n(...p,r),h=(new i).setFromEuler(s),d=(new i).setFromEuler(a);h.dot(d)&&d.set(-d.x,-d.y,-d.z,-d.w);const m=e.times[c-1],g=e.times[c]-m,y=new i,v=new n;for(let e=0;e<1;e+=1/t)y.copy(h.clone().slerp(d.clone(),e)),o.push(m+e*g),v.setFromQuaternion(y,r),l.push(v.x),l.push(v.y),l.push(v.z)}else o.push(e.times[c]),l.push(a.degToRad(e.values[c])),l.push(a.degToRad(t.values[c])),l.push(a.degToRad(s.values[c]))}return[o,l]}}class eu{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new su,this.nodeStack=[],this.currentProp=[],this.currentPropName="";const t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,s){const r=e.match(/^[\s\t]*;/),i=e.match(/^[\s\t]*$/);if(r||i)return;const o=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),a=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");o?t.parseNodeBegin(e,o):a?t.parseNodeProperty(e,a,n[++s]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)})),this.allNodes}parseNodeBegin(e,t){const n=t[1].trim().replace(/^"/,"").replace(/"$/,""),s=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),r={name:n},i=this.parseNodeAttr(s),o=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,r):n in o?("PoseNode"===n?o.PoseNode.push(r):void 0!==o[n].id&&(o[n]={},o[n][o[n].id]=o[n]),""!==i.id&&(o[n][i.id]=r)):"number"==typeof i.id?(o[n]={},o[n][i.id]=r):"Properties70"!==n&&(o[n]="PoseNode"===n?[r]:r),"number"==typeof i.id&&(r.id=i.id),""!==i.name&&(r.attrName=i.name),""!==i.type&&(r.attrType=i.type),this.pushStack(r)}parseNodeAttr(e){let t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));let n="",s="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),s=e[2]),{id:t,name:n,type:s}}parseNodeProperty(e,t,n){let s=t[1].replace(/^"/,"").replace(/"$/,"").trim(),r=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===s&&","===r&&(r=n.replace(/"/g,"").replace(/,$/,"").trim());const i=this.getCurrentNode();if("Properties70"!==i.name){if("C"===s){const e=r.split(",").slice(1),t=parseInt(e[0]),n=parseInt(e[1]);let o=r.split(",").slice(3);o=o.map((function(e){return e.trim().replace(/^"/,"")})),s="connections",r=[t,n],function(e,t){for(let n=0,s=e.length,r=t.length;n<r;n++,s++)e[s]=t[n]}(r,o),void 0===i[s]&&(i[s]=[])}"Node"===s&&(i.id=r),s in i&&Array.isArray(i[s])?i[s].push(r):"a"!==s?i[s]=r:i.a=r,this.setCurrentProp(i,s),"a"===s&&","!==r.slice(-1)&&(i.a=du(r))}else this.parseNodeSpecialProperty(e,s,r)}parseNodePropertyContinued(e){const t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=du(t.a))}parseNodeSpecialProperty(e,t,n){const s=n.split('",').map((function(e){return e.trim().replace(/^"/,"").replace(/\s/,"_")})),r=s[0],i=s[1],o=s[2],a=s[3];let l=s[4];switch(i){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=du(l)}this.getPrevNode()[r]={type:i,type2:o,flag:a,value:l},this.setCurrentProp(this.getPrevNode(),r)}}class tu{parse(e){const t=new nu(e);t.skip(23);const n=t.getUint32();if(n<6400)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+n);const s=new su;for(;!this.endOfContent(t);){const e=this.parseNode(t,n);null!==e&&s.add(e.name,e)}return s}endOfContent(e){return e.size()%16==0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const n={},s=t>=7500?e.getUint64():e.getUint32(),r=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const i=e.getUint8(),o=e.getString(i);if(0===s)return null;const a=[];for(let t=0;t<r;t++)a.push(this.parseProperty(e));const l=a.length>0?a[0]:"",c=a.length>1?a[1]:"",h=a.length>2?a[2]:"";for(n.singleProperty=1===r&&e.getOffset()===s;s>e.getOffset();){const s=this.parseNode(e,t);null!==s&&this.parseSubNode(o,n,s)}return n.propertyList=a,"number"==typeof l&&(n.id=l),""!==c&&(n.attrName=c),""!==h&&(n.attrType=h),""!==o&&(n.name=o),n}parseSubNode(e,t,n){if(!0===n.singleProperty){const e=n.propertyList[0];Array.isArray(e)?(t[n.name]=n,n.a=e):t[n.name]=e}else if("Connections"===e&&"C"===n.name){const e=[];n.propertyList.forEach((function(t,n){0!==n&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){let e=n.propertyList[0],s=n.propertyList[1];const r=n.propertyList[2],i=n.propertyList[3];let o;0===e.indexOf("Lcl ")&&(e=e.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[e]={type:s,type2:r,flag:i,value:o}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)}parseProperty(e){const t=e.getString(1);let n;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return n=e.getUint32(),e.getArrayBuffer(n);case"S":return n=e.getUint32(),e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const s=e.getUint32(),r=e.getUint32(),i=e.getUint32();if(0===r)switch(t){case"b":case"c":return e.getBooleanArray(s);case"d":return e.getFloat64Array(s);case"f":return e.getFloat32Array(s);case"i":return e.getInt32Array(s);case"l":return e.getInt64Array(s)}const o=qn.unzlibSync(new Uint8Array(e.getArrayBuffer(i))),a=new nu(o.buffer);switch(t){case"b":case"c":return a.getBooleanArray(s);case"d":return a.getFloat64Array(s);case"f":return a.getFloat32Array(s);case"i":return a.getInt32Array(s);case"l":return a.getInt64Array(s)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class nu{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let n=0;n<e;n++)t.push(this.getBoolean());return t}getUint8(){const e=this.dv.getUint8(this.offset);return this.offset+=1,e}getInt16(){const e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}getInt32(){const e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}getInt32Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getInt32());return t}getUint32(){const e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}getInt64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,e=4294967295&~e,4294967295===e&&(t=t+1&4294967295),e=e+1&4294967295,-(4294967296*t+e)):4294967296*t+e}getInt64Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getInt64());return t}getUint64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e}getFloat32(){const e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}getFloat32Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getFloat32());return t}getFloat64(){const e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}getFloat64Array(e){const t=[];for(let n=0;n<e;n++)t.push(this.getFloat64());return t}getArrayBuffer(e){const t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}getString(e){const t=this.offset;let n=new Uint8Array(this.dv.buffer,t,e);this.skip(e);const s=n.indexOf(0);return s>=0&&(n=new Uint8Array(this.dv.buffer,t,s)),this._textDecoder.decode(n)}}class su{add(e,t){this[e]=t}}function ru(e){const t=e.match(/FBXVersion: (\d+)/);if(t){return parseInt(t[1])}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function iu(e){return e/46186158e3}const ou=[];function au(e,t,n,s){let r;switch(s.mappingType){case"ByPolygonVertex":r=e;break;case"ByPolygon":r=t;break;case"ByVertice":r=n;break;case"AllSame":r=s.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+s.mappingType)}"IndexToDirect"===s.referenceType&&(r=s.indices[r]);const i=r*s.dataSize,o=i+s.dataSize;return function(e,t,n,s){for(let r=n,i=0;r<s;r++,i++)e[i]=t[r];return e}(ou,s.buffer,i,o)}const lu=new n,cu=new t;function hu(e){const s=new y,r=new y,i=new y,o=new y,l=new y,c=new y,h=new y,u=new y,d=new y,p=new y,m=new y,f=new y,g=e.inheritType?e.inheritType:0;if(e.translation&&s.setPosition(cu.fromArray(e.translation)),e.preRotation){const t=e.preRotation.map(a.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),r.makeRotationFromEuler(lu.fromArray(t))}if(e.rotation){const t=e.rotation.map(a.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),i.makeRotationFromEuler(lu.fromArray(t))}if(e.postRotation){const t=e.postRotation.map(a.degToRad);t.push(e.eulerOrder||n.DEFAULT_ORDER),o.makeRotationFromEuler(lu.fromArray(t)),o.invert()}e.scale&&l.scale(cu.fromArray(e.scale)),e.scalingOffset&&h.setPosition(cu.fromArray(e.scalingOffset)),e.scalingPivot&&c.setPosition(cu.fromArray(e.scalingPivot)),e.rotationOffset&&u.setPosition(cu.fromArray(e.rotationOffset)),e.rotationPivot&&d.setPosition(cu.fromArray(e.rotationPivot)),e.parentMatrixWorld&&(m.copy(e.parentMatrix),p.copy(e.parentMatrixWorld));const v=r.clone().multiply(i).multiply(o),w=new y;w.extractRotation(p);const b=new y;b.copyPosition(p);const x=b.clone().invert().multiply(p),T=w.clone().invert().multiply(x),S=l,O=new y;if(0===g)O.copy(w).multiply(v).multiply(T).multiply(S);else if(1===g)O.copy(w).multiply(T).multiply(v).multiply(S);else{const e=(new y).scale((new t).setFromMatrixScale(m)).clone().invert(),n=T.clone().multiply(e);O.copy(w).multiply(v).multiply(n).multiply(S)}const M=d.clone().invert(),E=c.clone().invert();let C=s.clone().multiply(u).multiply(d).multiply(r).multiply(i).multiply(o).multiply(M).multiply(h).multiply(c).multiply(l).multiply(E);const D=(new y).copyPosition(C),P=p.clone().multiply(D);return f.copyPosition(P),C=f.clone().multiply(O),C.premultiply(p.invert()),C}function uu(e){const t=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return 6===(e=e||0)?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),t[0]):t[e]}function du(e){return e.split(",").map((function(e){return parseFloat(e)}))}function pu(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.byteLength),(new TextDecoder).decode(new Uint8Array(e,t,n))}const mu=/^[og]\s*(.+)?/,fu=/^mtllib /,gu=/^usemtl /,yu=/^usemap /,vu=/\s+/,wu=new t,bu=new t,xu=new t,Tu=new t,Su=new t,Ou=new u;function Mu(){const e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){const n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);const s={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(s),s},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"==typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const s=this.vertices,r=this.object.geometry.vertices;r.push(s[e+0],s[e+1],s[e+2]),r.push(s[t+0],s[t+1],s[t+2]),r.push(s[n+0],s[n+1],s[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const s=this.normals,r=this.object.geometry.normals;r.push(s[e+0],s[e+1],s[e+2]),r.push(s[t+0],s[t+1],s[t+2]),r.push(s[n+0],s[n+1],s[n+2])},addFaceNormal:function(e,t,n){const s=this.vertices,r=this.object.geometry.normals;wu.fromArray(s,e),bu.fromArray(s,t),xu.fromArray(s,n),Su.subVectors(xu,bu),Tu.subVectors(wu,bu),Su.cross(Tu),Su.normalize(),r.push(Su.x,Su.y,Su.z),r.push(Su.x,Su.y,Su.z),r.push(Su.x,Su.y,Su.z)},addColor:function(e,t,n){const s=this.colors,r=this.object.geometry.colors;void 0!==s[e]&&r.push(s[e+0],s[e+1],s[e+2]),void 0!==s[t]&&r.push(s[t+0],s[t+1],s[t+2]),void 0!==s[n]&&r.push(s[n+0],s[n+1],s[n+2])},addUV:function(e,t,n){const s=this.uvs,r=this.object.geometry.uvs;r.push(s[e+0],s[e+1]),r.push(s[t+0],s[t+1]),r.push(s[n+0],s[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,s,r,i,o,a,l){const c=this.vertices.length;let h=this.parseVertexIndex(e,c),u=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(h,u,d),this.addColor(h,u,d),void 0!==o&&""!==o){const e=this.normals.length;h=this.parseNormalIndex(o,e),u=this.parseNormalIndex(a,e),d=this.parseNormalIndex(l,e),this.addNormal(h,u,d)}else this.addFaceNormal(h,u,d);if(void 0!==s&&""!==s){const e=this.uvs.length;h=this.parseUVIndex(s,e),u=this.parseUVIndex(r,e),d=this.parseUVIndex(i,e),this.addUV(h,u,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,s=e.length;n<s;n++){const s=this.parseVertexIndex(e[n],t);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";const n=this.vertices.length,s=this.uvs.length;for(let t=0,s=e.length;t<s;t++)this.addVertexLine(this.parseVertexIndex(e[t],n));for(let e=0,n=t.length;e<n;e++)this.addUVLine(this.parseUVIndex(t[e],s))}};return e.startObject("",!1),e}class Eu extends gt{constructor(e){super(e),this.materials=null}load(e,t,n,s){const r=this,i=new p(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,(function(n){try{t(r.parse(n))}catch(t){s?s(t):console.error(t),r.manager.itemError(e)}}),n,s)}setMaterials(e){return this.materials=e,this}parse(e){const t=new Mu;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));const n=e.split("\n");let s=[];for(let e=0,r=n.length;e<r;e++){const r=n[e].trimStart();if(0===r.length)continue;const i=r.charAt(0);if("#"!==i)if("v"===i){const e=r.split(vu);switch(e[0]){case"v":t.vertices.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])),e.length>=7?(Ou.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])).convertSRGBToLinear(),t.colors.push(Ou.r,Ou.g,Ou.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===i){const e=r.slice(1).trim().split(vu),n=[];for(let t=0,s=e.length;t<s;t++){const s=e[t];if(s.length>0){const e=s.split("/");n.push(e)}}const s=n[0];for(let e=1,r=n.length-1;e<r;e++){const r=n[e],i=n[e+1];t.addFace(s[0],r[0],i[0],s[1],r[1],i[1],s[2],r[2],i[2])}}else if("l"===i){const e=r.substring(1).trim().split(" ");let n=[];const s=[];if(-1===r.indexOf("/"))n=e;else for(let t=0,r=e.length;t<r;t++){const r=e[t].split("/");""!==r[0]&&n.push(r[0]),""!==r[1]&&s.push(r[1])}t.addLineGeometry(n,s)}else if("p"===i){const e=r.slice(1).trim().split(" ");t.addPointGeometry(e)}else if(null!==(s=mu.exec(r))){const e=(" "+s[0].slice(1).trim()).slice(1);t.startObject(e)}else if(gu.test(r))t.object.startMaterial(r.substring(7).trim(),t.materialLibraries);else if(fu.test(r))t.materialLibraries.push(r.substring(7).trim());else if(yu.test(r))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===i){if(s=r.split(" "),s.length>1){const e=s[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;const e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===r)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+r+'"')}}t.finalize();const r=new st;r.materialLibraries=[].concat(t.materialLibraries);if(!0===!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let e=0,n=t.objects.length;e<n;e++){const n=t.objects[e],s=n.geometry,i=n.materials,o="Line"===s.type,a="Points"===s.type;let l=!1;if(0===s.vertices.length)continue;const c=new w;c.setAttribute("position",new b(s.vertices,3)),s.normals.length>0&&c.setAttribute("normal",new b(s.normals,3)),s.colors.length>0&&(l=!0,c.setAttribute("color",new b(s.colors,3))),!0===s.hasUVIndices&&c.setAttribute("uv",new b(s.uvs,2));const h=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],s=n.name+"_"+n.smooth+"_"+l;let r=t.materials[s];if(null!==this.materials)if(r=this.materials.create(n.name),!o||!r||r instanceof x){if(a&&r&&!(r instanceof Tt)){const e=new Tt({size:10,sizeAttenuation:!1});xt.prototype.copy.call(e,r),e.color.copy(r.color),e.map=r.map,r=e}}else{const e=new x;xt.prototype.copy.call(e,r),e.color.copy(r.color),r=e}void 0===r&&(r=o?new x:a?new Tt({size:1,sizeAttenuation:!1}):new Y,r.name=n.name,r.flatShading=!n.smooth,r.vertexColors=l,t.materials[s]=r),h.push(r)}let u;if(h.length>1){for(let e=0,t=i.length;e<t;e++){const t=i[e];c.addGroup(t.groupStart,t.groupCount,e)}u=o?new K(c,h):a?new St(c,h):new W(c,h)}else u=o?new K(c,h[0]):a?new St(c,h[0]):new W(c,h[0]);u.name=n.name,r.add(u)}else if(t.vertices.length>0){const e=new Tt({size:1,sizeAttenuation:!1}),n=new w;n.setAttribute("position",new b(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute("color",new b(t.colors,3)),e.vertexColors=!0);const s=new St(n,e);r.add(s)}return r}}const Cu=new Map,Du=e=>{var t;return null!==(t=null==e?void 0:e.toLowerCase().endsWith(".png"))&&void 0!==t&&t},Pu=new TextDecoder,Iu=(e,t,n)=>{const s=e.buffer.slice(n,n+t);return Pu.decode(s).replace("\\","/")},Au=/^\w+:\/\//;const Lu=(e,t)=>{let n=t;const s=t.lastIndexOf("/");-1!==s&&(n=t.substring(s+1));let r=[];const i="http://guo.bin.yong",o=!Au.test(e);let a;if(o){r=function(e){let t=e.match(/(^[./]*)\/(.*)$/);return t?t.shift():t=[e],t}(e);const t=r.pop();a=new URL(t,i)}else a=new URL(e);const l=a.searchParams;let c=l.get("path"),h="";if(c){if(c.includes(".sbm")){const e=c.lastIndexOf("/");-1!==e&&(c=c.substring(0,e))}c+=`/Maps/${n}`,l.set("path",c),h=a.href}else{const e=a.href;h=new URL(`./Maps/${n}`,e).href}return o&&(h=h.substring(20)),h=h.replaceAll("#","%23"),h.length>0&&r.push(h),h=r.join("/"),h},ju=(e,t)=>{if(Cu.has(t)){const n=Cu.get(t);e.map=n,e.needsUpdate=!0,Fa.needsUpdate=!0}const n=new d;n.colorSpace=$,n.wrapS=Pe,n.wrapT=Pe,n.flipY=!1,n.anisotropy=16,n.mipmaps=[],n.generateMipmaps=!0,Dr.load(t,(s=>{n.image=s,n.needsUpdate=!0,Cu.set(t,n),e.map=n,e.needsUpdate=!0,Fa.needsUpdate=!0}))},_u=(e,t,n)=>{const[s,r,i,o,a]=t,l=n||o<1;return new Y({name:e,color:new u(s,r,i),opacity:o,transparent:l,alphaTest:.01,side:a})},Fu=new TextDecoder,Ru=new TextEncoder;function Bu(e){let t=8;const n=new Uint8Array(e,0,t);if("SBK-----"!==Fu.decode(n))return e;t+=130;const s=new Uint8Array(e,0,t);if(1===s[40]){const n=Ru.encode("SBM-----"),r=new Uint8Array([s[41]]),i=function(e){const t=new Uint8Array(64);return t.set(e.slice(0,8),0),t.set(e.slice(24,32),8),t.set(e.slice(40,56),16),t.set(e.slice(64,88),32),t.set(e.slice(96,104),56),t}(function(e){const t=new Uint8Array(128);return t.set(e.slice(42,74),0),t.set(e.slice(74,138),32),t.set(e.slice(8,40),96),t}(s));let o=66%i.length;const a=new Uint8Array(e,t+66),l=new Uint8Array(a.length);for(let e=0;e<a.length;e++)l[e]=a[e]^i[o],o=(o+1)%i.length;const c=new Uint8Array(n.length+r.length+l.length);return c.set(n),c.set(r,n.length),c.set(l,n.length+r.length),c.buffer}}const Uu=new TextDecoder;class ku{constructor(){this.materials=new Map,this.sbmInfo=null,this.isLE=!0}parseBuffer(e,t,n){const s=Bu(e);s&&(e=s),this.sbmInfo=t;const r=new DataView(e);let i=0;i+=8;const o=r.getUint8(i);return i+=1,1===o||2===o?this._parseV2(r,i,n):3===o?this._parseV3(r,i,n):Promise.reject(`In soonspacejs: sbm 资源模型(${this.sbmInfo.url})版本错误!`)}_parseV2(e,n,s){const r=performance.now(),i={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Qa(Object.assign(Object.assign({},this.sbmInfo),{format:Zs.sbm})),a=new Va({id:Xr()});o.add(a);const l=e.getUint16(n,this.isLE);n+=2;const c=e.getUint16(n,this.isLE);n+=2,i.total=c;const h={};for(let t=0;t<l;++t){const t=e.getUint16(n,this.isLE).toString();n+=2,h[t]={materialInfo:[]},e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;const s=e.getFloat32(n,this.isLE);n+=4;const r=e.getFloat32(n,this.isLE);n+=4;const i=e.getFloat32(n,this.isLE);n+=4;const o=e.getFloat32(n,this.isLE);n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;let a=e.getUint8(n);n+=1,0===a?a=he:1===a?a=ce:2===a&&(a=le);const l=e.getUint16(n,this.isLE);n+=2;const c=l>0?Iu(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[s,r,i,o,a],n=_u(t,e,Du(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,s=Lu(e,c);h[t].textureUrl=s,ju(n,s)}}}const u={};for(let o=0;o<c;++o){const o=e.getUint16(n,this.isLE).toString();n+=2;const l=e.getUint16(n,this.isLE).toString();n+=2,u[o]={materialId:l,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const c=[],h=[],d=[],p=[],m=e.getUint16(n,this.isLE);if(n+=2,m>0)for(let s=0;s<m;s++){const s=new t;s.setX(e.getFloat32(n,this.isLE)),n+=4,s.setY(e.getFloat32(n,this.isLE)),n+=4,s.setZ(e.getFloat32(n,this.isLE)),n+=4,c.push(s)}const f=e.getUint16(n,this.isLE);if(n+=2,f>0)for(let e=0;e<f;e++)n+=4,n+=4,n+=4;const y=e.getUint16(n,this.isLE);if(n+=2,y>0)for(let t=0;t<y;t++){const t=new g;t.setX(e.getFloat32(n,this.isLE)),n+=4,t.setY(e.getFloat32(n,this.isLE)),n+=4,h.push(t)}const b=e.getUint16(n,this.isLE);if(n+=2,b>0)for(let t=0;t<b;t++){const t=e.getUint16(n,this.isLE);n+=2;const s=e.getUint16(n,this.isLE);n+=2;const r=e.getUint16(n,this.isLE);n+=2;const i=[t,s,r];d.push(i),h.length>0&&p.push([h[i[0]],h[i[1]],h[i[2]]])}const x=[],T=[];for(let e=0;e<d.length;e++){const t=d[e],n=c[t[0]],s=c[t[1]],r=c[t[2]];x.push(...n.toArray(),...s.toArray(),...r.toArray());let i=new g,o=new g,a=new g;const l=p[e];void 0!==l&&(i=l[0],o=l[1],a=l[2]),T.push(...i.toArray(),...o.toArray(),...a.toArray())}const S=new Float32Array(x),O=new Float32Array(T);u[o].position=S.buffer,u[o].uv=O.buffer;const M=new w;S.length>0&&M.setAttribute("position",new v(S,3)),O.length>0&&M.setAttribute("uv",new v(O,2)),M.computeVertexNormals();const E=M.getAttribute("normal").array.buffer;if(u[o].normal=E,this.materials.has(l)){const e=new W(M,this.materials.get(l));e.name=o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}i.loaded++,i.timeStamp=performance.now()-r,null==s||s(i)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}_parseV3(e,n,s){const r=performance.now(),i={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Qa(Object.assign(Object.assign({},this.sbmInfo),{format:Zs.sbm})),a=new Va({id:Xr()});o.add(a);const l=e.getUint16(n,this.isLE);n+=2;const c=e.getUint16(n,this.isLE);n+=2,i.total=c;const h={};for(let t=0;t<l;++t){const t=e.getUint16(n,this.isLE).toString();n+=2,h[t]={materialInfo:[]},e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;const s=e.getFloat32(n,this.isLE);n+=4;const r=e.getFloat32(n,this.isLE);n+=4;const i=e.getFloat32(n,this.isLE);n+=4;const o=e.getFloat32(n,this.isLE);n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4,e.getFloat32(n,this.isLE),n+=4;let a=e.getUint8(n);n+=1,0===a?a=he:1===a?a=ce:2===a&&(a=le);const l=e.getUint16(n,this.isLE);n+=2;const c=l>0?Iu(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[s,r,i,o,a],n=_u(t,e,Du(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,s=Lu(e,c);h[t].textureUrl=s,ju(n,s)}}}const u={};for(let o=0;o<c;++o){const o=e.getUint16(n,this.isLE).toString();n+=2;const l=e.getUint16(n,this.isLE);n+=2;let c="";if(l>0){const t=new Uint8Array(e.buffer,n,l);c=Uu.decode(t),n+=l}const h=e.getUint16(n,this.isLE).toString();n+=2,u[o]={meshName:c,materialId:h,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const d=[],p=[],m=[],f=[],y=e.getUint32(n,this.isLE);if(n+=4,y>0)for(let s=0;s<y;s++){const s=new t;s.setX(e.getFloat32(n,this.isLE)),n+=4,s.setY(e.getFloat32(n,this.isLE)),n+=4,s.setZ(e.getFloat32(n,this.isLE)),n+=4,d.push(s)}const b=e.getUint32(n,this.isLE);if(n+=4,b>0)for(let s=0;s<b;s++){const s=new t;s.setX(e.getFloat32(n,this.isLE)),n+=4,s.setY(e.getFloat32(n,this.isLE)),n+=4,s.setZ(e.getFloat32(n,this.isLE)),n+=4}const x=e.getUint32(n,this.isLE);if(n+=4,x>0)for(let t=0;t<x;t++){const t=new g;t.setX(e.getFloat32(n,this.isLE)),n+=4,t.setY(e.getFloat32(n,this.isLE)),n+=4,p.push(t)}const T=e.getUint32(n,this.isLE);if(n+=4,T>0)for(let t=0;t<T;t++){const t=e.getUint32(n,this.isLE);n+=4;const s=e.getUint32(n,this.isLE);n+=4;const r=e.getUint32(n,this.isLE);n+=4;const i=[t,s,r];m.push(i),p.length>0&&f.push([p[i[0]],p[i[1]],p[i[2]]])}const S=[],O=[];for(let e=0;e<m.length;e++){const t=m[e],n=d[t[0]],s=d[t[1]],r=d[t[2]];S.push(...n.toArray(),...s.toArray(),...r.toArray());let i=new g,o=new g,a=new g;const l=f[e];void 0!==l&&(i=l[0],o=l[1],a=l[2]),O.push(...i.toArray(),...o.toArray(),...a.toArray())}const M=new Float32Array(S),E=new Float32Array(O);u[o].position=M.buffer,u[o].uv=E.buffer;const C=new w;M.length>0&&C.setAttribute("position",new v(M,3)),E.length>0&&C.setAttribute("uv",new v(E,2)),C.computeVertexNormals();const D=C.getAttribute("normal").array.buffer;if(u[o].normal=D,this.materials.has(h)){const e=new W(C,this.materials.get(h));e.name=c||o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}i.loaded++,i.timeStamp=performance.now()-r,null==s||s(i)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}}const Nu=new TextDecoder;class zu{parseBuffer(e,t){switch(Nu.decode(e.slice(0,8))){case"SBK-----":case"SBM-----":return(new ku).parseBuffer(e,t);default:return Promise.reject(`In soonspacejs: sbm 资源模型(${t.url})格式或数据错误!`)}}}class Gu{constructor(){this.materials=new Map}parseObject(e,t){const n=new Qa(Object.assign(Object.assign({},t),{format:Zs.sbm})),s=new Va({id:Xr()});n.add(s);const{materialsCache:r,meshsCache:i}=e;for(const[e,t]of Object.entries(r)){if(this.materials.has(e))continue;const{textureUrl:n,materialInfo:s}=t,r=_u(e,s,Du(n));this.materials.set(e,r),n&&ju(r,n)}for(const[e,t]of Object.entries(i)){const{meshName:n,materialId:r,position:i,uv:o,normal:a}=t,l=this.materials.get(r.toString());if(l){const t=new w,r=new Float32Array(i),c=new Float32Array(o),h=a&&new Float32Array(a);r.length>0&&t.setAttribute("position",new v(r,3)),c.length>0&&t.setAttribute("uv",new v(c,2)),h&&h.length>0?t.setAttribute("normal",new v(h,3)):t.computeVertexNormals();const u=new W(t,l);u.name=n||e,u.castShadow=!0,u.receiveShadow=!0,s.add(u)}}return n}}class Vu extends Wh{constructor(e,t){super(Xs.Model,e,t.classified.Model),this.viewport=e,this.cache=t,this.isDisposed=!1,this.modelsPromiseMap=new Map,this.modelsMap=new Map,this._dbReady=!1,this.store=Lo.createInstance({name:"soonspace",storeName:"modelData"}),this.cacheStore=Lo.createInstance({name:"soonspace",storeName:"modelCache"}),this.loadingManager=new Ot,this.gltfLoader=new Nn(this.loadingManager),this.fbxLoader=new Xh(this.loadingManager),this.objLoader=new Eu(this.loadingManager),this.stlLoader=new zn(this.loadingManager),this.gltfLoader.setMeshoptDecoder(Wn),this._initLoadingManager(this.loadingManager)}setDracoDecoderPath(e){const t=(new Vn).setDecoderPath(e);this.gltfLoader.setDRACOLoader(t)}setKtx2DecoderPath(e){const t=(new Hn).setTranscoderPath(e).detectSupport(this.viewport.renderer).setWorkerLimit(2);this.gltfLoader.setKTX2Loader(t)}async load(e,t){const{url:n}=e,s=this.modelsPromiseMap.get(n);if(s){if(await s,this.isDisposed)return this.dispose(),null;const r=this.modelsMap.get(n);return r?this.clone(r,e,t):null}const r=this._innerLoad(e,t);return this.modelsPromiseMap.set(n,r),r}async parse(e){var t;const{url:n,id:s,format:r}=e;if(!n)return tr(`id: ${s} url: ${n} is empty`),null;await this._checkDbReady();switch(null===(t=null!=r?r:Zr(n))||void 0===t?void 0:t.toLocaleUpperCase()){case"SBM":return this._parseSbm(e);case"SBMX":return this._parseSbmx(e);case"GLB":case"GLTF":return this._parseGltf(e);case"FBX":return this._parseFbx(e);case"OBJ":return this._parseObj(e);case"STL":return this._parseStl(e);default:return nr(`模型资源( id: ${s}, url: ${n} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`),null}}clone(e,t,n){return new Promise(((s,r)=>{var i;"Model"!==e.stype&&r("In soonspacejs: 方法 cloneModel 参入对象类型错误!");const{id:o,name:a,level:l,visible:c,position:h,rotation:u,scale:d,onClick:p,onDblClick:m,onRightClick:f,onLoad:g,userData:y}=t,v=Kn.clone(e);v.animations=v.animations.map((e=>e.clone())),o&&(v.sid=o),a&&(v.name=a),l&&(v.level=l),!1===c?v.hide():!0===c&&v.show(),h&&v.position.set(h.x,h.y,h.z),u&&v.rotation.set(u.x,u.y,u.z),d&&v.scale.set(d.x,d.y,d.z),v.onClick=p?p.bind(v):null,v.onDblClick=m?m.bind(v):null,v.onRightClick=f?f.bind(v):null,v.onLoad=g?g.bind(v):null,null===(i=v.onLoad)||void 0===i||i.call(v,v),y&&(v.userData=y),null!==n&&this.viewport.scener.addObject(v,n||this.scene||e.parent),s(v)}))}async loadToGroup(e,t){const n=this.createGroup(e,null);return await Promise.allSettled(t.map((e=>this.load(e,null).then((e=>e&&n.add(e))).catch(console.error)))),this.viewport.scener.addObject(n,this.scene),n}async addForGroup(e,t){return e&&await Promise.allSettled(t.map((async t=>this.load(t,null).then((t=>t&&this.viewport.scener.addObject(t,e))).catch(console.error)))),e}async clearIdb(){await this._checkDbReady(),await this.store.clear(),await this.cacheStore.clear()}dispose(){var e,t;this.isDisposed=!0,this.modelsPromiseMap.clear(),this.modelsMap.clear(),null===(e=this.gltfLoader.dracoLoader)||void 0===e||e.dispose(),null===(t=this.gltfLoader.ktx2Loader)||void 0===t||t.dispose()}async _checkDbReady(){this._dbReady||(await Promise.all([this.store.ready(),this.cacheStore.ready()]),this._dbReady=!0)}_initLoadingManager(e){e.addHandler(/\.tga$/i,new Gn)}_setModelsMap(e,t){this.modelsMap.has(e)||this.modelsMap.set(e,Kn.clone(t))}async _parseSbm(e){const{useIndexedDB:t}=this.viewport.options,{url:n}=e,s=async t=>{const s=await(new zu).parseBuffer(t,e),{model:r,caches:i}=s;return i&&Rr((()=>{this.cacheStore.setItem(n,i)})),r},r=e=>{var t;null===(t=e.onLoad)||void 0===t||t.call(e,e),e.dispatchEvent({type:"load"})};if(t){const t=await this.cacheStore.getItem(n);if(t){const n=(new Gu).parseObject(t,e);return r(n),n}{const e=await this.store.getItem(n)||await this._fetchBuffer(n),t=await s(e);return r(t),t}}{const e=await this._fetchBuffer(n),t=await s(e);return r(t),t}}async _parseSbmx(e){const{url:t}=e,n=await this._getBuffer(t);if("SBMG----"===Qr(n.slice(0,8))){const t=kr(n.slice(8));return this._parseGltf(e,t)}return this._parseGltf(e,n)}async _parseGltf(e,t){const{url:n}=e,s=xr(n),r=t||await this._getBuffer(n),i=new Qa(Object.assign(Object.assign({},e),{format:Zs.gltf}));try{const e=await this.gltfLoader.parseAsync(r,s),{animations:t}=e;t&&t.length>0&&(i.animations=t),e.scene.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e instanceof Z&&(e.frustumCulled=!0),e.castShadow=!0,e.receiveShadow=!0})),i.add(e.scene)}catch(e){if(e.message.includes("No DRACOLoader"))throw new Error(`${Js}请使用 setModelDracoDecoderPath 设置 draco 解压库路径`);if(e.message.includes("setKTX2Loader"))throw new Error(`${Js}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`);throw e}return i}async _parseFbx(e){const{url:t}=e,n=xr(t),s=await this._getBuffer(t);if("ssp"===Qr(kr(s.slice(0,3)))){const t=kr(s.slice(3));return this._parseGltf(e,t)}const r=new Qa(Object.assign(Object.assign({},e),{format:Zs.fbx})),i=this.fbxLoader.parse(s,n),{animations:o}=i;return o&&o.length>0&&(r.animations=o),r.add(i),r}async _parseObj(e){const{url:t}=e,n=await this._getBuffer(t),s=await new Blob([n]).text(),r=new Qa(Object.assign(Object.assign({},e),{format:Zs.obj})),i=this.objLoader.parse(s);return r.add(i),r}async _parseStl(e){const{url:t}=e,n=await this._getBuffer(t),s=new Qa(Object.assign(Object.assign({},e),{format:Zs.stl})),r=this.stlLoader.parse(n),i=new Va({id:Xr()}),o=new W(r,new Y);return i.add(o),s.add(i),s}async _innerLoad(e,t){var n;const{url:s}=e,r=await this.parse(e);return r?(null===(n=r.onLoad)||void 0===n||n.call(r,r),this._setModelsMap(s,r),null!==t&&this.viewport.scener.addObject(r,t),r):null}async _fetchBuffer(e){const{useIndexedDB:t}=this.viewport.options,n=await Cr(e,"arraybuffer");return t&&this.store.setItem(e,n),n}async _getBuffer(e){const{useIndexedDB:t}=this.viewport.options;if(t){const t=await this.store.getItem(e);return t||this._fetchBuffer(e)}return this._fetchBuffer(e)}}const Hu=new $e(1,1);class Wu extends Wh{constructor(e,t){super(Xs.Poi,e,t.classified.Poi),this.viewport=e,this.cache=t,this.textures=new Map}_createIcon(e){const t=this._createIconMaterial(e),n={scale:e.iconScale};let s;return Ku(e.type)?(s=new W,s.renderOrder=1,s.geometry=Hu,s.material=t,e.iconScale&&s.scale.set(e.iconScale.x,e.iconScale.y,e.iconScale.z)):(s=new Ja(t,n),this._computeMaterialSizeAttenuation(t,e.type)),s.name="icon",s}_createIconMaterial({url:e,type:t}){if(!e)return;let n=this.textures.get(e);if(n||(n=Pr.load(e,(t=>{this.textures.set(e,t),Fa.needsUpdate=!0})),n.colorSpace=$,n.flipY=!0),Ku(t)){return new ke({map:n,transparent:!0,depthWrite:!1,side:le})}return new ze({map:n,depthWrite:!1})}_createText(e){const t=this._createTextMaterial(e),n={position:e.namePosition,scale:e.nameScale};let s;return Ku(e.type)?(s=new W,s.renderOrder=1,s.geometry=Hu,s.material=t,e.namePosition&&s.position.set(e.namePosition.x,e.namePosition.y,e.namePosition.z),e.nameScale&&s.scale.set(e.nameScale.x,e.nameScale.y,e.nameScale.z)):(s=new Ja(t,n),this._computeMaterialSizeAttenuation(t,e.type)),s.name="text",s}_createTextMaterial(e){const t=this._createTextTexture(e);if(Ku(e.type)){return new ke({map:t,transparent:!0,depthWrite:!1,side:le})}return new ze({map:t,depthWrite:!1})}_createTextTexture(e){const t=this._createTextCanvas(e.name||"",e.nameCanvasInfo),n=new Ne(t);return n.colorSpace=$,n}_createTextCanvas(e,t={}){const{canvasWidth:n=256,canvasHeight:s=256,font:r="32px Microsoft YaHei",fillStyle:i="#fff",strokeStyle:o="#000",textAlign:a="center",textBaseline:l="middle",backgroundStyle:c,borderStyle:h,borderWidth:u=3}=t,d=document.createElement("canvas");d.width=n,d.height=s;const p=d.getContext("2d"),m=.5*n,f=.5*s;return p&&(c&&(p.fillStyle=c,p.fillRect(0,0,n,s)),h&&(p.strokeStyle=h,p.lineWidth=u,p.strokeRect(0,0,n,s),p.lineWidth=1),p.font=r,p.fillStyle=i,p.strokeStyle=o,p.textAlign=a,p.textBaseline=l,p.strokeText(e,m,f,n),p.fillText(e,m,f,n)),d}_computeMaterialSizeAttenuation(e,t){return"2D"===t||"2d"===t?e.sizeAttenuation=!1:"2.5D"!==t&&"2.5d"!==t||(e.sizeAttenuation=!0),e}_create(e){e=Object.assign({type:"2.5d",namePosition:{x:0,y:10,z:0},nameScale:{x:16,y:16,z:1},iconScale:{x:16,y:16,z:1}},e);const t=new Xa(e),n=this._createText(e);if(t.text=n,t.add(n),e.url){const n=this._createIcon(e);t.icon=n,t.add(n)}return t}create(e){const t=this._create(e);return this.viewport.scener.addObject(t,this.scene),t}clone(e,t,n){var s,r,i;"Poi"!==e.stype&&console.error("In soonspacejs: 方法 clonePoi 参入对象类型错误!");const{id:o,name:a,level:l,namePosition:c,nameScale:h,iconScale:u,scaleFixed:d,visible:p,position:m,rotation:f,scale:g,onClick:y,onDblClick:v,onRightClick:w,userData:b}=t,x=e.clone();if(a!==x.name&&x.text){const e=x.text.material.clone();e.map=this._createTextTexture(t),x.text.material=e}return c&&(null===(s=x.text)||void 0===s||s.position.set(c.x,c.y,c.z)),h&&(null===(r=x.text)||void 0===r||r.scale.set(h.x,h.y,h.z)),u&&(null===(i=x.icon)||void 0===i||i.scale.set(u.x,u.y,u.z)),o&&(x.sid=o),a&&(x.name=a),l&&(x.level=l),d&&(x.scaleFixed=d),Vr(p)&&(x.visible=p),m&&x.position.set(m.x,m.y,m.z),f&&x.rotation.set(f.x,f.y,f.z),g&&x.scale.set(g.x,g.y,g.z),x.onClick=y?y.bind(x):null,x.onDblClick=v?v.bind(x):null,x.onRightClick=w?w.bind(x):null,b&&(x.userData=b),null!==n&&this.viewport.scener.addObject(x,n||this.scene||e.parent),x}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this._create(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this._create(t);this.viewport.scener.addObject(n,e)})),e}}function Ku(e){return"3D"===e||"3d"===e}class qu extends Wh{constructor(e,t){super(Xs.PoiNode,e,t.classified.PoiNode),this.viewport=e,this.cache=t}create(e){this._openEnableRenderCss(e);const t=new Ya(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{this._openEnableRenderCss(e);const t=new Ya(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{this._openEnableRenderCss(t);const n=new Ya(t);this.viewport.scener.addObject(n,e)})),e}_openEnableRenderCss(e){switch(e.type){case"2d":case"2D":this.viewport.rendererManager.setInternalState("enableRenderCss2D",!0);break;case"2.5d":case"2.5D":case"3d":case"3D":this.viewport.rendererManager.setInternalState("enableRenderCss3D",!0)}}}class Yu extends Wh{constructor(e,t){super(Xs.Canvas3D,e,t.classified.Canvas3D),this.viewport=e,this.cache=t}create(e,t){const n=new ll(e);return null!==t&&this.viewport.scener.addObject(n,t),n}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=new ll(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=new ll(t);this.viewport.scener.addObject(n,e)})),e}}let Qu=class Dijkstras{constructor(){this.graph=new Map,this.queue=null,this.previous=new Map}setGraph(e){if(!(e.length<1))for(const t of e){const[e,n]=t;this.graph.set(e,new Map);for(const t of n){const[n,s]=t,r=this.graph.get(e);null==r||r.set(n,s)}}}getPath(e,t){var n;if(e===t)return[];const s=this.queue=new vr;s.add(e,0),this.previous.set(e,null);let r=null;for(;r=s.shift();){if(r===t){const e=[];for(;null!==r&&null!==this.previous.get(r);)e.unshift(r),r=null!==(n=this.previous.get(r))&&void 0!==n?n:null;return e}const e=s.getDistance(r);if(e===1/0)return[];const i=this.graph.get(r);i&&i.forEach(((t,n)=>{const i=s.getDistance(n),o=e+t;o<i&&(s.update(n,o),this.previous.set(n,r))}))}return[]}};function Xu(){const e=new Dijkstras;onmessage=function({data:t}){const{type:n}=t;switch(n){case"setGraph":e.graph=t.graph,postMessage({type:"done"});break;case"getPath":{const n=e.getPath(...t.st);postMessage({type:"done",pathIds:n});break}}}}class Zu{constructor(e){this.dijkstra=e,this.workerPool=new _n(4),this.workerSourceURL=null,this._mainThreadGraph=[],this._needsUpdateGraph=!1,this.workerPool.setWorkerCreator((()=>{if(!this.workerSourceURL){const e=Xu.toString(),t=["/* deps */",vr.toString(),Qu.toString(),"/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([t]))}return new Worker(this.workerSourceURL)}))}async getPath(e,t){await this.workerPool.postMessage({type:"setGraph",graph:this.dijkstra.graph});const{data:{pathIds:n}}=await this.workerPool.postMessage({type:"getPath",st:[e,t]});return n}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL)}}class Ju extends Wh{constructor(e,t){super(Xs.Topology,e,t.classified.Topology),this.viewport=e,this.cache=t,this.dijkstra=new Qu,this.dijkstraWorker=new Zu(this.dijkstra)}async createFromGml(e){const{url:t,linkWidth:n=20,linkColor:s=65280,renderNode:r=!0,nodeColor:i=255}=e;return Ur(t).then((t=>{if(!t||!t.MultiLayeredGraph)return Promise.reject('In soonspace: createTopologyFromGml "url" path error!');const o=[],a=new Map;let l=[],c=[];const h=t.MultiLayeredGraph.SpaceLayerMember.SpaceLayer.X_floor;Wr(h)?h.forEach((e=>{l=[...l,...e.state],c=[...c,...e.transition]})):(l=[...l,...h.state],c=[...c,...h.transition]),l.forEach(((e,t)=>{const n=e.State._attributes["gml:id"],s=e.State.topoNode["gml:Node"].node_name;o.push({id:Gr(n)?n:"",name:Gr(s)?s:"",position:{x:Number(e.State.topoNode["gml:Node"].xcoord["#text"]),y:Number(e.State.topoNode["gml:Node"].zcoord["#text"]),z:-1*Number(e.State.topoNode["gml:Node"].ycoord["#text"])},graphs:[]}),a.set(n,t)})),c.forEach((e=>{const t=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"],n=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"],s=e.Transition.topoEdge["gml:Edge"].passable["#text"],r=a.get(t),i=a.get(n),l=e.Transition._attributes["gml:id"],c=e.Transition.topoEdge["gml:Edge"].link_name["#text"];void 0!==r&&void 0!==i&&("2"!==s&&"3"!==s&&o[r].graphs.push({targetNodeId:n,linkInfo:{id:l,name:c},passable:+s}),"1"!==s&&"3"!==s&&o[i].graphs.push({targetNodeId:t,linkInfo:{id:l,name:c},passable:+s}))}));const u=new rl(Object.assign(Object.assign({},e),{type:"network",nodes:o,linkWidth:n,renderLink:!0,linkColor:s,renderNode:r,nodeColor:i}));return this.setDijkstraGraph(u.nodes),this.viewport.scener.addObject(u,this.scene),Promise.resolve(u)}))}create(e){const t=this.generateLineTopologyInfoNodeGraphs(e),n=new rl(t);return this.setDijkstraGraph(n.nodes),this.viewport.scener.addObject(n,this.scene),n}setPassable(e,t){if("line"===e.topologyType)return void nr("只支持 network 类型");const n=Tr(e.info.nodes),s=n.reduce(((e,t)=>(e.set(t.id,t),e)),new Map),r=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);t.forEach((({sourceNodeId:e,targetNodeId:t,passable:n})=>{const r=s.get(e),i=s.get(t);if(!r||!i)return void tr(`sourceNodeId:${e} 或 targetNodeId:${t} 未找到对应节点`);const o=r.graphs.findIndex((e=>e.targetNodeId===i.id)),a=i.graphs.findIndex((e=>e.targetNodeId===r.id));switch(n){case 0:-1===o?r.graphs.push({targetNodeId:i.id,linkInfo:{id:Xr()},passable:n}):r.graphs[o].passable=n,-1===a?i.graphs.push({targetNodeId:r.id,linkInfo:{id:Xr()},passable:n}):i.graphs[a].passable=n;break;case 1:-1===o?r.graphs.push({targetNodeId:i.id,linkInfo:{id:Xr()},passable:n}):r.graphs[o].passable=n,-1!==a&&i.graphs.splice(a,1);break;case 2:-1!==o&&r.graphs.splice(o,1),-1===a?i.graphs.push({targetNodeId:r.id,linkInfo:{id:Xr()},passable:n}):i.graphs[a].passable=n;break;case 3:-1!==o&&r.graphs.splice(o,1),-1!==a&&i.graphs.splice(a,1)}})),e.info.nodes=n,n.forEach((e=>{const t=r.get(e.id);t&&(t.graphs=e.graphs)})),e.updateLinks(),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch()}resetNodes(e,t){const n=this.generateLineTopologyInfoNodeGraphs(Object.assign(Object.assign({},e.info),{nodes:t}));return e.resetNodes(n.nodes),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch(),e}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this.generateLineTopologyInfoNodeGraphs(e),s=new rl(t);this.setDijkstraGraph(s.nodes),n.add(s)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this.generateLineTopologyInfoNodeGraphs(t),s=new rl(n);this.setDijkstraGraph(s.nodes),this.viewport.scener.addObject(s,e)})),e}_getPath(e,n){const s=sr(n.start),r=sr(n.end);let i=null,o=1/0,a=null,l=1/0;const c=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(s),h=n.distanceTo(r);c<o&&(o=c,i=e),h<l&&(l=h,a=e)}if(!i||!a||i.sid===a.sid)return null;const h=i.sid,u=a.sid,d=this.dijkstra.getPath(h,u);if(0===d.length)return null;d.unshift(h);const p=[];for(let e=0;e<d.length;e++){const t=c.get(d[e]);t&&p.push(t)}return p}async _getPathAsync(e,n){const s=sr(n.start),r=sr(n.end);let i=null,o=1/0,a=null,l=1/0;const c=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(s),h=n.distanceTo(r);c<o&&(o=c,i=e),h<l&&(l=h,a=e)}if(!i||!a||i.sid===a.sid)return null;const h=i.sid,u=a.sid,d=await this.dijkstraWorker.getPath(h,u);if(0===d.length)return null;d.unshift(h);const p=[];for(let e=0;e<d.length;e++){const t=c.get(d[e]);t&&p.push(t)}return p}_generateNodesInfo(e){return e.map((e=>{const t=e.position.clone();return t.y+=.01,{id:`${e.sid}_${Xr()}`,name:e.name,position:t,graphs:e.graphs}}))}getShortestPath(e,t){const n=this._getPath(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const s=this._generateNodesInfo(n),r=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:s});this.generateLineTopologyInfoNodeGraphs(r);const i=new rl(r);return this.viewport.scener.addObject(i,this.scene),i}async getShortestPathAsync(e,t){const n=await this._getPathAsync(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const s=this._generateNodesInfo(n),r=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:s});this.generateLineTopologyInfoNodeGraphs(r);const i=new rl(r);return this.viewport.scener.addObject(i,this.scene),i}_getShortestPathByMultiplePoints(e,n,s,r,i){const o=[];s.forEach((n=>{const s={start:"start"===i?n:r,end:"end"===i?n:r},a=this._getPath(e,s);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const s=a[n+1];s&&(l+=e.getWorldPosition(new t).distanceTo(s.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})}));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t<l&&(l=t,a=e)})),a.length>0){const t=this._generateNodesInfo(a),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(s);const r=new rl(s);return this.viewport.scener.addObject(r,this.scene),r}return null}async _getShortestPathByMultiplePointsAsync(e,n,s,r,i){const o=[];await Promise.all(s.map((async n=>{const s={start:"start"===i?n:r,end:"end"===i?n:r},a=await this._getPathAsync(e,s);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const s=a[n+1];s&&(l+=e.getWorldPosition(new t).distanceTo(s.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})})));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t<l&&(l=t,a=e)})),a.length>0){const t=this._generateNodesInfo(a),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(s);const r=new rl(s);return this.viewport.scener.addObject(r,this.scene),r}return null}getShortestPathByMultipleStartPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.end,t.start,"end")}getShortestPathByMultipleStartPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.end,t.start,"end")}setDijkstraGraph(e){const n=[];for(let s=0;s<e.length;s++){const r=e[s];if(0===r.graphs.length)continue;const i=[],o=e.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(let e=0;e<r.graphs.length;e++){const n=r.graphs[e],s=o.get(n.targetNodeId);if(!s)continue;const a=r.getWorldPosition(new t),l=s.getWorldPosition(new t);i.push([n.targetNodeId,a.distanceTo(l)])}n.push([r.sid,i])}this.dijkstra.setGraph(n)}generateLineTopologyInfoNodeGraphs(e){const{type:t,nodes:n}=e;if("line"===t)for(let t=0;t<n.length;t++)if(t===n.length-1)n[t].graphs=[];else{const s=e.nodes[t],r=e.nodes[t+1];n[t].graphs=[{targetNodeId:r.id,linkInfo:{id:`${s.id}_to_${r.id}`,name:`${s.name||s.id}_to_${r.name||r.id}`},passable:1}]}return Object.assign(Object.assign({},e),{nodes:n})}dispose(){this.dijkstraWorker.dispose()}}class $u extends Wh{constructor(e,t){super(Xs.Helper,e,t.classified.Helper),this.viewport=e,this.cache=t}addGridHelper(e){const{id:t,size:n=1e3,divisions:s=20,color:r="#fff",position:i={x:0,y:0,z:0},rotation:o={x:0,y:0,z:0},scale:a={x:1,y:1,z:1}}=e,l=new Mt(n,s,r,r);return l.position.set(i.x,i.y,i.z),l.rotation.set(o.x,o.y,o.z),l.scale.set(a.x,a.y,a.z),l.userData.sid=t,l.userData.stype="Helper",this.viewport.scener.addObject(l,this.scene),l}addAxesHelper(e){const{id:t,axesLength:n=1e3}=e,s=new Et(n);return s.userData.sid=t,s.userData.stype="Helper",this.viewport.scener.addObject(s,this.scene),s}addBoxHelper(e){const{id:t,box:n,color:s="#00ff00"}=e,r=new Ct(n,new u(s));return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPlaneHelper(e){const{id:t,width:n=500,height:s=500,color:r="#00ff00",opacity:i=.2,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1}}=e,c=i<1,h=new Ga({id:t,position:o,rotation:a,scale:l},new $e(n,s),new ke({color:r,opacity:i,transparent:c,depthWrite:!c,side:le}));return h.userData.sid=t,h.userData.stype="Helper",this.viewport.scener.addObject(h,this.scene),h}async addGroundHelper(e){const{imgUrl:t,id:n,width:s=500,height:r=500,opacity:i=1,position:o={x:0,y:0,z:0},rotation:a={x:0,y:0,z:0},scale:l={x:1,y:1,z:1},repeat:c={x:10,y:10}}=e,h=await Pr.loadAsync(t),u=new $e(s,r);u.computeBoundingBox();const d=new Y({side:le,map:h,transparent:i<1,opacity:i,roughness:.8});d.map&&(d.map.repeat.set(c.x,c.x),d.map.wrapS=Pe,d.map.wrapT=Pe,d.map.version++),a.x-=Math.PI/2,d.version++;const p=new cl({id:n,position:o,rotation:a,scale:l},u,d);return p.userData.sid=n,p.userData.stype="Helper",this.viewport.scener.addObject(p,this.scene),p}addDirectionalLightHelper(e){const{id:t,light:n,color:s,size:r=50}=e,i=new Dt(n,r,s);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addHemisphereLightHelper(e){const{id:t,light:n,color:s,size:r=20}=e,i=new Pt(n,r,s);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addSpotLightHelper(e){const{id:t,light:n,color:s}=e,r=new It(n,s);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}addPointLightHelper(e){const{id:t,light:n,color:s,size:r=20}=e,i=new At(n,r,s);return i.userData.sid=t,i.userData.stype="Helper",this.viewport.scener.addObject(i,this.scene),i}addRectAreaLightHelper(e){const{id:t,light:n,color:s}=e,r=new Qn(n,s);return r.userData.sid=t,r.userData.stype="Helper",this.viewport.scener.addObject(r,this.scene),r}}class ed extends Wh{constructor(e,t){super(Xs.PluginObject,e,t.classified.PluginObject),this.viewport=e,this.cache=t}createObject(e,t){const n=new Ha(e);return t&&n.add(t),this.viewport.scener.addObject(n,this.scene),n}addToObject(e,t){return e?(this.viewport.scener.addObject(t,e),e):null}}class td extends Wh{constructor(e,t){super(Xs.Group,e,t.classified.Group),this.viewport=e,this.cache=t}}const nd=new Re;class sd extends Wh{constructor(e,t){super(Xs.Decal,e,t.classified.Decal),this.viewport=e,this.cache=t}async create(e,t){const n=new Kl(e);return null!==t&&this.viewport.scener.addObject(n,t),await n.updateTexture(e.url),n.updateMaterial(e),this.updateGeometry(n,e),n}updateAllGeometry(e={}){this.getAll().forEach((t=>this.updateGeometry(t,e)))}updateGeometry(e,s={}){const{meshOfModelList:r}=this.viewport.scener.intersectsList,{snapping:o=!0,snappingDistance:a=1,snappingTargets:l=r,offsetUnits:c=.01}=s,{decalMesh:h}=e;if(h.geometry.dispose(),this.viewport.render(),o){h.updateWorldMatrix(!0,!1);const r=new t,o=new t,u=h.matrixWorld.elements,d={position:new t,quaternion:new i,scale:new t};h.matrixWorld.decompose(d.position,d.quaternion,d.scale),d.scale.multiply(e.textureAspect),h.getWorldPosition(r),o.set(-u[8],-u[9],-u[10]).normalize(),nd.set(r,o),nd.near=0,nd.far=a;const[p]=nd.intersectObjects(l).filter((({object:e})=>!(e instanceof Kl)));if(p){const{object:t}=p,i=(new n).setFromRotationMatrix(h.matrixWorld,"XYZ"),a=new Hl(Object.assign(Object.assign({offsetUnits:c},s),{object:t,origin:r,direction:o,angle:i.z,size:(new g).copy(d.scale)})),l=h.matrixWorld.clone().invert();return a.meshMatrix&&l.multiply(a.meshMatrix),a.applyMatrix4(l),h.geometry=a,e}}const{x:u,y:d}=e.textureAspect;return h.geometry=new $e(u,d),e}}class rd{constructor(e,t){this.viewport=e,this.cache=t,this.scene=this.viewport.scene,this.store={groupManager:new td(this.viewport,this.cache),lightManager:new Kh(this.viewport,this.cache),modelManager:new Vu(this.viewport,this.cache),poiManager:new Wu(this.viewport,this.cache),poiNodeManager:new qu(this.viewport,this.cache),canvas3DManager:new Yu(this.viewport,this.cache),topologyManager:new Ju(this.viewport,this.cache),helperManager:new $u(this.viewport,this.cache),decalManager:new sd(this.viewport,this.cache),pluginObjectManager:new ed(this.viewport,this.cache)},e.signals.beforeRender.add(this.update.bind(this)),e.signals.objectAdded.add(this.setObjectCache.bind(this)),e.signals.objectRemoved.add(this.deleteObjectCache.bind(this))}levelUpdate(){const e=(e,t)=>{e.visible!==t&&(e.visible=t,this.viewport.signals.objectChanged.dispatch())},n=n=>{const{level:s,handleHide:r}=n,{max:i=null,min:o=null}=s;if(!r&&(Hr(i)||Hr(o))){const s=new t;s.setFromMatrixPosition(n.matrixWorld);const r=this.viewport.camera.position.distanceTo(s);Hr(i)&&r>i||Hr(o)&&r<o?e(n,!1):e(n,!0)}};this.cache.objects.forEach((e=>{(e instanceof za||e instanceof Ga)&&n(e)}))}scaleFixedUpdate(){this.cache.objects.forEach((e=>{if(e instanceof Xa||e instanceof Ya){const{scaleFixed:n}=e;if(n){const s=new t;if(s.setFromMatrixPosition(e.matrixWorld),s.distanceTo(this.viewport.camera.position)>n.distance){const t=fr(s,n.fixedScale,this.viewport.camera,this.viewport.renderer.getSize(new g));e.scale.setScalar(t)}else e.scale.setScalar(n.originScale)}}}))}update(){this.viewport.options.levelEnabled&&this.levelUpdate(),this.viewport.options.scaleFixedEnabled&&this.scaleFixedUpdate()}isObjectInScene(e){let t=!1;return e.traverseAncestors((e=>{e===this.scene&&(t=!0)})),t}getObjectById(e){const t=this.getObjectCache(e);if(t){if(this.isObjectInScene(t))return t}return null}getObjectByName(e){return this._getObjectByProps("name",e)}getObjectByUserDataProperty(e,t){const n=[];return this.cache.objects.forEach((s=>{this.isObjectInScene(s)&&Kr(s)&&(s instanceof za||s instanceof Ga||s.userData.stype)&&(qr(e)&&e(s.userData)||Gr(e)&&s.userData[e]===t)&&n.push(s)})),n}removeObjectById(e){const t=this.getObjectById(e);return!!t&&(this.viewport.scener.removeObject(t),!0)}_getObjectByProps(e,t){const n=[];return this.cache.objects.forEach((s=>{this.isObjectInScene(s)&&((s instanceof za||s instanceof Ga)&&Kr(s)&&s[e]===t||Kr(s)&&s.userData.stype&&("name"===e&&s.name===t||"sid"===e&&s.userData.sid===t))&&n.push(s)})),n}getObjectCache(e){return this.cache.objects.get(e)}setObjectCache(e){const t=(e,t)=>{const n=this.cache.objects.get(t);n&&n!==e&&tr(`object id ${t} already exists in scene`)};null==e||e.traverse((n=>{if(n instanceof za||n instanceof Ga){if("string"==typeof n.sid&&n.sid.startsWith(Qs))return;t(n,n.sid),this.cache.objects.set(n.sid,n);const e=n.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}else if(n.userData.sid&&e.userData.stype){t(n,n.userData.sid),this.cache.objects.set(n.userData.sid,n);const e=n.userData.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}}))}deleteObjectCache(e){null==e||e.traverse((t=>{if(t instanceof za||t instanceof Ga){this.cache.objects.delete(t.sid);const e=t.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}else if(t.userData.sid&&e.userData.stype){this.cache.objects.delete(t.userData.sid);const e=t.userData.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}}))}clearObject(){this.store.modelManager.clear(),this.store.poiManager.clear(),this.store.poiNodeManager.clear(),this.store.canvas3DManager.clear(),this.store.topologyManager.clear(),this.store.helperManager.clear(),this.store.decalManager.clear(),this.store.pluginObjectManager.clear()}clear(){this.clearObject(),this.store.lightManager.clear()}dispose(){this.store.modelManager.dispose(),this.store.topologyManager.dispose(),this.store.lightManager.dispose(),this.clear()}}w.prototype.computeBoundsTree=Rn,w.prototype.disposeBoundsTree=Bn,W.prototype.raycast=Un,Re.prototype.firstHitOnly=!0,e.ColorManagement.enabled=!0;class id{constructor(t){var n;this.THREE=e,this.TWEEN=Lt,this.utils=ni,this.animation=ri,this.library=Gc,this.version=Zn,this.domElement=null,this.plugins={},this.textureCache=new Map;const{el:s,options:r={},events:i={}}=t;if(this.options=Object.assign(Object.assign({},{showInfo:!1,showStats:!1,showViewHelper:!1,showGrid:!1,background:{color:11459572,alpha:!1},fog:!1,hoverEnabled:!1,levelEnabled:!1,scaleFixedEnabled:!1,fileCacheEnabled:!0,closeInfoLog:!1,closeWarnLog:!1,useIndexedDB:!0}),r),this.signals={windowResize:new zh,cameraObjectChange:new zh,sceneChanged:new zh,backgroundChanged:new zh,beforeRender:new zh,sceneRendered:new zh,tweenUpdate:new zh,hover:new zh,click:new zh,dblClick:new zh,rightClick:new zh,mouseDown:new zh,mouseMove:new zh,mouseUp:new zh,mouseWheel:new zh,keyDown:new zh,keyUp:new zh,modelHover:new zh,modelUnHover:new zh,modelClick:new zh,modelDblClick:new zh,modelRightClick:new zh,poiHover:new zh,poiUnHover:new zh,poiClick:new zh,poiDblClick:new zh,poiRightClick:new zh,selectPosition:new zh,sceneClick:new zh,objectAdded:new zh,objectRemoved:new zh,objectChanged:new zh,geometryChanged:new zh,materialAdded:new zh,materialChanged:new zh,materialRemoved:new zh,cameraChange:new zh,outlineChange:new zh,modelAnimation:new zh,getSceneInfo:new zh},this.objectsCache=new Hh,this.viewport=new ka(this.options,this.signals,this.objectsCache),this.controls=this.viewport.controls,this.manager=new rd(this.viewport,this.objectsCache),s&&(this.domElement=s instanceof HTMLElement?s:document.querySelector(s),null===(n=this.domElement)||void 0===n||n.appendChild(this.viewport.container)),!this.domElement)throw new Error("In SoonSpace: Can't find container!");this._init(),this._initEvents(i),this._initDefaultSettings()}_init(){const{showGrid:e,background:t,fog:n,controls:s,fileCacheEnabled:r,closeInfoLog:i,closeWarnLog:o,useIndexedDB:a}=this.options;if(!i){$s(" ____ ____ _ \n / ___| ___ ___ _ __ / ___| _ __ __ _ ___ ___ (_)___ \n \\___ \\ / _ \\ / _ \\| '_ \\\\___ \\| '_ \\ / _` |/ __/ _ \\ | / __| \n ___) | (_) | (_) | | | |___) | |_) | (_| | (_| __/_ | \\__ \\ \n |____/ \\___/ \\___/|_| |_|____/| .__/ \\__,_|\\___\\___(_)/ |___/ \n |_| |__/ \n",{color:"#3eaf7c"}),$s(Xn,{color:"#3eaf7c","font-size":"24px"}),$s(`当前版本: ${this.version}`,{color:"#3eaf7c","font-size":"12px"}),$s("文档: https://www.xwbuilders.com/soonspacejs/",{color:"#3eaf7c","font-size":"12px"}),$s("样例: https://www.xwbuilders.com/soonspacejs/examples/",{color:"#3eaf7c","font-size":"12px"}),$s("GitHub: https://github.com/soonspacejs",{color:"#3eaf7c","font-size":"12px"})}e&&this.addGridHelper(!0===e?{id:"defaultGridHelper"}:e),(null==t?void 0:t.skyBox)?Gr(null==t?void 0:t.skyBox)?this.setSphereSkyBackground(null==t?void 0:t.skyBox):Kr(null==t?void 0:t.skyBox)&&this.setSkyBackground(t.skyBox.dirPath,t.skyBox.fileNames):(null==t?void 0:t.img)?this.setBackgroundImage(t.img):(null==t?void 0:t.color)?this.setBackgroundColor(t.color):!0===(null==t?void 0:t.alpha)&&this.setBackgroundColorAlpha("#000",0),n&&this.openSceneFog(!0===n?void 0:n),s&&this.setControlsOptions(s),void 0!==r&&this.setFileCacheEnabled(r),o&&(window.console.warn=function(){}),a&&!window.indexedDB&&(this.options.useIndexedDB=!1,window.console.warn("Your browser doesn't support a stable version of IndexedDB. Such and such feature will not be available."))}_initEvents(e){const t={modelHover:this.signals.modelHover,modelUnHover:this.signals.modelUnHover,modelClick:this.signals.modelClick,modelRightClick:this.signals.modelRightClick,modelDblClick:this.signals.modelDblClick,poiHover:this.signals.poiHover,poiUnHover:this.signals.poiUnHover,poiClick:this.signals.poiClick,poiRightClick:this.signals.poiRightClick,poiDblClick:this.signals.poiDblClick,selectPosition:this.signals.selectPosition,sceneClick:this.signals.sceneClick};for(const[n,s]of Object.entries(t)){const t=e[n];t&&s.add(t)}}_initDefaultSettings(){this.setEnvironment(),this.setColorSpace("sRGB"),this.setToneMapping({type:"ACESFilmic",exposure:.8})}setHoverEnabled(e){this.options.hoverEnabled=e}setLevelEnabled(e){this.options.levelEnabled=e}setScaleFixedEnabled(e){this.options.scaleFixedEnabled=e}setFileCacheEnabled(t){e.Cache.enabled=t}registerPlugin(e,t,n){const s=new e(this,n);return this.plugins[t]=s,s}getPlugin(e){return this.plugins[e]?this.plugins[e]:null}createPluginObject(e,t){return this.manager.store.pluginObjectManager.createObject(e,t)}addToPluginObject(e,t){const n=this.getObjectById(e);return this.manager.store.pluginObjectManager.addToObject(n,t)}getPluginObjectById(e){return tr("getPluginObjectById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPluginObjectByName(e){return tr("getPluginObjectByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}removePluginObjectById(e){return tr("removePluginObjectById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}setAutoInstancing(e){this.viewport.setAutoInstancing(e)}setBloom(e){this.viewport.setBloom(e)}setSSAO(e){this.viewport.setSSAO(e)}setColorSpace(e){this.viewport.setColorSpace(e)}setToneMapping(e){this.viewport.setToneMapping(e)}setBackgroundColor(e){this.viewport.setBackgroundColor(e)}setBackgroundColorAlpha(e,t){this.viewport.setBackgroundColorAlpha(e,t)}setBackgroundImage(e){return this.viewport.setBackgroundImage(e)}setSphereSkyBackground(e){return this.viewport.setSphereSkyBackground(e)}setSkyBackground(e,t){return this.viewport.setSkyBackground(e,t)}setEnvironment(e){return this.viewport.setEnvironment(e)}playModelAnimation(e,t){return this.viewport.playModelAnimation(e,t)}stopModelAnimation(e,t){this.viewport.stopModelAnimation(e,t)}getOffsetByPosition(e){return this.viewport.getOffsetByPosition(e)}getPositionByOffset(e,t,n){return this.viewport.getPositionByOffset(e,t,n)}render(e){return this.viewport.render(e)}clearSignals(){this.viewport.clearSignals()}dispose(){this.manager.dispose(),this.viewport.dispose(),this.objectsCache.dispose()}async setCamera(e,t,n=!0){return this.viewport.cameraManager.setCamera(e,t,n)}getCameraViewpoint(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraViewpoint(e,t=!1){return this.viewport.cameraManager.setCameraViewpoint(e,t)}flyTo(e,t="frontTop",n){return this.viewport.cameraManager.flyTo(e,t,n)}flyToBoundingBox(e,t="frontTop",n){return this.flyToObj(e,t,n)}flyToObj(e,t="frontTop",n){return this.viewport.cameraManager.flyToObj(e,t,n)}flyMainViewpoint(e="frontTop",t){return this.flyToObj(this.manager.scene,e,t)}surroundOnTarget(e,t){return this.viewport.cameraManager.surroundOnTarget(e,t)}surroundOnObject(e,t){return this.viewport.cameraManager.surroundOnObject(e,t)}getObjectLabelPos(e,t="frontTop",n){return this.viewport.cameraManager.getObjectLabelPos(e,t,n)}setControlsOptions(e){return this.controls.setOptions(e)}addObject(e,t){this.viewport.scener.addObject(e,t)}attachObject(e,t){this.viewport.scener.attachObject(e,t)}removeObject(e){this.viewport.scener.removeObject(e)}openSceneFog(e){this.viewport.scener.openSceneFog(e)}closeSceneFog(){this.viewport.scener.closeSceneFog()}setSky(e){return this.viewport.setSky(e)}getScreenshot(){return this.screenshot()}screenshot(){return this.viewport.screenshot()}edgeShow(e,t){return this.viewport.scener.edgeShow(e,t)}unEdgeShow(e){return this.viewport.scener.unEdgeShow(e)}strokeShow(e,t){return this.viewport.scener.strokeShow(e,t)}unStrokeShow(e){return this.viewport.scener.unStrokeShow(e)}opacityShow(e,t){return this.viewport.scener.opacityShow(e,t)}unOpacityShow(e){return this.viewport.scener.unOpacityShow(e)}highlightShow(e,t){return this.viewport.scener.highlightShow(e,t)}unHighlightShow(e){return this.viewport.scener.unHighlightShow(e)}emissiveShow(e,t){return this.viewport.scener.emissiveShow(e,t)}unEmissiveShow(e){return this.viewport.scener.unEmissiveShow(e)}clearObject(){this.manager.clearObject()}clear(){this.manager.clear()}createAmbientLight(e){return this.manager.store.lightManager.createAmbientLight(e)}setAmbientLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setAmbientLight(t,e)}createDirectionalLight(e){return this.manager.store.lightManager.createDirectionalLight(e)}setDirectionalLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setDirectionalLight(t,e)}createHemisphereLight(e){return this.manager.store.lightManager.createHemisphereLight(e)}setHemisphereLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setHemisphereLight(t,e)}createSpotLight(e){return this.manager.store.lightManager.createSpotLight(e)}setSpotLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setSpotLight(t,e)}createPointLight(e){return this.manager.store.lightManager.createPointLight(e)}setPointLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setPointLight(t,e)}createRectAreaLight(e){return this.manager.store.lightManager.createRectAreaLight(e)}setRectAreaLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setRectAreaLight(t,e)}getLightById(e){return tr("getLightById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeLightById(e){return tr("removeLightById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}getAllLight(){return this.manager.store.lightManager.getAll()}clearLight(){return this.manager.store.lightManager.clear()}showAllLight(){return this.manager.store.lightManager.showAll()}hideAllLight(){return this.manager.store.lightManager.hideAll()}updateAllShadow(){return this.manager.store.lightManager.updateAllShadow()}getObjectById(e){return this.manager.getObjectById(e)}getObjectByName(e){return this.manager.getObjectByName(e)}getObjectByUserDataProperty(e,t){return this.manager.getObjectByUserDataProperty(e,t)}removeObjectById(e){return this.manager.removeObjectById(e)}createGroup(e,t){return this.manager.store.groupManager.createGroup(e,t)}getGroupById(e){return tr("getGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getGroupByName(e){return tr("getGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllGroup(){return this.manager.store.groupManager.getAll()}showAllGroup(){return this.manager.store.groupManager.showAll()}hideAllGroup(){return this.manager.store.groupManager.hideAll()}removeGroupById(e){return tr("removeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}loadSbm(e){return tr("loadSbm is deprecated, use loadModel instead"),this.loadModel(e)}parseSbm(){tr("parseSbm is deprecated!")}cloneSbm(e,t,n){return tr("cloneSbm is deprecated, use cloneModel instead"),this.cloneModel(e,t,n)}getSbmById(e){return tr("getSbmById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmByName(e){return tr("getSbmByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getSbmByUserDataProperty(e,t){return tr("getSbmByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeSbmById(e){return tr("removeSbmById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForSbm(e){return tr("createGroupForSbm is deprecated, use createGroup instead"),this.createGroup(e)}loadSbmToGroup(e,t){return tr("loadSbmToGroup is deprecated, use loadModelToGroup instead"),this.loadModelToGroup(e,t)}addSbmForGroup(e,t){return tr("addSbmForGroup is deprecated, use addModelForGroup instead"),this.addModelForGroup(e,t)}createSbmGroupFromXml(){tr("createGroupForSbm is deprecated!")}getSbmGroupById(e){return tr("getSbmGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmGroupByName(e){return tr("getSbmGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllSbmGroup(){return tr("getAllSbmGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeSbmGroupById(e){return tr("removeSbmGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearSbm(){return tr("clearSbm is deprecated, use clearModel instead"),this.clearModel()}getAllSbm(){return tr("getAllSbm is deprecated, use getAllModel instead"),this.getAllModel()}showAllSbm(){return tr("showAllSbm is deprecated, use showAllModel instead"),this.showAllModel()}hideAllSbm(){return tr("hideAllSbm is deprecated, use hideAllModel instead"),this.hideAllModel()}getSbmModelMaps(){return tr("getSbmModelMaps is deprecated, use getModelsMap instead"),this.getModelsMap()}setSbmModelMaps(e){return tr("setSbmModelMaps is deprecated, use setModelsMap instead"),this.setModelsMap(e)}setModelDracoDecoderPath(e){return this.manager.store.modelManager.setDracoDecoderPath(e)}setModelKtx2DecoderPath(e){return this.manager.store.modelManager.setKtx2DecoderPath(e)}loadModel(e,t){return this.manager.store.modelManager.load(e,t)}cloneModel(e,t,n){return this.manager.store.modelManager.clone(e,t,n)}getModelById(e){return tr("getModelById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelByName(e){return tr("getModelByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getModelByUserDataProperty(e,t){return tr("getModelByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeModelById(e){return tr("removeModelById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForModel(e){return tr("createGroupForModel is deprecated, use createGroup instead"),this.createGroup(e)}loadModelToGroup(e,t){return this.manager.store.modelManager.loadToGroup(e,t)}addModelForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.modelManager.addForGroup(n,t)}getModelGroupById(e){return tr("getModelGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelGroupByName(e){return tr("getModelGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllModelGroup(){return tr("getAllModelGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeModelGroupById(e){return tr("removeModelGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearModel(){return this.manager.store.modelManager.clear()}getAllModel(){return this.manager.store.modelManager.getAll()}showAllModel(){return this.manager.store.modelManager.showAll()}hideAllModel(){return this.manager.store.modelManager.hideAll()}computeModelsBoundsTree(e){return this.viewport.bvh.computeModelsBoundsTree(e)}clearIdb(){return this.manager.store.modelManager.clearIdb()}getModelsMap(){return this.manager.store.modelManager.modelsMap}setModelsMap(e){this.manager.store.modelManager.modelsMap=e}createPoi(e){return this.manager.store.poiManager.create(e)}clonePoi(e,t,n){return this.manager.store.poiManager.clone(e,t,n)}getPoiById(e){return tr("getPoiById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiByName(e){return tr("getPoiByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiByUserDataProperty(e,t){return tr("getPoiByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiById(e){return tr("removePoiById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoi(e){return tr("createGroupForPoi is deprecated, use createGroup instead"),this.createGroup(e)}createPoiToGroup(e,t){return this.manager.store.poiManager.createToGroup(e,t)}addPoiForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiManager.addForGroup(n,t)}getPoiGroupById(e){return tr("getPoiGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiGroupByName(e){return tr("getPoiGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiGroup(){return tr("getAllPoiGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiGroupById(e){return tr("removePoiGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoi(){return this.manager.store.poiManager.clear()}getAllPoi(){return this.manager.store.poiManager.getAll()}showAllPoi(){return this.manager.store.poiManager.showAll()}hideAllPoi(){return this.manager.store.poiManager.hideAll()}createPoiNode(e){return this.manager.store.poiNodeManager.create(e)}getPoiNodeById(e){return tr("getPoiNodeById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeByName(e){return tr("getPoiNodeByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiNodeByUserDataProperty(e,t){return tr("getPoiNodeByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiNodeById(e){return tr("removePoiNodeById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoiNode(e){return tr("createGroupForPoiNode is deprecated, use createGroup instead"),this.createGroup(e)}createPoiNodeToGroup(e,t){return this.manager.store.poiNodeManager.createToGroup(e,t)}addPoiNodeForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiNodeManager.addForGroup(n,t)}getPoiNodeGroupById(e){return tr("getPoiNodeGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeGroupByName(e){return tr("getPoiNodeGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiNodeGroup(){return tr("getAllPoiNodeGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiNodeGroupById(e){return tr("removePoiNodeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoiNode(){return this.manager.store.poiNodeManager.clear()}getAllPoiNode(){return this.manager.store.poiNodeManager.getAll()}showAllPoiNode(){return this.manager.store.poiNodeManager.showAll()}hideAllPoiNode(){return this.manager.store.poiNodeManager.hideAll()}createPoiMesh(e){const t=new Nc(e,this.textureCache);return this.addObject(t),t}createPolygonPoiMesh(e){const t=new zc(e,this.textureCache);return this.addObject(t),t}setTexture(e,t,n={}){const{cache:s=!0,independ:r=!0}=n||{};let i=e.material;if(r&&(i=i.clone(),e.material=i),null===t)return i.map=null,this.render(),null;const o=Rc(i,t,s,this.textureCache);return this.render(),o}createCanvas3D(e,t){return this.manager.store.canvas3DManager.create(e,t)}getCanvas3DById(e){return tr("getCanvas3DById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DByName(e){return tr("getCanvas3DByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getCanvas3DByUserDataProperty(e,t){return tr("getCanvas3DByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeCanvas3DById(e){return tr("removeCanvas3DById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForCanvas3D(e){return tr("createGroupForCanvas3D is deprecated, use createGroup instead"),this.createGroup(e)}createCanvas3DToGroup(e,t){return this.manager.store.canvas3DManager.createToGroup(e,t)}addCanvas3DForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.canvas3DManager.addForGroup(n,t)}getCanvas3DGroupById(e){return tr("getCanvas3DGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DGroupByName(e){return tr("getCanvas3DGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllCanvas3DGroup(){return tr("getAllCanvas3DGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeCanvas3DGroupById(e){return tr("removeCanvas3DGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearCanvas3D(){return this.manager.store.canvas3DManager.clear()}getAllCanvas3D(){return this.manager.store.canvas3DManager.getAll()}showAllCanvas3D(){return this.manager.store.canvas3DManager.showAll()}hideAllCanvas3D(){return this.manager.store.canvas3DManager.hideAll()}getShortestPath(e,t){return this.manager.store.topologyManager.getShortestPath(e,t)}getShortestPathAsync(e,t){return this.manager.store.topologyManager.getShortestPathAsync(e,t)}getShortestPathByMultipleStartPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPoints(e,t)}getShortestPathByMultipleStartPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPointsAsync(e,t)}getShortestPathByMultipleEndPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPoints(e,t)}getShortestPathByMultipleEndPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPointsAsync(e,t)}createTopologyFromGml(e){return this.manager.store.topologyManager.createFromGml(e)}createTopology(e){return this.manager.store.topologyManager.create(e)}setTopologyPassable(e,t){this.manager.store.topologyManager.setPassable(e,t)}resetTopologyNodes(e,t){return this.manager.store.topologyManager.resetNodes(e,t)}getTopologyById(e){return tr("getTopologyById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyByName(e){return tr("getTopologyByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getTopologyByUserDataProperty(e,t){return tr("getTopologyByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeTopologyById(e){return tr("removeTopologyById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForTopology(e){return tr("createGroupForTopology is deprecated, use createGroup instead"),this.createGroup(e)}createTopologyToGroup(e,t){return this.manager.store.topologyManager.createToGroup(e,t)}addTopologyForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.topologyManager.addForGroup(n,t)}getTopologyGroupById(e){return tr("getTopologyGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyGroupByName(e){return tr("getTopologyGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllTopologyGroup(){return tr("getAllTopologyGroup is deprecated, use getAllGroups instead"),this.getAllGroup()}removeTopologyGroupById(e){return tr("removeTopologyGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearTopology(){return this.manager.store.topologyManager.clear()}getAllTopology(){return this.manager.store.topologyManager.getAll()}showAllTopology(){return this.manager.store.topologyManager.showAll()}hideAllTopology(){return this.manager.store.topologyManager.hideAll()}addGridHelper(e){return this.manager.store.helperManager.addGridHelper(e)}addAxesHelper(e){return this.manager.store.helperManager.addAxesHelper(e)}addBoxHelper(e){return this.manager.store.helperManager.addBoxHelper(e)}addPlaneHelper(e){return this.manager.store.helperManager.addPlaneHelper(e)}createGround(e){return tr("In soonspacejs: 'createGround' 已弃用,请使用 'addGroundHelper'!"),this.addGroundHelper(e)}addGroundHelper(e){return this.manager.store.helperManager.addGroundHelper(e)}addDirectionalLightHelper(e){return this.manager.store.helperManager.addDirectionalLightHelper(e)}addHemisphereLightHelper(e){return this.manager.store.helperManager.addHemisphereLightHelper(e)}addSpotLightHelper(e){return this.manager.store.helperManager.addSpotLightHelper(e)}addPointLightHelper(e){return this.manager.store.helperManager.addPointLightHelper(e)}addRectAreaLightHelper(e){return this.manager.store.helperManager.addRectAreaLightHelper(e)}getHelperById(e){return tr("getHelperById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeHelperById(e){return tr("removeHelperById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearHelper(){return this.manager.store.helperManager.clear()}showAllHelper(){return this.manager.store.helperManager.showAll()}hideAllHelper(){return this.manager.store.helperManager.hideAll()}createDecal(e,t){return this.manager.store.decalManager.create(e,t)}updateDecalGeometry(e,t={}){return this.manager.store.decalManager.updateGeometry(e,t)}updateAllDecalGeometry(e={}){return this.manager.store.decalManager.updateAllGeometry(e)}clearDecal(){return this.manager.store.decalManager.clear()}getAllDecal(){return this.manager.store.decalManager.getAll()}showAllDecal(){return this.manager.store.decalManager.showAll()}hideAllDecal(){return this.manager.store.decalManager.hideAll()}createFindObjectsInBoxNearPosition(e,t){return Bc(e,t)}createFindObjectsInSphereNearPosition(e,t){return Uc(e,t)}createFindObjectsNearPath(e,t){return kc(e,t)}createPathAnimation(e,t,n){return new ii(e,t,n)}createTopologyAnimation(e,n,s){const r=n.nodes.map((e=>e.getWorldPosition(new t)));return new ii(e,r,s)}createPathAnimationAction(e,t,n){return function(e,t,n,s){const r=s?Wc(s,!1):null,i=Zc(t),{clip:o}=Ki(Object.assign(Object.assign(Object.assign({},r),i),{target:e})),a=n.playModelAnimation(e,o),{points:l}=i;return l?(a.enableKeyframeEvent=!1,a.points=l):a.enablePointEvent=!1,a}(e,t,this,n)}createPathAnimationActionForCamera(e,t){}createBonePathAnimation(e,t,n){return function(e,t,n,s){const r=s?Wc(s,!1):null,i=Zc(t),o=no(Object.assign(Object.assign(Object.assign({},r),i),{target:e})),{model:a,clip:l}=o,c=n.playModelAnimation(a,l);return Object.assign(Object.assign({},o),{action:c})}(e,t,this,n)}createChainSkeletalModel(e,t){return function(e,t){const n=zi(Object.assign(Object.assign({},t),{target:e})),{model:s,skeleton:r}=n;return{skeletalModel:s,skeleton:r}}(e,t)}createPathAnimationForBones(e,t,n){const s=function(e,t,n,s){const r=so(Object.assign(Object.assign({},s),{target:e,skeleton:t}));return n.playModelAnimation(t,r)}(e,t,this,n);return s}}id.THREE=e,id.TWEEN=Lt,id.utils=ni,id.animation=ri,id.library=Gc,id.ACTION=Ys.ACTION;export{yo as AnimationActionController,Eo as AnimationActionCreator,po as AnimationActionKeyframe,fo as AnimationActionOperate,Mo as AnimationClipCreator,co as AnimationClipKeyframe,ho as AnimationEventBaseType,Ga as BaseMesh,za as BaseObject3D,ll as Canvas3D,tl as Circle,Kl as Decal,Gl as DecalUVMapType,Mi as DirectionSide,Mr as FileRequestHeaders,cl as Ground,Va as Group,wo as GuiAnimationActionController,Qs as INNER_ID,Ja as Icon,ol as Line,sl as Link,Qa as Model,Zs as ModelFormat,el as Node,Xs as ObjecType,Ha as PluginObject,Xa as Poi,Nc as PoiMesh,Ya as PoiNode,$a as Point,al as Polygon,zc as PolygonPoiMesh,rl as Topology,xo as TrackProperty_Common,To as ValueTypeNames,_c as boundingIsIntersected,Fi as configVertexWeightByEquallyDivided,Bi as configVertexWeightForChainBones,Ri as configVertexWeightForEqualChainBones,go as createAnimationOperate,no as createBonePathAnimation,Ai as createChainBones,Li as createChainBonesByAxials,ji as createChainBonesByJoints,zi as createChainSkeletalModel,Ui as createChainSkinnedMesh,ki as createChainSkinnedMeshForMesh,Ki as createCurveAnimationClip,qi as createCurveAnimationClipByCurve,$i as createCurveAnimationClipByPolyline,so as createCurveAnimationClipForBones,oo as createCurveAnimationClipForBonesTarget,gi as createCurveBufferGeometry,_i as createEqualChainBones,Bc as createFindObjectsInBoxNearPosition,Uc as createFindObjectsInSphereNearPosition,kc as createFindObjectsNearPath,bo as createGuiAnimationController,ro as createKeyframeTracksForBones,ao as createKeyframeTracksForBonesTarget,Yi as createKeyframeTracksOfCurveAnimation,eo as createKeyframeTracksOfCurveAnimationByPolyline,vi as createLineSegmentsByCurve,bi as createLines,Lc as createPlaneMatrix,yi as createPolylineBufferGeometry,Oi as createPolylineCurve,Fc as createTexture,jc as createUVMatrix,id as default,Vi as getAllRootBones,Do as getClosestContinuousIndexes,Ti as getClosestDistanceInfoOfPointToLines,Co as getContinuousNumsList,fi as getCurveDivisionLength,Ei as getCurvePointAwayFrom,Ci as getCurvePointAwayFromOrigin,di as getCurveULengths,Si as getDistanceInfoOfPointToLines,Qi as getDurationOfPathAnimationOptions,Hi as getFirstRootBone,Xi as getKeyframeTransformDatas,to as getKeyframeTransformDatasByPolyline,pi as getLengthsOfTs,wi as getLinesInfo,Ac as getPolygonGeometryInfo,xi as getProjectionLines,Wi as getRootBone,io as getSampleDataForBones,lo as getSampleDataForBonesTarget,mi as getSampleNum,Zi as getTS,Ji as getTimes,Ka as isPoiNode25D,Wa as isPoiNode2D,qa as isPoiNode3D,mo as requestAnimation,Rc as setTexture};
|