ss-component-new 1.1.707 → 1.1.708
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index--BKY6t09.js → index-B2ZJJoT9.js} +1 -1
- package/dist/{index-BNFlELdW.cjs → index-BNkTi_Un.cjs} +1 -1
- package/dist/{index-BX997DA0.js → index-BTiKUORz.js} +1 -1
- package/dist/{index-DXCBhoy9.cjs → index-BUkhaqd8.cjs} +1 -1
- package/dist/{index-CAk5h97W.js → index-Bz3Cezt5.js} +1 -1
- package/dist/{index-BqKCUIAh.js → index-C5iB-Jqa.js} +1 -1
- package/dist/{index-BcYG8wjE.cjs → index-CJX26tPy.cjs} +1 -1
- package/dist/{index-CFvDfrn7.cjs → index-CLNkIjl-.cjs} +1 -1
- package/dist/{index-Djy7tVKB.cjs → index-CRQxupO9.cjs} +1 -1
- package/dist/{index-BvHT4_-u.js → index-CZTZmXUb.js} +1 -1
- package/dist/{index-D0Y__qdd.js → index-CZcYAuy-.js} +1 -1
- package/dist/{index-C_0_jtSi.cjs → index-CdYqA8UG.cjs} +1 -1
- package/dist/{index-D6TpnpGO.cjs → index-ChoJA9-j.cjs} +40 -40
- package/dist/{index-BSNZVFKa.js → index-CuB10mRD.js} +2 -2
- package/dist/{index-C968jgil.js → index-D-tQ0jb6.js} +7 -7
- package/dist/{index-Cgxq0tAs.js → index-DAMRPbhU.js} +4 -4
- package/dist/{index-CDe8uAMr.js → index-DAXBDVD_.js} +1 -1
- package/dist/{index-5qBWrSZU.cjs → index-DGJWUlc0.cjs} +1 -1
- package/dist/{index-B9in1by_.js → index-Dc2D3OrH.js} +1 -1
- package/dist/{index-RRvgacXx.cjs → index-Dl7UsRXv.cjs} +1 -1
- package/dist/{index-DWGvYkk9.js → index-Dm9remQj.js} +6203 -6181
- package/dist/{index-SWU-wgRh.js → index-Dr7Fdc81.js} +1 -1
- package/dist/{index-BpxPo5VN.cjs → index-ISxzVDVL.cjs} +1 -1
- package/dist/{index-DlD9sRqq.cjs → index-cn2PPpBp.cjs} +1 -1
- package/dist/{index-ChbTmas3.cjs → index-d_ANkYaS.cjs} +1 -1
- package/dist/{index-CNmvvV-c.cjs → index-lVXpDd-x.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-DZhCOVL9.js → index.vue_vue_type_style_index_0_scoped_8606206c_lang-BiGhmLqK.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-DO2vPyVK.cjs → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DAqIbp0A.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CwX4Xyil.cjs → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Do7w7r05.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-0THhazyL.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-qJpParw9.js} +1 -1
- package/dist/{main-CEEPDwK7.cjs → main-8orFqQ9f.cjs} +1 -1
- package/dist/{main-Dy0la9NS.js → main-ZNwRxRST.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +7 -7
- package/dist/{threeModel-DPwvjltF.cjs → threeModel-B8u76uPb.cjs} +1 -1
- package/dist/{threeModel-DjgnMY8_.js → threeModel-Dx_dcQrK.js} +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const y=require("vue"),
|
|
1
|
+
"use strict";const y=require("vue"),Ve=require("./menu-vml_xHJD.cjs"),Fn=require("./index-Chz6JgEi.cjs"),wn=require("./index-2p69g4HY.cjs"),Qt=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dc6lRgBQ.cjs"),Ci=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),wu=require("./login-CCz_BcJe.cjs");var Tu="[object String]";function Vo(s){return typeof s=="string"||!wn.isArray(s)&&wn.isObjectLike(s)&&wn.baseGetTag(s)==Tu}const Ho=s=>s.match(/\((.*)\)/)[1],Cu={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(s){const e=s,t=y.ref(null),n=y.ref(!1),i=y.ref(null);return y.watch(()=>e==null?void 0:e.isVisible,()=>{n.value=e==null?void 0:e.isVisible},{deep:!0,immediate:!0}),y.watch(()=>i.value,()=>{y.nextTick(()=>{var r,o;(o=(r=t.value)==null?void 0:r.updatePopper)==null||o.call(r)})},{deep:!0,immediate:!0}),(r,o)=>{const a=y.resolveComponent("el-popover");return y.openBlock(),y.createBlock(a,{visible:n.value,title:e==null?void 0:e.title,placement:e==null?void 0:e.placement,width:e==null?void 0:e.width,ref_key:"popOverRef",ref:t},{reference:y.withCtx(()=>[y.createElementVNode("div",null,[y.renderSlot(r.$slots,"reference",{ref_key:"referenceRef",ref:i})])]),default:y.withCtx(()=>[y.createElementVNode("div",null,[y.renderSlot(r.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/const Vl="177",Ti={ROTATE:0,DOLLY:1,PAN:2},Is={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Ru=0,vc=1,Du=2,v0=1,Hl=2,Si=3,Qn=0,In=1,pn=2,Wi=0,Bs=1,yc=2,xc=3,Mc=4,Lu=5,rs=100,Pu=101,Fu=102,Nu=103,Uu=104,Iu=200,zu=201,Bu=202,Ou=203,Go=204,Wo=205,ku=206,Vu=207,Hu=208,Gu=209,Wu=210,Xu=211,ju=212,qu=213,$u=214,Xo=0,jo=1,qo=2,Hs=3,$o=4,Yo=5,Jo=6,Ko=7,Fa=0,Yu=1,Ju=2,Xi=0,Ku=1,Zu=2,Qu=3,Gl=4,e2=5,t2=6,n2=7,bc="attached",i2="detached",y0=300,Gs=301,Ws=302,Zo=303,Qo=304,Na=306,di=1e3,ri=1001,el=1002,jn=1003,s2=1004,wr=1005,Xn=1006,Xa=1007,Ai=1008,mi=1009,x0=1010,M0=1011,_r=1012,Wl=1013,hs=1014,fi=1015,Sr=1016,Xl=1017,jl=1018,vr=1020,b0=35902,S0=1021,E0=1022,Zn=1023,yr=1026,xr=1027,A0=1028,ql=1029,w0=1030,$l=1031,Yl=1033,ga=33776,_a=33777,va=33778,ya=33779,tl=35840,nl=35841,il=35842,sl=35843,rl=36196,al=37492,ol=37496,ll=37808,cl=37809,hl=37810,ul=37811,dl=37812,fl=37813,pl=37814,ml=37815,gl=37816,_l=37817,vl=37818,yl=37819,xl=37820,Ml=37821,xa=36492,bl=36494,Sl=36495,T0=36283,El=36284,Al=36285,wl=36286,Ea=2300,Tl=2301,ja=2302,Sc=2400,Ec=2401,Ac=2402,r2=2500,a2=3200,o2=3201,Ua=0,l2=1,Hi="",qt="srgb",Xs="srgb-linear",Aa="linear",an="srgb",ms=7680,wc=519,c2=512,h2=513,u2=514,C0=515,d2=516,f2=517,p2=518,m2=519,Cl=35044,Tc="300 es",wi=2e3,wa=2001;class ds{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const i=n[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let r=0,o=i.length;r<o;r++)i[r].call(this,e);e.target=null}}}const Rn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Cc=1234567;const dr=Math.PI/180,js=180/Math.PI;function ai(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Rn[s&255]+Rn[s>>8&255]+Rn[s>>16&255]+Rn[s>>24&255]+"-"+Rn[e&255]+Rn[e>>8&255]+"-"+Rn[e>>16&15|64]+Rn[e>>24&255]+"-"+Rn[t&63|128]+Rn[t>>8&255]+"-"+Rn[t>>16&255]+Rn[t>>24&255]+Rn[n&255]+Rn[n>>8&255]+Rn[n>>16&255]+Rn[n>>24&255]).toLowerCase()}function Vt(s,e,t){return Math.max(e,Math.min(t,s))}function Jl(s,e){return(s%e+e)%e}function g2(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function _2(s,e,t){return s!==e?(t-s)/(e-s):0}function fr(s,e,t){return(1-t)*s+t*e}function v2(s,e,t,n){return fr(s,e,1-Math.exp(-t*n))}function y2(s,e=1){return e-Math.abs(Jl(s,e*2)-e)}function x2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function M2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function b2(s,e){return s+Math.floor(Math.random()*(e-s+1))}function S2(s,e){return s+Math.random()*(e-s)}function E2(s){return s*(.5-Math.random())}function A2(s){s!==void 0&&(Cc=s);let e=Cc+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function w2(s){return s*dr}function T2(s){return s*js}function C2(s){return(s&s-1)===0&&s!==0}function R2(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function D2(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function L2(s,e,t,n,i){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+n)/2),d=o((e+n)/2),m=r((e-n)/2),u=o((e-n)/2),h=r((n-e)/2),g=o((n-e)/2);switch(i){case"XYX":s.set(a*d,l*m,l*u,a*c);break;case"YZY":s.set(l*u,a*d,l*m,a*c);break;case"ZXZ":s.set(l*m,l*u,a*d,a*c);break;case"XZX":s.set(a*d,l*g,l*h,a*c);break;case"YXY":s.set(l*h,a*d,l*g,a*c);break;case"ZYZ":s.set(l*g,l*h,a*d,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function si(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function tn(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}const Ei={DEG2RAD:dr,RAD2DEG:js,generateUUID:ai,clamp:Vt,euclideanModulo:Jl,mapLinear:g2,inverseLerp:_2,lerp:fr,damp:v2,pingpong:y2,smoothstep:x2,smootherstep:M2,randInt:b2,randFloat:S2,randFloatSpread:E2,seededRandom:A2,degToRad:w2,radToDeg:T2,isPowerOfTwo:C2,ceilPowerOfTwo:R2,floorPowerOfTwo:D2,setQuaternionFromProperEuler:L2,normalize:tn,denormalize:si};class et{constructor(e=0,t=0){et.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*n-o*i+e.x,this.y=r*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Vn{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,o,a){let l=n[i+0],c=n[i+1],d=n[i+2],m=n[i+3];const u=r[o+0],h=r[o+1],g=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m;return}if(a===1){e[t+0]=u,e[t+1]=h,e[t+2]=g,e[t+3]=_;return}if(m!==_||l!==u||c!==h||d!==g){let p=1-a;const f=l*u+c*h+d*g+m*_,v=f>=0?1:-1,b=1-f*f;if(b>Number.EPSILON){const F=Math.sqrt(b),C=Math.atan2(F,f*v);p=Math.sin(p*C)/F,a=Math.sin(a*C)/F}const S=a*v;if(l=l*p+u*S,c=c*p+h*S,d=d*p+g*S,m=m*p+_*S,p===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+m*m);l*=F,c*=F,d*=F,m*=F}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m}static multiplyQuaternionsFlat(e,t,n,i,r,o){const a=n[i],l=n[i+1],c=n[i+2],d=n[i+3],m=r[o],u=r[o+1],h=r[o+2],g=r[o+3];return e[t]=a*g+d*m+l*h-c*u,e[t+1]=l*g+d*u+c*m-a*h,e[t+2]=c*g+d*h+a*u-l*m,e[t+3]=d*g-a*m-l*u-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(i/2),m=a(r/2),u=l(n/2),h=l(i/2),g=l(r/2);switch(o){case"XYZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"YXZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"ZXY":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"ZYX":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"YZX":this._x=u*d*m+c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m-u*h*g;break;case"XZY":this._x=u*d*m-c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m+u*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],d=t[6],m=t[10],u=n+a+m;if(u>0){const h=.5/Math.sqrt(u+1);this._w=.25/h,this._x=(d-l)*h,this._y=(r-c)*h,this._z=(o-i)*h}else if(n>a&&n>m){const h=2*Math.sqrt(1+n-a-m);this._w=(d-l)/h,this._x=.25*h,this._y=(i+o)/h,this._z=(r+c)/h}else if(a>m){const h=2*Math.sqrt(1+a-n-m);this._w=(r-c)/h,this._x=(i+o)/h,this._y=.25*h,this._z=(l+d)/h}else{const h=2*Math.sqrt(1+m-n-a);this._w=(o-i)/h,this._x=(r+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vt(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+o*a+i*c-r*l,this._y=i*d+o*l+r*a-n*c,this._z=r*d+o*c+n*l-i*a,this._w=o*d-n*a-i*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+n*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const h=1-t;return this._w=h*o+t*this._w,this._x=h*n+t*this._x,this._y=h*i+t*this._y,this._z=h*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),d=Math.atan2(c,a),m=Math.sin((1-t)*d)/c,u=Math.sin(t*d)/c;return this._w=o*m+this._w*u,this._x=n*m+this._x*u,this._y=i*m+this._y*u,this._z=r*m+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class I{constructor(e=0,t=0,n=0){I.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Rc.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rc.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*n),d=2*(a*t-r*i),m=2*(r*n-o*t);return this.x=t+l*c+o*m-a*d,this.y=n+l*d+a*c-r*m,this.z=i+l*m+r*d-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=i*l-r*a,this.y=r*o-n*l,this.z=n*a-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qa.copy(this).projectOnVector(e),this.sub(qa)}reflect(e){return this.sub(qa.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const qa=new I,Rc=new Vn;class kt{constructor(e,t,n,i,r,o,a,l,c){kt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c)}set(e,t,n,i,r,o,a,l,c){const d=this.elements;return d[0]=e,d[1]=i,d[2]=a,d[3]=t,d[4]=r,d[5]=l,d[6]=n,d[7]=o,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],d=n[4],m=n[7],u=n[2],h=n[5],g=n[8],_=i[0],p=i[3],f=i[6],v=i[1],b=i[4],S=i[7],F=i[2],C=i[5],R=i[8];return r[0]=o*_+a*v+l*F,r[3]=o*p+a*b+l*C,r[6]=o*f+a*S+l*R,r[1]=c*_+d*v+m*F,r[4]=c*p+d*b+m*C,r[7]=c*f+d*S+m*R,r[2]=u*_+h*v+g*F,r[5]=u*p+h*b+g*C,r[8]=u*f+h*S+g*R,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*o*d-t*a*c-n*r*d+n*a*l+i*r*c-i*o*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=d*o-a*c,u=a*l-d*r,h=c*r-o*l,g=t*m+n*u+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=m*_,e[1]=(i*c-d*n)*_,e[2]=(a*n-i*o)*_,e[3]=u*_,e[4]=(d*t-i*l)*_,e[5]=(i*r-a*t)*_,e[6]=h*_,e[7]=(n*l-c*t)*_,e[8]=(o*t-n*r)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply($a.makeScale(e,t)),this}rotate(e){return this.premultiply($a.makeRotation(-e)),this}translate(e,t){return this.premultiply($a.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const $a=new kt;function R0(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}function Mr(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function P2(){const s=Mr("canvas");return s.style.display="block",s}const Dc={};function Os(s){s in Dc||(Dc[s]=!0,console.warn(s))}function F2(s,e,t){return new Promise(function(n,i){function r(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:i();break;case s.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}function N2(s){const e=s.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function U2(s){const e=s.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const Lc=new kt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Pc=new kt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function I2(){const s={enabled:!0,workingColorSpace:Xs,spaces:{},convert:function(i,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===an&&(i.r=Ci(i.r),i.g=Ci(i.g),i.b=Ci(i.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[r].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===an&&(i.r=ks(i.r),i.g=ks(i.g),i.b=ks(i.b))),i},workingToColorSpace:function(i,r){return this.convert(i,this.workingColorSpace,r)},colorSpaceToWorking:function(i,r){return this.convert(i,r,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Hi?Aa:this.spaces[i].transfer},getLuminanceCoefficients:function(i,r=this.workingColorSpace){return i.fromArray(this.spaces[r].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,r,o){return i.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(i,r)},toWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(i,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return s.define({[Xs]:{primaries:e,whitePoint:n,transfer:Aa,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:qt},outputColorSpaceConfig:{drawingBufferColorSpace:qt}},[qt]:{primaries:e,whitePoint:n,transfer:an,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:qt}}}),s}const Gt=I2();function Ci(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function ks(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}let gs;class z2{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{gs===void 0&&(gs=Mr("canvas")),gs.width=e.width,gs.height=e.height;const i=gs.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=gs}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Mr("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o<r.length;o++)r[o]=Ci(r[o]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Ci(t[n]/255)*255):t[n]=Ci(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let B2=0;class Kl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:B2++}),this.uuid=ai(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?r.push(Ya(i[o].image)):r.push(Ya(i[o]))}else r=Ya(i);n.url=r}return t||(e.images[this.uuid]=n),n}}function Ya(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?z2.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let O2=0;const Ja=new I;class Tn extends ds{constructor(e=Tn.DEFAULT_IMAGE,t=Tn.DEFAULT_MAPPING,n=ri,i=ri,r=Xn,o=Ai,a=Zn,l=mi,c=Tn.DEFAULT_ANISOTROPY,d=Hi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:O2++}),this.uuid=ai(),this.name="",this.source=new Kl(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new et(0,0),this.repeat=new et(1,1),this.center=new et(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new kt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Ja).x}get height(){return this.source.getSize(Ja).y}get depth(){return this.source.getSize(Ja).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==y0)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case di:e.x=e.x-Math.floor(e.x);break;case ri:e.x=e.x<0?0:1;break;case el:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case di:e.y=e.y-Math.floor(e.y);break;case ri:e.y=e.y<0?0:1;break;case el:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Tn.DEFAULT_IMAGE=null;Tn.DEFAULT_MAPPING=y0;Tn.DEFAULT_ANISOTROPY=1;class Xt{constructor(e=0,t=0,n=0,i=1){Xt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r;const l=e.elements,c=l[0],d=l[4],m=l[8],u=l[1],h=l[5],g=l[9],_=l[2],p=l[6],f=l[10];if(Math.abs(d-u)<.01&&Math.abs(m-_)<.01&&Math.abs(g-p)<.01){if(Math.abs(d+u)<.1&&Math.abs(m+_)<.1&&Math.abs(g+p)<.1&&Math.abs(c+h+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,S=(h+1)/2,F=(f+1)/2,C=(d+u)/4,R=(m+_)/4,P=(g+p)/4;return b>S&&b>F?b<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(b),i=C/n,r=R/n):S>F?S<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),n=C/i,r=P/i):F<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(F),n=R/r,i=P/r),this.set(n,i,r,t),this}let v=Math.sqrt((p-g)*(p-g)+(m-_)*(m-_)+(u-d)*(u-d));return Math.abs(v)<.001&&(v=1),this.x=(p-g)/v,this.y=(m-_)/v,this.z=(u-d)/v,this.w=Math.acos((c+h+f-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class k2 extends ds{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Xn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Xt(0,0,e,t),this.scissorTest=!1,this.viewport=new Xt(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new Tn(i);this.textures=[];const o=n.count;for(let a=0;a<o;a++)this.textures[a]=r.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:Xn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,this.textures[i].isArrayTexture=this.textures[i].image.depth>1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const i=Object.assign({},e.textures[t].image);this.textures[t].source=new Kl(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class us extends k2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class D0 extends Tn{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=jn,this.minFilter=jn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class V2 extends Tn{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=jn,this.minFilter=jn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Fn{constructor(e=new I(1/0,1/0,1/0),t=new I(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ti.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ti.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=ti.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=r.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,ti):ti.fromBufferAttribute(r,o),ti.applyMatrix4(e.matrixWorld),this.expandByPoint(ti);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Tr.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Tr.copy(n.boundingBox)),Tr.applyMatrix4(e.matrixWorld),this.union(Tr)}const i=e.children;for(let r=0,o=i.length;r<o;r++)this.expandByObject(i[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ti),ti.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(er),Cr.subVectors(this.max,er),_s.subVectors(e.a,er),vs.subVectors(e.b,er),ys.subVectors(e.c,er),Ui.subVectors(vs,_s),Ii.subVectors(ys,vs),Ji.subVectors(_s,ys);let t=[0,-Ui.z,Ui.y,0,-Ii.z,Ii.y,0,-Ji.z,Ji.y,Ui.z,0,-Ui.x,Ii.z,0,-Ii.x,Ji.z,0,-Ji.x,-Ui.y,Ui.x,0,-Ii.y,Ii.x,0,-Ji.y,Ji.x,0];return!Ka(t,_s,vs,ys,Cr)||(t=[1,0,0,0,1,0,0,0,1],!Ka(t,_s,vs,ys,Cr))?!1:(Rr.crossVectors(Ui,Ii),t=[Rr.x,Rr.y,Rr.z],Ka(t,_s,vs,ys,Cr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ti).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ti).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_i[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_i[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_i[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_i[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_i[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_i[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_i[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_i[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_i),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const _i=[new I,new I,new I,new I,new I,new I,new I,new I],ti=new I,Tr=new Fn,_s=new I,vs=new I,ys=new I,Ui=new I,Ii=new I,Ji=new I,er=new I,Cr=new I,Rr=new I,Ki=new I;function Ka(s,e,t,n,i){for(let r=0,o=s.length-3;r<=o;r+=3){Ki.fromArray(s,r);const a=i.x*Math.abs(Ki.x)+i.y*Math.abs(Ki.y)+i.z*Math.abs(Ki.z),l=e.dot(Ki),c=t.dot(Ki),d=n.dot(Ki);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const H2=new Fn,tr=new I,Za=new I;class Fi{constructor(e=new I,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):H2.setFromPoints(e).getCenter(n);let i=0;for(let r=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;tr.subVectors(e,this.center);const t=tr.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(tr,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Za.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tr.copy(e.center).add(Za)),this.expandByPoint(tr.copy(e.center).sub(Za))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const vi=new I,Qa=new I,Dr=new I,zi=new I,eo=new I,Lr=new I,to=new I;class Ys{constructor(e=new I,t=new I(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,vi)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=vi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(vi.copy(this.origin).addScaledVector(this.direction,t),vi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Qa.copy(e).add(t).multiplyScalar(.5),Dr.copy(t).sub(e).normalize(),zi.copy(this.origin).sub(Qa);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Dr),a=zi.dot(this.direction),l=-zi.dot(Dr),c=zi.lengthSq(),d=Math.abs(1-o*o);let m,u,h,g;if(d>0)if(m=o*l-a,u=o*a-l,g=r*d,m>=0)if(u>=-g)if(u<=g){const _=1/d;m*=_,u*=_,h=m*(m+o*u+2*a)+u*(o*m+u+2*l)+c}else u=r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u=-r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u<=-g?(m=Math.max(0,-(-o*r+a)),u=m>0?-r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c):u<=g?(m=0,u=Math.min(Math.max(-r,-l),r),h=u*(u+2*l)+c):(m=Math.max(0,-(o*r+a)),u=m>0?r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c);else u=o>0?-r:r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,m),i&&i.copy(Qa).addScaledVector(Dr,u),h}intersectSphere(e,t){vi.subVectors(e.center,this.origin);const n=vi.dot(this.direction),i=vi.dot(vi)-n*n,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,o,a,l;const c=1/this.direction.x,d=1/this.direction.y,m=1/this.direction.z,u=this.origin;return c>=0?(n=(e.min.x-u.x)*c,i=(e.max.x-u.x)*c):(n=(e.max.x-u.x)*c,i=(e.min.x-u.x)*c),d>=0?(r=(e.min.y-u.y)*d,o=(e.max.y-u.y)*d):(r=(e.max.y-u.y)*d,o=(e.min.y-u.y)*d),n>o||r>i||((r>n||isNaN(n))&&(n=r),(o<i||isNaN(i))&&(i=o),m>=0?(a=(e.min.z-u.z)*m,l=(e.max.z-u.z)*m):(a=(e.max.z-u.z)*m,l=(e.min.z-u.z)*m),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,vi)!==null}intersectTriangle(e,t,n,i,r){eo.subVectors(t,e),Lr.subVectors(n,e),to.crossVectors(eo,Lr);let o=this.direction.dot(to),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;zi.subVectors(this.origin,e);const l=a*this.direction.dot(Lr.crossVectors(zi,Lr));if(l<0)return null;const c=a*this.direction.dot(eo.cross(zi));if(c<0||l+c>o)return null;const d=-a*zi.dot(to);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Et{constructor(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p){Et.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p)}set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p){const f=this.elements;return f[0]=e,f[4]=t,f[8]=n,f[12]=i,f[1]=r,f[5]=o,f[9]=a,f[13]=l,f[2]=c,f[6]=d,f[10]=m,f[14]=u,f[3]=h,f[7]=g,f[11]=_,f[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Et().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/xs.setFromMatrixColumn(e,0).length(),r=1/xs.setFromMatrixColumn(e,1).length(),o=1/xs.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,r=e.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(r),m=Math.sin(r);if(e.order==="XYZ"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=-l*m,t[8]=c,t[1]=h+g*c,t[5]=u-_*c,t[9]=-a*l,t[2]=_-u*c,t[6]=g+h*c,t[10]=o*l}else if(e.order==="YXZ"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u+_*a,t[4]=g*a-h,t[8]=o*c,t[1]=o*m,t[5]=o*d,t[9]=-a,t[2]=h*a-g,t[6]=_+u*a,t[10]=o*l}else if(e.order==="ZXY"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u-_*a,t[4]=-o*m,t[8]=g+h*a,t[1]=h+g*a,t[5]=o*d,t[9]=_-u*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=g*c-h,t[8]=u*c+_,t[1]=l*m,t[5]=_*c+u,t[9]=h*c-g,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=_-u*m,t[8]=g*m+h,t[1]=m,t[5]=o*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*m+g,t[10]=u-_*m}else if(e.order==="XZY"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=-m,t[8]=c*d,t[1]=u*m+_,t[5]=o*d,t[9]=h*m-g,t[2]=g*m-h,t[6]=a*d,t[10]=_*m+u}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(G2,e,W2)}lookAt(e,t,n){const i=this.elements;return Gn.subVectors(e,t),Gn.lengthSq()===0&&(Gn.z=1),Gn.normalize(),Bi.crossVectors(n,Gn),Bi.lengthSq()===0&&(Math.abs(n.z)===1?Gn.x+=1e-4:Gn.z+=1e-4,Gn.normalize(),Bi.crossVectors(n,Gn)),Bi.normalize(),Pr.crossVectors(Gn,Bi),i[0]=Bi.x,i[4]=Pr.x,i[8]=Gn.x,i[1]=Bi.y,i[5]=Pr.y,i[9]=Gn.y,i[2]=Bi.z,i[6]=Pr.z,i[10]=Gn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],d=n[1],m=n[5],u=n[9],h=n[13],g=n[2],_=n[6],p=n[10],f=n[14],v=n[3],b=n[7],S=n[11],F=n[15],C=i[0],R=i[4],P=i[8],A=i[12],E=i[1],L=i[5],B=i[9],H=i[13],Q=i[2],ae=i[6],G=i[10],le=i[14],Z=i[3],ve=i[7],Ee=i[11],be=i[15];return r[0]=o*C+a*E+l*Q+c*Z,r[4]=o*R+a*L+l*ae+c*ve,r[8]=o*P+a*B+l*G+c*Ee,r[12]=o*A+a*H+l*le+c*be,r[1]=d*C+m*E+u*Q+h*Z,r[5]=d*R+m*L+u*ae+h*ve,r[9]=d*P+m*B+u*G+h*Ee,r[13]=d*A+m*H+u*le+h*be,r[2]=g*C+_*E+p*Q+f*Z,r[6]=g*R+_*L+p*ae+f*ve,r[10]=g*P+_*B+p*G+f*Ee,r[14]=g*A+_*H+p*le+f*be,r[3]=v*C+b*E+S*Q+F*Z,r[7]=v*R+b*L+S*ae+F*ve,r[11]=v*P+b*B+S*G+F*Ee,r[15]=v*A+b*H+S*le+F*be,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],d=e[2],m=e[6],u=e[10],h=e[14],g=e[3],_=e[7],p=e[11],f=e[15];return g*(+r*l*m-i*c*m-r*a*u+n*c*u+i*a*h-n*l*h)+_*(+t*l*h-t*c*u+r*o*u-i*o*h+i*c*d-r*l*d)+p*(+t*c*m-t*a*h-r*o*m+n*o*h+r*a*d-n*c*d)+f*(-i*a*d-t*l*m+t*a*u+i*o*m-n*o*u+n*l*d)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=e[9],u=e[10],h=e[11],g=e[12],_=e[13],p=e[14],f=e[15],v=m*p*c-_*u*c+_*l*h-a*p*h-m*l*f+a*u*f,b=g*u*c-d*p*c-g*l*h+o*p*h+d*l*f-o*u*f,S=d*_*c-g*m*c+g*a*h-o*_*h-d*a*f+o*m*f,F=g*m*l-d*_*l-g*a*u+o*_*u+d*a*p-o*m*p,C=t*v+n*b+i*S+r*F;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/C;return e[0]=v*R,e[1]=(_*u*r-m*p*r-_*i*h+n*p*h+m*i*f-n*u*f)*R,e[2]=(a*p*r-_*l*r+_*i*c-n*p*c-a*i*f+n*l*f)*R,e[3]=(m*l*r-a*u*r-m*i*c+n*u*c+a*i*h-n*l*h)*R,e[4]=b*R,e[5]=(d*p*r-g*u*r+g*i*h-t*p*h-d*i*f+t*u*f)*R,e[6]=(g*l*r-o*p*r-g*i*c+t*p*c+o*i*f-t*l*f)*R,e[7]=(o*u*r-d*l*r+d*i*c-t*u*c-o*i*h+t*l*h)*R,e[8]=S*R,e[9]=(g*m*r-d*_*r-g*n*h+t*_*h+d*n*f-t*m*f)*R,e[10]=(o*_*r-g*a*r+g*n*c-t*_*c-o*n*f+t*a*f)*R,e[11]=(d*a*r-o*m*r-d*n*c+t*m*c+o*n*h-t*a*h)*R,e[12]=F*R,e[13]=(d*_*i-g*m*i+g*n*u-t*_*u-d*n*p+t*m*p)*R,e[14]=(g*a*i-o*_*i-g*n*l+t*_*l+o*n*p-t*a*p)*R,e[15]=(o*m*i-d*a*i+d*n*l-t*m*l-o*n*u+t*a*u)*R,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,o=e.x,a=e.y,l=e.z,c=r*o,d=r*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,d*a+n,d*l-i*o,0,c*l-i*a,d*l+i*o,r*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,o){return this.set(1,n,r,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,d=o+o,m=a+a,u=r*c,h=r*d,g=r*m,_=o*d,p=o*m,f=a*m,v=l*c,b=l*d,S=l*m,F=n.x,C=n.y,R=n.z;return i[0]=(1-(_+f))*F,i[1]=(h+S)*F,i[2]=(g-b)*F,i[3]=0,i[4]=(h-S)*C,i[5]=(1-(u+f))*C,i[6]=(p+v)*C,i[7]=0,i[8]=(g+b)*R,i[9]=(p-v)*R,i[10]=(1-(u+_))*R,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=xs.set(i[0],i[1],i[2]).length();const o=xs.set(i[4],i[5],i[6]).length(),a=xs.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],ni.copy(this);const c=1/r,d=1/o,m=1/a;return ni.elements[0]*=c,ni.elements[1]*=c,ni.elements[2]*=c,ni.elements[4]*=d,ni.elements[5]*=d,ni.elements[6]*=d,ni.elements[8]*=m,ni.elements[9]*=m,ni.elements[10]*=m,t.setFromRotationMatrix(ni),n.x=r,n.y=o,n.z=a,this}makePerspective(e,t,n,i,r,o,a=wi){const l=this.elements,c=2*r/(t-e),d=2*r/(n-i),m=(t+e)/(t-e),u=(n+i)/(n-i);let h,g;if(a===wi)h=-(o+r)/(o-r),g=-2*o*r/(o-r);else if(a===wa)h=-o/(o-r),g=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=m,l[12]=0,l[1]=0,l[5]=d,l[9]=u,l[13]=0,l[2]=0,l[6]=0,l[10]=h,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,r,o,a=wi){const l=this.elements,c=1/(t-e),d=1/(n-i),m=1/(o-r),u=(t+e)*c,h=(n+i)*d;let g,_;if(a===wi)g=(o+r)*m,_=-2*m;else if(a===wa)g=r*m,_=-1*m;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-u,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-h,l[2]=0,l[6]=0,l[10]=_,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const xs=new I,ni=new Et,G2=new I(0,0,0),W2=new I(1,1,1),Bi=new I,Pr=new I,Gn=new I,Fc=new Et,Nc=new Vn;class Sn{constructor(e=0,t=0,n=0,i=Sn.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],l=i[1],c=i[5],d=i[9],m=i[2],u=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(u,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Vt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-m,r),this._z=0);break;case"ZXY":this._x=Math.asin(Vt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-m,h),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-Vt(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(u,h),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Vt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-m,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Vt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Fc.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Fc,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Nc.setFromEuler(this),this.setFromQuaternion(Nc,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Sn.DEFAULT_ORDER="XYZ";class Zl{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let X2=0;const Uc=new I,Ms=new Vn,yi=new Et,Fr=new I,nr=new I,j2=new I,q2=new Vn,Ic=new I(1,0,0),zc=new I(0,1,0),Bc=new I(0,0,1),Oc={type:"added"},$2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class ln extends ds{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:X2++}),this.uuid=ai(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ln.DEFAULT_UP.clone();const e=new I,t=new Sn,n=new Vn,i=new I(1,1,1);function r(){n.setFromEuler(t,!1)}function o(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Et},normalMatrix:{value:new kt}}),this.matrix=new Et,this.matrixWorld=new Et,this.matrixAutoUpdate=ln.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=ln.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Zl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.multiply(Ms),this}rotateOnWorldAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.premultiply(Ms),this}rotateX(e){return this.rotateOnAxis(Ic,e)}rotateY(e){return this.rotateOnAxis(zc,e)}rotateZ(e){return this.rotateOnAxis(Bc,e)}translateOnAxis(e,t){return Uc.copy(e).applyQuaternion(this.quaternion),this.position.add(Uc.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ic,e)}translateY(e){return this.translateOnAxis(zc,e)}translateZ(e){return this.translateOnAxis(Bc,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(yi.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Fr.copy(e):Fr.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),nr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?yi.lookAt(nr,Fr,this.up):yi.lookAt(Fr,nr,this.up),this.quaternion.setFromRotationMatrix(yi),i&&(yi.extractRotation(i.matrixWorld),Ms.setFromRotationMatrix(yi),this.quaternion.premultiply(Ms.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent($2),no.child=e,this.dispatchEvent(no),no.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),yi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),yi.multiply(e.parent.matrixWorld)),e.applyMatrix4(yi),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,e,j2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,q2,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(a=>({...a})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c<d;c++){const m=l[c];r(e.shapes,m)}else r(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(r(e.materials,this.material[l]));i.material=a}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];i.animations.push(r(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),d=o(e.images),m=o(e.shapes),u=o(e.skeletons),h=o(e.animations),g=o(e.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),m.length>0&&(n.shapes=m),u.length>0&&(n.skeletons=u),h.length>0&&(n.animations=h),g.length>0&&(n.nodes=g)}return n.object=i,n;function o(a){const l=[];for(const c in a){const d=a[c];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}ln.DEFAULT_UP=new I(0,1,0);ln.DEFAULT_MATRIX_AUTO_UPDATE=!0;ln.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const ii=new I,xi=new I,io=new I,Mi=new I,Ss=new I,Es=new I,kc=new I,so=new I,ro=new I,ao=new I,oo=new Xt,lo=new Xt,co=new Xt;class Kn{constructor(e=new I,t=new I,n=new I){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),ii.subVectors(e,t),i.cross(ii);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){ii.subVectors(i,t),xi.subVectors(n,t),io.subVectors(e,t);const o=ii.dot(ii),a=ii.dot(xi),l=ii.dot(io),c=xi.dot(xi),d=xi.dot(io),m=o*c-a*a;if(m===0)return r.set(0,0,0),null;const u=1/m,h=(c*l-a*d)*u,g=(o*d-a*l)*u;return r.set(1-h-g,g,h)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Mi)===null?!1:Mi.x>=0&&Mi.y>=0&&Mi.x+Mi.y<=1}static getInterpolation(e,t,n,i,r,o,a,l){return this.getBarycoord(e,t,n,i,Mi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,Mi.x),l.addScaledVector(o,Mi.y),l.addScaledVector(a,Mi.z),l)}static getInterpolatedAttribute(e,t,n,i,r,o){return oo.setScalar(0),lo.setScalar(0),co.setScalar(0),oo.fromBufferAttribute(e,t),lo.fromBufferAttribute(e,n),co.fromBufferAttribute(e,i),o.setScalar(0),o.addScaledVector(oo,r.x),o.addScaledVector(lo,r.y),o.addScaledVector(co,r.z),o}static isFrontFacing(e,t,n,i){return ii.subVectors(n,t),xi.subVectors(e,t),ii.cross(xi).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ii.subVectors(this.c,this.b),xi.subVectors(this.a,this.b),ii.cross(xi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Kn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Kn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return Kn.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return Kn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Kn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let o,a;Ss.subVectors(i,n),Es.subVectors(r,n),so.subVectors(e,n);const l=Ss.dot(so),c=Es.dot(so);if(l<=0&&c<=0)return t.copy(n);ro.subVectors(e,i);const d=Ss.dot(ro),m=Es.dot(ro);if(d>=0&&m<=d)return t.copy(i);const u=l*m-d*c;if(u<=0&&l>=0&&d<=0)return o=l/(l-d),t.copy(n).addScaledVector(Ss,o);ao.subVectors(e,r);const h=Ss.dot(ao),g=Es.dot(ao);if(g>=0&&h<=g)return t.copy(r);const _=h*c-l*g;if(_<=0&&c>=0&&g<=0)return a=c/(c-g),t.copy(n).addScaledVector(Es,a);const p=d*g-h*m;if(p<=0&&m-d>=0&&h-g>=0)return kc.subVectors(r,i),a=(m-d)/(m-d+(h-g)),t.copy(i).addScaledVector(kc,a);const f=1/(p+_+u);return o=_*f,a=u*f,t.copy(n).addScaledVector(Ss,o).addScaledVector(Es,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const L0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Oi={h:0,s:0,l:0},Nr={h:0,s:0,l:0};function ho(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}class Tt{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=qt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Gt.workingColorSpace){if(e=Jl(e,1),t=Vt(t,0,1),n=Vt(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;this.r=ho(o,r,e+1/3),this.g=ho(o,r,e),this.b=ho(o,r,e-1/3)}return Gt.colorSpaceToWorking(this,i),this}setStyle(e,t=qt){function n(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=qt){const n=L0[e.toLowerCase()];return n!==void 0?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Ci(e.r),this.g=Ci(e.g),this.b=Ci(e.b),this}copyLinearToSRGB(e){return this.r=ks(e.r),this.g=ks(e.g),this.b=ks(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=qt){return Gt.workingToColorSpace(Dn.copy(this),e),Math.round(Vt(Dn.r*255,0,255))*65536+Math.round(Vt(Dn.g*255,0,255))*256+Math.round(Vt(Dn.b*255,0,255))}getHexString(e=qt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Dn.copy(this),t);const n=Dn.r,i=Dn.g,r=Dn.b,o=Math.max(n,i,r),a=Math.min(n,i,r);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const m=o-a;switch(c=d<=.5?m/(o+a):m/(2-o-a),o){case n:l=(i-r)/m+(i<r?6:0);break;case i:l=(r-n)/m+2;break;case r:l=(n-i)/m+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Gt.workingColorSpace){return Gt.workingToColorSpace(Dn.copy(this),t),e.r=Dn.r,e.g=Dn.g,e.b=Dn.b,e}getStyle(e=qt){Gt.workingToColorSpace(Dn.copy(this),e);const t=Dn.r,n=Dn.g,i=Dn.b;return e!==qt?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(Oi),this.setHSL(Oi.h+e,Oi.s+t,Oi.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Oi),e.getHSL(Nr);const n=fr(Oi.h,Nr.h,t),i=fr(Oi.s,Nr.s,t),r=fr(Oi.l,Nr.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Dn=new Tt;Tt.NAMES=L0;let Y2=0;class qn extends ds{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Y2++}),this.uuid=ai(),this.name="",this.type="Material",this.blending=Bs,this.side=Qn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Go,this.blendDst=Wo,this.blendEquation=rs,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Tt(0,0,0),this.blendAlpha=0,this.depthFunc=Hs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=wc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ms,this.stencilZFail=ms,this.stencilZPass=ms,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Bs&&(n.blending=this.blending),this.side!==Qn&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Go&&(n.blendSrc=this.blendSrc),this.blendDst!==Wo&&(n.blendDst=this.blendDst),this.blendEquation!==rs&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Hs&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==wc&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ms&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ms&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ms&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=i(e.textures),o=i(e.images);r.length>0&&(n.textures=r),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class qi extends qn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const gn=new I,Ur=new et;let J2=0;class mn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:J2++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Cl,this.updateRanges=[],this.gpuType=fi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Ur.fromBufferAttribute(this,t),Ur.applyMatrix3(e),this.setXY(t,Ur.x,Ur.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyMatrix3(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyMatrix4(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyNormalMatrix(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.transformDirection(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=si(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=tn(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=si(t,this.array)),t}setX(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=si(t,this.array)),t}setY(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=si(t,this.array)),t}setZ(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=si(t,this.array)),t}setW(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array),r=tn(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Cl&&(e.usage=this.usage),e}}class P0 extends mn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class K2 extends mn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class F0 extends mn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class It extends mn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Z2=0;const $n=new Et,uo=new ln,As=new I,Wn=new Fn,ir=new Fn,Mn=new I;class hn extends ds{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Z2++}),this.uuid=ai(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(R0(e)?F0:P0)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const r=new kt().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return $n.makeRotationFromQuaternion(e),this.applyMatrix4($n),this}rotateX(e){return $n.makeRotationX(e),this.applyMatrix4($n),this}rotateY(e){return $n.makeRotationY(e),this.applyMatrix4($n),this}rotateZ(e){return $n.makeRotationZ(e),this.applyMatrix4($n),this}translate(e,t,n){return $n.makeTranslation(e,t,n),this.applyMatrix4($n),this}scale(e,t,n){return $n.makeScale(e,t,n),this.applyMatrix4($n),this}lookAt(e){return uo.lookAt(e),uo.updateMatrix(),this.applyMatrix4(uo.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(As).negate(),this.translate(As.x,As.y,As.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];n.push(o.x,o.y,o.z||0)}this.setAttribute("position",new It(n,3))}else{const n=Math.min(e.length,t.count);for(let i=0;i<n;i++){const r=e[i];t.setXYZ(i,r.x,r.y,r.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Fn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new I(-1/0,-1/0,-1/0),new I(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){const r=t[n];Wn.setFromBufferAttribute(r),this.morphTargetsRelative?(Mn.addVectors(this.boundingBox.min,Wn.min),this.boundingBox.expandByPoint(Mn),Mn.addVectors(this.boundingBox.max,Wn.max),this.boundingBox.expandByPoint(Mn)):(this.boundingBox.expandByPoint(Wn.min),this.boundingBox.expandByPoint(Wn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Fi);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new I,1/0);return}if(e){const n=this.boundingSphere.center;if(Wn.setFromBufferAttribute(e),t)for(let r=0,o=t.length;r<o;r++){const a=t[r];ir.setFromBufferAttribute(a),this.morphTargetsRelative?(Mn.addVectors(Wn.min,ir.min),Wn.expandByPoint(Mn),Mn.addVectors(Wn.max,ir.max),Wn.expandByPoint(Mn)):(Wn.expandByPoint(ir.min),Wn.expandByPoint(ir.max))}Wn.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)Mn.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(Mn));if(t)for(let r=0,o=t.length;r<o;r++){const a=t[r],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)Mn.fromBufferAttribute(a,c),l&&(As.fromBufferAttribute(e,c),Mn.add(As)),i=Math.max(i,n.distanceToSquared(Mn))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,i=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new mn(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new I,l[P]=new I;const c=new I,d=new I,m=new I,u=new et,h=new et,g=new et,_=new I,p=new I;function f(P,A,E){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,A),m.fromBufferAttribute(n,E),u.fromBufferAttribute(r,P),h.fromBufferAttribute(r,A),g.fromBufferAttribute(r,E),d.sub(c),m.sub(c),h.sub(u),g.sub(u);const L=1/(h.x*g.y-g.x*h.y);isFinite(L)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(m,-h.y).multiplyScalar(L),p.copy(m).multiplyScalar(h.x).addScaledVector(d,-g.x).multiplyScalar(L),a[P].add(_),a[A].add(_),a[E].add(_),l[P].add(p),l[A].add(p),l[E].add(p))}let v=this.groups;v.length===0&&(v=[{start:0,count:e.count}]);for(let P=0,A=v.length;P<A;++P){const E=v[P],L=E.start,B=E.count;for(let H=L,Q=L+B;H<Q;H+=3)f(e.getX(H+0),e.getX(H+1),e.getX(H+2))}const b=new I,S=new I,F=new I,C=new I;function R(P){F.fromBufferAttribute(i,P),C.copy(F);const A=a[P];b.copy(A),b.sub(F.multiplyScalar(F.dot(A))).normalize(),S.crossVectors(C,A);const L=S.dot(l[P])<0?-1:1;o.setXYZW(P,b.x,b.y,b.z,L)}for(let P=0,A=v.length;P<A;++P){const E=v[P],L=E.start,B=E.count;for(let H=L,Q=L+B;H<Q;H+=3)R(e.getX(H+0)),R(e.getX(H+1)),R(e.getX(H+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new mn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let u=0,h=n.count;u<h;u++)n.setXYZ(u,0,0,0);const i=new I,r=new I,o=new I,a=new I,l=new I,c=new I,d=new I,m=new I;if(e)for(let u=0,h=e.count;u<h;u+=3){const g=e.getX(u+0),_=e.getX(u+1),p=e.getX(u+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),o.fromBufferAttribute(t,p),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),c.fromBufferAttribute(n,p),a.add(d),l.add(d),c.add(d),n.setXYZ(g,a.x,a.y,a.z),n.setXYZ(_,l.x,l.y,l.z),n.setXYZ(p,c.x,c.y,c.z)}else for(let u=0,h=t.count;u<h;u+=3)i.fromBufferAttribute(t,u+0),r.fromBufferAttribute(t,u+1),o.fromBufferAttribute(t,u+2),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),n.setXYZ(u+0,d.x,d.y,d.z),n.setXYZ(u+1,d.x,d.y,d.z),n.setXYZ(u+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Mn.fromBufferAttribute(e,t),Mn.normalize(),e.setXYZ(t,Mn.x,Mn.y,Mn.z)}toNonIndexed(){function e(a,l){const c=a.array,d=a.itemSize,m=a.normalized,u=new c.constructor(l.length*d);let h=0,g=0;for(let _=0,p=l.length;_<p;_++){a.isInterleavedBufferAttribute?h=l[_]*a.data.stride+a.offset:h=l[_]*d;for(let f=0;f<d;f++)u[g++]=c[h++]}return new mn(u,d,m)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new hn,n=this.index.array,i=this.attributes;for(const a in i){const l=i[a],c=e(l,n);t.setAttribute(a,c)}const r=this.morphAttributes;for(const a in r){const l=[],c=r[a];for(let d=0,m=c.length;d<m;d++){const u=c[d],h=e(u,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let m=0,u=c.length;m<u;m++){const h=c[m];d.push(h.toJSON(e.data))}d.length>0&&(i[l]=d,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const i=e.attributes;for(const c in i){const d=i[c];this.setAttribute(c,d.clone(t))}const r=e.morphAttributes;for(const c in r){const d=[],m=r[c];for(let u=0,h=m.length;u<h;u++)d.push(m[u].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,d=o.length;c<d;c++){const m=o[c];this.addGroup(m.start,m.count,m.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Vc=new Et,Zi=new Ys,Ir=new Fi,Hc=new I,zr=new I,Br=new I,Or=new I,fo=new I,kr=new I,Gc=new I,Vr=new I;class zt extends ln{constructor(e=new hn,t=new qi){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(r&&a){kr.set(0,0,0);for(let l=0,c=r.length;l<c;l++){const d=a[l],m=r[l];d!==0&&(fo.fromBufferAttribute(m,e),o?kr.addScaledVector(fo,d):kr.addScaledVector(fo.sub(t),d))}t.add(kr)}return t}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ir.copy(n.boundingSphere),Ir.applyMatrix4(r),Zi.copy(e.ray).recast(e.near),!(Ir.containsPoint(Zi.origin)===!1&&(Zi.intersectSphere(Ir,Hc)===null||Zi.origin.distanceToSquared(Hc)>(e.far-e.near)**2))&&(Vc.copy(r).invert(),Zi.copy(e.ray).applyMatrix4(Vc),!(n.boundingBox!==null&&Zi.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Zi)))}_computeIntersections(e,t,n){let i;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,d=r.attributes.uv1,m=r.attributes.normal,u=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=o[p.materialIndex],v=Math.max(p.start,h.start),b=Math.min(a.count,Math.min(p.start+p.count,h.start+h.count));for(let S=v,F=b;S<F;S+=3){const C=a.getX(S),R=a.getX(S+1),P=a.getX(S+2);i=Hr(this,f,e,n,c,d,m,C,R,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=p.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(a.count,h.start+h.count);for(let p=g,f=_;p<f;p+=3){const v=a.getX(p),b=a.getX(p+1),S=a.getX(p+2);i=Hr(this,o,e,n,c,d,m,v,b,S),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=o[p.materialIndex],v=Math.max(p.start,h.start),b=Math.min(l.count,Math.min(p.start+p.count,h.start+h.count));for(let S=v,F=b;S<F;S+=3){const C=S,R=S+1,P=S+2;i=Hr(this,f,e,n,c,d,m,C,R,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=p.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(l.count,h.start+h.count);for(let p=g,f=_;p<f;p+=3){const v=p,b=p+1,S=p+2;i=Hr(this,o,e,n,c,d,m,v,b,S),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}}}function Q2(s,e,t,n,i,r,o,a){let l;if(e.side===In?l=n.intersectTriangle(o,r,i,!0,a):l=n.intersectTriangle(i,r,o,e.side===Qn,a),l===null)return null;Vr.copy(a),Vr.applyMatrix4(s.matrixWorld);const c=t.ray.origin.distanceTo(Vr);return c<t.near||c>t.far?null:{distance:c,point:Vr.clone(),object:s}}function Hr(s,e,t,n,i,r,o,a,l,c){s.getVertexPosition(a,zr),s.getVertexPosition(l,Br),s.getVertexPosition(c,Or);const d=Q2(s,e,t,n,zr,Br,Or,Gc);if(d){const m=new I;Kn.getBarycoord(Gc,zr,Br,Or,m),i&&(d.uv=Kn.getInterpolatedAttribute(i,a,l,c,m,new et)),r&&(d.uv1=Kn.getInterpolatedAttribute(r,a,l,c,m,new et)),o&&(d.normal=Kn.getInterpolatedAttribute(o,a,l,c,m,new I),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const u={a,b:l,c,normal:new I,materialIndex:0};Kn.getNormal(zr,Br,Or,u.normal),d.face=u,d.barycoord=m}return d}class $i extends hn{constructor(e=1,t=1,n=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],d=[],m=[];let u=0,h=0;g("z","y","x",-1,-1,n,t,e,o,r,0),g("z","y","x",1,-1,n,t,-e,o,r,1),g("x","z","y",1,1,e,n,t,i,o,2),g("x","z","y",1,-1,e,n,-t,i,o,3),g("x","y","z",1,-1,e,t,n,i,r,4),g("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(l),this.setAttribute("position",new It(c,3)),this.setAttribute("normal",new It(d,3)),this.setAttribute("uv",new It(m,2));function g(_,p,f,v,b,S,F,C,R,P,A){const E=S/R,L=F/P,B=S/2,H=F/2,Q=C/2,ae=R+1,G=P+1;let le=0,Z=0;const ve=new I;for(let Ee=0;Ee<G;Ee++){const be=Ee*L-H;for(let ge=0;ge<ae;ge++){const se=ge*E-B;ve[_]=se*v,ve[p]=be*b,ve[f]=Q,c.push(ve.x,ve.y,ve.z),ve[_]=0,ve[p]=0,ve[f]=C>0?1:-1,d.push(ve.x,ve.y,ve.z),m.push(ge/R),m.push(1-Ee/P),le+=1}}for(let Ee=0;Ee<P;Ee++)for(let be=0;be<R;be++){const ge=u+be+ae*Ee,se=u+be+ae*(Ee+1),j=u+(be+1)+ae*(Ee+1),q=u+(be+1)+ae*Ee;l.push(ge,se,q),l.push(se,j,q),Z+=6}a.addGroup(h,Z,A),h+=Z,u+=le}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new $i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function qs(s){const e={};for(const t in s){e[t]={};for(const n in s[t]){const i=s[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function Un(s){const e={};for(let t=0;t<s.length;t++){const n=qs(s[t]);for(const i in n)e[i]=n[i]}return e}function e1(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function N0(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}const Ql={clone:qs,merge:Un};var t1=`void main() {
|
|
5
|
+
*/const Vl="177",Si={ROTATE:0,DOLLY:1,PAN:2},Is={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Ru=0,vc=1,Du=2,v0=1,Hl=2,yi=3,Yn=0,Dn=1,cn=2,ki=0,Bs=1,yc=2,xc=3,Mc=4,Lu=5,is=100,Pu=101,Fu=102,Nu=103,Uu=104,Iu=200,zu=201,Bu=202,Ou=203,Go=204,Wo=205,ku=206,Vu=207,Hu=208,Gu=209,Wu=210,Xu=211,ju=212,qu=213,$u=214,Xo=0,jo=1,qo=2,Hs=3,$o=4,Yo=5,Ko=6,Jo=7,Fa=0,Yu=1,Ku=2,Vi=0,Ju=1,Zu=2,Qu=3,Gl=4,e2=5,t2=6,n2=7,bc="attached",i2="detached",y0=300,Gs=301,Ws=302,Zo=303,Qo=304,Na=306,oi=1e3,ei=1001,el=1002,Vn=1003,s2=1004,wr=1005,kn=1006,Xa=1007,Mi=1008,hi=1009,x0=1010,M0=1011,_r=1012,Wl=1013,ls=1014,li=1015,Sr=1016,Xl=1017,jl=1018,vr=1020,b0=35902,S0=1021,E0=1022,$n=1023,yr=1026,xr=1027,A0=1028,ql=1029,w0=1030,$l=1031,Yl=1033,ga=33776,_a=33777,va=33778,ya=33779,tl=35840,nl=35841,il=35842,sl=35843,rl=36196,al=37492,ol=37496,ll=37808,cl=37809,hl=37810,ul=37811,dl=37812,fl=37813,pl=37814,ml=37815,gl=37816,_l=37817,vl=37818,yl=37819,xl=37820,Ml=37821,xa=36492,bl=36494,Sl=36495,T0=36283,El=36284,Al=36285,wl=36286,Ea=2300,Tl=2301,ja=2302,Sc=2400,Ec=2401,Ac=2402,r2=2500,a2=3200,o2=3201,Ua=0,l2=1,Bi="",Vt="srgb",Xs="srgb-linear",Aa="linear",tn="srgb",ms=7680,wc=519,c2=512,h2=513,u2=514,C0=515,d2=516,f2=517,p2=518,m2=519,Cl=35044,Tc="300 es",bi=2e3,wa=2001;class hs{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const i=n[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let r=0,o=i.length;r<o;r++)i[r].call(this,e);e.target=null}}}const Sn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Cc=1234567;const dr=Math.PI/180,js=180/Math.PI;function ti(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Sn[s&255]+Sn[s>>8&255]+Sn[s>>16&255]+Sn[s>>24&255]+"-"+Sn[e&255]+Sn[e>>8&255]+"-"+Sn[e>>16&15|64]+Sn[e>>24&255]+"-"+Sn[t&63|128]+Sn[t>>8&255]+"-"+Sn[t>>16&255]+Sn[t>>24&255]+Sn[n&255]+Sn[n>>8&255]+Sn[n>>16&255]+Sn[n>>24&255]).toLowerCase()}function It(s,e,t){return Math.max(e,Math.min(t,s))}function Kl(s,e){return(s%e+e)%e}function g2(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function _2(s,e,t){return s!==e?(t-s)/(e-s):0}function fr(s,e,t){return(1-t)*s+t*e}function v2(s,e,t,n){return fr(s,e,1-Math.exp(-t*n))}function y2(s,e=1){return e-Math.abs(Kl(s,e*2)-e)}function x2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function M2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function b2(s,e){return s+Math.floor(Math.random()*(e-s+1))}function S2(s,e){return s+Math.random()*(e-s)}function E2(s){return s*(.5-Math.random())}function A2(s){s!==void 0&&(Cc=s);let e=Cc+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function w2(s){return s*dr}function T2(s){return s*js}function C2(s){return(s&s-1)===0&&s!==0}function R2(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function D2(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function L2(s,e,t,n,i){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+n)/2),d=o((e+n)/2),m=r((e-n)/2),u=o((e-n)/2),h=r((n-e)/2),g=o((n-e)/2);switch(i){case"XYX":s.set(a*d,l*m,l*u,a*c);break;case"YZY":s.set(l*u,a*d,l*m,a*c);break;case"ZXZ":s.set(l*m,l*u,a*d,a*c);break;case"XZX":s.set(a*d,l*g,l*h,a*c);break;case"YXY":s.set(l*h,a*d,l*g,a*c);break;case"ZYZ":s.set(l*g,l*h,a*d,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Qn(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function en(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}const xi={DEG2RAD:dr,RAD2DEG:js,generateUUID:ti,clamp:It,euclideanModulo:Kl,mapLinear:g2,inverseLerp:_2,lerp:fr,damp:v2,pingpong:y2,smoothstep:x2,smootherstep:M2,randInt:b2,randFloat:S2,randFloatSpread:E2,seededRandom:A2,degToRad:w2,radToDeg:T2,isPowerOfTwo:C2,ceilPowerOfTwo:R2,floorPowerOfTwo:D2,setQuaternionFromProperEuler:L2,normalize:en,denormalize:Qn};class Je{constructor(e=0,t=0){Je.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(It(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*n-o*i+e.x,this.y=r*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Un{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,o,a){let l=n[i+0],c=n[i+1],d=n[i+2],m=n[i+3];const u=r[o+0],h=r[o+1],g=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m;return}if(a===1){e[t+0]=u,e[t+1]=h,e[t+2]=g,e[t+3]=_;return}if(m!==_||l!==u||c!==h||d!==g){let f=1-a;const p=l*u+c*h+d*g+m*_,x=p>=0?1:-1,M=1-p*p;if(M>Number.EPSILON){const N=Math.sqrt(M),L=Math.atan2(N,p*x);f=Math.sin(f*L)/N,a=Math.sin(a*L)/N}const b=a*x;if(l=l*f+u*b,c=c*f+h*b,d=d*f+g*b,m=m*f+_*b,f===1-a){const N=1/Math.sqrt(l*l+c*c+d*d+m*m);l*=N,c*=N,d*=N,m*=N}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m}static multiplyQuaternionsFlat(e,t,n,i,r,o){const a=n[i],l=n[i+1],c=n[i+2],d=n[i+3],m=r[o],u=r[o+1],h=r[o+2],g=r[o+3];return e[t]=a*g+d*m+l*h-c*u,e[t+1]=l*g+d*u+c*m-a*h,e[t+2]=c*g+d*h+a*u-l*m,e[t+3]=d*g-a*m-l*u-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(i/2),m=a(r/2),u=l(n/2),h=l(i/2),g=l(r/2);switch(o){case"XYZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"YXZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"ZXY":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"ZYX":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"YZX":this._x=u*d*m+c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m-u*h*g;break;case"XZY":this._x=u*d*m-c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m+u*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],d=t[6],m=t[10],u=n+a+m;if(u>0){const h=.5/Math.sqrt(u+1);this._w=.25/h,this._x=(d-l)*h,this._y=(r-c)*h,this._z=(o-i)*h}else if(n>a&&n>m){const h=2*Math.sqrt(1+n-a-m);this._w=(d-l)/h,this._x=.25*h,this._y=(i+o)/h,this._z=(r+c)/h}else if(a>m){const h=2*Math.sqrt(1+a-n-m);this._w=(r-c)/h,this._x=(i+o)/h,this._y=.25*h,this._z=(l+d)/h}else{const h=2*Math.sqrt(1+m-n-a);this._w=(o-i)/h,this._x=(r+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(It(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+o*a+i*c-r*l,this._y=i*d+o*l+r*a-n*c,this._z=r*d+o*c+n*l-i*a,this._w=o*d-n*a-i*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+n*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const h=1-t;return this._w=h*o+t*this._w,this._x=h*n+t*this._x,this._y=h*i+t*this._y,this._z=h*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),d=Math.atan2(c,a),m=Math.sin((1-t)*d)/c,u=Math.sin(t*d)/c;return this._w=o*m+this._w*u,this._x=n*m+this._x*u,this._y=i*m+this._y*u,this._z=r*m+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class z{constructor(e=0,t=0,n=0){z.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Rc.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rc.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*n),d=2*(a*t-r*i),m=2*(r*n-o*t);return this.x=t+l*c+o*m-a*d,this.y=n+l*d+a*c-r*m,this.z=i+l*m+r*d-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=i*l-r*a,this.y=r*o-n*l,this.z=n*a-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qa.copy(this).projectOnVector(e),this.sub(qa)}reflect(e){return this.sub(qa.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(It(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const qa=new z,Rc=new Un;class Ut{constructor(e,t,n,i,r,o,a,l,c){Ut.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c)}set(e,t,n,i,r,o,a,l,c){const d=this.elements;return d[0]=e,d[1]=i,d[2]=a,d[3]=t,d[4]=r,d[5]=l,d[6]=n,d[7]=o,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],d=n[4],m=n[7],u=n[2],h=n[5],g=n[8],_=i[0],f=i[3],p=i[6],x=i[1],M=i[4],b=i[7],N=i[2],L=i[5],P=i[8];return r[0]=o*_+a*x+l*N,r[3]=o*f+a*M+l*L,r[6]=o*p+a*b+l*P,r[1]=c*_+d*x+m*N,r[4]=c*f+d*M+m*L,r[7]=c*p+d*b+m*P,r[2]=u*_+h*x+g*N,r[5]=u*f+h*M+g*L,r[8]=u*p+h*b+g*P,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*o*d-t*a*c-n*r*d+n*a*l+i*r*c-i*o*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=d*o-a*c,u=a*l-d*r,h=c*r-o*l,g=t*m+n*u+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=m*_,e[1]=(i*c-d*n)*_,e[2]=(a*n-i*o)*_,e[3]=u*_,e[4]=(d*t-i*l)*_,e[5]=(i*r-a*t)*_,e[6]=h*_,e[7]=(n*l-c*t)*_,e[8]=(o*t-n*r)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply($a.makeScale(e,t)),this}rotate(e){return this.premultiply($a.makeRotation(-e)),this}translate(e,t){return this.premultiply($a.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const $a=new Ut;function R0(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}function Mr(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function P2(){const s=Mr("canvas");return s.style.display="block",s}const Dc={};function Os(s){s in Dc||(Dc[s]=!0,console.warn(s))}function F2(s,e,t){return new Promise(function(n,i){function r(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:i();break;case s.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}function N2(s){const e=s.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function U2(s){const e=s.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const Lc=new Ut().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Pc=new Ut().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function I2(){const s={enabled:!0,workingColorSpace:Xs,spaces:{},convert:function(i,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===tn&&(i.r=Ei(i.r),i.g=Ei(i.g),i.b=Ei(i.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[r].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===tn&&(i.r=ks(i.r),i.g=ks(i.g),i.b=ks(i.b))),i},workingToColorSpace:function(i,r){return this.convert(i,this.workingColorSpace,r)},colorSpaceToWorking:function(i,r){return this.convert(i,r,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Bi?Aa:this.spaces[i].transfer},getLuminanceCoefficients:function(i,r=this.workingColorSpace){return i.fromArray(this.spaces[r].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,r,o){return i.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(i,r)},toWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(i,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return s.define({[Xs]:{primaries:e,whitePoint:n,transfer:Aa,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Vt},outputColorSpaceConfig:{drawingBufferColorSpace:Vt}},[Vt]:{primaries:e,whitePoint:n,transfer:tn,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Vt}}}),s}const Bt=I2();function Ei(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function ks(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}let gs;class z2{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{gs===void 0&&(gs=Mr("canvas")),gs.width=e.width,gs.height=e.height;const i=gs.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=gs}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Mr("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o<r.length;o++)r[o]=Ei(r[o]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Ei(t[n]/255)*255):t[n]=Ei(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let B2=0;class Jl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:B2++}),this.uuid=ti(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?r.push(Ya(i[o].image)):r.push(Ya(i[o]))}else r=Ya(i);n.url=r}return t||(e.images[this.uuid]=n),n}}function Ya(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?z2.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let O2=0;const Ka=new z;class Mn extends hs{constructor(e=Mn.DEFAULT_IMAGE,t=Mn.DEFAULT_MAPPING,n=ei,i=ei,r=kn,o=Mi,a=$n,l=hi,c=Mn.DEFAULT_ANISOTROPY,d=Bi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:O2++}),this.uuid=ti(),this.name="",this.source=new Jl(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new Je(0,0),this.repeat=new Je(1,1),this.center=new Je(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ut,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Ka).x}get height(){return this.source.getSize(Ka).y}get depth(){return this.source.getSize(Ka).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==y0)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case oi:e.x=e.x-Math.floor(e.x);break;case ei:e.x=e.x<0?0:1;break;case el:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case oi:e.y=e.y-Math.floor(e.y);break;case ei:e.y=e.y<0?0:1;break;case el:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Mn.DEFAULT_IMAGE=null;Mn.DEFAULT_MAPPING=y0;Mn.DEFAULT_ANISOTROPY=1;class Ot{constructor(e=0,t=0,n=0,i=1){Ot.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r;const l=e.elements,c=l[0],d=l[4],m=l[8],u=l[1],h=l[5],g=l[9],_=l[2],f=l[6],p=l[10];if(Math.abs(d-u)<.01&&Math.abs(m-_)<.01&&Math.abs(g-f)<.01){if(Math.abs(d+u)<.1&&Math.abs(m+_)<.1&&Math.abs(g+f)<.1&&Math.abs(c+h+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const M=(c+1)/2,b=(h+1)/2,N=(p+1)/2,L=(d+u)/4,P=(m+_)/4,I=(g+f)/4;return M>b&&M>N?M<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(M),i=L/n,r=P/n):b>N?b<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),n=L/i,r=I/i):N<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(N),n=P/r,i=I/r),this.set(n,i,r,t),this}let x=Math.sqrt((f-g)*(f-g)+(m-_)*(m-_)+(u-d)*(u-d));return Math.abs(x)<.001&&(x=1),this.x=(f-g)/x,this.y=(m-_)/x,this.z=(u-d)/x,this.w=Math.acos((c+h+p-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this.w=It(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this.w=It(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class k2 extends hs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:kn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Ot(0,0,e,t),this.scissorTest=!1,this.viewport=new Ot(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new Mn(i);this.textures=[];const o=n.count;for(let a=0;a<o;a++)this.textures[a]=r.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:kn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,this.textures[i].isArrayTexture=this.textures[i].image.depth>1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const i=Object.assign({},e.textures[t].image);this.textures[t].source=new Jl(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class cs extends k2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class D0 extends Mn{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=Vn,this.minFilter=Vn,this.wrapR=ei,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class V2 extends Mn{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=Vn,this.minFilter=Vn,this.wrapR=ei,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Tn{constructor(e=new z(1/0,1/0,1/0),t=new z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Kn.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Kn.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Kn.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=r.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Kn):Kn.fromBufferAttribute(r,o),Kn.applyMatrix4(e.matrixWorld),this.expandByPoint(Kn);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Tr.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Tr.copy(n.boundingBox)),Tr.applyMatrix4(e.matrixWorld),this.union(Tr)}const i=e.children;for(let r=0,o=i.length;r<o;r++)this.expandByObject(i[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Kn),Kn.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(er),Cr.subVectors(this.max,er),_s.subVectors(e.a,er),vs.subVectors(e.b,er),ys.subVectors(e.c,er),Li.subVectors(vs,_s),Pi.subVectors(ys,vs),$i.subVectors(_s,ys);let t=[0,-Li.z,Li.y,0,-Pi.z,Pi.y,0,-$i.z,$i.y,Li.z,0,-Li.x,Pi.z,0,-Pi.x,$i.z,0,-$i.x,-Li.y,Li.x,0,-Pi.y,Pi.x,0,-$i.y,$i.x,0];return!Ja(t,_s,vs,ys,Cr)||(t=[1,0,0,0,1,0,0,0,1],!Ja(t,_s,vs,ys,Cr))?!1:(Rr.crossVectors(Li,Pi),t=[Rr.x,Rr.y,Rr.z],Ja(t,_s,vs,ys,Cr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Kn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Kn).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(fi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fi),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const fi=[new z,new z,new z,new z,new z,new z,new z,new z],Kn=new z,Tr=new Tn,_s=new z,vs=new z,ys=new z,Li=new z,Pi=new z,$i=new z,er=new z,Cr=new z,Rr=new z,Yi=new z;function Ja(s,e,t,n,i){for(let r=0,o=s.length-3;r<=o;r+=3){Yi.fromArray(s,r);const a=i.x*Math.abs(Yi.x)+i.y*Math.abs(Yi.y)+i.z*Math.abs(Yi.z),l=e.dot(Yi),c=t.dot(Yi),d=n.dot(Yi);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const H2=new Tn,tr=new z,Za=new z;class Ri{constructor(e=new z,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):H2.setFromPoints(e).getCenter(n);let i=0;for(let r=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;tr.subVectors(e,this.center);const t=tr.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(tr,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Za.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tr.copy(e.center).add(Za)),this.expandByPoint(tr.copy(e.center).sub(Za))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const pi=new z,Qa=new z,Dr=new z,Fi=new z,eo=new z,Lr=new z,to=new z;class Ys{constructor(e=new z,t=new z(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,pi)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=pi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(pi.copy(this.origin).addScaledVector(this.direction,t),pi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Qa.copy(e).add(t).multiplyScalar(.5),Dr.copy(t).sub(e).normalize(),Fi.copy(this.origin).sub(Qa);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Dr),a=Fi.dot(this.direction),l=-Fi.dot(Dr),c=Fi.lengthSq(),d=Math.abs(1-o*o);let m,u,h,g;if(d>0)if(m=o*l-a,u=o*a-l,g=r*d,m>=0)if(u>=-g)if(u<=g){const _=1/d;m*=_,u*=_,h=m*(m+o*u+2*a)+u*(o*m+u+2*l)+c}else u=r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u=-r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u<=-g?(m=Math.max(0,-(-o*r+a)),u=m>0?-r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c):u<=g?(m=0,u=Math.min(Math.max(-r,-l),r),h=u*(u+2*l)+c):(m=Math.max(0,-(o*r+a)),u=m>0?r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c);else u=o>0?-r:r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,m),i&&i.copy(Qa).addScaledVector(Dr,u),h}intersectSphere(e,t){pi.subVectors(e.center,this.origin);const n=pi.dot(this.direction),i=pi.dot(pi)-n*n,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,o,a,l;const c=1/this.direction.x,d=1/this.direction.y,m=1/this.direction.z,u=this.origin;return c>=0?(n=(e.min.x-u.x)*c,i=(e.max.x-u.x)*c):(n=(e.max.x-u.x)*c,i=(e.min.x-u.x)*c),d>=0?(r=(e.min.y-u.y)*d,o=(e.max.y-u.y)*d):(r=(e.max.y-u.y)*d,o=(e.min.y-u.y)*d),n>o||r>i||((r>n||isNaN(n))&&(n=r),(o<i||isNaN(i))&&(i=o),m>=0?(a=(e.min.z-u.z)*m,l=(e.max.z-u.z)*m):(a=(e.max.z-u.z)*m,l=(e.min.z-u.z)*m),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,pi)!==null}intersectTriangle(e,t,n,i,r){eo.subVectors(t,e),Lr.subVectors(n,e),to.crossVectors(eo,Lr);let o=this.direction.dot(to),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Fi.subVectors(this.origin,e);const l=a*this.direction.dot(Lr.crossVectors(Fi,Lr));if(l<0)return null;const c=a*this.direction.dot(eo.cross(Fi));if(c<0||l+c>o)return null;const d=-a*Fi.dot(to);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Mt{constructor(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,f){Mt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,f)}set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,f){const p=this.elements;return p[0]=e,p[4]=t,p[8]=n,p[12]=i,p[1]=r,p[5]=o,p[9]=a,p[13]=l,p[2]=c,p[6]=d,p[10]=m,p[14]=u,p[3]=h,p[7]=g,p[11]=_,p[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Mt().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/xs.setFromMatrixColumn(e,0).length(),r=1/xs.setFromMatrixColumn(e,1).length(),o=1/xs.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,r=e.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(r),m=Math.sin(r);if(e.order==="XYZ"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=-l*m,t[8]=c,t[1]=h+g*c,t[5]=u-_*c,t[9]=-a*l,t[2]=_-u*c,t[6]=g+h*c,t[10]=o*l}else if(e.order==="YXZ"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u+_*a,t[4]=g*a-h,t[8]=o*c,t[1]=o*m,t[5]=o*d,t[9]=-a,t[2]=h*a-g,t[6]=_+u*a,t[10]=o*l}else if(e.order==="ZXY"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u-_*a,t[4]=-o*m,t[8]=g+h*a,t[1]=h+g*a,t[5]=o*d,t[9]=_-u*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=g*c-h,t[8]=u*c+_,t[1]=l*m,t[5]=_*c+u,t[9]=h*c-g,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=_-u*m,t[8]=g*m+h,t[1]=m,t[5]=o*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*m+g,t[10]=u-_*m}else if(e.order==="XZY"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=-m,t[8]=c*d,t[1]=u*m+_,t[5]=o*d,t[9]=h*m-g,t[2]=g*m-h,t[6]=a*d,t[10]=_*m+u}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(G2,e,W2)}lookAt(e,t,n){const i=this.elements;return Bn.subVectors(e,t),Bn.lengthSq()===0&&(Bn.z=1),Bn.normalize(),Ni.crossVectors(n,Bn),Ni.lengthSq()===0&&(Math.abs(n.z)===1?Bn.x+=1e-4:Bn.z+=1e-4,Bn.normalize(),Ni.crossVectors(n,Bn)),Ni.normalize(),Pr.crossVectors(Bn,Ni),i[0]=Ni.x,i[4]=Pr.x,i[8]=Bn.x,i[1]=Ni.y,i[5]=Pr.y,i[9]=Bn.y,i[2]=Ni.z,i[6]=Pr.z,i[10]=Bn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],d=n[1],m=n[5],u=n[9],h=n[13],g=n[2],_=n[6],f=n[10],p=n[14],x=n[3],M=n[7],b=n[11],N=n[15],L=i[0],P=i[4],I=i[8],A=i[12],E=i[1],F=i[5],B=i[9],X=i[13],Z=i[2],se=i[6],W=i[10],he=i[14],Q=i[3],xe=i[7],De=i[11],Ae=i[15];return r[0]=o*L+a*E+l*Z+c*Q,r[4]=o*P+a*F+l*se+c*xe,r[8]=o*I+a*B+l*W+c*De,r[12]=o*A+a*X+l*he+c*Ae,r[1]=d*L+m*E+u*Z+h*Q,r[5]=d*P+m*F+u*se+h*xe,r[9]=d*I+m*B+u*W+h*De,r[13]=d*A+m*X+u*he+h*Ae,r[2]=g*L+_*E+f*Z+p*Q,r[6]=g*P+_*F+f*se+p*xe,r[10]=g*I+_*B+f*W+p*De,r[14]=g*A+_*X+f*he+p*Ae,r[3]=x*L+M*E+b*Z+N*Q,r[7]=x*P+M*F+b*se+N*xe,r[11]=x*I+M*B+b*W+N*De,r[15]=x*A+M*X+b*he+N*Ae,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],d=e[2],m=e[6],u=e[10],h=e[14],g=e[3],_=e[7],f=e[11],p=e[15];return g*(+r*l*m-i*c*m-r*a*u+n*c*u+i*a*h-n*l*h)+_*(+t*l*h-t*c*u+r*o*u-i*o*h+i*c*d-r*l*d)+f*(+t*c*m-t*a*h-r*o*m+n*o*h+r*a*d-n*c*d)+p*(-i*a*d-t*l*m+t*a*u+i*o*m-n*o*u+n*l*d)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=e[9],u=e[10],h=e[11],g=e[12],_=e[13],f=e[14],p=e[15],x=m*f*c-_*u*c+_*l*h-a*f*h-m*l*p+a*u*p,M=g*u*c-d*f*c-g*l*h+o*f*h+d*l*p-o*u*p,b=d*_*c-g*m*c+g*a*h-o*_*h-d*a*p+o*m*p,N=g*m*l-d*_*l-g*a*u+o*_*u+d*a*f-o*m*f,L=t*x+n*M+i*b+r*N;if(L===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/L;return e[0]=x*P,e[1]=(_*u*r-m*f*r-_*i*h+n*f*h+m*i*p-n*u*p)*P,e[2]=(a*f*r-_*l*r+_*i*c-n*f*c-a*i*p+n*l*p)*P,e[3]=(m*l*r-a*u*r-m*i*c+n*u*c+a*i*h-n*l*h)*P,e[4]=M*P,e[5]=(d*f*r-g*u*r+g*i*h-t*f*h-d*i*p+t*u*p)*P,e[6]=(g*l*r-o*f*r-g*i*c+t*f*c+o*i*p-t*l*p)*P,e[7]=(o*u*r-d*l*r+d*i*c-t*u*c-o*i*h+t*l*h)*P,e[8]=b*P,e[9]=(g*m*r-d*_*r-g*n*h+t*_*h+d*n*p-t*m*p)*P,e[10]=(o*_*r-g*a*r+g*n*c-t*_*c-o*n*p+t*a*p)*P,e[11]=(d*a*r-o*m*r-d*n*c+t*m*c+o*n*h-t*a*h)*P,e[12]=N*P,e[13]=(d*_*i-g*m*i+g*n*u-t*_*u-d*n*f+t*m*f)*P,e[14]=(g*a*i-o*_*i-g*n*l+t*_*l+o*n*f-t*a*f)*P,e[15]=(o*m*i-d*a*i+d*n*l-t*m*l-o*n*u+t*a*u)*P,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,o=e.x,a=e.y,l=e.z,c=r*o,d=r*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,d*a+n,d*l-i*o,0,c*l-i*a,d*l+i*o,r*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,o){return this.set(1,n,r,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,d=o+o,m=a+a,u=r*c,h=r*d,g=r*m,_=o*d,f=o*m,p=a*m,x=l*c,M=l*d,b=l*m,N=n.x,L=n.y,P=n.z;return i[0]=(1-(_+p))*N,i[1]=(h+b)*N,i[2]=(g-M)*N,i[3]=0,i[4]=(h-b)*L,i[5]=(1-(u+p))*L,i[6]=(f+x)*L,i[7]=0,i[8]=(g+M)*P,i[9]=(f-x)*P,i[10]=(1-(u+_))*P,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=xs.set(i[0],i[1],i[2]).length();const o=xs.set(i[4],i[5],i[6]).length(),a=xs.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],Jn.copy(this);const c=1/r,d=1/o,m=1/a;return Jn.elements[0]*=c,Jn.elements[1]*=c,Jn.elements[2]*=c,Jn.elements[4]*=d,Jn.elements[5]*=d,Jn.elements[6]*=d,Jn.elements[8]*=m,Jn.elements[9]*=m,Jn.elements[10]*=m,t.setFromRotationMatrix(Jn),n.x=r,n.y=o,n.z=a,this}makePerspective(e,t,n,i,r,o,a=bi){const l=this.elements,c=2*r/(t-e),d=2*r/(n-i),m=(t+e)/(t-e),u=(n+i)/(n-i);let h,g;if(a===bi)h=-(o+r)/(o-r),g=-2*o*r/(o-r);else if(a===wa)h=-o/(o-r),g=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=m,l[12]=0,l[1]=0,l[5]=d,l[9]=u,l[13]=0,l[2]=0,l[6]=0,l[10]=h,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,r,o,a=bi){const l=this.elements,c=1/(t-e),d=1/(n-i),m=1/(o-r),u=(t+e)*c,h=(n+i)*d;let g,_;if(a===bi)g=(o+r)*m,_=-2*m;else if(a===wa)g=r*m,_=-1*m;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-u,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-h,l[2]=0,l[6]=0,l[10]=_,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const xs=new z,Jn=new Mt,G2=new z(0,0,0),W2=new z(1,1,1),Ni=new z,Pr=new z,Bn=new z,Fc=new Mt,Nc=new Un;class _n{constructor(e=0,t=0,n=0,i=_n.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],l=i[1],c=i[5],d=i[9],m=i[2],u=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(It(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(u,c),this._z=0);break;case"YXZ":this._x=Math.asin(-It(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-m,r),this._z=0);break;case"ZXY":this._x=Math.asin(It(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-m,h),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-It(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(u,h),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(It(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-m,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-It(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Fc.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Fc,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Nc.setFromEuler(this),this.setFromQuaternion(Nc,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}_n.DEFAULT_ORDER="XYZ";class Zl{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let X2=0;const Uc=new z,Ms=new Un,mi=new Mt,Fr=new z,nr=new z,j2=new z,q2=new Un,Ic=new z(1,0,0),zc=new z(0,1,0),Bc=new z(0,0,1),Oc={type:"added"},$2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class sn extends hs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:X2++}),this.uuid=ti(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=sn.DEFAULT_UP.clone();const e=new z,t=new _n,n=new Un,i=new z(1,1,1);function r(){n.setFromEuler(t,!1)}function o(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Mt},normalMatrix:{value:new Ut}}),this.matrix=new Mt,this.matrixWorld=new Mt,this.matrixAutoUpdate=sn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=sn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Zl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.multiply(Ms),this}rotateOnWorldAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.premultiply(Ms),this}rotateX(e){return this.rotateOnAxis(Ic,e)}rotateY(e){return this.rotateOnAxis(zc,e)}rotateZ(e){return this.rotateOnAxis(Bc,e)}translateOnAxis(e,t){return Uc.copy(e).applyQuaternion(this.quaternion),this.position.add(Uc.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ic,e)}translateY(e){return this.translateOnAxis(zc,e)}translateZ(e){return this.translateOnAxis(Bc,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(mi.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Fr.copy(e):Fr.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),nr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?mi.lookAt(nr,Fr,this.up):mi.lookAt(Fr,nr,this.up),this.quaternion.setFromRotationMatrix(mi),i&&(mi.extractRotation(i.matrixWorld),Ms.setFromRotationMatrix(mi),this.quaternion.premultiply(Ms.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent($2),no.child=e,this.dispatchEvent(no),no.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),mi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),mi.multiply(e.parent.matrixWorld)),e.applyMatrix4(mi),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,e,j2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,q2,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(a=>({...a})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c<d;c++){const m=l[c];r(e.shapes,m)}else r(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(r(e.materials,this.material[l]));i.material=a}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];i.animations.push(r(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),d=o(e.images),m=o(e.shapes),u=o(e.skeletons),h=o(e.animations),g=o(e.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),m.length>0&&(n.shapes=m),u.length>0&&(n.skeletons=u),h.length>0&&(n.animations=h),g.length>0&&(n.nodes=g)}return n.object=i,n;function o(a){const l=[];for(const c in a){const d=a[c];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}sn.DEFAULT_UP=new z(0,1,0);sn.DEFAULT_MATRIX_AUTO_UPDATE=!0;sn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Zn=new z,gi=new z,io=new z,_i=new z,Ss=new z,Es=new z,kc=new z,so=new z,ro=new z,ao=new z,oo=new Ot,lo=new Ot,co=new Ot;class qn{constructor(e=new z,t=new z,n=new z){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),Zn.subVectors(e,t),i.cross(Zn);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){Zn.subVectors(i,t),gi.subVectors(n,t),io.subVectors(e,t);const o=Zn.dot(Zn),a=Zn.dot(gi),l=Zn.dot(io),c=gi.dot(gi),d=gi.dot(io),m=o*c-a*a;if(m===0)return r.set(0,0,0),null;const u=1/m,h=(c*l-a*d)*u,g=(o*d-a*l)*u;return r.set(1-h-g,g,h)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,_i)===null?!1:_i.x>=0&&_i.y>=0&&_i.x+_i.y<=1}static getInterpolation(e,t,n,i,r,o,a,l){return this.getBarycoord(e,t,n,i,_i)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,_i.x),l.addScaledVector(o,_i.y),l.addScaledVector(a,_i.z),l)}static getInterpolatedAttribute(e,t,n,i,r,o){return oo.setScalar(0),lo.setScalar(0),co.setScalar(0),oo.fromBufferAttribute(e,t),lo.fromBufferAttribute(e,n),co.fromBufferAttribute(e,i),o.setScalar(0),o.addScaledVector(oo,r.x),o.addScaledVector(lo,r.y),o.addScaledVector(co,r.z),o}static isFrontFacing(e,t,n,i){return Zn.subVectors(n,t),gi.subVectors(e,t),Zn.cross(gi).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Zn.subVectors(this.c,this.b),gi.subVectors(this.a,this.b),Zn.cross(gi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return qn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return qn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return qn.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return qn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return qn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let o,a;Ss.subVectors(i,n),Es.subVectors(r,n),so.subVectors(e,n);const l=Ss.dot(so),c=Es.dot(so);if(l<=0&&c<=0)return t.copy(n);ro.subVectors(e,i);const d=Ss.dot(ro),m=Es.dot(ro);if(d>=0&&m<=d)return t.copy(i);const u=l*m-d*c;if(u<=0&&l>=0&&d<=0)return o=l/(l-d),t.copy(n).addScaledVector(Ss,o);ao.subVectors(e,r);const h=Ss.dot(ao),g=Es.dot(ao);if(g>=0&&h<=g)return t.copy(r);const _=h*c-l*g;if(_<=0&&c>=0&&g<=0)return a=c/(c-g),t.copy(n).addScaledVector(Es,a);const f=d*g-h*m;if(f<=0&&m-d>=0&&h-g>=0)return kc.subVectors(r,i),a=(m-d)/(m-d+(h-g)),t.copy(i).addScaledVector(kc,a);const p=1/(f+_+u);return o=_*p,a=u*p,t.copy(n).addScaledVector(Ss,o).addScaledVector(Es,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const L0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ui={h:0,s:0,l:0},Nr={h:0,s:0,l:0};function ho(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}class bt{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Vt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Bt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Bt.workingColorSpace){if(e=Kl(e,1),t=It(t,0,1),n=It(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;this.r=ho(o,r,e+1/3),this.g=ho(o,r,e),this.b=ho(o,r,e-1/3)}return Bt.colorSpaceToWorking(this,i),this}setStyle(e,t=Vt){function n(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Vt){const n=L0[e.toLowerCase()];return n!==void 0?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Ei(e.r),this.g=Ei(e.g),this.b=Ei(e.b),this}copyLinearToSRGB(e){return this.r=ks(e.r),this.g=ks(e.g),this.b=ks(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Vt){return Bt.workingToColorSpace(En.copy(this),e),Math.round(It(En.r*255,0,255))*65536+Math.round(It(En.g*255,0,255))*256+Math.round(It(En.b*255,0,255))}getHexString(e=Vt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.workingToColorSpace(En.copy(this),t);const n=En.r,i=En.g,r=En.b,o=Math.max(n,i,r),a=Math.min(n,i,r);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const m=o-a;switch(c=d<=.5?m/(o+a):m/(2-o-a),o){case n:l=(i-r)/m+(i<r?6:0);break;case i:l=(r-n)/m+2;break;case r:l=(n-i)/m+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Bt.workingColorSpace){return Bt.workingToColorSpace(En.copy(this),t),e.r=En.r,e.g=En.g,e.b=En.b,e}getStyle(e=Vt){Bt.workingToColorSpace(En.copy(this),e);const t=En.r,n=En.g,i=En.b;return e!==Vt?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(Ui),this.setHSL(Ui.h+e,Ui.s+t,Ui.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Ui),e.getHSL(Nr);const n=fr(Ui.h,Nr.h,t),i=fr(Ui.s,Nr.s,t),r=fr(Ui.l,Nr.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const En=new bt;bt.NAMES=L0;let Y2=0;class Hn extends hs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Y2++}),this.uuid=ti(),this.name="",this.type="Material",this.blending=Bs,this.side=Yn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Go,this.blendDst=Wo,this.blendEquation=is,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new bt(0,0,0),this.blendAlpha=0,this.depthFunc=Hs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=wc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ms,this.stencilZFail=ms,this.stencilZPass=ms,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Bs&&(n.blending=this.blending),this.side!==Yn&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Go&&(n.blendSrc=this.blendSrc),this.blendDst!==Wo&&(n.blendDst=this.blendDst),this.blendEquation!==is&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Hs&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==wc&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ms&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ms&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ms&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=i(e.textures),o=i(e.images);r.length>0&&(n.textures=r),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Gi extends Hn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new bt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _n,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const un=new z,Ur=new Je;let K2=0;class hn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:K2++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Cl,this.updateRanges=[],this.gpuType=li,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Ur.fromBufferAttribute(this,t),Ur.applyMatrix3(e),this.setXY(t,Ur.x,Ur.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)un.fromBufferAttribute(this,t),un.applyMatrix3(e),this.setXYZ(t,un.x,un.y,un.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)un.fromBufferAttribute(this,t),un.applyMatrix4(e),this.setXYZ(t,un.x,un.y,un.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)un.fromBufferAttribute(this,t),un.applyNormalMatrix(e),this.setXYZ(t,un.x,un.y,un.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)un.fromBufferAttribute(this,t),un.transformDirection(e),this.setXYZ(t,un.x,un.y,un.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=Qn(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=en(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Qn(t,this.array)),t}setX(e,t){return this.normalized&&(t=en(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Qn(t,this.array)),t}setY(e,t){return this.normalized&&(t=en(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Qn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=en(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Qn(t,this.array)),t}setW(e,t){return this.normalized&&(t=en(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=en(t,this.array),n=en(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=en(t,this.array),n=en(n,this.array),i=en(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=en(t,this.array),n=en(n,this.array),i=en(i,this.array),r=en(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Cl&&(e.usage=this.usage),e}}class P0 extends hn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class J2 extends hn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class F0 extends hn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Lt extends hn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Z2=0;const Wn=new Mt,uo=new sn,As=new z,On=new Tn,ir=new Tn,mn=new z;class rn extends hs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Z2++}),this.uuid=ti(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(R0(e)?F0:P0)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const r=new Ut().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Wn.makeRotationFromQuaternion(e),this.applyMatrix4(Wn),this}rotateX(e){return Wn.makeRotationX(e),this.applyMatrix4(Wn),this}rotateY(e){return Wn.makeRotationY(e),this.applyMatrix4(Wn),this}rotateZ(e){return Wn.makeRotationZ(e),this.applyMatrix4(Wn),this}translate(e,t,n){return Wn.makeTranslation(e,t,n),this.applyMatrix4(Wn),this}scale(e,t,n){return Wn.makeScale(e,t,n),this.applyMatrix4(Wn),this}lookAt(e){return uo.lookAt(e),uo.updateMatrix(),this.applyMatrix4(uo.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(As).negate(),this.translate(As.x,As.y,As.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];n.push(o.x,o.y,o.z||0)}this.setAttribute("position",new Lt(n,3))}else{const n=Math.min(e.length,t.count);for(let i=0;i<n;i++){const r=e[i];t.setXYZ(i,r.x,r.y,r.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Tn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new z(-1/0,-1/0,-1/0),new z(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){const r=t[n];On.setFromBufferAttribute(r),this.morphTargetsRelative?(mn.addVectors(this.boundingBox.min,On.min),this.boundingBox.expandByPoint(mn),mn.addVectors(this.boundingBox.max,On.max),this.boundingBox.expandByPoint(mn)):(this.boundingBox.expandByPoint(On.min),this.boundingBox.expandByPoint(On.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ri);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new z,1/0);return}if(e){const n=this.boundingSphere.center;if(On.setFromBufferAttribute(e),t)for(let r=0,o=t.length;r<o;r++){const a=t[r];ir.setFromBufferAttribute(a),this.morphTargetsRelative?(mn.addVectors(On.min,ir.min),On.expandByPoint(mn),mn.addVectors(On.max,ir.max),On.expandByPoint(mn)):(On.expandByPoint(ir.min),On.expandByPoint(ir.max))}On.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)mn.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(mn));if(t)for(let r=0,o=t.length;r<o;r++){const a=t[r],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)mn.fromBufferAttribute(a,c),l&&(As.fromBufferAttribute(e,c),mn.add(As)),i=Math.max(i,n.distanceToSquared(mn))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,i=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new hn(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let I=0;I<n.count;I++)a[I]=new z,l[I]=new z;const c=new z,d=new z,m=new z,u=new Je,h=new Je,g=new Je,_=new z,f=new z;function p(I,A,E){c.fromBufferAttribute(n,I),d.fromBufferAttribute(n,A),m.fromBufferAttribute(n,E),u.fromBufferAttribute(r,I),h.fromBufferAttribute(r,A),g.fromBufferAttribute(r,E),d.sub(c),m.sub(c),h.sub(u),g.sub(u);const F=1/(h.x*g.y-g.x*h.y);isFinite(F)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(m,-h.y).multiplyScalar(F),f.copy(m).multiplyScalar(h.x).addScaledVector(d,-g.x).multiplyScalar(F),a[I].add(_),a[A].add(_),a[E].add(_),l[I].add(f),l[A].add(f),l[E].add(f))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let I=0,A=x.length;I<A;++I){const E=x[I],F=E.start,B=E.count;for(let X=F,Z=F+B;X<Z;X+=3)p(e.getX(X+0),e.getX(X+1),e.getX(X+2))}const M=new z,b=new z,N=new z,L=new z;function P(I){N.fromBufferAttribute(i,I),L.copy(N);const A=a[I];M.copy(A),M.sub(N.multiplyScalar(N.dot(A))).normalize(),b.crossVectors(L,A);const F=b.dot(l[I])<0?-1:1;o.setXYZW(I,M.x,M.y,M.z,F)}for(let I=0,A=x.length;I<A;++I){const E=x[I],F=E.start,B=E.count;for(let X=F,Z=F+B;X<Z;X+=3)P(e.getX(X+0)),P(e.getX(X+1)),P(e.getX(X+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new hn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let u=0,h=n.count;u<h;u++)n.setXYZ(u,0,0,0);const i=new z,r=new z,o=new z,a=new z,l=new z,c=new z,d=new z,m=new z;if(e)for(let u=0,h=e.count;u<h;u+=3){const g=e.getX(u+0),_=e.getX(u+1),f=e.getX(u+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),o.fromBufferAttribute(t,f),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),c.fromBufferAttribute(n,f),a.add(d),l.add(d),c.add(d),n.setXYZ(g,a.x,a.y,a.z),n.setXYZ(_,l.x,l.y,l.z),n.setXYZ(f,c.x,c.y,c.z)}else for(let u=0,h=t.count;u<h;u+=3)i.fromBufferAttribute(t,u+0),r.fromBufferAttribute(t,u+1),o.fromBufferAttribute(t,u+2),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),n.setXYZ(u+0,d.x,d.y,d.z),n.setXYZ(u+1,d.x,d.y,d.z),n.setXYZ(u+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)mn.fromBufferAttribute(e,t),mn.normalize(),e.setXYZ(t,mn.x,mn.y,mn.z)}toNonIndexed(){function e(a,l){const c=a.array,d=a.itemSize,m=a.normalized,u=new c.constructor(l.length*d);let h=0,g=0;for(let _=0,f=l.length;_<f;_++){a.isInterleavedBufferAttribute?h=l[_]*a.data.stride+a.offset:h=l[_]*d;for(let p=0;p<d;p++)u[g++]=c[h++]}return new hn(u,d,m)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new rn,n=this.index.array,i=this.attributes;for(const a in i){const l=i[a],c=e(l,n);t.setAttribute(a,c)}const r=this.morphAttributes;for(const a in r){const l=[],c=r[a];for(let d=0,m=c.length;d<m;d++){const u=c[d],h=e(u,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let m=0,u=c.length;m<u;m++){const h=c[m];d.push(h.toJSON(e.data))}d.length>0&&(i[l]=d,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const i=e.attributes;for(const c in i){const d=i[c];this.setAttribute(c,d.clone(t))}const r=e.morphAttributes;for(const c in r){const d=[],m=r[c];for(let u=0,h=m.length;u<h;u++)d.push(m[u].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,d=o.length;c<d;c++){const m=o[c];this.addGroup(m.start,m.count,m.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Vc=new Mt,Ki=new Ys,Ir=new Ri,Hc=new z,zr=new z,Br=new z,Or=new z,fo=new z,kr=new z,Gc=new z,Vr=new z;class Pt extends sn{constructor(e=new rn,t=new Gi){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(r&&a){kr.set(0,0,0);for(let l=0,c=r.length;l<c;l++){const d=a[l],m=r[l];d!==0&&(fo.fromBufferAttribute(m,e),o?kr.addScaledVector(fo,d):kr.addScaledVector(fo.sub(t),d))}t.add(kr)}return t}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ir.copy(n.boundingSphere),Ir.applyMatrix4(r),Ki.copy(e.ray).recast(e.near),!(Ir.containsPoint(Ki.origin)===!1&&(Ki.intersectSphere(Ir,Hc)===null||Ki.origin.distanceToSquared(Hc)>(e.far-e.near)**2))&&(Vc.copy(r).invert(),Ki.copy(e.ray).applyMatrix4(Vc),!(n.boundingBox!==null&&Ki.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Ki)))}_computeIntersections(e,t,n){let i;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,d=r.attributes.uv1,m=r.attributes.normal,u=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const f=u[g],p=o[f.materialIndex],x=Math.max(f.start,h.start),M=Math.min(a.count,Math.min(f.start+f.count,h.start+h.count));for(let b=x,N=M;b<N;b+=3){const L=a.getX(b),P=a.getX(b+1),I=a.getX(b+2);i=Hr(this,p,e,n,c,d,m,L,P,I),i&&(i.faceIndex=Math.floor(b/3),i.face.materialIndex=f.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(a.count,h.start+h.count);for(let f=g,p=_;f<p;f+=3){const x=a.getX(f),M=a.getX(f+1),b=a.getX(f+2);i=Hr(this,o,e,n,c,d,m,x,M,b),i&&(i.faceIndex=Math.floor(f/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const f=u[g],p=o[f.materialIndex],x=Math.max(f.start,h.start),M=Math.min(l.count,Math.min(f.start+f.count,h.start+h.count));for(let b=x,N=M;b<N;b+=3){const L=b,P=b+1,I=b+2;i=Hr(this,p,e,n,c,d,m,L,P,I),i&&(i.faceIndex=Math.floor(b/3),i.face.materialIndex=f.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(l.count,h.start+h.count);for(let f=g,p=_;f<p;f+=3){const x=f,M=f+1,b=f+2;i=Hr(this,o,e,n,c,d,m,x,M,b),i&&(i.faceIndex=Math.floor(f/3),t.push(i))}}}}function Q2(s,e,t,n,i,r,o,a){let l;if(e.side===Dn?l=n.intersectTriangle(o,r,i,!0,a):l=n.intersectTriangle(i,r,o,e.side===Yn,a),l===null)return null;Vr.copy(a),Vr.applyMatrix4(s.matrixWorld);const c=t.ray.origin.distanceTo(Vr);return c<t.near||c>t.far?null:{distance:c,point:Vr.clone(),object:s}}function Hr(s,e,t,n,i,r,o,a,l,c){s.getVertexPosition(a,zr),s.getVertexPosition(l,Br),s.getVertexPosition(c,Or);const d=Q2(s,e,t,n,zr,Br,Or,Gc);if(d){const m=new z;qn.getBarycoord(Gc,zr,Br,Or,m),i&&(d.uv=qn.getInterpolatedAttribute(i,a,l,c,m,new Je)),r&&(d.uv1=qn.getInterpolatedAttribute(r,a,l,c,m,new Je)),o&&(d.normal=qn.getInterpolatedAttribute(o,a,l,c,m,new z),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const u={a,b:l,c,normal:new z,materialIndex:0};qn.getNormal(zr,Br,Or,u.normal),d.face=u,d.barycoord=m}return d}class Wi extends rn{constructor(e=1,t=1,n=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],d=[],m=[];let u=0,h=0;g("z","y","x",-1,-1,n,t,e,o,r,0),g("z","y","x",1,-1,n,t,-e,o,r,1),g("x","z","y",1,1,e,n,t,i,o,2),g("x","z","y",1,-1,e,n,-t,i,o,3),g("x","y","z",1,-1,e,t,n,i,r,4),g("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(l),this.setAttribute("position",new Lt(c,3)),this.setAttribute("normal",new Lt(d,3)),this.setAttribute("uv",new Lt(m,2));function g(_,f,p,x,M,b,N,L,P,I,A){const E=b/P,F=N/I,B=b/2,X=N/2,Z=L/2,se=P+1,W=I+1;let he=0,Q=0;const xe=new z;for(let De=0;De<W;De++){const Ae=De*F-X;for(let pe=0;pe<se;pe++){const re=pe*E-B;xe[_]=re*x,xe[f]=Ae*M,xe[p]=Z,c.push(xe.x,xe.y,xe.z),xe[_]=0,xe[f]=0,xe[p]=L>0?1:-1,d.push(xe.x,xe.y,xe.z),m.push(pe/P),m.push(1-De/I),he+=1}}for(let De=0;De<I;De++)for(let Ae=0;Ae<P;Ae++){const pe=u+Ae+se*De,re=u+Ae+se*(De+1),q=u+(Ae+1)+se*(De+1),K=u+(Ae+1)+se*De;l.push(pe,re,K),l.push(re,q,K),Q+=6}a.addGroup(h,Q,A),h+=Q,u+=he}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Wi(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function qs(s){const e={};for(const t in s){e[t]={};for(const n in s[t]){const i=s[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function Rn(s){const e={};for(let t=0;t<s.length;t++){const n=qs(s[t]);for(const i in n)e[i]=n[i]}return e}function e1(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function N0(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Bt.workingColorSpace}const Ql={clone:qs,merge:Rn};var t1=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,n1=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
9
|
-
}`;class
|
|
9
|
+
}`;class Ti extends Hn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=t1,this.fragmentShader=n1,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=qs(e.uniforms),this.uniformsGroups=e1(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?t.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[i]={type:"m4",value:o.toArray()}:t.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class U0 extends sn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Mt,this.projectionMatrix=new Mt,this.projectionMatrixInverse=new Mt,this.coordinateSystem=bi}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Ii=new z,Wc=new Je,Xc=new Je;class gn extends U0{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=js*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(dr*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return js*2*Math.atan(Math.tan(dr*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Ii.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Ii.x,Ii.y).multiplyScalar(-e/Ii.z),Ii.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Ii.x,Ii.y).multiplyScalar(-e/Ii.z)}getViewSize(e,t){return this.getViewBounds(e,Wc,Xc),t.subVectors(Xc,Wc)}setViewOffset(e,t,n,i,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(dr*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;r+=o.offsetX*i/l,t-=o.offsetY*n/c,i*=o.width/l,n*=o.height/c}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const ws=-90,Ts=1;class i1 extends sn{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new gn(ws,Ts,e,t);i.layers=this.layers,this.add(i);const r=new gn(ws,Ts,e,t);r.layers=this.layers,this.add(r);const o=new gn(ws,Ts,e,t);o.layers=this.layers,this.add(o);const a=new gn(ws,Ts,e,t);a.layers=this.layers,this.add(a);const l=new gn(ws,Ts,e,t);l.layers=this.layers,this.add(l);const c=new gn(ws,Ts,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,r,o,a,l]=t;for(const c of t)this.remove(c);if(e===bi)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===wa)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,c,d]=this.children,m=e.getRenderTarget(),u=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const _=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,r),e.setRenderTarget(n,1,i),e.render(t,o),e.setRenderTarget(n,2,i),e.render(t,a),e.setRenderTarget(n,3,i),e.render(t,l),e.setRenderTarget(n,4,i),e.render(t,c),n.texture.generateMipmaps=_,e.setRenderTarget(n,5,i),e.render(t,d),e.setRenderTarget(m,u,h),e.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class I0 extends Mn{constructor(e=[],t=Gs,n,i,r,o,a,l,c,d){super(e,t,n,i,r,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class s1 extends cs{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new I0(i),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:`
|
|
10
10
|
|
|
11
11
|
varying vec3 vWorldDirection;
|
|
12
12
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
42
42
|
|
|
43
43
|
}
|
|
44
|
-
`},i=new $i(5,5,5),r=new Li({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:In,blending:Wi});r.uniforms.tEquirect.value=t;const o=new zt(i,r),a=t.minFilter;return t.minFilter===Ai&&(t.minFilter=Xn),new i1(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,i);e.setRenderTarget(r)}}class Ln extends ln{constructor(){super(),this.isGroup=!0,this.type="Group"}}const r1={type:"move"};class po{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ln,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Ln,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new I,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new I),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ln,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new I,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new I),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const p=t.getJointPose(_,n),f=this._getHandJoint(c,_);p!==null&&(f.matrix.fromArray(p.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,f.jointRadius=p.radius),f.visible=p!==null}const d=c.joints["index-finger-tip"],m=c.joints["thumb-tip"],u=d.position.distanceTo(m.position),h=.02,g=.005;c.inputState.pinching&&u>h+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&u<=h-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(r1)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Ln;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends ln{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Sn,this.environmentIntensity=1,this.environmentRotation=new Sn,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class z0{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Cl,this.updateRanges=[],this.version=0,this.uuid=ai()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ai()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ai()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Nn=new I;class pi{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Nn.fromBufferAttribute(this,t),Nn.applyMatrix4(e),this.setXYZ(t,Nn.x,Nn.y,Nn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Nn.fromBufferAttribute(this,t),Nn.applyNormalMatrix(e),this.setXYZ(t,Nn.x,Nn.y,Nn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Nn.fromBufferAttribute(this,t),Nn.transformDirection(e),this.setXYZ(t,Nn.x,Nn.y,Nn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=si(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=tn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=si(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=si(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=si(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=si(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array),r=tn(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return new mn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new pi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class za extends qn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Tt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Cs;const sr=new I,Rs=new I,Ds=new I,Ls=new et,rr=new et,B0=new Et,Gr=new I,ar=new I,Wr=new I,jc=new et,mo=new et,qc=new et;class ec extends ln{constructor(e=new za){if(super(),this.isSprite=!0,this.type="Sprite",Cs===void 0){Cs=new hn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new z0(t,5);Cs.setIndex([0,1,2,0,2,3]),Cs.setAttribute("position",new pi(n,3,0,!1)),Cs.setAttribute("uv",new pi(n,2,3,!1))}this.geometry=Cs,this.material=e,this.center=new et(.5,.5),this.count=1}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Rs.setFromMatrixScale(this.matrixWorld),B0.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ds.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Rs.multiplyScalar(-Ds.z);const n=this.material.rotation;let i,r;n!==0&&(r=Math.cos(n),i=Math.sin(n));const o=this.center;Xr(Gr.set(-.5,-.5,0),Ds,o,Rs,i,r),Xr(ar.set(.5,-.5,0),Ds,o,Rs,i,r),Xr(Wr.set(.5,.5,0),Ds,o,Rs,i,r),jc.set(0,0),mo.set(1,0),qc.set(1,1);let a=e.ray.intersectTriangle(Gr,ar,Wr,!1,sr);if(a===null&&(Xr(ar.set(-.5,.5,0),Ds,o,Rs,i,r),mo.set(0,1),a=e.ray.intersectTriangle(Gr,Wr,ar,!1,sr),a===null))return;const l=e.ray.origin.distanceTo(sr);l<e.near||l>e.far||t.push({distance:l,point:sr.clone(),uv:Kn.getInterpolation(sr,Gr,ar,Wr,jc,mo,qc,new et),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Xr(s,e,t,n,i,r){Ls.subVectors(s,t).addScalar(.5).multiply(n),i!==void 0?(rr.x=r*Ls.x-i*Ls.y,rr.y=i*Ls.x+r*Ls.y):rr.copy(Ls),s.copy(e),s.x+=rr.x,s.y+=rr.y,s.applyMatrix4(B0)}const jr=new I,$c=new I;class O0 extends ln{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n<i;n++){const r=t[n];this.addLevel(r.object.clone(),r.distance,r.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const i=this.levels;let r;for(r=0;r<i.length&&!(t<i[r].distance);r++);return i.splice(r,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const i=t.splice(n,1);return this.remove(i[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){jr.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(jr);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){jr.setFromMatrixPosition(e.matrixWorld),$c.setFromMatrixPosition(this.matrixWorld);const n=jr.distanceTo($c)/e.zoom;t[0].object.visible=!0;let i,r;for(i=1,r=t.length;i<r;i++){let o=t[i].distance;if(t[i].object.visible&&(o-=o*t[i].hysteresis),n>=o)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i<r;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let i=0,r=n.length;i<r;i++){const o=n[i];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const Yc=new I,Jc=new Xt,Kc=new Xt,a1=new I,Zc=new Et,qr=new I,go=new Fi,Qc=new Et,_o=new Ys;class o1 extends zt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=bc,this.bindMatrix=new Et,this.bindMatrixInverse=new Et,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Fn),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingBox.expandByPoint(qr)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Fi),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingSphere.expandByPoint(qr)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),go.copy(this.boundingSphere),go.applyMatrix4(i),e.ray.intersectsSphere(go)!==!1&&(Qc.copy(i).invert(),_o.copy(e.ray).applyMatrix4(Qc),!(this.boundingBox!==null&&_o.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,_o)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Xt,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===bc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===i2?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;Jc.fromBufferAttribute(i.attributes.skinIndex,e),Kc.fromBufferAttribute(i.attributes.skinWeight,e),Yc.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let r=0;r<4;r++){const o=Kc.getComponent(r);if(o!==0){const a=Jc.getComponent(r);Zc.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(a1.copy(Yc).applyMatrix4(Zc),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class k0 extends ln{constructor(){super(),this.isBone=!0,this.type="Bone"}}class V0 extends Tn{constructor(e=null,t=1,n=1,i,r,o,a,l,c=jn,d=jn,m,u){super(null,o,a,l,c,d,i,r,m,u),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const eh=new Et,l1=new Et;class tc{constructor(e=[],t=[]){this.uuid=ai(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Et)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new Et;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let r=0,o=e.length;r<o;r++){const a=e[r]?e[r].matrixWorld:l1;eh.multiplyMatrices(a,t[r]),eh.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new tc(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new V0(t,e,e,Zn,fi);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const r=e.bones[n];let o=t[r];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),o=new k0),this.bones.push(o),this.boneInverses.push(new Et().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){const o=t[i];e.bones.push(o.uuid);const a=n[i];e.boneInverses.push(a.toArray())}return e}}const vo=new I,c1=new I,h1=new kt;class Jn{constructor(e=new I(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=vo.subVectors(n,t).cross(c1.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(vo),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||h1.getNormalMatrix(e),i=this.coplanarPoint(vo).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Qi=new Fi,$r=new I;class nc{constructor(e=new Jn,t=new Jn,n=new Jn,i=new Jn,r=new Jn,o=new Jn){this.planes=[e,t,n,i,r,o]}set(e,t,n,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=wi){const n=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],l=i[3],c=i[4],d=i[5],m=i[6],u=i[7],h=i[8],g=i[9],_=i[10],p=i[11],f=i[12],v=i[13],b=i[14],S=i[15];if(n[0].setComponents(l-r,u-c,p-h,S-f).normalize(),n[1].setComponents(l+r,u+c,p+h,S+f).normalize(),n[2].setComponents(l+o,u+d,p+g,S+v).normalize(),n[3].setComponents(l-o,u-d,p-g,S-v).normalize(),n[4].setComponents(l-a,u-m,p-_,S-b).normalize(),t===wi)n[5].setComponents(l+a,u+m,p+_,S+b).normalize();else if(t===wa)n[5].setComponents(a,m,_,b).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Qi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Qi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Qi)}intersectsSprite(e){return Qi.center.set(0,0,0),Qi.radius=.7071067811865476,Qi.applyMatrix4(e.matrixWorld),this.intersectsSphere(Qi)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if($r.x=i.normal.x>0?e.max.x:e.min.x,$r.y=i.normal.y>0?e.max.y:e.min.y,$r.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint($r)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Ri extends qn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Tt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Ta=new I,Ca=new I,th=new Et,or=new Ys,Yr=new Fi,yo=new I,nh=new I;class Ba extends ln{constructor(e=new hn,t=new Ri){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,r=t.count;i<r;i++)Ta.fromBufferAttribute(t,i-1),Ca.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=Ta.distanceTo(Ca);e.setAttribute("lineDistance",new It(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Yr.copy(n.boundingSphere),Yr.applyMatrix4(i),Yr.radius+=r,e.ray.intersectsSphere(Yr)===!1)return;th.copy(i).invert(),or.copy(e.ray).applyMatrix4(th);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,d=n.index,u=n.attributes.position;if(d!==null){const h=Math.max(0,o.start),g=Math.min(d.count,o.start+o.count);for(let _=h,p=g-1;_<p;_+=c){const f=d.getX(_),v=d.getX(_+1),b=Jr(this,e,or,l,f,v,_);b&&t.push(b)}if(this.isLineLoop){const _=d.getX(g-1),p=d.getX(h),f=Jr(this,e,or,l,_,p,g-1);f&&t.push(f)}}else{const h=Math.max(0,o.start),g=Math.min(u.count,o.start+o.count);for(let _=h,p=g-1;_<p;_+=c){const f=Jr(this,e,or,l,_,_+1,_);f&&t.push(f)}if(this.isLineLoop){const _=Jr(this,e,or,l,g-1,h,g-1);_&&t.push(_)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function Jr(s,e,t,n,i,r,o){const a=s.geometry.attributes.position;if(Ta.fromBufferAttribute(a,i),Ca.fromBufferAttribute(a,r),t.distanceSqToSegment(Ta,Ca,yo,nh)>n)return;yo.applyMatrix4(s.matrixWorld);const c=e.ray.origin.distanceTo(yo);if(!(c<e.near||c>e.far))return{distance:c,point:nh.clone().applyMatrix4(s.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:s}}const ih=new I,sh=new I;class Ra extends Ba{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,r=t.count;i<r;i+=2)ih.fromBufferAttribute(t,i),sh.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ih.distanceTo(sh);e.setAttribute("lineDistance",new It(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Gi extends qn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Tt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const rh=new Et,Rl=new Ys,Kr=new Fi,Zr=new I;class Vs extends ln{constructor(e=new hn,t=new Gi){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Kr.copy(n.boundingSphere),Kr.applyMatrix4(i),Kr.radius+=r,e.ray.intersectsSphere(Kr)===!1)return;rh.copy(i).invert(),Rl.copy(e.ray).applyMatrix4(rh);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,m=n.attributes.position;if(c!==null){const u=Math.max(0,o.start),h=Math.min(c.count,o.start+o.count);for(let g=u,_=h;g<_;g++){const p=c.getX(g);Zr.fromBufferAttribute(m,p),ah(Zr,p,l,i,e,t,this)}}else{const u=Math.max(0,o.start),h=Math.min(m.count,o.start+o.count);for(let g=u,_=h;g<_;g++)Zr.fromBufferAttribute(m,g),ah(Zr,g,l,i,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function ah(s,e,t,n,i,r,o){const a=Rl.distanceSqToPoint(s);if(a<t){const l=new I;Rl.closestPointToPoint(s,l),l.applyMatrix4(n);const c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class u1 extends Tn{constructor(e,t,n,i,r,o,a,l,c){super(e,t,n,i,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class H0 extends Tn{constructor(e,t,n=hs,i,r,o,a=jn,l=jn,c,d=yr,m=1){if(d!==yr&&d!==xr)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const u={width:e,height:t,depth:m};super(u,i,r,o,a,l,d,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Kl(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class ic extends hn{constructor(e=1,t=1,n=1,i=32,r=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:o,thetaStart:a,thetaLength:l};const c=this;i=Math.floor(i),r=Math.floor(r);const d=[],m=[],u=[],h=[];let g=0;const _=[],p=n/2;let f=0;v(),o===!1&&(e>0&&b(!0),t>0&&b(!1)),this.setIndex(d),this.setAttribute("position",new It(m,3)),this.setAttribute("normal",new It(u,3)),this.setAttribute("uv",new It(h,2));function v(){const S=new I,F=new I;let C=0;const R=(t-e)/n;for(let P=0;P<=r;P++){const A=[],E=P/r,L=E*(t-e)+e;for(let B=0;B<=i;B++){const H=B/i,Q=H*l+a,ae=Math.sin(Q),G=Math.cos(Q);F.x=L*ae,F.y=-E*n+p,F.z=L*G,m.push(F.x,F.y,F.z),S.set(ae,R,G).normalize(),u.push(S.x,S.y,S.z),h.push(H,1-E),A.push(g++)}_.push(A)}for(let P=0;P<i;P++)for(let A=0;A<r;A++){const E=_[A][P],L=_[A+1][P],B=_[A+1][P+1],H=_[A][P+1];(e>0||A!==0)&&(d.push(E,L,H),C+=3),(t>0||A!==r-1)&&(d.push(L,B,H),C+=3)}c.addGroup(f,C,0),f+=C}function b(S){const F=g,C=new et,R=new I;let P=0;const A=S===!0?e:t,E=S===!0?1:-1;for(let B=1;B<=i;B++)m.push(0,p*E,0),u.push(0,E,0),h.push(.5,.5),g++;const L=g;for(let B=0;B<=i;B++){const Q=B/i*l+a,ae=Math.cos(Q),G=Math.sin(Q);R.x=A*G,R.y=p*E,R.z=A*ae,m.push(R.x,R.y,R.z),u.push(0,E,0),C.x=ae*.5+.5,C.y=G*.5*E+.5,h.push(C.x,C.y),g++}for(let B=0;B<i;B++){const H=F+B,Q=L+B;S===!0?d.push(Q,Q+1,H):d.push(Q+1,Q,H),P+=3}c.addGroup(f,P,S===!0?1:2),f+=P}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ic(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ni{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let i=0;const r=n.length;let o;t?o=t:o=e*n[r-1];let a=0,l=r-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=n[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===o)return i/(r-1);const d=n[i],u=n[i+1]-d,h=(o-d)/u;return(i+h)/(r-1)}getTangent(e,t){let i=e-1e-4,r=e+1e-4;i<0&&(i=0),r>1&&(r=1);const o=this.getPoint(i),a=this.getPoint(r),l=t||(o.isVector2?new et:new I);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new I,i=[],r=[],o=[],a=new I,l=new Et;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new I)}r[0]=new I,o[0]=new I;let c=Number.MAX_VALUE;const d=Math.abs(i[0].x),m=Math.abs(i[0].y),u=Math.abs(i[0].z);d<=c&&(c=d,n.set(1,0,0)),m<=c&&(c=m,n.set(0,1,0)),u<=c&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),o[0].crossVectors(i[0],r[0]);for(let h=1;h<=e;h++){if(r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Vt(i[h-1].dot(i[h]),-1,1));r[h].applyMatrix4(l.makeRotationAxis(a,g))}o[h].crossVectors(i[h],r[h])}if(t===!0){let h=Math.acos(Vt(r[0].dot(r[e]),-1,1));h/=e,i[0].dot(a.crossVectors(r[0],r[e]))>0&&(h=-h);for(let g=1;g<=e;g++)r[g].applyMatrix4(l.makeRotationAxis(i[g],h*g)),o[g].crossVectors(i[g],r[g])}return{tangents:i,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class G0 extends Ni{constructor(e=0,t=0,n=1,i=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new et){const n=t,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(o?r=0:r=i),this.aClockwise===!0&&!o&&(r===i?r=-i:r=r-i);const a=this.aStartAngle+e*r;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const d=Math.cos(this.aRotation),m=Math.sin(this.aRotation),u=l-this.aX,h=c-this.aY;l=u*d-h*m+this.aX,c=u*m+h*d+this.aY}return n.set(l,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class d1 extends G0{constructor(e,t,n,i,r,o){super(e,t,n,n,i,r,o),this.isArcCurve=!0,this.type="ArcCurve"}}function sc(){let s=0,e=0,t=0,n=0;function i(r,o,a,l){s=r,e=a,t=-3*r+3*o-2*a-l,n=2*r-2*o+a+l}return{initCatmullRom:function(r,o,a,l,c){i(o,a,c*(a-r),c*(l-o))},initNonuniformCatmullRom:function(r,o,a,l,c,d,m){let u=(o-r)/c-(a-r)/(c+d)+(a-o)/d,h=(a-o)/d-(l-o)/(d+m)+(l-a)/m;u*=d,h*=d,i(o,a,u,h)},calc:function(r){const o=r*r,a=o*r;return s+e*r+t*o+n*a}}}const Qr=new I,xo=new sc,Mo=new sc,bo=new sc;class rc extends Ni{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new I){const n=t,i=this.points,r=i.length,o=(r-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,d;this.closed||a>0?c=i[(a-1)%r]:(Qr.subVectors(i[0],i[1]).add(i[0]),c=Qr);const m=i[a%r],u=i[(a+1)%r];if(this.closed||a+2<r?d=i[(a+2)%r]:(Qr.subVectors(i[r-1],i[r-2]).add(i[r-1]),d=Qr),this.curveType==="centripetal"||this.curveType==="chordal"){const h=this.curveType==="chordal"?.5:.25;let g=Math.pow(c.distanceToSquared(m),h),_=Math.pow(m.distanceToSquared(u),h),p=Math.pow(u.distanceToSquared(d),h);_<1e-4&&(_=1),g<1e-4&&(g=_),p<1e-4&&(p=_),xo.initNonuniformCatmullRom(c.x,m.x,u.x,d.x,g,_,p),Mo.initNonuniformCatmullRom(c.y,m.y,u.y,d.y,g,_,p),bo.initNonuniformCatmullRom(c.z,m.z,u.z,d.z,g,_,p)}else this.curveType==="catmullrom"&&(xo.initCatmullRom(c.x,m.x,u.x,d.x,this.tension),Mo.initCatmullRom(c.y,m.y,u.y,d.y,this.tension),bo.initCatmullRom(c.z,m.z,u.z,d.z,this.tension));return n.set(xo.calc(l),Mo.calc(l),bo.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new I().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function oh(s,e,t,n,i){const r=(n-e)*.5,o=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*n+r+o)*l+(-3*t+3*n-2*r-o)*a+r*s+t}function f1(s,e){const t=1-s;return t*t*e}function p1(s,e){return 2*(1-s)*s*e}function m1(s,e){return s*s*e}function pr(s,e,t,n){return f1(s,e)+p1(s,t)+m1(s,n)}function g1(s,e){const t=1-s;return t*t*t*e}function _1(s,e){const t=1-s;return 3*t*t*s*e}function v1(s,e){return 3*(1-s)*s*s*e}function y1(s,e){return s*s*s*e}function mr(s,e,t,n,i){return g1(s,e)+_1(s,t)+v1(s,n)+y1(s,i)}class x1 extends Ni{constructor(e=new et,t=new et,n=new et,i=new et){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new et){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class M1 extends Ni{constructor(e=new I,t=new I,n=new I,i=new I){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new I){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y),mr(e,i.z,r.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class b1 extends Ni{constructor(e=new et,t=new et){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new et){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new et){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class S1 extends Ni{constructor(e=new I,t=new I){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new I){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new I){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class E1 extends Ni{constructor(e=new et,t=new et,n=new et){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new et){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class W0 extends Ni{constructor(e=new I,t=new I,n=new I){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new I){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y),pr(e,i.z,r.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class A1 extends Ni{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new et){const n=t,i=this.points,r=(i.length-1)*e,o=Math.floor(r),a=r-o,l=i[o===0?o:o-1],c=i[o],d=i[o>i.length-2?i.length-1:o+1],m=i[o>i.length-3?i.length-1:o+2];return n.set(oh(a,l.x,c.x,d.x,m.x),oh(a,l.y,c.y,d.y,m.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new et().fromArray(i))}return this}}var w1=Object.freeze({__proto__:null,ArcCurve:d1,CatmullRomCurve3:rc,CubicBezierCurve:x1,CubicBezierCurve3:M1,EllipseCurve:G0,LineCurve:b1,LineCurve3:S1,QuadraticBezierCurve:E1,QuadraticBezierCurve3:W0,SplineCurve:A1});class Di extends hn{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,o=t/2,a=Math.floor(n),l=Math.floor(i),c=a+1,d=l+1,m=e/a,u=t/l,h=[],g=[],_=[],p=[];for(let f=0;f<d;f++){const v=f*u-o;for(let b=0;b<c;b++){const S=b*m-r;g.push(S,-v,0),_.push(0,0,1),p.push(b/a),p.push(1-f/l)}}for(let f=0;f<l;f++)for(let v=0;v<a;v++){const b=v+c*f,S=v+c*(f+1),F=v+1+c*(f+1),C=v+1+c*f;h.push(b,S,C),h.push(S,F,C)}this.setIndex(h),this.setAttribute("position",new It(g,3)),this.setAttribute("normal",new It(_,3)),this.setAttribute("uv",new It(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Di(e.width,e.height,e.widthSegments,e.heightSegments)}}class Oa extends hn{constructor(e=1,t=32,n=16,i=0,r=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(o+a,Math.PI);let c=0;const d=[],m=new I,u=new I,h=[],g=[],_=[],p=[];for(let f=0;f<=n;f++){const v=[],b=f/n;let S=0;f===0&&o===0?S=.5/t:f===n&&l===Math.PI&&(S=-.5/t);for(let F=0;F<=t;F++){const C=F/t;m.x=-e*Math.cos(i+C*r)*Math.sin(o+b*a),m.y=e*Math.cos(o+b*a),m.z=e*Math.sin(i+C*r)*Math.sin(o+b*a),g.push(m.x,m.y,m.z),u.copy(m).normalize(),_.push(u.x,u.y,u.z),p.push(C+S,1-b),v.push(c++)}d.push(v)}for(let f=0;f<n;f++)for(let v=0;v<t;v++){const b=d[f][v+1],S=d[f][v],F=d[f+1][v],C=d[f+1][v+1];(f!==0||o>0)&&h.push(b,S,C),(f!==n-1||l<Math.PI)&&h.push(S,F,C)}this.setIndex(h),this.setAttribute("position",new It(g,3)),this.setAttribute("normal",new It(_,3)),this.setAttribute("uv",new It(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Oa(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class ka extends hn{constructor(e=new W0(new I(-1,-1,0),new I(-1,1,0),new I(1,1,0)),t=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r};const o=e.computeFrenetFrames(t,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new I,l=new I,c=new et;let d=new I;const m=[],u=[],h=[],g=[];_(),this.setIndex(g),this.setAttribute("position",new It(m,3)),this.setAttribute("normal",new It(u,3)),this.setAttribute("uv",new It(h,2));function _(){for(let b=0;b<t;b++)p(b);p(r===!1?t:0),v(),f()}function p(b){d=e.getPointAt(b/t,d);const S=o.normals[b],F=o.binormals[b];for(let C=0;C<=i;C++){const R=C/i*Math.PI*2,P=Math.sin(R),A=-Math.cos(R);l.x=A*S.x+P*F.x,l.y=A*S.y+P*F.y,l.z=A*S.z+P*F.z,l.normalize(),u.push(l.x,l.y,l.z),a.x=d.x+n*l.x,a.y=d.y+n*l.y,a.z=d.z+n*l.z,m.push(a.x,a.y,a.z)}}function f(){for(let b=1;b<=t;b++)for(let S=1;S<=i;S++){const F=(i+1)*(b-1)+(S-1),C=(i+1)*b+(S-1),R=(i+1)*b+S,P=(i+1)*(b-1)+S;g.push(F,C,P),g.push(C,R,P)}}function v(){for(let b=0;b<=t;b++)for(let S=0;S<=i;S++)c.x=b/t,c.y=S/i,h.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new ka(new w1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class T1 extends hn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new I,r=new I;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,d=l.length;c<d;++c){const m=l[c],u=m.start,h=m.count;for(let g=u,_=u+h;g<_;g+=3)for(let p=0;p<3;p++){const f=a.getX(g+p),v=a.getX(g+(p+1)%3);i.fromBufferAttribute(o,f),r.fromBufferAttribute(o,v),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const d=3*a+c,m=3*a+(c+1)%3;i.fromBufferAttribute(o,d),r.fromBufferAttribute(o,m),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new It(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function lh(s,e,t){const n=`${s.x},${s.y},${s.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${s.x},${s.y},${s.z}`;return t.has(n)===!0||t.has(i)===!0?!1:(t.add(n),t.add(i),!0)}class X0 extends qn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Tt(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class j0 extends qn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Tt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class fn extends qn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Tt(16777215),this.specular=new Tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class C1 extends qn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class R1 extends qn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=a2,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class D1 extends qn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function ea(s,e){return!s||s.constructor===e?s:typeof e.BYTES_PER_ELEMENT=="number"?new e(s):Array.prototype.slice.call(s)}function L1(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function P1(s){function e(i,r){return s[i]-s[r]}const t=s.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function ch(s,e,t){const n=s.length,i=new s.constructor(n);for(let r=0,o=0;o!==n;++r){const a=t[r]*e;for(let l=0;l!==e;++l)i[o++]=s[a+l]}return i}function q0(s,e,t,n){let i=1,r=s[0];for(;r!==void 0&&r[n]===void 0;)r=s[i++];if(r===void 0)return;let o=r[n];if(o!==void 0)if(Array.isArray(o))do o=r[n],o!==void 0&&(e.push(r.time),t.push(...o)),r=s[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[n],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=s[i++];while(r!==void 0);else do o=r[n],o!==void 0&&(e.push(r.time),t.push(o)),r=s[i++];while(r!==void 0)}class Va{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];n:{e:{let o;t:{i:if(!(e<i)){for(let a=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(r=i,i=t[++n],e<i)break e}o=t.length;break t}if(!(e>=r)){const a=t[1];e<a&&(n=2,r=a);for(let l=n-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=r,r=t[--n-1],e>=r)break e}o=n,n=0;break t}break n}for(;n<o;){const a=n+o>>>1;e<t[a]?o=a:n=a+1}if(i=t[n],r=t[n-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let o=0;o!==i;++o)t[o]=n[r+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class F1 extends Va{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Sc,endingEnd:Sc}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,o=e+1,a=i[r],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case Ec:r=e,a=2*t-n;break;case Ac:r=i.length-2,a=t+i[r]-i[r+1];break;default:r=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Ec:o=e,l=2*n-t;break;case Ac:o=1,l=n+i[1]-i[0];break;default:o=e-1,l=t}const c=(n-t)*.5,d=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-n),this._offsetPrev=r*d,this._offsetNext=o*d}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=this._offsetPrev,m=this._offsetNext,u=this._weightPrev,h=this._weightNext,g=(n-t)/(i-t),_=g*g,p=_*g,f=-u*p+2*u*_-u*g,v=(1+u)*p+(-1.5-2*u)*_+(-.5+u)*g+1,b=(-1-h)*p+(1.5+h)*_+.5*g,S=h*p-h*_;for(let F=0;F!==a;++F)r[F]=f*o[d+F]+v*o[c+F]+b*o[l+F]+S*o[m+F];return r}}class N1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=(n-t)/(i-t),m=1-d;for(let u=0;u!==a;++u)r[u]=o[c+u]*m+o[l+u]*d;return r}}class U1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class li{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ea(t,this.TimeBufferType),this.values=ea(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:ea(e.times,Array),values:ea(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new U1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new N1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new F1(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Ea:t=this.InterpolantFactoryMethodDiscrete;break;case Tl:t=this.InterpolantFactoryMethodLinear;break;case ja:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ea;case this.InterpolantFactoryMethodLinear:return Tl;case this.InterpolantFactoryMethodSmooth:return ja}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,o=i-1;for(;r!==i&&n[r]<e;)++r;for(;o!==-1&&n[o]>t;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=n.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,r=n.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&L1(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===ja,r=e.length-1;let o=1;for(let a=1;a<r;++a){let l=!1;const c=e[a],d=e[a+1];if(c!==d&&(a!==1||c!==e[0]))if(i)l=!0;else{const m=a*n,u=m-n,h=m+n;for(let g=0;g!==n;++g){const _=t[m+g];if(_!==t[u+g]||_!==t[h+g]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const m=a*n,u=o*n;for(let h=0;h!==n;++h)t[u+h]=t[m+h]}++o}}if(r>0){e[o]=e[r];for(let a=r*n,l=o*n,c=0;c!==n;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}li.prototype.ValueTypeName="";li.prototype.TimeBufferType=Float32Array;li.prototype.ValueBufferType=Float32Array;li.prototype.DefaultInterpolation=Tl;class Js extends li{constructor(e,t,n){super(e,t,n)}}Js.prototype.ValueTypeName="bool";Js.prototype.ValueBufferType=Array;Js.prototype.DefaultInterpolation=Ea;Js.prototype.InterpolantFactoryMethodLinear=void 0;Js.prototype.InterpolantFactoryMethodSmooth=void 0;class $0 extends li{constructor(e,t,n,i){super(e,t,n,i)}}$0.prototype.ValueTypeName="color";class Da extends li{constructor(e,t,n,i){super(e,t,n,i)}}Da.prototype.ValueTypeName="number";class I1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-t)/(i-t);let c=e*a;for(let d=c+a;c!==d;c+=4)Vn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class Er extends li{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new I1(this.times,this.values,this.getValueSize(),e)}}Er.prototype.ValueTypeName="quaternion";Er.prototype.InterpolantFactoryMethodSmooth=void 0;class Ks extends li{constructor(e,t,n){super(e,t,n)}}Ks.prototype.ValueTypeName="string";Ks.prototype.ValueBufferType=Array;Ks.prototype.DefaultInterpolation=Ea;Ks.prototype.InterpolantFactoryMethodLinear=void 0;Ks.prototype.InterpolantFactoryMethodSmooth=void 0;class $s extends li{constructor(e,t,n,i){super(e,t,n,i)}}$s.prototype.ValueTypeName="vector";class hh{constructor(e="",t=-1,n=[],i=r2){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=ai(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(B1(n[o]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=n.length;r!==o;++r)t.push(li.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,o=[];for(let a=0;a<r;a++){let l=[],c=[];l.push((a+r-1)%r,a,(a+1)%r),c.push(0,1,0);const d=P1(l);l=ch(l,1,d),c=ch(c,1,d),!i&&l[0]===0&&(l.push(r),c.push(c[0])),o.push(new Da(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],d=c.name.match(r);if(d&&d.length>1){const m=d[1];let u=i[m];u||(i[m]=u=[]),u.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,n));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(m,u,h,g,_){if(h.length!==0){const p=[],f=[];q0(h,p,f,g),p.length!==0&&_.push(new m(u,p,f))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let m=0;m<c.length;m++){const u=c[m].keys;if(!(!u||u.length===0))if(u[0].morphTargets){const h={};let g;for(g=0;g<u.length;g++)if(u[g].morphTargets)for(let _=0;_<u[g].morphTargets.length;_++)h[u[g].morphTargets[_]]=-1;for(const _ in h){const p=[],f=[];for(let v=0;v!==u[g].morphTargets.length;++v){const b=u[g];p.push(b.time),f.push(b.morphTarget===_?1:0)}i.push(new Da(".morphTargetInfluence["+_+"]",p,f))}l=h.length*o}else{const h=".bones["+t[m].name+"]";n($s,h+".position",u,"pos",i),n(Er,h+".quaternion",u,"rot",i),n($s,h+".scale",u,"scl",i)}}return i.length===0?null:new this(r,l,i,a)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const r=this.tracks[n];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function z1(s){switch(s.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Da;case"vector":case"vector2":case"vector3":case"vector4":return $s;case"color":return $0;case"quaternion":return Er;case"bool":case"boolean":return Js;case"string":return Ks}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function B1(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=z1(s.type);if(s.times===void 0){const t=[],n=[];q0(s.keys,t,n,"value"),s.times=t,s.values=n}return e.parse!==void 0?e.parse(s):new e(s.name,s.times,s.values,s.interpolation)}const La={enabled:!1,files:{},add:function(s,e){this.enabled!==!1&&(this.files[s]=e)},get:function(s){if(this.enabled!==!1)return this.files[s]},remove:function(s){delete this.files[s]},clear:function(){this.files={}}};class Y0{constructor(e,t,n){const i=this;let r=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){a++,r===!1&&i.onStart!==void 0&&i.onStart(d,o,a),r=!0},this.itemEnd=function(d){o++,i.onProgress!==void 0&&i.onProgress(d,o,a),o===a&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(d){i.onError!==void 0&&i.onError(d)},this.resolveURL=function(d){return l?l(d):d},this.setURLModifier=function(d){return l=d,this},this.addHandler=function(d,m){return c.push(d,m),this},this.removeHandler=function(d){const m=c.indexOf(d);return m!==-1&&c.splice(m,2),this},this.getHandler=function(d){for(let m=0,u=c.length;m<u;m+=2){const h=c[m],g=c[m+1];if(h.global&&(h.lastIndex=0),h.test(d))return g}return null}}}const ac=new Y0;class oi{constructor(e){this.manager=e!==void 0?e:ac,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}oi.DEFAULT_MATERIAL_NAME="__DEFAULT";const bi={};class O1 extends Error{constructor(e,t){super(e),this.response=t}}class Zs extends oi{constructor(e){super(e),this.mimeType="",this.responseType=""}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=La.get(e);if(r!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(bi[e]!==void 0){bi[e].push({onLoad:t,onProgress:n,onError:i});return}bi[e]=[],bi[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const d=bi[e],m=c.body.getReader(),u=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),h=u?parseInt(u):0,g=h!==0;let _=0;const p=new ReadableStream({start(f){v();function v(){m.read().then(({done:b,value:S})=>{if(b)f.close();else{_+=S.byteLength;const F=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:h});for(let C=0,R=d.length;C<R;C++){const P=d[C];P.onProgress&&P.onProgress(F)}f.enqueue(S),v()}},b=>{f.error(b)})}}});return new Response(p)}else throw new O1(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return c.json();default:if(a==="")return c.text();{const m=/charset="?([^;"\s]*)"?/i.exec(a),u=m&&m[1]?m[1].toLowerCase():void 0,h=new TextDecoder(u);return c.arrayBuffer().then(g=>h.decode(g))}}}).then(c=>{La.add(e,c);const d=bi[e];delete bi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onLoad&&h.onLoad(c)}}).catch(c=>{const d=bi[e];if(d===void 0)throw this.manager.itemError(e),c;delete bi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onError&&h.onError(c)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class k1 extends oi{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=La.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=Mr("img");function l(){d(),La.add(e,this),t&&t(this),r.manager.itemEnd(e)}function c(m){d(),i&&i(m),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class V1 extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new V0,a=new Zs(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(r.withCredentials),a.load(e,function(l){let c;try{c=r.parse(l)}catch(d){if(i!==void 0)i(d);else{console.error(d);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:ri,o.wrapT=c.wrapT!==void 0?c.wrapT:ri,o.magFilter=c.magFilter!==void 0?c.magFilter:Xn,o.minFilter=c.minFilter!==void 0?c.minFilter:Xn,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(o.colorSpace=c.colorSpace),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=Ai),c.mipmapCount===1&&(o.minFilter=Xn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,i),o}}class oc extends oi{constructor(e){super(e)}load(e,t,n,i){const r=new Tn,o=new k1(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}}class Ar extends ln{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Tt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(t.object.target=this.target.uuid),t}}class J0 extends Ar{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Tt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const So=new Et,uh=new I,dh=new I;class lc{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new et(512,512),this.mapType=mi,this.map=null,this.mapPass=null,this.matrix=new Et,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new nc,this._frameExtents=new et(1,1),this._viewportCount=1,this._viewports=[new Xt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;uh.setFromMatrixPosition(e.matrixWorld),t.position.copy(uh),dh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(dh),t.updateMatrixWorld(),So.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(So),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(So)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class H1 extends lc{constructor(){super(new bn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=js*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class G1 extends Ar{constructor(e,t,n=0,i=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.target=new ln,this.distance=n,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new H1}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const fh=new Et,lr=new I,Eo=new I;class W1 extends lc{constructor(){super(new bn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new et(4,2),this._viewportCount=6,this._viewports=[new Xt(2,1,1,1),new Xt(0,1,1,1),new Xt(3,1,1,1),new Xt(1,1,1,1),new Xt(3,0,1,1),new Xt(1,0,1,1)],this._cubeDirections=[new I(1,0,0),new I(-1,0,0),new I(0,0,1),new I(0,0,-1),new I(0,1,0),new I(0,-1,0)],this._cubeUps=[new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,0,1),new I(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),lr.setFromMatrixPosition(e.matrixWorld),n.position.copy(lr),Eo.copy(n.position),Eo.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Eo),n.updateMatrixWorld(),i.makeTranslation(-lr.x,-lr.y,-lr.z),fh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fh)}}class Pa extends Ar{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new W1}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Ha extends U0{constructor(e=-1,t=1,n=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,o=n+e,a=i+t,l=i-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,o=r+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}class X1 extends lc{constructor(){super(new Ha(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class gr extends Ar{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.target=new ln,this.shadow=new X1}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class cc extends Ar{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class hc{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class j1 extends hn{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class q1 extends bn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class $1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ph(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=ph();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function ph(){return performance.now()}class Dl extends z0{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}const mh=new Et;class Y1{constructor(e,t,n=0,i=1/0){this.ray=new Ys(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Zl,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}setFromXRController(e){return mh.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(mh),this}intersectObject(e,t=!0,n=[]){return Ll(e,this,n,t),n.sort(gh),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Ll(e[i],this,n,t);return n.sort(gh),n}}function gh(s,e){return s.distance-e.distance}function Ll(s,e,t,n){let i=!0;if(s.layers.test(e.layers)&&s.raycast(e,t)===!1&&(i=!1),i===!0&&n===!0){const r=s.children;for(let o=0,a=r.length;o<a;o++)Ll(r[o],e,t,!0)}}class Pl{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Vt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Vt(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const _h=new I,ta=new I;class J1{constructor(e=new I,t=new I){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){_h.subVectors(e,this.start),ta.subVectors(this.end,this.start);const n=ta.dot(ta);let r=ta.dot(_h)/n;return t&&(r=Vt(r,0,1)),r}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}class K0 extends Ra{constructor(e=10,t=10,n=4473924,i=8947848){n=new Tt(n),i=new Tt(i);const r=t/2,o=e/t,a=e/2,l=[],c=[];for(let u=0,h=0,g=-a;u<=t;u++,g+=o){l.push(-a,0,g,a,0,g),l.push(g,0,-a,g,0,a);const _=u===r?n:i;_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3}const d=new hn;d.setAttribute("position",new It(l,3)),d.setAttribute("color",new It(c,3));const m=new Ri({vertexColors:!0,toneMapped:!1});super(d,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class K1 extends ds{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){console.warn("THREE.Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function vh(s,e,t,n){const i=Z1(n);switch(t){case S0:return s*e;case A0:return s*e/i.components*i.byteLength;case ql:return s*e/i.components*i.byteLength;case w0:return s*e*2/i.components*i.byteLength;case $l:return s*e*2/i.components*i.byteLength;case E0:return s*e*3/i.components*i.byteLength;case Zn:return s*e*4/i.components*i.byteLength;case Yl:return s*e*4/i.components*i.byteLength;case ga:case _a:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case va:case ya:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case nl:case sl:return Math.max(s,16)*Math.max(e,8)/4;case tl:case il:return Math.max(s,8)*Math.max(e,8)/2;case rl:case al:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case ol:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case ll:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case cl:return Math.floor((s+4)/5)*Math.floor((e+3)/4)*16;case hl:return Math.floor((s+4)/5)*Math.floor((e+4)/5)*16;case ul:return Math.floor((s+5)/6)*Math.floor((e+4)/5)*16;case dl:return Math.floor((s+5)/6)*Math.floor((e+5)/6)*16;case fl:return Math.floor((s+7)/8)*Math.floor((e+4)/5)*16;case pl:return Math.floor((s+7)/8)*Math.floor((e+5)/6)*16;case ml:return Math.floor((s+7)/8)*Math.floor((e+7)/8)*16;case gl:return Math.floor((s+9)/10)*Math.floor((e+4)/5)*16;case _l:return Math.floor((s+9)/10)*Math.floor((e+5)/6)*16;case vl:return Math.floor((s+9)/10)*Math.floor((e+7)/8)*16;case yl:return Math.floor((s+9)/10)*Math.floor((e+9)/10)*16;case xl:return Math.floor((s+11)/12)*Math.floor((e+9)/10)*16;case Ml:return Math.floor((s+11)/12)*Math.floor((e+11)/12)*16;case xa:case bl:case Sl:return Math.ceil(s/4)*Math.ceil(e/4)*16;case T0:case El:return Math.ceil(s/4)*Math.ceil(e/4)*8;case Al:case wl:return Math.ceil(s/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function Z1(s){switch(s){case mi:case x0:return{byteLength:1,components:1};case _r:case M0:case Sr:return{byteLength:2,components:1};case Xl:case jl:return{byteLength:2,components:4};case hs:case Wl:case fi:return{byteLength:4,components:1};case b0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Vl}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Vl);/**
|
|
44
|
+
`},i=new Wi(5,5,5),r=new Ti({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Dn,blending:ki});r.uniforms.tEquirect.value=t;const o=new Pt(i,r),a=t.minFilter;return t.minFilter===Mi&&(t.minFilter=kn),new i1(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,i);e.setRenderTarget(r)}}class An extends sn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const r1={type:"move"};class po{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new An,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new An,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new An,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const f=t.getJointPose(_,n),p=this._getHandJoint(c,_);f!==null&&(p.matrix.fromArray(f.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=f.radius),p.visible=f!==null}const d=c.joints["index-finger-tip"],m=c.joints["thumb-tip"],u=d.position.distanceTo(m.position),h=.02,g=.005;c.inputState.pinching&&u>h+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&u<=h-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(r1)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new An;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends sn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new _n,this.environmentIntensity=1,this.environmentRotation=new _n,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class z0{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Cl,this.updateRanges=[],this.version=0,this.uuid=ti()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ti()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ti()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Cn=new z;class ci{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Cn.fromBufferAttribute(this,t),Cn.applyMatrix4(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Cn.fromBufferAttribute(this,t),Cn.applyNormalMatrix(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Cn.fromBufferAttribute(this,t),Cn.transformDirection(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Qn(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=en(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=en(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=en(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=en(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=en(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Qn(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Qn(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Qn(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Qn(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=en(t,this.array),n=en(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=en(t,this.array),n=en(n,this.array),i=en(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=en(t,this.array),n=en(n,this.array),i=en(i,this.array),r=en(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return new hn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new ci(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class za extends Hn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new bt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Cs;const sr=new z,Rs=new z,Ds=new z,Ls=new Je,rr=new Je,B0=new Mt,Gr=new z,ar=new z,Wr=new z,jc=new Je,mo=new Je,qc=new Je;class ec extends sn{constructor(e=new za){if(super(),this.isSprite=!0,this.type="Sprite",Cs===void 0){Cs=new rn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new z0(t,5);Cs.setIndex([0,1,2,0,2,3]),Cs.setAttribute("position",new ci(n,3,0,!1)),Cs.setAttribute("uv",new ci(n,2,3,!1))}this.geometry=Cs,this.material=e,this.center=new Je(.5,.5),this.count=1}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Rs.setFromMatrixScale(this.matrixWorld),B0.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ds.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Rs.multiplyScalar(-Ds.z);const n=this.material.rotation;let i,r;n!==0&&(r=Math.cos(n),i=Math.sin(n));const o=this.center;Xr(Gr.set(-.5,-.5,0),Ds,o,Rs,i,r),Xr(ar.set(.5,-.5,0),Ds,o,Rs,i,r),Xr(Wr.set(.5,.5,0),Ds,o,Rs,i,r),jc.set(0,0),mo.set(1,0),qc.set(1,1);let a=e.ray.intersectTriangle(Gr,ar,Wr,!1,sr);if(a===null&&(Xr(ar.set(-.5,.5,0),Ds,o,Rs,i,r),mo.set(0,1),a=e.ray.intersectTriangle(Gr,Wr,ar,!1,sr),a===null))return;const l=e.ray.origin.distanceTo(sr);l<e.near||l>e.far||t.push({distance:l,point:sr.clone(),uv:qn.getInterpolation(sr,Gr,ar,Wr,jc,mo,qc,new Je),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Xr(s,e,t,n,i,r){Ls.subVectors(s,t).addScalar(.5).multiply(n),i!==void 0?(rr.x=r*Ls.x-i*Ls.y,rr.y=i*Ls.x+r*Ls.y):rr.copy(Ls),s.copy(e),s.x+=rr.x,s.y+=rr.y,s.applyMatrix4(B0)}const jr=new z,$c=new z;class O0 extends sn{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n<i;n++){const r=t[n];this.addLevel(r.object.clone(),r.distance,r.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const i=this.levels;let r;for(r=0;r<i.length&&!(t<i[r].distance);r++);return i.splice(r,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const i=t.splice(n,1);return this.remove(i[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){jr.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(jr);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){jr.setFromMatrixPosition(e.matrixWorld),$c.setFromMatrixPosition(this.matrixWorld);const n=jr.distanceTo($c)/e.zoom;t[0].object.visible=!0;let i,r;for(i=1,r=t.length;i<r;i++){let o=t[i].distance;if(t[i].object.visible&&(o-=o*t[i].hysteresis),n>=o)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i<r;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let i=0,r=n.length;i<r;i++){const o=n[i];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const Yc=new z,Kc=new Ot,Jc=new Ot,a1=new z,Zc=new Mt,qr=new z,go=new Ri,Qc=new Mt,_o=new Ys;class o1 extends Pt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=bc,this.bindMatrix=new Mt,this.bindMatrixInverse=new Mt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Tn),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingBox.expandByPoint(qr)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ri),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingSphere.expandByPoint(qr)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),go.copy(this.boundingSphere),go.applyMatrix4(i),e.ray.intersectsSphere(go)!==!1&&(Qc.copy(i).invert(),_o.copy(e.ray).applyMatrix4(Qc),!(this.boundingBox!==null&&_o.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,_o)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Ot,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===bc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===i2?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;Kc.fromBufferAttribute(i.attributes.skinIndex,e),Jc.fromBufferAttribute(i.attributes.skinWeight,e),Yc.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let r=0;r<4;r++){const o=Jc.getComponent(r);if(o!==0){const a=Kc.getComponent(r);Zc.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(a1.copy(Yc).applyMatrix4(Zc),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class k0 extends sn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class V0 extends Mn{constructor(e=null,t=1,n=1,i,r,o,a,l,c=Vn,d=Vn,m,u){super(null,o,a,l,c,d,i,r,m,u),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const eh=new Mt,l1=new Mt;class tc{constructor(e=[],t=[]){this.uuid=ti(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Mt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new Mt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let r=0,o=e.length;r<o;r++){const a=e[r]?e[r].matrixWorld:l1;eh.multiplyMatrices(a,t[r]),eh.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new tc(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new V0(t,e,e,$n,li);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const r=e.bones[n];let o=t[r];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),o=new k0),this.bones.push(o),this.boneInverses.push(new Mt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){const o=t[i];e.bones.push(o.uuid);const a=n[i];e.boneInverses.push(a.toArray())}return e}}const vo=new z,c1=new z,h1=new Ut;class jn{constructor(e=new z(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=vo.subVectors(n,t).cross(c1.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(vo),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||h1.getNormalMatrix(e),i=this.coplanarPoint(vo).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Ji=new Ri,$r=new z;class nc{constructor(e=new jn,t=new jn,n=new jn,i=new jn,r=new jn,o=new jn){this.planes=[e,t,n,i,r,o]}set(e,t,n,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=bi){const n=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],l=i[3],c=i[4],d=i[5],m=i[6],u=i[7],h=i[8],g=i[9],_=i[10],f=i[11],p=i[12],x=i[13],M=i[14],b=i[15];if(n[0].setComponents(l-r,u-c,f-h,b-p).normalize(),n[1].setComponents(l+r,u+c,f+h,b+p).normalize(),n[2].setComponents(l+o,u+d,f+g,b+x).normalize(),n[3].setComponents(l-o,u-d,f-g,b-x).normalize(),n[4].setComponents(l-a,u-m,f-_,b-M).normalize(),t===bi)n[5].setComponents(l+a,u+m,f+_,b+M).normalize();else if(t===wa)n[5].setComponents(a,m,_,M).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ji.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ji.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ji)}intersectsSprite(e){return Ji.center.set(0,0,0),Ji.radius=.7071067811865476,Ji.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ji)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if($r.x=i.normal.x>0?e.max.x:e.min.x,$r.y=i.normal.y>0?e.max.y:e.min.y,$r.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint($r)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Ai extends Hn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new bt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Ta=new z,Ca=new z,th=new Mt,or=new Ys,Yr=new Ri,yo=new z,nh=new z;class Ba extends sn{constructor(e=new rn,t=new Ai){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,r=t.count;i<r;i++)Ta.fromBufferAttribute(t,i-1),Ca.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=Ta.distanceTo(Ca);e.setAttribute("lineDistance",new Lt(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Yr.copy(n.boundingSphere),Yr.applyMatrix4(i),Yr.radius+=r,e.ray.intersectsSphere(Yr)===!1)return;th.copy(i).invert(),or.copy(e.ray).applyMatrix4(th);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,d=n.index,u=n.attributes.position;if(d!==null){const h=Math.max(0,o.start),g=Math.min(d.count,o.start+o.count);for(let _=h,f=g-1;_<f;_+=c){const p=d.getX(_),x=d.getX(_+1),M=Kr(this,e,or,l,p,x,_);M&&t.push(M)}if(this.isLineLoop){const _=d.getX(g-1),f=d.getX(h),p=Kr(this,e,or,l,_,f,g-1);p&&t.push(p)}}else{const h=Math.max(0,o.start),g=Math.min(u.count,o.start+o.count);for(let _=h,f=g-1;_<f;_+=c){const p=Kr(this,e,or,l,_,_+1,_);p&&t.push(p)}if(this.isLineLoop){const _=Kr(this,e,or,l,g-1,h,g-1);_&&t.push(_)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function Kr(s,e,t,n,i,r,o){const a=s.geometry.attributes.position;if(Ta.fromBufferAttribute(a,i),Ca.fromBufferAttribute(a,r),t.distanceSqToSegment(Ta,Ca,yo,nh)>n)return;yo.applyMatrix4(s.matrixWorld);const c=e.ray.origin.distanceTo(yo);if(!(c<e.near||c>e.far))return{distance:c,point:nh.clone().applyMatrix4(s.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:s}}const ih=new z,sh=new z;class Ra extends Ba{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,r=t.count;i<r;i+=2)ih.fromBufferAttribute(t,i),sh.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ih.distanceTo(sh);e.setAttribute("lineDistance",new Lt(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Oi extends Hn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new bt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const rh=new Mt,Rl=new Ys,Jr=new Ri,Zr=new z;class Vs extends sn{constructor(e=new rn,t=new Oi){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Jr.copy(n.boundingSphere),Jr.applyMatrix4(i),Jr.radius+=r,e.ray.intersectsSphere(Jr)===!1)return;rh.copy(i).invert(),Rl.copy(e.ray).applyMatrix4(rh);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,m=n.attributes.position;if(c!==null){const u=Math.max(0,o.start),h=Math.min(c.count,o.start+o.count);for(let g=u,_=h;g<_;g++){const f=c.getX(g);Zr.fromBufferAttribute(m,f),ah(Zr,f,l,i,e,t,this)}}else{const u=Math.max(0,o.start),h=Math.min(m.count,o.start+o.count);for(let g=u,_=h;g<_;g++)Zr.fromBufferAttribute(m,g),ah(Zr,g,l,i,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function ah(s,e,t,n,i,r,o){const a=Rl.distanceSqToPoint(s);if(a<t){const l=new z;Rl.closestPointToPoint(s,l),l.applyMatrix4(n);const c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class u1 extends Mn{constructor(e,t,n,i,r,o,a,l,c){super(e,t,n,i,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class H0 extends Mn{constructor(e,t,n=ls,i,r,o,a=Vn,l=Vn,c,d=yr,m=1){if(d!==yr&&d!==xr)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const u={width:e,height:t,depth:m};super(u,i,r,o,a,l,d,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Jl(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class ic extends rn{constructor(e=1,t=1,n=1,i=32,r=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:o,thetaStart:a,thetaLength:l};const c=this;i=Math.floor(i),r=Math.floor(r);const d=[],m=[],u=[],h=[];let g=0;const _=[],f=n/2;let p=0;x(),o===!1&&(e>0&&M(!0),t>0&&M(!1)),this.setIndex(d),this.setAttribute("position",new Lt(m,3)),this.setAttribute("normal",new Lt(u,3)),this.setAttribute("uv",new Lt(h,2));function x(){const b=new z,N=new z;let L=0;const P=(t-e)/n;for(let I=0;I<=r;I++){const A=[],E=I/r,F=E*(t-e)+e;for(let B=0;B<=i;B++){const X=B/i,Z=X*l+a,se=Math.sin(Z),W=Math.cos(Z);N.x=F*se,N.y=-E*n+f,N.z=F*W,m.push(N.x,N.y,N.z),b.set(se,P,W).normalize(),u.push(b.x,b.y,b.z),h.push(X,1-E),A.push(g++)}_.push(A)}for(let I=0;I<i;I++)for(let A=0;A<r;A++){const E=_[A][I],F=_[A+1][I],B=_[A+1][I+1],X=_[A][I+1];(e>0||A!==0)&&(d.push(E,F,X),L+=3),(t>0||A!==r-1)&&(d.push(F,B,X),L+=3)}c.addGroup(p,L,0),p+=L}function M(b){const N=g,L=new Je,P=new z;let I=0;const A=b===!0?e:t,E=b===!0?1:-1;for(let B=1;B<=i;B++)m.push(0,f*E,0),u.push(0,E,0),h.push(.5,.5),g++;const F=g;for(let B=0;B<=i;B++){const Z=B/i*l+a,se=Math.cos(Z),W=Math.sin(Z);P.x=A*W,P.y=f*E,P.z=A*se,m.push(P.x,P.y,P.z),u.push(0,E,0),L.x=se*.5+.5,L.y=W*.5*E+.5,h.push(L.x,L.y),g++}for(let B=0;B<i;B++){const X=N+B,Z=F+B;b===!0?d.push(Z,Z+1,X):d.push(Z+1,Z,X),I+=3}c.addGroup(p,I,b===!0?1:2),p+=I}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ic(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Di{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let i=0;const r=n.length;let o;t?o=t:o=e*n[r-1];let a=0,l=r-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=n[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===o)return i/(r-1);const d=n[i],u=n[i+1]-d,h=(o-d)/u;return(i+h)/(r-1)}getTangent(e,t){let i=e-1e-4,r=e+1e-4;i<0&&(i=0),r>1&&(r=1);const o=this.getPoint(i),a=this.getPoint(r),l=t||(o.isVector2?new Je:new z);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new z,i=[],r=[],o=[],a=new z,l=new Mt;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new z)}r[0]=new z,o[0]=new z;let c=Number.MAX_VALUE;const d=Math.abs(i[0].x),m=Math.abs(i[0].y),u=Math.abs(i[0].z);d<=c&&(c=d,n.set(1,0,0)),m<=c&&(c=m,n.set(0,1,0)),u<=c&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),o[0].crossVectors(i[0],r[0]);for(let h=1;h<=e;h++){if(r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(It(i[h-1].dot(i[h]),-1,1));r[h].applyMatrix4(l.makeRotationAxis(a,g))}o[h].crossVectors(i[h],r[h])}if(t===!0){let h=Math.acos(It(r[0].dot(r[e]),-1,1));h/=e,i[0].dot(a.crossVectors(r[0],r[e]))>0&&(h=-h);for(let g=1;g<=e;g++)r[g].applyMatrix4(l.makeRotationAxis(i[g],h*g)),o[g].crossVectors(i[g],r[g])}return{tangents:i,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class G0 extends Di{constructor(e=0,t=0,n=1,i=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new Je){const n=t,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(o?r=0:r=i),this.aClockwise===!0&&!o&&(r===i?r=-i:r=r-i);const a=this.aStartAngle+e*r;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const d=Math.cos(this.aRotation),m=Math.sin(this.aRotation),u=l-this.aX,h=c-this.aY;l=u*d-h*m+this.aX,c=u*m+h*d+this.aY}return n.set(l,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class d1 extends G0{constructor(e,t,n,i,r,o){super(e,t,n,n,i,r,o),this.isArcCurve=!0,this.type="ArcCurve"}}function sc(){let s=0,e=0,t=0,n=0;function i(r,o,a,l){s=r,e=a,t=-3*r+3*o-2*a-l,n=2*r-2*o+a+l}return{initCatmullRom:function(r,o,a,l,c){i(o,a,c*(a-r),c*(l-o))},initNonuniformCatmullRom:function(r,o,a,l,c,d,m){let u=(o-r)/c-(a-r)/(c+d)+(a-o)/d,h=(a-o)/d-(l-o)/(d+m)+(l-a)/m;u*=d,h*=d,i(o,a,u,h)},calc:function(r){const o=r*r,a=o*r;return s+e*r+t*o+n*a}}}const Qr=new z,xo=new sc,Mo=new sc,bo=new sc;class rc extends Di{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new z){const n=t,i=this.points,r=i.length,o=(r-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,d;this.closed||a>0?c=i[(a-1)%r]:(Qr.subVectors(i[0],i[1]).add(i[0]),c=Qr);const m=i[a%r],u=i[(a+1)%r];if(this.closed||a+2<r?d=i[(a+2)%r]:(Qr.subVectors(i[r-1],i[r-2]).add(i[r-1]),d=Qr),this.curveType==="centripetal"||this.curveType==="chordal"){const h=this.curveType==="chordal"?.5:.25;let g=Math.pow(c.distanceToSquared(m),h),_=Math.pow(m.distanceToSquared(u),h),f=Math.pow(u.distanceToSquared(d),h);_<1e-4&&(_=1),g<1e-4&&(g=_),f<1e-4&&(f=_),xo.initNonuniformCatmullRom(c.x,m.x,u.x,d.x,g,_,f),Mo.initNonuniformCatmullRom(c.y,m.y,u.y,d.y,g,_,f),bo.initNonuniformCatmullRom(c.z,m.z,u.z,d.z,g,_,f)}else this.curveType==="catmullrom"&&(xo.initCatmullRom(c.x,m.x,u.x,d.x,this.tension),Mo.initCatmullRom(c.y,m.y,u.y,d.y,this.tension),bo.initCatmullRom(c.z,m.z,u.z,d.z,this.tension));return n.set(xo.calc(l),Mo.calc(l),bo.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new z().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function oh(s,e,t,n,i){const r=(n-e)*.5,o=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*n+r+o)*l+(-3*t+3*n-2*r-o)*a+r*s+t}function f1(s,e){const t=1-s;return t*t*e}function p1(s,e){return 2*(1-s)*s*e}function m1(s,e){return s*s*e}function pr(s,e,t,n){return f1(s,e)+p1(s,t)+m1(s,n)}function g1(s,e){const t=1-s;return t*t*t*e}function _1(s,e){const t=1-s;return 3*t*t*s*e}function v1(s,e){return 3*(1-s)*s*s*e}function y1(s,e){return s*s*s*e}function mr(s,e,t,n,i){return g1(s,e)+_1(s,t)+v1(s,n)+y1(s,i)}class x1 extends Di{constructor(e=new Je,t=new Je,n=new Je,i=new Je){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Je){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class M1 extends Di{constructor(e=new z,t=new z,n=new z,i=new z){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new z){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y),mr(e,i.z,r.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class b1 extends Di{constructor(e=new Je,t=new Je){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Je){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Je){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class S1 extends Di{constructor(e=new z,t=new z){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new z){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new z){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class E1 extends Di{constructor(e=new Je,t=new Je,n=new Je){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Je){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class W0 extends Di{constructor(e=new z,t=new z,n=new z){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new z){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y),pr(e,i.z,r.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class A1 extends Di{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Je){const n=t,i=this.points,r=(i.length-1)*e,o=Math.floor(r),a=r-o,l=i[o===0?o:o-1],c=i[o],d=i[o>i.length-2?i.length-1:o+1],m=i[o>i.length-3?i.length-1:o+2];return n.set(oh(a,l.x,c.x,d.x,m.x),oh(a,l.y,c.y,d.y,m.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new Je().fromArray(i))}return this}}var w1=Object.freeze({__proto__:null,ArcCurve:d1,CatmullRomCurve3:rc,CubicBezierCurve:x1,CubicBezierCurve3:M1,EllipseCurve:G0,LineCurve:b1,LineCurve3:S1,QuadraticBezierCurve:E1,QuadraticBezierCurve3:W0,SplineCurve:A1});class wi extends rn{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,o=t/2,a=Math.floor(n),l=Math.floor(i),c=a+1,d=l+1,m=e/a,u=t/l,h=[],g=[],_=[],f=[];for(let p=0;p<d;p++){const x=p*u-o;for(let M=0;M<c;M++){const b=M*m-r;g.push(b,-x,0),_.push(0,0,1),f.push(M/a),f.push(1-p/l)}}for(let p=0;p<l;p++)for(let x=0;x<a;x++){const M=x+c*p,b=x+c*(p+1),N=x+1+c*(p+1),L=x+1+c*p;h.push(M,b,L),h.push(b,N,L)}this.setIndex(h),this.setAttribute("position",new Lt(g,3)),this.setAttribute("normal",new Lt(_,3)),this.setAttribute("uv",new Lt(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new wi(e.width,e.height,e.widthSegments,e.heightSegments)}}class Oa extends rn{constructor(e=1,t=32,n=16,i=0,r=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(o+a,Math.PI);let c=0;const d=[],m=new z,u=new z,h=[],g=[],_=[],f=[];for(let p=0;p<=n;p++){const x=[],M=p/n;let b=0;p===0&&o===0?b=.5/t:p===n&&l===Math.PI&&(b=-.5/t);for(let N=0;N<=t;N++){const L=N/t;m.x=-e*Math.cos(i+L*r)*Math.sin(o+M*a),m.y=e*Math.cos(o+M*a),m.z=e*Math.sin(i+L*r)*Math.sin(o+M*a),g.push(m.x,m.y,m.z),u.copy(m).normalize(),_.push(u.x,u.y,u.z),f.push(L+b,1-M),x.push(c++)}d.push(x)}for(let p=0;p<n;p++)for(let x=0;x<t;x++){const M=d[p][x+1],b=d[p][x],N=d[p+1][x],L=d[p+1][x+1];(p!==0||o>0)&&h.push(M,b,L),(p!==n-1||l<Math.PI)&&h.push(b,N,L)}this.setIndex(h),this.setAttribute("position",new Lt(g,3)),this.setAttribute("normal",new Lt(_,3)),this.setAttribute("uv",new Lt(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Oa(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class ka extends rn{constructor(e=new W0(new z(-1,-1,0),new z(-1,1,0),new z(1,1,0)),t=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r};const o=e.computeFrenetFrames(t,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new z,l=new z,c=new Je;let d=new z;const m=[],u=[],h=[],g=[];_(),this.setIndex(g),this.setAttribute("position",new Lt(m,3)),this.setAttribute("normal",new Lt(u,3)),this.setAttribute("uv",new Lt(h,2));function _(){for(let M=0;M<t;M++)f(M);f(r===!1?t:0),x(),p()}function f(M){d=e.getPointAt(M/t,d);const b=o.normals[M],N=o.binormals[M];for(let L=0;L<=i;L++){const P=L/i*Math.PI*2,I=Math.sin(P),A=-Math.cos(P);l.x=A*b.x+I*N.x,l.y=A*b.y+I*N.y,l.z=A*b.z+I*N.z,l.normalize(),u.push(l.x,l.y,l.z),a.x=d.x+n*l.x,a.y=d.y+n*l.y,a.z=d.z+n*l.z,m.push(a.x,a.y,a.z)}}function p(){for(let M=1;M<=t;M++)for(let b=1;b<=i;b++){const N=(i+1)*(M-1)+(b-1),L=(i+1)*M+(b-1),P=(i+1)*M+b,I=(i+1)*(M-1)+b;g.push(N,L,I),g.push(L,P,I)}}function x(){for(let M=0;M<=t;M++)for(let b=0;b<=i;b++)c.x=M/t,c.y=b/i,h.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new ka(new w1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class T1 extends rn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new z,r=new z;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,d=l.length;c<d;++c){const m=l[c],u=m.start,h=m.count;for(let g=u,_=u+h;g<_;g+=3)for(let f=0;f<3;f++){const p=a.getX(g+f),x=a.getX(g+(f+1)%3);i.fromBufferAttribute(o,p),r.fromBufferAttribute(o,x),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const d=3*a+c,m=3*a+(c+1)%3;i.fromBufferAttribute(o,d),r.fromBufferAttribute(o,m),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new Lt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function lh(s,e,t){const n=`${s.x},${s.y},${s.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${s.x},${s.y},${s.z}`;return t.has(n)===!0||t.has(i)===!0?!1:(t.add(n),t.add(i),!0)}class X0 extends Hn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new bt(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class j0 extends Hn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new bt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new bt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _n,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ln extends Hn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new bt(16777215),this.specular=new bt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new bt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _n,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class C1 extends Hn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new bt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new bt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _n,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class R1 extends Hn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=a2,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class D1 extends Hn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function ea(s,e){return!s||s.constructor===e?s:typeof e.BYTES_PER_ELEMENT=="number"?new e(s):Array.prototype.slice.call(s)}function L1(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function P1(s){function e(i,r){return s[i]-s[r]}const t=s.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function ch(s,e,t){const n=s.length,i=new s.constructor(n);for(let r=0,o=0;o!==n;++r){const a=t[r]*e;for(let l=0;l!==e;++l)i[o++]=s[a+l]}return i}function q0(s,e,t,n){let i=1,r=s[0];for(;r!==void 0&&r[n]===void 0;)r=s[i++];if(r===void 0)return;let o=r[n];if(o!==void 0)if(Array.isArray(o))do o=r[n],o!==void 0&&(e.push(r.time),t.push(...o)),r=s[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[n],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=s[i++];while(r!==void 0);else do o=r[n],o!==void 0&&(e.push(r.time),t.push(o)),r=s[i++];while(r!==void 0)}class Va{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];n:{e:{let o;t:{i:if(!(e<i)){for(let a=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(r=i,i=t[++n],e<i)break e}o=t.length;break t}if(!(e>=r)){const a=t[1];e<a&&(n=2,r=a);for(let l=n-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=r,r=t[--n-1],e>=r)break e}o=n,n=0;break t}break n}for(;n<o;){const a=n+o>>>1;e<t[a]?o=a:n=a+1}if(i=t[n],r=t[n-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let o=0;o!==i;++o)t[o]=n[r+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class F1 extends Va{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Sc,endingEnd:Sc}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,o=e+1,a=i[r],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case Ec:r=e,a=2*t-n;break;case Ac:r=i.length-2,a=t+i[r]-i[r+1];break;default:r=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Ec:o=e,l=2*n-t;break;case Ac:o=1,l=n+i[1]-i[0];break;default:o=e-1,l=t}const c=(n-t)*.5,d=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-n),this._offsetPrev=r*d,this._offsetNext=o*d}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=this._offsetPrev,m=this._offsetNext,u=this._weightPrev,h=this._weightNext,g=(n-t)/(i-t),_=g*g,f=_*g,p=-u*f+2*u*_-u*g,x=(1+u)*f+(-1.5-2*u)*_+(-.5+u)*g+1,M=(-1-h)*f+(1.5+h)*_+.5*g,b=h*f-h*_;for(let N=0;N!==a;++N)r[N]=p*o[d+N]+x*o[c+N]+M*o[l+N]+b*o[m+N];return r}}class N1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=(n-t)/(i-t),m=1-d;for(let u=0;u!==a;++u)r[u]=o[c+u]*m+o[l+u]*d;return r}}class U1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class ii{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ea(t,this.TimeBufferType),this.values=ea(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:ea(e.times,Array),values:ea(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new U1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new N1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new F1(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Ea:t=this.InterpolantFactoryMethodDiscrete;break;case Tl:t=this.InterpolantFactoryMethodLinear;break;case ja:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ea;case this.InterpolantFactoryMethodLinear:return Tl;case this.InterpolantFactoryMethodSmooth:return ja}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,o=i-1;for(;r!==i&&n[r]<e;)++r;for(;o!==-1&&n[o]>t;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=n.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,r=n.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&L1(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===ja,r=e.length-1;let o=1;for(let a=1;a<r;++a){let l=!1;const c=e[a],d=e[a+1];if(c!==d&&(a!==1||c!==e[0]))if(i)l=!0;else{const m=a*n,u=m-n,h=m+n;for(let g=0;g!==n;++g){const _=t[m+g];if(_!==t[u+g]||_!==t[h+g]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const m=a*n,u=o*n;for(let h=0;h!==n;++h)t[u+h]=t[m+h]}++o}}if(r>0){e[o]=e[r];for(let a=r*n,l=o*n,c=0;c!==n;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}ii.prototype.ValueTypeName="";ii.prototype.TimeBufferType=Float32Array;ii.prototype.ValueBufferType=Float32Array;ii.prototype.DefaultInterpolation=Tl;class Ks extends ii{constructor(e,t,n){super(e,t,n)}}Ks.prototype.ValueTypeName="bool";Ks.prototype.ValueBufferType=Array;Ks.prototype.DefaultInterpolation=Ea;Ks.prototype.InterpolantFactoryMethodLinear=void 0;Ks.prototype.InterpolantFactoryMethodSmooth=void 0;class $0 extends ii{constructor(e,t,n,i){super(e,t,n,i)}}$0.prototype.ValueTypeName="color";class Da extends ii{constructor(e,t,n,i){super(e,t,n,i)}}Da.prototype.ValueTypeName="number";class I1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-t)/(i-t);let c=e*a;for(let d=c+a;c!==d;c+=4)Un.slerpFlat(r,0,o,c-a,o,c,l);return r}}class Er extends ii{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new I1(this.times,this.values,this.getValueSize(),e)}}Er.prototype.ValueTypeName="quaternion";Er.prototype.InterpolantFactoryMethodSmooth=void 0;class Js extends ii{constructor(e,t,n){super(e,t,n)}}Js.prototype.ValueTypeName="string";Js.prototype.ValueBufferType=Array;Js.prototype.DefaultInterpolation=Ea;Js.prototype.InterpolantFactoryMethodLinear=void 0;Js.prototype.InterpolantFactoryMethodSmooth=void 0;class $s extends ii{constructor(e,t,n,i){super(e,t,n,i)}}$s.prototype.ValueTypeName="vector";class hh{constructor(e="",t=-1,n=[],i=r2){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=ti(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(B1(n[o]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=n.length;r!==o;++r)t.push(ii.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,o=[];for(let a=0;a<r;a++){let l=[],c=[];l.push((a+r-1)%r,a,(a+1)%r),c.push(0,1,0);const d=P1(l);l=ch(l,1,d),c=ch(c,1,d),!i&&l[0]===0&&(l.push(r),c.push(c[0])),o.push(new Da(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],d=c.name.match(r);if(d&&d.length>1){const m=d[1];let u=i[m];u||(i[m]=u=[]),u.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,n));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(m,u,h,g,_){if(h.length!==0){const f=[],p=[];q0(h,f,p,g),f.length!==0&&_.push(new m(u,f,p))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let m=0;m<c.length;m++){const u=c[m].keys;if(!(!u||u.length===0))if(u[0].morphTargets){const h={};let g;for(g=0;g<u.length;g++)if(u[g].morphTargets)for(let _=0;_<u[g].morphTargets.length;_++)h[u[g].morphTargets[_]]=-1;for(const _ in h){const f=[],p=[];for(let x=0;x!==u[g].morphTargets.length;++x){const M=u[g];f.push(M.time),p.push(M.morphTarget===_?1:0)}i.push(new Da(".morphTargetInfluence["+_+"]",f,p))}l=h.length*o}else{const h=".bones["+t[m].name+"]";n($s,h+".position",u,"pos",i),n(Er,h+".quaternion",u,"rot",i),n($s,h+".scale",u,"scl",i)}}return i.length===0?null:new this(r,l,i,a)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const r=this.tracks[n];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function z1(s){switch(s.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Da;case"vector":case"vector2":case"vector3":case"vector4":return $s;case"color":return $0;case"quaternion":return Er;case"bool":case"boolean":return Ks;case"string":return Js}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function B1(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=z1(s.type);if(s.times===void 0){const t=[],n=[];q0(s.keys,t,n,"value"),s.times=t,s.values=n}return e.parse!==void 0?e.parse(s):new e(s.name,s.times,s.values,s.interpolation)}const La={enabled:!1,files:{},add:function(s,e){this.enabled!==!1&&(this.files[s]=e)},get:function(s){if(this.enabled!==!1)return this.files[s]},remove:function(s){delete this.files[s]},clear:function(){this.files={}}};class Y0{constructor(e,t,n){const i=this;let r=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){a++,r===!1&&i.onStart!==void 0&&i.onStart(d,o,a),r=!0},this.itemEnd=function(d){o++,i.onProgress!==void 0&&i.onProgress(d,o,a),o===a&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(d){i.onError!==void 0&&i.onError(d)},this.resolveURL=function(d){return l?l(d):d},this.setURLModifier=function(d){return l=d,this},this.addHandler=function(d,m){return c.push(d,m),this},this.removeHandler=function(d){const m=c.indexOf(d);return m!==-1&&c.splice(m,2),this},this.getHandler=function(d){for(let m=0,u=c.length;m<u;m+=2){const h=c[m],g=c[m+1];if(h.global&&(h.lastIndex=0),h.test(d))return g}return null}}}const ac=new Y0;class ni{constructor(e){this.manager=e!==void 0?e:ac,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}ni.DEFAULT_MATERIAL_NAME="__DEFAULT";const vi={};class O1 extends Error{constructor(e,t){super(e),this.response=t}}class Zs extends ni{constructor(e){super(e),this.mimeType="",this.responseType=""}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=La.get(e);if(r!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(vi[e]!==void 0){vi[e].push({onLoad:t,onProgress:n,onError:i});return}vi[e]=[],vi[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const d=vi[e],m=c.body.getReader(),u=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),h=u?parseInt(u):0,g=h!==0;let _=0;const f=new ReadableStream({start(p){x();function x(){m.read().then(({done:M,value:b})=>{if(M)p.close();else{_+=b.byteLength;const N=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:h});for(let L=0,P=d.length;L<P;L++){const I=d[L];I.onProgress&&I.onProgress(N)}p.enqueue(b),x()}},M=>{p.error(M)})}}});return new Response(f)}else throw new O1(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return c.json();default:if(a==="")return c.text();{const m=/charset="?([^;"\s]*)"?/i.exec(a),u=m&&m[1]?m[1].toLowerCase():void 0,h=new TextDecoder(u);return c.arrayBuffer().then(g=>h.decode(g))}}}).then(c=>{La.add(e,c);const d=vi[e];delete vi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onLoad&&h.onLoad(c)}}).catch(c=>{const d=vi[e];if(d===void 0)throw this.manager.itemError(e),c;delete vi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onError&&h.onError(c)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class k1 extends ni{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=La.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=Mr("img");function l(){d(),La.add(e,this),t&&t(this),r.manager.itemEnd(e)}function c(m){d(),i&&i(m),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class V1 extends ni{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new V0,a=new Zs(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(r.withCredentials),a.load(e,function(l){let c;try{c=r.parse(l)}catch(d){if(i!==void 0)i(d);else{console.error(d);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:ei,o.wrapT=c.wrapT!==void 0?c.wrapT:ei,o.magFilter=c.magFilter!==void 0?c.magFilter:kn,o.minFilter=c.minFilter!==void 0?c.minFilter:kn,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(o.colorSpace=c.colorSpace),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=Mi),c.mipmapCount===1&&(o.minFilter=kn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,i),o}}class oc extends ni{constructor(e){super(e)}load(e,t,n,i){const r=new Mn,o=new k1(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}}class Ar extends sn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new bt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(t.object.target=this.target.uuid),t}}class K0 extends Ar{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new bt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const So=new Mt,uh=new z,dh=new z;class lc{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Je(512,512),this.mapType=hi,this.map=null,this.mapPass=null,this.matrix=new Mt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new nc,this._frameExtents=new Je(1,1),this._viewportCount=1,this._viewports=[new Ot(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;uh.setFromMatrixPosition(e.matrixWorld),t.position.copy(uh),dh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(dh),t.updateMatrixWorld(),So.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(So),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(So)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class H1 extends lc{constructor(){super(new gn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=js*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class G1 extends Ar{constructor(e,t,n=0,i=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,this.distance=n,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new H1}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const fh=new Mt,lr=new z,Eo=new z;class W1 extends lc{constructor(){super(new gn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Je(4,2),this._viewportCount=6,this._viewports=[new Ot(2,1,1,1),new Ot(0,1,1,1),new Ot(3,1,1,1),new Ot(1,1,1,1),new Ot(3,0,1,1),new Ot(1,0,1,1)],this._cubeDirections=[new z(1,0,0),new z(-1,0,0),new z(0,0,1),new z(0,0,-1),new z(0,1,0),new z(0,-1,0)],this._cubeUps=[new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,0,1),new z(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),lr.setFromMatrixPosition(e.matrixWorld),n.position.copy(lr),Eo.copy(n.position),Eo.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Eo),n.updateMatrixWorld(),i.makeTranslation(-lr.x,-lr.y,-lr.z),fh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fh)}}class Pa extends Ar{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new W1}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Ha extends U0{constructor(e=-1,t=1,n=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,o=n+e,a=i+t,l=i-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,o=r+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}class X1 extends lc{constructor(){super(new Ha(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class gr extends Ar{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,this.shadow=new X1}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class cc extends Ar{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class hc{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class j1 extends rn{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class q1 extends gn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class $1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ph(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=ph();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function ph(){return performance.now()}class Dl extends z0{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}const mh=new Mt;class Y1{constructor(e,t,n=0,i=1/0){this.ray=new Ys(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Zl,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}setFromXRController(e){return mh.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(mh),this}intersectObject(e,t=!0,n=[]){return Ll(e,this,n,t),n.sort(gh),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Ll(e[i],this,n,t);return n.sort(gh),n}}function gh(s,e){return s.distance-e.distance}function Ll(s,e,t,n){let i=!0;if(s.layers.test(e.layers)&&s.raycast(e,t)===!1&&(i=!1),i===!0&&n===!0){const r=s.children;for(let o=0,a=r.length;o<a;o++)Ll(r[o],e,t,!0)}}class Pl{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=It(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(It(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const _h=new z,ta=new z;class K1{constructor(e=new z,t=new z){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){_h.subVectors(e,this.start),ta.subVectors(this.end,this.start);const n=ta.dot(ta);let r=ta.dot(_h)/n;return t&&(r=It(r,0,1)),r}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}class J0 extends Ra{constructor(e=10,t=10,n=4473924,i=8947848){n=new bt(n),i=new bt(i);const r=t/2,o=e/t,a=e/2,l=[],c=[];for(let u=0,h=0,g=-a;u<=t;u++,g+=o){l.push(-a,0,g,a,0,g),l.push(g,0,-a,g,0,a);const _=u===r?n:i;_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3}const d=new rn;d.setAttribute("position",new Lt(l,3)),d.setAttribute("color",new Lt(c,3));const m=new Ai({vertexColors:!0,toneMapped:!1});super(d,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class J1 extends hs{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){console.warn("THREE.Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function vh(s,e,t,n){const i=Z1(n);switch(t){case S0:return s*e;case A0:return s*e/i.components*i.byteLength;case ql:return s*e/i.components*i.byteLength;case w0:return s*e*2/i.components*i.byteLength;case $l:return s*e*2/i.components*i.byteLength;case E0:return s*e*3/i.components*i.byteLength;case $n:return s*e*4/i.components*i.byteLength;case Yl:return s*e*4/i.components*i.byteLength;case ga:case _a:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case va:case ya:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case nl:case sl:return Math.max(s,16)*Math.max(e,8)/4;case tl:case il:return Math.max(s,8)*Math.max(e,8)/2;case rl:case al:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case ol:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case ll:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case cl:return Math.floor((s+4)/5)*Math.floor((e+3)/4)*16;case hl:return Math.floor((s+4)/5)*Math.floor((e+4)/5)*16;case ul:return Math.floor((s+5)/6)*Math.floor((e+4)/5)*16;case dl:return Math.floor((s+5)/6)*Math.floor((e+5)/6)*16;case fl:return Math.floor((s+7)/8)*Math.floor((e+4)/5)*16;case pl:return Math.floor((s+7)/8)*Math.floor((e+5)/6)*16;case ml:return Math.floor((s+7)/8)*Math.floor((e+7)/8)*16;case gl:return Math.floor((s+9)/10)*Math.floor((e+4)/5)*16;case _l:return Math.floor((s+9)/10)*Math.floor((e+5)/6)*16;case vl:return Math.floor((s+9)/10)*Math.floor((e+7)/8)*16;case yl:return Math.floor((s+9)/10)*Math.floor((e+9)/10)*16;case xl:return Math.floor((s+11)/12)*Math.floor((e+9)/10)*16;case Ml:return Math.floor((s+11)/12)*Math.floor((e+11)/12)*16;case xa:case bl:case Sl:return Math.ceil(s/4)*Math.ceil(e/4)*16;case T0:case El:return Math.ceil(s/4)*Math.ceil(e/4)*8;case Al:case wl:return Math.ceil(s/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function Z1(s){switch(s){case hi:case x0:return{byteLength:1,components:1};case _r:case M0:case Sr:return{byteLength:2,components:1};case Xl:case jl:return{byteLength:2,components:4};case ls:case Wl:case li:return{byteLength:4,components:1};case b0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Vl}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Vl);/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2010-2025 Three.js Authors
|
|
47
47
|
* SPDX-License-Identifier: MIT
|
|
@@ -843,7 +843,7 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo
|
|
|
843
843
|
material.diffuseColor = diffuseColor.rgb;
|
|
844
844
|
material.specularColor = specular;
|
|
845
845
|
material.specularShininess = shininess;
|
|
846
|
-
material.specularStrength = specularStrength;`,
|
|
846
|
+
material.specularStrength = specularStrength;`,Kd=`varying vec3 vViewPosition;
|
|
847
847
|
struct BlinnPhongMaterial {
|
|
848
848
|
vec3 diffuseColor;
|
|
849
849
|
vec3 specularColor;
|
|
@@ -860,7 +860,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom
|
|
|
860
860
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
|
|
861
861
|
}
|
|
862
862
|
#define RE_Direct RE_Direct_BlinnPhong
|
|
863
|
-
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,
|
|
863
|
+
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Jd=`PhysicalMaterial material;
|
|
864
864
|
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
|
|
865
865
|
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
|
|
866
866
|
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
|
|
@@ -2275,7 +2275,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,$f=`#ifdef USE_TRANSMISS
|
|
|
2275
2275
|
float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
|
|
2276
2276
|
return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
|
|
2277
2277
|
}
|
|
2278
|
-
#endif`,
|
|
2278
|
+
#endif`,Kf=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
2279
2279
|
varying vec2 vUv;
|
|
2280
2280
|
#endif
|
|
2281
2281
|
#ifdef USE_MAP
|
|
@@ -2345,7 +2345,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,$f=`#ifdef USE_TRANSMISS
|
|
|
2345
2345
|
#ifdef USE_THICKNESSMAP
|
|
2346
2346
|
uniform mat3 thicknessMapTransform;
|
|
2347
2347
|
varying vec2 vThicknessMapUv;
|
|
2348
|
-
#endif`,
|
|
2348
|
+
#endif`,Jf=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
|
|
2349
2349
|
varying vec2 vUv;
|
|
2350
2350
|
#endif
|
|
2351
2351
|
#ifdef USE_MAP
|
|
@@ -3571,7 +3571,7 @@ void main() {
|
|
|
3571
3571
|
#include <tonemapping_fragment>
|
|
3572
3572
|
#include <colorspace_fragment>
|
|
3573
3573
|
#include <fog_fragment>
|
|
3574
|
-
}`,Ht={alphahash_fragment:ed,alphahash_pars_fragment:td,alphamap_fragment:nd,alphamap_pars_fragment:id,alphatest_fragment:sd,alphatest_pars_fragment:rd,aomap_fragment:ad,aomap_pars_fragment:od,batching_pars_vertex:ld,batching_vertex:cd,begin_vertex:hd,beginnormal_vertex:ud,bsdfs:dd,iridescence_fragment:fd,bumpmap_pars_fragment:pd,clipping_planes_fragment:md,clipping_planes_pars_fragment:gd,clipping_planes_pars_vertex:_d,clipping_planes_vertex:vd,color_fragment:yd,color_pars_fragment:xd,color_pars_vertex:Md,color_vertex:bd,common:Sd,cube_uv_reflection_fragment:Ed,defaultnormal_vertex:Ad,displacementmap_pars_vertex:wd,displacementmap_vertex:Td,emissivemap_fragment:Cd,emissivemap_pars_fragment:Rd,colorspace_fragment:Dd,colorspace_pars_fragment:Ld,envmap_fragment:Pd,envmap_common_pars_fragment:Fd,envmap_pars_fragment:Nd,envmap_pars_vertex:Ud,envmap_physical_pars_fragment:jd,envmap_vertex:Id,fog_vertex:zd,fog_pars_vertex:Bd,fog_fragment:Od,fog_pars_fragment:kd,gradientmap_pars_fragment:Vd,lightmap_pars_fragment:Hd,lights_lambert_fragment:Gd,lights_lambert_pars_fragment:Wd,lights_pars_begin:Xd,lights_toon_fragment:qd,lights_toon_pars_fragment:$d,lights_phong_fragment:Yd,lights_phong_pars_fragment:Jd,lights_physical_fragment:Kd,lights_physical_pars_fragment:Zd,lights_fragment_begin:Qd,lights_fragment_maps:ef,lights_fragment_end:tf,logdepthbuf_fragment:nf,logdepthbuf_pars_fragment:sf,logdepthbuf_pars_vertex:rf,logdepthbuf_vertex:af,map_fragment:of,map_pars_fragment:lf,map_particle_fragment:cf,map_particle_pars_fragment:hf,metalnessmap_fragment:uf,metalnessmap_pars_fragment:df,morphinstance_vertex:ff,morphcolor_vertex:pf,morphnormal_vertex:mf,morphtarget_pars_vertex:gf,morphtarget_vertex:_f,normal_fragment_begin:vf,normal_fragment_maps:yf,normal_pars_fragment:xf,normal_pars_vertex:Mf,normal_vertex:bf,normalmap_pars_fragment:Sf,clearcoat_normal_fragment_begin:Ef,clearcoat_normal_fragment_maps:Af,clearcoat_pars_fragment:wf,iridescence_pars_fragment:Tf,opaque_fragment:Cf,packing:Rf,premultiplied_alpha_fragment:Df,project_vertex:Lf,dithering_fragment:Pf,dithering_pars_fragment:Ff,roughnessmap_fragment:Nf,roughnessmap_pars_fragment:Uf,shadowmap_pars_fragment:If,shadowmap_pars_vertex:zf,shadowmap_vertex:Bf,shadowmask_pars_fragment:Of,skinbase_vertex:kf,skinning_pars_vertex:Vf,skinning_vertex:Hf,skinnormal_vertex:Gf,specularmap_fragment:Wf,specularmap_pars_fragment:Xf,tonemapping_fragment:jf,tonemapping_pars_fragment:qf,transmission_fragment:$f,transmission_pars_fragment:Yf,uv_pars_fragment:Jf,uv_pars_vertex:Kf,uv_vertex:Zf,worldpos_vertex:Qf,background_vert:ep,background_frag:tp,backgroundCube_vert:np,backgroundCube_frag:ip,cube_vert:sp,cube_frag:rp,depth_vert:ap,depth_frag:op,distanceRGBA_vert:lp,distanceRGBA_frag:cp,equirect_vert:hp,equirect_frag:up,linedashed_vert:dp,linedashed_frag:fp,meshbasic_vert:pp,meshbasic_frag:mp,meshlambert_vert:gp,meshlambert_frag:_p,meshmatcap_vert:vp,meshmatcap_frag:yp,meshnormal_vert:xp,meshnormal_frag:Mp,meshphong_vert:bp,meshphong_frag:Sp,meshphysical_vert:Ep,meshphysical_frag:Ap,meshtoon_vert:wp,meshtoon_frag:Tp,points_vert:Cp,points_frag:Rp,shadow_vert:Dp,shadow_frag:Lp,sprite_vert:Pp,sprite_frag:Fp},Je={common:{diffuse:{value:new Tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new kt},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new kt}},envmap:{envMap:{value:null},envMapRotation:{value:new kt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new kt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new kt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new kt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new kt},normalScale:{value:new et(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new kt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new kt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new kt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new kt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Tt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0},uvTransform:{value:new kt}},sprite:{diffuse:{value:new Tt(16777215)},opacity:{value:1},center:{value:new et(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new kt},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0}}},kn={basic:{uniforms:Un([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Ht.meshbasic_vert,fragmentShader:Ht.meshbasic_frag},lambert:{uniforms:Un([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Ht.meshlambert_vert,fragmentShader:Ht.meshlambert_frag},phong:{uniforms:Un([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)},specular:{value:new Tt(1118481)},shininess:{value:30}}]),vertexShader:Ht.meshphong_vert,fragmentShader:Ht.meshphong_frag},standard:{uniforms:Un([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ht.meshphysical_vert,fragmentShader:Ht.meshphysical_frag},toon:{uniforms:Un([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Ht.meshtoon_vert,fragmentShader:Ht.meshtoon_frag},matcap:{uniforms:Un([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Ht.meshmatcap_vert,fragmentShader:Ht.meshmatcap_frag},points:{uniforms:Un([Je.points,Je.fog]),vertexShader:Ht.points_vert,fragmentShader:Ht.points_frag},dashed:{uniforms:Un([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ht.linedashed_vert,fragmentShader:Ht.linedashed_frag},depth:{uniforms:Un([Je.common,Je.displacementmap]),vertexShader:Ht.depth_vert,fragmentShader:Ht.depth_frag},normal:{uniforms:Un([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Ht.meshnormal_vert,fragmentShader:Ht.meshnormal_frag},sprite:{uniforms:Un([Je.sprite,Je.fog]),vertexShader:Ht.sprite_vert,fragmentShader:Ht.sprite_frag},background:{uniforms:{uvTransform:{value:new kt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ht.background_vert,fragmentShader:Ht.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new kt}},vertexShader:Ht.backgroundCube_vert,fragmentShader:Ht.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ht.cube_vert,fragmentShader:Ht.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ht.equirect_vert,fragmentShader:Ht.equirect_frag},distanceRGBA:{uniforms:Un([Je.common,Je.displacementmap,{referencePosition:{value:new I},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ht.distanceRGBA_vert,fragmentShader:Ht.distanceRGBA_frag},shadow:{uniforms:Un([Je.lights,Je.fog,{color:{value:new Tt(0)},opacity:{value:1}}]),vertexShader:Ht.shadow_vert,fragmentShader:Ht.shadow_frag}};kn.physical={uniforms:Un([kn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new kt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new kt},clearcoatNormalScale:{value:new et(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new kt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new kt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new kt},sheen:{value:0},sheenColor:{value:new Tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new kt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new kt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new kt},transmissionSamplerSize:{value:new et},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new kt},attenuationDistance:{value:0},attenuationColor:{value:new Tt(0)},specularColor:{value:new Tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new kt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new kt},anisotropyVector:{value:new et},anisotropyMap:{value:null},anisotropyMapTransform:{value:new kt}}]),vertexShader:Ht.meshphysical_vert,fragmentShader:Ht.meshphysical_frag};const na={r:0,b:0,g:0},es=new Sn,Np=new Et;function Up(s,e,t,n,i,r,o){const a=new Tt(0);let l=r===!0?0:1,c,d,m=null,u=0,h=null;function g(b){let S=b.isScene===!0?b.background:null;return S&&S.isTexture&&(S=(b.backgroundBlurriness>0?t:e).get(S)),S}function _(b){let S=!1;const F=g(b);F===null?f(a,l):F&&F.isColor&&(f(F,1),S=!0);const C=s.xr.getEnvironmentBlendMode();C==="additive"?n.buffers.color.setClear(0,0,0,1,o):C==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(s.autoClear||S)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function p(b,S){const F=g(S);F&&(F.isCubeTexture||F.mapping===Na)?(d===void 0&&(d=new zt(new $i(1,1,1),new Li({name:"BackgroundCubeMaterial",uniforms:qs(kn.backgroundCube.uniforms),vertexShader:kn.backgroundCube.vertexShader,fragmentShader:kn.backgroundCube.fragmentShader,side:In,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(C,R,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),es.copy(S.backgroundRotation),es.x*=-1,es.y*=-1,es.z*=-1,F.isCubeTexture&&F.isRenderTargetTexture===!1&&(es.y*=-1,es.z*=-1),d.material.uniforms.envMap.value=F,d.material.uniforms.flipEnvMap.value=F.isCubeTexture&&F.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Np.makeRotationFromEuler(es)),d.material.toneMapped=Gt.getTransfer(F.colorSpace)!==an,(m!==F||u!==F.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=F,u=F.version,h=s.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):F&&F.isTexture&&(c===void 0&&(c=new zt(new Di(2,2),new Li({name:"BackgroundMaterial",uniforms:qs(kn.background.uniforms),vertexShader:kn.background.vertexShader,fragmentShader:kn.background.fragmentShader,side:Qn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=F,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=Gt.getTransfer(F.colorSpace)!==an,F.matrixAutoUpdate===!0&&F.updateMatrix(),c.material.uniforms.uvTransform.value.copy(F.matrix),(m!==F||u!==F.version||h!==s.toneMapping)&&(c.material.needsUpdate=!0,m=F,u=F.version,h=s.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function f(b,S){b.getRGB(na,N0(s)),n.buffers.color.setClear(na.r,na.g,na.b,S,o)}function v(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(b,S=1){a.set(b),l=S,f(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,f(a,l)},render:_,addToRenderList:p,dispose:v}}function Ip(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=u(null);let r=i,o=!1;function a(E,L,B,H,Q){let ae=!1;const G=m(H,B,L);r!==G&&(r=G,c(r.object)),ae=h(E,H,B,Q),ae&&g(E,H,B,Q),Q!==null&&e.update(Q,s.ELEMENT_ARRAY_BUFFER),(ae||o)&&(o=!1,S(E,L,B,H),Q!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(Q).buffer))}function l(){return s.createVertexArray()}function c(E){return s.bindVertexArray(E)}function d(E){return s.deleteVertexArray(E)}function m(E,L,B){const H=B.wireframe===!0;let Q=n[E.id];Q===void 0&&(Q={},n[E.id]=Q);let ae=Q[L.id];ae===void 0&&(ae={},Q[L.id]=ae);let G=ae[H];return G===void 0&&(G=u(l()),ae[H]=G),G}function u(E){const L=[],B=[],H=[];for(let Q=0;Q<t;Q++)L[Q]=0,B[Q]=0,H[Q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:B,attributeDivisors:H,object:E,attributes:{},index:null}}function h(E,L,B,H){const Q=r.attributes,ae=L.attributes;let G=0;const le=B.getAttributes();for(const Z in le)if(le[Z].location>=0){const Ee=Q[Z];let be=ae[Z];if(be===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(be=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(be=E.instanceColor)),Ee===void 0||Ee.attribute!==be||be&&Ee.data!==be.data)return!0;G++}return r.attributesNum!==G||r.index!==H}function g(E,L,B,H){const Q={},ae=L.attributes;let G=0;const le=B.getAttributes();for(const Z in le)if(le[Z].location>=0){let Ee=ae[Z];Ee===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(Ee=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(Ee=E.instanceColor));const be={};be.attribute=Ee,Ee&&Ee.data&&(be.data=Ee.data),Q[Z]=be,G++}r.attributes=Q,r.attributesNum=G,r.index=H}function _(){const E=r.newAttributes;for(let L=0,B=E.length;L<B;L++)E[L]=0}function p(E){f(E,0)}function f(E,L){const B=r.newAttributes,H=r.enabledAttributes,Q=r.attributeDivisors;B[E]=1,H[E]===0&&(s.enableVertexAttribArray(E),H[E]=1),Q[E]!==L&&(s.vertexAttribDivisor(E,L),Q[E]=L)}function v(){const E=r.newAttributes,L=r.enabledAttributes;for(let B=0,H=L.length;B<H;B++)L[B]!==E[B]&&(s.disableVertexAttribArray(B),L[B]=0)}function b(E,L,B,H,Q,ae,G){G===!0?s.vertexAttribIPointer(E,L,B,Q,ae):s.vertexAttribPointer(E,L,B,H,Q,ae)}function S(E,L,B,H){_();const Q=H.attributes,ae=B.getAttributes(),G=L.defaultAttributeValues;for(const le in ae){const Z=ae[le];if(Z.location>=0){let ve=Q[le];if(ve===void 0&&(le==="instanceMatrix"&&E.instanceMatrix&&(ve=E.instanceMatrix),le==="instanceColor"&&E.instanceColor&&(ve=E.instanceColor)),ve!==void 0){const Ee=ve.normalized,be=ve.itemSize,ge=e.get(ve);if(ge===void 0)continue;const se=ge.buffer,j=ge.type,q=ge.bytesPerElement,ne=j===s.INT||j===s.UNSIGNED_INT||ve.gpuType===Wl;if(ve.isInterleavedBufferAttribute){const ee=ve.data,ue=ee.stride,$=ve.offset;if(ee.isInstancedInterleavedBuffer){for(let pe=0;pe<Z.locationSize;pe++)f(Z.location+pe,ee.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let pe=0;pe<Z.locationSize;pe++)p(Z.location+pe);s.bindBuffer(s.ARRAY_BUFFER,se);for(let pe=0;pe<Z.locationSize;pe++)b(Z.location+pe,be/Z.locationSize,j,Ee,ue*q,($+be/Z.locationSize*pe)*q,ne)}else{if(ve.isInstancedBufferAttribute){for(let ee=0;ee<Z.locationSize;ee++)f(Z.location+ee,ve.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=ve.meshPerAttribute*ve.count)}else for(let ee=0;ee<Z.locationSize;ee++)p(Z.location+ee);s.bindBuffer(s.ARRAY_BUFFER,se);for(let ee=0;ee<Z.locationSize;ee++)b(Z.location+ee,be/Z.locationSize,j,Ee,be*q,be/Z.locationSize*ee*q,ne)}}else if(G!==void 0){const Ee=G[le];if(Ee!==void 0)switch(Ee.length){case 2:s.vertexAttrib2fv(Z.location,Ee);break;case 3:s.vertexAttrib3fv(Z.location,Ee);break;case 4:s.vertexAttrib4fv(Z.location,Ee);break;default:s.vertexAttrib1fv(Z.location,Ee)}}}}v()}function F(){P();for(const E in n){const L=n[E];for(const B in L){const H=L[B];for(const Q in H)d(H[Q].object),delete H[Q];delete L[B]}delete n[E]}}function C(E){if(n[E.id]===void 0)return;const L=n[E.id];for(const B in L){const H=L[B];for(const Q in H)d(H[Q].object),delete H[Q];delete L[B]}delete n[E.id]}function R(E){for(const L in n){const B=n[L];if(B[E.id]===void 0)continue;const H=B[E.id];for(const Q in H)d(H[Q].object),delete H[Q];delete B[E.id]}}function P(){A(),o=!0,r!==i&&(r=i,c(r.object))}function A(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:P,resetDefaultState:A,dispose:F,releaseStatesOfGeometry:C,releaseStatesOfProgram:R,initAttributes:_,enableAttribute:p,disableUnusedAttributes:v}}function zp(s,e,t){let n;function i(c){n=c}function r(c,d){s.drawArrays(n,c,d),t.update(d,n,1)}function o(c,d,m){m!==0&&(s.drawArraysInstanced(n,c,d,m),t.update(d,n,m))}function a(c,d,m){if(m===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,d,0,m);let h=0;for(let g=0;g<m;g++)h+=d[g];t.update(h,n,1)}function l(c,d,m,u){if(m===0)return;const h=e.get("WEBGL_multi_draw");if(h===null)for(let g=0;g<c.length;g++)o(c[g],d[g],u[g]);else{h.multiDrawArraysInstancedWEBGL(n,c,0,d,0,u,0,m);let g=0;for(let _=0;_<m;_++)g+=d[_]*u[_];t.update(g,n,1)}}this.setMode=i,this.render=r,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function Bp(s,e,t,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const R=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(R.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(R){return!(R!==Zn&&n.convert(R)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(R){const P=R===Sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(R!==mi&&n.convert(R)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&R!==fi&&!P)}function l(R){if(R==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return R==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const m=t.logarithmicDepthBuffer===!0,u=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),h=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),g=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=s.getParameter(s.MAX_TEXTURE_SIZE),p=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),f=s.getParameter(s.MAX_VERTEX_ATTRIBS),v=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),b=s.getParameter(s.MAX_VARYING_VECTORS),S=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),F=g>0,C=s.getParameter(s.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:m,reverseDepthBuffer:u,maxTextures:h,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:S,vertexTextures:F,maxSamples:C}}function Op(s){const e=this;let t=null,n=0,i=!1,r=!1;const o=new Jn,a=new kt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(m,u){const h=m.length!==0||u||n!==0||i;return i=u,n=m.length,h},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(m,u){t=d(m,u,0)},this.setState=function(m,u,h){const g=m.clippingPlanes,_=m.clipIntersection,p=m.clipShadows,f=s.get(m);if(!i||g===null||g.length===0||r&&!p)r?d(null):c();else{const v=r?0:n,b=v*4;let S=f.clippingState||null;l.value=S,S=d(g,u,b,h);for(let F=0;F!==b;++F)S[F]=t[F];f.clippingState=S,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(m,u,h,g){const _=m!==null?m.length:0;let p=null;if(_!==0){if(p=l.value,g!==!0||p===null){const f=h+_*4,v=u.matrixWorldInverse;a.getNormalMatrix(v),(p===null||p.length<f)&&(p=new Float32Array(f));for(let b=0,S=h;b!==_;++b,S+=4)o.copy(m[b]).applyMatrix4(v,a),o.normal.toArray(p,S),p[S+3]=o.constant}l.value=p,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,p}}function kp(s){let e=new WeakMap;function t(o,a){return a===Zo?o.mapping=Gs:a===Qo&&(o.mapping=Ws),o}function n(o){if(o&&o.isTexture){const a=o.mapping;if(a===Zo||a===Qo)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new s1(l.height);return c.fromEquirectangularTexture(s,o),e.set(o,c),o.addEventListener("dispose",i),t(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:n,dispose:r}}const zs=4,yh=[.125,.215,.35,.446,.526,.582],as=20,Ao=new Ha,xh=new Tt;let wo=null,To=0,Co=0,Ro=!1;const ss=(1+Math.sqrt(5))/2,Ps=1/ss,Mh=[new I(-ss,Ps,0),new I(ss,Ps,0),new I(-Ps,0,ss),new I(Ps,0,ss),new I(0,ss,-Ps),new I(0,ss,Ps),new I(-1,1,-1),new I(1,1,-1),new I(-1,1,1),new I(1,1,1)],Vp=new I;class bh{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100,r={}){const{size:o=256,position:a=Vp}=r;wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,i,l,a),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ah(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Eh(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(wo,To,Co),this._renderer.xr.enabled=Ro,e.scissorTest=!1,ia(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Gs||e.mapping===Ws?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Xn,minFilter:Xn,generateMipmaps:!1,type:Sr,format:Zn,colorSpace:Xs,depthBuffer:!1},i=Sh(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Sh(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=Hp(r)),this._blurMaterial=Gp(r,e,t)}return i}_compileMaterial(e){const t=new zt(this._lodPlanes[0],e);this._renderer.compile(t,Ao)}_sceneToCubeUV(e,t,n,i,r){const l=new bn(90,1,t,n),c=[1,-1,1,1,1,1],d=[1,1,1,-1,-1,-1],m=this._renderer,u=m.autoClear,h=m.toneMapping;m.getClearColor(xh),m.toneMapping=Xi,m.autoClear=!1;const g=new qi({name:"PMREM.Background",side:In,depthWrite:!1,depthTest:!1}),_=new zt(new $i,g);let p=!1;const f=e.background;f?f.isColor&&(g.color.copy(f),e.background=null,p=!0):(g.color.copy(xh),p=!0);for(let v=0;v<6;v++){const b=v%3;b===0?(l.up.set(0,c[v],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x+d[v],r.y,r.z)):b===1?(l.up.set(0,0,c[v]),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y+d[v],r.z)):(l.up.set(0,c[v],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y,r.z+d[v]));const S=this._cubeSize;ia(i,b*S,v>2?S:0,S,S),m.setRenderTarget(i),p&&m.render(_,l),m.render(e,l)}_.geometry.dispose(),_.material.dispose(),m.toneMapping=h,m.autoClear=u,e.background=f}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===Gs||e.mapping===Ws;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ah()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Eh());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new zt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ia(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(o,Ao)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodPlanes.length;for(let r=1;r<i;r++){const o=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=Mh[(i-r-1)%Mh.length];this._blur(e,r-1,r,o,a)}t.autoClear=n}_blur(e,t,n,i,r){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",r),this._halfBlur(o,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,m=new zt(this._lodPlanes[i],c),u=c.uniforms,h=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*as-1),_=r/g,p=isFinite(r)?1+Math.floor(d*_):as;p>as&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${as}`);const f=[];let v=0;for(let R=0;R<as;++R){const P=R/_,A=Math.exp(-P*P/2);f.push(A),R===0?v+=A:R<p&&(v+=2*A)}for(let R=0;R<f.length;R++)f[R]=f[R]/v;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=f,u.latitudinal.value=o==="latitudinal",a&&(u.poleAxis.value=a);const{_lodMax:b}=this;u.dTheta.value=g,u.mipInt.value=b-n;const S=this._sizeLods[i],F=3*S*(i>b-zs?i-b+zs:0),C=4*(this._cubeSize-S);ia(t,F,C,3*S,2*S),l.setRenderTarget(t),l.render(m,Ao)}}function Hp(s){const e=[],t=[],n=[];let i=s;const r=s-zs+1+yh.length;for(let o=0;o<r;o++){const a=Math.pow(2,i);t.push(a);let l=1/a;o>s-zs?l=yh[o-s+zs-1]:o===0&&(l=0),n.push(l);const c=1/(a-2),d=-c,m=1+c,u=[d,d,m,d,m,m,d,d,m,m,d,m],h=6,g=6,_=3,p=2,f=1,v=new Float32Array(_*g*h),b=new Float32Array(p*g*h),S=new Float32Array(f*g*h);for(let C=0;C<h;C++){const R=C%3*2/3-1,P=C>2?0:-1,A=[R,P,0,R+2/3,P,0,R+2/3,P+1,0,R,P,0,R+2/3,P+1,0,R,P+1,0];v.set(A,_*g*C),b.set(u,p*g*C);const E=[C,C,C,C,C,C];S.set(E,f*g*C)}const F=new hn;F.setAttribute("position",new mn(v,_)),F.setAttribute("uv",new mn(b,p)),F.setAttribute("faceIndex",new mn(S,f)),e.push(F),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Sh(s,e,t){const n=new us(s,e,t);return n.texture.mapping=Na,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ia(s,e,t,n,i){s.viewport.set(e,t,n,i),s.scissor.set(e,t,n,i)}function Gp(s,e,t){const n=new Float32Array(as),i=new I(0,1,0);return new Li({name:"SphericalGaussianBlur",defines:{n:as,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:uc(),fragmentShader:`
|
|
3574
|
+
}`,zt={alphahash_fragment:ed,alphahash_pars_fragment:td,alphamap_fragment:nd,alphamap_pars_fragment:id,alphatest_fragment:sd,alphatest_pars_fragment:rd,aomap_fragment:ad,aomap_pars_fragment:od,batching_pars_vertex:ld,batching_vertex:cd,begin_vertex:hd,beginnormal_vertex:ud,bsdfs:dd,iridescence_fragment:fd,bumpmap_pars_fragment:pd,clipping_planes_fragment:md,clipping_planes_pars_fragment:gd,clipping_planes_pars_vertex:_d,clipping_planes_vertex:vd,color_fragment:yd,color_pars_fragment:xd,color_pars_vertex:Md,color_vertex:bd,common:Sd,cube_uv_reflection_fragment:Ed,defaultnormal_vertex:Ad,displacementmap_pars_vertex:wd,displacementmap_vertex:Td,emissivemap_fragment:Cd,emissivemap_pars_fragment:Rd,colorspace_fragment:Dd,colorspace_pars_fragment:Ld,envmap_fragment:Pd,envmap_common_pars_fragment:Fd,envmap_pars_fragment:Nd,envmap_pars_vertex:Ud,envmap_physical_pars_fragment:jd,envmap_vertex:Id,fog_vertex:zd,fog_pars_vertex:Bd,fog_fragment:Od,fog_pars_fragment:kd,gradientmap_pars_fragment:Vd,lightmap_pars_fragment:Hd,lights_lambert_fragment:Gd,lights_lambert_pars_fragment:Wd,lights_pars_begin:Xd,lights_toon_fragment:qd,lights_toon_pars_fragment:$d,lights_phong_fragment:Yd,lights_phong_pars_fragment:Kd,lights_physical_fragment:Jd,lights_physical_pars_fragment:Zd,lights_fragment_begin:Qd,lights_fragment_maps:ef,lights_fragment_end:tf,logdepthbuf_fragment:nf,logdepthbuf_pars_fragment:sf,logdepthbuf_pars_vertex:rf,logdepthbuf_vertex:af,map_fragment:of,map_pars_fragment:lf,map_particle_fragment:cf,map_particle_pars_fragment:hf,metalnessmap_fragment:uf,metalnessmap_pars_fragment:df,morphinstance_vertex:ff,morphcolor_vertex:pf,morphnormal_vertex:mf,morphtarget_pars_vertex:gf,morphtarget_vertex:_f,normal_fragment_begin:vf,normal_fragment_maps:yf,normal_pars_fragment:xf,normal_pars_vertex:Mf,normal_vertex:bf,normalmap_pars_fragment:Sf,clearcoat_normal_fragment_begin:Ef,clearcoat_normal_fragment_maps:Af,clearcoat_pars_fragment:wf,iridescence_pars_fragment:Tf,opaque_fragment:Cf,packing:Rf,premultiplied_alpha_fragment:Df,project_vertex:Lf,dithering_fragment:Pf,dithering_pars_fragment:Ff,roughnessmap_fragment:Nf,roughnessmap_pars_fragment:Uf,shadowmap_pars_fragment:If,shadowmap_pars_vertex:zf,shadowmap_vertex:Bf,shadowmask_pars_fragment:Of,skinbase_vertex:kf,skinning_pars_vertex:Vf,skinning_vertex:Hf,skinnormal_vertex:Gf,specularmap_fragment:Wf,specularmap_pars_fragment:Xf,tonemapping_fragment:jf,tonemapping_pars_fragment:qf,transmission_fragment:$f,transmission_pars_fragment:Yf,uv_pars_fragment:Kf,uv_pars_vertex:Jf,uv_vertex:Zf,worldpos_vertex:Qf,background_vert:ep,background_frag:tp,backgroundCube_vert:np,backgroundCube_frag:ip,cube_vert:sp,cube_frag:rp,depth_vert:ap,depth_frag:op,distanceRGBA_vert:lp,distanceRGBA_frag:cp,equirect_vert:hp,equirect_frag:up,linedashed_vert:dp,linedashed_frag:fp,meshbasic_vert:pp,meshbasic_frag:mp,meshlambert_vert:gp,meshlambert_frag:_p,meshmatcap_vert:vp,meshmatcap_frag:yp,meshnormal_vert:xp,meshnormal_frag:Mp,meshphong_vert:bp,meshphong_frag:Sp,meshphysical_vert:Ep,meshphysical_frag:Ap,meshtoon_vert:wp,meshtoon_frag:Tp,points_vert:Cp,points_frag:Rp,shadow_vert:Dp,shadow_frag:Lp,sprite_vert:Pp,sprite_frag:Fp},Ye={common:{diffuse:{value:new bt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ut}},envmap:{envMap:{value:null},envMapRotation:{value:new Ut},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ut}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ut}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ut},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ut},normalScale:{value:new Je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ut},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ut}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ut}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ut}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new bt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new bt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0},uvTransform:{value:new Ut}},sprite:{diffuse:{value:new bt(16777215)},opacity:{value:1},center:{value:new Je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}}},Nn={basic:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.fog]),vertexShader:zt.meshbasic_vert,fragmentShader:zt.meshbasic_frag},lambert:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)}}]),vertexShader:zt.meshlambert_vert,fragmentShader:zt.meshlambert_frag},phong:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)},specular:{value:new bt(1118481)},shininess:{value:30}}]),vertexShader:zt.meshphong_vert,fragmentShader:zt.meshphong_frag},standard:{uniforms:Rn([Ye.common,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.roughnessmap,Ye.metalnessmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:zt.meshphysical_vert,fragmentShader:zt.meshphysical_frag},toon:{uniforms:Rn([Ye.common,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.gradientmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)}}]),vertexShader:zt.meshtoon_vert,fragmentShader:zt.meshtoon_frag},matcap:{uniforms:Rn([Ye.common,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,{matcap:{value:null}}]),vertexShader:zt.meshmatcap_vert,fragmentShader:zt.meshmatcap_frag},points:{uniforms:Rn([Ye.points,Ye.fog]),vertexShader:zt.points_vert,fragmentShader:zt.points_frag},dashed:{uniforms:Rn([Ye.common,Ye.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:zt.linedashed_vert,fragmentShader:zt.linedashed_frag},depth:{uniforms:Rn([Ye.common,Ye.displacementmap]),vertexShader:zt.depth_vert,fragmentShader:zt.depth_frag},normal:{uniforms:Rn([Ye.common,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,{opacity:{value:1}}]),vertexShader:zt.meshnormal_vert,fragmentShader:zt.meshnormal_frag},sprite:{uniforms:Rn([Ye.sprite,Ye.fog]),vertexShader:zt.sprite_vert,fragmentShader:zt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ut},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:zt.background_vert,fragmentShader:zt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ut}},vertexShader:zt.backgroundCube_vert,fragmentShader:zt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:zt.cube_vert,fragmentShader:zt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:zt.equirect_vert,fragmentShader:zt.equirect_frag},distanceRGBA:{uniforms:Rn([Ye.common,Ye.displacementmap,{referencePosition:{value:new z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:zt.distanceRGBA_vert,fragmentShader:zt.distanceRGBA_frag},shadow:{uniforms:Rn([Ye.lights,Ye.fog,{color:{value:new bt(0)},opacity:{value:1}}]),vertexShader:zt.shadow_vert,fragmentShader:zt.shadow_frag}};Nn.physical={uniforms:Rn([Nn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ut},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ut},clearcoatNormalScale:{value:new Je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ut},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ut},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ut},sheen:{value:0},sheenColor:{value:new bt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ut},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ut},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ut},transmissionSamplerSize:{value:new Je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ut},attenuationDistance:{value:0},attenuationColor:{value:new bt(0)},specularColor:{value:new bt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ut},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ut},anisotropyVector:{value:new Je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ut}}]),vertexShader:zt.meshphysical_vert,fragmentShader:zt.meshphysical_frag};const na={r:0,b:0,g:0},Zi=new _n,Np=new Mt;function Up(s,e,t,n,i,r,o){const a=new bt(0);let l=r===!0?0:1,c,d,m=null,u=0,h=null;function g(M){let b=M.isScene===!0?M.background:null;return b&&b.isTexture&&(b=(M.backgroundBlurriness>0?t:e).get(b)),b}function _(M){let b=!1;const N=g(M);N===null?p(a,l):N&&N.isColor&&(p(N,1),b=!0);const L=s.xr.getEnvironmentBlendMode();L==="additive"?n.buffers.color.setClear(0,0,0,1,o):L==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(s.autoClear||b)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function f(M,b){const N=g(b);N&&(N.isCubeTexture||N.mapping===Na)?(d===void 0&&(d=new Pt(new Wi(1,1,1),new Ti({name:"BackgroundCubeMaterial",uniforms:qs(Nn.backgroundCube.uniforms),vertexShader:Nn.backgroundCube.vertexShader,fragmentShader:Nn.backgroundCube.fragmentShader,side:Dn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(L,P,I){this.matrixWorld.copyPosition(I.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),Zi.copy(b.backgroundRotation),Zi.x*=-1,Zi.y*=-1,Zi.z*=-1,N.isCubeTexture&&N.isRenderTargetTexture===!1&&(Zi.y*=-1,Zi.z*=-1),d.material.uniforms.envMap.value=N,d.material.uniforms.flipEnvMap.value=N.isCubeTexture&&N.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=b.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Np.makeRotationFromEuler(Zi)),d.material.toneMapped=Bt.getTransfer(N.colorSpace)!==tn,(m!==N||u!==N.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=N,u=N.version,h=s.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):N&&N.isTexture&&(c===void 0&&(c=new Pt(new wi(2,2),new Ti({name:"BackgroundMaterial",uniforms:qs(Nn.background.uniforms),vertexShader:Nn.background.vertexShader,fragmentShader:Nn.background.fragmentShader,side:Yn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=N,c.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,c.material.toneMapped=Bt.getTransfer(N.colorSpace)!==tn,N.matrixAutoUpdate===!0&&N.updateMatrix(),c.material.uniforms.uvTransform.value.copy(N.matrix),(m!==N||u!==N.version||h!==s.toneMapping)&&(c.material.needsUpdate=!0,m=N,u=N.version,h=s.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}function p(M,b){M.getRGB(na,N0(s)),n.buffers.color.setClear(na.r,na.g,na.b,b,o)}function x(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(M,b=1){a.set(M),l=b,p(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,p(a,l)},render:_,addToRenderList:f,dispose:x}}function Ip(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=u(null);let r=i,o=!1;function a(E,F,B,X,Z){let se=!1;const W=m(X,B,F);r!==W&&(r=W,c(r.object)),se=h(E,X,B,Z),se&&g(E,X,B,Z),Z!==null&&e.update(Z,s.ELEMENT_ARRAY_BUFFER),(se||o)&&(o=!1,b(E,F,B,X),Z!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(Z).buffer))}function l(){return s.createVertexArray()}function c(E){return s.bindVertexArray(E)}function d(E){return s.deleteVertexArray(E)}function m(E,F,B){const X=B.wireframe===!0;let Z=n[E.id];Z===void 0&&(Z={},n[E.id]=Z);let se=Z[F.id];se===void 0&&(se={},Z[F.id]=se);let W=se[X];return W===void 0&&(W=u(l()),se[X]=W),W}function u(E){const F=[],B=[],X=[];for(let Z=0;Z<t;Z++)F[Z]=0,B[Z]=0,X[Z]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:F,enabledAttributes:B,attributeDivisors:X,object:E,attributes:{},index:null}}function h(E,F,B,X){const Z=r.attributes,se=F.attributes;let W=0;const he=B.getAttributes();for(const Q in he)if(he[Q].location>=0){const De=Z[Q];let Ae=se[Q];if(Ae===void 0&&(Q==="instanceMatrix"&&E.instanceMatrix&&(Ae=E.instanceMatrix),Q==="instanceColor"&&E.instanceColor&&(Ae=E.instanceColor)),De===void 0||De.attribute!==Ae||Ae&&De.data!==Ae.data)return!0;W++}return r.attributesNum!==W||r.index!==X}function g(E,F,B,X){const Z={},se=F.attributes;let W=0;const he=B.getAttributes();for(const Q in he)if(he[Q].location>=0){let De=se[Q];De===void 0&&(Q==="instanceMatrix"&&E.instanceMatrix&&(De=E.instanceMatrix),Q==="instanceColor"&&E.instanceColor&&(De=E.instanceColor));const Ae={};Ae.attribute=De,De&&De.data&&(Ae.data=De.data),Z[Q]=Ae,W++}r.attributes=Z,r.attributesNum=W,r.index=X}function _(){const E=r.newAttributes;for(let F=0,B=E.length;F<B;F++)E[F]=0}function f(E){p(E,0)}function p(E,F){const B=r.newAttributes,X=r.enabledAttributes,Z=r.attributeDivisors;B[E]=1,X[E]===0&&(s.enableVertexAttribArray(E),X[E]=1),Z[E]!==F&&(s.vertexAttribDivisor(E,F),Z[E]=F)}function x(){const E=r.newAttributes,F=r.enabledAttributes;for(let B=0,X=F.length;B<X;B++)F[B]!==E[B]&&(s.disableVertexAttribArray(B),F[B]=0)}function M(E,F,B,X,Z,se,W){W===!0?s.vertexAttribIPointer(E,F,B,Z,se):s.vertexAttribPointer(E,F,B,X,Z,se)}function b(E,F,B,X){_();const Z=X.attributes,se=B.getAttributes(),W=F.defaultAttributeValues;for(const he in se){const Q=se[he];if(Q.location>=0){let xe=Z[he];if(xe===void 0&&(he==="instanceMatrix"&&E.instanceMatrix&&(xe=E.instanceMatrix),he==="instanceColor"&&E.instanceColor&&(xe=E.instanceColor)),xe!==void 0){const De=xe.normalized,Ae=xe.itemSize,pe=e.get(xe);if(pe===void 0)continue;const re=pe.buffer,q=pe.type,K=pe.bytesPerElement,te=q===s.INT||q===s.UNSIGNED_INT||xe.gpuType===Wl;if(xe.isInterleavedBufferAttribute){const ee=xe.data,fe=ee.stride,Y=xe.offset;if(ee.isInstancedInterleavedBuffer){for(let me=0;me<Q.locationSize;me++)p(Q.location+me,ee.meshPerAttribute);E.isInstancedMesh!==!0&&X._maxInstanceCount===void 0&&(X._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let me=0;me<Q.locationSize;me++)f(Q.location+me);s.bindBuffer(s.ARRAY_BUFFER,re);for(let me=0;me<Q.locationSize;me++)M(Q.location+me,Ae/Q.locationSize,q,De,fe*K,(Y+Ae/Q.locationSize*me)*K,te)}else{if(xe.isInstancedBufferAttribute){for(let ee=0;ee<Q.locationSize;ee++)p(Q.location+ee,xe.meshPerAttribute);E.isInstancedMesh!==!0&&X._maxInstanceCount===void 0&&(X._maxInstanceCount=xe.meshPerAttribute*xe.count)}else for(let ee=0;ee<Q.locationSize;ee++)f(Q.location+ee);s.bindBuffer(s.ARRAY_BUFFER,re);for(let ee=0;ee<Q.locationSize;ee++)M(Q.location+ee,Ae/Q.locationSize,q,De,Ae*K,Ae/Q.locationSize*ee*K,te)}}else if(W!==void 0){const De=W[he];if(De!==void 0)switch(De.length){case 2:s.vertexAttrib2fv(Q.location,De);break;case 3:s.vertexAttrib3fv(Q.location,De);break;case 4:s.vertexAttrib4fv(Q.location,De);break;default:s.vertexAttrib1fv(Q.location,De)}}}}x()}function N(){I();for(const E in n){const F=n[E];for(const B in F){const X=F[B];for(const Z in X)d(X[Z].object),delete X[Z];delete F[B]}delete n[E]}}function L(E){if(n[E.id]===void 0)return;const F=n[E.id];for(const B in F){const X=F[B];for(const Z in X)d(X[Z].object),delete X[Z];delete F[B]}delete n[E.id]}function P(E){for(const F in n){const B=n[F];if(B[E.id]===void 0)continue;const X=B[E.id];for(const Z in X)d(X[Z].object),delete X[Z];delete B[E.id]}}function I(){A(),o=!0,r!==i&&(r=i,c(r.object))}function A(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:I,resetDefaultState:A,dispose:N,releaseStatesOfGeometry:L,releaseStatesOfProgram:P,initAttributes:_,enableAttribute:f,disableUnusedAttributes:x}}function zp(s,e,t){let n;function i(c){n=c}function r(c,d){s.drawArrays(n,c,d),t.update(d,n,1)}function o(c,d,m){m!==0&&(s.drawArraysInstanced(n,c,d,m),t.update(d,n,m))}function a(c,d,m){if(m===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,d,0,m);let h=0;for(let g=0;g<m;g++)h+=d[g];t.update(h,n,1)}function l(c,d,m,u){if(m===0)return;const h=e.get("WEBGL_multi_draw");if(h===null)for(let g=0;g<c.length;g++)o(c[g],d[g],u[g]);else{h.multiDrawArraysInstancedWEBGL(n,c,0,d,0,u,0,m);let g=0;for(let _=0;_<m;_++)g+=d[_]*u[_];t.update(g,n,1)}}this.setMode=i,this.render=r,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function Bp(s,e,t,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const P=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(P){return!(P!==$n&&n.convert(P)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(P){const I=P===Sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(P!==hi&&n.convert(P)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&P!==li&&!I)}function l(P){if(P==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return P==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const m=t.logarithmicDepthBuffer===!0,u=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),h=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),g=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=s.getParameter(s.MAX_TEXTURE_SIZE),f=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),p=s.getParameter(s.MAX_VERTEX_ATTRIBS),x=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),M=s.getParameter(s.MAX_VARYING_VECTORS),b=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),N=g>0,L=s.getParameter(s.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:m,reverseDepthBuffer:u,maxTextures:h,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:x,maxVaryings:M,maxFragmentUniforms:b,vertexTextures:N,maxSamples:L}}function Op(s){const e=this;let t=null,n=0,i=!1,r=!1;const o=new jn,a=new Ut,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(m,u){const h=m.length!==0||u||n!==0||i;return i=u,n=m.length,h},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(m,u){t=d(m,u,0)},this.setState=function(m,u,h){const g=m.clippingPlanes,_=m.clipIntersection,f=m.clipShadows,p=s.get(m);if(!i||g===null||g.length===0||r&&!f)r?d(null):c();else{const x=r?0:n,M=x*4;let b=p.clippingState||null;l.value=b,b=d(g,u,M,h);for(let N=0;N!==M;++N)b[N]=t[N];p.clippingState=b,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(m,u,h,g){const _=m!==null?m.length:0;let f=null;if(_!==0){if(f=l.value,g!==!0||f===null){const p=h+_*4,x=u.matrixWorldInverse;a.getNormalMatrix(x),(f===null||f.length<p)&&(f=new Float32Array(p));for(let M=0,b=h;M!==_;++M,b+=4)o.copy(m[M]).applyMatrix4(x,a),o.normal.toArray(f,b),f[b+3]=o.constant}l.value=f,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,f}}function kp(s){let e=new WeakMap;function t(o,a){return a===Zo?o.mapping=Gs:a===Qo&&(o.mapping=Ws),o}function n(o){if(o&&o.isTexture){const a=o.mapping;if(a===Zo||a===Qo)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new s1(l.height);return c.fromEquirectangularTexture(s,o),e.set(o,c),o.addEventListener("dispose",i),t(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:n,dispose:r}}const zs=4,yh=[.125,.215,.35,.446,.526,.582],ss=20,Ao=new Ha,xh=new bt;let wo=null,To=0,Co=0,Ro=!1;const ns=(1+Math.sqrt(5))/2,Ps=1/ns,Mh=[new z(-ns,Ps,0),new z(ns,Ps,0),new z(-Ps,0,ns),new z(Ps,0,ns),new z(0,ns,-Ps),new z(0,ns,Ps),new z(-1,1,-1),new z(1,1,-1),new z(-1,1,1),new z(1,1,1)],Vp=new z;class bh{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100,r={}){const{size:o=256,position:a=Vp}=r;wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,i,l,a),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ah(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Eh(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(wo,To,Co),this._renderer.xr.enabled=Ro,e.scissorTest=!1,ia(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Gs||e.mapping===Ws?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:kn,minFilter:kn,generateMipmaps:!1,type:Sr,format:$n,colorSpace:Xs,depthBuffer:!1},i=Sh(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Sh(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=Hp(r)),this._blurMaterial=Gp(r,e,t)}return i}_compileMaterial(e){const t=new Pt(this._lodPlanes[0],e);this._renderer.compile(t,Ao)}_sceneToCubeUV(e,t,n,i,r){const l=new gn(90,1,t,n),c=[1,-1,1,1,1,1],d=[1,1,1,-1,-1,-1],m=this._renderer,u=m.autoClear,h=m.toneMapping;m.getClearColor(xh),m.toneMapping=Vi,m.autoClear=!1;const g=new Gi({name:"PMREM.Background",side:Dn,depthWrite:!1,depthTest:!1}),_=new Pt(new Wi,g);let f=!1;const p=e.background;p?p.isColor&&(g.color.copy(p),e.background=null,f=!0):(g.color.copy(xh),f=!0);for(let x=0;x<6;x++){const M=x%3;M===0?(l.up.set(0,c[x],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x+d[x],r.y,r.z)):M===1?(l.up.set(0,0,c[x]),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y+d[x],r.z)):(l.up.set(0,c[x],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y,r.z+d[x]));const b=this._cubeSize;ia(i,M*b,x>2?b:0,b,b),m.setRenderTarget(i),f&&m.render(_,l),m.render(e,l)}_.geometry.dispose(),_.material.dispose(),m.toneMapping=h,m.autoClear=u,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===Gs||e.mapping===Ws;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ah()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Eh());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new Pt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ia(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(o,Ao)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodPlanes.length;for(let r=1;r<i;r++){const o=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=Mh[(i-r-1)%Mh.length];this._blur(e,r-1,r,o,a)}t.autoClear=n}_blur(e,t,n,i,r){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",r),this._halfBlur(o,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,m=new Pt(this._lodPlanes[i],c),u=c.uniforms,h=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*ss-1),_=r/g,f=isFinite(r)?1+Math.floor(d*_):ss;f>ss&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${ss}`);const p=[];let x=0;for(let P=0;P<ss;++P){const I=P/_,A=Math.exp(-I*I/2);p.push(A),P===0?x+=A:P<f&&(x+=2*A)}for(let P=0;P<p.length;P++)p[P]=p[P]/x;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=p,u.latitudinal.value=o==="latitudinal",a&&(u.poleAxis.value=a);const{_lodMax:M}=this;u.dTheta.value=g,u.mipInt.value=M-n;const b=this._sizeLods[i],N=3*b*(i>M-zs?i-M+zs:0),L=4*(this._cubeSize-b);ia(t,N,L,3*b,2*b),l.setRenderTarget(t),l.render(m,Ao)}}function Hp(s){const e=[],t=[],n=[];let i=s;const r=s-zs+1+yh.length;for(let o=0;o<r;o++){const a=Math.pow(2,i);t.push(a);let l=1/a;o>s-zs?l=yh[o-s+zs-1]:o===0&&(l=0),n.push(l);const c=1/(a-2),d=-c,m=1+c,u=[d,d,m,d,m,m,d,d,m,m,d,m],h=6,g=6,_=3,f=2,p=1,x=new Float32Array(_*g*h),M=new Float32Array(f*g*h),b=new Float32Array(p*g*h);for(let L=0;L<h;L++){const P=L%3*2/3-1,I=L>2?0:-1,A=[P,I,0,P+2/3,I,0,P+2/3,I+1,0,P,I,0,P+2/3,I+1,0,P,I+1,0];x.set(A,_*g*L),M.set(u,f*g*L);const E=[L,L,L,L,L,L];b.set(E,p*g*L)}const N=new rn;N.setAttribute("position",new hn(x,_)),N.setAttribute("uv",new hn(M,f)),N.setAttribute("faceIndex",new hn(b,p)),e.push(N),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Sh(s,e,t){const n=new cs(s,e,t);return n.texture.mapping=Na,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ia(s,e,t,n,i){s.viewport.set(e,t,n,i),s.scissor.set(e,t,n,i)}function Gp(s,e,t){const n=new Float32Array(ss),i=new z(0,1,0);return new Ti({name:"SphericalGaussianBlur",defines:{n:ss,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:uc(),fragmentShader:`
|
|
3575
3575
|
|
|
3576
3576
|
precision mediump float;
|
|
3577
3577
|
precision mediump int;
|
|
@@ -3631,7 +3631,7 @@ void main() {
|
|
|
3631
3631
|
}
|
|
3632
3632
|
|
|
3633
3633
|
}
|
|
3634
|
-
`,blending:
|
|
3634
|
+
`,blending:ki,depthTest:!1,depthWrite:!1})}function Eh(){return new Ti({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:uc(),fragmentShader:`
|
|
3635
3635
|
|
|
3636
3636
|
precision mediump float;
|
|
3637
3637
|
precision mediump int;
|
|
@@ -3650,7 +3650,7 @@ void main() {
|
|
|
3650
3650
|
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
|
|
3651
3651
|
|
|
3652
3652
|
}
|
|
3653
|
-
`,blending:
|
|
3653
|
+
`,blending:ki,depthTest:!1,depthWrite:!1})}function Ah(){return new Ti({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:uc(),fragmentShader:`
|
|
3654
3654
|
|
|
3655
3655
|
precision mediump float;
|
|
3656
3656
|
precision mediump int;
|
|
@@ -3666,7 +3666,7 @@ void main() {
|
|
|
3666
3666
|
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
|
|
3667
3667
|
|
|
3668
3668
|
}
|
|
3669
|
-
`,blending:
|
|
3669
|
+
`,blending:ki,depthTest:!1,depthWrite:!1})}function uc(){return`
|
|
3670
3670
|
|
|
3671
3671
|
precision mediump float;
|
|
3672
3672
|
precision mediump int;
|
|
@@ -3721,17 +3721,17 @@ void main() {
|
|
|
3721
3721
|
gl_Position = vec4( position, 1.0 );
|
|
3722
3722
|
|
|
3723
3723
|
}
|
|
3724
|
-
`}function Wp(s){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture){const l=a.mapping,c=l===Zo||l===Qo,d=l===Gs||l===Ws;if(c||d){let m=e.get(a);const u=m!==void 0?m.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==u)return t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a,m):t.fromCubemap(a,m),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),m.texture;if(m!==void 0)return m.texture;{const h=a.image;return c&&h&&h.height>0||d&&h&&i(h)?(t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a):t.fromCubemap(a),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),a.addEventListener("dispose",r),m.texture):null}}}return a}function i(a){let l=0;const c=6;for(let d=0;d<c;d++)a[d]!==void 0&&l++;return l===c}function r(a){const l=a.target;l.removeEventListener("dispose",r);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:o}}function Xp(s){const e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=s.getExtension("WEBGL_depth_texture")||s.getExtension("MOZ_WEBGL_depth_texture")||s.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=s.getExtension("EXT_texture_filter_anisotropic")||s.getExtension("MOZ_EXT_texture_filter_anisotropic")||s.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=s.getExtension("WEBGL_compressed_texture_s3tc")||s.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=s.getExtension("WEBGL_compressed_texture_pvrtc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=s.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const i=t(n);return i===null&&Os("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function jp(s,e,t,n){const i={},r=new WeakMap;function o(m){const u=m.target;u.index!==null&&e.remove(u.index);for(const g in u.attributes)e.remove(u.attributes[g]);u.removeEventListener("dispose",o),delete i[u.id];const h=r.get(u);h&&(e.remove(h),r.delete(u)),n.releaseStatesOfGeometry(u),u.isInstancedBufferGeometry===!0&&delete u._maxInstanceCount,t.memory.geometries--}function a(m,u){return i[u.id]===!0||(u.addEventListener("dispose",o),i[u.id]=!0,t.memory.geometries++),u}function l(m){const u=m.attributes;for(const h in u)e.update(u[h],s.ARRAY_BUFFER)}function c(m){const u=[],h=m.index,g=m.attributes.position;let _=0;if(h!==null){const v=h.array;_=h.version;for(let b=0,S=v.length;b<S;b+=3){const F=v[b+0],C=v[b+1],R=v[b+2];u.push(F,C,C,R,R,F)}}else if(g!==void 0){const v=g.array;_=g.version;for(let b=0,S=v.length/3-1;b<S;b+=3){const F=b+0,C=b+1,R=b+2;u.push(F,C,C,R,R,F)}}else return;const p=new(R0(u)?F0:P0)(u,1);p.version=_;const f=r.get(m);f&&e.remove(f),r.set(m,p)}function d(m){const u=r.get(m);if(u){const h=m.index;h!==null&&u.version<h.version&&c(m)}else c(m);return r.get(m)}return{get:a,update:l,getWireframeAttribute:d}}function qp(s,e,t){let n;function i(u){n=u}let r,o;function a(u){r=u.type,o=u.bytesPerElement}function l(u,h){s.drawElements(n,h,r,u*o),t.update(h,n,1)}function c(u,h,g){g!==0&&(s.drawElementsInstanced(n,h,r,u*o,g),t.update(h,n,g))}function d(u,h,g){if(g===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,h,0,r,u,0,g);let p=0;for(let f=0;f<g;f++)p+=h[f];t.update(p,n,1)}function m(u,h,g,_){if(g===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let f=0;f<u.length;f++)c(u[f]/o,h[f],_[f]);else{p.multiDrawElementsInstancedWEBGL(n,h,0,r,u,0,_,0,g);let f=0;for(let v=0;v<g;v++)f+=h[v]*_[v];t.update(f,n,1)}}this.setMode=i,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=d,this.renderMultiDrawInstances=m}function $p(s){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(r,o,a){switch(t.calls++,o){case s.TRIANGLES:t.triangles+=a*(r/3);break;case s.LINES:t.lines+=a*(r/2);break;case s.LINE_STRIP:t.lines+=a*(r-1);break;case s.LINE_LOOP:t.lines+=a*r;break;case s.POINTS:t.points+=a*r;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function Yp(s,e,t){const n=new WeakMap,i=new Xt;function r(o,a,l){const c=o.morphTargetInfluences,d=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,m=d!==void 0?d.length:0;let u=n.get(a);if(u===void 0||u.count!==m){let A=function(){R.dispose(),n.delete(a),a.removeEventListener("dispose",A)};u!==void 0&&u.texture.dispose();const h=a.morphAttributes.position!==void 0,g=a.morphAttributes.normal!==void 0,_=a.morphAttributes.color!==void 0,p=a.morphAttributes.position||[],f=a.morphAttributes.normal||[],v=a.morphAttributes.color||[];let b=0;h===!0&&(b=1),g===!0&&(b=2),_===!0&&(b=3);let S=a.attributes.position.count*b,F=1;S>e.maxTextureSize&&(F=Math.ceil(S/e.maxTextureSize),S=e.maxTextureSize);const C=new Float32Array(S*F*4*m),R=new D0(C,S,F,m);R.type=fi,R.needsUpdate=!0;const P=b*4;for(let E=0;E<m;E++){const L=p[E],B=f[E],H=v[E],Q=S*F*4*E;for(let ae=0;ae<L.count;ae++){const G=ae*P;h===!0&&(i.fromBufferAttribute(L,ae),C[Q+G+0]=i.x,C[Q+G+1]=i.y,C[Q+G+2]=i.z,C[Q+G+3]=0),g===!0&&(i.fromBufferAttribute(B,ae),C[Q+G+4]=i.x,C[Q+G+5]=i.y,C[Q+G+6]=i.z,C[Q+G+7]=0),_===!0&&(i.fromBufferAttribute(H,ae),C[Q+G+8]=i.x,C[Q+G+9]=i.y,C[Q+G+10]=i.z,C[Q+G+11]=H.itemSize===4?i.w:1)}}u={count:m,texture:R,size:new et(S,F)},n.set(a,u),a.addEventListener("dispose",A)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(s,"morphTexture",o.morphTexture,t);else{let h=0;for(let _=0;_<c.length;_++)h+=c[_];const g=a.morphTargetsRelative?1:1-h;l.getUniforms().setValue(s,"morphTargetBaseInfluence",g),l.getUniforms().setValue(s,"morphTargetInfluences",c)}l.getUniforms().setValue(s,"morphTargetsTexture",u.texture,t),l.getUniforms().setValue(s,"morphTargetsTextureSize",u.size)}return{update:r}}function Jp(s,e,t,n){let i=new WeakMap;function r(l){const c=n.render.frame,d=l.geometry,m=e.get(l,d);if(i.get(m)!==c&&(e.update(m),i.set(m,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(t.update(l.instanceMatrix,s.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,s.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){const u=l.skeleton;i.get(u)!==c&&(u.update(),i.set(u,c))}return m}function o(){i=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:r,dispose:o}}const Q0=new Tn,wh=new H0(1,1),eu=new D0,tu=new V2,nu=new I0,Th=[],Ch=[],Rh=new Float32Array(16),Dh=new Float32Array(9),Lh=new Float32Array(4);function Qs(s,e,t){const n=s[0];if(n<=0||n>0)return s;const i=e*t;let r=Th[i];if(r===void 0&&(r=new Float32Array(i),Th[i]=r),e!==0){n.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,s[o].toArray(r,a)}return r}function vn(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t<n;t++)if(s[t]!==e[t])return!1;return!0}function yn(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Ga(s,e){let t=Ch[e];t===void 0&&(t=new Int32Array(e),Ch[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function Kp(s,e){const t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function Zp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2fv(this.addr,e),yn(t,e)}}function Qp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(s.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(vn(t,e))return;s.uniform3fv(this.addr,e),yn(t,e)}}function em(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(vn(t,e))return;s.uniform4fv(this.addr,e),yn(t,e)}}function tm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Lh.set(n),s.uniformMatrix2fv(this.addr,!1,Lh),yn(t,n)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Dh.set(n),s.uniformMatrix3fv(this.addr,!1,Dh),yn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Rh.set(n),s.uniformMatrix4fv(this.addr,!1,Rh),yn(t,n)}}function sm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function rm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2iv(this.addr,e),yn(t,e)}}function am(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(vn(t,e))return;s.uniform3iv(this.addr,e),yn(t,e)}}function om(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(vn(t,e))return;s.uniform4iv(this.addr,e),yn(t,e)}}function lm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function cm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2uiv(this.addr,e),yn(t,e)}}function hm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(vn(t,e))return;s.uniform3uiv(this.addr,e),yn(t,e)}}function um(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(vn(t,e))return;s.uniform4uiv(this.addr,e),yn(t,e)}}function dm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i);let r;this.type===s.SAMPLER_2D_SHADOW?(wh.compareFunction=C0,r=wh):r=Q0,t.setTexture2D(e||r,i)}function fm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||tu,i)}function pm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||nu,i)}function mm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||eu,i)}function gm(s){switch(s){case 5126:return Kp;case 35664:return Zp;case 35665:return Qp;case 35666:return em;case 35674:return tm;case 35675:return nm;case 35676:return im;case 5124:case 35670:return sm;case 35667:case 35671:return rm;case 35668:case 35672:return am;case 35669:case 35673:return om;case 5125:return lm;case 36294:return cm;case 36295:return hm;case 36296:return um;case 35678:case 36198:case 36298:case 36306:case 35682:return dm;case 35679:case 36299:case 36307:return fm;case 35680:case 36300:case 36308:case 36293:return pm;case 36289:case 36303:case 36311:case 36292:return mm}}function _m(s,e){s.uniform1fv(this.addr,e)}function vm(s,e){const t=Qs(e,this.size,2);s.uniform2fv(this.addr,t)}function ym(s,e){const t=Qs(e,this.size,3);s.uniform3fv(this.addr,t)}function xm(s,e){const t=Qs(e,this.size,4);s.uniform4fv(this.addr,t)}function Mm(s,e){const t=Qs(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function bm(s,e){const t=Qs(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function Sm(s,e){const t=Qs(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function Em(s,e){s.uniform1iv(this.addr,e)}function Am(s,e){s.uniform2iv(this.addr,e)}function wm(s,e){s.uniform3iv(this.addr,e)}function Tm(s,e){s.uniform4iv(this.addr,e)}function Cm(s,e){s.uniform1uiv(this.addr,e)}function Rm(s,e){s.uniform2uiv(this.addr,e)}function Dm(s,e){s.uniform3uiv(this.addr,e)}function Lm(s,e){s.uniform4uiv(this.addr,e)}function Pm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture2D(e[o]||Q0,r[o])}function Fm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture3D(e[o]||tu,r[o])}function Nm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTextureCube(e[o]||nu,r[o])}function Um(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture2DArray(e[o]||eu,r[o])}function Im(s){switch(s){case 5126:return _m;case 35664:return vm;case 35665:return ym;case 35666:return xm;case 35674:return Mm;case 35675:return bm;case 35676:return Sm;case 5124:case 35670:return Em;case 35667:case 35671:return Am;case 35668:case 35672:return wm;case 35669:case 35673:return Tm;case 5125:return Cm;case 36294:return Rm;case 36295:return Dm;case 36296:return Lm;case 35678:case 36198:case 36298:case 36306:case 35682:return Pm;case 35679:case 36299:case 36307:return Fm;case 35680:case 36300:case 36308:case 36293:return Nm;case 36289:case 36303:case 36311:case 36292:return Um}}class zm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=gm(t.type)}}class Bm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=Im(t.type)}}class Om{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,o=i.length;r!==o;++r){const a=i[r];a.setValue(e,t[a.id],n)}}}const Do=/(\w+)(\])?(\[|\.)?/g;function Ph(s,e){s.seq.push(e),s.map[e.id]=e}function km(s,e,t){const n=s.name,i=n.length;for(Do.lastIndex=0;;){const r=Do.exec(n),o=Do.lastIndex;let a=r[1];const l=r[2]==="]",c=r[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){Ph(t,c===void 0?new zm(a,s,e):new Bm(a,s,e));break}else{let m=t.map[a];m===void 0&&(m=new Om(a),Ph(t,m)),t=m}}}class Ma{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const r=e.getActiveUniform(t,i),o=e.getUniformLocation(t,r.name);km(r,o,this)}}setValue(e,t,n,i){const r=this.map[t];r!==void 0&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,o=t.length;r!==o;++r){const a=t[r],l=n[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const o=e[i];o.id in t&&n.push(o)}return n}}function Fh(s,e,t){const n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}const Vm=37297;let Hm=0;function Gm(s,e){const t=s.split(`
|
|
3724
|
+
`}function Wp(s){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture){const l=a.mapping,c=l===Zo||l===Qo,d=l===Gs||l===Ws;if(c||d){let m=e.get(a);const u=m!==void 0?m.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==u)return t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a,m):t.fromCubemap(a,m),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),m.texture;if(m!==void 0)return m.texture;{const h=a.image;return c&&h&&h.height>0||d&&h&&i(h)?(t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a):t.fromCubemap(a),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),a.addEventListener("dispose",r),m.texture):null}}}return a}function i(a){let l=0;const c=6;for(let d=0;d<c;d++)a[d]!==void 0&&l++;return l===c}function r(a){const l=a.target;l.removeEventListener("dispose",r);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:o}}function Xp(s){const e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=s.getExtension("WEBGL_depth_texture")||s.getExtension("MOZ_WEBGL_depth_texture")||s.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=s.getExtension("EXT_texture_filter_anisotropic")||s.getExtension("MOZ_EXT_texture_filter_anisotropic")||s.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=s.getExtension("WEBGL_compressed_texture_s3tc")||s.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=s.getExtension("WEBGL_compressed_texture_pvrtc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=s.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const i=t(n);return i===null&&Os("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function jp(s,e,t,n){const i={},r=new WeakMap;function o(m){const u=m.target;u.index!==null&&e.remove(u.index);for(const g in u.attributes)e.remove(u.attributes[g]);u.removeEventListener("dispose",o),delete i[u.id];const h=r.get(u);h&&(e.remove(h),r.delete(u)),n.releaseStatesOfGeometry(u),u.isInstancedBufferGeometry===!0&&delete u._maxInstanceCount,t.memory.geometries--}function a(m,u){return i[u.id]===!0||(u.addEventListener("dispose",o),i[u.id]=!0,t.memory.geometries++),u}function l(m){const u=m.attributes;for(const h in u)e.update(u[h],s.ARRAY_BUFFER)}function c(m){const u=[],h=m.index,g=m.attributes.position;let _=0;if(h!==null){const x=h.array;_=h.version;for(let M=0,b=x.length;M<b;M+=3){const N=x[M+0],L=x[M+1],P=x[M+2];u.push(N,L,L,P,P,N)}}else if(g!==void 0){const x=g.array;_=g.version;for(let M=0,b=x.length/3-1;M<b;M+=3){const N=M+0,L=M+1,P=M+2;u.push(N,L,L,P,P,N)}}else return;const f=new(R0(u)?F0:P0)(u,1);f.version=_;const p=r.get(m);p&&e.remove(p),r.set(m,f)}function d(m){const u=r.get(m);if(u){const h=m.index;h!==null&&u.version<h.version&&c(m)}else c(m);return r.get(m)}return{get:a,update:l,getWireframeAttribute:d}}function qp(s,e,t){let n;function i(u){n=u}let r,o;function a(u){r=u.type,o=u.bytesPerElement}function l(u,h){s.drawElements(n,h,r,u*o),t.update(h,n,1)}function c(u,h,g){g!==0&&(s.drawElementsInstanced(n,h,r,u*o,g),t.update(h,n,g))}function d(u,h,g){if(g===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,h,0,r,u,0,g);let f=0;for(let p=0;p<g;p++)f+=h[p];t.update(f,n,1)}function m(u,h,g,_){if(g===0)return;const f=e.get("WEBGL_multi_draw");if(f===null)for(let p=0;p<u.length;p++)c(u[p]/o,h[p],_[p]);else{f.multiDrawElementsInstancedWEBGL(n,h,0,r,u,0,_,0,g);let p=0;for(let x=0;x<g;x++)p+=h[x]*_[x];t.update(p,n,1)}}this.setMode=i,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=d,this.renderMultiDrawInstances=m}function $p(s){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(r,o,a){switch(t.calls++,o){case s.TRIANGLES:t.triangles+=a*(r/3);break;case s.LINES:t.lines+=a*(r/2);break;case s.LINE_STRIP:t.lines+=a*(r-1);break;case s.LINE_LOOP:t.lines+=a*r;break;case s.POINTS:t.points+=a*r;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function Yp(s,e,t){const n=new WeakMap,i=new Ot;function r(o,a,l){const c=o.morphTargetInfluences,d=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,m=d!==void 0?d.length:0;let u=n.get(a);if(u===void 0||u.count!==m){let A=function(){P.dispose(),n.delete(a),a.removeEventListener("dispose",A)};u!==void 0&&u.texture.dispose();const h=a.morphAttributes.position!==void 0,g=a.morphAttributes.normal!==void 0,_=a.morphAttributes.color!==void 0,f=a.morphAttributes.position||[],p=a.morphAttributes.normal||[],x=a.morphAttributes.color||[];let M=0;h===!0&&(M=1),g===!0&&(M=2),_===!0&&(M=3);let b=a.attributes.position.count*M,N=1;b>e.maxTextureSize&&(N=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const L=new Float32Array(b*N*4*m),P=new D0(L,b,N,m);P.type=li,P.needsUpdate=!0;const I=M*4;for(let E=0;E<m;E++){const F=f[E],B=p[E],X=x[E],Z=b*N*4*E;for(let se=0;se<F.count;se++){const W=se*I;h===!0&&(i.fromBufferAttribute(F,se),L[Z+W+0]=i.x,L[Z+W+1]=i.y,L[Z+W+2]=i.z,L[Z+W+3]=0),g===!0&&(i.fromBufferAttribute(B,se),L[Z+W+4]=i.x,L[Z+W+5]=i.y,L[Z+W+6]=i.z,L[Z+W+7]=0),_===!0&&(i.fromBufferAttribute(X,se),L[Z+W+8]=i.x,L[Z+W+9]=i.y,L[Z+W+10]=i.z,L[Z+W+11]=X.itemSize===4?i.w:1)}}u={count:m,texture:P,size:new Je(b,N)},n.set(a,u),a.addEventListener("dispose",A)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(s,"morphTexture",o.morphTexture,t);else{let h=0;for(let _=0;_<c.length;_++)h+=c[_];const g=a.morphTargetsRelative?1:1-h;l.getUniforms().setValue(s,"morphTargetBaseInfluence",g),l.getUniforms().setValue(s,"morphTargetInfluences",c)}l.getUniforms().setValue(s,"morphTargetsTexture",u.texture,t),l.getUniforms().setValue(s,"morphTargetsTextureSize",u.size)}return{update:r}}function Kp(s,e,t,n){let i=new WeakMap;function r(l){const c=n.render.frame,d=l.geometry,m=e.get(l,d);if(i.get(m)!==c&&(e.update(m),i.set(m,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(t.update(l.instanceMatrix,s.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,s.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){const u=l.skeleton;i.get(u)!==c&&(u.update(),i.set(u,c))}return m}function o(){i=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:r,dispose:o}}const Q0=new Mn,wh=new H0(1,1),eu=new D0,tu=new V2,nu=new I0,Th=[],Ch=[],Rh=new Float32Array(16),Dh=new Float32Array(9),Lh=new Float32Array(4);function Qs(s,e,t){const n=s[0];if(n<=0||n>0)return s;const i=e*t;let r=Th[i];if(r===void 0&&(r=new Float32Array(i),Th[i]=r),e!==0){n.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,s[o].toArray(r,a)}return r}function fn(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t<n;t++)if(s[t]!==e[t])return!1;return!0}function pn(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Ga(s,e){let t=Ch[e];t===void 0&&(t=new Int32Array(e),Ch[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function Jp(s,e){const t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function Zp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(fn(t,e))return;s.uniform2fv(this.addr,e),pn(t,e)}}function Qp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(s.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(fn(t,e))return;s.uniform3fv(this.addr,e),pn(t,e)}}function em(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(fn(t,e))return;s.uniform4fv(this.addr,e),pn(t,e)}}function tm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(fn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),pn(t,e)}else{if(fn(t,n))return;Lh.set(n),s.uniformMatrix2fv(this.addr,!1,Lh),pn(t,n)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(fn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),pn(t,e)}else{if(fn(t,n))return;Dh.set(n),s.uniformMatrix3fv(this.addr,!1,Dh),pn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(fn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),pn(t,e)}else{if(fn(t,n))return;Rh.set(n),s.uniformMatrix4fv(this.addr,!1,Rh),pn(t,n)}}function sm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function rm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(fn(t,e))return;s.uniform2iv(this.addr,e),pn(t,e)}}function am(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(fn(t,e))return;s.uniform3iv(this.addr,e),pn(t,e)}}function om(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(fn(t,e))return;s.uniform4iv(this.addr,e),pn(t,e)}}function lm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function cm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(fn(t,e))return;s.uniform2uiv(this.addr,e),pn(t,e)}}function hm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(fn(t,e))return;s.uniform3uiv(this.addr,e),pn(t,e)}}function um(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(fn(t,e))return;s.uniform4uiv(this.addr,e),pn(t,e)}}function dm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i);let r;this.type===s.SAMPLER_2D_SHADOW?(wh.compareFunction=C0,r=wh):r=Q0,t.setTexture2D(e||r,i)}function fm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||tu,i)}function pm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||nu,i)}function mm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||eu,i)}function gm(s){switch(s){case 5126:return Jp;case 35664:return Zp;case 35665:return Qp;case 35666:return em;case 35674:return tm;case 35675:return nm;case 35676:return im;case 5124:case 35670:return sm;case 35667:case 35671:return rm;case 35668:case 35672:return am;case 35669:case 35673:return om;case 5125:return lm;case 36294:return cm;case 36295:return hm;case 36296:return um;case 35678:case 36198:case 36298:case 36306:case 35682:return dm;case 35679:case 36299:case 36307:return fm;case 35680:case 36300:case 36308:case 36293:return pm;case 36289:case 36303:case 36311:case 36292:return mm}}function _m(s,e){s.uniform1fv(this.addr,e)}function vm(s,e){const t=Qs(e,this.size,2);s.uniform2fv(this.addr,t)}function ym(s,e){const t=Qs(e,this.size,3);s.uniform3fv(this.addr,t)}function xm(s,e){const t=Qs(e,this.size,4);s.uniform4fv(this.addr,t)}function Mm(s,e){const t=Qs(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function bm(s,e){const t=Qs(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function Sm(s,e){const t=Qs(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function Em(s,e){s.uniform1iv(this.addr,e)}function Am(s,e){s.uniform2iv(this.addr,e)}function wm(s,e){s.uniform3iv(this.addr,e)}function Tm(s,e){s.uniform4iv(this.addr,e)}function Cm(s,e){s.uniform1uiv(this.addr,e)}function Rm(s,e){s.uniform2uiv(this.addr,e)}function Dm(s,e){s.uniform3uiv(this.addr,e)}function Lm(s,e){s.uniform4uiv(this.addr,e)}function Pm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);fn(n,r)||(s.uniform1iv(this.addr,r),pn(n,r));for(let o=0;o!==i;++o)t.setTexture2D(e[o]||Q0,r[o])}function Fm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);fn(n,r)||(s.uniform1iv(this.addr,r),pn(n,r));for(let o=0;o!==i;++o)t.setTexture3D(e[o]||tu,r[o])}function Nm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);fn(n,r)||(s.uniform1iv(this.addr,r),pn(n,r));for(let o=0;o!==i;++o)t.setTextureCube(e[o]||nu,r[o])}function Um(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);fn(n,r)||(s.uniform1iv(this.addr,r),pn(n,r));for(let o=0;o!==i;++o)t.setTexture2DArray(e[o]||eu,r[o])}function Im(s){switch(s){case 5126:return _m;case 35664:return vm;case 35665:return ym;case 35666:return xm;case 35674:return Mm;case 35675:return bm;case 35676:return Sm;case 5124:case 35670:return Em;case 35667:case 35671:return Am;case 35668:case 35672:return wm;case 35669:case 35673:return Tm;case 5125:return Cm;case 36294:return Rm;case 36295:return Dm;case 36296:return Lm;case 35678:case 36198:case 36298:case 36306:case 35682:return Pm;case 35679:case 36299:case 36307:return Fm;case 35680:case 36300:case 36308:case 36293:return Nm;case 36289:case 36303:case 36311:case 36292:return Um}}class zm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=gm(t.type)}}class Bm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=Im(t.type)}}class Om{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,o=i.length;r!==o;++r){const a=i[r];a.setValue(e,t[a.id],n)}}}const Do=/(\w+)(\])?(\[|\.)?/g;function Ph(s,e){s.seq.push(e),s.map[e.id]=e}function km(s,e,t){const n=s.name,i=n.length;for(Do.lastIndex=0;;){const r=Do.exec(n),o=Do.lastIndex;let a=r[1];const l=r[2]==="]",c=r[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){Ph(t,c===void 0?new zm(a,s,e):new Bm(a,s,e));break}else{let m=t.map[a];m===void 0&&(m=new Om(a),Ph(t,m)),t=m}}}class Ma{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const r=e.getActiveUniform(t,i),o=e.getUniformLocation(t,r.name);km(r,o,this)}}setValue(e,t,n,i){const r=this.map[t];r!==void 0&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,o=t.length;r!==o;++r){const a=t[r],l=n[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const o=e[i];o.id in t&&n.push(o)}return n}}function Fh(s,e,t){const n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}const Vm=37297;let Hm=0;function Gm(s,e){const t=s.split(`
|
|
3725
3725
|
`),n=[],i=Math.max(e-6,0),r=Math.min(e+6,t.length);for(let o=i;o<r;o++){const a=o+1;n.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return n.join(`
|
|
3726
|
-
`)}const Nh=new
|
|
3726
|
+
`)}const Nh=new Ut;function Wm(s){Bt._getMatrix(Nh,Bt.workingColorSpace,s);const e=`mat3( ${Nh.elements.map(t=>t.toFixed(4))} )`;switch(Bt.getTransfer(s)){case Aa:return[e,"LinearTransferOETF"];case tn:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",s),[e,"LinearTransferOETF"]}}function Uh(s,e,t){const n=s.getShaderParameter(e,s.COMPILE_STATUS),i=s.getShaderInfoLog(e).trim();if(n&&i==="")return"";const r=/ERROR: 0:(\d+)/.exec(i);if(r){const o=parseInt(r[1]);return t.toUpperCase()+`
|
|
3727
3727
|
|
|
3728
3728
|
`+i+`
|
|
3729
3729
|
|
|
3730
3730
|
`+Gm(s.getShaderSource(e),o)}else return i}function Xm(s,e){const t=Wm(e);return[`vec4 ${s}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(`
|
|
3731
|
-
`)}function jm(s,e){let t;switch(e){case
|
|
3731
|
+
`)}function jm(s,e){let t;switch(e){case Ju:t="Linear";break;case Zu:t="Reinhard";break;case Qu:t="Cineon";break;case Gl:t="ACESFilmic";break;case t2:t="AgX";break;case n2:t="Neutral";break;case e2:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+s+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const sa=new z;function qm(){Bt.getLuminanceCoefficients(sa);const s=sa.x.toFixed(4),e=sa.y.toFixed(4),t=sa.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${s}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(`
|
|
3732
3732
|
`)}function $m(s){return[s.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",s.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(ur).join(`
|
|
3733
3733
|
`)}function Ym(s){const e=[];for(const t in s){const n=s[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(`
|
|
3734
|
-
`)}function
|
|
3734
|
+
`)}function Km(s,e){const t={},n=s.getProgramParameter(e,s.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const r=s.getActiveAttrib(e,i),o=r.name;let a=1;r.type===s.FLOAT_MAT2&&(a=2),r.type===s.FLOAT_MAT3&&(a=3),r.type===s.FLOAT_MAT4&&(a=4),t[o]={type:r.type,location:s.getAttribLocation(e,o),locationSize:a}}return t}function ur(s){return s!==""}function Ih(s,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return s.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function zh(s,e){return s.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Jm=/^[ \t]*#include +<([\w\d./]+)>/gm;function Fl(s){return s.replace(Jm,Qm)}const Zm=new Map;function Qm(s,e){let t=zt[e];if(t===void 0){const n=Zm.get(e);if(n!==void 0)t=zt[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return Fl(t)}const e3=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Bh(s){return s.replace(e3,t3)}function t3(s,e,t,n){let i="";for(let r=parseInt(e);r<parseInt(t);r++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+r+" ]").replace(/UNROLLED_LOOP_INDEX/g,r);return i}function Oh(s){let e=`precision ${s.precision} float;
|
|
3735
3735
|
precision ${s.precision} int;
|
|
3736
3736
|
precision ${s.precision} sampler2D;
|
|
3737
3737
|
precision ${s.precision} samplerCube;
|
|
@@ -3751,28 +3751,28 @@ void main() {
|
|
|
3751
3751
|
`;return s.precision==="highp"?e+=`
|
|
3752
3752
|
#define HIGH_PRECISION`:s.precision==="mediump"?e+=`
|
|
3753
3753
|
#define MEDIUM_PRECISION`:s.precision==="lowp"&&(e+=`
|
|
3754
|
-
#define LOW_PRECISION`),e}function n3(s){let e="SHADOWMAP_TYPE_BASIC";return s.shadowMapType===v0?e="SHADOWMAP_TYPE_PCF":s.shadowMapType===Hl?e="SHADOWMAP_TYPE_PCF_SOFT":s.shadowMapType===
|
|
3755
|
-
`:"";t.isRawShaderMaterial?(
|
|
3756
|
-
`),p.length>0&&(p+=`
|
|
3757
|
-
`),f=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(ur).join(`
|
|
3754
|
+
#define LOW_PRECISION`),e}function n3(s){let e="SHADOWMAP_TYPE_BASIC";return s.shadowMapType===v0?e="SHADOWMAP_TYPE_PCF":s.shadowMapType===Hl?e="SHADOWMAP_TYPE_PCF_SOFT":s.shadowMapType===yi&&(e="SHADOWMAP_TYPE_VSM"),e}function i3(s){let e="ENVMAP_TYPE_CUBE";if(s.envMap)switch(s.envMapMode){case Gs:case Ws:e="ENVMAP_TYPE_CUBE";break;case Na:e="ENVMAP_TYPE_CUBE_UV";break}return e}function s3(s){let e="ENVMAP_MODE_REFLECTION";if(s.envMap)switch(s.envMapMode){case Ws:e="ENVMAP_MODE_REFRACTION";break}return e}function r3(s){let e="ENVMAP_BLENDING_NONE";if(s.envMap)switch(s.combine){case Fa:e="ENVMAP_BLENDING_MULTIPLY";break;case Yu:e="ENVMAP_BLENDING_MIX";break;case Ku:e="ENVMAP_BLENDING_ADD";break}return e}function a3(s){const e=s.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:n,maxMip:t}}function o3(s,e,t,n){const i=s.getContext(),r=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=n3(t),c=i3(t),d=s3(t),m=r3(t),u=a3(t),h=$m(t),g=Ym(r),_=i.createProgram();let f,p,x=t.glslVersion?"#version "+t.glslVersion+`
|
|
3755
|
+
`:"";t.isRawShaderMaterial?(f=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(ur).join(`
|
|
3758
3756
|
`),f.length>0&&(f+=`
|
|
3759
|
-
`)
|
|
3757
|
+
`),p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(ur).join(`
|
|
3758
|
+
`),p.length>0&&(p+=`
|
|
3759
|
+
`)):(f=[Oh(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
|
|
3760
3760
|
`].filter(ur).join(`
|
|
3761
|
-
`),
|
|
3761
|
+
`),p=[Oh(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+d:"",t.envMap?"#define "+m:"",u?"#define CUBEUV_TEXEL_WIDTH "+u.texelWidth:"",u?"#define CUBEUV_TEXEL_HEIGHT "+u.texelHeight:"",u?"#define CUBEUV_MAX_MIP "+u.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Vi?"#define TONE_MAPPING":"",t.toneMapping!==Vi?zt.tonemapping_pars_fragment:"",t.toneMapping!==Vi?jm("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",zt.colorspace_pars_fragment,Xm("linearToOutputTexel",t.outputColorSpace),qm(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
|
|
3762
3762
|
`].filter(ur).join(`
|
|
3763
|
-
`)),o=Fl(o),o=Ih(o,t),o=zh(o,t),a=Fl(a),a=Ih(a,t),a=zh(a,t),o=Bh(o),a=Bh(a),t.isRawShaderMaterial!==!0&&(
|
|
3764
|
-
`,
|
|
3763
|
+
`)),o=Fl(o),o=Ih(o,t),o=zh(o,t),a=Fl(a),a=Ih(a,t),a=zh(a,t),o=Bh(o),a=Bh(a),t.isRawShaderMaterial!==!0&&(x=`#version 300 es
|
|
3764
|
+
`,f=[h,"#define attribute in","#define varying out","#define texture2D texture"].join(`
|
|
3765
3765
|
`)+`
|
|
3766
|
-
`+p
|
|
3766
|
+
`+f,p=["#define varying in",t.glslVersion===Tc?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Tc?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
|
|
3767
3767
|
`)+`
|
|
3768
|
-
`+
|
|
3768
|
+
`+p);const M=x+f+o,b=x+p+a,N=Fh(i,i.VERTEX_SHADER,M),L=Fh(i,i.FRAGMENT_SHADER,b);i.attachShader(_,N),i.attachShader(_,L),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function P(F){if(s.debug.checkShaderErrors){const B=i.getProgramInfoLog(_).trim(),X=i.getShaderInfoLog(N).trim(),Z=i.getShaderInfoLog(L).trim();let se=!0,W=!0;if(i.getProgramParameter(_,i.LINK_STATUS)===!1)if(se=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(i,_,N,L);else{const he=Uh(i,N,"vertex"),Q=Uh(i,L,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(_,i.VALIDATE_STATUS)+`
|
|
3769
3769
|
|
|
3770
|
-
Material Name: `+
|
|
3771
|
-
Material Type: `+
|
|
3770
|
+
Material Name: `+F.name+`
|
|
3771
|
+
Material Type: `+F.type+`
|
|
3772
3772
|
|
|
3773
3773
|
Program Info Log: `+B+`
|
|
3774
|
-
`+
|
|
3775
|
-
`+Z)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(H===""||Q==="")&&(G=!1);G&&(L.diagnostics={runnable:ae,programLog:B,vertexShader:{log:H,prefix:p},fragmentShader:{log:Q,prefix:f}})}i.deleteShader(F),i.deleteShader(C),P=new Ma(i,_),A=Jm(i,_)}let P;this.getUniforms=function(){return P===void 0&&R(this),P};let A;this.getAttributes=function(){return A===void 0&&R(this),A};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(_,Vm)),E},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Hm++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=F,this.fragmentShader=C,this}let l3=0;class c3{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new h3(e),t.set(e,n)),n}}class h3{constructor(e){this.id=l3++,this.code=e,this.usedTimes=0}}function u3(s,e,t,n,i,r,o){const a=new Zl,l=new c3,c=new Set,d=[],m=i.logarithmicDepthBuffer,u=i.vertexTextures;let h=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(A){return c.add(A),A===0?"uv":`uv${A}`}function p(A,E,L,B,H){const Q=B.fog,ae=H.geometry,G=A.isMeshStandardMaterial?B.environment:null,le=(A.isMeshStandardMaterial?t:e).get(A.envMap||G),Z=le&&le.mapping===Na?le.image.height:null,ve=g[A.type];A.precision!==null&&(h=i.getMaxPrecision(A.precision),h!==A.precision&&console.warn("THREE.WebGLProgram.getParameters:",A.precision,"not supported, using",h,"instead."));const Ee=ae.morphAttributes.position||ae.morphAttributes.normal||ae.morphAttributes.color,be=Ee!==void 0?Ee.length:0;let ge=0;ae.morphAttributes.position!==void 0&&(ge=1),ae.morphAttributes.normal!==void 0&&(ge=2),ae.morphAttributes.color!==void 0&&(ge=3);let se,j,q,ne;if(ve){const Ut=kn[ve];se=Ut.vertexShader,j=Ut.fragmentShader}else se=A.vertexShader,j=A.fragmentShader,l.update(A),q=l.getVertexShaderID(A),ne=l.getFragmentShaderID(A);const ee=s.getRenderTarget(),ue=s.state.buffers.depth.getReversed(),$=H.isInstancedMesh===!0,pe=H.isBatchedMesh===!0,Ce=!!A.map,Ke=!!A.matcap,He=!!le,O=!!A.aoMap,_t=!!A.lightMap,dt=!!A.bumpMap,at=!!A.normalMap,Fe=!!A.displacementMap,tt=!!A.emissiveMap,Le=!!A.metalnessMap,ot=!!A.roughnessMap,jt=A.anisotropy>0,k=A.clearcoat>0,T=A.dispersion>0,oe=A.iridescence>0,Se=A.sheen>0,De=A.transmission>0,ye=jt&&!!A.anisotropyMap,vt=k&&!!A.clearcoatMap,Ze=k&&!!A.clearcoatNormalMap,mt=k&&!!A.clearcoatRoughnessMap,yt=oe&&!!A.iridescenceMap,Ue=oe&&!!A.iridescenceThicknessMap,st=Se&&!!A.sheenColorMap,Rt=Se&&!!A.sheenRoughnessMap,At=!!A.specularMap,Ye=!!A.specularColorMap,Lt=!!A.specularIntensityMap,K=De&&!!A.transmissionMap,$e=De&&!!A.thicknessMap,Ie=!!A.gradientMap,ut=!!A.alphaMap,ze=A.alphaTest>0,we=!!A.alphaHash,pt=!!A.extensions;let Ft=Xi;A.toneMapped&&(ee===null||ee.isXRRenderTarget===!0)&&(Ft=s.toneMapping);const Qt={shaderID:ve,shaderType:A.type,shaderName:A.name,vertexShader:se,fragmentShader:j,defines:A.defines,customVertexShaderID:q,customFragmentShaderID:ne,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:h,batching:pe,batchingColor:pe&&H._colorsTexture!==null,instancing:$,instancingColor:$&&H.instanceColor!==null,instancingMorph:$&&H.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ee===null?s.outputColorSpace:ee.isXRRenderTarget===!0?ee.texture.colorSpace:Xs,alphaToCoverage:!!A.alphaToCoverage,map:Ce,matcap:Ke,envMap:He,envMapMode:He&&le.mapping,envMapCubeUVHeight:Z,aoMap:O,lightMap:_t,bumpMap:dt,normalMap:at,displacementMap:u&&Fe,emissiveMap:tt,normalMapObjectSpace:at&&A.normalMapType===l2,normalMapTangentSpace:at&&A.normalMapType===Ua,metalnessMap:Le,roughnessMap:ot,anisotropy:jt,anisotropyMap:ye,clearcoat:k,clearcoatMap:vt,clearcoatNormalMap:Ze,clearcoatRoughnessMap:mt,dispersion:T,iridescence:oe,iridescenceMap:yt,iridescenceThicknessMap:Ue,sheen:Se,sheenColorMap:st,sheenRoughnessMap:Rt,specularMap:At,specularColorMap:Ye,specularIntensityMap:Lt,transmission:De,transmissionMap:K,thicknessMap:$e,gradientMap:Ie,opaque:A.transparent===!1&&A.blending===Bs&&A.alphaToCoverage===!1,alphaMap:ut,alphaTest:ze,alphaHash:we,combine:A.combine,mapUv:Ce&&_(A.map.channel),aoMapUv:O&&_(A.aoMap.channel),lightMapUv:_t&&_(A.lightMap.channel),bumpMapUv:dt&&_(A.bumpMap.channel),normalMapUv:at&&_(A.normalMap.channel),displacementMapUv:Fe&&_(A.displacementMap.channel),emissiveMapUv:tt&&_(A.emissiveMap.channel),metalnessMapUv:Le&&_(A.metalnessMap.channel),roughnessMapUv:ot&&_(A.roughnessMap.channel),anisotropyMapUv:ye&&_(A.anisotropyMap.channel),clearcoatMapUv:vt&&_(A.clearcoatMap.channel),clearcoatNormalMapUv:Ze&&_(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:mt&&_(A.clearcoatRoughnessMap.channel),iridescenceMapUv:yt&&_(A.iridescenceMap.channel),iridescenceThicknessMapUv:Ue&&_(A.iridescenceThicknessMap.channel),sheenColorMapUv:st&&_(A.sheenColorMap.channel),sheenRoughnessMapUv:Rt&&_(A.sheenRoughnessMap.channel),specularMapUv:At&&_(A.specularMap.channel),specularColorMapUv:Ye&&_(A.specularColorMap.channel),specularIntensityMapUv:Lt&&_(A.specularIntensityMap.channel),transmissionMapUv:K&&_(A.transmissionMap.channel),thicknessMapUv:$e&&_(A.thicknessMap.channel),alphaMapUv:ut&&_(A.alphaMap.channel),vertexTangents:!!ae.attributes.tangent&&(at||jt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!ae.attributes.color&&ae.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!ae.attributes.uv&&(Ce||ut),fog:!!Q,useFog:A.fog===!0,fogExp2:!!Q&&Q.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:ue,skinning:H.isSkinnedMesh===!0,morphTargets:ae.morphAttributes.position!==void 0,morphNormals:ae.morphAttributes.normal!==void 0,morphColors:ae.morphAttributes.color!==void 0,morphTargetsCount:be,morphTextureStride:ge,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:A.dithering,shadowMapEnabled:s.shadowMap.enabled&&L.length>0,shadowMapType:s.shadowMap.type,toneMapping:Ft,decodeVideoTexture:Ce&&A.map.isVideoTexture===!0&&Gt.getTransfer(A.map.colorSpace)===an,decodeVideoTextureEmissive:tt&&A.emissiveMap.isVideoTexture===!0&&Gt.getTransfer(A.emissiveMap.colorSpace)===an,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===pn,flipSided:A.side===In,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionClipCullDistance:pt&&A.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(pt&&A.extensions.multiDraw===!0||pe)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return Qt.vertexUv1s=c.has(1),Qt.vertexUv2s=c.has(2),Qt.vertexUv3s=c.has(3),c.clear(),Qt}function f(A){const E=[];if(A.shaderID?E.push(A.shaderID):(E.push(A.customVertexShaderID),E.push(A.customFragmentShaderID)),A.defines!==void 0)for(const L in A.defines)E.push(L),E.push(A.defines[L]);return A.isRawShaderMaterial===!1&&(v(E,A),b(E,A),E.push(s.outputColorSpace)),E.push(A.customProgramCacheKey),E.join()}function v(A,E){A.push(E.precision),A.push(E.outputColorSpace),A.push(E.envMapMode),A.push(E.envMapCubeUVHeight),A.push(E.mapUv),A.push(E.alphaMapUv),A.push(E.lightMapUv),A.push(E.aoMapUv),A.push(E.bumpMapUv),A.push(E.normalMapUv),A.push(E.displacementMapUv),A.push(E.emissiveMapUv),A.push(E.metalnessMapUv),A.push(E.roughnessMapUv),A.push(E.anisotropyMapUv),A.push(E.clearcoatMapUv),A.push(E.clearcoatNormalMapUv),A.push(E.clearcoatRoughnessMapUv),A.push(E.iridescenceMapUv),A.push(E.iridescenceThicknessMapUv),A.push(E.sheenColorMapUv),A.push(E.sheenRoughnessMapUv),A.push(E.specularMapUv),A.push(E.specularColorMapUv),A.push(E.specularIntensityMapUv),A.push(E.transmissionMapUv),A.push(E.thicknessMapUv),A.push(E.combine),A.push(E.fogExp2),A.push(E.sizeAttenuation),A.push(E.morphTargetsCount),A.push(E.morphAttributeCount),A.push(E.numDirLights),A.push(E.numPointLights),A.push(E.numSpotLights),A.push(E.numSpotLightMaps),A.push(E.numHemiLights),A.push(E.numRectAreaLights),A.push(E.numDirLightShadows),A.push(E.numPointLightShadows),A.push(E.numSpotLightShadows),A.push(E.numSpotLightShadowsWithMaps),A.push(E.numLightProbes),A.push(E.shadowMapType),A.push(E.toneMapping),A.push(E.numClippingPlanes),A.push(E.numClipIntersection),A.push(E.depthPacking)}function b(A,E){a.disableAll(),E.supportsVertexTextures&&a.enable(0),E.instancing&&a.enable(1),E.instancingColor&&a.enable(2),E.instancingMorph&&a.enable(3),E.matcap&&a.enable(4),E.envMap&&a.enable(5),E.normalMapObjectSpace&&a.enable(6),E.normalMapTangentSpace&&a.enable(7),E.clearcoat&&a.enable(8),E.iridescence&&a.enable(9),E.alphaTest&&a.enable(10),E.vertexColors&&a.enable(11),E.vertexAlphas&&a.enable(12),E.vertexUv1s&&a.enable(13),E.vertexUv2s&&a.enable(14),E.vertexUv3s&&a.enable(15),E.vertexTangents&&a.enable(16),E.anisotropy&&a.enable(17),E.alphaHash&&a.enable(18),E.batching&&a.enable(19),E.dispersion&&a.enable(20),E.batchingColor&&a.enable(21),A.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reverseDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),A.push(a.mask)}function S(A){const E=g[A.type];let L;if(E){const B=kn[E];L=Ql.clone(B.uniforms)}else L=A.uniforms;return L}function F(A,E){let L;for(let B=0,H=d.length;B<H;B++){const Q=d[B];if(Q.cacheKey===E){L=Q,++L.usedTimes;break}}return L===void 0&&(L=new o3(s,E,A,r),d.push(L)),L}function C(A){if(--A.usedTimes===0){const E=d.indexOf(A);d[E]=d[d.length-1],d.pop(),A.destroy()}}function R(A){l.remove(A)}function P(){l.dispose()}return{getParameters:p,getProgramCacheKey:f,getUniforms:S,acquireProgram:F,releaseProgram:C,releaseShaderCache:R,programs:d,dispose:P}}function d3(){let s=new WeakMap;function e(o){return s.has(o)}function t(o){let a=s.get(o);return a===void 0&&(a={},s.set(o,a)),a}function n(o){s.delete(o)}function i(o,a,l){s.get(o)[a]=l}function r(){s=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:r}}function f3(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.z!==e.z?s.z-e.z:s.id-e.id}function kh(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function Vh(){const s=[];let e=0;const t=[],n=[],i=[];function r(){e=0,t.length=0,n.length=0,i.length=0}function o(m,u,h,g,_,p){let f=s[e];return f===void 0?(f={id:m.id,object:m,geometry:u,material:h,groupOrder:g,renderOrder:m.renderOrder,z:_,group:p},s[e]=f):(f.id=m.id,f.object=m,f.geometry=u,f.material=h,f.groupOrder=g,f.renderOrder=m.renderOrder,f.z=_,f.group=p),e++,f}function a(m,u,h,g,_,p){const f=o(m,u,h,g,_,p);h.transmission>0?n.push(f):h.transparent===!0?i.push(f):t.push(f)}function l(m,u,h,g,_,p){const f=o(m,u,h,g,_,p);h.transmission>0?n.unshift(f):h.transparent===!0?i.unshift(f):t.unshift(f)}function c(m,u){t.length>1&&t.sort(m||f3),n.length>1&&n.sort(u||kh),i.length>1&&i.sort(u||kh)}function d(){for(let m=e,u=s.length;m<u;m++){const h=s[m];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:t,transmissive:n,transparent:i,init:r,push:a,unshift:l,finish:d,sort:c}}function p3(){let s=new WeakMap;function e(n,i){const r=s.get(n);let o;return r===void 0?(o=new Vh,s.set(n,[o])):i>=r.length?(o=new Vh,r.push(o)):o=r[i],o}function t(){s=new WeakMap}return{get:e,dispose:t}}function m3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new I,color:new Tt};break;case"SpotLight":t={position:new I,direction:new I,color:new Tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new I,color:new Tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new I,skyColor:new Tt,groundColor:new Tt};break;case"RectAreaLight":t={color:new Tt,position:new I,halfWidth:new I,halfHeight:new I};break}return s[e.id]=t,t}}}function g3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let _3=0;function v3(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function y3(s){const e=new m3,t=g3(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new I);const i=new I,r=new Et,o=new Et;function a(c){let d=0,m=0,u=0;for(let A=0;A<9;A++)n.probe[A].set(0,0,0);let h=0,g=0,_=0,p=0,f=0,v=0,b=0,S=0,F=0,C=0,R=0;c.sort(v3);for(let A=0,E=c.length;A<E;A++){const L=c[A],B=L.color,H=L.intensity,Q=L.distance,ae=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)d+=B.r*H,m+=B.g*H,u+=B.b*H;else if(L.isLightProbe){for(let G=0;G<9;G++)n.probe[G].addScaledVector(L.sh.coefficients[G],H);R++}else if(L.isDirectionalLight){const G=e.get(L);if(G.color.copy(L.color).multiplyScalar(L.intensity),L.castShadow){const le=L.shadow,Z=t.get(L);Z.shadowIntensity=le.intensity,Z.shadowBias=le.bias,Z.shadowNormalBias=le.normalBias,Z.shadowRadius=le.radius,Z.shadowMapSize=le.mapSize,n.directionalShadow[h]=Z,n.directionalShadowMap[h]=ae,n.directionalShadowMatrix[h]=L.shadow.matrix,v++}n.directional[h]=G,h++}else if(L.isSpotLight){const G=e.get(L);G.position.setFromMatrixPosition(L.matrixWorld),G.color.copy(B).multiplyScalar(H),G.distance=Q,G.coneCos=Math.cos(L.angle),G.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),G.decay=L.decay,n.spot[_]=G;const le=L.shadow;if(L.map&&(n.spotLightMap[F]=L.map,F++,le.updateMatrices(L),L.castShadow&&C++),n.spotLightMatrix[_]=le.matrix,L.castShadow){const Z=t.get(L);Z.shadowIntensity=le.intensity,Z.shadowBias=le.bias,Z.shadowNormalBias=le.normalBias,Z.shadowRadius=le.radius,Z.shadowMapSize=le.mapSize,n.spotShadow[_]=Z,n.spotShadowMap[_]=ae,S++}_++}else if(L.isRectAreaLight){const G=e.get(L);G.color.copy(B).multiplyScalar(H),G.halfWidth.set(L.width*.5,0,0),G.halfHeight.set(0,L.height*.5,0),n.rectArea[p]=G,p++}else if(L.isPointLight){const G=e.get(L);if(G.color.copy(L.color).multiplyScalar(L.intensity),G.distance=L.distance,G.decay=L.decay,L.castShadow){const le=L.shadow,Z=t.get(L);Z.shadowIntensity=le.intensity,Z.shadowBias=le.bias,Z.shadowNormalBias=le.normalBias,Z.shadowRadius=le.radius,Z.shadowMapSize=le.mapSize,Z.shadowCameraNear=le.camera.near,Z.shadowCameraFar=le.camera.far,n.pointShadow[g]=Z,n.pointShadowMap[g]=ae,n.pointShadowMatrix[g]=L.shadow.matrix,b++}n.point[g]=G,g++}else if(L.isHemisphereLight){const G=e.get(L);G.skyColor.copy(L.color).multiplyScalar(H),G.groundColor.copy(L.groundColor).multiplyScalar(H),n.hemi[f]=G,f++}}p>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=m,n.ambient[2]=u;const P=n.hash;(P.directionalLength!==h||P.pointLength!==g||P.spotLength!==_||P.rectAreaLength!==p||P.hemiLength!==f||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==S||P.numSpotMaps!==F||P.numLightProbes!==R)&&(n.directional.length=h,n.spot.length=_,n.rectArea.length=p,n.point.length=g,n.hemi.length=f,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=b,n.pointShadowMap.length=b,n.spotShadow.length=S,n.spotShadowMap.length=S,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=b,n.spotLightMatrix.length=S+F-C,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=C,n.numLightProbes=R,P.directionalLength=h,P.pointLength=g,P.spotLength=_,P.rectAreaLength=p,P.hemiLength=f,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=S,P.numSpotMaps=F,P.numLightProbes=R,n.version=_3++)}function l(c,d){let m=0,u=0,h=0,g=0,_=0;const p=d.matrixWorldInverse;for(let f=0,v=c.length;f<v;f++){const b=c[f];if(b.isDirectionalLight){const S=n.directional[m];S.direction.setFromMatrixPosition(b.matrixWorld),i.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),m++}else if(b.isSpotLight){const S=n.spot[h];S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(p),S.direction.setFromMatrixPosition(b.matrixWorld),i.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),h++}else if(b.isRectAreaLight){const S=n.rectArea[g];S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(p),o.identity(),r.copy(b.matrixWorld),r.premultiply(p),o.extractRotation(r),S.halfWidth.set(b.width*.5,0,0),S.halfHeight.set(0,b.height*.5,0),S.halfWidth.applyMatrix4(o),S.halfHeight.applyMatrix4(o),g++}else if(b.isPointLight){const S=n.point[u];S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(p),u++}else if(b.isHemisphereLight){const S=n.hemi[_];S.direction.setFromMatrixPosition(b.matrixWorld),S.direction.transformDirection(p),_++}}}return{setup:a,setupView:l,state:n}}function Hh(s){const e=new y3(s),t=[],n=[];function i(d){c.camera=d,t.length=0,n.length=0}function r(d){t.push(d)}function o(d){n.push(d)}function a(){e.setup(t)}function l(d){e.setupView(t,d)}const c={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:l,pushLight:r,pushShadow:o}}function x3(s){let e=new WeakMap;function t(i,r=0){const o=e.get(i);let a;return o===void 0?(a=new Hh(s),e.set(i,[a])):r>=o.length?(a=new Hh(s),o.push(a)):a=o[r],a}function n(){e=new WeakMap}return{get:t,dispose:n}}const M3=`void main() {
|
|
3774
|
+
`+he+`
|
|
3775
|
+
`+Q)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(X===""||Z==="")&&(W=!1);W&&(F.diagnostics={runnable:se,programLog:B,vertexShader:{log:X,prefix:f},fragmentShader:{log:Z,prefix:p}})}i.deleteShader(N),i.deleteShader(L),I=new Ma(i,_),A=Km(i,_)}let I;this.getUniforms=function(){return I===void 0&&P(this),I};let A;this.getAttributes=function(){return A===void 0&&P(this),A};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(_,Vm)),E},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Hm++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=N,this.fragmentShader=L,this}let l3=0;class c3{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new h3(e),t.set(e,n)),n}}class h3{constructor(e){this.id=l3++,this.code=e,this.usedTimes=0}}function u3(s,e,t,n,i,r,o){const a=new Zl,l=new c3,c=new Set,d=[],m=i.logarithmicDepthBuffer,u=i.vertexTextures;let h=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(A){return c.add(A),A===0?"uv":`uv${A}`}function f(A,E,F,B,X){const Z=B.fog,se=X.geometry,W=A.isMeshStandardMaterial?B.environment:null,he=(A.isMeshStandardMaterial?t:e).get(A.envMap||W),Q=he&&he.mapping===Na?he.image.height:null,xe=g[A.type];A.precision!==null&&(h=i.getMaxPrecision(A.precision),h!==A.precision&&console.warn("THREE.WebGLProgram.getParameters:",A.precision,"not supported, using",h,"instead."));const De=se.morphAttributes.position||se.morphAttributes.normal||se.morphAttributes.color,Ae=De!==void 0?De.length:0;let pe=0;se.morphAttributes.position!==void 0&&(pe=1),se.morphAttributes.normal!==void 0&&(pe=2),se.morphAttributes.color!==void 0&&(pe=3);let re,q,K,te;if(xe){const Rt=Nn[xe];re=Rt.vertexShader,q=Rt.fragmentShader}else re=A.vertexShader,q=A.fragmentShader,l.update(A),K=l.getVertexShaderID(A),te=l.getFragmentShaderID(A);const ee=s.getRenderTarget(),fe=s.state.buffers.depth.getReversed(),Y=X.isInstancedMesh===!0,me=X.isBatchedMesh===!0,Te=!!A.map,et=!!A.matcap,We=!!he,O=!!A.aoMap,dt=!!A.lightMap,st=!!A.bumpMap,it=!!A.normalMap,Ie=!!A.displacementMap,Ze=!!A.emissiveMap,Le=!!A.metalnessMap,rt=!!A.roughnessMap,Xt=A.anisotropy>0,k=A.clearcoat>0,R=A.dispersion>0,oe=A.iridescence>0,we=A.sheen>0,Pe=A.transmission>0,be=Xt&&!!A.anisotropyMap,_t=k&&!!A.clearcoatMap,Ke=k&&!!A.clearcoatNormalMap,ft=k&&!!A.clearcoatRoughnessMap,vt=oe&&!!A.iridescenceMap,Fe=oe&&!!A.iridescenceThicknessMap,at=we&&!!A.sheenColorMap,Et=we&&!!A.sheenRoughnessMap,St=!!A.specularMap,$e=!!A.specularColorMap,At=!!A.specularIntensityMap,J=Pe&&!!A.transmissionMap,tt=Pe&&!!A.thicknessMap,Ne=!!A.gradientMap,lt=!!A.alphaMap,ke=A.alphaTest>0,Re=!!A.alphaHash,ot=!!A.extensions;let Tt=Vi;A.toneMapped&&(ee===null||ee.isXRRenderTarget===!0)&&(Tt=s.toneMapping);const qt={shaderID:xe,shaderType:A.type,shaderName:A.name,vertexShader:re,fragmentShader:q,defines:A.defines,customVertexShaderID:K,customFragmentShaderID:te,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:h,batching:me,batchingColor:me&&X._colorsTexture!==null,instancing:Y,instancingColor:Y&&X.instanceColor!==null,instancingMorph:Y&&X.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ee===null?s.outputColorSpace:ee.isXRRenderTarget===!0?ee.texture.colorSpace:Xs,alphaToCoverage:!!A.alphaToCoverage,map:Te,matcap:et,envMap:We,envMapMode:We&&he.mapping,envMapCubeUVHeight:Q,aoMap:O,lightMap:dt,bumpMap:st,normalMap:it,displacementMap:u&&Ie,emissiveMap:Ze,normalMapObjectSpace:it&&A.normalMapType===l2,normalMapTangentSpace:it&&A.normalMapType===Ua,metalnessMap:Le,roughnessMap:rt,anisotropy:Xt,anisotropyMap:be,clearcoat:k,clearcoatMap:_t,clearcoatNormalMap:Ke,clearcoatRoughnessMap:ft,dispersion:R,iridescence:oe,iridescenceMap:vt,iridescenceThicknessMap:Fe,sheen:we,sheenColorMap:at,sheenRoughnessMap:Et,specularMap:St,specularColorMap:$e,specularIntensityMap:At,transmission:Pe,transmissionMap:J,thicknessMap:tt,gradientMap:Ne,opaque:A.transparent===!1&&A.blending===Bs&&A.alphaToCoverage===!1,alphaMap:lt,alphaTest:ke,alphaHash:Re,combine:A.combine,mapUv:Te&&_(A.map.channel),aoMapUv:O&&_(A.aoMap.channel),lightMapUv:dt&&_(A.lightMap.channel),bumpMapUv:st&&_(A.bumpMap.channel),normalMapUv:it&&_(A.normalMap.channel),displacementMapUv:Ie&&_(A.displacementMap.channel),emissiveMapUv:Ze&&_(A.emissiveMap.channel),metalnessMapUv:Le&&_(A.metalnessMap.channel),roughnessMapUv:rt&&_(A.roughnessMap.channel),anisotropyMapUv:be&&_(A.anisotropyMap.channel),clearcoatMapUv:_t&&_(A.clearcoatMap.channel),clearcoatNormalMapUv:Ke&&_(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ft&&_(A.clearcoatRoughnessMap.channel),iridescenceMapUv:vt&&_(A.iridescenceMap.channel),iridescenceThicknessMapUv:Fe&&_(A.iridescenceThicknessMap.channel),sheenColorMapUv:at&&_(A.sheenColorMap.channel),sheenRoughnessMapUv:Et&&_(A.sheenRoughnessMap.channel),specularMapUv:St&&_(A.specularMap.channel),specularColorMapUv:$e&&_(A.specularColorMap.channel),specularIntensityMapUv:At&&_(A.specularIntensityMap.channel),transmissionMapUv:J&&_(A.transmissionMap.channel),thicknessMapUv:tt&&_(A.thicknessMap.channel),alphaMapUv:lt&&_(A.alphaMap.channel),vertexTangents:!!se.attributes.tangent&&(it||Xt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!se.attributes.color&&se.attributes.color.itemSize===4,pointsUvs:X.isPoints===!0&&!!se.attributes.uv&&(Te||lt),fog:!!Z,useFog:A.fog===!0,fogExp2:!!Z&&Z.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:fe,skinning:X.isSkinnedMesh===!0,morphTargets:se.morphAttributes.position!==void 0,morphNormals:se.morphAttributes.normal!==void 0,morphColors:se.morphAttributes.color!==void 0,morphTargetsCount:Ae,morphTextureStride:pe,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:A.dithering,shadowMapEnabled:s.shadowMap.enabled&&F.length>0,shadowMapType:s.shadowMap.type,toneMapping:Tt,decodeVideoTexture:Te&&A.map.isVideoTexture===!0&&Bt.getTransfer(A.map.colorSpace)===tn,decodeVideoTextureEmissive:Ze&&A.emissiveMap.isVideoTexture===!0&&Bt.getTransfer(A.emissiveMap.colorSpace)===tn,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===cn,flipSided:A.side===Dn,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionClipCullDistance:ot&&A.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ot&&A.extensions.multiDraw===!0||me)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return qt.vertexUv1s=c.has(1),qt.vertexUv2s=c.has(2),qt.vertexUv3s=c.has(3),c.clear(),qt}function p(A){const E=[];if(A.shaderID?E.push(A.shaderID):(E.push(A.customVertexShaderID),E.push(A.customFragmentShaderID)),A.defines!==void 0)for(const F in A.defines)E.push(F),E.push(A.defines[F]);return A.isRawShaderMaterial===!1&&(x(E,A),M(E,A),E.push(s.outputColorSpace)),E.push(A.customProgramCacheKey),E.join()}function x(A,E){A.push(E.precision),A.push(E.outputColorSpace),A.push(E.envMapMode),A.push(E.envMapCubeUVHeight),A.push(E.mapUv),A.push(E.alphaMapUv),A.push(E.lightMapUv),A.push(E.aoMapUv),A.push(E.bumpMapUv),A.push(E.normalMapUv),A.push(E.displacementMapUv),A.push(E.emissiveMapUv),A.push(E.metalnessMapUv),A.push(E.roughnessMapUv),A.push(E.anisotropyMapUv),A.push(E.clearcoatMapUv),A.push(E.clearcoatNormalMapUv),A.push(E.clearcoatRoughnessMapUv),A.push(E.iridescenceMapUv),A.push(E.iridescenceThicknessMapUv),A.push(E.sheenColorMapUv),A.push(E.sheenRoughnessMapUv),A.push(E.specularMapUv),A.push(E.specularColorMapUv),A.push(E.specularIntensityMapUv),A.push(E.transmissionMapUv),A.push(E.thicknessMapUv),A.push(E.combine),A.push(E.fogExp2),A.push(E.sizeAttenuation),A.push(E.morphTargetsCount),A.push(E.morphAttributeCount),A.push(E.numDirLights),A.push(E.numPointLights),A.push(E.numSpotLights),A.push(E.numSpotLightMaps),A.push(E.numHemiLights),A.push(E.numRectAreaLights),A.push(E.numDirLightShadows),A.push(E.numPointLightShadows),A.push(E.numSpotLightShadows),A.push(E.numSpotLightShadowsWithMaps),A.push(E.numLightProbes),A.push(E.shadowMapType),A.push(E.toneMapping),A.push(E.numClippingPlanes),A.push(E.numClipIntersection),A.push(E.depthPacking)}function M(A,E){a.disableAll(),E.supportsVertexTextures&&a.enable(0),E.instancing&&a.enable(1),E.instancingColor&&a.enable(2),E.instancingMorph&&a.enable(3),E.matcap&&a.enable(4),E.envMap&&a.enable(5),E.normalMapObjectSpace&&a.enable(6),E.normalMapTangentSpace&&a.enable(7),E.clearcoat&&a.enable(8),E.iridescence&&a.enable(9),E.alphaTest&&a.enable(10),E.vertexColors&&a.enable(11),E.vertexAlphas&&a.enable(12),E.vertexUv1s&&a.enable(13),E.vertexUv2s&&a.enable(14),E.vertexUv3s&&a.enable(15),E.vertexTangents&&a.enable(16),E.anisotropy&&a.enable(17),E.alphaHash&&a.enable(18),E.batching&&a.enable(19),E.dispersion&&a.enable(20),E.batchingColor&&a.enable(21),A.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reverseDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),A.push(a.mask)}function b(A){const E=g[A.type];let F;if(E){const B=Nn[E];F=Ql.clone(B.uniforms)}else F=A.uniforms;return F}function N(A,E){let F;for(let B=0,X=d.length;B<X;B++){const Z=d[B];if(Z.cacheKey===E){F=Z,++F.usedTimes;break}}return F===void 0&&(F=new o3(s,E,A,r),d.push(F)),F}function L(A){if(--A.usedTimes===0){const E=d.indexOf(A);d[E]=d[d.length-1],d.pop(),A.destroy()}}function P(A){l.remove(A)}function I(){l.dispose()}return{getParameters:f,getProgramCacheKey:p,getUniforms:b,acquireProgram:N,releaseProgram:L,releaseShaderCache:P,programs:d,dispose:I}}function d3(){let s=new WeakMap;function e(o){return s.has(o)}function t(o){let a=s.get(o);return a===void 0&&(a={},s.set(o,a)),a}function n(o){s.delete(o)}function i(o,a,l){s.get(o)[a]=l}function r(){s=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:r}}function f3(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.z!==e.z?s.z-e.z:s.id-e.id}function kh(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function Vh(){const s=[];let e=0;const t=[],n=[],i=[];function r(){e=0,t.length=0,n.length=0,i.length=0}function o(m,u,h,g,_,f){let p=s[e];return p===void 0?(p={id:m.id,object:m,geometry:u,material:h,groupOrder:g,renderOrder:m.renderOrder,z:_,group:f},s[e]=p):(p.id=m.id,p.object=m,p.geometry=u,p.material=h,p.groupOrder=g,p.renderOrder=m.renderOrder,p.z=_,p.group=f),e++,p}function a(m,u,h,g,_,f){const p=o(m,u,h,g,_,f);h.transmission>0?n.push(p):h.transparent===!0?i.push(p):t.push(p)}function l(m,u,h,g,_,f){const p=o(m,u,h,g,_,f);h.transmission>0?n.unshift(p):h.transparent===!0?i.unshift(p):t.unshift(p)}function c(m,u){t.length>1&&t.sort(m||f3),n.length>1&&n.sort(u||kh),i.length>1&&i.sort(u||kh)}function d(){for(let m=e,u=s.length;m<u;m++){const h=s[m];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:t,transmissive:n,transparent:i,init:r,push:a,unshift:l,finish:d,sort:c}}function p3(){let s=new WeakMap;function e(n,i){const r=s.get(n);let o;return r===void 0?(o=new Vh,s.set(n,[o])):i>=r.length?(o=new Vh,r.push(o)):o=r[i],o}function t(){s=new WeakMap}return{get:e,dispose:t}}function m3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new z,color:new bt};break;case"SpotLight":t={position:new z,direction:new z,color:new bt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new z,color:new bt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new z,skyColor:new bt,groundColor:new bt};break;case"RectAreaLight":t={color:new bt,position:new z,halfWidth:new z,halfHeight:new z};break}return s[e.id]=t,t}}}function g3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let _3=0;function v3(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function y3(s){const e=new m3,t=g3(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new z);const i=new z,r=new Mt,o=new Mt;function a(c){let d=0,m=0,u=0;for(let A=0;A<9;A++)n.probe[A].set(0,0,0);let h=0,g=0,_=0,f=0,p=0,x=0,M=0,b=0,N=0,L=0,P=0;c.sort(v3);for(let A=0,E=c.length;A<E;A++){const F=c[A],B=F.color,X=F.intensity,Z=F.distance,se=F.shadow&&F.shadow.map?F.shadow.map.texture:null;if(F.isAmbientLight)d+=B.r*X,m+=B.g*X,u+=B.b*X;else if(F.isLightProbe){for(let W=0;W<9;W++)n.probe[W].addScaledVector(F.sh.coefficients[W],X);P++}else if(F.isDirectionalLight){const W=e.get(F);if(W.color.copy(F.color).multiplyScalar(F.intensity),F.castShadow){const he=F.shadow,Q=t.get(F);Q.shadowIntensity=he.intensity,Q.shadowBias=he.bias,Q.shadowNormalBias=he.normalBias,Q.shadowRadius=he.radius,Q.shadowMapSize=he.mapSize,n.directionalShadow[h]=Q,n.directionalShadowMap[h]=se,n.directionalShadowMatrix[h]=F.shadow.matrix,x++}n.directional[h]=W,h++}else if(F.isSpotLight){const W=e.get(F);W.position.setFromMatrixPosition(F.matrixWorld),W.color.copy(B).multiplyScalar(X),W.distance=Z,W.coneCos=Math.cos(F.angle),W.penumbraCos=Math.cos(F.angle*(1-F.penumbra)),W.decay=F.decay,n.spot[_]=W;const he=F.shadow;if(F.map&&(n.spotLightMap[N]=F.map,N++,he.updateMatrices(F),F.castShadow&&L++),n.spotLightMatrix[_]=he.matrix,F.castShadow){const Q=t.get(F);Q.shadowIntensity=he.intensity,Q.shadowBias=he.bias,Q.shadowNormalBias=he.normalBias,Q.shadowRadius=he.radius,Q.shadowMapSize=he.mapSize,n.spotShadow[_]=Q,n.spotShadowMap[_]=se,b++}_++}else if(F.isRectAreaLight){const W=e.get(F);W.color.copy(B).multiplyScalar(X),W.halfWidth.set(F.width*.5,0,0),W.halfHeight.set(0,F.height*.5,0),n.rectArea[f]=W,f++}else if(F.isPointLight){const W=e.get(F);if(W.color.copy(F.color).multiplyScalar(F.intensity),W.distance=F.distance,W.decay=F.decay,F.castShadow){const he=F.shadow,Q=t.get(F);Q.shadowIntensity=he.intensity,Q.shadowBias=he.bias,Q.shadowNormalBias=he.normalBias,Q.shadowRadius=he.radius,Q.shadowMapSize=he.mapSize,Q.shadowCameraNear=he.camera.near,Q.shadowCameraFar=he.camera.far,n.pointShadow[g]=Q,n.pointShadowMap[g]=se,n.pointShadowMatrix[g]=F.shadow.matrix,M++}n.point[g]=W,g++}else if(F.isHemisphereLight){const W=e.get(F);W.skyColor.copy(F.color).multiplyScalar(X),W.groundColor.copy(F.groundColor).multiplyScalar(X),n.hemi[p]=W,p++}}f>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ye.LTC_FLOAT_1,n.rectAreaLTC2=Ye.LTC_FLOAT_2):(n.rectAreaLTC1=Ye.LTC_HALF_1,n.rectAreaLTC2=Ye.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=m,n.ambient[2]=u;const I=n.hash;(I.directionalLength!==h||I.pointLength!==g||I.spotLength!==_||I.rectAreaLength!==f||I.hemiLength!==p||I.numDirectionalShadows!==x||I.numPointShadows!==M||I.numSpotShadows!==b||I.numSpotMaps!==N||I.numLightProbes!==P)&&(n.directional.length=h,n.spot.length=_,n.rectArea.length=f,n.point.length=g,n.hemi.length=p,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=M,n.pointShadowMap.length=M,n.spotShadow.length=b,n.spotShadowMap.length=b,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=M,n.spotLightMatrix.length=b+N-L,n.spotLightMap.length=N,n.numSpotLightShadowsWithMaps=L,n.numLightProbes=P,I.directionalLength=h,I.pointLength=g,I.spotLength=_,I.rectAreaLength=f,I.hemiLength=p,I.numDirectionalShadows=x,I.numPointShadows=M,I.numSpotShadows=b,I.numSpotMaps=N,I.numLightProbes=P,n.version=_3++)}function l(c,d){let m=0,u=0,h=0,g=0,_=0;const f=d.matrixWorldInverse;for(let p=0,x=c.length;p<x;p++){const M=c[p];if(M.isDirectionalLight){const b=n.directional[m];b.direction.setFromMatrixPosition(M.matrixWorld),i.setFromMatrixPosition(M.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(f),m++}else if(M.isSpotLight){const b=n.spot[h];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),b.direction.setFromMatrixPosition(M.matrixWorld),i.setFromMatrixPosition(M.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(f),h++}else if(M.isRectAreaLight){const b=n.rectArea[g];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),o.identity(),r.copy(M.matrixWorld),r.premultiply(f),o.extractRotation(r),b.halfWidth.set(M.width*.5,0,0),b.halfHeight.set(0,M.height*.5,0),b.halfWidth.applyMatrix4(o),b.halfHeight.applyMatrix4(o),g++}else if(M.isPointLight){const b=n.point[u];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),u++}else if(M.isHemisphereLight){const b=n.hemi[_];b.direction.setFromMatrixPosition(M.matrixWorld),b.direction.transformDirection(f),_++}}}return{setup:a,setupView:l,state:n}}function Hh(s){const e=new y3(s),t=[],n=[];function i(d){c.camera=d,t.length=0,n.length=0}function r(d){t.push(d)}function o(d){n.push(d)}function a(){e.setup(t)}function l(d){e.setupView(t,d)}const c={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:l,pushLight:r,pushShadow:o}}function x3(s){let e=new WeakMap;function t(i,r=0){const o=e.get(i);let a;return o===void 0?(a=new Hh(s),e.set(i,[a])):r>=o.length?(a=new Hh(s),o.push(a)):a=o[r],a}function n(){e=new WeakMap}return{get:t,dispose:n}}const M3=`void main() {
|
|
3776
3776
|
gl_Position = vec4( position, 1.0 );
|
|
3777
3777
|
}`,b3=`uniform sampler2D shadow_pass;
|
|
3778
3778
|
uniform vec2 resolution;
|
|
@@ -3800,7 +3800,7 @@ void main() {
|
|
|
3800
3800
|
squared_mean = squared_mean / samples;
|
|
3801
3801
|
float std_dev = sqrt( squared_mean - mean * mean );
|
|
3802
3802
|
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
|
|
3803
|
-
}`;function S3(s,e,t){let n=new nc;const i=new et,r=new et,o=new Xt,a=new R1({depthPacking:o2}),l=new D1,c={},d=t.maxTextureSize,m={[Qn]:In,[In]:Qn,[pn]:pn},u=new Li({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new et},radius:{value:4}},vertexShader:M3,fragmentShader:b3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new mn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new zt(g,u),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v0;let f=this.type;this.render=function(C,R,P){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||C.length===0)return;const A=s.getRenderTarget(),E=s.getActiveCubeFace(),L=s.getActiveMipmapLevel(),B=s.state;B.setBlending(Wi),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const H=f!==Si&&this.type===Si,Q=f===Si&&this.type!==Si;for(let ae=0,G=C.length;ae<G;ae++){const le=C[ae],Z=le.shadow;if(Z===void 0){console.warn("THREE.WebGLShadowMap:",le,"has no shadow.");continue}if(Z.autoUpdate===!1&&Z.needsUpdate===!1)continue;i.copy(Z.mapSize);const ve=Z.getFrameExtents();if(i.multiply(ve),r.copy(Z.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/ve.x),i.x=r.x*ve.x,Z.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/ve.y),i.y=r.y*ve.y,Z.mapSize.y=r.y)),Z.map===null||H===!0||Q===!0){const be=this.type!==Si?{minFilter:jn,magFilter:jn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new us(i.x,i.y,be),Z.map.texture.name=le.name+".shadowMap",Z.camera.updateProjectionMatrix()}s.setRenderTarget(Z.map),s.clear();const Ee=Z.getViewportCount();for(let be=0;be<Ee;be++){const ge=Z.getViewport(be);o.set(r.x*ge.x,r.y*ge.y,r.x*ge.z,r.y*ge.w),B.viewport(o),Z.updateMatrices(le,be),n=Z.getFrustum(),S(R,P,Z.camera,le,this.type)}Z.isPointLightShadow!==!0&&this.type===Si&&v(Z,P),Z.needsUpdate=!1}f=this.type,p.needsUpdate=!1,s.setRenderTarget(A,E,L)};function v(C,R){const P=e.update(_);u.defines.VSM_SAMPLES!==C.blurSamples&&(u.defines.VSM_SAMPLES=C.blurSamples,h.defines.VSM_SAMPLES=C.blurSamples,u.needsUpdate=!0,h.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new us(i.x,i.y)),u.uniforms.shadow_pass.value=C.map.texture,u.uniforms.resolution.value=C.mapSize,u.uniforms.radius.value=C.radius,s.setRenderTarget(C.mapPass),s.clear(),s.renderBufferDirect(R,null,P,u,_,null),h.uniforms.shadow_pass.value=C.mapPass.texture,h.uniforms.resolution.value=C.mapSize,h.uniforms.radius.value=C.radius,s.setRenderTarget(C.map),s.clear(),s.renderBufferDirect(R,null,P,h,_,null)}function b(C,R,P,A){let E=null;const L=P.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(L!==void 0)E=L;else if(E=P.isPointLight===!0?l:a,s.localClippingEnabled&&R.clipShadows===!0&&Array.isArray(R.clippingPlanes)&&R.clippingPlanes.length!==0||R.displacementMap&&R.displacementScale!==0||R.alphaMap&&R.alphaTest>0||R.map&&R.alphaTest>0||R.alphaToCoverage===!0){const B=E.uuid,H=R.uuid;let Q=c[B];Q===void 0&&(Q={},c[B]=Q);let ae=Q[H];ae===void 0&&(ae=E.clone(),Q[H]=ae,R.addEventListener("dispose",F)),E=ae}if(E.visible=R.visible,E.wireframe=R.wireframe,A===Si?E.side=R.shadowSide!==null?R.shadowSide:R.side:E.side=R.shadowSide!==null?R.shadowSide:m[R.side],E.alphaMap=R.alphaMap,E.alphaTest=R.alphaToCoverage===!0?.5:R.alphaTest,E.map=R.map,E.clipShadows=R.clipShadows,E.clippingPlanes=R.clippingPlanes,E.clipIntersection=R.clipIntersection,E.displacementMap=R.displacementMap,E.displacementScale=R.displacementScale,E.displacementBias=R.displacementBias,E.wireframeLinewidth=R.wireframeLinewidth,E.linewidth=R.linewidth,P.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const B=s.properties.get(E);B.light=P}return E}function S(C,R,P,A,E){if(C.visible===!1)return;if(C.layers.test(R.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&E===Si)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,C.matrixWorld);const H=e.update(C),Q=C.material;if(Array.isArray(Q)){const ae=H.groups;for(let G=0,le=ae.length;G<le;G++){const Z=ae[G],ve=Q[Z.materialIndex];if(ve&&ve.visible){const Ee=b(C,ve,A,E);C.onBeforeShadow(s,C,R,P,H,Ee,Z),s.renderBufferDirect(P,null,H,Ee,C,Z),C.onAfterShadow(s,C,R,P,H,Ee,Z)}}}else if(Q.visible){const ae=b(C,Q,A,E);C.onBeforeShadow(s,C,R,P,H,ae,null),s.renderBufferDirect(P,null,H,ae,C,null),C.onAfterShadow(s,C,R,P,H,ae,null)}}const B=C.children;for(let H=0,Q=B.length;H<Q;H++)S(B[H],R,P,A,E)}function F(C){C.target.removeEventListener("dispose",F);for(const P in c){const A=c[P],E=C.target.uuid;E in A&&(A[E].dispose(),delete A[E])}}}const E3={[Xo]:jo,[qo]:Jo,[$o]:Ko,[Hs]:Yo,[jo]:Xo,[Jo]:qo,[Ko]:$o,[Yo]:Hs};function A3(s,e){function t(){let K=!1;const $e=new Xt;let Ie=null;const ut=new Xt(0,0,0,0);return{setMask:function(ze){Ie!==ze&&!K&&(s.colorMask(ze,ze,ze,ze),Ie=ze)},setLocked:function(ze){K=ze},setClear:function(ze,we,pt,Ft,Qt){Qt===!0&&(ze*=Ft,we*=Ft,pt*=Ft),$e.set(ze,we,pt,Ft),ut.equals($e)===!1&&(s.clearColor(ze,we,pt,Ft),ut.copy($e))},reset:function(){K=!1,Ie=null,ut.set(-1,0,0,0)}}}function n(){let K=!1,$e=!1,Ie=null,ut=null,ze=null;return{setReversed:function(we){if($e!==we){const pt=e.get("EXT_clip_control");we?pt.clipControlEXT(pt.LOWER_LEFT_EXT,pt.ZERO_TO_ONE_EXT):pt.clipControlEXT(pt.LOWER_LEFT_EXT,pt.NEGATIVE_ONE_TO_ONE_EXT),$e=we;const Ft=ze;ze=null,this.setClear(Ft)}},getReversed:function(){return $e},setTest:function(we){we?ee(s.DEPTH_TEST):ue(s.DEPTH_TEST)},setMask:function(we){Ie!==we&&!K&&(s.depthMask(we),Ie=we)},setFunc:function(we){if($e&&(we=E3[we]),ut!==we){switch(we){case Xo:s.depthFunc(s.NEVER);break;case jo:s.depthFunc(s.ALWAYS);break;case qo:s.depthFunc(s.LESS);break;case Hs:s.depthFunc(s.LEQUAL);break;case $o:s.depthFunc(s.EQUAL);break;case Yo:s.depthFunc(s.GEQUAL);break;case Jo:s.depthFunc(s.GREATER);break;case Ko:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}ut=we}},setLocked:function(we){K=we},setClear:function(we){ze!==we&&($e&&(we=1-we),s.clearDepth(we),ze=we)},reset:function(){K=!1,Ie=null,ut=null,ze=null,$e=!1}}}function i(){let K=!1,$e=null,Ie=null,ut=null,ze=null,we=null,pt=null,Ft=null,Qt=null;return{setTest:function(Ut){K||(Ut?ee(s.STENCIL_TEST):ue(s.STENCIL_TEST))},setMask:function(Ut){$e!==Ut&&!K&&(s.stencilMask(Ut),$e=Ut)},setFunc:function(Ut,Cn,Hn){(Ie!==Ut||ut!==Cn||ze!==Hn)&&(s.stencilFunc(Ut,Cn,Hn),Ie=Ut,ut=Cn,ze=Hn)},setOp:function(Ut,Cn,Hn){(we!==Ut||pt!==Cn||Ft!==Hn)&&(s.stencilOp(Ut,Cn,Hn),we=Ut,pt=Cn,Ft=Hn)},setLocked:function(Ut){K=Ut},setClear:function(Ut){Qt!==Ut&&(s.clearStencil(Ut),Qt=Ut)},reset:function(){K=!1,$e=null,Ie=null,ut=null,ze=null,we=null,pt=null,Ft=null,Qt=null}}}const r=new t,o=new n,a=new i,l=new WeakMap,c=new WeakMap;let d={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,v=null,b=null,S=null,F=null,C=null,R=new Tt(0,0,0),P=0,A=!1,E=null,L=null,B=null,H=null,Q=null;const ae=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let G=!1,le=0;const Z=s.getParameter(s.VERSION);Z.indexOf("WebGL")!==-1?(le=parseFloat(/^WebGL (\d)/.exec(Z)[1]),G=le>=1):Z.indexOf("OpenGL ES")!==-1&&(le=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),G=le>=2);let ve=null,Ee={};const be=s.getParameter(s.SCISSOR_BOX),ge=s.getParameter(s.VIEWPORT),se=new Xt().fromArray(be),j=new Xt().fromArray(ge);function q(K,$e,Ie,ut){const ze=new Uint8Array(4),we=s.createTexture();s.bindTexture(K,we),s.texParameteri(K,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(K,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let pt=0;pt<Ie;pt++)K===s.TEXTURE_3D||K===s.TEXTURE_2D_ARRAY?s.texImage3D($e,0,s.RGBA,1,1,ut,0,s.RGBA,s.UNSIGNED_BYTE,ze):s.texImage2D($e+pt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,ze);return we}const ne={};ne[s.TEXTURE_2D]=q(s.TEXTURE_2D,s.TEXTURE_2D,1),ne[s.TEXTURE_CUBE_MAP]=q(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),ne[s.TEXTURE_2D_ARRAY]=q(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),ne[s.TEXTURE_3D]=q(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),ee(s.DEPTH_TEST),o.setFunc(Hs),dt(!1),at(vc),ee(s.CULL_FACE),O(Wi);function ee(K){d[K]!==!0&&(s.enable(K),d[K]=!0)}function ue(K){d[K]!==!1&&(s.disable(K),d[K]=!1)}function $(K,$e){return m[K]!==$e?(s.bindFramebuffer(K,$e),m[K]=$e,K===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=$e),K===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=$e),!0):!1}function pe(K,$e){let Ie=h,ut=!1;if(K){Ie=u.get($e),Ie===void 0&&(Ie=[],u.set($e,Ie));const ze=K.textures;if(Ie.length!==ze.length||Ie[0]!==s.COLOR_ATTACHMENT0){for(let we=0,pt=ze.length;we<pt;we++)Ie[we]=s.COLOR_ATTACHMENT0+we;Ie.length=ze.length,ut=!0}}else Ie[0]!==s.BACK&&(Ie[0]=s.BACK,ut=!0);ut&&s.drawBuffers(Ie)}function Ce(K){return g!==K?(s.useProgram(K),g=K,!0):!1}const Ke={[rs]:s.FUNC_ADD,[Pu]:s.FUNC_SUBTRACT,[Fu]:s.FUNC_REVERSE_SUBTRACT};Ke[Nu]=s.MIN,Ke[Uu]=s.MAX;const He={[Iu]:s.ZERO,[zu]:s.ONE,[Bu]:s.SRC_COLOR,[Go]:s.SRC_ALPHA,[Wu]:s.SRC_ALPHA_SATURATE,[Hu]:s.DST_COLOR,[ku]:s.DST_ALPHA,[Ou]:s.ONE_MINUS_SRC_COLOR,[Wo]:s.ONE_MINUS_SRC_ALPHA,[Gu]:s.ONE_MINUS_DST_COLOR,[Vu]:s.ONE_MINUS_DST_ALPHA,[Xu]:s.CONSTANT_COLOR,[ju]:s.ONE_MINUS_CONSTANT_COLOR,[qu]:s.CONSTANT_ALPHA,[$u]:s.ONE_MINUS_CONSTANT_ALPHA};function O(K,$e,Ie,ut,ze,we,pt,Ft,Qt,Ut){if(K===Wi){_===!0&&(ue(s.BLEND),_=!1);return}if(_===!1&&(ee(s.BLEND),_=!0),K!==Lu){if(K!==p||Ut!==A){if((f!==rs||S!==rs)&&(s.blendEquation(s.FUNC_ADD),f=rs,S=rs),Ut)switch(K){case Bs:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.ONE,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.SRC_COLOR,s.ZERO,s.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}else switch(K){case Bs:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.SRC_ALPHA,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFunc(s.ZERO,s.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}v=null,b=null,F=null,C=null,R.set(0,0,0),P=0,p=K,A=Ut}return}ze=ze||$e,we=we||Ie,pt=pt||ut,($e!==f||ze!==S)&&(s.blendEquationSeparate(Ke[$e],Ke[ze]),f=$e,S=ze),(Ie!==v||ut!==b||we!==F||pt!==C)&&(s.blendFuncSeparate(He[Ie],He[ut],He[we],He[pt]),v=Ie,b=ut,F=we,C=pt),(Ft.equals(R)===!1||Qt!==P)&&(s.blendColor(Ft.r,Ft.g,Ft.b,Qt),R.copy(Ft),P=Qt),p=K,A=!1}function _t(K,$e){K.side===pn?ue(s.CULL_FACE):ee(s.CULL_FACE);let Ie=K.side===In;$e&&(Ie=!Ie),dt(Ie),K.blending===Bs&&K.transparent===!1?O(Wi):O(K.blending,K.blendEquation,K.blendSrc,K.blendDst,K.blendEquationAlpha,K.blendSrcAlpha,K.blendDstAlpha,K.blendColor,K.blendAlpha,K.premultipliedAlpha),o.setFunc(K.depthFunc),o.setTest(K.depthTest),o.setMask(K.depthWrite),r.setMask(K.colorWrite);const ut=K.stencilWrite;a.setTest(ut),ut&&(a.setMask(K.stencilWriteMask),a.setFunc(K.stencilFunc,K.stencilRef,K.stencilFuncMask),a.setOp(K.stencilFail,K.stencilZFail,K.stencilZPass)),tt(K.polygonOffset,K.polygonOffsetFactor,K.polygonOffsetUnits),K.alphaToCoverage===!0?ee(s.SAMPLE_ALPHA_TO_COVERAGE):ue(s.SAMPLE_ALPHA_TO_COVERAGE)}function dt(K){E!==K&&(K?s.frontFace(s.CW):s.frontFace(s.CCW),E=K)}function at(K){K!==Ru?(ee(s.CULL_FACE),K!==L&&(K===vc?s.cullFace(s.BACK):K===Du?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):ue(s.CULL_FACE),L=K}function Fe(K){K!==B&&(G&&s.lineWidth(K),B=K)}function tt(K,$e,Ie){K?(ee(s.POLYGON_OFFSET_FILL),(H!==$e||Q!==Ie)&&(s.polygonOffset($e,Ie),H=$e,Q=Ie)):ue(s.POLYGON_OFFSET_FILL)}function Le(K){K?ee(s.SCISSOR_TEST):ue(s.SCISSOR_TEST)}function ot(K){K===void 0&&(K=s.TEXTURE0+ae-1),ve!==K&&(s.activeTexture(K),ve=K)}function jt(K,$e,Ie){Ie===void 0&&(ve===null?Ie=s.TEXTURE0+ae-1:Ie=ve);let ut=Ee[Ie];ut===void 0&&(ut={type:void 0,texture:void 0},Ee[Ie]=ut),(ut.type!==K||ut.texture!==$e)&&(ve!==Ie&&(s.activeTexture(Ie),ve=Ie),s.bindTexture(K,$e||ne[K]),ut.type=K,ut.texture=$e)}function k(){const K=Ee[ve];K!==void 0&&K.type!==void 0&&(s.bindTexture(K.type,null),K.type=void 0,K.texture=void 0)}function T(){try{s.compressedTexImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function oe(){try{s.compressedTexImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Se(){try{s.texSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function De(){try{s.texSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function ye(){try{s.compressedTexSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function vt(){try{s.compressedTexSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ze(){try{s.texStorage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function mt(){try{s.texStorage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function yt(){try{s.texImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ue(){try{s.texImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function st(K){se.equals(K)===!1&&(s.scissor(K.x,K.y,K.z,K.w),se.copy(K))}function Rt(K){j.equals(K)===!1&&(s.viewport(K.x,K.y,K.z,K.w),j.copy(K))}function At(K,$e){let Ie=c.get($e);Ie===void 0&&(Ie=new WeakMap,c.set($e,Ie));let ut=Ie.get(K);ut===void 0&&(ut=s.getUniformBlockIndex($e,K.name),Ie.set(K,ut))}function Ye(K,$e){const ut=c.get($e).get(K);l.get($e)!==ut&&(s.uniformBlockBinding($e,ut,K.__bindingPointIndex),l.set($e,ut))}function Lt(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),o.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),d={},ve=null,Ee={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,v=null,b=null,S=null,F=null,C=null,R=new Tt(0,0,0),P=0,A=!1,E=null,L=null,B=null,H=null,Q=null,se.set(0,0,s.canvas.width,s.canvas.height),j.set(0,0,s.canvas.width,s.canvas.height),r.reset(),o.reset(),a.reset()}return{buffers:{color:r,depth:o,stencil:a},enable:ee,disable:ue,bindFramebuffer:$,drawBuffers:pe,useProgram:Ce,setBlending:O,setMaterial:_t,setFlipSided:dt,setCullFace:at,setLineWidth:Fe,setPolygonOffset:tt,setScissorTest:Le,activeTexture:ot,bindTexture:jt,unbindTexture:k,compressedTexImage2D:T,compressedTexImage3D:oe,texImage2D:yt,texImage3D:Ue,updateUBOMapping:At,uniformBlockBinding:Ye,texStorage2D:Ze,texStorage3D:mt,texSubImage2D:Se,texSubImage3D:De,compressedTexSubImage2D:ye,compressedTexSubImage3D:vt,scissor:st,viewport:Rt,reset:Lt}}function w3(s,e,t,n,i,r,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new et,d=new WeakMap;let m;const u=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(k,T){return h?new OffscreenCanvas(k,T):Mr("canvas")}function _(k,T,oe){let Se=1;const De=jt(k);if((De.width>oe||De.height>oe)&&(Se=oe/Math.max(De.width,De.height)),Se<1)if(typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&k instanceof ImageBitmap||typeof VideoFrame<"u"&&k instanceof VideoFrame){const ye=Math.floor(Se*De.width),vt=Math.floor(Se*De.height);m===void 0&&(m=g(ye,vt));const Ze=T?g(ye,vt):m;return Ze.width=ye,Ze.height=vt,Ze.getContext("2d").drawImage(k,0,0,ye,vt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+ye+"x"+vt+")."),Ze}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),k;return k}function p(k){return k.generateMipmaps}function f(k){s.generateMipmap(k)}function v(k){return k.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:k.isWebGL3DRenderTarget?s.TEXTURE_3D:k.isWebGLArrayRenderTarget||k.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function b(k,T,oe,Se,De=!1){if(k!==null){if(s[k]!==void 0)return s[k];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+k+"'")}let ye=T;if(T===s.RED&&(oe===s.FLOAT&&(ye=s.R32F),oe===s.HALF_FLOAT&&(ye=s.R16F),oe===s.UNSIGNED_BYTE&&(ye=s.R8)),T===s.RED_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.R8UI),oe===s.UNSIGNED_SHORT&&(ye=s.R16UI),oe===s.UNSIGNED_INT&&(ye=s.R32UI),oe===s.BYTE&&(ye=s.R8I),oe===s.SHORT&&(ye=s.R16I),oe===s.INT&&(ye=s.R32I)),T===s.RG&&(oe===s.FLOAT&&(ye=s.RG32F),oe===s.HALF_FLOAT&&(ye=s.RG16F),oe===s.UNSIGNED_BYTE&&(ye=s.RG8)),T===s.RG_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.RG8UI),oe===s.UNSIGNED_SHORT&&(ye=s.RG16UI),oe===s.UNSIGNED_INT&&(ye=s.RG32UI),oe===s.BYTE&&(ye=s.RG8I),oe===s.SHORT&&(ye=s.RG16I),oe===s.INT&&(ye=s.RG32I)),T===s.RGB_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.RGB8UI),oe===s.UNSIGNED_SHORT&&(ye=s.RGB16UI),oe===s.UNSIGNED_INT&&(ye=s.RGB32UI),oe===s.BYTE&&(ye=s.RGB8I),oe===s.SHORT&&(ye=s.RGB16I),oe===s.INT&&(ye=s.RGB32I)),T===s.RGBA_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.RGBA8UI),oe===s.UNSIGNED_SHORT&&(ye=s.RGBA16UI),oe===s.UNSIGNED_INT&&(ye=s.RGBA32UI),oe===s.BYTE&&(ye=s.RGBA8I),oe===s.SHORT&&(ye=s.RGBA16I),oe===s.INT&&(ye=s.RGBA32I)),T===s.RGB&&oe===s.UNSIGNED_INT_5_9_9_9_REV&&(ye=s.RGB9_E5),T===s.RGBA){const vt=De?Aa:Gt.getTransfer(Se);oe===s.FLOAT&&(ye=s.RGBA32F),oe===s.HALF_FLOAT&&(ye=s.RGBA16F),oe===s.UNSIGNED_BYTE&&(ye=vt===an?s.SRGB8_ALPHA8:s.RGBA8),oe===s.UNSIGNED_SHORT_4_4_4_4&&(ye=s.RGBA4),oe===s.UNSIGNED_SHORT_5_5_5_1&&(ye=s.RGB5_A1)}return(ye===s.R16F||ye===s.R32F||ye===s.RG16F||ye===s.RG32F||ye===s.RGBA16F||ye===s.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function S(k,T){let oe;return k?T===null||T===hs||T===vr?oe=s.DEPTH24_STENCIL8:T===fi?oe=s.DEPTH32F_STENCIL8:T===_r&&(oe=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):T===null||T===hs||T===vr?oe=s.DEPTH_COMPONENT24:T===fi?oe=s.DEPTH_COMPONENT32F:T===_r&&(oe=s.DEPTH_COMPONENT16),oe}function F(k,T){return p(k)===!0||k.isFramebufferTexture&&k.minFilter!==jn&&k.minFilter!==Xn?Math.log2(Math.max(T.width,T.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?T.mipmaps.length:1}function C(k){const T=k.target;T.removeEventListener("dispose",C),P(T),T.isVideoTexture&&d.delete(T)}function R(k){const T=k.target;T.removeEventListener("dispose",R),E(T)}function P(k){const T=n.get(k);if(T.__webglInit===void 0)return;const oe=k.source,Se=u.get(oe);if(Se){const De=Se[T.__cacheKey];De.usedTimes--,De.usedTimes===0&&A(k),Object.keys(Se).length===0&&u.delete(oe)}n.remove(k)}function A(k){const T=n.get(k);s.deleteTexture(T.__webglTexture);const oe=k.source,Se=u.get(oe);delete Se[T.__cacheKey],o.memory.textures--}function E(k){const T=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let Se=0;Se<6;Se++){if(Array.isArray(T.__webglFramebuffer[Se]))for(let De=0;De<T.__webglFramebuffer[Se].length;De++)s.deleteFramebuffer(T.__webglFramebuffer[Se][De]);else s.deleteFramebuffer(T.__webglFramebuffer[Se]);T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer[Se])}else{if(Array.isArray(T.__webglFramebuffer))for(let Se=0;Se<T.__webglFramebuffer.length;Se++)s.deleteFramebuffer(T.__webglFramebuffer[Se]);else s.deleteFramebuffer(T.__webglFramebuffer);if(T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer),T.__webglMultisampledFramebuffer&&s.deleteFramebuffer(T.__webglMultisampledFramebuffer),T.__webglColorRenderbuffer)for(let Se=0;Se<T.__webglColorRenderbuffer.length;Se++)T.__webglColorRenderbuffer[Se]&&s.deleteRenderbuffer(T.__webglColorRenderbuffer[Se]);T.__webglDepthRenderbuffer&&s.deleteRenderbuffer(T.__webglDepthRenderbuffer)}const oe=k.textures;for(let Se=0,De=oe.length;Se<De;Se++){const ye=n.get(oe[Se]);ye.__webglTexture&&(s.deleteTexture(ye.__webglTexture),o.memory.textures--),n.remove(oe[Se])}n.remove(k)}let L=0;function B(){L=0}function H(){const k=L;return k>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+i.maxTextures),L+=1,k}function Q(k){const T=[];return T.push(k.wrapS),T.push(k.wrapT),T.push(k.wrapR||0),T.push(k.magFilter),T.push(k.minFilter),T.push(k.anisotropy),T.push(k.internalFormat),T.push(k.format),T.push(k.type),T.push(k.generateMipmaps),T.push(k.premultiplyAlpha),T.push(k.flipY),T.push(k.unpackAlignment),T.push(k.colorSpace),T.join()}function ae(k,T){const oe=n.get(k);if(k.isVideoTexture&&Le(k),k.isRenderTargetTexture===!1&&k.version>0&&oe.__version!==k.version){const Se=k.image;if(Se===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Se.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ne(oe,k,T);return}}t.bindTexture(s.TEXTURE_2D,oe.__webglTexture,s.TEXTURE0+T)}function G(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ne(oe,k,T);return}t.bindTexture(s.TEXTURE_2D_ARRAY,oe.__webglTexture,s.TEXTURE0+T)}function le(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ne(oe,k,T);return}t.bindTexture(s.TEXTURE_3D,oe.__webglTexture,s.TEXTURE0+T)}function Z(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ee(oe,k,T);return}t.bindTexture(s.TEXTURE_CUBE_MAP,oe.__webglTexture,s.TEXTURE0+T)}const ve={[di]:s.REPEAT,[ri]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},Ee={[jn]:s.NEAREST,[s2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[Xn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[Ai]:s.LINEAR_MIPMAP_LINEAR},be={[c2]:s.NEVER,[m2]:s.ALWAYS,[h2]:s.LESS,[C0]:s.LEQUAL,[u2]:s.EQUAL,[p2]:s.GEQUAL,[d2]:s.GREATER,[f2]:s.NOTEQUAL};function ge(k,T){if(T.type===fi&&e.has("OES_texture_float_linear")===!1&&(T.magFilter===Xn||T.magFilter===Xa||T.magFilter===wr||T.magFilter===Ai||T.minFilter===Xn||T.minFilter===Xa||T.minFilter===wr||T.minFilter===Ai)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(k,s.TEXTURE_WRAP_S,ve[T.wrapS]),s.texParameteri(k,s.TEXTURE_WRAP_T,ve[T.wrapT]),(k===s.TEXTURE_3D||k===s.TEXTURE_2D_ARRAY)&&s.texParameteri(k,s.TEXTURE_WRAP_R,ve[T.wrapR]),s.texParameteri(k,s.TEXTURE_MAG_FILTER,Ee[T.magFilter]),s.texParameteri(k,s.TEXTURE_MIN_FILTER,Ee[T.minFilter]),T.compareFunction&&(s.texParameteri(k,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(k,s.TEXTURE_COMPARE_FUNC,be[T.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(T.magFilter===jn||T.minFilter!==wr&&T.minFilter!==Ai||T.type===fi&&e.has("OES_texture_float_linear")===!1)return;if(T.anisotropy>1||n.get(T).__currentAnisotropy){const oe=e.get("EXT_texture_filter_anisotropic");s.texParameterf(k,oe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(T.anisotropy,i.getMaxAnisotropy())),n.get(T).__currentAnisotropy=T.anisotropy}}}function se(k,T){let oe=!1;k.__webglInit===void 0&&(k.__webglInit=!0,T.addEventListener("dispose",C));const Se=T.source;let De=u.get(Se);De===void 0&&(De={},u.set(Se,De));const ye=Q(T);if(ye!==k.__cacheKey){De[ye]===void 0&&(De[ye]={texture:s.createTexture(),usedTimes:0},o.memory.textures++,oe=!0),De[ye].usedTimes++;const vt=De[k.__cacheKey];vt!==void 0&&(De[k.__cacheKey].usedTimes--,vt.usedTimes===0&&A(T)),k.__cacheKey=ye,k.__webglTexture=De[ye].texture}return oe}function j(k,T,oe){return Math.floor(Math.floor(k/oe)/T)}function q(k,T,oe,Se){const ye=k.updateRanges;if(ye.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,T.width,T.height,oe,Se,T.data);else{ye.sort((Ue,st)=>Ue.start-st.start);let vt=0;for(let Ue=1;Ue<ye.length;Ue++){const st=ye[vt],Rt=ye[Ue],At=st.start+st.count,Ye=j(Rt.start,T.width,4),Lt=j(st.start,T.width,4);Rt.start<=At+1&&Ye===Lt&&j(Rt.start+Rt.count-1,T.width,4)===Ye?st.count=Math.max(st.count,Rt.start+Rt.count-st.start):(++vt,ye[vt]=Rt)}ye.length=vt+1;const Ze=s.getParameter(s.UNPACK_ROW_LENGTH),mt=s.getParameter(s.UNPACK_SKIP_PIXELS),yt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,T.width);for(let Ue=0,st=ye.length;Ue<st;Ue++){const Rt=ye[Ue],At=Math.floor(Rt.start/4),Ye=Math.ceil(Rt.count/4),Lt=At%T.width,K=Math.floor(At/T.width),$e=Ye,Ie=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,Lt),s.pixelStorei(s.UNPACK_SKIP_ROWS,K),t.texSubImage2D(s.TEXTURE_2D,0,Lt,K,$e,Ie,oe,Se,T.data)}k.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Ze),s.pixelStorei(s.UNPACK_SKIP_PIXELS,mt),s.pixelStorei(s.UNPACK_SKIP_ROWS,yt)}}function ne(k,T,oe){let Se=s.TEXTURE_2D;(T.isDataArrayTexture||T.isCompressedArrayTexture)&&(Se=s.TEXTURE_2D_ARRAY),T.isData3DTexture&&(Se=s.TEXTURE_3D);const De=se(k,T),ye=T.source;t.bindTexture(Se,k.__webglTexture,s.TEXTURE0+oe);const vt=n.get(ye);if(ye.version!==vt.__version||De===!0){t.activeTexture(s.TEXTURE0+oe);const Ze=Gt.getPrimaries(Gt.workingColorSpace),mt=T.colorSpace===Hi?null:Gt.getPrimaries(T.colorSpace),yt=T.colorSpace===Hi||Ze===mt?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,T.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,T.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,yt);let Ue=_(T.image,!1,i.maxTextureSize);Ue=ot(T,Ue);const st=r.convert(T.format,T.colorSpace),Rt=r.convert(T.type);let At=b(T.internalFormat,st,Rt,T.colorSpace,T.isVideoTexture);ge(Se,T);let Ye;const Lt=T.mipmaps,K=T.isVideoTexture!==!0,$e=vt.__version===void 0||De===!0,Ie=ye.dataReady,ut=F(T,Ue);if(T.isDepthTexture)At=S(T.format===xr,T.type),$e&&(K?t.texStorage2D(s.TEXTURE_2D,1,At,Ue.width,Ue.height):t.texImage2D(s.TEXTURE_2D,0,At,Ue.width,Ue.height,0,st,Rt,null));else if(T.isDataTexture)if(Lt.length>0){K&&$e&&t.texStorage2D(s.TEXTURE_2D,ut,At,Lt[0].width,Lt[0].height);for(let ze=0,we=Lt.length;ze<we;ze++)Ye=Lt[ze],K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,st,Rt,Ye.data):t.texImage2D(s.TEXTURE_2D,ze,At,Ye.width,Ye.height,0,st,Rt,Ye.data);T.generateMipmaps=!1}else K?($e&&t.texStorage2D(s.TEXTURE_2D,ut,At,Ue.width,Ue.height),Ie&&q(T,Ue,st,Rt)):t.texImage2D(s.TEXTURE_2D,0,At,Ue.width,Ue.height,0,st,Rt,Ue.data);else if(T.isCompressedTexture)if(T.isCompressedArrayTexture){K&&$e&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,At,Lt[0].width,Lt[0].height,Ue.depth);for(let ze=0,we=Lt.length;ze<we;ze++)if(Ye=Lt[ze],T.format!==Zn)if(st!==null)if(K){if(Ie)if(T.layerUpdates.size>0){const pt=vh(Ye.width,Ye.height,T.format,T.type);for(const Ft of T.layerUpdates){const Qt=Ye.data.subarray(Ft*pt/Ye.data.BYTES_PER_ELEMENT,(Ft+1)*pt/Ye.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,Ft,Ye.width,Ye.height,1,st,Qt)}T.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Ye.width,Ye.height,Ue.depth,st,Ye.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,ze,At,Ye.width,Ye.height,Ue.depth,0,Ye.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else K?Ie&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Ye.width,Ye.height,Ue.depth,st,Rt,Ye.data):t.texImage3D(s.TEXTURE_2D_ARRAY,ze,At,Ye.width,Ye.height,Ue.depth,0,st,Rt,Ye.data)}else{K&&$e&&t.texStorage2D(s.TEXTURE_2D,ut,At,Lt[0].width,Lt[0].height);for(let ze=0,we=Lt.length;ze<we;ze++)Ye=Lt[ze],T.format!==Zn?st!==null?K?Ie&&t.compressedTexSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,st,Ye.data):t.compressedTexImage2D(s.TEXTURE_2D,ze,At,Ye.width,Ye.height,0,Ye.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,st,Rt,Ye.data):t.texImage2D(s.TEXTURE_2D,ze,At,Ye.width,Ye.height,0,st,Rt,Ye.data)}else if(T.isDataArrayTexture)if(K){if($e&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,At,Ue.width,Ue.height,Ue.depth),Ie)if(T.layerUpdates.size>0){const ze=vh(Ue.width,Ue.height,T.format,T.type);for(const we of T.layerUpdates){const pt=Ue.data.subarray(we*ze/Ue.data.BYTES_PER_ELEMENT,(we+1)*ze/Ue.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,we,Ue.width,Ue.height,1,st,Rt,pt)}T.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,Ue.width,Ue.height,Ue.depth,st,Rt,Ue.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,At,Ue.width,Ue.height,Ue.depth,0,st,Rt,Ue.data);else if(T.isData3DTexture)K?($e&&t.texStorage3D(s.TEXTURE_3D,ut,At,Ue.width,Ue.height,Ue.depth),Ie&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,Ue.width,Ue.height,Ue.depth,st,Rt,Ue.data)):t.texImage3D(s.TEXTURE_3D,0,At,Ue.width,Ue.height,Ue.depth,0,st,Rt,Ue.data);else if(T.isFramebufferTexture){if($e)if(K)t.texStorage2D(s.TEXTURE_2D,ut,At,Ue.width,Ue.height);else{let ze=Ue.width,we=Ue.height;for(let pt=0;pt<ut;pt++)t.texImage2D(s.TEXTURE_2D,pt,At,ze,we,0,st,Rt,null),ze>>=1,we>>=1}}else if(Lt.length>0){if(K&&$e){const ze=jt(Lt[0]);t.texStorage2D(s.TEXTURE_2D,ut,At,ze.width,ze.height)}for(let ze=0,we=Lt.length;ze<we;ze++)Ye=Lt[ze],K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,st,Rt,Ye):t.texImage2D(s.TEXTURE_2D,ze,At,st,Rt,Ye);T.generateMipmaps=!1}else if(K){if($e){const ze=jt(Ue);t.texStorage2D(s.TEXTURE_2D,ut,At,ze.width,ze.height)}Ie&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,st,Rt,Ue)}else t.texImage2D(s.TEXTURE_2D,0,At,st,Rt,Ue);p(T)&&f(Se),vt.__version=ye.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function ee(k,T,oe){if(T.image.length!==6)return;const Se=se(k,T),De=T.source;t.bindTexture(s.TEXTURE_CUBE_MAP,k.__webglTexture,s.TEXTURE0+oe);const ye=n.get(De);if(De.version!==ye.__version||Se===!0){t.activeTexture(s.TEXTURE0+oe);const vt=Gt.getPrimaries(Gt.workingColorSpace),Ze=T.colorSpace===Hi?null:Gt.getPrimaries(T.colorSpace),mt=T.colorSpace===Hi||vt===Ze?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,T.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,T.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,mt);const yt=T.isCompressedTexture||T.image[0].isCompressedTexture,Ue=T.image[0]&&T.image[0].isDataTexture,st=[];for(let we=0;we<6;we++)!yt&&!Ue?st[we]=_(T.image[we],!0,i.maxCubemapSize):st[we]=Ue?T.image[we].image:T.image[we],st[we]=ot(T,st[we]);const Rt=st[0],At=r.convert(T.format,T.colorSpace),Ye=r.convert(T.type),Lt=b(T.internalFormat,At,Ye,T.colorSpace),K=T.isVideoTexture!==!0,$e=ye.__version===void 0||Se===!0,Ie=De.dataReady;let ut=F(T,Rt);ge(s.TEXTURE_CUBE_MAP,T);let ze;if(yt){K&&$e&&t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Lt,Rt.width,Rt.height);for(let we=0;we<6;we++){ze=st[we].mipmaps;for(let pt=0;pt<ze.length;pt++){const Ft=ze[pt];T.format!==Zn?At!==null?K?Ie&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,0,0,Ft.width,Ft.height,At,Ft.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,Lt,Ft.width,Ft.height,0,Ft.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,0,0,Ft.width,Ft.height,At,Ye,Ft.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,Lt,Ft.width,Ft.height,0,At,Ye,Ft.data)}}}else{if(ze=T.mipmaps,K&&$e){ze.length>0&&ut++;const we=jt(st[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Lt,we.width,we.height)}for(let we=0;we<6;we++)if(Ue){K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,0,0,st[we].width,st[we].height,At,Ye,st[we].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,Lt,st[we].width,st[we].height,0,At,Ye,st[we].data);for(let pt=0;pt<ze.length;pt++){const Qt=ze[pt].image[we].image;K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,0,0,Qt.width,Qt.height,At,Ye,Qt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,Lt,Qt.width,Qt.height,0,At,Ye,Qt.data)}}else{K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,0,0,At,Ye,st[we]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,Lt,At,Ye,st[we]);for(let pt=0;pt<ze.length;pt++){const Ft=ze[pt];K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,0,0,At,Ye,Ft.image[we]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,Lt,At,Ye,Ft.image[we])}}}p(T)&&f(s.TEXTURE_CUBE_MAP),ye.__version=De.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function ue(k,T,oe,Se,De,ye){const vt=r.convert(oe.format,oe.colorSpace),Ze=r.convert(oe.type),mt=b(oe.internalFormat,vt,Ze,oe.colorSpace),yt=n.get(T),Ue=n.get(oe);if(Ue.__renderTarget=T,!yt.__hasExternalTextures){const st=Math.max(1,T.width>>ye),Rt=Math.max(1,T.height>>ye);De===s.TEXTURE_3D||De===s.TEXTURE_2D_ARRAY?t.texImage3D(De,ye,mt,st,Rt,T.depth,0,vt,Ze,null):t.texImage2D(De,ye,mt,st,Rt,0,vt,Ze,null)}t.bindFramebuffer(s.FRAMEBUFFER,k),tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,Se,De,Ue.__webglTexture,0,Fe(T)):(De===s.TEXTURE_2D||De>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,Se,De,Ue.__webglTexture,ye),t.bindFramebuffer(s.FRAMEBUFFER,null)}function $(k,T,oe){if(s.bindRenderbuffer(s.RENDERBUFFER,k),T.depthBuffer){const Se=T.depthTexture,De=Se&&Se.isDepthTexture?Se.type:null,ye=S(T.stencilBuffer,De),vt=T.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ze=Fe(T);tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ze,ye,T.width,T.height):oe?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ze,ye,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,ye,T.width,T.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,vt,s.RENDERBUFFER,k)}else{const Se=T.textures;for(let De=0;De<Se.length;De++){const ye=Se[De],vt=r.convert(ye.format,ye.colorSpace),Ze=r.convert(ye.type),mt=b(ye.internalFormat,vt,Ze,ye.colorSpace),yt=Fe(T);oe&&tt(T)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,yt,mt,T.width,T.height):tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,yt,mt,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,mt,T.width,T.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function pe(k,T){if(T&&T.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,k),!(T.depthTexture&&T.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Se=n.get(T.depthTexture);Se.__renderTarget=T,(!Se.__webglTexture||T.depthTexture.image.width!==T.width||T.depthTexture.image.height!==T.height)&&(T.depthTexture.image.width=T.width,T.depthTexture.image.height=T.height,T.depthTexture.needsUpdate=!0),ae(T.depthTexture,0);const De=Se.__webglTexture,ye=Fe(T);if(T.depthTexture.format===yr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,De,0,ye):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,De,0);else if(T.depthTexture.format===xr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,De,0,ye):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,De,0);else throw new Error("Unknown depthTexture format")}function Ce(k){const T=n.get(k),oe=k.isWebGLCubeRenderTarget===!0;if(T.__boundDepthTexture!==k.depthTexture){const Se=k.depthTexture;if(T.__depthDisposeCallback&&T.__depthDisposeCallback(),Se){const De=()=>{delete T.__boundDepthTexture,delete T.__depthDisposeCallback,Se.removeEventListener("dispose",De)};Se.addEventListener("dispose",De),T.__depthDisposeCallback=De}T.__boundDepthTexture=Se}if(k.depthTexture&&!T.__autoAllocateDepthBuffer){if(oe)throw new Error("target.depthTexture not supported in Cube render targets");const Se=k.texture.mipmaps;Se&&Se.length>0?pe(T.__webglFramebuffer[0],k):pe(T.__webglFramebuffer,k)}else if(oe){T.__webglDepthbuffer=[];for(let Se=0;Se<6;Se++)if(t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[Se]),T.__webglDepthbuffer[Se]===void 0)T.__webglDepthbuffer[Se]=s.createRenderbuffer(),$(T.__webglDepthbuffer[Se],k,!1);else{const De=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ye=T.__webglDepthbuffer[Se];s.bindRenderbuffer(s.RENDERBUFFER,ye),s.framebufferRenderbuffer(s.FRAMEBUFFER,De,s.RENDERBUFFER,ye)}}else{const Se=k.texture.mipmaps;if(Se&&Se.length>0?t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer),T.__webglDepthbuffer===void 0)T.__webglDepthbuffer=s.createRenderbuffer(),$(T.__webglDepthbuffer,k,!1);else{const De=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ye=T.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,ye),s.framebufferRenderbuffer(s.FRAMEBUFFER,De,s.RENDERBUFFER,ye)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function Ke(k,T,oe){const Se=n.get(k);T!==void 0&&ue(Se.__webglFramebuffer,k,k.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),oe!==void 0&&Ce(k)}function He(k){const T=k.texture,oe=n.get(k),Se=n.get(T);k.addEventListener("dispose",R);const De=k.textures,ye=k.isWebGLCubeRenderTarget===!0,vt=De.length>1;if(vt||(Se.__webglTexture===void 0&&(Se.__webglTexture=s.createTexture()),Se.__version=T.version,o.memory.textures++),ye){oe.__webglFramebuffer=[];for(let Ze=0;Ze<6;Ze++)if(T.mipmaps&&T.mipmaps.length>0){oe.__webglFramebuffer[Ze]=[];for(let mt=0;mt<T.mipmaps.length;mt++)oe.__webglFramebuffer[Ze][mt]=s.createFramebuffer()}else oe.__webglFramebuffer[Ze]=s.createFramebuffer()}else{if(T.mipmaps&&T.mipmaps.length>0){oe.__webglFramebuffer=[];for(let Ze=0;Ze<T.mipmaps.length;Ze++)oe.__webglFramebuffer[Ze]=s.createFramebuffer()}else oe.__webglFramebuffer=s.createFramebuffer();if(vt)for(let Ze=0,mt=De.length;Ze<mt;Ze++){const yt=n.get(De[Ze]);yt.__webglTexture===void 0&&(yt.__webglTexture=s.createTexture(),o.memory.textures++)}if(k.samples>0&&tt(k)===!1){oe.__webglMultisampledFramebuffer=s.createFramebuffer(),oe.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,oe.__webglMultisampledFramebuffer);for(let Ze=0;Ze<De.length;Ze++){const mt=De[Ze];oe.__webglColorRenderbuffer[Ze]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ze]);const yt=r.convert(mt.format,mt.colorSpace),Ue=r.convert(mt.type),st=b(mt.internalFormat,yt,Ue,mt.colorSpace,k.isXRRenderTarget===!0),Rt=Fe(k);s.renderbufferStorageMultisample(s.RENDERBUFFER,Rt,st,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ze,s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ze])}s.bindRenderbuffer(s.RENDERBUFFER,null),k.depthBuffer&&(oe.__webglDepthRenderbuffer=s.createRenderbuffer(),$(oe.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(ye){t.bindTexture(s.TEXTURE_CUBE_MAP,Se.__webglTexture),ge(s.TEXTURE_CUBE_MAP,T);for(let Ze=0;Ze<6;Ze++)if(T.mipmaps&&T.mipmaps.length>0)for(let mt=0;mt<T.mipmaps.length;mt++)ue(oe.__webglFramebuffer[Ze][mt],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ze,mt);else ue(oe.__webglFramebuffer[Ze],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ze,0);p(T)&&f(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(vt){for(let Ze=0,mt=De.length;Ze<mt;Ze++){const yt=De[Ze],Ue=n.get(yt);t.bindTexture(s.TEXTURE_2D,Ue.__webglTexture),ge(s.TEXTURE_2D,yt),ue(oe.__webglFramebuffer,k,yt,s.COLOR_ATTACHMENT0+Ze,s.TEXTURE_2D,0),p(yt)&&f(s.TEXTURE_2D)}t.unbindTexture()}else{let Ze=s.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(Ze=k.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Ze,Se.__webglTexture),ge(Ze,T),T.mipmaps&&T.mipmaps.length>0)for(let mt=0;mt<T.mipmaps.length;mt++)ue(oe.__webglFramebuffer[mt],k,T,s.COLOR_ATTACHMENT0,Ze,mt);else ue(oe.__webglFramebuffer,k,T,s.COLOR_ATTACHMENT0,Ze,0);p(T)&&f(Ze),t.unbindTexture()}k.depthBuffer&&Ce(k)}function O(k){const T=k.textures;for(let oe=0,Se=T.length;oe<Se;oe++){const De=T[oe];if(p(De)){const ye=v(k),vt=n.get(De).__webglTexture;t.bindTexture(ye,vt),f(ye),t.unbindTexture()}}}const _t=[],dt=[];function at(k){if(k.samples>0){if(tt(k)===!1){const T=k.textures,oe=k.width,Se=k.height;let De=s.COLOR_BUFFER_BIT;const ye=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,vt=n.get(k),Ze=T.length>1;if(Ze)for(let yt=0;yt<T.length;yt++)t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,vt.__webglMultisampledFramebuffer);const mt=k.texture.mipmaps;mt&&mt.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglFramebuffer);for(let yt=0;yt<T.length;yt++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(De|=s.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(De|=s.STENCIL_BUFFER_BIT)),Ze){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,vt.__webglColorRenderbuffer[yt]);const Ue=n.get(T[yt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Ue,0)}s.blitFramebuffer(0,0,oe,Se,0,0,oe,Se,De,s.NEAREST),l===!0&&(_t.length=0,dt.length=0,_t.push(s.COLOR_ATTACHMENT0+yt),k.depthBuffer&&k.resolveDepthBuffer===!1&&(_t.push(ye),dt.push(ye),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,dt)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,_t))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Ze)for(let yt=0;yt<T.length;yt++){t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.RENDERBUFFER,vt.__webglColorRenderbuffer[yt]);const Ue=n.get(T[yt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.TEXTURE_2D,Ue,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const T=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[T])}}}function Fe(k){return Math.min(i.maxSamples,k.samples)}function tt(k){const T=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&T.__useRenderToTexture!==!1}function Le(k){const T=o.render.frame;d.get(k)!==T&&(d.set(k,T),k.update())}function ot(k,T){const oe=k.colorSpace,Se=k.format,De=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||oe!==Xs&&oe!==Hi&&(Gt.getTransfer(oe)===an?(Se!==Zn||De!==mi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",oe)),T}function jt(k){return typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement?(c.width=k.naturalWidth||k.width,c.height=k.naturalHeight||k.height):typeof VideoFrame<"u"&&k instanceof VideoFrame?(c.width=k.displayWidth,c.height=k.displayHeight):(c.width=k.width,c.height=k.height),c}this.allocateTextureUnit=H,this.resetTextureUnits=B,this.setTexture2D=ae,this.setTexture2DArray=G,this.setTexture3D=le,this.setTextureCube=Z,this.rebindTextures=Ke,this.setupRenderTarget=He,this.updateRenderTargetMipmap=O,this.updateMultisampleRenderTarget=at,this.setupDepthRenderbuffer=Ce,this.setupFrameBufferTexture=ue,this.useMultisampledRTT=tt}function T3(s,e){function t(n,i=Hi){let r;const o=Gt.getTransfer(i);if(n===mi)return s.UNSIGNED_BYTE;if(n===Xl)return s.UNSIGNED_SHORT_4_4_4_4;if(n===jl)return s.UNSIGNED_SHORT_5_5_5_1;if(n===b0)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===x0)return s.BYTE;if(n===M0)return s.SHORT;if(n===_r)return s.UNSIGNED_SHORT;if(n===Wl)return s.INT;if(n===hs)return s.UNSIGNED_INT;if(n===fi)return s.FLOAT;if(n===Sr)return s.HALF_FLOAT;if(n===S0)return s.ALPHA;if(n===E0)return s.RGB;if(n===Zn)return s.RGBA;if(n===yr)return s.DEPTH_COMPONENT;if(n===xr)return s.DEPTH_STENCIL;if(n===A0)return s.RED;if(n===ql)return s.RED_INTEGER;if(n===w0)return s.RG;if(n===$l)return s.RG_INTEGER;if(n===Yl)return s.RGBA_INTEGER;if(n===ga||n===_a||n===va||n===ya)if(o===an)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===ga)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===ga)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===tl||n===nl||n===il||n===sl)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===tl)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===nl)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===il)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===sl)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===rl||n===al||n===ol)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===rl||n===al)return o===an?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===ll||n===cl||n===hl||n===ul||n===dl||n===fl||n===pl||n===ml||n===gl||n===_l||n===vl||n===yl||n===xl||n===Ml)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===ll)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===xa||n===bl||n===Sl)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===xa)return o===an?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===bl)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Sl)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===T0||n===El||n===Al||n===wl)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===xa)return r.COMPRESSED_RED_RGTC1_EXT;if(n===El)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Al)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===wl)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===vr?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:t}}const C3=`
|
|
3803
|
+
}`;function S3(s,e,t){let n=new nc;const i=new Je,r=new Je,o=new Ot,a=new R1({depthPacking:o2}),l=new D1,c={},d=t.maxTextureSize,m={[Yn]:Dn,[Dn]:Yn,[cn]:cn},u=new Ti({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Je},radius:{value:4}},vertexShader:M3,fragmentShader:b3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new rn;g.setAttribute("position",new hn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Pt(g,u),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v0;let p=this.type;this.render=function(L,P,I){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||L.length===0)return;const A=s.getRenderTarget(),E=s.getActiveCubeFace(),F=s.getActiveMipmapLevel(),B=s.state;B.setBlending(ki),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const X=p!==yi&&this.type===yi,Z=p===yi&&this.type!==yi;for(let se=0,W=L.length;se<W;se++){const he=L[se],Q=he.shadow;if(Q===void 0){console.warn("THREE.WebGLShadowMap:",he,"has no shadow.");continue}if(Q.autoUpdate===!1&&Q.needsUpdate===!1)continue;i.copy(Q.mapSize);const xe=Q.getFrameExtents();if(i.multiply(xe),r.copy(Q.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/xe.x),i.x=r.x*xe.x,Q.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/xe.y),i.y=r.y*xe.y,Q.mapSize.y=r.y)),Q.map===null||X===!0||Z===!0){const Ae=this.type!==yi?{minFilter:Vn,magFilter:Vn}:{};Q.map!==null&&Q.map.dispose(),Q.map=new cs(i.x,i.y,Ae),Q.map.texture.name=he.name+".shadowMap",Q.camera.updateProjectionMatrix()}s.setRenderTarget(Q.map),s.clear();const De=Q.getViewportCount();for(let Ae=0;Ae<De;Ae++){const pe=Q.getViewport(Ae);o.set(r.x*pe.x,r.y*pe.y,r.x*pe.z,r.y*pe.w),B.viewport(o),Q.updateMatrices(he,Ae),n=Q.getFrustum(),b(P,I,Q.camera,he,this.type)}Q.isPointLightShadow!==!0&&this.type===yi&&x(Q,I),Q.needsUpdate=!1}p=this.type,f.needsUpdate=!1,s.setRenderTarget(A,E,F)};function x(L,P){const I=e.update(_);u.defines.VSM_SAMPLES!==L.blurSamples&&(u.defines.VSM_SAMPLES=L.blurSamples,h.defines.VSM_SAMPLES=L.blurSamples,u.needsUpdate=!0,h.needsUpdate=!0),L.mapPass===null&&(L.mapPass=new cs(i.x,i.y)),u.uniforms.shadow_pass.value=L.map.texture,u.uniforms.resolution.value=L.mapSize,u.uniforms.radius.value=L.radius,s.setRenderTarget(L.mapPass),s.clear(),s.renderBufferDirect(P,null,I,u,_,null),h.uniforms.shadow_pass.value=L.mapPass.texture,h.uniforms.resolution.value=L.mapSize,h.uniforms.radius.value=L.radius,s.setRenderTarget(L.map),s.clear(),s.renderBufferDirect(P,null,I,h,_,null)}function M(L,P,I,A){let E=null;const F=I.isPointLight===!0?L.customDistanceMaterial:L.customDepthMaterial;if(F!==void 0)E=F;else if(E=I.isPointLight===!0?l:a,s.localClippingEnabled&&P.clipShadows===!0&&Array.isArray(P.clippingPlanes)&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0||P.alphaToCoverage===!0){const B=E.uuid,X=P.uuid;let Z=c[B];Z===void 0&&(Z={},c[B]=Z);let se=Z[X];se===void 0&&(se=E.clone(),Z[X]=se,P.addEventListener("dispose",N)),E=se}if(E.visible=P.visible,E.wireframe=P.wireframe,A===yi?E.side=P.shadowSide!==null?P.shadowSide:P.side:E.side=P.shadowSide!==null?P.shadowSide:m[P.side],E.alphaMap=P.alphaMap,E.alphaTest=P.alphaToCoverage===!0?.5:P.alphaTest,E.map=P.map,E.clipShadows=P.clipShadows,E.clippingPlanes=P.clippingPlanes,E.clipIntersection=P.clipIntersection,E.displacementMap=P.displacementMap,E.displacementScale=P.displacementScale,E.displacementBias=P.displacementBias,E.wireframeLinewidth=P.wireframeLinewidth,E.linewidth=P.linewidth,I.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const B=s.properties.get(E);B.light=I}return E}function b(L,P,I,A,E){if(L.visible===!1)return;if(L.layers.test(P.layers)&&(L.isMesh||L.isLine||L.isPoints)&&(L.castShadow||L.receiveShadow&&E===yi)&&(!L.frustumCulled||n.intersectsObject(L))){L.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,L.matrixWorld);const X=e.update(L),Z=L.material;if(Array.isArray(Z)){const se=X.groups;for(let W=0,he=se.length;W<he;W++){const Q=se[W],xe=Z[Q.materialIndex];if(xe&&xe.visible){const De=M(L,xe,A,E);L.onBeforeShadow(s,L,P,I,X,De,Q),s.renderBufferDirect(I,null,X,De,L,Q),L.onAfterShadow(s,L,P,I,X,De,Q)}}}else if(Z.visible){const se=M(L,Z,A,E);L.onBeforeShadow(s,L,P,I,X,se,null),s.renderBufferDirect(I,null,X,se,L,null),L.onAfterShadow(s,L,P,I,X,se,null)}}const B=L.children;for(let X=0,Z=B.length;X<Z;X++)b(B[X],P,I,A,E)}function N(L){L.target.removeEventListener("dispose",N);for(const I in c){const A=c[I],E=L.target.uuid;E in A&&(A[E].dispose(),delete A[E])}}}const E3={[Xo]:jo,[qo]:Ko,[$o]:Jo,[Hs]:Yo,[jo]:Xo,[Ko]:qo,[Jo]:$o,[Yo]:Hs};function A3(s,e){function t(){let J=!1;const tt=new Ot;let Ne=null;const lt=new Ot(0,0,0,0);return{setMask:function(ke){Ne!==ke&&!J&&(s.colorMask(ke,ke,ke,ke),Ne=ke)},setLocked:function(ke){J=ke},setClear:function(ke,Re,ot,Tt,qt){qt===!0&&(ke*=Tt,Re*=Tt,ot*=Tt),tt.set(ke,Re,ot,Tt),lt.equals(tt)===!1&&(s.clearColor(ke,Re,ot,Tt),lt.copy(tt))},reset:function(){J=!1,Ne=null,lt.set(-1,0,0,0)}}}function n(){let J=!1,tt=!1,Ne=null,lt=null,ke=null;return{setReversed:function(Re){if(tt!==Re){const ot=e.get("EXT_clip_control");Re?ot.clipControlEXT(ot.LOWER_LEFT_EXT,ot.ZERO_TO_ONE_EXT):ot.clipControlEXT(ot.LOWER_LEFT_EXT,ot.NEGATIVE_ONE_TO_ONE_EXT),tt=Re;const Tt=ke;ke=null,this.setClear(Tt)}},getReversed:function(){return tt},setTest:function(Re){Re?ee(s.DEPTH_TEST):fe(s.DEPTH_TEST)},setMask:function(Re){Ne!==Re&&!J&&(s.depthMask(Re),Ne=Re)},setFunc:function(Re){if(tt&&(Re=E3[Re]),lt!==Re){switch(Re){case Xo:s.depthFunc(s.NEVER);break;case jo:s.depthFunc(s.ALWAYS);break;case qo:s.depthFunc(s.LESS);break;case Hs:s.depthFunc(s.LEQUAL);break;case $o:s.depthFunc(s.EQUAL);break;case Yo:s.depthFunc(s.GEQUAL);break;case Ko:s.depthFunc(s.GREATER);break;case Jo:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}lt=Re}},setLocked:function(Re){J=Re},setClear:function(Re){ke!==Re&&(tt&&(Re=1-Re),s.clearDepth(Re),ke=Re)},reset:function(){J=!1,Ne=null,lt=null,ke=null,tt=!1}}}function i(){let J=!1,tt=null,Ne=null,lt=null,ke=null,Re=null,ot=null,Tt=null,qt=null;return{setTest:function(Rt){J||(Rt?ee(s.STENCIL_TEST):fe(s.STENCIL_TEST))},setMask:function(Rt){tt!==Rt&&!J&&(s.stencilMask(Rt),tt=Rt)},setFunc:function(Rt,bn,In){(Ne!==Rt||lt!==bn||ke!==In)&&(s.stencilFunc(Rt,bn,In),Ne=Rt,lt=bn,ke=In)},setOp:function(Rt,bn,In){(Re!==Rt||ot!==bn||Tt!==In)&&(s.stencilOp(Rt,bn,In),Re=Rt,ot=bn,Tt=In)},setLocked:function(Rt){J=Rt},setClear:function(Rt){qt!==Rt&&(s.clearStencil(Rt),qt=Rt)},reset:function(){J=!1,tt=null,Ne=null,lt=null,ke=null,Re=null,ot=null,Tt=null,qt=null}}}const r=new t,o=new n,a=new i,l=new WeakMap,c=new WeakMap;let d={},m={},u=new WeakMap,h=[],g=null,_=!1,f=null,p=null,x=null,M=null,b=null,N=null,L=null,P=new bt(0,0,0),I=0,A=!1,E=null,F=null,B=null,X=null,Z=null;const se=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let W=!1,he=0;const Q=s.getParameter(s.VERSION);Q.indexOf("WebGL")!==-1?(he=parseFloat(/^WebGL (\d)/.exec(Q)[1]),W=he>=1):Q.indexOf("OpenGL ES")!==-1&&(he=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),W=he>=2);let xe=null,De={};const Ae=s.getParameter(s.SCISSOR_BOX),pe=s.getParameter(s.VIEWPORT),re=new Ot().fromArray(Ae),q=new Ot().fromArray(pe);function K(J,tt,Ne,lt){const ke=new Uint8Array(4),Re=s.createTexture();s.bindTexture(J,Re),s.texParameteri(J,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(J,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let ot=0;ot<Ne;ot++)J===s.TEXTURE_3D||J===s.TEXTURE_2D_ARRAY?s.texImage3D(tt,0,s.RGBA,1,1,lt,0,s.RGBA,s.UNSIGNED_BYTE,ke):s.texImage2D(tt+ot,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,ke);return Re}const te={};te[s.TEXTURE_2D]=K(s.TEXTURE_2D,s.TEXTURE_2D,1),te[s.TEXTURE_CUBE_MAP]=K(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),te[s.TEXTURE_2D_ARRAY]=K(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),te[s.TEXTURE_3D]=K(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),ee(s.DEPTH_TEST),o.setFunc(Hs),st(!1),it(vc),ee(s.CULL_FACE),O(ki);function ee(J){d[J]!==!0&&(s.enable(J),d[J]=!0)}function fe(J){d[J]!==!1&&(s.disable(J),d[J]=!1)}function Y(J,tt){return m[J]!==tt?(s.bindFramebuffer(J,tt),m[J]=tt,J===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=tt),J===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=tt),!0):!1}function me(J,tt){let Ne=h,lt=!1;if(J){Ne=u.get(tt),Ne===void 0&&(Ne=[],u.set(tt,Ne));const ke=J.textures;if(Ne.length!==ke.length||Ne[0]!==s.COLOR_ATTACHMENT0){for(let Re=0,ot=ke.length;Re<ot;Re++)Ne[Re]=s.COLOR_ATTACHMENT0+Re;Ne.length=ke.length,lt=!0}}else Ne[0]!==s.BACK&&(Ne[0]=s.BACK,lt=!0);lt&&s.drawBuffers(Ne)}function Te(J){return g!==J?(s.useProgram(J),g=J,!0):!1}const et={[is]:s.FUNC_ADD,[Pu]:s.FUNC_SUBTRACT,[Fu]:s.FUNC_REVERSE_SUBTRACT};et[Nu]=s.MIN,et[Uu]=s.MAX;const We={[Iu]:s.ZERO,[zu]:s.ONE,[Bu]:s.SRC_COLOR,[Go]:s.SRC_ALPHA,[Wu]:s.SRC_ALPHA_SATURATE,[Hu]:s.DST_COLOR,[ku]:s.DST_ALPHA,[Ou]:s.ONE_MINUS_SRC_COLOR,[Wo]:s.ONE_MINUS_SRC_ALPHA,[Gu]:s.ONE_MINUS_DST_COLOR,[Vu]:s.ONE_MINUS_DST_ALPHA,[Xu]:s.CONSTANT_COLOR,[ju]:s.ONE_MINUS_CONSTANT_COLOR,[qu]:s.CONSTANT_ALPHA,[$u]:s.ONE_MINUS_CONSTANT_ALPHA};function O(J,tt,Ne,lt,ke,Re,ot,Tt,qt,Rt){if(J===ki){_===!0&&(fe(s.BLEND),_=!1);return}if(_===!1&&(ee(s.BLEND),_=!0),J!==Lu){if(J!==f||Rt!==A){if((p!==is||b!==is)&&(s.blendEquation(s.FUNC_ADD),p=is,b=is),Rt)switch(J){case Bs:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.ONE,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.SRC_COLOR,s.ZERO,s.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",J);break}else switch(J){case Bs:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.SRC_ALPHA,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFunc(s.ZERO,s.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",J);break}x=null,M=null,N=null,L=null,P.set(0,0,0),I=0,f=J,A=Rt}return}ke=ke||tt,Re=Re||Ne,ot=ot||lt,(tt!==p||ke!==b)&&(s.blendEquationSeparate(et[tt],et[ke]),p=tt,b=ke),(Ne!==x||lt!==M||Re!==N||ot!==L)&&(s.blendFuncSeparate(We[Ne],We[lt],We[Re],We[ot]),x=Ne,M=lt,N=Re,L=ot),(Tt.equals(P)===!1||qt!==I)&&(s.blendColor(Tt.r,Tt.g,Tt.b,qt),P.copy(Tt),I=qt),f=J,A=!1}function dt(J,tt){J.side===cn?fe(s.CULL_FACE):ee(s.CULL_FACE);let Ne=J.side===Dn;tt&&(Ne=!Ne),st(Ne),J.blending===Bs&&J.transparent===!1?O(ki):O(J.blending,J.blendEquation,J.blendSrc,J.blendDst,J.blendEquationAlpha,J.blendSrcAlpha,J.blendDstAlpha,J.blendColor,J.blendAlpha,J.premultipliedAlpha),o.setFunc(J.depthFunc),o.setTest(J.depthTest),o.setMask(J.depthWrite),r.setMask(J.colorWrite);const lt=J.stencilWrite;a.setTest(lt),lt&&(a.setMask(J.stencilWriteMask),a.setFunc(J.stencilFunc,J.stencilRef,J.stencilFuncMask),a.setOp(J.stencilFail,J.stencilZFail,J.stencilZPass)),Ze(J.polygonOffset,J.polygonOffsetFactor,J.polygonOffsetUnits),J.alphaToCoverage===!0?ee(s.SAMPLE_ALPHA_TO_COVERAGE):fe(s.SAMPLE_ALPHA_TO_COVERAGE)}function st(J){E!==J&&(J?s.frontFace(s.CW):s.frontFace(s.CCW),E=J)}function it(J){J!==Ru?(ee(s.CULL_FACE),J!==F&&(J===vc?s.cullFace(s.BACK):J===Du?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):fe(s.CULL_FACE),F=J}function Ie(J){J!==B&&(W&&s.lineWidth(J),B=J)}function Ze(J,tt,Ne){J?(ee(s.POLYGON_OFFSET_FILL),(X!==tt||Z!==Ne)&&(s.polygonOffset(tt,Ne),X=tt,Z=Ne)):fe(s.POLYGON_OFFSET_FILL)}function Le(J){J?ee(s.SCISSOR_TEST):fe(s.SCISSOR_TEST)}function rt(J){J===void 0&&(J=s.TEXTURE0+se-1),xe!==J&&(s.activeTexture(J),xe=J)}function Xt(J,tt,Ne){Ne===void 0&&(xe===null?Ne=s.TEXTURE0+se-1:Ne=xe);let lt=De[Ne];lt===void 0&&(lt={type:void 0,texture:void 0},De[Ne]=lt),(lt.type!==J||lt.texture!==tt)&&(xe!==Ne&&(s.activeTexture(Ne),xe=Ne),s.bindTexture(J,tt||te[J]),lt.type=J,lt.texture=tt)}function k(){const J=De[xe];J!==void 0&&J.type!==void 0&&(s.bindTexture(J.type,null),J.type=void 0,J.texture=void 0)}function R(){try{s.compressedTexImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function oe(){try{s.compressedTexImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function we(){try{s.texSubImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Pe(){try{s.texSubImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function be(){try{s.compressedTexSubImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function _t(){try{s.compressedTexSubImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Ke(){try{s.texStorage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function ft(){try{s.texStorage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function vt(){try{s.texImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Fe(){try{s.texImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function at(J){re.equals(J)===!1&&(s.scissor(J.x,J.y,J.z,J.w),re.copy(J))}function Et(J){q.equals(J)===!1&&(s.viewport(J.x,J.y,J.z,J.w),q.copy(J))}function St(J,tt){let Ne=c.get(tt);Ne===void 0&&(Ne=new WeakMap,c.set(tt,Ne));let lt=Ne.get(J);lt===void 0&&(lt=s.getUniformBlockIndex(tt,J.name),Ne.set(J,lt))}function $e(J,tt){const lt=c.get(tt).get(J);l.get(tt)!==lt&&(s.uniformBlockBinding(tt,lt,J.__bindingPointIndex),l.set(tt,lt))}function At(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),o.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),d={},xe=null,De={},m={},u=new WeakMap,h=[],g=null,_=!1,f=null,p=null,x=null,M=null,b=null,N=null,L=null,P=new bt(0,0,0),I=0,A=!1,E=null,F=null,B=null,X=null,Z=null,re.set(0,0,s.canvas.width,s.canvas.height),q.set(0,0,s.canvas.width,s.canvas.height),r.reset(),o.reset(),a.reset()}return{buffers:{color:r,depth:o,stencil:a},enable:ee,disable:fe,bindFramebuffer:Y,drawBuffers:me,useProgram:Te,setBlending:O,setMaterial:dt,setFlipSided:st,setCullFace:it,setLineWidth:Ie,setPolygonOffset:Ze,setScissorTest:Le,activeTexture:rt,bindTexture:Xt,unbindTexture:k,compressedTexImage2D:R,compressedTexImage3D:oe,texImage2D:vt,texImage3D:Fe,updateUBOMapping:St,uniformBlockBinding:$e,texStorage2D:Ke,texStorage3D:ft,texSubImage2D:we,texSubImage3D:Pe,compressedTexSubImage2D:be,compressedTexSubImage3D:_t,scissor:at,viewport:Et,reset:At}}function w3(s,e,t,n,i,r,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Je,d=new WeakMap;let m;const u=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(k,R){return h?new OffscreenCanvas(k,R):Mr("canvas")}function _(k,R,oe){let we=1;const Pe=Xt(k);if((Pe.width>oe||Pe.height>oe)&&(we=oe/Math.max(Pe.width,Pe.height)),we<1)if(typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&k instanceof ImageBitmap||typeof VideoFrame<"u"&&k instanceof VideoFrame){const be=Math.floor(we*Pe.width),_t=Math.floor(we*Pe.height);m===void 0&&(m=g(be,_t));const Ke=R?g(be,_t):m;return Ke.width=be,Ke.height=_t,Ke.getContext("2d").drawImage(k,0,0,be,_t),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Pe.width+"x"+Pe.height+") to ("+be+"x"+_t+")."),Ke}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Pe.width+"x"+Pe.height+")."),k;return k}function f(k){return k.generateMipmaps}function p(k){s.generateMipmap(k)}function x(k){return k.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:k.isWebGL3DRenderTarget?s.TEXTURE_3D:k.isWebGLArrayRenderTarget||k.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function M(k,R,oe,we,Pe=!1){if(k!==null){if(s[k]!==void 0)return s[k];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+k+"'")}let be=R;if(R===s.RED&&(oe===s.FLOAT&&(be=s.R32F),oe===s.HALF_FLOAT&&(be=s.R16F),oe===s.UNSIGNED_BYTE&&(be=s.R8)),R===s.RED_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.R8UI),oe===s.UNSIGNED_SHORT&&(be=s.R16UI),oe===s.UNSIGNED_INT&&(be=s.R32UI),oe===s.BYTE&&(be=s.R8I),oe===s.SHORT&&(be=s.R16I),oe===s.INT&&(be=s.R32I)),R===s.RG&&(oe===s.FLOAT&&(be=s.RG32F),oe===s.HALF_FLOAT&&(be=s.RG16F),oe===s.UNSIGNED_BYTE&&(be=s.RG8)),R===s.RG_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.RG8UI),oe===s.UNSIGNED_SHORT&&(be=s.RG16UI),oe===s.UNSIGNED_INT&&(be=s.RG32UI),oe===s.BYTE&&(be=s.RG8I),oe===s.SHORT&&(be=s.RG16I),oe===s.INT&&(be=s.RG32I)),R===s.RGB_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.RGB8UI),oe===s.UNSIGNED_SHORT&&(be=s.RGB16UI),oe===s.UNSIGNED_INT&&(be=s.RGB32UI),oe===s.BYTE&&(be=s.RGB8I),oe===s.SHORT&&(be=s.RGB16I),oe===s.INT&&(be=s.RGB32I)),R===s.RGBA_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.RGBA8UI),oe===s.UNSIGNED_SHORT&&(be=s.RGBA16UI),oe===s.UNSIGNED_INT&&(be=s.RGBA32UI),oe===s.BYTE&&(be=s.RGBA8I),oe===s.SHORT&&(be=s.RGBA16I),oe===s.INT&&(be=s.RGBA32I)),R===s.RGB&&oe===s.UNSIGNED_INT_5_9_9_9_REV&&(be=s.RGB9_E5),R===s.RGBA){const _t=Pe?Aa:Bt.getTransfer(we);oe===s.FLOAT&&(be=s.RGBA32F),oe===s.HALF_FLOAT&&(be=s.RGBA16F),oe===s.UNSIGNED_BYTE&&(be=_t===tn?s.SRGB8_ALPHA8:s.RGBA8),oe===s.UNSIGNED_SHORT_4_4_4_4&&(be=s.RGBA4),oe===s.UNSIGNED_SHORT_5_5_5_1&&(be=s.RGB5_A1)}return(be===s.R16F||be===s.R32F||be===s.RG16F||be===s.RG32F||be===s.RGBA16F||be===s.RGBA32F)&&e.get("EXT_color_buffer_float"),be}function b(k,R){let oe;return k?R===null||R===ls||R===vr?oe=s.DEPTH24_STENCIL8:R===li?oe=s.DEPTH32F_STENCIL8:R===_r&&(oe=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):R===null||R===ls||R===vr?oe=s.DEPTH_COMPONENT24:R===li?oe=s.DEPTH_COMPONENT32F:R===_r&&(oe=s.DEPTH_COMPONENT16),oe}function N(k,R){return f(k)===!0||k.isFramebufferTexture&&k.minFilter!==Vn&&k.minFilter!==kn?Math.log2(Math.max(R.width,R.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?R.mipmaps.length:1}function L(k){const R=k.target;R.removeEventListener("dispose",L),I(R),R.isVideoTexture&&d.delete(R)}function P(k){const R=k.target;R.removeEventListener("dispose",P),E(R)}function I(k){const R=n.get(k);if(R.__webglInit===void 0)return;const oe=k.source,we=u.get(oe);if(we){const Pe=we[R.__cacheKey];Pe.usedTimes--,Pe.usedTimes===0&&A(k),Object.keys(we).length===0&&u.delete(oe)}n.remove(k)}function A(k){const R=n.get(k);s.deleteTexture(R.__webglTexture);const oe=k.source,we=u.get(oe);delete we[R.__cacheKey],o.memory.textures--}function E(k){const R=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let we=0;we<6;we++){if(Array.isArray(R.__webglFramebuffer[we]))for(let Pe=0;Pe<R.__webglFramebuffer[we].length;Pe++)s.deleteFramebuffer(R.__webglFramebuffer[we][Pe]);else s.deleteFramebuffer(R.__webglFramebuffer[we]);R.__webglDepthbuffer&&s.deleteRenderbuffer(R.__webglDepthbuffer[we])}else{if(Array.isArray(R.__webglFramebuffer))for(let we=0;we<R.__webglFramebuffer.length;we++)s.deleteFramebuffer(R.__webglFramebuffer[we]);else s.deleteFramebuffer(R.__webglFramebuffer);if(R.__webglDepthbuffer&&s.deleteRenderbuffer(R.__webglDepthbuffer),R.__webglMultisampledFramebuffer&&s.deleteFramebuffer(R.__webglMultisampledFramebuffer),R.__webglColorRenderbuffer)for(let we=0;we<R.__webglColorRenderbuffer.length;we++)R.__webglColorRenderbuffer[we]&&s.deleteRenderbuffer(R.__webglColorRenderbuffer[we]);R.__webglDepthRenderbuffer&&s.deleteRenderbuffer(R.__webglDepthRenderbuffer)}const oe=k.textures;for(let we=0,Pe=oe.length;we<Pe;we++){const be=n.get(oe[we]);be.__webglTexture&&(s.deleteTexture(be.__webglTexture),o.memory.textures--),n.remove(oe[we])}n.remove(k)}let F=0;function B(){F=0}function X(){const k=F;return k>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+i.maxTextures),F+=1,k}function Z(k){const R=[];return R.push(k.wrapS),R.push(k.wrapT),R.push(k.wrapR||0),R.push(k.magFilter),R.push(k.minFilter),R.push(k.anisotropy),R.push(k.internalFormat),R.push(k.format),R.push(k.type),R.push(k.generateMipmaps),R.push(k.premultiplyAlpha),R.push(k.flipY),R.push(k.unpackAlignment),R.push(k.colorSpace),R.join()}function se(k,R){const oe=n.get(k);if(k.isVideoTexture&&Le(k),k.isRenderTargetTexture===!1&&k.version>0&&oe.__version!==k.version){const we=k.image;if(we===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(we.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{te(oe,k,R);return}}t.bindTexture(s.TEXTURE_2D,oe.__webglTexture,s.TEXTURE0+R)}function W(k,R){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){te(oe,k,R);return}t.bindTexture(s.TEXTURE_2D_ARRAY,oe.__webglTexture,s.TEXTURE0+R)}function he(k,R){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){te(oe,k,R);return}t.bindTexture(s.TEXTURE_3D,oe.__webglTexture,s.TEXTURE0+R)}function Q(k,R){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ee(oe,k,R);return}t.bindTexture(s.TEXTURE_CUBE_MAP,oe.__webglTexture,s.TEXTURE0+R)}const xe={[oi]:s.REPEAT,[ei]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},De={[Vn]:s.NEAREST,[s2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[kn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[Mi]:s.LINEAR_MIPMAP_LINEAR},Ae={[c2]:s.NEVER,[m2]:s.ALWAYS,[h2]:s.LESS,[C0]:s.LEQUAL,[u2]:s.EQUAL,[p2]:s.GEQUAL,[d2]:s.GREATER,[f2]:s.NOTEQUAL};function pe(k,R){if(R.type===li&&e.has("OES_texture_float_linear")===!1&&(R.magFilter===kn||R.magFilter===Xa||R.magFilter===wr||R.magFilter===Mi||R.minFilter===kn||R.minFilter===Xa||R.minFilter===wr||R.minFilter===Mi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(k,s.TEXTURE_WRAP_S,xe[R.wrapS]),s.texParameteri(k,s.TEXTURE_WRAP_T,xe[R.wrapT]),(k===s.TEXTURE_3D||k===s.TEXTURE_2D_ARRAY)&&s.texParameteri(k,s.TEXTURE_WRAP_R,xe[R.wrapR]),s.texParameteri(k,s.TEXTURE_MAG_FILTER,De[R.magFilter]),s.texParameteri(k,s.TEXTURE_MIN_FILTER,De[R.minFilter]),R.compareFunction&&(s.texParameteri(k,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(k,s.TEXTURE_COMPARE_FUNC,Ae[R.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(R.magFilter===Vn||R.minFilter!==wr&&R.minFilter!==Mi||R.type===li&&e.has("OES_texture_float_linear")===!1)return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const oe=e.get("EXT_texture_filter_anisotropic");s.texParameterf(k,oe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,i.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function re(k,R){let oe=!1;k.__webglInit===void 0&&(k.__webglInit=!0,R.addEventListener("dispose",L));const we=R.source;let Pe=u.get(we);Pe===void 0&&(Pe={},u.set(we,Pe));const be=Z(R);if(be!==k.__cacheKey){Pe[be]===void 0&&(Pe[be]={texture:s.createTexture(),usedTimes:0},o.memory.textures++,oe=!0),Pe[be].usedTimes++;const _t=Pe[k.__cacheKey];_t!==void 0&&(Pe[k.__cacheKey].usedTimes--,_t.usedTimes===0&&A(R)),k.__cacheKey=be,k.__webglTexture=Pe[be].texture}return oe}function q(k,R,oe){return Math.floor(Math.floor(k/oe)/R)}function K(k,R,oe,we){const be=k.updateRanges;if(be.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,R.width,R.height,oe,we,R.data);else{be.sort((Fe,at)=>Fe.start-at.start);let _t=0;for(let Fe=1;Fe<be.length;Fe++){const at=be[_t],Et=be[Fe],St=at.start+at.count,$e=q(Et.start,R.width,4),At=q(at.start,R.width,4);Et.start<=St+1&&$e===At&&q(Et.start+Et.count-1,R.width,4)===$e?at.count=Math.max(at.count,Et.start+Et.count-at.start):(++_t,be[_t]=Et)}be.length=_t+1;const Ke=s.getParameter(s.UNPACK_ROW_LENGTH),ft=s.getParameter(s.UNPACK_SKIP_PIXELS),vt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,R.width);for(let Fe=0,at=be.length;Fe<at;Fe++){const Et=be[Fe],St=Math.floor(Et.start/4),$e=Math.ceil(Et.count/4),At=St%R.width,J=Math.floor(St/R.width),tt=$e,Ne=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,At),s.pixelStorei(s.UNPACK_SKIP_ROWS,J),t.texSubImage2D(s.TEXTURE_2D,0,At,J,tt,Ne,oe,we,R.data)}k.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Ke),s.pixelStorei(s.UNPACK_SKIP_PIXELS,ft),s.pixelStorei(s.UNPACK_SKIP_ROWS,vt)}}function te(k,R,oe){let we=s.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(we=s.TEXTURE_2D_ARRAY),R.isData3DTexture&&(we=s.TEXTURE_3D);const Pe=re(k,R),be=R.source;t.bindTexture(we,k.__webglTexture,s.TEXTURE0+oe);const _t=n.get(be);if(be.version!==_t.__version||Pe===!0){t.activeTexture(s.TEXTURE0+oe);const Ke=Bt.getPrimaries(Bt.workingColorSpace),ft=R.colorSpace===Bi?null:Bt.getPrimaries(R.colorSpace),vt=R.colorSpace===Bi||Ke===ft?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,R.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,R.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,vt);let Fe=_(R.image,!1,i.maxTextureSize);Fe=rt(R,Fe);const at=r.convert(R.format,R.colorSpace),Et=r.convert(R.type);let St=M(R.internalFormat,at,Et,R.colorSpace,R.isVideoTexture);pe(we,R);let $e;const At=R.mipmaps,J=R.isVideoTexture!==!0,tt=_t.__version===void 0||Pe===!0,Ne=be.dataReady,lt=N(R,Fe);if(R.isDepthTexture)St=b(R.format===xr,R.type),tt&&(J?t.texStorage2D(s.TEXTURE_2D,1,St,Fe.width,Fe.height):t.texImage2D(s.TEXTURE_2D,0,St,Fe.width,Fe.height,0,at,Et,null));else if(R.isDataTexture)if(At.length>0){J&&tt&&t.texStorage2D(s.TEXTURE_2D,lt,St,At[0].width,At[0].height);for(let ke=0,Re=At.length;ke<Re;ke++)$e=At[ke],J?Ne&&t.texSubImage2D(s.TEXTURE_2D,ke,0,0,$e.width,$e.height,at,Et,$e.data):t.texImage2D(s.TEXTURE_2D,ke,St,$e.width,$e.height,0,at,Et,$e.data);R.generateMipmaps=!1}else J?(tt&&t.texStorage2D(s.TEXTURE_2D,lt,St,Fe.width,Fe.height),Ne&&K(R,Fe,at,Et)):t.texImage2D(s.TEXTURE_2D,0,St,Fe.width,Fe.height,0,at,Et,Fe.data);else if(R.isCompressedTexture)if(R.isCompressedArrayTexture){J&&tt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,lt,St,At[0].width,At[0].height,Fe.depth);for(let ke=0,Re=At.length;ke<Re;ke++)if($e=At[ke],R.format!==$n)if(at!==null)if(J){if(Ne)if(R.layerUpdates.size>0){const ot=vh($e.width,$e.height,R.format,R.type);for(const Tt of R.layerUpdates){const qt=$e.data.subarray(Tt*ot/$e.data.BYTES_PER_ELEMENT,(Tt+1)*ot/$e.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ke,0,0,Tt,$e.width,$e.height,1,at,qt)}R.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ke,0,0,0,$e.width,$e.height,Fe.depth,at,$e.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,ke,St,$e.width,$e.height,Fe.depth,0,$e.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else J?Ne&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,ke,0,0,0,$e.width,$e.height,Fe.depth,at,Et,$e.data):t.texImage3D(s.TEXTURE_2D_ARRAY,ke,St,$e.width,$e.height,Fe.depth,0,at,Et,$e.data)}else{J&&tt&&t.texStorage2D(s.TEXTURE_2D,lt,St,At[0].width,At[0].height);for(let ke=0,Re=At.length;ke<Re;ke++)$e=At[ke],R.format!==$n?at!==null?J?Ne&&t.compressedTexSubImage2D(s.TEXTURE_2D,ke,0,0,$e.width,$e.height,at,$e.data):t.compressedTexImage2D(s.TEXTURE_2D,ke,St,$e.width,$e.height,0,$e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):J?Ne&&t.texSubImage2D(s.TEXTURE_2D,ke,0,0,$e.width,$e.height,at,Et,$e.data):t.texImage2D(s.TEXTURE_2D,ke,St,$e.width,$e.height,0,at,Et,$e.data)}else if(R.isDataArrayTexture)if(J){if(tt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,lt,St,Fe.width,Fe.height,Fe.depth),Ne)if(R.layerUpdates.size>0){const ke=vh(Fe.width,Fe.height,R.format,R.type);for(const Re of R.layerUpdates){const ot=Fe.data.subarray(Re*ke/Fe.data.BYTES_PER_ELEMENT,(Re+1)*ke/Fe.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,Re,Fe.width,Fe.height,1,at,Et,ot)}R.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,Fe.width,Fe.height,Fe.depth,at,Et,Fe.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,St,Fe.width,Fe.height,Fe.depth,0,at,Et,Fe.data);else if(R.isData3DTexture)J?(tt&&t.texStorage3D(s.TEXTURE_3D,lt,St,Fe.width,Fe.height,Fe.depth),Ne&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,Fe.width,Fe.height,Fe.depth,at,Et,Fe.data)):t.texImage3D(s.TEXTURE_3D,0,St,Fe.width,Fe.height,Fe.depth,0,at,Et,Fe.data);else if(R.isFramebufferTexture){if(tt)if(J)t.texStorage2D(s.TEXTURE_2D,lt,St,Fe.width,Fe.height);else{let ke=Fe.width,Re=Fe.height;for(let ot=0;ot<lt;ot++)t.texImage2D(s.TEXTURE_2D,ot,St,ke,Re,0,at,Et,null),ke>>=1,Re>>=1}}else if(At.length>0){if(J&&tt){const ke=Xt(At[0]);t.texStorage2D(s.TEXTURE_2D,lt,St,ke.width,ke.height)}for(let ke=0,Re=At.length;ke<Re;ke++)$e=At[ke],J?Ne&&t.texSubImage2D(s.TEXTURE_2D,ke,0,0,at,Et,$e):t.texImage2D(s.TEXTURE_2D,ke,St,at,Et,$e);R.generateMipmaps=!1}else if(J){if(tt){const ke=Xt(Fe);t.texStorage2D(s.TEXTURE_2D,lt,St,ke.width,ke.height)}Ne&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,at,Et,Fe)}else t.texImage2D(s.TEXTURE_2D,0,St,at,Et,Fe);f(R)&&p(we),_t.__version=be.version,R.onUpdate&&R.onUpdate(R)}k.__version=R.version}function ee(k,R,oe){if(R.image.length!==6)return;const we=re(k,R),Pe=R.source;t.bindTexture(s.TEXTURE_CUBE_MAP,k.__webglTexture,s.TEXTURE0+oe);const be=n.get(Pe);if(Pe.version!==be.__version||we===!0){t.activeTexture(s.TEXTURE0+oe);const _t=Bt.getPrimaries(Bt.workingColorSpace),Ke=R.colorSpace===Bi?null:Bt.getPrimaries(R.colorSpace),ft=R.colorSpace===Bi||_t===Ke?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,R.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,R.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,ft);const vt=R.isCompressedTexture||R.image[0].isCompressedTexture,Fe=R.image[0]&&R.image[0].isDataTexture,at=[];for(let Re=0;Re<6;Re++)!vt&&!Fe?at[Re]=_(R.image[Re],!0,i.maxCubemapSize):at[Re]=Fe?R.image[Re].image:R.image[Re],at[Re]=rt(R,at[Re]);const Et=at[0],St=r.convert(R.format,R.colorSpace),$e=r.convert(R.type),At=M(R.internalFormat,St,$e,R.colorSpace),J=R.isVideoTexture!==!0,tt=be.__version===void 0||we===!0,Ne=Pe.dataReady;let lt=N(R,Et);pe(s.TEXTURE_CUBE_MAP,R);let ke;if(vt){J&&tt&&t.texStorage2D(s.TEXTURE_CUBE_MAP,lt,At,Et.width,Et.height);for(let Re=0;Re<6;Re++){ke=at[Re].mipmaps;for(let ot=0;ot<ke.length;ot++){const Tt=ke[ot];R.format!==$n?St!==null?J?Ne&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,0,0,Tt.width,Tt.height,St,Tt.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,At,Tt.width,Tt.height,0,Tt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,0,0,Tt.width,Tt.height,St,$e,Tt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,At,Tt.width,Tt.height,0,St,$e,Tt.data)}}}else{if(ke=R.mipmaps,J&&tt){ke.length>0&<++;const Re=Xt(at[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,lt,At,Re.width,Re.height)}for(let Re=0;Re<6;Re++)if(Fe){J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,0,0,at[Re].width,at[Re].height,St,$e,at[Re].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,At,at[Re].width,at[Re].height,0,St,$e,at[Re].data);for(let ot=0;ot<ke.length;ot++){const qt=ke[ot].image[Re].image;J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,0,0,qt.width,qt.height,St,$e,qt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,At,qt.width,qt.height,0,St,$e,qt.data)}}else{J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,0,0,St,$e,at[Re]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,At,St,$e,at[Re]);for(let ot=0;ot<ke.length;ot++){const Tt=ke[ot];J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,0,0,St,$e,Tt.image[Re]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,At,St,$e,Tt.image[Re])}}}f(R)&&p(s.TEXTURE_CUBE_MAP),be.__version=Pe.version,R.onUpdate&&R.onUpdate(R)}k.__version=R.version}function fe(k,R,oe,we,Pe,be){const _t=r.convert(oe.format,oe.colorSpace),Ke=r.convert(oe.type),ft=M(oe.internalFormat,_t,Ke,oe.colorSpace),vt=n.get(R),Fe=n.get(oe);if(Fe.__renderTarget=R,!vt.__hasExternalTextures){const at=Math.max(1,R.width>>be),Et=Math.max(1,R.height>>be);Pe===s.TEXTURE_3D||Pe===s.TEXTURE_2D_ARRAY?t.texImage3D(Pe,be,ft,at,Et,R.depth,0,_t,Ke,null):t.texImage2D(Pe,be,ft,at,Et,0,_t,Ke,null)}t.bindFramebuffer(s.FRAMEBUFFER,k),Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,we,Pe,Fe.__webglTexture,0,Ie(R)):(Pe===s.TEXTURE_2D||Pe>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Pe<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,we,Pe,Fe.__webglTexture,be),t.bindFramebuffer(s.FRAMEBUFFER,null)}function Y(k,R,oe){if(s.bindRenderbuffer(s.RENDERBUFFER,k),R.depthBuffer){const we=R.depthTexture,Pe=we&&we.isDepthTexture?we.type:null,be=b(R.stencilBuffer,Pe),_t=R.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ke=Ie(R);Ze(R)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ke,be,R.width,R.height):oe?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ke,be,R.width,R.height):s.renderbufferStorage(s.RENDERBUFFER,be,R.width,R.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,_t,s.RENDERBUFFER,k)}else{const we=R.textures;for(let Pe=0;Pe<we.length;Pe++){const be=we[Pe],_t=r.convert(be.format,be.colorSpace),Ke=r.convert(be.type),ft=M(be.internalFormat,_t,Ke,be.colorSpace),vt=Ie(R);oe&&Ze(R)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,vt,ft,R.width,R.height):Ze(R)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,vt,ft,R.width,R.height):s.renderbufferStorage(s.RENDERBUFFER,ft,R.width,R.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function me(k,R){if(R&&R.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,k),!(R.depthTexture&&R.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const we=n.get(R.depthTexture);we.__renderTarget=R,(!we.__webglTexture||R.depthTexture.image.width!==R.width||R.depthTexture.image.height!==R.height)&&(R.depthTexture.image.width=R.width,R.depthTexture.image.height=R.height,R.depthTexture.needsUpdate=!0),se(R.depthTexture,0);const Pe=we.__webglTexture,be=Ie(R);if(R.depthTexture.format===yr)Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Pe,0,be):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Pe,0);else if(R.depthTexture.format===xr)Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Pe,0,be):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Pe,0);else throw new Error("Unknown depthTexture format")}function Te(k){const R=n.get(k),oe=k.isWebGLCubeRenderTarget===!0;if(R.__boundDepthTexture!==k.depthTexture){const we=k.depthTexture;if(R.__depthDisposeCallback&&R.__depthDisposeCallback(),we){const Pe=()=>{delete R.__boundDepthTexture,delete R.__depthDisposeCallback,we.removeEventListener("dispose",Pe)};we.addEventListener("dispose",Pe),R.__depthDisposeCallback=Pe}R.__boundDepthTexture=we}if(k.depthTexture&&!R.__autoAllocateDepthBuffer){if(oe)throw new Error("target.depthTexture not supported in Cube render targets");const we=k.texture.mipmaps;we&&we.length>0?me(R.__webglFramebuffer[0],k):me(R.__webglFramebuffer,k)}else if(oe){R.__webglDepthbuffer=[];for(let we=0;we<6;we++)if(t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer[we]),R.__webglDepthbuffer[we]===void 0)R.__webglDepthbuffer[we]=s.createRenderbuffer(),Y(R.__webglDepthbuffer[we],k,!1);else{const Pe=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,be=R.__webglDepthbuffer[we];s.bindRenderbuffer(s.RENDERBUFFER,be),s.framebufferRenderbuffer(s.FRAMEBUFFER,Pe,s.RENDERBUFFER,be)}}else{const we=k.texture.mipmaps;if(we&&we.length>0?t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer),R.__webglDepthbuffer===void 0)R.__webglDepthbuffer=s.createRenderbuffer(),Y(R.__webglDepthbuffer,k,!1);else{const Pe=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,be=R.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,be),s.framebufferRenderbuffer(s.FRAMEBUFFER,Pe,s.RENDERBUFFER,be)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function et(k,R,oe){const we=n.get(k);R!==void 0&&fe(we.__webglFramebuffer,k,k.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),oe!==void 0&&Te(k)}function We(k){const R=k.texture,oe=n.get(k),we=n.get(R);k.addEventListener("dispose",P);const Pe=k.textures,be=k.isWebGLCubeRenderTarget===!0,_t=Pe.length>1;if(_t||(we.__webglTexture===void 0&&(we.__webglTexture=s.createTexture()),we.__version=R.version,o.memory.textures++),be){oe.__webglFramebuffer=[];for(let Ke=0;Ke<6;Ke++)if(R.mipmaps&&R.mipmaps.length>0){oe.__webglFramebuffer[Ke]=[];for(let ft=0;ft<R.mipmaps.length;ft++)oe.__webglFramebuffer[Ke][ft]=s.createFramebuffer()}else oe.__webglFramebuffer[Ke]=s.createFramebuffer()}else{if(R.mipmaps&&R.mipmaps.length>0){oe.__webglFramebuffer=[];for(let Ke=0;Ke<R.mipmaps.length;Ke++)oe.__webglFramebuffer[Ke]=s.createFramebuffer()}else oe.__webglFramebuffer=s.createFramebuffer();if(_t)for(let Ke=0,ft=Pe.length;Ke<ft;Ke++){const vt=n.get(Pe[Ke]);vt.__webglTexture===void 0&&(vt.__webglTexture=s.createTexture(),o.memory.textures++)}if(k.samples>0&&Ze(k)===!1){oe.__webglMultisampledFramebuffer=s.createFramebuffer(),oe.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,oe.__webglMultisampledFramebuffer);for(let Ke=0;Ke<Pe.length;Ke++){const ft=Pe[Ke];oe.__webglColorRenderbuffer[Ke]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ke]);const vt=r.convert(ft.format,ft.colorSpace),Fe=r.convert(ft.type),at=M(ft.internalFormat,vt,Fe,ft.colorSpace,k.isXRRenderTarget===!0),Et=Ie(k);s.renderbufferStorageMultisample(s.RENDERBUFFER,Et,at,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ke,s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ke])}s.bindRenderbuffer(s.RENDERBUFFER,null),k.depthBuffer&&(oe.__webglDepthRenderbuffer=s.createRenderbuffer(),Y(oe.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(be){t.bindTexture(s.TEXTURE_CUBE_MAP,we.__webglTexture),pe(s.TEXTURE_CUBE_MAP,R);for(let Ke=0;Ke<6;Ke++)if(R.mipmaps&&R.mipmaps.length>0)for(let ft=0;ft<R.mipmaps.length;ft++)fe(oe.__webglFramebuffer[Ke][ft],k,R,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ke,ft);else fe(oe.__webglFramebuffer[Ke],k,R,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ke,0);f(R)&&p(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(_t){for(let Ke=0,ft=Pe.length;Ke<ft;Ke++){const vt=Pe[Ke],Fe=n.get(vt);t.bindTexture(s.TEXTURE_2D,Fe.__webglTexture),pe(s.TEXTURE_2D,vt),fe(oe.__webglFramebuffer,k,vt,s.COLOR_ATTACHMENT0+Ke,s.TEXTURE_2D,0),f(vt)&&p(s.TEXTURE_2D)}t.unbindTexture()}else{let Ke=s.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(Ke=k.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Ke,we.__webglTexture),pe(Ke,R),R.mipmaps&&R.mipmaps.length>0)for(let ft=0;ft<R.mipmaps.length;ft++)fe(oe.__webglFramebuffer[ft],k,R,s.COLOR_ATTACHMENT0,Ke,ft);else fe(oe.__webglFramebuffer,k,R,s.COLOR_ATTACHMENT0,Ke,0);f(R)&&p(Ke),t.unbindTexture()}k.depthBuffer&&Te(k)}function O(k){const R=k.textures;for(let oe=0,we=R.length;oe<we;oe++){const Pe=R[oe];if(f(Pe)){const be=x(k),_t=n.get(Pe).__webglTexture;t.bindTexture(be,_t),p(be),t.unbindTexture()}}}const dt=[],st=[];function it(k){if(k.samples>0){if(Ze(k)===!1){const R=k.textures,oe=k.width,we=k.height;let Pe=s.COLOR_BUFFER_BIT;const be=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,_t=n.get(k),Ke=R.length>1;if(Ke)for(let vt=0;vt<R.length;vt++)t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,_t.__webglMultisampledFramebuffer);const ft=k.texture.mipmaps;ft&&ft.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglFramebuffer);for(let vt=0;vt<R.length;vt++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(Pe|=s.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(Pe|=s.STENCIL_BUFFER_BIT)),Ke){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,_t.__webglColorRenderbuffer[vt]);const Fe=n.get(R[vt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Fe,0)}s.blitFramebuffer(0,0,oe,we,0,0,oe,we,Pe,s.NEAREST),l===!0&&(dt.length=0,st.length=0,dt.push(s.COLOR_ATTACHMENT0+vt),k.depthBuffer&&k.resolveDepthBuffer===!1&&(dt.push(be),st.push(be),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,st)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,dt))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Ke)for(let vt=0;vt<R.length;vt++){t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.RENDERBUFFER,_t.__webglColorRenderbuffer[vt]);const Fe=n.get(R[vt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.TEXTURE_2D,Fe,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const R=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[R])}}}function Ie(k){return Math.min(i.maxSamples,k.samples)}function Ze(k){const R=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&R.__useRenderToTexture!==!1}function Le(k){const R=o.render.frame;d.get(k)!==R&&(d.set(k,R),k.update())}function rt(k,R){const oe=k.colorSpace,we=k.format,Pe=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||oe!==Xs&&oe!==Bi&&(Bt.getTransfer(oe)===tn?(we!==$n||Pe!==hi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",oe)),R}function Xt(k){return typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement?(c.width=k.naturalWidth||k.width,c.height=k.naturalHeight||k.height):typeof VideoFrame<"u"&&k instanceof VideoFrame?(c.width=k.displayWidth,c.height=k.displayHeight):(c.width=k.width,c.height=k.height),c}this.allocateTextureUnit=X,this.resetTextureUnits=B,this.setTexture2D=se,this.setTexture2DArray=W,this.setTexture3D=he,this.setTextureCube=Q,this.rebindTextures=et,this.setupRenderTarget=We,this.updateRenderTargetMipmap=O,this.updateMultisampleRenderTarget=it,this.setupDepthRenderbuffer=Te,this.setupFrameBufferTexture=fe,this.useMultisampledRTT=Ze}function T3(s,e){function t(n,i=Bi){let r;const o=Bt.getTransfer(i);if(n===hi)return s.UNSIGNED_BYTE;if(n===Xl)return s.UNSIGNED_SHORT_4_4_4_4;if(n===jl)return s.UNSIGNED_SHORT_5_5_5_1;if(n===b0)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===x0)return s.BYTE;if(n===M0)return s.SHORT;if(n===_r)return s.UNSIGNED_SHORT;if(n===Wl)return s.INT;if(n===ls)return s.UNSIGNED_INT;if(n===li)return s.FLOAT;if(n===Sr)return s.HALF_FLOAT;if(n===S0)return s.ALPHA;if(n===E0)return s.RGB;if(n===$n)return s.RGBA;if(n===yr)return s.DEPTH_COMPONENT;if(n===xr)return s.DEPTH_STENCIL;if(n===A0)return s.RED;if(n===ql)return s.RED_INTEGER;if(n===w0)return s.RG;if(n===$l)return s.RG_INTEGER;if(n===Yl)return s.RGBA_INTEGER;if(n===ga||n===_a||n===va||n===ya)if(o===tn)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===ga)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===ga)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===tl||n===nl||n===il||n===sl)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===tl)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===nl)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===il)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===sl)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===rl||n===al||n===ol)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===rl||n===al)return o===tn?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===ll||n===cl||n===hl||n===ul||n===dl||n===fl||n===pl||n===ml||n===gl||n===_l||n===vl||n===yl||n===xl||n===Ml)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===ll)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===xa||n===bl||n===Sl)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===xa)return o===tn?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===bl)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Sl)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===T0||n===El||n===Al||n===wl)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===xa)return r.COMPRESSED_RED_RGTC1_EXT;if(n===El)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Al)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===wl)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===vr?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:t}}const C3=`
|
|
3804
3804
|
void main() {
|
|
3805
3805
|
|
|
3806
3806
|
gl_Position = vec4( position, 1.0 );
|
|
@@ -3824,7 +3824,7 @@ void main() {
|
|
|
3824
3824
|
|
|
3825
3825
|
}
|
|
3826
3826
|
|
|
3827
|
-
}`;class D3{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new Tn,r=e.properties.get(i);r.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new Li({vertexShader:C3,fragmentShader:R3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new zt(new Di(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class L3 extends ds{constructor(e,t){super();const n=this;let i=null,r=1,o=null,a="local-floor",l=1,c=null,d=null,m=null,u=null,h=null,g=null;const _=new D3,p=t.getContextAttributes();let f=null,v=null;const b=[],S=[],F=new et;let C=null;const R=new bn;R.viewport=new Xt;const P=new bn;P.viewport=new Xt;const A=[R,P],E=new q1;let L=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let q=b[j];return q===void 0&&(q=new po,b[j]=q),q.getTargetRaySpace()},this.getControllerGrip=function(j){let q=b[j];return q===void 0&&(q=new po,b[j]=q),q.getGripSpace()},this.getHand=function(j){let q=b[j];return q===void 0&&(q=new po,b[j]=q),q.getHandSpace()};function H(j){const q=S.indexOf(j.inputSource);if(q===-1)return;const ne=b[q];ne!==void 0&&(ne.update(j.inputSource,j.frame,c||o),ne.dispatchEvent({type:j.type,data:j.inputSource}))}function Q(){i.removeEventListener("select",H),i.removeEventListener("selectstart",H),i.removeEventListener("selectend",H),i.removeEventListener("squeeze",H),i.removeEventListener("squeezestart",H),i.removeEventListener("squeezeend",H),i.removeEventListener("end",Q),i.removeEventListener("inputsourceschange",ae);for(let j=0;j<b.length;j++){const q=S[j];q!==null&&(S[j]=null,b[j].disconnect(q))}L=null,B=null,_.reset(),e.setRenderTarget(f),h=null,u=null,m=null,i=null,v=null,se.stop(),n.isPresenting=!1,e.setPixelRatio(C),e.setSize(F.width,F.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(j){r=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(j){a=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(j){c=j},this.getBaseLayer=function(){return u!==null?u:h},this.getBinding=function(){return m},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(j){if(i=j,i!==null){if(f=e.getRenderTarget(),i.addEventListener("select",H),i.addEventListener("selectstart",H),i.addEventListener("selectend",H),i.addEventListener("squeeze",H),i.addEventListener("squeezestart",H),i.addEventListener("squeezeend",H),i.addEventListener("end",Q),i.addEventListener("inputsourceschange",ae),p.xrCompatible!==!0&&await t.makeXRCompatible(),C=e.getPixelRatio(),e.getSize(F),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ne=null,ee=null,ue=null;p.depth&&(ue=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ne=p.stencil?xr:yr,ee=p.stencil?vr:hs);const $={colorFormat:t.RGBA8,depthFormat:ue,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer($),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),v=new us(u.textureWidth,u.textureHeight,{format:Zn,type:mi,depthTexture:new H0(u.textureWidth,u.textureHeight,ee,void 0,void 0,void 0,void 0,void 0,void 0,ne),stencilBuffer:p.stencil,colorSpace:e.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:u.ignoreDepthValues===!1,resolveStencilBuffer:u.ignoreDepthValues===!1})}else{const ne={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,ne),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),v=new us(h.framebufferWidth,h.framebufferHeight,{format:Zn,type:mi,colorSpace:e.outputColorSpace,stencilBuffer:p.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}v.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),se.setContext(i),se.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function ae(j){for(let q=0;q<j.removed.length;q++){const ne=j.removed[q],ee=S.indexOf(ne);ee>=0&&(S[ee]=null,b[ee].disconnect(ne))}for(let q=0;q<j.added.length;q++){const ne=j.added[q];let ee=S.indexOf(ne);if(ee===-1){for(let $=0;$<b.length;$++)if($>=S.length){S.push(ne),ee=$;break}else if(S[$]===null){S[$]=ne,ee=$;break}if(ee===-1)break}const ue=b[ee];ue&&ue.connect(ne)}}const G=new I,le=new I;function Z(j,q,ne){G.setFromMatrixPosition(q.matrixWorld),le.setFromMatrixPosition(ne.matrixWorld);const ee=G.distanceTo(le),ue=q.projectionMatrix.elements,$=ne.projectionMatrix.elements,pe=ue[14]/(ue[10]-1),Ce=ue[14]/(ue[10]+1),Ke=(ue[9]+1)/ue[5],He=(ue[9]-1)/ue[5],O=(ue[8]-1)/ue[0],_t=($[8]+1)/$[0],dt=pe*O,at=pe*_t,Fe=ee/(-O+_t),tt=Fe*-O;if(q.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(tt),j.translateZ(Fe),j.matrixWorld.compose(j.position,j.quaternion,j.scale),j.matrixWorldInverse.copy(j.matrixWorld).invert(),ue[10]===-1)j.projectionMatrix.copy(q.projectionMatrix),j.projectionMatrixInverse.copy(q.projectionMatrixInverse);else{const Le=pe+Fe,ot=Ce+Fe,jt=dt-tt,k=at+(ee-tt),T=Ke*Ce/ot*Le,oe=He*Ce/ot*Le;j.projectionMatrix.makePerspective(jt,k,T,oe,Le,ot),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}}function ve(j,q){q===null?j.matrixWorld.copy(j.matrix):j.matrixWorld.multiplyMatrices(q.matrixWorld,j.matrix),j.matrixWorldInverse.copy(j.matrixWorld).invert()}this.updateCamera=function(j){if(i===null)return;let q=j.near,ne=j.far;_.texture!==null&&(_.depthNear>0&&(q=_.depthNear),_.depthFar>0&&(ne=_.depthFar)),E.near=P.near=R.near=q,E.far=P.far=R.far=ne,(L!==E.near||B!==E.far)&&(i.updateRenderState({depthNear:E.near,depthFar:E.far}),L=E.near,B=E.far),R.layers.mask=j.layers.mask|2,P.layers.mask=j.layers.mask|4,E.layers.mask=R.layers.mask|P.layers.mask;const ee=j.parent,ue=E.cameras;ve(E,ee);for(let $=0;$<ue.length;$++)ve(ue[$],ee);ue.length===2?Z(E,R,P):E.projectionMatrix.copy(R.projectionMatrix),Ee(j,E,ee)};function Ee(j,q,ne){ne===null?j.matrix.copy(q.matrixWorld):(j.matrix.copy(ne.matrixWorld),j.matrix.invert(),j.matrix.multiply(q.matrixWorld)),j.matrix.decompose(j.position,j.quaternion,j.scale),j.updateMatrixWorld(!0),j.projectionMatrix.copy(q.projectionMatrix),j.projectionMatrixInverse.copy(q.projectionMatrixInverse),j.isPerspectiveCamera&&(j.fov=js*2*Math.atan(1/j.projectionMatrix.elements[5]),j.zoom=1)}this.getCamera=function(){return E},this.getFoveation=function(){if(!(u===null&&h===null))return l},this.setFoveation=function(j){l=j,u!==null&&(u.fixedFoveation=j),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=j)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(E)};let be=null;function ge(j,q){if(d=q.getViewerPose(c||o),g=q,d!==null){const ne=d.views;h!==null&&(e.setRenderTargetFramebuffer(v,h.framebuffer),e.setRenderTarget(v));let ee=!1;ne.length!==E.cameras.length&&(E.cameras.length=0,ee=!0);for(let pe=0;pe<ne.length;pe++){const Ce=ne[pe];let Ke=null;if(h!==null)Ke=h.getViewport(Ce);else{const O=m.getViewSubImage(u,Ce);Ke=O.viewport,pe===0&&(e.setRenderTargetTextures(v,O.colorTexture,O.depthStencilTexture),e.setRenderTarget(v))}let He=A[pe];He===void 0&&(He=new bn,He.layers.enable(pe),He.viewport=new Xt,A[pe]=He),He.matrix.fromArray(Ce.transform.matrix),He.matrix.decompose(He.position,He.quaternion,He.scale),He.projectionMatrix.fromArray(Ce.projectionMatrix),He.projectionMatrixInverse.copy(He.projectionMatrix).invert(),He.viewport.set(Ke.x,Ke.y,Ke.width,Ke.height),pe===0&&(E.matrix.copy(He.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),ee===!0&&E.cameras.push(He)}const ue=i.enabledFeatures;if(ue&&ue.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const pe=m.getDepthInformation(ne[0]);pe&&pe.isValid&&pe.texture&&_.init(e,pe,i.renderState)}}for(let ne=0;ne<b.length;ne++){const ee=S[ne],ue=b[ne];ee!==null&&ue!==void 0&&ue.update(ee,q,c||o)}be&&be(j,q),q.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:q}),g=null}const se=new Z0;se.setAnimationLoop(ge),this.setAnimationLoop=function(j){be=j},this.dispose=function(){}}}const ts=new Sn,P3=new Et;function F3(s,e){function t(p,f){p.matrixAutoUpdate===!0&&p.updateMatrix(),f.value.copy(p.matrix)}function n(p,f){f.color.getRGB(p.fogColor.value,N0(s)),f.isFog?(p.fogNear.value=f.near,p.fogFar.value=f.far):f.isFogExp2&&(p.fogDensity.value=f.density)}function i(p,f,v,b,S){f.isMeshBasicMaterial||f.isMeshLambertMaterial?r(p,f):f.isMeshToonMaterial?(r(p,f),m(p,f)):f.isMeshPhongMaterial?(r(p,f),d(p,f)):f.isMeshStandardMaterial?(r(p,f),u(p,f),f.isMeshPhysicalMaterial&&h(p,f,S)):f.isMeshMatcapMaterial?(r(p,f),g(p,f)):f.isMeshDepthMaterial?r(p,f):f.isMeshDistanceMaterial?(r(p,f),_(p,f)):f.isMeshNormalMaterial?r(p,f):f.isLineBasicMaterial?(o(p,f),f.isLineDashedMaterial&&a(p,f)):f.isPointsMaterial?l(p,f,v,b):f.isSpriteMaterial?c(p,f):f.isShadowMaterial?(p.color.value.copy(f.color),p.opacity.value=f.opacity):f.isShaderMaterial&&(f.uniformsNeedUpdate=!1)}function r(p,f){p.opacity.value=f.opacity,f.color&&p.diffuse.value.copy(f.color),f.emissive&&p.emissive.value.copy(f.emissive).multiplyScalar(f.emissiveIntensity),f.map&&(p.map.value=f.map,t(f.map,p.mapTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.bumpMap&&(p.bumpMap.value=f.bumpMap,t(f.bumpMap,p.bumpMapTransform),p.bumpScale.value=f.bumpScale,f.side===In&&(p.bumpScale.value*=-1)),f.normalMap&&(p.normalMap.value=f.normalMap,t(f.normalMap,p.normalMapTransform),p.normalScale.value.copy(f.normalScale),f.side===In&&p.normalScale.value.negate()),f.displacementMap&&(p.displacementMap.value=f.displacementMap,t(f.displacementMap,p.displacementMapTransform),p.displacementScale.value=f.displacementScale,p.displacementBias.value=f.displacementBias),f.emissiveMap&&(p.emissiveMap.value=f.emissiveMap,t(f.emissiveMap,p.emissiveMapTransform)),f.specularMap&&(p.specularMap.value=f.specularMap,t(f.specularMap,p.specularMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest);const v=e.get(f),b=v.envMap,S=v.envMapRotation;b&&(p.envMap.value=b,ts.copy(S),ts.x*=-1,ts.y*=-1,ts.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(ts.y*=-1,ts.z*=-1),p.envMapRotation.value.setFromMatrix4(P3.makeRotationFromEuler(ts)),p.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=f.reflectivity,p.ior.value=f.ior,p.refractionRatio.value=f.refractionRatio),f.lightMap&&(p.lightMap.value=f.lightMap,p.lightMapIntensity.value=f.lightMapIntensity,t(f.lightMap,p.lightMapTransform)),f.aoMap&&(p.aoMap.value=f.aoMap,p.aoMapIntensity.value=f.aoMapIntensity,t(f.aoMap,p.aoMapTransform))}function o(p,f){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,f.map&&(p.map.value=f.map,t(f.map,p.mapTransform))}function a(p,f){p.dashSize.value=f.dashSize,p.totalSize.value=f.dashSize+f.gapSize,p.scale.value=f.scale}function l(p,f,v,b){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.size.value=f.size*v,p.scale.value=b*.5,f.map&&(p.map.value=f.map,t(f.map,p.uvTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest)}function c(p,f){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.rotation.value=f.rotation,f.map&&(p.map.value=f.map,t(f.map,p.mapTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest)}function d(p,f){p.specular.value.copy(f.specular),p.shininess.value=Math.max(f.shininess,1e-4)}function m(p,f){f.gradientMap&&(p.gradientMap.value=f.gradientMap)}function u(p,f){p.metalness.value=f.metalness,f.metalnessMap&&(p.metalnessMap.value=f.metalnessMap,t(f.metalnessMap,p.metalnessMapTransform)),p.roughness.value=f.roughness,f.roughnessMap&&(p.roughnessMap.value=f.roughnessMap,t(f.roughnessMap,p.roughnessMapTransform)),f.envMap&&(p.envMapIntensity.value=f.envMapIntensity)}function h(p,f,v){p.ior.value=f.ior,f.sheen>0&&(p.sheenColor.value.copy(f.sheenColor).multiplyScalar(f.sheen),p.sheenRoughness.value=f.sheenRoughness,f.sheenColorMap&&(p.sheenColorMap.value=f.sheenColorMap,t(f.sheenColorMap,p.sheenColorMapTransform)),f.sheenRoughnessMap&&(p.sheenRoughnessMap.value=f.sheenRoughnessMap,t(f.sheenRoughnessMap,p.sheenRoughnessMapTransform))),f.clearcoat>0&&(p.clearcoat.value=f.clearcoat,p.clearcoatRoughness.value=f.clearcoatRoughness,f.clearcoatMap&&(p.clearcoatMap.value=f.clearcoatMap,t(f.clearcoatMap,p.clearcoatMapTransform)),f.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=f.clearcoatRoughnessMap,t(f.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),f.clearcoatNormalMap&&(p.clearcoatNormalMap.value=f.clearcoatNormalMap,t(f.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(f.clearcoatNormalScale),f.side===In&&p.clearcoatNormalScale.value.negate())),f.dispersion>0&&(p.dispersion.value=f.dispersion),f.iridescence>0&&(p.iridescence.value=f.iridescence,p.iridescenceIOR.value=f.iridescenceIOR,p.iridescenceThicknessMinimum.value=f.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=f.iridescenceThicknessRange[1],f.iridescenceMap&&(p.iridescenceMap.value=f.iridescenceMap,t(f.iridescenceMap,p.iridescenceMapTransform)),f.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=f.iridescenceThicknessMap,t(f.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),f.transmission>0&&(p.transmission.value=f.transmission,p.transmissionSamplerMap.value=v.texture,p.transmissionSamplerSize.value.set(v.width,v.height),f.transmissionMap&&(p.transmissionMap.value=f.transmissionMap,t(f.transmissionMap,p.transmissionMapTransform)),p.thickness.value=f.thickness,f.thicknessMap&&(p.thicknessMap.value=f.thicknessMap,t(f.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=f.attenuationDistance,p.attenuationColor.value.copy(f.attenuationColor)),f.anisotropy>0&&(p.anisotropyVector.value.set(f.anisotropy*Math.cos(f.anisotropyRotation),f.anisotropy*Math.sin(f.anisotropyRotation)),f.anisotropyMap&&(p.anisotropyMap.value=f.anisotropyMap,t(f.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=f.specularIntensity,p.specularColor.value.copy(f.specularColor),f.specularColorMap&&(p.specularColorMap.value=f.specularColorMap,t(f.specularColorMap,p.specularColorMapTransform)),f.specularIntensityMap&&(p.specularIntensityMap.value=f.specularIntensityMap,t(f.specularIntensityMap,p.specularIntensityMapTransform))}function g(p,f){f.matcap&&(p.matcap.value=f.matcap)}function _(p,f){const v=e.get(f).light;p.referencePosition.value.setFromMatrixPosition(v.matrixWorld),p.nearDistance.value=v.shadow.camera.near,p.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function N3(s,e,t,n){let i={},r={},o=[];const a=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const S=b.program;n.uniformBlockBinding(v,S)}function c(v,b){let S=i[v.id];S===void 0&&(g(v),S=d(v),i[v.id]=S,v.addEventListener("dispose",p));const F=b.program;n.updateUBOMapping(v,F);const C=e.render.frame;r[v.id]!==C&&(u(v),r[v.id]=C)}function d(v){const b=m();v.__bindingPointIndex=b;const S=s.createBuffer(),F=v.__size,C=v.usage;return s.bindBuffer(s.UNIFORM_BUFFER,S),s.bufferData(s.UNIFORM_BUFFER,F,C),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,b,S),S}function m(){for(let v=0;v<a;v++)if(o.indexOf(v)===-1)return o.push(v),v;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function u(v){const b=i[v.id],S=v.uniforms,F=v.__cache;s.bindBuffer(s.UNIFORM_BUFFER,b);for(let C=0,R=S.length;C<R;C++){const P=Array.isArray(S[C])?S[C]:[S[C]];for(let A=0,E=P.length;A<E;A++){const L=P[A];if(h(L,C,A,F)===!0){const B=L.__offset,H=Array.isArray(L.value)?L.value:[L.value];let Q=0;for(let ae=0;ae<H.length;ae++){const G=H[ae],le=_(G);typeof G=="number"||typeof G=="boolean"?(L.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,B+Q,L.__data)):G.isMatrix3?(L.__data[0]=G.elements[0],L.__data[1]=G.elements[1],L.__data[2]=G.elements[2],L.__data[3]=0,L.__data[4]=G.elements[3],L.__data[5]=G.elements[4],L.__data[6]=G.elements[5],L.__data[7]=0,L.__data[8]=G.elements[6],L.__data[9]=G.elements[7],L.__data[10]=G.elements[8],L.__data[11]=0):(G.toArray(L.__data,Q),Q+=le.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,B,L.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(v,b,S,F){const C=v.value,R=b+"_"+S;if(F[R]===void 0)return typeof C=="number"||typeof C=="boolean"?F[R]=C:F[R]=C.clone(),!0;{const P=F[R];if(typeof C=="number"||typeof C=="boolean"){if(P!==C)return F[R]=C,!0}else if(P.equals(C)===!1)return P.copy(C),!0}return!1}function g(v){const b=v.uniforms;let S=0;const F=16;for(let R=0,P=b.length;R<P;R++){const A=Array.isArray(b[R])?b[R]:[b[R]];for(let E=0,L=A.length;E<L;E++){const B=A[E],H=Array.isArray(B.value)?B.value:[B.value];for(let Q=0,ae=H.length;Q<ae;Q++){const G=H[Q],le=_(G),Z=S%F,ve=Z%le.boundary,Ee=Z+ve;S+=ve,Ee!==0&&F-Ee<le.storage&&(S+=F-Ee),B.__data=new Float32Array(le.storage/Float32Array.BYTES_PER_ELEMENT),B.__offset=S,S+=le.storage}}}const C=S%F;return C>0&&(S+=F-C),v.__size=S,v.__cache={},this}function _(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),b}function p(v){const b=v.target;b.removeEventListener("dispose",p);const S=o.indexOf(b.__bindingPointIndex);o.splice(S,1),s.deleteBuffer(i[b.id]),delete i[b.id],delete r[b.id]}function f(){for(const v in i)s.deleteBuffer(i[v]);o=[],i={},r={}}return{bind:l,update:c,dispose:f}}class iu{constructor(e={}){const{canvas:t=P2(),context:n=null,depth:i=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:m=!1,reverseDepthBuffer:u=!1}=e;this.isWebGLRenderer=!0;let h;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=n.getContextAttributes().alpha}else h=o;const g=new Uint32Array(4),_=new Int32Array(4);let p=null,f=null;const v=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Xi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const S=this;let F=!1;this._outputColorSpace=qt;let C=0,R=0,P=null,A=-1,E=null;const L=new Xt,B=new Xt;let H=null;const Q=new Tt(0);let ae=0,G=t.width,le=t.height,Z=1,ve=null,Ee=null;const be=new Xt(0,0,G,le),ge=new Xt(0,0,G,le);let se=!1;const j=new nc;let q=!1,ne=!1;const ee=new Et,ue=new Et,$=new I,pe=new Xt,Ce={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ke=!1;function He(){return P===null?Z:1}let O=n;function _t(w,V){return t.getContext(w,V)}try{const w={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:m};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Vl}`),t.addEventListener("webglcontextlost",ut,!1),t.addEventListener("webglcontextrestored",ze,!1),t.addEventListener("webglcontextcreationerror",we,!1),O===null){const V="webgl2";if(O=_t(V,w),O===null)throw _t(V)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(w){throw console.error("THREE.WebGLRenderer: "+w.message),w}let dt,at,Fe,tt,Le,ot,jt,k,T,oe,Se,De,ye,vt,Ze,mt,yt,Ue,st,Rt,At,Ye,Lt,K;function $e(){dt=new Xp(O),dt.init(),Ye=new T3(O,dt),at=new Bp(O,dt,e,Ye),Fe=new A3(O,dt),at.reverseDepthBuffer&&u&&Fe.buffers.depth.setReversed(!0),tt=new $p(O),Le=new d3,ot=new w3(O,dt,Fe,Le,at,Ye,tt),jt=new kp(S),k=new Wp(S),T=new Q1(O),Lt=new Ip(O,T),oe=new jp(O,T,tt,Lt),Se=new Jp(O,oe,T,tt),st=new Yp(O,at,ot),mt=new Op(Le),De=new u3(S,jt,k,dt,at,Lt,mt),ye=new F3(S,Le),vt=new p3,Ze=new x3(dt),Ue=new Up(S,jt,k,Fe,Se,h,l),yt=new S3(S,Se,at),K=new N3(O,tt,at,Fe),Rt=new zp(O,dt,tt),At=new qp(O,dt,tt),tt.programs=De.programs,S.capabilities=at,S.extensions=dt,S.properties=Le,S.renderLists=vt,S.shadowMap=yt,S.state=Fe,S.info=tt}$e();const Ie=new L3(S,O);this.xr=Ie,this.getContext=function(){return O},this.getContextAttributes=function(){return O.getContextAttributes()},this.forceContextLoss=function(){const w=dt.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){const w=dt.get("WEBGL_lose_context");w&&w.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(w){w!==void 0&&(Z=w,this.setSize(G,le,!1))},this.getSize=function(w){return w.set(G,le)},this.setSize=function(w,V,X=!0){if(Ie.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=w,le=V,t.width=Math.floor(w*Z),t.height=Math.floor(V*Z),X===!0&&(t.style.width=w+"px",t.style.height=V+"px"),this.setViewport(0,0,w,V)},this.getDrawingBufferSize=function(w){return w.set(G*Z,le*Z).floor()},this.setDrawingBufferSize=function(w,V,X){G=w,le=V,Z=X,t.width=Math.floor(w*X),t.height=Math.floor(V*X),this.setViewport(0,0,w,V)},this.getCurrentViewport=function(w){return w.copy(L)},this.getViewport=function(w){return w.copy(be)},this.setViewport=function(w,V,X,J){w.isVector4?be.set(w.x,w.y,w.z,w.w):be.set(w,V,X,J),Fe.viewport(L.copy(be).multiplyScalar(Z).round())},this.getScissor=function(w){return w.copy(ge)},this.setScissor=function(w,V,X,J){w.isVector4?ge.set(w.x,w.y,w.z,w.w):ge.set(w,V,X,J),Fe.scissor(B.copy(ge).multiplyScalar(Z).round())},this.getScissorTest=function(){return se},this.setScissorTest=function(w){Fe.setScissorTest(se=w)},this.setOpaqueSort=function(w){ve=w},this.setTransparentSort=function(w){Ee=w},this.getClearColor=function(w){return w.copy(Ue.getClearColor())},this.setClearColor=function(){Ue.setClearColor(...arguments)},this.getClearAlpha=function(){return Ue.getClearAlpha()},this.setClearAlpha=function(){Ue.setClearAlpha(...arguments)},this.clear=function(w=!0,V=!0,X=!0){let J=0;if(w){let z=!1;if(P!==null){const fe=P.texture.format;z=fe===Yl||fe===$l||fe===ql}if(z){const fe=P.texture.type,ie=fe===mi||fe===hs||fe===_r||fe===vr||fe===Xl||fe===jl,Ae=Ue.getClearColor(),re=Ue.getClearAlpha(),Ge=Ae.r,Me=Ae.g,Pe=Ae.b;ie?(g[0]=Ge,g[1]=Me,g[2]=Pe,g[3]=re,O.clearBufferuiv(O.COLOR,0,g)):(_[0]=Ge,_[1]=Me,_[2]=Pe,_[3]=re,O.clearBufferiv(O.COLOR,0,_))}else J|=O.COLOR_BUFFER_BIT}V&&(J|=O.DEPTH_BUFFER_BIT),X&&(J|=O.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),O.clear(J)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ut,!1),t.removeEventListener("webglcontextrestored",ze,!1),t.removeEventListener("webglcontextcreationerror",we,!1),Ue.dispose(),vt.dispose(),Ze.dispose(),Le.dispose(),jt.dispose(),k.dispose(),Se.dispose(),Lt.dispose(),K.dispose(),De.dispose(),Ie.dispose(),Ie.removeEventListener("sessionstart",fs),Ie.removeEventListener("sessionend",Yi),ei.stop()};function ut(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),F=!0}function ze(){console.log("THREE.WebGLRenderer: Context Restored."),F=!1;const w=tt.autoReset,V=yt.enabled,X=yt.autoUpdate,J=yt.needsUpdate,z=yt.type;$e(),tt.autoReset=w,yt.enabled=V,yt.autoUpdate=X,yt.needsUpdate=J,yt.type=z}function we(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function pt(w){const V=w.target;V.removeEventListener("dispose",pt),Ft(V)}function Ft(w){Qt(w),Le.remove(w)}function Qt(w){const V=Le.get(w).programs;V!==void 0&&(V.forEach(function(X){De.releaseProgram(X)}),w.isShaderMaterial&&De.releaseShaderCache(w))}this.renderBufferDirect=function(w,V,X,J,z,fe){V===null&&(V=Ce);const ie=z.isMesh&&z.matrixWorld.determinant()<0,Ae=Re(w,V,X,J,z);Fe.setMaterial(J,ie);let re=X.index,Ge=1;if(J.wireframe===!0){if(re=oe.getWireframeAttribute(X),re===void 0)return;Ge=2}const Me=X.drawRange,Pe=X.attributes.position;let it=Me.start*Ge,Mt=(Me.start+Me.count)*Ge;fe!==null&&(it=Math.max(it,fe.start*Ge),Mt=Math.min(Mt,(fe.start+fe.count)*Ge)),re!==null?(it=Math.max(it,0),Mt=Math.min(Mt,re.count)):Pe!=null&&(it=Math.max(it,0),Mt=Math.min(Mt,Pe.count));const Ct=Mt-it;if(Ct<0||Ct===1/0)return;Lt.setup(z,J,Ae,X,re);let bt,St=Rt;if(re!==null&&(bt=T.get(re),St=At,St.setIndex(bt)),z.isMesh)J.wireframe===!0?(Fe.setLineWidth(J.wireframeLinewidth*He()),St.setMode(O.LINES)):St.setMode(O.TRIANGLES);else if(z.isLine){let Qe=J.linewidth;Qe===void 0&&(Qe=1),Fe.setLineWidth(Qe*He()),z.isLineSegments?St.setMode(O.LINES):z.isLineLoop?St.setMode(O.LINE_LOOP):St.setMode(O.LINE_STRIP)}else z.isPoints?St.setMode(O.POINTS):z.isSprite&&St.setMode(O.TRIANGLES);if(z.isBatchedMesh)if(z._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),St.renderMultiDrawInstances(z._multiDrawStarts,z._multiDrawCounts,z._multiDrawCount,z._multiDrawInstances);else if(dt.get("WEBGL_multi_draw"))St.renderMultiDraw(z._multiDrawStarts,z._multiDrawCounts,z._multiDrawCount);else{const Qe=z._multiDrawStarts,Wt=z._multiDrawCounts,Nt=z._multiDrawCount,nn=re?T.get(re).bytesPerElement:1,Bt=Le.get(J).currentProgram.getUniforms();for(let cn=0;cn<Nt;cn++)Bt.setValue(O,"_gl_DrawID",cn),St.render(Qe[cn]/nn,Wt[cn])}else if(z.isInstancedMesh)St.renderInstances(it,Ct,z.count);else if(X.isInstancedBufferGeometry){const Qe=X._maxInstanceCount!==void 0?X._maxInstanceCount:1/0,Wt=Math.min(X.instanceCount,Qe);St.renderInstances(it,Ct,Wt)}else St.render(it,Ct)};function Ut(w,V,X){w.transparent===!0&&w.side===pn&&w.forceSinglePass===!1?(w.side=In,w.needsUpdate=!0,me(w,V,X),w.side=Qn,w.needsUpdate=!0,me(w,V,X),w.side=pn):me(w,V,X)}this.compile=function(w,V,X=null){X===null&&(X=w),f=Ze.get(X),f.init(V),b.push(f),X.traverseVisible(function(z){z.isLight&&z.layers.test(V.layers)&&(f.pushLight(z),z.castShadow&&f.pushShadow(z))}),w!==X&&w.traverseVisible(function(z){z.isLight&&z.layers.test(V.layers)&&(f.pushLight(z),z.castShadow&&f.pushShadow(z))}),f.setupLights();const J=new Set;return w.traverse(function(z){if(!(z.isMesh||z.isPoints||z.isLine||z.isSprite))return;const fe=z.material;if(fe)if(Array.isArray(fe))for(let ie=0;ie<fe.length;ie++){const Ae=fe[ie];Ut(Ae,X,z),J.add(Ae)}else Ut(fe,X,z),J.add(fe)}),f=b.pop(),J},this.compileAsync=function(w,V,X=null){const J=this.compile(w,V,X);return new Promise(z=>{function fe(){if(J.forEach(function(ie){Le.get(ie).currentProgram.isReady()&&J.delete(ie)}),J.size===0){z(w);return}setTimeout(fe,10)}dt.get("KHR_parallel_shader_compile")!==null?fe():setTimeout(fe,10)})};let Cn=null;function Hn(w){Cn&&Cn(w)}function fs(){ei.stop()}function Yi(){ei.start()}const ei=new Z0;ei.setAnimationLoop(Hn),typeof self<"u"&&ei.setContext(self),this.setAnimationLoop=function(w){Cn=w,Ie.setAnimationLoop(w),w===null?ei.stop():ei.start()},Ie.addEventListener("sessionstart",fs),Ie.addEventListener("sessionend",Yi),this.render=function(w,V){if(V!==void 0&&V.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(F===!0)return;if(w.matrixWorldAutoUpdate===!0&&w.updateMatrixWorld(),V.parent===null&&V.matrixWorldAutoUpdate===!0&&V.updateMatrixWorld(),Ie.enabled===!0&&Ie.isPresenting===!0&&(Ie.cameraAutoUpdate===!0&&Ie.updateCamera(V),V=Ie.getCamera()),w.isScene===!0&&w.onBeforeRender(S,w,V,P),f=Ze.get(w,b.length),f.init(V),b.push(f),ue.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),j.setFromProjectionMatrix(ue),ne=this.localClippingEnabled,q=mt.init(this.clippingPlanes,ne),p=vt.get(w,v.length),p.init(),v.push(p),Ie.enabled===!0&&Ie.isPresenting===!0){const fe=S.xr.getDepthSensingMesh();fe!==null&&Y(fe,V,-1/0,S.sortObjects)}Y(w,V,0,S.sortObjects),p.finish(),S.sortObjects===!0&&p.sort(ve,Ee),Ke=Ie.enabled===!1||Ie.isPresenting===!1||Ie.hasDepthSensing()===!1,Ke&&Ue.addToRenderList(p,w),this.info.render.frame++,q===!0&&mt.beginShadows();const X=f.state.shadowsArray;yt.render(X,w,V),q===!0&&mt.endShadows(),this.info.autoReset===!0&&this.info.reset();const J=p.opaque,z=p.transmissive;if(f.setupLights(),V.isArrayCamera){const fe=V.cameras;if(z.length>0)for(let ie=0,Ae=fe.length;ie<Ae;ie++){const re=fe[ie];ce(J,z,w,re)}Ke&&Ue.render(w);for(let ie=0,Ae=fe.length;ie<Ae;ie++){const re=fe[ie];W(p,w,re,re.viewport)}}else z.length>0&&ce(J,z,w,V),Ke&&Ue.render(w),W(p,w,V);P!==null&&R===0&&(ot.updateMultisampleRenderTarget(P),ot.updateRenderTargetMipmap(P)),w.isScene===!0&&w.onAfterRender(S,w,V),Lt.resetDefaultState(),A=-1,E=null,b.pop(),b.length>0?(f=b[b.length-1],q===!0&&mt.setGlobalState(S.clippingPlanes,f.state.camera)):f=null,v.pop(),v.length>0?p=v[v.length-1]:p=null};function Y(w,V,X,J){if(w.visible===!1)return;if(w.layers.test(V.layers)){if(w.isGroup)X=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(V);else if(w.isLight)f.pushLight(w),w.castShadow&&f.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||j.intersectsSprite(w)){J&&pe.setFromMatrixPosition(w.matrixWorld).applyMatrix4(ue);const ie=Se.update(w),Ae=w.material;Ae.visible&&p.push(w,ie,Ae,X,pe.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||j.intersectsObject(w))){const ie=Se.update(w),Ae=w.material;if(J&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),pe.copy(w.boundingSphere.center)):(ie.boundingSphere===null&&ie.computeBoundingSphere(),pe.copy(ie.boundingSphere.center)),pe.applyMatrix4(w.matrixWorld).applyMatrix4(ue)),Array.isArray(Ae)){const re=ie.groups;for(let Ge=0,Me=re.length;Ge<Me;Ge++){const Pe=re[Ge],it=Ae[Pe.materialIndex];it&&it.visible&&p.push(w,ie,it,X,pe.z,Pe)}}else Ae.visible&&p.push(w,ie,Ae,X,pe.z,null)}}const fe=w.children;for(let ie=0,Ae=fe.length;ie<Ae;ie++)Y(fe[ie],V,X,J)}function W(w,V,X,J){const z=w.opaque,fe=w.transmissive,ie=w.transparent;f.setupLightsView(X),q===!0&&mt.setGlobalState(S.clippingPlanes,X),J&&Fe.viewport(L.copy(J)),z.length>0&&de(z,V,X),fe.length>0&&de(fe,V,X),ie.length>0&&de(ie,V,X),Fe.buffers.depth.setTest(!0),Fe.buffers.depth.setMask(!0),Fe.buffers.color.setMask(!0),Fe.setPolygonOffset(!1)}function ce(w,V,X,J){if((X.isScene===!0?X.overrideMaterial:null)!==null)return;f.state.transmissionRenderTarget[J.id]===void 0&&(f.state.transmissionRenderTarget[J.id]=new us(1,1,{generateMipmaps:!0,type:dt.has("EXT_color_buffer_half_float")||dt.has("EXT_color_buffer_float")?Sr:mi,minFilter:Ai,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Gt.workingColorSpace}));const fe=f.state.transmissionRenderTarget[J.id],ie=J.viewport||L;fe.setSize(ie.z*S.transmissionResolutionScale,ie.w*S.transmissionResolutionScale);const Ae=S.getRenderTarget();S.setRenderTarget(fe),S.getClearColor(Q),ae=S.getClearAlpha(),ae<1&&S.setClearColor(16777215,.5),S.clear(),Ke&&Ue.render(X);const re=S.toneMapping;S.toneMapping=Xi;const Ge=J.viewport;if(J.viewport!==void 0&&(J.viewport=void 0),f.setupLightsView(J),q===!0&&mt.setGlobalState(S.clippingPlanes,J),de(w,X,J),ot.updateMultisampleRenderTarget(fe),ot.updateRenderTargetMipmap(fe),dt.has("WEBGL_multisampled_render_to_texture")===!1){let Me=!1;for(let Pe=0,it=V.length;Pe<it;Pe++){const Mt=V[Pe],Ct=Mt.object,bt=Mt.geometry,St=Mt.material,Qe=Mt.group;if(St.side===pn&&Ct.layers.test(J.layers)){const Wt=St.side;St.side=In,St.needsUpdate=!0,_e(Ct,X,J,bt,St,Qe),St.side=Wt,St.needsUpdate=!0,Me=!0}}Me===!0&&(ot.updateMultisampleRenderTarget(fe),ot.updateRenderTargetMipmap(fe))}S.setRenderTarget(Ae),S.setClearColor(Q,ae),Ge!==void 0&&(J.viewport=Ge),S.toneMapping=re}function de(w,V,X){const J=V.isScene===!0?V.overrideMaterial:null;for(let z=0,fe=w.length;z<fe;z++){const ie=w[z],Ae=ie.object,re=ie.geometry,Ge=ie.group;let Me=ie.material;Me.allowOverride===!0&&J!==null&&(Me=J),Ae.layers.test(X.layers)&&_e(Ae,V,X,re,Me,Ge)}}function _e(w,V,X,J,z,fe){w.onBeforeRender(S,V,X,J,z,fe),w.modelViewMatrix.multiplyMatrices(X.matrixWorldInverse,w.matrixWorld),w.normalMatrix.getNormalMatrix(w.modelViewMatrix),z.onBeforeRender(S,V,X,J,w,fe),z.transparent===!0&&z.side===pn&&z.forceSinglePass===!1?(z.side=In,z.needsUpdate=!0,S.renderBufferDirect(X,V,J,z,w,fe),z.side=Qn,z.needsUpdate=!0,S.renderBufferDirect(X,V,J,z,w,fe),z.side=pn):S.renderBufferDirect(X,V,J,z,w,fe),w.onAfterRender(S,V,X,J,z,fe)}function me(w,V,X){V.isScene!==!0&&(V=Ce);const J=Le.get(w),z=f.state.lights,fe=f.state.shadowsArray,ie=z.state.version,Ae=De.getParameters(w,z.state,fe,V,X),re=De.getProgramCacheKey(Ae);let Ge=J.programs;J.environment=w.isMeshStandardMaterial?V.environment:null,J.fog=V.fog,J.envMap=(w.isMeshStandardMaterial?k:jt).get(w.envMap||J.environment),J.envMapRotation=J.environment!==null&&w.envMap===null?V.environmentRotation:w.envMapRotation,Ge===void 0&&(w.addEventListener("dispose",pt),Ge=new Map,J.programs=Ge);let Me=Ge.get(re);if(Me!==void 0){if(J.currentProgram===Me&&J.lightsStateVersion===ie)return Te(w,Ae),Me}else Ae.uniforms=De.getUniforms(w),w.onBeforeCompile(Ae,S),Me=De.acquireProgram(Ae,re),Ge.set(re,Me),J.uniforms=Ae.uniforms;const Pe=J.uniforms;return(!w.isShaderMaterial&&!w.isRawShaderMaterial||w.clipping===!0)&&(Pe.clippingPlanes=mt.uniform),Te(w,Ae),J.needsLights=te(w),J.lightsStateVersion=ie,J.needsLights&&(Pe.ambientLightColor.value=z.state.ambient,Pe.lightProbe.value=z.state.probe,Pe.directionalLights.value=z.state.directional,Pe.directionalLightShadows.value=z.state.directionalShadow,Pe.spotLights.value=z.state.spot,Pe.spotLightShadows.value=z.state.spotShadow,Pe.rectAreaLights.value=z.state.rectArea,Pe.ltc_1.value=z.state.rectAreaLTC1,Pe.ltc_2.value=z.state.rectAreaLTC2,Pe.pointLights.value=z.state.point,Pe.pointLightShadows.value=z.state.pointShadow,Pe.hemisphereLights.value=z.state.hemi,Pe.directionalShadowMap.value=z.state.directionalShadowMap,Pe.directionalShadowMatrix.value=z.state.directionalShadowMatrix,Pe.spotShadowMap.value=z.state.spotShadowMap,Pe.spotLightMatrix.value=z.state.spotLightMatrix,Pe.spotLightMap.value=z.state.spotLightMap,Pe.pointShadowMap.value=z.state.pointShadowMap,Pe.pointShadowMatrix.value=z.state.pointShadowMatrix),J.currentProgram=Me,J.uniformsList=null,Me}function Be(w){if(w.uniformsList===null){const V=w.currentProgram.getUniforms();w.uniformsList=Ma.seqWithValue(V.seq,w.uniforms)}return w.uniformsList}function Te(w,V){const X=Le.get(w);X.outputColorSpace=V.outputColorSpace,X.batching=V.batching,X.batchingColor=V.batchingColor,X.instancing=V.instancing,X.instancingColor=V.instancingColor,X.instancingMorph=V.instancingMorph,X.skinning=V.skinning,X.morphTargets=V.morphTargets,X.morphNormals=V.morphNormals,X.morphColors=V.morphColors,X.morphTargetsCount=V.morphTargetsCount,X.numClippingPlanes=V.numClippingPlanes,X.numIntersection=V.numClipIntersection,X.vertexAlphas=V.vertexAlphas,X.vertexTangents=V.vertexTangents,X.toneMapping=V.toneMapping}function Re(w,V,X,J,z){V.isScene!==!0&&(V=Ce),ot.resetTextureUnits();const fe=V.fog,ie=J.isMeshStandardMaterial?V.environment:null,Ae=P===null?S.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:Xs,re=(J.isMeshStandardMaterial?k:jt).get(J.envMap||ie),Ge=J.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,Me=!!X.attributes.tangent&&(!!J.normalMap||J.anisotropy>0),Pe=!!X.morphAttributes.position,it=!!X.morphAttributes.normal,Mt=!!X.morphAttributes.color;let Ct=Xi;J.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Ct=S.toneMapping);const bt=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,St=bt!==void 0?bt.length:0,Qe=Le.get(J),Wt=f.state.lights;if(q===!0&&(ne===!0||w!==E)){const sn=w===E&&J.id===A;mt.setState(J,w,sn)}let Nt=!1;J.version===Qe.__version?(Qe.needsLights&&Qe.lightsStateVersion!==Wt.state.version||Qe.outputColorSpace!==Ae||z.isBatchedMesh&&Qe.batching===!1||!z.isBatchedMesh&&Qe.batching===!0||z.isBatchedMesh&&Qe.batchingColor===!0&&z.colorTexture===null||z.isBatchedMesh&&Qe.batchingColor===!1&&z.colorTexture!==null||z.isInstancedMesh&&Qe.instancing===!1||!z.isInstancedMesh&&Qe.instancing===!0||z.isSkinnedMesh&&Qe.skinning===!1||!z.isSkinnedMesh&&Qe.skinning===!0||z.isInstancedMesh&&Qe.instancingColor===!0&&z.instanceColor===null||z.isInstancedMesh&&Qe.instancingColor===!1&&z.instanceColor!==null||z.isInstancedMesh&&Qe.instancingMorph===!0&&z.morphTexture===null||z.isInstancedMesh&&Qe.instancingMorph===!1&&z.morphTexture!==null||Qe.envMap!==re||J.fog===!0&&Qe.fog!==fe||Qe.numClippingPlanes!==void 0&&(Qe.numClippingPlanes!==mt.numPlanes||Qe.numIntersection!==mt.numIntersection)||Qe.vertexAlphas!==Ge||Qe.vertexTangents!==Me||Qe.morphTargets!==Pe||Qe.morphNormals!==it||Qe.morphColors!==Mt||Qe.toneMapping!==Ct||Qe.morphTargetsCount!==St)&&(Nt=!0):(Nt=!0,Qe.__version=J.version);let nn=Qe.currentProgram;Nt===!0&&(nn=me(J,V,z));let Bt=!1,cn=!1,We=!1;const Pt=nn.getUniforms(),Ot=Qe.uniforms;if(Fe.useProgram(nn.program)&&(Bt=!0,cn=!0,We=!0),J.id!==A&&(A=J.id,cn=!0),Bt||E!==w){Fe.buffers.depth.getReversed()?(ee.copy(w.projectionMatrix),N2(ee),U2(ee),Pt.setValue(O,"projectionMatrix",ee)):Pt.setValue(O,"projectionMatrix",w.projectionMatrix),Pt.setValue(O,"viewMatrix",w.matrixWorldInverse);const Kt=Pt.map.cameraPosition;Kt!==void 0&&Kt.setValue(O,$.setFromMatrixPosition(w.matrixWorld)),at.logarithmicDepthBuffer&&Pt.setValue(O,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),(J.isMeshPhongMaterial||J.isMeshToonMaterial||J.isMeshLambertMaterial||J.isMeshBasicMaterial||J.isMeshStandardMaterial||J.isShaderMaterial)&&Pt.setValue(O,"isOrthographic",w.isOrthographicCamera===!0),E!==w&&(E=w,cn=!0,We=!0)}if(z.isSkinnedMesh){Pt.setOptional(O,z,"bindMatrix"),Pt.setOptional(O,z,"bindMatrixInverse");const sn=z.skeleton;sn&&(sn.boneTexture===null&&sn.computeBoneTexture(),Pt.setValue(O,"boneTexture",sn.boneTexture,ot))}z.isBatchedMesh&&(Pt.setOptional(O,z,"batchingTexture"),Pt.setValue(O,"batchingTexture",z._matricesTexture,ot),Pt.setOptional(O,z,"batchingIdTexture"),Pt.setValue(O,"batchingIdTexture",z._indirectTexture,ot),Pt.setOptional(O,z,"batchingColorTexture"),z._colorsTexture!==null&&Pt.setValue(O,"batchingColorTexture",z._colorsTexture,ot));const Jt=X.morphAttributes;if((Jt.position!==void 0||Jt.normal!==void 0||Jt.color!==void 0)&&st.update(z,X,nn),(cn||Qe.receiveShadow!==z.receiveShadow)&&(Qe.receiveShadow=z.receiveShadow,Pt.setValue(O,"receiveShadow",z.receiveShadow)),J.isMeshGouraudMaterial&&J.envMap!==null&&(Ot.envMap.value=re,Ot.flipEnvMap.value=re.isCubeTexture&&re.isRenderTargetTexture===!1?-1:1),J.isMeshStandardMaterial&&J.envMap===null&&V.environment!==null&&(Ot.envMapIntensity.value=V.environmentIntensity),cn&&(Pt.setValue(O,"toneMappingExposure",S.toneMappingExposure),Qe.needsLights&&qe(Ot,We),fe&&J.fog===!0&&ye.refreshFogUniforms(Ot,fe),ye.refreshMaterialUniforms(Ot,J,Z,le,f.state.transmissionRenderTarget[w.id]),Ma.upload(O,Be(Qe),Ot,ot)),J.isShaderMaterial&&J.uniformsNeedUpdate===!0&&(Ma.upload(O,Be(Qe),Ot,ot),J.uniformsNeedUpdate=!1),J.isSpriteMaterial&&Pt.setValue(O,"center",z.center),Pt.setValue(O,"modelViewMatrix",z.modelViewMatrix),Pt.setValue(O,"normalMatrix",z.normalMatrix),Pt.setValue(O,"modelMatrix",z.matrixWorld),J.isShaderMaterial||J.isRawShaderMaterial){const sn=J.uniformsGroups;for(let Kt=0,rt=sn.length;Kt<rt;Kt++){const ke=sn[Kt];K.update(ke,nn),K.bind(ke,nn)}}return nn}function qe(w,V){w.ambientLightColor.needsUpdate=V,w.lightProbe.needsUpdate=V,w.directionalLights.needsUpdate=V,w.directionalLightShadows.needsUpdate=V,w.pointLights.needsUpdate=V,w.pointLightShadows.needsUpdate=V,w.spotLights.needsUpdate=V,w.spotLightShadows.needsUpdate=V,w.rectAreaLights.needsUpdate=V,w.hemisphereLights.needsUpdate=V}function te(w){return w.isMeshLambertMaterial||w.isMeshToonMaterial||w.isMeshPhongMaterial||w.isMeshStandardMaterial||w.isShadowMaterial||w.isShaderMaterial&&w.lights===!0}this.getActiveCubeFace=function(){return C},this.getActiveMipmapLevel=function(){return R},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(w,V,X){const J=Le.get(w);J.__autoAllocateDepthBuffer=w.resolveDepthBuffer===!1,J.__autoAllocateDepthBuffer===!1&&(J.__useRenderToTexture=!1),Le.get(w.texture).__webglTexture=V,Le.get(w.depthTexture).__webglTexture=J.__autoAllocateDepthBuffer?void 0:X,J.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(w,V){const X=Le.get(w);X.__webglFramebuffer=V,X.__useDefaultFramebuffer=V===void 0};const Ve=O.createFramebuffer();this.setRenderTarget=function(w,V=0,X=0){P=w,C=V,R=X;let J=!0,z=null,fe=!1,ie=!1;if(w){const re=Le.get(w);if(re.__useDefaultFramebuffer!==void 0)Fe.bindFramebuffer(O.FRAMEBUFFER,null),J=!1;else if(re.__webglFramebuffer===void 0)ot.setupRenderTarget(w);else if(re.__hasExternalTextures)ot.rebindTextures(w,Le.get(w.texture).__webglTexture,Le.get(w.depthTexture).__webglTexture);else if(w.depthBuffer){const Pe=w.depthTexture;if(re.__boundDepthTexture!==Pe){if(Pe!==null&&Le.has(Pe)&&(w.width!==Pe.image.width||w.height!==Pe.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");ot.setupDepthRenderbuffer(w)}}const Ge=w.texture;(Ge.isData3DTexture||Ge.isDataArrayTexture||Ge.isCompressedArrayTexture)&&(ie=!0);const Me=Le.get(w).__webglFramebuffer;w.isWebGLCubeRenderTarget?(Array.isArray(Me[V])?z=Me[V][X]:z=Me[V],fe=!0):w.samples>0&&ot.useMultisampledRTT(w)===!1?z=Le.get(w).__webglMultisampledFramebuffer:Array.isArray(Me)?z=Me[X]:z=Me,L.copy(w.viewport),B.copy(w.scissor),H=w.scissorTest}else L.copy(be).multiplyScalar(Z).floor(),B.copy(ge).multiplyScalar(Z).floor(),H=se;if(X!==0&&(z=Ve),Fe.bindFramebuffer(O.FRAMEBUFFER,z)&&J&&Fe.drawBuffers(w,z),Fe.viewport(L),Fe.scissor(B),Fe.setScissorTest(H),fe){const re=Le.get(w.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_CUBE_MAP_POSITIVE_X+V,re.__webglTexture,X)}else if(ie){const re=Le.get(w.texture),Ge=V;O.framebufferTextureLayer(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,re.__webglTexture,X,Ge)}else if(w!==null&&X!==0){const re=Le.get(w.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,re.__webglTexture,X)}A=-1},this.readRenderTargetPixels=function(w,V,X,J,z,fe,ie,Ae=0){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let re=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ie!==void 0&&(re=re[ie]),re){Fe.bindFramebuffer(O.FRAMEBUFFER,re);try{const Ge=w.textures[Ae],Me=Ge.format,Pe=Ge.type;if(!at.textureFormatReadable(Me)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!at.textureTypeReadable(Pe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}V>=0&&V<=w.width-J&&X>=0&&X<=w.height-z&&(w.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+Ae),O.readPixels(V,X,J,z,Ye.convert(Me),Ye.convert(Pe),fe))}finally{const Ge=P!==null?Le.get(P).__webglFramebuffer:null;Fe.bindFramebuffer(O.FRAMEBUFFER,Ge)}}},this.readRenderTargetPixelsAsync=async function(w,V,X,J,z,fe,ie,Ae=0){if(!(w&&w.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let re=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ie!==void 0&&(re=re[ie]),re)if(V>=0&&V<=w.width-J&&X>=0&&X<=w.height-z){Fe.bindFramebuffer(O.FRAMEBUFFER,re);const Ge=w.textures[Ae],Me=Ge.format,Pe=Ge.type;if(!at.textureFormatReadable(Me))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!at.textureTypeReadable(Pe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const it=O.createBuffer();O.bindBuffer(O.PIXEL_PACK_BUFFER,it),O.bufferData(O.PIXEL_PACK_BUFFER,fe.byteLength,O.STREAM_READ),w.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+Ae),O.readPixels(V,X,J,z,Ye.convert(Me),Ye.convert(Pe),0);const Mt=P!==null?Le.get(P).__webglFramebuffer:null;Fe.bindFramebuffer(O.FRAMEBUFFER,Mt);const Ct=O.fenceSync(O.SYNC_GPU_COMMANDS_COMPLETE,0);return O.flush(),await F2(O,Ct,4),O.bindBuffer(O.PIXEL_PACK_BUFFER,it),O.getBufferSubData(O.PIXEL_PACK_BUFFER,0,fe),O.deleteBuffer(it),O.deleteSync(Ct),fe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(w,V=null,X=0){const J=Math.pow(2,-X),z=Math.floor(w.image.width*J),fe=Math.floor(w.image.height*J),ie=V!==null?V.x:0,Ae=V!==null?V.y:0;ot.setTexture2D(w,0),O.copyTexSubImage2D(O.TEXTURE_2D,X,0,0,ie,Ae,z,fe),Fe.unbindTexture()};const Xe=O.createFramebuffer(),ft=O.createFramebuffer();this.copyTextureToTexture=function(w,V,X=null,J=null,z=0,fe=null){fe===null&&(z!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),fe=z,z=0):fe=0);let ie,Ae,re,Ge,Me,Pe,it,Mt,Ct;const bt=w.isCompressedTexture?w.mipmaps[fe]:w.image;if(X!==null)ie=X.max.x-X.min.x,Ae=X.max.y-X.min.y,re=X.isBox3?X.max.z-X.min.z:1,Ge=X.min.x,Me=X.min.y,Pe=X.isBox3?X.min.z:0;else{const Jt=Math.pow(2,-z);ie=Math.floor(bt.width*Jt),Ae=Math.floor(bt.height*Jt),w.isDataArrayTexture?re=bt.depth:w.isData3DTexture?re=Math.floor(bt.depth*Jt):re=1,Ge=0,Me=0,Pe=0}J!==null?(it=J.x,Mt=J.y,Ct=J.z):(it=0,Mt=0,Ct=0);const St=Ye.convert(V.format),Qe=Ye.convert(V.type);let Wt;V.isData3DTexture?(ot.setTexture3D(V,0),Wt=O.TEXTURE_3D):V.isDataArrayTexture||V.isCompressedArrayTexture?(ot.setTexture2DArray(V,0),Wt=O.TEXTURE_2D_ARRAY):(ot.setTexture2D(V,0),Wt=O.TEXTURE_2D),O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,V.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,V.unpackAlignment);const Nt=O.getParameter(O.UNPACK_ROW_LENGTH),nn=O.getParameter(O.UNPACK_IMAGE_HEIGHT),Bt=O.getParameter(O.UNPACK_SKIP_PIXELS),cn=O.getParameter(O.UNPACK_SKIP_ROWS),We=O.getParameter(O.UNPACK_SKIP_IMAGES);O.pixelStorei(O.UNPACK_ROW_LENGTH,bt.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,bt.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,Ge),O.pixelStorei(O.UNPACK_SKIP_ROWS,Me),O.pixelStorei(O.UNPACK_SKIP_IMAGES,Pe);const Pt=w.isDataArrayTexture||w.isData3DTexture,Ot=V.isDataArrayTexture||V.isData3DTexture;if(w.isDepthTexture){const Jt=Le.get(w),sn=Le.get(V),Kt=Le.get(Jt.__renderTarget),rt=Le.get(sn.__renderTarget);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,Kt.__webglFramebuffer),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,rt.__webglFramebuffer);for(let ke=0;ke<re;ke++)Pt&&(O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(w).__webglTexture,z,Pe+ke),O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(V).__webglTexture,fe,Ct+ke)),O.blitFramebuffer(Ge,Me,ie,Ae,it,Mt,ie,Ae,O.DEPTH_BUFFER_BIT,O.NEAREST);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else if(z!==0||w.isRenderTargetTexture||Le.has(w)){const Jt=Le.get(w),sn=Le.get(V);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,Xe),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,ft);for(let Kt=0;Kt<re;Kt++)Pt?O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Jt.__webglTexture,z,Pe+Kt):O.framebufferTexture2D(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Jt.__webglTexture,z),Ot?O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,sn.__webglTexture,fe,Ct+Kt):O.framebufferTexture2D(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,sn.__webglTexture,fe),z!==0?O.blitFramebuffer(Ge,Me,ie,Ae,it,Mt,ie,Ae,O.COLOR_BUFFER_BIT,O.NEAREST):Ot?O.copyTexSubImage3D(Wt,fe,it,Mt,Ct+Kt,Ge,Me,ie,Ae):O.copyTexSubImage2D(Wt,fe,it,Mt,Ge,Me,ie,Ae);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else Ot?w.isDataTexture||w.isData3DTexture?O.texSubImage3D(Wt,fe,it,Mt,Ct,ie,Ae,re,St,Qe,bt.data):V.isCompressedArrayTexture?O.compressedTexSubImage3D(Wt,fe,it,Mt,Ct,ie,Ae,re,St,bt.data):O.texSubImage3D(Wt,fe,it,Mt,Ct,ie,Ae,re,St,Qe,bt):w.isDataTexture?O.texSubImage2D(O.TEXTURE_2D,fe,it,Mt,ie,Ae,St,Qe,bt.data):w.isCompressedTexture?O.compressedTexSubImage2D(O.TEXTURE_2D,fe,it,Mt,bt.width,bt.height,St,bt.data):O.texSubImage2D(O.TEXTURE_2D,fe,it,Mt,ie,Ae,St,Qe,bt);O.pixelStorei(O.UNPACK_ROW_LENGTH,Nt),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,nn),O.pixelStorei(O.UNPACK_SKIP_PIXELS,Bt),O.pixelStorei(O.UNPACK_SKIP_ROWS,cn),O.pixelStorei(O.UNPACK_SKIP_IMAGES,We),fe===0&&V.generateMipmaps&&O.generateMipmap(Wt),Fe.unbindTexture()},this.copyTextureToTexture3D=function(w,V,X=null,J=null,z=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(w,V,X,J,z)},this.initRenderTarget=function(w){Le.get(w).__webglFramebuffer===void 0&&ot.setupRenderTarget(w)},this.initTexture=function(w){w.isCubeTexture?ot.setTextureCube(w,0):w.isData3DTexture?ot.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?ot.setTexture2DArray(w,0):ot.setTexture2D(w,0),Fe.unbindTexture()},this.resetState=function(){C=0,R=0,P=null,Fe.reset(),Lt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return wi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Gt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Gt._getUnpackColorSpace()}}const Gh={type:"change"},dc={type:"start"},su={type:"end"},ra=new Ys,Wh=new Jn,U3=Math.cos(70*Ei.DEG2RAD),_n=new I,Bn=2*Math.PI,on={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Lo=1e-6;class ru extends K1{constructor(e,t=null){super(e,t),this.state=on.NONE,this.target=new I,this.cursor=new I,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Ti.ROTATE,MIDDLE:Ti.DOLLY,RIGHT:Ti.PAN},this.touches={ONE:Is.ROTATE,TWO:Is.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new I,this._lastQuaternion=new Vn,this._lastTargetPosition=new I,this._quat=new Vn().setFromUnitVectors(e.up,new I(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Pl,this._sphericalDelta=new Pl,this._scale=1,this._panOffset=new I,this._rotateStart=new et,this._rotateEnd=new et,this._rotateDelta=new et,this._panStart=new et,this._panEnd=new et,this._panDelta=new et,this._dollyStart=new et,this._dollyEnd=new et,this._dollyDelta=new et,this._dollyDirection=new I,this._mouse=new et,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=z3.bind(this),this._onPointerDown=I3.bind(this),this._onPointerUp=B3.bind(this),this._onContextMenu=X3.bind(this),this._onMouseWheel=V3.bind(this),this._onKeyDown=H3.bind(this),this._onTouchStart=G3.bind(this),this._onTouchMove=W3.bind(this),this._onMouseDown=O3.bind(this),this._onMouseMove=k3.bind(this),this._interceptControlDown=j3.bind(this),this._interceptControlUp=q3.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Gh),this.update(),this.state=on.NONE}update(e=null){const t=this.object.position;_n.copy(t).sub(this.target),_n.applyQuaternion(this._quat),this._spherical.setFromVector3(_n),this.autoRotate&&this.state===on.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,i=this.maxAzimuthAngle;isFinite(n)&&isFinite(i)&&(n<-Math.PI?n+=Bn:n>Math.PI&&(n-=Bn),i<-Math.PI?i+=Bn:i>Math.PI&&(i-=Bn),n<=i?this._spherical.theta=Math.max(n,Math.min(i,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+i)/2?Math.max(n,this._spherical.theta):Math.min(i,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=o!=this._spherical.radius}if(_n.setFromSpherical(this._spherical),_n.applyQuaternion(this._quatInverse),t.copy(this.target).add(_n),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){const a=_n.length();o=this._clampDistance(a*this._scale);const l=a-o;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const a=new I(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=l!==this.object.zoom;const c=new I(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=_n.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(ra.origin.copy(this.object.position),ra.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ra.direction))<U3?this.object.lookAt(this.target):(Wh.setFromNormalAndCoplanarPoint(this.object.up,this.target),ra.intersectPlane(Wh,this.target))))}else if(this.object.isOrthographicCamera){const o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>Lo||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Lo||this._lastTargetPosition.distanceToSquared(this.target)>Lo?(this.dispatchEvent(Gh),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Bn/60*this.autoRotateSpeed*e:Bn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){_n.setFromMatrixColumn(t,0),_n.multiplyScalar(-e),this._panOffset.add(_n)}_panUp(e,t){this.screenSpacePanning===!0?_n.setFromMatrixColumn(t,1):(_n.setFromMatrixColumn(t,0),_n.crossVectors(this.object.up,_n)),_n.multiplyScalar(e),this._panOffset.add(_n)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;_n.copy(i).sub(this.target);let r=_n.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/n.clientHeight,this.object.matrix),this._panUp(2*t*r/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),i=e-n.left,r=t-n.top,o=n.width,a=n.height;this._mouse.x=i/o*2-1,this._mouse.y=-(r/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Bn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Bn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panStart.set(n,i)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),r=.5*(e.pageY+n.y);this._rotateEnd.set(i,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Bn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Bn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const o=(e.pageX+t.x)*.5,a=(e.pageY+t.y)*.5;this._updateZoomParameters(o,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new et,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function I3(s){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(s.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(s)&&(this._addPointer(s),s.pointerType==="touch"?this._onTouchStart(s):this._onMouseDown(s)))}function z3(s){this.enabled!==!1&&(s.pointerType==="touch"?this._onTouchMove(s):this._onMouseMove(s))}function B3(s){switch(this._removePointer(s),this._pointers.length){case 0:this.domElement.releasePointerCapture(s.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(su),this.state=on.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function O3(s){let e;switch(s.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case Ti.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(s),this.state=on.DOLLY;break;case Ti.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=on.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=on.ROTATE}break;case Ti.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=on.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=on.PAN}break;default:this.state=on.NONE}this.state!==on.NONE&&this.dispatchEvent(dc)}function k3(s){switch(this.state){case on.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case on.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case on.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function V3(s){this.enabled===!1||this.enableZoom===!1||this.state!==on.NONE||(s.preventDefault(),this.dispatchEvent(dc),this._handleMouseWheel(this._customWheelEvent(s)),this.dispatchEvent(su))}function H3(s){this.enabled!==!1&&this._handleKeyDown(s)}function G3(s){switch(this._trackPointer(s),this._pointers.length){case 1:switch(this.touches.ONE){case Is.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(s),this.state=on.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=on.TOUCH_PAN;break;default:this.state=on.NONE}break;case 2:switch(this.touches.TWO){case Is.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(s),this.state=on.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=on.TOUCH_DOLLY_ROTATE;break;default:this.state=on.NONE}break;default:this.state=on.NONE}this.state!==on.NONE&&this.dispatchEvent(dc)}function W3(s){switch(this._trackPointer(s),this.state){case on.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case on.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case on.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case on.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=on.NONE}}function X3(s){this.enabled!==!1&&s.preventDefault()}function j3(s){s.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function q3(s){s.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var $3=Object.defineProperty,Y3=(s,e,t)=>e in s?$3(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Zt=(s,e,t)=>Y3(s,typeof e!="symbol"?e+"":e,t);const au=(s,e)=>{const[t,n]=e.split("-");return Object.assign(s.style,{left:n==="left"?"0":n==="center"?"50%":"",right:n==="right"?"0":"",top:t==="top"?"0":t==="bottom"?"":"50%",bottom:t==="bottom"?"0":"",transform:`${n==="center"?"translateX(-50%)":""} ${t==="center"?"translateY(-50%)":""}`}),e},J3=({placement:s,size:e,offset:t,id:n,className:i})=>{const r=document.createElement("div"),{top:o,left:a,right:l,bottom:c}=t;return Object.assign(r.style,{id:n,position:"absolute",zIndex:"1000",height:`${e}px`,width:`${e}px`,margin:`${o}px ${l}px ${c}px ${a}px`,borderRadius:"100%"}),au(r,s),n&&(r.id=n),i&&(r.className=i),r},K3=s=>{const e=typeof s=="string"?document.querySelector(s):s;if(!e)throw Error("Invalid DOM element");return e};function Nl(s,e,t){return Math.max(e,Math.min(t,s))}const Z3=[["x",0,3],["y",1,4],["z",2,5]],Xh=new I;function jh({isSphere:s},e,t){s&&(Xh.set(0,0,1).applyQuaternion(t.quaternion),Z3.forEach(([n,i,r])=>{const o=Xh[n];let a=e[i],l=a.userData.opacity;a.material.opacity=Nl(o>=0?l:l/2,0,1),a=e[r],l=a.userData.opacity,a.material.opacity=Nl(o>=0?l/2:l,0,1)}))}const Q3=(s,e,t=10)=>Math.abs(s.clientX-e.x)<t&&Math.abs(s.clientY-e.y)<t,qh=new Y1,$h=new et,Yh=(s,e,t,n)=>{$h.set((s.clientX-e.left)/e.width*2-1,-((s.clientY-e.top)/e.height)*2+1),qh.setFromCamera($h,t);const i=qh.intersectObjects(n,!1),r=i.length?i[0]:null;return!r||!r.object.visible?null:r},Po=1e-6,e4=2*Math.PI,ou=["x","y","z"],br=[...ou,"nx","ny","nz"],t4=["x","z","y","nx","nz","ny"],n4=["z","x","y","nz","nx","ny"],Ul="Right",ba="Top",Il="Front",zl="Left",Sa="Bottom",Bl="Back",i4=[Ul,ba,Il,zl,Sa,Bl].map(s=>s.toLocaleLowerCase()),lu=1.3,Jh=(s,e=!0)=>{const{material:t,userData:n}=s,{color:i,opacity:r}=e?n.hover:n;t.color.set(i),t.opacity=r},ns=s=>JSON.parse(JSON.stringify(s)),s4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=ln.DEFAULT_UP,r=i.z===1,o=i.x===1,{container:a}=s;s.container=void 0,s=JSON.parse(JSON.stringify(s)),s.container=a;const l=r?t4:o?n4:br;i4.forEach((u,h)=>{s[u]&&(s[l[h]]=s[u])});const c={enabled:!0,color:16777215,opacity:1,scale:.7,labelColor:2236962,line:!1,border:{size:0,color:14540253},hover:{color:t?16777215:9688043,labelColor:2236962,opacity:1,scale:.7,border:{size:0,color:14540253}}},d={line:!1,scale:t?.45:.7,hover:{scale:t?.5:.7}},m={type:e,container:document.body,size:128,placement:"top-right",resolution:n,lineWidth:4,radius:t?1:.2,smoothness:18,animated:!0,speed:1,background:{enabled:!0,color:t?16777215:14739180,opacity:t?0:1,hover:{color:t?16777215:14739180,opacity:t?.2:1}},font:{family:"sans-serif",weight:900},offset:{top:10,left:10,bottom:10,right:10},corners:{enabled:!t,color:t?15915362:16777215,opacity:1,scale:t?.15:.2,radius:1,smoothness:18,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:.225}},edges:{enabled:!t,color:t?15915362:16777215,opacity:t?1:0,radius:t?1:.125,smoothness:18,scale:t?.15:1,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:1}},x:{...ns(c),...t?{label:"X",color:16725587,line:!0}:{label:o?ba:Ul}},y:{...ns(c),...t?{label:"Y",color:9100032,line:!0}:{label:r||o?Il:ba}},z:{...ns(c),...t?{label:"Z",color:2920447,line:!0}:{label:r?ba:o?Ul:Il}},nx:{...ns(d),label:t?"":o?Sa:zl},ny:{...ns(d),label:t?"":r||o?Bl:Sa},nz:{...ns(d),label:t?"":r?Sa:o?zl:Bl}};return Ol(s,m),ou.forEach(u=>Ol(s[`n${u}`],ns(s[u]))),{...s,isSphere:t}};function Ol(s,...e){if(s instanceof HTMLElement||typeof s!="object"||s===null)return s;for(const t of e)for(const n in t)n!=="container"&&n in t&&(s[n]===void 0?s[n]=t[n]:typeof t[n]=="object"&&!Array.isArray(t[n])&&(s[n]=Ol(s[n]||{},t[n])));return s}const r4=(s,e=2)=>{const t=new Tt,n=e*2,{isSphere:i,resolution:r,radius:o,font:a,corners:l,edges:c}=s,d=br.map(R=>({...s[R],radius:o}));i&&l.enabled&&d.push(l),i&&c.enabled&&d.push(c);const m=document.createElement("canvas"),u=m.getContext("2d");m.width=r*2+n*2,m.height=r*d.length+n*d.length;const[h,g]=F(d,r,a);d.forEach(({radius:R,label:P,color:A,labelColor:E,border:L,hover:{color:B,labelColor:H,border:Q}},ae)=>{const G=r*ae+ae*n+e;S(e,G,e,r,R,P,L,A,E),S(r+e*3,G,e,r,R,P,Q??L,B??A,H??E)});const _=d.length,p=e/(r*2),f=e/(r*6),v=1/_,b=new u1(m);return b.repeat.set(.5-2*p,v-2*f),b.offset.set(p,1-f),Object.assign(b,{colorSpace:qt,wrapS:di,wrapT:di,userData:{offsetX:p,offsetY:f,cellHeight:v}}),b;function S(R,P,A,E,L,B,H,Q,ae){if(L=L*(E/2),Q!=null&&Q!==""&&(G(),u.fillStyle=t.set(Q).getStyle(),u.fill()),H&&H.size){const le=H.size*E/2;R+=le,P+=le,E-=H.size*E,L=Math.max(0,L-le),G(),u.strokeStyle=t.set(H.color).getStyle(),u.lineWidth=H.size*E,u.stroke()}B&&C(u,R+E/2,P+(E+A)/2,B,t.set(ae).getStyle());function G(){u.beginPath(),u.moveTo(R+L,P),u.lineTo(R+E-L,P),u.arcTo(R+E,P,R+E,P+L,L),u.lineTo(R+E,P+E-L),u.arcTo(R+E,P+E,R+E-L,P+E,L),u.lineTo(R+L,P+E),u.arcTo(R,P+E,R,P+E-L,L),u.lineTo(R,P+L),u.arcTo(R,P,R+L,P,L),u.closePath()}}function F(R,P,A){const E=[...R].sort((Ee,be)=>{var ge,se;return(((ge=Ee.label)==null?void 0:ge.length)||0)-(((se=be.label)==null?void 0:se.length)||0)}).pop().label,{family:L,weight:B}=A,H=i?Math.sqrt(Math.pow(P*.7,2)/2):P;let Q=H,ae=0,G=0;do{u.font=`${B} ${Q}px ${L}`;const Ee=u.measureText(E);ae=Ee.width,G=Ee.fontBoundingBoxDescent,Q--}while(ae>H&&Q>0);const le=H/G,Z=Math.min(H/ae,le),ve=Math.floor(Q*Z);return[`${B} ${ve}px ${L}`,le]}function C(R,P,A,E,L){R.font=h,R.textAlign="center",R.textBaseline="middle",R.fillStyle=L,R.fillText(E,P,A+(i?g:0))}},a4=(s,e)=>s.offset.x=(e?.5:0)+s.userData.offsetX,fc=(s,e)=>{const{offset:t,userData:{offsetY:n,cellHeight:i}}=s;t.y=1-(e+1)*i+n};function pc(s,e,t=2,n=2){const i=t/2-s,r=n/2-s,o=s/t,a=(t-s)/t,l=s/n,c=(n-s)/n,d=[i,r,0,-i,r,0,-i,-r,0,i,-r,0],m=[a,c,o,c,o,l,a,l],u=[3*(e+1)+3,3*(e+1)+4,e+4,e+5,2*(e+1)+4,2,1,2*(e+1)+3,3,4*(e+1)+3,4,0],h=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11].map(C=>u[C]);let g,_,p,f,v,b,S,F;for(let C=0;C<4;C++){f=C<1||C>2?i:-i,v=C<2?r:-r,b=C<1||C>2?a:o,S=C<2?c:l;for(let R=0;R<=e;R++)g=Math.PI/2*(C+R/e),_=Math.cos(g),p=Math.sin(g),d.push(f+s*_,v+s*p,0),m.push(b+o*_,S+l*p),R<e&&(F=(e+1)*C+R+4,h.push(C,F,F+1))}return new hn().setIndex(new mn(new Uint32Array(h),1)).setAttribute("position",new mn(new Float32Array(d),3)).setAttribute("uv",new mn(new Float32Array(m),2))}const o4=(s,e)=>{const t=new I,{isSphere:n,radius:i,smoothness:r}=s,o=pc(i,r);return br.map((a,l)=>{const c=l<3,d=br[l],m=l?e.clone():e;fc(m,l);const{enabled:u,scale:h,opacity:g,hover:_}=s[d],p={map:m,opacity:g,transparent:!0},f=n?new ec(new za(p)):new zt(o,new qi(p)),v=c?d:d[1];return f.position[v]=(c?1:-1)*(n?lu:1),n||f.lookAt(t.copy(f.position).multiplyScalar(1.7)),f.scale.setScalar(h),f.renderOrder=1,f.visible=u,f.userData={scale:h,opacity:g,hover:_},f})},l4=(s,e)=>{const{isSphere:t,corners:n}=s;if(!n.enabled)return[];const{color:i,opacity:r,scale:o,radius:a,smoothness:l,hover:c}=n,d=t?null:pc(a,l),m={transparent:!0,opacity:r},u=[1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1].map(g=>g*.85),h=new I;return Array(u.length/3).fill(0).map((g,_)=>{if(t){const v=e.clone();fc(v,6),m.map=v}else m.color=i;const p=t?new ec(new za(m)):new zt(d,new qi(m)),f=_*3;return p.position.set(u[f],u[f+1],u[f+2]),t&&p.position.normalize().multiplyScalar(1.7),p.scale.setScalar(o),p.lookAt(h.copy(p.position).multiplyScalar(2)),p.renderOrder=1,p.userData={color:i,opacity:r,scale:o,hover:c},p})},c4=(s,e,t)=>{const{isSphere:n,edges:i}=s;if(!i.enabled)return[];const{color:r,opacity:o,scale:a,hover:l,radius:c,smoothness:d}=i,m=n?null:pc(c,d,1.2,.25),u={transparent:!0,opacity:o},h=[0,1,1,0,-1,1,1,0,1,-1,0,1,0,1,-1,0,-1,-1,1,0,-1,-1,0,-1,1,1,0,1,-1,0,-1,1,0,-1,-1,0].map(p=>p*.925),g=new I,_=new I(0,1,0);return Array(h.length/3).fill(0).map((p,f)=>{if(n){const S=e.clone();fc(S,t),u.map=S}else u.color=r;const v=n?new ec(new za(u)):new zt(m,new qi(u)),b=f*3;return v.position.set(h[b],h[b+1],h[b+2]),n&&v.position.normalize().multiplyScalar(1.7),v.scale.setScalar(a),v.up.copy(_),v.lookAt(g.copy(v.position).multiplyScalar(2)),!n&&!v.position.y&&(v.rotation.z=Math.PI/2),v.renderOrder=1,v.userData={color:r,opacity:o,scale:a,hover:l},v})};function h4(s,e=!1){const t=s[0].index!==null,n=new Set(Object.keys(s[0].attributes)),i=new Set(Object.keys(s[0].morphAttributes)),r={},o={},a=s[0].morphTargetsRelative,l=new hn;let c=0;for(let d=0;d<s.length;++d){const m=s[d];let u=0;if(t!==(m.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const h in m.attributes){if(!n.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+'. All geometries must have compatible attributes; make sure "'+h+'" attribute exists among all geometries, or in none of them.'),null;r[h]===void 0&&(r[h]=[]),r[h].push(m.attributes[h]),u++}if(u!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". Make sure all geometries have the same number of attributes."),null;if(a!==m.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const h in m.morphAttributes){if(!i.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphAttributes must be consistent throughout all geometries."),null;o[h]===void 0&&(o[h]=[]),o[h].push(m.morphAttributes[h])}if(e){let h;if(t)h=m.index.count;else if(m.attributes.position!==void 0)h=m.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". The geometry must have either an index or a position attribute"),null;l.addGroup(c,h,d),c+=h}}if(t){let d=0;const m=[];for(let u=0;u<s.length;++u){const h=s[u].index;for(let g=0;g<h.count;++g)m.push(h.getX(g)+d);d+=s[u].attributes.position.count}l.setIndex(m)}for(const d in r){const m=Kh(r[d]);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" attribute."),null;l.setAttribute(d,m)}for(const d in o){const m=o[d][0].length;if(m===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[d]=[];for(let u=0;u<m;++u){const h=[];for(let _=0;_<o[d].length;++_)h.push(o[d][_][u]);const g=Kh(h);if(!g)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" morphAttribute."),null;l.morphAttributes[d].push(g)}}return l}function Kh(s){let e,t,n,i=-1,r=0;for(let c=0;c<s.length;++c){const d=s[c];if(e===void 0&&(e=d.array.constructor),e!==d.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=d.itemSize),t!==d.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=d.normalized),n!==d.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=d.gpuType),i!==d.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=d.count*t}const o=new e(r),a=new mn(o,t,n);let l=0;for(let c=0;c<s.length;++c){const d=s[c];if(d.isInterleavedBufferAttribute){const m=l/t;for(let u=0,h=d.count;u<h;u++)for(let g=0;g<t;g++){const _=d.getComponent(u,g);a.setComponent(u+m,g,_)}}else o.set(d.array,l);l+=d.count*t}return i!==void 0&&(a.gpuType=i),a}const u4=(s,e)=>{const{isSphere:t,background:{enabled:n,color:i,opacity:r,hover:o}}=e;let a;const l=new qi({color:i,side:In,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)a=new zt(new Oa(1.8,64,64),l);else{let c;s.forEach(d=>{const m=d.scale.x;d.scale.setScalar(.9),d.updateMatrix();const u=d.geometry.clone();u.applyMatrix4(d.matrix),c=c?h4([c,u]):u,d.scale.setScalar(m)}),a=new zt(c,l)}return a.userData={color:i,opacity:r,hover:o},a},Zh=new Fn,aa=new I;class cu extends j1{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new It(e,3)),this.setAttribute("uv",new It(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceStart",new pi(n,3,0)),this.setAttribute("instanceEnd",new pi(n,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceColorStart",new pi(n,3,0)),this.setAttribute("instanceColorEnd",new pi(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new T1(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Fn);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Zh.setFromBufferAttribute(t),this.boundingBox.union(Zh))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Fi),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)aa.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(aa)),aa.fromBufferAttribute(t,r),i=Math.max(i,n.distanceToSquared(aa));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}Je.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new et(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};kn.line={uniforms:Ql.merge([Je.common,Je.fog,Je.line]),vertexShader:`
|
|
3827
|
+
}`;class D3{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new Mn,r=e.properties.get(i);r.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new Ti({vertexShader:C3,fragmentShader:R3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Pt(new wi(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class L3 extends hs{constructor(e,t){super();const n=this;let i=null,r=1,o=null,a="local-floor",l=1,c=null,d=null,m=null,u=null,h=null,g=null;const _=new D3,f=t.getContextAttributes();let p=null,x=null;const M=[],b=[],N=new Je;let L=null;const P=new gn;P.viewport=new Ot;const I=new gn;I.viewport=new Ot;const A=[P,I],E=new q1;let F=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(q){let K=M[q];return K===void 0&&(K=new po,M[q]=K),K.getTargetRaySpace()},this.getControllerGrip=function(q){let K=M[q];return K===void 0&&(K=new po,M[q]=K),K.getGripSpace()},this.getHand=function(q){let K=M[q];return K===void 0&&(K=new po,M[q]=K),K.getHandSpace()};function X(q){const K=b.indexOf(q.inputSource);if(K===-1)return;const te=M[K];te!==void 0&&(te.update(q.inputSource,q.frame,c||o),te.dispatchEvent({type:q.type,data:q.inputSource}))}function Z(){i.removeEventListener("select",X),i.removeEventListener("selectstart",X),i.removeEventListener("selectend",X),i.removeEventListener("squeeze",X),i.removeEventListener("squeezestart",X),i.removeEventListener("squeezeend",X),i.removeEventListener("end",Z),i.removeEventListener("inputsourceschange",se);for(let q=0;q<M.length;q++){const K=b[q];K!==null&&(b[q]=null,M[q].disconnect(K))}F=null,B=null,_.reset(),e.setRenderTarget(p),h=null,u=null,m=null,i=null,x=null,re.stop(),n.isPresenting=!1,e.setPixelRatio(L),e.setSize(N.width,N.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(q){r=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(q){a=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(q){c=q},this.getBaseLayer=function(){return u!==null?u:h},this.getBinding=function(){return m},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(q){if(i=q,i!==null){if(p=e.getRenderTarget(),i.addEventListener("select",X),i.addEventListener("selectstart",X),i.addEventListener("selectend",X),i.addEventListener("squeeze",X),i.addEventListener("squeezestart",X),i.addEventListener("squeezeend",X),i.addEventListener("end",Z),i.addEventListener("inputsourceschange",se),f.xrCompatible!==!0&&await t.makeXRCompatible(),L=e.getPixelRatio(),e.getSize(N),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let te=null,ee=null,fe=null;f.depth&&(fe=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,te=f.stencil?xr:yr,ee=f.stencil?vr:ls);const Y={colorFormat:t.RGBA8,depthFormat:fe,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer(Y),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),x=new cs(u.textureWidth,u.textureHeight,{format:$n,type:hi,depthTexture:new H0(u.textureWidth,u.textureHeight,ee,void 0,void 0,void 0,void 0,void 0,void 0,te),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0,resolveDepthBuffer:u.ignoreDepthValues===!1,resolveStencilBuffer:u.ignoreDepthValues===!1})}else{const te={antialias:f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,te),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),x=new cs(h.framebufferWidth,h.framebufferHeight,{format:$n,type:hi,colorSpace:e.outputColorSpace,stencilBuffer:f.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}x.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),re.setContext(i),re.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function se(q){for(let K=0;K<q.removed.length;K++){const te=q.removed[K],ee=b.indexOf(te);ee>=0&&(b[ee]=null,M[ee].disconnect(te))}for(let K=0;K<q.added.length;K++){const te=q.added[K];let ee=b.indexOf(te);if(ee===-1){for(let Y=0;Y<M.length;Y++)if(Y>=b.length){b.push(te),ee=Y;break}else if(b[Y]===null){b[Y]=te,ee=Y;break}if(ee===-1)break}const fe=M[ee];fe&&fe.connect(te)}}const W=new z,he=new z;function Q(q,K,te){W.setFromMatrixPosition(K.matrixWorld),he.setFromMatrixPosition(te.matrixWorld);const ee=W.distanceTo(he),fe=K.projectionMatrix.elements,Y=te.projectionMatrix.elements,me=fe[14]/(fe[10]-1),Te=fe[14]/(fe[10]+1),et=(fe[9]+1)/fe[5],We=(fe[9]-1)/fe[5],O=(fe[8]-1)/fe[0],dt=(Y[8]+1)/Y[0],st=me*O,it=me*dt,Ie=ee/(-O+dt),Ze=Ie*-O;if(K.matrixWorld.decompose(q.position,q.quaternion,q.scale),q.translateX(Ze),q.translateZ(Ie),q.matrixWorld.compose(q.position,q.quaternion,q.scale),q.matrixWorldInverse.copy(q.matrixWorld).invert(),fe[10]===-1)q.projectionMatrix.copy(K.projectionMatrix),q.projectionMatrixInverse.copy(K.projectionMatrixInverse);else{const Le=me+Ie,rt=Te+Ie,Xt=st-Ze,k=it+(ee-Ze),R=et*Te/rt*Le,oe=We*Te/rt*Le;q.projectionMatrix.makePerspective(Xt,k,R,oe,Le,rt),q.projectionMatrixInverse.copy(q.projectionMatrix).invert()}}function xe(q,K){K===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(K.matrixWorld,q.matrix),q.matrixWorldInverse.copy(q.matrixWorld).invert()}this.updateCamera=function(q){if(i===null)return;let K=q.near,te=q.far;_.texture!==null&&(_.depthNear>0&&(K=_.depthNear),_.depthFar>0&&(te=_.depthFar)),E.near=I.near=P.near=K,E.far=I.far=P.far=te,(F!==E.near||B!==E.far)&&(i.updateRenderState({depthNear:E.near,depthFar:E.far}),F=E.near,B=E.far),P.layers.mask=q.layers.mask|2,I.layers.mask=q.layers.mask|4,E.layers.mask=P.layers.mask|I.layers.mask;const ee=q.parent,fe=E.cameras;xe(E,ee);for(let Y=0;Y<fe.length;Y++)xe(fe[Y],ee);fe.length===2?Q(E,P,I):E.projectionMatrix.copy(P.projectionMatrix),De(q,E,ee)};function De(q,K,te){te===null?q.matrix.copy(K.matrixWorld):(q.matrix.copy(te.matrixWorld),q.matrix.invert(),q.matrix.multiply(K.matrixWorld)),q.matrix.decompose(q.position,q.quaternion,q.scale),q.updateMatrixWorld(!0),q.projectionMatrix.copy(K.projectionMatrix),q.projectionMatrixInverse.copy(K.projectionMatrixInverse),q.isPerspectiveCamera&&(q.fov=js*2*Math.atan(1/q.projectionMatrix.elements[5]),q.zoom=1)}this.getCamera=function(){return E},this.getFoveation=function(){if(!(u===null&&h===null))return l},this.setFoveation=function(q){l=q,u!==null&&(u.fixedFoveation=q),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=q)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(E)};let Ae=null;function pe(q,K){if(d=K.getViewerPose(c||o),g=K,d!==null){const te=d.views;h!==null&&(e.setRenderTargetFramebuffer(x,h.framebuffer),e.setRenderTarget(x));let ee=!1;te.length!==E.cameras.length&&(E.cameras.length=0,ee=!0);for(let me=0;me<te.length;me++){const Te=te[me];let et=null;if(h!==null)et=h.getViewport(Te);else{const O=m.getViewSubImage(u,Te);et=O.viewport,me===0&&(e.setRenderTargetTextures(x,O.colorTexture,O.depthStencilTexture),e.setRenderTarget(x))}let We=A[me];We===void 0&&(We=new gn,We.layers.enable(me),We.viewport=new Ot,A[me]=We),We.matrix.fromArray(Te.transform.matrix),We.matrix.decompose(We.position,We.quaternion,We.scale),We.projectionMatrix.fromArray(Te.projectionMatrix),We.projectionMatrixInverse.copy(We.projectionMatrix).invert(),We.viewport.set(et.x,et.y,et.width,et.height),me===0&&(E.matrix.copy(We.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),ee===!0&&E.cameras.push(We)}const fe=i.enabledFeatures;if(fe&&fe.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const me=m.getDepthInformation(te[0]);me&&me.isValid&&me.texture&&_.init(e,me,i.renderState)}}for(let te=0;te<M.length;te++){const ee=b[te],fe=M[te];ee!==null&&fe!==void 0&&fe.update(ee,K,c||o)}Ae&&Ae(q,K),K.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:K}),g=null}const re=new Z0;re.setAnimationLoop(pe),this.setAnimationLoop=function(q){Ae=q},this.dispose=function(){}}}const Qi=new _n,P3=new Mt;function F3(s,e){function t(f,p){f.matrixAutoUpdate===!0&&f.updateMatrix(),p.value.copy(f.matrix)}function n(f,p){p.color.getRGB(f.fogColor.value,N0(s)),p.isFog?(f.fogNear.value=p.near,f.fogFar.value=p.far):p.isFogExp2&&(f.fogDensity.value=p.density)}function i(f,p,x,M,b){p.isMeshBasicMaterial||p.isMeshLambertMaterial?r(f,p):p.isMeshToonMaterial?(r(f,p),m(f,p)):p.isMeshPhongMaterial?(r(f,p),d(f,p)):p.isMeshStandardMaterial?(r(f,p),u(f,p),p.isMeshPhysicalMaterial&&h(f,p,b)):p.isMeshMatcapMaterial?(r(f,p),g(f,p)):p.isMeshDepthMaterial?r(f,p):p.isMeshDistanceMaterial?(r(f,p),_(f,p)):p.isMeshNormalMaterial?r(f,p):p.isLineBasicMaterial?(o(f,p),p.isLineDashedMaterial&&a(f,p)):p.isPointsMaterial?l(f,p,x,M):p.isSpriteMaterial?c(f,p):p.isShadowMaterial?(f.color.value.copy(p.color),f.opacity.value=p.opacity):p.isShaderMaterial&&(p.uniformsNeedUpdate=!1)}function r(f,p){f.opacity.value=p.opacity,p.color&&f.diffuse.value.copy(p.color),p.emissive&&f.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity),p.map&&(f.map.value=p.map,t(p.map,f.mapTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.bumpMap&&(f.bumpMap.value=p.bumpMap,t(p.bumpMap,f.bumpMapTransform),f.bumpScale.value=p.bumpScale,p.side===Dn&&(f.bumpScale.value*=-1)),p.normalMap&&(f.normalMap.value=p.normalMap,t(p.normalMap,f.normalMapTransform),f.normalScale.value.copy(p.normalScale),p.side===Dn&&f.normalScale.value.negate()),p.displacementMap&&(f.displacementMap.value=p.displacementMap,t(p.displacementMap,f.displacementMapTransform),f.displacementScale.value=p.displacementScale,f.displacementBias.value=p.displacementBias),p.emissiveMap&&(f.emissiveMap.value=p.emissiveMap,t(p.emissiveMap,f.emissiveMapTransform)),p.specularMap&&(f.specularMap.value=p.specularMap,t(p.specularMap,f.specularMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest);const x=e.get(p),M=x.envMap,b=x.envMapRotation;M&&(f.envMap.value=M,Qi.copy(b),Qi.x*=-1,Qi.y*=-1,Qi.z*=-1,M.isCubeTexture&&M.isRenderTargetTexture===!1&&(Qi.y*=-1,Qi.z*=-1),f.envMapRotation.value.setFromMatrix4(P3.makeRotationFromEuler(Qi)),f.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=p.reflectivity,f.ior.value=p.ior,f.refractionRatio.value=p.refractionRatio),p.lightMap&&(f.lightMap.value=p.lightMap,f.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,f.lightMapTransform)),p.aoMap&&(f.aoMap.value=p.aoMap,f.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,f.aoMapTransform))}function o(f,p){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,p.map&&(f.map.value=p.map,t(p.map,f.mapTransform))}function a(f,p){f.dashSize.value=p.dashSize,f.totalSize.value=p.dashSize+p.gapSize,f.scale.value=p.scale}function l(f,p,x,M){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,f.size.value=p.size*x,f.scale.value=M*.5,p.map&&(f.map.value=p.map,t(p.map,f.uvTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest)}function c(f,p){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,f.rotation.value=p.rotation,p.map&&(f.map.value=p.map,t(p.map,f.mapTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest)}function d(f,p){f.specular.value.copy(p.specular),f.shininess.value=Math.max(p.shininess,1e-4)}function m(f,p){p.gradientMap&&(f.gradientMap.value=p.gradientMap)}function u(f,p){f.metalness.value=p.metalness,p.metalnessMap&&(f.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,f.metalnessMapTransform)),f.roughness.value=p.roughness,p.roughnessMap&&(f.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,f.roughnessMapTransform)),p.envMap&&(f.envMapIntensity.value=p.envMapIntensity)}function h(f,p,x){f.ior.value=p.ior,p.sheen>0&&(f.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),f.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(f.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,f.sheenColorMapTransform)),p.sheenRoughnessMap&&(f.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,f.sheenRoughnessMapTransform))),p.clearcoat>0&&(f.clearcoat.value=p.clearcoat,f.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(f.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,f.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(f.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===Dn&&f.clearcoatNormalScale.value.negate())),p.dispersion>0&&(f.dispersion.value=p.dispersion),p.iridescence>0&&(f.iridescence.value=p.iridescence,f.iridescenceIOR.value=p.iridescenceIOR,f.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(f.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,f.iridescenceMapTransform)),p.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),p.transmission>0&&(f.transmission.value=p.transmission,f.transmissionSamplerMap.value=x.texture,f.transmissionSamplerSize.value.set(x.width,x.height),p.transmissionMap&&(f.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,f.transmissionMapTransform)),f.thickness.value=p.thickness,p.thicknessMap&&(f.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=p.attenuationDistance,f.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(f.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(f.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=p.specularIntensity,f.specularColor.value.copy(p.specularColor),p.specularColorMap&&(f.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,f.specularColorMapTransform)),p.specularIntensityMap&&(f.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,f.specularIntensityMapTransform))}function g(f,p){p.matcap&&(f.matcap.value=p.matcap)}function _(f,p){const x=e.get(p).light;f.referencePosition.value.setFromMatrixPosition(x.matrixWorld),f.nearDistance.value=x.shadow.camera.near,f.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function N3(s,e,t,n){let i={},r={},o=[];const a=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function l(x,M){const b=M.program;n.uniformBlockBinding(x,b)}function c(x,M){let b=i[x.id];b===void 0&&(g(x),b=d(x),i[x.id]=b,x.addEventListener("dispose",f));const N=M.program;n.updateUBOMapping(x,N);const L=e.render.frame;r[x.id]!==L&&(u(x),r[x.id]=L)}function d(x){const M=m();x.__bindingPointIndex=M;const b=s.createBuffer(),N=x.__size,L=x.usage;return s.bindBuffer(s.UNIFORM_BUFFER,b),s.bufferData(s.UNIFORM_BUFFER,N,L),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,M,b),b}function m(){for(let x=0;x<a;x++)if(o.indexOf(x)===-1)return o.push(x),x;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function u(x){const M=i[x.id],b=x.uniforms,N=x.__cache;s.bindBuffer(s.UNIFORM_BUFFER,M);for(let L=0,P=b.length;L<P;L++){const I=Array.isArray(b[L])?b[L]:[b[L]];for(let A=0,E=I.length;A<E;A++){const F=I[A];if(h(F,L,A,N)===!0){const B=F.__offset,X=Array.isArray(F.value)?F.value:[F.value];let Z=0;for(let se=0;se<X.length;se++){const W=X[se],he=_(W);typeof W=="number"||typeof W=="boolean"?(F.__data[0]=W,s.bufferSubData(s.UNIFORM_BUFFER,B+Z,F.__data)):W.isMatrix3?(F.__data[0]=W.elements[0],F.__data[1]=W.elements[1],F.__data[2]=W.elements[2],F.__data[3]=0,F.__data[4]=W.elements[3],F.__data[5]=W.elements[4],F.__data[6]=W.elements[5],F.__data[7]=0,F.__data[8]=W.elements[6],F.__data[9]=W.elements[7],F.__data[10]=W.elements[8],F.__data[11]=0):(W.toArray(F.__data,Z),Z+=he.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,B,F.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(x,M,b,N){const L=x.value,P=M+"_"+b;if(N[P]===void 0)return typeof L=="number"||typeof L=="boolean"?N[P]=L:N[P]=L.clone(),!0;{const I=N[P];if(typeof L=="number"||typeof L=="boolean"){if(I!==L)return N[P]=L,!0}else if(I.equals(L)===!1)return I.copy(L),!0}return!1}function g(x){const M=x.uniforms;let b=0;const N=16;for(let P=0,I=M.length;P<I;P++){const A=Array.isArray(M[P])?M[P]:[M[P]];for(let E=0,F=A.length;E<F;E++){const B=A[E],X=Array.isArray(B.value)?B.value:[B.value];for(let Z=0,se=X.length;Z<se;Z++){const W=X[Z],he=_(W),Q=b%N,xe=Q%he.boundary,De=Q+xe;b+=xe,De!==0&&N-De<he.storage&&(b+=N-De),B.__data=new Float32Array(he.storage/Float32Array.BYTES_PER_ELEMENT),B.__offset=b,b+=he.storage}}}const L=b%N;return L>0&&(b+=N-L),x.__size=b,x.__cache={},this}function _(x){const M={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(M.boundary=4,M.storage=4):x.isVector2?(M.boundary=8,M.storage=8):x.isVector3||x.isColor?(M.boundary=16,M.storage=12):x.isVector4?(M.boundary=16,M.storage=16):x.isMatrix3?(M.boundary=48,M.storage=48):x.isMatrix4?(M.boundary=64,M.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),M}function f(x){const M=x.target;M.removeEventListener("dispose",f);const b=o.indexOf(M.__bindingPointIndex);o.splice(b,1),s.deleteBuffer(i[M.id]),delete i[M.id],delete r[M.id]}function p(){for(const x in i)s.deleteBuffer(i[x]);o=[],i={},r={}}return{bind:l,update:c,dispose:p}}class iu{constructor(e={}){const{canvas:t=P2(),context:n=null,depth:i=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:m=!1,reverseDepthBuffer:u=!1}=e;this.isWebGLRenderer=!0;let h;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=n.getContextAttributes().alpha}else h=o;const g=new Uint32Array(4),_=new Int32Array(4);let f=null,p=null;const x=[],M=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Vi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const b=this;let N=!1;this._outputColorSpace=Vt;let L=0,P=0,I=null,A=-1,E=null;const F=new Ot,B=new Ot;let X=null;const Z=new bt(0);let se=0,W=t.width,he=t.height,Q=1,xe=null,De=null;const Ae=new Ot(0,0,W,he),pe=new Ot(0,0,W,he);let re=!1;const q=new nc;let K=!1,te=!1;const ee=new Mt,fe=new Mt,Y=new z,me=new Ot,Te={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let et=!1;function We(){return I===null?Q:1}let O=n;function dt(T,C){return t.getContext(T,C)}try{const T={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:m};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Vl}`),t.addEventListener("webglcontextlost",lt,!1),t.addEventListener("webglcontextrestored",ke,!1),t.addEventListener("webglcontextcreationerror",Re,!1),O===null){const C="webgl2";if(O=dt(C,T),O===null)throw dt(C)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(T){throw console.error("THREE.WebGLRenderer: "+T.message),T}let st,it,Ie,Ze,Le,rt,Xt,k,R,oe,we,Pe,be,_t,Ke,ft,vt,Fe,at,Et,St,$e,At,J;function tt(){st=new Xp(O),st.init(),$e=new T3(O,st),it=new Bp(O,st,e,$e),Ie=new A3(O,st),it.reverseDepthBuffer&&u&&Ie.buffers.depth.setReversed(!0),Ze=new $p(O),Le=new d3,rt=new w3(O,st,Ie,Le,it,$e,Ze),Xt=new kp(b),k=new Wp(b),R=new Q1(O),At=new Ip(O,R),oe=new jp(O,R,Ze,At),we=new Kp(O,oe,R,Ze),at=new Yp(O,it,rt),ft=new Op(Le),Pe=new u3(b,Xt,k,st,it,At,ft),be=new F3(b,Le),_t=new p3,Ke=new x3(st),Fe=new Up(b,Xt,k,Ie,we,h,l),vt=new S3(b,we,it),J=new N3(O,Ze,it,Ie),Et=new zp(O,st,Ze),St=new qp(O,st,Ze),Ze.programs=Pe.programs,b.capabilities=it,b.extensions=st,b.properties=Le,b.renderLists=_t,b.shadowMap=vt,b.state=Ie,b.info=Ze}tt();const Ne=new L3(b,O);this.xr=Ne,this.getContext=function(){return O},this.getContextAttributes=function(){return O.getContextAttributes()},this.forceContextLoss=function(){const T=st.get("WEBGL_lose_context");T&&T.loseContext()},this.forceContextRestore=function(){const T=st.get("WEBGL_lose_context");T&&T.restoreContext()},this.getPixelRatio=function(){return Q},this.setPixelRatio=function(T){T!==void 0&&(Q=T,this.setSize(W,he,!1))},this.getSize=function(T){return T.set(W,he)},this.setSize=function(T,C,V=!0){if(Ne.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}W=T,he=C,t.width=Math.floor(T*Q),t.height=Math.floor(C*Q),V===!0&&(t.style.width=T+"px",t.style.height=C+"px"),this.setViewport(0,0,T,C)},this.getDrawingBufferSize=function(T){return T.set(W*Q,he*Q).floor()},this.setDrawingBufferSize=function(T,C,V){W=T,he=C,Q=V,t.width=Math.floor(T*V),t.height=Math.floor(C*V),this.setViewport(0,0,T,C)},this.getCurrentViewport=function(T){return T.copy(F)},this.getViewport=function(T){return T.copy(Ae)},this.setViewport=function(T,C,V,j){T.isVector4?Ae.set(T.x,T.y,T.z,T.w):Ae.set(T,C,V,j),Ie.viewport(F.copy(Ae).multiplyScalar(Q).round())},this.getScissor=function(T){return T.copy(pe)},this.setScissor=function(T,C,V,j){T.isVector4?pe.set(T.x,T.y,T.z,T.w):pe.set(T,C,V,j),Ie.scissor(B.copy(pe).multiplyScalar(Q).round())},this.getScissorTest=function(){return re},this.setScissorTest=function(T){Ie.setScissorTest(re=T)},this.setOpaqueSort=function(T){xe=T},this.setTransparentSort=function(T){De=T},this.getClearColor=function(T){return T.copy(Fe.getClearColor())},this.setClearColor=function(){Fe.setClearColor(...arguments)},this.getClearAlpha=function(){return Fe.getClearAlpha()},this.setClearAlpha=function(){Fe.setClearAlpha(...arguments)},this.clear=function(T=!0,C=!0,V=!0){let j=0;if(T){let G=!1;if(I!==null){const le=I.texture.format;G=le===Yl||le===$l||le===ql}if(G){const le=I.texture.type,Me=le===hi||le===ls||le===_r||le===vr||le===Xl||le===jl,_e=Fe.getClearColor(),ce=Fe.getClearAlpha(),ne=_e.r,Oe=_e.g,de=_e.b;Me?(g[0]=ne,g[1]=Oe,g[2]=de,g[3]=ce,O.clearBufferuiv(O.COLOR,0,g)):(_[0]=ne,_[1]=Oe,_[2]=de,_[3]=ce,O.clearBufferiv(O.COLOR,0,_))}else j|=O.COLOR_BUFFER_BIT}C&&(j|=O.DEPTH_BUFFER_BIT),V&&(j|=O.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),O.clear(j)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",lt,!1),t.removeEventListener("webglcontextrestored",ke,!1),t.removeEventListener("webglcontextcreationerror",Re,!1),Fe.dispose(),_t.dispose(),Ke.dispose(),Le.dispose(),Xt.dispose(),k.dispose(),we.dispose(),At.dispose(),J.dispose(),Pe.dispose(),Ne.dispose(),Ne.removeEventListener("sessionstart",us),Ne.removeEventListener("sessionend",ds),zn.stop()};function lt(T){T.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),N=!0}function ke(){console.log("THREE.WebGLRenderer: Context Restored."),N=!1;const T=Ze.autoReset,C=vt.enabled,V=vt.autoUpdate,j=vt.needsUpdate,G=vt.type;tt(),Ze.autoReset=T,vt.enabled=C,vt.autoUpdate=V,vt.needsUpdate=j,vt.type=G}function Re(T){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",T.statusMessage)}function ot(T){const C=T.target;C.removeEventListener("dispose",ot),Tt(C)}function Tt(T){qt(T),Le.remove(T)}function qt(T){const C=Le.get(T).programs;C!==void 0&&(C.forEach(function(V){Pe.releaseProgram(V)}),T.isShaderMaterial&&Pe.releaseShaderCache(T))}this.renderBufferDirect=function(T,C,V,j,G,le){C===null&&(C=Te);const Me=G.isMesh&&G.matrixWorld.determinant()<0,_e=ue(T,C,V,j,G);Ie.setMaterial(j,Me);let ce=V.index,ne=1;if(j.wireframe===!0){if(ce=oe.getWireframeAttribute(V),ce===void 0)return;ne=2}const Oe=V.drawRange,de=V.attributes.position;let Ge=Oe.start*ne,Ee=(Oe.start+Oe.count)*ne;le!==null&&(Ge=Math.max(Ge,le.start*ne),Ee=Math.min(Ee,(le.start+le.count)*ne)),ce!==null?(Ge=Math.max(Ge,0),Ee=Math.min(Ee,ce.count)):de!=null&&(Ge=Math.max(Ge,0),Ee=Math.min(Ee,de.count));const ht=Ee-Ge;if(ht<0||ht===1/0)return;At.setup(G,j,_e,V,ce);let He,je=Et;if(ce!==null&&(He=R.get(ce),je=St,je.setIndex(He)),G.isMesh)j.wireframe===!0?(Ie.setLineWidth(j.wireframeLinewidth*We()),je.setMode(O.LINES)):je.setMode(O.TRIANGLES);else if(G.isLine){let Xe=j.linewidth;Xe===void 0&&(Xe=1),Ie.setLineWidth(Xe*We()),G.isLineSegments?je.setMode(O.LINES):G.isLineLoop?je.setMode(O.LINE_LOOP):je.setMode(O.LINE_STRIP)}else G.isPoints?je.setMode(O.POINTS):G.isSprite&&je.setMode(O.TRIANGLES);if(G.isBatchedMesh)if(G._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),je.renderMultiDrawInstances(G._multiDrawStarts,G._multiDrawCounts,G._multiDrawCount,G._multiDrawInstances);else if(st.get("WEBGL_multi_draw"))je.renderMultiDraw(G._multiDrawStarts,G._multiDrawCounts,G._multiDrawCount);else{const Xe=G._multiDrawStarts,Dt=G._multiDrawCounts,yt=G._multiDrawCount,Ct=ce?R.get(ce).bytesPerElement:1,wt=Le.get(j).currentProgram.getUniforms();for(let Ft=0;Ft<yt;Ft++)wt.setValue(O,"_gl_DrawID",Ft),je.render(Xe[Ft]/Ct,Dt[Ft])}else if(G.isInstancedMesh)je.renderInstances(Ge,ht,G.count);else if(V.isInstancedBufferGeometry){const Xe=V._maxInstanceCount!==void 0?V._maxInstanceCount:1/0,Dt=Math.min(V.instanceCount,Xe);je.renderInstances(Ge,ht,Dt)}else je.render(Ge,ht)};function Rt(T,C,V){T.transparent===!0&&T.side===cn&&T.forceSinglePass===!1?(T.side=Dn,T.needsUpdate=!0,$(T,C,V),T.side=Yn,T.needsUpdate=!0,$(T,C,V),T.side=cn):$(T,C,V)}this.compile=function(T,C,V=null){V===null&&(V=T),p=Ke.get(V),p.init(C),M.push(p),V.traverseVisible(function(G){G.isLight&&G.layers.test(C.layers)&&(p.pushLight(G),G.castShadow&&p.pushShadow(G))}),T!==V&&T.traverseVisible(function(G){G.isLight&&G.layers.test(C.layers)&&(p.pushLight(G),G.castShadow&&p.pushShadow(G))}),p.setupLights();const j=new Set;return T.traverse(function(G){if(!(G.isMesh||G.isPoints||G.isLine||G.isSprite))return;const le=G.material;if(le)if(Array.isArray(le))for(let Me=0;Me<le.length;Me++){const _e=le[Me];Rt(_e,V,G),j.add(_e)}else Rt(le,V,G),j.add(le)}),p=M.pop(),j},this.compileAsync=function(T,C,V=null){const j=this.compile(T,C,V);return new Promise(G=>{function le(){if(j.forEach(function(Me){Le.get(Me).currentProgram.isReady()&&j.delete(Me)}),j.size===0){G(T);return}setTimeout(le,10)}st.get("KHR_parallel_shader_compile")!==null?le():setTimeout(le,10)})};let bn=null;function In(T){bn&&bn(T)}function us(){zn.stop()}function ds(){zn.start()}const zn=new Z0;zn.setAnimationLoop(In),typeof self<"u"&&zn.setContext(self),this.setAnimationLoop=function(T){bn=T,Ne.setAnimationLoop(T),T===null?zn.stop():zn.start()},Ne.addEventListener("sessionstart",us),Ne.addEventListener("sessionend",ds),this.render=function(T,C){if(C!==void 0&&C.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(N===!0)return;if(T.matrixWorldAutoUpdate===!0&&T.updateMatrixWorld(),C.parent===null&&C.matrixWorldAutoUpdate===!0&&C.updateMatrixWorld(),Ne.enabled===!0&&Ne.isPresenting===!0&&(Ne.cameraAutoUpdate===!0&&Ne.updateCamera(C),C=Ne.getCamera()),T.isScene===!0&&T.onBeforeRender(b,T,C,I),p=Ke.get(T,M.length),p.init(C),M.push(p),fe.multiplyMatrices(C.projectionMatrix,C.matrixWorldInverse),q.setFromProjectionMatrix(fe),te=this.localClippingEnabled,K=ft.init(this.clippingPlanes,te),f=_t.get(T,x.length),f.init(),x.push(f),Ne.enabled===!0&&Ne.isPresenting===!0){const le=b.xr.getDepthSensingMesh();le!==null&&Xi(le,C,-1/0,b.sortObjects)}Xi(T,C,0,b.sortObjects),f.finish(),b.sortObjects===!0&&f.sort(xe,De),et=Ne.enabled===!1||Ne.isPresenting===!1||Ne.hasDepthSensing()===!1,et&&Fe.addToRenderList(f,T),this.info.render.frame++,K===!0&&ft.beginShadows();const V=p.state.shadowsArray;vt.render(V,T,C),K===!0&&ft.endShadows(),this.info.autoReset===!0&&this.info.reset();const j=f.opaque,G=f.transmissive;if(p.setupLights(),C.isArrayCamera){const le=C.cameras;if(G.length>0)for(let Me=0,_e=le.length;Me<_e;Me++){const ce=le[Me];ji(j,G,T,ce)}et&&Fe.render(T);for(let Me=0,_e=le.length;Me<_e;Me++){const ce=le[Me];fs(f,T,ce,ce.viewport)}}else G.length>0&&ji(j,G,T,C),et&&Fe.render(T),fs(f,T,C);I!==null&&P===0&&(rt.updateMultisampleRenderTarget(I),rt.updateRenderTargetMipmap(I)),T.isScene===!0&&T.onAfterRender(b,T,C),At.resetDefaultState(),A=-1,E=null,M.pop(),M.length>0?(p=M[M.length-1],K===!0&&ft.setGlobalState(b.clippingPlanes,p.state.camera)):p=null,x.pop(),x.length>0?f=x[x.length-1]:f=null};function Xi(T,C,V,j){if(T.visible===!1)return;if(T.layers.test(C.layers)){if(T.isGroup)V=T.renderOrder;else if(T.isLOD)T.autoUpdate===!0&&T.update(C);else if(T.isLight)p.pushLight(T),T.castShadow&&p.pushShadow(T);else if(T.isSprite){if(!T.frustumCulled||q.intersectsSprite(T)){j&&me.setFromMatrixPosition(T.matrixWorld).applyMatrix4(fe);const Me=we.update(T),_e=T.material;_e.visible&&f.push(T,Me,_e,V,me.z,null)}}else if((T.isMesh||T.isLine||T.isPoints)&&(!T.frustumCulled||q.intersectsObject(T))){const Me=we.update(T),_e=T.material;if(j&&(T.boundingSphere!==void 0?(T.boundingSphere===null&&T.computeBoundingSphere(),me.copy(T.boundingSphere.center)):(Me.boundingSphere===null&&Me.computeBoundingSphere(),me.copy(Me.boundingSphere.center)),me.applyMatrix4(T.matrixWorld).applyMatrix4(fe)),Array.isArray(_e)){const ce=Me.groups;for(let ne=0,Oe=ce.length;ne<Oe;ne++){const de=ce[ne],Ge=_e[de.materialIndex];Ge&&Ge.visible&&f.push(T,Me,Ge,V,me.z,de)}}else _e.visible&&f.push(T,Me,_e,V,me.z,null)}}const le=T.children;for(let Me=0,_e=le.length;Me<_e;Me++)Xi(le[Me],C,V,j)}function fs(T,C,V,j){const G=T.opaque,le=T.transmissive,Me=T.transparent;p.setupLightsView(V),K===!0&&ft.setGlobalState(b.clippingPlanes,V),j&&Ie.viewport(F.copy(j)),G.length>0&&ui(G,C,V),le.length>0&&ui(le,C,V),Me.length>0&&ui(Me,C,V),Ie.buffers.depth.setTest(!0),Ie.buffers.depth.setMask(!0),Ie.buffers.color.setMask(!0),Ie.setPolygonOffset(!1)}function ji(T,C,V,j){if((V.isScene===!0?V.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[j.id]===void 0&&(p.state.transmissionRenderTarget[j.id]=new cs(1,1,{generateMipmaps:!0,type:st.has("EXT_color_buffer_half_float")||st.has("EXT_color_buffer_float")?Sr:hi,minFilter:Mi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Bt.workingColorSpace}));const le=p.state.transmissionRenderTarget[j.id],Me=j.viewport||F;le.setSize(Me.z*b.transmissionResolutionScale,Me.w*b.transmissionResolutionScale);const _e=b.getRenderTarget();b.setRenderTarget(le),b.getClearColor(Z),se=b.getClearAlpha(),se<1&&b.setClearColor(16777215,.5),b.clear(),et&&Fe.render(V);const ce=b.toneMapping;b.toneMapping=Vi;const ne=j.viewport;if(j.viewport!==void 0&&(j.viewport=void 0),p.setupLightsView(j),K===!0&&ft.setGlobalState(b.clippingPlanes,j),ui(T,V,j),rt.updateMultisampleRenderTarget(le),rt.updateRenderTargetMipmap(le),st.has("WEBGL_multisampled_render_to_texture")===!1){let Oe=!1;for(let de=0,Ge=C.length;de<Ge;de++){const Ee=C[de],ht=Ee.object,He=Ee.geometry,je=Ee.material,Xe=Ee.group;if(je.side===cn&&ht.layers.test(j.layers)){const Dt=je.side;je.side=Dn,je.needsUpdate=!0,qi(ht,V,j,He,je,Xe),je.side=Dt,je.needsUpdate=!0,Oe=!0}}Oe===!0&&(rt.updateMultisampleRenderTarget(le),rt.updateRenderTargetMipmap(le))}b.setRenderTarget(_e),b.setClearColor(Z,se),ne!==void 0&&(j.viewport=ne),b.toneMapping=ce}function ui(T,C,V){const j=C.isScene===!0?C.overrideMaterial:null;for(let G=0,le=T.length;G<le;G++){const Me=T[G],_e=Me.object,ce=Me.geometry,ne=Me.group;let Oe=Me.material;Oe.allowOverride===!0&&j!==null&&(Oe=j),_e.layers.test(V.layers)&&qi(_e,C,V,ce,Oe,ne)}}function qi(T,C,V,j,G,le){T.onBeforeRender(b,C,V,j,G,le),T.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,T.matrixWorld),T.normalMatrix.getNormalMatrix(T.modelViewMatrix),G.onBeforeRender(b,C,V,j,T,le),G.transparent===!0&&G.side===cn&&G.forceSinglePass===!1?(G.side=Dn,G.needsUpdate=!0,b.renderBufferDirect(V,C,j,G,T,le),G.side=Yn,G.needsUpdate=!0,b.renderBufferDirect(V,C,j,G,T,le),G.side=cn):b.renderBufferDirect(V,C,j,G,T,le),T.onAfterRender(b,C,V,j,G,le)}function $(T,C,V){C.isScene!==!0&&(C=Te);const j=Le.get(T),G=p.state.lights,le=p.state.shadowsArray,Me=G.state.version,_e=Pe.getParameters(T,G.state,le,C,V),ce=Pe.getProgramCacheKey(_e);let ne=j.programs;j.environment=T.isMeshStandardMaterial?C.environment:null,j.fog=C.fog,j.envMap=(T.isMeshStandardMaterial?k:Xt).get(T.envMap||j.environment),j.envMapRotation=j.environment!==null&&T.envMap===null?C.environmentRotation:T.envMapRotation,ne===void 0&&(T.addEventListener("dispose",ot),ne=new Map,j.programs=ne);let Oe=ne.get(ce);if(Oe!==void 0){if(j.currentProgram===Oe&&j.lightsStateVersion===Me)return ae(T,_e),Oe}else _e.uniforms=Pe.getUniforms(T),T.onBeforeCompile(_e,b),Oe=Pe.acquireProgram(_e,ce),ne.set(ce,Oe),j.uniforms=_e.uniforms;const de=j.uniforms;return(!T.isShaderMaterial&&!T.isRawShaderMaterial||T.clipping===!0)&&(de.clippingPlanes=ft.uniform),ae(T,_e),j.needsLights=ge(T),j.lightsStateVersion=Me,j.needsLights&&(de.ambientLightColor.value=G.state.ambient,de.lightProbe.value=G.state.probe,de.directionalLights.value=G.state.directional,de.directionalLightShadows.value=G.state.directionalShadow,de.spotLights.value=G.state.spot,de.spotLightShadows.value=G.state.spotShadow,de.rectAreaLights.value=G.state.rectArea,de.ltc_1.value=G.state.rectAreaLTC1,de.ltc_2.value=G.state.rectAreaLTC2,de.pointLights.value=G.state.point,de.pointLightShadows.value=G.state.pointShadow,de.hemisphereLights.value=G.state.hemi,de.directionalShadowMap.value=G.state.directionalShadowMap,de.directionalShadowMatrix.value=G.state.directionalShadowMatrix,de.spotShadowMap.value=G.state.spotShadowMap,de.spotLightMatrix.value=G.state.spotLightMatrix,de.spotLightMap.value=G.state.spotLightMap,de.pointShadowMap.value=G.state.pointShadowMap,de.pointShadowMatrix.value=G.state.pointShadowMatrix),j.currentProgram=Oe,j.uniformsList=null,Oe}function H(T){if(T.uniformsList===null){const C=T.currentProgram.getUniforms();T.uniformsList=Ma.seqWithValue(C.seq,T.uniforms)}return T.uniformsList}function ae(T,C){const V=Le.get(T);V.outputColorSpace=C.outputColorSpace,V.batching=C.batching,V.batchingColor=C.batchingColor,V.instancing=C.instancing,V.instancingColor=C.instancingColor,V.instancingMorph=C.instancingMorph,V.skinning=C.skinning,V.morphTargets=C.morphTargets,V.morphNormals=C.morphNormals,V.morphColors=C.morphColors,V.morphTargetsCount=C.morphTargetsCount,V.numClippingPlanes=C.numClippingPlanes,V.numIntersection=C.numClipIntersection,V.vertexAlphas=C.vertexAlphas,V.vertexTangents=C.vertexTangents,V.toneMapping=C.toneMapping}function ue(T,C,V,j,G){C.isScene!==!0&&(C=Te),rt.resetTextureUnits();const le=C.fog,Me=j.isMeshStandardMaterial?C.environment:null,_e=I===null?b.outputColorSpace:I.isXRRenderTarget===!0?I.texture.colorSpace:Xs,ce=(j.isMeshStandardMaterial?k:Xt).get(j.envMap||Me),ne=j.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,Oe=!!V.attributes.tangent&&(!!j.normalMap||j.anisotropy>0),de=!!V.morphAttributes.position,Ge=!!V.morphAttributes.normal,Ee=!!V.morphAttributes.color;let ht=Vi;j.toneMapped&&(I===null||I.isXRRenderTarget===!0)&&(ht=b.toneMapping);const He=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,je=He!==void 0?He.length:0,Xe=Le.get(j),Dt=p.state.lights;if(K===!0&&(te===!0||T!==E)){const Yt=T===E&&j.id===A;ft.setState(j,T,Yt)}let yt=!1;j.version===Xe.__version?(Xe.needsLights&&Xe.lightsStateVersion!==Dt.state.version||Xe.outputColorSpace!==_e||G.isBatchedMesh&&Xe.batching===!1||!G.isBatchedMesh&&Xe.batching===!0||G.isBatchedMesh&&Xe.batchingColor===!0&&G.colorTexture===null||G.isBatchedMesh&&Xe.batchingColor===!1&&G.colorTexture!==null||G.isInstancedMesh&&Xe.instancing===!1||!G.isInstancedMesh&&Xe.instancing===!0||G.isSkinnedMesh&&Xe.skinning===!1||!G.isSkinnedMesh&&Xe.skinning===!0||G.isInstancedMesh&&Xe.instancingColor===!0&&G.instanceColor===null||G.isInstancedMesh&&Xe.instancingColor===!1&&G.instanceColor!==null||G.isInstancedMesh&&Xe.instancingMorph===!0&&G.morphTexture===null||G.isInstancedMesh&&Xe.instancingMorph===!1&&G.morphTexture!==null||Xe.envMap!==ce||j.fog===!0&&Xe.fog!==le||Xe.numClippingPlanes!==void 0&&(Xe.numClippingPlanes!==ft.numPlanes||Xe.numIntersection!==ft.numIntersection)||Xe.vertexAlphas!==ne||Xe.vertexTangents!==Oe||Xe.morphTargets!==de||Xe.morphNormals!==Ge||Xe.morphColors!==Ee||Xe.toneMapping!==ht||Xe.morphTargetsCount!==je)&&(yt=!0):(yt=!0,Xe.__version=j.version);let Ct=Xe.currentProgram;yt===!0&&(Ct=$(j,C,G));let wt=!1,Ft=!1,an=!1;const Nt=Ct.getUniforms(),$t=Xe.uniforms;if(Ie.useProgram(Ct.program)&&(wt=!0,Ft=!0,an=!0),j.id!==A&&(A=j.id,Ft=!0),wt||E!==T){Ie.buffers.depth.getReversed()?(ee.copy(T.projectionMatrix),N2(ee),U2(ee),Nt.setValue(O,"projectionMatrix",ee)):Nt.setValue(O,"projectionMatrix",T.projectionMatrix),Nt.setValue(O,"viewMatrix",T.matrixWorldInverse);const Be=Nt.map.cameraPosition;Be!==void 0&&Be.setValue(O,Y.setFromMatrixPosition(T.matrixWorld)),it.logarithmicDepthBuffer&&Nt.setValue(O,"logDepthBufFC",2/(Math.log(T.far+1)/Math.LN2)),(j.isMeshPhongMaterial||j.isMeshToonMaterial||j.isMeshLambertMaterial||j.isMeshBasicMaterial||j.isMeshStandardMaterial||j.isShaderMaterial)&&Nt.setValue(O,"isOrthographic",T.isOrthographicCamera===!0),E!==T&&(E=T,Ft=!0,an=!0)}if(G.isSkinnedMesh){Nt.setOptional(O,G,"bindMatrix"),Nt.setOptional(O,G,"bindMatrixInverse");const Yt=G.skeleton;Yt&&(Yt.boneTexture===null&&Yt.computeBoneTexture(),Nt.setValue(O,"boneTexture",Yt.boneTexture,rt))}G.isBatchedMesh&&(Nt.setOptional(O,G,"batchingTexture"),Nt.setValue(O,"batchingTexture",G._matricesTexture,rt),Nt.setOptional(O,G,"batchingIdTexture"),Nt.setValue(O,"batchingIdTexture",G._indirectTexture,rt),Nt.setOptional(O,G,"batchingColorTexture"),G._colorsTexture!==null&&Nt.setValue(O,"batchingColorTexture",G._colorsTexture,rt));const Ht=V.morphAttributes;if((Ht.position!==void 0||Ht.normal!==void 0||Ht.color!==void 0)&&at.update(G,V,Ct),(Ft||Xe.receiveShadow!==G.receiveShadow)&&(Xe.receiveShadow=G.receiveShadow,Nt.setValue(O,"receiveShadow",G.receiveShadow)),j.isMeshGouraudMaterial&&j.envMap!==null&&($t.envMap.value=ce,$t.flipEnvMap.value=ce.isCubeTexture&&ce.isRenderTargetTexture===!1?-1:1),j.isMeshStandardMaterial&&j.envMap===null&&C.environment!==null&&($t.envMapIntensity.value=C.environmentIntensity),Ft&&(Nt.setValue(O,"toneMappingExposure",b.toneMappingExposure),Xe.needsLights&&ve($t,an),le&&j.fog===!0&&be.refreshFogUniforms($t,le),be.refreshMaterialUniforms($t,j,Q,he,p.state.transmissionRenderTarget[T.id]),Ma.upload(O,H(Xe),$t,rt)),j.isShaderMaterial&&j.uniformsNeedUpdate===!0&&(Ma.upload(O,H(Xe),$t,rt),j.uniformsNeedUpdate=!1),j.isSpriteMaterial&&Nt.setValue(O,"center",G.center),Nt.setValue(O,"modelViewMatrix",G.modelViewMatrix),Nt.setValue(O,"normalMatrix",G.normalMatrix),Nt.setValue(O,"modelMatrix",G.matrixWorld),j.isShaderMaterial||j.isRawShaderMaterial){const Yt=j.uniformsGroups;for(let Be=0,Kt=Yt.length;Be<Kt;Be++){const kt=Yt[Be];J.update(kt,Ct),J.bind(kt,Ct)}}return Ct}function ve(T,C){T.ambientLightColor.needsUpdate=C,T.lightProbe.needsUpdate=C,T.directionalLights.needsUpdate=C,T.directionalLightShadows.needsUpdate=C,T.pointLights.needsUpdate=C,T.pointLightShadows.needsUpdate=C,T.spotLights.needsUpdate=C,T.spotLightShadows.needsUpdate=C,T.rectAreaLights.needsUpdate=C,T.hemisphereLights.needsUpdate=C}function ge(T){return T.isMeshLambertMaterial||T.isMeshToonMaterial||T.isMeshPhongMaterial||T.isMeshStandardMaterial||T.isShadowMaterial||T.isShaderMaterial&&T.lights===!0}this.getActiveCubeFace=function(){return L},this.getActiveMipmapLevel=function(){return P},this.getRenderTarget=function(){return I},this.setRenderTargetTextures=function(T,C,V){const j=Le.get(T);j.__autoAllocateDepthBuffer=T.resolveDepthBuffer===!1,j.__autoAllocateDepthBuffer===!1&&(j.__useRenderToTexture=!1),Le.get(T.texture).__webglTexture=C,Le.get(T.depthTexture).__webglTexture=j.__autoAllocateDepthBuffer?void 0:V,j.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(T,C){const V=Le.get(T);V.__webglFramebuffer=C,V.__useDefaultFramebuffer=C===void 0};const ze=O.createFramebuffer();this.setRenderTarget=function(T,C=0,V=0){I=T,L=C,P=V;let j=!0,G=null,le=!1,Me=!1;if(T){const ce=Le.get(T);if(ce.__useDefaultFramebuffer!==void 0)Ie.bindFramebuffer(O.FRAMEBUFFER,null),j=!1;else if(ce.__webglFramebuffer===void 0)rt.setupRenderTarget(T);else if(ce.__hasExternalTextures)rt.rebindTextures(T,Le.get(T.texture).__webglTexture,Le.get(T.depthTexture).__webglTexture);else if(T.depthBuffer){const de=T.depthTexture;if(ce.__boundDepthTexture!==de){if(de!==null&&Le.has(de)&&(T.width!==de.image.width||T.height!==de.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");rt.setupDepthRenderbuffer(T)}}const ne=T.texture;(ne.isData3DTexture||ne.isDataArrayTexture||ne.isCompressedArrayTexture)&&(Me=!0);const Oe=Le.get(T).__webglFramebuffer;T.isWebGLCubeRenderTarget?(Array.isArray(Oe[C])?G=Oe[C][V]:G=Oe[C],le=!0):T.samples>0&&rt.useMultisampledRTT(T)===!1?G=Le.get(T).__webglMultisampledFramebuffer:Array.isArray(Oe)?G=Oe[V]:G=Oe,F.copy(T.viewport),B.copy(T.scissor),X=T.scissorTest}else F.copy(Ae).multiplyScalar(Q).floor(),B.copy(pe).multiplyScalar(Q).floor(),X=re;if(V!==0&&(G=ze),Ie.bindFramebuffer(O.FRAMEBUFFER,G)&&j&&Ie.drawBuffers(T,G),Ie.viewport(F),Ie.scissor(B),Ie.setScissorTest(X),le){const ce=Le.get(T.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_CUBE_MAP_POSITIVE_X+C,ce.__webglTexture,V)}else if(Me){const ce=Le.get(T.texture),ne=C;O.framebufferTextureLayer(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,ce.__webglTexture,V,ne)}else if(T!==null&&V!==0){const ce=Le.get(T.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,ce.__webglTexture,V)}A=-1},this.readRenderTargetPixels=function(T,C,V,j,G,le,Me,_e=0){if(!(T&&T.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ce=Le.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&Me!==void 0&&(ce=ce[Me]),ce){Ie.bindFramebuffer(O.FRAMEBUFFER,ce);try{const ne=T.textures[_e],Oe=ne.format,de=ne.type;if(!it.textureFormatReadable(Oe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!it.textureTypeReadable(de)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}C>=0&&C<=T.width-j&&V>=0&&V<=T.height-G&&(T.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+_e),O.readPixels(C,V,j,G,$e.convert(Oe),$e.convert(de),le))}finally{const ne=I!==null?Le.get(I).__webglFramebuffer:null;Ie.bindFramebuffer(O.FRAMEBUFFER,ne)}}},this.readRenderTargetPixelsAsync=async function(T,C,V,j,G,le,Me,_e=0){if(!(T&&T.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ce=Le.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&Me!==void 0&&(ce=ce[Me]),ce)if(C>=0&&C<=T.width-j&&V>=0&&V<=T.height-G){Ie.bindFramebuffer(O.FRAMEBUFFER,ce);const ne=T.textures[_e],Oe=ne.format,de=ne.type;if(!it.textureFormatReadable(Oe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(de))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Ge=O.createBuffer();O.bindBuffer(O.PIXEL_PACK_BUFFER,Ge),O.bufferData(O.PIXEL_PACK_BUFFER,le.byteLength,O.STREAM_READ),T.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+_e),O.readPixels(C,V,j,G,$e.convert(Oe),$e.convert(de),0);const Ee=I!==null?Le.get(I).__webglFramebuffer:null;Ie.bindFramebuffer(O.FRAMEBUFFER,Ee);const ht=O.fenceSync(O.SYNC_GPU_COMMANDS_COMPLETE,0);return O.flush(),await F2(O,ht,4),O.bindBuffer(O.PIXEL_PACK_BUFFER,Ge),O.getBufferSubData(O.PIXEL_PACK_BUFFER,0,le),O.deleteBuffer(Ge),O.deleteSync(ht),le}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(T,C=null,V=0){const j=Math.pow(2,-V),G=Math.floor(T.image.width*j),le=Math.floor(T.image.height*j),Me=C!==null?C.x:0,_e=C!==null?C.y:0;rt.setTexture2D(T,0),O.copyTexSubImage2D(O.TEXTURE_2D,V,0,0,Me,_e,G,le),Ie.unbindTexture()};const Se=O.createFramebuffer(),Ce=O.createFramebuffer();this.copyTextureToTexture=function(T,C,V=null,j=null,G=0,le=null){le===null&&(G!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),le=G,G=0):le=0);let Me,_e,ce,ne,Oe,de,Ge,Ee,ht;const He=T.isCompressedTexture?T.mipmaps[le]:T.image;if(V!==null)Me=V.max.x-V.min.x,_e=V.max.y-V.min.y,ce=V.isBox3?V.max.z-V.min.z:1,ne=V.min.x,Oe=V.min.y,de=V.isBox3?V.min.z:0;else{const Ht=Math.pow(2,-G);Me=Math.floor(He.width*Ht),_e=Math.floor(He.height*Ht),T.isDataArrayTexture?ce=He.depth:T.isData3DTexture?ce=Math.floor(He.depth*Ht):ce=1,ne=0,Oe=0,de=0}j!==null?(Ge=j.x,Ee=j.y,ht=j.z):(Ge=0,Ee=0,ht=0);const je=$e.convert(C.format),Xe=$e.convert(C.type);let Dt;C.isData3DTexture?(rt.setTexture3D(C,0),Dt=O.TEXTURE_3D):C.isDataArrayTexture||C.isCompressedArrayTexture?(rt.setTexture2DArray(C,0),Dt=O.TEXTURE_2D_ARRAY):(rt.setTexture2D(C,0),Dt=O.TEXTURE_2D),O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,C.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,C.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,C.unpackAlignment);const yt=O.getParameter(O.UNPACK_ROW_LENGTH),Ct=O.getParameter(O.UNPACK_IMAGE_HEIGHT),wt=O.getParameter(O.UNPACK_SKIP_PIXELS),Ft=O.getParameter(O.UNPACK_SKIP_ROWS),an=O.getParameter(O.UNPACK_SKIP_IMAGES);O.pixelStorei(O.UNPACK_ROW_LENGTH,He.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,He.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,ne),O.pixelStorei(O.UNPACK_SKIP_ROWS,Oe),O.pixelStorei(O.UNPACK_SKIP_IMAGES,de);const Nt=T.isDataArrayTexture||T.isData3DTexture,$t=C.isDataArrayTexture||C.isData3DTexture;if(T.isDepthTexture){const Ht=Le.get(T),Yt=Le.get(C),Be=Le.get(Ht.__renderTarget),Kt=Le.get(Yt.__renderTarget);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,Be.__webglFramebuffer),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,Kt.__webglFramebuffer);for(let kt=0;kt<ce;kt++)Nt&&(O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(T).__webglTexture,G,de+kt),O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(C).__webglTexture,le,ht+kt)),O.blitFramebuffer(ne,Oe,Me,_e,Ge,Ee,Me,_e,O.DEPTH_BUFFER_BIT,O.NEAREST);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,null),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else if(G!==0||T.isRenderTargetTexture||Le.has(T)){const Ht=Le.get(T),Yt=Le.get(C);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,Se),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,Ce);for(let Be=0;Be<ce;Be++)Nt?O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Ht.__webglTexture,G,de+Be):O.framebufferTexture2D(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Ht.__webglTexture,G),$t?O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Yt.__webglTexture,le,ht+Be):O.framebufferTexture2D(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Yt.__webglTexture,le),G!==0?O.blitFramebuffer(ne,Oe,Me,_e,Ge,Ee,Me,_e,O.COLOR_BUFFER_BIT,O.NEAREST):$t?O.copyTexSubImage3D(Dt,le,Ge,Ee,ht+Be,ne,Oe,Me,_e):O.copyTexSubImage2D(Dt,le,Ge,Ee,ne,Oe,Me,_e);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,null),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else $t?T.isDataTexture||T.isData3DTexture?O.texSubImage3D(Dt,le,Ge,Ee,ht,Me,_e,ce,je,Xe,He.data):C.isCompressedArrayTexture?O.compressedTexSubImage3D(Dt,le,Ge,Ee,ht,Me,_e,ce,je,He.data):O.texSubImage3D(Dt,le,Ge,Ee,ht,Me,_e,ce,je,Xe,He):T.isDataTexture?O.texSubImage2D(O.TEXTURE_2D,le,Ge,Ee,Me,_e,je,Xe,He.data):T.isCompressedTexture?O.compressedTexSubImage2D(O.TEXTURE_2D,le,Ge,Ee,He.width,He.height,je,He.data):O.texSubImage2D(O.TEXTURE_2D,le,Ge,Ee,Me,_e,je,Xe,He);O.pixelStorei(O.UNPACK_ROW_LENGTH,yt),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Ct),O.pixelStorei(O.UNPACK_SKIP_PIXELS,wt),O.pixelStorei(O.UNPACK_SKIP_ROWS,Ft),O.pixelStorei(O.UNPACK_SKIP_IMAGES,an),le===0&&C.generateMipmaps&&O.generateMipmap(Dt),Ie.unbindTexture()},this.copyTextureToTexture3D=function(T,C,V=null,j=null,G=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(T,C,V,j,G)},this.initRenderTarget=function(T){Le.get(T).__webglFramebuffer===void 0&&rt.setupRenderTarget(T)},this.initTexture=function(T){T.isCubeTexture?rt.setTextureCube(T,0):T.isData3DTexture?rt.setTexture3D(T,0):T.isDataArrayTexture||T.isCompressedArrayTexture?rt.setTexture2DArray(T,0):rt.setTexture2D(T,0),Ie.unbindTexture()},this.resetState=function(){L=0,P=0,I=null,Ie.reset(),At.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return bi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Bt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Bt._getUnpackColorSpace()}}const Gh={type:"change"},dc={type:"start"},su={type:"end"},ra=new Ys,Wh=new jn,U3=Math.cos(70*xi.DEG2RAD),dn=new z,Pn=2*Math.PI,nn={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Lo=1e-6;class ru extends J1{constructor(e,t=null){super(e,t),this.state=nn.NONE,this.target=new z,this.cursor=new z,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Si.ROTATE,MIDDLE:Si.DOLLY,RIGHT:Si.PAN},this.touches={ONE:Is.ROTATE,TWO:Is.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new z,this._lastQuaternion=new Un,this._lastTargetPosition=new z,this._quat=new Un().setFromUnitVectors(e.up,new z(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Pl,this._sphericalDelta=new Pl,this._scale=1,this._panOffset=new z,this._rotateStart=new Je,this._rotateEnd=new Je,this._rotateDelta=new Je,this._panStart=new Je,this._panEnd=new Je,this._panDelta=new Je,this._dollyStart=new Je,this._dollyEnd=new Je,this._dollyDelta=new Je,this._dollyDirection=new z,this._mouse=new Je,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=z3.bind(this),this._onPointerDown=I3.bind(this),this._onPointerUp=B3.bind(this),this._onContextMenu=X3.bind(this),this._onMouseWheel=V3.bind(this),this._onKeyDown=H3.bind(this),this._onTouchStart=G3.bind(this),this._onTouchMove=W3.bind(this),this._onMouseDown=O3.bind(this),this._onMouseMove=k3.bind(this),this._interceptControlDown=j3.bind(this),this._interceptControlUp=q3.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Gh),this.update(),this.state=nn.NONE}update(e=null){const t=this.object.position;dn.copy(t).sub(this.target),dn.applyQuaternion(this._quat),this._spherical.setFromVector3(dn),this.autoRotate&&this.state===nn.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,i=this.maxAzimuthAngle;isFinite(n)&&isFinite(i)&&(n<-Math.PI?n+=Pn:n>Math.PI&&(n-=Pn),i<-Math.PI?i+=Pn:i>Math.PI&&(i-=Pn),n<=i?this._spherical.theta=Math.max(n,Math.min(i,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+i)/2?Math.max(n,this._spherical.theta):Math.min(i,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=o!=this._spherical.radius}if(dn.setFromSpherical(this._spherical),dn.applyQuaternion(this._quatInverse),t.copy(this.target).add(dn),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){const a=dn.length();o=this._clampDistance(a*this._scale);const l=a-o;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const a=new z(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=l!==this.object.zoom;const c=new z(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=dn.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(ra.origin.copy(this.object.position),ra.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ra.direction))<U3?this.object.lookAt(this.target):(Wh.setFromNormalAndCoplanarPoint(this.object.up,this.target),ra.intersectPlane(Wh,this.target))))}else if(this.object.isOrthographicCamera){const o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>Lo||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Lo||this._lastTargetPosition.distanceToSquared(this.target)>Lo?(this.dispatchEvent(Gh),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Pn/60*this.autoRotateSpeed*e:Pn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){dn.setFromMatrixColumn(t,0),dn.multiplyScalar(-e),this._panOffset.add(dn)}_panUp(e,t){this.screenSpacePanning===!0?dn.setFromMatrixColumn(t,1):(dn.setFromMatrixColumn(t,0),dn.crossVectors(this.object.up,dn)),dn.multiplyScalar(e),this._panOffset.add(dn)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;dn.copy(i).sub(this.target);let r=dn.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/n.clientHeight,this.object.matrix),this._panUp(2*t*r/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),i=e-n.left,r=t-n.top,o=n.width,a=n.height;this._mouse.x=i/o*2-1,this._mouse.y=-(r/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Pn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Pn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Pn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Pn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Pn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Pn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panStart.set(n,i)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),r=.5*(e.pageY+n.y);this._rotateEnd.set(i,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Pn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Pn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const o=(e.pageX+t.x)*.5,a=(e.pageY+t.y)*.5;this._updateZoomParameters(o,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new Je,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function I3(s){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(s.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(s)&&(this._addPointer(s),s.pointerType==="touch"?this._onTouchStart(s):this._onMouseDown(s)))}function z3(s){this.enabled!==!1&&(s.pointerType==="touch"?this._onTouchMove(s):this._onMouseMove(s))}function B3(s){switch(this._removePointer(s),this._pointers.length){case 0:this.domElement.releasePointerCapture(s.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(su),this.state=nn.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function O3(s){let e;switch(s.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case Si.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(s),this.state=nn.DOLLY;break;case Si.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=nn.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=nn.ROTATE}break;case Si.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=nn.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=nn.PAN}break;default:this.state=nn.NONE}this.state!==nn.NONE&&this.dispatchEvent(dc)}function k3(s){switch(this.state){case nn.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case nn.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case nn.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function V3(s){this.enabled===!1||this.enableZoom===!1||this.state!==nn.NONE||(s.preventDefault(),this.dispatchEvent(dc),this._handleMouseWheel(this._customWheelEvent(s)),this.dispatchEvent(su))}function H3(s){this.enabled!==!1&&this._handleKeyDown(s)}function G3(s){switch(this._trackPointer(s),this._pointers.length){case 1:switch(this.touches.ONE){case Is.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(s),this.state=nn.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=nn.TOUCH_PAN;break;default:this.state=nn.NONE}break;case 2:switch(this.touches.TWO){case Is.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(s),this.state=nn.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=nn.TOUCH_DOLLY_ROTATE;break;default:this.state=nn.NONE}break;default:this.state=nn.NONE}this.state!==nn.NONE&&this.dispatchEvent(dc)}function W3(s){switch(this._trackPointer(s),this.state){case nn.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case nn.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case nn.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case nn.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=nn.NONE}}function X3(s){this.enabled!==!1&&s.preventDefault()}function j3(s){s.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function q3(s){s.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var $3=Object.defineProperty,Y3=(s,e,t)=>e in s?$3(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,jt=(s,e,t)=>Y3(s,typeof e!="symbol"?e+"":e,t);const au=(s,e)=>{const[t,n]=e.split("-");return Object.assign(s.style,{left:n==="left"?"0":n==="center"?"50%":"",right:n==="right"?"0":"",top:t==="top"?"0":t==="bottom"?"":"50%",bottom:t==="bottom"?"0":"",transform:`${n==="center"?"translateX(-50%)":""} ${t==="center"?"translateY(-50%)":""}`}),e},K3=({placement:s,size:e,offset:t,id:n,className:i})=>{const r=document.createElement("div"),{top:o,left:a,right:l,bottom:c}=t;return Object.assign(r.style,{id:n,position:"absolute",zIndex:"1000",height:`${e}px`,width:`${e}px`,margin:`${o}px ${l}px ${c}px ${a}px`,borderRadius:"100%"}),au(r,s),n&&(r.id=n),i&&(r.className=i),r},J3=s=>{const e=typeof s=="string"?document.querySelector(s):s;if(!e)throw Error("Invalid DOM element");return e};function Nl(s,e,t){return Math.max(e,Math.min(t,s))}const Z3=[["x",0,3],["y",1,4],["z",2,5]],Xh=new z;function jh({isSphere:s},e,t){s&&(Xh.set(0,0,1).applyQuaternion(t.quaternion),Z3.forEach(([n,i,r])=>{const o=Xh[n];let a=e[i],l=a.userData.opacity;a.material.opacity=Nl(o>=0?l:l/2,0,1),a=e[r],l=a.userData.opacity,a.material.opacity=Nl(o>=0?l/2:l,0,1)}))}const Q3=(s,e,t=10)=>Math.abs(s.clientX-e.x)<t&&Math.abs(s.clientY-e.y)<t,qh=new Y1,$h=new Je,Yh=(s,e,t,n)=>{$h.set((s.clientX-e.left)/e.width*2-1,-((s.clientY-e.top)/e.height)*2+1),qh.setFromCamera($h,t);const i=qh.intersectObjects(n,!1),r=i.length?i[0]:null;return!r||!r.object.visible?null:r},Po=1e-6,e4=2*Math.PI,ou=["x","y","z"],br=[...ou,"nx","ny","nz"],t4=["x","z","y","nx","nz","ny"],n4=["z","x","y","nz","nx","ny"],Ul="Right",ba="Top",Il="Front",zl="Left",Sa="Bottom",Bl="Back",i4=[Ul,ba,Il,zl,Sa,Bl].map(s=>s.toLocaleLowerCase()),lu=1.3,Kh=(s,e=!0)=>{const{material:t,userData:n}=s,{color:i,opacity:r}=e?n.hover:n;t.color.set(i),t.opacity=r},es=s=>JSON.parse(JSON.stringify(s)),s4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=sn.DEFAULT_UP,r=i.z===1,o=i.x===1,{container:a}=s;s.container=void 0,s=JSON.parse(JSON.stringify(s)),s.container=a;const l=r?t4:o?n4:br;i4.forEach((u,h)=>{s[u]&&(s[l[h]]=s[u])});const c={enabled:!0,color:16777215,opacity:1,scale:.7,labelColor:2236962,line:!1,border:{size:0,color:14540253},hover:{color:t?16777215:9688043,labelColor:2236962,opacity:1,scale:.7,border:{size:0,color:14540253}}},d={line:!1,scale:t?.45:.7,hover:{scale:t?.5:.7}},m={type:e,container:document.body,size:128,placement:"top-right",resolution:n,lineWidth:4,radius:t?1:.2,smoothness:18,animated:!0,speed:1,background:{enabled:!0,color:t?16777215:14739180,opacity:t?0:1,hover:{color:t?16777215:14739180,opacity:t?.2:1}},font:{family:"sans-serif",weight:900},offset:{top:10,left:10,bottom:10,right:10},corners:{enabled:!t,color:t?15915362:16777215,opacity:1,scale:t?.15:.2,radius:1,smoothness:18,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:.225}},edges:{enabled:!t,color:t?15915362:16777215,opacity:t?1:0,radius:t?1:.125,smoothness:18,scale:t?.15:1,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:1}},x:{...es(c),...t?{label:"X",color:16725587,line:!0}:{label:o?ba:Ul}},y:{...es(c),...t?{label:"Y",color:9100032,line:!0}:{label:r||o?Il:ba}},z:{...es(c),...t?{label:"Z",color:2920447,line:!0}:{label:r?ba:o?Ul:Il}},nx:{...es(d),label:t?"":o?Sa:zl},ny:{...es(d),label:t?"":r||o?Bl:Sa},nz:{...es(d),label:t?"":r?Sa:o?zl:Bl}};return Ol(s,m),ou.forEach(u=>Ol(s[`n${u}`],es(s[u]))),{...s,isSphere:t}};function Ol(s,...e){if(s instanceof HTMLElement||typeof s!="object"||s===null)return s;for(const t of e)for(const n in t)n!=="container"&&n in t&&(s[n]===void 0?s[n]=t[n]:typeof t[n]=="object"&&!Array.isArray(t[n])&&(s[n]=Ol(s[n]||{},t[n])));return s}const r4=(s,e=2)=>{const t=new bt,n=e*2,{isSphere:i,resolution:r,radius:o,font:a,corners:l,edges:c}=s,d=br.map(P=>({...s[P],radius:o}));i&&l.enabled&&d.push(l),i&&c.enabled&&d.push(c);const m=document.createElement("canvas"),u=m.getContext("2d");m.width=r*2+n*2,m.height=r*d.length+n*d.length;const[h,g]=N(d,r,a);d.forEach(({radius:P,label:I,color:A,labelColor:E,border:F,hover:{color:B,labelColor:X,border:Z}},se)=>{const W=r*se+se*n+e;b(e,W,e,r,P,I,F,A,E),b(r+e*3,W,e,r,P,I,Z??F,B??A,X??E)});const _=d.length,f=e/(r*2),p=e/(r*6),x=1/_,M=new u1(m);return M.repeat.set(.5-2*f,x-2*p),M.offset.set(f,1-p),Object.assign(M,{colorSpace:Vt,wrapS:oi,wrapT:oi,userData:{offsetX:f,offsetY:p,cellHeight:x}}),M;function b(P,I,A,E,F,B,X,Z,se){if(F=F*(E/2),Z!=null&&Z!==""&&(W(),u.fillStyle=t.set(Z).getStyle(),u.fill()),X&&X.size){const he=X.size*E/2;P+=he,I+=he,E-=X.size*E,F=Math.max(0,F-he),W(),u.strokeStyle=t.set(X.color).getStyle(),u.lineWidth=X.size*E,u.stroke()}B&&L(u,P+E/2,I+(E+A)/2,B,t.set(se).getStyle());function W(){u.beginPath(),u.moveTo(P+F,I),u.lineTo(P+E-F,I),u.arcTo(P+E,I,P+E,I+F,F),u.lineTo(P+E,I+E-F),u.arcTo(P+E,I+E,P+E-F,I+E,F),u.lineTo(P+F,I+E),u.arcTo(P,I+E,P,I+E-F,F),u.lineTo(P,I+F),u.arcTo(P,I,P+F,I,F),u.closePath()}}function N(P,I,A){const E=[...P].sort((De,Ae)=>{var pe,re;return(((pe=De.label)==null?void 0:pe.length)||0)-(((re=Ae.label)==null?void 0:re.length)||0)}).pop().label,{family:F,weight:B}=A,X=i?Math.sqrt(Math.pow(I*.7,2)/2):I;let Z=X,se=0,W=0;do{u.font=`${B} ${Z}px ${F}`;const De=u.measureText(E);se=De.width,W=De.fontBoundingBoxDescent,Z--}while(se>X&&Z>0);const he=X/W,Q=Math.min(X/se,he),xe=Math.floor(Z*Q);return[`${B} ${xe}px ${F}`,he]}function L(P,I,A,E,F){P.font=h,P.textAlign="center",P.textBaseline="middle",P.fillStyle=F,P.fillText(E,I,A+(i?g:0))}},a4=(s,e)=>s.offset.x=(e?.5:0)+s.userData.offsetX,fc=(s,e)=>{const{offset:t,userData:{offsetY:n,cellHeight:i}}=s;t.y=1-(e+1)*i+n};function pc(s,e,t=2,n=2){const i=t/2-s,r=n/2-s,o=s/t,a=(t-s)/t,l=s/n,c=(n-s)/n,d=[i,r,0,-i,r,0,-i,-r,0,i,-r,0],m=[a,c,o,c,o,l,a,l],u=[3*(e+1)+3,3*(e+1)+4,e+4,e+5,2*(e+1)+4,2,1,2*(e+1)+3,3,4*(e+1)+3,4,0],h=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11].map(L=>u[L]);let g,_,f,p,x,M,b,N;for(let L=0;L<4;L++){p=L<1||L>2?i:-i,x=L<2?r:-r,M=L<1||L>2?a:o,b=L<2?c:l;for(let P=0;P<=e;P++)g=Math.PI/2*(L+P/e),_=Math.cos(g),f=Math.sin(g),d.push(p+s*_,x+s*f,0),m.push(M+o*_,b+l*f),P<e&&(N=(e+1)*L+P+4,h.push(L,N,N+1))}return new rn().setIndex(new hn(new Uint32Array(h),1)).setAttribute("position",new hn(new Float32Array(d),3)).setAttribute("uv",new hn(new Float32Array(m),2))}const o4=(s,e)=>{const t=new z,{isSphere:n,radius:i,smoothness:r}=s,o=pc(i,r);return br.map((a,l)=>{const c=l<3,d=br[l],m=l?e.clone():e;fc(m,l);const{enabled:u,scale:h,opacity:g,hover:_}=s[d],f={map:m,opacity:g,transparent:!0},p=n?new ec(new za(f)):new Pt(o,new Gi(f)),x=c?d:d[1];return p.position[x]=(c?1:-1)*(n?lu:1),n||p.lookAt(t.copy(p.position).multiplyScalar(1.7)),p.scale.setScalar(h),p.renderOrder=1,p.visible=u,p.userData={scale:h,opacity:g,hover:_},p})},l4=(s,e)=>{const{isSphere:t,corners:n}=s;if(!n.enabled)return[];const{color:i,opacity:r,scale:o,radius:a,smoothness:l,hover:c}=n,d=t?null:pc(a,l),m={transparent:!0,opacity:r},u=[1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1].map(g=>g*.85),h=new z;return Array(u.length/3).fill(0).map((g,_)=>{if(t){const x=e.clone();fc(x,6),m.map=x}else m.color=i;const f=t?new ec(new za(m)):new Pt(d,new Gi(m)),p=_*3;return f.position.set(u[p],u[p+1],u[p+2]),t&&f.position.normalize().multiplyScalar(1.7),f.scale.setScalar(o),f.lookAt(h.copy(f.position).multiplyScalar(2)),f.renderOrder=1,f.userData={color:i,opacity:r,scale:o,hover:c},f})},c4=(s,e,t)=>{const{isSphere:n,edges:i}=s;if(!i.enabled)return[];const{color:r,opacity:o,scale:a,hover:l,radius:c,smoothness:d}=i,m=n?null:pc(c,d,1.2,.25),u={transparent:!0,opacity:o},h=[0,1,1,0,-1,1,1,0,1,-1,0,1,0,1,-1,0,-1,-1,1,0,-1,-1,0,-1,1,1,0,1,-1,0,-1,1,0,-1,-1,0].map(f=>f*.925),g=new z,_=new z(0,1,0);return Array(h.length/3).fill(0).map((f,p)=>{if(n){const b=e.clone();fc(b,t),u.map=b}else u.color=r;const x=n?new ec(new za(u)):new Pt(m,new Gi(u)),M=p*3;return x.position.set(h[M],h[M+1],h[M+2]),n&&x.position.normalize().multiplyScalar(1.7),x.scale.setScalar(a),x.up.copy(_),x.lookAt(g.copy(x.position).multiplyScalar(2)),!n&&!x.position.y&&(x.rotation.z=Math.PI/2),x.renderOrder=1,x.userData={color:r,opacity:o,scale:a,hover:l},x})};function h4(s,e=!1){const t=s[0].index!==null,n=new Set(Object.keys(s[0].attributes)),i=new Set(Object.keys(s[0].morphAttributes)),r={},o={},a=s[0].morphTargetsRelative,l=new rn;let c=0;for(let d=0;d<s.length;++d){const m=s[d];let u=0;if(t!==(m.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const h in m.attributes){if(!n.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+'. All geometries must have compatible attributes; make sure "'+h+'" attribute exists among all geometries, or in none of them.'),null;r[h]===void 0&&(r[h]=[]),r[h].push(m.attributes[h]),u++}if(u!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". Make sure all geometries have the same number of attributes."),null;if(a!==m.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const h in m.morphAttributes){if(!i.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphAttributes must be consistent throughout all geometries."),null;o[h]===void 0&&(o[h]=[]),o[h].push(m.morphAttributes[h])}if(e){let h;if(t)h=m.index.count;else if(m.attributes.position!==void 0)h=m.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". The geometry must have either an index or a position attribute"),null;l.addGroup(c,h,d),c+=h}}if(t){let d=0;const m=[];for(let u=0;u<s.length;++u){const h=s[u].index;for(let g=0;g<h.count;++g)m.push(h.getX(g)+d);d+=s[u].attributes.position.count}l.setIndex(m)}for(const d in r){const m=Jh(r[d]);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" attribute."),null;l.setAttribute(d,m)}for(const d in o){const m=o[d][0].length;if(m===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[d]=[];for(let u=0;u<m;++u){const h=[];for(let _=0;_<o[d].length;++_)h.push(o[d][_][u]);const g=Jh(h);if(!g)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" morphAttribute."),null;l.morphAttributes[d].push(g)}}return l}function Jh(s){let e,t,n,i=-1,r=0;for(let c=0;c<s.length;++c){const d=s[c];if(e===void 0&&(e=d.array.constructor),e!==d.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=d.itemSize),t!==d.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=d.normalized),n!==d.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=d.gpuType),i!==d.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=d.count*t}const o=new e(r),a=new hn(o,t,n);let l=0;for(let c=0;c<s.length;++c){const d=s[c];if(d.isInterleavedBufferAttribute){const m=l/t;for(let u=0,h=d.count;u<h;u++)for(let g=0;g<t;g++){const _=d.getComponent(u,g);a.setComponent(u+m,g,_)}}else o.set(d.array,l);l+=d.count*t}return i!==void 0&&(a.gpuType=i),a}const u4=(s,e)=>{const{isSphere:t,background:{enabled:n,color:i,opacity:r,hover:o}}=e;let a;const l=new Gi({color:i,side:Dn,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)a=new Pt(new Oa(1.8,64,64),l);else{let c;s.forEach(d=>{const m=d.scale.x;d.scale.setScalar(.9),d.updateMatrix();const u=d.geometry.clone();u.applyMatrix4(d.matrix),c=c?h4([c,u]):u,d.scale.setScalar(m)}),a=new Pt(c,l)}return a.userData={color:i,opacity:r,hover:o},a},Zh=new Tn,aa=new z;class cu extends j1{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new Lt(e,3)),this.setAttribute("uv",new Lt(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceStart",new ci(n,3,0)),this.setAttribute("instanceEnd",new ci(n,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceColorStart",new ci(n,3,0)),this.setAttribute("instanceColorEnd",new ci(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new T1(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Tn);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Zh.setFromBufferAttribute(t),this.boundingBox.union(Zh))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ri),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)aa.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(aa)),aa.fromBufferAttribute(t,r),i=Math.max(i,n.distanceToSquared(aa));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}Ye.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new Je(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Nn.line={uniforms:Ql.merge([Ye.common,Ye.fog,Ye.line]),vertexShader:`
|
|
3828
3828
|
#include <common>
|
|
3829
3829
|
#include <color_pars_vertex>
|
|
3830
3830
|
#include <fog_pars_vertex>
|
|
@@ -4194,14 +4194,14 @@ void main() {
|
|
|
4194
4194
|
#include <premultiplied_alpha_fragment>
|
|
4195
4195
|
|
|
4196
4196
|
}
|
|
4197
|
-
`};class mc extends Li{constructor(e){super({type:"LineMaterial",uniforms:Ql.clone(kn.line.uniforms),vertexShader:kn.line.vertexShader,fragmentShader:kn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const Fo=new Xt,Qh=new I,e0=new I,En=new Xt,An=new Xt,ci=new Xt,No=new I,Uo=new Et,wn=new J1,t0=new I,oa=new Fn,la=new Fi,hi=new Xt;let ui,os;function n0(s,e,t){return hi.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),hi.multiplyScalar(1/hi.w),hi.x=os/t.width,hi.y=os/t.height,hi.applyMatrix4(s.projectionMatrixInverse),hi.multiplyScalar(1/hi.w),Math.abs(Math.max(hi.x,hi.y))}function d4(s,e){const t=s.matrixWorld,n=s.geometry,i=n.attributes.instanceStart,r=n.attributes.instanceEnd,o=Math.min(n.instanceCount,i.count);for(let a=0,l=o;a<l;a++){wn.start.fromBufferAttribute(i,a),wn.end.fromBufferAttribute(r,a),wn.applyMatrix4(t);const c=new I,d=new I;ui.distanceSqToSegment(wn.start,wn.end,d,c),d.distanceTo(c)<os*.5&&e.push({point:d,pointOnLine:c,distance:ui.origin.distanceTo(d),object:s,face:null,faceIndex:a,uv:null,uv1:null})}}function f4(s,e,t){const n=e.projectionMatrix,i=s.material.resolution,r=s.matrixWorld,o=s.geometry,a=o.attributes.instanceStart,l=o.attributes.instanceEnd,c=Math.min(o.instanceCount,a.count),d=-e.near;ui.at(1,ci),ci.w=1,ci.applyMatrix4(e.matrixWorldInverse),ci.applyMatrix4(n),ci.multiplyScalar(1/ci.w),ci.x*=i.x/2,ci.y*=i.y/2,ci.z=0,No.copy(ci),Uo.multiplyMatrices(e.matrixWorldInverse,r);for(let m=0,u=c;m<u;m++){if(En.fromBufferAttribute(a,m),An.fromBufferAttribute(l,m),En.w=1,An.w=1,En.applyMatrix4(Uo),An.applyMatrix4(Uo),En.z>d&&An.z>d)continue;if(En.z>d){const f=En.z-An.z,v=(En.z-d)/f;En.lerp(An,v)}else if(An.z>d){const f=An.z-En.z,v=(An.z-d)/f;An.lerp(En,v)}En.applyMatrix4(n),An.applyMatrix4(n),En.multiplyScalar(1/En.w),An.multiplyScalar(1/An.w),En.x*=i.x/2,En.y*=i.y/2,An.x*=i.x/2,An.y*=i.y/2,wn.start.copy(En),wn.start.z=0,wn.end.copy(An),wn.end.z=0;const h=wn.closestPointToPointParameter(No,!0);wn.at(h,t0);const g=Ei.lerp(En.z,An.z,h),_=g>=-1&&g<=1,p=No.distanceTo(t0)<os*.5;if(_&&p){wn.start.fromBufferAttribute(a,m),wn.end.fromBufferAttribute(l,m),wn.start.applyMatrix4(r),wn.end.applyMatrix4(r);const f=new I,v=new I;ui.distanceSqToSegment(wn.start,wn.end,v,f),t.push({point:v,pointOnLine:f,distance:ui.origin.distanceTo(v),object:s,face:null,faceIndex:m,uv:null,uv1:null})}}}class p4 extends zt{constructor(e=new cu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let o=0,a=0,l=t.count;o<l;o++,a+=2)Qh.fromBufferAttribute(t,o),e0.fromBufferAttribute(n,o),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+Qh.distanceTo(e0);const r=new Dl(i,2,1);return e.setAttribute("instanceDistanceStart",new pi(r,1,0)),e.setAttribute("instanceDistanceEnd",new pi(r,1,1)),this}raycast(e,t){const n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const r=e.params.Line2!==void 0&&e.params.Line2.threshold||0;ui=e.ray;const o=this.matrixWorld,a=this.geometry,l=this.material;os=l.linewidth+r,a.boundingSphere===null&&a.computeBoundingSphere(),la.copy(a.boundingSphere).applyMatrix4(o);let c;if(n)c=os*.5;else{const m=Math.max(i.near,la.distanceToPoint(ui.origin));c=n0(i,m,l.resolution)}if(la.radius+=c,ui.intersectsSphere(la)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),oa.copy(a.boundingBox).applyMatrix4(o);let d;if(n)d=os*.5;else{const m=Math.max(i.near,oa.distanceToPoint(ui.origin));d=n0(i,m,l.resolution)}oa.expandByScalar(d),ui.intersectsBox(oa)!==!1&&(n?d4(this,t):f4(this,i,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(Fo),this.material.uniforms.resolution.value.set(Fo.z,Fo.w))}}class hu extends cu{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setColors(n),this}setFromPoints(e){const t=e.length-1,n=new Float32Array(6*t);for(let i=0;i<t;i++)n[6*i]=e[i].x,n[6*i+1]=e[i].y,n[6*i+2]=e[i].z||0,n[6*i+3]=e[i+1].x,n[6*i+4]=e[i+1].y,n[6*i+5]=e[i+1].z||0;return super.setPositions(n),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class m4 extends p4{constructor(e=new hu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}const g4=s=>{const e=new Tt,t=[],n=[],{isSphere:i}=s;if(br.forEach((a,l)=>{const{enabled:c,line:d,scale:m,color:u}=s[a];if(!c||!d)return;const h=l<3?1:-1,g=(i?lu-m/2:.975)*h;t.push(a.includes("x")?g:0,a.includes("y")?g:0,a.includes("z")?g:0,0,0,0);const _=e.set(u).toArray();n.push(..._,..._)}),!t.length)return null;const r=new hu().setPositions(t).setColors(n),o=new mc({linewidth:s.lineWidth,vertexColors:!0,resolution:new et(window.innerWidth,window.innerHeight)});return new m4(r,o).computeLineDistances()},_4=s=>{const{corners:e,edges:t}=s,n=[],i=r4(s),r=o4(s,i);n.push(...r),e.enabled&&n.push(...l4(s,i)),t.enabled&&n.push(...c4(s,i,e.enabled?7:6));const o=u4(r,s),a=g4(s);return[n,o,a]},cr=(s,e=!0)=>{const{material:t,userData:n}=s,{opacity:i,color:r,scale:o}=e?n.hover:n;s.scale.setScalar(o),t.opacity=i,t.map?a4(t.map,e):t.color.set(r)},Fs=new Et,i0=new Pl,v4=new et,is=new I,s0=new Xt;class uu extends ln{constructor(e,t,n={}){super(),Zt(this,"enabled",!0),Zt(this,"camera"),Zt(this,"renderer"),Zt(this,"options"),Zt(this,"target",new I),Zt(this,"animated",!0),Zt(this,"speed",1),Zt(this,"animating",!1),Zt(this,"_options"),Zt(this,"_intersections"),Zt(this,"_background",null),Zt(this,"_viewport",[0,0,0,0]),Zt(this,"_originalViewport",[0,0,0,0]),Zt(this,"_originalScissor",[0,0,0,0]),Zt(this,"_scene"),Zt(this,"_camera"),Zt(this,"_container"),Zt(this,"_domElement"),Zt(this,"_domRect"),Zt(this,"_dragging",!1),Zt(this,"_distance",0),Zt(this,"_clock",new $1),Zt(this,"_targetQuaternion",new Vn),Zt(this,"_quaternionStart",new Vn),Zt(this,"_quaternionEnd",new Vn),Zt(this,"_pointerStart",new et),Zt(this,"_focus",null),Zt(this,"_placement"),Zt(this,"_controls"),Zt(this,"_controlsListeners"),this.camera=e,this.renderer=t,this._scene=new Ia().add(this),this.set(n)}get placement(){return this._placement}set placement(e){this._placement=au(this._domElement,e),this.domUpdate()}set(e={}){this.dispose(),this.options=e,this._options=s4(e),this._camera=this._options.isSphere?new Ha(-1.8,1.8,1.8,-1.8,5,10):new bn(26,1,5,10),this._camera.position.set(0,0,7);const[t,n,i]=_4(this._options);n&&this.add(n),i&&this.add(i),this.add(...t),this._background=n,this._intersections=t;const{container:r,animated:o,speed:a}=this._options;return this.animated=o,this.speed=a,this._container=r?K3(r):document.body,this._domElement=J3(this._options),this._domElement.onpointerdown=l=>this._onPointerDown(l),this._domElement.onpointermove=l=>this._onPointerMove(l),this._domElement.onpointerleave=()=>this._onPointerLeave(),this._container.appendChild(this._domElement),this._controls&&this.attachControls(this._controls),this.update(),this._updateOrientation(!0),this}render(){this.animating&&this._animate();const{renderer:e,_viewport:t}=this,n=e.getScissorTest(),i=e.autoClear;return e.autoClear=!1,e.setViewport(...t),n&&e.setScissor(...t),e.clear(!1,!0,!1),e.render(this._scene,this._camera),e.setViewport(...this._originalViewport),n&&e.setScissor(...this._originalScissor),e.autoClear=i,this}domUpdate(){this._domRect=this._domElement.getBoundingClientRect();const e=this.renderer,t=this._domRect,n=e.domElement.getBoundingClientRect();return this._viewport.splice(0,4,t.left-n.left,e.domElement.clientHeight-(t.top-n.top+t.height),t.width,t.height),e.getViewport(s0).toArray(this._originalViewport),e.getScissorTest()&&e.getScissor(s0).toArray(this._originalScissor),this}cameraUpdate(){return this._updateOrientation(),this}update(e=!0){return e&&this._controls&&this._controls.update(),this.domUpdate().cameraUpdate()}attachControls(e){return this.detachControls(),this.target=e.target,this._controlsListeners={start:()=>e.enabled=!1,end:()=>e.enabled=!0,change:()=>this.update(!1)},this.addEventListener("start",this._controlsListeners.start),this.addEventListener("end",this._controlsListeners.end),e.addEventListener("change",this._controlsListeners.change),this._controls=e,this}detachControls(){if(!(!this._controlsListeners||!this._controls))return this.target=new I().copy(this._controls.target),this.removeEventListener("start",this._controlsListeners.start),this.removeEventListener("end",this._controlsListeners.end),this._controls.removeEventListener("change",this._controlsListeners.change),this._controlsListeners=void 0,this._controls=void 0,this}dispose(){var e;this.detachControls(),this.children.forEach(t=>{var n,i,r,o;this.remove(t);const a=t;(n=a.material)==null||n.dispose(),(r=(i=a.material)==null?void 0:i.map)==null||r.dispose(),(o=a.geometry)==null||o.dispose()}),(e=this._domElement)==null||e.remove()}_updateOrientation(e=!0){e&&(this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()),jh(this._options,this._intersections,this.camera)}_animate(){const{position:e,quaternion:t}=this.camera;if(e.set(0,0,1),!this.animated){e.applyQuaternion(this._quaternionEnd).multiplyScalar(this._distance).add(this.target),t.copy(this._targetQuaternion),this._updateOrientation(),this.animating=!1,this.dispatchEvent({type:"change"}),this.dispatchEvent({type:"end"});return}this._controls&&(this._controls.enabled=!1);const n=this._clock.getDelta()*e4*this.speed;this._quaternionStart.rotateTowards(this._quaternionEnd,n),e.applyQuaternion(this._quaternionStart).multiplyScalar(this._distance).add(this.target),t.rotateTowards(this._targetQuaternion,n),this._updateOrientation(),requestAnimationFrame(()=>this.dispatchEvent({type:"change"})),this._quaternionStart.angleTo(this._quaternionEnd)<Po&&(this._controls&&(this._controls.enabled=!0),this.animating=!1,this.dispatchEvent({type:"end"}))}_setOrientation(e){const t=this.camera,n=this.target;is.copy(e).multiplyScalar(this._distance),Fs.setPosition(is).lookAt(is,this.position,this.up),this._targetQuaternion.setFromRotationMatrix(Fs),is.add(n),Fs.lookAt(is,n,this.up),this._quaternionEnd.setFromRotationMatrix(Fs),Fs.setPosition(t.position).lookAt(t.position,n,this.up),this._quaternionStart.setFromRotationMatrix(Fs),this.animating=!0,this._clock.start(),this.dispatchEvent({type:"start"})}_onPointerDown(e){if(!this.enabled)return;const t=l=>{if(!this._dragging){if(Q3(l,this._pointerStart))return;this._dragging=!0}const c=v4.set(l.clientX,l.clientY).sub(this._pointerStart).multiplyScalar(1/this._domRect.width*Math.PI),d=this.coordinateConversion(is.subVectors(this.camera.position,this.target)),m=i0.setFromVector3(d);m.theta=o-c.x,m.phi=Nl(a-c.y,Po,Math.PI-Po),this.coordinateConversion(this.camera.position.setFromSpherical(m),!0).add(this.target),this.camera.lookAt(this.target),this.quaternion.copy(this.camera.quaternion).invert(),this._updateOrientation(!1),this.dispatchEvent({type:"change"})},n=()=>{if(document.removeEventListener("pointermove",t,!1),document.removeEventListener("pointerup",n,!1),!this._dragging)return this._handleClick(e);this._focus&&(cr(this._focus,!1),this._focus=null),this._dragging=!1,this.dispatchEvent({type:"end"})};if(this.animating)return;e.preventDefault(),this._pointerStart.set(e.clientX,e.clientY);const i=this.coordinateConversion(is.subVectors(this.camera.position,this.target)),r=i0.setFromVector3(i),o=r.theta,a=r.phi;this._distance=r.radius,document.addEventListener("pointermove",t,!1),document.addEventListener("pointerup",n,!1),this.dispatchEvent({type:"start"})}coordinateConversion(e,t=!1){const{x:n,y:i,z:r}=e,o=ln.DEFAULT_UP;return o.x===1?t?e.set(i,r,n):e.set(r,n,i):o.z===1?t?e.set(r,n,i):e.set(i,r,n):e}_onPointerMove(e){!this.enabled||this._dragging||(this._background&&Jh(this._background,!0),this._handleHover(e))}_onPointerLeave(){!this.enabled||this._dragging||(this._background&&Jh(this._background,!1),this._focus&&cr(this._focus,!1),this._domElement.style.cursor="")}_handleClick(e){const t=Yh(e,this._domRect,this._camera,this._intersections);this._focus&&(cr(this._focus,!1),this._focus=null),t&&(this._setOrientation(t.object.position),this.dispatchEvent({type:"change"}))}_handleHover(e){const t=Yh(e,this._domRect,this._camera,this._intersections),n=(t==null?void 0:t.object)||null;this._focus!==n&&(this._domElement.style.cursor=n?"pointer":"",this._focus&&cr(this._focus,!1),(this._focus=n)?cr(n,!0):jh(this._options,this._intersections,this.camera))}}function y4(s){let e=null,t=null,n=null,i=null,r=null,o=null,a=null,l=null;const d=1e3/30;let m=0;const u=y.ref([]),h=y.ref(new I),g=y.ref(new I),_=()=>{if(!s.value)return;e=new Ia,e.background=new Tt(15790320);const L=s.value;t=new bn(75,L.clientWidth/L.clientHeight,.1,1e4),t.position.set(8,-8,6),t.up.set(0,0,1),t.lookAt(0,0,0),n=new iu({antialias:!0,alpha:!0}),n.setSize(L.clientWidth,L.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Hl,n.toneMapping=Gl,n.toneMappingExposure=1,n.outputColorSpace=qt,L.appendChild(n.domElement),i=new ru(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Ti.PAN,RIGHT:Ti.ROTATE},i.panSpeed=.7,r=new uu(t,n,{container:L,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),r.attachControls(i),v(),b()},p=(L,B)=>{a&&(e.remove(a),a.dispose()),l&&(e.remove(l),l.geometry.dispose(),l.material.dispose());const H=Math.min(Math.max(Math.floor(L/20),30),40);a=new K0(L,H,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(B),e.add(a);const Q=new Di(L,L),ae=new X0({opacity:.3,color:0});l=new zt(Q,ae),l.position.copy(B),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},f=()=>{if(u.value.length===0)return;const L=new Fn;let B=!1;if(u.value.forEach(Z=>{if(Z.userData.boundingBox)L.union(Z.userData.boundingBox),B=!0;else if(Z.userData.modelId&&modelBoundingBoxes.has(Z.userData.modelId)){const ve=modelBoundingBoxes.get(Z.userData.modelId);L.union(ve.box),B=!0}else L.expandByObject(Z),B=!0}),!B){console.warn("无法计算包围盒,网格更新失败");return}const H=L.getSize(new I),Q=L.getCenter(new I),ae=Math.max(H.x,H.y,H.z),G=Math.max(ae*8,50),le=new I(Q.x,Q.y,L.min.z);p(G,le)},v=()=>{const L=new cc(4210752,.6);e.add(L);const B=new gr(16777215,2);B.position.set(10,10,8),B.castShadow=!0,B.shadow.mapSize.width=4096,B.shadow.mapSize.height=4096,B.shadow.camera.near=.5,B.shadow.camera.far=50,B.shadow.camera.left=-50,B.shadow.camera.right=50,B.shadow.camera.top=50,B.shadow.camera.bottom=-50,e.add(B);const H=new gr(16777215,.8);H.position.set(-8,-8,6),e.add(H);const Q=new gr(16777215,.6);Q.position.set(0,-15,2),e.add(Q);const ae=new J0(16777215,4473924,.8);e.add(ae);const G=new Pa(16777215,1,50);G.position.set(15,15,15),e.add(G);const le=new Pa(16777215,.5,50);le.position.set(-15,-15,15),e.add(le)},b=()=>{o=requestAnimationFrame(b),i&&i.update();const L=performance.now(),B=L-m;B<d||(m=L-B%d,n&&e&&t&&n.render(e,t),r&&r.render())},S=L=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(H=>{L[H]&&L[H].dispose&&L[H].dispose()}),L.dispose&&L.dispose()},F=L=>{L==null||L.traverse(B=>{B.geometry&&B.geometry.dispose(),B.material&&(Array.isArray(B.material)?B.material.forEach(H=>{S(H)}):S(B.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const L=s.value,B=L.clientWidth,H=L.clientHeight;t.aspect=B/H,t.updateProjectionMatrix(),n.setSize(B,H),r.update()},fitCameraToAllModels:L=>{if(!t||!i||u.value.length===0)return;const B=new Fn;let H=!1;if(u.value.forEach(ve=>{if(ve.userData.boundingBox)B.union(ve.userData.boundingBox),H=!0;else if(ve.userData.modelId&&L.has(ve.userData.modelId)){const Ee=L.get(ve.userData.modelId);B.union(Ee.box),H=!0}else B.expandByObject(ve),H=!0}),!H){console.warn("无法计算包围盒");return}const Q=B.getSize(new I),ae=B.getCenter(new I),le=Math.max(Q.x,Q.y,Q.z)*.8,Z=new I(ae.x+le,ae.y-le,ae.z+le);t.position.copy(Z),t.lookAt(ae),i.target.copy(ae),i.update(),h.value.copy(Z),g.value.copy(ae),f()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(B=>{e.remove(B),F(B)});const L=[];e.children.forEach(B=>{!B.isLight&&!B.isCamera&&B.type!=="GridHelper"&&B!==l&&L.push(B)}),L.forEach(B=>{e.remove(B),F(B)}),u.value=[],f()},cleanup:()=>{o&&cancelAnimationFrame(o),a&&a.dispose(),l&&(l.geometry.dispose(),l.material.dispose()),n&&n.dispose(),i&&i.dispose(),r&&r.dispose()},updateGridForModels:f}}function x4(s,e){const t=y.ref(!1);let n=null,i=12700,r=new I,o=new I,a=new I,l=0,c=null;const d=p=>p<.5?4*p*p*p:1-Math.pow(-2*p+2,3)/2,m=p=>{const f=new I,v=l*1.2,b=new I(a.x+v,a.y,a.z),S=new I(a.x,a.y+v,a.z),F=new I(a.x,a.y-v,a.z);if(p<=.567){const R=p/.567*Math.PI*2;f.x=a.x+Math.cos(R)*v,f.z=a.z+Math.sin(R)*v,f.y=a.y}else if(p<=.724){const C=(p-.567)/.157,R=d(C);f.lerpVectors(b,S,R)}else if(p<=.881){const C=(p-.724)/.157,P=d(C)*Math.PI;f.x=a.x+Math.sin(P)*v,f.y=a.y+Math.cos(P)*v,f.z=a.z}else{const C=(p-.881)/.119,R=d(C);f.lerpVectors(F,r,R)}return f},u=()=>{const{camera:p,controls:f}=s();if(!p||!f)return;n||(n=Date.now());const v=Date.now()-n,b=Math.min(v/i,1);if(b>=1){g();return}const S=m(b);p.position.copy(S),p.lookAt(a),f.target.copy(a),c=requestAnimationFrame(u)},h=()=>{if(e.value.length===0)return;const{camera:p,controls:f}=s();if(!p||!f)return;r.copy(p.position),o.copy(f.target);const v=new Fn;e.value.forEach(A=>{v.expandByObject(A)});const b=v.getSize(new I);a=v.getCenter(new I),l=Math.max(b.x,b.y,b.z)*1.2;const S=new I(a.x+l*1.2,a.y,a.z);f.enabled=!1;const F=p.position.clone(),C=1e3,R=Date.now(),P=()=>{const A=Date.now()-R,E=Math.min(A/C,1),L=d(E);p.position.lerpVectors(F,S,L),p.lookAt(a),f.target.copy(a),E<1?requestAnimationFrame(P):(t.value=!0,n=null,u())};P()},g=()=>{t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{controls:p}=s();p&&(p.enabled=!0,p.target.copy(o))};return{isAnimating:t,toggleAnimation:()=>{if(t.value){t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{camera:p,controls:f}=s();if(!p||!f)return;f.enabled=!0;const v=p.position.clone(),b=f.target.clone(),S=1500,F=Date.now(),C=()=>{const R=Date.now()-F,P=Math.min(R/S,1),A=d(P);p.position.lerpVectors(v,r,A),f.target.lerpVectors(b,o,A),P<1&&requestAnimationFrame(C)};C()}else h()},startAnimation:h,stopAnimation:g}}function M4(s,e){const t=y.ref(!1),n=y.ref("none");let i=[],r=[],o=new Fn,a=new I;const l=()=>{i=[new Jn(new I(1,0,0),0),new Jn(new I(0,1,0),0),new Jn(new I(0,0,1),0)]},c=()=>{o.makeEmpty(),e.value.forEach(_=>{o.expandByObject(_)}),a=o.getCenter(new I)},d=_=>{const p=o.getSize(new I);let f,v,b;_==="x"?(f=new Di(p.z*1.2,p.y*1.2),v=new I(a.x,a.y,a.z),b=new Sn(0,Math.PI/2,0)):_==="y"?(f=new Di(p.x*1.2,p.z*1.2),v=new I(a.x,a.y,a.z),b=new Sn(Math.PI/2,0,0)):_==="z"&&(f=new Di(p.x*1.2,p.y*1.2),v=new I(a.x,a.y,a.z),b=new Sn(0,0,0));const S=new fn({color:8900331,transparent:!0,opacity:.3,side:pn,depthWrite:!1}),F=new zt(f,S);return F.position.copy(v),F.rotation.copy(b),F},m=()=>{if(u(),h(),n.value==="none")return;c();let _=null;if(n.value==="x"?(i[0].constant=-a.x,_=i[0]):n.value==="y"?(i[1].constant=-a.y,_=i[1]):n.value==="z"&&(i[2].constant=-a.z,_=i[2]),_){e.value.forEach(f=>{f.traverse(v=>{v.isMesh&&v.material&&(Array.isArray(v.material)?v.material.forEach(b=>{b.clippingPlanes=[_]}):v.material.clippingPlanes=[_])})});const{scene:p}=s();if(p){const f=d(n.value);p.add(f),r.push(f)}}},u=()=>{e.value.forEach(_=>{_.traverse(p=>{p.isMesh&&p.material&&(Array.isArray(p.material)?p.material.forEach(f=>{f.clippingPlanes=[]}):p.material.clippingPlanes=[])})})},h=()=>{const{scene:_}=s();_&&r.forEach(p=>{_.remove(p),p.geometry.dispose(),p.material.dispose()}),r=[]};return{isClipping:t,activeClippingAxis:n,toggleClipping:()=>{t.value=!t.value,t.value?(l(),e.value.length>0&&c()):(n.value="none",u(),h())},updateClippingPlanes:m,clearClippingPlanes:u,clearClippingMeshes:h}}class ji extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new Zs(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}parse(e){function t(c){const d=new DataView(c),m=32/8*3+32/8*3*3+16/8,u=d.getUint32(80,!0);if(80+32/8+u*m===d.byteLength)return!0;const g=[115,111,108,105,100];for(let _=0;_<5;_++)if(n(g,d,_))return!1;return!0}function n(c,d,m){for(let u=0,h=c.length;u<h;u++)if(c[u]!==d.getUint8(m+u))return!1;return!0}function i(c){const d=new DataView(c),m=d.getUint32(80,!0);let u,h,g,_=!1,p,f,v,b,S;for(let L=0;L<70;L++)d.getUint32(L,!1)==1129270351&&d.getUint8(L+4)==82&&d.getUint8(L+5)==61&&(_=!0,p=new Float32Array(m*3*3),f=d.getUint8(L+6)/255,v=d.getUint8(L+7)/255,b=d.getUint8(L+8)/255,S=d.getUint8(L+9)/255);const F=84,C=12*4+2,R=new hn,P=new Float32Array(m*3*3),A=new Float32Array(m*3*3),E=new Tt;for(let L=0;L<m;L++){const B=F+L*C,H=d.getFloat32(B,!0),Q=d.getFloat32(B+4,!0),ae=d.getFloat32(B+8,!0);if(_){const G=d.getUint16(B+48,!0);(G&32768)===0?(u=(G&31)/31,h=(G>>5&31)/31,g=(G>>10&31)/31):(u=f,h=v,g=b)}for(let G=1;G<=3;G++){const le=B+G*12,Z=L*3*3+(G-1)*3;P[Z]=d.getFloat32(le,!0),P[Z+1]=d.getFloat32(le+4,!0),P[Z+2]=d.getFloat32(le+8,!0),A[Z]=H,A[Z+1]=Q,A[Z+2]=ae,_&&(E.setRGB(u,h,g,qt),p[Z]=E.r,p[Z+1]=E.g,p[Z+2]=E.b)}}return R.setAttribute("position",new mn(P,3)),R.setAttribute("normal",new mn(A,3)),_&&(R.setAttribute("color",new mn(p,3)),R.hasColors=!0,R.alpha=S),R}function r(c){const d=new hn,m=/solid([\s\S]*?)endsolid/g,u=/facet([\s\S]*?)endfacet/g,h=/solid\s(.+)/;let g=0;const _=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,p=new RegExp("vertex"+_+_+_,"g"),f=new RegExp("normal"+_+_+_,"g"),v=[],b=[],S=[],F=new I;let C,R=0,P=0,A=0;for(;(C=m.exec(c))!==null;){P=A;const E=C[0],L=(C=h.exec(E))!==null?C[1]:"";for(S.push(L);(C=u.exec(E))!==null;){let Q=0,ae=0;const G=C[0];for(;(C=f.exec(G))!==null;)F.x=parseFloat(C[1]),F.y=parseFloat(C[2]),F.z=parseFloat(C[3]),ae++;for(;(C=p.exec(G))!==null;)v.push(parseFloat(C[1]),parseFloat(C[2]),parseFloat(C[3])),b.push(F.x,F.y,F.z),Q++,A++;ae!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),Q!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const B=P,H=A-P;d.userData.groupNames=S,d.addGroup(B,H,R),R++}return d.setAttribute("position",new It(v,3)),d.setAttribute("normal",new It(b,3)),d}function o(c){return typeof c!="string"?new TextDecoder().decode(c):c}function a(c){if(typeof c=="string"){const d=new Uint8Array(c.length);for(let m=0;m<c.length;m++)d[m]=c.charCodeAt(m)&255;return d.buffer||d}else return c}const l=a(e);return t(l)?i(l):r(o(e))}}class r0 extends V1{constructor(e){super(e)}parse(e){function t(G){switch(G.image_type){case u:case _:if(G.colormap_length>256||G.colormap_size!==24||G.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case g:case p:case f:if(G.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case m:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+G.image_type)}if(G.width<=0||G.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(G.pixel_size!==8&&G.pixel_size!==16&&G.pixel_size!==24&&G.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+G.pixel_size)}function n(G,le,Z,ve,Ee){let be,ge;const se=Z.pixel_size>>3,j=Z.width*Z.height*se;if(le&&(ge=Ee.subarray(ve,ve+=Z.colormap_length*(Z.colormap_size>>3))),G){be=new Uint8Array(j);let q,ne,ee,ue=0;const $=new Uint8Array(se);for(;ue<j;)if(q=Ee[ve++],ne=(q&127)+1,q&128){for(ee=0;ee<se;++ee)$[ee]=Ee[ve++];for(ee=0;ee<ne;++ee)be.set($,ue+ee*se);ue+=se*ne}else{for(ne*=se,ee=0;ee<ne;++ee)be[ue+ee]=Ee[ve++];ue+=ne}}else be=Ee.subarray(ve,ve+=le?Z.width*Z.height:j);return{pixel_data:be,palettes:ge}}function i(G,le,Z,ve,Ee,be,ge,se,j){const q=j;let ne,ee=0,ue,$;const pe=E.width;for($=le;$!==ve;$+=Z)for(ue=Ee;ue!==ge;ue+=be,ee++)ne=se[ee],G[(ue+pe*$)*4+3]=255,G[(ue+pe*$)*4+2]=q[ne*3+0],G[(ue+pe*$)*4+1]=q[ne*3+1],G[(ue+pe*$)*4+0]=q[ne*3+2];return G}function r(G,le,Z,ve,Ee,be,ge,se){let j,q=0,ne,ee;const ue=E.width;for(ee=le;ee!==ve;ee+=Z)for(ne=Ee;ne!==ge;ne+=be,q+=2)j=se[q+0]+(se[q+1]<<8),G[(ne+ue*ee)*4+0]=(j&31744)>>7,G[(ne+ue*ee)*4+1]=(j&992)>>2,G[(ne+ue*ee)*4+2]=(j&31)<<3,G[(ne+ue*ee)*4+3]=j&32768?0:255;return G}function o(G,le,Z,ve,Ee,be,ge,se){let j=0,q,ne;const ee=E.width;for(ne=le;ne!==ve;ne+=Z)for(q=Ee;q!==ge;q+=be,j+=3)G[(q+ee*ne)*4+3]=255,G[(q+ee*ne)*4+2]=se[j+0],G[(q+ee*ne)*4+1]=se[j+1],G[(q+ee*ne)*4+0]=se[j+2];return G}function a(G,le,Z,ve,Ee,be,ge,se){let j=0,q,ne;const ee=E.width;for(ne=le;ne!==ve;ne+=Z)for(q=Ee;q!==ge;q+=be,j+=4)G[(q+ee*ne)*4+2]=se[j+0],G[(q+ee*ne)*4+1]=se[j+1],G[(q+ee*ne)*4+0]=se[j+2],G[(q+ee*ne)*4+3]=se[j+3];return G}function l(G,le,Z,ve,Ee,be,ge,se){let j,q=0,ne,ee;const ue=E.width;for(ee=le;ee!==ve;ee+=Z)for(ne=Ee;ne!==ge;ne+=be,q++)j=se[q],G[(ne+ue*ee)*4+0]=j,G[(ne+ue*ee)*4+1]=j,G[(ne+ue*ee)*4+2]=j,G[(ne+ue*ee)*4+3]=255;return G}function c(G,le,Z,ve,Ee,be,ge,se){let j=0,q,ne;const ee=E.width;for(ne=le;ne!==ve;ne+=Z)for(q=Ee;q!==ge;q+=be,j+=2)G[(q+ee*ne)*4+0]=se[j+0],G[(q+ee*ne)*4+1]=se[j+0],G[(q+ee*ne)*4+2]=se[j+0],G[(q+ee*ne)*4+3]=se[j+1];return G}function d(G,le,Z,ve,Ee){let be,ge,se,j,q,ne;switch((E.flags&v)>>b){default:case C:be=0,se=1,q=le,ge=0,j=1,ne=Z;break;case S:be=0,se=1,q=le,ge=Z-1,j=-1,ne=-1;break;case R:be=le-1,se=-1,q=-1,ge=0,j=1,ne=Z;break;case F:be=le-1,se=-1,q=-1,ge=Z-1,j=-1,ne=-1;break}if(H)switch(E.pixel_size){case 8:l(G,ge,j,ne,be,se,q,ve);break;case 16:c(G,ge,j,ne,be,se,q,ve);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(E.pixel_size){case 8:i(G,ge,j,ne,be,se,q,ve,Ee);break;case 16:r(G,ge,j,ne,be,se,q,ve);break;case 24:o(G,ge,j,ne,be,se,q,ve);break;case 32:a(G,ge,j,ne,be,se,q,ve);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return G}const m=0,u=1,h=2,g=3,_=9,p=10,f=11,v=48,b=4,S=0,F=1,C=2,R=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let P=0;const A=new Uint8Array(e),E={id_length:A[P++],colormap_type:A[P++],image_type:A[P++],colormap_index:A[P++]|A[P++]<<8,colormap_length:A[P++]|A[P++]<<8,colormap_size:A[P++],origin:[A[P++]|A[P++]<<8,A[P++]|A[P++]<<8],width:A[P++]|A[P++]<<8,height:A[P++]|A[P++]<<8,pixel_size:A[P++],flags:A[P++]};if(t(E),E.id_length+P>e.length)throw new Error("THREE.TGALoader: No data.");P+=E.id_length;let L=!1,B=!1,H=!1;switch(E.image_type){case _:L=!0,B=!0;break;case u:B=!0;break;case p:L=!0;break;case h:break;case f:L=!0,H=!0;break;case g:H=!0;break}const Q=new Uint8Array(E.width*E.height*4),ae=n(L,B,E,P,A);return d(Q,E.width,E.height,ae.pixel_data,ae.palettes),{data:Q,width:E.width,height:E.height,flipY:!0,generateMipmaps:!0,minFilter:Ai}}}class b4 extends oi{load(e,t,n,i){const r=this,o=r.path===""?hc.extractUrlBase(e):r.path,a=new Zs(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(l){try{t(r.parse(l,o))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},n,i)}parse(e,t){function n(x,M){const N=[],D=x.childNodes;for(let U=0,he=D.length;U<he;U++){const xe=D[U];xe.nodeName===M&&N.push(xe)}return N}function i(x){if(x.length===0)return[];const M=x.trim().split(/\s+/),N=new Array(M.length);for(let D=0,U=M.length;D<U;D++)N[D]=M[D];return N}function r(x){if(x.length===0)return[];const M=x.trim().split(/\s+/),N=new Array(M.length);for(let D=0,U=M.length;D<U;D++)N[D]=parseFloat(M[D]);return N}function o(x){if(x.length===0)return[];const M=x.trim().split(/\s+/),N=new Array(M.length);for(let D=0,U=M.length;D<U;D++)N[D]=parseInt(M[D]);return N}function a(x){return x.substring(1)}function l(){return"three_default_"+ke++}function c(x){return Object.keys(x).length===0}function d(x){return{unit:m(n(x,"unit")[0]),upAxis:u(n(x,"up_axis")[0])}}function m(x){return x!==void 0&&x.hasAttribute("meter")===!0?parseFloat(x.getAttribute("meter")):1}function u(x){return x!==void 0?x.textContent:"Y_UP"}function h(x,M,N,D){const U=n(x,M)[0];if(U!==void 0){const he=n(U,N);for(let xe=0;xe<he.length;xe++)D(he[xe])}}function g(x,M){for(const N in x){const D=x[N];D.build=M(x[N])}}function _(x,M){return x.build!==void 0||(x.build=M(x)),x.build}function p(x){const M={sources:{},samplers:{},channels:{}};let N=!1;for(let D=0,U=x.childNodes.length;D<U;D++){const he=x.childNodes[D];if(he.nodeType!==1)continue;let xe;switch(he.nodeName){case"source":xe=he.getAttribute("id"),M.sources[xe]=Ie(he);break;case"sampler":xe=he.getAttribute("id"),M.samplers[xe]=f(he);break;case"channel":xe=he.getAttribute("target"),M.channels[xe]=v(he);break;case"animation":p(he),N=!0;break;default:console.log(he)}}N===!1&&(ht.animations[x.getAttribute("id")||Ei.generateUUID()]=M)}function f(x){const M={inputs:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=a(U.getAttribute("source")),xe=U.getAttribute("semantic");M.inputs[xe]=he;break}}return M}function v(x){const M={};let D=x.getAttribute("target").split("/");const U=D.shift();let he=D.shift();const xe=he.indexOf("(")!==-1,lt=he.indexOf(".")!==-1;if(lt)D=he.split("."),he=D.shift(),M.member=D.shift();else if(xe){const je=he.split("(");he=je.shift();for(let nt=0;nt<je.length;nt++)je[nt]=parseInt(je[nt].replace(/\)/,""));M.indices=je}return M.id=U,M.sid=he,M.arraySyntax=xe,M.memberSyntax=lt,M.sampler=a(x.getAttribute("source")),M}function b(x){const M=[],N=x.channels,D=x.samplers,U=x.sources;for(const he in N)if(N.hasOwnProperty(he)){const xe=N[he],lt=D[xe.sampler],je=lt.inputs.INPUT,nt=lt.inputs.OUTPUT,ct=U[je],Ne=U[nt],xt=F(xe,ct,Ne);E(xt,M)}return M}function S(x){return _(ht.animations[x],b)}function F(x,M,N){const D=ht.nodes[x.id],U=it(D.id),he=D.transforms[x.sid],xe=D.matrix.clone().transpose();let lt,je,nt,ct,Ne,xt;const gt={};switch(he){case"matrix":for(nt=0,ct=M.array.length;nt<ct;nt++)if(lt=M.array[nt],je=nt*N.stride,gt[lt]===void 0&&(gt[lt]={}),x.arraySyntax===!0){const dn=N.array[je],en=x.indices[0]+4*x.indices[1];gt[lt][en]=dn}else for(Ne=0,xt=N.stride;Ne<xt;Ne++)gt[lt][Ne]=N.array[je+Ne];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',he);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',he);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',he);break}const Dt=C(gt,xe);return{name:U.uuid,keyframes:Dt}}function C(x,M){const N=[];for(const U in x)N.push({time:parseFloat(U),value:x[U]});N.sort(D);for(let U=0;U<16;U++)L(N,U,M.elements[U]);return N;function D(U,he){return U.time-he.time}}const R=new I,P=new I,A=new Vn;function E(x,M){const N=x.keyframes,D=x.name,U=[],he=[],xe=[],lt=[];for(let je=0,nt=N.length;je<nt;je++){const ct=N[je],Ne=ct.time,xt=ct.value;V.fromArray(xt).transpose(),V.decompose(R,A,P),U.push(Ne),he.push(R.x,R.y,R.z),xe.push(A.x,A.y,A.z,A.w),lt.push(P.x,P.y,P.z)}return he.length>0&&M.push(new $s(D+".position",U,he)),xe.length>0&&M.push(new Er(D+".quaternion",U,xe)),lt.length>0&&M.push(new $s(D+".scale",U,lt)),M}function L(x,M,N){let D,U=!0,he,xe;for(he=0,xe=x.length;he<xe;he++)D=x[he],D.value[M]===void 0?D.value[M]=null:U=!1;if(U===!0)for(he=0,xe=x.length;he<xe;he++)D=x[he],D.value[M]=N;else B(x,M)}function B(x,M){let N,D;for(let U=0,he=x.length;U<he;U++){const xe=x[U];if(xe.value[M]===null){if(N=H(x,U,M),D=Q(x,U,M),N===null){xe.value[M]=D.value[M];continue}if(D===null){xe.value[M]=N.value[M];continue}ae(xe,N,D,M)}}}function H(x,M,N){for(;M>=0;){const D=x[M];if(D.value[N]!==null)return D;M--}return null}function Q(x,M,N){for(;M<x.length;){const D=x[M];if(D.value[N]!==null)return D;M++}return null}function ae(x,M,N,D){if(N.time-M.time===0){x.value[D]=M.value[D];return}x.value[D]=(x.time-M.time)*(N.value[D]-M.value[D])/(N.time-M.time)+M.value[D]}function G(x){const M={name:x.getAttribute("id")||"default",start:parseFloat(x.getAttribute("start")||0),end:parseFloat(x.getAttribute("end")||0),animations:[]};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"instance_animation":M.animations.push(a(U.getAttribute("url")));break}}ht.clips[x.getAttribute("id")]=M}function le(x){const M=[],N=x.name,D=x.end-x.start||-1,U=x.animations;for(let he=0,xe=U.length;he<xe;he++){const lt=S(U[he]);for(let je=0,nt=lt.length;je<nt;je++)M.push(lt[je])}return new hh(N,D,M)}function Z(x){return _(ht.clips[x],le)}function ve(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"skin":M.id=a(U.getAttribute("source")),M.skin=Ee(U);break;case"morph":M.id=a(U.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}ht.controllers[x.getAttribute("id")]=M}function Ee(x){const M={sources:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"bind_shape_matrix":M.bindShapeMatrix=r(U.textContent);break;case"source":const he=U.getAttribute("id");M.sources[he]=Ie(U);break;case"joints":M.joints=be(U);break;case"vertex_weights":M.vertexWeights=ge(U);break}}return M}function be(x){const M={inputs:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=U.getAttribute("semantic"),xe=a(U.getAttribute("source"));M.inputs[he]=xe;break}}return M}function ge(x){const M={inputs:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=U.getAttribute("semantic"),xe=a(U.getAttribute("source")),lt=parseInt(U.getAttribute("offset"));M.inputs[he]={id:xe,offset:lt};break;case"vcount":M.vcount=o(U.textContent);break;case"v":M.v=o(U.textContent);break}}return M}function se(x){const M={id:x.id},N=ht.geometries[M.id];return x.skin!==void 0&&(M.skin=j(x.skin),N.sources.skinIndices=M.skin.indices,N.sources.skinWeights=M.skin.weights),M}function j(x){const N={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},D=x.sources,U=x.vertexWeights,he=U.vcount,xe=U.v,lt=U.inputs.JOINT.offset,je=U.inputs.WEIGHT.offset,nt=x.sources[x.joints.inputs.JOINT],ct=x.sources[x.joints.inputs.INV_BIND_MATRIX],Ne=D[U.inputs.WEIGHT.id].array;let xt=0,gt,Dt,wt;for(gt=0,wt=he.length;gt<wt;gt++){const en=he[gt],$t=[];for(Dt=0;Dt<en;Dt++){const Yt=xe[xt+lt],gi=xe[xt+je],zn=Ne[gi];$t.push({index:Yt,weight:zn}),xt+=2}for($t.sort(dn),Dt=0;Dt<4;Dt++){const Yt=$t[Dt];Yt!==void 0?(N.indices.array.push(Yt.index),N.weights.array.push(Yt.weight)):(N.indices.array.push(0),N.weights.array.push(0))}}for(x.bindShapeMatrix?N.bindMatrix=new Et().fromArray(x.bindShapeMatrix).transpose():N.bindMatrix=new Et().identity(),gt=0,wt=nt.array.length;gt<wt;gt++){const en=nt.array[gt],$t=new Et().fromArray(ct.array,gt*ct.stride).transpose();N.joints.push({name:en,boneInverse:$t})}return N;function dn(en,$t){return $t.weight-en.weight}}function q(x){return _(ht.controllers[x],se)}function ne(x){const M={init_from:n(x,"init_from")[0].textContent};ht.images[x.getAttribute("id")]=M}function ee(x){return x.build!==void 0?x.build:x.init_from}function ue(x){const M=ht.images[x];return M!==void 0?_(M,ee):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",x),null)}function $(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"profile_COMMON":M.profile=pe(U);break}}ht.effects[x.getAttribute("id")]=M}function pe(x){const M={surfaces:{},samplers:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"newparam":Ce(U,M);break;case"technique":M.technique=O(U);break;case"extra":M.extra=Le(U);break}}return M}function Ce(x,M){const N=x.getAttribute("sid");for(let D=0,U=x.childNodes.length;D<U;D++){const he=x.childNodes[D];if(he.nodeType===1)switch(he.nodeName){case"surface":M.surfaces[N]=Ke(he);break;case"sampler2D":M.samplers[N]=He(he);break}}}function Ke(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"init_from":M.init_from=U.textContent;break}}return M}function He(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"source":M.source=U.textContent;break}}return M}function O(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"constant":case"lambert":case"blinn":case"phong":M.type=U.nodeName,M.parameters=_t(U);break;case"extra":M.extra=Le(U);break}}return M}function _t(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":M[U.nodeName]=dt(U);break;case"transparent":M[U.nodeName]={opaque:U.hasAttribute("opaque")?U.getAttribute("opaque"):"A_ONE",data:dt(U)};break}}return M}function dt(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"color":M[U.nodeName]=r(U.textContent);break;case"float":M[U.nodeName]=parseFloat(U.textContent);break;case"texture":M[U.nodeName]={id:U.getAttribute("texture"),extra:at(U)};break}}return M}function at(x){const M={technique:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"extra":Fe(U,M);break}}return M}function Fe(x,M){for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique":tt(U,M);break}}}function tt(x,M){for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":M.technique[U.nodeName]=parseFloat(U.textContent);break;case"wrapU":case"wrapV":U.textContent.toUpperCase()==="TRUE"?M.technique[U.nodeName]=1:U.textContent.toUpperCase()==="FALSE"?M.technique[U.nodeName]=0:M.technique[U.nodeName]=parseInt(U.textContent);break;case"bump":M[U.nodeName]=jt(U);break}}}function Le(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique":M.technique=ot(U);break}}return M}function ot(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"double_sided":M[U.nodeName]=parseInt(U.textContent);break;case"bump":M[U.nodeName]=jt(U);break}}return M}function jt(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"texture":M[U.nodeName]={id:U.getAttribute("texture"),texcoord:U.getAttribute("texcoord"),extra:at(U)};break}}return M}function k(x){return x}function T(x){return _(ht.effects[x],k)}function oe(x){const M={name:x.getAttribute("name")};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"instance_effect":M.url=a(U.getAttribute("url"));break}}ht.materials[x.getAttribute("id")]=M}function Se(x){let M,N=x.slice((x.lastIndexOf(".")-1>>>0)+2);switch(N=N.toLowerCase(),N){case"tga":M=Jt;break;default:M=Ot}return M}function De(x){const M=T(x.url),N=M.profile.technique;let D;switch(N.type){case"phong":case"blinn":D=new fn;break;case"lambert":D=new C1;break;default:D=new qi;break}D.name=x.name||"";function U(je,nt=null){const ct=M.profile.samplers[je.id];let Ne=null;if(ct!==void 0){const xt=M.profile.surfaces[ct.source];Ne=ue(xt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),Ne=ue(je.id);if(Ne!==null){const xt=Se(Ne);if(xt!==void 0){const gt=xt.load(Ne),Dt=je.extra;if(Dt!==void 0&&Dt.technique!==void 0&&c(Dt.technique)===!1){const wt=Dt.technique;gt.wrapS=wt.wrapU?di:ri,gt.wrapT=wt.wrapV?di:ri,gt.offset.set(wt.offsetU||0,wt.offsetV||0),gt.repeat.set(wt.repeatU||1,wt.repeatV||1)}else gt.wrapS=di,gt.wrapT=di;return nt!==null&&(gt.colorSpace=nt),gt}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",Ne),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",je.id),null}const he=N.parameters;for(const je in he){const nt=he[je];switch(je){case"diffuse":nt.color&&D.color.fromArray(nt.color),nt.texture&&(D.map=U(nt.texture,qt));break;case"specular":nt.color&&D.specular&&D.specular.fromArray(nt.color),nt.texture&&(D.specularMap=U(nt.texture));break;case"bump":nt.texture&&(D.normalMap=U(nt.texture));break;case"ambient":nt.texture&&(D.lightMap=U(nt.texture,qt));break;case"shininess":nt.float&&D.shininess&&(D.shininess=nt.float);break;case"emission":nt.color&&D.emissive&&D.emissive.fromArray(nt.color),nt.texture&&(D.emissiveMap=U(nt.texture,qt));break}}Gt.colorSpaceToWorking(D.color,qt),D.specular&&Gt.colorSpaceToWorking(D.specular,qt),D.emissive&&Gt.colorSpaceToWorking(D.emissive,qt);let xe=he.transparent,lt=he.transparency;if(lt===void 0&&xe&&(lt={float:1}),xe===void 0&<&&(xe={opaque:"A_ONE",data:{color:[1,1,1,1]}}),xe&<)if(xe.data.texture)D.transparent=!0;else{const je=xe.data.color;switch(xe.opaque){case"A_ONE":D.opacity=je[3]*lt.float;break;case"RGB_ZERO":D.opacity=1-je[0]*lt.float;break;case"A_ZERO":D.opacity=1-je[3]*lt.float;break;case"RGB_ONE":D.opacity=je[0]*lt.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',xe.opaque)}D.opacity<1&&(D.transparent=!0)}if(N.extra!==void 0&&N.extra.technique!==void 0){const je=N.extra.technique;for(const nt in je){const ct=je[nt];switch(nt){case"double_sided":D.side=ct===1?pn:Qn;break;case"bump":D.normalMap=U(ct.texture),D.normalScale=new et(1,1);break}}}return D}function ye(x){return _(ht.materials[x],De)}function vt(x){const M={name:x.getAttribute("name")};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"optics":M.optics=Ze(U);break}}ht.cameras[x.getAttribute("id")]=M}function Ze(x){for(let M=0;M<x.childNodes.length;M++){const N=x.childNodes[M];switch(N.nodeName){case"technique_common":return mt(N)}}return{}}function mt(x){const M={};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];switch(D.nodeName){case"perspective":case"orthographic":M.technique=D.nodeName,M.parameters=yt(D);break}}return M}function yt(x){const M={};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];switch(D.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":M[D.nodeName]=parseFloat(D.textContent);break}}return M}function Ue(x){let M;switch(x.optics.technique){case"perspective":M=new bn(x.optics.parameters.yfov,x.optics.parameters.aspect_ratio,x.optics.parameters.znear,x.optics.parameters.zfar);break;case"orthographic":let N=x.optics.parameters.ymag,D=x.optics.parameters.xmag;const U=x.optics.parameters.aspect_ratio;D=D===void 0?N*U:D,N=N===void 0?D/U:N,D*=.5,N*=.5,M=new Ha(-D,D,N,-N,x.optics.parameters.znear,x.optics.parameters.zfar);break;default:M=new bn;break}return M.name=x.name||"",M}function st(x){const M=ht.cameras[x];return M!==void 0?_(M,Ue):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",x),null)}function Rt(x){let M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique_common":M=At(U);break}}ht.lights[x.getAttribute("id")]=M}function At(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"directional":case"point":case"spot":case"ambient":M.technique=U.nodeName,M.parameters=Ye(U)}}return M}function Ye(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"color":const he=r(U.textContent);M.color=new Tt().fromArray(he),Gt.colorSpaceToWorking(M.color,qt);break;case"falloff_angle":M.falloffAngle=parseFloat(U.textContent);break;case"quadratic_attenuation":const xe=parseFloat(U.textContent);M.distance=xe?Math.sqrt(1/xe):0;break}}return M}function Lt(x){let M;switch(x.technique){case"directional":M=new gr;break;case"point":M=new Pa;break;case"spot":M=new G1;break;case"ambient":M=new cc;break}return x.parameters.color&&M.color.copy(x.parameters.color),x.parameters.distance&&(M.distance=x.parameters.distance),M}function K(x){const M=ht.lights[x];return M!==void 0?_(M,Lt):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",x),null)}function $e(x){const M={name:x.getAttribute("name"),sources:{},vertices:{},primitives:[]},N=n(x,"mesh")[0];if(N!==void 0){for(let D=0;D<N.childNodes.length;D++){const U=N.childNodes[D];if(U.nodeType!==1)continue;const he=U.getAttribute("id");switch(U.nodeName){case"source":M.sources[he]=Ie(U);break;case"vertices":M.vertices=ut(U);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",U.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":M.primitives.push(ze(U));break;default:console.log(U)}}ht.geometries[x.getAttribute("id")]=M}}function Ie(x){const M={array:[],stride:3};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"float_array":M.array=r(D.textContent);break;case"Name_array":M.array=i(D.textContent);break;case"technique_common":const U=n(D,"accessor")[0];U!==void 0&&(M.stride=parseInt(U.getAttribute("stride")));break}}return M}function ut(x){const M={};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];D.nodeType===1&&(M[D.getAttribute("semantic")]=a(D.getAttribute("source")))}return M}function ze(x){const M={type:x.nodeName,material:x.getAttribute("material"),count:parseInt(x.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=a(U.getAttribute("source")),xe=U.getAttribute("semantic"),lt=parseInt(U.getAttribute("offset")),je=parseInt(U.getAttribute("set")),nt=je>0?xe+je:xe;M.inputs[nt]={id:he,offset:lt},M.stride=Math.max(M.stride,lt+1),xe==="TEXCOORD"&&(M.hasUV=!0);break;case"vcount":M.vcount=o(U.textContent);break;case"p":M.p=o(U.textContent);break}}return M}function we(x){const M={};for(let N=0;N<x.length;N++){const D=x[N];M[D.type]===void 0&&(M[D.type]=[]),M[D.type].push(D)}return M}function pt(x){let M=0;for(let N=0,D=x.length;N<D;N++)x[N].hasUV===!0&&M++;M>0&&M<x.length&&(x.uvsNeedsFix=!0)}function Ft(x){const M={},N=x.sources,D=x.vertices,U=x.primitives;if(U.length===0)return{};const he=we(U);for(const xe in he){const lt=he[xe];pt(lt),M[xe]=Qt(lt,N,D)}return M}function Qt(x,M,N){const D={},U={array:[],stride:0},he={array:[],stride:0},xe={array:[],stride:0},lt={array:[],stride:0},je={array:[],stride:0},nt={array:[],stride:4},ct={array:[],stride:4},Ne=new hn,xt=[];let gt=0;for(let Dt=0;Dt<x.length;Dt++){const wt=x[Dt],dn=wt.inputs;let en=0;switch(wt.type){case"lines":case"linestrips":en=wt.count*2;break;case"triangles":en=wt.count*3;break;case"polylist":for(let $t=0;$t<wt.count;$t++){const Yt=wt.vcount[$t];switch(Yt){case 3:en+=3;break;case 4:en+=6;break;default:en+=(Yt-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",wt.type)}Ne.addGroup(gt,en,Dt),gt+=en,wt.material&&xt.push(wt.material);for(const $t in dn){const Yt=dn[$t];switch($t){case"VERTEX":for(const gi in N){const zn=N[gi];switch(gi){case"POSITION":const ps=U.array.length;if(Ut(wt,M[zn],Yt.offset,U.array),U.stride=M[zn].stride,M.skinWeights&&M.skinIndices&&(Ut(wt,M.skinIndices,Yt.offset,nt.array),Ut(wt,M.skinWeights,Yt.offset,ct.array)),wt.hasUV===!1&&x.uvsNeedsFix===!0){const Au=(U.array.length-ps)/U.stride;for(let _c=0;_c<Au;_c++)xe.array.push(0,0)}break;case"NORMAL":Ut(wt,M[zn],Yt.offset,he.array),he.stride=M[zn].stride;break;case"COLOR":Ut(wt,M[zn],Yt.offset,je.array),je.stride=M[zn].stride;break;case"TEXCOORD":Ut(wt,M[zn],Yt.offset,xe.array),xe.stride=M[zn].stride;break;case"TEXCOORD1":Ut(wt,M[zn],Yt.offset,lt.array),xe.stride=M[zn].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',gi)}}break;case"NORMAL":Ut(wt,M[Yt.id],Yt.offset,he.array),he.stride=M[Yt.id].stride;break;case"COLOR":Ut(wt,M[Yt.id],Yt.offset,je.array,!0),je.stride=M[Yt.id].stride;break;case"TEXCOORD":Ut(wt,M[Yt.id],Yt.offset,xe.array),xe.stride=M[Yt.id].stride;break;case"TEXCOORD1":Ut(wt,M[Yt.id],Yt.offset,lt.array),lt.stride=M[Yt.id].stride;break}}}return U.array.length>0&&Ne.setAttribute("position",new It(U.array,U.stride)),he.array.length>0&&Ne.setAttribute("normal",new It(he.array,he.stride)),je.array.length>0&&Ne.setAttribute("color",new It(je.array,je.stride)),xe.array.length>0&&Ne.setAttribute("uv",new It(xe.array,xe.stride)),lt.array.length>0&&Ne.setAttribute("uv1",new It(lt.array,lt.stride)),nt.array.length>0&&Ne.setAttribute("skinIndex",new It(nt.array,nt.stride)),ct.array.length>0&&Ne.setAttribute("skinWeight",new It(ct.array,ct.stride)),D.data=Ne,D.type=x[0].type,D.materialKeys=xt,D}function Ut(x,M,N,D,U=!1){const he=x.p,xe=x.stride,lt=x.vcount;function je(Ne){let xt=he[Ne+N]*ct;const gt=xt+ct;for(;xt<gt;xt++)D.push(nt[xt]);if(U){const Dt=D.length-ct-1;sn.setRGB(D[Dt+0],D[Dt+1],D[Dt+2],qt),D[Dt+0]=sn.r,D[Dt+1]=sn.g,D[Dt+2]=sn.b}}const nt=M.array,ct=M.stride;if(x.vcount!==void 0){let Ne=0;for(let xt=0,gt=lt.length;xt<gt;xt++){const Dt=lt[xt];if(Dt===4){const wt=Ne+xe*0,dn=Ne+xe*1,en=Ne+xe*2,$t=Ne+xe*3;je(wt),je(dn),je($t),je(dn),je(en),je($t)}else if(Dt===3){const wt=Ne+xe*0,dn=Ne+xe*1,en=Ne+xe*2;je(wt),je(dn),je(en)}else if(Dt>4)for(let wt=1,dn=Dt-2;wt<=dn;wt++){const en=Ne+xe*0,$t=Ne+xe*wt,Yt=Ne+xe*(wt+1);je(en),je($t),je(Yt)}Ne+=xe*Dt}}else for(let Ne=0,xt=he.length;Ne<xt;Ne+=xe)je(Ne)}function Cn(x){return _(ht.geometries[x],Ft)}function Hn(x){const M={name:x.getAttribute("name")||"",joints:{},links:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"technique_common":ei(D,M);break}}ht.kinematicsModels[x.getAttribute("id")]=M}function fs(x){return x.build!==void 0?x.build:x}function Yi(x){return _(ht.kinematicsModels[x],fs)}function ei(x,M){for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"joint":M.joints[D.getAttribute("sid")]=Y(D);break;case"link":M.links.push(ce(D));break}}}function Y(x){let M;for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"prismatic":case"revolute":M=W(D);break}}return M}function W(x){const M={sid:x.getAttribute("sid"),name:x.getAttribute("name")||"",axis:new I,limits:{min:0,max:0},type:x.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=r(D.textContent);M.axis.fromArray(U);break;case"limits":const he=D.getElementsByTagName("max")[0],xe=D.getElementsByTagName("min")[0];M.limits.max=parseFloat(he.textContent),M.limits.min=parseFloat(xe.textContent);break}}return M.limits.min>=M.limits.max&&(M.static=!0),M.middlePosition=(M.limits.min+M.limits.max)/2,M}function ce(x){const M={sid:x.getAttribute("sid"),name:x.getAttribute("name")||"",attachments:[],transforms:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"attachment_full":M.attachments.push(de(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(_e(D));break}}return M}function de(x){const M={joint:x.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"link":M.links.push(ce(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(_e(D));break}}return M}function _e(x){const M={type:x.nodeName},N=r(x.textContent);switch(M.type){case"matrix":M.obj=new Et,M.obj.fromArray(N).transpose();break;case"translate":M.obj=new I,M.obj.fromArray(N);break;case"rotate":M.obj=new I,M.obj.fromArray(N),M.angle=Ei.degToRad(N[3]);break}return M}function me(x){const M={name:x.getAttribute("name")||"",rigidBodies:{}};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"rigid_body":M.rigidBodies[D.getAttribute("name")]={},Be(D,M.rigidBodies[D.getAttribute("name")]);break}}ht.physicsModels[x.getAttribute("id")]=M}function Be(x,M){for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"technique_common":Te(D,M);break}}}function Te(x,M){for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"inertia":M.inertia=r(D.textContent);break;case"mass":M.mass=r(D.textContent)[0];break}}}function Re(x){const M={bindJointAxis:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"bind_joint_axis":M.bindJointAxis.push(qe(D));break}}ht.kinematicsScenes[a(x.getAttribute("url"))]=M}function qe(x){const M={target:x.getAttribute("target").split("/").pop()};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=D.getElementsByTagName("param")[0];M.axis=U.textContent;const he=M.axis.split("inst_").pop().split("axis")[0];M.jointIndex=he.substring(0,he.length-1);break}}return M}function te(x){return x.build!==void 0?x.build:x}function Ve(x){return _(ht.kinematicsScenes[x],te)}function Xe(){const x=Object.keys(ht.kinematicsModels)[0],M=Object.keys(ht.kinematicsScenes)[0],N=Object.keys(ht.visualScenes)[0];if(x===void 0||M===void 0)return;const D=Yi(x),U=Ve(M),he=St(N),xe=U.bindJointAxis,lt={};for(let ct=0,Ne=xe.length;ct<Ne;ct++){const xt=xe[ct],gt=Bt.querySelector('[sid="'+xt.target+'"]');if(gt){const Dt=gt.parentElement;je(xt.jointIndex,Dt)}}function je(ct,Ne){const xt=Ne.getAttribute("name"),gt=D.joints[ct];he.traverse(function(Dt){Dt.name===xt&&(lt[ct]={object:Dt,transforms:ft(Ne),joint:gt,position:gt.zeroPosition})})}const nt=new Et;rt={joints:D&&D.joints,getJointValue:function(ct){const Ne=lt[ct];if(Ne)return Ne.position;console.warn("THREE.ColladaLoader: Joint "+ct+" doesn't exist.")},setJointValue:function(ct,Ne){const xt=lt[ct];if(xt){const gt=xt.joint;if(Ne>gt.limits.max||Ne<gt.limits.min)console.warn("THREE.ColladaLoader: Joint "+ct+" value "+Ne+" outside of limits (min: "+gt.limits.min+", max: "+gt.limits.max+").");else if(gt.static)console.warn("THREE.ColladaLoader: Joint "+ct+" is static.");else{const Dt=xt.object,wt=gt.axis,dn=xt.transforms;V.identity();for(let en=0;en<dn.length;en++){const $t=dn[en];if($t.sid&&$t.sid.indexOf(ct)!==-1)switch(gt.type){case"revolute":V.multiply(nt.makeRotationAxis(wt,Ei.degToRad(Ne)));break;case"prismatic":V.multiply(nt.makeTranslation(wt.x*Ne,wt.y*Ne,wt.z*Ne));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+gt.type);break}else switch($t.type){case"matrix":V.multiply($t.obj);break;case"translate":V.multiply(nt.makeTranslation($t.obj.x,$t.obj.y,$t.obj.z));break;case"scale":V.scale($t.obj);break;case"rotate":V.multiply(nt.makeRotationAxis($t.obj,$t.angle));break}}Dt.matrix.copy(V),Dt.matrix.decompose(Dt.position,Dt.quaternion,Dt.scale),lt[ct].position=Ne}}else console.log("THREE.ColladaLoader: "+ct+" does not exist.")}}}function ft(x){const M=[],N=Bt.querySelector('[id="'+x.id+'"]');for(let D=0;D<N.childNodes.length;D++){const U=N.childNodes[D];if(U.nodeType!==1)continue;let he,xe;switch(U.nodeName){case"matrix":he=r(U.textContent);const lt=new Et().fromArray(he).transpose();M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:lt});break;case"translate":case"scale":he=r(U.textContent),xe=new I().fromArray(he),M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:xe});break;case"rotate":he=r(U.textContent),xe=new I().fromArray(he);const je=Ei.degToRad(he[3]);M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:xe,angle:je});break}}return M}function w(x){const M=x.getElementsByTagName("node");for(let N=0;N<M.length;N++){const D=M[N];D.hasAttribute("id")===!1&&D.setAttribute("id",l())}}const V=new Et,X=new I;function J(x){const M={name:x.getAttribute("name")||"",type:x.getAttribute("type"),id:x.getAttribute("id"),sid:x.getAttribute("sid"),matrix:new Et,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType!==1)continue;let U;switch(D.nodeName){case"node":M.nodes.push(D.getAttribute("id")),J(D);break;case"instance_camera":M.instanceCameras.push(a(D.getAttribute("url")));break;case"instance_controller":M.instanceControllers.push(z(D));break;case"instance_light":M.instanceLights.push(a(D.getAttribute("url")));break;case"instance_geometry":M.instanceGeometries.push(z(D));break;case"instance_node":M.instanceNodes.push(a(D.getAttribute("url")));break;case"matrix":U=r(D.textContent),M.matrix.multiply(V.fromArray(U).transpose()),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"translate":U=r(D.textContent),X.fromArray(U),M.matrix.multiply(V.makeTranslation(X.x,X.y,X.z)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"rotate":U=r(D.textContent);const he=Ei.degToRad(U[3]);M.matrix.multiply(V.makeRotationAxis(X.fromArray(U),he)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"scale":U=r(D.textContent),M.matrix.scale(X.fromArray(U)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"extra":break;default:console.log(D)}}return Pe(M.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",M.id):ht.nodes[M.id]=M,M}function z(x){const M={id:a(x.getAttribute("url")),materials:{},skeletons:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];switch(D.nodeName){case"bind_material":const U=D.getElementsByTagName("instance_material");for(let he=0;he<U.length;he++){const xe=U[he],lt=xe.getAttribute("symbol"),je=xe.getAttribute("target");M.materials[lt]=a(je)}break;case"skeleton":M.skeletons.push(a(D.textContent));break}}return M}function fe(x,M){const N=[],D=[];let U,he,xe;for(U=0;U<x.length;U++){const nt=x[U];let ct;if(Pe(nt))ct=it(nt),ie(ct,M,N);else if(bt(nt)){const xt=ht.visualScenes[nt].children;for(let gt=0;gt<xt.length;gt++){const Dt=xt[gt];if(Dt.type==="JOINT"){const wt=it(Dt.id);ie(wt,M,N)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",nt)}for(U=0;U<M.length;U++)for(he=0;he<N.length;he++)if(xe=N[he],xe.bone.name===M[U].name){D[U]=xe,xe.processed=!0;break}for(U=0;U<N.length;U++)xe=N[U],xe.processed===!1&&(D.push(xe),xe.processed=!0);const lt=[],je=[];for(U=0;U<D.length;U++)xe=D[U],lt.push(xe.bone),je.push(xe.boneInverse);return new tc(lt,je)}function ie(x,M,N){x.traverse(function(D){if(D.isBone===!0){let U;for(let he=0;he<M.length;he++){const xe=M[he];if(xe.name===D.name){U=xe.boneInverse;break}}U===void 0&&(U=new Et),N.push({bone:D,boneInverse:U,processed:!1})}})}function Ae(x){const M=[],N=x.matrix,D=x.nodes,U=x.type,he=x.instanceCameras,xe=x.instanceControllers,lt=x.instanceLights,je=x.instanceGeometries,nt=x.instanceNodes;for(let Ne=0,xt=D.length;Ne<xt;Ne++)M.push(it(D[Ne]));for(let Ne=0,xt=he.length;Ne<xt;Ne++){const gt=st(he[Ne]);gt!==null&&M.push(gt.clone())}for(let Ne=0,xt=xe.length;Ne<xt;Ne++){const gt=xe[Ne],Dt=q(gt.id),wt=Cn(Dt.id),dn=Me(wt,gt.materials),en=gt.skeletons,$t=Dt.skin.joints,Yt=fe(en,$t);for(let gi=0,zn=dn.length;gi<zn;gi++){const ps=dn[gi];ps.isSkinnedMesh&&(ps.bind(Yt,Dt.skin.bindMatrix),ps.normalizeSkinWeights()),M.push(ps)}}for(let Ne=0,xt=lt.length;Ne<xt;Ne++){const gt=K(lt[Ne]);gt!==null&&M.push(gt.clone())}for(let Ne=0,xt=je.length;Ne<xt;Ne++){const gt=je[Ne],Dt=Cn(gt.id),wt=Me(Dt,gt.materials);for(let dn=0,en=wt.length;dn<en;dn++)M.push(wt[dn])}for(let Ne=0,xt=nt.length;Ne<xt;Ne++)M.push(it(nt[Ne]).clone());let ct;if(D.length===0&&M.length===1)ct=M[0];else{ct=U==="JOINT"?new k0:new Ln;for(let Ne=0;Ne<M.length;Ne++)ct.add(M[Ne])}return ct.name=U==="JOINT"?x.sid:x.name,ct.matrix.copy(N),ct.matrix.decompose(ct.position,ct.quaternion,ct.scale),ct}const re=new qi({name:oi.DEFAULT_MATERIAL_NAME,color:16711935});function Ge(x,M){const N=[];for(let D=0,U=x.length;D<U;D++){const he=M[x[D]];he===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",x[D]),N.push(re)):N.push(ye(he))}return N}function Me(x,M){const N=[];for(const D in x){const U=x[D],he=Ge(U.materialKeys,M);if(he.length===0&&(D==="lines"||D==="linestrips"?he.push(new Ri):he.push(new fn)),D==="lines"||D==="linestrips")for(let nt=0,ct=he.length;nt<ct;nt++){const Ne=he[nt];if(Ne.isMeshPhongMaterial===!0||Ne.isMeshLambertMaterial===!0){const xt=new Ri;xt.color.copy(Ne.color),xt.opacity=Ne.opacity,xt.transparent=Ne.transparent,he[nt]=xt}}const xe=U.data.attributes.skinIndex!==void 0,lt=he.length===1?he[0]:he;let je;switch(D){case"lines":je=new Ra(U.data,lt);break;case"linestrips":je=new Ba(U.data,lt);break;case"triangles":case"polylist":xe?je=new o1(U.data,lt):je=new zt(U.data,lt);break}N.push(je)}return N}function Pe(x){return ht.nodes[x]!==void 0}function it(x){return _(ht.nodes[x],Ae)}function Mt(x){const M={name:x.getAttribute("name"),children:[]};w(x);const N=n(x,"node");for(let D=0;D<N.length;D++)M.children.push(J(N[D]));ht.visualScenes[x.getAttribute("id")]=M}function Ct(x){const M=new Ln;M.name=x.name;const N=x.children;for(let D=0;D<N.length;D++){const U=N[D];M.add(it(U.id))}return M}function bt(x){return ht.visualScenes[x]!==void 0}function St(x){return _(ht.visualScenes[x],Ct)}function Qe(x){const M=n(x,"instance_visual_scene")[0];return St(a(M.getAttribute("url")))}function Wt(){const x=ht.clips;if(c(x)===!0){if(c(ht.animations)===!1){const M=[];for(const N in ht.animations){const D=S(N);for(let U=0,he=D.length;U<he;U++)M.push(D[U])}Kt.push(new hh("default",-1,M))}}else for(const M in x)Kt.push(Z(M))}function Nt(x){let M="";const N=[x];for(;N.length;){const D=N.shift();D.nodeType===Node.TEXT_NODE?M+=D.textContent:(M+=`
|
|
4198
|
-
`,
|
|
4199
|
-
`,M),null}const We=Bt.getAttribute("version");console.debug("THREE.ColladaLoader: File version",We);const Pt=d(n(Bt,"asset")[0]),Ot=new oc(this.manager);Ot.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let Jt;r0&&(Jt=new r0(this.manager),Jt.setPath(this.resourcePath||t));const sn=new Tt,Kt=[];let rt={},ke=0;const ht={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(Bt,"library_animations","animation",p),h(Bt,"library_animation_clips","animation_clip",G),h(Bt,"library_controllers","controller",ve),h(Bt,"library_images","image",ne),h(Bt,"library_effects","effect",$),h(Bt,"library_materials","material",oe),h(Bt,"library_cameras","camera",vt),h(Bt,"library_lights","light",Rt),h(Bt,"library_geometries","geometry",$e),h(Bt,"library_nodes","node",J),h(Bt,"library_visual_scenes","visual_scene",Mt),h(Bt,"library_kinematics_models","kinematics_model",Hn),h(Bt,"library_physics_models","physics_model",me),h(Bt,"scene","instance_kinematics_scene",Re),g(ht.animations,b),g(ht.clips,le),g(ht.controllers,se),g(ht.images,ee),g(ht.effects,k),g(ht.materials,De),g(ht.cameras,Ue),g(ht.lights,Lt),g(ht.geometries,Ft),g(ht.visualScenes,Ct),Wt(),Xe();const xn=Qe(n(Bt,"scene")[0]);return xn.animations=Kt,Pt.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),xn.rotation.set(-Math.PI/2,0,0)),xn.scale.multiplyScalar(Pt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),Kt},kinematics:rt,library:ht,scene:xn}}}const a0=new I,S4=new Sn,ca=new Et,Vi=new Et,ha=new Vn,ua=new I(1,1,1),da=new I;class Wa extends ln{constructor(...e){super(...e),this.urdfNode=null,this.urdfName=""}copy(e,t){return super.copy(e,t),this.urdfNode=e.urdfNode,this.urdfName=e.urdfName,this}}class E4 extends Wa{constructor(...e){super(...e),this.isURDFCollider=!0,this.type="URDFCollider"}}class A4 extends Wa{constructor(...e){super(...e),this.isURDFVisual=!0,this.type="URDFVisual"}}class du extends Wa{constructor(...e){super(...e),this.isURDFLink=!0,this.type="URDFLink"}}class fu extends Wa{get jointType(){return this._jointType}set jointType(e){if(this.jointType!==e)switch(this._jointType=e,this.matrixWorldNeedsUpdate=!0,e){case"fixed":this.jointValue=[];break;case"continuous":case"revolute":case"prismatic":this.jointValue=new Array(1).fill(0);break;case"planar":this.jointValue=new Array(3).fill(0),this.axis=new I(0,0,1);break;case"floating":this.jointValue=new Array(6).fill(0);break}}get angle(){return this.jointValue[0]}constructor(...e){super(...e),this.isURDFJoint=!0,this.type="URDFJoint",this.jointValue=null,this.jointType="fixed",this.axis=new I(1,0,0),this.limit={lower:0,upper:0},this.ignoreLimits=!1,this.origPosition=null,this.origQuaternion=null,this.mimicJoints=[]}copy(e,t){return super.copy(e,t),this.jointType=e.jointType,this.axis=e.axis.clone(),this.limit.lower=e.limit.lower,this.limit.upper=e.limit.upper,this.ignoreLimits=!1,this.jointValue=[...e.jointValue],this.origPosition=e.origPosition?e.origPosition.clone():null,this.origQuaternion=e.origQuaternion?e.origQuaternion.clone():null,this.mimicJoints=[...e.mimicJoints],this}setJointValue(...e){e=e.map(n=>n===null?null:parseFloat(n)),(!this.origPosition||!this.origQuaternion)&&(this.origPosition=this.position.clone(),this.origQuaternion=this.quaternion.clone());let t=!1;switch(this.mimicJoints.forEach(n=>{t=n.updateFromMimickedJoint(...e)||t}),this.jointType){case"fixed":return t;case"continuous":case"revolute":{let n=e[0];return n==null||n===this.jointValue[0]?t:(!this.ignoreLimits&&this.jointType==="revolute"&&(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.quaternion.setFromAxisAngle(this.axis,n).premultiply(this.origQuaternion),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"prismatic":{let n=e[0];return n==null||n===this.jointValue[0]?t:(this.ignoreLimits||(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.position.copy(this.origPosition),a0.copy(this.axis).applyEuler(this.rotation),this.position.addScaledVector(a0,n),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"floating":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],this.jointValue[3]=e[3]!==null?e[3]:this.jointValue[3],this.jointValue[4]=e[4]!==null?e[4]:this.jointValue[4],this.jointValue[5]=e[5]!==null?e[5]:this.jointValue[5],Vi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromEuler(S4.set(this.jointValue[3],this.jointValue[4],this.jointValue[5],"XYZ")),da.set(this.jointValue[0],this.jointValue[1],this.jointValue[2]),ca.compose(da,ha,ua),Vi.premultiply(ca),this.position.setFromMatrixPosition(Vi),this.rotation.setFromRotationMatrix(Vi),this.matrixWorldNeedsUpdate=!0,!0);case"planar":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],Vi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromAxisAngle(this.axis,this.jointValue[2]),da.set(this.jointValue[0],this.jointValue[1],0),ca.compose(da,ha,ua),Vi.premultiply(ca),this.position.setFromMatrixPosition(Vi),this.rotation.setFromRotationMatrix(Vi),this.matrixWorldNeedsUpdate=!0,!0)}return t}}class o0 extends fu{constructor(...e){super(...e),this.type="URDFMimicJoint",this.mimicJoint=null,this.offset=0,this.multiplier=1}updateFromMimickedJoint(...e){const t=e.map(n=>n*this.multiplier+this.offset);return super.setJointValue(...t)}copy(e,t){return super.copy(e,t),this.mimicJoint=e.mimicJoint,this.offset=e.offset,this.multiplier=e.multiplier,this}}class w4 extends du{constructor(...e){super(...e),this.isURDFRobot=!0,this.urdfNode=null,this.urdfRobotNode=null,this.robotName=null,this.links=null,this.joints=null,this.colliders=null,this.visual=null,this.frames=null}copy(e,t){super.copy(e,t),this.urdfRobotNode=e.urdfRobotNode,this.robotName=e.robotName,this.links={},this.joints={},this.colliders={},this.visual={},this.traverse(n=>{n.isURDFJoint&&n.urdfName in e.joints&&(this.joints[n.urdfName]=n),n.isURDFLink&&n.urdfName in e.links&&(this.links[n.urdfName]=n),n.isURDFCollider&&n.urdfName in e.colliders&&(this.colliders[n.urdfName]=n),n.isURDFVisual&&n.urdfName in e.visual&&(this.visual[n.urdfName]=n)});for(const n in this.joints)this.joints[n].mimicJoints=this.joints[n].mimicJoints.map(i=>this.joints[i.name]);return this.frames={...this.colliders,...this.visual,...this.links,...this.joints},this}getFrame(e){return this.frames[e]}setJointValue(e,...t){const n=this.joints[e];return n?n.setJointValue(...t):!1}setJointValues(e){let t=!1;for(const n in e){const i=e[n];Array.isArray(i)?t=this.setJointValue(n,...i)||t:t=this.setJointValue(n,i)||t}return t}}const Io=new Vn,l0=new Sn;function Ns(s){return s?s.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function c0(s,e,t=!1){t||s.rotation.set(0,0,0),l0.set(e[0],e[1],e[2],"ZYX"),Io.setFromEuler(l0),Io.multiply(s.quaternion),s.quaternion.copy(Io)}class gc{constructor(e){this.manager=e||ac,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(e){return new Promise((t,n)=>{this.load(e,t,null,n)})}load(e,t,n,i){const r=this.manager,o=hc.extractUrlBase(e),a=this.manager.resolveURL(e);r.itemStart(a),fetch(a,this.fetchOptions).then(l=>{if(l.ok)return n&&n(null),l.text();throw new Error(`URDFLoader: Failed to load url '${a}' with error code ${l.status} : ${l.statusText}.`)}).then(l=>{const c=this.parse(l,this.workingPath||o);t(c),r.itemEnd(a)}).catch(l=>{i?i(l):console.error("URDFLoader: Error loading file.",l),r.itemError(a),r.itemEnd(a)})}parse(e,t=this.workingPath){const n=this.packages,i=this.loadMeshCb,r=this.parseVisual,o=this.parseCollision,a=this.manager,l={},c={},d={};function m(v){if(!/^package:\/\//.test(v))return t?t+v:v;const[b,S]=v.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(b)?n+"/"+S:n+"/"+b+"/"+S;if(n instanceof Function)return n(b)+"/"+S;if(typeof n=="object")return b in n?n[b]+"/"+S:(console.error(`URDFLoader : ${b} not found in provided package list.`),null)}function u(v){let b;v instanceof Document?b=[...v.children]:v instanceof Element?b=[v]:b=[...new DOMParser().parseFromString(v,"text/xml").children];const S=b.filter(F=>F.nodeName==="robot").pop();return h(S)}function h(v){const b=[...v.children],S=b.filter(L=>L.nodeName.toLowerCase()==="link"),F=b.filter(L=>L.nodeName.toLowerCase()==="joint"),C=b.filter(L=>L.nodeName.toLowerCase()==="material"),R=new w4;R.robotName=v.getAttribute("name"),R.urdfRobotNode=v,C.forEach(L=>{const B=L.getAttribute("name");d[B]=p(L)});const P={},A={};S.forEach(L=>{const B=L.getAttribute("name"),H=v.querySelector(`child[link="${B}"]`)===null;l[B]=_(L,P,A,H?R:null)}),F.forEach(L=>{const B=L.getAttribute("name");c[B]=g(L)}),R.joints=c,R.links=l,R.colliders=A,R.visual=P;const E=Object.values(c);return E.forEach(L=>{L instanceof o0&&c[L.mimicJoint].mimicJoints.push(L)}),E.forEach(L=>{const B=new Set,H=Q=>{if(B.has(Q))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");B.add(Q),Q.mimicJoints.forEach(ae=>{H(ae)})};H(L)}),R.frames={...A,...P,...l,...c},R}function g(v){const b=[...v.children],S=v.getAttribute("type");let F;const C=b.find(B=>B.nodeName.toLowerCase()==="mimic");C?(F=new o0,F.mimicJoint=C.getAttribute("joint"),F.multiplier=parseFloat(C.getAttribute("multiplier")||1),F.offset=parseFloat(C.getAttribute("offset")||0)):F=new fu,F.urdfNode=v,F.name=v.getAttribute("name"),F.urdfName=F.name,F.jointType=S;let R=null,P=null,A=[0,0,0],E=[0,0,0];b.forEach(B=>{const H=B.nodeName.toLowerCase();H==="origin"?(A=Ns(B.getAttribute("xyz")),E=Ns(B.getAttribute("rpy"))):H==="child"?P=l[B.getAttribute("link")]:H==="parent"?R=l[B.getAttribute("link")]:H==="limit"&&(F.limit.lower=parseFloat(B.getAttribute("lower")||F.limit.lower),F.limit.upper=parseFloat(B.getAttribute("upper")||F.limit.upper))}),R.add(F),F.add(P),c0(F,E),F.position.set(A[0],A[1],A[2]);const L=b.filter(B=>B.nodeName.toLowerCase()==="axis")[0];if(L){const B=L.getAttribute("xyz").split(/\s+/g).map(H=>parseFloat(H));F.axis=new I(B[0],B[1],B[2]),F.axis.normalize()}return F}function _(v,b,S,F=null){F===null&&(F=new du);const C=[...v.children];return F.name=v.getAttribute("name"),F.urdfName=F.name,F.urdfNode=v,r&&C.filter(P=>P.nodeName.toLowerCase()==="visual").forEach(P=>{const A=f(P,d);if(F.add(A),P.hasAttribute("name")){const E=P.getAttribute("name");A.name=E,A.urdfName=E,b[E]=A}}),o&&C.filter(P=>P.nodeName.toLowerCase()==="collision").forEach(P=>{const A=f(P);if(F.add(A),P.hasAttribute("name")){const E=P.getAttribute("name");A.name=E,A.urdfName=E,S[E]=A}}),F}function p(v){const b=[...v.children],S=new fn;return S.name=v.getAttribute("name")||"",b.forEach(F=>{const C=F.nodeName.toLowerCase();if(C==="color"){const R=F.getAttribute("rgba").split(/\s/g).map(P=>parseFloat(P));S.color.setRGB(R[0],R[1],R[2]),S.opacity=R[3],S.transparent=R[3]<1,S.depthWrite=!S.transparent}else if(C==="texture"){const R=F.getAttribute("filename");if(R){const P=new oc(a),A=m(R);S.map=P.load(A),S.map.colorSpace=qt}}}),S}function f(v,b={}){const S=v.nodeName.toLowerCase()==="collision",F=[...v.children];let C=null;const R=F.filter(A=>A.nodeName.toLowerCase()==="material")[0];if(R){const A=R.getAttribute("name");A&&A in b?C=b[A]:C=p(R)}else C=new fn;const P=S?new E4:new A4;return P.urdfNode=v,F.forEach(A=>{const E=A.nodeName.toLowerCase();if(E==="geometry"){const L=A.children[0].nodeName.toLowerCase();if(L==="mesh"){const B=A.children[0].getAttribute("filename"),H=m(B);if(H!==null){const Q=A.children[0].getAttribute("scale");if(Q){const ae=Ns(Q);P.scale.set(ae[0],ae[1],ae[2])}i(H,a,(ae,G)=>{G?console.error("URDFLoader: Error loading mesh.",G):ae&&(ae instanceof zt&&(ae.material=C),ae.position.set(0,0,0),ae.quaternion.identity(),P.add(ae))})}}else if(L==="box"){const B=new zt;B.geometry=new $i(1,1,1),B.material=C;const H=Ns(A.children[0].getAttribute("size"));B.scale.set(H[0],H[1],H[2]),P.add(B)}else if(L==="sphere"){const B=new zt;B.geometry=new Oa(1,30,30),B.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0;B.scale.set(H,H,H),P.add(B)}else if(L==="cylinder"){const B=new zt;B.geometry=new ic(1,1,1,30),B.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0,Q=parseFloat(A.children[0].getAttribute("length"))||0;B.scale.set(H,Q,H),B.rotation.set(Math.PI/2,0,0),P.add(B)}}else if(E==="origin"){const L=Ns(A.getAttribute("xyz")),B=Ns(A.getAttribute("rpy"));P.position.set(L[0],L[1],L[2]),P.rotation.set(0,0,0),c0(P,B)}}),P}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new ji(t).load(e,r=>{const o=new zt(r,new fn);n(o)}):/\.dae$/i.test(e)?new b4(t).load(e,r=>n(r.scene)):console.warn(`URDFLoader: Could not load model at ${e}.
|
|
4200
|
-
No loader available`)}}const T4=/^[og]\s*(.+)?/,C4=/^mtllib /,R4=/^usemtl /,D4=/^usemap /,h0=/\s+/,u0=new
|
|
4197
|
+
`};class mc extends Ti{constructor(e){super({type:"LineMaterial",uniforms:Ql.clone(Nn.line.uniforms),vertexShader:Nn.line.vertexShader,fragmentShader:Nn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const Fo=new Ot,Qh=new z,e0=new z,vn=new Ot,yn=new Ot,si=new Ot,No=new z,Uo=new Mt,xn=new K1,t0=new z,oa=new Tn,la=new Ri,ri=new Ot;let ai,rs;function n0(s,e,t){return ri.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),ri.multiplyScalar(1/ri.w),ri.x=rs/t.width,ri.y=rs/t.height,ri.applyMatrix4(s.projectionMatrixInverse),ri.multiplyScalar(1/ri.w),Math.abs(Math.max(ri.x,ri.y))}function d4(s,e){const t=s.matrixWorld,n=s.geometry,i=n.attributes.instanceStart,r=n.attributes.instanceEnd,o=Math.min(n.instanceCount,i.count);for(let a=0,l=o;a<l;a++){xn.start.fromBufferAttribute(i,a),xn.end.fromBufferAttribute(r,a),xn.applyMatrix4(t);const c=new z,d=new z;ai.distanceSqToSegment(xn.start,xn.end,d,c),d.distanceTo(c)<rs*.5&&e.push({point:d,pointOnLine:c,distance:ai.origin.distanceTo(d),object:s,face:null,faceIndex:a,uv:null,uv1:null})}}function f4(s,e,t){const n=e.projectionMatrix,i=s.material.resolution,r=s.matrixWorld,o=s.geometry,a=o.attributes.instanceStart,l=o.attributes.instanceEnd,c=Math.min(o.instanceCount,a.count),d=-e.near;ai.at(1,si),si.w=1,si.applyMatrix4(e.matrixWorldInverse),si.applyMatrix4(n),si.multiplyScalar(1/si.w),si.x*=i.x/2,si.y*=i.y/2,si.z=0,No.copy(si),Uo.multiplyMatrices(e.matrixWorldInverse,r);for(let m=0,u=c;m<u;m++){if(vn.fromBufferAttribute(a,m),yn.fromBufferAttribute(l,m),vn.w=1,yn.w=1,vn.applyMatrix4(Uo),yn.applyMatrix4(Uo),vn.z>d&&yn.z>d)continue;if(vn.z>d){const p=vn.z-yn.z,x=(vn.z-d)/p;vn.lerp(yn,x)}else if(yn.z>d){const p=yn.z-vn.z,x=(yn.z-d)/p;yn.lerp(vn,x)}vn.applyMatrix4(n),yn.applyMatrix4(n),vn.multiplyScalar(1/vn.w),yn.multiplyScalar(1/yn.w),vn.x*=i.x/2,vn.y*=i.y/2,yn.x*=i.x/2,yn.y*=i.y/2,xn.start.copy(vn),xn.start.z=0,xn.end.copy(yn),xn.end.z=0;const h=xn.closestPointToPointParameter(No,!0);xn.at(h,t0);const g=xi.lerp(vn.z,yn.z,h),_=g>=-1&&g<=1,f=No.distanceTo(t0)<rs*.5;if(_&&f){xn.start.fromBufferAttribute(a,m),xn.end.fromBufferAttribute(l,m),xn.start.applyMatrix4(r),xn.end.applyMatrix4(r);const p=new z,x=new z;ai.distanceSqToSegment(xn.start,xn.end,x,p),t.push({point:x,pointOnLine:p,distance:ai.origin.distanceTo(x),object:s,face:null,faceIndex:m,uv:null,uv1:null})}}}class p4 extends Pt{constructor(e=new cu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let o=0,a=0,l=t.count;o<l;o++,a+=2)Qh.fromBufferAttribute(t,o),e0.fromBufferAttribute(n,o),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+Qh.distanceTo(e0);const r=new Dl(i,2,1);return e.setAttribute("instanceDistanceStart",new ci(r,1,0)),e.setAttribute("instanceDistanceEnd",new ci(r,1,1)),this}raycast(e,t){const n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const r=e.params.Line2!==void 0&&e.params.Line2.threshold||0;ai=e.ray;const o=this.matrixWorld,a=this.geometry,l=this.material;rs=l.linewidth+r,a.boundingSphere===null&&a.computeBoundingSphere(),la.copy(a.boundingSphere).applyMatrix4(o);let c;if(n)c=rs*.5;else{const m=Math.max(i.near,la.distanceToPoint(ai.origin));c=n0(i,m,l.resolution)}if(la.radius+=c,ai.intersectsSphere(la)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),oa.copy(a.boundingBox).applyMatrix4(o);let d;if(n)d=rs*.5;else{const m=Math.max(i.near,oa.distanceToPoint(ai.origin));d=n0(i,m,l.resolution)}oa.expandByScalar(d),ai.intersectsBox(oa)!==!1&&(n?d4(this,t):f4(this,i,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(Fo),this.material.uniforms.resolution.value.set(Fo.z,Fo.w))}}class hu extends cu{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setColors(n),this}setFromPoints(e){const t=e.length-1,n=new Float32Array(6*t);for(let i=0;i<t;i++)n[6*i]=e[i].x,n[6*i+1]=e[i].y,n[6*i+2]=e[i].z||0,n[6*i+3]=e[i+1].x,n[6*i+4]=e[i+1].y,n[6*i+5]=e[i+1].z||0;return super.setPositions(n),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class m4 extends p4{constructor(e=new hu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}const g4=s=>{const e=new bt,t=[],n=[],{isSphere:i}=s;if(br.forEach((a,l)=>{const{enabled:c,line:d,scale:m,color:u}=s[a];if(!c||!d)return;const h=l<3?1:-1,g=(i?lu-m/2:.975)*h;t.push(a.includes("x")?g:0,a.includes("y")?g:0,a.includes("z")?g:0,0,0,0);const _=e.set(u).toArray();n.push(..._,..._)}),!t.length)return null;const r=new hu().setPositions(t).setColors(n),o=new mc({linewidth:s.lineWidth,vertexColors:!0,resolution:new Je(window.innerWidth,window.innerHeight)});return new m4(r,o).computeLineDistances()},_4=s=>{const{corners:e,edges:t}=s,n=[],i=r4(s),r=o4(s,i);n.push(...r),e.enabled&&n.push(...l4(s,i)),t.enabled&&n.push(...c4(s,i,e.enabled?7:6));const o=u4(r,s),a=g4(s);return[n,o,a]},cr=(s,e=!0)=>{const{material:t,userData:n}=s,{opacity:i,color:r,scale:o}=e?n.hover:n;s.scale.setScalar(o),t.opacity=i,t.map?a4(t.map,e):t.color.set(r)},Fs=new Mt,i0=new Pl,v4=new Je,ts=new z,s0=new Ot;class uu extends sn{constructor(e,t,n={}){super(),jt(this,"enabled",!0),jt(this,"camera"),jt(this,"renderer"),jt(this,"options"),jt(this,"target",new z),jt(this,"animated",!0),jt(this,"speed",1),jt(this,"animating",!1),jt(this,"_options"),jt(this,"_intersections"),jt(this,"_background",null),jt(this,"_viewport",[0,0,0,0]),jt(this,"_originalViewport",[0,0,0,0]),jt(this,"_originalScissor",[0,0,0,0]),jt(this,"_scene"),jt(this,"_camera"),jt(this,"_container"),jt(this,"_domElement"),jt(this,"_domRect"),jt(this,"_dragging",!1),jt(this,"_distance",0),jt(this,"_clock",new $1),jt(this,"_targetQuaternion",new Un),jt(this,"_quaternionStart",new Un),jt(this,"_quaternionEnd",new Un),jt(this,"_pointerStart",new Je),jt(this,"_focus",null),jt(this,"_placement"),jt(this,"_controls"),jt(this,"_controlsListeners"),this.camera=e,this.renderer=t,this._scene=new Ia().add(this),this.set(n)}get placement(){return this._placement}set placement(e){this._placement=au(this._domElement,e),this.domUpdate()}set(e={}){this.dispose(),this.options=e,this._options=s4(e),this._camera=this._options.isSphere?new Ha(-1.8,1.8,1.8,-1.8,5,10):new gn(26,1,5,10),this._camera.position.set(0,0,7);const[t,n,i]=_4(this._options);n&&this.add(n),i&&this.add(i),this.add(...t),this._background=n,this._intersections=t;const{container:r,animated:o,speed:a}=this._options;return this.animated=o,this.speed=a,this._container=r?J3(r):document.body,this._domElement=K3(this._options),this._domElement.onpointerdown=l=>this._onPointerDown(l),this._domElement.onpointermove=l=>this._onPointerMove(l),this._domElement.onpointerleave=()=>this._onPointerLeave(),this._container.appendChild(this._domElement),this._controls&&this.attachControls(this._controls),this.update(),this._updateOrientation(!0),this}render(){this.animating&&this._animate();const{renderer:e,_viewport:t}=this,n=e.getScissorTest(),i=e.autoClear;return e.autoClear=!1,e.setViewport(...t),n&&e.setScissor(...t),e.clear(!1,!0,!1),e.render(this._scene,this._camera),e.setViewport(...this._originalViewport),n&&e.setScissor(...this._originalScissor),e.autoClear=i,this}domUpdate(){this._domRect=this._domElement.getBoundingClientRect();const e=this.renderer,t=this._domRect,n=e.domElement.getBoundingClientRect();return this._viewport.splice(0,4,t.left-n.left,e.domElement.clientHeight-(t.top-n.top+t.height),t.width,t.height),e.getViewport(s0).toArray(this._originalViewport),e.getScissorTest()&&e.getScissor(s0).toArray(this._originalScissor),this}cameraUpdate(){return this._updateOrientation(),this}update(e=!0){return e&&this._controls&&this._controls.update(),this.domUpdate().cameraUpdate()}attachControls(e){return this.detachControls(),this.target=e.target,this._controlsListeners={start:()=>e.enabled=!1,end:()=>e.enabled=!0,change:()=>this.update(!1)},this.addEventListener("start",this._controlsListeners.start),this.addEventListener("end",this._controlsListeners.end),e.addEventListener("change",this._controlsListeners.change),this._controls=e,this}detachControls(){if(!(!this._controlsListeners||!this._controls))return this.target=new z().copy(this._controls.target),this.removeEventListener("start",this._controlsListeners.start),this.removeEventListener("end",this._controlsListeners.end),this._controls.removeEventListener("change",this._controlsListeners.change),this._controlsListeners=void 0,this._controls=void 0,this}dispose(){var e;this.detachControls(),this.children.forEach(t=>{var n,i,r,o;this.remove(t);const a=t;(n=a.material)==null||n.dispose(),(r=(i=a.material)==null?void 0:i.map)==null||r.dispose(),(o=a.geometry)==null||o.dispose()}),(e=this._domElement)==null||e.remove()}_updateOrientation(e=!0){e&&(this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()),jh(this._options,this._intersections,this.camera)}_animate(){const{position:e,quaternion:t}=this.camera;if(e.set(0,0,1),!this.animated){e.applyQuaternion(this._quaternionEnd).multiplyScalar(this._distance).add(this.target),t.copy(this._targetQuaternion),this._updateOrientation(),this.animating=!1,this.dispatchEvent({type:"change"}),this.dispatchEvent({type:"end"});return}this._controls&&(this._controls.enabled=!1);const n=this._clock.getDelta()*e4*this.speed;this._quaternionStart.rotateTowards(this._quaternionEnd,n),e.applyQuaternion(this._quaternionStart).multiplyScalar(this._distance).add(this.target),t.rotateTowards(this._targetQuaternion,n),this._updateOrientation(),requestAnimationFrame(()=>this.dispatchEvent({type:"change"})),this._quaternionStart.angleTo(this._quaternionEnd)<Po&&(this._controls&&(this._controls.enabled=!0),this.animating=!1,this.dispatchEvent({type:"end"}))}_setOrientation(e){const t=this.camera,n=this.target;ts.copy(e).multiplyScalar(this._distance),Fs.setPosition(ts).lookAt(ts,this.position,this.up),this._targetQuaternion.setFromRotationMatrix(Fs),ts.add(n),Fs.lookAt(ts,n,this.up),this._quaternionEnd.setFromRotationMatrix(Fs),Fs.setPosition(t.position).lookAt(t.position,n,this.up),this._quaternionStart.setFromRotationMatrix(Fs),this.animating=!0,this._clock.start(),this.dispatchEvent({type:"start"})}_onPointerDown(e){if(!this.enabled)return;const t=l=>{if(!this._dragging){if(Q3(l,this._pointerStart))return;this._dragging=!0}const c=v4.set(l.clientX,l.clientY).sub(this._pointerStart).multiplyScalar(1/this._domRect.width*Math.PI),d=this.coordinateConversion(ts.subVectors(this.camera.position,this.target)),m=i0.setFromVector3(d);m.theta=o-c.x,m.phi=Nl(a-c.y,Po,Math.PI-Po),this.coordinateConversion(this.camera.position.setFromSpherical(m),!0).add(this.target),this.camera.lookAt(this.target),this.quaternion.copy(this.camera.quaternion).invert(),this._updateOrientation(!1),this.dispatchEvent({type:"change"})},n=()=>{if(document.removeEventListener("pointermove",t,!1),document.removeEventListener("pointerup",n,!1),!this._dragging)return this._handleClick(e);this._focus&&(cr(this._focus,!1),this._focus=null),this._dragging=!1,this.dispatchEvent({type:"end"})};if(this.animating)return;e.preventDefault(),this._pointerStart.set(e.clientX,e.clientY);const i=this.coordinateConversion(ts.subVectors(this.camera.position,this.target)),r=i0.setFromVector3(i),o=r.theta,a=r.phi;this._distance=r.radius,document.addEventListener("pointermove",t,!1),document.addEventListener("pointerup",n,!1),this.dispatchEvent({type:"start"})}coordinateConversion(e,t=!1){const{x:n,y:i,z:r}=e,o=sn.DEFAULT_UP;return o.x===1?t?e.set(i,r,n):e.set(r,n,i):o.z===1?t?e.set(r,n,i):e.set(i,r,n):e}_onPointerMove(e){!this.enabled||this._dragging||(this._background&&Kh(this._background,!0),this._handleHover(e))}_onPointerLeave(){!this.enabled||this._dragging||(this._background&&Kh(this._background,!1),this._focus&&cr(this._focus,!1),this._domElement.style.cursor="")}_handleClick(e){const t=Yh(e,this._domRect,this._camera,this._intersections);this._focus&&(cr(this._focus,!1),this._focus=null),t&&(this._setOrientation(t.object.position),this.dispatchEvent({type:"change"}))}_handleHover(e){const t=Yh(e,this._domRect,this._camera,this._intersections),n=(t==null?void 0:t.object)||null;this._focus!==n&&(this._domElement.style.cursor=n?"pointer":"",this._focus&&cr(this._focus,!1),(this._focus=n)?cr(n,!0):jh(this._options,this._intersections,this.camera))}}function y4(s){let e=null,t=null,n=null,i=null,r=null,o=null,a=null,l=null;const d=1e3/30;let m=0;const u=y.ref([]),h=y.ref(new z),g=y.ref(new z),_=()=>{if(!s.value)return;e=new Ia,e.background=new bt(15790320);const F=s.value;t=new gn(75,F.clientWidth/F.clientHeight,.1,1e4),t.position.set(8,-8,6),t.up.set(0,0,1),t.lookAt(0,0,0),n=new iu({antialias:!0,alpha:!0}),n.setSize(F.clientWidth,F.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Hl,n.toneMapping=Gl,n.toneMappingExposure=1,n.outputColorSpace=Vt,F.appendChild(n.domElement),i=new ru(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Si.PAN,RIGHT:Si.ROTATE},i.panSpeed=.7,r=new uu(t,n,{container:F,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),r.attachControls(i),x(),M()},f=(F,B)=>{a&&(e.remove(a),a.dispose()),l&&(e.remove(l),l.geometry.dispose(),l.material.dispose());const X=Math.min(Math.max(Math.floor(F/20),30),40);a=new J0(F,X,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(B),e.add(a);const Z=new wi(F,F),se=new X0({opacity:.3,color:0});l=new Pt(Z,se),l.position.copy(B),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},p=()=>{if(u.value.length===0)return;const F=new Tn;let B=!1;if(u.value.forEach(Q=>{if(Q.userData.boundingBox)F.union(Q.userData.boundingBox),B=!0;else if(Q.userData.modelId&&modelBoundingBoxes.has(Q.userData.modelId)){const xe=modelBoundingBoxes.get(Q.userData.modelId);F.union(xe.box),B=!0}else F.expandByObject(Q),B=!0}),!B){console.warn("无法计算包围盒,网格更新失败");return}const X=F.getSize(new z),Z=F.getCenter(new z),se=Math.max(X.x,X.y,X.z),W=Math.max(se*8,50),he=new z(Z.x,Z.y,F.min.z);f(W,he)},x=()=>{const F=new cc(4210752,.6);e.add(F);const B=new gr(16777215,2);B.position.set(10,10,8),B.castShadow=!0,B.shadow.mapSize.width=4096,B.shadow.mapSize.height=4096,B.shadow.camera.near=.5,B.shadow.camera.far=50,B.shadow.camera.left=-50,B.shadow.camera.right=50,B.shadow.camera.top=50,B.shadow.camera.bottom=-50,e.add(B);const X=new gr(16777215,.8);X.position.set(-8,-8,6),e.add(X);const Z=new gr(16777215,.6);Z.position.set(0,-15,2),e.add(Z);const se=new K0(16777215,4473924,.8);e.add(se);const W=new Pa(16777215,1,50);W.position.set(15,15,15),e.add(W);const he=new Pa(16777215,.5,50);he.position.set(-15,-15,15),e.add(he)},M=()=>{o=requestAnimationFrame(M),i&&i.update();const F=performance.now(),B=F-m;B<d||(m=F-B%d,n&&e&&t&&n.render(e,t),r&&r.render())},b=F=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(X=>{F[X]&&F[X].dispose&&F[X].dispose()}),F.dispose&&F.dispose()},N=F=>{F==null||F.traverse(B=>{B.geometry&&B.geometry.dispose(),B.material&&(Array.isArray(B.material)?B.material.forEach(X=>{b(X)}):b(B.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const F=s.value,B=F.clientWidth,X=F.clientHeight;t.aspect=B/X,t.updateProjectionMatrix(),n.setSize(B,X),r.update()},fitCameraToAllModels:F=>{if(!t||!i||u.value.length===0)return;const B=new Tn;let X=!1;if(u.value.forEach(xe=>{if(xe.userData.boundingBox)B.union(xe.userData.boundingBox),X=!0;else if(xe.userData.modelId&&F.has(xe.userData.modelId)){const De=F.get(xe.userData.modelId);B.union(De.box),X=!0}else B.expandByObject(xe),X=!0}),!X){console.warn("无法计算包围盒");return}const Z=B.getSize(new z),se=B.getCenter(new z),he=Math.max(Z.x,Z.y,Z.z)*.8,Q=new z(se.x+he,se.y-he,se.z+he);t.position.copy(Q),t.lookAt(se),i.target.copy(se),i.update(),h.value.copy(Q),g.value.copy(se),p()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(B=>{e.remove(B),N(B)});const F=[];e.children.forEach(B=>{!B.isLight&&!B.isCamera&&B.type!=="GridHelper"&&B!==l&&F.push(B)}),F.forEach(B=>{e.remove(B),N(B)}),u.value=[],p()},cleanup:()=>{o&&cancelAnimationFrame(o),a&&a.dispose(),l&&(l.geometry.dispose(),l.material.dispose()),n&&n.dispose(),i&&i.dispose(),r&&r.dispose()},updateGridForModels:p}}function x4(s,e){const t=y.ref(!1);let n=null,i=12700,r=new z,o=new z,a=new z,l=0,c=null;const d=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,m=f=>{const p=new z,x=l*1.2,M=new z(a.x+x,a.y,a.z),b=new z(a.x,a.y+x,a.z),N=new z(a.x,a.y-x,a.z);if(f<=.567){const P=f/.567*Math.PI*2;p.x=a.x+Math.cos(P)*x,p.z=a.z+Math.sin(P)*x,p.y=a.y}else if(f<=.724){const L=(f-.567)/.157,P=d(L);p.lerpVectors(M,b,P)}else if(f<=.881){const L=(f-.724)/.157,I=d(L)*Math.PI;p.x=a.x+Math.sin(I)*x,p.y=a.y+Math.cos(I)*x,p.z=a.z}else{const L=(f-.881)/.119,P=d(L);p.lerpVectors(N,r,P)}return p},u=()=>{const{camera:f,controls:p}=s();if(!f||!p)return;n||(n=Date.now());const x=Date.now()-n,M=Math.min(x/i,1);if(M>=1){g();return}const b=m(M);f.position.copy(b),f.lookAt(a),p.target.copy(a),c=requestAnimationFrame(u)},h=()=>{if(e.value.length===0)return;const{camera:f,controls:p}=s();if(!f||!p)return;r.copy(f.position),o.copy(p.target);const x=new Tn;e.value.forEach(A=>{x.expandByObject(A)});const M=x.getSize(new z);a=x.getCenter(new z),l=Math.max(M.x,M.y,M.z)*1.2;const b=new z(a.x+l*1.2,a.y,a.z);p.enabled=!1;const N=f.position.clone(),L=1e3,P=Date.now(),I=()=>{const A=Date.now()-P,E=Math.min(A/L,1),F=d(E);f.position.lerpVectors(N,b,F),f.lookAt(a),p.target.copy(a),E<1?requestAnimationFrame(I):(t.value=!0,n=null,u())};I()},g=()=>{t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{controls:f}=s();f&&(f.enabled=!0,f.target.copy(o))};return{isAnimating:t,toggleAnimation:()=>{if(t.value){t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{camera:f,controls:p}=s();if(!f||!p)return;p.enabled=!0;const x=f.position.clone(),M=p.target.clone(),b=1500,N=Date.now(),L=()=>{const P=Date.now()-N,I=Math.min(P/b,1),A=d(I);f.position.lerpVectors(x,r,A),p.target.lerpVectors(M,o,A),I<1&&requestAnimationFrame(L)};L()}else h()},startAnimation:h,stopAnimation:g}}function M4(s,e){const t=y.ref(!1),n=y.ref("none");let i=[],r=[],o=new Tn,a=new z;const l=()=>{i=[new jn(new z(1,0,0),0),new jn(new z(0,1,0),0),new jn(new z(0,0,1),0)]},c=()=>{o.makeEmpty(),e.value.forEach(_=>{o.expandByObject(_)}),a=o.getCenter(new z)},d=_=>{const f=o.getSize(new z);let p,x,M;_==="x"?(p=new wi(f.z*1.2,f.y*1.2),x=new z(a.x,a.y,a.z),M=new _n(0,Math.PI/2,0)):_==="y"?(p=new wi(f.x*1.2,f.z*1.2),x=new z(a.x,a.y,a.z),M=new _n(Math.PI/2,0,0)):_==="z"&&(p=new wi(f.x*1.2,f.y*1.2),x=new z(a.x,a.y,a.z),M=new _n(0,0,0));const b=new ln({color:8900331,transparent:!0,opacity:.3,side:cn,depthWrite:!1}),N=new Pt(p,b);return N.position.copy(x),N.rotation.copy(M),N},m=()=>{if(u(),h(),n.value==="none")return;c();let _=null;if(n.value==="x"?(i[0].constant=-a.x,_=i[0]):n.value==="y"?(i[1].constant=-a.y,_=i[1]):n.value==="z"&&(i[2].constant=-a.z,_=i[2]),_){e.value.forEach(p=>{p.traverse(x=>{x.isMesh&&x.material&&(Array.isArray(x.material)?x.material.forEach(M=>{M.clippingPlanes=[_]}):x.material.clippingPlanes=[_])})});const{scene:f}=s();if(f){const p=d(n.value);f.add(p),r.push(p)}}},u=()=>{e.value.forEach(_=>{_.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(p=>{p.clippingPlanes=[]}):f.material.clippingPlanes=[])})})},h=()=>{const{scene:_}=s();_&&r.forEach(f=>{_.remove(f),f.geometry.dispose(),f.material.dispose()}),r=[]};return{isClipping:t,activeClippingAxis:n,toggleClipping:()=>{t.value=!t.value,t.value?(l(),e.value.length>0&&c()):(n.value="none",u(),h())},updateClippingPlanes:m,clearClippingPlanes:u,clearClippingMeshes:h}}class Hi extends ni{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new Zs(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}parse(e){function t(c){const d=new DataView(c),m=32/8*3+32/8*3*3+16/8,u=d.getUint32(80,!0);if(80+32/8+u*m===d.byteLength)return!0;const g=[115,111,108,105,100];for(let _=0;_<5;_++)if(n(g,d,_))return!1;return!0}function n(c,d,m){for(let u=0,h=c.length;u<h;u++)if(c[u]!==d.getUint8(m+u))return!1;return!0}function i(c){const d=new DataView(c),m=d.getUint32(80,!0);let u,h,g,_=!1,f,p,x,M,b;for(let F=0;F<70;F++)d.getUint32(F,!1)==1129270351&&d.getUint8(F+4)==82&&d.getUint8(F+5)==61&&(_=!0,f=new Float32Array(m*3*3),p=d.getUint8(F+6)/255,x=d.getUint8(F+7)/255,M=d.getUint8(F+8)/255,b=d.getUint8(F+9)/255);const N=84,L=12*4+2,P=new rn,I=new Float32Array(m*3*3),A=new Float32Array(m*3*3),E=new bt;for(let F=0;F<m;F++){const B=N+F*L,X=d.getFloat32(B,!0),Z=d.getFloat32(B+4,!0),se=d.getFloat32(B+8,!0);if(_){const W=d.getUint16(B+48,!0);(W&32768)===0?(u=(W&31)/31,h=(W>>5&31)/31,g=(W>>10&31)/31):(u=p,h=x,g=M)}for(let W=1;W<=3;W++){const he=B+W*12,Q=F*3*3+(W-1)*3;I[Q]=d.getFloat32(he,!0),I[Q+1]=d.getFloat32(he+4,!0),I[Q+2]=d.getFloat32(he+8,!0),A[Q]=X,A[Q+1]=Z,A[Q+2]=se,_&&(E.setRGB(u,h,g,Vt),f[Q]=E.r,f[Q+1]=E.g,f[Q+2]=E.b)}}return P.setAttribute("position",new hn(I,3)),P.setAttribute("normal",new hn(A,3)),_&&(P.setAttribute("color",new hn(f,3)),P.hasColors=!0,P.alpha=b),P}function r(c){const d=new rn,m=/solid([\s\S]*?)endsolid/g,u=/facet([\s\S]*?)endfacet/g,h=/solid\s(.+)/;let g=0;const _=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,f=new RegExp("vertex"+_+_+_,"g"),p=new RegExp("normal"+_+_+_,"g"),x=[],M=[],b=[],N=new z;let L,P=0,I=0,A=0;for(;(L=m.exec(c))!==null;){I=A;const E=L[0],F=(L=h.exec(E))!==null?L[1]:"";for(b.push(F);(L=u.exec(E))!==null;){let Z=0,se=0;const W=L[0];for(;(L=p.exec(W))!==null;)N.x=parseFloat(L[1]),N.y=parseFloat(L[2]),N.z=parseFloat(L[3]),se++;for(;(L=f.exec(W))!==null;)x.push(parseFloat(L[1]),parseFloat(L[2]),parseFloat(L[3])),M.push(N.x,N.y,N.z),Z++,A++;se!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),Z!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const B=I,X=A-I;d.userData.groupNames=b,d.addGroup(B,X,P),P++}return d.setAttribute("position",new Lt(x,3)),d.setAttribute("normal",new Lt(M,3)),d}function o(c){return typeof c!="string"?new TextDecoder().decode(c):c}function a(c){if(typeof c=="string"){const d=new Uint8Array(c.length);for(let m=0;m<c.length;m++)d[m]=c.charCodeAt(m)&255;return d.buffer||d}else return c}const l=a(e);return t(l)?i(l):r(o(e))}}class r0 extends V1{constructor(e){super(e)}parse(e){function t(W){switch(W.image_type){case u:case _:if(W.colormap_length>256||W.colormap_size!==24||W.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case g:case f:case p:if(W.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case m:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+W.image_type)}if(W.width<=0||W.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(W.pixel_size!==8&&W.pixel_size!==16&&W.pixel_size!==24&&W.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+W.pixel_size)}function n(W,he,Q,xe,De){let Ae,pe;const re=Q.pixel_size>>3,q=Q.width*Q.height*re;if(he&&(pe=De.subarray(xe,xe+=Q.colormap_length*(Q.colormap_size>>3))),W){Ae=new Uint8Array(q);let K,te,ee,fe=0;const Y=new Uint8Array(re);for(;fe<q;)if(K=De[xe++],te=(K&127)+1,K&128){for(ee=0;ee<re;++ee)Y[ee]=De[xe++];for(ee=0;ee<te;++ee)Ae.set(Y,fe+ee*re);fe+=re*te}else{for(te*=re,ee=0;ee<te;++ee)Ae[fe+ee]=De[xe++];fe+=te}}else Ae=De.subarray(xe,xe+=he?Q.width*Q.height:q);return{pixel_data:Ae,palettes:pe}}function i(W,he,Q,xe,De,Ae,pe,re,q){const K=q;let te,ee=0,fe,Y;const me=E.width;for(Y=he;Y!==xe;Y+=Q)for(fe=De;fe!==pe;fe+=Ae,ee++)te=re[ee],W[(fe+me*Y)*4+3]=255,W[(fe+me*Y)*4+2]=K[te*3+0],W[(fe+me*Y)*4+1]=K[te*3+1],W[(fe+me*Y)*4+0]=K[te*3+2];return W}function r(W,he,Q,xe,De,Ae,pe,re){let q,K=0,te,ee;const fe=E.width;for(ee=he;ee!==xe;ee+=Q)for(te=De;te!==pe;te+=Ae,K+=2)q=re[K+0]+(re[K+1]<<8),W[(te+fe*ee)*4+0]=(q&31744)>>7,W[(te+fe*ee)*4+1]=(q&992)>>2,W[(te+fe*ee)*4+2]=(q&31)<<3,W[(te+fe*ee)*4+3]=q&32768?0:255;return W}function o(W,he,Q,xe,De,Ae,pe,re){let q=0,K,te;const ee=E.width;for(te=he;te!==xe;te+=Q)for(K=De;K!==pe;K+=Ae,q+=3)W[(K+ee*te)*4+3]=255,W[(K+ee*te)*4+2]=re[q+0],W[(K+ee*te)*4+1]=re[q+1],W[(K+ee*te)*4+0]=re[q+2];return W}function a(W,he,Q,xe,De,Ae,pe,re){let q=0,K,te;const ee=E.width;for(te=he;te!==xe;te+=Q)for(K=De;K!==pe;K+=Ae,q+=4)W[(K+ee*te)*4+2]=re[q+0],W[(K+ee*te)*4+1]=re[q+1],W[(K+ee*te)*4+0]=re[q+2],W[(K+ee*te)*4+3]=re[q+3];return W}function l(W,he,Q,xe,De,Ae,pe,re){let q,K=0,te,ee;const fe=E.width;for(ee=he;ee!==xe;ee+=Q)for(te=De;te!==pe;te+=Ae,K++)q=re[K],W[(te+fe*ee)*4+0]=q,W[(te+fe*ee)*4+1]=q,W[(te+fe*ee)*4+2]=q,W[(te+fe*ee)*4+3]=255;return W}function c(W,he,Q,xe,De,Ae,pe,re){let q=0,K,te;const ee=E.width;for(te=he;te!==xe;te+=Q)for(K=De;K!==pe;K+=Ae,q+=2)W[(K+ee*te)*4+0]=re[q+0],W[(K+ee*te)*4+1]=re[q+0],W[(K+ee*te)*4+2]=re[q+0],W[(K+ee*te)*4+3]=re[q+1];return W}function d(W,he,Q,xe,De){let Ae,pe,re,q,K,te;switch((E.flags&x)>>M){default:case L:Ae=0,re=1,K=he,pe=0,q=1,te=Q;break;case b:Ae=0,re=1,K=he,pe=Q-1,q=-1,te=-1;break;case P:Ae=he-1,re=-1,K=-1,pe=0,q=1,te=Q;break;case N:Ae=he-1,re=-1,K=-1,pe=Q-1,q=-1,te=-1;break}if(X)switch(E.pixel_size){case 8:l(W,pe,q,te,Ae,re,K,xe);break;case 16:c(W,pe,q,te,Ae,re,K,xe);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(E.pixel_size){case 8:i(W,pe,q,te,Ae,re,K,xe,De);break;case 16:r(W,pe,q,te,Ae,re,K,xe);break;case 24:o(W,pe,q,te,Ae,re,K,xe);break;case 32:a(W,pe,q,te,Ae,re,K,xe);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return W}const m=0,u=1,h=2,g=3,_=9,f=10,p=11,x=48,M=4,b=0,N=1,L=2,P=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let I=0;const A=new Uint8Array(e),E={id_length:A[I++],colormap_type:A[I++],image_type:A[I++],colormap_index:A[I++]|A[I++]<<8,colormap_length:A[I++]|A[I++]<<8,colormap_size:A[I++],origin:[A[I++]|A[I++]<<8,A[I++]|A[I++]<<8],width:A[I++]|A[I++]<<8,height:A[I++]|A[I++]<<8,pixel_size:A[I++],flags:A[I++]};if(t(E),E.id_length+I>e.length)throw new Error("THREE.TGALoader: No data.");I+=E.id_length;let F=!1,B=!1,X=!1;switch(E.image_type){case _:F=!0,B=!0;break;case u:B=!0;break;case f:F=!0;break;case h:break;case p:F=!0,X=!0;break;case g:X=!0;break}const Z=new Uint8Array(E.width*E.height*4),se=n(F,B,E,I,A);return d(Z,E.width,E.height,se.pixel_data,se.palettes),{data:Z,width:E.width,height:E.height,flipY:!0,generateMipmaps:!0,minFilter:Mi}}}class b4 extends ni{load(e,t,n,i){const r=this,o=r.path===""?hc.extractUrlBase(e):r.path,a=new Zs(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(l){try{t(r.parse(l,o))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},n,i)}parse(e,t){function n(S,v){const w=[],D=S.childNodes;for(let U=0,ie=D.length;U<ie;U++){const ye=D[U];ye.nodeName===v&&w.push(ye)}return w}function i(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=v[D];return w}function r(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=parseFloat(v[D]);return w}function o(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=parseInt(v[D]);return w}function a(S){return S.substring(1)}function l(){return"three_default_"+kt++}function c(S){return Object.keys(S).length===0}function d(S){return{unit:m(n(S,"unit")[0]),upAxis:u(n(S,"up_axis")[0])}}function m(S){return S!==void 0&&S.hasAttribute("meter")===!0?parseFloat(S.getAttribute("meter")):1}function u(S){return S!==void 0?S.textContent:"Y_UP"}function h(S,v,w,D){const U=n(S,v)[0];if(U!==void 0){const ie=n(U,w);for(let ye=0;ye<ie.length;ye++)D(ie[ye])}}function g(S,v){for(const w in S){const D=S[w];D.build=v(S[w])}}function _(S,v){return S.build!==void 0||(S.build=v(S)),S.build}function f(S){const v={sources:{},samplers:{},channels:{}};let w=!1;for(let D=0,U=S.childNodes.length;D<U;D++){const ie=S.childNodes[D];if(ie.nodeType!==1)continue;let ye;switch(ie.nodeName){case"source":ye=ie.getAttribute("id"),v.sources[ye]=Ne(ie);break;case"sampler":ye=ie.getAttribute("id"),v.samplers[ye]=p(ie);break;case"channel":ye=ie.getAttribute("target"),v.channels[ye]=x(ie);break;case"animation":f(ie),w=!0;break;default:console.log(ie)}}w===!1&&(pt.animations[S.getAttribute("id")||xi.generateUUID()]=v)}function p(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=a(U.getAttribute("source")),ye=U.getAttribute("semantic");v.inputs[ye]=ie;break}}return v}function x(S){const v={};let D=S.getAttribute("target").split("/");const U=D.shift();let ie=D.shift();const ye=ie.indexOf("(")!==-1,Qe=ie.indexOf(".")!==-1;if(Qe)D=ie.split("."),ie=D.shift(),v.member=D.shift();else if(ye){const qe=ie.split("(");ie=qe.shift();for(let nt=0;nt<qe.length;nt++)qe[nt]=parseInt(qe[nt].replace(/\)/,""));v.indices=qe}return v.id=U,v.sid=ie,v.arraySyntax=ye,v.memberSyntax=Qe,v.sampler=a(S.getAttribute("source")),v}function M(S){const v=[],w=S.channels,D=S.samplers,U=S.sources;for(const ie in w)if(w.hasOwnProperty(ie)){const ye=w[ie],Qe=D[ye.sampler],qe=Qe.inputs.INPUT,nt=Qe.inputs.OUTPUT,gt=U[qe],Ue=U[nt],mt=N(ye,gt,Ue);E(mt,v)}return v}function b(S){return _(pt.animations[S],M)}function N(S,v,w){const D=pt.nodes[S.id],U=Ge(D.id),ie=D.transforms[S.sid],ye=D.matrix.clone().transpose();let Qe,qe,nt,gt,Ue,mt;const ut={};switch(ie){case"matrix":for(nt=0,gt=v.array.length;nt<gt;nt++)if(Qe=v.array[nt],qe=nt*w.stride,ut[Qe]===void 0&&(ut[Qe]={}),S.arraySyntax===!0){const Jt=w.array[qe],Zt=S.indices[0]+4*S.indices[1];ut[Qe][Zt]=Jt}else for(Ue=0,mt=w.stride;Ue<mt;Ue++)ut[Qe][Ue]=w.array[qe+Ue];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break}const xt=L(ut,ye);return{name:U.uuid,keyframes:xt}}function L(S,v){const w=[];for(const U in S)w.push({time:parseFloat(U),value:S[U]});w.sort(D);for(let U=0;U<16;U++)F(w,U,v.elements[U]);return w;function D(U,ie){return U.time-ie.time}}const P=new z,I=new z,A=new Un;function E(S,v){const w=S.keyframes,D=S.name,U=[],ie=[],ye=[],Qe=[];for(let qe=0,nt=w.length;qe<nt;qe++){const gt=w[qe],Ue=gt.time,mt=gt.value;C.fromArray(mt).transpose(),C.decompose(P,A,I),U.push(Ue),ie.push(P.x,P.y,P.z),ye.push(A.x,A.y,A.z,A.w),Qe.push(I.x,I.y,I.z)}return ie.length>0&&v.push(new $s(D+".position",U,ie)),ye.length>0&&v.push(new Er(D+".quaternion",U,ye)),Qe.length>0&&v.push(new $s(D+".scale",U,Qe)),v}function F(S,v,w){let D,U=!0,ie,ye;for(ie=0,ye=S.length;ie<ye;ie++)D=S[ie],D.value[v]===void 0?D.value[v]=null:U=!1;if(U===!0)for(ie=0,ye=S.length;ie<ye;ie++)D=S[ie],D.value[v]=w;else B(S,v)}function B(S,v){let w,D;for(let U=0,ie=S.length;U<ie;U++){const ye=S[U];if(ye.value[v]===null){if(w=X(S,U,v),D=Z(S,U,v),w===null){ye.value[v]=D.value[v];continue}if(D===null){ye.value[v]=w.value[v];continue}se(ye,w,D,v)}}}function X(S,v,w){for(;v>=0;){const D=S[v];if(D.value[w]!==null)return D;v--}return null}function Z(S,v,w){for(;v<S.length;){const D=S[v];if(D.value[w]!==null)return D;v++}return null}function se(S,v,w,D){if(w.time-v.time===0){S.value[D]=v.value[D];return}S.value[D]=(S.time-v.time)*(w.value[D]-v.value[D])/(w.time-v.time)+v.value[D]}function W(S){const v={name:S.getAttribute("id")||"default",start:parseFloat(S.getAttribute("start")||0),end:parseFloat(S.getAttribute("end")||0),animations:[]};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"instance_animation":v.animations.push(a(U.getAttribute("url")));break}}pt.clips[S.getAttribute("id")]=v}function he(S){const v=[],w=S.name,D=S.end-S.start||-1,U=S.animations;for(let ie=0,ye=U.length;ie<ye;ie++){const Qe=b(U[ie]);for(let qe=0,nt=Qe.length;qe<nt;qe++)v.push(Qe[qe])}return new hh(w,D,v)}function Q(S){return _(pt.clips[S],he)}function xe(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"skin":v.id=a(U.getAttribute("source")),v.skin=De(U);break;case"morph":v.id=a(U.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}pt.controllers[S.getAttribute("id")]=v}function De(S){const v={sources:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"bind_shape_matrix":v.bindShapeMatrix=r(U.textContent);break;case"source":const ie=U.getAttribute("id");v.sources[ie]=Ne(U);break;case"joints":v.joints=Ae(U);break;case"vertex_weights":v.vertexWeights=pe(U);break}}return v}function Ae(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=U.getAttribute("semantic"),ye=a(U.getAttribute("source"));v.inputs[ie]=ye;break}}return v}function pe(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=U.getAttribute("semantic"),ye=a(U.getAttribute("source")),Qe=parseInt(U.getAttribute("offset"));v.inputs[ie]={id:ye,offset:Qe};break;case"vcount":v.vcount=o(U.textContent);break;case"v":v.v=o(U.textContent);break}}return v}function re(S){const v={id:S.id},w=pt.geometries[v.id];return S.skin!==void 0&&(v.skin=q(S.skin),w.sources.skinIndices=v.skin.indices,w.sources.skinWeights=v.skin.weights),v}function q(S){const w={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},D=S.sources,U=S.vertexWeights,ie=U.vcount,ye=U.v,Qe=U.inputs.JOINT.offset,qe=U.inputs.WEIGHT.offset,nt=S.sources[S.joints.inputs.JOINT],gt=S.sources[S.joints.inputs.INV_BIND_MATRIX],Ue=D[U.inputs.WEIGHT.id].array;let mt=0,ut,xt,ct;for(ut=0,ct=ie.length;ut<ct;ut++){const Zt=ie[ut],Gt=[];for(xt=0;xt<Zt;xt++){const Wt=ye[mt+Qe],di=ye[mt+qe],Ln=Ue[di];Gt.push({index:Wt,weight:Ln}),mt+=2}for(Gt.sort(Jt),xt=0;xt<4;xt++){const Wt=Gt[xt];Wt!==void 0?(w.indices.array.push(Wt.index),w.weights.array.push(Wt.weight)):(w.indices.array.push(0),w.weights.array.push(0))}}for(S.bindShapeMatrix?w.bindMatrix=new Mt().fromArray(S.bindShapeMatrix).transpose():w.bindMatrix=new Mt().identity(),ut=0,ct=nt.array.length;ut<ct;ut++){const Zt=nt.array[ut],Gt=new Mt().fromArray(gt.array,ut*gt.stride).transpose();w.joints.push({name:Zt,boneInverse:Gt})}return w;function Jt(Zt,Gt){return Gt.weight-Zt.weight}}function K(S){return _(pt.controllers[S],re)}function te(S){const v={init_from:n(S,"init_from")[0].textContent};pt.images[S.getAttribute("id")]=v}function ee(S){return S.build!==void 0?S.build:S.init_from}function fe(S){const v=pt.images[S];return v!==void 0?_(v,ee):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",S),null)}function Y(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"profile_COMMON":v.profile=me(U);break}}pt.effects[S.getAttribute("id")]=v}function me(S){const v={surfaces:{},samplers:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"newparam":Te(U,v);break;case"technique":v.technique=O(U);break;case"extra":v.extra=Le(U);break}}return v}function Te(S,v){const w=S.getAttribute("sid");for(let D=0,U=S.childNodes.length;D<U;D++){const ie=S.childNodes[D];if(ie.nodeType===1)switch(ie.nodeName){case"surface":v.surfaces[w]=et(ie);break;case"sampler2D":v.samplers[w]=We(ie);break}}}function et(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"init_from":v.init_from=U.textContent;break}}return v}function We(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"source":v.source=U.textContent;break}}return v}function O(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"constant":case"lambert":case"blinn":case"phong":v.type=U.nodeName,v.parameters=dt(U);break;case"extra":v.extra=Le(U);break}}return v}function dt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":v[U.nodeName]=st(U);break;case"transparent":v[U.nodeName]={opaque:U.hasAttribute("opaque")?U.getAttribute("opaque"):"A_ONE",data:st(U)};break}}return v}function st(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"color":v[U.nodeName]=r(U.textContent);break;case"float":v[U.nodeName]=parseFloat(U.textContent);break;case"texture":v[U.nodeName]={id:U.getAttribute("texture"),extra:it(U)};break}}return v}function it(S){const v={technique:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"extra":Ie(U,v);break}}return v}function Ie(S,v){for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique":Ze(U,v);break}}}function Ze(S,v){for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":v.technique[U.nodeName]=parseFloat(U.textContent);break;case"wrapU":case"wrapV":U.textContent.toUpperCase()==="TRUE"?v.technique[U.nodeName]=1:U.textContent.toUpperCase()==="FALSE"?v.technique[U.nodeName]=0:v.technique[U.nodeName]=parseInt(U.textContent);break;case"bump":v[U.nodeName]=Xt(U);break}}}function Le(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique":v.technique=rt(U);break}}return v}function rt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"double_sided":v[U.nodeName]=parseInt(U.textContent);break;case"bump":v[U.nodeName]=Xt(U);break}}return v}function Xt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"texture":v[U.nodeName]={id:U.getAttribute("texture"),texcoord:U.getAttribute("texcoord"),extra:it(U)};break}}return v}function k(S){return S}function R(S){return _(pt.effects[S],k)}function oe(S){const v={name:S.getAttribute("name")};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"instance_effect":v.url=a(U.getAttribute("url"));break}}pt.materials[S.getAttribute("id")]=v}function we(S){let v,w=S.slice((S.lastIndexOf(".")-1>>>0)+2);switch(w=w.toLowerCase(),w){case"tga":v=Ht;break;default:v=$t}return v}function Pe(S){const v=R(S.url),w=v.profile.technique;let D;switch(w.type){case"phong":case"blinn":D=new ln;break;case"lambert":D=new C1;break;default:D=new Gi;break}D.name=S.name||"";function U(qe,nt=null){const gt=v.profile.samplers[qe.id];let Ue=null;if(gt!==void 0){const mt=v.profile.surfaces[gt.source];Ue=fe(mt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),Ue=fe(qe.id);if(Ue!==null){const mt=we(Ue);if(mt!==void 0){const ut=mt.load(Ue),xt=qe.extra;if(xt!==void 0&&xt.technique!==void 0&&c(xt.technique)===!1){const ct=xt.technique;ut.wrapS=ct.wrapU?oi:ei,ut.wrapT=ct.wrapV?oi:ei,ut.offset.set(ct.offsetU||0,ct.offsetV||0),ut.repeat.set(ct.repeatU||1,ct.repeatV||1)}else ut.wrapS=oi,ut.wrapT=oi;return nt!==null&&(ut.colorSpace=nt),ut}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",Ue),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",qe.id),null}const ie=w.parameters;for(const qe in ie){const nt=ie[qe];switch(qe){case"diffuse":nt.color&&D.color.fromArray(nt.color),nt.texture&&(D.map=U(nt.texture,Vt));break;case"specular":nt.color&&D.specular&&D.specular.fromArray(nt.color),nt.texture&&(D.specularMap=U(nt.texture));break;case"bump":nt.texture&&(D.normalMap=U(nt.texture));break;case"ambient":nt.texture&&(D.lightMap=U(nt.texture,Vt));break;case"shininess":nt.float&&D.shininess&&(D.shininess=nt.float);break;case"emission":nt.color&&D.emissive&&D.emissive.fromArray(nt.color),nt.texture&&(D.emissiveMap=U(nt.texture,Vt));break}}Bt.colorSpaceToWorking(D.color,Vt),D.specular&&Bt.colorSpaceToWorking(D.specular,Vt),D.emissive&&Bt.colorSpaceToWorking(D.emissive,Vt);let ye=ie.transparent,Qe=ie.transparency;if(Qe===void 0&&ye&&(Qe={float:1}),ye===void 0&&Qe&&(ye={opaque:"A_ONE",data:{color:[1,1,1,1]}}),ye&&Qe)if(ye.data.texture)D.transparent=!0;else{const qe=ye.data.color;switch(ye.opaque){case"A_ONE":D.opacity=qe[3]*Qe.float;break;case"RGB_ZERO":D.opacity=1-qe[0]*Qe.float;break;case"A_ZERO":D.opacity=1-qe[3]*Qe.float;break;case"RGB_ONE":D.opacity=qe[0]*Qe.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',ye.opaque)}D.opacity<1&&(D.transparent=!0)}if(w.extra!==void 0&&w.extra.technique!==void 0){const qe=w.extra.technique;for(const nt in qe){const gt=qe[nt];switch(nt){case"double_sided":D.side=gt===1?cn:Yn;break;case"bump":D.normalMap=U(gt.texture),D.normalScale=new Je(1,1);break}}}return D}function be(S){return _(pt.materials[S],Pe)}function _t(S){const v={name:S.getAttribute("name")};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"optics":v.optics=Ke(U);break}}pt.cameras[S.getAttribute("id")]=v}function Ke(S){for(let v=0;v<S.childNodes.length;v++){const w=S.childNodes[v];switch(w.nodeName){case"technique_common":return ft(w)}}return{}}function ft(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"perspective":case"orthographic":v.technique=D.nodeName,v.parameters=vt(D);break}}return v}function vt(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":v[D.nodeName]=parseFloat(D.textContent);break}}return v}function Fe(S){let v;switch(S.optics.technique){case"perspective":v=new gn(S.optics.parameters.yfov,S.optics.parameters.aspect_ratio,S.optics.parameters.znear,S.optics.parameters.zfar);break;case"orthographic":let w=S.optics.parameters.ymag,D=S.optics.parameters.xmag;const U=S.optics.parameters.aspect_ratio;D=D===void 0?w*U:D,w=w===void 0?D/U:w,D*=.5,w*=.5,v=new Ha(-D,D,w,-w,S.optics.parameters.znear,S.optics.parameters.zfar);break;default:v=new gn;break}return v.name=S.name||"",v}function at(S){const v=pt.cameras[S];return v!==void 0?_(v,Fe):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",S),null)}function Et(S){let v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique_common":v=St(U);break}}pt.lights[S.getAttribute("id")]=v}function St(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"directional":case"point":case"spot":case"ambient":v.technique=U.nodeName,v.parameters=$e(U)}}return v}function $e(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"color":const ie=r(U.textContent);v.color=new bt().fromArray(ie),Bt.colorSpaceToWorking(v.color,Vt);break;case"falloff_angle":v.falloffAngle=parseFloat(U.textContent);break;case"quadratic_attenuation":const ye=parseFloat(U.textContent);v.distance=ye?Math.sqrt(1/ye):0;break}}return v}function At(S){let v;switch(S.technique){case"directional":v=new gr;break;case"point":v=new Pa;break;case"spot":v=new G1;break;case"ambient":v=new cc;break}return S.parameters.color&&v.color.copy(S.parameters.color),S.parameters.distance&&(v.distance=S.parameters.distance),v}function J(S){const v=pt.lights[S];return v!==void 0?_(v,At):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",S),null)}function tt(S){const v={name:S.getAttribute("name"),sources:{},vertices:{},primitives:[]},w=n(S,"mesh")[0];if(w!==void 0){for(let D=0;D<w.childNodes.length;D++){const U=w.childNodes[D];if(U.nodeType!==1)continue;const ie=U.getAttribute("id");switch(U.nodeName){case"source":v.sources[ie]=Ne(U);break;case"vertices":v.vertices=lt(U);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",U.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":v.primitives.push(ke(U));break;default:console.log(U)}}pt.geometries[S.getAttribute("id")]=v}}function Ne(S){const v={array:[],stride:3};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"float_array":v.array=r(D.textContent);break;case"Name_array":v.array=i(D.textContent);break;case"technique_common":const U=n(D,"accessor")[0];U!==void 0&&(v.stride=parseInt(U.getAttribute("stride")));break}}return v}function lt(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];D.nodeType===1&&(v[D.getAttribute("semantic")]=a(D.getAttribute("source")))}return v}function ke(S){const v={type:S.nodeName,material:S.getAttribute("material"),count:parseInt(S.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=a(U.getAttribute("source")),ye=U.getAttribute("semantic"),Qe=parseInt(U.getAttribute("offset")),qe=parseInt(U.getAttribute("set")),nt=qe>0?ye+qe:ye;v.inputs[nt]={id:ie,offset:Qe},v.stride=Math.max(v.stride,Qe+1),ye==="TEXCOORD"&&(v.hasUV=!0);break;case"vcount":v.vcount=o(U.textContent);break;case"p":v.p=o(U.textContent);break}}return v}function Re(S){const v={};for(let w=0;w<S.length;w++){const D=S[w];v[D.type]===void 0&&(v[D.type]=[]),v[D.type].push(D)}return v}function ot(S){let v=0;for(let w=0,D=S.length;w<D;w++)S[w].hasUV===!0&&v++;v>0&&v<S.length&&(S.uvsNeedsFix=!0)}function Tt(S){const v={},w=S.sources,D=S.vertices,U=S.primitives;if(U.length===0)return{};const ie=Re(U);for(const ye in ie){const Qe=ie[ye];ot(Qe),v[ye]=qt(Qe,w,D)}return v}function qt(S,v,w){const D={},U={array:[],stride:0},ie={array:[],stride:0},ye={array:[],stride:0},Qe={array:[],stride:0},qe={array:[],stride:0},nt={array:[],stride:4},gt={array:[],stride:4},Ue=new rn,mt=[];let ut=0;for(let xt=0;xt<S.length;xt++){const ct=S[xt],Jt=ct.inputs;let Zt=0;switch(ct.type){case"lines":case"linestrips":Zt=ct.count*2;break;case"triangles":Zt=ct.count*3;break;case"polylist":for(let Gt=0;Gt<ct.count;Gt++){const Wt=ct.vcount[Gt];switch(Wt){case 3:Zt+=3;break;case 4:Zt+=6;break;default:Zt+=(Wt-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",ct.type)}Ue.addGroup(ut,Zt,xt),ut+=Zt,ct.material&&mt.push(ct.material);for(const Gt in Jt){const Wt=Jt[Gt];switch(Gt){case"VERTEX":for(const di in w){const Ln=w[di];switch(di){case"POSITION":const ps=U.array.length;if(Rt(ct,v[Ln],Wt.offset,U.array),U.stride=v[Ln].stride,v.skinWeights&&v.skinIndices&&(Rt(ct,v.skinIndices,Wt.offset,nt.array),Rt(ct,v.skinWeights,Wt.offset,gt.array)),ct.hasUV===!1&&S.uvsNeedsFix===!0){const Au=(U.array.length-ps)/U.stride;for(let _c=0;_c<Au;_c++)ye.array.push(0,0)}break;case"NORMAL":Rt(ct,v[Ln],Wt.offset,ie.array),ie.stride=v[Ln].stride;break;case"COLOR":Rt(ct,v[Ln],Wt.offset,qe.array),qe.stride=v[Ln].stride;break;case"TEXCOORD":Rt(ct,v[Ln],Wt.offset,ye.array),ye.stride=v[Ln].stride;break;case"TEXCOORD1":Rt(ct,v[Ln],Wt.offset,Qe.array),ye.stride=v[Ln].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',di)}}break;case"NORMAL":Rt(ct,v[Wt.id],Wt.offset,ie.array),ie.stride=v[Wt.id].stride;break;case"COLOR":Rt(ct,v[Wt.id],Wt.offset,qe.array,!0),qe.stride=v[Wt.id].stride;break;case"TEXCOORD":Rt(ct,v[Wt.id],Wt.offset,ye.array),ye.stride=v[Wt.id].stride;break;case"TEXCOORD1":Rt(ct,v[Wt.id],Wt.offset,Qe.array),Qe.stride=v[Wt.id].stride;break}}}return U.array.length>0&&Ue.setAttribute("position",new Lt(U.array,U.stride)),ie.array.length>0&&Ue.setAttribute("normal",new Lt(ie.array,ie.stride)),qe.array.length>0&&Ue.setAttribute("color",new Lt(qe.array,qe.stride)),ye.array.length>0&&Ue.setAttribute("uv",new Lt(ye.array,ye.stride)),Qe.array.length>0&&Ue.setAttribute("uv1",new Lt(Qe.array,Qe.stride)),nt.array.length>0&&Ue.setAttribute("skinIndex",new Lt(nt.array,nt.stride)),gt.array.length>0&&Ue.setAttribute("skinWeight",new Lt(gt.array,gt.stride)),D.data=Ue,D.type=S[0].type,D.materialKeys=mt,D}function Rt(S,v,w,D,U=!1){const ie=S.p,ye=S.stride,Qe=S.vcount;function qe(Ue){let mt=ie[Ue+w]*gt;const ut=mt+gt;for(;mt<ut;mt++)D.push(nt[mt]);if(U){const xt=D.length-gt-1;Yt.setRGB(D[xt+0],D[xt+1],D[xt+2],Vt),D[xt+0]=Yt.r,D[xt+1]=Yt.g,D[xt+2]=Yt.b}}const nt=v.array,gt=v.stride;if(S.vcount!==void 0){let Ue=0;for(let mt=0,ut=Qe.length;mt<ut;mt++){const xt=Qe[mt];if(xt===4){const ct=Ue+ye*0,Jt=Ue+ye*1,Zt=Ue+ye*2,Gt=Ue+ye*3;qe(ct),qe(Jt),qe(Gt),qe(Jt),qe(Zt),qe(Gt)}else if(xt===3){const ct=Ue+ye*0,Jt=Ue+ye*1,Zt=Ue+ye*2;qe(ct),qe(Jt),qe(Zt)}else if(xt>4)for(let ct=1,Jt=xt-2;ct<=Jt;ct++){const Zt=Ue+ye*0,Gt=Ue+ye*ct,Wt=Ue+ye*(ct+1);qe(Zt),qe(Gt),qe(Wt)}Ue+=ye*xt}}else for(let Ue=0,mt=ie.length;Ue<mt;Ue+=ye)qe(Ue)}function bn(S){return _(pt.geometries[S],Tt)}function In(S){const v={name:S.getAttribute("name")||"",joints:{},links:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"technique_common":zn(D,v);break}}pt.kinematicsModels[S.getAttribute("id")]=v}function us(S){return S.build!==void 0?S.build:S}function ds(S){return _(pt.kinematicsModels[S],us)}function zn(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"joint":v.joints[D.getAttribute("sid")]=Xi(D);break;case"link":v.links.push(ji(D));break}}}function Xi(S){let v;for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"prismatic":case"revolute":v=fs(D);break}}return v}function fs(S){const v={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",axis:new z,limits:{min:0,max:0},type:S.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=r(D.textContent);v.axis.fromArray(U);break;case"limits":const ie=D.getElementsByTagName("max")[0],ye=D.getElementsByTagName("min")[0];v.limits.max=parseFloat(ie.textContent),v.limits.min=parseFloat(ye.textContent);break}}return v.limits.min>=v.limits.max&&(v.static=!0),v.middlePosition=(v.limits.min+v.limits.max)/2,v}function ji(S){const v={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",attachments:[],transforms:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"attachment_full":v.attachments.push(ui(D));break;case"matrix":case"translate":case"rotate":v.transforms.push(qi(D));break}}return v}function ui(S){const v={joint:S.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"link":v.links.push(ji(D));break;case"matrix":case"translate":case"rotate":v.transforms.push(qi(D));break}}return v}function qi(S){const v={type:S.nodeName},w=r(S.textContent);switch(v.type){case"matrix":v.obj=new Mt,v.obj.fromArray(w).transpose();break;case"translate":v.obj=new z,v.obj.fromArray(w);break;case"rotate":v.obj=new z,v.obj.fromArray(w),v.angle=xi.degToRad(w[3]);break}return v}function $(S){const v={name:S.getAttribute("name")||"",rigidBodies:{}};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"rigid_body":v.rigidBodies[D.getAttribute("name")]={},H(D,v.rigidBodies[D.getAttribute("name")]);break}}pt.physicsModels[S.getAttribute("id")]=v}function H(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"technique_common":ae(D,v);break}}}function ae(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"inertia":v.inertia=r(D.textContent);break;case"mass":v.mass=r(D.textContent)[0];break}}}function ue(S){const v={bindJointAxis:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"bind_joint_axis":v.bindJointAxis.push(ve(D));break}}pt.kinematicsScenes[a(S.getAttribute("url"))]=v}function ve(S){const v={target:S.getAttribute("target").split("/").pop()};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=D.getElementsByTagName("param")[0];v.axis=U.textContent;const ie=v.axis.split("inst_").pop().split("axis")[0];v.jointIndex=ie.substring(0,ie.length-1);break}}return v}function ge(S){return S.build!==void 0?S.build:S}function ze(S){return _(pt.kinematicsScenes[S],ge)}function Se(){const S=Object.keys(pt.kinematicsModels)[0],v=Object.keys(pt.kinematicsScenes)[0],w=Object.keys(pt.visualScenes)[0];if(S===void 0||v===void 0)return;const D=ds(S),U=ze(v),ie=je(w),ye=U.bindJointAxis,Qe={};for(let gt=0,Ue=ye.length;gt<Ue;gt++){const mt=ye[gt],ut=wt.querySelector('[sid="'+mt.target+'"]');if(ut){const xt=ut.parentElement;qe(mt.jointIndex,xt)}}function qe(gt,Ue){const mt=Ue.getAttribute("name"),ut=D.joints[gt];ie.traverse(function(xt){xt.name===mt&&(Qe[gt]={object:xt,transforms:Ce(Ue),joint:ut,position:ut.zeroPosition})})}const nt=new Mt;Kt={joints:D&&D.joints,getJointValue:function(gt){const Ue=Qe[gt];if(Ue)return Ue.position;console.warn("THREE.ColladaLoader: Joint "+gt+" doesn't exist.")},setJointValue:function(gt,Ue){const mt=Qe[gt];if(mt){const ut=mt.joint;if(Ue>ut.limits.max||Ue<ut.limits.min)console.warn("THREE.ColladaLoader: Joint "+gt+" value "+Ue+" outside of limits (min: "+ut.limits.min+", max: "+ut.limits.max+").");else if(ut.static)console.warn("THREE.ColladaLoader: Joint "+gt+" is static.");else{const xt=mt.object,ct=ut.axis,Jt=mt.transforms;C.identity();for(let Zt=0;Zt<Jt.length;Zt++){const Gt=Jt[Zt];if(Gt.sid&&Gt.sid.indexOf(gt)!==-1)switch(ut.type){case"revolute":C.multiply(nt.makeRotationAxis(ct,xi.degToRad(Ue)));break;case"prismatic":C.multiply(nt.makeTranslation(ct.x*Ue,ct.y*Ue,ct.z*Ue));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+ut.type);break}else switch(Gt.type){case"matrix":C.multiply(Gt.obj);break;case"translate":C.multiply(nt.makeTranslation(Gt.obj.x,Gt.obj.y,Gt.obj.z));break;case"scale":C.scale(Gt.obj);break;case"rotate":C.multiply(nt.makeRotationAxis(Gt.obj,Gt.angle));break}}xt.matrix.copy(C),xt.matrix.decompose(xt.position,xt.quaternion,xt.scale),Qe[gt].position=Ue}}else console.log("THREE.ColladaLoader: "+gt+" does not exist.")}}}function Ce(S){const v=[],w=wt.querySelector('[id="'+S.id+'"]');for(let D=0;D<w.childNodes.length;D++){const U=w.childNodes[D];if(U.nodeType!==1)continue;let ie,ye;switch(U.nodeName){case"matrix":ie=r(U.textContent);const Qe=new Mt().fromArray(ie).transpose();v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:Qe});break;case"translate":case"scale":ie=r(U.textContent),ye=new z().fromArray(ie),v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:ye});break;case"rotate":ie=r(U.textContent),ye=new z().fromArray(ie);const qe=xi.degToRad(ie[3]);v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:ye,angle:qe});break}}return v}function T(S){const v=S.getElementsByTagName("node");for(let w=0;w<v.length;w++){const D=v[w];D.hasAttribute("id")===!1&&D.setAttribute("id",l())}}const C=new Mt,V=new z;function j(S){const v={name:S.getAttribute("name")||"",type:S.getAttribute("type"),id:S.getAttribute("id"),sid:S.getAttribute("sid"),matrix:new Mt,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType!==1)continue;let U;switch(D.nodeName){case"node":v.nodes.push(D.getAttribute("id")),j(D);break;case"instance_camera":v.instanceCameras.push(a(D.getAttribute("url")));break;case"instance_controller":v.instanceControllers.push(G(D));break;case"instance_light":v.instanceLights.push(a(D.getAttribute("url")));break;case"instance_geometry":v.instanceGeometries.push(G(D));break;case"instance_node":v.instanceNodes.push(a(D.getAttribute("url")));break;case"matrix":U=r(D.textContent),v.matrix.multiply(C.fromArray(U).transpose()),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"translate":U=r(D.textContent),V.fromArray(U),v.matrix.multiply(C.makeTranslation(V.x,V.y,V.z)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"rotate":U=r(D.textContent);const ie=xi.degToRad(U[3]);v.matrix.multiply(C.makeRotationAxis(V.fromArray(U),ie)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"scale":U=r(D.textContent),v.matrix.scale(V.fromArray(U)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"extra":break;default:console.log(D)}}return de(v.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",v.id):pt.nodes[v.id]=v,v}function G(S){const v={id:a(S.getAttribute("url")),materials:{},skeletons:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"bind_material":const U=D.getElementsByTagName("instance_material");for(let ie=0;ie<U.length;ie++){const ye=U[ie],Qe=ye.getAttribute("symbol"),qe=ye.getAttribute("target");v.materials[Qe]=a(qe)}break;case"skeleton":v.skeletons.push(a(D.textContent));break}}return v}function le(S,v){const w=[],D=[];let U,ie,ye;for(U=0;U<S.length;U++){const nt=S[U];let gt;if(de(nt))gt=Ge(nt),Me(gt,v,w);else if(He(nt)){const mt=pt.visualScenes[nt].children;for(let ut=0;ut<mt.length;ut++){const xt=mt[ut];if(xt.type==="JOINT"){const ct=Ge(xt.id);Me(ct,v,w)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",nt)}for(U=0;U<v.length;U++)for(ie=0;ie<w.length;ie++)if(ye=w[ie],ye.bone.name===v[U].name){D[U]=ye,ye.processed=!0;break}for(U=0;U<w.length;U++)ye=w[U],ye.processed===!1&&(D.push(ye),ye.processed=!0);const Qe=[],qe=[];for(U=0;U<D.length;U++)ye=D[U],Qe.push(ye.bone),qe.push(ye.boneInverse);return new tc(Qe,qe)}function Me(S,v,w){S.traverse(function(D){if(D.isBone===!0){let U;for(let ie=0;ie<v.length;ie++){const ye=v[ie];if(ye.name===D.name){U=ye.boneInverse;break}}U===void 0&&(U=new Mt),w.push({bone:D,boneInverse:U,processed:!1})}})}function _e(S){const v=[],w=S.matrix,D=S.nodes,U=S.type,ie=S.instanceCameras,ye=S.instanceControllers,Qe=S.instanceLights,qe=S.instanceGeometries,nt=S.instanceNodes;for(let Ue=0,mt=D.length;Ue<mt;Ue++)v.push(Ge(D[Ue]));for(let Ue=0,mt=ie.length;Ue<mt;Ue++){const ut=at(ie[Ue]);ut!==null&&v.push(ut.clone())}for(let Ue=0,mt=ye.length;Ue<mt;Ue++){const ut=ye[Ue],xt=K(ut.id),ct=bn(xt.id),Jt=Oe(ct,ut.materials),Zt=ut.skeletons,Gt=xt.skin.joints,Wt=le(Zt,Gt);for(let di=0,Ln=Jt.length;di<Ln;di++){const ps=Jt[di];ps.isSkinnedMesh&&(ps.bind(Wt,xt.skin.bindMatrix),ps.normalizeSkinWeights()),v.push(ps)}}for(let Ue=0,mt=Qe.length;Ue<mt;Ue++){const ut=J(Qe[Ue]);ut!==null&&v.push(ut.clone())}for(let Ue=0,mt=qe.length;Ue<mt;Ue++){const ut=qe[Ue],xt=bn(ut.id),ct=Oe(xt,ut.materials);for(let Jt=0,Zt=ct.length;Jt<Zt;Jt++)v.push(ct[Jt])}for(let Ue=0,mt=nt.length;Ue<mt;Ue++)v.push(Ge(nt[Ue]).clone());let gt;if(D.length===0&&v.length===1)gt=v[0];else{gt=U==="JOINT"?new k0:new An;for(let Ue=0;Ue<v.length;Ue++)gt.add(v[Ue])}return gt.name=U==="JOINT"?S.sid:S.name,gt.matrix.copy(w),gt.matrix.decompose(gt.position,gt.quaternion,gt.scale),gt}const ce=new Gi({name:ni.DEFAULT_MATERIAL_NAME,color:16711935});function ne(S,v){const w=[];for(let D=0,U=S.length;D<U;D++){const ie=v[S[D]];ie===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",S[D]),w.push(ce)):w.push(be(ie))}return w}function Oe(S,v){const w=[];for(const D in S){const U=S[D],ie=ne(U.materialKeys,v);if(ie.length===0&&(D==="lines"||D==="linestrips"?ie.push(new Ai):ie.push(new ln)),D==="lines"||D==="linestrips")for(let nt=0,gt=ie.length;nt<gt;nt++){const Ue=ie[nt];if(Ue.isMeshPhongMaterial===!0||Ue.isMeshLambertMaterial===!0){const mt=new Ai;mt.color.copy(Ue.color),mt.opacity=Ue.opacity,mt.transparent=Ue.transparent,ie[nt]=mt}}const ye=U.data.attributes.skinIndex!==void 0,Qe=ie.length===1?ie[0]:ie;let qe;switch(D){case"lines":qe=new Ra(U.data,Qe);break;case"linestrips":qe=new Ba(U.data,Qe);break;case"triangles":case"polylist":ye?qe=new o1(U.data,Qe):qe=new Pt(U.data,Qe);break}w.push(qe)}return w}function de(S){return pt.nodes[S]!==void 0}function Ge(S){return _(pt.nodes[S],_e)}function Ee(S){const v={name:S.getAttribute("name"),children:[]};T(S);const w=n(S,"node");for(let D=0;D<w.length;D++)v.children.push(j(w[D]));pt.visualScenes[S.getAttribute("id")]=v}function ht(S){const v=new An;v.name=S.name;const w=S.children;for(let D=0;D<w.length;D++){const U=w[D];v.add(Ge(U.id))}return v}function He(S){return pt.visualScenes[S]!==void 0}function je(S){return _(pt.visualScenes[S],ht)}function Xe(S){const v=n(S,"instance_visual_scene")[0];return je(a(v.getAttribute("url")))}function Dt(){const S=pt.clips;if(c(S)===!0){if(c(pt.animations)===!1){const v=[];for(const w in pt.animations){const D=b(w);for(let U=0,ie=D.length;U<ie;U++)v.push(D[U])}Be.push(new hh("default",-1,v))}}else for(const v in S)Be.push(Q(v))}function yt(S){let v="";const w=[S];for(;w.length;){const D=w.shift();D.nodeType===Node.TEXT_NODE?v+=D.textContent:(v+=`
|
|
4198
|
+
`,w.push(...D.childNodes))}return v.trim()}if(e.length===0)return{scene:new Ia};const Ct=new DOMParser().parseFromString(e,"application/xml"),wt=n(Ct,"COLLADA")[0],Ft=Ct.getElementsByTagName("parsererror")[0];if(Ft!==void 0){const S=n(Ft,"div")[0];let v;return S?v=S.textContent:v=yt(Ft),console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
4199
|
+
`,v),null}const an=wt.getAttribute("version");console.debug("THREE.ColladaLoader: File version",an);const Nt=d(n(wt,"asset")[0]),$t=new oc(this.manager);$t.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let Ht;r0&&(Ht=new r0(this.manager),Ht.setPath(this.resourcePath||t));const Yt=new bt,Be=[];let Kt={},kt=0;const pt={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(wt,"library_animations","animation",f),h(wt,"library_animation_clips","animation_clip",W),h(wt,"library_controllers","controller",xe),h(wt,"library_images","image",te),h(wt,"library_effects","effect",Y),h(wt,"library_materials","material",oe),h(wt,"library_cameras","camera",_t),h(wt,"library_lights","light",Et),h(wt,"library_geometries","geometry",tt),h(wt,"library_nodes","node",j),h(wt,"library_visual_scenes","visual_scene",Ee),h(wt,"library_kinematics_models","kinematics_model",In),h(wt,"library_physics_models","physics_model",$),h(wt,"scene","instance_kinematics_scene",ue),g(pt.animations,M),g(pt.clips,he),g(pt.controllers,re),g(pt.images,ee),g(pt.effects,k),g(pt.materials,Pe),g(pt.cameras,Fe),g(pt.lights,At),g(pt.geometries,Tt),g(pt.visualScenes,ht),Dt(),Se();const Gn=Xe(n(wt,"scene")[0]);return Gn.animations=Be,Nt.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),Gn.rotation.set(-Math.PI/2,0,0)),Gn.scale.multiplyScalar(Nt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),Be},kinematics:Kt,library:pt,scene:Gn}}}const a0=new z,S4=new _n,ca=new Mt,zi=new Mt,ha=new Un,ua=new z(1,1,1),da=new z;class Wa extends sn{constructor(...e){super(...e),this.urdfNode=null,this.urdfName=""}copy(e,t){return super.copy(e,t),this.urdfNode=e.urdfNode,this.urdfName=e.urdfName,this}}class E4 extends Wa{constructor(...e){super(...e),this.isURDFCollider=!0,this.type="URDFCollider"}}class A4 extends Wa{constructor(...e){super(...e),this.isURDFVisual=!0,this.type="URDFVisual"}}class du extends Wa{constructor(...e){super(...e),this.isURDFLink=!0,this.type="URDFLink"}}class fu extends Wa{get jointType(){return this._jointType}set jointType(e){if(this.jointType!==e)switch(this._jointType=e,this.matrixWorldNeedsUpdate=!0,e){case"fixed":this.jointValue=[];break;case"continuous":case"revolute":case"prismatic":this.jointValue=new Array(1).fill(0);break;case"planar":this.jointValue=new Array(3).fill(0),this.axis=new z(0,0,1);break;case"floating":this.jointValue=new Array(6).fill(0);break}}get angle(){return this.jointValue[0]}constructor(...e){super(...e),this.isURDFJoint=!0,this.type="URDFJoint",this.jointValue=null,this.jointType="fixed",this.axis=new z(1,0,0),this.limit={lower:0,upper:0},this.ignoreLimits=!1,this.origPosition=null,this.origQuaternion=null,this.mimicJoints=[]}copy(e,t){return super.copy(e,t),this.jointType=e.jointType,this.axis=e.axis.clone(),this.limit.lower=e.limit.lower,this.limit.upper=e.limit.upper,this.ignoreLimits=!1,this.jointValue=[...e.jointValue],this.origPosition=e.origPosition?e.origPosition.clone():null,this.origQuaternion=e.origQuaternion?e.origQuaternion.clone():null,this.mimicJoints=[...e.mimicJoints],this}setJointValue(...e){e=e.map(n=>n===null?null:parseFloat(n)),(!this.origPosition||!this.origQuaternion)&&(this.origPosition=this.position.clone(),this.origQuaternion=this.quaternion.clone());let t=!1;switch(this.mimicJoints.forEach(n=>{t=n.updateFromMimickedJoint(...e)||t}),this.jointType){case"fixed":return t;case"continuous":case"revolute":{let n=e[0];return n==null||n===this.jointValue[0]?t:(!this.ignoreLimits&&this.jointType==="revolute"&&(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.quaternion.setFromAxisAngle(this.axis,n).premultiply(this.origQuaternion),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"prismatic":{let n=e[0];return n==null||n===this.jointValue[0]?t:(this.ignoreLimits||(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.position.copy(this.origPosition),a0.copy(this.axis).applyEuler(this.rotation),this.position.addScaledVector(a0,n),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"floating":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],this.jointValue[3]=e[3]!==null?e[3]:this.jointValue[3],this.jointValue[4]=e[4]!==null?e[4]:this.jointValue[4],this.jointValue[5]=e[5]!==null?e[5]:this.jointValue[5],zi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromEuler(S4.set(this.jointValue[3],this.jointValue[4],this.jointValue[5],"XYZ")),da.set(this.jointValue[0],this.jointValue[1],this.jointValue[2]),ca.compose(da,ha,ua),zi.premultiply(ca),this.position.setFromMatrixPosition(zi),this.rotation.setFromRotationMatrix(zi),this.matrixWorldNeedsUpdate=!0,!0);case"planar":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],zi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromAxisAngle(this.axis,this.jointValue[2]),da.set(this.jointValue[0],this.jointValue[1],0),ca.compose(da,ha,ua),zi.premultiply(ca),this.position.setFromMatrixPosition(zi),this.rotation.setFromRotationMatrix(zi),this.matrixWorldNeedsUpdate=!0,!0)}return t}}class o0 extends fu{constructor(...e){super(...e),this.type="URDFMimicJoint",this.mimicJoint=null,this.offset=0,this.multiplier=1}updateFromMimickedJoint(...e){const t=e.map(n=>n*this.multiplier+this.offset);return super.setJointValue(...t)}copy(e,t){return super.copy(e,t),this.mimicJoint=e.mimicJoint,this.offset=e.offset,this.multiplier=e.multiplier,this}}class w4 extends du{constructor(...e){super(...e),this.isURDFRobot=!0,this.urdfNode=null,this.urdfRobotNode=null,this.robotName=null,this.links=null,this.joints=null,this.colliders=null,this.visual=null,this.frames=null}copy(e,t){super.copy(e,t),this.urdfRobotNode=e.urdfRobotNode,this.robotName=e.robotName,this.links={},this.joints={},this.colliders={},this.visual={},this.traverse(n=>{n.isURDFJoint&&n.urdfName in e.joints&&(this.joints[n.urdfName]=n),n.isURDFLink&&n.urdfName in e.links&&(this.links[n.urdfName]=n),n.isURDFCollider&&n.urdfName in e.colliders&&(this.colliders[n.urdfName]=n),n.isURDFVisual&&n.urdfName in e.visual&&(this.visual[n.urdfName]=n)});for(const n in this.joints)this.joints[n].mimicJoints=this.joints[n].mimicJoints.map(i=>this.joints[i.name]);return this.frames={...this.colliders,...this.visual,...this.links,...this.joints},this}getFrame(e){return this.frames[e]}setJointValue(e,...t){const n=this.joints[e];return n?n.setJointValue(...t):!1}setJointValues(e){let t=!1;for(const n in e){const i=e[n];Array.isArray(i)?t=this.setJointValue(n,...i)||t:t=this.setJointValue(n,i)||t}return t}}const Io=new Un,l0=new _n;function Ns(s){return s?s.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function c0(s,e,t=!1){t||s.rotation.set(0,0,0),l0.set(e[0],e[1],e[2],"ZYX"),Io.setFromEuler(l0),Io.multiply(s.quaternion),s.quaternion.copy(Io)}class gc{constructor(e){this.manager=e||ac,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(e){return new Promise((t,n)=>{this.load(e,t,null,n)})}load(e,t,n,i){const r=this.manager,o=hc.extractUrlBase(e),a=this.manager.resolveURL(e);r.itemStart(a),fetch(a,this.fetchOptions).then(l=>{if(l.ok)return n&&n(null),l.text();throw new Error(`URDFLoader: Failed to load url '${a}' with error code ${l.status} : ${l.statusText}.`)}).then(l=>{const c=this.parse(l,this.workingPath||o);t(c),r.itemEnd(a)}).catch(l=>{i?i(l):console.error("URDFLoader: Error loading file.",l),r.itemError(a),r.itemEnd(a)})}parse(e,t=this.workingPath){const n=this.packages,i=this.loadMeshCb,r=this.parseVisual,o=this.parseCollision,a=this.manager,l={},c={},d={};function m(x){if(!/^package:\/\//.test(x))return t?t+x:x;const[M,b]=x.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(M)?n+"/"+b:n+"/"+M+"/"+b;if(n instanceof Function)return n(M)+"/"+b;if(typeof n=="object")return M in n?n[M]+"/"+b:(console.error(`URDFLoader : ${M} not found in provided package list.`),null)}function u(x){let M;x instanceof Document?M=[...x.children]:x instanceof Element?M=[x]:M=[...new DOMParser().parseFromString(x,"text/xml").children];const b=M.filter(N=>N.nodeName==="robot").pop();return h(b)}function h(x){const M=[...x.children],b=M.filter(F=>F.nodeName.toLowerCase()==="link"),N=M.filter(F=>F.nodeName.toLowerCase()==="joint"),L=M.filter(F=>F.nodeName.toLowerCase()==="material"),P=new w4;P.robotName=x.getAttribute("name"),P.urdfRobotNode=x,L.forEach(F=>{const B=F.getAttribute("name");d[B]=f(F)});const I={},A={};b.forEach(F=>{const B=F.getAttribute("name"),X=x.querySelector(`child[link="${B}"]`)===null;l[B]=_(F,I,A,X?P:null)}),N.forEach(F=>{const B=F.getAttribute("name");c[B]=g(F)}),P.joints=c,P.links=l,P.colliders=A,P.visual=I;const E=Object.values(c);return E.forEach(F=>{F instanceof o0&&c[F.mimicJoint].mimicJoints.push(F)}),E.forEach(F=>{const B=new Set,X=Z=>{if(B.has(Z))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");B.add(Z),Z.mimicJoints.forEach(se=>{X(se)})};X(F)}),P.frames={...A,...I,...l,...c},P}function g(x){const M=[...x.children],b=x.getAttribute("type");let N;const L=M.find(B=>B.nodeName.toLowerCase()==="mimic");L?(N=new o0,N.mimicJoint=L.getAttribute("joint"),N.multiplier=parseFloat(L.getAttribute("multiplier")||1),N.offset=parseFloat(L.getAttribute("offset")||0)):N=new fu,N.urdfNode=x,N.name=x.getAttribute("name"),N.urdfName=N.name,N.jointType=b;let P=null,I=null,A=[0,0,0],E=[0,0,0];M.forEach(B=>{const X=B.nodeName.toLowerCase();X==="origin"?(A=Ns(B.getAttribute("xyz")),E=Ns(B.getAttribute("rpy"))):X==="child"?I=l[B.getAttribute("link")]:X==="parent"?P=l[B.getAttribute("link")]:X==="limit"&&(N.limit.lower=parseFloat(B.getAttribute("lower")||N.limit.lower),N.limit.upper=parseFloat(B.getAttribute("upper")||N.limit.upper))}),P.add(N),N.add(I),c0(N,E),N.position.set(A[0],A[1],A[2]);const F=M.filter(B=>B.nodeName.toLowerCase()==="axis")[0];if(F){const B=F.getAttribute("xyz").split(/\s+/g).map(X=>parseFloat(X));N.axis=new z(B[0],B[1],B[2]),N.axis.normalize()}return N}function _(x,M,b,N=null){N===null&&(N=new du);const L=[...x.children];return N.name=x.getAttribute("name"),N.urdfName=N.name,N.urdfNode=x,r&&L.filter(I=>I.nodeName.toLowerCase()==="visual").forEach(I=>{const A=p(I,d);if(N.add(A),I.hasAttribute("name")){const E=I.getAttribute("name");A.name=E,A.urdfName=E,M[E]=A}}),o&&L.filter(I=>I.nodeName.toLowerCase()==="collision").forEach(I=>{const A=p(I);if(N.add(A),I.hasAttribute("name")){const E=I.getAttribute("name");A.name=E,A.urdfName=E,b[E]=A}}),N}function f(x){const M=[...x.children],b=new ln;return b.name=x.getAttribute("name")||"",M.forEach(N=>{const L=N.nodeName.toLowerCase();if(L==="color"){const P=N.getAttribute("rgba").split(/\s/g).map(I=>parseFloat(I));b.color.setRGB(P[0],P[1],P[2]),b.opacity=P[3],b.transparent=P[3]<1,b.depthWrite=!b.transparent}else if(L==="texture"){const P=N.getAttribute("filename");if(P){const I=new oc(a),A=m(P);b.map=I.load(A),b.map.colorSpace=Vt}}}),b}function p(x,M={}){const b=x.nodeName.toLowerCase()==="collision",N=[...x.children];let L=null;const P=N.filter(A=>A.nodeName.toLowerCase()==="material")[0];if(P){const A=P.getAttribute("name");A&&A in M?L=M[A]:L=f(P)}else L=new ln;const I=b?new E4:new A4;return I.urdfNode=x,N.forEach(A=>{const E=A.nodeName.toLowerCase();if(E==="geometry"){const F=A.children[0].nodeName.toLowerCase();if(F==="mesh"){const B=A.children[0].getAttribute("filename"),X=m(B);if(X!==null){const Z=A.children[0].getAttribute("scale");if(Z){const se=Ns(Z);I.scale.set(se[0],se[1],se[2])}i(X,a,(se,W)=>{W?console.error("URDFLoader: Error loading mesh.",W):se&&(se instanceof Pt&&(se.material=L),se.position.set(0,0,0),se.quaternion.identity(),I.add(se))})}}else if(F==="box"){const B=new Pt;B.geometry=new Wi(1,1,1),B.material=L;const X=Ns(A.children[0].getAttribute("size"));B.scale.set(X[0],X[1],X[2]),I.add(B)}else if(F==="sphere"){const B=new Pt;B.geometry=new Oa(1,30,30),B.material=L;const X=parseFloat(A.children[0].getAttribute("radius"))||0;B.scale.set(X,X,X),I.add(B)}else if(F==="cylinder"){const B=new Pt;B.geometry=new ic(1,1,1,30),B.material=L;const X=parseFloat(A.children[0].getAttribute("radius"))||0,Z=parseFloat(A.children[0].getAttribute("length"))||0;B.scale.set(X,Z,X),B.rotation.set(Math.PI/2,0,0),I.add(B)}}else if(E==="origin"){const F=Ns(A.getAttribute("xyz")),B=Ns(A.getAttribute("rpy"));I.position.set(F[0],F[1],F[2]),I.rotation.set(0,0,0),c0(I,B)}}),I}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new Hi(t).load(e,r=>{const o=new Pt(r,new ln);n(o)}):/\.dae$/i.test(e)?new b4(t).load(e,r=>n(r.scene)):console.warn(`URDFLoader: Could not load model at ${e}.
|
|
4200
|
+
No loader available`)}}const T4=/^[og]\s*(.+)?/,C4=/^mtllib /,R4=/^usemtl /,D4=/^usemap /,h0=/\s+/,u0=new z,zo=new z,d0=new z,f0=new z,Xn=new z,fa=new bt;function L4(){const s={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=t!==!1;return}const n=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:t!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(i,r){const o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);const a={index:this.materials.length,name:i||"",mtllib:Array.isArray(r)&&r.length>0?r[r.length-1]:"",smooth:o!==void 0?o.smooth:this.smooth,groupStart:o!==void 0?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:typeof l=="number"?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(i){const r=this.currentMaterial();if(r&&r.groupEnd===-1&&(r.groupEnd=this.geometry.vertices.length/3,r.groupCount=r.groupEnd-r.groupStart,r.inherited=!1),i&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return i&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),r}},n&&n.name&&typeof n.clone=="function"){const i=n.clone(0);i.inherited=!0,this.object.materials.push(i)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseNormalIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseUVIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/2)*2},addVertex:function(e,t,n){const i=this.vertices,r=this.object.geometry.vertices;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[n+0],i[n+1],i[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const i=this.normals,r=this.object.geometry.normals;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[n+0],i[n+1],i[n+2])},addFaceNormal:function(e,t,n){const i=this.vertices,r=this.object.geometry.normals;u0.fromArray(i,e),zo.fromArray(i,t),d0.fromArray(i,n),Xn.subVectors(d0,zo),f0.subVectors(u0,zo),Xn.cross(f0),Xn.normalize(),r.push(Xn.x,Xn.y,Xn.z),r.push(Xn.x,Xn.y,Xn.z),r.push(Xn.x,Xn.y,Xn.z)},addColor:function(e,t,n){const i=this.colors,r=this.object.geometry.colors;i[e]!==void 0&&r.push(i[e+0],i[e+1],i[e+2]),i[t]!==void 0&&r.push(i[t+0],i[t+1],i[t+2]),i[n]!==void 0&&r.push(i[n+0],i[n+1],i[n+2])},addUV:function(e,t,n){const i=this.uvs,r=this.object.geometry.uvs;r.push(i[e+0],i[e+1]),r.push(i[t+0],i[t+1]),r.push(i[n+0],i[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,i,r,o,a,l,c){const d=this.vertices.length;let m=this.parseVertexIndex(e,d),u=this.parseVertexIndex(t,d),h=this.parseVertexIndex(n,d);if(this.addVertex(m,u,h),this.addColor(m,u,h),a!==void 0&&a!==""){const g=this.normals.length;m=this.parseNormalIndex(a,g),u=this.parseNormalIndex(l,g),h=this.parseNormalIndex(c,g),this.addNormal(m,u,h)}else this.addFaceNormal(m,u,h);if(i!==void 0&&i!==""){const g=this.uvs.length;m=this.parseUVIndex(i,g),u=this.parseUVIndex(r,g),h=this.parseUVIndex(o,g),this.addUV(m,u,h),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,i=e.length;n<i;n++){const r=this.parseVertexIndex(e[n],t);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";const n=this.vertices.length,i=this.uvs.length;for(let r=0,o=e.length;r<o;r++)this.addVertexLine(this.parseVertexIndex(e[r],n));for(let r=0,o=t.length;r<o;r++)this.addUVLine(this.parseUVIndex(t[r],i))}};return s.startObject("",!1),s}class as extends ni{constructor(e){super(e),this.materials=null}load(e,t,n,i){const r=this,o=new Zs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}setMaterials(e){return this.materials=e,this}parse(e){const t=new L4;e.indexOf(`\r
|
|
4201
4201
|
`)!==-1&&(e=e.replace(/\r\n/g,`
|
|
4202
4202
|
`)),e.indexOf(`\\
|
|
4203
4203
|
`)!==-1&&(e=e.replace(/\\\n/g,""));const n=e.split(`
|
|
4204
|
-
`);let i=[];for(let a=0,l=n.length;a<l;a++){const c=n[a].trimStart();if(c.length===0)continue;const d=c.charAt(0);if(d!=="#")if(d==="v"){const m=c.split(h0);switch(m[0]){case"v":t.vertices.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3])),m.length>=7?(fa.setRGB(parseFloat(m[4]),parseFloat(m[5]),parseFloat(m[6]),
|
|
4205
|
-
`);let i={};const r=/\s+/,o={};for(let l=0;l<n.length;l++){let c=n[l];if(c=c.trim(),c.length===0||c.charAt(0)==="#")continue;const d=c.indexOf(" ");let m=d>=0?c.substring(0,d):c;m=m.toLowerCase();let u=d>=0?c.substring(d+1):"";if(u=u.trim(),m==="newmtl")i={name:u},o[u]=i;else if(m==="ka"||m==="kd"||m==="ks"||m==="ke"){const h=u.split(r,3);i[m]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else i[m]=u}const a=new P4(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class P4{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:
|
|
4206
|
-
`||
|
|
4207
|
-
`);for(let f=0,v=p.length;f<v;f++){if(p[f]==="")continue;const b=p[f].split(" ");if(h.x!==void 0&&(r.push(parseFloat(b[h.x])),r.push(parseFloat(b[h.y])),r.push(parseFloat(b[h.z]))),h.rgb!==void 0){const S=i.fields.findIndex(L=>L==="rgb"),F=i.type[S],C=parseFloat(b[h.rgb]);let R=C;if(F==="F"){const L=new Float32Array(1);L[0]=C,R=new Int32Array(L.buffer)[0]}const P=(R>>16&255)/255,A=(R>>8&255)/255,E=(R>>0&255)/255;d.setRGB(P,A,E,qt),a.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(o.push(parseFloat(b[h.normal_x])),o.push(parseFloat(b[h.normal_y])),o.push(parseFloat(b[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(b[h.intensity])),h.label!==void 0&&c.push(parseInt(b[h.label]))}}if(i.data==="binary_compressed"){const h=new Uint32Array(e.slice(i.headerLen,i.headerLen+8)),g=h[0],_=h[1],p=t(new Uint8Array(e,i.headerLen+8,g),_),f=new DataView(p.buffer),v=i.offset;for(let b=0;b<i.points;b++){if(v.x!==void 0){const S=i.fields.indexOf("x"),F=i.fields.indexOf("y"),C=i.fields.indexOf("z");r.push(this._getDataView(f,i.points*v.x+i.size[S]*b,i.type[S],i.size[S])),r.push(this._getDataView(f,i.points*v.y+i.size[F]*b,i.type[F],i.size[F])),r.push(this._getDataView(f,i.points*v.z+i.size[C]*b,i.type[C],i.size[C]))}if(v.rgb!==void 0){const S=i.fields.indexOf("rgb"),F=f.getUint8(i.points*v.rgb+i.size[S]*b+2)/255,C=f.getUint8(i.points*v.rgb+i.size[S]*b+1)/255,R=f.getUint8(i.points*v.rgb+i.size[S]*b+0)/255;d.setRGB(F,C,R,qt),a.push(d.r,d.g,d.b)}if(v.normal_x!==void 0){const S=i.fields.indexOf("normal_x"),F=i.fields.indexOf("normal_y"),C=i.fields.indexOf("normal_z");o.push(this._getDataView(f,i.points*v.normal_x+i.size[S]*b,i.type[S],i.size[S])),o.push(this._getDataView(f,i.points*v.normal_y+i.size[F]*b,i.type[F],i.size[F])),o.push(this._getDataView(f,i.points*v.normal_z+i.size[C]*b,i.type[C],i.size[C]))}if(v.intensity!==void 0){const S=i.fields.indexOf("intensity");l.push(this._getDataView(f,i.points*v.intensity+i.size[S]*b,i.type[S],i.size[S]))}if(v.label!==void 0){const S=i.fields.indexOf("label");c.push(f.getInt32(i.points*v.label+i.size[S]*b,this.littleEndian))}}}if(i.data==="binary"){const h=new DataView(e,i.headerLen),g=i.offset;for(let _=0,p=0;_<i.points;_++,p+=i.rowSize){if(g.x!==void 0){const f=i.fields.indexOf("x"),v=i.fields.indexOf("y"),b=i.fields.indexOf("z");r.push(this._getDataView(h,p+g.x,i.type[f],i.size[f])),r.push(this._getDataView(h,p+g.y,i.type[v],i.size[v])),r.push(this._getDataView(h,p+g.z,i.type[b],i.size[b]))}if(g.rgb!==void 0){const f=h.getUint8(p+g.rgb+2)/255,v=h.getUint8(p+g.rgb+1)/255,b=h.getUint8(p+g.rgb+0)/255;d.setRGB(f,v,b,qt),a.push(d.r,d.g,d.b)}if(g.normal_x!==void 0){const f=i.fields.indexOf("normal_x"),v=i.fields.indexOf("normal_y"),b=i.fields.indexOf("normal_z");o.push(this._getDataView(h,p+g.normal_x,i.type[f],i.size[f])),o.push(this._getDataView(h,p+g.normal_y,i.type[v],i.size[v])),o.push(this._getDataView(h,p+g.normal_z,i.type[b],i.size[b]))}if(g.intensity!==void 0){const f=i.fields.indexOf("intensity");l.push(this._getDataView(h,p+g.intensity,i.type[f],i.size[f]))}g.label!==void 0&&c.push(h.getInt32(p+g.label,this.littleEndian))}}const m=new hn;r.length>0&&m.setAttribute("position",new It(r,3)),o.length>0&&m.setAttribute("normal",new It(o,3)),a.length>0&&m.setAttribute("color",new It(a,3)),l.length>0&&m.setAttribute("intensity",new It(l,1)),c.length>0&&m.setAttribute("label",new K2(c,1)),m.computeBoundingSphere();const u=new Gi({size:.005});return a.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const N4=Oe.useModelComp(Oe.pinia),{systemPath:p0}=Oe.storeToRefs(N4),pa=y.ref(),m0=new Map;function U4(s,e,t,n,i){const r=async u=>{try{const h=await On.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,b=new cs().parse(f);b.preload(),h(b)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new fn({color:8947848,side:pn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const p=new FileReader;p.onload=async f=>{try{const v=f.target.result;let b=null;h&&h.length>0&&(h.length===1?b=await o(h[0]):b=await a(h));const S=new ls;b&&S.setMaterials(b);const F=S.parse(v);b||F.traverse(C=>{C.isMesh&&(C.material=new fn({color:8947848,side:pn}))}),g(F)}catch(v){_(v)}},p.onerror=()=>{_(new Error("OBJ文件读取失败"))},p.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let p=0;p<u.length;p++){const f=u[p];n.value=`正在加载模型 ${p+1}/${u.length}...`;const v=await r(f.objUrl),b=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([v],b,{type:v.type});let F=[];if(f.mtlUrls){const R=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let P=0;P<R.length;P++){const A=R[P],E=await r(A),L=(A==null?void 0:A.split("/").pop())||`material_${p}_${P}.mtl`,B=new File([E],L,{type:E.type});F.push(B)}}const C=await l(S,F);g.add(C),e.value.push(C),_.push(C)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let p;const f=u.toLowerCase();switch(f){case".txt":case".cpt":case".obj":const v=await h.text();if(f===".txt"||f===".cpt"){const $=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ce=[...v.matchAll($)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),Ke=new hn,He=Ce.flatMap(O=>[O.x,O.y,O.z]);if(Ke.setAttribute("position",new It(He,3)),f===".txt"){const O=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ke,O)}else if(f===".cpt"){const O=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(Ke,O)}}else if(f===".obj"){const $=new ls;if(g&&g.length>0){const pe=new cs;for(const Ce of g){const Ke=await Ce.text(),He=pe.parse(Ke);He.preload(),$.setMaterials(He);break}}p=$.parse(v),(!g||g.length===0)&&p.traverse(pe=>{pe.isMesh&&(pe.material=new fn({color:"#B3B3D4"})),pe instanceof zt&&(pe.material.side=pn)})}break;case".stl":const b=await h.arrayBuffer(),F=new ji().parse(b),C=new fn({color:"#B3B3D4",side:pn});p=new zt(F,C);break;case".nc":const R=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],P={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},A=new Ln,E=R.map($=>new Promise((pe,Ce)=>{new ji().load(p0.value===""?`/model/${$}`:`${p0.value}\\${$}`,He=>{const O=new fn({color:P[$]||"#B3B3D4",side:pn}),_t=new zt(He,O);pe(_t)},void 0,Ce)}));try{(await Promise.all(E)).forEach(pe=>A.add(pe)),p=A}catch($){throw console.error("加载NC文件对应的STL文件失败:",$),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const L=new pu,B=new Ln;try{const $=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),pe=new Blob([$.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ke=new Blob([Ce.data],{type:"application/octet-stream;charset=UTF-8"}),He=await new Promise((_t,dt)=>{const at=URL.createObjectURL(pe);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)}),O=await new Promise((_t,dt)=>{const at=URL.createObjectURL(Ke);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)});B.add(He),B.add(O),p=B}catch($){throw console.error("PCD文件加载失败:",$),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new gc,ae="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",G={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},le=new Map,Z=new Map,ve=new Map,Ee=async $=>{if(le.has($))return console.log(`从缓存加载: ${$}`),le.get($);try{const pe=await Pn.axios.get(`${ae}/${$}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ce=new Blob([pe.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set($,Ce),Ce}catch(pe){throw console.error(`加载文件失败: ${$}`,pe),new Error(`无法加载文件: ${$}`)}},be=($="default")=>{if(Z.has($))return Z.get($);const pe=new fn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Qn});return Z.set($,pe),pe},ge=$=>{try{$.isBufferGeometry&&$.mergeVertices&&$.mergeVertices(),$.computeVertexNormals&&$.computeVertexNormals(),$.computeBoundingSphere&&$.computeBoundingSphere(),$.deleteAttribute&&$.deleteAttribute("uv2")}catch(pe){console.warn("几何体优化失败,使用原始几何体:",pe)}return $},se=async($,pe,Ce)=>{const Ke=`stl_${pe}`;if(ve.has(Ke)){const dt=ve.get(Ke);return new zt(dt,be())}const He=await $.arrayBuffer();let _t=new ji(Ce).parse(He);return _t=ge(_t),ve.set(Ke,_t),new zt(_t,be())},j=async($,pe,Ce)=>{const Ke=`obj_${pe}`;if(le.has(Ke))return le.get(Ke).clone();const He=await $.text(),O=new ls(Ce),_t=pe.replace(".obj",".mtl");try{const Fe=await(await Ee(_t)).text(),Le=new cs(Ce).parse(Fe);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${_t}`)}const dt=O.parse(He);return dt.traverse(at=>{at.isMesh&&(at.geometry=ge(at.geometry),at.castShadow=!0,at.receiveShadow=!0,at.renderOrder=1)}),le.set(Ke,dt),dt},q=($,pe)=>{const Ce=new O0;if(Ce.addLevel($,0),$.geometry){const Ke=$.geometry.clone(),He=new zt(Ke,$.material);Ce.addLevel(He,50)}return Ce};let ne=0,ee=0;const ue=[];Q.loadMeshCb=async($,pe,Ce,Ke,He)=>{const O=$.split("/").pop(),_t=Ce||(()=>{});ne++;const dt=new Promise(async(at,Fe)=>{try{const tt=await Ee(O);if(!tt||tt.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let ot;switch(Le){case"stl":ot=await se(tt,O,pe);break;case"obj":ot=await j(tt,O,pe);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&ot.isMesh&&(ot=q(ot,O)),_t(ot),ee++,Ke&&Ke({loaded:ee,total:ne,progress:ee/ne}),at(ot)}catch(tt){console.error(`mesh文件加载失败: ${O}`,tt);const Le=new Ln;_t(Le),at(Le);const ot=new $i(.1,.1,.1),jt=new j0({color:16711680,wireframe:!0});return new zt(ot,jt)}});ue.push(dt)};try{if(!H){pa.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ne}个mesh文件加载...`),ue.length>0)try{await Promise.allSettled(ue),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ne}`)}catch(Ce){console.warn("部分mesh文件加载失败,但继续显示模型",Ce)}p.traverse(Ce=>{Ce.isMesh&&(Ce.castShadow=!0,Ce.receiveShadow=!0,Ce.renderOrder=1,Ce.material&&(Ce.material.needsUpdate=!0))}),console.time("计算包围盒");const $=new Fn;$.expandByObject(p);const pe=`urdf_${Date.now()}`;p.userData.boundingBox=$.clone(),p.userData.modelId=pe,m0.set(pe,{box:$.clone(),center:$.getCenter(new I),size:$.getSize(new I),maxSize:Math.max(...$.getSize(new I).toArray())}),pa.value=p,console.log("URDF模型加载完成并优化")}catch($){console.error("URDF加载失败:",$),pa.value=void 0}finally{H&&URL.revokeObjectURL(H)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return p};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const p=u[_],f=await d(p.suffix,p.blob,p.mtlBlobs||[],p.meshFiles||[]);f&&(h.add(f),e.value.push(f),g.push(f))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:pa,modelBoundingBoxes:m0}}const I4={class:"panel-content"},z4={__name:"animationPanel",props:{animationData:Object,model:Object},setup(s){const e=s;y.ref();const t=y.ref();return y.watch(()=>[e==null?void 0:e.animationData],()=>{var i;let n=((i=Oe.cloneDeep(e==null?void 0:e.animationData))==null?void 0:i["输出(动画数据)Content"])??[];n&&(t.value=n)},{deep:!0,immediate:!0}),(n,i)=>{var r,o,a;return y.openBlock(),y.createElementBlock("div",I4,[(y.openBlock(),y.createBlock(Eu,{itemData:(r=t.value)==null?void 0:r.compData,key:(o=t.value)==null?void 0:o.id,index:(a=t.value)==null?void 0:a.id,showHeader:!1},null,8,["itemData","index"]))])}}},B4=Pi._export_sfc(z4,[["__scopeId","data-v-ed10cedd"]]),O4={class:"panel-content"},k4={key:0,class:"joints-list"},V4={class:"joint-info-row"},H4={class:"joint-left"},G4={class:"joint-name"},W4={class:"joint-range"},X4={class:"joint-type"},j4={key:0,class:"joint-control-row"},q4={class:"slider-container"},$4=["min","max","value","onInput","disabled"],Y4={class:"value-display"},J4={class:"joint-value"},K4={class:"unit"},Z4={key:1,class:"empty-state"},hr=.001,Q4=1e3,ko=60,e6={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(s,{expose:e}){const t=s;y.ref(!0);const n=y.ref([]),i=y.ref(null),r=y.ref(null),o=y.ref(12.5),a=y.ref(),l=y.ref(1302),c=y.ref(30),d=y.ref(!1),m=y.ref(!1),u=y.ref(0),h=y.ref(0),g=y.ref(null),_=Ei.degToRad,p=y.ref(1),f=()=>Q4/ko/p.value;let v=[];y.watch(()=>t.animationData,se=>{var q;l.value=se.extra.管长,o.value=se.extra.外径/2;let j=((q=Oe.cloneDeep(se))==null?void 0:q["输出(动画数据)"])??[];j&&j.length>0&&(v=j)},{deep:!0}),y.computed(()=>v.length>0);const b=(se,j=!1)=>se==="revolute"?j?Math.PI:-Math.PI:se==="prismatic"?j?1:-1:0,S=()=>{if(!i.value)return Pn.ElMessage.error("未加载 URDF"),!1;let se=null;return i.value.traverse(j=>{se||j.name==="Pipe_Link"&&j.traverse(q=>{q instanceof zt&&!se&&(se=q)})}),se?(se.position.y-=c.value*hr,a.value=se,se.material=new fn({color:11184810,shininess:80,side:pn}),!0):(Pn.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},F=se=>{if(!se||!se.joints)return console.warn("URDF模型没有关节信息"),[];let j=null;if(se.traverse(ne=>{ne.name==="Pipe_Link"&&!j&&(j=ne)}),j)a.value=j;else return console.warn("未找到管子模型"),[];const q=[];return Object.keys(se.joints).forEach(ne=>{const ee=se.joints[ne];if(ee._jointType==="fixed")return;const ue=ee.limit?{lower:ee.limit.lower??b(ee._jointType,!1),upper:ee.limit.upper??b(ee._jointType,!0)}:{lower:b(ee._jointType,!1),upper:b(ee._jointType,!0)};q.push({name:ne,type:ee._jointType||"unknown",limit:ue,currentValue:ee.angle||0,urdfJoint:ee})}),q.sort((ne,ee)=>ne.name.localeCompare(ee.name))},C=(se,j)=>{const q=n.value.find(ee=>ee.name===se);if(!q)return;const ne=parseFloat(j);if(q.limit){const ee=Math.max(q.limit.lower,Math.min(q.limit.upper,ne));q.currentValue=ee}else q.currentValue=ne;t.model&&t.model.setJointValue?t.model.setJointValue(se,q.currentValue):q.urdfJoint&&q.urdfJoint.setJointValue(q.currentValue)},R=se=>se.reduce((j,q)=>{let ne=0;const ee=q.Y??0,ue=q.C??0,$=q.R??0;return ee>0&&(ne+=ee),ue>0&&$>0&&(ne+=$*_(ue)),j+ne},0),P=se=>{const j=[],q=se.Y??0,ne=se.B??0,ee=se.C??0,ue=se.R??0,$={pos:new I(0,0,0),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};if(!q&&!ee)return j;if(j.push($.pos.clone()),ne!==0){const pe=new Et().makeRotationAxis($.localY,_(ne));$.localX.applyMatrix4(pe),$.localZ.applyMatrix4(pe)}if(q>0&&($.pos.add($.localY.clone().multiplyScalar(q*hr)),j.push($.pos.clone())),ee>0&&ue>0){const pe=_(ee),Ce=ue*hr,Ke=$.pos.clone().add($.localX.clone().multiplyScalar(-Ce)),He=Math.max(16,Math.ceil(ee/5));for(let O=1;O<=He;O++){const _t=pe*O/He,dt=new Et().makeRotationAxis($.localZ,_t),Fe=$.localX.clone().multiplyScalar(Ce).applyMatrix4(dt),tt=Ke.clone().add(Fe);j.push(tt)}}return j},A=(se,j=0)=>{let q=v.slice(0,se+1);const ne=v[se+1];if(ne&&j>0){const He={...ne,B:(ne.B??0)*j,C:(ne.C??0)*j};q.push(He)}const ee=R(q),ue=Math.max(0,l.value-ee),$=[];$.push(new I(0,0,0));const pe=new I(0,ue*hr,0);ue>0&&$.push(pe);let Ce={pos:pe.clone(),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};const Ke=[];for(let He=q.length-1;He>=0;He--){const O=q[He],_t=P(O);if(_t.length>0){const dt=_t.map(Le=>{const ot=Le.clone(),jt=new Et;return jt.makeBasis(Ce.localX,Ce.localY,Ce.localZ),ot.applyMatrix4(jt),ot.add(Ce.pos)});Ke.push(dt);const at=dt[dt.length-1];Ce.pos=at.clone();const Fe=O.B??0,tt=O.C??0;if(Fe!==0){const Le=new Et().makeRotationAxis(Ce.localY,_(Fe));Ce.localX.applyMatrix4(Le),Ce.localZ.applyMatrix4(Le)}if(tt>0){const Le=_(tt),ot=new Et().makeRotationAxis(Ce.localZ,Le);Ce.localY.applyMatrix4(ot),Ce.localX.applyMatrix4(ot)}}}for(const He of Ke)He.length>1&&$.push(...He.slice(1));$.length<2&&$.push(new I(0,.001,0));try{const He=new rc($,!1,"catmullrom",.01),O=new ka(He,Math.max(2,$.length*4),o.value*hr,18,!1);a.value.geometry.dispose(),a.value.geometry=O}catch(He){console.error("管件更新失败",He)}},E=(se,j,q=1)=>{se&&(Object.keys(se).forEach(ne=>{const ee=se[ne],ue=n.value.find($=>$.name===ne);ue&&(ue.currentValue=ee,t.model&&t.model.setJointValue?t.model.setJointValue(ne,ee):ue.urdfJoint&&ue.urdfJoint.setJointValue(ee))}),A(j,q))},L=(se,j,q)=>se+(j-se)*q,B=(se,j,q)=>{if(!se||!j)return se||j;const ne={};return Object.keys(se).forEach(ee=>{const ue=se[ee],$=j[ee];ne[ee]=L(ue,$||ue,q)}),ne},H=()=>{if(v.length===0){console.warn("没有动画数据");return}S(),d.value=!0,m.value=!1,u.value=0,h.value=0,Q()},Q=()=>{if(!d.value||m.value)return;const se=u.value;if(se>=v.length-1){const ee=v[v.length-1];E(ee,v.length-1,1),G();return}const j=h.value/ko,q=v[se],ne=v[se+1];if(ne){const ee=B(q,ne,j);E(ee,se,j)}else E(q,se);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Q,f())},ae=()=>{m.value=!0,g.value&&(clearTimeout(g.value),g.value=null)},G=()=>{d.value=!1,m.value=!1,p.value=1,g.value&&(clearTimeout(g.value),g.value=null)};e({startAnimation:H,pauseAnimation:ae,stopAnimation:G,resetAll:()=>{G(),u.value=0,h.value=0,n.value.forEach(se=>{(se.type==="revolute"||se.type==="prismatic")&&C(se.name,0)}),A(-1,0)},fastForward:()=>{p.value<4&&(p.value=Math.min(4,p.value*2))},fastBackward:()=>{p.value>.25&&(p.value=Math.max(.25,p.value/2))}}),y.watch(()=>t.model,se=>{se?(i.value=se,n.value=F(se)):n.value=[]},{immediate:!0});const Ee=()=>{!t.model||d.value&&!m.value||n.value.forEach(se=>{se.urdfJoint&&se.urdfJoint.angle!==void 0&&(se.currentValue=se.urdfJoint.angle)})},be=()=>{const se=()=>{Ee(),r.value=requestAnimationFrame(se)};se()},ge=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return y.onMounted(()=>{be()}),y.onUnmounted(()=>{ge(),G()}),(se,j)=>(y.openBlock(),y.createElementBlock("div",O4,[n.value.length>0?(y.openBlock(),y.createElementBlock("div",k4,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n.value,q=>{var ne,ee,ue,$;return y.openBlock(),y.createElementBlock("div",{key:q.name,class:"joint-item"},[y.createElementVNode("div",V4,[y.createElementVNode("div",H4,[y.createElementVNode("span",G4,y.toDisplayString(q.name),1),y.createElementVNode("span",W4," ["+y.toDisplayString(((ne=q.limit)==null?void 0:ne.lower.toFixed(2))??(q.type==="revolute"?"-3.14":"-1.00"))+", "+y.toDisplayString(((ee=q.limit)==null?void 0:ee.upper.toFixed(2))??(q.type==="revolute"?"3.14":"1.00"))+"] ",1)]),y.createElementVNode("span",X4,y.toDisplayString(q.type),1)]),q.type==="revolute"||q.type==="prismatic"?(y.openBlock(),y.createElementBlock("div",j4,[y.createElementVNode("div",q4,[y.createElementVNode("input",{type:"range",min:((ue=q.limit)==null?void 0:ue.lower)??(q.type==="revolute"?-Math.PI:-1),max:(($=q.limit)==null?void 0:$.upper)??(q.type==="revolute"?Math.PI:1),step:.01,value:q.currentValue,onInput:pe=>C(q.name,pe.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,$4)]),y.createElementVNode("div",Y4,[y.createElementVNode("span",J4,y.toDisplayString(q.currentValue?Number(q.currentValue).toFixed(3):"0.000"),1),y.createElementVNode("span",K4,y.toDisplayString(q.type==="revolute"?"rad":"m"),1)])])):y.createCommentVNode("",!0)])}),128))])):(y.openBlock(),y.createElementBlock("div",Z4,j[0]||(j[0]=[y.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},t6=Pi._export_sfc(e6,[["__scopeId","data-v-7cbf5b39"]]),n6={class:"panel-content"},i6="id",s6={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:s=>["breadth","firstLevel"].includes(s)}},emits:["nodeClick"],setup(s,{emit:e}){const t=s,n=e,i=y.ref([]),r={children:"children",label:"label"},o=h=>{n("nodeClick",h)},a=(h,g=0)=>{const _=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(p=>{if(!(p!=null&&p.isMesh)&&((p==null?void 0:p.type)==="URDFJoint"||(p==null?void 0:p.type)==="URDFLink")){const f={name:p==null?void 0:p.name,label:p==null?void 0:p.name,show:!0,level:g+1,isPenultimate:!1,type:p==null?void 0:p.type,id:p==null?void 0:p.id,limit:(p==null?void 0:p.limit)??"",children:a(p==null?void 0:p.children,g+1),path:p==null?void 0:p.name};_.push(f)}}),_},l=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:a(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],c=(h,g)=>{const _=[],p=[...h];for(;p.length>0&&_.length<g;){const f=p.shift();f.children&&f.children.length>0&&(_.push(f.id),p.push(...f.children))}return _},d=(h,g)=>{const _=[];return h.forEach(p=>{if(p.children&&p.children.length>0){_.push(p.id);const f=p.children.filter(v=>v.children&&v.children.length>0).slice(0,g).map(v=>v.id);_.push(...f)}}),_.slice(0,g+1)},m=y.computed(()=>!i.value||i.value.length===0?[]:t.expandStrategy==="firstLevel"?d(i.value,t.maxExpandCount):c(i.value,t.maxExpandCount)),u=y.computed(()=>t!=null&&t.model?l(t.model):[]);return y.watch(u,h=>{i.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,g)=>{const _=y.resolveComponent("el-tree");return y.openBlock(),y.createElementBlock("div",n6,[y.createVNode(_,{data:i.value,props:r,"default-expanded-keys":m.value,"node-key":i6,onNodeClick:o},null,8,["data","default-expanded-keys"])])}}},r6=Pi._export_sfc(s6,[["__scopeId","data-v-0dda287c"]]),a6=["xlink:href"],o6=y.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(s){const e=s,t=y.computed(()=>({backgroundColor:e.backgroundColor})),n=y.computed(()=>`#${e.prefix}-${e.name}`),i=y.computed(()=>{const{size:r}=e;let o=`${r}`;return o=`${o.replace("px","")}px`,{width:o,height:o}});return(r,o)=>(y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(["container",{active:r.active}]),style:y.normalizeStyle(t.value)},[(y.openBlock(),y.createElementBlock("svg",{class:y.normalizeClass(["svg-icon",[r.$attrs.class,r.spin&&"svg-icon-spin"]]),style:y.normalizeStyle(i.value),"aria-hidden":"true"},[y.createElementVNode("use",{"xlink:href":n.value},null,8,a6)],6))],6))}}),un=Pi._export_sfc(o6,[["__scopeId","data-v-00a72991"]]);window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const l6={class:"obj-viewer-container"},c6={class:"buttonGroup-top"},h6={class:"buttonGroup-topLeft"},u6={class:"buttonGroup-left"},d6={class:"buttonGroup-right"},f6={class:"buttonGroup-bottom"},p6={class:"left-panel"},m6={class:"panel-header"},g6={key:1,class:"clipping-content"},_6={class:"radio-group"},v6={class:"radio-label"},y6={class:"radio-label"},x6={class:"radio-label"},M6={class:"radio-label"},b6={class:"right-panel"},S6={class:"panel-header"},E6={key:0,class:"loading-overlay"},A6={__name:"threeView",props:{urdfUrl:{type:String,default:""},animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(s,{emit:e}){const t=e,n=s;let i=null,r=!1;const o=y.ref(null),a=y.ref(!1),l=y.ref("");y.ref(!1);const c=y.ref(!1),d=y.ref(!1),m=y.ref(""),u=y.ref(!1),h=y.ref(""),g=y.ref(),{currentModels:_,initialCameraPosition:p,initialTargetPosition:f,initThreeJS:v,handleResize:b,getThreeJSObjects:S,clearAllModels:F,cleanup:C}=y4(o),{loadUrdfFromUrl:R}=F4(S,_,a,l),{isAnimating:P,toggleAnimation:A,stopAnimation:E}=x4(S,_),{isClipping:L,activeClippingAxis:B,toggleClipping:H,updateClippingPlanes:Q}=M4(S,_),{urdfModel:ae}=U4(S,_,a,l,F),G=()=>{if(c.value||_.value.length===0)return;c.value=!0,P.value&&E();const{camera:be,controls:ge}=S();if(!be||!ge)return;ge.enabled=!0;const se=$=>$<.5?4*$*$*$:1-Math.pow(-2*$+2,3)/2,j=be.position.clone(),q=ge.target.clone(),ne=1500,ee=Date.now(),ue=()=>{const $=Date.now()-ee,pe=Math.min($/ne,1),Ce=se(pe);be.position.lerpVectors(j,p.value,Ce),ge.target.lerpVectors(q,f.value,Ce),pe<1?requestAnimationFrame(ue):c.value=!1};ue()},le=async()=>r?Promise.resolve():new Promise(be=>{const ge=()=>{r?be():requestAnimationFrame(ge)};ge()}),Z=be=>{d.value=!0,m.value=be,be==="剖面视图"&&!L.value&&H()},ve=be=>{u.value=!0,h.value=be,be==="动画仿真"&&t("getAnimationData")},Ee=()=>{y.nextTick(()=>{var be;(be=g.value)==null||be.startAnimation()})};return y.watch(()=>n.urdfUrl,async(be,ge)=>{if(be)try{if(await le(),await R(be)){const{camera:j}=S();j&&(j.position.set(3,3,4),j.near=.01,j.far=1e4,j.updateProjectionMatrix())}}catch(se){console.error("加载urdf模型失败",se),Pn.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),y.onMounted(async()=>{await y.nextTick();try{v(),i=S().scene,r=!0,window.addEventListener("resize",b)}catch(be){console.error("Three.js初始化失败:",be)}}),y.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",b),P.value&&E(),C()}),(be,ge)=>{var j,q,ne,ee;const se=y.resolveComponent("el-scrollbar");return y.openBlock(),y.createElementBlock("div",l6,[y.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),y.createElementVNode("div",c6,[y.createVNode(un,{name:"guanjianjiexi",size:"34"}),y.createVNode(un,{name:"guanjiekongzhi",size:"34"}),y.createVNode(un,{name:"gongyishengcheng",size:"34"}),y.createVNode(un,{name:"buchangshezhi",size:"34"}),y.createVNode(un,{name:"shuchujiagongchengxu",size:"34"})]),y.createElementVNode("div",h6,[y.createVNode(un,{name:"viewReset",size:"24",onClick:G,title:"重置"}),y.createVNode(un,{name:"fangda",size:"24",title:"放大"}),y.createVNode(un,{name:"suoxiao",size:"24",title:"缩小"}),y.createVNode(un,{name:"lookAround",size:"24",onClick:y.unref(A),title:y.unref(P)?"停止动画":"动画视图"},null,8,["onClick","title"])]),y.createElementVNode("div",u6,[y.createVNode(un,{name:"jiegoushu",size:"24",onClick:ge[0]||(ge[0]=ue=>Z("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),y.createVNode(un,{name:"clipping",size:"24",onClick:ge[1]||(ge[1]=ue=>Z("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),y.createVNode(un,{name:"donghuafangzhen",size:"24",onClick:ge[2]||(ge[2]=ue=>Z("场景树3"))}),y.createVNode(un,{name:"donghuafangzhen",size:"24",onClick:ge[3]||(ge[3]=ue=>Z("场景4"))})]),y.createElementVNode("div",d6,[y.createVNode(un,{name:"donghuafangzhen",size:"24"}),y.createVNode(un,{name:"donghuafangzhen",size:"24"}),y.createVNode(un,{name:"guanjiekongzhi",size:"24",onClick:ge[4]||(ge[4]=ue=>ve("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),y.createVNode(un,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:ge[5]||(ge[5]=ue=>ve("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),y.createVNode(un,{name:"donghuafangzhen",size:"24"}),y.createVNode(un,{name:"donghuafangzhen",size:"24"})]),y.createElementVNode("div",f6,[y.createVNode(un,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(j=g.value)==null?void 0:j.fastBackward},null,8,["onClick"]),y.createVNode(un,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Ee}),y.createVNode(un,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(q=g.value)==null?void 0:q.fastForward},null,8,["onClick"]),y.createVNode(un,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(ne=g.value)==null?void 0:ne.pauseAnimation},null,8,["onClick"]),y.createVNode(un,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(ee=g.value)==null?void 0:ee.resetAll},null,8,["onClick"])]),y.withDirectives(y.createElementVNode("div",p6,[y.createElementVNode("div",m6,[y.createElementVNode("span",null,y.toDisplayString(m.value),1),y.createElementVNode("span",{class:"close",onClick:ge[6]||(ge[6]=ue=>d.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[m.value==="场景树"?(y.openBlock(),y.createBlock(r6,{key:0,model:y.unref(ae)},null,8,["model"])):y.createCommentVNode("",!0),m.value==="剖面视图"?(y.openBlock(),y.createElementBlock("div",g6,[y.createElementVNode("div",_6,[y.createElementVNode("label",v6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":ge[7]||(ge[7]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[8]||(ge[8]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[16]||(ge[16]=y.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),y.createElementVNode("label",y6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":ge[9]||(ge[9]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[10]||(ge[10]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[17]||(ge[17]=y.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),y.createElementVNode("label",x6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":ge[11]||(ge[11]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[12]||(ge[12]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[18]||(ge[18]=y.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),y.createElementVNode("label",M6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":ge[13]||(ge[13]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[14]||(ge[14]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[19]||(ge[19]=y.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):y.createCommentVNode("",!0)]),_:1})],512),[[y.vShow,d.value]]),y.withDirectives(y.createElementVNode("div",b6,[y.createElementVNode("div",S6,[y.createElementVNode("span",null,y.toDisplayString(h.value),1),y.createElementVNode("span",{class:"close",onClick:ge[15]||(ge[15]=ue=>u.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[y.withDirectives(y.createVNode(t6,{ref_key:"jointRef",ref:g,model:y.unref(ae),scene:y.unref(i),animationData:s.animationData},null,8,["model","scene","animationData"]),[[y.vShow,h.value==="关节控制"]]),y.withDirectives(y.createVNode(B4,{animationData:s.animationData},null,8,["animationData"]),[[y.vShow,h.value==="动画仿真"]])]),_:1})],512),[[y.vShow,u.value]]),a.value?(y.openBlock(),y.createElementBlock("div",E6,[ge[20]||(ge[20]=y.createElementVNode("div",{class:"loading-spinner"},null,-1)),y.createElementVNode("p",null,y.toDisplayString(l.value),1)])):y.createCommentVNode("",!0)])}}},mu=Pi._export_sfc(A6,[["__scopeId","data-v-e3790e10"]]),w6={class:"extra-button-content"},T6={class:"table-operator-wrap"},C6={class:"extra-button-filter"},R6={title:"条件查询"},D6={class:"form-content-value"},L6={key:0,class:"extra-header"},P6={__name:"header",props:{compName:{type:String,default:"表格名称",required:!1},buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter"],setup(s,{emit:e}){const t=e,n=s,i=y.ref(""),r=y.ref(!1),o=y.ref([]),a=y.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),l=u=>{var g;const h=(g=o.value)==null?void 0:g.reduce((_,p,f)=>(f===0?_[p.label]=u:_[p.label]=p.value,_),{});t("filter",h)},c=u=>{t("buttonClick",u)},d=u=>{var h,g;o.value=(g=(h=rn.getColumnChild(Oe.cloneDeep(u)))==null?void 0:h.filter(_=>(_==null?void 0:_.label)!==""&&(_==null?void 0:_.label)!=="操作"))==null?void 0:g.map(_=>({label:(_==null?void 0:_.label)??"",value:"",name:(_==null?void 0:_.label)??"",isFormColHidden:_==null?void 0:_.isTableColHidden,width:2}))},m=u=>{var h;if((u==null?void 0:u.buttonName)==="确认"&&t("filter",u==null?void 0:u.content),(u==null?void 0:u.buttonName)==="清空"){const g=Oe.cloneDeep(u==null?void 0:u.content);for(const _ in g)g[_]="";o.value=(h=o.value)==null?void 0:h.map(_=>({..._,value:""})),t("filter",g)}r.value=!1};return y.onMounted(()=>{d(n.columns)}),y.watch(()=>n.columns,()=>{d(n.columns)},{deep:!0,immediate:!0}),(u,h)=>{var f;const g=y.resolveComponent("svg-icon"),_=y.resolveComponent("el-input"),p=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",w6,[y.createElementVNode("div",{class:y.normalizeClass(s.compName?"table-name-wrap":"")},y.toDisplayString(s.compName),3),y.createElementVNode("div",T6,[y.createElementVNode("div",C6,[y.createVNode(Cu,{title:"",width:800,placement:"bottom-start",isVisible:r.value},{reference:y.withCtx(()=>[y.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=v=>i.value=v),style:{width:"240px"},placeholder:"搜索","prefix-icon":y.unref(Pn.search_default),clearable:"",onInput:l},{append:y.withCtx(()=>[y.createElementVNode("span",R6,[y.createVNode(g,{onClick:h[0]||(h[0]=v=>r.value=!r.value),name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","prefix-icon"])]),content:y.withCtx(()=>[y.createElementVNode("div",D6,[(y.openBlock(),y.createBlock(On.ssForm,{rowContents:o.value,buttonValue:a.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:a.value,isStartJustify:!1,onOnButtonClick:m},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),n!=null&&n.buttons&&((f=n==null?void 0:n.buttons)==null?void 0:f.length)>0?(y.openBlock(),y.createElementBlock("div",L6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n==null?void 0:n.buttons,(v,b)=>(y.openBlock(),y.createElementBlock("div",{class:"extra-contents",key:b},[y.createVNode(p,{id:"themeButton",style:y.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}),onClick:S=>c(v==null?void 0:v.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(v==null?void 0:v.label),1)]),_:2},1032,["style","onClick"])]))),128))])):y.createCommentVNode("",!0)])])}}},F6=Pi._export_sfc(P6,[["__scopeId","data-v-e343d690"]]),N6=y.defineComponent({__name:"batch",props:{buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(s,{emit:e}){const t=e,n=i=>{t("buttonClick",i)};return(i,r)=>{const o=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",null,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(s.buttons,a=>{var l;return y.openBlock(),y.createBlock(o,{key:a==null?void 0:a.label,class:y.normalizeClass((l=a==null?void 0:a.label)!=null&&l.includes("删除")?"warning-type":"default-type"),onClick:c=>n(a==null?void 0:a.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(a==null?void 0:a.label),1)]),_:2},1032,["class","onClick"])}),128))])}}}),U6=Pi._export_sfc(N6,[["__scopeId","data-v-73ec704e"]]),I6=Oe.useModelComp(Oe.pinia),{systemPath:g0}=Oe.storeToRefs(I6),ma=y.ref(),_0=new Map;function z6(s,e,t,n,i){const r=async u=>{try{const h=await On.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,b=new cs().parse(f);b.preload(),h(b)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new fn({color:8947848,side:pn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const p=new FileReader;p.onload=async f=>{try{const v=f.target.result;let b=null;h&&h.length>0&&(h.length===1?b=await o(h[0]):b=await a(h));const S=new ls;b&&S.setMaterials(b);const F=S.parse(v);b||F.traverse(C=>{C.isMesh&&(C.material=new fn({color:8947848,side:pn}))}),g(F)}catch(v){_(v)}},p.onerror=()=>{_(new Error("OBJ文件读取失败"))},p.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let p=0;p<u.length;p++){const f=u[p];n.value=`正在加载模型 ${p+1}/${u.length}...`;const v=await r(f.objUrl),b=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([v],b,{type:v.type});let F=[];if(f.mtlUrls){const R=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let P=0;P<R.length;P++){const A=R[P],E=await r(A),L=(A==null?void 0:A.split("/").pop())||`material_${p}_${P}.mtl`,B=new File([E],L,{type:E.type});F.push(B)}}const C=await l(S,F);g.add(C),e.value.push(C),_.push(C)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let p;const f=u.toLowerCase();switch(f){case".txt":case".cpt":case".obj":const v=await h.text();if(f===".txt"||f===".cpt"){const $=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ce=[...v.matchAll($)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),Ke=new hn,He=Ce.flatMap(O=>[O.x,O.y,O.z]);if(Ke.setAttribute("position",new It(He,3)),f===".txt"){const O=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ke,O)}else if(f===".cpt"){const O=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(Ke,O)}}else if(f===".obj"){const $=new ls;if(g&&g.length>0){const pe=new cs;for(const Ce of g){const Ke=await Ce.text(),He=pe.parse(Ke);He.preload(),$.setMaterials(He);break}}p=$.parse(v),(!g||g.length===0)&&p.traverse(pe=>{pe.isMesh&&(pe.material=new fn({color:"#B3B3D4"})),pe instanceof zt&&(pe.material.side=pn)})}break;case".stl":const b=await h.arrayBuffer(),F=new ji().parse(b),C=new fn({color:"#B3B3D4",side:pn});p=new zt(F,C);break;case".nc":const R=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],P={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},A=new Ln,E=R.map($=>new Promise((pe,Ce)=>{new ji().load(g0.value===""?`/model/${$}`:`${g0.value}\\${$}`,He=>{const O=new fn({color:P[$]||"#B3B3D4",side:pn}),_t=new zt(He,O);pe(_t)},void 0,Ce)}));try{(await Promise.all(E)).forEach(pe=>A.add(pe)),p=A}catch($){throw console.error("加载NC文件对应的STL文件失败:",$),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const L=new pu,B=new Ln;try{const $=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),pe=new Blob([$.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ke=new Blob([Ce.data],{type:"application/octet-stream;charset=UTF-8"}),He=await new Promise((_t,dt)=>{const at=URL.createObjectURL(pe);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)}),O=await new Promise((_t,dt)=>{const at=URL.createObjectURL(Ke);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)});B.add(He),B.add(O),p=B}catch($){throw console.error("PCD文件加载失败:",$),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new gc,ae="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",G={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},le=new Map,Z=new Map,ve=new Map,Ee=async $=>{if(le.has($))return console.log(`从缓存加载: ${$}`),le.get($);try{const pe=await Pn.axios.get(`${ae}/${$}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ce=new Blob([pe.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set($,Ce),Ce}catch(pe){throw console.error(`加载文件失败: ${$}`,pe),new Error(`无法加载文件: ${$}`)}},be=($="default")=>{if(Z.has($))return Z.get($);const pe=new fn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Qn});return Z.set($,pe),pe},ge=$=>{try{$.isBufferGeometry&&$.mergeVertices&&$.mergeVertices(),$.computeVertexNormals&&$.computeVertexNormals(),$.computeBoundingSphere&&$.computeBoundingSphere(),$.deleteAttribute&&$.deleteAttribute("uv2")}catch(pe){console.warn("几何体优化失败,使用原始几何体:",pe)}return $},se=async($,pe,Ce)=>{const Ke=`stl_${pe}`;if(ve.has(Ke)){const dt=ve.get(Ke);return new zt(dt,be())}const He=await $.arrayBuffer();let _t=new ji(Ce).parse(He);return _t=ge(_t),ve.set(Ke,_t),new zt(_t,be())},j=async($,pe,Ce)=>{const Ke=`obj_${pe}`;if(le.has(Ke))return le.get(Ke).clone();const He=await $.text(),O=new ls(Ce),_t=pe.replace(".obj",".mtl");try{const Fe=await(await Ee(_t)).text(),Le=new cs(Ce).parse(Fe);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${_t}`)}const dt=O.parse(He);return dt.traverse(at=>{at.isMesh&&(at.geometry=ge(at.geometry),at.castShadow=!0,at.receiveShadow=!0,at.renderOrder=1)}),le.set(Ke,dt),dt},q=($,pe)=>{const Ce=new O0;if(Ce.addLevel($,0),$.geometry){const Ke=$.geometry.clone(),He=new zt(Ke,$.material);Ce.addLevel(He,50)}return Ce};let ne=0,ee=0;const ue=[];Q.loadMeshCb=async($,pe,Ce,Ke,He)=>{const O=$.split("/").pop(),_t=Ce||(()=>{});ne++;const dt=new Promise(async(at,Fe)=>{try{const tt=await Ee(O);if(!tt||tt.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let ot;switch(Le){case"stl":ot=await se(tt,O,pe);break;case"obj":ot=await j(tt,O,pe);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&ot.isMesh&&(ot=q(ot,O)),_t(ot),ee++,Ke&&Ke({loaded:ee,total:ne,progress:ee/ne}),at(ot)}catch(tt){console.error(`mesh文件加载失败: ${O}`,tt);const Le=new Ln;_t(Le),at(Le);const ot=new $i(.1,.1,.1),jt=new j0({color:16711680,wireframe:!0});return new zt(ot,jt)}});ue.push(dt)};try{if(!H){ma.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ne}个mesh文件加载...`),ue.length>0)try{await Promise.allSettled(ue),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ne}`)}catch(Ce){console.warn("部分mesh文件加载失败,但继续显示模型",Ce)}p.traverse(Ce=>{Ce.isMesh&&(Ce.castShadow=!0,Ce.receiveShadow=!0,Ce.renderOrder=1,Ce.material&&(Ce.material.needsUpdate=!0))}),console.time("计算包围盒");const $=new Fn;$.expandByObject(p);const pe=`urdf_${Date.now()}`;p.userData.boundingBox=$.clone(),p.userData.modelId=pe,_0.set(pe,{box:$.clone(),center:$.getCenter(new I),size:$.getSize(new I),maxSize:Math.max(...$.getSize(new I).toArray())}),ma.value=p,console.log("URDF模型加载完成并优化")}catch($){console.error("URDF加载失败:",$),ma.value=void 0}finally{H&&URL.revokeObjectURL(H)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return p};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const p=u[_],f=await d(p.suffix,p.blob,p.mtlBlobs||[],p.meshFiles||[]);f&&(h.add(f),e.value.push(f),g.push(f))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:ma,modelBoundingBoxes:_0}}window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const gu=Oe.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(s){this.selectArray=s},setSelectString(s){this.selectString=s}}}),B6={class:"calculator-content"},O6={class:"calculator-child"},k6={class:"calculator-child"},V6=y.defineComponent({__name:"calculator",setup(s){const e=y.ref(),t=y.ref();return y.onMounted(()=>{e.value=[{type:"Upload",label:"输入",name:"input"}],t.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,i)=>(y.openBlock(),y.createElementBlock("div",B6,[y.createElementVNode("div",O6,[y.createVNode(On.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),y.createElementVNode("div",k6,[y.createVNode(On.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),H6=Pi._export_sfc(V6,[["__scopeId","data-v-73db0fe7"]]),_u=Oe.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(s){this.selectIndex=s},setSelectMenu(s){this.selectMenu=s},setSelectTitle(s){this.selectTitle=s}}}),vu=(s,e)=>{let t=s,n=e;return Array.isArray(t)&&(t=t==null?void 0:t.map((i,r)=>{if(Array.isArray(i)){let o={};return i=i==null?void 0:i.forEach((a,l)=>{var c;(c=n==null?void 0:n[l])!=null&&c.prop?o[n[l].prop]=a:Array.isArray(a)&&(o.children=vu(a,n))}),Object.assign(o,{id:r})}else return i})),t},yu=(s,e,t)=>{let n=s,i=e;return n=n==null?void 0:n.map((r,o)=>{var a,l;return!Array.isArray(r)||!((a=i==null?void 0:i[o])!=null&&a.label)&&!t||(r.unshift(((l=i==null?void 0:i[o])==null?void 0:l.label)??""),r.some(c=>Array.isArray(c))&&(r=r==null?void 0:r.map(c=>{var d;return Array.isArray(c)&&(c=yu(c,(d=i==null?void 0:i[o])==null?void 0:d.children,t)),c}))),r}),n},G6=(s,e,t)=>{if(e==="")return s==null?void 0:s.filter(n=>(n==null?void 0:n.id)!==t);{const n=e.split("-");return W6(s,n,t)}},W6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=n==null?void 0:n.filter(r=>r.id!==t):n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=xu(r,i,t)),r)),n},xu=(s,e,t)=>{var r,o;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=(r=n.children)==null?void 0:r.filter(a=>a.id!==t):n.children=(o=n.children)==null?void 0:o.map(a=>(a.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),a=xu(a,i,t)),a)),n},X6=(s,e,t)=>{if(e==="")return t;{const n=e.split("-");return j6(s,n,t)}},j6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=t:n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=Mu(r,i,t)),r)),n},Mu=(s,e,t)=>{var r;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=t:n.children=(r=n.children)==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Mu(o,i,t)),o)),n},bu=Oe.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Su=Oe.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(s){this.objUrl=s},setBlobUrls(s){this.blobUrls=s}}}),kl=async s=>{var r,o,a,l,c,d,m;let e=(o=(r=Oe.cloneDeep(s))==null?void 0:r.optionUrl)==null?void 0:o.menuSelect,t=[];e==null||e.forEach(u=>{});let n="";const i=await rn.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,p;(u==null?void 0:u.name)===(((p=(_=(g=(h=Oe.cloneDeep(s))==null?void 0:h.optionUrl)==null?void 0:g.groupSelect)==null?void 0:_[0])==null?void 0:p.replaceAll("'",""))??"")&&(n=u==null?void 0:u.id)}),n!==""){const u=(a=i==null?void 0:i[0])==null?void 0:a.compData;let h=(c=(l=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:l.contents)==null?void 0:c.map(_=>_==null?void 0:_.label),g=(m=(d=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:m.map(_=>(_=_==null?void 0:_.filter(p=>!(p!=null&&p.id)),_));g==null||g.forEach(_=>{t.push(rn.getValueToObjectValue(_,h))})}return t},q6={class:"table-content"},$6={class:"menu-config-wrap"},Y6=["onClick"],J6={key:0,class:"viewport-wrap"},K6=["onClick"],Z6={title:"选择显示列信息"},Q6={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","max-height":"300px",width:"300px",overflow:"auto"}},e5={class:"pop-view"},t5={class:"pop-wrapper"},n5={class:"file-list-pop"},i5=["title","onClick"],s5=["onClick"],r5={class:"form-content"},a5={key:0,class:"dialog-footer"},o5={class:"dialog-footer"},l5={__name:"index",props:{compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0}},emits:["change","contentChange","onButtonClick","contentClick","pageChange","rowClick"],setup(s,{emit:e}){const t=y.ref([]),n=Su(Oe.pinia),i=y.ref(null),r=s,o=e,a=y.ref([]),l=y.ref([]),c=y.ref(!1),d=y.ref([]),m=y.ref(!1),u=y.ref(),h=Oe.useMenuState(),{activeMenuPath:g}=Oe.storeToRefs(h),_=bu(Oe.pinia),p=Oe.useModelComp(Oe.pinia),{extraContents:f}=Oe.storeToRefs(p),v=y.ref([]);y.ref(!1);const b=y.ref("");y.ref();const S=y.ref(!0),F=y.ref(0),C=y.ref(!1),R=y.ref(""),P=y.ref(!1),A=y.ref({label:"查看三维模型"}),E=y.ref(!1),L=y.ref(),B=y.ref([]),H=y.ref([]),Q=y.ref(!1),ae=y.ref(),G=y.ref([]),le=y.ref([]),Z=y.ref([]),ve=y.ref(),Ee=y.ref(),be=gu(Oe.pinia),ge=y.ref(),se=_u(Oe.pinia),{selectIndex:j,selectMenu:q,selectTitle:ne}=Oe.storeToRefs(se),{selectString:ee}=Oe.storeToRefs(be),ue=wu.useLoginState(Oe.pinia),{loginUserInfo:$}=Oe.storeToRefs(ue),pe=y.ref(720),Ce=y.ref(!1),Ke=y.ref([]),He=y.ref(),O=y.ref(!0),_t=y.ref(null),dt=Y=>{Ke.value=Y},at=(Y,W)=>{He.value===W?O.value=!1:O.value=!0,He.value=W==null?void 0:W.changeProp},Fe=y.computed(()=>{var Y;return(Y=a.value)==null?void 0:Y.filter(W=>(W==null?void 0:W.label)!=="操作")}),tt=()=>{P.value=!1},Le=Y=>{o("clickTrigger",Y)},ot=async Y=>{var de,_e,me,Be,Te,Re,qe,te,Ve,Xe;const W=Y==null?void 0:Y.row;if((de=W==null?void 0:W.toString())!=null&&de.includes(".urdf")){ae.value=W,c.value=!0;return}let ce=[];if((_e=W==null?void 0:W.toString())!=null&&_e.includes(".stl")||(me=W==null?void 0:W.toString())!=null&&me.includes(".STL")||(Be=W==null?void 0:W.toString())!=null&&Be.includes(".obj")||(Te=W==null?void 0:W.toString())!=null&&Te.includes(".mtl")){let ft,w=[],V={};if(Array.isArray(W)?ft=W:ft=W==null?void 0:W.split(","),ft==null||ft.forEach(X=>{X.includes(".mtl")?w.push(X):V.blob=V.blob?V.blob+","+X:X}),(w==null?void 0:w.length)>0&&(V.mtlBlobs=w),(qe=(Re=Object.values(V))==null?void 0:Re[0])!=null&&qe.includes("http:"))ce.push(V);else{const X=new Blob([V.blob],{type:"application/octet-stream;charset=UTF-8"});let J=URL.createObjectURL(X),z="";(te=W==null?void 0:W.split("/"))==null||te.forEach((fe,ie)=>{var Ae;ie===((Ae=W==null?void 0:W.split("/"))==null?void 0:Ae.length)-1&&(z=fe)}),(Ve=V.blob)!=null&&Ve.includes(".stl")&&(z=(z==null?void 0:z.replaceAll(">",""))+".urdf"),u.value=[{name:z,blobUrl:J}],m.value=!0}}else{const ft=await axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}}),w=new Blob([ft.data],{type:"application/octet-stream;charset=UTF-8"});let V=URL.createObjectURL(w),X="";(Xe=W==null?void 0:W.split("/"))==null||Xe.forEach((J,z)=>{var fe;z===((fe=W==null?void 0:W.split("/"))==null?void 0:fe.length)-1&&(X=J)}),u.value=[{name:X,blobUrl:V}],m.value=!0}(ce==null?void 0:ce.length)>0&&n.setBlobUrls(ce)},jt=Y=>{var de,_e,me,Be;const W=(Be=(de=Y==null?void 0:Y.url)==null?void 0:de.split("."))==null?void 0:Be[((me=(_e=Y==null?void 0:Y.url)==null?void 0:_e.split("."))==null?void 0:me.length)-1];return(Y==null?void 0:Y.name)+"."+W},k=async Y=>{const W=await On.downloadAvatarApi({url:Y==null?void 0:Y.url}),ce=URL.createObjectURL(W.data),_e={name:jt(Y),blobUrl:ce};u.value=[_e],m.value=!0},T=async Y=>{const W=await On.downloadAvatarApi({url:Y==null?void 0:Y.url}),ce=URL.createObjectURL(W.data),_e={name:jt(Y),blobUrl:ce},me=document.createElement("a");me.href=_e.blobUrl,me.download=_e.name,me.style.display="none",document.body.appendChild(me),me.click(),setTimeout(()=>{document.body.removeChild(me)},100)},oe=(Y,W)=>{if(Object.values(W).length!==0)return Object.values(W).find(ce=>{var de,_e,me;return((de=ce==null?void 0:ce.toString())==null?void 0:de.includes(".txt"))||((_e=ce==null?void 0:ce.toString())==null?void 0:_e.includes(".cpt"))||((me=ce==null?void 0:ce.toString())==null?void 0:me.includes(".obj"))})?[...Y,A.value]:Y},Se=Y=>{var _e;ee.value===""?Y==null||Y[0]:(Y==null?void 0:Y.find(me=>(me==null?void 0:me.selectLabel)==="("+ee.value+")"))??(Y==null||Y.find(me=>!(me!=null&&me.selectLabel)));let W=Y;(_e=a.value)!=null&&_e.find(me=>me.prop==="index");let ce=ve.value;const de=[];return W==null||W.forEach((me,Be)=>{var Re;let Te={};if(Array.isArray(me)){let qe=[];me==null||me.filter(te=>!(te!=null&&te.id)).forEach((te,Ve)=>{var Xe,ft,w,V,X;if((Xe=ce==null?void 0:ce[Ve])!=null&&Xe.prop&&!Array.isArray(te)){let J={};J[ce[Ve].column]=te,f!=null&&f.value&&((ft=f==null?void 0:f.value)==null?void 0:ft.length)>0&&((w=f==null?void 0:f.value)!=null&&w.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(J)))&&(qe=(V=f==null?void 0:f.value)==null?void 0:V.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(J))),qe&&qe.length>0?Te[ce[Ve].prop]=qe!=null&&qe.find(z=>{var fe;return((fe=Object.keys(z))==null?void 0:fe[0])===ce[Ve].column})?(X=qe==null?void 0:qe.find(z=>{var fe;return((fe=Object.keys(z))==null?void 0:fe[0])===ce[Ve].column}))==null?void 0:X[ce[Ve].column]:te:Te[ce[Ve].prop]=te}})}else Te=me;Array.isArray(me)&&me.some(qe=>qe==null?void 0:qe.id)?de.push(Object.assign(Te,{id:(Re=me==null?void 0:me.find(qe=>qe.id))==null?void 0:Re.id})):Te.id?de.push(Te):de.push(Object.assign(Te,{id:Be}))}),de},De=async Y=>{var _e,me,Be,Te,Re;let W={};for(let qe in Y)Y[qe]!==""&&(W["tableData."+qe]=Y[qe]);const ce=await rn.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:g.value},W),de=(Be=(me=(_e=Oe.cloneDeep(ce))==null?void 0:_e.data)==null?void 0:me.result)==null?void 0:Be.map(qe=>{var Ve;let te=[];return te.push({id:qe.id}),te.push((Ve=qe==null?void 0:qe.value)==null?void 0:Ve.tableData),te});v.value=Se(rn.getTableContents(de,(Re=(Te=Oe.cloneDeep(a.value))==null?void 0:Te.map(qe=>qe.label))==null?void 0:Re.filter(qe=>qe!=="操作")))},ye=async Y=>{var de,_e,me,Be,Te,Re,qe,te,Ve,Xe,ft,w,V,X;const W=(de=Oe.cloneDeep(a.value))==null?void 0:de.filter(J=>J==null?void 0:J.isRoute);if((W==null?void 0:W.length)>0){let J=(_e=W==null?void 0:W[0])==null?void 0:_e.prop,z=Oe.cloneDeep(g).value+"/"+(Y==null?void 0:Y[J]),fe=Oe.cloneDeep(g).value,ie=await rn.getItemData(z,sessionStorage.getItem("systemKey"),"");if((ie==null?void 0:ie.length)>0)await rn.loadingConstruct(z,z+`/updateLoading${(me=$.value)==null?void 0:me.account}`),p.setRouteToChildPath(fe),h.setActiveMenuPath(z+`/updateLoading${(Be=$.value)==null?void 0:Be.account}`);else{let Ae=(Te=W==null?void 0:W[0])==null?void 0:Te.prop,re=Oe.cloneDeep(g).value+"/"+(Y==null?void 0:Y[Ae]),Ge=Oe.cloneDeep(g).value;await rn.getItemData(Ge+"/",sessionStorage.getItem("systemKey"),""),await rn.loadingConstruct(Ge+"/",re),await rn.loadingConstruct(re,re+`/updateLoading${(Re=$.value)==null?void 0:Re.account}`),p.setRouteToChildPath(Ge),h.setActiveMenuPath(re+`/updateLoading${(qe=$.value)==null?void 0:qe.account}`)}}let ce=await rn.getItemData(g.value,sessionStorage.getItem("systemKey"),Y.id);if(ce=ce==null?void 0:ce.filter(J=>J.comp!=="methodButton"),ce&&ce.length>0){const J=!Array.isArray(ne.value)&&((te=ne.value)==null?void 0:te.key)!=="main"?[]:ne.value;J.push({key:q.value===""?(Ve=Y==null?void 0:Y.id)==null?void 0:Ve.toString():q.value+"-"+((Xe=Y==null?void 0:Y.id)==null?void 0:Xe.toString()),value:Y[(ft=Object.keys(Y))==null?void 0:ft.filter(z=>z!=="index"&&z!=="id")[0]]}),se.setSelectMenu(q.value===""?(w=Y==null?void 0:Y.id)==null?void 0:w.toString():q.value+"-"+((V=Y==null?void 0:Y.id)==null?void 0:V.toString())),se.setSelectTitle(J),se.setSelectIndex((X=Y==null?void 0:Y.id)==null?void 0:X.toString()),o("pageChange",ce)}},vt=Y=>{var W;(W=Oe.cloneDeep(r.itemData))==null||W.map(ce=>((ce==null?void 0:ce.key)==="tableContents"&&(ce.contents=Y),ce))},Ze=async(Y,W,ce,de)=>{var me,Be,Te,Re,qe,te,Ve;if((de==null?void 0:de.data)==="查看"&&(Y!=null&&Y.every(Xe=>(Xe==null?void 0:Xe.url)&&(Xe==null?void 0:Xe.name)))){let Xe=Oe.cloneDeep(Y);Xe=await((me=Oe.cloneDeep(Xe))==null?void 0:me.map(async w=>{var J,z,fe,ie;const V=await On.downloadAvatarApi({url:w==null?void 0:w.url});let X=URL.createObjectURL(V.data);return{name:(w==null?void 0:w.name)+"."+((ie=(J=w==null?void 0:w.url)==null?void 0:J.split("."))==null?void 0:ie[((fe=(z=w==null?void 0:w.url)==null?void 0:z.split("."))==null?void 0:fe.length)-1]),blobUrl:X}}));let ft=await Promise.all(Xe);u.value=ft,m.value=!0}o("contentClick",Y,W,ce,{id:r==null?void 0:r.index,type:"table"});const _e=Oe.cloneDeep(a.value);if((de==null?void 0:de.isMainKey)===!0&&(_e==null?void 0:_e.length)>0){(Be=_e==null?void 0:_e[0])==null||Be.prop;let Xe=Oe.cloneDeep(g).value+"/"+(de==null?void 0:de.data),ft=Oe.cloneDeep(g).value,w=await rn.getItemData(Xe,sessionStorage.getItem("systemKey"),"");if((w==null?void 0:w.length)>0)await rn.loadingConstruct(Xe,Xe+`/updateLoading${(Te=$.value)==null?void 0:Te.account}`),p.setRouteToChildPath(ft),h.setActiveMenuPath(Xe+`/updateLoading${(Re=$.value)==null?void 0:Re.account}`);else{(qe=_e==null?void 0:_e[0])==null||qe.prop;let V=Oe.cloneDeep(g).value+"/"+(de==null?void 0:de.data),X=Oe.cloneDeep(g).value;await rn.getItemData(X+"/",sessionStorage.getItem("systemKey"),""),await rn.loadingConstruct(X+"/",V),await rn.loadingConstruct(V,V+`/updateLoading${(te=$.value)==null?void 0:te.account}`),p.setRouteToChildPath(X),h.setActiveMenuPath(V+`/updateLoading${(Ve=$.value)==null?void 0:Ve.account}`)}}},mt=()=>{m.value=!1},yt=Y=>{o("rowClick",Y)};y.watch(()=>r.changedContent,()=>{var ce,de;if(!r.changedContent)return;let Y=(ce=v.value)==null?void 0:ce.map(_e=>{var me;return _e.id===((me=r.changedContent)==null?void 0:me.id)&&(_e={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete _e.newId),_e});const W=(de=r.itemData)==null?void 0:de.map(_e=>((_e==null?void 0:_e.key)==="tableContents"&&(_e.contents=Y),_e));v.value=Y,o("contentChange",{contents:W,index:r.index}),o("change",{content:Y,index:r==null?void 0:r.index,buttonName:"",id:r==null?void 0:r.index})},{deep:!0,immediate:!0});const Ue=()=>{},st=(Y,W,ce)=>{var de,_e,me,Be,Te,Re,qe,te;if(b.value="",Q.value=!0,S.value=!0,o("onButtonClick",Y,W),Y==="删除"){v.value=(de=Oe.cloneDeep(v.value))==null?void 0:de.filter(Xe=>(Xe==null?void 0:Xe.id)!==(W==null?void 0:W.id));const Ve=G6(ge.value,q.value,W==null?void 0:W.id);vt(Ve),o("change",{content:v.value,singleContent:W,index:r==null?void 0:r.index,type:"delete",buttonName:Y,column:a.value})}else if(Y==="批量删除"){if(((_e=Ke.value)==null?void 0:_e.length)===0)return Pn.ElMessage.warning("请先勾选操作的数据");o("change",{content:v.value,singleContent:null,selectItems:Ke.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:Y,column:a.value})}else if(Y==="复制新增"){R.value="新增";const Ve=Oe.cloneDeep(W),Xe=(me=a.value)==null?void 0:me.find(V=>V==null?void 0:V.isMainKey),ft=Xe||((Be=a.value)==null?void 0:Be[0]),w=(Te=le.value)==null?void 0:Te.find(V=>(V==null?void 0:V.label)==="新建");Lt(!0,w,{data:Ve,firstCol:ft})}else if(Y==="新增")R.value="新增",$e(""),P.value=!0;else if(Y==="编辑")R.value="编辑",$e(W),P.value=!0;else if(Y==="查看")R.value="查看",$e(W),Q.value=!1,S.value=!1,P.value=!0;else if(Y==="查看三维模型"){const Ve={};for(let ft in W)ft!=="id"&&(Ve[ft]=W[ft]);let Xe=(Re=Object.values(Ve))==null?void 0:Re[1];_.setTableShowThree(Xe)}else if(((qe=ce==null?void 0:ce.extra)==null?void 0:qe.type)==="modelExample")R.value=Y,E.value=!0;else if(Y==="新建"){const Ve=(te=le.value)==null?void 0:te.find(Xe=>(Xe==null?void 0:Xe.label)==="新建");Lt(!1,Ve)}else if(Y==="修改模板"){let Ve=Oe.cloneDeep(g).value;p.setRouteToChildPath(Ve),h.setActiveMenuPath(Ve+"/")}},Rt=async Y=>{var ce,de,_e,me,Be,Te;const W=await Pn.getInsofDataApi({key:{pageKey:Y,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((ce=W==null?void 0:W.data)==null?void 0:ce.code)===200)return Array.isArray((de=W==null?void 0:W.data)==null?void 0:de.result)&&((me=(_e=W==null?void 0:W.data)==null?void 0:_e.result)==null?void 0:me.length)>0?(Te=(Be=W==null?void 0:W.data)==null?void 0:Be.result)==null?void 0:Te.map(Re=>{var qe;return{id:Re==null?void 0:Re.id,...(qe=Re==null?void 0:Re.value)==null?void 0:qe.pageData}}):[]},At=(Y,W,ce,de)=>{var _e;o("contentChange",{contents:(_e=Y==null?void 0:Y.compData)==null?void 0:_e.map(me=>{var Be;return(me==null?void 0:me.key)==="formContent"?{...me,contents:(Be=me==null?void 0:me.contents)==null?void 0:Be.map(Te=>(Te==null?void 0:Te.key)===W?{...Te,value:ce}:Te)}:me}),index:Y==null?void 0:Y.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(de)},Ye=(Y,W)=>{let ce=Y==null?void 0:Y[W==null?void 0:W.prop],de=1;if(v.value.some(_e=>(_e==null?void 0:_e[W==null?void 0:W.prop])===ce)){const _e=ce;for(;v.value.some(me=>(me==null?void 0:me[W==null?void 0:W.prop])===`${_e}(${de})`);)de++;ce=`${_e}(${de})`}return ce},Lt=async(Y,W,ce)=>{var Be,Te,Re,qe,te;let de,_e;const me=Ye(ce==null?void 0:ce.data,ce==null?void 0:ce.firstCol);if(Y?(de=Oe.cloneDeep(g).value+"/"+((Re=ce==null?void 0:ce.data)==null?void 0:Re[(Te=ce==null?void 0:ce.firstCol)==null?void 0:Te.prop]),_e=Oe.cloneDeep(g).value+"/"+me):(de=Oe.cloneDeep(g).value+"/",_e=Oe.cloneDeep(de)+`loading${(Be=$.value)==null?void 0:Be.account}`),W){const Ve=await rn.getItemData(_e,sessionStorage.getItem("systemKey"),"");if((Ve==null?void 0:Ve.length)>0)if(Y){const Xe=Ve==null?void 0:Ve.find(ft=>{var w;return((w=ft==null?void 0:ft.comp)==null?void 0:w.toUpperCase())==="FORM"});Xe&&At(Xe,(qe=ce==null?void 0:ce.firstCol)==null?void 0:qe.label,me,g.value)}else p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(_e);else if(await rn.loadingConstruct(de,_e),Y){const Xe=await Rt(_e);if((Xe==null?void 0:Xe.length)>0){const ft=Xe==null?void 0:Xe.find(w=>{var V;return((V=w==null?void 0:w.comp)==null?void 0:V.toUpperCase())==="FORM"});ft&&At(ft,(te=ce==null?void 0:ce.firstCol)==null?void 0:te.label,me,g.value)}}else p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(_e)}else Y?(b.value="",Ee.value=ce==null?void 0:ce.data,ze(!0,ce==null?void 0:ce.firstCol,me)):(p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(_e))},K=()=>{c.value=!1,ae.value=null},$e=Y=>{var _e,me,Be,Te,Re,qe;const W=[];let ce=[];for(let te in Y)Array.isArray(Y==null?void 0:Y[te])&&ce.push(te);l.value=Oe.cloneDeep(a.value),(me=rn.getColumnChild((_e=Oe.cloneDeep(a.value))==null?void 0:_e.filter(te=>(te==null?void 0:te.label)!=="操作")))==null||me.forEach((te,Ve)=>{var Xe;ce.find(ft=>ft===(te==null?void 0:te.prop))||(te!=null&&te.formType&&((Xe=te==null?void 0:te.formType)==null?void 0:Xe.toUpperCase())==="SELECT"?W.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+Ve,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(Y==null?void 0:Y[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??Ve,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden,optionUrl:{groupSelect:te==null?void 0:te.groupSelect,menuSelect:te==null?void 0:te.formMenuSelect,type:"Select",selectRelateType:te==null?void 0:te.selectRelateType}}):W.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+Ve,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(Y==null?void 0:Y[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??Ve,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden}))}),Y===""||!Y||(b.value=(Y==null?void 0:Y.id)??"");let de=rn.getColumnChild((Be=Oe.cloneDeep(a.value))==null?void 0:Be.filter(te=>(te==null?void 0:te.label)!=="操作"));B.value&&((Te=B.value)==null?void 0:Te.length)>0&&(B.value=(Re=Oe.cloneDeep(B).value)==null?void 0:Re.map(te=>{var Xe;let Ve=(Xe=de==null?void 0:de.find(ft=>(ft==null?void 0:ft.label)===(te==null?void 0:te.label)))==null?void 0:Xe.prop;return Ve&&(te.value=Y[Ve]),te})),Z.value=B.value&&((qe=B.value)==null?void 0:qe.length)>0?rn.getTableFormToForm(B.value):W},Ie=async()=>{var W;await y.nextTick();const Y=(W=i.value)==null?void 0:W.$el;Y&&rn.Sortable.create(Y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ce=>{var Be;const{oldIndex:de,newIndex:_e}=ce;if(de===_e)return;const me=Fe.value.splice(de,1)[0];Fe.value.splice(_e,0,me),a.value=(Be=a.value)==null?void 0:Be.slice().sort((Te,Re)=>{var qe,te;return Te.label==="操作"?1:Re.label==="操作"?-1:((qe=Fe.value)==null?void 0:qe.indexOf(Te))-((te=Fe.value)==null?void 0:te.indexOf(Re))})}})};y.onMounted(()=>{L.value=window.innerWidth-240*2});const ut=()=>{y.nextTick(()=>{Ie()})},ze=(Y=!0,W,ce)=>{var Be;console.log(456,Y,Ee.value,b.value);let de=rn.getColumnChild((Be=Oe.cloneDeep(a.value))==null?void 0:Be.filter(Te=>(Te==null?void 0:Te.label)!=="操作")),_e,me=Oe.cloneDeep(v.value);if(!Ee.value){P.value=!1;return}if(b.value===""){F.value++;let Te;W&&ce?Te={id:F.value,[W==null?void 0:W.prop]:ce}:Te={id:F.value},me.push(Object.assign(Ee.value,Te)),_e=Object.assign(Ee.value,Te)}else me=me==null?void 0:me.map(Te=>{var Re,qe;if((Te==null?void 0:Te.id)===b.value){let te={};for(let Ve in Te){let Xe=(Re=de==null?void 0:de.find(ft=>(ft==null?void 0:ft.prop)===Ve))==null?void 0:Re.label;Xe?te[Ve]=(qe=Ee.value)==null?void 0:qe[Xe]:te[Ve]=Te[Ve]}Te=Object.assign(te,Ee.value),_e=Te}return Te});if(v.value=me,Y){const Te=X6(ge.value,q.value,me);vt(Te),P.value=!1,Ee.value=void 0,p.setCacheUpdatingData({content:Te,singleContent:_e,index:r==null?void 0:r.index,buttonName:R.value,column:a.value}),_t.value={content:Te,singleContent:_e,index:r==null?void 0:r.index,buttonName:R.value,column:a.value},o("change",_t.value)}},we=async(Y,W,ce)=>{var qe,te,Ve,Xe,ft,w,V,X,J,z,fe;He.value=ce==null?void 0:ce.prop;const de=Oe.cloneDeep(r.itemData),_e=de==null?void 0:de.map(ie=>{var Ae;return(ie==null?void 0:ie.key)==="header"&&((Ae=ie.contents)==null||Ae.map((re,Ge)=>{var Me,Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt,cn,We,Pt,Ot,Jt,sn,Kt;return re.type=re!=null&&re.type?re.type:(Mt=(it=(Pe=(Me=re==null?void 0:re.key)==null?void 0:Me.split("$"))==null?void 0:Pe[1])==null?void 0:it.split("("))!=null&&Mt[0]?(bt=(Ct=rn.FormType)==null?void 0:Ct.find(rt=>{var ke,ht,xn,x;return(rt==null?void 0:rt.key)===((x=(xn=(ht=(ke=re==null?void 0:re.key)==null?void 0:ke.split("$"))==null?void 0:ht[1])==null?void 0:xn.split("("))==null?void 0:x[0])}))==null?void 0:bt.value:"Input",re.options=re!=null&&re.options?re.options:((Wt=(Qe=(St=re==null?void 0:re.key)==null?void 0:St.split("$"))==null?void 0:Qe[1])==null?void 0:Wt.length)>0?(cn=(Bt=Ho((nn=(Nt=re==null?void 0:re.key)==null?void 0:Nt.split("$"))==null?void 0:nn[1]))==null?void 0:Bt.split(","))==null?void 0:cn.map(rt=>({label:rt,value:rt})):[],(We=re==null?void 0:re.key)!=null&&We.includes("$")&&(re.key=(Ot=(Pt=re==null?void 0:re.key)==null?void 0:Pt.split("$"))==null?void 0:Ot[0]),re.value=(Jt=Object.values(W))==null?void 0:Jt[Ge],re.optionUrl=re!=null&&re.formMenuSelect&&((sn=re==null?void 0:re.formMenuSelect)==null?void 0:sn.length)>0?{groupSelect:(Kt=re==null?void 0:re.groupSelect)==null?void 0:Kt.split(/[::]/).map(rt=>rt.trim()),menuSelect:re==null?void 0:re.formMenuSelect,selectRelateType:"",type:(re==null?void 0:re.formType)??(re!=null&&re.groupSelect?"Select":"")}:null,re})),ie});let me=Oe.cloneDeep(Z.value),Be=(te=(qe=Oe.cloneDeep(_e))==null?void 0:qe.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:te.contents;me=me==null?void 0:me.map(ie=>{var Ae;return ie.value=(Ae=Be==null?void 0:Be.find((re,Ge)=>Ge===(ie==null?void 0:ie.id)))==null?void 0:Ae.value,ie});let Te="",Re=(ft=(Xe=(Ve=Oe.cloneDeep(_e))==null?void 0:Ve.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Xe.contents)==null?void 0:ft.find((ie,Ae)=>{var re,Ge,Me;return(ie==null?void 0:ie.label)===He.value||(Ae==null?void 0:Ae.toString())===((Me=(Ge=(re=He.value)==null?void 0:re.split("a"))==null?void 0:Ge[1])==null?void 0:Me.toString())});if((X=(V=(w=Oe.cloneDeep(_e))==null?void 0:w.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:V.contents)==null||X.forEach(ie=>{var Ae,re,Ge,Me,Pe;Te===""&&((Ge=(re=(Ae=ie==null?void 0:ie.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:re[1])!=null&&Ge.includes("["))&&(Te=(Pe=(Me=ie==null?void 0:ie.optionUrl)==null?void 0:Me.groupSelect)==null?void 0:Pe[1])}),(J=Re==null?void 0:Re.optionUrl)!=null&&J.menuSelect){let ie=await kl(Re),Ae;if(ie==null||ie.forEach(re=>{var Ge,Me,Pe,it,Mt,Ct,bt,St,Qe,Wt;Te===((Me=(Ge=Re==null?void 0:Re.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Me[1])&&((Mt=(it=(Pe=Re==null?void 0:Re.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])!=null&&Mt.includes("["))&&((Wt=Oe.cloneDeep(re))==null?void 0:Wt[(Qe=(St=(bt=(Ct=Re==null?void 0:Re.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:bt[1])==null?void 0:St.replaceAll("[",""))==null?void 0:Qe.replaceAll("]","")])===(Re==null?void 0:Re.value)&&(Ae=re)}),Ae){let re=Oe.cloneDeep(me);re=re==null?void 0:re.map(Me=>{var Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt;return(Ae!=null&&Ae[Me==null?void 0:Me.label]||Ae!=null&&Ae[(Ct=(Mt=(it=(Pe=Me==null?void 0:Me.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])==null?void 0:Mt.replaceAll("[",""))==null?void 0:Ct.replaceAll("]","")])&&((Qe=(St=(bt=Me==null?void 0:Me.optionUrl)==null?void 0:bt.groupSelect)==null?void 0:St[1])!=null&&Qe.includes("["))&&(Me.value=(Ae==null?void 0:Ae[Me==null?void 0:Me.label])||(Ae==null?void 0:Ae[(Bt=(nn=(Nt=(Wt=Me==null?void 0:Me.optionUrl)==null?void 0:Wt.groupSelect)==null?void 0:Nt[1])==null?void 0:nn.replaceAll("[",""))==null?void 0:Bt.replaceAll("]","")])),Me}),v.value=(z=Oe.cloneDeep(v.value))==null?void 0:z.map(Me=>{if((Me==null?void 0:Me.id)===(W==null?void 0:W.id)){const Pe={};return re==null||re.forEach(it=>{Pe[it.name]=it.value}),Pe.id=Me==null?void 0:Me.id,Pe}return Me});let Ge=Oe.cloneDeep(re);Ge=Ge==null?void 0:Ge.map(Me=>{var Pe,it,Mt,Ct;return(it=(Pe=Me==null?void 0:Me.optionUrl)==null?void 0:Pe.menuSelect)!=null&&it.some(bt=>bt==null?void 0:bt.includes)&&(Me.optionUrl.menuSelect=(Ct=(Mt=Me==null?void 0:Me.optionUrl)==null?void 0:Mt.menuSelect)==null?void 0:Ct.map(bt=>{var St,Qe,Wt,Nt;if(bt!=null&&bt.includes("[")){let nn=(Qe=(St=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:St.split(":"))==null?void 0:Qe[1];bt=(Nt=(Wt=Oe.cloneDeep(re))==null?void 0:Wt.find(Bt=>(Bt==null?void 0:Bt.label)===nn))==null?void 0:Nt.value}return bt})),Me}),v.value=(fe=Oe.cloneDeep(v.value))==null?void 0:fe.map(Me=>{if((Me==null?void 0:Me.id)===(W==null?void 0:W.id)){const Pe={};return Ge==null||Ge.forEach(it=>{Pe[it.name]=it.value}),Pe.id=Me==null?void 0:Me.id,Pe}return Me})}}},pt=async Y=>{var Te,Re,qe,te,Ve,Xe,ft,w,V;if(!Y)return;Ee.value=Y,o("onFormChange",Y);const W=Oe.cloneDeep(r.itemData),ce=W==null?void 0:W.map(X=>{var J;return(X==null?void 0:X.key)==="header"&&((J=X.contents)==null||J.map((z,fe)=>{var ie,Ae,re,Ge,Me,Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt,cn,We,Pt;return z.type=z!=null&&z.type?z.type:(Ge=(re=(Ae=(ie=z==null?void 0:z.key)==null?void 0:ie.split("$"))==null?void 0:Ae[1])==null?void 0:re.split("("))!=null&&Ge[0]?(Pe=(Me=rn.FormType)==null?void 0:Me.find(Ot=>{var Jt,sn,Kt,rt;return(Ot==null?void 0:Ot.key)===((rt=(Kt=(sn=(Jt=z==null?void 0:z.key)==null?void 0:Jt.split("$"))==null?void 0:sn[1])==null?void 0:Kt.split("("))==null?void 0:rt[0])}))==null?void 0:Pe.value:"Input",z.options=z!=null&&z.options?z.options:((Ct=(Mt=(it=z==null?void 0:z.key)==null?void 0:it.split("$"))==null?void 0:Mt[1])==null?void 0:Ct.length)>0?(Wt=(Qe=Ho((St=(bt=z==null?void 0:z.key)==null?void 0:bt.split("$"))==null?void 0:St[1]))==null?void 0:Qe.split(","))==null?void 0:Wt.map(Ot=>({label:Ot,value:Ot})):[],(Nt=z==null?void 0:z.key)!=null&&Nt.includes("$")&&(z.key=(Bt=(nn=z==null?void 0:z.key)==null?void 0:nn.split("$"))==null?void 0:Bt[0]),z.value=(cn=Object.values(Y))==null?void 0:cn[fe],z.optionUrl=z!=null&&z.formMenuSelect&&((We=z==null?void 0:z.formMenuSelect)==null?void 0:We.length)>0?{groupSelect:(Pt=z==null?void 0:z.groupSelect)==null?void 0:Pt.split(/[::]/).map(Ot=>Ot.trim()),menuSelect:z==null?void 0:z.formMenuSelect,selectRelateType:"",type:(z==null?void 0:z.formType)??(z!=null&&z.groupSelect?"Select":"")}:null,z})),X});let de=Oe.cloneDeep(Z.value),_e=(Re=(Te=Oe.cloneDeep(ce))==null?void 0:Te.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Re.contents;if(de=de==null?void 0:de.map(X=>{var J;return X.value=(J=_e==null?void 0:_e.find((z,fe)=>fe===(X==null?void 0:X.id)))==null?void 0:J.value,X}),!O.value)return;let me="",Be=(Ve=(te=(qe=Oe.cloneDeep(ce))==null?void 0:qe.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:te.contents)==null?void 0:Ve.find((X,J)=>{var z,fe;return(X==null?void 0:X.label)===He.value||(J==null?void 0:J.toString())===((fe=(z=He.value)==null?void 0:z.split("a"))==null?void 0:fe[1].toString())});if((w=(ft=(Xe=Oe.cloneDeep(ce))==null?void 0:Xe.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:ft.contents)==null||w.forEach(X=>{var J,z,fe,ie,Ae;me===""&&((fe=(z=(J=X==null?void 0:X.optionUrl)==null?void 0:J.groupSelect)==null?void 0:z[1])!=null&&fe.includes("["))&&(me=(Ae=(ie=X==null?void 0:X.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:Ae[1])}),(V=Be==null?void 0:Be.optionUrl)!=null&&V.menuSelect&&O.value){let X=await kl(Be),J;if(X==null||X.forEach(z=>{var fe,ie,Ae,re,Ge,Me,Pe,it,Mt,Ct;me===((ie=(fe=Be==null?void 0:Be.optionUrl)==null?void 0:fe.groupSelect)==null?void 0:ie[1])&&((Ge=(re=(Ae=Be==null?void 0:Be.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:re[1])!=null&&Ge.includes("["))&&((Ct=Oe.cloneDeep(z))==null?void 0:Ct[(Mt=(it=(Pe=(Me=Be==null?void 0:Be.optionUrl)==null?void 0:Me.groupSelect)==null?void 0:Pe[1])==null?void 0:it.replaceAll("[",""))==null?void 0:Mt.replaceAll("]","")])===(Be==null?void 0:Be.value)&&(J=z)}),J){let z=Oe.cloneDeep(de);z=z==null?void 0:z.map(ie=>{var Ae,re,Ge,Me,Pe,it,Mt,Ct,bt,St,Qe;return(J!=null&&J[ie==null?void 0:ie.label]||J!=null&&J[(Me=(Ge=(re=(Ae=ie==null?void 0:ie.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:re[1])==null?void 0:Ge.replaceAll("[",""))==null?void 0:Me.replaceAll("]","")])&&((Mt=(it=(Pe=ie==null?void 0:ie.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])!=null&&Mt.includes("["))&&(ie.value=(J==null?void 0:J[ie==null?void 0:ie.label])||(J==null?void 0:J[(Qe=(St=(bt=(Ct=ie==null?void 0:ie.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:bt[1])==null?void 0:St.replaceAll("[",""))==null?void 0:Qe.replaceAll("]","")])),ie}),Z.value=z;let fe=Oe.cloneDeep(z);fe=fe==null?void 0:fe.map(ie=>{var Ae,re,Ge,Me;return(re=(Ae=ie==null?void 0:ie.optionUrl)==null?void 0:Ae.menuSelect)!=null&&re.some(Pe=>Pe==null?void 0:Pe.includes)&&(ie.optionUrl.menuSelect=(Me=(Ge=ie==null?void 0:ie.optionUrl)==null?void 0:Ge.menuSelect)==null?void 0:Me.map(Pe=>{var it,Mt,Ct,bt;if(Pe!=null&&Pe.includes("[")){let St=(Mt=(it=Pe==null?void 0:Pe.replaceAll("[","").replaceAll("]",""))==null?void 0:it.split(":"))==null?void 0:Mt[1];Pe=(bt=(Ct=Oe.cloneDeep(z))==null?void 0:Ct.find(Qe=>(Qe==null?void 0:Qe.label)===St))==null?void 0:bt.value}return Pe})),ie}),Z.value=fe}}O.value=!1},Ft=Y=>Y?(Y==null?void 0:Y.toUpperCase())==="INPUT"?"TEXTAREA":Y:"TEXTAREA",Qt=Y=>{var me,Be;const W=(Be=(me=B.value)==null?void 0:me.find(Te=>(Te==null?void 0:Te.label)===(Y==null?void 0:Y.label)))==null?void 0:Be.multiple,ce=Y==null?void 0:Y.prop;if((Y==null?void 0:Y.formType)!="Select")return;v.value.forEach(Te=>{const Re=Te==null?void 0:Te[ce];W&&Vo(Re)&&(Te[ce]=[Re]),!W&&!Vo(Re)&&(Te[ce]="")})},Ut=Y=>{var ce,de,_e,me,Be,Te;$e("");const W=(ce=Z.value)==null?void 0:ce.reduce((Re,qe)=>(Re[qe.name]=qe.value,Re),{});((de=Object.keys(W))==null?void 0:de.length)>0&&(Ee.value=W,b.value="",F.value=(_e=v.value)==null?void 0:_e.length,G.value=(me=le.value)==null?void 0:me.filter(Re=>(Re==null?void 0:Re.label)!=="新增"),a.value=(Te=(Be=l.value)==null?void 0:Be.filter(Re=>(Re==null?void 0:Re.label)!=="操作"))==null?void 0:Te.map(Re=>{var te,Ve,Xe;const qe=(Ve=(te=B.value)==null?void 0:te.find(ft=>(ft==null?void 0:ft.label)===(Re==null?void 0:Re.label)))==null?void 0:Ve.multiple;return Qt(Re),{...Re,type:"edit",optionUrl:Re!=null&&Re.formMenuSelect&&((Xe=Re==null?void 0:Re.formMenuSelect)==null?void 0:Xe.length)>0?{groupSelect:Re==null?void 0:Re.groupSelect,menuSelect:Re==null?void 0:Re.formMenuSelect,selectRelateType:"",type:Re==null?void 0:Re.formType,multiple:qe}:null,columnType:Ft(Re==null?void 0:Re.formType)}}),Y==="createClick"&&ze(!1))};y.watch(()=>[r.itemData,ee.value,j.value,q.value,f==null?void 0:f.value],()=>{var Re,qe,te,Ve,Xe,ft,w,V,X,J,z,fe,ie,Ae,re,Ge,Me,Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt,cn;const Y=(Re=Oe.cloneDeep(r.itemData))==null?void 0:Re.filter(We=>(We==null?void 0:We.key)==="header");(qe=Oe.cloneDeep(r.itemData))==null||qe.filter(We=>(We==null?void 0:We.key)==="tableIndexColumn")[0];const W=(te=Oe.cloneDeep(r.itemData))==null?void 0:te.find(We=>(We==null?void 0:We.key)==="page"),ce=(Ve=Oe.cloneDeep(r.itemData))==null?void 0:Ve.find(We=>(We==null?void 0:We.key)==="rowButton"),de=(Xe=Oe.cloneDeep(r.itemData))==null?void 0:Xe.find(We=>(We==null?void 0:We.key)==="extraButton"),_e=(ft=Oe.cloneDeep(r.itemData))==null?void 0:ft.filter(We=>(We==null?void 0:We.key)==="tableContents"),me=(w=Oe.cloneDeep(r.itemData))==null?void 0:w.filter(We=>(We==null?void 0:We.key)==="tableIndex");B.value=(J=(X=(V=Oe.cloneDeep(r.itemData))==null?void 0:V.filter(We=>(We==null?void 0:We.key)==="tableToForm"))==null?void 0:X[0])==null?void 0:J.contents,C.value=(W==null?void 0:W.contents)??!1;let Be=[];ee.value===""?Be=Y==null?void 0:Y[0]:Be=(Y==null?void 0:Y.find(We=>(We==null?void 0:We.selectLabel)==="("+ee.value+")"))??(Y==null?void 0:Y.find(We=>!(We!=null&&We.selectLabel)));let Te=[];if(ee.value===""?Te=me==null?void 0:me[0]:Te=(me==null?void 0:me.find(We=>(We==null?void 0:We.selectLabel)==="("+ee.value+")"))??(me==null?void 0:me.find(We=>!(We!=null&&We.selectLabel))),((z=Be==null?void 0:Be.contents)==null?void 0:z.length)>0){let We=[];if(Be!=null&&Be.contents.some(rt=>Array.isArray(rt)&&(rt==null?void 0:rt.find(ke=>ke.children))))q.value===""?We=(ie=(fe=rn.getGradeColumns(Oe.cloneDeep(Be==null?void 0:Be.contents)))==null?void 0:fe[0])==null?void 0:ie.filter(rt=>!Array.isArray(rt)):(q.value.split("-"),We=(Ae=rn.getGradeColumns(Oe.cloneDeep(Be==null?void 0:Be.contents)))==null?void 0:Ae[0]);else{const rt=Be!=null&&Be.contents.some(ke=>Array.isArray(ke))?(re=Be==null?void 0:Be.contents)==null?void 0:re[0]:Be==null?void 0:Be.contents;rt==null||rt.forEach((ke,ht)=>{var xn;We.push({label:(ke==null?void 0:ke.label)??"",prop:(ke==null?void 0:ke.label)==="操作"?"operate":(ke==null?void 0:ke.prop)??"a"+ht,width:ke!=null&&ke.width?parseInt(ke.width):"",fixed:(ke==null?void 0:ke.fixed)??void 0,sortable:(ke==null?void 0:ke.sortable)??!1,align:(ke==null?void 0:ke.align)??"left",showOverflowTooltip:(ke==null?void 0:ke.showOverflowTooltip)??!0,isNotDrag:(ke==null?void 0:ke.isNotDrag)??!1,isEditCol:(ke==null?void 0:ke.isEditCol)??!1,isOperate:(ke==null?void 0:ke.isOperate)??!1,id:(ke==null?void 0:ke.id)??ht,type:(ke==null?void 0:ke.label)==="操作"?"operate":void 0,formType:(ke==null?void 0:ke.formType)??(ke!=null&&ke.groupSelect?"Select":""),isTableColHidden:ke==null?void 0:ke.isTableColHidden,isFormColHidden:ke==null?void 0:ke.isFormColHidden,options:(ke==null?void 0:ke.options)??[],value:(ke==null?void 0:ke.value)??"",formMenuSelect:(ke==null?void 0:ke.formMenuSelect)??[],isRoute:(ke==null?void 0:ke.isRoute)??!1,groupSelect:ke!=null&&ke.groupSelect?(xn=ke==null?void 0:ke.groupSelect)==null?void 0:xn.replaceAll('"',"").split(":"):[],isMainKey:ke==null?void 0:ke.isMainKey})})}a.value=We,d.value=We,t.value=(Ge=a.value)==null?void 0:Ge.map(rt=>rt==null?void 0:rt.label);let Pt=(Pe=(Me=rn.getAllLeafNodes(Oe.cloneDeep(a.value)))==null?void 0:Me.filter(rt=>(rt==null?void 0:rt.type)!=="operate"))==null?void 0:Pe.map((rt,ke)=>({prop:(rt==null?void 0:rt.prop)??"a"+ke,column:rt.label}));ve.value=Pt;let Ot=[];ee.value===""?Ot=_e==null?void 0:_e[0]:Ot=(_e==null?void 0:_e.find(rt=>(rt==null?void 0:rt.selectLabel)==="("+ee.value+")"))??(_e==null?void 0:_e.find(rt=>!(rt!=null&&rt.selectLabel)));let Jt=Array.isArray((it=Ot==null?void 0:Ot.contents)==null?void 0:it[0])&&((Mt=Ot==null?void 0:Ot.contents)!=null&&Mt[0].every(rt=>Array.isArray(rt)))?(Ct=Oe.cloneDeep(Ot==null?void 0:Ot.contents))==null?void 0:Ct[0]:Oe.cloneDeep(Ot==null?void 0:Ot.contents);Te!=null&&Te.contents&&((bt=Te==null?void 0:Te.contents)==null?void 0:bt.length)!==0&&(Jt=(St=Oe.cloneDeep(Jt))==null?void 0:St.map((rt,ke)=>{if(!Array.isArray(rt)){let ht={};for(let xn in rt)xn!=="id"&&xn!=="index"&&(ht[xn]=rt[xn]);rt=Object.values(ht)}return rt}));const sn=!!((Qe=a.value)!=null&&Qe.find(rt=>rt.prop==="index"));Jt=yu(Oe.cloneDeep(Jt),Te==null?void 0:Te.contents,sn);const Kt=[];Jt==null||Jt.forEach((rt,ke)=>{var xn;let ht={};if(Array.isArray(rt)){let x=[];rt==null||rt.filter(M=>!(M!=null&&M.id)).forEach((M,N)=>{var D,U,he,xe,lt,je;if((D=Pt==null?void 0:Pt[N])!=null&&D.prop&&!Array.isArray(M)){let nt={};nt[Pt[N].column]=M,f!=null&&f.value&&((U=f==null?void 0:f.value)==null?void 0:U.length)>0&&((he=f==null?void 0:f.value)!=null&&he.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(nt)))&&(x=(xe=f==null?void 0:f.value)==null?void 0:xe.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(nt))),x&&x.length>0?ht[Pt[N].prop]=x!=null&&x.find(ct=>{var Ne;return((Ne=Object.keys(ct))==null?void 0:Ne[0])===Pt[N].column})?(lt=x==null?void 0:x.find(ct=>{var Ne;return((Ne=Object.keys(ct))==null?void 0:Ne[0])===Pt[N].column}))==null?void 0:lt[Pt[N].column]:M:ht[Pt[N].prop]=M}else Array.isArray(M)&&((je=Pt[N])!=null&&je.prop?ht[Pt[N].prop]=M:ht.children=vu(M,Pt))})}else ht=rt;Array.isArray(rt)&&rt.some(x=>x==null?void 0:x.id)?Kt.push(Object.assign(ht,{id:(xn=rt==null?void 0:rt.find(x=>x.id))==null?void 0:xn.id})):ht.id?Kt.push(ht):Kt.push(Object.assign(ht,{id:ke.toString()}))}),v.value=Kt}else a.value=[],l.value=[],v.value=[];((Wt=ce==null?void 0:ce.contents)==null?void 0:Wt.length)>0?H.value=ce==null?void 0:ce.contents:H.value=[],((Nt=de==null?void 0:de.contents)==null?void 0:Nt.length)>0?(G.value=de==null?void 0:de.contents,le.value=de==null?void 0:de.contents):(G.value=[],le.value=[]),F.value=((nn=v==null?void 0:v.value)==null?void 0:nn.length)??0,ge.value=v.value,Ce.value&&(a.value=(cn=(Bt=l.value)==null?void 0:Bt.filter(We=>(We==null?void 0:We.label)!=="操作"))==null?void 0:cn.map(We=>{var Pt;return{...We,type:"edit",optionUrl:We!=null&&We.formMenuSelect&&((Pt=We==null?void 0:We.formMenuSelect)==null?void 0:Pt.length)>0?{groupSelect:We==null?void 0:We.groupSelect,menuSelect:We==null?void 0:We.formMenuSelect,selectRelateType:"",type:We==null?void 0:We.formType}:null}}),Ut())},{deep:!0,immediate:!0}),y.watch(()=>r==null?void 0:r.operatingForm,Y=>{Y!=null&&Y.form&&($e(Y==null?void 0:Y.form),R.value=Y==null?void 0:Y.dialogTitle,Q.value=!0,P.value=!0)},{immediate:!0,deep:!0});const Cn=()=>{Ce.value=!Ce.value,Ce.value?(Ut("viewChange"),p.setCacheUpdatingData(null),_t.value=null):(G.value=le.value,a.value=d.value,_t.value&&o("change",_t.value))};y.ref(!1);const Hn=Y=>{Ut("createClick")},fs=(Y,W,ce)=>{var de,_e;Ee.value=Oe.cloneDeep(Y),b.value=Y==null?void 0:Y.id,F.value=(de=v.value)==null?void 0:de.length,R.value=(Y==null?void 0:Y.id)===((_e=v.value)==null?void 0:_e.length)?"新增":"编辑",ze(!0)},Yi=Y=>{var Re,qe,te,Ve,Xe,ft,w,V,X,J;const{row:W,column:ce,item:de,slotData:_e}=Y;let me=W!=null&&W[ce==null?void 0:ce.prop]?((qe=(Re=W==null?void 0:W[ce==null?void 0:ce.prop])==null?void 0:Re[0])==null?void 0:qe.contents)??(W==null?void 0:W[ce==null?void 0:ce.prop]):((Ve=(te=W==null?void 0:W[de==null?void 0:de.prop])==null?void 0:te[0])==null?void 0:Ve.contents)??(W==null?void 0:W[de==null?void 0:de.prop])??((ft=(Xe=_e==null?void 0:_e[de==null?void 0:de.prop])==null?void 0:Xe[0])==null?void 0:ft.contents)??(_e==null?void 0:_e[de==null?void 0:de.prop])??((X=(V=W==null?void 0:W[(w=de==null?void 0:de.child)==null?void 0:w.prop])==null?void 0:V[0])==null?void 0:X.contents)??(W==null?void 0:W[(J=de==null?void 0:de.child)==null?void 0:J.prop]),Te=Array.isArray(me)&&!(me!=null&&me.every(z=>typeof z=="string"||typeof z=="number"))?"查看":me;return Te=Array.isArray(Te)?Te.join(","):Te,Te},ei=Y=>{var qe,te,Ve,Xe,ft,w,V,X,J,z;const{row:W,column:ce,item:de,slotData:_e}=Y;let me=W!=null&&W[ce==null?void 0:ce.prop]?((te=(qe=W==null?void 0:W[ce==null?void 0:ce.prop])==null?void 0:qe[0])==null?void 0:te.contents)??(W==null?void 0:W[ce==null?void 0:ce.prop]):((Xe=(Ve=W==null?void 0:W[de==null?void 0:de.prop])==null?void 0:Ve[0])==null?void 0:Xe.contents)??(W==null?void 0:W[de==null?void 0:de.prop])??((w=(ft=_e==null?void 0:_e[de==null?void 0:de.prop])==null?void 0:ft[0])==null?void 0:w.contents)??(_e==null?void 0:_e[de==null?void 0:de.prop])??((J=(X=W==null?void 0:W[(V=de==null?void 0:de.child)==null?void 0:V.prop])==null?void 0:X[0])==null?void 0:J.contents)??(W==null?void 0:W[(z=de==null?void 0:de.child)==null?void 0:z.prop]);const Te=Array.isArray(me)&&!(me!=null&&me.every(fe=>typeof fe=="string"||typeof fe=="number")),Re=Array.isArray(me)&&(me==null?void 0:me.find(fe=>fe==null?void 0:fe.url));return Te&&Re};return(Y,W)=>{var Re,qe;const ce=y.resolveComponent("el-icon"),de=y.resolveComponent("el-popover"),_e=y.resolveComponent("svg-icon"),me=y.resolveComponent("el-checkbox"),Be=y.resolveComponent("el-checkbox-group"),Te=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",q6,[(y.openBlock(),y.createBlock(On.ssTable,{columns:a.value,checkedColumns:t.value,key:a.value,tableData:v.value,isEditViewport:Ce.value,isShowPagination:C.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:ye,extraButton:G.value,onContentClick:Ze,onRowClick:yt,onSelectChange:dt,onCellChange:fs,onChange:we,onPreview:ot},y.createSlots({headerButton:y.withCtx(te=>[s.showHeader?(y.openBlock(),y.createBlock(F6,{key:0,compName:s.compName,buttons:te.buttons,onButtonClick:W[0]||(W[0]=Ve=>st(Ve,"",{})),columns:a.value,onFilter:De},null,8,["compName","buttons","columns"])):y.createCommentVNode("",!0)]),viewport:y.withCtx(()=>{var te;return[((te=v.value)==null?void 0:te.length)>0?(y.openBlock(),y.createElementBlock("div",J6,[y.createElementVNode("span",{title:"编辑视图",onClick:Cn},[y.createVNode(_e,{name:"editTable",class:"view-icon"})])])):y.createCommentVNode("",!0)]}),rowCreate:y.withCtx(({row:te})=>[y.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:Ve=>Hn()},[y.createVNode(_e,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,K6)]),operateCol:y.withCtx(()=>[y.createVNode(de,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:ut},{reference:y.withCtx(()=>[y.createElementVNode("span",Z6,[y.createVNode(_e,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:y.withCtx(()=>[y.createElementVNode("div",Q6,[y.createVNode(Be,{modelValue:t.value,"onUpdate:modelValue":W[2]||(W[2]=te=>t.value=te),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:y.withCtx(()=>[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(Fe.value,te=>(y.openBlock(),y.createBlock(me,{key:te.label,label:te.label,value:te.label,style:{width:"100%",marginRight:0}},{default:y.withCtx(()=>[y.createElementVNode("span",null,y.toDisplayString(te.label),1),y.createVNode(_e,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px",cursor:"move",color:"grey",position:"absolute",right:"5px"}})]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:y.withCtx(te=>[ei(te)?(y.openBlock(),y.createBlock(de,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:y.withCtx(()=>[y.createElementVNode("span",e5,y.toDisplayString(Yi(te)),1)]),default:y.withCtx(()=>{var Ve;return[y.createElementVNode("div",t5,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(te==null?void 0:te.row[(Ve=te==null?void 0:te.column)==null?void 0:Ve.prop],Xe=>(y.openBlock(),y.createElementBlock("div",n5,[y.createElementVNode("div",{class:"prop-url",title:jt(Xe),onClick:ft=>k(Xe)},y.toDisplayString(jt(Xe)),9,i5),y.createElementVNode("div",{class:"prop-download",onClick:ft=>T(Xe)}," 下载 ",8,s5)]))),256))])]}),_:2},1024)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.createTextVNode(y.toDisplayString(Yi(te)),1)],64))]),_:2},[((Re=H.value)==null?void 0:Re.length)>0?{name:"actions",fn:y.withCtx(({item:te})=>[y.createVNode(de,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:y.withCtx(()=>[y.createVNode(ce,null,{default:y.withCtx(()=>[y.createVNode(y.unref(Pn.more_filled_default))]),_:1})]),default:y.withCtx(()=>[y.createElementVNode("div",$6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(oe(H.value,te),(Ve,Xe)=>(y.openBlock(),y.createElementBlock("div",{class:"menu-config-item",key:Xe,onClick:ft=>st(Ve==null?void 0:Ve.label,te,{extra:Ve})},[y.createElementVNode("div",{style:y.normalizeStyle({color:Ve==null?void 0:Ve.textColor}),class:"extra-button-label"},y.toDisplayString(Ve==null?void 0:Ve.label),5)],8,Y6))),128))])]),_:2},1024)]),key:"0"}:void 0,((qe=v.value)==null?void 0:qe.length)>0?{name:"batchButton",fn:y.withCtx(te=>[y.createVNode(U6,{buttons:te.buttons,onButtonClick:W[1]||(W[1]=Ve=>st(Ve,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),y.createVNode(On.ssDialog,{title:R.value,visible:P.value,width:pe.value,onBeforeDestroy:tt},{default:y.withCtx(()=>[y.createElementVNode("div",r5,[y.createVNode(On.ssForm,{rowContents:Z.value,isEnableWrap:!1,onChange:pt,onClickTrigger:Le,isEdit:S.value,onBlurChange:at},null,8,["rowContents","isEdit"])])]),footer:y.withCtx(()=>[Q.value?(y.openBlock(),y.createElementBlock("div",a5,[y.createVNode(Te,{onClick:W[3]||(W[3]=te=>P.value=!1),id:"themeBorderButton"},{default:y.withCtx(()=>W[7]||(W[7]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[7]}),y.createVNode(Te,{class:"ok-button",onClick:W[4]||(W[4]=te=>ze(!0)),id:"themeButton"},{default:y.withCtx(()=>W[8]||(W[8]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[8]})])):y.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),y.createVNode(On.ssDialog,{title:R.value,visible:E.value,width:L.value,onBeforeDestroy:W[6]||(W[6]=te=>E.value=!1)},{default:y.withCtx(()=>[y.createVNode(H6)]),footer:y.withCtx(()=>[y.createElementVNode("div",o5,[y.createVNode(Te,{onClick:W[5]||(W[5]=te=>E.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:y.withCtx(()=>W[9]||(W[9]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[9]}),y.createVNode(Te,{class:"ok-button",onClick:Ue,id:"themeButton"},{default:y.withCtx(()=>W[10]||(W[10]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["title","visible","width"]),m.value?(y.openBlock(),y.createBlock(On.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:mt},null,8,["fileDataList"])):y.createCommentVNode("",!0),c.value?(y.openBlock(),y.createBlock(On.ssDialog,{key:1,visible:c.value,onBeforeDestroy:K,style:{height:"700px",width:"1000px"}},{default:y.withCtx(()=>[c.value?(y.openBlock(),y.createBlock(mu,{key:0,"urdf-url":ae.value},null,8,["urdf-url"])):y.createCommentVNode("",!0)]),_:1},8,["visible"])):y.createCommentVNode("",!0)])}}},Eu=Pi._export_sfc(l5,[["__scopeId","data-v-d11a7613"]]);exports.ACESFilmicToneMapping=Gl;exports.AmbientLight=cc;exports.Box3=Fn;exports.CatmullRomCurve3=rc;exports.Color=Tt;exports.DirectionalLight=gr;exports.DoubleSide=pn;exports.Euler=Sn;exports.GridHelper=K0;exports.HemisphereLight=J0;exports.MOUSE=Ti;exports.MathUtils=Ei;exports.Matrix4=Et;exports.Mesh=zt;exports.MeshPhongMaterial=fn;exports.OrbitControls=ru;exports.PCFSoftShadowMap=Hl;exports.PerspectiveCamera=bn;exports.Plane=Jn;exports.PlaneGeometry=Di;exports.PointLight=Pa;exports.SRGBColorSpace=qt;exports.Scene=Ia;exports.ShadowMaterial=X0;exports.TubeGeometry=ka;exports.Vector3=I;exports.WebGLRenderer=iu;exports.Xe=uu;exports.formGetOptions=Ho;exports.getSelectRow=kl;exports.isString=Vo;exports.ssTable=Eu;exports.threeView=mu;exports.useFormComp=Su;exports.useFormToTableComp=gu;exports.useModelLoader=z6;exports.useTableComp=bu;exports.useUnit=_u;
|
|
4204
|
+
`);let i=[];for(let a=0,l=n.length;a<l;a++){const c=n[a].trimStart();if(c.length===0)continue;const d=c.charAt(0);if(d!=="#")if(d==="v"){const m=c.split(h0);switch(m[0]){case"v":t.vertices.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3])),m.length>=7?(fa.setRGB(parseFloat(m[4]),parseFloat(m[5]),parseFloat(m[6]),Vt),t.colors.push(fa.r,fa.g,fa.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]));break;case"vt":t.uvs.push(parseFloat(m[1]),parseFloat(m[2]));break}}else if(d==="f"){const u=c.slice(1).trim().split(h0),h=[];for(let _=0,f=u.length;_<f;_++){const p=u[_];if(p.length>0){const x=p.split("/");h.push(x)}}const g=h[0];for(let _=1,f=h.length-1;_<f;_++){const p=h[_],x=h[_+1];t.addFace(g[0],p[0],x[0],g[1],p[1],x[1],g[2],p[2],x[2])}}else if(d==="l"){const m=c.substring(1).trim().split(" ");let u=[];const h=[];if(c.indexOf("/")===-1)u=m;else for(let g=0,_=m.length;g<_;g++){const f=m[g].split("/");f[0]!==""&&u.push(f[0]),f[1]!==""&&h.push(f[1])}t.addLineGeometry(u,h)}else if(d==="p"){const u=c.slice(1).trim().split(" ");t.addPointGeometry(u)}else if((i=T4.exec(c))!==null){const m=(" "+i[0].slice(1).trim()).slice(1);t.startObject(m)}else if(R4.test(c))t.object.startMaterial(c.substring(7).trim(),t.materialLibraries);else if(C4.test(c))t.materialLibraries.push(c.substring(7).trim());else if(D4.test(c))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(d==="s"){if(i=c.split(" "),i.length>1){const u=i[1].trim().toLowerCase();t.object.smooth=u!=="0"&&u!=="off"}else t.object.smooth=!0;const m=t.object.currentMaterial();m&&(m.smooth=t.object.smooth)}else{if(c==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}t.finalize();const r=new An;if(r.materialLibraries=[].concat(t.materialLibraries),!(t.objects.length===1&&t.objects[0].geometry.vertices.length===0)===!0)for(let a=0,l=t.objects.length;a<l;a++){const c=t.objects[a],d=c.geometry,m=c.materials,u=d.type==="Line",h=d.type==="Points";let g=!1;if(d.vertices.length===0)continue;const _=new rn;_.setAttribute("position",new Lt(d.vertices,3)),d.normals.length>0&&_.setAttribute("normal",new Lt(d.normals,3)),d.colors.length>0&&(g=!0,_.setAttribute("color",new Lt(d.colors,3))),d.hasUVIndices===!0&&_.setAttribute("uv",new Lt(d.uvs,2));const f=[];for(let x=0,M=m.length;x<M;x++){const b=m[x],N=b.name+"_"+b.smooth+"_"+g;let L=t.materials[N];if(this.materials!==null){if(L=this.materials.create(b.name),u&&L&&!(L instanceof Ai)){const P=new Ai;Hn.prototype.copy.call(P,L),P.color.copy(L.color),L=P}else if(h&&L&&!(L instanceof Oi)){const P=new Oi({size:10,sizeAttenuation:!1});Hn.prototype.copy.call(P,L),P.color.copy(L.color),P.map=L.map,L=P}}L===void 0&&(u?L=new Ai:h?L=new Oi({size:1,sizeAttenuation:!1}):L=new ln,L.name=b.name,L.flatShading=!b.smooth,L.vertexColors=g,t.materials[N]=L),f.push(L)}let p;if(f.length>1){for(let x=0,M=m.length;x<M;x++){const b=m[x];_.addGroup(b.groupStart,b.groupCount,x)}u?p=new Ra(_,f):h?p=new Vs(_,f):p=new Pt(_,f)}else u?p=new Ra(_,f[0]):h?p=new Vs(_,f[0]):p=new Pt(_,f[0]);p.name=c.name,r.add(p)}else if(t.vertices.length>0){const a=new Oi({size:1,sizeAttenuation:!1}),l=new rn;l.setAttribute("position",new Lt(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(l.setAttribute("color",new Lt(t.colors,3)),a.vertexColors=!0);const c=new Vs(l,a);r.add(c)}return r}}class os extends ni{constructor(e){super(e)}load(e,t,n,i){const r=this,o=this.path===""?hc.extractUrlBase(e):this.path,a=new Zs(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{t(r.parse(l,o))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},n,i)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const n=e.split(`
|
|
4205
|
+
`);let i={};const r=/\s+/,o={};for(let l=0;l<n.length;l++){let c=n[l];if(c=c.trim(),c.length===0||c.charAt(0)==="#")continue;const d=c.indexOf(" ");let m=d>=0?c.substring(0,d):c;m=m.toLowerCase();let u=d>=0?c.substring(d+1):"";if(u=u.trim(),m==="newmtl")i={name:u},o[u]=i;else if(m==="ka"||m==="kd"||m==="ks"||m==="ke"){const h=u.split(r,3);i[m]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else i[m]=u}const a=new P4(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class P4{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:Yn,this.wrap=this.options.wrap!==void 0?this.options.wrap:oi}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const n in e){const i=e[n],r={};t[n]=r;for(const o in i){let a=!0,l=i[o];const c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(l=[l[0]/255,l[1]/255,l[2]/255]),this.options&&this.options.ignoreZeroRGBs&&l[0]===0&&l[1]===0&&l[2]===0&&(a=!1);break}a&&(r[c]=l)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return this.materials[e]===void 0&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,n=this.materialsInfo[e],i={name:e,side:this.side};function r(a,l){return typeof l!="string"||l===""?"":/^https?:\/\//i.test(l)?l:a+l}function o(a,l){if(i[a])return;const c=t.getTextureParams(l,i),d=t.loadTexture(r(t.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=t.wrap,d.wrapT=t.wrap,(a==="map"||a==="emissiveMap")&&(d.colorSpace=Vt),i[a]=d}for(const a in n){const l=n[a];let c;if(l!=="")switch(a.toLowerCase()){case"kd":i.color=Bt.colorSpaceToWorking(new bt().fromArray(l),Vt);break;case"ks":i.specular=Bt.colorSpaceToWorking(new bt().fromArray(l),Vt);break;case"ke":i.emissive=Bt.colorSpaceToWorking(new bt().fromArray(l),Vt);break;case"map_kd":o("map",l);break;case"map_ks":o("specularMap",l);break;case"map_ke":o("emissiveMap",l);break;case"norm":o("normalMap",l);break;case"map_bump":case"bump":o("bumpMap",l);break;case"disp":o("displacementMap",l);break;case"map_d":o("alphaMap",l),i.transparent=!0;break;case"ns":i.shininess=parseFloat(l);break;case"d":c=parseFloat(l),c<1&&(i.opacity=c,i.transparent=!0);break;case"tr":c=parseFloat(l),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(i.opacity=1-c,i.transparent=!0);break}}return this.materials[e]=new ln(i),this.materials[e]}getTextureParams(e,t){const n={scale:new Je(1,1),offset:new Je(0,0)},i=e.split(/\s+/);let r;return r=i.indexOf("-bm"),r>=0&&(t.bumpScale=parseFloat(i[r+1]),i.splice(r,2)),r=i.indexOf("-mm"),r>=0&&(t.displacementBias=parseFloat(i[r+1]),t.displacementScale=parseFloat(i[r+2]),i.splice(r,3)),r=i.indexOf("-s"),r>=0&&(n.scale.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),r=i.indexOf("-o"),r>=0&&(n.offset.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),n.url=i.join(" ").trim(),n}loadTexture(e,t,n,i,r){const o=this.manager!==void 0?this.manager:ac;let a=o.getHandler(e);a===null&&(a=new oc(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(e,n,i,r);return t!==void 0&&(l.mapping=t),l}}const Bo="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function Us(s){if(s==null||!isFinite(s))return"";const e=s/(1024*1024);if(e>=1)return`${e.toFixed(1)} MB`;const t=s/1024;return t>=1?`${t.toFixed(1)} KB`:`${s} B`}function Oo(s){try{const e=s.split("?")[0].split("#")[0];return e.substring(e.lastIndexOf("/")+1)||e}catch{return s}}function F4(s,e,t,n){return{loadUrdfFromUrl:async r=>{t.value=!0,n.value="正在初始化 URDF 加载器...";const{scene:o}=s();if(!o)return console.error("场景尚未初始化,无法加载 URDF 模型。"),t.value=!1,null;let a=0,l=0;const c=new Y0;c.onStart=(u,h,g)=>{a=g||0,l=h||0,a>0?n.value=`开始下载资源: 0 / ${a}`:n.value="开始下载资源...",t.value=!0},c.onProgress=(u,h,g)=>{l=h||l,a=g||a;const _=Math.min(l+1,a||l+1);n.value=a?`正在加载第 ${_} / ${a} 个文件: ${Oo(u)}`:`正在加载: ${Oo(u)}`},c.onError=u=>{console.warn("资源加载失败:",u)},c.onLoad=()=>{n.value="资源加载完成",t.value=!1,setTimeout(()=>{!t.value&&n.value==="资源加载完成"&&(n.value="")},400)};const d=(u,h,g)=>{const _=Math.min(l+1,a||l+1),f=Oo(u);g&&g>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${f}(${Us(h)} / ${Us(g)})`:`正在下载: ${f}(${Us(h)} / ${Us(g)})`:h&&h>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${f}(已下载 ${Us(h)})`:`正在下载: ${f}(已下载 ${Us(h)})`:n.value=a?`正在下载第 ${_} / ${a} 个文件: ${f}`:`正在下载: ${f}`},m=new gc(c);m.packages=u=>`${Bo.endsWith("/")?Bo:Bo+"/"}${u}/`,m.loadMeshCb=(u,h,g)=>{const _=(()=>{const f=u.split("?")[0].split("#")[0],p=f.lastIndexOf(".");return p>=0?f.slice(p+1).toLowerCase():void 0})();switch(_){case"obj":{const f=(()=>{try{return new URL(".",u).toString()}catch{const N=u.lastIndexOf("/");return N>=0?u.slice(0,N+1):u}})(),p=(()=>{var L;return(((L=u.split("/").pop())==null?void 0:L.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),x=`${f}${p}.mtl`,M=N=>{const L=new as(h);N&&L.setMaterials(N),L.load(u,P=>g(P),P=>{d(u,P==null?void 0:P.loaded,P==null?void 0:P.total)},P=>{console.error(`加载 OBJ 失败: ${u}`,P),g(new An)})},b=new os(h);b.setResourcePath(f),b.load(x,N=>{try{N.preload()}catch{}M(N)},N=>{d(x,N==null?void 0:N.loaded,N==null?void 0:N.total)},N=>{console.warn(`未找到或加载材质失败: ${x}`),M(void 0)});break}case"stl":{new Hi(h).load(u,p=>{const x=new ln({color:12303291,shininess:30}),M=new Pt(p,x);M.castShadow=!0,M.receiveShadow=!0,g(M)},p=>{d(u,p==null?void 0:p.loaded,p==null?void 0:p.total)},p=>{console.error(`加载 STL 失败: ${u}`,p),g(new An)});break}default:console.error(`不支持的网格格式: .${_} (路径: ${u})`),g(new An)}};try{const u=r.split("/").pop();n.value=`正在下载 URDF 文件: ${u}`;const h=await new Promise((g,_)=>{m.load(r,f=>g(f),f=>{d(r,f==null?void 0:f.loaded,f==null?void 0:f.total)},f=>_(f))});return h.traverse(g=>{if(g.isMesh){const _=g;_.castShadow=!0,_.receiveShadow=!0}}),o.add(h),e.value.push(h),console.log("URDF 模型加载并添加到场景成功!",h),h}catch(u){return console.error(`加载 URDF 模型 (${r}) 时发生错误:`,u),n.value="模型加载失败",t.value=!1,null}}}}class pu extends ni{constructor(e){super(e),this.littleEndian=!0}load(e,t,n,i){const r=this,o=new Zs(r.manager);o.setPath(r.path),o.setResponseType("arraybuffer"),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}_getDataView(e,t,n,i){switch(n){case"F":return i===8?e.getFloat64(t,this.littleEndian):e.getFloat32(t,this.littleEndian);case"I":return i===1?e.getInt8(t):i===2?e.getInt16(t,this.littleEndian):e.getInt32(t,this.littleEndian);case"U":return i===1?e.getUint8(t):i===2?e.getUint16(t,this.littleEndian):e.getUint32(t,this.littleEndian)}}parse(e){function t(h,g){const _=h.length,f=new Uint8Array(g);let p=0,x=0,M,b,N;do if(M=h[p++],M<32){if(M++,x+M>g)throw new Error("Output buffer is not large enough");if(p+M>_)throw new Error("Invalid compressed data");do f[x++]=h[p++];while(--M)}else{if(b=M>>5,N=x-((M&31)<<8)-1,p>=_)throw new Error("Invalid compressed data");if(b===7&&(b+=h[p++],p>=_))throw new Error("Invalid compressed data");if(N-=h[p++],x+b+2>g)throw new Error("Output buffer is not large enough");if(N<0)throw new Error("Invalid compressed data");if(N>=x)throw new Error("Invalid compressed data");do f[x++]=f[N++];while(--b+2)}while(p<_);return f}function n(h){const g={},_=new Uint8Array(h);let f="",p="",x=0,M=!1;const b=_.length;for(;x<b&&M===!1;){const I=String.fromCharCode(_[x++]);I===`
|
|
4206
|
+
`||I==="\r"?(p.trim().toLowerCase().startsWith("data")&&(M=!0),p=""):p+=I,f+=I}const N=f.search(/[\r\n]DATA\s(\S*)\s/i),L=/[\r\n]DATA\s(\S*)\s/i.exec(f.slice(N-1));if(g.data=L[1],g.headerLen=L[0].length+N,g.str=f.slice(0,g.headerLen),g.str=g.str.replace(/#.*/gi,""),g.version=/^VERSION (.*)/im.exec(g.str),g.fields=/^FIELDS (.*)/im.exec(g.str),g.size=/^SIZE (.*)/im.exec(g.str),g.type=/^TYPE (.*)/im.exec(g.str),g.count=/^COUNT (.*)/im.exec(g.str),g.width=/^WIDTH (.*)/im.exec(g.str),g.height=/^HEIGHT (.*)/im.exec(g.str),g.viewpoint=/^VIEWPOINT (.*)/im.exec(g.str),g.points=/^POINTS (.*)/im.exec(g.str),g.version!==null&&(g.version=parseFloat(g.version[1])),g.fields=g.fields!==null?g.fields[1].split(" "):[],g.type!==null&&(g.type=g.type[1].split(" ")),g.width!==null&&(g.width=parseInt(g.width[1])),g.height!==null&&(g.height=parseInt(g.height[1])),g.viewpoint!==null&&(g.viewpoint=g.viewpoint[1]),g.points!==null&&(g.points=parseInt(g.points[1],10)),g.points===null&&(g.points=g.width*g.height),g.size!==null&&(g.size=g.size[1].split(" ").map(function(I){return parseInt(I,10)})),g.count!==null)g.count=g.count[1].split(" ").map(function(I){return parseInt(I,10)});else{g.count=[];for(let I=0,A=g.fields.length;I<A;I++)g.count.push(1)}g.offset={};let P=0;for(let I=0,A=g.fields.length;I<A;I++)g.data==="ascii"?g.offset[g.fields[I]]=I:(g.offset[g.fields[I]]=P,P+=g.size[I]*g.count[I]);return g.rowSize=P,g}const i=n(e),r=[],o=[],a=[],l=[],c=[],d=new bt;if(i.data==="ascii"){const h=i.offset,f=new TextDecoder().decode(e).slice(i.headerLen).split(`
|
|
4207
|
+
`);for(let p=0,x=f.length;p<x;p++){if(f[p]==="")continue;const M=f[p].split(" ");if(h.x!==void 0&&(r.push(parseFloat(M[h.x])),r.push(parseFloat(M[h.y])),r.push(parseFloat(M[h.z]))),h.rgb!==void 0){const b=i.fields.findIndex(F=>F==="rgb"),N=i.type[b],L=parseFloat(M[h.rgb]);let P=L;if(N==="F"){const F=new Float32Array(1);F[0]=L,P=new Int32Array(F.buffer)[0]}const I=(P>>16&255)/255,A=(P>>8&255)/255,E=(P>>0&255)/255;d.setRGB(I,A,E,Vt),a.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(o.push(parseFloat(M[h.normal_x])),o.push(parseFloat(M[h.normal_y])),o.push(parseFloat(M[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(M[h.intensity])),h.label!==void 0&&c.push(parseInt(M[h.label]))}}if(i.data==="binary_compressed"){const h=new Uint32Array(e.slice(i.headerLen,i.headerLen+8)),g=h[0],_=h[1],f=t(new Uint8Array(e,i.headerLen+8,g),_),p=new DataView(f.buffer),x=i.offset;for(let M=0;M<i.points;M++){if(x.x!==void 0){const b=i.fields.indexOf("x"),N=i.fields.indexOf("y"),L=i.fields.indexOf("z");r.push(this._getDataView(p,i.points*x.x+i.size[b]*M,i.type[b],i.size[b])),r.push(this._getDataView(p,i.points*x.y+i.size[N]*M,i.type[N],i.size[N])),r.push(this._getDataView(p,i.points*x.z+i.size[L]*M,i.type[L],i.size[L]))}if(x.rgb!==void 0){const b=i.fields.indexOf("rgb"),N=p.getUint8(i.points*x.rgb+i.size[b]*M+2)/255,L=p.getUint8(i.points*x.rgb+i.size[b]*M+1)/255,P=p.getUint8(i.points*x.rgb+i.size[b]*M+0)/255;d.setRGB(N,L,P,Vt),a.push(d.r,d.g,d.b)}if(x.normal_x!==void 0){const b=i.fields.indexOf("normal_x"),N=i.fields.indexOf("normal_y"),L=i.fields.indexOf("normal_z");o.push(this._getDataView(p,i.points*x.normal_x+i.size[b]*M,i.type[b],i.size[b])),o.push(this._getDataView(p,i.points*x.normal_y+i.size[N]*M,i.type[N],i.size[N])),o.push(this._getDataView(p,i.points*x.normal_z+i.size[L]*M,i.type[L],i.size[L]))}if(x.intensity!==void 0){const b=i.fields.indexOf("intensity");l.push(this._getDataView(p,i.points*x.intensity+i.size[b]*M,i.type[b],i.size[b]))}if(x.label!==void 0){const b=i.fields.indexOf("label");c.push(p.getInt32(i.points*x.label+i.size[b]*M,this.littleEndian))}}}if(i.data==="binary"){const h=new DataView(e,i.headerLen),g=i.offset;for(let _=0,f=0;_<i.points;_++,f+=i.rowSize){if(g.x!==void 0){const p=i.fields.indexOf("x"),x=i.fields.indexOf("y"),M=i.fields.indexOf("z");r.push(this._getDataView(h,f+g.x,i.type[p],i.size[p])),r.push(this._getDataView(h,f+g.y,i.type[x],i.size[x])),r.push(this._getDataView(h,f+g.z,i.type[M],i.size[M]))}if(g.rgb!==void 0){const p=h.getUint8(f+g.rgb+2)/255,x=h.getUint8(f+g.rgb+1)/255,M=h.getUint8(f+g.rgb+0)/255;d.setRGB(p,x,M,Vt),a.push(d.r,d.g,d.b)}if(g.normal_x!==void 0){const p=i.fields.indexOf("normal_x"),x=i.fields.indexOf("normal_y"),M=i.fields.indexOf("normal_z");o.push(this._getDataView(h,f+g.normal_x,i.type[p],i.size[p])),o.push(this._getDataView(h,f+g.normal_y,i.type[x],i.size[x])),o.push(this._getDataView(h,f+g.normal_z,i.type[M],i.size[M]))}if(g.intensity!==void 0){const p=i.fields.indexOf("intensity");l.push(this._getDataView(h,f+g.intensity,i.type[p],i.size[p]))}g.label!==void 0&&c.push(h.getInt32(f+g.label,this.littleEndian))}}const m=new rn;r.length>0&&m.setAttribute("position",new Lt(r,3)),o.length>0&&m.setAttribute("normal",new Lt(o,3)),a.length>0&&m.setAttribute("color",new Lt(a,3)),l.length>0&&m.setAttribute("intensity",new Lt(l,1)),c.length>0&&m.setAttribute("label",new J2(c,1)),m.computeBoundingSphere();const u=new Oi({size:.005});return a.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const N4=Ve.useModelComp(Ve.pinia),{systemPath:p0}=Ve.storeToRefs(N4),pa=y.ref(),m0=new Map;function U4(s,e,t,n,i){const r=async u=>{try{const h=await Fn.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=f=>{try{const p=f.target.result,M=new os().parse(p);M.preload(),h(M)}catch(p){g(p)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new ln({color:8947848,side:cn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const f=new FileReader;f.onload=async p=>{try{const x=p.target.result;let M=null;h&&h.length>0&&(h.length===1?M=await o(h[0]):M=await a(h));const b=new as;M&&b.setMaterials(M);const N=b.parse(x);M||N.traverse(L=>{L.isMesh&&(L.material=new ln({color:8947848,side:cn}))}),g(N)}catch(x){_(x)}},f.onerror=()=>{_(new Error("OBJ文件读取失败"))},f.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let f=0;f<u.length;f++){const p=u[f];n.value=`正在加载模型 ${f+1}/${u.length}...`;const x=await r(p.objUrl),M=((h=p.objUrl)==null?void 0:h.split("/").pop())||`model_${f}.obj`,b=new File([x],M,{type:x.type});let N=[];if(p.mtlUrls){const P=Array.isArray(p.mtlUrls)?p.mtlUrls:[p.mtlUrls];for(let I=0;I<P.length;I++){const A=P[I],E=await r(A),F=(A==null?void 0:A.split("/").pop())||`material_${f}_${I}.mtl`,B=new File([E],F,{type:E.type});N.push(B)}}const L=await l(b,N);g.add(L),e.value.push(L),_.push(L)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let f;const p=u.toLowerCase();switch(p){case".txt":case".cpt":case".obj":const x=await h.text();if(p===".txt"||p===".cpt"){const Y=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Te=[...x.matchAll(Y)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),et=new rn,We=Te.flatMap(O=>[O.x,O.y,O.z]);if(et.setAttribute("position",new Lt(We,3)),p===".txt"){const O=new Oi({color:"#5B5C99",size:1,sizeAttenuation:!1});f=new Vs(et,O)}else if(p===".cpt"){const O=new Ai({color:"#5B5C99",linewidth:100});f=new Ba(et,O)}}else if(p===".obj"){const Y=new as;if(g&&g.length>0){const me=new os;for(const Te of g){const et=await Te.text(),We=me.parse(et);We.preload(),Y.setMaterials(We);break}}f=Y.parse(x),(!g||g.length===0)&&f.traverse(me=>{me.isMesh&&(me.material=new ln({color:"#B3B3D4"})),me instanceof Pt&&(me.material.side=cn)})}break;case".stl":const M=await h.arrayBuffer(),N=new Hi().parse(M),L=new ln({color:"#B3B3D4",side:cn});f=new Pt(N,L);break;case".nc":const P=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],I={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},A=new An,E=P.map(Y=>new Promise((me,Te)=>{new Hi().load(p0.value===""?`/model/${Y}`:`${p0.value}\\${Y}`,We=>{const O=new ln({color:I[Y]||"#B3B3D4",side:cn}),dt=new Pt(We,O);me(dt)},void 0,Te)}));try{(await Promise.all(E)).forEach(me=>A.add(me)),f=A}catch(Y){throw console.error("加载NC文件对应的STL文件失败:",Y),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const F=new pu,B=new An;try{const Y=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),me=new Blob([Y.data],{type:"application/octet-stream;charset=UTF-8"}),Te=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),et=new Blob([Te.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((dt,st)=>{const it=URL.createObjectURL(me);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=1,Ze[Le*3+1]=0,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)}),O=await new Promise((dt,st)=>{const it=URL.createObjectURL(et);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=0,Ze[Le*3+1]=1,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)});B.add(We),B.add(O),f=B}catch(Y){throw console.error("PCD文件加载失败:",Y),new Error("无法加载PCD文件")}break;case".urdf":const X=URL.createObjectURL(h),Z=new gc,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",W={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},he=new Map,Q=new Map,xe=new Map,De=async Y=>{if(he.has(Y))return console.log(`从缓存加载: ${Y}`),he.get(Y);try{const me=await wn.axios.get(`${se}/${Y}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Te=new Blob([me.data],{type:"application/octet-stream;charset=UTF-8"});return W.enableCache&&he.set(Y,Te),Te}catch(me){throw console.error(`加载文件失败: ${Y}`,me),new Error(`无法加载文件: ${Y}`)}},Ae=(Y="default")=>{if(Q.has(Y))return Q.get(Y);const me=new ln({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Yn});return Q.set(Y,me),me},pe=Y=>{try{Y.isBufferGeometry&&Y.mergeVertices&&Y.mergeVertices(),Y.computeVertexNormals&&Y.computeVertexNormals(),Y.computeBoundingSphere&&Y.computeBoundingSphere(),Y.deleteAttribute&&Y.deleteAttribute("uv2")}catch(me){console.warn("几何体优化失败,使用原始几何体:",me)}return Y},re=async(Y,me,Te)=>{const et=`stl_${me}`;if(xe.has(et)){const st=xe.get(et);return new Pt(st,Ae())}const We=await Y.arrayBuffer();let dt=new Hi(Te).parse(We);return dt=pe(dt),xe.set(et,dt),new Pt(dt,Ae())},q=async(Y,me,Te)=>{const et=`obj_${me}`;if(he.has(et))return he.get(et).clone();const We=await Y.text(),O=new as(Te),dt=me.replace(".obj",".mtl");try{const Ie=await(await De(dt)).text(),Le=new os(Te).parse(Ie);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${dt}`)}const st=O.parse(We);return st.traverse(it=>{it.isMesh&&(it.geometry=pe(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),he.set(et,st),st},K=(Y,me)=>{const Te=new O0;if(Te.addLevel(Y,0),Y.geometry){const et=Y.geometry.clone(),We=new Pt(et,Y.material);Te.addLevel(We,50)}return Te};let te=0,ee=0;const fe=[];Z.loadMeshCb=async(Y,me,Te,et,We)=>{const O=Y.split("/").pop(),dt=Te||(()=>{});te++;const st=new Promise(async(it,Ie)=>{try{const Ze=await De(O);if(!Ze||Ze.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let rt;switch(Le){case"stl":rt=await re(Ze,O,me);break;case"obj":rt=await q(Ze,O,me);break;default:throw new Error(`不支持的文件格式: ${Le}`)}W.enableLOD&&rt.isMesh&&(rt=K(rt,O)),dt(rt),ee++,et&&et({loaded:ee,total:te,progress:ee/te}),it(rt)}catch(Ze){console.error(`mesh文件加载失败: ${O}`,Ze);const Le=new An;dt(Le),it(Le);const rt=new Wi(.1,.1,.1),Xt=new j0({color:16711680,wireframe:!0});return new Pt(rt,Xt)}});fe.push(st)};try{if(!X){pa.value=void 0;break}if(f=await Z.loadAsync(X),console.log(`URDF文件加载完成,等待${te}个mesh文件加载...`),fe.length>0)try{await Promise.allSettled(fe),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${te}`)}catch(Te){console.warn("部分mesh文件加载失败,但继续显示模型",Te)}f.traverse(Te=>{Te.isMesh&&(Te.castShadow=!0,Te.receiveShadow=!0,Te.renderOrder=1,Te.material&&(Te.material.needsUpdate=!0))}),console.time("计算包围盒");const Y=new Tn;Y.expandByObject(f);const me=`urdf_${Date.now()}`;f.userData.boundingBox=Y.clone(),f.userData.modelId=me,m0.set(me,{box:Y.clone(),center:Y.getCenter(new z),size:Y.getSize(new z),maxSize:Math.max(...Y.getSize(new z).toArray())}),pa.value=f,console.log("URDF模型加载完成并优化")}catch(Y){console.error("URDF加载失败:",Y),pa.value=void 0}finally{X&&URL.revokeObjectURL(X)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return f};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const f=u[_],p=await d(f.suffix,f.blob,f.mtlBlobs||[],f.meshFiles||[]);p&&(h.add(p),e.value.push(p),g.push(p))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:pa,modelBoundingBoxes:m0}}const I4={class:"panel-content"},z4={__name:"animationPanel",props:{animationData:Object,model:Object},setup(s){const e=s;y.ref();const t=y.ref();return y.watch(()=>[e==null?void 0:e.animationData],()=>{var i;let n=((i=Ve.cloneDeep(e==null?void 0:e.animationData))==null?void 0:i["输出(动画数据)Content"])??[];n&&(t.value=n)},{deep:!0,immediate:!0}),(n,i)=>{var r,o,a;return y.openBlock(),y.createElementBlock("div",I4,[(y.openBlock(),y.createBlock(Eu,{itemData:(r=t.value)==null?void 0:r.compData,key:(o=t.value)==null?void 0:o.id,index:(a=t.value)==null?void 0:a.id,showHeader:!1},null,8,["itemData","index"]))])}}},B4=Ci._export_sfc(z4,[["__scopeId","data-v-ed10cedd"]]),O4={class:"panel-content"},k4={key:0,class:"joints-list"},V4={class:"joint-info-row"},H4={class:"joint-left"},G4={class:"joint-name"},W4={class:"joint-range"},X4={class:"joint-type"},j4={key:0,class:"joint-control-row"},q4={class:"slider-container"},$4=["min","max","value","onInput","disabled"],Y4={class:"value-display"},K4={class:"joint-value"},J4={class:"unit"},Z4={key:1,class:"empty-state"},hr=.001,Q4=1e3,ko=60,e6={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(s,{expose:e}){const t=s;y.ref(!0);const n=y.ref([]),i=y.ref(null),r=y.ref(null),o=y.ref(12.5),a=y.ref(),l=y.ref(1302),c=y.ref(30),d=y.ref(!1),m=y.ref(!1),u=y.ref(0),h=y.ref(0),g=y.ref(null),_=xi.degToRad,f=y.ref(1),p=()=>Q4/ko/f.value;let x=[];y.watch(()=>t.animationData,re=>{var K;l.value=re.extra.管长,o.value=re.extra.外径/2;let q=((K=Ve.cloneDeep(re))==null?void 0:K["输出(动画数据)"])??[];q&&q.length>0&&(x=q)},{deep:!0}),y.computed(()=>x.length>0);const M=(re,q=!1)=>re==="revolute"?q?Math.PI:-Math.PI:re==="prismatic"?q?1:-1:0,b=()=>{if(!i.value)return wn.ElMessage.error("未加载 URDF"),!1;let re=null;return i.value.traverse(q=>{re||q.name==="Pipe_Link"&&q.traverse(K=>{K instanceof Pt&&!re&&(re=K)})}),re?(re.position.y-=c.value*hr,a.value=re,re.material=new ln({color:11184810,shininess:80,side:cn}),!0):(wn.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},N=re=>{if(!re||!re.joints)return console.warn("URDF模型没有关节信息"),[];let q=null;if(re.traverse(te=>{te.name==="Pipe_Link"&&!q&&(q=te)}),q)a.value=q;else return console.warn("未找到管子模型"),[];const K=[];return Object.keys(re.joints).forEach(te=>{const ee=re.joints[te];if(ee._jointType==="fixed")return;const fe=ee.limit?{lower:ee.limit.lower??M(ee._jointType,!1),upper:ee.limit.upper??M(ee._jointType,!0)}:{lower:M(ee._jointType,!1),upper:M(ee._jointType,!0)};K.push({name:te,type:ee._jointType||"unknown",limit:fe,currentValue:ee.angle||0,urdfJoint:ee})}),K.sort((te,ee)=>te.name.localeCompare(ee.name))},L=(re,q)=>{const K=n.value.find(ee=>ee.name===re);if(!K)return;const te=parseFloat(q);if(K.limit){const ee=Math.max(K.limit.lower,Math.min(K.limit.upper,te));K.currentValue=ee}else K.currentValue=te;t.model&&t.model.setJointValue?t.model.setJointValue(re,K.currentValue):K.urdfJoint&&K.urdfJoint.setJointValue(K.currentValue)},P=re=>re.reduce((q,K)=>{let te=0;const ee=K.Y??0,fe=K.C??0,Y=K.R??0;return ee>0&&(te+=ee),fe>0&&Y>0&&(te+=Y*_(fe)),q+te},0),I=re=>{const q=[],K=re.Y??0,te=re.B??0,ee=re.C??0,fe=re.R??0,Y={pos:new z(0,0,0),localY:new z(0,1,0),localX:new z(1,0,0),localZ:new z(0,0,1)};if(!K&&!ee)return q;if(q.push(Y.pos.clone()),te!==0){const me=new Mt().makeRotationAxis(Y.localY,_(te));Y.localX.applyMatrix4(me),Y.localZ.applyMatrix4(me)}if(K>0&&(Y.pos.add(Y.localY.clone().multiplyScalar(K*hr)),q.push(Y.pos.clone())),ee>0&&fe>0){const me=_(ee),Te=fe*hr,et=Y.pos.clone().add(Y.localX.clone().multiplyScalar(-Te)),We=Math.max(16,Math.ceil(ee/5));for(let O=1;O<=We;O++){const dt=me*O/We,st=new Mt().makeRotationAxis(Y.localZ,dt),Ie=Y.localX.clone().multiplyScalar(Te).applyMatrix4(st),Ze=et.clone().add(Ie);q.push(Ze)}}return q},A=(re,q=0)=>{let K=x.slice(0,re+1);const te=x[re+1];if(te&&q>0){const We={...te,B:(te.B??0)*q,C:(te.C??0)*q};K.push(We)}const ee=P(K),fe=Math.max(0,l.value-ee),Y=[];Y.push(new z(0,0,0));const me=new z(0,fe*hr,0);fe>0&&Y.push(me);let Te={pos:me.clone(),localY:new z(0,1,0),localX:new z(1,0,0),localZ:new z(0,0,1)};const et=[];for(let We=K.length-1;We>=0;We--){const O=K[We],dt=I(O);if(dt.length>0){const st=dt.map(Le=>{const rt=Le.clone(),Xt=new Mt;return Xt.makeBasis(Te.localX,Te.localY,Te.localZ),rt.applyMatrix4(Xt),rt.add(Te.pos)});et.push(st);const it=st[st.length-1];Te.pos=it.clone();const Ie=O.B??0,Ze=O.C??0;if(Ie!==0){const Le=new Mt().makeRotationAxis(Te.localY,_(Ie));Te.localX.applyMatrix4(Le),Te.localZ.applyMatrix4(Le)}if(Ze>0){const Le=_(Ze),rt=new Mt().makeRotationAxis(Te.localZ,Le);Te.localY.applyMatrix4(rt),Te.localX.applyMatrix4(rt)}}}for(const We of et)We.length>1&&Y.push(...We.slice(1));Y.length<2&&Y.push(new z(0,.001,0));try{const We=new rc(Y,!1,"catmullrom",.01),O=new ka(We,Math.max(2,Y.length*4),o.value*hr,18,!1);a.value.geometry.dispose(),a.value.geometry=O}catch(We){console.error("管件更新失败",We)}},E=(re,q,K=1)=>{re&&(Object.keys(re).forEach(te=>{const ee=re[te],fe=n.value.find(Y=>Y.name===te);fe&&(fe.currentValue=ee,t.model&&t.model.setJointValue?t.model.setJointValue(te,ee):fe.urdfJoint&&fe.urdfJoint.setJointValue(ee))}),A(q,K))},F=(re,q,K)=>re+(q-re)*K,B=(re,q,K)=>{if(!re||!q)return re||q;const te={};return Object.keys(re).forEach(ee=>{const fe=re[ee],Y=q[ee];te[ee]=F(fe,Y||fe,K)}),te},X=()=>{if(x.length===0){console.warn("没有动画数据");return}b(),d.value=!0,m.value=!1,u.value=0,h.value=0,Z()},Z=()=>{if(!d.value||m.value)return;const re=u.value;if(re>=x.length-1){const ee=x[x.length-1];E(ee,x.length-1,1),W();return}const q=h.value/ko,K=x[re],te=x[re+1];if(te){const ee=B(K,te,q);E(ee,re,q)}else E(K,re);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Z,p())},se=()=>{m.value=!0,g.value&&(clearTimeout(g.value),g.value=null)},W=()=>{d.value=!1,m.value=!1,f.value=1,g.value&&(clearTimeout(g.value),g.value=null)};e({startAnimation:X,pauseAnimation:se,stopAnimation:W,resetAll:()=>{W(),u.value=0,h.value=0,n.value.forEach(re=>{(re.type==="revolute"||re.type==="prismatic")&&L(re.name,0)}),A(-1,0)},fastForward:()=>{f.value<4&&(f.value=Math.min(4,f.value*2))},fastBackward:()=>{f.value>.25&&(f.value=Math.max(.25,f.value/2))}}),y.watch(()=>t.model,re=>{re?(i.value=re,n.value=N(re)):n.value=[]},{immediate:!0});const De=()=>{!t.model||d.value&&!m.value||n.value.forEach(re=>{re.urdfJoint&&re.urdfJoint.angle!==void 0&&(re.currentValue=re.urdfJoint.angle)})},Ae=()=>{const re=()=>{De(),r.value=requestAnimationFrame(re)};re()},pe=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return y.onMounted(()=>{Ae()}),y.onUnmounted(()=>{pe(),W()}),(re,q)=>(y.openBlock(),y.createElementBlock("div",O4,[n.value.length>0?(y.openBlock(),y.createElementBlock("div",k4,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n.value,K=>{var te,ee,fe,Y;return y.openBlock(),y.createElementBlock("div",{key:K.name,class:"joint-item"},[y.createElementVNode("div",V4,[y.createElementVNode("div",H4,[y.createElementVNode("span",G4,y.toDisplayString(K.name),1),y.createElementVNode("span",W4," ["+y.toDisplayString(((te=K.limit)==null?void 0:te.lower.toFixed(2))??(K.type==="revolute"?"-3.14":"-1.00"))+", "+y.toDisplayString(((ee=K.limit)==null?void 0:ee.upper.toFixed(2))??(K.type==="revolute"?"3.14":"1.00"))+"] ",1)]),y.createElementVNode("span",X4,y.toDisplayString(K.type),1)]),K.type==="revolute"||K.type==="prismatic"?(y.openBlock(),y.createElementBlock("div",j4,[y.createElementVNode("div",q4,[y.createElementVNode("input",{type:"range",min:((fe=K.limit)==null?void 0:fe.lower)??(K.type==="revolute"?-Math.PI:-1),max:((Y=K.limit)==null?void 0:Y.upper)??(K.type==="revolute"?Math.PI:1),step:.01,value:K.currentValue,onInput:me=>L(K.name,me.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,$4)]),y.createElementVNode("div",Y4,[y.createElementVNode("span",K4,y.toDisplayString(K.currentValue?Number(K.currentValue).toFixed(3):"0.000"),1),y.createElementVNode("span",J4,y.toDisplayString(K.type==="revolute"?"rad":"m"),1)])])):y.createCommentVNode("",!0)])}),128))])):(y.openBlock(),y.createElementBlock("div",Z4,q[0]||(q[0]=[y.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},t6=Ci._export_sfc(e6,[["__scopeId","data-v-7cbf5b39"]]),n6={class:"panel-content"},i6="id",s6={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:s=>["breadth","firstLevel"].includes(s)}},emits:["nodeClick"],setup(s,{emit:e}){const t=s,n=e,i=y.ref([]),r={children:"children",label:"label"},o=h=>{n("nodeClick",h)},a=(h,g=0)=>{const _=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(f=>{if(!(f!=null&&f.isMesh)&&((f==null?void 0:f.type)==="URDFJoint"||(f==null?void 0:f.type)==="URDFLink")){const p={name:f==null?void 0:f.name,label:f==null?void 0:f.name,show:!0,level:g+1,isPenultimate:!1,type:f==null?void 0:f.type,id:f==null?void 0:f.id,limit:(f==null?void 0:f.limit)??"",children:a(f==null?void 0:f.children,g+1),path:f==null?void 0:f.name};_.push(p)}}),_},l=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:a(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],c=(h,g)=>{const _=[],f=[...h];for(;f.length>0&&_.length<g;){const p=f.shift();p.children&&p.children.length>0&&(_.push(p.id),f.push(...p.children))}return _},d=(h,g)=>{const _=[];return h.forEach(f=>{if(f.children&&f.children.length>0){_.push(f.id);const p=f.children.filter(x=>x.children&&x.children.length>0).slice(0,g).map(x=>x.id);_.push(...p)}}),_.slice(0,g+1)},m=y.computed(()=>!i.value||i.value.length===0?[]:t.expandStrategy==="firstLevel"?d(i.value,t.maxExpandCount):c(i.value,t.maxExpandCount)),u=y.computed(()=>t!=null&&t.model?l(t.model):[]);return y.watch(u,h=>{i.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,g)=>{const _=y.resolveComponent("el-tree");return y.openBlock(),y.createElementBlock("div",n6,[y.createVNode(_,{data:i.value,props:r,"default-expanded-keys":m.value,"node-key":i6,onNodeClick:o},null,8,["data","default-expanded-keys"])])}}},r6=Ci._export_sfc(s6,[["__scopeId","data-v-0dda287c"]]),a6=["xlink:href"],o6=y.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(s){const e=s,t=y.computed(()=>({backgroundColor:e.backgroundColor})),n=y.computed(()=>`#${e.prefix}-${e.name}`),i=y.computed(()=>{const{size:r}=e;let o=`${r}`;return o=`${o.replace("px","")}px`,{width:o,height:o}});return(r,o)=>(y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(["container",{active:r.active}]),style:y.normalizeStyle(t.value)},[(y.openBlock(),y.createElementBlock("svg",{class:y.normalizeClass(["svg-icon",[r.$attrs.class,r.spin&&"svg-icon-spin"]]),style:y.normalizeStyle(i.value),"aria-hidden":"true"},[y.createElementVNode("use",{"xlink:href":n.value},null,8,a6)],6))],6))}}),on=Ci._export_sfc(o6,[["__scopeId","data-v-00a72991"]]);window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const l6={class:"obj-viewer-container"},c6={class:"buttonGroup-top"},h6={class:"buttonGroup-topLeft"},u6={class:"buttonGroup-left"},d6={class:"buttonGroup-right"},f6={class:"buttonGroup-bottom"},p6={class:"left-panel"},m6={class:"panel-header"},g6={key:1,class:"clipping-content"},_6={class:"radio-group"},v6={class:"radio-label"},y6={class:"radio-label"},x6={class:"radio-label"},M6={class:"radio-label"},b6={class:"right-panel"},S6={class:"panel-header"},E6={key:0,class:"loading-overlay"},A6={__name:"threeView",props:{urdfUrl:{type:String,default:""},animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(s,{emit:e}){const t=e,n=s;let i=null,r=!1;const o=y.ref(null),a=y.ref(!1),l=y.ref("");y.ref(!1);const c=y.ref(!1),d=y.ref(!1),m=y.ref(""),u=y.ref(!1),h=y.ref(""),g=y.ref(),{currentModels:_,initialCameraPosition:f,initialTargetPosition:p,initThreeJS:x,handleResize:M,getThreeJSObjects:b,clearAllModels:N,cleanup:L}=y4(o),{loadUrdfFromUrl:P}=F4(b,_,a,l),{isAnimating:I,toggleAnimation:A,stopAnimation:E}=x4(b,_),{isClipping:F,activeClippingAxis:B,toggleClipping:X,updateClippingPlanes:Z}=M4(b,_),{urdfModel:se}=U4(b,_,a,l,N),W=()=>{if(c.value||_.value.length===0)return;c.value=!0,I.value&&E();const{camera:Ae,controls:pe}=b();if(!Ae||!pe)return;pe.enabled=!0;const re=Y=>Y<.5?4*Y*Y*Y:1-Math.pow(-2*Y+2,3)/2,q=Ae.position.clone(),K=pe.target.clone(),te=1500,ee=Date.now(),fe=()=>{const Y=Date.now()-ee,me=Math.min(Y/te,1),Te=re(me);Ae.position.lerpVectors(q,f.value,Te),pe.target.lerpVectors(K,p.value,Te),me<1?requestAnimationFrame(fe):c.value=!1};fe()},he=async()=>r?Promise.resolve():new Promise(Ae=>{const pe=()=>{r?Ae():requestAnimationFrame(pe)};pe()}),Q=Ae=>{d.value=!0,m.value=Ae,Ae==="剖面视图"&&!F.value&&X()},xe=Ae=>{u.value=!0,h.value=Ae,Ae==="动画仿真"&&t("getAnimationData")},De=()=>{y.nextTick(()=>{var Ae;(Ae=g.value)==null||Ae.startAnimation()})};return y.watch(()=>n.urdfUrl,async(Ae,pe)=>{if(Ae)try{if(await he(),await P(Ae)){const{camera:q}=b();q&&(q.position.set(3,3,4),q.near=.01,q.far=1e4,q.updateProjectionMatrix())}}catch(re){console.error("加载urdf模型失败",re),wn.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),y.onMounted(async()=>{await y.nextTick();try{x(),i=b().scene,r=!0,window.addEventListener("resize",M)}catch(Ae){console.error("Three.js初始化失败:",Ae)}}),y.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",M),I.value&&E(),L()}),(Ae,pe)=>{var q,K,te,ee;const re=y.resolveComponent("el-scrollbar");return y.openBlock(),y.createElementBlock("div",l6,[y.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),y.createElementVNode("div",c6,[y.createVNode(on,{name:"guanjianjiexi",size:"34"}),y.createVNode(on,{name:"guanjiekongzhi",size:"34"}),y.createVNode(on,{name:"gongyishengcheng",size:"34"}),y.createVNode(on,{name:"buchangshezhi",size:"34"}),y.createVNode(on,{name:"shuchujiagongchengxu",size:"34"})]),y.createElementVNode("div",h6,[y.createVNode(on,{name:"viewReset",size:"24",onClick:W,title:"重置"}),y.createVNode(on,{name:"fangda",size:"24",title:"放大"}),y.createVNode(on,{name:"suoxiao",size:"24",title:"缩小"}),y.createVNode(on,{name:"lookAround",size:"24",onClick:y.unref(A),title:y.unref(I)?"停止动画":"动画视图"},null,8,["onClick","title"])]),y.createElementVNode("div",u6,[y.createVNode(on,{name:"jiegoushu",size:"24",onClick:pe[0]||(pe[0]=fe=>Q("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),y.createVNode(on,{name:"clipping",size:"24",onClick:pe[1]||(pe[1]=fe=>Q("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),y.createVNode(on,{name:"donghuafangzhen",size:"24",onClick:pe[2]||(pe[2]=fe=>Q("场景树3"))}),y.createVNode(on,{name:"donghuafangzhen",size:"24",onClick:pe[3]||(pe[3]=fe=>Q("场景4"))})]),y.createElementVNode("div",d6,[y.createVNode(on,{name:"donghuafangzhen",size:"24"}),y.createVNode(on,{name:"donghuafangzhen",size:"24"}),y.createVNode(on,{name:"guanjiekongzhi",size:"24",onClick:pe[4]||(pe[4]=fe=>xe("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),y.createVNode(on,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:pe[5]||(pe[5]=fe=>xe("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),y.createVNode(on,{name:"donghuafangzhen",size:"24"}),y.createVNode(on,{name:"donghuafangzhen",size:"24"})]),y.createElementVNode("div",f6,[y.createVNode(on,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(q=g.value)==null?void 0:q.fastBackward},null,8,["onClick"]),y.createVNode(on,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:De}),y.createVNode(on,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(K=g.value)==null?void 0:K.fastForward},null,8,["onClick"]),y.createVNode(on,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(te=g.value)==null?void 0:te.pauseAnimation},null,8,["onClick"]),y.createVNode(on,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(ee=g.value)==null?void 0:ee.resetAll},null,8,["onClick"])]),y.withDirectives(y.createElementVNode("div",p6,[y.createElementVNode("div",m6,[y.createElementVNode("span",null,y.toDisplayString(m.value),1),y.createElementVNode("span",{class:"close",onClick:pe[6]||(pe[6]=fe=>d.value=!1)}," X ")]),y.createVNode(re,{"max-height":"650px"},{default:y.withCtx(()=>[m.value==="场景树"?(y.openBlock(),y.createBlock(r6,{key:0,model:y.unref(se)},null,8,["model"])):y.createCommentVNode("",!0),m.value==="剖面视图"?(y.openBlock(),y.createElementBlock("div",g6,[y.createElementVNode("div",_6,[y.createElementVNode("label",v6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":pe[7]||(pe[7]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[8]||(pe[8]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[16]||(pe[16]=y.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),y.createElementVNode("label",y6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":pe[9]||(pe[9]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[10]||(pe[10]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[17]||(pe[17]=y.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),y.createElementVNode("label",x6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":pe[11]||(pe[11]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[12]||(pe[12]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[18]||(pe[18]=y.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),y.createElementVNode("label",M6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":pe[13]||(pe[13]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[14]||(pe[14]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[19]||(pe[19]=y.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):y.createCommentVNode("",!0)]),_:1})],512),[[y.vShow,d.value]]),y.withDirectives(y.createElementVNode("div",b6,[y.createElementVNode("div",S6,[y.createElementVNode("span",null,y.toDisplayString(h.value),1),y.createElementVNode("span",{class:"close",onClick:pe[15]||(pe[15]=fe=>u.value=!1)}," X ")]),y.createVNode(re,{"max-height":"650px"},{default:y.withCtx(()=>[y.withDirectives(y.createVNode(t6,{ref_key:"jointRef",ref:g,model:y.unref(se),scene:y.unref(i),animationData:s.animationData},null,8,["model","scene","animationData"]),[[y.vShow,h.value==="关节控制"]]),y.withDirectives(y.createVNode(B4,{animationData:s.animationData},null,8,["animationData"]),[[y.vShow,h.value==="动画仿真"]])]),_:1})],512),[[y.vShow,u.value]]),a.value?(y.openBlock(),y.createElementBlock("div",E6,[pe[20]||(pe[20]=y.createElementVNode("div",{class:"loading-spinner"},null,-1)),y.createElementVNode("p",null,y.toDisplayString(l.value),1)])):y.createCommentVNode("",!0)])}}},mu=Ci._export_sfc(A6,[["__scopeId","data-v-e3790e10"]]),w6={class:"extra-button-content"},T6={class:"table-operator-wrap"},C6={class:"extra-button-filter"},R6={title:"条件查询"},D6={class:"form-content-value"},L6={key:0,class:"extra-header"},P6={__name:"header",props:{compName:{type:String,default:"表格名称",required:!1},buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter"],setup(s,{emit:e}){const t=e,n=s,i=y.ref(""),r=y.ref(!1),o=y.ref([]),a=y.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),l=u=>{var g;const h=(g=o.value)==null?void 0:g.reduce((_,f,p)=>(p===0?_[f.label]=u:_[f.label]=f.value,_),{});t("filter",h)},c=u=>{t("buttonClick",u)},d=u=>{var h,g;o.value=(g=(h=Qt.getColumnChild(Ve.cloneDeep(u)))==null?void 0:h.filter(_=>(_==null?void 0:_.label)!==""&&(_==null?void 0:_.label)!=="操作"))==null?void 0:g.map(_=>({label:(_==null?void 0:_.label)??"",value:"",name:(_==null?void 0:_.label)??"",isFormColHidden:_==null?void 0:_.isTableColHidden,width:2}))},m=u=>{var h;if((u==null?void 0:u.buttonName)==="确认"&&t("filter",u==null?void 0:u.content),(u==null?void 0:u.buttonName)==="清空"){const g=Ve.cloneDeep(u==null?void 0:u.content);for(const _ in g)g[_]="";o.value=(h=o.value)==null?void 0:h.map(_=>({..._,value:""})),t("filter",g)}r.value=!1};return y.onMounted(()=>{d(n.columns)}),y.watch(()=>n.columns,()=>{d(n.columns)},{deep:!0,immediate:!0}),(u,h)=>{var p;const g=y.resolveComponent("svg-icon"),_=y.resolveComponent("el-input"),f=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",w6,[y.createElementVNode("div",{class:y.normalizeClass(s.compName?"table-name-wrap":"")},y.toDisplayString(s.compName),3),y.createElementVNode("div",T6,[y.createElementVNode("div",C6,[y.createVNode(Cu,{title:"",width:800,placement:"bottom-start",isVisible:r.value},{reference:y.withCtx(()=>[y.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=x=>i.value=x),style:{width:"240px"},placeholder:"搜索","prefix-icon":y.unref(wn.search_default),clearable:"",onInput:l},{append:y.withCtx(()=>[y.createElementVNode("span",R6,[y.createVNode(g,{onClick:h[0]||(h[0]=x=>r.value=!r.value),name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","prefix-icon"])]),content:y.withCtx(()=>[y.createElementVNode("div",D6,[(y.openBlock(),y.createBlock(Fn.ssForm,{rowContents:o.value,buttonValue:a.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:a.value,isStartJustify:!1,onOnButtonClick:m},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),n!=null&&n.buttons&&((p=n==null?void 0:n.buttons)==null?void 0:p.length)>0?(y.openBlock(),y.createElementBlock("div",L6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n==null?void 0:n.buttons,(x,M)=>(y.openBlock(),y.createElementBlock("div",{class:"extra-contents",key:M},[y.createVNode(f,{id:"themeButton",style:y.normalizeStyle({background:(x==null?void 0:x.background)??"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}),onClick:b=>c(x==null?void 0:x.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(x==null?void 0:x.label),1)]),_:2},1032,["style","onClick"])]))),128))])):y.createCommentVNode("",!0)])])}}},F6=Ci._export_sfc(P6,[["__scopeId","data-v-e343d690"]]),N6=y.defineComponent({__name:"batch",props:{buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(s,{emit:e}){const t=e,n=i=>{t("buttonClick",i)};return(i,r)=>{const o=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",null,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(s.buttons,a=>{var l;return y.openBlock(),y.createBlock(o,{key:a==null?void 0:a.label,class:y.normalizeClass((l=a==null?void 0:a.label)!=null&&l.includes("删除")?"warning-type":"default-type"),onClick:c=>n(a==null?void 0:a.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(a==null?void 0:a.label),1)]),_:2},1032,["class","onClick"])}),128))])}}}),U6=Ci._export_sfc(N6,[["__scopeId","data-v-73ec704e"]]),I6=Ve.useModelComp(Ve.pinia),{systemPath:g0}=Ve.storeToRefs(I6),ma=y.ref(),_0=new Map;function z6(s,e,t,n,i){const r=async u=>{try{const h=await Fn.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=f=>{try{const p=f.target.result,M=new os().parse(p);M.preload(),h(M)}catch(p){g(p)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new ln({color:8947848,side:cn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const f=new FileReader;f.onload=async p=>{try{const x=p.target.result;let M=null;h&&h.length>0&&(h.length===1?M=await o(h[0]):M=await a(h));const b=new as;M&&b.setMaterials(M);const N=b.parse(x);M||N.traverse(L=>{L.isMesh&&(L.material=new ln({color:8947848,side:cn}))}),g(N)}catch(x){_(x)}},f.onerror=()=>{_(new Error("OBJ文件读取失败"))},f.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let f=0;f<u.length;f++){const p=u[f];n.value=`正在加载模型 ${f+1}/${u.length}...`;const x=await r(p.objUrl),M=((h=p.objUrl)==null?void 0:h.split("/").pop())||`model_${f}.obj`,b=new File([x],M,{type:x.type});let N=[];if(p.mtlUrls){const P=Array.isArray(p.mtlUrls)?p.mtlUrls:[p.mtlUrls];for(let I=0;I<P.length;I++){const A=P[I],E=await r(A),F=(A==null?void 0:A.split("/").pop())||`material_${f}_${I}.mtl`,B=new File([E],F,{type:E.type});N.push(B)}}const L=await l(b,N);g.add(L),e.value.push(L),_.push(L)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let f;const p=u.toLowerCase();switch(p){case".txt":case".cpt":case".obj":const x=await h.text();if(p===".txt"||p===".cpt"){const Y=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Te=[...x.matchAll(Y)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),et=new rn,We=Te.flatMap(O=>[O.x,O.y,O.z]);if(et.setAttribute("position",new Lt(We,3)),p===".txt"){const O=new Oi({color:"#5B5C99",size:1,sizeAttenuation:!1});f=new Vs(et,O)}else if(p===".cpt"){const O=new Ai({color:"#5B5C99",linewidth:100});f=new Ba(et,O)}}else if(p===".obj"){const Y=new as;if(g&&g.length>0){const me=new os;for(const Te of g){const et=await Te.text(),We=me.parse(et);We.preload(),Y.setMaterials(We);break}}f=Y.parse(x),(!g||g.length===0)&&f.traverse(me=>{me.isMesh&&(me.material=new ln({color:"#B3B3D4"})),me instanceof Pt&&(me.material.side=cn)})}break;case".stl":const M=await h.arrayBuffer(),N=new Hi().parse(M),L=new ln({color:"#B3B3D4",side:cn});f=new Pt(N,L);break;case".nc":const P=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],I={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},A=new An,E=P.map(Y=>new Promise((me,Te)=>{new Hi().load(g0.value===""?`/model/${Y}`:`${g0.value}\\${Y}`,We=>{const O=new ln({color:I[Y]||"#B3B3D4",side:cn}),dt=new Pt(We,O);me(dt)},void 0,Te)}));try{(await Promise.all(E)).forEach(me=>A.add(me)),f=A}catch(Y){throw console.error("加载NC文件对应的STL文件失败:",Y),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const F=new pu,B=new An;try{const Y=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),me=new Blob([Y.data],{type:"application/octet-stream;charset=UTF-8"}),Te=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),et=new Blob([Te.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((dt,st)=>{const it=URL.createObjectURL(me);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=1,Ze[Le*3+1]=0,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)}),O=await new Promise((dt,st)=>{const it=URL.createObjectURL(et);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=0,Ze[Le*3+1]=1,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)});B.add(We),B.add(O),f=B}catch(Y){throw console.error("PCD文件加载失败:",Y),new Error("无法加载PCD文件")}break;case".urdf":const X=URL.createObjectURL(h),Z=new gc,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",W={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},he=new Map,Q=new Map,xe=new Map,De=async Y=>{if(he.has(Y))return console.log(`从缓存加载: ${Y}`),he.get(Y);try{const me=await wn.axios.get(`${se}/${Y}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Te=new Blob([me.data],{type:"application/octet-stream;charset=UTF-8"});return W.enableCache&&he.set(Y,Te),Te}catch(me){throw console.error(`加载文件失败: ${Y}`,me),new Error(`无法加载文件: ${Y}`)}},Ae=(Y="default")=>{if(Q.has(Y))return Q.get(Y);const me=new ln({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Yn});return Q.set(Y,me),me},pe=Y=>{try{Y.isBufferGeometry&&Y.mergeVertices&&Y.mergeVertices(),Y.computeVertexNormals&&Y.computeVertexNormals(),Y.computeBoundingSphere&&Y.computeBoundingSphere(),Y.deleteAttribute&&Y.deleteAttribute("uv2")}catch(me){console.warn("几何体优化失败,使用原始几何体:",me)}return Y},re=async(Y,me,Te)=>{const et=`stl_${me}`;if(xe.has(et)){const st=xe.get(et);return new Pt(st,Ae())}const We=await Y.arrayBuffer();let dt=new Hi(Te).parse(We);return dt=pe(dt),xe.set(et,dt),new Pt(dt,Ae())},q=async(Y,me,Te)=>{const et=`obj_${me}`;if(he.has(et))return he.get(et).clone();const We=await Y.text(),O=new as(Te),dt=me.replace(".obj",".mtl");try{const Ie=await(await De(dt)).text(),Le=new os(Te).parse(Ie);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${dt}`)}const st=O.parse(We);return st.traverse(it=>{it.isMesh&&(it.geometry=pe(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),he.set(et,st),st},K=(Y,me)=>{const Te=new O0;if(Te.addLevel(Y,0),Y.geometry){const et=Y.geometry.clone(),We=new Pt(et,Y.material);Te.addLevel(We,50)}return Te};let te=0,ee=0;const fe=[];Z.loadMeshCb=async(Y,me,Te,et,We)=>{const O=Y.split("/").pop(),dt=Te||(()=>{});te++;const st=new Promise(async(it,Ie)=>{try{const Ze=await De(O);if(!Ze||Ze.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let rt;switch(Le){case"stl":rt=await re(Ze,O,me);break;case"obj":rt=await q(Ze,O,me);break;default:throw new Error(`不支持的文件格式: ${Le}`)}W.enableLOD&&rt.isMesh&&(rt=K(rt,O)),dt(rt),ee++,et&&et({loaded:ee,total:te,progress:ee/te}),it(rt)}catch(Ze){console.error(`mesh文件加载失败: ${O}`,Ze);const Le=new An;dt(Le),it(Le);const rt=new Wi(.1,.1,.1),Xt=new j0({color:16711680,wireframe:!0});return new Pt(rt,Xt)}});fe.push(st)};try{if(!X){ma.value=void 0;break}if(f=await Z.loadAsync(X),console.log(`URDF文件加载完成,等待${te}个mesh文件加载...`),fe.length>0)try{await Promise.allSettled(fe),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${te}`)}catch(Te){console.warn("部分mesh文件加载失败,但继续显示模型",Te)}f.traverse(Te=>{Te.isMesh&&(Te.castShadow=!0,Te.receiveShadow=!0,Te.renderOrder=1,Te.material&&(Te.material.needsUpdate=!0))}),console.time("计算包围盒");const Y=new Tn;Y.expandByObject(f);const me=`urdf_${Date.now()}`;f.userData.boundingBox=Y.clone(),f.userData.modelId=me,_0.set(me,{box:Y.clone(),center:Y.getCenter(new z),size:Y.getSize(new z),maxSize:Math.max(...Y.getSize(new z).toArray())}),ma.value=f,console.log("URDF模型加载完成并优化")}catch(Y){console.error("URDF加载失败:",Y),ma.value=void 0}finally{X&&URL.revokeObjectURL(X)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return f};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const f=u[_],p=await d(f.suffix,f.blob,f.mtlBlobs||[],f.meshFiles||[]);p&&(h.add(p),e.value.push(p),g.push(p))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:ma,modelBoundingBoxes:_0}}window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const gu=Ve.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(s){this.selectArray=s},setSelectString(s){this.selectString=s}}}),B6={class:"calculator-content"},O6={class:"calculator-child"},k6={class:"calculator-child"},V6=y.defineComponent({__name:"calculator",setup(s){const e=y.ref(),t=y.ref();return y.onMounted(()=>{e.value=[{type:"Upload",label:"输入",name:"input"}],t.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,i)=>(y.openBlock(),y.createElementBlock("div",B6,[y.createElementVNode("div",O6,[y.createVNode(Fn.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),y.createElementVNode("div",k6,[y.createVNode(Fn.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),H6=Ci._export_sfc(V6,[["__scopeId","data-v-73db0fe7"]]),_u=Ve.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(s){this.selectIndex=s},setSelectMenu(s){this.selectMenu=s},setSelectTitle(s){this.selectTitle=s}}}),vu=(s,e)=>{let t=s,n=e;return Array.isArray(t)&&(t=t==null?void 0:t.map((i,r)=>{if(Array.isArray(i)){let o={};return i=i==null?void 0:i.forEach((a,l)=>{var c;(c=n==null?void 0:n[l])!=null&&c.prop?o[n[l].prop]=a:Array.isArray(a)&&(o.children=vu(a,n))}),Object.assign(o,{id:r})}else return i})),t},yu=(s,e,t)=>{let n=s,i=e;return n=n==null?void 0:n.map((r,o)=>{var a,l;return!Array.isArray(r)||!((a=i==null?void 0:i[o])!=null&&a.label)&&!t||(r.unshift(((l=i==null?void 0:i[o])==null?void 0:l.label)??""),r.some(c=>Array.isArray(c))&&(r=r==null?void 0:r.map(c=>{var d;return Array.isArray(c)&&(c=yu(c,(d=i==null?void 0:i[o])==null?void 0:d.children,t)),c}))),r}),n},G6=(s,e,t)=>{if(e==="")return s==null?void 0:s.filter(n=>(n==null?void 0:n.id)!==t);{const n=e.split("-");return W6(s,n,t)}},W6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=n==null?void 0:n.filter(r=>r.id!==t):n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=xu(r,i,t)),r)),n},xu=(s,e,t)=>{var r,o;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=(r=n.children)==null?void 0:r.filter(a=>a.id!==t):n.children=(o=n.children)==null?void 0:o.map(a=>(a.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),a=xu(a,i,t)),a)),n},X6=(s,e,t)=>{if(e==="")return t;{const n=e.split("-");return j6(s,n,t)}},j6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=t:n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=Mu(r,i,t)),r)),n},Mu=(s,e,t)=>{var r;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=t:n.children=(r=n.children)==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Mu(o,i,t)),o)),n},bu=Ve.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Su=Ve.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(s){this.objUrl=s},setBlobUrls(s){this.blobUrls=s}}}),kl=async s=>{var r,o,a,l,c,d,m;let e=(o=(r=Ve.cloneDeep(s))==null?void 0:r.optionUrl)==null?void 0:o.menuSelect,t=[];e==null||e.forEach(u=>{});let n="";const i=await Qt.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,f;(u==null?void 0:u.name)===(((f=(_=(g=(h=Ve.cloneDeep(s))==null?void 0:h.optionUrl)==null?void 0:g.groupSelect)==null?void 0:_[0])==null?void 0:f.replaceAll("'",""))??"")&&(n=u==null?void 0:u.id)}),n!==""){const u=(a=i==null?void 0:i[0])==null?void 0:a.compData;let h=(c=(l=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:l.contents)==null?void 0:c.map(_=>_==null?void 0:_.label),g=(m=(d=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:m.map(_=>(_=_==null?void 0:_.filter(f=>!(f!=null&&f.id)),_));g==null||g.forEach(_=>{t.push(Qt.getValueToObjectValue(_,h))})}return t},q6={class:"table-content"},$6={class:"menu-config-wrap"},Y6=["onClick"],K6={key:0,class:"viewport-wrap"},J6=["onClick"],Z6={title:"选择显示列信息"},Q6={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","max-height":"300px",width:"300px",overflow:"auto"}},e5={class:"pop-view"},t5={class:"pop-wrapper"},n5={class:"file-list-pop"},i5=["title","onClick"],s5=["onClick"],r5={class:"form-content"},a5={key:0,class:"dialog-footer"},o5={class:"dialog-footer"},l5={__name:"index",props:{compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0}},emits:["change","contentChange","onButtonClick","contentClick","pageChange","rowClick"],setup(s,{emit:e}){const t=y.ref([]),n=Su(Ve.pinia),i=y.ref(null),r=s,o=e,a=y.ref([]),l=y.ref([]),c=y.ref(!1),d=y.ref([]),m=y.ref(!1),u=y.ref(),h=Ve.useMenuState(),{importLoading:g,activeMenuPath:_,contentLoading:f}=Ve.storeToRefs(h),p=bu(Ve.pinia),x=Ve.useModelComp(Ve.pinia),{extraContents:M}=Ve.storeToRefs(x),b=y.ref([]);y.ref(!1);const N=y.ref("");y.ref();const L=y.ref(!0),P=y.ref(0),I=y.ref(!1),A=y.ref(""),E=y.ref(!1),F=y.ref({label:"查看三维模型"}),B=y.ref(!1),X=y.ref(),Z=y.ref([]),se=y.ref([]),W=y.ref(!1),he=y.ref(),Q=y.ref([]),xe=y.ref([]),De=y.ref([]),Ae=y.ref(),pe=y.ref(),re=gu(Ve.pinia),q=y.ref(),K=_u(Ve.pinia),{selectIndex:te,selectMenu:ee,selectTitle:fe}=Ve.storeToRefs(K),{selectString:Y}=Ve.storeToRefs(re),me=wu.useLoginState(Ve.pinia),{loginUserInfo:Te}=Ve.storeToRefs(me),et=y.ref(720),We=y.ref(!1),O=y.ref([]),dt=y.ref(),st=y.ref(!0),it=y.ref(null),Ie=$=>{O.value=$},Ze=($,H)=>{dt.value===H?st.value=!1:st.value=!0,dt.value=H==null?void 0:H.changeProp},Le=y.computed(()=>{var $;return($=a.value)==null?void 0:$.filter(H=>(H==null?void 0:H.label)!=="操作")}),rt=()=>{E.value=!1},Xt=$=>{o("clickTrigger",$)},k=async $=>{var ue,ve,ge,ze,Se,Ce,T,C,V,j;const H=$==null?void 0:$.row;if((ue=H==null?void 0:H.toString())!=null&&ue.includes(".urdf")){he.value=H,c.value=!0;return}let ae=[];if((ve=H==null?void 0:H.toString())!=null&&ve.includes(".stl")||(ge=H==null?void 0:H.toString())!=null&&ge.includes(".STL")||(ze=H==null?void 0:H.toString())!=null&&ze.includes(".obj")||(Se=H==null?void 0:H.toString())!=null&&Se.includes(".mtl")){let G,le=[],Me={};if(Array.isArray(H)?G=H:G=H==null?void 0:H.split(","),G==null||G.forEach(_e=>{_e.includes(".mtl")?le.push(_e):Me.blob=Me.blob?Me.blob+","+_e:_e}),(le==null?void 0:le.length)>0&&(Me.mtlBlobs=le),(T=(Ce=Object.values(Me))==null?void 0:Ce[0])!=null&&T.includes("http:"))ae.push(Me);else{const _e=new Blob([Me.blob],{type:"application/octet-stream;charset=UTF-8"});let ce=URL.createObjectURL(_e),ne="";(C=H==null?void 0:H.split("/"))==null||C.forEach((Oe,de)=>{var Ge;de===((Ge=H==null?void 0:H.split("/"))==null?void 0:Ge.length)-1&&(ne=Oe)}),(V=Me.blob)!=null&&V.includes(".stl")&&(ne=(ne==null?void 0:ne.replaceAll(">",""))+".urdf"),u.value=[{name:ne,blobUrl:ce}],m.value=!0}}else{const G=await axios.get(H,{responseType:"blob",headers:{"Content-Type":"application/json"}}),le=new Blob([G.data],{type:"application/octet-stream;charset=UTF-8"});let Me=URL.createObjectURL(le),_e="";(j=H==null?void 0:H.split("/"))==null||j.forEach((ce,ne)=>{var Oe;ne===((Oe=H==null?void 0:H.split("/"))==null?void 0:Oe.length)-1&&(_e=ce)}),u.value=[{name:_e,blobUrl:Me}],m.value=!0}(ae==null?void 0:ae.length)>0&&n.setBlobUrls(ae)},R=$=>{var ue,ve,ge,ze;const H=(ze=(ue=$==null?void 0:$.url)==null?void 0:ue.split("."))==null?void 0:ze[((ge=(ve=$==null?void 0:$.url)==null?void 0:ve.split("."))==null?void 0:ge.length)-1];return($==null?void 0:$.name)+"."+H},oe=async $=>{const H=await Fn.downloadAvatarApi({url:$==null?void 0:$.url}),ae=URL.createObjectURL(H.data),ve={name:R($),blobUrl:ae};u.value=[ve],m.value=!0},we=async $=>{const H=await Fn.downloadAvatarApi({url:$==null?void 0:$.url}),ae=URL.createObjectURL(H.data),ve={name:R($),blobUrl:ae},ge=document.createElement("a");ge.href=ve.blobUrl,ge.download=ve.name,ge.style.display="none",document.body.appendChild(ge),ge.click(),setTimeout(()=>{document.body.removeChild(ge)},100)},Pe=($,H)=>{if(Object.values(H).length!==0)return Object.values(H).find(ae=>{var ue,ve,ge;return((ue=ae==null?void 0:ae.toString())==null?void 0:ue.includes(".txt"))||((ve=ae==null?void 0:ae.toString())==null?void 0:ve.includes(".cpt"))||((ge=ae==null?void 0:ae.toString())==null?void 0:ge.includes(".obj"))})?[...$,F.value]:$},be=$=>{var ve;Y.value===""?$==null||$[0]:($==null?void 0:$.find(ge=>(ge==null?void 0:ge.selectLabel)==="("+Y.value+")"))??($==null||$.find(ge=>!(ge!=null&&ge.selectLabel)));let H=$;(ve=a.value)!=null&&ve.find(ge=>ge.prop==="index");let ae=Ae.value;const ue=[];return H==null||H.forEach((ge,ze)=>{var Ce;let Se={};if(Array.isArray(ge)){let T=[];ge==null||ge.filter(C=>!(C!=null&&C.id)).forEach((C,V)=>{var j,G,le,Me,_e;if((j=ae==null?void 0:ae[V])!=null&&j.prop&&!Array.isArray(C)){let ce={};ce[ae[V].column]=C,M!=null&&M.value&&((G=M==null?void 0:M.value)==null?void 0:G.length)>0&&((le=M==null?void 0:M.value)!=null&&le.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(ce)))&&(T=(Me=M==null?void 0:M.value)==null?void 0:Me.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(ce))),T&&T.length>0?Se[ae[V].prop]=T!=null&&T.find(ne=>{var Oe;return((Oe=Object.keys(ne))==null?void 0:Oe[0])===ae[V].column})?(_e=T==null?void 0:T.find(ne=>{var Oe;return((Oe=Object.keys(ne))==null?void 0:Oe[0])===ae[V].column}))==null?void 0:_e[ae[V].column]:C:Se[ae[V].prop]=C}})}else Se=ge;Array.isArray(ge)&&ge.some(T=>T==null?void 0:T.id)?ue.push(Object.assign(Se,{id:(Ce=ge==null?void 0:ge.find(T=>T.id))==null?void 0:Ce.id})):Se.id?ue.push(Se):ue.push(Object.assign(Se,{id:ze}))}),ue},_t=async $=>{var ve,ge,ze,Se,Ce;let H={};for(let T in $)$[T]!==""&&(H["tableData."+T]=$[T]);const ae=await Qt.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:_.value},H),ue=(ze=(ge=(ve=Ve.cloneDeep(ae))==null?void 0:ve.data)==null?void 0:ge.result)==null?void 0:ze.map(T=>{var V;let C=[];return C.push({id:T.id}),C.push((V=T==null?void 0:T.value)==null?void 0:V.tableData),C});b.value=be(Qt.getTableContents(ue,(Ce=(Se=Ve.cloneDeep(a.value))==null?void 0:Se.map(T=>T.label))==null?void 0:Ce.filter(T=>T!=="操作")))},Ke=async $=>{var ue,ve,ge,ze,Se,Ce,T,C,V,j,G,le,Me,_e;const H=(ue=Ve.cloneDeep(a.value))==null?void 0:ue.filter(ce=>ce==null?void 0:ce.isRoute);if((H==null?void 0:H.length)>0){let ce=(ve=H==null?void 0:H[0])==null?void 0:ve.prop,ne=Ve.cloneDeep(_).value+"/"+($==null?void 0:$[ce]),Oe=Ve.cloneDeep(_).value,de=await Qt.getItemData(ne,sessionStorage.getItem("systemKey"),"");if((de==null?void 0:de.length)>0)await Qt.loadingConstruct(ne,ne+`/updateLoading${(ge=Te.value)==null?void 0:ge.account}`),x.setRouteToChildPath(Oe),h.setActiveMenuPath(ne+`/updateLoading${(ze=Te.value)==null?void 0:ze.account}`);else{let Ge=(Se=H==null?void 0:H[0])==null?void 0:Se.prop,Ee=Ve.cloneDeep(_).value+"/"+($==null?void 0:$[Ge]),ht=Ve.cloneDeep(_).value;await Qt.getItemData(ht+"/",sessionStorage.getItem("systemKey"),""),await Qt.loadingConstruct(ht+"/",Ee),await Qt.loadingConstruct(Ee,Ee+`/updateLoading${(Ce=Te.value)==null?void 0:Ce.account}`),x.setRouteToChildPath(ht),h.setActiveMenuPath(Ee+`/updateLoading${(T=Te.value)==null?void 0:T.account}`)}}let ae=await Qt.getItemData(_.value,sessionStorage.getItem("systemKey"),$.id);if(ae=ae==null?void 0:ae.filter(ce=>ce.comp!=="methodButton"),ae&&ae.length>0){const ce=!Array.isArray(fe.value)&&((C=fe.value)==null?void 0:C.key)!=="main"?[]:fe.value;ce.push({key:ee.value===""?(V=$==null?void 0:$.id)==null?void 0:V.toString():ee.value+"-"+((j=$==null?void 0:$.id)==null?void 0:j.toString()),value:$[(G=Object.keys($))==null?void 0:G.filter(ne=>ne!=="index"&&ne!=="id")[0]]}),K.setSelectMenu(ee.value===""?(le=$==null?void 0:$.id)==null?void 0:le.toString():ee.value+"-"+((Me=$==null?void 0:$.id)==null?void 0:Me.toString())),K.setSelectTitle(ce),K.setSelectIndex((_e=$==null?void 0:$.id)==null?void 0:_e.toString()),o("pageChange",ae)}},ft=$=>{var H;(H=Ve.cloneDeep(r.itemData))==null||H.map(ae=>((ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=$),ae))},vt=async($,H,ae,ue)=>{var ge,ze,Se,Ce,T,C,V;if((ue==null?void 0:ue.data)==="查看"&&($!=null&&$.every(j=>(j==null?void 0:j.url)&&(j==null?void 0:j.name)))){let j=Ve.cloneDeep($);j=await((ge=Ve.cloneDeep(j))==null?void 0:ge.map(async le=>{var ce,ne,Oe,de;const Me=await Fn.downloadAvatarApi({url:le==null?void 0:le.url});let _e=URL.createObjectURL(Me.data);return{name:(le==null?void 0:le.name)+"."+((de=(ce=le==null?void 0:le.url)==null?void 0:ce.split("."))==null?void 0:de[((Oe=(ne=le==null?void 0:le.url)==null?void 0:ne.split("."))==null?void 0:Oe.length)-1]),blobUrl:_e}}));let G=await Promise.all(j);u.value=G,m.value=!0}o("contentClick",$,H,ae,{id:r==null?void 0:r.index,type:"table"});const ve=Ve.cloneDeep(a.value);if((ue==null?void 0:ue.isMainKey)===!0&&(ve==null?void 0:ve.length)>0){(ze=ve==null?void 0:ve[0])==null||ze.prop;let j=Ve.cloneDeep(_).value+"/"+(ue==null?void 0:ue.data),G=Ve.cloneDeep(_).value,le=await Qt.getItemData(j,sessionStorage.getItem("systemKey"),"");if((le==null?void 0:le.length)>0)await Qt.loadingConstruct(j,j+`/updateLoading${(Se=Te.value)==null?void 0:Se.account}`),x.setRouteToChildPath(G),h.setActiveMenuPath(j+`/updateLoading${(Ce=Te.value)==null?void 0:Ce.account}`);else{(T=ve==null?void 0:ve[0])==null||T.prop;let Me=Ve.cloneDeep(_).value+"/"+(ue==null?void 0:ue.data),_e=Ve.cloneDeep(_).value;await Qt.getItemData(_e+"/",sessionStorage.getItem("systemKey"),""),await Qt.loadingConstruct(_e+"/",Me),await Qt.loadingConstruct(Me,Me+`/updateLoading${(C=Te.value)==null?void 0:C.account}`),x.setRouteToChildPath(_e),h.setActiveMenuPath(Me+`/updateLoading${(V=Te.value)==null?void 0:V.account}`)}}},Fe=()=>{m.value=!1},at=$=>{o("rowClick",$)};y.watch(()=>r.changedContent,()=>{var ae,ue;if(!r.changedContent)return;let $=(ae=b.value)==null?void 0:ae.map(ve=>{var ge;return ve.id===((ge=r.changedContent)==null?void 0:ge.id)&&(ve={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete ve.newId),ve});const H=(ue=r.itemData)==null?void 0:ue.map(ve=>((ve==null?void 0:ve.key)==="tableContents"&&(ve.contents=$),ve));b.value=$,o("contentChange",{contents:H,index:r.index}),o("change",{content:$,index:r==null?void 0:r.index,buttonName:"",id:r==null?void 0:r.index})},{deep:!0,immediate:!0});const Et=()=>{},St=async()=>{const $=_.value,H=sessionStorage.getItem("systemKey"),ae=await Qt.getItemData($,H,""),ue=ae==null?void 0:ae.find(Se=>(Se==null?void 0:Se.name)==="方法明细"),ve=(ue==null?void 0:ue.compData)||[],ge=ve==null?void 0:ve.find(Se=>(Se==null?void 0:Se.key)==="formContent");return ge==null?void 0:ge.contents},$e=async($,H)=>{const ae=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");return await axios.post($,{inputData:H},{headers:{Authorization:ae}}).catch(ve=>(h.setImportLoading(!1),Promise.reject(ve)))},At=async($,H,ae)=>{var _e;h.setImportLoading(!0);const ue=await St().catch(ce=>(h.setImportLoading(!1),Promise.reject(ce))),ve=ue==null?void 0:ue.find(ce=>ce==null?void 0:ce.isMain),ge=ve==null?void 0:ve.value;if(!ge){console.log("未搜索到isMain, 缺少算法执行接口"),h.setImportLoading(!1);return}const ze=a.value||[],Se=ze.find(ce=>(ce==null?void 0:ce.label)==="输入数据"),Ce=Se==null?void 0:Se.prop,T=H==null?void 0:H[Ce],C=await $e(ge,T).catch(ce=>(h.setImportLoading(!1),Promise.reject(ce))),V=(_e=C==null?void 0:C.data)==null?void 0:_e.result,j=ze.find(ce=>(ce==null?void 0:ce.label)==="输出数据"),G=j==null?void 0:j.prop,le=b.value,Me=le==null?void 0:le.find((ce,ne)=>(ce==null?void 0:ce.id)==(H==null?void 0:H.id));Me[G]=V,A.value="编辑",pe.value=Me,N.value=H==null?void 0:H.id,Rt(!0),h.setImportLoading(!1)},J=($,H,ae)=>{var ue,ve,ge,ze,Se,Ce,T,C;if(N.value="",W.value=!0,L.value=!0,o("onButtonClick",$,H),$==="删除"){b.value=(ue=Ve.cloneDeep(b.value))==null?void 0:ue.filter(j=>(j==null?void 0:j.id)!==(H==null?void 0:H.id));const V=G6(q.value,ee.value,H==null?void 0:H.id);ft(V),o("change",{content:b.value,singleContent:H,index:r==null?void 0:r.index,type:"delete",buttonName:$,column:a.value})}else if($==="批量删除"){if(((ve=O.value)==null?void 0:ve.length)===0)return wn.ElMessage.warning("请先勾选操作的数据");o("change",{content:b.value,singleContent:null,selectItems:O.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:$,column:a.value})}else if($==="复制新增"){A.value="新增";const V=Ve.cloneDeep(H),j=(ge=a.value)==null?void 0:ge.find(Me=>Me==null?void 0:Me.isMainKey),G=j||((ze=a.value)==null?void 0:ze[0]),le=(Se=xe.value)==null?void 0:Se.find(Me=>(Me==null?void 0:Me.label)==="新建");ke(!0,le,{data:V,firstCol:G})}else if($==="新增")A.value="新增",ot(""),E.value=!0;else if($==="编辑")A.value="编辑",ot(H),E.value=!0;else if($==="查看")A.value="查看",ot(H),W.value=!1,L.value=!1,E.value=!0;else if($==="查看三维模型"){const V={};for(let G in H)G!=="id"&&(V[G]=H[G]);let j=(Ce=Object.values(V))==null?void 0:Ce[1];p.setTableShowThree(j)}else if(((T=ae==null?void 0:ae.extra)==null?void 0:T.type)==="modelExample")A.value=$,B.value=!0;else if($==="新建"){const V=(C=xe.value)==null?void 0:C.find(j=>(j==null?void 0:j.label)==="新建");ke(!1,V)}else if($==="修改模板"){let V=Ve.cloneDeep(_).value;x.setRouteToChildPath(V),h.setActiveMenuPath(V+"/")}else $==="执行"&&At($,H)},tt=async $=>{var ae,ue,ve,ge,ze,Se;const H=await wn.getInsofDataApi({key:{pageKey:$,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((ae=H==null?void 0:H.data)==null?void 0:ae.code)===200)return Array.isArray((ue=H==null?void 0:H.data)==null?void 0:ue.result)&&((ge=(ve=H==null?void 0:H.data)==null?void 0:ve.result)==null?void 0:ge.length)>0?(Se=(ze=H==null?void 0:H.data)==null?void 0:ze.result)==null?void 0:Se.map(Ce=>{var T;return{id:Ce==null?void 0:Ce.id,...(T=Ce==null?void 0:Ce.value)==null?void 0:T.pageData}}):[]},Ne=($,H,ae,ue)=>{var ve;o("contentChange",{contents:(ve=$==null?void 0:$.compData)==null?void 0:ve.map(ge=>{var ze;return(ge==null?void 0:ge.key)==="formContent"?{...ge,contents:(ze=ge==null?void 0:ge.contents)==null?void 0:ze.map(Se=>(Se==null?void 0:Se.key)===H?{...Se,value:ae}:Se)}:ge}),index:$==null?void 0:$.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(ue)},lt=($,H)=>{let ae=$==null?void 0:$[H==null?void 0:H.prop],ue=1;if(b.value.some(ve=>(ve==null?void 0:ve[H==null?void 0:H.prop])===ae)){const ve=ae;for(;b.value.some(ge=>(ge==null?void 0:ge[H==null?void 0:H.prop])===`${ve}(${ue})`);)ue++;ae=`${ve}(${ue})`}return ae},ke=async($,H,ae)=>{var ze,Se,Ce,T,C;let ue,ve;const ge=lt(ae==null?void 0:ae.data,ae==null?void 0:ae.firstCol);if($?(ue=Ve.cloneDeep(_).value+"/"+((Ce=ae==null?void 0:ae.data)==null?void 0:Ce[(Se=ae==null?void 0:ae.firstCol)==null?void 0:Se.prop]),ve=Ve.cloneDeep(_).value+"/"+ge):(ue=Ve.cloneDeep(_).value+"/",ve=Ve.cloneDeep(ue)+`loading${(ze=Te.value)==null?void 0:ze.account}`),H){const V=await Qt.getItemData(ve,sessionStorage.getItem("systemKey"),"");if((V==null?void 0:V.length)>0)if($){const j=V==null?void 0:V.find(G=>{var le;return((le=G==null?void 0:G.comp)==null?void 0:le.toUpperCase())==="FORM"});j&&Ne(j,(T=ae==null?void 0:ae.firstCol)==null?void 0:T.label,ge,_.value)}else x.setRouteToChildPath(Ve.cloneDeep(_).value),h.setActiveMenuPath(ve);else if(await Qt.loadingConstruct(ue,ve),$){const j=await tt(ve);if((j==null?void 0:j.length)>0){const G=j==null?void 0:j.find(le=>{var Me;return((Me=le==null?void 0:le.comp)==null?void 0:Me.toUpperCase())==="FORM"});G&&Ne(G,(C=ae==null?void 0:ae.firstCol)==null?void 0:C.label,ge,_.value)}}else x.setRouteToChildPath(Ve.cloneDeep(_).value),h.setActiveMenuPath(ve)}else $?(N.value="",pe.value=ae==null?void 0:ae.data,Rt(!0,ae==null?void 0:ae.firstCol,ge)):(x.setRouteToChildPath(Ve.cloneDeep(_).value),h.setActiveMenuPath(ve))},Re=()=>{c.value=!1,he.value=null},ot=$=>{var ve,ge,ze,Se,Ce,T;const H=[];let ae=[];for(let C in $)Array.isArray($==null?void 0:$[C])&&ae.push(C);l.value=Ve.cloneDeep(a.value),(ge=Qt.getColumnChild((ve=Ve.cloneDeep(a.value))==null?void 0:ve.filter(C=>(C==null?void 0:C.label)!=="操作")))==null||ge.forEach((C,V)=>{var j;ae.find(G=>G===(C==null?void 0:C.prop))||(C!=null&&C.formType&&((j=C==null?void 0:C.formType)==null?void 0:j.toUpperCase())==="SELECT"?H.push({label:(C==null?void 0:C.label)??"",name:(C==null?void 0:C.prop)??"t"+V,type:!(C!=null&&C.formType)||(C==null?void 0:C.formType)===""?"Input":C==null?void 0:C.formType,value:($==null?void 0:$[C==null?void 0:C.prop])??(C==null?void 0:C.value)??"",id:(C==null?void 0:C.id)??V,contents:(C==null?void 0:C.options)??[],width:1,isFormColHidden:C==null?void 0:C.isFormColHidden,optionUrl:{groupSelect:C==null?void 0:C.groupSelect,menuSelect:C==null?void 0:C.formMenuSelect,type:"Select",selectRelateType:C==null?void 0:C.selectRelateType}}):H.push({label:(C==null?void 0:C.label)??"",name:(C==null?void 0:C.prop)??"t"+V,type:!(C!=null&&C.formType)||(C==null?void 0:C.formType)===""?"Input":C==null?void 0:C.formType,value:($==null?void 0:$[C==null?void 0:C.prop])??(C==null?void 0:C.value)??"",id:(C==null?void 0:C.id)??V,contents:(C==null?void 0:C.options)??[],width:1,isFormColHidden:C==null?void 0:C.isFormColHidden}))}),$===""||!$||(N.value=($==null?void 0:$.id)??"");let ue=Qt.getColumnChild((ze=Ve.cloneDeep(a.value))==null?void 0:ze.filter(C=>(C==null?void 0:C.label)!=="操作"));Z.value&&((Se=Z.value)==null?void 0:Se.length)>0&&(Z.value=(Ce=Ve.cloneDeep(Z).value)==null?void 0:Ce.map(C=>{var j;let V=(j=ue==null?void 0:ue.find(G=>(G==null?void 0:G.label)===(C==null?void 0:C.label)))==null?void 0:j.prop;return V&&(C.value=$[V]),C})),De.value=Z.value&&((T=Z.value)==null?void 0:T.length)>0?Qt.getTableFormToForm(Z.value):H},Tt=async()=>{var H;await y.nextTick();const $=(H=i.value)==null?void 0:H.$el;$&&Qt.Sortable.create($,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ae=>{var ze;const{oldIndex:ue,newIndex:ve}=ae;if(ue===ve)return;const ge=Le.value.splice(ue,1)[0];Le.value.splice(ve,0,ge),a.value=(ze=a.value)==null?void 0:ze.slice().sort((Se,Ce)=>{var T,C;return Se.label==="操作"?1:Ce.label==="操作"?-1:((T=Le.value)==null?void 0:T.indexOf(Se))-((C=Le.value)==null?void 0:C.indexOf(Ce))})}})};y.onMounted(()=>{X.value=window.innerWidth-240*2});const qt=()=>{y.nextTick(()=>{Tt()})},Rt=($=!0,H,ae)=>{var ze;console.log(456,$,pe.value,N.value);let ue=Qt.getColumnChild((ze=Ve.cloneDeep(a.value))==null?void 0:ze.filter(Se=>(Se==null?void 0:Se.label)!=="操作")),ve,ge=Ve.cloneDeep(b.value);if(!pe.value){E.value=!1;return}if(N.value===""){P.value++;let Se;H&&ae?Se={id:P.value,[H==null?void 0:H.prop]:ae}:Se={id:P.value},ge.push(Object.assign(pe.value,Se)),ve=Object.assign(pe.value,Se)}else ge=ge==null?void 0:ge.map(Se=>{var Ce,T;if((Se==null?void 0:Se.id)===N.value){let C={};for(let V in Se){let j=(Ce=ue==null?void 0:ue.find(G=>(G==null?void 0:G.prop)===V))==null?void 0:Ce.label;j?C[V]=(T=pe.value)==null?void 0:T[j]:C[V]=Se[V]}Se=Object.assign(C,pe.value),ve=Se}return Se});if(b.value=ge,$){const Se=X6(q.value,ee.value,ge);ft(Se),E.value=!1,pe.value=void 0,x.setCacheUpdatingData({content:Se,singleContent:ve,index:r==null?void 0:r.index,buttonName:A.value,column:a.value}),it.value={content:Se,singleContent:ve,index:r==null?void 0:r.index,buttonName:A.value,column:a.value},o("change",it.value)}},bn=async($,H,ae)=>{var T,C,V,j,G,le,Me,_e,ce,ne,Oe;dt.value=ae==null?void 0:ae.prop;const ue=Ve.cloneDeep(r.itemData),ve=ue==null?void 0:ue.map(de=>{var Ge;return(de==null?void 0:de.key)==="header"&&((Ge=de.contents)==null||Ge.map((Ee,ht)=>{var He,je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht,Yt,Be,Kt,kt,pt,Gn,S;return Ee.type=Ee!=null&&Ee.type?Ee.type:(Dt=(Xe=(je=(He=Ee==null?void 0:Ee.key)==null?void 0:He.split("$"))==null?void 0:je[1])==null?void 0:Xe.split("("))!=null&&Dt[0]?(Ct=(yt=Qt.FormType)==null?void 0:yt.find(v=>{var w,D,U,ie;return(v==null?void 0:v.key)===((ie=(U=(D=(w=Ee==null?void 0:Ee.key)==null?void 0:w.split("$"))==null?void 0:D[1])==null?void 0:U.split("("))==null?void 0:ie[0])}))==null?void 0:Ct.value:"Input",Ee.options=Ee!=null&&Ee.options?Ee.options:((an=(Ft=(wt=Ee==null?void 0:Ee.key)==null?void 0:wt.split("$"))==null?void 0:Ft[1])==null?void 0:an.length)>0?(Yt=(Ht=Ho(($t=(Nt=Ee==null?void 0:Ee.key)==null?void 0:Nt.split("$"))==null?void 0:$t[1]))==null?void 0:Ht.split(","))==null?void 0:Yt.map(v=>({label:v,value:v})):[],(Be=Ee==null?void 0:Ee.key)!=null&&Be.includes("$")&&(Ee.key=(kt=(Kt=Ee==null?void 0:Ee.key)==null?void 0:Kt.split("$"))==null?void 0:kt[0]),Ee.value=(pt=Object.values(H))==null?void 0:pt[ht],Ee.optionUrl=Ee!=null&&Ee.formMenuSelect&&((Gn=Ee==null?void 0:Ee.formMenuSelect)==null?void 0:Gn.length)>0?{groupSelect:(S=Ee==null?void 0:Ee.groupSelect)==null?void 0:S.split(/[::]/).map(v=>v.trim()),menuSelect:Ee==null?void 0:Ee.formMenuSelect,selectRelateType:"",type:(Ee==null?void 0:Ee.formType)??(Ee!=null&&Ee.groupSelect?"Select":"")}:null,Ee})),de});let ge=Ve.cloneDeep(De.value),ze=(C=(T=Ve.cloneDeep(ve))==null?void 0:T.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:C.contents;ge=ge==null?void 0:ge.map(de=>{var Ge;return de.value=(Ge=ze==null?void 0:ze.find((Ee,ht)=>ht===(de==null?void 0:de.id)))==null?void 0:Ge.value,de});let Se="",Ce=(G=(j=(V=Ve.cloneDeep(ve))==null?void 0:V.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:j.contents)==null?void 0:G.find((de,Ge)=>{var Ee,ht,He;return(de==null?void 0:de.label)===dt.value||(Ge==null?void 0:Ge.toString())===((He=(ht=(Ee=dt.value)==null?void 0:Ee.split("a"))==null?void 0:ht[1])==null?void 0:He.toString())});if((_e=(Me=(le=Ve.cloneDeep(ve))==null?void 0:le.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:Me.contents)==null||_e.forEach(de=>{var Ge,Ee,ht,He,je;Se===""&&((ht=(Ee=(Ge=de==null?void 0:de.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Ee[1])!=null&&ht.includes("["))&&(Se=(je=(He=de==null?void 0:de.optionUrl)==null?void 0:He.groupSelect)==null?void 0:je[1])}),(ce=Ce==null?void 0:Ce.optionUrl)!=null&&ce.menuSelect){let de=await kl(Ce),Ge;if(de==null||de.forEach(Ee=>{var ht,He,je,Xe,Dt,yt,Ct,wt,Ft,an;Se===((He=(ht=Ce==null?void 0:Ce.optionUrl)==null?void 0:ht.groupSelect)==null?void 0:He[1])&&((Dt=(Xe=(je=Ce==null?void 0:Ce.optionUrl)==null?void 0:je.groupSelect)==null?void 0:Xe[1])!=null&&Dt.includes("["))&&((an=Ve.cloneDeep(Ee))==null?void 0:an[(Ft=(wt=(Ct=(yt=Ce==null?void 0:Ce.optionUrl)==null?void 0:yt.groupSelect)==null?void 0:Ct[1])==null?void 0:wt.replaceAll("[",""))==null?void 0:Ft.replaceAll("]","")])===(Ce==null?void 0:Ce.value)&&(Ge=Ee)}),Ge){let Ee=Ve.cloneDeep(ge);Ee=Ee==null?void 0:Ee.map(He=>{var je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht;return(Ge!=null&&Ge[He==null?void 0:He.label]||Ge!=null&&Ge[(yt=(Dt=(Xe=(je=He==null?void 0:He.optionUrl)==null?void 0:je.groupSelect)==null?void 0:Xe[1])==null?void 0:Dt.replaceAll("[",""))==null?void 0:yt.replaceAll("]","")])&&((Ft=(wt=(Ct=He==null?void 0:He.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:wt[1])!=null&&Ft.includes("["))&&(He.value=(Ge==null?void 0:Ge[He==null?void 0:He.label])||(Ge==null?void 0:Ge[(Ht=($t=(Nt=(an=He==null?void 0:He.optionUrl)==null?void 0:an.groupSelect)==null?void 0:Nt[1])==null?void 0:$t.replaceAll("[",""))==null?void 0:Ht.replaceAll("]","")])),He}),b.value=(ne=Ve.cloneDeep(b.value))==null?void 0:ne.map(He=>{if((He==null?void 0:He.id)===(H==null?void 0:H.id)){const je={};return Ee==null||Ee.forEach(Xe=>{je[Xe.name]=Xe.value}),je.id=He==null?void 0:He.id,je}return He});let ht=Ve.cloneDeep(Ee);ht=ht==null?void 0:ht.map(He=>{var je,Xe,Dt,yt;return(Xe=(je=He==null?void 0:He.optionUrl)==null?void 0:je.menuSelect)!=null&&Xe.some(Ct=>Ct==null?void 0:Ct.includes)&&(He.optionUrl.menuSelect=(yt=(Dt=He==null?void 0:He.optionUrl)==null?void 0:Dt.menuSelect)==null?void 0:yt.map(Ct=>{var wt,Ft,an,Nt;if(Ct!=null&&Ct.includes("[")){let $t=(Ft=(wt=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:wt.split(":"))==null?void 0:Ft[1];Ct=(Nt=(an=Ve.cloneDeep(Ee))==null?void 0:an.find(Ht=>(Ht==null?void 0:Ht.label)===$t))==null?void 0:Nt.value}return Ct})),He}),b.value=(Oe=Ve.cloneDeep(b.value))==null?void 0:Oe.map(He=>{if((He==null?void 0:He.id)===(H==null?void 0:H.id)){const je={};return ht==null||ht.forEach(Xe=>{je[Xe.name]=Xe.value}),je.id=He==null?void 0:He.id,je}return He})}}},In=async $=>{var Se,Ce,T,C,V,j,G,le,Me;if(!$)return;pe.value=$,o("onFormChange",$);const H=Ve.cloneDeep(r.itemData),ae=H==null?void 0:H.map(_e=>{var ce;return(_e==null?void 0:_e.key)==="header"&&((ce=_e.contents)==null||ce.map((ne,Oe)=>{var de,Ge,Ee,ht,He,je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht,Yt,Be,Kt;return ne.type=ne!=null&&ne.type?ne.type:(ht=(Ee=(Ge=(de=ne==null?void 0:ne.key)==null?void 0:de.split("$"))==null?void 0:Ge[1])==null?void 0:Ee.split("("))!=null&&ht[0]?(je=(He=Qt.FormType)==null?void 0:He.find(kt=>{var pt,Gn,S,v;return(kt==null?void 0:kt.key)===((v=(S=(Gn=(pt=ne==null?void 0:ne.key)==null?void 0:pt.split("$"))==null?void 0:Gn[1])==null?void 0:S.split("("))==null?void 0:v[0])}))==null?void 0:je.value:"Input",ne.options=ne!=null&&ne.options?ne.options:((yt=(Dt=(Xe=ne==null?void 0:ne.key)==null?void 0:Xe.split("$"))==null?void 0:Dt[1])==null?void 0:yt.length)>0?(an=(Ft=Ho((wt=(Ct=ne==null?void 0:ne.key)==null?void 0:Ct.split("$"))==null?void 0:wt[1]))==null?void 0:Ft.split(","))==null?void 0:an.map(kt=>({label:kt,value:kt})):[],(Nt=ne==null?void 0:ne.key)!=null&&Nt.includes("$")&&(ne.key=(Ht=($t=ne==null?void 0:ne.key)==null?void 0:$t.split("$"))==null?void 0:Ht[0]),ne.value=(Yt=Object.values($))==null?void 0:Yt[Oe],ne.optionUrl=ne!=null&&ne.formMenuSelect&&((Be=ne==null?void 0:ne.formMenuSelect)==null?void 0:Be.length)>0?{groupSelect:(Kt=ne==null?void 0:ne.groupSelect)==null?void 0:Kt.split(/[::]/).map(kt=>kt.trim()),menuSelect:ne==null?void 0:ne.formMenuSelect,selectRelateType:"",type:(ne==null?void 0:ne.formType)??(ne!=null&&ne.groupSelect?"Select":"")}:null,ne})),_e});let ue=Ve.cloneDeep(De.value),ve=(Ce=(Se=Ve.cloneDeep(ae))==null?void 0:Se.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:Ce.contents;if(ue=ue==null?void 0:ue.map(_e=>{var ce;return _e.value=(ce=ve==null?void 0:ve.find((ne,Oe)=>Oe===(_e==null?void 0:_e.id)))==null?void 0:ce.value,_e}),!st.value)return;let ge="",ze=(V=(C=(T=Ve.cloneDeep(ae))==null?void 0:T.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:C.contents)==null?void 0:V.find((_e,ce)=>{var ne,Oe;return(_e==null?void 0:_e.label)===dt.value||(ce==null?void 0:ce.toString())===((Oe=(ne=dt.value)==null?void 0:ne.split("a"))==null?void 0:Oe[1].toString())});if((le=(G=(j=Ve.cloneDeep(ae))==null?void 0:j.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:G.contents)==null||le.forEach(_e=>{var ce,ne,Oe,de,Ge;ge===""&&((Oe=(ne=(ce=_e==null?void 0:_e.optionUrl)==null?void 0:ce.groupSelect)==null?void 0:ne[1])!=null&&Oe.includes("["))&&(ge=(Ge=(de=_e==null?void 0:_e.optionUrl)==null?void 0:de.groupSelect)==null?void 0:Ge[1])}),(Me=ze==null?void 0:ze.optionUrl)!=null&&Me.menuSelect&&st.value){let _e=await kl(ze),ce;if(_e==null||_e.forEach(ne=>{var Oe,de,Ge,Ee,ht,He,je,Xe,Dt,yt;ge===((de=(Oe=ze==null?void 0:ze.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:de[1])&&((ht=(Ee=(Ge=ze==null?void 0:ze.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Ee[1])!=null&&ht.includes("["))&&((yt=Ve.cloneDeep(ne))==null?void 0:yt[(Dt=(Xe=(je=(He=ze==null?void 0:ze.optionUrl)==null?void 0:He.groupSelect)==null?void 0:je[1])==null?void 0:Xe.replaceAll("[",""))==null?void 0:Dt.replaceAll("]","")])===(ze==null?void 0:ze.value)&&(ce=ne)}),ce){let ne=Ve.cloneDeep(ue);ne=ne==null?void 0:ne.map(de=>{var Ge,Ee,ht,He,je,Xe,Dt,yt,Ct,wt,Ft;return(ce!=null&&ce[de==null?void 0:de.label]||ce!=null&&ce[(He=(ht=(Ee=(Ge=de==null?void 0:de.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Ee[1])==null?void 0:ht.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])&&((Dt=(Xe=(je=de==null?void 0:de.optionUrl)==null?void 0:je.groupSelect)==null?void 0:Xe[1])!=null&&Dt.includes("["))&&(de.value=(ce==null?void 0:ce[de==null?void 0:de.label])||(ce==null?void 0:ce[(Ft=(wt=(Ct=(yt=de==null?void 0:de.optionUrl)==null?void 0:yt.groupSelect)==null?void 0:Ct[1])==null?void 0:wt.replaceAll("[",""))==null?void 0:Ft.replaceAll("]","")])),de}),De.value=ne;let Oe=Ve.cloneDeep(ne);Oe=Oe==null?void 0:Oe.map(de=>{var Ge,Ee,ht,He;return(Ee=(Ge=de==null?void 0:de.optionUrl)==null?void 0:Ge.menuSelect)!=null&&Ee.some(je=>je==null?void 0:je.includes)&&(de.optionUrl.menuSelect=(He=(ht=de==null?void 0:de.optionUrl)==null?void 0:ht.menuSelect)==null?void 0:He.map(je=>{var Xe,Dt,yt,Ct;if(je!=null&&je.includes("[")){let wt=(Dt=(Xe=je==null?void 0:je.replaceAll("[","").replaceAll("]",""))==null?void 0:Xe.split(":"))==null?void 0:Dt[1];je=(Ct=(yt=Ve.cloneDeep(ne))==null?void 0:yt.find(Ft=>(Ft==null?void 0:Ft.label)===wt))==null?void 0:Ct.value}return je})),de}),De.value=Oe}}st.value=!1},us=$=>$?($==null?void 0:$.toUpperCase())==="INPUT"?"TEXTAREA":$:"TEXTAREA",ds=$=>{var ge,ze;const H=(ze=(ge=Z.value)==null?void 0:ge.find(Se=>(Se==null?void 0:Se.label)===($==null?void 0:$.label)))==null?void 0:ze.multiple,ae=$==null?void 0:$.prop;if(($==null?void 0:$.formType)!="Select")return;b.value.forEach(Se=>{const Ce=Se==null?void 0:Se[ae];H&&Vo(Ce)&&(Se[ae]=[Ce]),!H&&!Vo(Ce)&&(Se[ae]="")})},zn=$=>{var ae,ue,ve,ge,ze,Se;ot("");const H=(ae=De.value)==null?void 0:ae.reduce((Ce,T)=>(Ce[T.name]=T.value,Ce),{});((ue=Object.keys(H))==null?void 0:ue.length)>0&&(pe.value=H,N.value="",P.value=(ve=b.value)==null?void 0:ve.length,Q.value=(ge=xe.value)==null?void 0:ge.filter(Ce=>(Ce==null?void 0:Ce.label)!=="新增"),a.value=(Se=(ze=l.value)==null?void 0:ze.filter(Ce=>(Ce==null?void 0:Ce.label)!=="操作"))==null?void 0:Se.map(Ce=>{var C,V,j;const T=(V=(C=Z.value)==null?void 0:C.find(G=>(G==null?void 0:G.label)===(Ce==null?void 0:Ce.label)))==null?void 0:V.multiple;return ds(Ce),{...Ce,type:"edit",optionUrl:Ce!=null&&Ce.formMenuSelect&&((j=Ce==null?void 0:Ce.formMenuSelect)==null?void 0:j.length)>0?{groupSelect:Ce==null?void 0:Ce.groupSelect,menuSelect:Ce==null?void 0:Ce.formMenuSelect,selectRelateType:"",type:Ce==null?void 0:Ce.formType,multiple:T}:null,columnType:us(Ce==null?void 0:Ce.formType)}}),$==="createClick"&&Rt(!1))};y.watch(()=>[r.itemData,Y.value,te.value,ee.value,M==null?void 0:M.value],()=>{var Ce,T,C,V,j,G,le,Me,_e,ce,ne,Oe,de,Ge,Ee,ht,He,je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht,Yt;const $=(Ce=Ve.cloneDeep(r.itemData))==null?void 0:Ce.filter(Be=>(Be==null?void 0:Be.key)==="header");(T=Ve.cloneDeep(r.itemData))==null||T.filter(Be=>(Be==null?void 0:Be.key)==="tableIndexColumn")[0];const H=(C=Ve.cloneDeep(r.itemData))==null?void 0:C.find(Be=>(Be==null?void 0:Be.key)==="page"),ae=(V=Ve.cloneDeep(r.itemData))==null?void 0:V.find(Be=>(Be==null?void 0:Be.key)==="rowButton"),ue=(j=Ve.cloneDeep(r.itemData))==null?void 0:j.find(Be=>(Be==null?void 0:Be.key)==="extraButton"),ve=(G=Ve.cloneDeep(r.itemData))==null?void 0:G.filter(Be=>(Be==null?void 0:Be.key)==="tableContents"),ge=(le=Ve.cloneDeep(r.itemData))==null?void 0:le.filter(Be=>(Be==null?void 0:Be.key)==="tableIndex");Z.value=(ce=(_e=(Me=Ve.cloneDeep(r.itemData))==null?void 0:Me.filter(Be=>(Be==null?void 0:Be.key)==="tableToForm"))==null?void 0:_e[0])==null?void 0:ce.contents,I.value=(H==null?void 0:H.contents)??!1;let ze=[];Y.value===""?ze=$==null?void 0:$[0]:ze=($==null?void 0:$.find(Be=>(Be==null?void 0:Be.selectLabel)==="("+Y.value+")"))??($==null?void 0:$.find(Be=>!(Be!=null&&Be.selectLabel)));let Se=[];if(Y.value===""?Se=ge==null?void 0:ge[0]:Se=(ge==null?void 0:ge.find(Be=>(Be==null?void 0:Be.selectLabel)==="("+Y.value+")"))??(ge==null?void 0:ge.find(Be=>!(Be!=null&&Be.selectLabel))),((ne=ze==null?void 0:ze.contents)==null?void 0:ne.length)>0){let Be=[];if(ze!=null&&ze.contents.some(v=>Array.isArray(v)&&(v==null?void 0:v.find(w=>w.children))))ee.value===""?Be=(de=(Oe=Qt.getGradeColumns(Ve.cloneDeep(ze==null?void 0:ze.contents)))==null?void 0:Oe[0])==null?void 0:de.filter(v=>!Array.isArray(v)):(ee.value.split("-"),Be=(Ge=Qt.getGradeColumns(Ve.cloneDeep(ze==null?void 0:ze.contents)))==null?void 0:Ge[0]);else{const v=ze!=null&&ze.contents.some(w=>Array.isArray(w))?(Ee=ze==null?void 0:ze.contents)==null?void 0:Ee[0]:ze==null?void 0:ze.contents;v==null||v.forEach((w,D)=>{var U;Be.push({label:(w==null?void 0:w.label)??"",prop:(w==null?void 0:w.label)==="操作"?"operate":(w==null?void 0:w.prop)??"a"+D,width:w!=null&&w.width?parseInt(w.width):"",fixed:(w==null?void 0:w.fixed)??void 0,sortable:(w==null?void 0:w.sortable)??!1,align:(w==null?void 0:w.align)??"left",showOverflowTooltip:(w==null?void 0:w.showOverflowTooltip)??!0,isNotDrag:(w==null?void 0:w.isNotDrag)??!1,isEditCol:(w==null?void 0:w.isEditCol)??!1,isOperate:(w==null?void 0:w.isOperate)??!1,id:(w==null?void 0:w.id)??D,type:(w==null?void 0:w.label)==="操作"?"operate":void 0,formType:(w==null?void 0:w.formType)??(w!=null&&w.groupSelect?"Select":""),isTableColHidden:w==null?void 0:w.isTableColHidden,isFormColHidden:w==null?void 0:w.isFormColHidden,options:(w==null?void 0:w.options)??[],value:(w==null?void 0:w.value)??"",formMenuSelect:(w==null?void 0:w.formMenuSelect)??[],isRoute:(w==null?void 0:w.isRoute)??!1,groupSelect:w!=null&&w.groupSelect?(U=w==null?void 0:w.groupSelect)==null?void 0:U.replaceAll('"',"").split(":"):[],isMainKey:w==null?void 0:w.isMainKey})})}a.value=Be,d.value=Be,t.value=(ht=a.value)==null?void 0:ht.map(v=>v==null?void 0:v.label);let Kt=(je=(He=Qt.getAllLeafNodes(Ve.cloneDeep(a.value)))==null?void 0:He.filter(v=>(v==null?void 0:v.type)!=="operate"))==null?void 0:je.map((v,w)=>({prop:(v==null?void 0:v.prop)??"a"+w,column:v.label}));Ae.value=Kt;let kt=[];Y.value===""?kt=ve==null?void 0:ve[0]:kt=(ve==null?void 0:ve.find(v=>(v==null?void 0:v.selectLabel)==="("+Y.value+")"))??(ve==null?void 0:ve.find(v=>!(v!=null&&v.selectLabel)));let pt=Array.isArray((Xe=kt==null?void 0:kt.contents)==null?void 0:Xe[0])&&((Dt=kt==null?void 0:kt.contents)!=null&&Dt[0].every(v=>Array.isArray(v)))?(yt=Ve.cloneDeep(kt==null?void 0:kt.contents))==null?void 0:yt[0]:Ve.cloneDeep(kt==null?void 0:kt.contents);Se!=null&&Se.contents&&((Ct=Se==null?void 0:Se.contents)==null?void 0:Ct.length)!==0&&(pt=(wt=Ve.cloneDeep(pt))==null?void 0:wt.map((v,w)=>{if(!Array.isArray(v)){let D={};for(let U in v)U!=="id"&&U!=="index"&&(D[U]=v[U]);v=Object.values(D)}return v}));const Gn=!!((Ft=a.value)!=null&&Ft.find(v=>v.prop==="index"));pt=yu(Ve.cloneDeep(pt),Se==null?void 0:Se.contents,Gn);const S=[];pt==null||pt.forEach((v,w)=>{var U;let D={};if(Array.isArray(v)){let ie=[];v==null||v.filter(ye=>!(ye!=null&&ye.id)).forEach((ye,Qe)=>{var qe,nt,gt,Ue,mt,ut;if((qe=Kt==null?void 0:Kt[Qe])!=null&&qe.prop&&!Array.isArray(ye)){let xt={};xt[Kt[Qe].column]=ye,M!=null&&M.value&&((nt=M==null?void 0:M.value)==null?void 0:nt.length)>0&&((gt=M==null?void 0:M.value)!=null&>.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(xt)))&&(ie=(Ue=M==null?void 0:M.value)==null?void 0:Ue.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(xt))),ie&&ie.length>0?D[Kt[Qe].prop]=ie!=null&&ie.find(ct=>{var Jt;return((Jt=Object.keys(ct))==null?void 0:Jt[0])===Kt[Qe].column})?(mt=ie==null?void 0:ie.find(ct=>{var Jt;return((Jt=Object.keys(ct))==null?void 0:Jt[0])===Kt[Qe].column}))==null?void 0:mt[Kt[Qe].column]:ye:D[Kt[Qe].prop]=ye}else Array.isArray(ye)&&((ut=Kt[Qe])!=null&&ut.prop?D[Kt[Qe].prop]=ye:D.children=vu(ye,Kt))})}else D=v;Array.isArray(v)&&v.some(ie=>ie==null?void 0:ie.id)?S.push(Object.assign(D,{id:(U=v==null?void 0:v.find(ie=>ie.id))==null?void 0:U.id})):D.id?S.push(D):S.push(Object.assign(D,{id:w.toString()}))}),b.value=S}else a.value=[],l.value=[],b.value=[];((an=ae==null?void 0:ae.contents)==null?void 0:an.length)>0?se.value=ae==null?void 0:ae.contents:se.value=[],((Nt=ue==null?void 0:ue.contents)==null?void 0:Nt.length)>0?(Q.value=ue==null?void 0:ue.contents,xe.value=ue==null?void 0:ue.contents):(Q.value=[],xe.value=[]),P.value=(($t=b==null?void 0:b.value)==null?void 0:$t.length)??0,q.value=b.value,We.value&&(a.value=(Yt=(Ht=l.value)==null?void 0:Ht.filter(Be=>(Be==null?void 0:Be.label)!=="操作"))==null?void 0:Yt.map(Be=>{var Kt;return{...Be,type:"edit",optionUrl:Be!=null&&Be.formMenuSelect&&((Kt=Be==null?void 0:Be.formMenuSelect)==null?void 0:Kt.length)>0?{groupSelect:Be==null?void 0:Be.groupSelect,menuSelect:Be==null?void 0:Be.formMenuSelect,selectRelateType:"",type:Be==null?void 0:Be.formType}:null}}),zn())},{deep:!0,immediate:!0}),y.watch(()=>r==null?void 0:r.operatingForm,$=>{$!=null&&$.form&&(ot($==null?void 0:$.form),A.value=$==null?void 0:$.dialogTitle,W.value=!0,E.value=!0)},{immediate:!0,deep:!0});const Xi=()=>{We.value=!We.value,We.value?(zn("viewChange"),x.setCacheUpdatingData(null),it.value=null):(Q.value=xe.value,a.value=d.value,it.value&&o("change",it.value))};y.ref(!1);const fs=$=>{zn("createClick")},ji=($,H,ae)=>{var ue,ve;pe.value=Ve.cloneDeep($),N.value=$==null?void 0:$.id,P.value=(ue=b.value)==null?void 0:ue.length,A.value=($==null?void 0:$.id)===((ve=b.value)==null?void 0:ve.length)?"新增":"编辑",Rt(!0)},ui=$=>{var Ce,T,C,V,j,G,le,Me,_e,ce;const{row:H,column:ae,item:ue,slotData:ve}=$;let ge=H!=null&&H[ae==null?void 0:ae.prop]?((T=(Ce=H==null?void 0:H[ae==null?void 0:ae.prop])==null?void 0:Ce[0])==null?void 0:T.contents)??(H==null?void 0:H[ae==null?void 0:ae.prop]):((V=(C=H==null?void 0:H[ue==null?void 0:ue.prop])==null?void 0:C[0])==null?void 0:V.contents)??(H==null?void 0:H[ue==null?void 0:ue.prop])??((G=(j=ve==null?void 0:ve[ue==null?void 0:ue.prop])==null?void 0:j[0])==null?void 0:G.contents)??(ve==null?void 0:ve[ue==null?void 0:ue.prop])??((_e=(Me=H==null?void 0:H[(le=ue==null?void 0:ue.child)==null?void 0:le.prop])==null?void 0:Me[0])==null?void 0:_e.contents)??(H==null?void 0:H[(ce=ue==null?void 0:ue.child)==null?void 0:ce.prop]),Se=Array.isArray(ge)&&!(ge!=null&&ge.every(ne=>typeof ne=="string"||typeof ne=="number"))?"查看":ge;return Se=Array.isArray(Se)?Se.join(","):Se,Se},qi=$=>{var T,C,V,j,G,le,Me,_e,ce,ne;const{row:H,column:ae,item:ue,slotData:ve}=$;let ge=H!=null&&H[ae==null?void 0:ae.prop]?((C=(T=H==null?void 0:H[ae==null?void 0:ae.prop])==null?void 0:T[0])==null?void 0:C.contents)??(H==null?void 0:H[ae==null?void 0:ae.prop]):((j=(V=H==null?void 0:H[ue==null?void 0:ue.prop])==null?void 0:V[0])==null?void 0:j.contents)??(H==null?void 0:H[ue==null?void 0:ue.prop])??((le=(G=ve==null?void 0:ve[ue==null?void 0:ue.prop])==null?void 0:G[0])==null?void 0:le.contents)??(ve==null?void 0:ve[ue==null?void 0:ue.prop])??((ce=(_e=H==null?void 0:H[(Me=ue==null?void 0:ue.child)==null?void 0:Me.prop])==null?void 0:_e[0])==null?void 0:ce.contents)??(H==null?void 0:H[(ne=ue==null?void 0:ue.child)==null?void 0:ne.prop]);const Se=Array.isArray(ge)&&!(ge!=null&&ge.every(Oe=>typeof Oe=="string"||typeof Oe=="number")),Ce=Array.isArray(ge)&&(ge==null?void 0:ge.find(Oe=>Oe==null?void 0:Oe.url));return Se&&Ce};return($,H)=>{var Ce,T;const ae=y.resolveComponent("el-icon"),ue=y.resolveComponent("el-popover"),ve=y.resolveComponent("svg-icon"),ge=y.resolveComponent("el-checkbox"),ze=y.resolveComponent("el-checkbox-group"),Se=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",q6,[(y.openBlock(),y.createBlock(Fn.ssTable,{columns:a.value,checkedColumns:t.value,key:a.value,tableData:b.value,isEditViewport:We.value,isShowPagination:I.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:Ke,extraButton:Q.value,onContentClick:vt,onRowClick:at,onSelectChange:Ie,onCellChange:ji,onChange:bn,onPreview:k},y.createSlots({headerButton:y.withCtx(C=>[s.showHeader?(y.openBlock(),y.createBlock(F6,{key:0,compName:s.compName,buttons:C.buttons,onButtonClick:H[0]||(H[0]=V=>J(V,"",{})),columns:a.value,onFilter:_t},null,8,["compName","buttons","columns"])):y.createCommentVNode("",!0)]),viewport:y.withCtx(()=>{var C;return[((C=b.value)==null?void 0:C.length)>0?(y.openBlock(),y.createElementBlock("div",K6,[y.createElementVNode("span",{title:"编辑视图",onClick:Xi},[y.createVNode(ve,{name:"editTable",class:"view-icon"})])])):y.createCommentVNode("",!0)]}),rowCreate:y.withCtx(({row:C})=>[y.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:V=>fs()},[y.createVNode(ve,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,J6)]),operateCol:y.withCtx(()=>[y.createVNode(ue,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:qt},{reference:y.withCtx(()=>[y.createElementVNode("span",Z6,[y.createVNode(ve,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:y.withCtx(()=>[y.createElementVNode("div",Q6,[y.createVNode(ze,{modelValue:t.value,"onUpdate:modelValue":H[2]||(H[2]=C=>t.value=C),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:y.withCtx(()=>[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(Le.value,C=>(y.openBlock(),y.createBlock(ge,{key:C.label,label:C.label,value:C.label,style:{width:"100%",marginRight:0}},{default:y.withCtx(()=>[y.createElementVNode("span",null,y.toDisplayString(C.label),1),y.createVNode(ve,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px",cursor:"move",color:"grey",position:"absolute",right:"5px"}})]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:y.withCtx(C=>[qi(C)?(y.openBlock(),y.createBlock(ue,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:y.withCtx(()=>[y.createElementVNode("span",e5,y.toDisplayString(ui(C)),1)]),default:y.withCtx(()=>{var V;return[y.createElementVNode("div",t5,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(C==null?void 0:C.row[(V=C==null?void 0:C.column)==null?void 0:V.prop],j=>(y.openBlock(),y.createElementBlock("div",n5,[y.createElementVNode("div",{class:"prop-url",title:R(j),onClick:G=>oe(j)},y.toDisplayString(R(j)),9,i5),y.createElementVNode("div",{class:"prop-download",onClick:G=>we(j)}," 下载 ",8,s5)]))),256))])]}),_:2},1024)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.createTextVNode(y.toDisplayString(ui(C)),1)],64))]),_:2},[((Ce=se.value)==null?void 0:Ce.length)>0?{name:"actions",fn:y.withCtx(({item:C})=>[y.createVNode(ue,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:y.withCtx(()=>[y.createVNode(ae,null,{default:y.withCtx(()=>[y.createVNode(y.unref(wn.more_filled_default))]),_:1})]),default:y.withCtx(()=>[y.createElementVNode("div",$6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(Pe(se.value,C),(V,j)=>(y.openBlock(),y.createElementBlock("div",{class:"menu-config-item",key:j,onClick:G=>J(V==null?void 0:V.label,C,{extra:V})},[y.createElementVNode("div",{style:y.normalizeStyle({color:V==null?void 0:V.textColor}),class:"extra-button-label"},y.toDisplayString(V==null?void 0:V.label),5)],8,Y6))),128))])]),_:2},1024)]),key:"0"}:void 0,((T=b.value)==null?void 0:T.length)>0?{name:"batchButton",fn:y.withCtx(C=>[y.createVNode(U6,{buttons:C.buttons,onButtonClick:H[1]||(H[1]=V=>J(V,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),y.createVNode(Fn.ssDialog,{title:A.value,visible:E.value,width:et.value,onBeforeDestroy:rt},{default:y.withCtx(()=>[y.createElementVNode("div",r5,[y.createVNode(Fn.ssForm,{rowContents:De.value,isEnableWrap:!1,onChange:In,onClickTrigger:Xt,isEdit:L.value,onBlurChange:Ze},null,8,["rowContents","isEdit"])])]),footer:y.withCtx(()=>[W.value?(y.openBlock(),y.createElementBlock("div",a5,[y.createVNode(Se,{onClick:H[3]||(H[3]=C=>E.value=!1),id:"themeBorderButton"},{default:y.withCtx(()=>H[7]||(H[7]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[7]}),y.createVNode(Se,{class:"ok-button",onClick:H[4]||(H[4]=C=>Rt(!0)),id:"themeButton"},{default:y.withCtx(()=>H[8]||(H[8]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[8]})])):y.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),y.createVNode(Fn.ssDialog,{title:A.value,visible:B.value,width:X.value,onBeforeDestroy:H[6]||(H[6]=C=>B.value=!1)},{default:y.withCtx(()=>[y.createVNode(H6)]),footer:y.withCtx(()=>[y.createElementVNode("div",o5,[y.createVNode(Se,{onClick:H[5]||(H[5]=C=>B.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:y.withCtx(()=>H[9]||(H[9]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[9]}),y.createVNode(Se,{class:"ok-button",onClick:Et,id:"themeButton"},{default:y.withCtx(()=>H[10]||(H[10]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["title","visible","width"]),m.value?(y.openBlock(),y.createBlock(Fn.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:Fe},null,8,["fileDataList"])):y.createCommentVNode("",!0),c.value?(y.openBlock(),y.createBlock(Fn.ssDialog,{key:1,visible:c.value,onBeforeDestroy:Re,style:{height:"700px",width:"1000px"}},{default:y.withCtx(()=>[c.value?(y.openBlock(),y.createBlock(mu,{key:0,"urdf-url":he.value},null,8,["urdf-url"])):y.createCommentVNode("",!0)]),_:1},8,["visible"])):y.createCommentVNode("",!0)])}}},Eu=Ci._export_sfc(l5,[["__scopeId","data-v-1c0cdebf"]]);exports.ACESFilmicToneMapping=Gl;exports.AmbientLight=cc;exports.Box3=Tn;exports.CatmullRomCurve3=rc;exports.Color=bt;exports.DirectionalLight=gr;exports.DoubleSide=cn;exports.Euler=_n;exports.GridHelper=J0;exports.HemisphereLight=K0;exports.MOUSE=Si;exports.MathUtils=xi;exports.Matrix4=Mt;exports.Mesh=Pt;exports.MeshPhongMaterial=ln;exports.OrbitControls=ru;exports.PCFSoftShadowMap=Hl;exports.PerspectiveCamera=gn;exports.Plane=jn;exports.PlaneGeometry=wi;exports.PointLight=Pa;exports.SRGBColorSpace=Vt;exports.Scene=Ia;exports.ShadowMaterial=X0;exports.TubeGeometry=ka;exports.Vector3=z;exports.WebGLRenderer=iu;exports.Xe=uu;exports.formGetOptions=Ho;exports.getSelectRow=kl;exports.isString=Vo;exports.ssTable=Eu;exports.threeView=mu;exports.useFormComp=Su;exports.useFormToTableComp=gu;exports.useModelLoader=z6;exports.useTableComp=bu;exports.useUnit=_u;
|