@abi-software/scaffoldvuer 1.8.0-beta.1 → 1.8.0-beta.2
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/scaffoldvuer.js
CHANGED
|
@@ -31411,7 +31411,7 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
31411
31411
|
/* 2 */
|
|
31412
31412
|
/***/
|
|
31413
31413
|
(o) => {
|
|
31414
|
-
o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.12.
|
|
31414
|
+
o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.12.1","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
|
|
31415
31415
|
},
|
|
31416
31416
|
/* 3 */
|
|
31417
31417
|
/***/
|
|
@@ -32629,7 +32629,6 @@ const Dz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
32629
32629
|
}, this.setScale = (p) => {
|
|
32630
32630
|
g && 0 < p && g.scale.set(p, p, 1);
|
|
32631
32631
|
}, this.dispose = () => {
|
|
32632
|
-
g.dispose();
|
|
32633
32632
|
}, this.getSprite = () => g, this.getString = () => f;
|
|
32634
32633
|
};
|
|
32635
32634
|
},
|
|
@@ -3179,9 +3179,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3179
3179
|
`),s=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
|
|
3180
3180
|
`),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor;"].join(`
|
|
3181
3181
|
`),l={specular:{value:new Ae().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=l,this.onBeforeCompile=function(u){for(const c in l)u.uniforms[c]=l[c];u.fragmentShader=u.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",i).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",s).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return l.specular.value},set:function(u){l.specular.value=u}},specularMap:{get:function(){return l.specularMap.value},set:function(u){l.specularMap.value=u,u?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return l.glossiness.value},set:function(u){l.glossiness.value=u}},glossinessMap:{get:function(){return l.glossinessMap.value},set:function(u){l.glossinessMap.value=u,u?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class kB{constructor(){this.name=tt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"]}getMaterialType(){return Sf}extendParams(e,t,i){const r=t.extensions[this.name];e.color=new Ae(1,1,1),e.opacity=1;const s=[];if(Array.isArray(r.diffuseFactor)){const o=r.diffuseFactor;e.color.fromArray(o),e.opacity=o[3]}if(r.diffuseTexture!==void 0&&s.push(i.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new Ae(0,0,0),e.glossiness=r.glossinessFactor!==void 0?r.glossinessFactor:1,e.specular=new Ae(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),r.specularGlossinessTexture!==void 0){const o=r.specularGlossinessTexture;s.push(i.assignTexture(e,"glossinessMap",o)),s.push(i.assignTexture(e,"specularMap",o))}return Promise.all(s)}createMaterial(e){const t=new Sf(e);return t.fog=!0,t.color=e.color,t.map=e.map===void 0?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=e.aoMap===void 0?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,t.bumpMap=e.bumpMap===void 0?null:e.bumpMap,t.bumpScale=1,t.normalMap=e.normalMap===void 0?null:e.normalMap,t.normalMapType=ir,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=e.specularMap===void 0?null:e.specularMap,t.specular=e.specular,t.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=e.envMap===void 0?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}class zB{constructor(){this.name=tt.KHR_MESH_QUANTIZATION}}class Ao extends ii{constructor(e,t,i,r){super(e,t,i,r)}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)t[o]=i[s+o];return t}}Ao.prototype.beforeStart_=Ao.prototype.copySampleValue_,Ao.prototype.afterEnd_=Ao.prototype.copySampleValue_,Ao.prototype.interpolate_=function(n,e,t,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,l=o*2,u=o*3,c=i-e,f=(t-e)/c,h=f*f,p=h*f,y=n*u,m=y-u,d=-2*p+3*h,b=p-h,v=1-d,g=b-h+f;for(let w=0;w!==o;w++){const S=s[m+w+o],E=s[m+w+l]*c,M=s[y+w+o],_=s[y+w]*c;r[w]=v*S+g*E+d*M+b*_}return r};const Di={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},za={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},hx={9728:St,9729:gt,9984:Qo,9985:kl,9986:ea,9987:Mi},fx={33071:zt,33648:Os,10497:nr},px={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},_f={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},wr={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},UB={CUBICSPLINE:void 0,LINEAR:Fr,STEP:Bs},Tf={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function mx(n,e){return typeof n!="string"||n===""?"":(/^https?:\/\//i.test(e)&&/^\//.test(n)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(n)||/^data:.*,.*$/i.test(n)||/^blob:.*$/i.test(n)?n:e+n)}function GB(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Kr({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Qi})),n.DefaultMaterial}function Ua(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function ls(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function HB(n,e,t){let i=!1,r=!1;for(let l=0,u=e.length;l<u;l++){const c=e[l];if(c.POSITION!==void 0&&(i=!0),c.NORMAL!==void 0&&(r=!0),i&&r)break}if(!i&&!r)return Promise.resolve(n);const s=[],o=[];for(let l=0,u=e.length;l<u;l++){const c=e[l];if(i){const f=c.POSITION!==void 0?t.getDependency("accessor",c.POSITION):n.attributes.position;s.push(f)}if(r){const f=c.NORMAL!==void 0?t.getDependency("accessor",c.NORMAL):n.attributes.normal;o.push(f)}}return Promise.all([Promise.all(s),Promise.all(o)]).then(function(l){const u=l[0],c=l[1];return i&&(n.morphAttributes.position=u),r&&(n.morphAttributes.normal=c),n.morphTargetsRelative=!0,n})}function WB(n,e){if(n.updateMorphTargets(),e.weights!==void 0)for(let t=0,i=e.weights.length;t<i;t++)n.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(n.morphTargetInfluences.length===t.length){n.morphTargetDictionary={};for(let i=0,r=t.length;i<r;i++)n.morphTargetDictionary[t[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function jB(n){const e=n.extensions&&n.extensions[tt.KHR_DRACO_MESH_COMPRESSION];let t;return e?t="draco:"+e.bufferView+":"+e.indices+":"+gx(e.attributes):t=n.indices+":"+gx(n.attributes)+":"+n.mode,t}function gx(n){let e="";const t=Object.keys(n).sort();for(let i=0,r=t.length;i<r;i++)e+=t[i]+":"+n[t[i]]+";";return e}function Ef(n){switch(n){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}class $B{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new AB,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.textureCache={},this.nodeNamesUsed={},typeof createImageBitmap<"u"&&/Firefox/.test(navigator.userAgent)===!1?this.textureLoader=new af(this.options.manager):this.textureLoader=new Kh(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new bn(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const l={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};Ua(s,l,r),ls(l,r),Promise.all(i._invokeAll(function(u){return u.afterRoot&&u.afterRoot(l)})).then(function(){e(l)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r<s;r++){const o=t[r].joints;for(let l=0,u=o.length;l<u;l++)e[o[l]].isBone=!0}for(let r=0,s=e.length;r<s;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(i[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,i){if(e.refs[t]<=1)return i;const r=i.clone();return r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){const r=e(t[i]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const i=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s&&i.push(s)}return i}getDependency(e,t){const i=e+":"+t;let r=this.cache.get(i);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this.loadAnimation(t);break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(i,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const i=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(s,o){return i.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],i=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[tt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){i.load(mx(t.uri,r.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(i){const r=t.byteLength||0,s=t.byteOffset||0;return i.slice(s,s+r)})}loadAccessor(e){const t=this,i=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0)return Promise.resolve(null);const s=[];return r.bufferView!==void 0?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),r.sparse!==void 0&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then(function(o){const l=o[0],u=px[r.type],c=za[r.componentType],f=c.BYTES_PER_ELEMENT,h=f*u,p=r.byteOffset||0,y=r.bufferView!==void 0?i.bufferViews[r.bufferView].byteStride:void 0,m=r.normalized===!0;let d,b;if(y&&y!==h){const v=Math.floor(p/y),g="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+v+":"+r.count;let w=t.cache.get(g);w||(d=new c(l,v*y,r.count*y/f),w=new pr(d,y/f),t.cache.add(g,w)),b=new Oi(w,u,p%y/f,m)}else l===null?d=new c(r.count*u):d=new c(l,p,r.count*u),b=new je(d,u,m);if(r.sparse!==void 0){const v=px.SCALAR,g=za[r.sparse.indices.componentType],w=r.sparse.indices.byteOffset||0,S=r.sparse.values.byteOffset||0,E=new g(o[1],w,r.sparse.count*v),M=new c(o[2],S,r.sparse.count*u);l!==null&&(b=new je(b.array.slice(),b.itemSize,b.normalized));for(let _=0,C=E.length;_<C;_++){const I=E[_];if(b.setX(I,M[_*u]),u>=2&&b.setY(I,M[_*u+1]),u>=3&&b.setZ(I,M[_*u+2]),u>=4&&b.setW(I,M[_*u+3]),u>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const t=this.json,i=this.options,r=t.textures[e],s=t.images[r.source];let o=this.textureLoader;if(s.uri){const l=i.manager.getHandler(s.uri);l!==null&&(o=l)}return this.loadTextureImage(e,s,o)}loadTextureImage(e,t,i){const r=this,s=this.json,o=this.options,l=s.textures[e],u=(t.uri||t.bufferView)+":"+l.sampler;if(this.textureCache[u])return this.textureCache[u];const c=self.URL||self.webkitURL;let f=t.uri||"",h=!1,p=!0;const y=f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0;if((t.mimeType==="image/jpeg"||y)&&(p=!1),t.bufferView!==void 0)f=r.getDependency("bufferView",t.bufferView).then(function(d){if(t.mimeType==="image/png"){const v=new DataView(d,25,1).getUint8(0,!1);p=v===6||v===4||v===3}h=!0;const b=new Blob([d],{type:t.mimeType});return f=c.createObjectURL(b),f});else if(t.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const m=Promise.resolve(f).then(function(d){return new Promise(function(b,v){let g=b;i.isImageBitmapLoader===!0&&(g=function(w){const S=new _t(w);S.needsUpdate=!0,b(S)}),i.load(mx(d,o.path),g,void 0,v)})}).then(function(d){h===!0&&c.revokeObjectURL(f),d.flipY=!1,l.name&&(d.name=l.name),p||(d.format=_i);const v=(s.samplers||{})[l.sampler]||{};return d.magFilter=hx[v.magFilter]||gt,d.minFilter=hx[v.minFilter]||Mi,d.wrapS=fx[v.wrapS]||nr,d.wrapT=fx[v.wrapT]||nr,r.associations.set(d,{type:"textures",index:e}),d}).catch(function(){return console.error("THREE.GLTFLoader: Couldn't load texture",f),null});return this.textureCache[u]=m,m}assignTexture(e,t,i){const r=this;return this.getDependency("texture",i.index).then(function(s){if(i.texCoord!==void 0&&i.texCoord!=0&&!(t==="aoMap"&&i.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+i.texCoord+" for texture "+t+" not yet supported."),r.extensions[tt.KHR_TEXTURE_TRANSFORM]){const o=i.extensions!==void 0?i.extensions[tt.KHR_TEXTURE_TRANSFORM]:void 0;if(o){const l=r.associations.get(s);s=r.extensions[tt.KHR_TEXTURE_TRANSFORM].extendTexture(s,o),r.associations.set(s,l)}}e[t]=s})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent!==void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0,l=Object.keys(t.morphAttributes).length>0,u=l&&t.morphAttributes.normal!==void 0;if(e.isPoints){const c="PointsMaterial:"+i.uuid;let f=this.cache.get(c);f||(f=new mr,It.prototype.copy.call(f,i),f.color.copy(i.color),f.map=i.map,f.sizeAttenuation=!1,this.cache.add(c,f)),i=f}else if(e.isLine){const c="LineBasicMaterial:"+i.uuid;let f=this.cache.get(c);f||(f=new Ft,It.prototype.copy.call(f,i),f.color.copy(i.color),this.cache.add(c,f)),i=f}if(r||s||o||l){let c="ClonedMaterial:"+i.uuid+":";i.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),r&&(c+="vertex-tangents:"),s&&(c+="vertex-colors:"),o&&(c+="flat-shading:"),l&&(c+="morph-targets:"),u&&(c+="morph-normals:");let f=this.cache.get(c);f||(f=i.clone(),s&&(f.vertexColors=!0),o&&(f.flatShading=!0),l&&(f.morphTargets=!0),u&&(f.morphNormals=!0),r&&(f.vertexTangents=!0,f.normalScale&&(f.normalScale.y*=-1),f.clearcoatNormalScale&&(f.clearcoatNormalScale.y*=-1)),this.cache.add(c,f),this.associations.set(f,this.associations.get(i))),i=f}i.aoMap&&t.attributes.uv2===void 0&&t.attributes.uv!==void 0&&t.setAttribute("uv2",t.attributes.uv),e.material=i}getMaterialType(){return Kr}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const l={},u=s.extensions||{},c=[];if(u[tt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const h=r[tt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];o=h.getMaterialType(),c.push(h.extendParams(l,s,t))}else if(u[tt.KHR_MATERIALS_UNLIT]){const h=r[tt.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(l,s,t))}else{const h=s.pbrMetallicRoughness||{};if(l.color=new Ae(1,1,1),l.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;l.color.fromArray(p),l.opacity=p[3]}h.baseColorTexture!==void 0&&c.push(t.assignTexture(l,"map",h.baseColorTexture)),l.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,l.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(l,"metalnessMap",h.metallicRoughnessTexture)),c.push(t.assignTexture(l,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,l)})))}s.doubleSided===!0&&(l.side=er);const f=s.alphaMode||Tf.OPAQUE;return f===Tf.BLEND?(l.transparent=!0,l.depthWrite=!1):(l.transparent=!1,f===Tf.MASK&&(l.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==dn&&(c.push(t.assignTexture(l,"normalMap",s.normalTexture)),l.normalScale=new Se(1,-1),s.normalTexture.scale!==void 0&&l.normalScale.set(s.normalTexture.scale,-s.normalTexture.scale)),s.occlusionTexture!==void 0&&o!==dn&&(c.push(t.assignTexture(l,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(l.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==dn&&(l.emissive=new Ae().fromArray(s.emissiveFactor)),s.emissiveTexture!==void 0&&o!==dn&&c.push(t.assignTexture(l,"emissiveMap",s.emissiveTexture)),Promise.all(c).then(function(){let h;return o===Sf?h=r[tt.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(l):h=new o(l),s.name&&(h.name=s.name),h.map&&(h.map.encoding=zr),h.emissiveMap&&(h.emissiveMap.encoding=zr),ls(h,s),t.associations.set(h,{type:"materials",index:e}),s.extensions&&Ua(r,h,s),h})}createUniqueName(e){const t=et.sanitizeNodeName(e||"");let i=t;for(let r=1;this.nodeNamesUsed[i];++r)i=t+"_"+r;return this.nodeNamesUsed[i]=!0,i}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(l){return i[tt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(l,t).then(function(u){return vx(u,l,t)})}const o=[];for(let l=0,u=e.length;l<u;l++){const c=e[l],f=jB(c),h=r[f];if(h)o.push(h.promise);else{let p;c.extensions&&c.extensions[tt.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=vx(new ke,c,t),r[f]={primitive:c,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,i=this.json,r=this.extensions,s=i.meshes[e],o=s.primitives,l=[];for(let u=0,c=o.length;u<c;u++){const f=o[u].material===void 0?GB(this.cache):this.getDependency("material",o[u].material);l.push(f)}return l.push(t.loadGeometries(o)),Promise.all(l).then(function(u){const c=u.slice(0,u.length-1),f=u[u.length-1],h=[];for(let y=0,m=f.length;y<m;y++){const d=f[y],b=o[y];let v;const g=c[y];if(b.mode===Di.TRIANGLES||b.mode===Di.TRIANGLE_STRIP||b.mode===Di.TRIANGLE_FAN||b.mode===void 0)v=s.isSkinnedMesh===!0?new wa(d,g):new Et(d,g),v.isSkinnedMesh===!0&&!v.geometry.attributes.skinWeight.normalized&&v.normalizeSkinWeights(),b.mode===Di.TRIANGLE_STRIP?v.geometry=bx(v.geometry,My):b.mode===Di.TRIANGLE_FAN&&(v.geometry=bx(v.geometry,Fd));else if(b.mode===Di.LINES)v=new on(d,g);else if(b.mode===Di.LINE_STRIP)v=new ei(d,g);else if(b.mode===Di.LINE_LOOP)v=new Mc(d,g);else if(b.mode===Di.POINTS)v=new oo(d,g);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+b.mode);Object.keys(v.geometry.morphAttributes).length>0&&WB(v,s),v.name=t.createUniqueName(s.name||"mesh_"+e),ls(v,s),b.extensions&&Ua(r,v,b),t.assignFinalMaterial(v),h.push(v)}if(h.length===1)return h[0];const p=new Qn;for(let y=0,m=h.length;y<m;y++)p.add(h[y]);return p})}loadCamera(e){let t;const i=this.json.cameras[e],r=i[i.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?t=new Bt(Wd.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):i.type==="orthographic"&&(t=new So(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),ls(t,i),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],i={joints:t.joints};return t.inverseBindMatrices===void 0?Promise.resolve(i):this.getDependency("accessor",t.inverseBindMatrices).then(function(r){return i.inverseBindMatrices=r,i})}loadAnimation(e){const i=this.json.animations[e],r=[],s=[],o=[],l=[],u=[];for(let c=0,f=i.channels.length;c<f;c++){const h=i.channels[c],p=i.samplers[h.sampler],y=h.target,m=y.node!==void 0?y.node:y.id,d=i.parameters!==void 0?i.parameters[p.input]:p.input,b=i.parameters!==void 0?i.parameters[p.output]:p.output;r.push(this.getDependency("node",m)),s.push(this.getDependency("accessor",d)),o.push(this.getDependency("accessor",b)),l.push(p),u.push(y)}return Promise.all([Promise.all(r),Promise.all(s),Promise.all(o),Promise.all(l),Promise.all(u)]).then(function(c){const f=c[0],h=c[1],p=c[2],y=c[3],m=c[4],d=[];for(let v=0,g=f.length;v<g;v++){const w=f[v],S=h[v],E=p[v],M=y[v],_=m[v];if(w===void 0)continue;w.updateMatrix(),w.matrixAutoUpdate=!0;let C;switch(wr[_.path]){case wr.weights:C=xo;break;case wr.rotation:C=Qr;break;case wr.position:case wr.scale:default:C=wo;break}const I=w.name?w.name:w.uuid,T=M.interpolation!==void 0?UB[M.interpolation]:Fr,P=[];wr[_.path]===wr.weights?w.traverse(function(R){R.isMesh===!0&&R.morphTargetInfluences&&P.push(R.name?R.name:R.uuid)}):P.push(I);let A=E.array;if(E.normalized){const R=Ef(A.constructor),L=new Float32Array(A.length);for(let N=0,x=A.length;N<x;N++)L[N]=A[N]*R;A=L}for(let R=0,L=P.length;R<L;R++){const N=new C(P[R]+"."+wr[_.path],S.array,A,T);M.interpolation==="CUBICSPLINE"&&(N.createInterpolant=function(O){return new Ao(this.times,this.values,this.getValueSize()/3,O)},N.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),d.push(N)}}const b=i.name?i.name:"animation_"+e;return new Mo(b,void 0,d)})}createNodeMesh(e){const t=this.json,i=this,r=t.nodes[e];return r.mesh===void 0?null:i.getDependency("mesh",r.mesh).then(function(s){const o=i._getNodeRef(i.meshCache,r.mesh,s);return r.weights!==void 0&&o.traverse(function(l){if(l.isMesh)for(let u=0,c=r.weights.length;u<c;u++)l.morphTargetInfluences[u]=r.weights[u]}),o})}loadNode(e){const t=this.json,i=this.extensions,r=this,s=t.nodes[e],o=s.name?r.createUniqueName(s.name):"";return function(){const l=[],u=r._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return u&&l.push(u),s.camera!==void 0&&l.push(r.getDependency("camera",s.camera).then(function(c){return r._getNodeRef(r.cameraCache,s.camera,c)})),r._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){l.push(c)}),Promise.all(l)}().then(function(l){let u;if(s.isBone===!0?u=new Ma:l.length>1?u=new Qn:l.length===1?u=l[0]:u=new Ze,u!==l[0])for(let c=0,f=l.length;c<f;c++)u.add(l[c]);if(s.name&&(u.userData.name=s.name,u.name=o),ls(u,s),s.extensions&&Ua(i,u,s),s.matrix!==void 0){const c=new Ne;c.fromArray(s.matrix),u.applyMatrix4(c)}else s.translation!==void 0&&u.position.fromArray(s.translation),s.rotation!==void 0&&u.quaternion.fromArray(s.rotation),s.scale!==void 0&&u.scale.fromArray(s.scale);return r.associations.set(u,{type:"nodes",index:e}),u})}loadScene(e){const t=this.json,i=this.extensions,r=this.json.scenes[e],s=this,o=new Qn;r.name&&(o.name=s.createUniqueName(r.name)),ls(o,r),r.extensions&&Ua(i,o,r);const l=r.nodes||[],u=[];for(let c=0,f=l.length;c<f;c++)u.push(yx(l[c],o,t,s));return Promise.all(u).then(function(){return o})}}function yx(n,e,t,i){const r=t.nodes[n];return i.getDependency("node",n).then(function(s){if(r.skin===void 0)return s;let o;return i.getDependency("skin",r.skin).then(function(l){o=l;const u=[];for(let c=0,f=o.joints.length;c<f;c++)u.push(i.getDependency("node",o.joints[c]));return Promise.all(u)}).then(function(l){return s.traverse(function(u){if(!u.isMesh)return;const c=[],f=[];for(let h=0,p=l.length;h<p;h++){const y=l[h];if(y){c.push(y);const m=new Ne;o.inverseBindMatrices!==void 0&&m.fromArray(o.inverseBindMatrices.array,h*16),f.push(m)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}u.bind(new Sa(c,f),u.matrixWorld)}),s})}).then(function(s){e.add(s);const o=[];if(r.children){const l=r.children;for(let u=0,c=l.length;u<c;u++){const f=l[u];o.push(yx(f,s,t,i))}}return Promise.all(o)})}function ZB(n,e,t){const i=e.attributes,r=new un;if(i.POSITION!==void 0){const l=t.json.accessors[i.POSITION],u=l.min,c=l.max;if(u!==void 0&&c!==void 0){if(r.set(new q(u[0],u[1],u[2]),new q(c[0],c[1],c[2])),l.normalized){const f=Ef(za[l.componentType]);r.min.multiplyScalar(f),r.max.multiplyScalar(f)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const l=new q,u=new q;for(let c=0,f=s.length;c<f;c++){const h=s[c];if(h.POSITION!==void 0){const p=t.json.accessors[h.POSITION],y=p.min,m=p.max;if(y!==void 0&&m!==void 0){if(u.setX(Math.max(Math.abs(y[0]),Math.abs(m[0]))),u.setY(Math.max(Math.abs(y[1]),Math.abs(m[1]))),u.setZ(Math.max(Math.abs(y[2]),Math.abs(m[2]))),p.normalized){const d=Ef(za[p.componentType]);u.multiplyScalar(d)}l.max(u)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(l)}n.boundingBox=r;const o=new Ei;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,n.boundingSphere=o}function vx(n,e,t){const i=e.attributes,r=[];function s(o,l){return t.getDependency("accessor",o).then(function(u){n.setAttribute(l,u)})}for(const o in i){const l=_f[o]||o.toLowerCase();l in n.attributes||r.push(s(i[o],l))}if(e.indices!==void 0&&!n.index){const o=t.getDependency("accessor",e.indices).then(function(l){n.setIndex(l)});r.push(o)}return ls(n,e),ZB(n,e,t),Promise.all(r).then(function(){return e.targets!==void 0?HB(n,e.targets,t):n})}function bx(n,e){let t=n.getIndex();if(t===null){const o=[],l=n.getAttribute("position");if(l!==void 0){for(let u=0;u<l.count;u++)o.push(u);n.setIndex(o),t=n.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),n}const i=t.count-2,r=[];if(e===Fd)for(let o=1;o<=i;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(r.push(t.getX(o)),r.push(t.getX(o+1)),r.push(t.getX(o+2))):(r.push(t.getX(o+2)),r.push(t.getX(o+1)),r.push(t.getX(o)));r.length/3!==i&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=n.clone();return s.setIndex(r),s}const XB=Rl(Object.freeze(Object.defineProperty({__proto__:null,GLTFLoader:CB},Symbol.toStringTag,{value:"Module"})));var Cf={exports:{}},xx;function YB(){return xx||(xx=1,function(n){function e(c){var f={};function h(y){if(f[y])return f[y].exports;var m=f[y]={i:y,l:!1,exports:{}};return c[y].call(m.exports,m,m.exports,h),m.l=!0,m.exports}h.m=c,h.c=f,h.i=function(y){return y},h.d=function(y,m,d){h.o(y,m)||Object.defineProperty(y,m,{configurable:!1,enumerable:!0,get:d})},h.r=function(y){Object.defineProperty(y,"__esModule",{value:!0})},h.n=function(y){var m=y&&y.__esModule?function(){return y.default}:function(){return y};return h.d(m,"a",m),m},h.o=function(y,m){return Object.prototype.hasOwnProperty.call(y,m)},h.p="/",h.oe=function(y){throw console.error(y),y};var p=h(h.s=ENTRY_MODULE);return p.default||p}var t="[\\.|\\-|\\+|\\w|/|@]+",i="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+t+").*?\\)";function r(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(c){return!isNaN(1*c)}function o(c,f,h){var p={};p[h]=[];var y=f.toString(),m=y.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!m)return p;for(var d=m[1],b=new RegExp("(\\\\n|\\W)"+r(d)+i,"g"),v;v=b.exec(y);)v[3]!=="dll-reference"&&p[h].push(v[3]);for(b=new RegExp("\\("+r(d)+'\\("(dll-reference\\s('+t+'))"\\)\\)'+i,"g");v=b.exec(y);)c[v[2]]||(p[h].push(v[1]),c[v[2]]=__webpack_require__(v[1]).m),p[v[2]]=p[v[2]]||[],p[v[2]].push(v[4]);for(var g=Object.keys(p),w=0;w<g.length;w++)for(var S=0;S<p[g[w]].length;S++)s(p[g[w]][S])&&(p[g[w]][S]=1*p[g[w]][S]);return p}function l(c){var f=Object.keys(c);return f.reduce(function(h,p){return h||c[p].length>0},!1)}function u(c,f){for(var h={main:[f]},p={main:[]},y={main:{}};l(h);)for(var m=Object.keys(h),d=0;d<m.length;d++){var b=m[d],v=h[b],g=v.pop();if(y[b]=y[b]||{},!(y[b][g]||!c[b][g])){y[b][g]=!0,p[b]=p[b]||[],p[b].push(g);for(var w=o(c,c[b][g],b),S=Object.keys(w),E=0;E<S.length;E++)h[S[E]]=h[S[E]]||[],h[S[E]]=h[S[E]].concat(w[S[E]])}}return p}n.exports=function(c,f){f=f||{};var h={main:__webpack_modules__},p=f.all?{main:Object.keys(h.main)}:u(h,c),y="";Object.keys(p).filter(function(g){return g!=="main"}).forEach(function(g){for(var w=0;p[g][w];)w++;p[g].push(w),h[g][w]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",y=y+"var "+g+" = ("+e.toString().replace("ENTRY_MODULE",JSON.stringify(w))+")({"+p[g].map(function(S){return""+JSON.stringify(S)+": "+h[g][S].toString()}).join(",")+`});
|
|
3182
|
-
`}),y=y+"new (("+e.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+p.main.map(function(g){return""+JSON.stringify(g)+": "+h.main[g].toString()}).join(",")+"}))(self);";var m=new window.Blob([y],{type:"text/javascript"});if(f.bare)return m;var d=window.URL||window.webkitURL||window.mozURL||window.msURL,b=d.createObjectURL(m),v=new window.Worker(b);return v.objectURL=b,v}}(Cf)),Cf.exports}function JB(n){var e=this.constructor;return this.then(function(t){return e.resolve(n()).then(function(){return t})},function(t){return e.resolve(n()).then(function(){return e.reject(t)})})}function KB(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(n);if(r.length===0)return t([]);var s=r.length;function o(u,c){if(c&&(typeof c=="object"||typeof c=="function")){var f=c.then;if(typeof f=="function"){f.call(c,function(h){o(u,h)},function(h){r[u]={status:"rejected",reason:h},--s===0&&t(r)});return}}r[u]={status:"fulfilled",value:c},--s===0&&t(r)}for(var l=0;l<r.length;l++)o(l,r[l])})}function wx(n,e){this.name="AggregateError",this.errors=n,this.message=e||""}wx.prototype=Error.prototype;function qB(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError("Promise.any accepts an array"));var r=Array.prototype.slice.call(n);if(r.length===0)return i();for(var s=[],o=0;o<r.length;o++)try{e.resolve(r[o]).then(t).catch(function(l){s.push(l),s.length===r.length&&i(new wx(s,"All promises were rejected"))})}catch(l){i(l)}})}var QB=setTimeout;function Mx(n){return!!(n&&typeof n.length<"u")}function eF(){}function tF(n,e){return function(){n.apply(e,arguments)}}function pt(n){if(!(this instanceof pt))throw new TypeError("Promises must be constructed via new");if(typeof n!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],_x(n,this)}function Sx(n,e){for(;n._state===3;)n=n._value;if(n._state===0){n._deferreds.push(e);return}n._handled=!0,pt._immediateFn(function(){var t=n._state===1?e.onFulfilled:e.onRejected;if(t===null){(n._state===1?Af:Ga)(e.promise,n._value);return}var i;try{i=t(n._value)}catch(r){Ga(e.promise,r);return}Af(e.promise,i)})}function Af(n,e){try{if(e===n)throw new TypeError("A promise cannot be resolved with itself.");if(e&&(typeof e=="object"||typeof e=="function")){var t=e.then;if(e instanceof pt){n._state=3,n._value=e,Rf(n);return}else if(typeof t=="function"){_x(tF(t,e),n);return}}n._state=1,n._value=e,Rf(n)}catch(i){Ga(n,i)}}function Ga(n,e){n._state=2,n._value=e,Rf(n)}function Rf(n){n._state===2&&n._deferreds.length===0&&pt._immediateFn(function(){n._handled||pt._unhandledRejectionFn(n._value)});for(var e=0,t=n._deferreds.length;e<t;e++)Sx(n,n._deferreds[e]);n._deferreds=null}function nF(n,e,t){this.onFulfilled=typeof n=="function"?n:null,this.onRejected=typeof e=="function"?e:null,this.promise=t}function _x(n,e){var t=!1;try{n(function(i){t||(t=!0,Af(e,i))},function(i){t||(t=!0,Ga(e,i))})}catch(i){if(t)return;t=!0,Ga(e,i)}}pt.prototype.catch=function(n){return this.then(null,n)},pt.prototype.then=function(n,e){var t=new this.constructor(eF);return Sx(this,new nF(n,e,t)),t},pt.prototype.finally=JB,pt.all=function(n){return new pt(function(e,t){if(!Mx(n))return t(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(n);if(i.length===0)return e([]);var r=i.length;function s(l,u){try{if(u&&(typeof u=="object"||typeof u=="function")){var c=u.then;if(typeof c=="function"){c.call(u,function(f){s(l,f)},t);return}}i[l]=u,--r===0&&e(i)}catch(f){t(f)}}for(var o=0;o<i.length;o++)s(o,i[o])})},pt.any=qB,pt.allSettled=KB,pt.resolve=function(n){return n&&typeof n=="object"&&n.constructor===pt?n:new pt(function(e){e(n)})},pt.reject=function(n){return new pt(function(e,t){t(n)})},pt.race=function(n){return new pt(function(e,t){if(!Mx(n))return t(new TypeError("Promise.race accepts an array"));for(var i=0,r=n.length;i<r;i++)pt.resolve(n[i]).then(e,t)})},pt._immediateFn=typeof setImmediate=="function"&&function(n){setImmediate(n)}||function(n){QB(n,0)},pt._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};const iF=Rl(Object.freeze(Object.defineProperty({__proto__:null,default:pt},Symbol.toStringTag,{value:"Module"})));(function(n,e){(function(i,r){n.exports=r()})(Ki,()=>(()=>{var t=[(o,l,u)=>{u(1);var c=u(2),f=c.version,h=function(){this.Revision=f,this.defaultMaterialColor=16777215,this.defaultOpacity=1,this.modelPrefix=void 0,this.Geometry=u(3).Geometry,this.Glyph=u(16).Glyph,this.Glyphset=u(18).Glyphset,this.Pointset=u(22).Pointset,this.Label=u(17).Label,this.Lines=u(24).Lines,this.TextureArray=u(25).TextureArray,this.TextureSlides=u(27).TextureSlides,this.Renderer=u(30).Renderer,this.Scene=u(32).Scene,this.GeometryCSG=u(50).GeometryCSG,this.GlyphsetCSG=u(56).GlyphsetCSG,this.Viewport=u(43).Viewport,this.CameraControls=u(43).CameraControls,this.SmoothCameraTransition=u(43).SmoothCameraTransition,this.RayCaster=u(43).RayCaster,this.CameraAutoTumble=u(43).CameraAutoTumble,this.StereoEffect=u(43).StereoEffect,this.loadExternalFile=u(5).loadExternalFile,this.loadExternalFiles=u(5).loadExternalFiles,this.THREE=u(4)};o.exports=new h},o=>{o.exports=JR()},o=>{o.exports=JSON.parse('{"name":"zincjs","version":"1.12.0","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}')},function(o,l,u){var c=u(4),f=u(5).toBufferGeometry,h=(y,m,d)=>{var b=f(y,d),v=!1;1>d.opacity&&(v=!0);var g;if(b._video===void 0){var w=d.localTimeEnabled||d.localMorphColour;m?(g=m,g.morphTargets=w,g.morphNormals=d.localTimeEnabled):b instanceof c.BufferGeometry&&b.attributes.color===void 0?g=new c.MeshPhongMaterial({color:d.colour,morphTargets:w,morphNormals:d.localTimeEnabled,transparent:v,opacity:d.opacity,side:c.DoubleSide}):g=new c.MeshPhongMaterial({color:d.colour,morphTargets:w,morphNormals:d.localTimeEnabled,vertexColors:c.VertexColors,transparent:v,opacity:d.opacity,side:c.DoubleSide}),d.localMorphColour&&b.morphAttributes.color&&(g.onBeforeCompile=u(9).augmentMorphColor())}else{var S=b._video.createCanvasVideoTexture();g=new c.MeshBasicMaterial({morphTargets:d.localTimeEnabled,color:new c.Color(1,1,1),transparent:v,opacity:d.opacity,map:S,side:c.DoubleSide}),this.videoHandler=b._video}return new c.Mesh(b,g)},p=function(){u(10).ZincObject.call(this),this.videoHandler=void 0,this.isGeometry=!0,this.createMesh=(y,m,d)=>{if(!(this.morph&&this.morph.geometry&&y!=null)){var b=h(y,m,d);this.setMesh(b,d.localTimeEnabled,d.localMorphColour)}},this.calculateUVs=()=>{this.geometry.computeBoundingBox();var y=this.geometry.boundingBox.max,m=this.geometry.boundingBox.min,d=new c.Vector2(0-m.x,0-m.y),b=new c.Vector2(y.x-m.x,y.y-m.y);this.geometry.faceVertexUvs[0]=[];for(var v=0;v<this.geometry.faces.length;v++){var g=this.geometry.vertices[this.geometry.faces[v].a],w=this.geometry.vertices[this.geometry.faces[v].b],S=this.geometry.vertices[this.geometry.faces[v].c];geometry.faceVertexUvs[0].push([new c.Vector2((g.x+d.x)/b.x,(g.y+d.y)/b.y),new c.Vector2((w.x+d.x)/b.x,(w.y+d.y)/b.y),new c.Vector2((S.x+d.x)/b.x,(S.y+d.y)/b.y)])}geometry.uvsNeedUpdate=!0},this.checkTransparentMesh=function(){this._lod.checkTransparentMesh()},this.setWireframe=y=>{this.morph.material.wireframe=y},this.editVertices=function(y,m){if(y&&y.length){var d=this.getMorph(),b=d.geometry.getAttribute("position");if(!d||0>m)return;var v=3*m;y.forEach(g=>{b.array[v++]=g[0],b.array[v++]=g[1],b.array[v++]=g[2]}),b.needsUpdate=!0,d.geometry.computeBoundingBox(),d.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0}}};p.prototype=Object.create(u(10).ZincObject.prototype),l.Geometry=p},o=>{o.exports=cB},(o,l,u)=>{function c(C){throw new TypeError('"'+C+'" is read-only')}var f=u(4),h=u(6).Geometry,p=u(7).default;function y(C){var I=C,T=u(0).modelPrefix;return T&&(T[T.length-1]!="/"&&c("prefix"),/^(?:[a-z]+:)?\/\//i.test(C)||(I=T+C)),I}function m(C,I){var T=(A,R)=>{try{var L=new URL(A,R).href;if(A&&2>A.split("?").length){var N=R.split("?");N.length===2&&(L=L+"?"+N[1])}return L}catch{console.error("There is an issue creating the url link with: ".concat(A,"."))}};if(!Array.isArray(C))return T(C,I);var P=[];return C.forEach(A=>{P.push(T(A,I))}),P}function d(C,I,T,P,A){var R=C.morphTargetInfluences,L=void 0;C.geometry&&(L=C.geometry.morphAttributes);var N=!1;if(R&&L&&L.position){P.set(0,0,0),A.set(0,0,0);for(var x=0;x<R.length;x++)0<R[x]&&(N=!0,T.setFromArray(L.position[x].array),P.add(T.min.multiplyScalar(R[x])),A.add(T.max.multiplyScalar(R[x])));N&&I.set(P,A)}N||I.setFromBufferAttribute(C.geometry.attributes.position),C.updateWorldMatrix(!0,!0),I.applyMatrix4(C.matrixWorld)}function b(C,I,T,P){var A=new XMLHttpRequest;A.open("GET",y(C),!0),A.onreadystatechange=()=>{A.readyState==4&&(A.status==200?T(A.responseText,I):P(C))},A.send(null)}function v(C,I,T){function P(x,O){L[O]=x,R++,R==A&&I(L)}for(var A=C.length,R=0,L=[],N=0;N<A;N++)b(C[N],N,P,T)}l.getColorsRGB=(C,I)=>{var T=Math.floor(I/3),P=I%3,A=0;P==0?A=C[T].r:P==1?A=C[T].g:P==2&&(A=C[T].b);var R=new f.Color(A);return[R.r,R.g,R.b]},l.updateMorphColorAttribute=function(C,I){if(I&&C&&C.morphAttributes&&C.morphAttributes.color){var T=C.morphAttributes.color,P=I.morphTargetInfluences,A=P.length;C.deleteAttribute("morphColor0"),C.deleteAttribute("morphColor1");for(var R=0,L=[],N=0;1>R||N<A;N++)0<P[N]&&(R++,L.push([N,P[N]]));L.length==2?(C.setAttribute("morphColor0",T[L[0][0]]),C.setAttribute("morphColor1",T[L[1][0]])):L.length==1&&(C.setAttribute("morphColor0",T[L[0][0]]),C.setAttribute("morphColor1",T[L[0][0]]))}},l.toBufferGeometry=(C,I)=>{var T;return C instanceof h?(I.localTimeEnabled&&!C.morphNormalsReady&&(C.morphNormals==null||C.morphNormals.length==0)&&C.computeMorphNormals(),T=C.toIndexedBufferGeometry(),I.localMorphColour&&g(C,T)):C instanceof f.BufferGeometry&&(T=C.clone()),T.colorsNeedUpdate=!0,T.computeBoundingBox(),T.computeBoundingSphere(),C._video&&(T._video=C._video),T},l.copyMorphColorsToBufferGeometry=(C,I)=>{if(C&&C.morphColors&&0<C.morphColors.length){for(var T=[],P=C.morphColors,A=u(5).getColorsRGB,R=0,L=P.length;R<L;R++){for(var N=P[R],x=[],O=0;O<C.faces.length;O++){var B=C.faces[O],D=A(N.colors,B.a);x.push(D[0],D[1],D[2]),D=A(N.colors,B.b),x.push(D[0],D[1],D[2]),D=A(N.colors,B.c),x.push(D[0],D[1],D[2])}var z=new f.Float32BufferAttribute(3*(3*C.faces.length),3);z.name=N.name,T.push(z.copyArray(x))}I.morphAttributes.color=T}};var g=(C,I)=>{if(C&&C.morphColors&&0<C.morphColors.length){for(var T=[],P=C.morphColors,A=u(5).getColorsRGB,R=0,L=P.length;R<L;R++){for(var N,x=P[R],O=[],B=0;B<3*x.colors.length;B++)N=A(x.colors,B),O.push(N[0],N[1],N[2]);var D=new f.Float32BufferAttribute(O,3);D.name=x.name,T.push(D)}I.morphAttributes.color=T}};l.mergeVertices=function(C){var I=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1e-4;I=Math.max(I,Number.EPSILON);for(var T,P={},A=C.getIndex(),R=C.getAttribute("position"),L=A?A.count:R.count,N=0,x=Object.keys(C.attributes),O={},B={},fe=[],D=["getX","getY","getZ","getW"],z=0,U=x.length;z<U;z++){T=x[z],O[T]=[];var H=C.morphAttributes[T];H&&(B[T]=Array(H.length).fill().map(()=>[]))}for(var Y=Math.log10(1/I),ie=Math.pow(10,Y),z=0;z<L;z++){for(var ae=A?A.getX(z):z,ee="",oe=0,U=x.length;oe<U;oe++)for(var T=x[oe],j=C.getAttribute(T),K=j.itemSize,$=0;$<K;$++)ee+="".concat(~~(j[D[$]](ae)*ie),",");if(ee in P)fe.push(P[ee]);else{for(var oe=0,U=x.length;oe<U;oe++)for(var re,T=x[oe],j=C.getAttribute(T),H=C.morphAttributes[T],K=j.itemSize,G=O[T],W=B[T],$=0;$<K;$++)if(re=D[$],G.push(j[re](ae)),H)for(var F=0,X=H.length;F<X;F++)W[F].push(H[F][re](ae));P[ee]=N,fe.push(N),N++}}for(var J=C.clone(),z=0,U=x.length;z<U;z++){var j,T=x[z],V=C.getAttribute(T),k=new V.array.constructor(O[T]);if(V.isInterleavedBufferAttribute?j=new f.BufferAttribute(k,V.itemSize,V.itemSize):(j=C.getAttribute(T).clone(),j.setArray(k)),J.setAttribute(T,j),T in B)for(var te,oe=0;oe<B[T].length;oe++)te=C.morphAttributes[T][oe].clone(),te.setArray(new te.array.constructor(B[T][oe])),J.morphAttributes[T][oe]=te}var se=Uint8Array;fe.length>=Math.pow(2,8)&&(se=Uint16Array),fe.length>=Math.pow(2,16)&&(se=Uint32Array);var le=new se(fe),fe=null;return A===null?fe=new f.BufferAttribute(le,1):(fe=C.getIndex().clone(),fe.setArray(le)),J.setIndex(fe),J};function w(C){if(C.isMeshPhongMaterial){var I=new f.MeshToonMaterial({color:C.color.clone(),morphTargets:C.morphTargets,morphNormals:C.morphNormals,vertexColors:C.vertexColors,transparent:C.transparent,opacity:C.opacity,side:C.side});return C.map&&(I.map=C.map),I}return C}function S(C,I){if(I&&C>=I.length){var T=new f.BufferGeometry,P=new Float32Array(3*C),A=0;return I.forEach(R=>{P[A++]=R[0],P[A++]=R[1],P[A++]=R[2]}),T.setAttribute("position",new f.BufferAttribute(P,3)),T.setDrawRange(0,I.length),T}}function E(){var C=new Image;C.src=u(8);var I=new f.Texture;return I.image=C,I.needsUpdate=!0,I}function M(C,I,T,P,A,R){var L=new p(C,I,T,P,A,R);return L.fontFace=P,L.fontSize=A,L.fontWeight=R,L.material.map.generateMipmaps=!1,L.material.map.anisotropy=4,L.material.sizeAttenuation=!1,L.material.alphaTest=.5,L.material.transparent=!0,L.material.depthWrite=!1,L.material.depthTest=!1,L.center.set(.5,-1.2),L.renderOrder=1e4,L}function _(C,I,T){if(T){var P=C||"",A=I||"",R=T.lastIndexOf("/");if(-1<R){var L=void 0,N=void 0;if(L=T.substring(0,R),N=T.substring(R+1),(L==="*"||L==="**"||L.toLowerCase()===P.toLowerCase())&&(N==="*"||N==="**"||N.toLowerCase()===A.toLowerCase()))return!0}else if(P.toLowerCase()===T.toLowerCase()||A.toLowerCase()===T.toLowerCase())return!0}return!1}l.getBoundingBox=d,l.createNewURL=m,l.createBufferGeometry=S,l.getCircularTexture=E,l.resolveURL=y,l.loadExternalFile=b,l.loadExternalFiles=v,l.PhongToToon=w,l.createNewSpriteText=M,l.isRegionGroup=_},(o,l,u)=>{u.r(l),u.d(l,{Face3:()=>b,Geometry:()=>m});var c=u(4),f=new c.Matrix4,h=new c.Object3D,p=new c.Vector3,y=new c.Vector3;function m(){this.uuid=c.MathUtils.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.normals=[],this.uvs=[],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1,this.morphNormalsReady=!1}m.prototype=Object.assign(Object.create(c.EventDispatcher.prototype),{constructor:m,isGeometry:!0,applyMatrix4:function(g){for(var w,S=new c.Matrix3().getNormalMatrix(g),E=0,M=this.vertices.length;E<M;E++)w=this.vertices[E],w.applyMatrix4(g);for(var _,C=0,I=this.faces.length;C<I;C++){_=this.faces[C],_.normal.applyMatrix3(S).normalize();for(var T=0,P=_.vertexNormals.length;T<P;T++)_.vertexNormals[T].applyMatrix3(S).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(g){return f.makeRotationX(g),this.applyMatrix4(f),this},rotateY:function(g){return f.makeRotationY(g),this.applyMatrix4(f),this},rotateZ:function(g){return f.makeRotationZ(g),this.applyMatrix4(f),this},translate:function(g,w,S){return f.makeTranslation(g,w,S),this.applyMatrix4(f),this},scale:function(g,w,S){return f.makeScale(g,w,S),this.applyMatrix4(f),this},lookAt:function(g){return h.lookAt(g),h.updateMatrix(),this.applyMatrix4(h.matrix),this},fromBufferGeometry:function(g){function w(H,Y,ie,ae){var ee=I===void 0?[]:[S.colors[H].clone(),S.colors[Y].clone(),S.colors[ie].clone()],oe=C===void 0?[]:[new c.Vector3().fromBufferAttribute(C,H),new c.Vector3().fromBufferAttribute(C,Y),new c.Vector3().fromBufferAttribute(C,ie)],j=new b(H,Y,ie,oe,ee,ae);S.faces.push(j),T!==void 0&&S.faceVertexUvs[0].push([new c.Vector2().fromBufferAttribute(T,H),new c.Vector2().fromBufferAttribute(T,Y),new c.Vector2().fromBufferAttribute(T,ie)]),P!==void 0&&S.faceVertexUvs[1].push([new c.Vector2().fromBufferAttribute(P,H),new c.Vector2().fromBufferAttribute(P,Y),new c.Vector2().fromBufferAttribute(P,ie)])}var S=this,E=g.index===null?void 0:g.index,M=g.attributes;if(M.position===void 0)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var _=M.position,C=M.normal,I=M.color,T=M.uv,P=M.uv2;P!==void 0&&(this.faceVertexUvs[1]=[]);for(var A=0;A<_.count;A++)S.vertices.push(new c.Vector3().fromBufferAttribute(_,A)),I!==void 0&&S.colors.push(new c.Color().fromBufferAttribute(I,A));var R=g.groups;if(0<R.length)for(var L=0;L<R.length;L++)for(var N=R[L],x=N.start,O=N.count,B=x,D=x+O;B<D;B+=3)E===void 0?w(B,B+1,B+2,N.materialIndex):w(E.getX(B),E.getX(B+1),E.getX(B+2),N.materialIndex);else if(E!==void 0)for(var z=0;z<E.count;z+=3)w(E.getX(z),E.getX(z+1),E.getX(z+2));else for(var U=0;U<_.count;U+=3)w(U,U+1,U+2);return this.computeFaceNormals(),g.boundingBox!==null&&(this.boundingBox=g.boundingBox.clone()),g.boundingSphere!==null&&(this.boundingSphere=g.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(p).negate(),this.translate(p.x,p.y,p.z),this},normalize:function(){this.computeBoundingSphere();var g=this.boundingSphere.center,w=this.boundingSphere.radius,S=w===0?1:1/w,E=new c.Matrix4;return E.set(S,0,0,-S*g.x,0,S,0,-S*g.y,0,0,S,-S*g.z,0,0,0,1),this.applyMatrix4(E),this},computeFaceNormals:function(){for(var g=new c.Vector3,w=new c.Vector3,S=0,E=this.faces.length;S<E;S++){var M=this.faces[S],_=this.vertices[M.a],C=this.vertices[M.b],I=this.vertices[M.c];g.subVectors(I,C),w.subVectors(_,C),g.cross(w),g.normalize(),M.normal.copy(g)}},computeVertexNormals:function(){for(var g=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0],w=Array(this.vertices.length),S=0,E=this.vertices.length;S<E;S++)w[S]=new c.Vector3;if(g)for(var M=new c.Vector3,_=new c.Vector3,C=0,I=this.faces.length;C<I;C++){var T=this.faces[C],P=this.vertices[T.a],A=this.vertices[T.b],R=this.vertices[T.c];M.subVectors(R,A),_.subVectors(P,A),M.cross(_),w[T.a].add(M),w[T.b].add(M),w[T.c].add(M)}else{this.computeFaceNormals();for(var L,N=0,x=this.faces.length;N<x;N++)L=this.faces[N],w[L.a].add(L.normal),w[L.b].add(L.normal),w[L.c].add(L.normal)}for(var O=0,B=this.vertices.length;O<B;O++)w[O].normalize();for(var D=0,z=this.faces.length;D<z;D++){var U=this.faces[D],H=U.vertexNormals;H.length===3?(H[0].copy(w[U.a]),H[1].copy(w[U.b]),H[2].copy(w[U.c])):(H[0]=w[U.a].clone(),H[1]=w[U.b].clone(),H[2]=w[U.c].clone())}return 0<this.faces.length&&(this.normalsNeedUpdate=!0),w},computeFlatVertexNormals:function(){this.computeFaceNormals();for(var g=0,w=this.faces.length;g<w;g++){var S=this.faces[g],E=S.vertexNormals;E.length===3?(E[0].copy(S.normal),E[1].copy(S.normal),E[2].copy(S.normal)):(E[0]=S.normal.clone(),E[1]=S.normal.clone(),E[2]=S.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var g,w=0,S=this.faces.length;w<S;w++){g=this.faces[w],g.__originalFaceNormal?g.__originalFaceNormal.copy(g.normal):g.__originalFaceNormal=g.normal.clone(),g.__originalVertexNormals||(g.__originalVertexNormals=[]);for(var E=0,M=g.vertexNormals.length;E<M;E++)g.__originalVertexNormals[E]?g.__originalVertexNormals[E].copy(g.vertexNormals[E]):g.__originalVertexNormals[E]=g.vertexNormals[E].clone()}var _=new m;_.faces=this.faces;for(var C=0,I=this.morphTargets.length;C<I;C++){if(!this.morphNormals[C]){this.morphNormals[C]={},this.morphNormals[C].faceNormals=[],this.morphNormals[C].vertexNormals=[];for(var T=this.morphNormals[C].faceNormals,P=this.morphNormals[C].vertexNormals,A=0,R=this.faces.length;A<R;A++){var L=new c.Vector3,N={a:new c.Vector3,b:new c.Vector3,c:new c.Vector3};T.push(L),P.push(N)}}var x=this.morphNormals[C];_.vertices=this.morphTargets[C].vertices,_.computeFaceNormals();var O=_.computeVertexNormals();if(O&&0<O.length){this.morphTargets[C].normals=Array(this.vertices.length);for(var B=0;B<O.length;B++)this.morphTargets[C].normals[B]=O[B].clone()}for(var D=0,z=this.faces.length;D<z;D++){var U=this.faces[D],H=x.faceNormals[D],Y=x.vertexNormals[D];H.copy(U.normal),Y.a.copy(U.vertexNormals[0]),Y.b.copy(U.vertexNormals[1]),Y.c.copy(U.vertexNormals[2])}}for(var ie,ae=0,ee=this.faces.length;ae<ee;ae++)ie=this.faces[ae],ie.normal=ie.__originalFaceNormal,ie.vertexNormals=ie.__originalVertexNormals;this.morphNormalsReady=!0},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new c.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new c.Sphere),this.boundingSphere.setFromPoints(this.vertices)},mergeMorph:function(g,w){var S=this.morphTargets.length,E=this.morphTargets,M=g.morphTargets,_=this.morphColors.length,C=this.morphColors,I=g.morphColors;if(0<S&&S==M.length)for(var T=0,P=E.length;T<P;T++){for(var A=E[T],R=M[T],L=0,N=R.vertices.length;L<N;L++){var x=R.vertices[L],O=x.clone();w!==void 0&&O.applyMatrix4(w),A.vertices.push(O)}if(A.normals&&R.normals)for(var B=0;B<R.normals.length;B+=3)y.set(R.normals2[B],R.normals2[B+1],R.normals2[B+2]),w!==void 0&&y.applyMatrix4(w),A.normals.push(y.x,y.y,y.z)}if(0<_&&_==I.length)for(var D=0,z=C.length;D<z;D++)for(var U=C[D],H=I[D],Y=0,ie=H.colors;Y<ie;Y++)U.colors.push(H.colors[Y].clone())},merge:function(g,w){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(!(g&&g.isGeometry))return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",g);var E,M=this.vertices.length,_=this.vertices,C=g.vertices,I=g.normals,T=this.faces,P=g.faces,A=this.colors,R=g.colors;w!==void 0&&(E=new c.Matrix3().getNormalMatrix(w));for(var L=0,N=C.length;L<N;L++){var x=C[L],O=x.clone();w!==void 0&&O.applyMatrix4(w),_.push(O)}for(var B=0;B<I.length;B+=3)y.set(I[B],I[B+1],I[B+2]),w!==void 0&&y.applyMatrix4(w),this.normals.push(y.x,y.y,y.z);for(var D=0,z=R.length;D<z;D++)typeof R[D]=="number"?A.push(R[D]):A.push(R[D].clone());for(var U=0,H=P.length;U<H;U++){var Y=P[U],ie=void 0,ae=void 0,ee=Y.vertexNormals,oe=Y.vertexColors,j=new b(Y.a+M,Y.b+M,Y.c+M);j.normal.copy(Y.normal),E!==void 0&&j.normal.applyMatrix3(E).normalize();for(var K=0,$=ee.length;K<$;K++)ie=ee[K].clone(),E!==void 0&&ie.applyMatrix3(E).normalize(),j.vertexNormals.push(ie);j.color.copy(Y.color);for(var re=0,G=oe.length;re<G;re++)ae=oe[re],j.vertexColors.push(ae.clone());j.materialIndex=Y.materialIndex+S,T.push(j)}for(var W,F=0,X=g.faceVertexUvs.length;F<X;F++){W=g.faceVertexUvs[F],this.faceVertexUvs[F]===void 0&&(this.faceVertexUvs[F]=[]);for(var J=0,V=W.length;J<V;J++){for(var k=W[J],te=[],se=0,le=k.length;se<le;se++)te.push(k[se].clone());this.faceVertexUvs[F].push(te)}}this.mergeMorph(g,w)},mergeMesh:function(g){return g&&g.isMesh?(g.matrixAutoUpdate&&g.updateMatrix(),void this.merge(g.geometry,g.matrix)):void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",g)},mergeVertices:function(){for(var g=0<arguments.length&&arguments[0]!==void 0?arguments[0]:4,w={},S=[],E=[],M=Math.pow(10,g),_=0,C=this.vertices.length;_<C;_++){var I=this.vertices[_],T=Math.round(I.x*M)+"_"+Math.round(I.y*M)+"_"+Math.round(I.z*M);w[T]===void 0?(w[T]=_,S.push(this.vertices[_]),E[_]=S.length-1):E[_]=E[w[T]]}for(var P,A=[],R=0,L=this.faces.length;R<L;R++){P=this.faces[R],P.a=E[P.a],P.b=E[P.b],P.c=E[P.c];for(var N=[P.a,P.b,P.c],x=0;3>x;x++)if(N[x]===N[(x+1)%3]){A.push(R);break}}for(var O,B=A.length-1;0<=B;B--){O=A[B],this.faces.splice(O,1);for(var D=0,z=this.faceVertexUvs.length;D<z;D++)this.faceVertexUvs[D].splice(O,1)}var U=this.vertices.length-S.length;return this.vertices=S,U},setFromPoints:function(g){this.vertices=[];for(var w,S=0,E=g.length;S<E;S++)w=g[S],this.vertices.push(new c.Vector3(w.x,w.y,w.z||0));return this},sortFacesByMaterialIndex:function(){for(var g=this.faces,w=g.length,S=0;S<w;S++)g[S]._id=S;g.sort(function(P,A){return P.materialIndex-A.materialIndex});var E,M,_=this.faceVertexUvs[0],C=this.faceVertexUvs[1];_&&_.length===w&&(E=[]),C&&C.length===w&&(M=[]);for(var I,T=0;T<w;T++)I=g[T]._id,E&&E.push(_[I]),M&&M.push(C[I]);E&&(this.faceVertexUvs[0]=E),M&&(this.faceVertexUvs[1]=M)},toJSON:function(){function g(G,W,F){return F?G|1<<W:G&~(1<<W)}function w(G){var W=G.x.toString()+G.y.toString()+G.z.toString();return L[W]===void 0&&(L[W]=R.length/3,R.push(G.x,G.y,G.z)),L[W]}function S(G){var W=G.r.toString()+G.g.toString()+G.b.toString();return x[W]===void 0&&(x[W]=N.length,N.push(G.getHex())),x[W]}function E(G){var W=G.x.toString()+G.y.toString();return B[W]===void 0&&(B[W]=O.length/2,O.push(G.x,G.y)),B[W]}var M={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(M.uuid=this.uuid,M.type=this.type,this.name!==""&&(M.name=this.name),this.parameters!==void 0){var _=this.parameters;for(var C in _)_[C]!==void 0&&(M[C]=_[C]);return M}for(var I,T=[],P=0;P<this.vertices.length;P++)I=this.vertices[P],T.push(I.x,I.y,I.z);for(var A=[],R=[],L={},N=[],x={},O=[],B={},D=0;D<this.faces.length;D++){var z=this.faces[D],U=!0,H=!1,Y=this.faceVertexUvs[0][D]!==void 0,ie=0<z.normal.length(),ae=0<z.vertexNormals.length,ee=z.color.r!==1||z.color.g!==1||z.color.b!==1,oe=0<z.vertexColors.length,j=0;if(j=g(j,0,0),j=g(j,1,U),j=g(j,2,H),j=g(j,3,Y),j=g(j,4,ie),j=g(j,5,ae),j=g(j,6,ee),j=g(j,7,oe),A.push(j),A.push(z.a,z.b,z.c),A.push(z.materialIndex),Y){var K=this.faceVertexUvs[0][D];A.push(E(K[0]),E(K[1]),E(K[2]))}if(ie&&A.push(w(z.normal)),ae){var $=z.vertexNormals;A.push(w($[0]),w($[1]),w($[2]))}if(ee&&A.push(S(z.color)),oe){var re=z.vertexColors;A.push(S(re[0]),S(re[1]),S(re[2]))}}return M.data={},M.data.vertices=T,M.data.normals=R,0<N.length&&(M.data.colors=N),0<O.length&&(M.data.uvs=[O]),M.data.faces=A,M},clone:function(){return new m().copy(this)},copy:function(g){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=g.name;for(var w=g.vertices,S=0,E=w.length;S<E;S++)this.vertices.push(w[S].clone());for(var M=g.colors,_=0,C=M.length;_<C;_++)this.colors.push(M[_].clone());for(var I=g.faces,T=0,P=I.length;T<P;T++)this.faces.push(I[T].clone());for(var A,R=0,L=g.faceVertexUvs.length;R<L;R++){A=g.faceVertexUvs[R],this.faceVertexUvs[R]===void 0&&(this.faceVertexUvs[R]=[]);for(var N=0,x=A.length;N<x;N++){for(var O,B=A[N],D=[],z=0,U=B.length;z<U;z++)O=B[z],D.push(O.clone());this.faceVertexUvs[R].push(D)}}for(var H,Y=g.morphTargets,ie=0,ae=Y.length;ie<ae;ie++){if(H={},H.name=Y[ie].name,Y[ie].vertices!==void 0){H.vertices=[];for(var ee=0,oe=Y[ie].vertices.length;ee<oe;ee++)H.vertices.push(Y[ie].vertices[ee].clone())}if(Y[ie].normals!==void 0){H.normals=[];for(var j=0,K=Y[ie].normals.length;j<K;j++)H.normals.push(Y[ie].normals[j].clone())}this.morphTargets.push(H)}for(var $,re=g.morphNormals,G=0,W=re.length;G<W;G++){if($={},re[G].vertexNormals!==void 0){$.vertexNormals=[];for(var F=0,X=re[G].vertexNormals.length;F<X;F++){var J=re[G].vertexNormals[F],V={};V.a=J.a.clone(),V.b=J.b.clone(),V.c=J.c.clone(),$.vertexNormals.push(V)}}if(re[G].faceNormals!==void 0){$.faceNormals=[];for(var k=0,te=re[G].faceNormals.length;k<te;k++)$.faceNormals.push(re[G].faceNormals[k].clone())}this.morphNormals.push($)}for(var se=g.skinWeights,le=0,fe=se.length;le<fe;le++)this.skinWeights.push(se[le].clone());for(var we=g.skinIndices,be=0,de=we.length;be<de;be++)this.skinIndices.push(we[be].clone());for(var ye=g.lineDistances,ne=0,he=ye.length;ne<he;ne++)this.lineDistances.push(ye[ne]);var me=g.boundingBox;me!==null&&(this.boundingBox=me.clone());var Re=g.boundingSphere;return Re!==null&&(this.boundingSphere=Re.clone()),this.elementsNeedUpdate=g.elementsNeedUpdate,this.verticesNeedUpdate=g.verticesNeedUpdate,this.uvsNeedUpdate=g.uvsNeedUpdate,this.normalsNeedUpdate=g.normalsNeedUpdate,this.colorsNeedUpdate=g.colorsNeedUpdate,this.lineDistancesNeedUpdate=g.lineDistancesNeedUpdate,this.groupsNeedUpdate=g.groupsNeedUpdate,this},computeGroups(){var v,g,w=[],S=void 0,E=this.faces;for(g=0;g<E.length;g++){var M=E[g];M.materialIndex!==S&&(S=M.materialIndex,v!==void 0&&(v.count=3*g-v.start,w.push(v)),v={start:3*g,materialIndex:S})}return v!==void 0&&(v.count=3*g-v.start,w.push(v)),w},toBufferGeometry:function(){var g=new d().fromGeometry(this),w=new c.BufferGeometry,S=new Float32Array(3*g.vertices.length);if(w.setAttribute("position",new c.BufferAttribute(S,3).copyVector3sArray(g.vertices)),0<g.normals.length){var E=new Float32Array(3*g.normals.length);w.setAttribute("normal",new c.BufferAttribute(E,3).copyVector3sArray(g.normals))}if(0<g.colors.length){var M=new Float32Array(3*g.colors.length);w.setAttribute("color",new c.BufferAttribute(M,3).copyColorsArray(g.colors))}if(0<g.uvs.length){var _=new Float32Array(2*g.uvs.length);w.setAttribute("uv",new c.BufferAttribute(_,2).copyVector2sArray(g.uvs))}if(0<g.uvs2.length){var C=new Float32Array(2*g.uvs2.length);w.setAttribute("uv2",new c.BufferAttribute(C,2).copyVector2sArray(g.uvs2))}for(var I in w.groups=g.groups,g.morphTargets){for(var T=[],P=g.morphTargets[I],A=0,R=P.length;A<R;A++){var L=P[A],N=new c.Float32BufferAttribute(3*L.data.length,3);N.name=L.name,T.push(N.copyVector3sArray(L.data))}w.morphAttributes[I]=T}if(0<g.skinIndices.length){var x=new c.Float32BufferAttribute(4*g.skinIndices.length,4);w.setAttribute("skinIndex",x.copyVector4sArray(g.skinIndices))}if(0<g.skinWeights.length){var O=new c.Float32BufferAttribute(4*g.skinWeights.length,4);w.setAttribute("skinWeight",O.copyVector4sArray(g.skinWeights))}return g.boundingSphere!==null&&(w.boundingSphere=g.boundingSphere.clone()),g.boundingBox!==null&&(w.boundingBox=g.boundingBox.clone()),w},toIndexedBufferGeometry:function(){var g=new c.BufferGeometry,w=new Float32Array(3*this.vertices.length);if(g.setAttribute("position",new c.BufferAttribute(w,3).copyVector3sArray(this.vertices)),0<this.normals.length){var S=new Float32Array(this.normals.length),E=new c.BufferAttribute(S,3).copyArray(this.normals);g.setAttribute("normal",E)}if(0<this.uvs.length&&0<this.uvs[0].length){var M=new Float32Array(2*this.uvs[0].length);g.setAttribute("uv",new c.BufferAttribute(M,2).copyArray(this.uvs[0]))}if(1<this.uvs.length&&0<this.uvs[1].length){var _=new Float32Array(2*this.uvs[1].length);g.setAttribute("uv2",new c.BufferAttribute(_,2).copyArray(this.uvs[1]))}if(0<this.colors.length){for(var C=[],I=0;I<this.colors.length;I++)C.push(new c.Color(this.colors[I]));var T=new Float32Array(3*C.length);g.setAttribute("color",new c.BufferAttribute(T,3).copyColorsArray(C))}else{for(var P=new Float32Array(3*this.vertices.length),A=0;A<3*this.vertices.length;A++)P[A]=1;g.setAttribute("color",new c.BufferAttribute(P,3))}if(0<this.faces.length){for(var R=[],L=[],N=0;N<this.faces.length;N++){L.push(this.faces[N].a,this.faces[N].b,this.faces[N].c);var x=this.faces[N].vertexColors;if(x.length===3)R.push(x[0],x[1],x[2]);else{var O=this.faces[N].color;R.push(O,O,O)}}g.setIndex(L),g.groups=this.computeGroups()}if(0<this.morphTargets.length){for(var B=[],D=[],z=0,U=this.morphTargets.length;z<U;z++){var H=this.morphTargets[z],Y=new c.Float32BufferAttribute(3*H.vertices.length,3);if(Y.name=H.name,B.push(Y.copyVector3sArray(H.vertices)),H.normals){var ie=new c.Float32BufferAttribute(3*H.normals.length,3);ie.name=H.name,D.push(ie.copyVector3sArray(H.normals))}}g.morphAttributes.position=B,g.morphAttributes.normal=D}if(0<this.skinIndices.length){var ae=new c.Float32BufferAttribute(4*this.skinIndices.length,4);g.setAttribute("skinIndex",ae.copyVector4sArray(this.skinIndices))}if(0<this.skinWeights.length){var ee=new c.Float32BufferAttribute(4*this.skinWeights.length,4);g.setAttribute("skinWeight",ee.copyVector4sArray(this.skinWeights))}return this.boundingSphere!==null&&(g.boundingSphere=this.boundingSphere.clone()),this.boundingBox!==null&&(g.boundingBox=this.boundingBox.clone()),g},computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(g){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(g)},dispose:function(){this.dispatchEvent({type:"dispose"})}}),m.createBufferGeometryFromObject=function(v){var g=new c.BufferGeometry,w=v.geometry;if(v.isPoints||v.isLine){var S=new c.Float32BufferAttribute(3*w.vertices.length,3),E=new c.Float32BufferAttribute(3*w.colors.length,3);if(g.setAttribute("position",S.copyVector3sArray(w.vertices)),g.setAttribute("color",E.copyColorsArray(w.colors)),w.lineDistances&&w.lineDistances.length===w.vertices.length){var M=new c.Float32BufferAttribute(w.lineDistances.length,1);g.setAttribute("lineDistance",M.copyArray(w.lineDistances))}w.boundingSphere!==null&&(g.boundingSphere=w.boundingSphere.clone()),w.boundingBox!==null&&(g.boundingBox=w.boundingBox.clone())}else v.isMesh&&(g=w.toBufferGeometry());return g};class d{constructor(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(g){var w,S,E=[],M=void 0,_=g.faces;for(S=0;S<_.length;S++){var C=_[S];C.materialIndex!==M&&(M=C.materialIndex,w!==void 0&&(w.count=3*S-w.start,E.push(w)),w={start:3*S,materialIndex:M})}w!==void 0&&(w.count=3*S-w.start,E.push(w)),this.groups=E}fromGeometry(g){var w,S=g.faces,E=g.vertices,M=g.faceVertexUvs,_=M[0]&&0<M[0].length,C=M[1]&&0<M[1].length,I=g.morphTargets,T=I.length;if(0<T){w=[];for(var P=0;P<T;P++)w[P]={name:I[P].name,data:[]};this.morphTargets.position=w}var A,R=g.morphNormals,L=R.length;if(0<L){A=[];for(var N=0;N<L;N++)A[N]={name:R[N].name,data:[]};this.morphTargets.normal=A}var x=g.skinIndices,O=g.skinWeights,B=x.length===E.length,D=O.length===E.length;0<E.length&&S.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var z,U=0;U<S.length;U++){z=S[U],this.vertices.push(E[z.a],E[z.b],E[z.c]);var H=z.vertexNormals;if(H.length===3)this.normals.push(H[0],H[1],H[2]);else{var Y=z.normal;this.normals.push(Y,Y,Y)}var ie=z.vertexColors;if(ie.length===3)this.colors.push(ie[0],ie[1],ie[2]);else{var ae=z.color;this.colors.push(ae,ae,ae)}if(_===!0){var ee=M[0][U];ee===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",U),this.uvs.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs.push(ee[0],ee[1],ee[2])}if(C===!0){var oe=M[1][U];oe===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",U),this.uvs2.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs2.push(oe[0],oe[1],oe[2])}for(var j,K=0;K<T;K++)j=I[K].vertices,w[K].data.push(j[z.a],j[z.b],j[z.c]);for(var $,re=0;re<L;re++)$=R[re].vertexNormals[U],A[re].data.push($.a,$.b,$.c);B&&this.skinIndices.push(x[z.a],x[z.b],x[z.c]),D&&this.skinWeights.push(O[z.a],O[z.b],O[z.c])}return this.computeGroups(g),this.verticesNeedUpdate=g.verticesNeedUpdate,this.normalsNeedUpdate=g.normalsNeedUpdate,this.colorsNeedUpdate=g.colorsNeedUpdate,this.uvsNeedUpdate=g.uvsNeedUpdate,this.groupsNeedUpdate=g.groupsNeedUpdate,g.boundingSphere!==null&&(this.boundingSphere=g.boundingSphere.clone()),g.boundingBox!==null&&(this.boundingBox=g.boundingBox.clone()),this}}class b{constructor(g,w,S,E,M){var _=5<arguments.length&&arguments[5]!==void 0?arguments[5]:0;this.a=g,this.b=w,this.c=S,this.normal=E&&E.isVector3?E:new c.Vector3,this.vertexNormals=Array.isArray(E)?E:[],this.color=M&&M.isColor?M:new c.Color,this.vertexColors=Array.isArray(M)?M:[],this.materialIndex=_}clone(){return new this.constructor().copy(this)}copy(g){this.a=g.a,this.b=g.b,this.c=g.c,this.normal.copy(g.normal),this.color.copy(g.color),this.materialIndex=g.materialIndex;for(var w=0,S=g.vertexNormals.length;w<S;w++)this.vertexNormals[w]=g.vertexNormals[w].clone();for(var E=0,M=g.vertexColors.length;E<M;E++)this.vertexColors[E]=g.vertexColors[E].clone();return this}}},o=>{o.exports=TB},o=>{o.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg=="},(o,l)=>{l.augmentMorphColor=function(){return function(u){u.vertexShader=u.vertexShader.replace("#include <color_pars_vertex>",["varying vec3 vColor;","attribute vec3 morphColor0;","attribute vec3 morphColor1;"].join(`
|
|
3182
|
+
`}),y=y+"new (("+e.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+p.main.map(function(g){return""+JSON.stringify(g)+": "+h.main[g].toString()}).join(",")+"}))(self);";var m=new window.Blob([y],{type:"text/javascript"});if(f.bare)return m;var d=window.URL||window.webkitURL||window.mozURL||window.msURL,b=d.createObjectURL(m),v=new window.Worker(b);return v.objectURL=b,v}}(Cf)),Cf.exports}function JB(n){var e=this.constructor;return this.then(function(t){return e.resolve(n()).then(function(){return t})},function(t){return e.resolve(n()).then(function(){return e.reject(t)})})}function KB(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(n);if(r.length===0)return t([]);var s=r.length;function o(u,c){if(c&&(typeof c=="object"||typeof c=="function")){var f=c.then;if(typeof f=="function"){f.call(c,function(h){o(u,h)},function(h){r[u]={status:"rejected",reason:h},--s===0&&t(r)});return}}r[u]={status:"fulfilled",value:c},--s===0&&t(r)}for(var l=0;l<r.length;l++)o(l,r[l])})}function wx(n,e){this.name="AggregateError",this.errors=n,this.message=e||""}wx.prototype=Error.prototype;function qB(n){var e=this;return new e(function(t,i){if(!(n&&typeof n.length<"u"))return i(new TypeError("Promise.any accepts an array"));var r=Array.prototype.slice.call(n);if(r.length===0)return i();for(var s=[],o=0;o<r.length;o++)try{e.resolve(r[o]).then(t).catch(function(l){s.push(l),s.length===r.length&&i(new wx(s,"All promises were rejected"))})}catch(l){i(l)}})}var QB=setTimeout;function Mx(n){return!!(n&&typeof n.length<"u")}function eF(){}function tF(n,e){return function(){n.apply(e,arguments)}}function pt(n){if(!(this instanceof pt))throw new TypeError("Promises must be constructed via new");if(typeof n!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],_x(n,this)}function Sx(n,e){for(;n._state===3;)n=n._value;if(n._state===0){n._deferreds.push(e);return}n._handled=!0,pt._immediateFn(function(){var t=n._state===1?e.onFulfilled:e.onRejected;if(t===null){(n._state===1?Af:Ga)(e.promise,n._value);return}var i;try{i=t(n._value)}catch(r){Ga(e.promise,r);return}Af(e.promise,i)})}function Af(n,e){try{if(e===n)throw new TypeError("A promise cannot be resolved with itself.");if(e&&(typeof e=="object"||typeof e=="function")){var t=e.then;if(e instanceof pt){n._state=3,n._value=e,Rf(n);return}else if(typeof t=="function"){_x(tF(t,e),n);return}}n._state=1,n._value=e,Rf(n)}catch(i){Ga(n,i)}}function Ga(n,e){n._state=2,n._value=e,Rf(n)}function Rf(n){n._state===2&&n._deferreds.length===0&&pt._immediateFn(function(){n._handled||pt._unhandledRejectionFn(n._value)});for(var e=0,t=n._deferreds.length;e<t;e++)Sx(n,n._deferreds[e]);n._deferreds=null}function nF(n,e,t){this.onFulfilled=typeof n=="function"?n:null,this.onRejected=typeof e=="function"?e:null,this.promise=t}function _x(n,e){var t=!1;try{n(function(i){t||(t=!0,Af(e,i))},function(i){t||(t=!0,Ga(e,i))})}catch(i){if(t)return;t=!0,Ga(e,i)}}pt.prototype.catch=function(n){return this.then(null,n)},pt.prototype.then=function(n,e){var t=new this.constructor(eF);return Sx(this,new nF(n,e,t)),t},pt.prototype.finally=JB,pt.all=function(n){return new pt(function(e,t){if(!Mx(n))return t(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(n);if(i.length===0)return e([]);var r=i.length;function s(l,u){try{if(u&&(typeof u=="object"||typeof u=="function")){var c=u.then;if(typeof c=="function"){c.call(u,function(f){s(l,f)},t);return}}i[l]=u,--r===0&&e(i)}catch(f){t(f)}}for(var o=0;o<i.length;o++)s(o,i[o])})},pt.any=qB,pt.allSettled=KB,pt.resolve=function(n){return n&&typeof n=="object"&&n.constructor===pt?n:new pt(function(e){e(n)})},pt.reject=function(n){return new pt(function(e,t){t(n)})},pt.race=function(n){return new pt(function(e,t){if(!Mx(n))return t(new TypeError("Promise.race accepts an array"));for(var i=0,r=n.length;i<r;i++)pt.resolve(n[i]).then(e,t)})},pt._immediateFn=typeof setImmediate=="function"&&function(n){setImmediate(n)}||function(n){QB(n,0)},pt._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};const iF=Rl(Object.freeze(Object.defineProperty({__proto__:null,default:pt},Symbol.toStringTag,{value:"Module"})));(function(n,e){(function(i,r){n.exports=r()})(Ki,()=>(()=>{var t=[(o,l,u)=>{u(1);var c=u(2),f=c.version,h=function(){this.Revision=f,this.defaultMaterialColor=16777215,this.defaultOpacity=1,this.modelPrefix=void 0,this.Geometry=u(3).Geometry,this.Glyph=u(16).Glyph,this.Glyphset=u(18).Glyphset,this.Pointset=u(22).Pointset,this.Label=u(17).Label,this.Lines=u(24).Lines,this.TextureArray=u(25).TextureArray,this.TextureSlides=u(27).TextureSlides,this.Renderer=u(30).Renderer,this.Scene=u(32).Scene,this.GeometryCSG=u(50).GeometryCSG,this.GlyphsetCSG=u(56).GlyphsetCSG,this.Viewport=u(43).Viewport,this.CameraControls=u(43).CameraControls,this.SmoothCameraTransition=u(43).SmoothCameraTransition,this.RayCaster=u(43).RayCaster,this.CameraAutoTumble=u(43).CameraAutoTumble,this.StereoEffect=u(43).StereoEffect,this.loadExternalFile=u(5).loadExternalFile,this.loadExternalFiles=u(5).loadExternalFiles,this.THREE=u(4)};o.exports=new h},o=>{o.exports=JR()},o=>{o.exports=JSON.parse('{"name":"zincjs","version":"1.12.1","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}')},function(o,l,u){var c=u(4),f=u(5).toBufferGeometry,h=(y,m,d)=>{var b=f(y,d),v=!1;1>d.opacity&&(v=!0);var g;if(b._video===void 0){var w=d.localTimeEnabled||d.localMorphColour;m?(g=m,g.morphTargets=w,g.morphNormals=d.localTimeEnabled):b instanceof c.BufferGeometry&&b.attributes.color===void 0?g=new c.MeshPhongMaterial({color:d.colour,morphTargets:w,morphNormals:d.localTimeEnabled,transparent:v,opacity:d.opacity,side:c.DoubleSide}):g=new c.MeshPhongMaterial({color:d.colour,morphTargets:w,morphNormals:d.localTimeEnabled,vertexColors:c.VertexColors,transparent:v,opacity:d.opacity,side:c.DoubleSide}),d.localMorphColour&&b.morphAttributes.color&&(g.onBeforeCompile=u(9).augmentMorphColor())}else{var S=b._video.createCanvasVideoTexture();g=new c.MeshBasicMaterial({morphTargets:d.localTimeEnabled,color:new c.Color(1,1,1),transparent:v,opacity:d.opacity,map:S,side:c.DoubleSide}),this.videoHandler=b._video}return new c.Mesh(b,g)},p=function(){u(10).ZincObject.call(this),this.videoHandler=void 0,this.isGeometry=!0,this.createMesh=(y,m,d)=>{if(!(this.morph&&this.morph.geometry&&y!=null)){var b=h(y,m,d);this.setMesh(b,d.localTimeEnabled,d.localMorphColour)}},this.calculateUVs=()=>{this.geometry.computeBoundingBox();var y=this.geometry.boundingBox.max,m=this.geometry.boundingBox.min,d=new c.Vector2(0-m.x,0-m.y),b=new c.Vector2(y.x-m.x,y.y-m.y);this.geometry.faceVertexUvs[0]=[];for(var v=0;v<this.geometry.faces.length;v++){var g=this.geometry.vertices[this.geometry.faces[v].a],w=this.geometry.vertices[this.geometry.faces[v].b],S=this.geometry.vertices[this.geometry.faces[v].c];geometry.faceVertexUvs[0].push([new c.Vector2((g.x+d.x)/b.x,(g.y+d.y)/b.y),new c.Vector2((w.x+d.x)/b.x,(w.y+d.y)/b.y),new c.Vector2((S.x+d.x)/b.x,(S.y+d.y)/b.y)])}geometry.uvsNeedUpdate=!0},this.checkTransparentMesh=function(){this._lod.checkTransparentMesh()},this.setWireframe=y=>{this.morph.material.wireframe=y},this.editVertices=function(y,m){if(y&&y.length){var d=this.getMorph(),b=d.geometry.getAttribute("position");if(!d||0>m)return;var v=3*m;y.forEach(g=>{b.array[v++]=g[0],b.array[v++]=g[1],b.array[v++]=g[2]}),b.needsUpdate=!0,d.geometry.computeBoundingBox(),d.geometry.computeBoundingSphere(),this.boundingBoxUpdateRequired=!0}}};p.prototype=Object.create(u(10).ZincObject.prototype),l.Geometry=p},o=>{o.exports=cB},(o,l,u)=>{function c(C){throw new TypeError('"'+C+'" is read-only')}var f=u(4),h=u(6).Geometry,p=u(7).default;function y(C){var I=C,T=u(0).modelPrefix;return T&&(T[T.length-1]!="/"&&c("prefix"),/^(?:[a-z]+:)?\/\//i.test(C)||(I=T+C)),I}function m(C,I){var T=(A,R)=>{try{var L=new URL(A,R).href;if(A&&2>A.split("?").length){var N=R.split("?");N.length===2&&(L=L+"?"+N[1])}return L}catch{console.error("There is an issue creating the url link with: ".concat(A,"."))}};if(!Array.isArray(C))return T(C,I);var P=[];return C.forEach(A=>{P.push(T(A,I))}),P}function d(C,I,T,P,A){var R=C.morphTargetInfluences,L=void 0;C.geometry&&(L=C.geometry.morphAttributes);var N=!1;if(R&&L&&L.position){P.set(0,0,0),A.set(0,0,0);for(var x=0;x<R.length;x++)0<R[x]&&(N=!0,T.setFromArray(L.position[x].array),P.add(T.min.multiplyScalar(R[x])),A.add(T.max.multiplyScalar(R[x])));N&&I.set(P,A)}N||I.setFromBufferAttribute(C.geometry.attributes.position),C.updateWorldMatrix(!0,!0),I.applyMatrix4(C.matrixWorld)}function b(C,I,T,P){var A=new XMLHttpRequest;A.open("GET",y(C),!0),A.onreadystatechange=()=>{A.readyState==4&&(A.status==200?T(A.responseText,I):P(C))},A.send(null)}function v(C,I,T){function P(x,O){L[O]=x,R++,R==A&&I(L)}for(var A=C.length,R=0,L=[],N=0;N<A;N++)b(C[N],N,P,T)}l.getColorsRGB=(C,I)=>{var T=Math.floor(I/3),P=I%3,A=0;P==0?A=C[T].r:P==1?A=C[T].g:P==2&&(A=C[T].b);var R=new f.Color(A);return[R.r,R.g,R.b]},l.updateMorphColorAttribute=function(C,I){if(I&&C&&C.morphAttributes&&C.morphAttributes.color){var T=C.morphAttributes.color,P=I.morphTargetInfluences,A=P.length;C.deleteAttribute("morphColor0"),C.deleteAttribute("morphColor1");for(var R=0,L=[],N=0;1>R||N<A;N++)0<P[N]&&(R++,L.push([N,P[N]]));L.length==2?(C.setAttribute("morphColor0",T[L[0][0]]),C.setAttribute("morphColor1",T[L[1][0]])):L.length==1&&(C.setAttribute("morphColor0",T[L[0][0]]),C.setAttribute("morphColor1",T[L[0][0]]))}},l.toBufferGeometry=(C,I)=>{var T;return C instanceof h?(I.localTimeEnabled&&!C.morphNormalsReady&&(C.morphNormals==null||C.morphNormals.length==0)&&C.computeMorphNormals(),T=C.toIndexedBufferGeometry(),I.localMorphColour&&g(C,T)):C instanceof f.BufferGeometry&&(T=C.clone()),T.colorsNeedUpdate=!0,T.computeBoundingBox(),T.computeBoundingSphere(),C._video&&(T._video=C._video),T},l.copyMorphColorsToBufferGeometry=(C,I)=>{if(C&&C.morphColors&&0<C.morphColors.length){for(var T=[],P=C.morphColors,A=u(5).getColorsRGB,R=0,L=P.length;R<L;R++){for(var N=P[R],x=[],O=0;O<C.faces.length;O++){var B=C.faces[O],D=A(N.colors,B.a);x.push(D[0],D[1],D[2]),D=A(N.colors,B.b),x.push(D[0],D[1],D[2]),D=A(N.colors,B.c),x.push(D[0],D[1],D[2])}var z=new f.Float32BufferAttribute(3*(3*C.faces.length),3);z.name=N.name,T.push(z.copyArray(x))}I.morphAttributes.color=T}};var g=(C,I)=>{if(C&&C.morphColors&&0<C.morphColors.length){for(var T=[],P=C.morphColors,A=u(5).getColorsRGB,R=0,L=P.length;R<L;R++){for(var N,x=P[R],O=[],B=0;B<3*x.colors.length;B++)N=A(x.colors,B),O.push(N[0],N[1],N[2]);var D=new f.Float32BufferAttribute(O,3);D.name=x.name,T.push(D)}I.morphAttributes.color=T}};l.mergeVertices=function(C){var I=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1e-4;I=Math.max(I,Number.EPSILON);for(var T,P={},A=C.getIndex(),R=C.getAttribute("position"),L=A?A.count:R.count,N=0,x=Object.keys(C.attributes),O={},B={},fe=[],D=["getX","getY","getZ","getW"],z=0,U=x.length;z<U;z++){T=x[z],O[T]=[];var H=C.morphAttributes[T];H&&(B[T]=Array(H.length).fill().map(()=>[]))}for(var Y=Math.log10(1/I),ie=Math.pow(10,Y),z=0;z<L;z++){for(var ae=A?A.getX(z):z,ee="",oe=0,U=x.length;oe<U;oe++)for(var T=x[oe],j=C.getAttribute(T),K=j.itemSize,$=0;$<K;$++)ee+="".concat(~~(j[D[$]](ae)*ie),",");if(ee in P)fe.push(P[ee]);else{for(var oe=0,U=x.length;oe<U;oe++)for(var re,T=x[oe],j=C.getAttribute(T),H=C.morphAttributes[T],K=j.itemSize,G=O[T],W=B[T],$=0;$<K;$++)if(re=D[$],G.push(j[re](ae)),H)for(var F=0,X=H.length;F<X;F++)W[F].push(H[F][re](ae));P[ee]=N,fe.push(N),N++}}for(var J=C.clone(),z=0,U=x.length;z<U;z++){var j,T=x[z],V=C.getAttribute(T),k=new V.array.constructor(O[T]);if(V.isInterleavedBufferAttribute?j=new f.BufferAttribute(k,V.itemSize,V.itemSize):(j=C.getAttribute(T).clone(),j.setArray(k)),J.setAttribute(T,j),T in B)for(var te,oe=0;oe<B[T].length;oe++)te=C.morphAttributes[T][oe].clone(),te.setArray(new te.array.constructor(B[T][oe])),J.morphAttributes[T][oe]=te}var se=Uint8Array;fe.length>=Math.pow(2,8)&&(se=Uint16Array),fe.length>=Math.pow(2,16)&&(se=Uint32Array);var le=new se(fe),fe=null;return A===null?fe=new f.BufferAttribute(le,1):(fe=C.getIndex().clone(),fe.setArray(le)),J.setIndex(fe),J};function w(C){if(C.isMeshPhongMaterial){var I=new f.MeshToonMaterial({color:C.color.clone(),morphTargets:C.morphTargets,morphNormals:C.morphNormals,vertexColors:C.vertexColors,transparent:C.transparent,opacity:C.opacity,side:C.side});return C.map&&(I.map=C.map),I}return C}function S(C,I){if(I&&C>=I.length){var T=new f.BufferGeometry,P=new Float32Array(3*C),A=0;return I.forEach(R=>{P[A++]=R[0],P[A++]=R[1],P[A++]=R[2]}),T.setAttribute("position",new f.BufferAttribute(P,3)),T.setDrawRange(0,I.length),T}}function E(){var C=new Image;C.src=u(8);var I=new f.Texture;return I.image=C,I.needsUpdate=!0,I}function M(C,I,T,P,A,R){var L=new p(C,I,T,P,A,R);return L.fontFace=P,L.fontSize=A,L.fontWeight=R,L.material.map.generateMipmaps=!1,L.material.map.anisotropy=4,L.material.sizeAttenuation=!1,L.material.alphaTest=.5,L.material.transparent=!0,L.material.depthWrite=!1,L.material.depthTest=!1,L.center.set(.5,-1.2),L.renderOrder=1e4,L}function _(C,I,T){if(T){var P=C||"",A=I||"",R=T.lastIndexOf("/");if(-1<R){var L=void 0,N=void 0;if(L=T.substring(0,R),N=T.substring(R+1),(L==="*"||L==="**"||L.toLowerCase()===P.toLowerCase())&&(N==="*"||N==="**"||N.toLowerCase()===A.toLowerCase()))return!0}else if(P.toLowerCase()===T.toLowerCase()||A.toLowerCase()===T.toLowerCase())return!0}return!1}l.getBoundingBox=d,l.createNewURL=m,l.createBufferGeometry=S,l.getCircularTexture=E,l.resolveURL=y,l.loadExternalFile=b,l.loadExternalFiles=v,l.PhongToToon=w,l.createNewSpriteText=M,l.isRegionGroup=_},(o,l,u)=>{u.r(l),u.d(l,{Face3:()=>b,Geometry:()=>m});var c=u(4),f=new c.Matrix4,h=new c.Object3D,p=new c.Vector3,y=new c.Vector3;function m(){this.uuid=c.MathUtils.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.normals=[],this.uvs=[],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1,this.morphNormalsReady=!1}m.prototype=Object.assign(Object.create(c.EventDispatcher.prototype),{constructor:m,isGeometry:!0,applyMatrix4:function(g){for(var w,S=new c.Matrix3().getNormalMatrix(g),E=0,M=this.vertices.length;E<M;E++)w=this.vertices[E],w.applyMatrix4(g);for(var _,C=0,I=this.faces.length;C<I;C++){_=this.faces[C],_.normal.applyMatrix3(S).normalize();for(var T=0,P=_.vertexNormals.length;T<P;T++)_.vertexNormals[T].applyMatrix3(S).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(g){return f.makeRotationX(g),this.applyMatrix4(f),this},rotateY:function(g){return f.makeRotationY(g),this.applyMatrix4(f),this},rotateZ:function(g){return f.makeRotationZ(g),this.applyMatrix4(f),this},translate:function(g,w,S){return f.makeTranslation(g,w,S),this.applyMatrix4(f),this},scale:function(g,w,S){return f.makeScale(g,w,S),this.applyMatrix4(f),this},lookAt:function(g){return h.lookAt(g),h.updateMatrix(),this.applyMatrix4(h.matrix),this},fromBufferGeometry:function(g){function w(H,Y,ie,ae){var ee=I===void 0?[]:[S.colors[H].clone(),S.colors[Y].clone(),S.colors[ie].clone()],oe=C===void 0?[]:[new c.Vector3().fromBufferAttribute(C,H),new c.Vector3().fromBufferAttribute(C,Y),new c.Vector3().fromBufferAttribute(C,ie)],j=new b(H,Y,ie,oe,ee,ae);S.faces.push(j),T!==void 0&&S.faceVertexUvs[0].push([new c.Vector2().fromBufferAttribute(T,H),new c.Vector2().fromBufferAttribute(T,Y),new c.Vector2().fromBufferAttribute(T,ie)]),P!==void 0&&S.faceVertexUvs[1].push([new c.Vector2().fromBufferAttribute(P,H),new c.Vector2().fromBufferAttribute(P,Y),new c.Vector2().fromBufferAttribute(P,ie)])}var S=this,E=g.index===null?void 0:g.index,M=g.attributes;if(M.position===void 0)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var _=M.position,C=M.normal,I=M.color,T=M.uv,P=M.uv2;P!==void 0&&(this.faceVertexUvs[1]=[]);for(var A=0;A<_.count;A++)S.vertices.push(new c.Vector3().fromBufferAttribute(_,A)),I!==void 0&&S.colors.push(new c.Color().fromBufferAttribute(I,A));var R=g.groups;if(0<R.length)for(var L=0;L<R.length;L++)for(var N=R[L],x=N.start,O=N.count,B=x,D=x+O;B<D;B+=3)E===void 0?w(B,B+1,B+2,N.materialIndex):w(E.getX(B),E.getX(B+1),E.getX(B+2),N.materialIndex);else if(E!==void 0)for(var z=0;z<E.count;z+=3)w(E.getX(z),E.getX(z+1),E.getX(z+2));else for(var U=0;U<_.count;U+=3)w(U,U+1,U+2);return this.computeFaceNormals(),g.boundingBox!==null&&(this.boundingBox=g.boundingBox.clone()),g.boundingSphere!==null&&(this.boundingSphere=g.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(p).negate(),this.translate(p.x,p.y,p.z),this},normalize:function(){this.computeBoundingSphere();var g=this.boundingSphere.center,w=this.boundingSphere.radius,S=w===0?1:1/w,E=new c.Matrix4;return E.set(S,0,0,-S*g.x,0,S,0,-S*g.y,0,0,S,-S*g.z,0,0,0,1),this.applyMatrix4(E),this},computeFaceNormals:function(){for(var g=new c.Vector3,w=new c.Vector3,S=0,E=this.faces.length;S<E;S++){var M=this.faces[S],_=this.vertices[M.a],C=this.vertices[M.b],I=this.vertices[M.c];g.subVectors(I,C),w.subVectors(_,C),g.cross(w),g.normalize(),M.normal.copy(g)}},computeVertexNormals:function(){for(var g=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0],w=Array(this.vertices.length),S=0,E=this.vertices.length;S<E;S++)w[S]=new c.Vector3;if(g)for(var M=new c.Vector3,_=new c.Vector3,C=0,I=this.faces.length;C<I;C++){var T=this.faces[C],P=this.vertices[T.a],A=this.vertices[T.b],R=this.vertices[T.c];M.subVectors(R,A),_.subVectors(P,A),M.cross(_),w[T.a].add(M),w[T.b].add(M),w[T.c].add(M)}else{this.computeFaceNormals();for(var L,N=0,x=this.faces.length;N<x;N++)L=this.faces[N],w[L.a].add(L.normal),w[L.b].add(L.normal),w[L.c].add(L.normal)}for(var O=0,B=this.vertices.length;O<B;O++)w[O].normalize();for(var D=0,z=this.faces.length;D<z;D++){var U=this.faces[D],H=U.vertexNormals;H.length===3?(H[0].copy(w[U.a]),H[1].copy(w[U.b]),H[2].copy(w[U.c])):(H[0]=w[U.a].clone(),H[1]=w[U.b].clone(),H[2]=w[U.c].clone())}return 0<this.faces.length&&(this.normalsNeedUpdate=!0),w},computeFlatVertexNormals:function(){this.computeFaceNormals();for(var g=0,w=this.faces.length;g<w;g++){var S=this.faces[g],E=S.vertexNormals;E.length===3?(E[0].copy(S.normal),E[1].copy(S.normal),E[2].copy(S.normal)):(E[0]=S.normal.clone(),E[1]=S.normal.clone(),E[2]=S.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var g,w=0,S=this.faces.length;w<S;w++){g=this.faces[w],g.__originalFaceNormal?g.__originalFaceNormal.copy(g.normal):g.__originalFaceNormal=g.normal.clone(),g.__originalVertexNormals||(g.__originalVertexNormals=[]);for(var E=0,M=g.vertexNormals.length;E<M;E++)g.__originalVertexNormals[E]?g.__originalVertexNormals[E].copy(g.vertexNormals[E]):g.__originalVertexNormals[E]=g.vertexNormals[E].clone()}var _=new m;_.faces=this.faces;for(var C=0,I=this.morphTargets.length;C<I;C++){if(!this.morphNormals[C]){this.morphNormals[C]={},this.morphNormals[C].faceNormals=[],this.morphNormals[C].vertexNormals=[];for(var T=this.morphNormals[C].faceNormals,P=this.morphNormals[C].vertexNormals,A=0,R=this.faces.length;A<R;A++){var L=new c.Vector3,N={a:new c.Vector3,b:new c.Vector3,c:new c.Vector3};T.push(L),P.push(N)}}var x=this.morphNormals[C];_.vertices=this.morphTargets[C].vertices,_.computeFaceNormals();var O=_.computeVertexNormals();if(O&&0<O.length){this.morphTargets[C].normals=Array(this.vertices.length);for(var B=0;B<O.length;B++)this.morphTargets[C].normals[B]=O[B].clone()}for(var D=0,z=this.faces.length;D<z;D++){var U=this.faces[D],H=x.faceNormals[D],Y=x.vertexNormals[D];H.copy(U.normal),Y.a.copy(U.vertexNormals[0]),Y.b.copy(U.vertexNormals[1]),Y.c.copy(U.vertexNormals[2])}}for(var ie,ae=0,ee=this.faces.length;ae<ee;ae++)ie=this.faces[ae],ie.normal=ie.__originalFaceNormal,ie.vertexNormals=ie.__originalVertexNormals;this.morphNormalsReady=!0},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new c.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new c.Sphere),this.boundingSphere.setFromPoints(this.vertices)},mergeMorph:function(g,w){var S=this.morphTargets.length,E=this.morphTargets,M=g.morphTargets,_=this.morphColors.length,C=this.morphColors,I=g.morphColors;if(0<S&&S==M.length)for(var T=0,P=E.length;T<P;T++){for(var A=E[T],R=M[T],L=0,N=R.vertices.length;L<N;L++){var x=R.vertices[L],O=x.clone();w!==void 0&&O.applyMatrix4(w),A.vertices.push(O)}if(A.normals&&R.normals)for(var B=0;B<R.normals.length;B+=3)y.set(R.normals2[B],R.normals2[B+1],R.normals2[B+2]),w!==void 0&&y.applyMatrix4(w),A.normals.push(y.x,y.y,y.z)}if(0<_&&_==I.length)for(var D=0,z=C.length;D<z;D++)for(var U=C[D],H=I[D],Y=0,ie=H.colors;Y<ie;Y++)U.colors.push(H.colors[Y].clone())},merge:function(g,w){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(!(g&&g.isGeometry))return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",g);var E,M=this.vertices.length,_=this.vertices,C=g.vertices,I=g.normals,T=this.faces,P=g.faces,A=this.colors,R=g.colors;w!==void 0&&(E=new c.Matrix3().getNormalMatrix(w));for(var L=0,N=C.length;L<N;L++){var x=C[L],O=x.clone();w!==void 0&&O.applyMatrix4(w),_.push(O)}for(var B=0;B<I.length;B+=3)y.set(I[B],I[B+1],I[B+2]),w!==void 0&&y.applyMatrix4(w),this.normals.push(y.x,y.y,y.z);for(var D=0,z=R.length;D<z;D++)typeof R[D]=="number"?A.push(R[D]):A.push(R[D].clone());for(var U=0,H=P.length;U<H;U++){var Y=P[U],ie=void 0,ae=void 0,ee=Y.vertexNormals,oe=Y.vertexColors,j=new b(Y.a+M,Y.b+M,Y.c+M);j.normal.copy(Y.normal),E!==void 0&&j.normal.applyMatrix3(E).normalize();for(var K=0,$=ee.length;K<$;K++)ie=ee[K].clone(),E!==void 0&&ie.applyMatrix3(E).normalize(),j.vertexNormals.push(ie);j.color.copy(Y.color);for(var re=0,G=oe.length;re<G;re++)ae=oe[re],j.vertexColors.push(ae.clone());j.materialIndex=Y.materialIndex+S,T.push(j)}for(var W,F=0,X=g.faceVertexUvs.length;F<X;F++){W=g.faceVertexUvs[F],this.faceVertexUvs[F]===void 0&&(this.faceVertexUvs[F]=[]);for(var J=0,V=W.length;J<V;J++){for(var k=W[J],te=[],se=0,le=k.length;se<le;se++)te.push(k[se].clone());this.faceVertexUvs[F].push(te)}}this.mergeMorph(g,w)},mergeMesh:function(g){return g&&g.isMesh?(g.matrixAutoUpdate&&g.updateMatrix(),void this.merge(g.geometry,g.matrix)):void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",g)},mergeVertices:function(){for(var g=0<arguments.length&&arguments[0]!==void 0?arguments[0]:4,w={},S=[],E=[],M=Math.pow(10,g),_=0,C=this.vertices.length;_<C;_++){var I=this.vertices[_],T=Math.round(I.x*M)+"_"+Math.round(I.y*M)+"_"+Math.round(I.z*M);w[T]===void 0?(w[T]=_,S.push(this.vertices[_]),E[_]=S.length-1):E[_]=E[w[T]]}for(var P,A=[],R=0,L=this.faces.length;R<L;R++){P=this.faces[R],P.a=E[P.a],P.b=E[P.b],P.c=E[P.c];for(var N=[P.a,P.b,P.c],x=0;3>x;x++)if(N[x]===N[(x+1)%3]){A.push(R);break}}for(var O,B=A.length-1;0<=B;B--){O=A[B],this.faces.splice(O,1);for(var D=0,z=this.faceVertexUvs.length;D<z;D++)this.faceVertexUvs[D].splice(O,1)}var U=this.vertices.length-S.length;return this.vertices=S,U},setFromPoints:function(g){this.vertices=[];for(var w,S=0,E=g.length;S<E;S++)w=g[S],this.vertices.push(new c.Vector3(w.x,w.y,w.z||0));return this},sortFacesByMaterialIndex:function(){for(var g=this.faces,w=g.length,S=0;S<w;S++)g[S]._id=S;g.sort(function(P,A){return P.materialIndex-A.materialIndex});var E,M,_=this.faceVertexUvs[0],C=this.faceVertexUvs[1];_&&_.length===w&&(E=[]),C&&C.length===w&&(M=[]);for(var I,T=0;T<w;T++)I=g[T]._id,E&&E.push(_[I]),M&&M.push(C[I]);E&&(this.faceVertexUvs[0]=E),M&&(this.faceVertexUvs[1]=M)},toJSON:function(){function g(G,W,F){return F?G|1<<W:G&~(1<<W)}function w(G){var W=G.x.toString()+G.y.toString()+G.z.toString();return L[W]===void 0&&(L[W]=R.length/3,R.push(G.x,G.y,G.z)),L[W]}function S(G){var W=G.r.toString()+G.g.toString()+G.b.toString();return x[W]===void 0&&(x[W]=N.length,N.push(G.getHex())),x[W]}function E(G){var W=G.x.toString()+G.y.toString();return B[W]===void 0&&(B[W]=O.length/2,O.push(G.x,G.y)),B[W]}var M={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(M.uuid=this.uuid,M.type=this.type,this.name!==""&&(M.name=this.name),this.parameters!==void 0){var _=this.parameters;for(var C in _)_[C]!==void 0&&(M[C]=_[C]);return M}for(var I,T=[],P=0;P<this.vertices.length;P++)I=this.vertices[P],T.push(I.x,I.y,I.z);for(var A=[],R=[],L={},N=[],x={},O=[],B={},D=0;D<this.faces.length;D++){var z=this.faces[D],U=!0,H=!1,Y=this.faceVertexUvs[0][D]!==void 0,ie=0<z.normal.length(),ae=0<z.vertexNormals.length,ee=z.color.r!==1||z.color.g!==1||z.color.b!==1,oe=0<z.vertexColors.length,j=0;if(j=g(j,0,0),j=g(j,1,U),j=g(j,2,H),j=g(j,3,Y),j=g(j,4,ie),j=g(j,5,ae),j=g(j,6,ee),j=g(j,7,oe),A.push(j),A.push(z.a,z.b,z.c),A.push(z.materialIndex),Y){var K=this.faceVertexUvs[0][D];A.push(E(K[0]),E(K[1]),E(K[2]))}if(ie&&A.push(w(z.normal)),ae){var $=z.vertexNormals;A.push(w($[0]),w($[1]),w($[2]))}if(ee&&A.push(S(z.color)),oe){var re=z.vertexColors;A.push(S(re[0]),S(re[1]),S(re[2]))}}return M.data={},M.data.vertices=T,M.data.normals=R,0<N.length&&(M.data.colors=N),0<O.length&&(M.data.uvs=[O]),M.data.faces=A,M},clone:function(){return new m().copy(this)},copy:function(g){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=g.name;for(var w=g.vertices,S=0,E=w.length;S<E;S++)this.vertices.push(w[S].clone());for(var M=g.colors,_=0,C=M.length;_<C;_++)this.colors.push(M[_].clone());for(var I=g.faces,T=0,P=I.length;T<P;T++)this.faces.push(I[T].clone());for(var A,R=0,L=g.faceVertexUvs.length;R<L;R++){A=g.faceVertexUvs[R],this.faceVertexUvs[R]===void 0&&(this.faceVertexUvs[R]=[]);for(var N=0,x=A.length;N<x;N++){for(var O,B=A[N],D=[],z=0,U=B.length;z<U;z++)O=B[z],D.push(O.clone());this.faceVertexUvs[R].push(D)}}for(var H,Y=g.morphTargets,ie=0,ae=Y.length;ie<ae;ie++){if(H={},H.name=Y[ie].name,Y[ie].vertices!==void 0){H.vertices=[];for(var ee=0,oe=Y[ie].vertices.length;ee<oe;ee++)H.vertices.push(Y[ie].vertices[ee].clone())}if(Y[ie].normals!==void 0){H.normals=[];for(var j=0,K=Y[ie].normals.length;j<K;j++)H.normals.push(Y[ie].normals[j].clone())}this.morphTargets.push(H)}for(var $,re=g.morphNormals,G=0,W=re.length;G<W;G++){if($={},re[G].vertexNormals!==void 0){$.vertexNormals=[];for(var F=0,X=re[G].vertexNormals.length;F<X;F++){var J=re[G].vertexNormals[F],V={};V.a=J.a.clone(),V.b=J.b.clone(),V.c=J.c.clone(),$.vertexNormals.push(V)}}if(re[G].faceNormals!==void 0){$.faceNormals=[];for(var k=0,te=re[G].faceNormals.length;k<te;k++)$.faceNormals.push(re[G].faceNormals[k].clone())}this.morphNormals.push($)}for(var se=g.skinWeights,le=0,fe=se.length;le<fe;le++)this.skinWeights.push(se[le].clone());for(var we=g.skinIndices,be=0,de=we.length;be<de;be++)this.skinIndices.push(we[be].clone());for(var ye=g.lineDistances,ne=0,he=ye.length;ne<he;ne++)this.lineDistances.push(ye[ne]);var me=g.boundingBox;me!==null&&(this.boundingBox=me.clone());var Re=g.boundingSphere;return Re!==null&&(this.boundingSphere=Re.clone()),this.elementsNeedUpdate=g.elementsNeedUpdate,this.verticesNeedUpdate=g.verticesNeedUpdate,this.uvsNeedUpdate=g.uvsNeedUpdate,this.normalsNeedUpdate=g.normalsNeedUpdate,this.colorsNeedUpdate=g.colorsNeedUpdate,this.lineDistancesNeedUpdate=g.lineDistancesNeedUpdate,this.groupsNeedUpdate=g.groupsNeedUpdate,this},computeGroups(){var v,g,w=[],S=void 0,E=this.faces;for(g=0;g<E.length;g++){var M=E[g];M.materialIndex!==S&&(S=M.materialIndex,v!==void 0&&(v.count=3*g-v.start,w.push(v)),v={start:3*g,materialIndex:S})}return v!==void 0&&(v.count=3*g-v.start,w.push(v)),w},toBufferGeometry:function(){var g=new d().fromGeometry(this),w=new c.BufferGeometry,S=new Float32Array(3*g.vertices.length);if(w.setAttribute("position",new c.BufferAttribute(S,3).copyVector3sArray(g.vertices)),0<g.normals.length){var E=new Float32Array(3*g.normals.length);w.setAttribute("normal",new c.BufferAttribute(E,3).copyVector3sArray(g.normals))}if(0<g.colors.length){var M=new Float32Array(3*g.colors.length);w.setAttribute("color",new c.BufferAttribute(M,3).copyColorsArray(g.colors))}if(0<g.uvs.length){var _=new Float32Array(2*g.uvs.length);w.setAttribute("uv",new c.BufferAttribute(_,2).copyVector2sArray(g.uvs))}if(0<g.uvs2.length){var C=new Float32Array(2*g.uvs2.length);w.setAttribute("uv2",new c.BufferAttribute(C,2).copyVector2sArray(g.uvs2))}for(var I in w.groups=g.groups,g.morphTargets){for(var T=[],P=g.morphTargets[I],A=0,R=P.length;A<R;A++){var L=P[A],N=new c.Float32BufferAttribute(3*L.data.length,3);N.name=L.name,T.push(N.copyVector3sArray(L.data))}w.morphAttributes[I]=T}if(0<g.skinIndices.length){var x=new c.Float32BufferAttribute(4*g.skinIndices.length,4);w.setAttribute("skinIndex",x.copyVector4sArray(g.skinIndices))}if(0<g.skinWeights.length){var O=new c.Float32BufferAttribute(4*g.skinWeights.length,4);w.setAttribute("skinWeight",O.copyVector4sArray(g.skinWeights))}return g.boundingSphere!==null&&(w.boundingSphere=g.boundingSphere.clone()),g.boundingBox!==null&&(w.boundingBox=g.boundingBox.clone()),w},toIndexedBufferGeometry:function(){var g=new c.BufferGeometry,w=new Float32Array(3*this.vertices.length);if(g.setAttribute("position",new c.BufferAttribute(w,3).copyVector3sArray(this.vertices)),0<this.normals.length){var S=new Float32Array(this.normals.length),E=new c.BufferAttribute(S,3).copyArray(this.normals);g.setAttribute("normal",E)}if(0<this.uvs.length&&0<this.uvs[0].length){var M=new Float32Array(2*this.uvs[0].length);g.setAttribute("uv",new c.BufferAttribute(M,2).copyArray(this.uvs[0]))}if(1<this.uvs.length&&0<this.uvs[1].length){var _=new Float32Array(2*this.uvs[1].length);g.setAttribute("uv2",new c.BufferAttribute(_,2).copyArray(this.uvs[1]))}if(0<this.colors.length){for(var C=[],I=0;I<this.colors.length;I++)C.push(new c.Color(this.colors[I]));var T=new Float32Array(3*C.length);g.setAttribute("color",new c.BufferAttribute(T,3).copyColorsArray(C))}else{for(var P=new Float32Array(3*this.vertices.length),A=0;A<3*this.vertices.length;A++)P[A]=1;g.setAttribute("color",new c.BufferAttribute(P,3))}if(0<this.faces.length){for(var R=[],L=[],N=0;N<this.faces.length;N++){L.push(this.faces[N].a,this.faces[N].b,this.faces[N].c);var x=this.faces[N].vertexColors;if(x.length===3)R.push(x[0],x[1],x[2]);else{var O=this.faces[N].color;R.push(O,O,O)}}g.setIndex(L),g.groups=this.computeGroups()}if(0<this.morphTargets.length){for(var B=[],D=[],z=0,U=this.morphTargets.length;z<U;z++){var H=this.morphTargets[z],Y=new c.Float32BufferAttribute(3*H.vertices.length,3);if(Y.name=H.name,B.push(Y.copyVector3sArray(H.vertices)),H.normals){var ie=new c.Float32BufferAttribute(3*H.normals.length,3);ie.name=H.name,D.push(ie.copyVector3sArray(H.normals))}}g.morphAttributes.position=B,g.morphAttributes.normal=D}if(0<this.skinIndices.length){var ae=new c.Float32BufferAttribute(4*this.skinIndices.length,4);g.setAttribute("skinIndex",ae.copyVector4sArray(this.skinIndices))}if(0<this.skinWeights.length){var ee=new c.Float32BufferAttribute(4*this.skinWeights.length,4);g.setAttribute("skinWeight",ee.copyVector4sArray(this.skinWeights))}return this.boundingSphere!==null&&(g.boundingSphere=this.boundingSphere.clone()),this.boundingBox!==null&&(g.boundingBox=this.boundingBox.clone()),g},computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(g){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(g)},dispose:function(){this.dispatchEvent({type:"dispose"})}}),m.createBufferGeometryFromObject=function(v){var g=new c.BufferGeometry,w=v.geometry;if(v.isPoints||v.isLine){var S=new c.Float32BufferAttribute(3*w.vertices.length,3),E=new c.Float32BufferAttribute(3*w.colors.length,3);if(g.setAttribute("position",S.copyVector3sArray(w.vertices)),g.setAttribute("color",E.copyColorsArray(w.colors)),w.lineDistances&&w.lineDistances.length===w.vertices.length){var M=new c.Float32BufferAttribute(w.lineDistances.length,1);g.setAttribute("lineDistance",M.copyArray(w.lineDistances))}w.boundingSphere!==null&&(g.boundingSphere=w.boundingSphere.clone()),w.boundingBox!==null&&(g.boundingBox=w.boundingBox.clone())}else v.isMesh&&(g=w.toBufferGeometry());return g};class d{constructor(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(g){var w,S,E=[],M=void 0,_=g.faces;for(S=0;S<_.length;S++){var C=_[S];C.materialIndex!==M&&(M=C.materialIndex,w!==void 0&&(w.count=3*S-w.start,E.push(w)),w={start:3*S,materialIndex:M})}w!==void 0&&(w.count=3*S-w.start,E.push(w)),this.groups=E}fromGeometry(g){var w,S=g.faces,E=g.vertices,M=g.faceVertexUvs,_=M[0]&&0<M[0].length,C=M[1]&&0<M[1].length,I=g.morphTargets,T=I.length;if(0<T){w=[];for(var P=0;P<T;P++)w[P]={name:I[P].name,data:[]};this.morphTargets.position=w}var A,R=g.morphNormals,L=R.length;if(0<L){A=[];for(var N=0;N<L;N++)A[N]={name:R[N].name,data:[]};this.morphTargets.normal=A}var x=g.skinIndices,O=g.skinWeights,B=x.length===E.length,D=O.length===E.length;0<E.length&&S.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var z,U=0;U<S.length;U++){z=S[U],this.vertices.push(E[z.a],E[z.b],E[z.c]);var H=z.vertexNormals;if(H.length===3)this.normals.push(H[0],H[1],H[2]);else{var Y=z.normal;this.normals.push(Y,Y,Y)}var ie=z.vertexColors;if(ie.length===3)this.colors.push(ie[0],ie[1],ie[2]);else{var ae=z.color;this.colors.push(ae,ae,ae)}if(_===!0){var ee=M[0][U];ee===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",U),this.uvs.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs.push(ee[0],ee[1],ee[2])}if(C===!0){var oe=M[1][U];oe===void 0?(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",U),this.uvs2.push(new c.Vector2,new c.Vector2,new c.Vector2)):this.uvs2.push(oe[0],oe[1],oe[2])}for(var j,K=0;K<T;K++)j=I[K].vertices,w[K].data.push(j[z.a],j[z.b],j[z.c]);for(var $,re=0;re<L;re++)$=R[re].vertexNormals[U],A[re].data.push($.a,$.b,$.c);B&&this.skinIndices.push(x[z.a],x[z.b],x[z.c]),D&&this.skinWeights.push(O[z.a],O[z.b],O[z.c])}return this.computeGroups(g),this.verticesNeedUpdate=g.verticesNeedUpdate,this.normalsNeedUpdate=g.normalsNeedUpdate,this.colorsNeedUpdate=g.colorsNeedUpdate,this.uvsNeedUpdate=g.uvsNeedUpdate,this.groupsNeedUpdate=g.groupsNeedUpdate,g.boundingSphere!==null&&(this.boundingSphere=g.boundingSphere.clone()),g.boundingBox!==null&&(this.boundingBox=g.boundingBox.clone()),this}}class b{constructor(g,w,S,E,M){var _=5<arguments.length&&arguments[5]!==void 0?arguments[5]:0;this.a=g,this.b=w,this.c=S,this.normal=E&&E.isVector3?E:new c.Vector3,this.vertexNormals=Array.isArray(E)?E:[],this.color=M&&M.isColor?M:new c.Color,this.vertexColors=Array.isArray(M)?M:[],this.materialIndex=_}clone(){return new this.constructor().copy(this)}copy(g){this.a=g.a,this.b=g.b,this.c=g.c,this.normal.copy(g.normal),this.color.copy(g.color),this.materialIndex=g.materialIndex;for(var w=0,S=g.vertexNormals.length;w<S;w++)this.vertexNormals[w]=g.vertexNormals[w].clone();for(var E=0,M=g.vertexColors.length;E<M;E++)this.vertexColors[E]=g.vertexColors[E].clone();return this}}},o=>{o.exports=TB},o=>{o.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg=="},(o,l)=>{l.augmentMorphColor=function(){return function(u){u.vertexShader=u.vertexShader.replace("#include <color_pars_vertex>",["varying vec3 vColor;","attribute vec3 morphColor0;","attribute vec3 morphColor1;"].join(`
|
|
3183
3183
|
`)),u.vertexShader=u.vertexShader.replace("#include <color_vertex>",["vColor.xyz = color.xyz;","#ifdef USE_MORPHTARGETS","vColor = morphColor0 * morphTargetInfluences[ 0 ];","vColor += morphColor1 * morphTargetInfluences[ 1 ];","#endif"].join(`
|
|
3184
|
-
`))}}},(o,l,u)=>{var c=u(4),f=u(5).createBufferGeometry,h=u(5).resolveURL,p=0,y=function(){return"pr"+p++},m=function(){this.isZincObject=!0,this.geometry=void 0,this.morph=void 0,this.group=new c.Group,this._lod=new(u(11)).LOD(this),this.groupName=void 0,this.timeEnabled=!1,this.morphColour=!1,this.inbuildTime=0,this.mixer=void 0,this.animationGroup=void 0,this.duration=6e3,this.clipAction=void 0,this.userData={},this.videoHandler=void 0,this.marker=void 0,this.markerNumber=void 0,this.markerUpdateRequired=!0,this.closestVertexIndex=-1,this.boundingBoxUpdateRequired=!0,this.cachedBoundingBox=new c.Box3,this.anatomicalId=void 0,this.region=void 0,this.animationClip=void 0,this.markerMode="inherited",this.uuid=y(),this._v1=new c.Vector3,this._v2=new c.Vector3,this._b1=new c.Box3,this.center=new c.Vector3,this.radius=0,this.visible=!0,this.drawRange=-1};m.prototype.setDuration=function(d){this.duration=d,this.clipAction&&this.clipAction.setDuration(this.duration)},m.prototype.getDuration=function(){return this.duration},m.prototype.setRegion=function(d){this.region=d},m.prototype.getRegion=function(){return this.region},m.prototype.getMorph=function(){var d=this._lod.getCurrentMorph();return d||this.morph},m.prototype.getGroup=function(){return this.group},m.prototype.setMorph=function(d){this.morph=d,this.group.add(this.morph);var b=this._lod.calculateDistance("far");this._lod.addLevel(d,b),this._lod.setMaterial(d.material)},m.prototype.checkTransparentMesh=function(){},m.prototype.setMesh=function(d,b,v){this.animationGroup=new c.AnimationObjectGroup(d),this.mixer=new c.AnimationMixer(this.animationGroup);var g=d.geometry;if(this.geometry=d.geometry,this.clipAction=void 0,g&&g.morphAttributes){var w=g.morphAttributes.position;w||(w=g.morphAttributes.color?g.morphAttributes.color:g.morphAttributes.normal),w&&(this.animationClip=c.AnimationClip.CreateClipsFromMorphTargetSequences(w,10,!0),this.animationClip&&this.animationClip[0]!=null&&(this.clipAction=this.mixer.clipAction(this.animationClip[0]).setDuration(this.duration),this.clipAction.loop=c.loopOnce,this.clipAction.clampWhenFinished=!0,this.clipAction.play()))}this.timeEnabled=b,this.morphColour=v,d.userData=this,d.matrixAutoUpdate=!1,this.setMorph(d),this.checkTransparentMesh(),this.timeEnabled?this.setFrustumCulled(!1):this.morphColour&&(g.setAttribute("morphTarget0",g.getAttribute("position")),g.setAttribute("morphTarget1",g.getAttribute("position"))),this.boundingBoxUpdateRequired=!0},m.prototype.setName=function(d){this.groupName=d,this._lod.setName(d)},m.prototype.getCurrentTime=function(){if(this.clipAction){var d=this.clipAction.time/this.clipAction._clip.duration;return this.duration*d}return this.inbuildTime},m.prototype.setMorphTime=function(d){var b=!1;if(this.clipAction){var v=d/this.duration,g=this.clipAction._clip.duration,w=v*g;w!=this.clipAction.time&&(this.clipAction.time=w,b=!0),b&&this.isTimeVarying()&&this.mixer.update(0)}else{var S=d;S=d>this.duration?this.duration:0>d?0:d,S!=this.inbuildTime&&(this.inbuildTime=S,b=!0)}b&&(this.boundingBoxUpdateRequired=!0,this._lod.updateMorphColorAttribute(!0),this.timeEnabled&&(this.markerUpdateRequired=!0))},m.prototype.isTimeVarying=function(){return!!(this.timeEnabled||this.morphColour)},m.prototype.getVisibility=function(){return this.visible},m.prototype.setVisibility=function(d){d!==this.visible&&(this.visible=d,this.group.visible=d,this.region&&(this.region.pickableUpdateRequired=!0))},m.prototype.setAlpha=function(d){var b=this._lod._material,v=!1;1>d&&(v=!0),b.opacity=d,b.transparent=v,this.checkTransparentMesh()},m.prototype.setFrustumCulled=function(d){this._lod.setFrustumCulled(d)},m.prototype.setVertexColors=function(d){this._lod.setVertexColors(d)},m.prototype.getColour=function(){return this._lod._material?this._lod._material.color:void 0},m.prototype.setColour=function(d){this._lod.setColour(d)},m.prototype.getColourHex=function(){return!this.morphColour&&this._lod._material&&this._lod._material.color?this._lod._material.color.getHexString():void 0},m.prototype.setColourHex=function(d){this._lod._material.color.setHex(d),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.color.setHex(d)},m.prototype.setEmissiveRGB=function(d){this._lod._material&&this._lod._material.emissive&&this._lod._material.emissive.setRGB(...d),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.emissive.setRGB(...d)},m.prototype.setMaterial=function(d){this._lod.setMaterial(d)},m.prototype.getClosestVertexIndex=function(){var d=-1,b=this.getMorph();if(b&&b.geoemtry){var v=b.geometry.attributes.position;if(this._b1.setFromBufferAttribute(v),this._b1.getCenter(this._v1),v)for(var g=-1,w=0,S=0;S<v.count;S++)this._v2.fromArray(v.array,3*S),w=this._v2.distanceTo(this._v1),g==-1?g=w:g>w&&(g=w,d=S)}return d},m.prototype.getClosestVertex=function(d){var b=new c.Vector3;this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex());var v=this.getMorph();if(v&&v.geometry&&0<=this.closestVertexIndex){var g=v.morphTargetInfluences,w=v.geometry.morphAttributes;if(g&&w&&w.position){for(var S=!1,E=0;E<g.length;E++)0<g[E]&&(S=!0,this._v1.fromArray(w.position[E].array,3*this.closestVertexIndex),b.add(this._v1.multiplyScalar(g[E])));if(S)return d?b.applyMatrix4(v.matrixWorld):b}else return b.fromArray(v.geometry.attributes.position.array,3*this.closestVertexIndex),d?b.applyMatrix4(v.matrixWorld):b}return this.getBoundingBox(),b.copy(this.center),d?b.applyMatrix4(this.morph.matrixWorld):b},m.prototype.getBoundingBox=function(){if(this.visible){var d=this._lod.getCurrentMorph();if(d&&d.visible)return this.boundingBoxUpdateRequired&&(u(5).getBoundingBox(d,this.cachedBoundingBox,this._b1,this._v1,this._v2),this.cachedBoundingBox.getCenter(this.center),this.radius=this.center.distanceTo(this.cachedBoundingBox.max),this.boundingBoxUpdateRequired=!1),this.cachedBoundingBox}},m.prototype.dispose=function(){this._lod.dispose(),this.animationGroup=void 0,this.mixer=void 0,this.morph=void 0,this.group=void 0,this.clipAction=void 0,this.groupName=void 0},m.prototype.markerIsRequired=function(d){return!!(this.visible&&(this.markerMode==="on"||d&&d.displayMarkers&&this.markerMode==="inherited"))},m.prototype.updateMarker=function(d,b){if(d==!1&&this.markerIsRequired(b)){var v=b.ndcToBeUpdated;if(this.groupName){if(this.marker||(this.marker=new(u(14)).Marker(this),this.markerUpdateRequired=!0),this.markerUpdateRequired){var g=this.getClosestVertex(!1);g&&(this.marker.setPosition(g.x,g.y,g.z),this.markerUpdateRequired=!1)}this.marker.isEnabled()||(b.markersList&&!(this.marker.uuid in b.markersList)&&(v=!0,b.markersList[this.marker.uuid]=this.marker),this.marker.enable(),this.group.add(this.marker.morph)),this.marker.setNumber(this.markerNumber),this.markerImgURL?this.marker.loadUserSprite(this.markerImgURL):this.marker.setDefaultSprite(),b&&b.camera&&(v||b.markerCluster.markerUpdateRequired)&&(this.marker.updateNDC(b.camera.cameraObject),b.markerCluster.markerUpdateRequired=!0)}}else this.marker&&this.marker.isEnabled()&&(this.marker.disable(),this.group.remove(this.marker.morph),b.markersList&&this.marker.uuid in b.markersList&&(b.markerCluster.markerUpdateRequired=!0,delete b.markersList[this.marker.uuid])),this.markerUpdateRequired=!0},m.prototype.processMarkerVisual=function(d,b){this.marker&&this.marker.isEnabled()&&this.marker.updateVisual(d,b)},m.prototype.initiateMorphColor=function(){this.morphColour==1&&this._lod.updateMorphColorAttribute(!1)},m.prototype.setRenderOrder=function(d){this._lod.setRenderOrder(d)},m.prototype.getClosestVertexDOMElementCoords=function(d){if(d&&d.camera){var b=!0,v=this.getClosestVertex(!0);return v.project(d.camera),v.z=Math.min(Math.max(v.z,0),1),(1<v.x||-1>v.x||1<v.y||-1>v.y)&&(b=!1),d.getZincCameraControls().getRelativeCoordsFromNDC(v.x,v.y,v),{position:v,inView:b}}},m.prototype.setMarkerMode=function(d,b){d!==this.markerMode&&(this.markerMode=d==="on"||d==="off"?d:"inherited",this.region&&(this.region.pickableUpdateRequired=!0)),b&&(this.markerNumber=b.number,this.markerImgURL=b.imgURL)},m.prototype.render=function(d,b,v,g){if(this.visible&&!(this.timeEnabled&&b)&&this._lod.update(v,this.center),b==!0){if(this.clipAction&&this.isTimeVarying())this.mixer.update(d);else{var w=this.inbuildTime+d;w>this.duration&&(w-=this.duration),this.inbuildTime=w}this.visible&&d!=0&&(this.boundingBoxUpdateRequired=!0,this.morphColour==1&&this._lod.updateMorphColorAttribute(!0))}this.updateMarker(b,g)},m.prototype.addLOD=function(d,b,v,g,w){this._lod.addLevelFromURL(d,b,v,g,w)},m.prototype.addVertices=function(d){var b=this.getMorph(),v=void 0;if(!b)v=f(500,d),this.drawRange=d.length;else if(-1<this.drawRange){var g=b.geometry.getAttribute("position");d.forEach(w=>{g.setXYZ(this.drawRange,w[0],w[1],w[2]),++this.drawRange}),g.needsUpdate=!0,b.geometry.setDrawRange(0,this.drawRange),b.geometry.computeBoundingBox(),b.geometry.computeBoundingSphere(),v=b.geoemtry,this.boundingBoxUpdateRequired=!0}return v},m.prototype.setPosition=function(d,b,v){var g=this.getGroup();g&&(g.position.set(d,b,v),g.updateMatrix(),this.boundingBoxUpdateRequired=!0)},m.prototype.loadAdditionalSources=function(d){d.load(h(filename),meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,void 0,void 0,void 0,void 0,finishCallback),this.onProgress(filename),this.onError(finishCallback))},m.prototype.setScaleAll=function(d){var b=this.getGroup();b&&(b.scale.set(d,d,d),b.updateMatrix(),this.boundingBoxUpdateRequired=!0)},l.ZincObject=m},(o,l,u)=>{var c=u(4),f=u(5).updateMorphColorAttribute,h=u(5).toBufferGeometry,p=function(y){this.levels=[],this._currentLevel=0,this._renderOrder=1,this._material=void 0,this._secondaryMaterial=void 0,this._loader=void 0,this._parent=y,this.addLevel=(d,b)=>{if(d){var v,g=Math.abs(b);for(v=0;v<this.levels.length&&!(g<this.levels[v].distance);v++);this.levels.splice(v,0,{distance:g,morph:d,loaded:!0,loading:!1,url:""}),d.renderOrder=this._renderOrder}},this.levelLoaded=(d,b)=>{if(d){for(var v=Math.abs(b),g=0;g<this.levels.length;g++)if(v===this.levels[g].distance){this._parent.group.add(d),this.levels[g].morph=d,this.levels[g].loaded=!0,this.levels[g].loading=!1;break}this.checkTransparentMesh()}},this.addLevelFromURL=(d,b,v,g,w)=>{this._loader=d;var S,E=this.calculateDistance(b);for(S=0;S<this.levels.length&&!(E<this.levels[S].distance);S++);this.levels.splice(S,0,{distance:E,morph:void 0,loaded:!1,loading:!1,url:v,index:g}),w&&this.loadLevel(S)},this.loadLevel=d=>{var b=this.levels[d];return b.morph||b.loaded||b.loading||(b.loading=!0,this._loader.load(b.url,this.lodLoader(b.distance),void 0,void 0,{index:b.index})),b.morph===void 0},this.calculateDistance=function(d){this._parent.getBoundingBox();var b=this._parent.radius,v=0;return d==="far"?v=4.5*b:d==="medium"?v=2.5*b:d=="close"&&(v=0),v},this.containsLevels=()=>!!(this.levels&&1<this.levels.length),this.checkTransparentMesh=()=>{var d=this.levels[this._currentLevel];this._material&&(this._material.transparent?(!this._secondaryMaterial&&(this._secondaryMaterial=this._material.clone(),this._secondaryMaterial.side=c.FrontSide),this._secondaryMaterial.opacity=this._material.opacity,this._secondaryMaterial.emissive&&this._secondaryMaterial.emissive.copy(this._material.emissive),this._secondaryMaterial.needsUpdate=!0,!d.secondaryMesh&&(d.secondaryMesh=new c.Mesh(d.morph.geometry,this._secondaryMaterial),d.secondaryMesh.renderOrder=d.morph.renderOrder+1,d.secondaryMesh.userData=d.morph.userData,d.secondaryMesh.name=d.morph.name),this._material.side=c.BackSide,this._material.needsUpdate=!0,!d.secondaryMesh.parent&&(d.morph.add(d.secondaryMesh),this._parent.animationGroup&&this._parent.animationGroup.add(d.secondaryMesh))):(d.secondaryMesh&&(d.morph.remove(d.secondaryMesh),this._parent.animationGroup&&(this._parent.animationGroup.uncache(d.secondaryMesh),this._parent.animationGroup.remove(d.secondaryMesh))),this._material.side=c.DoubleSide,this._material.needsUpdate=!0))},this.dispose=()=>{this.levels.forEach(d=>{d.morph&&d.morph.geometry&&d.morph.geometry.dispose()}),this._material&&this._material.dispose(),this._secondaryMaterial&&this._secondaryMaterial.dispose()},this.getCurrentLevel=()=>this._currentLevel,this.getCurrentMorph=()=>{var d=this.levels[this._currentLevel];return d&&d.morph?d.morph:this._parent.morph},this.lodLoader=function(d){return b=>{var v=this._material,g={localTimeEnabled:this._parent.timeEnabled,localMorphColour:this._parent.morphColour},w=h(b,g),S=void 0;this._parent.isGeometry?S=new c.Mesh(w,v):this._parent.isLines&&(S=new(u(12)).LineSegments(w,v)),S.userData=this._parent,S.renderOrder=this._renderOrder,b.dispose(),this.levelLoaded(S,d)}},this.updateMorphColorAttribute=d=>{if(this._material&&(this._material.vertexColors==c.VertexColors||this._material.vertexColors==!0))if(d){var b=this.getCurrentMorph();f(b.geometry,b)}else this.levels.forEach(v=>{v.morph&&v.morph.geometry&&f(v.morph.geometry,v.morph)})},this.setColour=d=>{this._material.color=d,this._secondaryMaterial&&(this._secondaryMaterial.color=d),m()},this.setFrustumCulled=d=>{this.levels.forEach(b=>{b.morph&&(b.morph.frustumCulled=d),b.secondaryMesh&&(b.secondaryMesh.frustumCulled=d)})},this.setMaterial=d=>{d&&(!this._material||this._material.id!==d.id)&&(this._material=d,this._secondaryMaterial&&this._secondaryMaterial.dispose(),this._secondaryMaterial=d.clone(),this._secondaryMaterial.side=c.FrontSide,this._secondaryMaterial.transparent=!0,this.levels.forEach(b=>{b.morph&&(b.morph.material=this._material,b.morph.geometry&&(b.morph.geometry.colorsNeedUpdate=!0)),b.secondaryMesh&&(b.secondaryMesh.material=this._secondaryMaterial)}))},this.setName=d=>{this.levels.forEach(b=>{b.morph&&(b.morph.name=d),b.secondaryMesh&&(b.secondaryMesh.name=d)})},this.setRenderOrder=d=>{this._renderOrder=d,this.levels.forEach(b=>{b.morph&&(b.morph.renderOrder=d),b.secondaryMesh&&(b.secondaryMesh.renderOrder=d)})},this.setVertexColors=d=>{this._material.vertexColors=d,m(),this._secondaryMaterial&&(this._secondaryMaterial.vertexColors=d)},this.update=(d,b)=>{var v=this.levels;if(1<v.length){var g,w,S=d.cameraObject.position.distanceTo(b),E=-1,M=-1;for(g=0,w=v.length;g<w&&S>=v[g].distance;g++)v[g].morph?(-1<E&&v[E].morph&&(v[E].morph.visible=!1),E=g,v[g].morph.visible=!0,M=-1):M=g;for(-1<M&&this.loadLevel(M);g<w;g++)v[g].morph&&(-1<E?v[g].morph.visible=!1:(v[g].morph.visible=!0,E=g));this._currentLevel!=E&&(this._currentLevel=E,this.checkTransparentMesh())}},this.toggleMarker=(d,b)=>{this.levels.forEach(v=>{v.morph&&(b?v.morph.add(d):v.morph.remove(d))})};var m=()=>{this.levels.forEach(d=>{d.morph&&d.morph.geometry&&(d.morph.geometry.colorsNeedUpdate=!0)})}};l.LOD=p},(o,l,u)=>{u.r(l),u.d(l,{LineSegments:()=>y});var c=u(13),f=u(4),h=new f.Vector3,p=new f.Vector3;class y extends c.Line{constructor(d,b){super(d,b),this.type="LineSegments"}computeLineDistances(){var d=this.geometry;if(!d.isBufferGeometry)d.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(d.index===null){for(var b=d.attributes.position,v=[],g=0,w=b.count;g<w;g+=2)h.fromBufferAttribute(b,g),p.fromBufferAttribute(b,g+1),v[g]=g==0?0:v[g-1],v[g+1]=v[g]+h.distanceTo(p);d.setAttribute("lineDistance",new f.Float32BufferAttribute(v,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}y.prototype.isLineSegments=!0},(o,l,u)=>{u.r(l),u.d(l,{Line:()=>w});var c=u(4),f=new c.Vector3,h=new c.Vector3,p=new c.Matrix4,y=new c.Ray,m=new c.Sphere,d=new c.Vector3,b=new c.Vector3,v=new c.Vector3,g=new c.Vector3;class w extends c.Object3D{constructor(){var M=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,_=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.LineBasicMaterial;super(),this.type="Line",this.geometry=M,this.material=_,this.updateMorphTargets()}copy(M){return super.copy(M),this.material=M.material,this.geometry=M.geometry,this}computeLineDistances(){var M=this.geometry;if(!M.isBufferGeometry)M.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(M.index===null){for(var _=M.attributes.position,C=[0],I=1,T=_.count;I<T;I++)f.fromBufferAttribute(_,I-1),h.fromBufferAttribute(_,I),C[I]=C[I-1],C[I]+=f.distanceTo(h);M.setAttribute("lineDistance",new c.Float32BufferAttribute(C,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(M,_){var C=this.geometry,I=this.matrixWorld,T=M.params.Line.threshold,P=C.drawRange,A=C.morphAttributes.position;if(C.boundingSphere===null&&C.computeBoundingSphere(),m.copy(C.boundingSphere),m.applyMatrix4(I),m.radius+=T,M.ray.intersectsSphere(m)!==!1){p.copy(I).invert(),y.copy(M.ray).applyMatrix4(p);var R=T/((this.scale.x+this.scale.y+this.scale.z)/3),L=R*R,N=new c.Vector3,x=new c.Vector3,O=new c.Vector3,B=new c.Vector3,D=this.isLineSegments?2:1;if(C.isBufferGeometry){var z=C.index,U=C.attributes,H=U.position;if(z!==null)for(var Y=Math.max(0,P.start),ie=Math.min(z.count,P.start+P.count),ae=Y;ae<ie-1;ae+=D){var ee=z.getX(ae),oe=z.getX(ae+1);S(N,x,this,H,A,ee,oe);var j=y.distanceSqToSegment(N,x,B,O);if(!(j>L)){B.applyMatrix4(this.matrixWorld);var K=M.ray.origin.distanceTo(B);K<M.near||K>M.far||_.push({distance:K,point:O.clone().applyMatrix4(this.matrixWorld),index:ae,face:null,faceIndex:null,object:this})}}else for(var $=Math.max(0,P.start),re=Math.min(H.count,P.start+P.count),G=$;G<re-1;G+=D){S(N,x,this,H,A,G,G+1);var W=y.distanceSqToSegment(N,x,B,O);if(!(W>L)){B.applyMatrix4(this.matrixWorld);var F=M.ray.origin.distanceTo(B);F<M.near||F>M.far||_.push({distance:F,point:O.clone().applyMatrix4(this.matrixWorld),index:G,face:null,faceIndex:null,object:this})}}}else C.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var M=this.geometry;if(M.isBufferGeometry){var _=M.morphAttributes,C=Object.keys(_);if(0<C.length){var I=_[C[0]];if(I!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var T,P=0,A=I.length;P<A;P++)T=I[P].name||P+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[T]=P}}}else{var R=M.morphTargets;R!==void 0&&0<R.length&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function S(E,M,_,C,I,T,P){E.fromBufferAttribute(C,T),M.fromBufferAttribute(C,P);var A=_.morphTargetInfluences;if(_.material.morphTargets&&I&&A){d.set(0,0,0),b.set(0,0,0);for(var R=0,L=I.length;R<L;R++){var N=A[R],x=I[R];N!==0&&(v.fromBufferAttribute(x,T),g.fromBufferAttribute(x,P),d.addScaledVector(v.sub(E),N),b.addScaledVector(g.sub(M),N))}E.add(d),M.add(b)}}w.prototype.isLine=!0},(o,l,u)=>{var c=u(4),f=new Image(128,128);f.src=u(15);var h=new c.Texture;h.image=f,h.needsUpdate=!0;var p=[.02,.03,1],y=new c.SpriteMaterial({map:h,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),m=u(5).createNewSpriteText,d=function(b){u(10).ZincObject.call(this),this.texture=h;var v=void 0,g=void 0,w=void 0,S=void 0,E=void 0,M=!0;this.morph=new c.Group,this.group=this.morph,this.parent=b,this.isMarker=!0;var _=!1;this.ndc=new c.Vector3;var C=void 0,I=void 0,T=()=>{v=new c.Sprite(y),v.center.set(.5,0),this.morph.add(v),this.morph.position.set(0,0,0),this.morph.renderOrder=1e4,v.scale.set(p[0],p[1],p[2]),v.userData=this};this.updateVisual=(P,A)=>{var R=1,L=0;P!==A&&(L=1-(this.ndc.z-P)/(A-P),R=.6+.4*L),this.setSpriteSize(R)},this.updateNDC=P=>(this.ndc.copy(this.morph.position),this.ndc.project(P),this.ndc.z=Math.min(Math.max(this.ndc.z,0),1),this.ndc),this.setPosition=(P,A,R)=>{this.morph.position.set(P,A,R)},this.setSpriteSize=P=>{v.scale.set(.015,.02,1),v.scale.multiplyScalar(P)},this.setUserSprite=()=>{S&&(this.morph.add(S),M&&(this.morph.remove(v),I&&this.morph.remove(I),M=!1))},this.setImageForUserSprite=(P,A)=>{S&&(this.morph.remove(S),S=void 0),g&&g.dispose(),w&&w.dispose(),g=new c.Texture,g.image=P,g.needsUpdate=!0,w=new c.SpriteMaterial({map:g,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),A||(A=[.05,.05,1]),S=new c.Sprite(w),S.center.set(.5,0),S.scale.set(A[0],A[1],A[2]),S.userData=this,this.setUserSprite()},this.setDefaultSprite=()=>{M||(M=!0,this.morph.add(v),S&&this.morph.remove(S),I&&this.morph.add(I))},this.loadUserSprite=(P,A)=>{if(P)if(P!==E){E=P;var R=new Image(128,128);R.crossOrigin="anonymous",R.onload=()=>{this.setImageForUserSprite(R,A)},R.src=P}else this.setUserSprite()},this.dispose=()=>{this.morph&&this.morph.clear(),v&&(v.clear(),v=void 0),I&&(I.material.map.dispose(),I.material.dispose(),I=void 0)},this.isEnabled=()=>_,this.setNumber=P=>{(!P||C!=P)&&I&&(this.morph.remove(I),I.material.map.dispose(),I.material.dispose(),I=void 0),!I&&P&&(I=m(P,.012,"black","Asap",120,700),this.morph.add(I)),C=P},this.getNumber=()=>C||1,this.setVisibility=function(P){P!==this.visible&&(this.visible=P,this.group.visible=P,this.parent.region&&(this.parent.region.pickableUpdateRequired=!0))},this.enable=()=>{_=!0,this.morph.visible=!0,this.visible=!0},this.disable=()=>{_=!1,this.morph.visible=!1,this.visible=!1},T()};d.prototype=Object.create(u(10).ZincObject.prototype),l.Marker=d},o=>{o.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMzY1IiBoZWlnaHQ9IjU2MCIgdmlld0JveD0iMCAwIDM2NSA1NjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGRlc2M+Q3JlYXRlZCB3aXRoIEZhYnJpYy5qcyA1LjIuNDwvZGVzYz4NCjxkZWZzPg0KPC9kZWZzPg0KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCAwKSIgaWQ9IjgwOGVkMjgzLTI1MjQtNDQwZi04OGFlLTNiZGI0N2JiNTc0OSIgID4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgMTgyLjUgMjgwKSIgaWQ9ImRiMzA0MTNkLTViZmYtNGI5OC1hYjU5LTQ2NDQ5N2VlMTk5ZSIgID4NCjxyZWN0IHN0eWxlPSJzdHJva2U6IG5vbmU7IHN0cm9rZS13aWR0aDogMTsgc3Ryb2tlLWRhc2hhcnJheTogbm9uZTsgc3Ryb2tlLWxpbmVjYXA6IGJ1dHQ7IHN0cm9rZS1kYXNob2Zmc2V0OiAwOyBzdHJva2UtbGluZWpvaW46IG1pdGVyOyBzdHJva2UtbWl0ZXJsaW1pdDogNDsgZmlsbDogcmdiKDI1NSwyNTUsMjU1KTsgZmlsbC1ydWxlOiBub256ZXJvOyBvcGFjaXR5OiAxOyB2aXNpYmlsaXR5OiBoaWRkZW47IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB4PSItMTgyLjUiIHk9Ii0yODAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjM2NSIgaGVpZ2h0PSI1NjAiIC8+DQo8L2c+DQo8ZyB0cmFuc2Zvcm09Im1hdHJpeCgwIDAgMCAwIDAgOTcuNSkiICA+DQo8ZyBzdHlsZT0iIiAgID4NCjwvZz4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCA5Ny41KSIgID4NCjxnIHN0eWxlPSIiICAgPg0KPC9nPg0KPC9nPg0KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMC45OSAwIDAgMC45OSAxODIuNSAyODApIiAgPg0KPGcgc3R5bGU9IiIgdmVjdG9yLWVmZmVjdD0ibm9uLXNjYWxpbmctc3Ryb2tlIiAgID4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMjU1LDI1NSwyNTUpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IHZpc2liaWxpdHk6IGhpZGRlbjsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIHg9Ii01NDAiIHk9Ii01NDAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjEwODAiIGhlaWdodD0iMTA4MCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHBhdGggc3R5bGU9InN0cm9rZTogcmdiKDAsMCwwKTsgc3Ryb2tlLXdpZHRoOiAwOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMCw4OSwxMTYpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE4Mi45LCAtMjc5Ljg1KSIgZD0iTSAxODIuOSA1NTEuNyBDIDE4Mi45IDU1MS44MDAwMDAwMDAwMDAxIDE4My4xIDU1MiAxODMuMSA1NTIgQyAxODMuMSA1NTIgMzU4LjMgMjgzIDM1OC4zIDE5NC42IEMgMzU4LjMgNjQuNSAyNjkuNSA3LjkwMDAwMDAwMDAwMDAwNiAxODIuOSA3LjY5OTk5OTk5OTk5OTk4OSBDIDk2LjMgNy45IDcuNSA2NC41IDcuNSAxOTQuNiBDIDcuNSAyODMgMTgyLjggNTUyIDE4Mi44IDU1MiBDIDE4Mi44IDU1MiAxODIuOSA1NTEuNyAxODIuOSA1NTEuNyB6IE0gMTIyLjIgMTg3LjIgQyAxMjIuMiAxNTMuNiAxNDkuNCAxMjYuMzk5OTk5OTk5OTk5OTkgMTgzIDEyNi4zOTk5OTk5OTk5OTk5OSBDIDIxNi42IDEyNi4zOTk5OTk5OTk5OTk5OSAyNDMuOCAxNTMuNiAyNDMuOCAxODcuMiBDIDI0My44IDIyMC43OTk5OTk5OTk5OTk5OCAyMTYuNSAyNDggMTgyLjkgMjQ4IEMgMTQ5LjQgMjQ4IDEyMi4yIDIyMC44IDEyMi4yIDE4Ny4yIHoiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMy44MiAwIDAgMy44MiAwIC0xMDAuNzcpIiAgPg0KPGNpcmNsZSBzdHlsZT0ic3Ryb2tlOiByZ2IoMCwwLDApOyBzdHJva2Utd2lkdGg6IDA7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGZpbGw6IHJnYigyNTUsMjU1LDI1NSk7IGZpbGwtcnVsZTogbm9uemVybzsgb3BhY2l0eTogMTsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIGN4PSIwIiBjeT0iMCIgcj0iMzUiIC8+DQo8L2c+DQo8L2c+DQo8L2c+DQo8L3N2Zz4="},(o,l,u)=>{var c=u(4),f=function(h,p,y,m){u(10).ZincObject.call(this);var d;p&&(d=p.clone(),d.vertexColors=c.FaceColors),this.id=y;var b=void 0,v=void 0;this.isGlyph=!0;var g=[0,0,0];this.fromMesh=w=>!!(w&&w.isMesh)&&(this.morph=w.clone(),this.morph.userData=this,this.group.add(this.morph),!0),h&&d&&this.fromMesh(new c.Mesh(h,d)),this.getGlyphset=function(){return m},this.setLabel=w=>{w&&(typeof w=="string"||w instanceof String)&&(v=w,this.morph&&(this.morph.name=w))},this.showLabel=w=>{b&&(g=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0),v&&(typeof v=="string"||v instanceof String)&&(b=new(u(17)).Label(v,w),b.setPosition(g[0],g[1],g[2]),this.group.add(b.getSprite()))},this.hideLabel=()=>{b&&(g=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0)},this.getLabel=()=>v,this.getMesh=()=>this.morph,this.setTransformation=(w,S,E,M)=>{this.morph&&(this.morph.matrix.elements[0]=S[0],this.morph.matrix.elements[1]=S[1],this.morph.matrix.elements[2]=S[2],this.morph.matrix.elements[3]=0,this.morph.matrix.elements[4]=E[0],this.morph.matrix.elements[5]=E[1],this.morph.matrix.elements[6]=E[2],this.morph.matrix.elements[7]=0,this.morph.matrix.elements[8]=M[0],this.morph.matrix.elements[9]=M[1],this.morph.matrix.elements[10]=M[2],this.morph.matrix.elements[11]=0,this.morph.matrix.elements[12]=w[0],this.morph.matrix.elements[13]=w[1],this.morph.matrix.elements[14]=w[2],this.morph.matrix.elements[15]=1,this.morph.matrixAutoUpdate=!1),g=[...w],b&&b.setPosition(w[0],w[1],w[2])},this.setColour=w=>{b&&b.setColour(w),this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.color=colour),this.geometry&&(this.geometry.colorsNeedUpdate=!0)},this.dispose=()=>{this.material&&this.material.dispose(),this.morph=void 0}};f.prototype=Object.create(u(10).ZincObject.prototype),l.Glyph=f},(o,l,u)=>{var c=u(7).default;l.Label=function(f,h){var p=f,y=void 0;y=h?new c(p,.015,h.getStyle()):new c(p,.015),y.fontFace="Asap",y.fontWeight=700,y.material.map.generateMipmaps=!1,y.material.sizeAttenuation=!1,y.center.x=-.05,y.center.y=0,this.getPosition=()=>y?[y.position.x,y.position.y,y.position.z]:[0,0,0],this.setPosition=(m,d,b)=>{y&&y.position.set(m,d,b)},this.setColour=m=>{y.color=m.getStyle()},this.setScale=m=>{y&&0<m&&y.scale.set(m,m,1)},this.dispose=()=>{y.dispose()},this.getSprite=()=>y,this.getString=()=>p}},(o,l,u)=>{var c=u(4),f=u(19).JSONLoader,h=function(){u(10).ZincObject.call(this);var p=[],y=void 0,m=void 0,d=void 0,b=void 0,v=void 0,g=void 0,w=void 0,S=0,E=0,M=[0,0,0],_=[0,0,0],C=[0,0,0],I="NONE";this.ready=!1;var T=!1,P=!1;this.isGlyphset=!0;var A=new c.Matrix4,R=new c.Color,L=new c.Color,N=new c.Box3,x=new c.Box3,O=new c.Box3,B=[],D=[],z=[],U=[],H=[],Y=[],ie=[];this.globalScale=1;for(var ae=0;8>ae;ae++)new c.Vector3;this.load=(G,W,F,X,J)=>{y=G.axis1,m=G.axis2,d=G.axis3,b=G.positions,v=G.scale,g=G.colors,w=G.label,T=G.metadata.MorphColours,P=G.metadata.MorphVertices,S=G.metadata.number_of_time_steps,I=G.metadata.repeat_mode,E=G.metadata.number_of_vertices,I=="AXES_2D"||I=="MIRROR"?E*=2:I=="AXES_3D"&&(E*=3),M=G.metadata.base_size,_=G.metadata.offset,C=G.metadata.scale_factors;var V=new f;this.geometry=new c.BufferGeometry;var k=new c.InstancedMesh(this.geometry,void 0,E);if(this.setMorph(k),X){var te=V.parse(W);re(F,J)(te.geometry,te.materials),te.geometry.dispose()}else V.crossOrigin="Anonymous",V.load(W,re(F,J))};var ee=(G,W,F,X,J,V)=>{if(I=="NONE"||I=="MIRROR"){for(var k,te=[0,0,0],se=[0,0,0],le=[0,0,0],fe=[0,0,0],we=[0,0,0],be=[0,0,0],de=[0,0,0],ye=[0,0,0],ne=[0,0,0],he=0;3>he;he++)k=0>J[he]?-1:1,te[he]=(k*M[he]+J[he]*C[he])*this.globalScale;for(var he=0;3>he;he++)se[he]=W[he]*te[0],le[he]=F[he]*te[1],fe[he]=X[he]*te[2],we[he]=G[he]+_[0]*se[he]+_[1]*le[he]+_[2]*fe[he],I=="MIRROR"&&(be[he]=-se[he],de[he]=-le[he],ye[he]=-fe[he],ne[he]=we[he],0>J[0]&&(we[he]-=se[he],ne[he]-=be[he]));0>fe[0]*(se[1]*le[2]-se[2]*le[1])+fe[1]*(se[2]*le[0]-se[0]*le[2])+fe[2]*(se[0]*le[1]-se[1]*le[0])&&(fe[0]=-fe[0],fe[1]=-fe[1],fe[2]=-fe[2]),V[0]=[we,se,le,fe],I=="MIRROR"&&(0>ye[0]*(be[1]*de[2]-be[2]*de[1])+ye[1]*(be[2]*de[0]-be[0]*de[2])+ye[2]*(be[0]*de[1]-be[1]*de[0])&&(ye[0]=-ye[0],ye[1]=-ye[1],ye[2]=-ye[2]),V[1]=[ne,be,de,ye])}else if(I=="AXES_2D"||I=="AXES_3D"){for(var k,me=[0,0,0],Re=[0,0,0],he=0;3>he;he++)k=0>J[he]?-1:1,me[he]=(k*M[0]+J[he]*C[0])*this.globalScale;for(var he=0;3>he;he++)Re[he]=G[he]+_[0]*me[0]*W[he]+_[1]*me[1]*F[he]+_[2]*me[2]*X[he];for(var Te=glyph_repeat_mode=="AXES_2D"?2:3,De=0;De<Te;De++){var Ye=void 0,ze=void 0,st=J[De],Ce=[0,0,0],He=[0,0,0],Ge=[0,0,0];De==0?(Ye=W,ze=F):De==1?(Ye=F,ze=glyph_repeat_mode=="AXES_2D"?W:X):(Ye=X,ze=W);var Ot=(M[0]+st*C[0])*this.globalScale;Ce[0]=Ye[0]*Ot,Ce[1]=Ye[1]*Ot,Ce[2]=Ye[2]*Ot,Ge[0]=Ce[1]*ze[2]-ze[1]*Ce[2],Ge[1]=Ce[2]*ze[0]-ze[2]*Ce[0],Ge[2]=Ce[0]*ze[1]-Ce[1]*ze[0];var Nt=Math.sqrt(Ge[0]*Ge[0]+Ge[1]*Ge[1]+Ge[2]*Ge[2]);if(0<Nt){var mt=(M[2]+st*C[2])*this.globalScale/Nt;I=="AXES_2D"&&0<De&&(mt*=-1),Ge[0]*=mt,Ge[1]*=mt,Ge[2]*=mt}if(He[0]=Ge[1]*Ce[2]-Ce[1]*Ge[2],He[1]=Ge[2]*Ce[0]-Ce[2]*Ge[0],He[2]=Ge[0]*Ce[1]-Ge[1]*Ce[0],Nt=Math.sqrt(He[0]*He[0]+He[1]*He[1]+He[2]*He[2]),0<Nt){var xt=(M[1]+st*C[1])*this.globalScale/Nt;He[0]*=xt,He[1]*=xt,He[2]*=xt}V[De]=[Re,Ce,He,Ge]}}return V},oe=(G,W,F,X,J)=>{var V=1;I=="AXES_2D"||I=="MIRROR"?V=2:I=="AXES_3D"&&(V=3);var k=G.length/3,te=0;ie.length=V;for(var se=0;se<k;se++){var le=3*se,fe=[G[le],G[le+1],G[le+2]],we=[W[le],W[le+1],W[le+2]],be=[F[le],F[le+1],F[le+2]],de=[X[le],X[le+1],X[le+2]],ye=[J[le],J[le+1],J[le+2]],ne=ee(fe,we,be,de,ye,ie);if(ne.length==V)for(var he=0;he<V;he++){A.elements[0]=ne[he][1][0],A.elements[1]=ne[he][1][1],A.elements[2]=ne[he][1][2],A.elements[3]=0,A.elements[4]=ne[he][2][0],A.elements[5]=ne[he][2][1],A.elements[6]=ne[he][2][2],A.elements[7]=0,A.elements[8]=ne[he][3][0],A.elements[9]=ne[he][3][1],A.elements[10]=ne[he][3][2],A.elements[11]=0,A.elements[12]=ne[he][0][0],A.elements[13]=ne[he][0][1],A.elements[14]=ne[he][0][2],A.elements[15]=1,this.morph.setMatrixAt(te,A);var me=p[te];me&&me.setTransformation(ne[he][0],ne[he][1],ne[he][2],ne[he][3]),te++}}this.morph.instanceMatrix.needsUpdate=!0},j=G=>{var W=1;I=="AXES_2D"||I=="MIRROR"?W=2:I=="AXES_3D"&&(W=3);for(var F,X=G.length,J=0,V=0;V<X;V++){F=G[V];for(var k=0;k<W;k++){R.setHex(F),this.morph.setColorAt(J,R);var te=p[J];te&&te.setColour(R),J++}}this.morph.instanceColor.needsUpdate=!0},K=()=>{var G=B,W=D,F=z,X=U,J=H,V=Y,k=this.inbuildTime/this.duration*(S-1),te=Math.floor(k),se=1-(k-te),le=Math.ceil(k);if(P){var fe=b[te.toString()],we=b[le.toString()],be=y[te.toString()],de=y[le.toString()],ye=m[te.toString()],ne=m[le.toString()],he=d[te.toString()],me=d[le.toString()],Re=v[te.toString()],Te=v[le.toString()];B.length=fe.length,D.length=fe.length,z.length=fe.length,U.length=fe.length,H.length=fe.length;for(var De=0;De<fe.length;De++)G[De]=se*fe[De]+(1-se)*we[De],W[De]=se*be[De]+(1-se)*de[De],F[De]=se*ye[De]+(1-se)*ne[De],X[De]=se*he[De]+(1-se)*me[De],J[De]=se*Re[De]+(1-se)*Te[De]}else G=b[0],W=y[0],F=m[0],X=d[0],J=v[0];if(oe(G,W,F,X,J),this.boundingBoxUpdateRequired=!0,g!=null){if(T){var Ye=g[te.toString()],ze=g[le.toString()];V.length=Ye.length;for(var st=0;st<Ye.length;st++)R.setHex(Ye[st]),L.setHex(ze[st]),R.setRGB(R.r*se+L.r*(1-se),R.g*se+L.g*(1-se),R.b*se+L.b*(1-se)),V[st]=R.getHex()}else V=g[0];j(V)}};this.showLabel=()=>{for(var G=0;G<p.length;G++)p[G].showLabel(this.morph.material?this.morph.material.color:void 0)},this.hideLabel=()=>{for(var G=0;G<p.length;G++)p[G].hideLabel()};var $=G=>{for(var W=0;W<E;W++){var F=new(u(16)).Glyph(void 0,void 0,W,this),X=w?w[W]:void 0;X=X||this.groupName,X&&F.setLabel(X),0<S&&F.setFrustumCulled(!1),p[W]=F,this.morph.add(F.getGroup())}G&&this.showLabel(),oe(b[0],y[0],m[0],d[0],v[0]),g!=null&&j(g[0]),this.ready=!0,this.boundingBoxUpdateRequired=!0};this.addCustomGlyph=G=>{G.isGlyph&&p.push(G),this.ready=!0,this.boundingBoxUpdateRequired=!0},this.addMeshAsGlyph=(G,W)=>{if(G.isMesh){var F=new(u(16)).Glyph(void 0,void 0,W,this);return F.fromMesh(G),p.push(F),this.morph.add(F.getGroup()),this.ready=!0,this.boundingBoxUpdateRequired=!0,F}},this.forEachGlyph=G=>{for(var W=0;W<p.length;W++)G(p[W])};var re=(G,W)=>(F,X)=>{var J=F.toBufferGeometry();this.geometry.copy(J),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),J.dispose(),X&&X[0]&&(this.morph.material=X[0]),$(W),this.morph.name=this.groupName,this.morph.userData=this,this.setMorph(this.morph),F.dispose(),G!=null&&typeof G=="function"&&G(this)};this.getClosestVertexIndex=function(){var G=-1;if(this.morph&&this.ready){this.getBoundingBox().getCenter(this._v1);for(var W,F=b[0],X=F.length/3,J=-1,V=0,k=0;k<X;k++)W=3*k,this._v2.set(F[W],F[W+1],F[W+2]),V=this._v1.distanceTo(this._v2),(J==-1||J>V)&&(J=V,G=k)}return G},this.getClosestVertex=function(){if(this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex&&this.morph){var G=new c.Vector3;return this.morph.getMatrixAt(this.closestVertexIndex,A),G.setFromMatrixPosition(A),G}},this.getBoundingBox=()=>{if(this.morph&&this.ready&&this.morph.visible){if(this.boundingBoxUpdateRequired){N.setFromBufferAttribute(this.morph.geometry.attributes.position);for(var G=0;G<E;G++)this.morph.getMatrixAt(G,A),x.copy(N).applyMatrix4(A),G==0?O.copy(x):O.union(x);if(O)this.cachedBoundingBox.copy(O),this.morph.updateWorldMatrix(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1;else return}return this.cachedBoundingBox}},this.setMorphTime=G=>{this.inbuildTime=G>this.duration?this.duration:0>G?0:G,(T||P)&&(K(),P&&(this.markerUpdateRequired=!0))},this.isTimeVarying=()=>!!((this.ready===!1||0<S)&&(T||P)),this.getCurrentTime=()=>this.inbuildTime,this.setScaleAll=function(G){this.globalScale=G,K()},this.dispose=()=>{for(var G=p.length-1;0<=G;G--)p[G].dispose();this.geometry&&this.geometry.dispose(),this.morph&&this.morph.material.dispose(),y=void 0,m=void 0,d=void 0,b=void 0,v=void 0,g=void 0,this.ready=!1,this.groupName=void 0},this.render=(G,W,F)=>{if(W==!0){var X=this.inbuildTime+G;X>this.duration&&(X-=this.duration),this.inbuildTime=X,(T||P)&&K()}this.updateMarker(W,F)}};h.prototype=Object.create(u(10).ZincObject.prototype),l.Glyphset=h},(o,l,u)=>{u.r(l),u.d(l,{JSONLoader:()=>M});var c=u(4),f=u(20).Loader,h=c.LoaderUtils,p=c.AnimationClip,y=c.Vector3,m=c.Vector4,d=c.Color,b=c.Vector2,v=u(6).Face3,g=u(6).Geometry,w=c.FileLoader,S=c.DefaultLoadingManager,E=u(21).VideoHandler;function M(_){typeof _=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),_=void 0),this.manager=_===void 0?S:_,this.withCredentials=!1,this.paramsString=""}Object.assign(M.prototype,{load:function(C,I,T,P){var A=this,R=this.texturePath&&typeof this.texturePath=="string"?this.texturePath:h.extractUrlBase(C),L=new w(this.manager);C.split("?"),this.paramsString=C.length===2?paramsStrings[1]:"",L.setWithCredentials(this.withCredentials),L.load(C,function(N){var x;try{x=JSON.parse(N)}catch{if(console.error("The loader has encountered an error while parsing the content of a resource."),P)return void P({responseURL:C})}var O=x.metadata;if(O!==void 0){var B=O.type;if(B!==void 0&&B.toLowerCase()==="object")return void console.error("THREE.JSONLoader: "+C+" should be loaded with THREE.ObjectLoader instead.")}if(A&&A.parse){var D=A.parse(x,R);I(D.geometry,D.materials)}},T,P)},setTexturePath:function(C){this.texturePath=C},parse:function(){function _(P,A){function R(he,me){return he&1<<me}var L,N,x,O,B,D,z,U,H,Y,ie,ae,ee,oe,j,K,$,re,G,W,F,X,J,V,k,te,se,le=P.faces,fe=P.vertices,we=P.normals,be=P.colors,de=P.scale,ye=0;if(P.uvs!==void 0){for(L=0;L<P.uvs.length;L++)P.uvs[L].length&&ye++;for(L=0;L<ye;L++)A.faceVertexUvs[L]=[]}for(O=0,B=fe.length;O<B;)re=new y,re.x=fe[O++]*de,re.y=fe[O++]*de,re.z=fe[O++]*de,A.vertices.push(re);if(O=0,B=le.length,P.uvs)for(L=0;L<P.uvs.length;L++){A.uvs[L]=[];for(var ne=0;ne<P.uvs[L].length;ne++)A.uvs[L][ne]=P.uvs[L][ne]}if(we)for(L=0;L<we.length;L++)A.normals[L]=we[L];if(be)for(L=0;L<be.length;L++)A.colors[L]=be[L];for(;O<B;)if(Y=le[O++],ie=R(Y,0),ae=R(Y,1),ee=R(Y,3),oe=R(Y,4),j=R(Y,5),K=R(Y,6),$=R(Y,7),ie){if(W=new v,W.a=le[O],W.b=le[O+1],W.c=le[O+3],F=new v,F.a=le[O+1],F.b=le[O+2],F.c=le[O+3],O+=4,ae&&(H=le[O++],W.materialIndex=H,F.materialIndex=H),x=A.faces.length,ee)for(L=0;L<ye;L++)for(V=P.uvs[L],A.faceVertexUvs[L][x]=[],A.faceVertexUvs[L][x+1]=[],N=0;4>N;N++)U=le[O++],te=V[2*U],se=V[2*U+1],k=new b(te,se),N!==2&&A.faceVertexUvs[L][x].push(k),N!==0&&A.faceVertexUvs[L][x+1].push(k);if(oe&&(z=3*le[O++],W.normal.set(we[z++],we[z++],we[z]),F.normal.copy(W.normal)),j)for(L=0;4>L;L++)z=3*le[O++],J=new y(we[z++],we[z++],we[z]),L!==2&&W.vertexNormals.push(J),L!==0&&F.vertexNormals.push(J);if(K&&(D=le[O++],X=be[D],W.color.setHex(X),F.color.setHex(X)),$)for(L=0;4>L;L++)D=le[O++],X=be[D],L!==2&&W.vertexColors.push(new d(X)),L!==0&&F.vertexColors.push(new d(X));A.faces.push(W),A.faces.push(F)}else{if(G=new v,G.a=le[O++],G.b=le[O++],G.c=le[O++],ae&&(H=le[O++],G.materialIndex=H),x=A.faces.length,ee)for(L=0;L<ye;L++)for(V=P.uvs[L],A.faceVertexUvs[L][x]=[],N=0;3>N;N++)U=le[O++],te=V[2*U],se=V[2*U+1],k=new b(te,se),A.faceVertexUvs[L][x].push(k);if(oe&&(z=3*le[O++],G.normal.set(we[z++],we[z++],we[z])),j)for(L=0;3>L;L++)z=3*le[O++],J=new y(we[z++],we[z++],we[z]),G.vertexNormals.push(J);if(K&&(D=le[O++],G.color.setHex(be[D])),$)for(L=0;3>L;L++)D=le[O++],G.vertexColors.push(new d(be[D]));A.faces.push(G)}}function C(P,A){var R=P.influencesPerVertex===void 0?2:P.influencesPerVertex;if(P.skinWeights)for(var L=0,N=P.skinWeights.length;L<N;L+=R){var x=P.skinWeights[L],O=1<R?P.skinWeights[L+1]:0,B=2<R?P.skinWeights[L+2]:0,D=3<R?P.skinWeights[L+3]:0;A.skinWeights.push(new m(x,O,B,D))}if(P.skinIndices)for(var L=0,N=P.skinIndices.length;L<N;L+=R){var z=P.skinIndices[L],U=1<R?P.skinIndices[L+1]:0,H=2<R?P.skinIndices[L+2]:0,Y=3<R?P.skinIndices[L+3]:0;A.skinIndices.push(new m(z,U,H,Y))}A.bones=P.bones,A.bones&&0<A.bones.length&&(A.skinWeights.length!==A.skinIndices.length||A.skinIndices.length!==A.vertices.length)&&console.warn("When skinning, number of vertices ("+A.vertices.length+"), skinIndices ("+A.skinIndices.length+"), and skinWeights ("+A.skinWeights.length+") should match.")}function I(P,A){var R=P.scale;if(P.morphTargets!==void 0)for(var L=0,N=P.morphTargets.length;L<N;L++){A.morphTargets[L]={},A.morphTargets[L].name=P.morphTargets[L].name,A.morphTargets[L].vertices=[];for(var x,O=A.morphTargets[L].vertices,B=P.morphTargets[L].vertices,D=0,z=B.length;D<z;D+=3)x=new y,x.x=B[D]*R,x.y=B[D+1]*R,x.z=B[D+2]*R,O.push(x)}if(P.morphNormals!==void 0){for(var L=0,N=P.morphNormals.length;L<N;L++)if(A.morphTargets[L]){A.morphTargets[L].normals=[];for(var U,H=A.morphTargets[L].normals,Y=P.morphNormals[L].normals,D=0,z=Y.length;D<z;D+=3)U=new y,U.x=Y[D],U.y=Y[D+1],U.z=Y[D+2],H.push(U);A.morphNormalsReady=!0}}if(P.morphColors!==void 0){var L,N,ie,ae,ee,oe,j;for(L=0,N=P.morphColors.length;L<N;L++)for(A.morphColors[L]={},A.morphColors[L].name=P.morphColors[L].name,A.morphColors[L].colors=[],ee=A.morphColors[L].colors,oe=P.morphColors[L].colors,ie=0,ae=oe.length;ie<ae;ie+=3)j=new c.Color(16755200),j.setRGB(oe[ie],oe[ie+1],oe[ie+2]),ee.push(j)}}function T(P,A){var R=[],L=[];P.animation!==void 0&&L.push(P.animation),P.animations!==void 0&&(P.animations.length?L=L.concat(P.animations):L.push(P.animations));for(var N,x=0;x<L.length;x++)N=p.parseAnimation(L[x],A.bones),N&&R.push(N);if(A.morphTargets){var O=p.CreateClipsFromMorphTargetSequences(A.morphTargets,10);R=R.concat(O)}0<R.length&&(A.animations=R)}return function(P,A){P.data!==void 0&&(P=P.data),P.scale=P.scale===void 0?1:1/P.scale;var R=new g;if(R.morphColors=[],_(P,R),C(P,R),I(P,R),T(P,R),R.computeFaceNormals(),R.computeBoundingSphere(),P.materials===void 0||P.materials.length===0)return{geometry:R};var L=f.prototype.initMaterials(P.materials,A,"Anonymous");if(P.materials[0].video){var N=A+P.materials[0].video;this.paramsString&&(N+="?".concat(this.paramsString));var x=new E(N);R._video=x}return L&&0<L.length&&(L[0].side=P.materials[0].singleSided?c.FrontSide:P.materials[0].flipSided?c.BackSide:c.DoubleSide,P.materials[0].specularCoef&&(L[0].shininess=Math.floor(P.materials[0].specularCoef/3))),{geometry:R,materials:L}}}()})},(o,l,u)=>{u.r(l),u.d(l,{Loader:()=>f});var c=u(4);u(4);function f(){}f.Handlers={handlers:[],add:function(p,y){this.handlers.push(p,y)},get:function(p){for(var y=this.handlers,m=0,d=y.length;m<d;m+=2){var b=y[m],v=y[m+1];if(b.test(p))return v}return null}},Object.assign(f.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(p,y,m){for(var d=[],b=0;b<p.length;++b)d[b]=this.createMaterial(p[b],y,m);return d},createMaterial:function(){var h={NoBlending:c.NoBlending,NormalBlending:c.NormalBlending,AdditiveBlending:c.AdditiveBlending,SubtractiveBlending:c.SubtractiveBlending,MultiplyBlending:c.MultiplyBlending,CustomBlending:c.CustomBlending},p=new c.Color,y=new c.TextureLoader,m=new c.MaterialLoader;return function(d,b,v){function g(_,C,I,T,P){var A,R=b+_,L=f.Handlers.get(R);L===null?(y.setCrossOrigin(v),A=y.load(R)):A=L.load(R),C!==void 0&&(A.repeat.fromArray(C),C[0]!==1&&(A.wrapS=c.RepeatWrapping),C[1]!==1&&(A.wrapT=c.RepeatWrapping)),I!==void 0&&A.offset.fromArray(I),T!==void 0&&(T[0]==="repeat"&&(A.wrapS=c.RepeatWrapping),T[0]==="mirror"&&(A.wrapS=c.MirroredRepeatWrapping),T[1]==="repeat"&&(A.wrapT=c.RepeatWrapping),T[1]==="mirror"&&(A.wrapT=c.MirroredRepeatWrapping)),P!==void 0&&(A.anisotropy=P);var N=c.MathUtils.generateUUID();return w[N]=A,N}var w={},S={uuid:c.MathUtils.generateUUID(),type:"MeshLambertMaterial"};for(var E in d){var M=d[E];switch(E){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":S.name=M;break;case"blending":S.blending=h[M];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",E,"is no longer supported.");break;case"colorDiffuse":S.color=p.fromArray(M).getHex();break;case"colorSpecular":S.specular=p.fromArray(M).getHex();break;case"colorEmissive":S.emissive=p.fromArray(M).getHex();break;case"specularCoef":S.shininess=M;break;case"shading":M.toLowerCase()==="basic"&&(S.type="MeshBasicMaterial"),M.toLowerCase()==="phong"&&(S.type="MeshPhongMaterial"),M.toLowerCase()==="standard"&&(S.type="MeshStandardMaterial");break;case"mapDiffuse":S.map=g(M,d.mapDiffuseRepeat,d.mapDiffuseOffset,d.mapDiffuseWrap,d.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":S.emissiveMap=g(M,d.mapEmissiveRepeat,d.mapEmissiveOffset,d.mapEmissiveWrap,d.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":S.lightMap=g(M,d.mapLightRepeat,d.mapLightOffset,d.mapLightWrap,d.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":S.aoMap=g(M,d.mapAORepeat,d.mapAOOffset,d.mapAOWrap,d.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":S.bumpMap=g(M,d.mapBumpRepeat,d.mapBumpOffset,d.mapBumpWrap,d.mapBumpAnisotropy);break;case"mapBumpScale":S.bumpScale=M;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":S.normalMap=g(M,d.mapNormalRepeat,d.mapNormalOffset,d.mapNormalWrap,d.mapNormalAnisotropy);break;case"mapNormalFactor":S.normalScale=M;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":S.specularMap=g(M,d.mapSpecularRepeat,d.mapSpecularOffset,d.mapSpecularWrap,d.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":S.metalnessMap=g(M,d.mapMetalnessRepeat,d.mapMetalnessOffset,d.mapMetalnessWrap,d.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":S.roughnessMap=g(M,d.mapRoughnessRepeat,d.mapRoughnessOffset,d.mapRoughnessWrap,d.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":S.alphaMap=g(M,d.mapAlphaRepeat,d.mapAlphaOffset,d.mapAlphaWrap,d.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":S.side=c.BackSide;break;case"doubleSided":S.side=c.DoubleSide;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),S.opacity=M;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":S[E]=M;break;case"vertexColors":M===!0&&(S.vertexColors=c.VertexColors),M==="face"&&(S.vertexColors=c.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",E,M)}}return S.type==="MeshBasicMaterial"&&delete S.emissive,S.type!=="MeshPhongMaterial"&&delete S.specular,1>S.opacity&&(S.transparent=!0),m.setTextures(w),m.parse(S)}}()})},(o,l,u)=>{var c=u(4);l.VideoHandler=function(f){var h=this;this.video=void 0,this.videoTexture=void 0,this.setMorphTime=function(p,y){var m=p/y*h.video.duration;h.video.currentTime=m},this.getVideoDuration=function(){return h.video.duration},this.createCanvasVideoTexture=function(){return h.videoTexture=new c.VideoTexture(h.video),h.videoTexture.minFilter=c.LinearFilter,h.videoTexture.magFilter=c.LinearFilter,h.videoTexture.format=c.RGBFormat,h.video.currentTime=0,h.videoTexture},this.getCurrentTime=function(p){return h.video?p*(h.video.currentTime/h.video.duration):0},this.isReadyToPlay=function(){return!!(h.video&&3<=h.video.readyState)},function(){document&&(h.video=document.createElement("video"),h.video.crossOrigin="anonymous",h.video.src=f,h.video.load(),h.video.loop=!0)}()}},(o,l,u)=>{var c=u(4),f=u(23).Points,h=u(5).toBufferGeometry,p=u(5).getCircularTexture,y=u(17).Label,m=function(){u(10).ZincObject.call(this),this.isPointset=!0;var d=[];this.createMesh=(v,g,w)=>{if(v&&g){var S=h(v,w),E=p();g.map=E;var M=new f(S,g);this.setMesh(M,w.localTimeEnabled,w.localMorphColour)}};var b=(v,g,w,S)=>{if(w){var E=new c.Color(S),M=new y(w,E);M.setPosition(g[0],g[1],g[2]);var _=M.getSprite();_.material.sizeAttenuation=!1,_.material.alphaTest=.5,_.material.transparent=!0,_.material.depthWrite=!1,_.material.depthTest=!1,this.group.add(_),d[v]=M}};this.addPoints=(v,g,w)=>{if(v&&0<v.length){var S=this.drawRange-1,E=this.addVertices(v),M=this.getMorph();if(!M){var _=new c.PointsMaterial({alphaTest:.5,size:10,color:w,sizeAttenuation:!1});E.colorsNeedUpdate=!0,this.createMesh(E,_,{localTimeEnabled:!1,localMorphColour:!1})}var C=S+v.length,I=0;if(Array.isArray(g)&&g.length===v.length||typeof g=="string")for(S;S+I<C;){var T=typeof g=="string"?g:g[I];b(I,v[I],T,w),I++}this.region&&(this.region.pickableUpdateRequired=!0)}},this.setSize=v=>{this.morph&&this.morph.material&&(this.morph.material.size=v,this.morph.material.needsUpdate=!0)},this.setSizeAttenuation=v=>{this.morph&&this.morph.material&&(this.morph.material.sizeAttenuation=v,this.morph.material.needsUpdate=!0)},this.getVerticesByIndex=function(v){if(0<=v&&this.drawRange>v){var g=this.getMorph().geometry.getAttribute("position");return[g.getX(v),g.getY(v),g.getZ(v)]}},this.editVertices=function(v,g){if(v&&v.length){var w=this.getMorph(),S=g+v.length-1;if(!w||0>g||S>=this.drawRange)return;var E=w.geometry.getAttribute("position"),M=g;v.forEach(_=>{var C=d[M];C&&C.setPosition(_[0],_[1],_[2]),E.setXYZ(M++,_[0],_[1],_[2])}),E.needsUpdate=!0,this.boundingBoxUpdateRequired=!0}},this.render=(v,g,w,S)=>{this.morph&&w&&(this.morph.sizePerPixel=w.pixelHeight),m.prototype.render.call(this,v,g,w,S)}};m.prototype=Object.create(u(10).ZincObject.prototype),l.Pointset=m},(o,l,u)=>{u.r(l),u.d(l,{Points:()=>b});var c=u(4),f=new c.Matrix4,h=new c.Ray,p=new c.Sphere,y=new c.Vector3,m=new c.Vector3,d=new c.Vector3;class b extends c.Object3D{constructor(){var S=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,E=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.PointsMaterial;super(),this.type="Points",this.geometry=S,this.material=E,this.sizePerPixel=1,this.updateMorphTargets()}copy(S){return super.copy(S),this.material=S.material,this.geometry=S.geometry,this}raycast(S,E){var M=this.geometry,_=this.matrixWorld,C=S.params.Points.threshold,I=M.drawRange;if(M.boundingSphere===null&&M.computeBoundingSphere(),p.copy(M.boundingSphere),p.applyMatrix4(_),p.radius+=C,S.ray.intersectsSphere(p)!==!1){f.copy(_).invert(),h.copy(S.ray).applyMatrix4(f);var T=C/((this.scale.x+this.scale.y+this.scale.z)/3)*this.material.size*this.sizePerPixel,P=T*T;if(M.isBufferGeometry){var A=M.index,R=M.attributes,L=R.position,N=M.morphAttributes.position;if(A!==null)for(var x,O=Math.max(0,I.start),B=Math.min(A.count,I.start+I.count),D=O;D<B;D++)x=A.getX(D),g(this,L,N,x),v(y,x,P,_,S,E,this);else for(var z=Math.max(0,I.start),U=Math.min(L.count,I.start+I.count),H=z;H<U;H++)g(this,L,N,H),v(y,H,P,_,S,E,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var S=this.geometry;if(S.isBufferGeometry){var E=S.morphAttributes,M=Object.keys(E);if(0<M.length){var _=E[M[0]];if(_!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var C,I=0,T=_.length;I<T;I++)C=_[I].name||I+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[C]=I}}}else{var P=S.morphTargets;P!==void 0&&0<P.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}b.prototype.isPoints=!0;function v(w,S,E,M,_,C,I){var T=h.distanceSqToPoint(w);if(T<E){var P=new c.Vector3;h.closestPointToPoint(w,P),P.applyMatrix4(M);var A=_.ray.origin.distanceTo(P);if(A<_.near||A>_.far)return;C.push({distance:A,distanceToRay:Math.sqrt(T),point:P,index:S,face:null,object:I})}}function g(w,S,E,M){y.fromBufferAttribute(S,M);var _=w.morphTargetInfluences;if(w.material.morphTargets&&E&&_){m.set(0,0,0);for(var C=0,I=E.length;C<I;C++){var T=_[C],P=E[C];T!==0&&(d.fromBufferAttribute(P,M),m.addScaledVector(d.sub(y),T))}y.add(m)}}},(o,l,u)=>{var c=u(4),f=u(5).toBufferGeometry,h=function(){u(10).ZincObject.call(this),this.isLines=!0,this.createLineSegment=(p,y,m)=>{if(p&&y){var d=f(p,m);m.localMorphColour&&d.morphAttributes.color&&(y.onBeforeCompile=u(9).augmentMorphColor());var b=new(u(12)).LineSegments(d,y);this.setMesh(b,m.localTimeEnabled,m.localMorphColour)}},this.setWidth=p=>{this.morph&&this.morph.material&&(this.morph.material.linewidth=p,this.morph.material.needsUpdate=!0)},this.addLines=(p,y)=>{if(p&&0<p.length){var m=this.addVertices(p),d=this.getMorph();if(!d){var b=new c.LineBasicMaterial({color:y});m.colorsNeedUpdate=!0,this.createLineSegment(m,b,{localTimeEnabled:!1,localMorphColour:!1})}this.region&&(this.region.pickableUpdateRequired=!0)}}};h.prototype=Object.create(u(10).ZincObject.prototype),l.Lines=h},(o,l,u)=>{function c(y,m,d,b,v,g,w){try{var S=y[g](w),E=S.value}catch(M){return void d(M)}S.done?m(E):Promise.resolve(E).then(b,v)}function f(y){return function(){var m=this,d=arguments;return new Promise(function(b,v){function g(E){c(S,b,v,g,w,"next",E)}function w(E){c(S,b,v,g,w,"throw",E)}var S=y.apply(m,d);g(void 0)})}}var h=u(4),p=function(){var y=this;u(26).Texture.call(this),this.isTextureArray=!0,this.loadFromImages=function(){var m=f(function*(d){var b=1,v=1,g=0;if(d&&d.length){y.isLoading=!0;var w=new Image;w.crossOrigin="Anonymous";for(var S,E=document.createElement("canvas"),M=0,_=Array(d.length),C=0;C<d.length;C++)S=yield y.imageToUint8Array(y,w,d[C],E),S&&S.array&&(b=S.width,v=S.height,_[g]=S.array,M+=_[g].length,g++);var I=new Uint8Array(M);M=0,_.forEach(T=>{I.set(T,M),M+=T.length}),y.impl=new h.DataTexture2DArray(I,b,v,g),y.size={width:b,height:v,depth:g},y.isLoading=!1,y.impl.needsUpdate=!0}});return function(){return m.apply(this,arguments)}}(),this.getMaterial=m=>{if(this.impl){var d;if(!m)d=new h.MeshBasicMaterial({color:new h.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:h.DoubleSide});else if(m.vs&&m.fs){var b=!0;m.transparent&&(b=m.transparent);var v=h.FrontSide;m.side&&(v=m.side),d=new h.ShaderMaterial({transparent:b,uniforms:m.uniforms,vertexShader:m.vs,fragmentShader:m.fs,side:v}),m.glslVersion&&(d.glslVersion=m.glslVersion)}if(d)return d.needsUpdate=!0,d}}};p.prototype=Object.create(u(26).Texture.prototype),l.TextureArray=p},(o,l,u)=>{function c(y,m,d,b,v,g,w){try{var S=y[g](w),E=S.value}catch(M){return void d(M)}S.done?m(E):Promise.resolve(E).then(b,v)}function f(y){return function(){var m=this,d=arguments;return new Promise(function(b,v){function g(E){c(S,b,v,g,w,"next",E)}function w(E){c(S,b,v,g,w,"throw",E)}var S=y.apply(m,d);g(void 0)})}}var h=u(4),p=function(){this.isTexture=!0,this.impl=void 0,this.isLoading=!1,this.size={width:1,height:1,depth:0}};p.prototype.loadImage=function(y,m){return new Promise((d,b)=>{y.onload=()=>d(y),y.onerror=b,y.src=m})},p.prototype.imageToUint8Array=function(){var y=f(function*(m,d,b,v){yield m.loadImage(d,b),v.width=d.width,v.height=d.height;var g=v.getContext("2d");return g.drawImage(d,0,0),{array:new Uint8Array(g.getImageData(0,0,v.width,v.height).data.buffer),width:v.width,height:v.height}});return function(){return y.apply(this,arguments)}}(),p.prototype.loadFromImages=function(){var y=f(function*(){});return function(){return y.apply(this,arguments)}}(),p.prototype.isReady=function(){return!(!this.impl||this.isLoading)},p.prototype.getMaterial=function(){if(this.impl)return new h.MeshBasicMaterial({color:new h.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:h.DoubleSide})},l.Texture=p},(o,l,u)=>{function c(v,g){var w=Object.keys(v);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(v);g&&(S=S.filter(function(E){return Object.getOwnPropertyDescriptor(v,E).enumerable})),w.push.apply(w,S)}return w}function f(v){for(var g,w=1;w<arguments.length;w++)g=arguments[w]==null?{}:arguments[w],w%2?c(Object(g),!0).forEach(function(S){h(v,S,g[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(g)):c(Object(g)).forEach(function(S){Object.defineProperty(v,S,Object.getOwnPropertyDescriptor(g,S))});return v}function h(v,g,w){return g=p(g),g in v?Object.defineProperty(v,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):v[g]=w,v}function p(v){var g=y(v,"string");return typeof g=="symbol"?g:g+""}function y(v,g){if(typeof v!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w!==void 0){var S=w.call(v,g||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}var m=u(4),d=u(28),b=function(v){u(29).TexturePrimitive.call(this,v),this.isTextureSlides=!0;var g=[],w={};this.morph=new m.Group,this.group=this.morph,this.morph.userData=this;var S=!0;this.createSlides=_=>{_.forEach(C=>this.createSlide(C))};var E=(_,C)=>{var I=_.material,T=I.uniforms;switch(_.rotation.x=0,_.rotation.y=0,_.rotation.z=0,_.position.x=0,_.position.y=0,_.position.z=0,C.direction){case"x":var P=S?-Math.PI/2:Math.PI/2;_.rotation.y=P,T.direction.value=1,T.slide.value.set(C.value,0,0),_.position.x=C.value;break;case"y":_.rotation.x=Math.PI/2,T.direction.value=2,T.slide.value.set(0,C.value,0),_.position.y=C.value;break;case"z":T.direction.value=3,T.slide.value.set(0,0,C.value),_.position.z=C.value;break}I.needsUpdate=!0,this.boundingBoxUpdateRequired=!0};this.modifySlideSettings=_=>{_&&_.id&&_.id in w&&w[_.id]&&E(w[_.id],_)},this.createSlide=_=>{if(this.texture&&this.texture.isTextureArray&&this.texture.isReady()&&_&&_.direction&&_.value!==void 0){var C=new m.PlaneGeometry(1,1);C.translate(.5,.5,0);var I=d.getUniforms();I.diffuse.value=this.texture.impl,I.depth.value=this.texture.size.depth,I.flipY.value=S;var T={fs:d.fs,vs:d.vs,uniforms:I,glslVersion:d.glslVersion,side:m.DoubleSide,transparent:!1},P=this.texture.getMaterial(T);P.needsUpdate=!0;var A=new m.Mesh(C,P);A.name=this.groupName,A.userData=this;var R={value:_.value,direction:_.direction,id:A.id};return g.push(R),E(A,R),w[A.id]=A,this.morph.add(A),this.boundingBoxUpdateRequired=!0,R}},this.getTextureSettings=()=>[...g],this.getTextureSettingsWithId=_=>{for(var C=0;C<g.length;C++)if(_===g[C].id)return f({},g[C])},this.getSlides=()=>this.morph?[...this.morph.children]:[],this.removeSlide=_=>{_&&this.removeSlideWithId(_.id)},this.removeSlideWithId=_=>{if(this.morph&&_ in w&&w[_]){if(this.morph.getObjectById(_)){var C=w[_];this.morph.remove(C),C.clear(),C.geometry&&C.geometry.dispose(),C.material&&C.material.dispose(),this.boundingBoxUpdateRequired=!0}var I=g.findIndex(T=>T.id===_);-1<I&&g.splice(I,1)}},this.dispose=()=>{this.morph.children.forEach(_=>{_.geometry&&_.geometry.dispose(),_.material&&_.material.dispose()}),u(29).TexturePrimitive.prototype.dispose.call(this),this.boundingBoxUpdateRequired=!0};var M=(_,C,I)=>{switch(C.direction.value){case 1:I.copy(C.slide.value),_.expandByPoint(I),I.setY(1),I.setZ(1),_.expandByPoint(I);break;case 2:I.copy(C.slide.value),_.expandByPoint(I),I.setX(1),I.setZ(1),_.expandByPoint(I);break;case 3:I.copy(C.slide.value),_.expandByPoint(I),I.setX(1),I.setY(1),_.expandByPoint(I);break}};this.getBoundingBox=()=>{if(this.morph&&this.morph.children&&this.morph.visible&&this.boundingBoxUpdateRequired){this.cachedBoundingBox.makeEmpty();var _=new m.Vector3(0,0,0);this.morph.children.forEach(C=>{M(this.cachedBoundingBox,C.material.uniforms,_)}),this.morph.updateMatrixWorld(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1}return this.cachedBoundingBox},this.applyTransformation=(_,C,I)=>{var T=new m.Matrix4;T.set(_[0],_[1],_[2],0,_[3],_[4],_[5],0,_[6],_[7],_[8],0,0,0,0,0);var P=new m.Quaternion().setFromRotationMatrix(T);this.morph.position.set(...C),this.morph.quaternion.copy(P),this.morph.scale.set(...I),this.morph.updateMatrix(),this.boundingBoxUpdateRequired=!0},this.initialise=(_,C)=>{if(_){var I=_.locations;I&&0<I.length&&(this.applyTransformation(I[0].orientation,I[0].position,I[0].scale),"flipY"in I[0]&&(S=I[0].flipY)),this.createSlides(_.settings.slides),C!=null&&typeof C=="function"&&C(this)}}};b.prototype=Object.create(u(29).TexturePrimitive.prototype),b.prototype.constructor=b,l.TextureSlides=b},(o,l,u)=>{var c=u(4),f=c.GLSL3,h=`
|
|
3184
|
+
`))}}},(o,l,u)=>{var c=u(4),f=u(5).createBufferGeometry,h=u(5).resolveURL,p=0,y=function(){return"pr"+p++},m=function(){this.isZincObject=!0,this.geometry=void 0,this.morph=void 0,this.group=new c.Group,this._lod=new(u(11)).LOD(this),this.groupName=void 0,this.timeEnabled=!1,this.morphColour=!1,this.inbuildTime=0,this.mixer=void 0,this.animationGroup=void 0,this.duration=6e3,this.clipAction=void 0,this.userData={},this.videoHandler=void 0,this.marker=void 0,this.markerNumber=void 0,this.markerUpdateRequired=!0,this.closestVertexIndex=-1,this.boundingBoxUpdateRequired=!0,this.cachedBoundingBox=new c.Box3,this.anatomicalId=void 0,this.region=void 0,this.animationClip=void 0,this.markerMode="inherited",this.uuid=y(),this._v1=new c.Vector3,this._v2=new c.Vector3,this._b1=new c.Box3,this.center=new c.Vector3,this.radius=0,this.visible=!0,this.drawRange=-1};m.prototype.setDuration=function(d){this.duration=d,this.clipAction&&this.clipAction.setDuration(this.duration)},m.prototype.getDuration=function(){return this.duration},m.prototype.setRegion=function(d){this.region=d},m.prototype.getRegion=function(){return this.region},m.prototype.getMorph=function(){var d=this._lod.getCurrentMorph();return d||this.morph},m.prototype.getGroup=function(){return this.group},m.prototype.setMorph=function(d){this.morph=d,this.group.add(this.morph);var b=this._lod.calculateDistance("far");this._lod.addLevel(d,b),this._lod.setMaterial(d.material)},m.prototype.checkTransparentMesh=function(){},m.prototype.setMesh=function(d,b,v){this.animationGroup=new c.AnimationObjectGroup(d),this.mixer=new c.AnimationMixer(this.animationGroup);var g=d.geometry;if(this.geometry=d.geometry,this.clipAction=void 0,g&&g.morphAttributes){var w=g.morphAttributes.position;w||(w=g.morphAttributes.color?g.morphAttributes.color:g.morphAttributes.normal),w&&(this.animationClip=c.AnimationClip.CreateClipsFromMorphTargetSequences(w,10,!0),this.animationClip&&this.animationClip[0]!=null&&(this.clipAction=this.mixer.clipAction(this.animationClip[0]).setDuration(this.duration),this.clipAction.loop=c.loopOnce,this.clipAction.clampWhenFinished=!0,this.clipAction.play()))}this.timeEnabled=b,this.morphColour=v,d.userData=this,d.matrixAutoUpdate=!1,this.setMorph(d),this.checkTransparentMesh(),this.timeEnabled?this.setFrustumCulled(!1):this.morphColour&&(g.setAttribute("morphTarget0",g.getAttribute("position")),g.setAttribute("morphTarget1",g.getAttribute("position"))),this.boundingBoxUpdateRequired=!0},m.prototype.setName=function(d){this.groupName=d,this._lod.setName(d)},m.prototype.getCurrentTime=function(){if(this.clipAction){var d=this.clipAction.time/this.clipAction._clip.duration;return this.duration*d}return this.inbuildTime},m.prototype.setMorphTime=function(d){var b=!1;if(this.clipAction){var v=d/this.duration,g=this.clipAction._clip.duration,w=v*g;w!=this.clipAction.time&&(this.clipAction.time=w,b=!0),b&&this.isTimeVarying()&&this.mixer.update(0)}else{var S=d;S=d>this.duration?this.duration:0>d?0:d,S!=this.inbuildTime&&(this.inbuildTime=S,b=!0)}b&&(this.boundingBoxUpdateRequired=!0,this._lod.updateMorphColorAttribute(!0),this.timeEnabled&&(this.markerUpdateRequired=!0))},m.prototype.isTimeVarying=function(){return!!(this.timeEnabled||this.morphColour)},m.prototype.getVisibility=function(){return this.visible},m.prototype.setVisibility=function(d){d!==this.visible&&(this.visible=d,this.group.visible=d,this.region&&(this.region.pickableUpdateRequired=!0))},m.prototype.setAlpha=function(d){var b=this._lod._material,v=!1;1>d&&(v=!0),b.opacity=d,b.transparent=v,this.checkTransparentMesh()},m.prototype.setFrustumCulled=function(d){this._lod.setFrustumCulled(d)},m.prototype.setVertexColors=function(d){this._lod.setVertexColors(d)},m.prototype.getColour=function(){return this._lod._material?this._lod._material.color:void 0},m.prototype.setColour=function(d){this._lod.setColour(d)},m.prototype.getColourHex=function(){return!this.morphColour&&this._lod._material&&this._lod._material.color?this._lod._material.color.getHexString():void 0},m.prototype.setColourHex=function(d){this._lod._material.color.setHex(d),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.color.setHex(d)},m.prototype.setEmissiveRGB=function(d){this._lod._material&&this._lod._material.emissive&&this._lod._material.emissive.setRGB(...d),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.emissive.setRGB(...d)},m.prototype.setMaterial=function(d){this._lod.setMaterial(d)},m.prototype.getClosestVertexIndex=function(){var d=-1,b=this.getMorph();if(b&&b.geoemtry){var v=b.geometry.attributes.position;if(this._b1.setFromBufferAttribute(v),this._b1.getCenter(this._v1),v)for(var g=-1,w=0,S=0;S<v.count;S++)this._v2.fromArray(v.array,3*S),w=this._v2.distanceTo(this._v1),g==-1?g=w:g>w&&(g=w,d=S)}return d},m.prototype.getClosestVertex=function(d){var b=new c.Vector3;this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex());var v=this.getMorph();if(v&&v.geometry&&0<=this.closestVertexIndex){var g=v.morphTargetInfluences,w=v.geometry.morphAttributes;if(g&&w&&w.position){for(var S=!1,E=0;E<g.length;E++)0<g[E]&&(S=!0,this._v1.fromArray(w.position[E].array,3*this.closestVertexIndex),b.add(this._v1.multiplyScalar(g[E])));if(S)return d?b.applyMatrix4(v.matrixWorld):b}else return b.fromArray(v.geometry.attributes.position.array,3*this.closestVertexIndex),d?b.applyMatrix4(v.matrixWorld):b}return this.getBoundingBox(),b.copy(this.center),d?b.applyMatrix4(this.morph.matrixWorld):b},m.prototype.getBoundingBox=function(){if(this.visible){var d=this._lod.getCurrentMorph();if(d&&d.visible)return this.boundingBoxUpdateRequired&&(u(5).getBoundingBox(d,this.cachedBoundingBox,this._b1,this._v1,this._v2),this.cachedBoundingBox.getCenter(this.center),this.radius=this.center.distanceTo(this.cachedBoundingBox.max),this.boundingBoxUpdateRequired=!1),this.cachedBoundingBox}},m.prototype.dispose=function(){this._lod.dispose(),this.animationGroup=void 0,this.mixer=void 0,this.morph=void 0,this.group=void 0,this.clipAction=void 0,this.groupName=void 0},m.prototype.markerIsRequired=function(d){return!!(this.visible&&(this.markerMode==="on"||d&&d.displayMarkers&&this.markerMode==="inherited"))},m.prototype.updateMarker=function(d,b){if(d==!1&&this.markerIsRequired(b)){var v=b.ndcToBeUpdated;if(this.groupName){if(this.marker||(this.marker=new(u(14)).Marker(this),this.markerUpdateRequired=!0),this.markerUpdateRequired){var g=this.getClosestVertex(!1);g&&(this.marker.setPosition(g.x,g.y,g.z),this.markerUpdateRequired=!1)}this.marker.isEnabled()||(b.markersList&&!(this.marker.uuid in b.markersList)&&(v=!0,b.markersList[this.marker.uuid]=this.marker),this.marker.enable(),this.group.add(this.marker.morph)),this.marker.setNumber(this.markerNumber),this.markerImgURL?this.marker.loadUserSprite(this.markerImgURL):this.marker.setDefaultSprite(),b&&b.camera&&(v||b.markerCluster.markerUpdateRequired)&&(this.marker.updateNDC(b.camera.cameraObject),b.markerCluster.markerUpdateRequired=!0)}}else this.marker&&this.marker.isEnabled()&&(this.marker.disable(),this.group.remove(this.marker.morph),b.markersList&&this.marker.uuid in b.markersList&&(b.markerCluster.markerUpdateRequired=!0,delete b.markersList[this.marker.uuid])),this.markerUpdateRequired=!0},m.prototype.processMarkerVisual=function(d,b){this.marker&&this.marker.isEnabled()&&this.marker.updateVisual(d,b)},m.prototype.initiateMorphColor=function(){this.morphColour==1&&this._lod.updateMorphColorAttribute(!1)},m.prototype.setRenderOrder=function(d){this._lod.setRenderOrder(d)},m.prototype.getClosestVertexDOMElementCoords=function(d){if(d&&d.camera){var b=!0,v=this.getClosestVertex(!0);return v.project(d.camera),v.z=Math.min(Math.max(v.z,0),1),(1<v.x||-1>v.x||1<v.y||-1>v.y)&&(b=!1),d.getZincCameraControls().getRelativeCoordsFromNDC(v.x,v.y,v),{position:v,inView:b}}},m.prototype.setMarkerMode=function(d,b){d!==this.markerMode&&(this.markerMode=d==="on"||d==="off"?d:"inherited",this.region&&(this.region.pickableUpdateRequired=!0)),b&&(this.markerNumber=b.number,this.markerImgURL=b.imgURL)},m.prototype.render=function(d,b,v,g){if(this.visible&&!(this.timeEnabled&&b)&&this._lod.update(v,this.center),b==!0){if(this.clipAction&&this.isTimeVarying())this.mixer.update(d);else{var w=this.inbuildTime+d;w>this.duration&&(w-=this.duration),this.inbuildTime=w}this.visible&&d!=0&&(this.boundingBoxUpdateRequired=!0,this.morphColour==1&&this._lod.updateMorphColorAttribute(!0))}this.updateMarker(b,g)},m.prototype.addLOD=function(d,b,v,g,w){this._lod.addLevelFromURL(d,b,v,g,w)},m.prototype.addVertices=function(d){var b=this.getMorph(),v=void 0;if(!b)v=f(500,d),this.drawRange=d.length;else if(-1<this.drawRange){var g=b.geometry.getAttribute("position");d.forEach(w=>{g.setXYZ(this.drawRange,w[0],w[1],w[2]),++this.drawRange}),g.needsUpdate=!0,b.geometry.setDrawRange(0,this.drawRange),b.geometry.computeBoundingBox(),b.geometry.computeBoundingSphere(),v=b.geoemtry,this.boundingBoxUpdateRequired=!0}return v},m.prototype.setPosition=function(d,b,v){var g=this.getGroup();g&&(g.position.set(d,b,v),g.updateMatrix(),this.boundingBoxUpdateRequired=!0)},m.prototype.loadAdditionalSources=function(d){d.load(h(filename),meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,void 0,void 0,void 0,void 0,finishCallback),this.onProgress(filename),this.onError(finishCallback))},m.prototype.setScaleAll=function(d){var b=this.getGroup();b&&(b.scale.set(d,d,d),b.updateMatrix(),this.boundingBoxUpdateRequired=!0)},l.ZincObject=m},(o,l,u)=>{var c=u(4),f=u(5).updateMorphColorAttribute,h=u(5).toBufferGeometry,p=function(y){this.levels=[],this._currentLevel=0,this._renderOrder=1,this._material=void 0,this._secondaryMaterial=void 0,this._loader=void 0,this._parent=y,this.addLevel=(d,b)=>{if(d){var v,g=Math.abs(b);for(v=0;v<this.levels.length&&!(g<this.levels[v].distance);v++);this.levels.splice(v,0,{distance:g,morph:d,loaded:!0,loading:!1,url:""}),d.renderOrder=this._renderOrder}},this.levelLoaded=(d,b)=>{if(d){for(var v=Math.abs(b),g=0;g<this.levels.length;g++)if(v===this.levels[g].distance){this._parent.group.add(d),this.levels[g].morph=d,this.levels[g].loaded=!0,this.levels[g].loading=!1;break}this.checkTransparentMesh()}},this.addLevelFromURL=(d,b,v,g,w)=>{this._loader=d;var S,E=this.calculateDistance(b);for(S=0;S<this.levels.length&&!(E<this.levels[S].distance);S++);this.levels.splice(S,0,{distance:E,morph:void 0,loaded:!1,loading:!1,url:v,index:g}),w&&this.loadLevel(S)},this.loadLevel=d=>{var b=this.levels[d];return b.morph||b.loaded||b.loading||(b.loading=!0,this._loader.load(b.url,this.lodLoader(b.distance),void 0,void 0,{index:b.index})),b.morph===void 0},this.calculateDistance=function(d){this._parent.getBoundingBox();var b=this._parent.radius,v=0;return d==="far"?v=4.5*b:d==="medium"?v=2.5*b:d=="close"&&(v=0),v},this.containsLevels=()=>!!(this.levels&&1<this.levels.length),this.checkTransparentMesh=()=>{var d=this.levels[this._currentLevel];this._material&&(this._material.transparent?(!this._secondaryMaterial&&(this._secondaryMaterial=this._material.clone(),this._secondaryMaterial.side=c.FrontSide),this._secondaryMaterial.opacity=this._material.opacity,this._secondaryMaterial.emissive&&this._secondaryMaterial.emissive.copy(this._material.emissive),this._secondaryMaterial.needsUpdate=!0,!d.secondaryMesh&&(d.secondaryMesh=new c.Mesh(d.morph.geometry,this._secondaryMaterial),d.secondaryMesh.renderOrder=d.morph.renderOrder+1,d.secondaryMesh.userData=d.morph.userData,d.secondaryMesh.name=d.morph.name),this._material.side=c.BackSide,this._material.needsUpdate=!0,!d.secondaryMesh.parent&&(d.morph.add(d.secondaryMesh),this._parent.animationGroup&&this._parent.animationGroup.add(d.secondaryMesh))):(d.secondaryMesh&&(d.morph.remove(d.secondaryMesh),this._parent.animationGroup&&(this._parent.animationGroup.uncache(d.secondaryMesh),this._parent.animationGroup.remove(d.secondaryMesh))),this._material.side=c.DoubleSide,this._material.needsUpdate=!0))},this.dispose=()=>{this.levels.forEach(d=>{d.morph&&d.morph.geometry&&d.morph.geometry.dispose()}),this._material&&this._material.dispose(),this._secondaryMaterial&&this._secondaryMaterial.dispose()},this.getCurrentLevel=()=>this._currentLevel,this.getCurrentMorph=()=>{var d=this.levels[this._currentLevel];return d&&d.morph?d.morph:this._parent.morph},this.lodLoader=function(d){return b=>{var v=this._material,g={localTimeEnabled:this._parent.timeEnabled,localMorphColour:this._parent.morphColour},w=h(b,g),S=void 0;this._parent.isGeometry?S=new c.Mesh(w,v):this._parent.isLines&&(S=new(u(12)).LineSegments(w,v)),S.userData=this._parent,S.renderOrder=this._renderOrder,b.dispose(),this.levelLoaded(S,d)}},this.updateMorphColorAttribute=d=>{if(this._material&&(this._material.vertexColors==c.VertexColors||this._material.vertexColors==!0))if(d){var b=this.getCurrentMorph();f(b.geometry,b)}else this.levels.forEach(v=>{v.morph&&v.morph.geometry&&f(v.morph.geometry,v.morph)})},this.setColour=d=>{this._material.color=d,this._secondaryMaterial&&(this._secondaryMaterial.color=d),m()},this.setFrustumCulled=d=>{this.levels.forEach(b=>{b.morph&&(b.morph.frustumCulled=d),b.secondaryMesh&&(b.secondaryMesh.frustumCulled=d)})},this.setMaterial=d=>{d&&(!this._material||this._material.id!==d.id)&&(this._material=d,this._secondaryMaterial&&this._secondaryMaterial.dispose(),this._secondaryMaterial=d.clone(),this._secondaryMaterial.side=c.FrontSide,this._secondaryMaterial.transparent=!0,this.levels.forEach(b=>{b.morph&&(b.morph.material=this._material,b.morph.geometry&&(b.morph.geometry.colorsNeedUpdate=!0)),b.secondaryMesh&&(b.secondaryMesh.material=this._secondaryMaterial)}))},this.setName=d=>{this.levels.forEach(b=>{b.morph&&(b.morph.name=d),b.secondaryMesh&&(b.secondaryMesh.name=d)})},this.setRenderOrder=d=>{this._renderOrder=d,this.levels.forEach(b=>{b.morph&&(b.morph.renderOrder=d),b.secondaryMesh&&(b.secondaryMesh.renderOrder=d)})},this.setVertexColors=d=>{this._material.vertexColors=d,m(),this._secondaryMaterial&&(this._secondaryMaterial.vertexColors=d)},this.update=(d,b)=>{var v=this.levels;if(1<v.length){var g,w,S=d.cameraObject.position.distanceTo(b),E=-1,M=-1;for(g=0,w=v.length;g<w&&S>=v[g].distance;g++)v[g].morph?(-1<E&&v[E].morph&&(v[E].morph.visible=!1),E=g,v[g].morph.visible=!0,M=-1):M=g;for(-1<M&&this.loadLevel(M);g<w;g++)v[g].morph&&(-1<E?v[g].morph.visible=!1:(v[g].morph.visible=!0,E=g));this._currentLevel!=E&&(this._currentLevel=E,this.checkTransparentMesh())}},this.toggleMarker=(d,b)=>{this.levels.forEach(v=>{v.morph&&(b?v.morph.add(d):v.morph.remove(d))})};var m=()=>{this.levels.forEach(d=>{d.morph&&d.morph.geometry&&(d.morph.geometry.colorsNeedUpdate=!0)})}};l.LOD=p},(o,l,u)=>{u.r(l),u.d(l,{LineSegments:()=>y});var c=u(13),f=u(4),h=new f.Vector3,p=new f.Vector3;class y extends c.Line{constructor(d,b){super(d,b),this.type="LineSegments"}computeLineDistances(){var d=this.geometry;if(!d.isBufferGeometry)d.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(d.index===null){for(var b=d.attributes.position,v=[],g=0,w=b.count;g<w;g+=2)h.fromBufferAttribute(b,g),p.fromBufferAttribute(b,g+1),v[g]=g==0?0:v[g-1],v[g+1]=v[g]+h.distanceTo(p);d.setAttribute("lineDistance",new f.Float32BufferAttribute(v,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}y.prototype.isLineSegments=!0},(o,l,u)=>{u.r(l),u.d(l,{Line:()=>w});var c=u(4),f=new c.Vector3,h=new c.Vector3,p=new c.Matrix4,y=new c.Ray,m=new c.Sphere,d=new c.Vector3,b=new c.Vector3,v=new c.Vector3,g=new c.Vector3;class w extends c.Object3D{constructor(){var M=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,_=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.LineBasicMaterial;super(),this.type="Line",this.geometry=M,this.material=_,this.updateMorphTargets()}copy(M){return super.copy(M),this.material=M.material,this.geometry=M.geometry,this}computeLineDistances(){var M=this.geometry;if(!M.isBufferGeometry)M.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");else if(M.index===null){for(var _=M.attributes.position,C=[0],I=1,T=_.count;I<T;I++)f.fromBufferAttribute(_,I-1),h.fromBufferAttribute(_,I),C[I]=C[I-1],C[I]+=f.distanceTo(h);M.setAttribute("lineDistance",new c.Float32BufferAttribute(C,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(M,_){var C=this.geometry,I=this.matrixWorld,T=M.params.Line.threshold,P=C.drawRange,A=C.morphAttributes.position;if(C.boundingSphere===null&&C.computeBoundingSphere(),m.copy(C.boundingSphere),m.applyMatrix4(I),m.radius+=T,M.ray.intersectsSphere(m)!==!1){p.copy(I).invert(),y.copy(M.ray).applyMatrix4(p);var R=T/((this.scale.x+this.scale.y+this.scale.z)/3),L=R*R,N=new c.Vector3,x=new c.Vector3,O=new c.Vector3,B=new c.Vector3,D=this.isLineSegments?2:1;if(C.isBufferGeometry){var z=C.index,U=C.attributes,H=U.position;if(z!==null)for(var Y=Math.max(0,P.start),ie=Math.min(z.count,P.start+P.count),ae=Y;ae<ie-1;ae+=D){var ee=z.getX(ae),oe=z.getX(ae+1);S(N,x,this,H,A,ee,oe);var j=y.distanceSqToSegment(N,x,B,O);if(!(j>L)){B.applyMatrix4(this.matrixWorld);var K=M.ray.origin.distanceTo(B);K<M.near||K>M.far||_.push({distance:K,point:O.clone().applyMatrix4(this.matrixWorld),index:ae,face:null,faceIndex:null,object:this})}}else for(var $=Math.max(0,P.start),re=Math.min(H.count,P.start+P.count),G=$;G<re-1;G+=D){S(N,x,this,H,A,G,G+1);var W=y.distanceSqToSegment(N,x,B,O);if(!(W>L)){B.applyMatrix4(this.matrixWorld);var F=M.ray.origin.distanceTo(B);F<M.near||F>M.far||_.push({distance:F,point:O.clone().applyMatrix4(this.matrixWorld),index:G,face:null,faceIndex:null,object:this})}}}else C.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var M=this.geometry;if(M.isBufferGeometry){var _=M.morphAttributes,C=Object.keys(_);if(0<C.length){var I=_[C[0]];if(I!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var T,P=0,A=I.length;P<A;P++)T=I[P].name||P+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[T]=P}}}else{var R=M.morphTargets;R!==void 0&&0<R.length&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function S(E,M,_,C,I,T,P){E.fromBufferAttribute(C,T),M.fromBufferAttribute(C,P);var A=_.morphTargetInfluences;if(_.material.morphTargets&&I&&A){d.set(0,0,0),b.set(0,0,0);for(var R=0,L=I.length;R<L;R++){var N=A[R],x=I[R];N!==0&&(v.fromBufferAttribute(x,T),g.fromBufferAttribute(x,P),d.addScaledVector(v.sub(E),N),b.addScaledVector(g.sub(M),N))}E.add(d),M.add(b)}}w.prototype.isLine=!0},(o,l,u)=>{var c=u(4),f=new Image(128,128);f.src=u(15);var h=new c.Texture;h.image=f,h.needsUpdate=!0;var p=[.02,.03,1],y=new c.SpriteMaterial({map:h,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),m=u(5).createNewSpriteText,d=function(b){u(10).ZincObject.call(this),this.texture=h;var v=void 0,g=void 0,w=void 0,S=void 0,E=void 0,M=!0;this.morph=new c.Group,this.group=this.morph,this.parent=b,this.isMarker=!0;var _=!1;this.ndc=new c.Vector3;var C=void 0,I=void 0,T=()=>{v=new c.Sprite(y),v.center.set(.5,0),this.morph.add(v),this.morph.position.set(0,0,0),this.morph.renderOrder=1e4,v.scale.set(p[0],p[1],p[2]),v.userData=this};this.updateVisual=(P,A)=>{var R=1,L=0;P!==A&&(L=1-(this.ndc.z-P)/(A-P),R=.6+.4*L),this.setSpriteSize(R)},this.updateNDC=P=>(this.ndc.copy(this.morph.position),this.ndc.project(P),this.ndc.z=Math.min(Math.max(this.ndc.z,0),1),this.ndc),this.setPosition=(P,A,R)=>{this.morph.position.set(P,A,R)},this.setSpriteSize=P=>{v.scale.set(.015,.02,1),v.scale.multiplyScalar(P)},this.setUserSprite=()=>{S&&(this.morph.add(S),M&&(this.morph.remove(v),I&&this.morph.remove(I),M=!1))},this.setImageForUserSprite=(P,A)=>{S&&(this.morph.remove(S),S=void 0),g&&g.dispose(),w&&w.dispose(),g=new c.Texture,g.image=P,g.needsUpdate=!0,w=new c.SpriteMaterial({map:g,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),A||(A=[.05,.05,1]),S=new c.Sprite(w),S.center.set(.5,0),S.scale.set(A[0],A[1],A[2]),S.userData=this,this.setUserSprite()},this.setDefaultSprite=()=>{M||(M=!0,this.morph.add(v),S&&this.morph.remove(S),I&&this.morph.add(I))},this.loadUserSprite=(P,A)=>{if(P)if(P!==E){E=P;var R=new Image(128,128);R.crossOrigin="anonymous",R.onload=()=>{this.setImageForUserSprite(R,A)},R.src=P}else this.setUserSprite()},this.dispose=()=>{this.morph&&this.morph.clear(),v&&(v.clear(),v=void 0),I&&(I.material.map.dispose(),I.material.dispose(),I=void 0)},this.isEnabled=()=>_,this.setNumber=P=>{(!P||C!=P)&&I&&(this.morph.remove(I),I.material.map.dispose(),I.material.dispose(),I=void 0),!I&&P&&(I=m(P,.012,"black","Asap",120,700),this.morph.add(I)),C=P},this.getNumber=()=>C||1,this.setVisibility=function(P){P!==this.visible&&(this.visible=P,this.group.visible=P,this.parent.region&&(this.parent.region.pickableUpdateRequired=!0))},this.enable=()=>{_=!0,this.morph.visible=!0,this.visible=!0},this.disable=()=>{_=!1,this.morph.visible=!1,this.visible=!1},T()};d.prototype=Object.create(u(10).ZincObject.prototype),l.Marker=d},o=>{o.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMzY1IiBoZWlnaHQ9IjU2MCIgdmlld0JveD0iMCAwIDM2NSA1NjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGRlc2M+Q3JlYXRlZCB3aXRoIEZhYnJpYy5qcyA1LjIuNDwvZGVzYz4NCjxkZWZzPg0KPC9kZWZzPg0KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCAwKSIgaWQ9IjgwOGVkMjgzLTI1MjQtNDQwZi04OGFlLTNiZGI0N2JiNTc0OSIgID4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgMTgyLjUgMjgwKSIgaWQ9ImRiMzA0MTNkLTViZmYtNGI5OC1hYjU5LTQ2NDQ5N2VlMTk5ZSIgID4NCjxyZWN0IHN0eWxlPSJzdHJva2U6IG5vbmU7IHN0cm9rZS13aWR0aDogMTsgc3Ryb2tlLWRhc2hhcnJheTogbm9uZTsgc3Ryb2tlLWxpbmVjYXA6IGJ1dHQ7IHN0cm9rZS1kYXNob2Zmc2V0OiAwOyBzdHJva2UtbGluZWpvaW46IG1pdGVyOyBzdHJva2UtbWl0ZXJsaW1pdDogNDsgZmlsbDogcmdiKDI1NSwyNTUsMjU1KTsgZmlsbC1ydWxlOiBub256ZXJvOyBvcGFjaXR5OiAxOyB2aXNpYmlsaXR5OiBoaWRkZW47IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB4PSItMTgyLjUiIHk9Ii0yODAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjM2NSIgaGVpZ2h0PSI1NjAiIC8+DQo8L2c+DQo8ZyB0cmFuc2Zvcm09Im1hdHJpeCgwIDAgMCAwIDAgOTcuNSkiICA+DQo8ZyBzdHlsZT0iIiAgID4NCjwvZz4NCjwvZz4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCA5Ny41KSIgID4NCjxnIHN0eWxlPSIiICAgPg0KPC9nPg0KPC9nPg0KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMC45OSAwIDAgMC45OSAxODIuNSAyODApIiAgPg0KPGcgc3R5bGU9IiIgdmVjdG9yLWVmZmVjdD0ibm9uLXNjYWxpbmctc3Ryb2tlIiAgID4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMjU1LDI1NSwyNTUpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IHZpc2liaWxpdHk6IGhpZGRlbjsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIHg9Ii01NDAiIHk9Ii01NDAiIHJ4PSIwIiByeT0iMCIgd2lkdGg9IjEwODAiIGhlaWdodD0iMTA4MCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAwIDApIiAgPg0KPHBhdGggc3R5bGU9InN0cm9rZTogcmdiKDAsMCwwKTsgc3Ryb2tlLXdpZHRoOiAwOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBmaWxsOiByZ2IoMCw4OSwxMTYpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB2ZWN0b3ItZWZmZWN0PSJub24tc2NhbGluZy1zdHJva2UiICB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE4Mi45LCAtMjc5Ljg1KSIgZD0iTSAxODIuOSA1NTEuNyBDIDE4Mi45IDU1MS44MDAwMDAwMDAwMDAxIDE4My4xIDU1MiAxODMuMSA1NTIgQyAxODMuMSA1NTIgMzU4LjMgMjgzIDM1OC4zIDE5NC42IEMgMzU4LjMgNjQuNSAyNjkuNSA3LjkwMDAwMDAwMDAwMDAwNiAxODIuOSA3LjY5OTk5OTk5OTk5OTk4OSBDIDk2LjMgNy45IDcuNSA2NC41IDcuNSAxOTQuNiBDIDcuNSAyODMgMTgyLjggNTUyIDE4Mi44IDU1MiBDIDE4Mi44IDU1MiAxODIuOSA1NTEuNyAxODIuOSA1NTEuNyB6IE0gMTIyLjIgMTg3LjIgQyAxMjIuMiAxNTMuNiAxNDkuNCAxMjYuMzk5OTk5OTk5OTk5OTkgMTgzIDEyNi4zOTk5OTk5OTk5OTk5OSBDIDIxNi42IDEyNi4zOTk5OTk5OTk5OTk5OSAyNDMuOCAxNTMuNiAyNDMuOCAxODcuMiBDIDI0My44IDIyMC43OTk5OTk5OTk5OTk5OCAyMTYuNSAyNDggMTgyLjkgMjQ4IEMgMTQ5LjQgMjQ4IDEyMi4yIDIyMC44IDEyMi4yIDE4Ny4yIHoiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMy44MiAwIDAgMy44MiAwIC0xMDAuNzcpIiAgPg0KPGNpcmNsZSBzdHlsZT0ic3Ryb2tlOiByZ2IoMCwwLDApOyBzdHJva2Utd2lkdGg6IDA7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGZpbGw6IHJnYigyNTUsMjU1LDI1NSk7IGZpbGwtcnVsZTogbm9uemVybzsgb3BhY2l0eTogMTsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIGN4PSIwIiBjeT0iMCIgcj0iMzUiIC8+DQo8L2c+DQo8L2c+DQo8L2c+DQo8L3N2Zz4="},(o,l,u)=>{var c=u(4),f=function(h,p,y,m){u(10).ZincObject.call(this);var d;p&&(d=p.clone(),d.vertexColors=c.FaceColors),this.id=y;var b=void 0,v=void 0;this.isGlyph=!0;var g=[0,0,0];this.fromMesh=w=>!!(w&&w.isMesh)&&(this.morph=w.clone(),this.morph.userData=this,this.group.add(this.morph),!0),h&&d&&this.fromMesh(new c.Mesh(h,d)),this.getGlyphset=function(){return m},this.setLabel=w=>{w&&(typeof w=="string"||w instanceof String)&&(v=w,this.morph&&(this.morph.name=w))},this.showLabel=w=>{b&&(g=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0),v&&(typeof v=="string"||v instanceof String)&&(b=new(u(17)).Label(v,w),b.setPosition(g[0],g[1],g[2]),this.group.add(b.getSprite()))},this.hideLabel=()=>{b&&(g=b.getPosition(),this.group.remove(b.getSprite()),b.dispose(),b=void 0)},this.getLabel=()=>v,this.getMesh=()=>this.morph,this.setTransformation=(w,S,E,M)=>{this.morph&&(this.morph.matrix.elements[0]=S[0],this.morph.matrix.elements[1]=S[1],this.morph.matrix.elements[2]=S[2],this.morph.matrix.elements[3]=0,this.morph.matrix.elements[4]=E[0],this.morph.matrix.elements[5]=E[1],this.morph.matrix.elements[6]=E[2],this.morph.matrix.elements[7]=0,this.morph.matrix.elements[8]=M[0],this.morph.matrix.elements[9]=M[1],this.morph.matrix.elements[10]=M[2],this.morph.matrix.elements[11]=0,this.morph.matrix.elements[12]=w[0],this.morph.matrix.elements[13]=w[1],this.morph.matrix.elements[14]=w[2],this.morph.matrix.elements[15]=1,this.morph.matrixAutoUpdate=!1),g=[...w],b&&b.setPosition(w[0],w[1],w[2])},this.setColour=w=>{b&&b.setColour(w),this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.color=colour),this.geometry&&(this.geometry.colorsNeedUpdate=!0)},this.dispose=()=>{this.material&&this.material.dispose(),this.morph=void 0}};f.prototype=Object.create(u(10).ZincObject.prototype),l.Glyph=f},(o,l,u)=>{var c=u(7).default;l.Label=function(f,h){var p=f,y=void 0;y=h?new c(p,.015,h.getStyle()):new c(p,.015),y.fontFace="Asap",y.fontWeight=700,y.material.map.generateMipmaps=!1,y.material.sizeAttenuation=!1,y.center.x=-.05,y.center.y=0,this.getPosition=()=>y?[y.position.x,y.position.y,y.position.z]:[0,0,0],this.setPosition=(m,d,b)=>{y&&y.position.set(m,d,b)},this.setColour=m=>{y.color=m.getStyle()},this.setScale=m=>{y&&0<m&&y.scale.set(m,m,1)},this.dispose=()=>{},this.getSprite=()=>y,this.getString=()=>p}},(o,l,u)=>{var c=u(4),f=u(19).JSONLoader,h=function(){u(10).ZincObject.call(this);var p=[],y=void 0,m=void 0,d=void 0,b=void 0,v=void 0,g=void 0,w=void 0,S=0,E=0,M=[0,0,0],_=[0,0,0],C=[0,0,0],I="NONE";this.ready=!1;var T=!1,P=!1;this.isGlyphset=!0;var A=new c.Matrix4,R=new c.Color,L=new c.Color,N=new c.Box3,x=new c.Box3,O=new c.Box3,B=[],D=[],z=[],U=[],H=[],Y=[],ie=[];this.globalScale=1;for(var ae=0;8>ae;ae++)new c.Vector3;this.load=(G,W,F,X,J)=>{y=G.axis1,m=G.axis2,d=G.axis3,b=G.positions,v=G.scale,g=G.colors,w=G.label,T=G.metadata.MorphColours,P=G.metadata.MorphVertices,S=G.metadata.number_of_time_steps,I=G.metadata.repeat_mode,E=G.metadata.number_of_vertices,I=="AXES_2D"||I=="MIRROR"?E*=2:I=="AXES_3D"&&(E*=3),M=G.metadata.base_size,_=G.metadata.offset,C=G.metadata.scale_factors;var V=new f;this.geometry=new c.BufferGeometry;var k=new c.InstancedMesh(this.geometry,void 0,E);if(this.setMorph(k),X){var te=V.parse(W);re(F,J)(te.geometry,te.materials),te.geometry.dispose()}else V.crossOrigin="Anonymous",V.load(W,re(F,J))};var ee=(G,W,F,X,J,V)=>{if(I=="NONE"||I=="MIRROR"){for(var k,te=[0,0,0],se=[0,0,0],le=[0,0,0],fe=[0,0,0],we=[0,0,0],be=[0,0,0],de=[0,0,0],ye=[0,0,0],ne=[0,0,0],he=0;3>he;he++)k=0>J[he]?-1:1,te[he]=(k*M[he]+J[he]*C[he])*this.globalScale;for(var he=0;3>he;he++)se[he]=W[he]*te[0],le[he]=F[he]*te[1],fe[he]=X[he]*te[2],we[he]=G[he]+_[0]*se[he]+_[1]*le[he]+_[2]*fe[he],I=="MIRROR"&&(be[he]=-se[he],de[he]=-le[he],ye[he]=-fe[he],ne[he]=we[he],0>J[0]&&(we[he]-=se[he],ne[he]-=be[he]));0>fe[0]*(se[1]*le[2]-se[2]*le[1])+fe[1]*(se[2]*le[0]-se[0]*le[2])+fe[2]*(se[0]*le[1]-se[1]*le[0])&&(fe[0]=-fe[0],fe[1]=-fe[1],fe[2]=-fe[2]),V[0]=[we,se,le,fe],I=="MIRROR"&&(0>ye[0]*(be[1]*de[2]-be[2]*de[1])+ye[1]*(be[2]*de[0]-be[0]*de[2])+ye[2]*(be[0]*de[1]-be[1]*de[0])&&(ye[0]=-ye[0],ye[1]=-ye[1],ye[2]=-ye[2]),V[1]=[ne,be,de,ye])}else if(I=="AXES_2D"||I=="AXES_3D"){for(var k,me=[0,0,0],Re=[0,0,0],he=0;3>he;he++)k=0>J[he]?-1:1,me[he]=(k*M[0]+J[he]*C[0])*this.globalScale;for(var he=0;3>he;he++)Re[he]=G[he]+_[0]*me[0]*W[he]+_[1]*me[1]*F[he]+_[2]*me[2]*X[he];for(var Te=glyph_repeat_mode=="AXES_2D"?2:3,De=0;De<Te;De++){var Ye=void 0,ze=void 0,st=J[De],Ce=[0,0,0],He=[0,0,0],Ge=[0,0,0];De==0?(Ye=W,ze=F):De==1?(Ye=F,ze=glyph_repeat_mode=="AXES_2D"?W:X):(Ye=X,ze=W);var Ot=(M[0]+st*C[0])*this.globalScale;Ce[0]=Ye[0]*Ot,Ce[1]=Ye[1]*Ot,Ce[2]=Ye[2]*Ot,Ge[0]=Ce[1]*ze[2]-ze[1]*Ce[2],Ge[1]=Ce[2]*ze[0]-ze[2]*Ce[0],Ge[2]=Ce[0]*ze[1]-Ce[1]*ze[0];var Nt=Math.sqrt(Ge[0]*Ge[0]+Ge[1]*Ge[1]+Ge[2]*Ge[2]);if(0<Nt){var mt=(M[2]+st*C[2])*this.globalScale/Nt;I=="AXES_2D"&&0<De&&(mt*=-1),Ge[0]*=mt,Ge[1]*=mt,Ge[2]*=mt}if(He[0]=Ge[1]*Ce[2]-Ce[1]*Ge[2],He[1]=Ge[2]*Ce[0]-Ce[2]*Ge[0],He[2]=Ge[0]*Ce[1]-Ge[1]*Ce[0],Nt=Math.sqrt(He[0]*He[0]+He[1]*He[1]+He[2]*He[2]),0<Nt){var xt=(M[1]+st*C[1])*this.globalScale/Nt;He[0]*=xt,He[1]*=xt,He[2]*=xt}V[De]=[Re,Ce,He,Ge]}}return V},oe=(G,W,F,X,J)=>{var V=1;I=="AXES_2D"||I=="MIRROR"?V=2:I=="AXES_3D"&&(V=3);var k=G.length/3,te=0;ie.length=V;for(var se=0;se<k;se++){var le=3*se,fe=[G[le],G[le+1],G[le+2]],we=[W[le],W[le+1],W[le+2]],be=[F[le],F[le+1],F[le+2]],de=[X[le],X[le+1],X[le+2]],ye=[J[le],J[le+1],J[le+2]],ne=ee(fe,we,be,de,ye,ie);if(ne.length==V)for(var he=0;he<V;he++){A.elements[0]=ne[he][1][0],A.elements[1]=ne[he][1][1],A.elements[2]=ne[he][1][2],A.elements[3]=0,A.elements[4]=ne[he][2][0],A.elements[5]=ne[he][2][1],A.elements[6]=ne[he][2][2],A.elements[7]=0,A.elements[8]=ne[he][3][0],A.elements[9]=ne[he][3][1],A.elements[10]=ne[he][3][2],A.elements[11]=0,A.elements[12]=ne[he][0][0],A.elements[13]=ne[he][0][1],A.elements[14]=ne[he][0][2],A.elements[15]=1,this.morph.setMatrixAt(te,A);var me=p[te];me&&me.setTransformation(ne[he][0],ne[he][1],ne[he][2],ne[he][3]),te++}}this.morph.instanceMatrix.needsUpdate=!0},j=G=>{var W=1;I=="AXES_2D"||I=="MIRROR"?W=2:I=="AXES_3D"&&(W=3);for(var F,X=G.length,J=0,V=0;V<X;V++){F=G[V];for(var k=0;k<W;k++){R.setHex(F),this.morph.setColorAt(J,R);var te=p[J];te&&te.setColour(R),J++}}this.morph.instanceColor.needsUpdate=!0},K=()=>{var G=B,W=D,F=z,X=U,J=H,V=Y,k=this.inbuildTime/this.duration*(S-1),te=Math.floor(k),se=1-(k-te),le=Math.ceil(k);if(P){var fe=b[te.toString()],we=b[le.toString()],be=y[te.toString()],de=y[le.toString()],ye=m[te.toString()],ne=m[le.toString()],he=d[te.toString()],me=d[le.toString()],Re=v[te.toString()],Te=v[le.toString()];B.length=fe.length,D.length=fe.length,z.length=fe.length,U.length=fe.length,H.length=fe.length;for(var De=0;De<fe.length;De++)G[De]=se*fe[De]+(1-se)*we[De],W[De]=se*be[De]+(1-se)*de[De],F[De]=se*ye[De]+(1-se)*ne[De],X[De]=se*he[De]+(1-se)*me[De],J[De]=se*Re[De]+(1-se)*Te[De]}else G=b[0],W=y[0],F=m[0],X=d[0],J=v[0];if(oe(G,W,F,X,J),this.boundingBoxUpdateRequired=!0,g!=null){if(T){var Ye=g[te.toString()],ze=g[le.toString()];V.length=Ye.length;for(var st=0;st<Ye.length;st++)R.setHex(Ye[st]),L.setHex(ze[st]),R.setRGB(R.r*se+L.r*(1-se),R.g*se+L.g*(1-se),R.b*se+L.b*(1-se)),V[st]=R.getHex()}else V=g[0];j(V)}};this.showLabel=()=>{for(var G=0;G<p.length;G++)p[G].showLabel(this.morph.material?this.morph.material.color:void 0)},this.hideLabel=()=>{for(var G=0;G<p.length;G++)p[G].hideLabel()};var $=G=>{for(var W=0;W<E;W++){var F=new(u(16)).Glyph(void 0,void 0,W,this),X=w?w[W]:void 0;X=X||this.groupName,X&&F.setLabel(X),0<S&&F.setFrustumCulled(!1),p[W]=F,this.morph.add(F.getGroup())}G&&this.showLabel(),oe(b[0],y[0],m[0],d[0],v[0]),g!=null&&j(g[0]),this.ready=!0,this.boundingBoxUpdateRequired=!0};this.addCustomGlyph=G=>{G.isGlyph&&p.push(G),this.ready=!0,this.boundingBoxUpdateRequired=!0},this.addMeshAsGlyph=(G,W)=>{if(G.isMesh){var F=new(u(16)).Glyph(void 0,void 0,W,this);return F.fromMesh(G),p.push(F),this.morph.add(F.getGroup()),this.ready=!0,this.boundingBoxUpdateRequired=!0,F}},this.forEachGlyph=G=>{for(var W=0;W<p.length;W++)G(p[W])};var re=(G,W)=>(F,X)=>{var J=F.toBufferGeometry();this.geometry.copy(J),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),J.dispose(),X&&X[0]&&(this.morph.material=X[0]),$(W),this.morph.name=this.groupName,this.morph.userData=this,this.setMorph(this.morph),F.dispose(),G!=null&&typeof G=="function"&&G(this)};this.getClosestVertexIndex=function(){var G=-1;if(this.morph&&this.ready){this.getBoundingBox().getCenter(this._v1);for(var W,F=b[0],X=F.length/3,J=-1,V=0,k=0;k<X;k++)W=3*k,this._v2.set(F[W],F[W+1],F[W+2]),V=this._v1.distanceTo(this._v2),(J==-1||J>V)&&(J=V,G=k)}return G},this.getClosestVertex=function(){if(this.closestVertexIndex==-1&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex&&this.morph){var G=new c.Vector3;return this.morph.getMatrixAt(this.closestVertexIndex,A),G.setFromMatrixPosition(A),G}},this.getBoundingBox=()=>{if(this.morph&&this.ready&&this.morph.visible){if(this.boundingBoxUpdateRequired){N.setFromBufferAttribute(this.morph.geometry.attributes.position);for(var G=0;G<E;G++)this.morph.getMatrixAt(G,A),x.copy(N).applyMatrix4(A),G==0?O.copy(x):O.union(x);if(O)this.cachedBoundingBox.copy(O),this.morph.updateWorldMatrix(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1;else return}return this.cachedBoundingBox}},this.setMorphTime=G=>{this.inbuildTime=G>this.duration?this.duration:0>G?0:G,(T||P)&&(K(),P&&(this.markerUpdateRequired=!0))},this.isTimeVarying=()=>!!((this.ready===!1||0<S)&&(T||P)),this.getCurrentTime=()=>this.inbuildTime,this.setScaleAll=function(G){this.globalScale=G,K()},this.dispose=()=>{for(var G=p.length-1;0<=G;G--)p[G].dispose();this.geometry&&this.geometry.dispose(),this.morph&&this.morph.material.dispose(),y=void 0,m=void 0,d=void 0,b=void 0,v=void 0,g=void 0,this.ready=!1,this.groupName=void 0},this.render=(G,W,F)=>{if(W==!0){var X=this.inbuildTime+G;X>this.duration&&(X-=this.duration),this.inbuildTime=X,(T||P)&&K()}this.updateMarker(W,F)}};h.prototype=Object.create(u(10).ZincObject.prototype),l.Glyphset=h},(o,l,u)=>{u.r(l),u.d(l,{JSONLoader:()=>M});var c=u(4),f=u(20).Loader,h=c.LoaderUtils,p=c.AnimationClip,y=c.Vector3,m=c.Vector4,d=c.Color,b=c.Vector2,v=u(6).Face3,g=u(6).Geometry,w=c.FileLoader,S=c.DefaultLoadingManager,E=u(21).VideoHandler;function M(_){typeof _=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),_=void 0),this.manager=_===void 0?S:_,this.withCredentials=!1,this.paramsString=""}Object.assign(M.prototype,{load:function(C,I,T,P){var A=this,R=this.texturePath&&typeof this.texturePath=="string"?this.texturePath:h.extractUrlBase(C),L=new w(this.manager);C.split("?"),this.paramsString=C.length===2?paramsStrings[1]:"",L.setWithCredentials(this.withCredentials),L.load(C,function(N){var x;try{x=JSON.parse(N)}catch{if(console.error("The loader has encountered an error while parsing the content of a resource."),P)return void P({responseURL:C})}var O=x.metadata;if(O!==void 0){var B=O.type;if(B!==void 0&&B.toLowerCase()==="object")return void console.error("THREE.JSONLoader: "+C+" should be loaded with THREE.ObjectLoader instead.")}if(A&&A.parse){var D=A.parse(x,R);I(D.geometry,D.materials)}},T,P)},setTexturePath:function(C){this.texturePath=C},parse:function(){function _(P,A){function R(he,me){return he&1<<me}var L,N,x,O,B,D,z,U,H,Y,ie,ae,ee,oe,j,K,$,re,G,W,F,X,J,V,k,te,se,le=P.faces,fe=P.vertices,we=P.normals,be=P.colors,de=P.scale,ye=0;if(P.uvs!==void 0){for(L=0;L<P.uvs.length;L++)P.uvs[L].length&&ye++;for(L=0;L<ye;L++)A.faceVertexUvs[L]=[]}for(O=0,B=fe.length;O<B;)re=new y,re.x=fe[O++]*de,re.y=fe[O++]*de,re.z=fe[O++]*de,A.vertices.push(re);if(O=0,B=le.length,P.uvs)for(L=0;L<P.uvs.length;L++){A.uvs[L]=[];for(var ne=0;ne<P.uvs[L].length;ne++)A.uvs[L][ne]=P.uvs[L][ne]}if(we)for(L=0;L<we.length;L++)A.normals[L]=we[L];if(be)for(L=0;L<be.length;L++)A.colors[L]=be[L];for(;O<B;)if(Y=le[O++],ie=R(Y,0),ae=R(Y,1),ee=R(Y,3),oe=R(Y,4),j=R(Y,5),K=R(Y,6),$=R(Y,7),ie){if(W=new v,W.a=le[O],W.b=le[O+1],W.c=le[O+3],F=new v,F.a=le[O+1],F.b=le[O+2],F.c=le[O+3],O+=4,ae&&(H=le[O++],W.materialIndex=H,F.materialIndex=H),x=A.faces.length,ee)for(L=0;L<ye;L++)for(V=P.uvs[L],A.faceVertexUvs[L][x]=[],A.faceVertexUvs[L][x+1]=[],N=0;4>N;N++)U=le[O++],te=V[2*U],se=V[2*U+1],k=new b(te,se),N!==2&&A.faceVertexUvs[L][x].push(k),N!==0&&A.faceVertexUvs[L][x+1].push(k);if(oe&&(z=3*le[O++],W.normal.set(we[z++],we[z++],we[z]),F.normal.copy(W.normal)),j)for(L=0;4>L;L++)z=3*le[O++],J=new y(we[z++],we[z++],we[z]),L!==2&&W.vertexNormals.push(J),L!==0&&F.vertexNormals.push(J);if(K&&(D=le[O++],X=be[D],W.color.setHex(X),F.color.setHex(X)),$)for(L=0;4>L;L++)D=le[O++],X=be[D],L!==2&&W.vertexColors.push(new d(X)),L!==0&&F.vertexColors.push(new d(X));A.faces.push(W),A.faces.push(F)}else{if(G=new v,G.a=le[O++],G.b=le[O++],G.c=le[O++],ae&&(H=le[O++],G.materialIndex=H),x=A.faces.length,ee)for(L=0;L<ye;L++)for(V=P.uvs[L],A.faceVertexUvs[L][x]=[],N=0;3>N;N++)U=le[O++],te=V[2*U],se=V[2*U+1],k=new b(te,se),A.faceVertexUvs[L][x].push(k);if(oe&&(z=3*le[O++],G.normal.set(we[z++],we[z++],we[z])),j)for(L=0;3>L;L++)z=3*le[O++],J=new y(we[z++],we[z++],we[z]),G.vertexNormals.push(J);if(K&&(D=le[O++],G.color.setHex(be[D])),$)for(L=0;3>L;L++)D=le[O++],G.vertexColors.push(new d(be[D]));A.faces.push(G)}}function C(P,A){var R=P.influencesPerVertex===void 0?2:P.influencesPerVertex;if(P.skinWeights)for(var L=0,N=P.skinWeights.length;L<N;L+=R){var x=P.skinWeights[L],O=1<R?P.skinWeights[L+1]:0,B=2<R?P.skinWeights[L+2]:0,D=3<R?P.skinWeights[L+3]:0;A.skinWeights.push(new m(x,O,B,D))}if(P.skinIndices)for(var L=0,N=P.skinIndices.length;L<N;L+=R){var z=P.skinIndices[L],U=1<R?P.skinIndices[L+1]:0,H=2<R?P.skinIndices[L+2]:0,Y=3<R?P.skinIndices[L+3]:0;A.skinIndices.push(new m(z,U,H,Y))}A.bones=P.bones,A.bones&&0<A.bones.length&&(A.skinWeights.length!==A.skinIndices.length||A.skinIndices.length!==A.vertices.length)&&console.warn("When skinning, number of vertices ("+A.vertices.length+"), skinIndices ("+A.skinIndices.length+"), and skinWeights ("+A.skinWeights.length+") should match.")}function I(P,A){var R=P.scale;if(P.morphTargets!==void 0)for(var L=0,N=P.morphTargets.length;L<N;L++){A.morphTargets[L]={},A.morphTargets[L].name=P.morphTargets[L].name,A.morphTargets[L].vertices=[];for(var x,O=A.morphTargets[L].vertices,B=P.morphTargets[L].vertices,D=0,z=B.length;D<z;D+=3)x=new y,x.x=B[D]*R,x.y=B[D+1]*R,x.z=B[D+2]*R,O.push(x)}if(P.morphNormals!==void 0){for(var L=0,N=P.morphNormals.length;L<N;L++)if(A.morphTargets[L]){A.morphTargets[L].normals=[];for(var U,H=A.morphTargets[L].normals,Y=P.morphNormals[L].normals,D=0,z=Y.length;D<z;D+=3)U=new y,U.x=Y[D],U.y=Y[D+1],U.z=Y[D+2],H.push(U);A.morphNormalsReady=!0}}if(P.morphColors!==void 0){var L,N,ie,ae,ee,oe,j;for(L=0,N=P.morphColors.length;L<N;L++)for(A.morphColors[L]={},A.morphColors[L].name=P.morphColors[L].name,A.morphColors[L].colors=[],ee=A.morphColors[L].colors,oe=P.morphColors[L].colors,ie=0,ae=oe.length;ie<ae;ie+=3)j=new c.Color(16755200),j.setRGB(oe[ie],oe[ie+1],oe[ie+2]),ee.push(j)}}function T(P,A){var R=[],L=[];P.animation!==void 0&&L.push(P.animation),P.animations!==void 0&&(P.animations.length?L=L.concat(P.animations):L.push(P.animations));for(var N,x=0;x<L.length;x++)N=p.parseAnimation(L[x],A.bones),N&&R.push(N);if(A.morphTargets){var O=p.CreateClipsFromMorphTargetSequences(A.morphTargets,10);R=R.concat(O)}0<R.length&&(A.animations=R)}return function(P,A){P.data!==void 0&&(P=P.data),P.scale=P.scale===void 0?1:1/P.scale;var R=new g;if(R.morphColors=[],_(P,R),C(P,R),I(P,R),T(P,R),R.computeFaceNormals(),R.computeBoundingSphere(),P.materials===void 0||P.materials.length===0)return{geometry:R};var L=f.prototype.initMaterials(P.materials,A,"Anonymous");if(P.materials[0].video){var N=A+P.materials[0].video;this.paramsString&&(N+="?".concat(this.paramsString));var x=new E(N);R._video=x}return L&&0<L.length&&(L[0].side=P.materials[0].singleSided?c.FrontSide:P.materials[0].flipSided?c.BackSide:c.DoubleSide,P.materials[0].specularCoef&&(L[0].shininess=Math.floor(P.materials[0].specularCoef/3))),{geometry:R,materials:L}}}()})},(o,l,u)=>{u.r(l),u.d(l,{Loader:()=>f});var c=u(4);u(4);function f(){}f.Handlers={handlers:[],add:function(p,y){this.handlers.push(p,y)},get:function(p){for(var y=this.handlers,m=0,d=y.length;m<d;m+=2){var b=y[m],v=y[m+1];if(b.test(p))return v}return null}},Object.assign(f.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(p,y,m){for(var d=[],b=0;b<p.length;++b)d[b]=this.createMaterial(p[b],y,m);return d},createMaterial:function(){var h={NoBlending:c.NoBlending,NormalBlending:c.NormalBlending,AdditiveBlending:c.AdditiveBlending,SubtractiveBlending:c.SubtractiveBlending,MultiplyBlending:c.MultiplyBlending,CustomBlending:c.CustomBlending},p=new c.Color,y=new c.TextureLoader,m=new c.MaterialLoader;return function(d,b,v){function g(_,C,I,T,P){var A,R=b+_,L=f.Handlers.get(R);L===null?(y.setCrossOrigin(v),A=y.load(R)):A=L.load(R),C!==void 0&&(A.repeat.fromArray(C),C[0]!==1&&(A.wrapS=c.RepeatWrapping),C[1]!==1&&(A.wrapT=c.RepeatWrapping)),I!==void 0&&A.offset.fromArray(I),T!==void 0&&(T[0]==="repeat"&&(A.wrapS=c.RepeatWrapping),T[0]==="mirror"&&(A.wrapS=c.MirroredRepeatWrapping),T[1]==="repeat"&&(A.wrapT=c.RepeatWrapping),T[1]==="mirror"&&(A.wrapT=c.MirroredRepeatWrapping)),P!==void 0&&(A.anisotropy=P);var N=c.MathUtils.generateUUID();return w[N]=A,N}var w={},S={uuid:c.MathUtils.generateUUID(),type:"MeshLambertMaterial"};for(var E in d){var M=d[E];switch(E){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":S.name=M;break;case"blending":S.blending=h[M];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",E,"is no longer supported.");break;case"colorDiffuse":S.color=p.fromArray(M).getHex();break;case"colorSpecular":S.specular=p.fromArray(M).getHex();break;case"colorEmissive":S.emissive=p.fromArray(M).getHex();break;case"specularCoef":S.shininess=M;break;case"shading":M.toLowerCase()==="basic"&&(S.type="MeshBasicMaterial"),M.toLowerCase()==="phong"&&(S.type="MeshPhongMaterial"),M.toLowerCase()==="standard"&&(S.type="MeshStandardMaterial");break;case"mapDiffuse":S.map=g(M,d.mapDiffuseRepeat,d.mapDiffuseOffset,d.mapDiffuseWrap,d.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":S.emissiveMap=g(M,d.mapEmissiveRepeat,d.mapEmissiveOffset,d.mapEmissiveWrap,d.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":S.lightMap=g(M,d.mapLightRepeat,d.mapLightOffset,d.mapLightWrap,d.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":S.aoMap=g(M,d.mapAORepeat,d.mapAOOffset,d.mapAOWrap,d.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":S.bumpMap=g(M,d.mapBumpRepeat,d.mapBumpOffset,d.mapBumpWrap,d.mapBumpAnisotropy);break;case"mapBumpScale":S.bumpScale=M;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":S.normalMap=g(M,d.mapNormalRepeat,d.mapNormalOffset,d.mapNormalWrap,d.mapNormalAnisotropy);break;case"mapNormalFactor":S.normalScale=M;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":S.specularMap=g(M,d.mapSpecularRepeat,d.mapSpecularOffset,d.mapSpecularWrap,d.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":S.metalnessMap=g(M,d.mapMetalnessRepeat,d.mapMetalnessOffset,d.mapMetalnessWrap,d.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":S.roughnessMap=g(M,d.mapRoughnessRepeat,d.mapRoughnessOffset,d.mapRoughnessWrap,d.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":S.alphaMap=g(M,d.mapAlphaRepeat,d.mapAlphaOffset,d.mapAlphaWrap,d.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":S.side=c.BackSide;break;case"doubleSided":S.side=c.DoubleSide;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),S.opacity=M;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":S[E]=M;break;case"vertexColors":M===!0&&(S.vertexColors=c.VertexColors),M==="face"&&(S.vertexColors=c.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",E,M)}}return S.type==="MeshBasicMaterial"&&delete S.emissive,S.type!=="MeshPhongMaterial"&&delete S.specular,1>S.opacity&&(S.transparent=!0),m.setTextures(w),m.parse(S)}}()})},(o,l,u)=>{var c=u(4);l.VideoHandler=function(f){var h=this;this.video=void 0,this.videoTexture=void 0,this.setMorphTime=function(p,y){var m=p/y*h.video.duration;h.video.currentTime=m},this.getVideoDuration=function(){return h.video.duration},this.createCanvasVideoTexture=function(){return h.videoTexture=new c.VideoTexture(h.video),h.videoTexture.minFilter=c.LinearFilter,h.videoTexture.magFilter=c.LinearFilter,h.videoTexture.format=c.RGBFormat,h.video.currentTime=0,h.videoTexture},this.getCurrentTime=function(p){return h.video?p*(h.video.currentTime/h.video.duration):0},this.isReadyToPlay=function(){return!!(h.video&&3<=h.video.readyState)},function(){document&&(h.video=document.createElement("video"),h.video.crossOrigin="anonymous",h.video.src=f,h.video.load(),h.video.loop=!0)}()}},(o,l,u)=>{var c=u(4),f=u(23).Points,h=u(5).toBufferGeometry,p=u(5).getCircularTexture,y=u(17).Label,m=function(){u(10).ZincObject.call(this),this.isPointset=!0;var d=[];this.createMesh=(v,g,w)=>{if(v&&g){var S=h(v,w),E=p();g.map=E;var M=new f(S,g);this.setMesh(M,w.localTimeEnabled,w.localMorphColour)}};var b=(v,g,w,S)=>{if(w){var E=new c.Color(S),M=new y(w,E);M.setPosition(g[0],g[1],g[2]);var _=M.getSprite();_.material.sizeAttenuation=!1,_.material.alphaTest=.5,_.material.transparent=!0,_.material.depthWrite=!1,_.material.depthTest=!1,this.group.add(_),d[v]=M}};this.addPoints=(v,g,w)=>{if(v&&0<v.length){var S=this.drawRange-1,E=this.addVertices(v),M=this.getMorph();if(!M){var _=new c.PointsMaterial({alphaTest:.5,size:10,color:w,sizeAttenuation:!1});E.colorsNeedUpdate=!0,this.createMesh(E,_,{localTimeEnabled:!1,localMorphColour:!1})}var C=S+v.length,I=0;if(Array.isArray(g)&&g.length===v.length||typeof g=="string")for(S;S+I<C;){var T=typeof g=="string"?g:g[I];b(I,v[I],T,w),I++}this.region&&(this.region.pickableUpdateRequired=!0)}},this.setSize=v=>{this.morph&&this.morph.material&&(this.morph.material.size=v,this.morph.material.needsUpdate=!0)},this.setSizeAttenuation=v=>{this.morph&&this.morph.material&&(this.morph.material.sizeAttenuation=v,this.morph.material.needsUpdate=!0)},this.getVerticesByIndex=function(v){if(0<=v&&this.drawRange>v){var g=this.getMorph().geometry.getAttribute("position");return[g.getX(v),g.getY(v),g.getZ(v)]}},this.editVertices=function(v,g){if(v&&v.length){var w=this.getMorph(),S=g+v.length-1;if(!w||0>g||S>=this.drawRange)return;var E=w.geometry.getAttribute("position"),M=g;v.forEach(_=>{var C=d[M];C&&C.setPosition(_[0],_[1],_[2]),E.setXYZ(M++,_[0],_[1],_[2])}),E.needsUpdate=!0,this.boundingBoxUpdateRequired=!0}},this.render=(v,g,w,S)=>{this.morph&&w&&(this.morph.sizePerPixel=w.pixelHeight),m.prototype.render.call(this,v,g,w,S)}};m.prototype=Object.create(u(10).ZincObject.prototype),l.Pointset=m},(o,l,u)=>{u.r(l),u.d(l,{Points:()=>b});var c=u(4),f=new c.Matrix4,h=new c.Ray,p=new c.Sphere,y=new c.Vector3,m=new c.Vector3,d=new c.Vector3;class b extends c.Object3D{constructor(){var S=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new c.BufferGeometry,E=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new c.PointsMaterial;super(),this.type="Points",this.geometry=S,this.material=E,this.sizePerPixel=1,this.updateMorphTargets()}copy(S){return super.copy(S),this.material=S.material,this.geometry=S.geometry,this}raycast(S,E){var M=this.geometry,_=this.matrixWorld,C=S.params.Points.threshold,I=M.drawRange;if(M.boundingSphere===null&&M.computeBoundingSphere(),p.copy(M.boundingSphere),p.applyMatrix4(_),p.radius+=C,S.ray.intersectsSphere(p)!==!1){f.copy(_).invert(),h.copy(S.ray).applyMatrix4(f);var T=C/((this.scale.x+this.scale.y+this.scale.z)/3)*this.material.size*this.sizePerPixel,P=T*T;if(M.isBufferGeometry){var A=M.index,R=M.attributes,L=R.position,N=M.morphAttributes.position;if(A!==null)for(var x,O=Math.max(0,I.start),B=Math.min(A.count,I.start+I.count),D=O;D<B;D++)x=A.getX(D),g(this,L,N,x),v(y,x,P,_,S,E,this);else for(var z=Math.max(0,I.start),U=Math.min(L.count,I.start+I.count),H=z;H<U;H++)g(this,L,N,H),v(y,H,P,_,S,E,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}updateMorphTargets(){var S=this.geometry;if(S.isBufferGeometry){var E=S.morphAttributes,M=Object.keys(E);if(0<M.length){var _=E[M[0]];if(_!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var C,I=0,T=_.length;I<T;I++)C=_[I].name||I+"",this.morphTargetInfluences.push(0),this.morphTargetDictionary[C]=I}}}else{var P=S.morphTargets;P!==void 0&&0<P.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}b.prototype.isPoints=!0;function v(w,S,E,M,_,C,I){var T=h.distanceSqToPoint(w);if(T<E){var P=new c.Vector3;h.closestPointToPoint(w,P),P.applyMatrix4(M);var A=_.ray.origin.distanceTo(P);if(A<_.near||A>_.far)return;C.push({distance:A,distanceToRay:Math.sqrt(T),point:P,index:S,face:null,object:I})}}function g(w,S,E,M){y.fromBufferAttribute(S,M);var _=w.morphTargetInfluences;if(w.material.morphTargets&&E&&_){m.set(0,0,0);for(var C=0,I=E.length;C<I;C++){var T=_[C],P=E[C];T!==0&&(d.fromBufferAttribute(P,M),m.addScaledVector(d.sub(y),T))}y.add(m)}}},(o,l,u)=>{var c=u(4),f=u(5).toBufferGeometry,h=function(){u(10).ZincObject.call(this),this.isLines=!0,this.createLineSegment=(p,y,m)=>{if(p&&y){var d=f(p,m);m.localMorphColour&&d.morphAttributes.color&&(y.onBeforeCompile=u(9).augmentMorphColor());var b=new(u(12)).LineSegments(d,y);this.setMesh(b,m.localTimeEnabled,m.localMorphColour)}},this.setWidth=p=>{this.morph&&this.morph.material&&(this.morph.material.linewidth=p,this.morph.material.needsUpdate=!0)},this.addLines=(p,y)=>{if(p&&0<p.length){var m=this.addVertices(p),d=this.getMorph();if(!d){var b=new c.LineBasicMaterial({color:y});m.colorsNeedUpdate=!0,this.createLineSegment(m,b,{localTimeEnabled:!1,localMorphColour:!1})}this.region&&(this.region.pickableUpdateRequired=!0)}}};h.prototype=Object.create(u(10).ZincObject.prototype),l.Lines=h},(o,l,u)=>{function c(y,m,d,b,v,g,w){try{var S=y[g](w),E=S.value}catch(M){return void d(M)}S.done?m(E):Promise.resolve(E).then(b,v)}function f(y){return function(){var m=this,d=arguments;return new Promise(function(b,v){function g(E){c(S,b,v,g,w,"next",E)}function w(E){c(S,b,v,g,w,"throw",E)}var S=y.apply(m,d);g(void 0)})}}var h=u(4),p=function(){var y=this;u(26).Texture.call(this),this.isTextureArray=!0,this.loadFromImages=function(){var m=f(function*(d){var b=1,v=1,g=0;if(d&&d.length){y.isLoading=!0;var w=new Image;w.crossOrigin="Anonymous";for(var S,E=document.createElement("canvas"),M=0,_=Array(d.length),C=0;C<d.length;C++)S=yield y.imageToUint8Array(y,w,d[C],E),S&&S.array&&(b=S.width,v=S.height,_[g]=S.array,M+=_[g].length,g++);var I=new Uint8Array(M);M=0,_.forEach(T=>{I.set(T,M),M+=T.length}),y.impl=new h.DataTexture2DArray(I,b,v,g),y.size={width:b,height:v,depth:g},y.isLoading=!1,y.impl.needsUpdate=!0}});return function(){return m.apply(this,arguments)}}(),this.getMaterial=m=>{if(this.impl){var d;if(!m)d=new h.MeshBasicMaterial({color:new h.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:h.DoubleSide});else if(m.vs&&m.fs){var b=!0;m.transparent&&(b=m.transparent);var v=h.FrontSide;m.side&&(v=m.side),d=new h.ShaderMaterial({transparent:b,uniforms:m.uniforms,vertexShader:m.vs,fragmentShader:m.fs,side:v}),m.glslVersion&&(d.glslVersion=m.glslVersion)}if(d)return d.needsUpdate=!0,d}}};p.prototype=Object.create(u(26).Texture.prototype),l.TextureArray=p},(o,l,u)=>{function c(y,m,d,b,v,g,w){try{var S=y[g](w),E=S.value}catch(M){return void d(M)}S.done?m(E):Promise.resolve(E).then(b,v)}function f(y){return function(){var m=this,d=arguments;return new Promise(function(b,v){function g(E){c(S,b,v,g,w,"next",E)}function w(E){c(S,b,v,g,w,"throw",E)}var S=y.apply(m,d);g(void 0)})}}var h=u(4),p=function(){this.isTexture=!0,this.impl=void 0,this.isLoading=!1,this.size={width:1,height:1,depth:0}};p.prototype.loadImage=function(y,m){return new Promise((d,b)=>{y.onload=()=>d(y),y.onerror=b,y.src=m})},p.prototype.imageToUint8Array=function(){var y=f(function*(m,d,b,v){yield m.loadImage(d,b),v.width=d.width,v.height=d.height;var g=v.getContext("2d");return g.drawImage(d,0,0),{array:new Uint8Array(g.getImageData(0,0,v.width,v.height).data.buffer),width:v.width,height:v.height}});return function(){return y.apply(this,arguments)}}(),p.prototype.loadFromImages=function(){var y=f(function*(){});return function(){return y.apply(this,arguments)}}(),p.prototype.isReady=function(){return!(!this.impl||this.isLoading)},p.prototype.getMaterial=function(){if(this.impl)return new h.MeshBasicMaterial({color:new h.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:h.DoubleSide})},l.Texture=p},(o,l,u)=>{function c(v,g){var w=Object.keys(v);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(v);g&&(S=S.filter(function(E){return Object.getOwnPropertyDescriptor(v,E).enumerable})),w.push.apply(w,S)}return w}function f(v){for(var g,w=1;w<arguments.length;w++)g=arguments[w]==null?{}:arguments[w],w%2?c(Object(g),!0).forEach(function(S){h(v,S,g[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(g)):c(Object(g)).forEach(function(S){Object.defineProperty(v,S,Object.getOwnPropertyDescriptor(g,S))});return v}function h(v,g,w){return g=p(g),g in v?Object.defineProperty(v,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):v[g]=w,v}function p(v){var g=y(v,"string");return typeof g=="symbol"?g:g+""}function y(v,g){if(typeof v!="object"||!v)return v;var w=v[Symbol.toPrimitive];if(w!==void 0){var S=w.call(v,g||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}var m=u(4),d=u(28),b=function(v){u(29).TexturePrimitive.call(this,v),this.isTextureSlides=!0;var g=[],w={};this.morph=new m.Group,this.group=this.morph,this.morph.userData=this;var S=!0;this.createSlides=_=>{_.forEach(C=>this.createSlide(C))};var E=(_,C)=>{var I=_.material,T=I.uniforms;switch(_.rotation.x=0,_.rotation.y=0,_.rotation.z=0,_.position.x=0,_.position.y=0,_.position.z=0,C.direction){case"x":var P=S?-Math.PI/2:Math.PI/2;_.rotation.y=P,T.direction.value=1,T.slide.value.set(C.value,0,0),_.position.x=C.value;break;case"y":_.rotation.x=Math.PI/2,T.direction.value=2,T.slide.value.set(0,C.value,0),_.position.y=C.value;break;case"z":T.direction.value=3,T.slide.value.set(0,0,C.value),_.position.z=C.value;break}I.needsUpdate=!0,this.boundingBoxUpdateRequired=!0};this.modifySlideSettings=_=>{_&&_.id&&_.id in w&&w[_.id]&&E(w[_.id],_)},this.createSlide=_=>{if(this.texture&&this.texture.isTextureArray&&this.texture.isReady()&&_&&_.direction&&_.value!==void 0){var C=new m.PlaneGeometry(1,1);C.translate(.5,.5,0);var I=d.getUniforms();I.diffuse.value=this.texture.impl,I.depth.value=this.texture.size.depth,I.flipY.value=S;var T={fs:d.fs,vs:d.vs,uniforms:I,glslVersion:d.glslVersion,side:m.DoubleSide,transparent:!1},P=this.texture.getMaterial(T);P.needsUpdate=!0;var A=new m.Mesh(C,P);A.name=this.groupName,A.userData=this;var R={value:_.value,direction:_.direction,id:A.id};return g.push(R),E(A,R),w[A.id]=A,this.morph.add(A),this.boundingBoxUpdateRequired=!0,R}},this.getTextureSettings=()=>[...g],this.getTextureSettingsWithId=_=>{for(var C=0;C<g.length;C++)if(_===g[C].id)return f({},g[C])},this.getSlides=()=>this.morph?[...this.morph.children]:[],this.removeSlide=_=>{_&&this.removeSlideWithId(_.id)},this.removeSlideWithId=_=>{if(this.morph&&_ in w&&w[_]){if(this.morph.getObjectById(_)){var C=w[_];this.morph.remove(C),C.clear(),C.geometry&&C.geometry.dispose(),C.material&&C.material.dispose(),this.boundingBoxUpdateRequired=!0}var I=g.findIndex(T=>T.id===_);-1<I&&g.splice(I,1)}},this.dispose=()=>{this.morph.children.forEach(_=>{_.geometry&&_.geometry.dispose(),_.material&&_.material.dispose()}),u(29).TexturePrimitive.prototype.dispose.call(this),this.boundingBoxUpdateRequired=!0};var M=(_,C,I)=>{switch(C.direction.value){case 1:I.copy(C.slide.value),_.expandByPoint(I),I.setY(1),I.setZ(1),_.expandByPoint(I);break;case 2:I.copy(C.slide.value),_.expandByPoint(I),I.setX(1),I.setZ(1),_.expandByPoint(I);break;case 3:I.copy(C.slide.value),_.expandByPoint(I),I.setX(1),I.setY(1),_.expandByPoint(I);break}};this.getBoundingBox=()=>{if(this.morph&&this.morph.children&&this.morph.visible&&this.boundingBoxUpdateRequired){this.cachedBoundingBox.makeEmpty();var _=new m.Vector3(0,0,0);this.morph.children.forEach(C=>{M(this.cachedBoundingBox,C.material.uniforms,_)}),this.morph.updateMatrixWorld(!0,!0),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1}return this.cachedBoundingBox},this.applyTransformation=(_,C,I)=>{var T=new m.Matrix4;T.set(_[0],_[1],_[2],0,_[3],_[4],_[5],0,_[6],_[7],_[8],0,0,0,0,0);var P=new m.Quaternion().setFromRotationMatrix(T);this.morph.position.set(...C),this.morph.quaternion.copy(P),this.morph.scale.set(...I),this.morph.updateMatrix(),this.boundingBoxUpdateRequired=!0},this.initialise=(_,C)=>{if(_){var I=_.locations;I&&0<I.length&&(this.applyTransformation(I[0].orientation,I[0].position,I[0].scale),"flipY"in I[0]&&(S=I[0].flipY)),this.createSlides(_.settings.slides),C!=null&&typeof C=="function"&&C(this)}}};b.prototype=Object.create(u(29).TexturePrimitive.prototype),b.prototype.constructor=b,l.TextureSlides=b},(o,l,u)=>{var c=u(4),f=c.GLSL3,h=`
|
|
3185
3185
|
precision highp float;
|
|
3186
3186
|
precision highp int;
|
|
3187
3187
|
precision highp sampler2DArray;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"vue": "^3.4.21",
|
|
55
55
|
"vue-router": "^4.2.5",
|
|
56
56
|
"vue3-component-svg-sprite": "^0.0.1",
|
|
57
|
-
"zincjs": "^1.12.
|
|
57
|
+
"zincjs": "^1.12.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@vitejs/plugin-vue": "^4.6.2",
|