ss-component-new 1.1.694 → 1.1.697
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/{array-CLO83-EB.cjs → array-CdPv8cht.cjs} +1 -1
- package/dist/{array-CnNqzjsa.js → array-Tj9n22LW.js} +1 -1
- package/dist/{index-BMiW54Gf.cjs → index-2p69g4HY.cjs} +6 -6
- package/dist/{index-CO3hiJWF.cjs → index-2ulWVy3d.cjs} +1 -1
- package/dist/{index-f5HYi-wc.cjs → index-B-htrQ8o.cjs} +1 -1
- package/dist/{index-B88z5SyL.cjs → index-B3UVui7c.cjs} +1 -1
- package/dist/{index-3okZjs5B.js → index-B8ibXIR2.js} +1 -1
- package/dist/{index-BQbrejA1.js → index-BCZ59Y4K.js} +0 -1
- package/dist/{index-DLKAgEkI.cjs → index-BK_gZgTv.cjs} +1 -1
- package/dist/{index-BBSPbEbw.cjs → index-BKlz7cS9.cjs} +1 -1
- package/dist/{index-DzT_yWYR.cjs → index-BZkH2AYa.cjs} +1 -1
- package/dist/{index-DiasHZKs.js → index-B_Flzztl.js} +4 -4
- package/dist/{index-BaenyMCV.cjs → index-BeHWA6-5.cjs} +1 -1
- package/dist/{index-l1qJOF-L.cjs → index-Bpb5Dn-j.cjs} +1 -1
- package/dist/{index-kVoQP8UP.cjs → index-BrQVl4Zd.cjs} +1 -1
- package/dist/{index-BHMtvveZ.js → index-BufGU2BU.js} +1 -1
- package/dist/{index-3KbnXDaT.cjs → index-C5KU7P4g.cjs} +1 -1
- package/dist/{index-Cxf8S0LH.js → index-C6F_Qv9_.js} +5 -5
- package/dist/index-C97ZQO8T.cjs +1 -0
- package/dist/{index-CoCtXags.js → index-COhyHXFv.js} +2 -2
- package/dist/{index-Cr0ZkdxV.js → index-CQTl5wS0.js} +15 -15
- package/dist/{index-DNcULVa1.js → index-CRtV5WuL.js} +4 -4
- package/dist/{index-YTgiRG5n.cjs → index-CThTE4nC.cjs} +1 -1
- package/dist/{index-ChSY5Uq6.js → index-CUeBezD8.js} +4 -4
- package/dist/{index-CaRTRULq.cjs → index-CX0lapAz.cjs} +13 -13
- package/dist/{index-RFdUIF3u.cjs → index-CYr6JfTw.cjs} +1 -1
- package/dist/{index-Dbzxle58.js → index-CatyTybI.js} +1 -1
- package/dist/{index-Btw1E8X9.js → index-Cb32xjFZ.js} +4 -4
- package/dist/index-CfiHbfhD.js +4738 -0
- package/dist/{index-A-taUOit.js → index-ChtHQFmB.js} +1 -1
- package/dist/{index-DZUUfAXM.js → index-CjWYNXJT.js} +4 -4
- package/dist/{index-Rg7QR0ET.js → index-CjYmcl8U.js} +5239 -5255
- package/dist/{index-x_O_YF4W.js → index-CkSPb2p9.js} +3 -3
- package/dist/{index-DU_gpFDl.js → index-Cq4go058.js} +6 -6
- package/dist/{index-BoR3liun.js → index-Ct0CmWjo.js} +1 -1
- package/dist/{index-C4UXIaf0.cjs → index-DD6f1KgD.cjs} +1 -1
- package/dist/{index-Cqa_rbSi.js → index-DGiFskaY.js} +6 -6
- package/dist/{index-DbUTgcpC.cjs → index-DMVFhY2W.cjs} +1 -1
- package/dist/{index-Cgfr_w1z.cjs → index-DTS5HoBL.cjs} +1 -1
- package/dist/{index-BxUQoC9Z.js → index-DUa3ddEk.js} +5891 -5821
- package/dist/{index-BcCP1oal.cjs → index-DZfla_UC.cjs} +1 -1
- package/dist/{index-D6Qn8t_Y.cjs → index-Db34Sg1u.cjs} +42 -42
- package/dist/{index-BOJk-Uby.cjs → index-DgPw8IAq.cjs} +1 -1
- package/dist/{index-D1Z0idRA.cjs → index-Dwq8e9ki.cjs} +1 -1
- package/dist/{index-BgFmbRIH.cjs → index-F0K1-Asd.cjs} +1 -1
- package/dist/{index-BGnqSXsM.cjs → index-HNS_Afdo.cjs} +1 -1
- package/dist/{index-CzRqJqyA.js → index-ILPebZ25.js} +7 -7
- package/dist/{index-D_aaFuMD.js → index-LjCKAD2x.js} +9 -9
- package/dist/{index-CoNDs5B_.js → index-M3N-cMRq.js} +6 -6
- package/dist/{index-BY6icLE5.js → index-OoPrBaU7.js} +3 -3
- package/dist/{index-Cmhvuxao.cjs → index-YnHPocII.cjs} +1 -1
- package/dist/{index-BnRcpT_T.js → index-gcJ4pdsy.js} +4 -4
- package/dist/{index-BfpHmqEV.cjs → index-kC3tMDYl.cjs} +1 -1
- package/dist/{index-BByN6sng.js → index-wNYNwwJM.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-DF9XGIz3.cjs → index.vue_vue_type_script_setup_true_lang-CI5FfMjW.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-LHENnk2N.js → index.vue_vue_type_script_setup_true_lang-DC9cV5xc.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CwuI0Ee7.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BQgfwA0P.js} +977 -979
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C1DluSxa.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DS3sCjjh.cjs} +37 -37
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-BRe0ZOKp.js → index.vue_vue_type_style_index_0_scoped_8606206c_lang-BBC89yNZ.js} +17 -17
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-D2FKUBBW.cjs → index.vue_vue_type_style_index_0_scoped_8606206c_lang-BWo8YVs4.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CJTS3KF1.cjs → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-C62GAj1y.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-DTtvCDfz.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CEVyTtSC.js} +9 -9
- package/dist/{login-CRSg2R6u.js → login-CA5LBy6E.js} +2 -2
- package/dist/{login-BEyTR2B-.cjs → login-CViEGqhb.cjs} +1 -1
- package/dist/{main-KZ_ESpJb.js → main-CUVDwLar.js} +5 -5
- package/dist/{main-DYdqysWL.cjs → main-CuPyTaKx.cjs} +1 -1
- package/dist/{menu-Clnb_mar.cjs → menu-CfFgYmpV.cjs} +1 -1
- package/dist/{menu-C0-tjFtV.js → menu-DznNubRA.js} +1 -1
- package/dist/{modelComp-w6fn45mn.cjs → modelComp-BR-oztFR.cjs} +1 -1
- package/dist/{modelComp-ulXkhiT8.js → modelComp-BuMlc62t.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +3 -3
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-TwH55MhO.js → threeModel-CMj4sied.js} +3 -3
- package/dist/{threeModel-D4XEOs2e.cjs → threeModel-Dkxksn8L.cjs} +1 -1
- package/package.json +2 -2
- package/dist/index-CqHNjQcE.js +0 -4717
- package/dist/index-kfJONCM6.cjs +0 -1
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const y=require("vue"),
|
|
1
|
+
"use strict";const y=require("vue"),Ve=require("./menu-CfFgYmpV.cjs"),kn=require("./index-CX0lapAz.cjs"),Fn=require("./index-2p69g4HY.cjs"),Vl=require("./modelComp-BR-oztFR.cjs"),an=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DS3sCjjh.cjs"),Pi=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tu=require("./login-CViEGqhb.cjs");var Cu="[object String]";function Vo(s){return typeof s=="string"||!Fn.isArray(s)&&Fn.isObjectLike(s)&&Fn.baseGetTag(s)==Cu}const Ho=s=>s.match(/\((.*)\)/)[1],Ru={__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 Hl="177",Ci={ROTATE:0,DOLLY:1,PAN:2},Is={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Du=0,yc=1,Pu=2,y0=1,Gl=2,Ei=3,ti=0,On=1,gn=2,Xi=0,Bs=1,xc=2,Mc=3,bc=4,Lu=5,as=100,Fu=101,Uu=102,Nu=103,Iu=104,zu=200,Bu=201,Ou=202,ku=203,Go=204,Wo=205,Vu=206,Hu=207,Gu=208,Wu=209,Xu=210,ju=211,qu=212,$u=213,Yu=214,Xo=0,jo=1,qo=2,Hs=3,$o=4,Yo=5,Jo=6,Ko=7,Fa=0,Ju=1,Ku=2,ji=0,Zu=1,Qu=2,e2=3,Wl=4,t2=5,n2=6,i2=7,Sc="attached",s2="detached",x0=300,Gs=301,Ws=302,Zo=303,Qo=304,Ua=306,fi=1e3,ai=1001,el=1002,qn=1003,r2=1004,wr=1005,jn=1006,Xa=1007,wi=1008,gi=1009,M0=1010,b0=1011,_r=1012,Xl=1013,us=1014,pi=1015,Sr=1016,jl=1017,ql=1018,vr=1020,S0=35902,E0=1021,A0=1022,ei=1023,yr=1026,xr=1027,w0=1028,$l=1029,T0=1030,Yl=1031,Jl=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,C0=36283,El=36284,Al=36285,wl=36286,Ea=2300,Tl=2301,ja=2302,Ec=2400,Ac=2401,wc=2402,a2=2500,o2=3200,l2=3201,Na=0,c2=1,Gi="",Zt="srgb",Xs="srgb-linear",Aa="linear",on="srgb",ms=7680,Tc=519,h2=512,u2=513,d2=514,R0=515,f2=516,p2=517,m2=518,g2=519,Cl=35044,Cc="300 es",Ti=2e3,wa=2001;class fs{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,a=i.length;r<a;r++)i[r].call(this,e);e.target=null}}}const Ln=["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 Rc=1234567;const dr=Math.PI/180,js=180/Math.PI;function oi(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ln[s&255]+Ln[s>>8&255]+Ln[s>>16&255]+Ln[s>>24&255]+"-"+Ln[e&255]+Ln[e>>8&255]+"-"+Ln[e>>16&15|64]+Ln[e>>24&255]+"-"+Ln[t&63|128]+Ln[t>>8&255]+"-"+Ln[t>>16&255]+Ln[t>>24&255]+Ln[n&255]+Ln[n>>8&255]+Ln[n>>16&255]+Ln[n>>24&255]).toLowerCase()}function Vt(s,e,t){return Math.max(e,Math.min(t,s))}function Kl(s,e){return(s%e+e)%e}function _2(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function v2(s,e,t){return s!==e?(t-s)/(e-s):0}function fr(s,e,t){return(1-t)*s+t*e}function y2(s,e,t,n){return fr(s,e,1-Math.exp(-t*n))}function x2(s,e=1){return e-Math.abs(Kl(s,e*2)-e)}function M2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function b2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function S2(s,e){return s+Math.floor(Math.random()*(e-s+1))}function E2(s,e){return s+Math.random()*(e-s)}function A2(s){return s*(.5-Math.random())}function w2(s){s!==void 0&&(Rc=s);let e=Rc+=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 T2(s){return s*dr}function C2(s){return s*js}function R2(s){return(s&s-1)===0&&s!==0}function D2(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function P2(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function L2(s,e,t,n,i){const r=Math.cos,a=Math.sin,o=r(t/2),l=a(t/2),c=r((e+n)/2),d=a((e+n)/2),m=r((e-n)/2),u=a((e-n)/2),h=r((n-e)/2),g=a((n-e)/2);switch(i){case"XYX":s.set(o*d,l*m,l*u,o*c);break;case"YZY":s.set(l*u,o*d,l*m,o*c);break;case"ZXZ":s.set(l*m,l*u,o*d,o*c);break;case"XZX":s.set(o*d,l*g,l*h,o*c);break;case"YXY":s.set(l*h,o*d,l*g,o*c);break;case"ZYZ":s.set(l*g,l*h,o*d,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ri(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 an(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 Ai={DEG2RAD:dr,RAD2DEG:js,generateUUID:oi,clamp:Vt,euclideanModulo:Kl,mapLinear:_2,inverseLerp:v2,lerp:fr,damp:y2,pingpong:x2,smoothstep:M2,smootherstep:b2,randInt:S2,randFloat:E2,randFloatSpread:A2,seededRandom:w2,degToRad:T2,radToDeg:C2,isPowerOfTwo:R2,ceilPowerOfTwo:D2,floorPowerOfTwo:P2,setQuaternionFromProperEuler:L2,normalize:an,denormalize:ri};class Ze{constructor(e=0,t=0){Ze.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,a=this.y-e.y;return this.x=r*n-a*i+e.x,this.y=r*i+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Gn{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,a,o){let l=n[i+0],c=n[i+1],d=n[i+2],m=n[i+3];const u=r[a+0],h=r[a+1],g=r[a+2],_=r[a+3];if(o===0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m;return}if(o===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-o;const f=l*u+c*h+d*g+m*_,v=f>=0?1:-1,x=1-f*f;if(x>Number.EPSILON){const F=Math.sqrt(x),C=Math.atan2(F,f*v);p=Math.sin(p*C)/F,o=Math.sin(o*C)/F}const b=o*v;if(l=l*p+u*b,c=c*p+h*b,d=d*p+g*b,m=m*p+_*b,p===1-o){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,a){const o=n[i],l=n[i+1],c=n[i+2],d=n[i+3],m=r[a],u=r[a+1],h=r[a+2],g=r[a+3];return e[t]=o*g+d*m+l*h-c*u,e[t+1]=l*g+d*u+c*m-o*h,e[t+2]=c*g+d*h+o*u-l*m,e[t+3]=d*g-o*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,a=e._order,o=Math.cos,l=Math.sin,c=o(n/2),d=o(i/2),m=o(r/2),u=l(n/2),h=l(i/2),g=l(r/2);switch(a){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: "+a)}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],a=t[1],o=t[5],l=t[9],c=t[2],d=t[6],m=t[10],u=n+o+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=(a-i)*h}else if(n>o&&n>m){const h=2*Math.sqrt(1+n-o-m);this._w=(d-l)/h,this._x=.25*h,this._y=(i+a)/h,this._z=(r+c)/h}else if(o>m){const h=2*Math.sqrt(1+o-n-m);this._w=(r-c)/h,this._x=(i+a)/h,this._y=.25*h,this._z=(l+d)/h}else{const h=2*Math.sqrt(1+m-n-o);this._w=(a-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,a=e._w,o=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+a*o+i*c-r*l,this._y=i*d+a*l+r*o-n*c,this._z=r*d+a*c+n*l-i*o,this._w=a*d-n*o-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,a=this._w;let o=a*e._w+n*e._x+i*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=i,this._z=r,this;const l=1-o*o;if(l<=Number.EPSILON){const h=1-t;return this._w=h*a+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,o),m=Math.sin((1-t)*d)/c,u=Math.sin(t*d)/c;return this._w=a*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(Dc.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Dc.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,a=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])*a,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,a=e.y,o=e.z,l=e.w,c=2*(a*i-o*n),d=2*(o*t-r*i),m=2*(r*n-a*t);return this.x=t+l*c+a*m-o*d,this.y=n+l*d+o*c-r*m,this.z=i+l*m+r*d-a*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,a=t.x,o=t.y,l=t.z;return this.x=i*l-r*o,this.y=r*a-n*l,this.z=n*o-i*a,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,Dc=new Gn;class kt{constructor(e,t,n,i,r,a,o,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,a,o,l,c)}set(e,t,n,i,r,a,o,l,c){const d=this.elements;return d[0]=e,d[1]=i,d[2]=o,d[3]=t,d[4]=r,d[5]=l,d[6]=n,d[7]=a,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,a=n[0],o=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],x=i[4],b=i[7],F=i[2],C=i[5],R=i[8];return r[0]=a*_+o*v+l*F,r[3]=a*p+o*x+l*C,r[6]=a*f+o*b+l*R,r[1]=c*_+d*v+m*F,r[4]=c*p+d*x+m*C,r[7]=c*f+d*b+m*R,r[2]=u*_+h*v+g*F,r[5]=u*p+h*x+g*C,r[8]=u*f+h*b+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],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8];return t*a*d-t*o*c-n*r*d+n*o*l+i*r*c-i*a*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8],m=d*a-o*c,u=o*l-d*r,h=c*r-a*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]=(o*n-i*a)*_,e[3]=u*_,e[4]=(d*t-i*l)*_,e[5]=(i*r-o*t)*_,e[6]=h*_,e[7]=(n*l-c*t)*_,e[8]=(a*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,a,o){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*a+c*o)+a+e,-i*c,i*l,-i*(-c*a+l*o)+o+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 D0(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 F2(){const s=Mr("canvas");return s.style.display="block",s}const Pc={};function Os(s){s in Pc||(Pc[s]=!0,console.warn(s))}function U2(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 I2(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),Fc=new kt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function z2(){const s={enabled:!0,workingColorSpace:Xs,spaces:{},convert:function(i,r,a){return this.enabled===!1||r===a||!r||!a||(this.spaces[r].transfer===on&&(i.r=Ri(i.r),i.g=Ri(i.g),i.b=Ri(i.b)),this.spaces[r].primaries!==this.spaces[a].primaries&&(i.applyMatrix3(this.spaces[r].toXYZ),i.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===on&&(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===Gi?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,a){return i.copy(this.spaces[r].toXYZ).multiply(this.spaces[a].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:Fc,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Zt},outputColorSpaceConfig:{drawingBufferColorSpace:Zt}},[Zt]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Lc,fromXYZ:Fc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Zt}}}),s}const Wt=z2();function Ri(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 B2{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 a=0;a<r.length;a++)r[a]=Ri(r[a]/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(Ri(t[n]/255)*255):t[n]=Ri(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 O2=0;class Zl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:O2++}),this.uuid=oi(),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 a=0,o=i.length;a<o;a++)i[a].isDataTexture?r.push(Ya(i[a].image)):r.push(Ya(i[a]))}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?B2.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 k2=0;const Ja=new I;class Pn extends fs{constructor(e=Pn.DEFAULT_IMAGE,t=Pn.DEFAULT_MAPPING,n=ai,i=ai,r=jn,a=wi,o=ei,l=gi,c=Pn.DEFAULT_ANISOTROPY,d=Gi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:k2++}),this.uuid=oi(),this.name="",this.source=new Zl(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=a,this.anisotropy=c,this.format=o,this.internalFormat=null,this.type=l,this.offset=new Ze(0,0),this.repeat=new Ze(1,1),this.center=new Ze(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!==x0)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case fi:e.x=e.x-Math.floor(e.x);break;case ai: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 fi:e.y=e.y-Math.floor(e.y);break;case ai: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++}}Pn.DEFAULT_IMAGE=null;Pn.DEFAULT_MAPPING=x0;Pn.DEFAULT_ANISOTROPY=1;class qt{constructor(e=0,t=0,n=0,i=1){qt.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,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*i+a[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 x=(c+1)/2,b=(h+1)/2,F=(f+1)/2,C=(d+u)/4,R=(m+_)/4,L=(g+p)/4;return x>b&&x>F?x<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(x),i=C/n,r=R/n):b>F?b<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),n=C/i,r=L/i):F<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(F),n=R/r,i=L/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 V2 extends fs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,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 qt(0,0,e,t),this.scissorTest=!1,this.viewport=new qt(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new Pn(i);this.textures=[];const a=n.count;for(let o=0;o<a;o++)this.textures[o]=r.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].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:jn,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 Zl(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 ds extends V2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class P0 extends Pn{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=qn,this.minFilter=qn,this.wrapR=ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class H2 extends Pn{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=qn,this.minFilter=qn,this.wrapR=ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class In{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(ni.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ni.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=ni.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 a=0,o=r.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,ni):ni.fromBufferAttribute(r,a),ni.applyMatrix4(e.matrixWorld),this.expandByPoint(ni);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,a=i.length;r<a;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,ni),ni.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),Ii.subVectors(vs,_s),zi.subVectors(ys,vs),Ki.subVectors(_s,ys);let t=[0,-Ii.z,Ii.y,0,-zi.z,zi.y,0,-Ki.z,Ki.y,Ii.z,0,-Ii.x,zi.z,0,-zi.x,Ki.z,0,-Ki.x,-Ii.y,Ii.x,0,-zi.y,zi.x,0,-Ki.y,Ki.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(Ii,zi),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,ni).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ni).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:(vi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),vi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),vi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),vi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),vi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),vi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),vi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),vi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(vi),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 vi=[new I,new I,new I,new I,new I,new I,new I,new I],ni=new I,Tr=new In,_s=new I,vs=new I,ys=new I,Ii=new I,zi=new I,Ki=new I,er=new I,Cr=new I,Rr=new I,Zi=new I;function Ka(s,e,t,n,i){for(let r=0,a=s.length-3;r<=a;r+=3){Zi.fromArray(s,r);const o=i.x*Math.abs(Zi.x)+i.y*Math.abs(Zi.y)+i.z*Math.abs(Zi.z),l=e.dot(Zi),c=t.dot(Zi),d=n.dot(Zi);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>o)return!1}return!0}const G2=new In,tr=new I,Za=new I;class Ui{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):G2.setFromPoints(e).getCenter(n);let i=0;for(let r=0,a=e.length;r<a;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 yi=new I,Qa=new I,Dr=new I,Bi=new I,eo=new I,Pr=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,yi)),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=yi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(yi.copy(this.origin).addScaledVector(this.direction,t),yi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Qa.copy(e).add(t).multiplyScalar(.5),Dr.copy(t).sub(e).normalize(),Bi.copy(this.origin).sub(Qa);const r=e.distanceTo(t)*.5,a=-this.direction.dot(Dr),o=Bi.dot(this.direction),l=-Bi.dot(Dr),c=Bi.lengthSq(),d=Math.abs(1-a*a);let m,u,h,g;if(d>0)if(m=a*l-o,u=a*o-l,g=r*d,m>=0)if(u>=-g)if(u<=g){const _=1/d;m*=_,u*=_,h=m*(m+a*u+2*o)+u*(a*m+u+2*l)+c}else u=r,m=Math.max(0,-(a*u+o)),h=-m*m+u*(u+2*l)+c;else u=-r,m=Math.max(0,-(a*u+o)),h=-m*m+u*(u+2*l)+c;else u<=-g?(m=Math.max(0,-(-a*r+o)),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,-(a*r+o)),u=m>0?r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c);else u=a>0?-r:r,m=Math.max(0,-(a*u+o)),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){yi.subVectors(e.center,this.origin);const n=yi.dot(this.direction),i=yi.dot(yi)-n*n,r=e.radius*e.radius;if(i>r)return null;const a=Math.sqrt(r-i),o=n-a,l=n+a;return l<0?null:o<0?this.at(l,t):this.at(o,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,a,o,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,a=(e.max.y-u.y)*d):(r=(e.max.y-u.y)*d,a=(e.min.y-u.y)*d),n>a||r>i||((r>n||isNaN(n))&&(n=r),(a<i||isNaN(i))&&(i=a),m>=0?(o=(e.min.z-u.z)*m,l=(e.max.z-u.z)*m):(o=(e.max.z-u.z)*m,l=(e.min.z-u.z)*m),n>l||o>i)||((o>n||n!==n)&&(n=o),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,yi)!==null}intersectTriangle(e,t,n,i,r){eo.subVectors(t,e),Pr.subVectors(n,e),to.crossVectors(eo,Pr);let a=this.direction.dot(to),o;if(a>0){if(i)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Bi.subVectors(this.origin,e);const l=o*this.direction.dot(Pr.crossVectors(Bi,Pr));if(l<0)return null;const c=o*this.direction.dot(eo.cross(Bi));if(c<0||l+c>a)return null;const d=-o*Bi.dot(to);return d<0?null:this.at(d/a,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,a,o,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,a,o,l,c,d,m,u,h,g,_,p)}set(e,t,n,i,r,a,o,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]=a,f[9]=o,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(),a=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]*a,t[9]=n[9]*a,t[10]=n[10]*a,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,a=Math.cos(n),o=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=a*d,h=a*m,g=o*d,_=o*m;t[0]=l*d,t[4]=-l*m,t[8]=c,t[1]=h+g*c,t[5]=u-_*c,t[9]=-o*l,t[2]=_-u*c,t[6]=g+h*c,t[10]=a*l}else if(e.order==="YXZ"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u+_*o,t[4]=g*o-h,t[8]=a*c,t[1]=a*m,t[5]=a*d,t[9]=-o,t[2]=h*o-g,t[6]=_+u*o,t[10]=a*l}else if(e.order==="ZXY"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u-_*o,t[4]=-a*m,t[8]=g+h*o,t[1]=h+g*o,t[5]=a*d,t[9]=_-u*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const u=a*d,h=a*m,g=o*d,_=o*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]=o*l,t[10]=a*l}else if(e.order==="YZX"){const u=a*l,h=a*c,g=o*l,_=o*c;t[0]=l*d,t[4]=_-u*m,t[8]=g*m+h,t[1]=m,t[5]=a*d,t[9]=-o*d,t[2]=-c*d,t[6]=h*m+g,t[10]=u-_*m}else if(e.order==="XZY"){const u=a*l,h=a*c,g=o*l,_=o*c;t[0]=l*d,t[4]=-m,t[8]=c*d,t[1]=u*m+_,t[5]=a*d,t[9]=h*m-g,t[2]=g*m-h,t[6]=o*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(W2,e,X2)}lookAt(e,t,n){const i=this.elements;return Wn.subVectors(e,t),Wn.lengthSq()===0&&(Wn.z=1),Wn.normalize(),Oi.crossVectors(n,Wn),Oi.lengthSq()===0&&(Math.abs(n.z)===1?Wn.x+=1e-4:Wn.z+=1e-4,Wn.normalize(),Oi.crossVectors(n,Wn)),Oi.normalize(),Lr.crossVectors(Wn,Oi),i[0]=Oi.x,i[4]=Lr.x,i[8]=Wn.x,i[1]=Oi.y,i[5]=Lr.y,i[9]=Wn.y,i[2]=Oi.z,i[6]=Lr.z,i[10]=Wn.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,a=n[0],o=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],x=n[7],b=n[11],F=n[15],C=i[0],R=i[4],L=i[8],A=i[12],E=i[1],P=i[5],z=i[9],H=i[13],Q=i[2],re=i[6],G=i[10],le=i[14],K=i[3],pe=i[7],Me=i[11],ye=i[15];return r[0]=a*C+o*E+l*Q+c*K,r[4]=a*R+o*P+l*re+c*pe,r[8]=a*L+o*z+l*G+c*Me,r[12]=a*A+o*H+l*le+c*ye,r[1]=d*C+m*E+u*Q+h*K,r[5]=d*R+m*P+u*re+h*pe,r[9]=d*L+m*z+u*G+h*Me,r[13]=d*A+m*H+u*le+h*ye,r[2]=g*C+_*E+p*Q+f*K,r[6]=g*R+_*P+p*re+f*pe,r[10]=g*L+_*z+p*G+f*Me,r[14]=g*A+_*H+p*le+f*ye,r[3]=v*C+x*E+b*Q+F*K,r[7]=v*R+x*P+b*re+F*pe,r[11]=v*L+x*z+b*G+F*Me,r[15]=v*A+x*H+b*le+F*ye,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],a=e[1],o=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*o*u+n*c*u+i*o*h-n*l*h)+_*(+t*l*h-t*c*u+r*a*u-i*a*h+i*c*d-r*l*d)+p*(+t*c*m-t*o*h-r*a*m+n*a*h+r*o*d-n*c*d)+f*(-i*o*d-t*l*m+t*o*u+i*a*m-n*a*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],a=e[4],o=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-o*p*h-m*l*f+o*u*f,x=g*u*c-d*p*c-g*l*h+a*p*h+d*l*f-a*u*f,b=d*_*c-g*m*c+g*o*h-a*_*h-d*o*f+a*m*f,F=g*m*l-d*_*l-g*o*u+a*_*u+d*o*p-a*m*p,C=t*v+n*x+i*b+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]=(o*p*r-_*l*r+_*i*c-n*p*c-o*i*f+n*l*f)*R,e[3]=(m*l*r-o*u*r-m*i*c+n*u*c+o*i*h-n*l*h)*R,e[4]=x*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-a*p*r-g*i*c+t*p*c+a*i*f-t*l*f)*R,e[7]=(a*u*r-d*l*r+d*i*c-t*u*c-a*i*h+t*l*h)*R,e[8]=b*R,e[9]=(g*m*r-d*_*r-g*n*h+t*_*h+d*n*f-t*m*f)*R,e[10]=(a*_*r-g*o*r+g*n*c-t*_*c-a*n*f+t*o*f)*R,e[11]=(d*o*r-a*m*r-d*n*c+t*m*c+a*n*h-t*o*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*o*i-a*_*i-g*n*l+t*_*l+a*n*p-t*o*p)*R,e[15]=(a*m*i-d*o*i+d*n*l-t*m*l-a*n*u+t*o*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,a=e.x,o=e.y,l=e.z,c=r*a,d=r*o;return this.set(c*a+n,c*o-i*l,c*l+i*o,0,c*o+i*l,d*o+n,d*l-i*a,0,c*l-i*o,d*l+i*a,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,a){return this.set(1,n,r,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,a=t._y,o=t._z,l=t._w,c=r+r,d=a+a,m=o+o,u=r*c,h=r*d,g=r*m,_=a*d,p=a*m,f=o*m,v=l*c,x=l*d,b=l*m,F=n.x,C=n.y,R=n.z;return i[0]=(1-(_+f))*F,i[1]=(h+b)*F,i[2]=(g-x)*F,i[3]=0,i[4]=(h-b)*C,i[5]=(1-(u+f))*C,i[6]=(p+v)*C,i[7]=0,i[8]=(g+x)*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 a=xs.set(i[4],i[5],i[6]).length(),o=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],ii.copy(this);const c=1/r,d=1/a,m=1/o;return ii.elements[0]*=c,ii.elements[1]*=c,ii.elements[2]*=c,ii.elements[4]*=d,ii.elements[5]*=d,ii.elements[6]*=d,ii.elements[8]*=m,ii.elements[9]*=m,ii.elements[10]*=m,t.setFromRotationMatrix(ii),n.x=r,n.y=a,n.z=o,this}makePerspective(e,t,n,i,r,a,o=Ti){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(o===Ti)h=-(a+r)/(a-r),g=-2*a*r/(a-r);else if(o===wa)h=-a/(a-r),g=-a*r/(a-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);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,a,o=Ti){const l=this.elements,c=1/(t-e),d=1/(n-i),m=1/(a-r),u=(t+e)*c,h=(n+i)*d;let g,_;if(o===Ti)g=(a+r)*m,_=-2*m;else if(o===wa)g=r*m,_=-1*m;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);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,ii=new Et,W2=new I(0,0,0),X2=new I(1,1,1),Oi=new I,Lr=new I,Wn=new I,Uc=new Et,Nc=new Gn;class Tn{constructor(e=0,t=0,n=0,i=Tn.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],a=i[4],o=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(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-d,h),this._z=Math.atan2(-a,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(o,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(-a,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(-a,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(o,h));break;case"XZY":this._z=Math.asin(-Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(u,c),this._y=Math.atan2(o,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 Uc.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Uc,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}}Tn.DEFAULT_ORDER="XYZ";class Ql{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 j2=0;const Ic=new I,Ms=new Gn,xi=new Et,Fr=new I,nr=new I,q2=new I,$2=new Gn,zc=new I(1,0,0),Bc=new I(0,1,0),Oc=new I(0,0,1),kc={type:"added"},Y2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class cn extends fs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:j2++}),this.uuid=oi(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=cn.DEFAULT_UP.clone();const e=new I,t=new Tn,n=new Gn,i=new I(1,1,1);function r(){n.setFromEuler(t,!1)}function a(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(a),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=cn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=cn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Ql,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(zc,e)}rotateY(e){return this.rotateOnAxis(Bc,e)}rotateZ(e){return this.rotateOnAxis(Oc,e)}translateOnAxis(e,t){return Ic.copy(e).applyQuaternion(this.quaternion),this.position.add(Ic.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(zc,e)}translateY(e){return this.translateOnAxis(Bc,e)}translateZ(e){return this.translateOnAxis(Oc,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(xi.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?xi.lookAt(nr,Fr,this.up):xi.lookAt(Fr,nr,this.up),this.quaternion.setFromRotationMatrix(xi),i&&(xi.extractRotation(i.matrixWorld),Ms.setFromRotationMatrix(xi),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(kc),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(Y2),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),xi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),xi.multiply(e.parent.matrixWorld)),e.applyMatrix4(xi),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(kc),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 a=this.children[n].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let r=0,a=i.length;r<a;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,q2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,$2,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,a=i.length;r<a;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(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(o=>({...o})),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(o,l){return o[l.uuid]===void 0&&(o[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 o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.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 o=[];for(let l=0,c=this.material.length;l<c;l++)o.push(r(e.materials,this.material[l]));i.material=o}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let o=0;o<this.children.length;o++)i.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];i.animations.push(r(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),c=a(e.textures),d=a(e.images),m=a(e.shapes),u=a(e.skeletons),h=a(e.animations),g=a(e.nodes);o.length>0&&(n.geometries=o),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 a(o){const l=[];for(const c in o){const d=o[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}}cn.DEFAULT_UP=new I(0,1,0);cn.DEFAULT_MATRIX_AUTO_UPDATE=!0;cn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const si=new I,Mi=new I,io=new I,bi=new I,Ss=new I,Es=new I,Vc=new I,so=new I,ro=new I,ao=new I,oo=new qt,lo=new qt,co=new qt;class Qn{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),si.subVectors(e,t),i.cross(si);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){si.subVectors(i,t),Mi.subVectors(n,t),io.subVectors(e,t);const a=si.dot(si),o=si.dot(Mi),l=si.dot(io),c=Mi.dot(Mi),d=Mi.dot(io),m=a*c-o*o;if(m===0)return r.set(0,0,0),null;const u=1/m,h=(c*l-o*d)*u,g=(a*d-o*l)*u;return r.set(1-h-g,g,h)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,bi)===null?!1:bi.x>=0&&bi.y>=0&&bi.x+bi.y<=1}static getInterpolation(e,t,n,i,r,a,o,l){return this.getBarycoord(e,t,n,i,bi)===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,bi.x),l.addScaledVector(a,bi.y),l.addScaledVector(o,bi.z),l)}static getInterpolatedAttribute(e,t,n,i,r,a){return oo.setScalar(0),lo.setScalar(0),co.setScalar(0),oo.fromBufferAttribute(e,t),lo.fromBufferAttribute(e,n),co.fromBufferAttribute(e,i),a.setScalar(0),a.addScaledVector(oo,r.x),a.addScaledVector(lo,r.y),a.addScaledVector(co,r.z),a}static isFrontFacing(e,t,n,i){return si.subVectors(n,t),Mi.subVectors(e,t),si.cross(Mi).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 si.subVectors(this.c,this.b),Mi.subVectors(this.a,this.b),si.cross(Mi).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 a,o;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 a=l/(l-d),t.copy(n).addScaledVector(Ss,a);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 o=c/(c-g),t.copy(n).addScaledVector(Es,o);const p=d*g-h*m;if(p<=0&&m-d>=0&&h-g>=0)return Vc.subVectors(r,i),o=(m-d)/(m-d+(h-g)),t.copy(i).addScaledVector(Vc,o);const f=1/(p+_+u);return a=_*f,o=u*f,t.copy(n).addScaledVector(Ss,a).addScaledVector(Es,o)}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},ki={h:0,s:0,l:0},Ur={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=Zt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Wt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Wt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Wt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Wt.workingColorSpace){if(e=Kl(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,a=2*n-r;this.r=ho(a,r,e+1/3),this.g=ho(a,r,e),this.b=ho(a,r,e-1/3)}return Wt.colorSpaceToWorking(this,i),this}setStyle(e,t=Zt){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 a=i[1],o=i[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))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(o))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(o))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],a=r.length;if(a===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(a===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=Zt){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=Ri(e.r),this.g=Ri(e.g),this.b=Ri(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=Zt){return Wt.workingToColorSpace(Fn.copy(this),e),Math.round(Vt(Fn.r*255,0,255))*65536+Math.round(Vt(Fn.g*255,0,255))*256+Math.round(Vt(Fn.b*255,0,255))}getHexString(e=Zt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Wt.workingColorSpace){Wt.workingToColorSpace(Fn.copy(this),t);const n=Fn.r,i=Fn.g,r=Fn.b,a=Math.max(n,i,r),o=Math.min(n,i,r);let l,c;const d=(o+a)/2;if(o===a)l=0,c=0;else{const m=a-o;switch(c=d<=.5?m/(a+o):m/(2-a-o),a){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=Wt.workingColorSpace){return Wt.workingToColorSpace(Fn.copy(this),t),e.r=Fn.r,e.g=Fn.g,e.b=Fn.b,e}getStyle(e=Zt){Wt.workingToColorSpace(Fn.copy(this),e);const t=Fn.r,n=Fn.g,i=Fn.b;return e!==Zt?`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(ki),this.setHSL(ki.h+e,ki.s+t,ki.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(ki),e.getHSL(Ur);const n=fr(ki.h,Ur.h,t),i=fr(ki.s,Ur.s,t),r=fr(ki.l,Ur.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 Fn=new Tt;Tt.NAMES=L0;let J2=0;class $n extends fs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:J2++}),this.uuid=oi(),this.name="",this.type="Material",this.blending=Bs,this.side=ti,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Go,this.blendDst=Wo,this.blendEquation=as,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=Tc,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!==ti&&(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!==as&&(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!==Tc&&(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 a=[];for(const o in r){const l=r[o];delete l.metadata,a.push(l)}return a}if(t){const r=i(e.textures),a=i(e.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}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 $i extends $n{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 Tn,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 vn=new I,Nr=new Ze;let K2=0;class _n{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=pi,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++)Nr.fromBufferAttribute(this,t),Nr.applyMatrix3(e),this.setXY(t,Nr.x,Nr.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)vn.fromBufferAttribute(this,t),vn.applyMatrix3(e),this.setXYZ(t,vn.x,vn.y,vn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)vn.fromBufferAttribute(this,t),vn.applyMatrix4(e),this.setXYZ(t,vn.x,vn.y,vn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)vn.fromBufferAttribute(this,t),vn.applyNormalMatrix(e),this.setXYZ(t,vn.x,vn.y,vn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)vn.fromBufferAttribute(this,t),vn.transformDirection(e),this.setXYZ(t,vn.x,vn.y,vn.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=ri(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=an(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=ri(t,this.array)),t}setX(e,t){return this.normalized&&(t=an(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=ri(t,this.array)),t}setY(e,t){return this.normalized&&(t=an(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=ri(t,this.array)),t}setZ(e,t){return this.normalized&&(t=an(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=ri(t,this.array)),t}setW(e,t){return this.normalized&&(t=an(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=an(t,this.array),n=an(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=an(t,this.array),n=an(n,this.array),i=an(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=an(t,this.array),n=an(n,this.array),i=an(i,this.array),r=an(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 F0 extends _n{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Z2 extends _n{constructor(e,t,n){super(new Int32Array(e),t,n)}}class U0 extends _n{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Nt extends _n{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Q2=0;const Yn=new Et,uo=new cn,As=new I,Xn=new In,ir=new In,An=new I;class hn extends fs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Q2++}),this.uuid=oi(),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(D0(e)?U0:F0)(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 Yn.makeRotationFromQuaternion(e),this.applyMatrix4(Yn),this}rotateX(e){return Yn.makeRotationX(e),this.applyMatrix4(Yn),this}rotateY(e){return Yn.makeRotationY(e),this.applyMatrix4(Yn),this}rotateZ(e){return Yn.makeRotationZ(e),this.applyMatrix4(Yn),this}translate(e,t,n){return Yn.makeTranslation(e,t,n),this.applyMatrix4(Yn),this}scale(e,t,n){return Yn.makeScale(e,t,n),this.applyMatrix4(Yn),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 a=e[i];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new Nt(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 In);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];Xn.setFromBufferAttribute(r),this.morphTargetsRelative?(An.addVectors(this.boundingBox.min,Xn.min),this.boundingBox.expandByPoint(An),An.addVectors(this.boundingBox.max,Xn.max),this.boundingBox.expandByPoint(An)):(this.boundingBox.expandByPoint(Xn.min),this.boundingBox.expandByPoint(Xn.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 Ui);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(Xn.setFromBufferAttribute(e),t)for(let r=0,a=t.length;r<a;r++){const o=t[r];ir.setFromBufferAttribute(o),this.morphTargetsRelative?(An.addVectors(Xn.min,ir.min),Xn.expandByPoint(An),An.addVectors(Xn.max,ir.max),Xn.expandByPoint(An)):(Xn.expandByPoint(ir.min),Xn.expandByPoint(ir.max))}Xn.getCenter(n);let i=0;for(let r=0,a=e.count;r<a;r++)An.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(An));if(t)for(let r=0,a=t.length;r<a;r++){const o=t[r],l=this.morphTargetsRelative;for(let c=0,d=o.count;c<d;c++)An.fromBufferAttribute(o,c),l&&(As.fromBufferAttribute(e,c),An.add(As)),i=Math.max(i,n.distanceToSquared(An))}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 _n(new Float32Array(4*n.count),4));const a=this.getAttribute("tangent"),o=[],l=[];for(let L=0;L<n.count;L++)o[L]=new I,l[L]=new I;const c=new I,d=new I,m=new I,u=new Ze,h=new Ze,g=new Ze,_=new I,p=new I;function f(L,A,E){c.fromBufferAttribute(n,L),d.fromBufferAttribute(n,A),m.fromBufferAttribute(n,E),u.fromBufferAttribute(r,L),h.fromBufferAttribute(r,A),g.fromBufferAttribute(r,E),d.sub(c),m.sub(c),h.sub(u),g.sub(u);const P=1/(h.x*g.y-g.x*h.y);isFinite(P)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(m,-h.y).multiplyScalar(P),p.copy(m).multiplyScalar(h.x).addScaledVector(d,-g.x).multiplyScalar(P),o[L].add(_),o[A].add(_),o[E].add(_),l[L].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 L=0,A=v.length;L<A;++L){const E=v[L],P=E.start,z=E.count;for(let H=P,Q=P+z;H<Q;H+=3)f(e.getX(H+0),e.getX(H+1),e.getX(H+2))}const x=new I,b=new I,F=new I,C=new I;function R(L){F.fromBufferAttribute(i,L),C.copy(F);const A=o[L];x.copy(A),x.sub(F.multiplyScalar(F.dot(A))).normalize(),b.crossVectors(C,A);const P=b.dot(l[L])<0?-1:1;a.setXYZW(L,x.x,x.y,x.z,P)}for(let L=0,A=v.length;L<A;++L){const E=v[L],P=E.start,z=E.count;for(let H=P,Q=P+z;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 _n(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,a=new I,o=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,_),a.fromBufferAttribute(t,p),d.subVectors(a,r),m.subVectors(i,r),d.cross(m),o.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),c.fromBufferAttribute(n,p),o.add(d),l.add(d),c.add(d),n.setXYZ(g,o.x,o.y,o.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),a.fromBufferAttribute(t,u+2),d.subVectors(a,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++)An.fromBufferAttribute(e,t),An.normalize(),e.setXYZ(t,An.x,An.y,An.z)}toNonIndexed(){function e(o,l){const c=o.array,d=o.itemSize,m=o.normalized,u=new c.constructor(l.length*d);let h=0,g=0;for(let _=0,p=l.length;_<p;_++){o.isInterleavedBufferAttribute?h=l[_]*o.data.stride+o.offset:h=l[_]*d;for(let f=0;f<d;f++)u[g++]=c[h++]}return new _n(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 o in i){const l=i[o],c=e(l,n);t.setAttribute(o,c)}const r=this.morphAttributes;for(const o in r){const l=[],c=r[o];for(let d=0,m=c.length;d<m;d++){const u=c[d],h=e(u,n);l.push(h)}t.morphAttributes[o]=l}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,l=a.length;o<l;o++){const c=a[o];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 a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.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 a=e.groups;for(let c=0,d=a.length;c<d;c++){const m=a[c];this.addGroup(m.start,m.count,m.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.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 Hc=new Et,Qi=new Ys,Ir=new Ui,Gc=new I,zr=new I,Br=new I,Or=new I,fo=new I,kr=new I,Wc=new I,Vr=new I;class zt extends cn{constructor(e=new hn,t=new $i){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,a=i.length;r<a;r++){const o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const o=this.morphTargetInfluences;if(r&&o){kr.set(0,0,0);for(let l=0,c=r.length;l<c;l++){const d=o[l],m=r[l];d!==0&&(fo.fromBufferAttribute(m,e),a?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),Qi.copy(e.ray).recast(e.near),!(Ir.containsPoint(Qi.origin)===!1&&(Qi.intersectSphere(Ir,Gc)===null||Qi.origin.distanceToSquared(Gc)>(e.far-e.near)**2))&&(Hc.copy(r).invert(),Qi.copy(e.ray).applyMatrix4(Hc),!(n.boundingBox!==null&&Qi.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Qi)))}_computeIntersections(e,t,n){let i;const r=this.geometry,a=this.material,o=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(o!==null)if(Array.isArray(a))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=a[p.materialIndex],v=Math.max(p.start,h.start),x=Math.min(o.count,Math.min(p.start+p.count,h.start+h.count));for(let b=v,F=x;b<F;b+=3){const C=o.getX(b),R=o.getX(b+1),L=o.getX(b+2);i=Hr(this,f,e,n,c,d,m,C,R,L),i&&(i.faceIndex=Math.floor(b/3),i.face.materialIndex=p.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(o.count,h.start+h.count);for(let p=g,f=_;p<f;p+=3){const v=o.getX(p),x=o.getX(p+1),b=o.getX(p+2);i=Hr(this,a,e,n,c,d,m,v,x,b),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(a))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=a[p.materialIndex],v=Math.max(p.start,h.start),x=Math.min(l.count,Math.min(p.start+p.count,h.start+h.count));for(let b=v,F=x;b<F;b+=3){const C=b,R=b+1,L=b+2;i=Hr(this,f,e,n,c,d,m,C,R,L),i&&(i.faceIndex=Math.floor(b/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,x=p+1,b=p+2;i=Hr(this,a,e,n,c,d,m,v,x,b),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}}}function e1(s,e,t,n,i,r,a,o){let l;if(e.side===On?l=n.intersectTriangle(a,r,i,!0,o):l=n.intersectTriangle(i,r,a,e.side===ti,o),l===null)return null;Vr.copy(o),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,a,o,l,c){s.getVertexPosition(o,zr),s.getVertexPosition(l,Br),s.getVertexPosition(c,Or);const d=e1(s,e,t,n,zr,Br,Or,Wc);if(d){const m=new I;Qn.getBarycoord(Wc,zr,Br,Or,m),i&&(d.uv=Qn.getInterpolatedAttribute(i,o,l,c,m,new Ze)),r&&(d.uv1=Qn.getInterpolatedAttribute(r,o,l,c,m,new Ze)),a&&(d.normal=Qn.getInterpolatedAttribute(a,o,l,c,m,new I),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const u={a:o,b:l,c,normal:new I,materialIndex:0};Qn.getNormal(zr,Br,Or,u.normal),d.face=u,d.barycoord=m}return d}class Yi extends hn{constructor(e=1,t=1,n=1,i=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:a};const o=this;i=Math.floor(i),r=Math.floor(r),a=Math.floor(a);const l=[],c=[],d=[],m=[];let u=0,h=0;g("z","y","x",-1,-1,n,t,e,a,r,0),g("z","y","x",1,-1,n,t,-e,a,r,1),g("x","z","y",1,1,e,n,t,i,a,2),g("x","z","y",1,-1,e,n,-t,i,a,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 Nt(c,3)),this.setAttribute("normal",new Nt(d,3)),this.setAttribute("uv",new Nt(m,2));function g(_,p,f,v,x,b,F,C,R,L,A){const E=b/R,P=F/L,z=b/2,H=F/2,Q=C/2,re=R+1,G=L+1;let le=0,K=0;const pe=new I;for(let Me=0;Me<G;Me++){const ye=Me*P-H;for(let de=0;de<re;de++){const se=de*E-z;pe[_]=se*v,pe[p]=ye*x,pe[f]=Q,c.push(pe.x,pe.y,pe.z),pe[_]=0,pe[p]=0,pe[f]=C>0?1:-1,d.push(pe.x,pe.y,pe.z),m.push(de/R),m.push(1-Me/L),le+=1}}for(let Me=0;Me<L;Me++)for(let ye=0;ye<R;ye++){const de=u+ye+re*Me,se=u+ye+re*(Me+1),W=u+(ye+1)+re*(Me+1),j=u+(ye+1)+re*Me;l.push(de,se,j),l.push(se,W,j),K+=6}o.addGroup(h,K,A),h+=K,u+=le}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Yi(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 Bn(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 t1(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:Wt.workingColorSpace}const ec={clone:qs,merge:Bn};var n1=`void main() {
|
|
5
|
+
*/const Hl="177",Ti={ROTATE:0,DOLLY:1,PAN:2},Is={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Du=0,yc=1,Lu=2,y0=1,Gl=2,Si=3,ei=0,zn=1,gn=2,Wi=0,Bs=1,xc=2,Mc=3,bc=4,Pu=5,rs=100,Fu=101,Nu=102,Uu=103,Iu=104,zu=200,Bu=201,Ou=202,ku=203,Go=204,Wo=205,Vu=206,Hu=207,Gu=208,Wu=209,Xu=210,ju=211,qu=212,$u=213,Yu=214,Xo=0,jo=1,qo=2,Hs=3,$o=4,Yo=5,Jo=6,Ko=7,Fa=0,Ju=1,Ku=2,Xi=0,Zu=1,Qu=2,e2=3,Wl=4,t2=5,n2=6,i2=7,Sc="attached",s2="detached",x0=300,Gs=301,Ws=302,Zo=303,Qo=304,Na=306,di=1e3,ri=1001,el=1002,qn=1003,r2=1004,wr=1005,jn=1006,Xa=1007,Ai=1008,mi=1009,M0=1010,b0=1011,_r=1012,Xl=1013,hs=1014,fi=1015,Sr=1016,jl=1017,ql=1018,vr=1020,S0=35902,E0=1021,A0=1022,Qn=1023,yr=1026,xr=1027,w0=1028,$l=1029,T0=1030,Yl=1031,Jl=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,C0=36283,El=36284,Al=36285,wl=36286,Ea=2300,Tl=2301,ja=2302,Ec=2400,Ac=2401,wc=2402,a2=2500,o2=3200,l2=3201,Ua=0,c2=1,Hi="",jt="srgb",Xs="srgb-linear",Aa="linear",on="srgb",ms=7680,Tc=519,h2=512,u2=513,d2=514,R0=515,f2=516,p2=517,m2=518,g2=519,Cl=35044,Cc="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 Dn=["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 Rc=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(Dn[s&255]+Dn[s>>8&255]+Dn[s>>16&255]+Dn[s>>24&255]+"-"+Dn[e&255]+Dn[e>>8&255]+"-"+Dn[e>>16&15|64]+Dn[e>>24&255]+"-"+Dn[t&63|128]+Dn[t>>8&255]+"-"+Dn[t>>16&255]+Dn[t>>24&255]+Dn[n&255]+Dn[n>>8&255]+Dn[n>>16&255]+Dn[n>>24&255]).toLowerCase()}function kt(s,e,t){return Math.max(e,Math.min(t,s))}function Kl(s,e){return(s%e+e)%e}function _2(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function v2(s,e,t){return s!==e?(t-s)/(e-s):0}function fr(s,e,t){return(1-t)*s+t*e}function y2(s,e,t,n){return fr(s,e,1-Math.exp(-t*n))}function x2(s,e=1){return e-Math.abs(Kl(s,e*2)-e)}function M2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function b2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function S2(s,e){return s+Math.floor(Math.random()*(e-s+1))}function E2(s,e){return s+Math.random()*(e-s)}function A2(s){return s*(.5-Math.random())}function w2(s){s!==void 0&&(Rc=s);let e=Rc+=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 T2(s){return s*dr}function C2(s){return s*js}function R2(s){return(s&s-1)===0&&s!==0}function D2(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function L2(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function P2(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 sn(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:kt,euclideanModulo:Kl,mapLinear:_2,inverseLerp:v2,lerp:fr,damp:y2,pingpong:x2,smoothstep:M2,smootherstep:b2,randInt:S2,randFloat:E2,randFloatSpread:A2,seededRandom:w2,degToRad:T2,radToDeg:C2,isPowerOfTwo:R2,ceilPowerOfTwo:D2,floorPowerOfTwo:L2,setQuaternionFromProperEuler:P2,normalize:sn,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=kt(this.x,e.x,t.x),this.y=kt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=kt(this.x,e,t),this.y=kt(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(kt(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(kt(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 Hn{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,x=1-f*f;if(x>Number.EPSILON){const F=Math.sqrt(x),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(kt(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(Dc.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Dc.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=kt(this.x,e.x,t.x),this.y=kt(this.y,e.y,t.y),this.z=kt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=kt(this.x,e,t),this.y=kt(this.y,e,t),this.z=kt(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(kt(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(kt(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,Dc=new Hn;class Ot{constructor(e,t,n,i,r,o,a,l,c){Ot.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],x=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*x+l*C,r[6]=o*f+a*S+l*R,r[1]=c*_+d*v+m*F,r[4]=c*p+d*x+m*C,r[7]=c*f+d*S+m*R,r[2]=u*_+h*v+g*F,r[5]=u*p+h*x+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 Ot;function D0(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 F2(){const s=Mr("canvas");return s.style.display="block",s}const Lc={};function Os(s){s in Lc||(Lc[s]=!0,console.warn(s))}function N2(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 U2(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 I2(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 Pc=new Ot().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Fc=new Ot().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function z2(){const s={enabled:!0,workingColorSpace:Xs,spaces:{},convert:function(i,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===on&&(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===on&&(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:Pc,fromXYZ:Fc,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:jt},outputColorSpaceConfig:{drawingBufferColorSpace:jt}},[jt]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Pc,fromXYZ:Fc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:jt}}}),s}const Ht=z2();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 B2{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 O2=0;class Zl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:O2++}),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?B2.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 k2=0;const Ja=new I;class Cn extends ds{constructor(e=Cn.DEFAULT_IMAGE,t=Cn.DEFAULT_MAPPING,n=ri,i=ri,r=jn,o=Ai,a=Qn,l=mi,c=Cn.DEFAULT_ANISOTROPY,d=Hi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:k2++}),this.uuid=ai(),this.name="",this.source=new Zl(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 Ot,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!==x0)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++}}Cn.DEFAULT_IMAGE=null;Cn.DEFAULT_MAPPING=x0;Cn.DEFAULT_ANISOTROPY=1;class Gt{constructor(e=0,t=0,n=0,i=1){Gt.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 x=(c+1)/2,S=(h+1)/2,F=(f+1)/2,C=(d+u)/4,R=(m+_)/4,P=(g+p)/4;return x>S&&x>F?x<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(x),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=kt(this.x,e.x,t.x),this.y=kt(this.y,e.y,t.y),this.z=kt(this.z,e.z,t.z),this.w=kt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=kt(this.x,e,t),this.y=kt(this.y,e,t),this.z=kt(this.z,e,t),this.w=kt(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(kt(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 V2 extends ds{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,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 Gt(0,0,e,t),this.scissorTest=!1,this.viewport=new Gt(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new Cn(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:jn,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 Zl(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 V2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class L0 extends Cn{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=qn,this.minFilter=qn,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 H2 extends Cn{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=qn,this.minFilter=qn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Nn{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 Nn,_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 G2=new Nn,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):G2.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 At{constructor(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p){At.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 At().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(W2,e,X2)}lookAt(e,t,n){const i=this.elements;return Wn.subVectors(e,t),Wn.lengthSq()===0&&(Wn.z=1),Wn.normalize(),Bi.crossVectors(n,Wn),Bi.lengthSq()===0&&(Math.abs(n.z)===1?Wn.x+=1e-4:Wn.z+=1e-4,Wn.normalize(),Bi.crossVectors(n,Wn)),Bi.normalize(),Pr.crossVectors(Wn,Bi),i[0]=Bi.x,i[4]=Pr.x,i[8]=Wn.x,i[1]=Bi.y,i[5]=Pr.y,i[9]=Wn.y,i[2]=Bi.z,i[6]=Pr.z,i[10]=Wn.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],x=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],z=i[9],H=i[13],Q=i[2],re=i[6],G=i[10],le=i[14],Z=i[3],_e=i[7],Ee=i[11],Me=i[15];return r[0]=o*C+a*E+l*Q+c*Z,r[4]=o*R+a*L+l*re+c*_e,r[8]=o*P+a*z+l*G+c*Ee,r[12]=o*A+a*H+l*le+c*Me,r[1]=d*C+m*E+u*Q+h*Z,r[5]=d*R+m*L+u*re+h*_e,r[9]=d*P+m*z+u*G+h*Ee,r[13]=d*A+m*H+u*le+h*Me,r[2]=g*C+_*E+p*Q+f*Z,r[6]=g*R+_*L+p*re+f*_e,r[10]=g*P+_*z+p*G+f*Ee,r[14]=g*A+_*H+p*le+f*Me,r[3]=v*C+x*E+S*Q+F*Z,r[7]=v*R+x*L+S*re+F*_e,r[11]=v*P+x*z+S*G+F*Ee,r[15]=v*A+x*H+S*le+F*Me,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,x=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*x+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]=x*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,x=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-x)*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+x)*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 At,W2=new I(0,0,0),X2=new I(1,1,1),Bi=new I,Pr=new I,Wn=new I,Nc=new At,Uc=new Hn;class En{constructor(e=0,t=0,n=0,i=En.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(kt(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(-kt(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(kt(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(-kt(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(kt(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(-kt(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 Nc.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Nc,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Uc.setFromEuler(this),this.setFromQuaternion(Uc,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}}En.DEFAULT_ORDER="XYZ";class Ql{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 j2=0;const Ic=new I,Ms=new Hn,yi=new At,Fr=new I,nr=new I,q2=new I,$2=new Hn,zc=new I(1,0,0),Bc=new I(0,1,0),Oc=new I(0,0,1),kc={type:"added"},Y2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class cn extends ds{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:j2++}),this.uuid=ai(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=cn.DEFAULT_UP.clone();const e=new I,t=new En,n=new Hn,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 At},normalMatrix:{value:new Ot}}),this.matrix=new At,this.matrixWorld=new At,this.matrixAutoUpdate=cn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=cn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Ql,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(zc,e)}rotateY(e){return this.rotateOnAxis(Bc,e)}rotateZ(e){return this.rotateOnAxis(Oc,e)}translateOnAxis(e,t){return Ic.copy(e).applyQuaternion(this.quaternion),this.position.add(Ic.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(zc,e)}translateY(e){return this.translateOnAxis(Bc,e)}translateZ(e){return this.translateOnAxis(Oc,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(kc),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(Y2),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(kc),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,q2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,$2,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}}cn.DEFAULT_UP=new I(0,1,0);cn.DEFAULT_MATRIX_AUTO_UPDATE=!0;cn.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,Vc=new I,so=new I,ro=new I,ao=new I,oo=new Gt,lo=new Gt,co=new Gt;class Zn{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 Zn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Zn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return Zn.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return Zn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Zn.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 Vc.subVectors(r,i),a=(m-d)/(m-d+(h-g)),t.copy(i).addScaledVector(Vc,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 P0={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=jt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ht.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Ht.workingColorSpace){return this.r=e,this.g=t,this.b=n,Ht.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Ht.workingColorSpace){if(e=Kl(e,1),t=kt(t,0,1),n=kt(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 Ht.colorSpaceToWorking(this,i),this}setStyle(e,t=jt){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=jt){const n=P0[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=jt){return Ht.workingToColorSpace(Ln.copy(this),e),Math.round(kt(Ln.r*255,0,255))*65536+Math.round(kt(Ln.g*255,0,255))*256+Math.round(kt(Ln.b*255,0,255))}getHexString(e=jt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ht.workingColorSpace){Ht.workingToColorSpace(Ln.copy(this),t);const n=Ln.r,i=Ln.g,r=Ln.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=Ht.workingColorSpace){return Ht.workingToColorSpace(Ln.copy(this),t),e.r=Ln.r,e.g=Ln.g,e.b=Ln.b,e}getStyle(e=jt){Ht.workingToColorSpace(Ln.copy(this),e);const t=Ln.r,n=Ln.g,i=Ln.b;return e!==jt?`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 Ln=new Tt;Tt.NAMES=P0;let J2=0;class $n extends ds{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:J2++}),this.uuid=ai(),this.name="",this.type="Material",this.blending=Bs,this.side=ei,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=Tc,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!==ei&&(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!==Tc&&(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 $n{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 En,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 vn=new I,Ur=new et;let K2=0;class _n{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=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++)vn.fromBufferAttribute(this,t),vn.applyMatrix3(e),this.setXYZ(t,vn.x,vn.y,vn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)vn.fromBufferAttribute(this,t),vn.applyMatrix4(e),this.setXYZ(t,vn.x,vn.y,vn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)vn.fromBufferAttribute(this,t),vn.applyNormalMatrix(e),this.setXYZ(t,vn.x,vn.y,vn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)vn.fromBufferAttribute(this,t),vn.transformDirection(e),this.setXYZ(t,vn.x,vn.y,vn.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=sn(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=sn(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=sn(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=sn(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=sn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=sn(t,this.array),n=sn(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=sn(t,this.array),n=sn(n,this.array),i=sn(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=sn(t,this.array),n=sn(n,this.array),i=sn(i,this.array),r=sn(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 F0 extends _n{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Z2 extends _n{constructor(e,t,n){super(new Int32Array(e),t,n)}}class N0 extends _n{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class It extends _n{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Q2=0;const Yn=new At,uo=new cn,As=new I,Xn=new Nn,ir=new Nn,bn=new I;class hn extends ds{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Q2++}),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(D0(e)?N0:F0)(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 Ot().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 Yn.makeRotationFromQuaternion(e),this.applyMatrix4(Yn),this}rotateX(e){return Yn.makeRotationX(e),this.applyMatrix4(Yn),this}rotateY(e){return Yn.makeRotationY(e),this.applyMatrix4(Yn),this}rotateZ(e){return Yn.makeRotationZ(e),this.applyMatrix4(Yn),this}translate(e,t,n){return Yn.makeTranslation(e,t,n),this.applyMatrix4(Yn),this}scale(e,t,n){return Yn.makeScale(e,t,n),this.applyMatrix4(Yn),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 Nn);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];Xn.setFromBufferAttribute(r),this.morphTargetsRelative?(bn.addVectors(this.boundingBox.min,Xn.min),this.boundingBox.expandByPoint(bn),bn.addVectors(this.boundingBox.max,Xn.max),this.boundingBox.expandByPoint(bn)):(this.boundingBox.expandByPoint(Xn.min),this.boundingBox.expandByPoint(Xn.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(Xn.setFromBufferAttribute(e),t)for(let r=0,o=t.length;r<o;r++){const a=t[r];ir.setFromBufferAttribute(a),this.morphTargetsRelative?(bn.addVectors(Xn.min,ir.min),Xn.expandByPoint(bn),bn.addVectors(Xn.max,ir.max),Xn.expandByPoint(bn)):(Xn.expandByPoint(ir.min),Xn.expandByPoint(ir.max))}Xn.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)bn.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(bn));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++)bn.fromBufferAttribute(a,c),l&&(As.fromBufferAttribute(e,c),bn.add(As)),i=Math.max(i,n.distanceToSquared(bn))}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 _n(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,z=E.count;for(let H=L,Q=L+z;H<Q;H+=3)f(e.getX(H+0),e.getX(H+1),e.getX(H+2))}const x=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];x.copy(A),x.sub(F.multiplyScalar(F.dot(A))).normalize(),S.crossVectors(C,A);const L=S.dot(l[P])<0?-1:1;o.setXYZW(P,x.x,x.y,x.z,L)}for(let P=0,A=v.length;P<A;++P){const E=v[P],L=E.start,z=E.count;for(let H=L,Q=L+z;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 _n(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++)bn.fromBufferAttribute(e,t),bn.normalize(),e.setXYZ(t,bn.x,bn.y,bn.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 _n(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 Hc=new At,Zi=new Ys,Ir=new Fi,Gc=new I,zr=new I,Br=new I,Or=new I,fo=new I,kr=new I,Wc=new I,Vr=new I;class Bt extends cn{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,Gc)===null||Zi.origin.distanceToSquared(Gc)>(e.far-e.near)**2))&&(Hc.copy(r).invert(),Zi.copy(e.ray).applyMatrix4(Hc),!(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),x=Math.min(a.count,Math.min(p.start+p.count,h.start+h.count));for(let S=v,F=x;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),x=a.getX(p+1),S=a.getX(p+2);i=Hr(this,o,e,n,c,d,m,v,x,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),x=Math.min(l.count,Math.min(p.start+p.count,h.start+h.count));for(let S=v,F=x;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,x=p+1,S=p+2;i=Hr(this,o,e,n,c,d,m,v,x,S),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}}}function e1(s,e,t,n,i,r,o,a){let l;if(e.side===zn?l=n.intersectTriangle(o,r,i,!0,a):l=n.intersectTriangle(i,r,o,e.side===ei,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=e1(s,e,t,n,zr,Br,Or,Wc);if(d){const m=new I;Zn.getBarycoord(Wc,zr,Br,Or,m),i&&(d.uv=Zn.getInterpolatedAttribute(i,a,l,c,m,new et)),r&&(d.uv1=Zn.getInterpolatedAttribute(r,a,l,c,m,new et)),o&&(d.normal=Zn.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};Zn.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,x,S,F,C,R,P,A){const E=S/R,L=F/P,z=S/2,H=F/2,Q=C/2,re=R+1,G=P+1;let le=0,Z=0;const _e=new I;for(let Ee=0;Ee<G;Ee++){const Me=Ee*L-H;for(let me=0;me<re;me++){const se=me*E-z;_e[_]=se*v,_e[p]=Me*x,_e[f]=Q,c.push(_e.x,_e.y,_e.z),_e[_]=0,_e[p]=0,_e[f]=C>0?1:-1,d.push(_e.x,_e.y,_e.z),m.push(me/R),m.push(1-Ee/P),le+=1}}for(let Ee=0;Ee<P;Ee++)for(let Me=0;Me<R;Me++){const me=u+Me+re*Ee,se=u+Me+re*(Ee+1),j=u+(Me+1)+re*(Ee+1),q=u+(Me+1)+re*Ee;l.push(me,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 In(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 t1(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function U0(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Ht.workingColorSpace}const ec={clone:qs,merge:In};var n1=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,i1=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
9
|
-
}`;class Li extends $n{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=n1,this.fragmentShader=i1,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=t1(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
|
|
9
|
+
}`;class Li extends $n{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=n1,this.fragmentShader=i1,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=t1(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 I0 extends cn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new At,this.projectionMatrix=new At,this.projectionMatrixInverse=new At,this.coordinateSystem=wi}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 ki=new I,Xc=new et,jc=new et;class Sn extends I0{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){ki.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ki.x,ki.y).multiplyScalar(-e/ki.z),ki.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ki.x,ki.y).multiplyScalar(-e/ki.z)}getViewSize(e,t){return this.getViewBounds(e,Xc,jc),t.subVectors(jc,Xc)}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 s1 extends cn{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Sn(ws,Ts,e,t);i.layers=this.layers,this.add(i);const r=new Sn(ws,Ts,e,t);r.layers=this.layers,this.add(r);const o=new Sn(ws,Ts,e,t);o.layers=this.layers,this.add(o);const a=new Sn(ws,Ts,e,t);a.layers=this.layers,this.add(a);const l=new Sn(ws,Ts,e,t);l.layers=this.layers,this.add(l);const c=new Sn(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===wi)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 z0 extends Cn{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 r1 extends us{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 z0(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,11 +41,11 @@
|
|
|
41
41
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
42
42
|
|
|
43
43
|
}
|
|
44
|
-
`},i=new Yi(5,5,5),r=new Li({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:On,blending:Xi});r.uniforms.tEquirect.value=t;const a=new zt(i,r),o=t.minFilter;return t.minFilter===wi&&(t.minFilter=jn),new s1(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const r=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,i);e.setRenderTarget(r)}}class Un extends cn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const a1={type:"move"};class po{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Un,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 Un,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 Un,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,a=null;const o=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){a=!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));o!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(a1)))}return o!==null&&(o.visible=i!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Un;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends cn{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 Tn,this.environmentIntensity=1,this.environmentRotation=new Tn,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 B0{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=oi()}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=oi()),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=oi()),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 zn=new I;class mi{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++)zn.fromBufferAttribute(this,t),zn.applyMatrix4(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.applyNormalMatrix(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)zn.fromBufferAttribute(this,t),zn.transformDirection(e),this.setXYZ(t,zn.x,zn.y,zn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=ri(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=an(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=an(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=an(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=an(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=an(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=ri(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=ri(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=ri(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=ri(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=an(t,this.array),n=an(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=an(t,this.array),n=an(n,this.array),i=an(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=an(t,this.array),n=an(n,this.array),i=an(i,this.array),r=an(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 _n(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 mi(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 $n{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,Ps=new Ze,rr=new Ze,O0=new Et,Gr=new I,ar=new I,Wr=new I,qc=new Ze,mo=new Ze,$c=new Ze;class tc extends cn{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 B0(t,5);Cs.setIndex([0,1,2,0,2,3]),Cs.setAttribute("position",new mi(n,3,0,!1)),Cs.setAttribute("uv",new mi(n,2,3,!1))}this.geometry=Cs,this.material=e,this.center=new Ze(.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),O0.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 a=this.center;Xr(Gr.set(-.5,-.5,0),Ds,a,Rs,i,r),Xr(ar.set(.5,-.5,0),Ds,a,Rs,i,r),Xr(Wr.set(.5,.5,0),Ds,a,Rs,i,r),qc.set(0,0),mo.set(1,0),$c.set(1,1);let o=e.ray.intersectTriangle(Gr,ar,Wr,!1,sr);if(o===null&&(Xr(ar.set(-.5,.5,0),Ds,a,Rs,i,r),mo.set(0,1),o=e.ray.intersectTriangle(Gr,Wr,ar,!1,sr),o===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,qc,mo,$c,new Ze),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){Ps.subVectors(s,t).addScalar(.5).multiply(n),i!==void 0?(rr.x=r*Ps.x-i*Ps.y,rr.y=i*Ps.x+r*Ps.y):rr.copy(Ps),s.copy(e),s.x+=rr.x,s.y+=rr.y,s.applyMatrix4(O0)}const jr=new I,Yc=new I;class k0 extends cn{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),Yc.setFromMatrixPosition(this.matrixWorld);const n=jr.distanceTo(Yc)/e.zoom;t[0].object.visible=!0;let i,r;for(i=1,r=t.length;i<r;i++){let a=t[i].distance;if(t[i].object.visible&&(a-=a*t[i].hysteresis),n>=a)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 a=n[i];t.object.levels.push({object:a.object.uuid,distance:a.distance,hysteresis:a.hysteresis})}return t}}const Jc=new I,Kc=new qt,Zc=new qt,o1=new I,Qc=new Et,qr=new I,go=new Ui,eh=new Et,_o=new Ys;class l1 extends zt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Sc,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 In),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 Ui),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&&(eh.copy(i).invert(),_o.copy(e.ray).applyMatrix4(eh),!(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 qt,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===Sc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===s2?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),Zc.fromBufferAttribute(i.attributes.skinWeight,e),Jc.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let r=0;r<4;r++){const a=Zc.getComponent(r);if(a!==0){const o=Kc.getComponent(r);Qc.multiplyMatrices(n.bones[o].matrixWorld,n.boneInverses[o]),t.addScaledVector(o1.copy(Jc).applyMatrix4(Qc),a)}}return t.applyMatrix4(this.bindMatrixInverse)}}class V0 extends cn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class H0 extends Pn{constructor(e=null,t=1,n=1,i,r,a,o,l,c=qn,d=qn,m,u){super(null,a,o,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 th=new Et,c1=new Et;class nc{constructor(e=[],t=[]){this.uuid=oi(),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,a=e.length;r<a;r++){const o=e[r]?e[r].matrixWorld:c1;th.multiplyMatrices(o,t[r]),th.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new nc(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 H0(t,e,e,ei,pi);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 a=t[r];a===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),a=new V0),this.bones.push(a),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 a=t[i];e.bones.push(a.uuid);const o=n[i];e.boneInverses.push(o.toArray())}return e}}const vo=new I,h1=new I,u1=new kt;class Zn{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(h1.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||u1.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 es=new Ui,$r=new I;class ic{constructor(e=new Zn,t=new Zn,n=new Zn,i=new Zn,r=new Zn,a=new Zn){this.planes=[e,t,n,i,r,a]}set(e,t,n,i,r,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(a),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=Ti){const n=this.planes,i=e.elements,r=i[0],a=i[1],o=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],x=i[14],b=i[15];if(n[0].setComponents(l-r,u-c,p-h,b-f).normalize(),n[1].setComponents(l+r,u+c,p+h,b+f).normalize(),n[2].setComponents(l+a,u+d,p+g,b+v).normalize(),n[3].setComponents(l-a,u-d,p-g,b-v).normalize(),n[4].setComponents(l-o,u-m,p-_,b-x).normalize(),t===Ti)n[5].setComponents(l+o,u+m,p+_,b+x).normalize();else if(t===wa)n[5].setComponents(o,m,_,x).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(),es.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),es.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(es)}intersectsSprite(e){return es.center.set(0,0,0),es.radius=.7071067811865476,es.applyMatrix4(e.matrixWorld),this.intersectsSphere(es)}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 Di extends $n{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,nh=new Et,or=new Ys,Yr=new Ui,yo=new I,ih=new I;class Ba extends cn{constructor(e=new hn,t=new Di){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 Nt(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,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Yr.copy(n.boundingSphere),Yr.applyMatrix4(i),Yr.radius+=r,e.ray.intersectsSphere(Yr)===!1)return;nh.copy(i).invert(),or.copy(e.ray).applyMatrix4(nh);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=o*o,c=this.isLineSegments?2:1,d=n.index,u=n.attributes.position;if(d!==null){const h=Math.max(0,a.start),g=Math.min(d.count,a.start+a.count);for(let _=h,p=g-1;_<p;_+=c){const f=d.getX(_),v=d.getX(_+1),x=Jr(this,e,or,l,f,v,_);x&&t.push(x)}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,a.start),g=Math.min(u.count,a.start+a.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,a=i.length;r<a;r++){const o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}}function Jr(s,e,t,n,i,r,a){const o=s.geometry.attributes.position;if(Ta.fromBufferAttribute(o,i),Ca.fromBufferAttribute(o,r),t.distanceSqToSegment(Ta,Ca,yo,ih)>n)return;yo.applyMatrix4(s.matrixWorld);const c=e.ray.origin.distanceTo(yo);if(!(c<e.near||c>e.far))return{distance:c,point:ih.clone().applyMatrix4(s.matrixWorld),index:a,face:null,faceIndex:null,barycoord:null,object:s}}const sh=new I,rh=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)sh.fromBufferAttribute(t,i),rh.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+sh.distanceTo(rh);e.setAttribute("lineDistance",new Nt(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Wi extends $n{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 ah=new Et,Rl=new Ys,Kr=new Ui,Zr=new I;class Vs extends cn{constructor(e=new hn,t=new Wi){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,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Kr.copy(n.boundingSphere),Kr.applyMatrix4(i),Kr.radius+=r,e.ray.intersectsSphere(Kr)===!1)return;ah.copy(i).invert(),Rl.copy(e.ray).applyMatrix4(ah);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=o*o,c=n.index,m=n.attributes.position;if(c!==null){const u=Math.max(0,a.start),h=Math.min(c.count,a.start+a.count);for(let g=u,_=h;g<_;g++){const p=c.getX(g);Zr.fromBufferAttribute(m,p),oh(Zr,p,l,i,e,t,this)}}else{const u=Math.max(0,a.start),h=Math.min(m.count,a.start+a.count);for(let g=u,_=h;g<_;g++)Zr.fromBufferAttribute(m,g),oh(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,a=i.length;r<a;r++){const o=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=r}}}}}function oh(s,e,t,n,i,r,a){const o=Rl.distanceSqToPoint(s);if(o<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(o),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:a})}}class d1 extends Pn{constructor(e,t,n,i,r,a,o,l,c){super(e,t,n,i,r,a,o,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class G0 extends Pn{constructor(e,t,n=us,i,r,a,o=qn,l=qn,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,a,o,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 Zl(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 sc extends hn{constructor(e=1,t=1,n=1,i=32,r=1,a=!1,o=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:a,thetaStart:o,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(),a===!1&&(e>0&&x(!0),t>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new Nt(m,3)),this.setAttribute("normal",new Nt(u,3)),this.setAttribute("uv",new Nt(h,2));function v(){const b=new I,F=new I;let C=0;const R=(t-e)/n;for(let L=0;L<=r;L++){const A=[],E=L/r,P=E*(t-e)+e;for(let z=0;z<=i;z++){const H=z/i,Q=H*l+o,re=Math.sin(Q),G=Math.cos(Q);F.x=P*re,F.y=-E*n+p,F.z=P*G,m.push(F.x,F.y,F.z),b.set(re,R,G).normalize(),u.push(b.x,b.y,b.z),h.push(H,1-E),A.push(g++)}_.push(A)}for(let L=0;L<i;L++)for(let A=0;A<r;A++){const E=_[A][L],P=_[A+1][L],z=_[A+1][L+1],H=_[A][L+1];(e>0||A!==0)&&(d.push(E,P,H),C+=3),(t>0||A!==r-1)&&(d.push(P,z,H),C+=3)}c.addGroup(f,C,0),f+=C}function x(b){const F=g,C=new Ze,R=new I;let L=0;const A=b===!0?e:t,E=b===!0?1:-1;for(let z=1;z<=i;z++)m.push(0,p*E,0),u.push(0,E,0),h.push(.5,.5),g++;const P=g;for(let z=0;z<=i;z++){const Q=z/i*l+o,re=Math.cos(Q),G=Math.sin(Q);R.x=A*G,R.y=p*E,R.z=A*re,m.push(R.x,R.y,R.z),u.push(0,E,0),C.x=re*.5+.5,C.y=G*.5*E+.5,h.push(C.x,C.y),g++}for(let z=0;z<i;z++){const H=F+z,Q=P+z;b===!0?d.push(Q,Q+1,H):d.push(Q+1,Q,H),L+=3}c.addGroup(f,L,b===!0?1:2),f+=L}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sc(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 a=1;a<=e;a++)n=this.getPoint(a/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 a;t?a=t:a=e*n[r-1];let o=0,l=r-1,c;for(;o<=l;)if(i=Math.floor(o+(l-o)/2),c=n[i]-a,c<0)o=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===a)return i/(r-1);const d=n[i],u=n[i+1]-d,h=(a-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 a=this.getPoint(i),o=this.getPoint(r),l=t||(a.isVector2?new Ze:new I);return l.copy(o).sub(a).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=[],a=[],o=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,a[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),o.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],o),a[0].crossVectors(i[0],r[0]);for(let h=1;h<=e;h++){if(r[h]=r[h-1].clone(),a[h]=a[h-1].clone(),o.crossVectors(i[h-1],i[h]),o.length()>Number.EPSILON){o.normalize();const g=Math.acos(Vt(i[h-1].dot(i[h]),-1,1));r[h].applyMatrix4(l.makeRotationAxis(o,g))}a[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(o.crossVectors(r[0],r[e]))>0&&(h=-h);for(let g=1;g<=e;g++)r[g].applyMatrix4(l.makeRotationAxis(i[g],h*g)),a[g].crossVectors(i[g],r[g])}return{tangents:i,normals:r,binormals:a}}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 W0 extends Ni{constructor(e=0,t=0,n=1,i=1,r=0,a=Math.PI*2,o=!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=a,this.aClockwise=o,this.aRotation=l}getPoint(e,t=new Ze){const n=t,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const a=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(a?r=0:r=i),this.aClockwise===!0&&!a&&(r===i?r=-i:r=r-i);const o=this.aStartAngle+e*r;let l=this.aX+this.xRadius*Math.cos(o),c=this.aY+this.yRadius*Math.sin(o);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 f1 extends W0{constructor(e,t,n,i,r,a){super(e,t,n,n,i,r,a),this.isArcCurve=!0,this.type="ArcCurve"}}function rc(){let s=0,e=0,t=0,n=0;function i(r,a,o,l){s=r,e=o,t=-3*r+3*a-2*o-l,n=2*r-2*a+o+l}return{initCatmullRom:function(r,a,o,l,c){i(a,o,c*(o-r),c*(l-a))},initNonuniformCatmullRom:function(r,a,o,l,c,d,m){let u=(a-r)/c-(o-r)/(c+d)+(o-a)/d,h=(o-a)/d-(l-a)/(d+m)+(l-o)/m;u*=d,h*=d,i(a,o,u,h)},calc:function(r){const a=r*r,o=a*r;return s+e*r+t*a+n*o}}}const Qr=new I,xo=new rc,Mo=new rc,bo=new rc;class ac 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,a=(r-(this.closed?0:1))*e;let o=Math.floor(a),l=a-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/r)+1)*r:l===0&&o===r-1&&(o=r-2,l=1);let c,d;this.closed||o>0?c=i[(o-1)%r]:(Qr.subVectors(i[0],i[1]).add(i[0]),c=Qr);const m=i[o%r],u=i[(o+1)%r];if(this.closed||o+2<r?d=i[(o+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 lh(s,e,t,n,i){const r=(n-e)*.5,a=(i-t)*.5,o=s*s,l=s*o;return(2*t-2*n+r+a)*l+(-3*t+3*n-2*r-a)*o+r*s+t}function p1(s,e){const t=1-s;return t*t*e}function m1(s,e){return 2*(1-s)*s*e}function g1(s,e){return s*s*e}function pr(s,e,t,n){return p1(s,e)+m1(s,t)+g1(s,n)}function _1(s,e){const t=1-s;return t*t*t*e}function v1(s,e){const t=1-s;return 3*t*t*s*e}function y1(s,e){return 3*(1-s)*s*s*e}function x1(s,e){return s*s*s*e}function mr(s,e,t,n,i){return _1(s,e)+v1(s,t)+y1(s,n)+x1(s,i)}class M1 extends Ni{constructor(e=new Ze,t=new Ze,n=new Ze,i=new Ze){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Ze){const n=t,i=this.v0,r=this.v1,a=this.v2,o=this.v3;return n.set(mr(e,i.x,r.x,a.x,o.x),mr(e,i.y,r.y,a.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.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 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,a=this.v2,o=this.v3;return n.set(mr(e,i.x,r.x,a.x,o.x),mr(e,i.y,r.y,a.y,o.y),mr(e,i.z,r.z,a.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.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 S1 extends Ni{constructor(e=new Ze,t=new Ze){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Ze){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 Ze){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 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 A1 extends Ni{constructor(e=new Ze,t=new Ze,n=new Ze){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Ze){const n=t,i=this.v0,r=this.v1,a=this.v2;return n.set(pr(e,i.x,r.x,a.x),pr(e,i.y,r.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}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 X0 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,a=this.v2;return n.set(pr(e,i.x,r.x,a.x),pr(e,i.y,r.y,a.y),pr(e,i.z,r.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}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 w1 extends Ni{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Ze){const n=t,i=this.points,r=(i.length-1)*e,a=Math.floor(r),o=r-a,l=i[a===0?a:a-1],c=i[a],d=i[a>i.length-2?i.length-1:a+1],m=i[a>i.length-3?i.length-1:a+2];return n.set(lh(o,l.x,c.x,d.x,m.x),lh(o,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 Ze().fromArray(i))}return this}}var T1=Object.freeze({__proto__:null,ArcCurve:f1,CatmullRomCurve3:ac,CubicBezierCurve:M1,CubicBezierCurve3:b1,EllipseCurve:W0,LineCurve:S1,LineCurve3:E1,QuadraticBezierCurve:A1,QuadraticBezierCurve3:X0,SplineCurve:w1});class Pi 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,a=t/2,o=Math.floor(n),l=Math.floor(i),c=o+1,d=l+1,m=e/o,u=t/l,h=[],g=[],_=[],p=[];for(let f=0;f<d;f++){const v=f*u-a;for(let x=0;x<c;x++){const b=x*m-r;g.push(b,-v,0),_.push(0,0,1),p.push(x/o),p.push(1-f/l)}}for(let f=0;f<l;f++)for(let v=0;v<o;v++){const x=v+c*f,b=v+c*(f+1),F=v+1+c*(f+1),C=v+1+c*f;h.push(x,b,C),h.push(b,F,C)}this.setIndex(h),this.setAttribute("position",new Nt(g,3)),this.setAttribute("normal",new Nt(_,3)),this.setAttribute("uv",new Nt(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Pi(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,a=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:a,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(a+o,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=[],x=f/n;let b=0;f===0&&a===0?b=.5/t:f===n&&l===Math.PI&&(b=-.5/t);for(let F=0;F<=t;F++){const C=F/t;m.x=-e*Math.cos(i+C*r)*Math.sin(a+x*o),m.y=e*Math.cos(a+x*o),m.z=e*Math.sin(i+C*r)*Math.sin(a+x*o),g.push(m.x,m.y,m.z),u.copy(m).normalize(),_.push(u.x,u.y,u.z),p.push(C+b,1-x),v.push(c++)}d.push(v)}for(let f=0;f<n;f++)for(let v=0;v<t;v++){const x=d[f][v+1],b=d[f][v],F=d[f+1][v],C=d[f+1][v+1];(f!==0||a>0)&&h.push(x,b,C),(f!==n-1||l<Math.PI)&&h.push(b,F,C)}this.setIndex(h),this.setAttribute("position",new Nt(g,3)),this.setAttribute("normal",new Nt(_,3)),this.setAttribute("uv",new Nt(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 X0(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 a=e.computeFrenetFrames(t,r);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const o=new I,l=new I,c=new Ze;let d=new I;const m=[],u=[],h=[],g=[];_(),this.setIndex(g),this.setAttribute("position",new Nt(m,3)),this.setAttribute("normal",new Nt(u,3)),this.setAttribute("uv",new Nt(h,2));function _(){for(let x=0;x<t;x++)p(x);p(r===!1?t:0),v(),f()}function p(x){d=e.getPointAt(x/t,d);const b=a.normals[x],F=a.binormals[x];for(let C=0;C<=i;C++){const R=C/i*Math.PI*2,L=Math.sin(R),A=-Math.cos(R);l.x=A*b.x+L*F.x,l.y=A*b.y+L*F.y,l.z=A*b.z+L*F.z,l.normalize(),u.push(l.x,l.y,l.z),o.x=d.x+n*l.x,o.y=d.y+n*l.y,o.z=d.z+n*l.z,m.push(o.x,o.y,o.z)}}function f(){for(let x=1;x<=t;x++)for(let b=1;b<=i;b++){const F=(i+1)*(x-1)+(b-1),C=(i+1)*x+(b-1),R=(i+1)*x+b,L=(i+1)*(x-1)+b;g.push(F,C,L),g.push(C,R,L)}}function v(){for(let x=0;x<=t;x++)for(let b=0;b<=i;b++)c.x=x/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 T1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class C1 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 a=e.attributes.position,o=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:o.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=o.getX(g+p),v=o.getX(g+(p+1)%3);i.fromBufferAttribute(a,f),r.fromBufferAttribute(a,v),ch(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const a=e.attributes.position;for(let o=0,l=a.count/3;o<l;o++)for(let c=0;c<3;c++){const d=3*o+c,m=3*o+(c+1)%3;i.fromBufferAttribute(a,d),r.fromBufferAttribute(a,m),ch(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new Nt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function ch(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 j0 extends $n{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 q0 extends $n{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=Na,this.normalScale=new Ze(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 Tn,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 mn extends $n{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=Na,this.normalScale=new Ze(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Tn,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 R1 extends $n{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=Na,this.normalScale=new Ze(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Tn,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 D1 extends $n{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=o2,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 P1 extends $n{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 F1(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 hh(s,e,t){const n=s.length,i=new s.constructor(n);for(let r=0,a=0;a!==n;++r){const o=t[r]*e;for(let l=0;l!==e;++l)i[a++]=s[o+l]}return i}function $0(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 a=r[n];if(a!==void 0)if(Array.isArray(a))do a=r[n],a!==void 0&&(e.push(r.time),t.push(...a)),r=s[i++];while(r!==void 0);else if(a.toArray!==void 0)do a=r[n],a!==void 0&&(e.push(r.time),a.toArray(t,t.length)),r=s[i++];while(r!==void 0);else do a=r[n],a!==void 0&&(e.push(r.time),t.push(a)),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 a;t:{i:if(!(e<i)){for(let o=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===o)break;if(r=i,i=t[++n],e<i)break e}a=t.length;break t}if(!(e>=r)){const o=t[1];e<o&&(n=2,r=o);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}a=n,n=0;break t}break n}for(;n<a;){const o=n+a>>>1;e<t[o]?a=o:n=o+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 a=0;a!==i;++a)t[a]=n[r+a];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class U1 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:Ec,endingEnd:Ec}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,a=e+1,o=i[r],l=i[a];if(o===void 0)switch(this.getSettings_().endingStart){case Ac:r=e,o=2*t-n;break;case wc:r=i.length-2,o=t+i[r]-i[r+1];break;default:r=e,o=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Ac:a=e,l=2*n-t;break;case wc:a=1,l=n+i[1]-i[0];break;default:a=e-1,l=t}const c=(n-t)*.5,d=this.valueSize;this._weightPrev=c/(t-o),this._weightNext=c/(l-n),this._offsetPrev=r*d,this._offsetNext=a*d}interpolate_(e,t,n,i){const r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=e*o,c=l-o,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,x=(-1-h)*p+(1.5+h)*_+.5*g,b=h*p-h*_;for(let F=0;F!==o;++F)r[F]=f*a[d+F]+v*a[c+F]+x*a[l+F]+b*a[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,a=this.sampleValues,o=this.valueSize,l=e*o,c=l-o,d=(n-t)/(i-t),m=1-d;for(let u=0;u!==o;++u)r[u]=a[c+u]*m+a[l+u]*d;return r}}class I1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class ci{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 I1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new N1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new U1(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,a=i-1;for(;r!==i&&n[r]<e;)++r;for(;a!==-1&&n[a]>t;)--a;if(++a,r!==0||a!==i){r>=a&&(a=Math.max(a,1),r=a-1);const o=this.getValueSize();this.times=n.slice(r,a),this.values=this.values.slice(r*o,a*o)}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 a=null;for(let o=0;o!==r;o++){const l=n[o];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,l),e=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,l,a),e=!1;break}a=l}if(i!==void 0&&L1(i))for(let o=0,l=i.length;o!==l;++o){const c=i[o];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,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 a=1;for(let o=1;o<r;++o){let l=!1;const c=e[o],d=e[o+1];if(c!==d&&(o!==1||c!==e[0]))if(i)l=!0;else{const m=o*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(o!==a){e[a]=e[o];const m=o*n,u=a*n;for(let h=0;h!==n;++h)t[u+h]=t[m+h]}++a}}if(r>0){e[a]=e[r];for(let o=r*n,l=a*n,c=0;c!==n;++c)t[l+c]=t[o+c];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*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}}ci.prototype.ValueTypeName="";ci.prototype.TimeBufferType=Float32Array;ci.prototype.ValueBufferType=Float32Array;ci.prototype.DefaultInterpolation=Tl;class Js extends ci{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 Y0 extends ci{constructor(e,t,n,i){super(e,t,n,i)}}Y0.prototype.ValueTypeName="color";class Da extends ci{constructor(e,t,n,i){super(e,t,n,i)}}Da.prototype.ValueTypeName="number";class z1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(n-t)/(i-t);let c=e*o;for(let d=c+o;c!==d;c+=4)Gn.slerpFlat(r,0,a,c-o,a,c,l);return r}}class Er extends ci{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new z1(this.times,this.values,this.getValueSize(),e)}}Er.prototype.ValueTypeName="quaternion";Er.prototype.InterpolantFactoryMethodSmooth=void 0;class Ks extends ci{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 ci{constructor(e,t,n,i){super(e,t,n,i)}}$s.prototype.ValueTypeName="vector";class uh{constructor(e="",t=-1,n=[],i=a2){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=oi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let a=0,o=n.length;a!==o;++a)t.push(O1(n[a]).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,a=n.length;r!==a;++r)t.push(ci.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,a=[];for(let o=0;o<r;o++){let l=[],c=[];l.push((o+r-1)%r,o,(o+1)%r),c.push(0,1,0);const d=F1(l);l=hh(l,1,d),c=hh(c,1,d),!i&&l[0]===0&&(l.push(r),c.push(c[0])),a.push(new Da(".morphTargetInfluences["+t[o].name+"]",l,c).scale(1/n))}return new this(e,-1,a)}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 o=0,l=e.length;o<l;o++){const c=e[o],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 a=[];for(const o in i)a.push(this.CreateFromMorphTargetSequence(o,i[o],t,n));return a}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=[];$0(h,p,f,g),p.length!==0&&_.push(new m(u,p,f))}},i=[],r=e.name||"default",a=e.fps||30,o=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 x=u[g];p.push(x.time),f.push(x.morphTarget===_?1:0)}i.push(new Da(".morphTargetInfluence["+_+"]",p,f))}l=h.length*a}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,o)}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 B1(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 Y0;case"quaternion":return Er;case"bool":case"boolean":return Js;case"string":return Ks}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function O1(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=B1(s.type);if(s.times===void 0){const t=[],n=[];$0(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 Pa={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 J0{constructor(e,t,n){const i=this;let r=!1,a=0,o=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){o++,r===!1&&i.onStart!==void 0&&i.onStart(d,a,o),r=!0},this.itemEnd=function(d){a++,i.onProgress!==void 0&&i.onProgress(d,a,o),a===o&&(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 oc=new J0;class li{constructor(e){this.manager=e!==void 0?e:oc,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}}li.DEFAULT_MATERIAL_NAME="__DEFAULT";const Si={};class k1 extends Error{constructor(e,t){super(e),this.response=t}}class Zs extends li{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=Pa.get(e);if(r!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(Si[e]!==void 0){Si[e].push({onLoad:t,onProgress:n,onError:i});return}Si[e]=[],Si[e].push({onLoad:t,onProgress:n,onError:i});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,l=this.responseType;fetch(a).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=Si[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:x,value:b})=>{if(x)f.close();else{_+=b.byteLength;const F=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:h});for(let C=0,R=d.length;C<R;C++){const L=d[C];L.onProgress&&L.onProgress(F)}f.enqueue(b),v()}},x=>{f.error(x)})}}});return new Response(p)}else throw new k1(`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,o));case"json":return c.json();default:if(o==="")return c.text();{const m=/charset="?([^;"\s]*)"?/i.exec(o),u=m&&m[1]?m[1].toLowerCase():void 0,h=new TextDecoder(u);return c.arrayBuffer().then(g=>h.decode(g))}}}).then(c=>{Pa.add(e,c);const d=Si[e];delete Si[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onLoad&&h.onLoad(c)}}).catch(c=>{const d=Si[e];if(d===void 0)throw this.manager.itemError(e),c;delete Si[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 V1 extends li{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,a=Pa.get(e);if(a!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a;const o=Mr("img");function l(){d(),Pa.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(){o.removeEventListener("load",l,!1),o.removeEventListener("error",c,!1)}return o.addEventListener("load",l,!1),o.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(e),o.src=e,o}}class H1 extends li{constructor(e){super(e)}load(e,t,n,i){const r=this,a=new H0,o=new Zs(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(r.withCredentials),o.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?a.image=c.image:c.data!==void 0&&(a.image.width=c.width,a.image.height=c.height,a.image.data=c.data),a.wrapS=c.wrapS!==void 0?c.wrapS:ai,a.wrapT=c.wrapT!==void 0?c.wrapT:ai,a.magFilter=c.magFilter!==void 0?c.magFilter:jn,a.minFilter=c.minFilter!==void 0?c.minFilter:jn,a.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(a.colorSpace=c.colorSpace),c.flipY!==void 0&&(a.flipY=c.flipY),c.format!==void 0&&(a.format=c.format),c.type!==void 0&&(a.type=c.type),c.mipmaps!==void 0&&(a.mipmaps=c.mipmaps,a.minFilter=wi),c.mipmapCount===1&&(a.minFilter=jn),c.generateMipmaps!==void 0&&(a.generateMipmaps=c.generateMipmaps),a.needsUpdate=!0,t&&t(a,c)},n,i),a}}class lc extends li{constructor(e){super(e)}load(e,t,n,i){const r=new Pn,a=new V1(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(o){r.image=o,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}}class Ar extends cn{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 K0 extends Ar{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(cn.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,dh=new I,fh=new I;class cc{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ze(512,512),this.mapType=gi,this.map=null,this.mapPass=null,this.matrix=new Et,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ic,this._frameExtents=new Ze(1,1),this._viewportCount=1,this._viewports=[new qt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;dh.setFromMatrixPosition(e.matrixWorld),t.position.copy(dh),fh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(fh),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 G1 extends cc{constructor(){super(new wn(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 W1 extends Ar{constructor(e,t,n=0,i=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(cn.DEFAULT_UP),this.updateMatrix(),this.target=new cn,this.distance=n,this.angle=i,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new G1}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 ph=new Et,lr=new I,Eo=new I;class X1 extends cc{constructor(){super(new wn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ze(4,2),this._viewportCount=6,this._viewports=[new qt(2,1,1,1),new qt(0,1,1,1),new qt(3,1,1,1),new qt(1,1,1,1),new qt(3,0,1,1),new qt(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),ph.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ph)}}class La 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 X1}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 I0{constructor(e=-1,t=1,n=1,i=-1,r=.1,a=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=a,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,a){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=a,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,a=n+e,o=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,a=r+c*this.view.width,o-=d*this.view.offsetY,l=o-d*this.view.height}this.projectionMatrix.makeOrthographic(r,a,o,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 j1 extends cc{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(cn.DEFAULT_UP),this.updateMatrix(),this.target=new cn,this.shadow=new j1}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class hc extends Ar{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class uc{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 q1 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 $1 extends wn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Y1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=mh(),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=mh();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function mh(){return performance.now()}class Dl extends B0{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 gh=new Et;class J1{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 Ql,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 gh.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(gh),this}intersectObject(e,t=!0,n=[]){return Pl(e,this,n,t),n.sort(_h),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Pl(e[i],this,n,t);return n.sort(_h),n}}function _h(s,e){return s.distance-e.distance}function Pl(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 a=0,o=r.length;a<o;a++)Pl(r[a],e,t,!0)}}class Ll{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 vh=new I,ta=new I;class K1{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){vh.subVectors(e,this.start),ta.subVectors(this.end,this.start);const n=ta.dot(ta);let r=ta.dot(vh)/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 Z0 extends Ra{constructor(e=10,t=10,n=4473924,i=8947848){n=new Tt(n),i=new Tt(i);const r=t/2,a=e/t,o=e/2,l=[],c=[];for(let u=0,h=0,g=-o;u<=t;u++,g+=a){l.push(-o,0,g,o,0,g),l.push(g,0,-o,g,0,o);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 Nt(l,3)),d.setAttribute("color",new Nt(c,3));const m=new Di({vertexColors:!0,toneMapped:!1});super(d,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class Z1 extends fs{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 yh(s,e,t,n){const i=Q1(n);switch(t){case E0:return s*e;case w0:return s*e/i.components*i.byteLength;case $l:return s*e/i.components*i.byteLength;case T0:return s*e*2/i.components*i.byteLength;case Yl:return s*e*2/i.components*i.byteLength;case A0:return s*e*3/i.components*i.byteLength;case ei:return s*e*4/i.components*i.byteLength;case Jl: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 C0: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 Q1(s){switch(s){case gi:case M0:return{byteLength:1,components:1};case _r:case b0:case Sr:return{byteLength:2,components:1};case jl:case ql:return{byteLength:2,components:4};case us:case Xl:case pi:return{byteLength:4,components:1};case S0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Hl}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Hl);/**
|
|
44
|
+
`},i=new $i(5,5,5),r=new Li({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:zn,blending:Wi});r.uniforms.tEquirect.value=t;const o=new Bt(i,r),a=t.minFilter;return t.minFilter===Ai&&(t.minFilter=jn),new s1(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 Pn extends cn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const a1={type:"move"};class po{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Pn,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 Pn,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 Pn,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(a1)))}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 Pn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends cn{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 En,this.environmentIntensity=1,this.environmentRotation=new En,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 B0{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 Un=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++)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}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=sn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=sn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=sn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=sn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=sn(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=sn(t,this.array),n=sn(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=sn(t,this.array),n=sn(n,this.array),i=sn(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=sn(t,this.array),n=sn(n,this.array),i=sn(i,this.array),r=sn(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 _n(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 $n{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,O0=new At,Gr=new I,ar=new I,Wr=new I,qc=new et,mo=new et,$c=new et;class tc extends cn{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 B0(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),O0.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),qc.set(0,0),mo.set(1,0),$c.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:Zn.getInterpolation(sr,Gr,ar,Wr,qc,mo,$c,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(O0)}const jr=new I,Yc=new I;class k0 extends cn{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),Yc.setFromMatrixPosition(this.matrixWorld);const n=jr.distanceTo(Yc)/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 Jc=new I,Kc=new Gt,Zc=new Gt,o1=new I,Qc=new At,qr=new I,go=new Fi,eh=new At,_o=new Ys;class l1 extends Bt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Sc,this.bindMatrix=new At,this.bindMatrixInverse=new At,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Nn),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&&(eh.copy(i).invert(),_o.copy(e.ray).applyMatrix4(eh),!(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 Gt,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===Sc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===s2?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),Zc.fromBufferAttribute(i.attributes.skinWeight,e),Jc.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let r=0;r<4;r++){const o=Zc.getComponent(r);if(o!==0){const a=Kc.getComponent(r);Qc.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(o1.copy(Jc).applyMatrix4(Qc),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class V0 extends cn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class H0 extends Cn{constructor(e=null,t=1,n=1,i,r,o,a,l,c=qn,d=qn,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 th=new At,c1=new At;class nc{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 At)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new At;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:c1;th.multiplyMatrices(a,t[r]),th.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new nc(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 H0(t,e,e,Qn,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 V0),this.bones.push(o),this.boneInverses.push(new At().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,h1=new I,u1=new Ot;class Kn{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(h1.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||u1.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 ic{constructor(e=new Kn,t=new Kn,n=new Kn,i=new Kn,r=new Kn,o=new Kn){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],x=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-x).normalize(),t===wi)n[5].setComponents(l+a,u+m,p+_,S+x).normalize();else if(t===wa)n[5].setComponents(a,m,_,x).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 $n{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,nh=new At,or=new Ys,Yr=new Fi,yo=new I,ih=new I;class Ba extends cn{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;nh.copy(i).invert(),or.copy(e.ray).applyMatrix4(nh);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),x=Jr(this,e,or,l,f,v,_);x&&t.push(x)}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,ih)>n)return;yo.applyMatrix4(s.matrixWorld);const c=e.ray.origin.distanceTo(yo);if(!(c<e.near||c>e.far))return{distance:c,point:ih.clone().applyMatrix4(s.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:s}}const sh=new I,rh=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)sh.fromBufferAttribute(t,i),rh.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+sh.distanceTo(rh);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 $n{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 ah=new At,Rl=new Ys,Kr=new Fi,Zr=new I;class Vs extends cn{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;ah.copy(i).invert(),Rl.copy(e.ray).applyMatrix4(ah);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),oh(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),oh(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 oh(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 d1 extends Cn{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 G0 extends Cn{constructor(e,t,n=hs,i,r,o,a=qn,l=qn,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 Zl(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 sc 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&&x(!0),t>0&&x(!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 z=0;z<=i;z++){const H=z/i,Q=H*l+a,re=Math.sin(Q),G=Math.cos(Q);F.x=L*re,F.y=-E*n+p,F.z=L*G,m.push(F.x,F.y,F.z),S.set(re,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],z=_[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,z,H),C+=3)}c.addGroup(f,C,0),f+=C}function x(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 z=1;z<=i;z++)m.push(0,p*E,0),u.push(0,E,0),h.push(.5,.5),g++;const L=g;for(let z=0;z<=i;z++){const Q=z/i*l+a,re=Math.cos(Q),G=Math.sin(Q);R.x=A*G,R.y=p*E,R.z=A*re,m.push(R.x,R.y,R.z),u.push(0,E,0),C.x=re*.5+.5,C.y=G*.5*E+.5,h.push(C.x,C.y),g++}for(let z=0;z<i;z++){const H=F+z,Q=L+z;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 sc(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 At;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(kt(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(kt(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 W0 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 f1 extends W0{constructor(e,t,n,i,r,o){super(e,t,n,n,i,r,o),this.isArcCurve=!0,this.type="ArcCurve"}}function rc(){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 rc,Mo=new rc,bo=new rc;class ac 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 lh(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 p1(s,e){const t=1-s;return t*t*e}function m1(s,e){return 2*(1-s)*s*e}function g1(s,e){return s*s*e}function pr(s,e,t,n){return p1(s,e)+m1(s,t)+g1(s,n)}function _1(s,e){const t=1-s;return t*t*t*e}function v1(s,e){const t=1-s;return 3*t*t*s*e}function y1(s,e){return 3*(1-s)*s*s*e}function x1(s,e){return s*s*s*e}function mr(s,e,t,n,i){return _1(s,e)+v1(s,t)+y1(s,n)+x1(s,i)}class M1 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 b1 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 S1 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 E1 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 A1 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 X0 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 w1 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(lh(a,l.x,c.x,d.x,m.x),lh(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 T1=Object.freeze({__proto__:null,ArcCurve:f1,CatmullRomCurve3:ac,CubicBezierCurve:M1,CubicBezierCurve3:b1,EllipseCurve:W0,LineCurve:S1,LineCurve3:E1,QuadraticBezierCurve:A1,QuadraticBezierCurve3:X0,SplineCurve:w1});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 x=0;x<c;x++){const S=x*m-r;g.push(S,-v,0),_.push(0,0,1),p.push(x/a),p.push(1-f/l)}}for(let f=0;f<l;f++)for(let v=0;v<a;v++){const x=v+c*f,S=v+c*(f+1),F=v+1+c*(f+1),C=v+1+c*f;h.push(x,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=[],x=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+x*a),m.y=e*Math.cos(o+x*a),m.z=e*Math.sin(i+C*r)*Math.sin(o+x*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-x),v.push(c++)}d.push(v)}for(let f=0;f<n;f++)for(let v=0;v<t;v++){const x=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(x,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 X0(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 x=0;x<t;x++)p(x);p(r===!1?t:0),v(),f()}function p(x){d=e.getPointAt(x/t,d);const S=o.normals[x],F=o.binormals[x];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 x=1;x<=t;x++)for(let S=1;S<=i;S++){const F=(i+1)*(x-1)+(S-1),C=(i+1)*x+(S-1),R=(i+1)*x+S,P=(i+1)*(x-1)+S;g.push(F,C,P),g.push(C,R,P)}}function v(){for(let x=0;x<=t;x++)for(let S=0;S<=i;S++)c.x=x/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 T1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class C1 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),ch(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),ch(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 ch(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 j0 extends $n{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 q0 extends $n{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 En,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 mn extends $n{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 En,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 R1 extends $n{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 En,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 D1 extends $n{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=o2,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 L1 extends $n{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 P1(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function F1(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 hh(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 $0(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 N1 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:Ec,endingEnd:Ec}}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 Ac:r=e,a=2*t-n;break;case wc: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 Ac:o=e,l=2*n-t;break;case wc: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,x=(-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]+x*o[l+F]+S*o[m+F];return r}}class U1 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 I1 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 I1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new U1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new N1(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&&P1(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 Y0 extends li{constructor(e,t,n,i){super(e,t,n,i)}}Y0.prototype.ValueTypeName="color";class Da extends li{constructor(e,t,n,i){super(e,t,n,i)}}Da.prototype.ValueTypeName="number";class z1 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)Hn.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 z1(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 uh{constructor(e="",t=-1,n=[],i=a2){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(O1(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=F1(l);l=hh(l,1,d),c=hh(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=[];$0(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 x=u[g];p.push(x.time),f.push(x.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 B1(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 Y0;case"quaternion":return Er;case"bool":case"boolean":return Js;case"string":return Ks}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function O1(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=B1(s.type);if(s.times===void 0){const t=[],n=[];$0(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 J0{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 oc=new J0;class oi{constructor(e){this.manager=e!==void 0?e:oc,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 k1 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:x,value:S})=>{if(x)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()}},x=>{f.error(x)})}}});return new Response(p)}else throw new k1(`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 V1 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 H1 extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new H0,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:jn,o.minFilter=c.minFilter!==void 0?c.minFilter:jn,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=jn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,i),o}}class lc extends oi{constructor(e){super(e)}load(e,t,n,i){const r=new Cn,o=new V1(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 cn{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 K0 extends Ar{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(cn.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 At,dh=new I,fh=new I;class cc{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 At,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ic,this._frameExtents=new et(1,1),this._viewportCount=1,this._viewports=[new Gt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;dh.setFromMatrixPosition(e.matrixWorld),t.position.copy(dh),fh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(fh),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 G1 extends cc{constructor(){super(new Sn(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 W1 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(cn.DEFAULT_UP),this.updateMatrix(),this.target=new cn,this.distance=n,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new G1}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 ph=new At,lr=new I,Eo=new I;class X1 extends cc{constructor(){super(new Sn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new et(4,2),this._viewportCount=6,this._viewports=[new Gt(2,1,1,1),new Gt(0,1,1,1),new Gt(3,1,1,1),new Gt(1,1,1,1),new Gt(3,0,1,1),new Gt(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),ph.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ph)}}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 X1}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 I0{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 j1 extends cc{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(cn.DEFAULT_UP),this.updateMatrix(),this.target=new cn,this.shadow=new j1}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class hc extends Ar{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class uc{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 q1 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 $1 extends Sn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Y1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=mh(),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=mh();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function mh(){return performance.now()}class Dl extends B0{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 gh=new At;class J1{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 Ql,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 gh.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(gh),this}intersectObject(e,t=!0,n=[]){return Ll(e,this,n,t),n.sort(_h),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(_h),n}}function _h(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=kt(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(kt(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const vh=new I,ta=new I;class K1{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){vh.subVectors(e,this.start),ta.subVectors(this.end,this.start);const n=ta.dot(ta);let r=ta.dot(vh)/n;return t&&(r=kt(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 Z0 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 Z1 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 yh(s,e,t,n){const i=Q1(n);switch(t){case E0:return s*e;case w0:return s*e/i.components*i.byteLength;case $l:return s*e/i.components*i.byteLength;case T0:return s*e*2/i.components*i.byteLength;case Yl:return s*e*2/i.components*i.byteLength;case A0:return s*e*3/i.components*i.byteLength;case Qn:return s*e*4/i.components*i.byteLength;case Jl: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 C0: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 Q1(s){switch(s){case mi:case M0:return{byteLength:1,components:1};case _r:case b0:case Sr:return{byteLength:2,components:1};case jl:case ql:return{byteLength:2,components:4};case hs:case Xl:case fi:return{byteLength:4,components:1};case S0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Hl}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Hl);/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2010-2025 Three.js Authors
|
|
47
47
|
* SPDX-License-Identifier: MIT
|
|
48
|
-
*/function Q0(){let s=null,e=!1,t=null,n=null;function i(r,
|
|
48
|
+
*/function Q0(){let s=null,e=!1,t=null,n=null;function i(r,o){t(r,o),n=s.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(n=s.requestAnimationFrame(i),e=!0)},stop:function(){s.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){s=r}}}function ed(s){const e=new WeakMap;function t(a,l){const c=a.array,d=a.usage,m=c.byteLength,u=s.createBuffer();s.bindBuffer(l,u),s.bufferData(l,c,d),a.onUploadCallback();let h;if(c instanceof Float32Array)h=s.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?h=s.HALF_FLOAT:h=s.UNSIGNED_SHORT;else if(c instanceof Int16Array)h=s.SHORT;else if(c instanceof Uint32Array)h=s.UNSIGNED_INT;else if(c instanceof Int32Array)h=s.INT;else if(c instanceof Int8Array)h=s.BYTE;else if(c instanceof Uint8Array)h=s.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)h=s.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:u,type:h,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:m}}function n(a,l,c){const d=l.array,m=l.updateRanges;if(s.bindBuffer(c,a),m.length===0)s.bufferSubData(c,0,d);else{m.sort((h,g)=>h.start-g.start);let u=0;for(let h=1;h<m.length;h++){const g=m[u],_=m[h];_.start<=g.start+g.count+1?g.count=Math.max(g.count,_.start+_.count-g.start):(++u,m[u]=_)}m.length=u+1;for(let h=0,g=m.length;h<g;h++){const _=m[h];s.bufferSubData(c,_.start*d.BYTES_PER_ELEMENT,d,_.start,_.count)}l.clearUpdateRanges()}l.onUploadCallback()}function i(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function r(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(s.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const d=e.get(a);(!d||d.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}const c=e.get(a);if(c===void 0)e.set(a,t(a,l));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(c.buffer,a,l),c.version=a.version}}return{get:i,remove:r,update:o}}var td=`#ifdef USE_ALPHAHASH
|
|
49
49
|
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
|
|
50
50
|
#endif`,nd=`#ifdef USE_ALPHAHASH
|
|
51
51
|
const float ALPHA_HASH_SCALE = 0.05;
|
|
@@ -540,7 +540,7 @@ transformedNormal = normalMatrix * transformedNormal;
|
|
|
540
540
|
totalEmissiveRadiance *= emissiveColor.rgb;
|
|
541
541
|
#endif`,Dd=`#ifdef USE_EMISSIVEMAP
|
|
542
542
|
uniform sampler2D emissiveMap;
|
|
543
|
-
#endif`,
|
|
543
|
+
#endif`,Ld="gl_FragColor = linearToOutputTexel( gl_FragColor );",Pd=`vec4 LinearTransferOETF( in vec4 value ) {
|
|
544
544
|
return value;
|
|
545
545
|
}
|
|
546
546
|
vec4 sRGBTransferEOTF( in vec4 value ) {
|
|
@@ -577,7 +577,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
577
577
|
#elif defined( ENVMAP_BLENDING_ADD )
|
|
578
578
|
outgoingLight += envColor.xyz * specularStrength * reflectivity;
|
|
579
579
|
#endif
|
|
580
|
-
#endif`,
|
|
580
|
+
#endif`,Nd=`#ifdef USE_ENVMAP
|
|
581
581
|
uniform float envMapIntensity;
|
|
582
582
|
uniform float flipEnvMap;
|
|
583
583
|
uniform mat3 envMapRotation;
|
|
@@ -587,7 +587,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
587
587
|
uniform sampler2D envMap;
|
|
588
588
|
#endif
|
|
589
589
|
|
|
590
|
-
#endif`,
|
|
590
|
+
#endif`,Ud=`#ifdef USE_ENVMAP
|
|
591
591
|
uniform float reflectivity;
|
|
592
592
|
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
|
|
593
593
|
#define ENV_WORLDPOS
|
|
@@ -1666,9 +1666,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const
|
|
|
1666
1666
|
}
|
|
1667
1667
|
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
|
|
1668
1668
|
return ( near * far ) / ( ( far - near ) * depth - far );
|
|
1669
|
-
}`,
|
|
1669
|
+
}`,Lf=`#ifdef PREMULTIPLIED_ALPHA
|
|
1670
1670
|
gl_FragColor.rgb *= gl_FragColor.a;
|
|
1671
|
-
#endif`,
|
|
1671
|
+
#endif`,Pf=`vec4 mvPosition = vec4( transformed, 1.0 );
|
|
1672
1672
|
#ifdef USE_BATCHING
|
|
1673
1673
|
mvPosition = batchingMatrix * mvPosition;
|
|
1674
1674
|
#endif
|
|
@@ -1678,14 +1678,14 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const
|
|
|
1678
1678
|
mvPosition = modelViewMatrix * mvPosition;
|
|
1679
1679
|
gl_Position = projectionMatrix * mvPosition;`,Ff=`#ifdef DITHERING
|
|
1680
1680
|
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
|
|
1681
|
-
#endif`,
|
|
1681
|
+
#endif`,Nf=`#ifdef DITHERING
|
|
1682
1682
|
vec3 dithering( vec3 color ) {
|
|
1683
1683
|
float grid_position = rand( gl_FragCoord.xy );
|
|
1684
1684
|
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
|
|
1685
1685
|
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
|
|
1686
1686
|
return color + dither_shift_RGB;
|
|
1687
1687
|
}
|
|
1688
|
-
#endif`,
|
|
1688
|
+
#endif`,Uf=`float roughnessFactor = roughness;
|
|
1689
1689
|
#ifdef USE_ROUGHNESSMAP
|
|
1690
1690
|
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
|
|
1691
1691
|
roughnessFactor *= texelRoughness.g;
|
|
@@ -3483,7 +3483,7 @@ void main() {
|
|
|
3483
3483
|
#include <colorspace_fragment>
|
|
3484
3484
|
#include <fog_fragment>
|
|
3485
3485
|
#include <premultiplied_alpha_fragment>
|
|
3486
|
-
}`,
|
|
3486
|
+
}`,Lp=`#include <common>
|
|
3487
3487
|
#include <batching_pars_vertex>
|
|
3488
3488
|
#include <fog_pars_vertex>
|
|
3489
3489
|
#include <morphtarget_pars_vertex>
|
|
@@ -3506,7 +3506,7 @@ void main() {
|
|
|
3506
3506
|
#include <worldpos_vertex>
|
|
3507
3507
|
#include <shadowmap_vertex>
|
|
3508
3508
|
#include <fog_vertex>
|
|
3509
|
-
}`,
|
|
3509
|
+
}`,Pp=`uniform vec3 color;
|
|
3510
3510
|
uniform float opacity;
|
|
3511
3511
|
#include <common>
|
|
3512
3512
|
#include <packing>
|
|
@@ -3546,7 +3546,7 @@ void main() {
|
|
|
3546
3546
|
#include <logdepthbuf_vertex>
|
|
3547
3547
|
#include <clipping_planes_vertex>
|
|
3548
3548
|
#include <fog_vertex>
|
|
3549
|
-
}`,
|
|
3549
|
+
}`,Np=`uniform vec3 diffuse;
|
|
3550
3550
|
uniform float opacity;
|
|
3551
3551
|
#include <common>
|
|
3552
3552
|
#include <uv_pars_fragment>
|
|
@@ -3571,7 +3571,7 @@ void main() {
|
|
|
3571
3571
|
#include <tonemapping_fragment>
|
|
3572
3572
|
#include <colorspace_fragment>
|
|
3573
3573
|
#include <fog_fragment>
|
|
3574
|
-
}`,Gt={alphahash_fragment:td,alphahash_pars_fragment:nd,alphamap_fragment:id,alphamap_pars_fragment:sd,alphatest_fragment:rd,alphatest_pars_fragment:ad,aomap_fragment:od,aomap_pars_fragment:ld,batching_pars_vertex:cd,batching_vertex:hd,begin_vertex:ud,beginnormal_vertex:dd,bsdfs:fd,iridescence_fragment:pd,bumpmap_pars_fragment:md,clipping_planes_fragment:gd,clipping_planes_pars_fragment:_d,clipping_planes_pars_vertex:vd,clipping_planes_vertex:yd,color_fragment:xd,color_pars_fragment:Md,color_pars_vertex:bd,color_vertex:Sd,common:Ed,cube_uv_reflection_fragment:Ad,defaultnormal_vertex:wd,displacementmap_pars_vertex:Td,displacementmap_vertex:Cd,emissivemap_fragment:Rd,emissivemap_pars_fragment:Dd,colorspace_fragment:Pd,colorspace_pars_fragment:Ld,envmap_fragment:Fd,envmap_common_pars_fragment:Ud,envmap_pars_fragment:Nd,envmap_pars_vertex:Id,envmap_physical_pars_fragment:qd,envmap_vertex:zd,fog_vertex:Bd,fog_pars_vertex:Od,fog_fragment:kd,fog_pars_fragment:Vd,gradientmap_pars_fragment:Hd,lightmap_pars_fragment:Gd,lights_lambert_fragment:Wd,lights_lambert_pars_fragment:Xd,lights_pars_begin:jd,lights_toon_fragment:$d,lights_toon_pars_fragment:Yd,lights_phong_fragment:Jd,lights_phong_pars_fragment:Kd,lights_physical_fragment:Zd,lights_physical_pars_fragment:Qd,lights_fragment_begin:ef,lights_fragment_maps:tf,lights_fragment_end:nf,logdepthbuf_fragment:sf,logdepthbuf_pars_fragment:rf,logdepthbuf_pars_vertex:af,logdepthbuf_vertex:of,map_fragment:lf,map_pars_fragment:cf,map_particle_fragment:hf,map_particle_pars_fragment:uf,metalnessmap_fragment:df,metalnessmap_pars_fragment:ff,morphinstance_vertex:pf,morphcolor_vertex:mf,morphnormal_vertex:gf,morphtarget_pars_vertex:_f,morphtarget_vertex:vf,normal_fragment_begin:yf,normal_fragment_maps:xf,normal_pars_fragment:Mf,normal_pars_vertex:bf,normal_vertex:Sf,normalmap_pars_fragment:Ef,clearcoat_normal_fragment_begin:Af,clearcoat_normal_fragment_maps:wf,clearcoat_pars_fragment:Tf,iridescence_pars_fragment:Cf,opaque_fragment:Rf,packing:Df,premultiplied_alpha_fragment:Pf,project_vertex:Lf,dithering_fragment:Ff,dithering_pars_fragment:Uf,roughnessmap_fragment:Nf,roughnessmap_pars_fragment:If,shadowmap_pars_fragment:zf,shadowmap_pars_vertex:Bf,shadowmap_vertex:Of,shadowmask_pars_fragment:kf,skinbase_vertex:Vf,skinning_pars_vertex:Hf,skinning_vertex:Gf,skinnormal_vertex:Wf,specularmap_fragment:Xf,specularmap_pars_fragment:jf,tonemapping_fragment:qf,tonemapping_pars_fragment:$f,transmission_fragment:Yf,transmission_pars_fragment:Jf,uv_pars_fragment:Kf,uv_pars_vertex:Zf,uv_vertex:Qf,worldpos_vertex:ep,background_vert:tp,background_frag:np,backgroundCube_vert:ip,backgroundCube_frag:sp,cube_vert:rp,cube_frag:ap,depth_vert:op,depth_frag:lp,distanceRGBA_vert:cp,distanceRGBA_frag:hp,equirect_vert:up,equirect_frag:dp,linedashed_vert:fp,linedashed_frag:pp,meshbasic_vert:mp,meshbasic_frag:gp,meshlambert_vert:_p,meshlambert_frag:vp,meshmatcap_vert:yp,meshmatcap_frag:xp,meshnormal_vert:Mp,meshnormal_frag:bp,meshphong_vert:Sp,meshphong_frag:Ep,meshphysical_vert:Ap,meshphysical_frag:wp,meshtoon_vert:Tp,meshtoon_frag:Cp,points_vert:Rp,points_frag:Dp,shadow_vert:Pp,shadow_frag:Lp,sprite_vert:Fp,sprite_frag:Up},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 Ze(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 Ze(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new kt},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0}}},Hn={basic:{uniforms:Bn([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Gt.meshbasic_vert,fragmentShader:Gt.meshbasic_frag},lambert:{uniforms:Bn([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:Gt.meshlambert_vert,fragmentShader:Gt.meshlambert_frag},phong:{uniforms:Bn([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:Gt.meshphong_vert,fragmentShader:Gt.meshphong_frag},standard:{uniforms:Bn([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:Gt.meshphysical_vert,fragmentShader:Gt.meshphysical_frag},toon:{uniforms:Bn([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:Gt.meshtoon_vert,fragmentShader:Gt.meshtoon_frag},matcap:{uniforms:Bn([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Gt.meshmatcap_vert,fragmentShader:Gt.meshmatcap_frag},points:{uniforms:Bn([Je.points,Je.fog]),vertexShader:Gt.points_vert,fragmentShader:Gt.points_frag},dashed:{uniforms:Bn([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Gt.linedashed_vert,fragmentShader:Gt.linedashed_frag},depth:{uniforms:Bn([Je.common,Je.displacementmap]),vertexShader:Gt.depth_vert,fragmentShader:Gt.depth_frag},normal:{uniforms:Bn([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Gt.meshnormal_vert,fragmentShader:Gt.meshnormal_frag},sprite:{uniforms:Bn([Je.sprite,Je.fog]),vertexShader:Gt.sprite_vert,fragmentShader:Gt.sprite_frag},background:{uniforms:{uvTransform:{value:new kt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Gt.background_vert,fragmentShader:Gt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new kt}},vertexShader:Gt.backgroundCube_vert,fragmentShader:Gt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Gt.cube_vert,fragmentShader:Gt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Gt.equirect_vert,fragmentShader:Gt.equirect_frag},distanceRGBA:{uniforms:Bn([Je.common,Je.displacementmap,{referencePosition:{value:new I},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Gt.distanceRGBA_vert,fragmentShader:Gt.distanceRGBA_frag},shadow:{uniforms:Bn([Je.lights,Je.fog,{color:{value:new Tt(0)},opacity:{value:1}}]),vertexShader:Gt.shadow_vert,fragmentShader:Gt.shadow_frag}};Hn.physical={uniforms:Bn([Hn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new kt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new kt},clearcoatNormalScale:{value:new Ze(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 Ze},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 Ze},anisotropyMap:{value:null},anisotropyMapTransform:{value:new kt}}]),vertexShader:Gt.meshphysical_vert,fragmentShader:Gt.meshphysical_frag};const na={r:0,b:0,g:0},ts=new Tn,Np=new Et;function Ip(s,e,t,n,i,r,a){const o=new Tt(0);let l=r===!0?0:1,c,d,m=null,u=0,h=null;function g(x){let b=x.isScene===!0?x.background:null;return b&&b.isTexture&&(b=(x.backgroundBlurriness>0?t:e).get(b)),b}function _(x){let b=!1;const F=g(x);F===null?f(o,l):F&&F.isColor&&(f(F,1),b=!0);const C=s.xr.getEnvironmentBlendMode();C==="additive"?n.buffers.color.setClear(0,0,0,1,a):C==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,a),(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 p(x,b){const F=g(b);F&&(F.isCubeTexture||F.mapping===Ua)?(d===void 0&&(d=new zt(new Yi(1,1,1),new Li({name:"BackgroundCubeMaterial",uniforms:qs(Hn.backgroundCube.uniforms),vertexShader:Hn.backgroundCube.vertexShader,fragmentShader:Hn.backgroundCube.fragmentShader,side:On,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(C,R,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),ts.copy(b.backgroundRotation),ts.x*=-1,ts.y*=-1,ts.z*=-1,F.isCubeTexture&&F.isRenderTargetTexture===!1&&(ts.y*=-1,ts.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=b.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Np.makeRotationFromEuler(ts)),d.material.toneMapped=Wt.getTransfer(F.colorSpace)!==on,(m!==F||u!==F.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=F,u=F.version,h=s.toneMapping),d.layers.enableAll(),x.unshift(d,d.geometry,d.material,0,0,null)):F&&F.isTexture&&(c===void 0&&(c=new zt(new Pi(2,2),new Li({name:"BackgroundMaterial",uniforms:qs(Hn.background.uniforms),vertexShader:Hn.background.vertexShader,fragmentShader:Hn.background.fragmentShader,side:ti,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=b.backgroundIntensity,c.material.toneMapped=Wt.getTransfer(F.colorSpace)!==on,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(),x.unshift(c,c.geometry,c.material,0,0,null))}function f(x,b){x.getRGB(na,N0(s)),n.buffers.color.setClear(na.r,na.g,na.b,b,a)}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 o},setClearColor:function(x,b=1){o.set(x),l=b,f(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,f(o,l)},render:_,addToRenderList:p,dispose:v}}function zp(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=u(null);let r=i,a=!1;function o(E,P,z,H,Q){let re=!1;const G=m(H,z,P);r!==G&&(r=G,c(r.object)),re=h(E,H,z,Q),re&&g(E,H,z,Q),Q!==null&&e.update(Q,s.ELEMENT_ARRAY_BUFFER),(re||a)&&(a=!1,b(E,P,z,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,P,z){const H=z.wireframe===!0;let Q=n[E.id];Q===void 0&&(Q={},n[E.id]=Q);let re=Q[P.id];re===void 0&&(re={},Q[P.id]=re);let G=re[H];return G===void 0&&(G=u(l()),re[H]=G),G}function u(E){const P=[],z=[],H=[];for(let Q=0;Q<t;Q++)P[Q]=0,z[Q]=0,H[Q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:P,enabledAttributes:z,attributeDivisors:H,object:E,attributes:{},index:null}}function h(E,P,z,H){const Q=r.attributes,re=P.attributes;let G=0;const le=z.getAttributes();for(const K in le)if(le[K].location>=0){const Me=Q[K];let ye=re[K];if(ye===void 0&&(K==="instanceMatrix"&&E.instanceMatrix&&(ye=E.instanceMatrix),K==="instanceColor"&&E.instanceColor&&(ye=E.instanceColor)),Me===void 0||Me.attribute!==ye||ye&&Me.data!==ye.data)return!0;G++}return r.attributesNum!==G||r.index!==H}function g(E,P,z,H){const Q={},re=P.attributes;let G=0;const le=z.getAttributes();for(const K in le)if(le[K].location>=0){let Me=re[K];Me===void 0&&(K==="instanceMatrix"&&E.instanceMatrix&&(Me=E.instanceMatrix),K==="instanceColor"&&E.instanceColor&&(Me=E.instanceColor));const ye={};ye.attribute=Me,Me&&Me.data&&(ye.data=Me.data),Q[K]=ye,G++}r.attributes=Q,r.attributesNum=G,r.index=H}function _(){const E=r.newAttributes;for(let P=0,z=E.length;P<z;P++)E[P]=0}function p(E){f(E,0)}function f(E,P){const z=r.newAttributes,H=r.enabledAttributes,Q=r.attributeDivisors;z[E]=1,H[E]===0&&(s.enableVertexAttribArray(E),H[E]=1),Q[E]!==P&&(s.vertexAttribDivisor(E,P),Q[E]=P)}function v(){const E=r.newAttributes,P=r.enabledAttributes;for(let z=0,H=P.length;z<H;z++)P[z]!==E[z]&&(s.disableVertexAttribArray(z),P[z]=0)}function x(E,P,z,H,Q,re,G){G===!0?s.vertexAttribIPointer(E,P,z,Q,re):s.vertexAttribPointer(E,P,z,H,Q,re)}function b(E,P,z,H){_();const Q=H.attributes,re=z.getAttributes(),G=P.defaultAttributeValues;for(const le in re){const K=re[le];if(K.location>=0){let pe=Q[le];if(pe===void 0&&(le==="instanceMatrix"&&E.instanceMatrix&&(pe=E.instanceMatrix),le==="instanceColor"&&E.instanceColor&&(pe=E.instanceColor)),pe!==void 0){const Me=pe.normalized,ye=pe.itemSize,de=e.get(pe);if(de===void 0)continue;const se=de.buffer,W=de.type,j=de.bytesPerElement,ne=W===s.INT||W===s.UNSIGNED_INT||pe.gpuType===Xl;if(pe.isInterleavedBufferAttribute){const ee=pe.data,ce=ee.stride,q=pe.offset;if(ee.isInstancedInterleavedBuffer){for(let he=0;he<K.locationSize;he++)f(K.location+he,ee.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let he=0;he<K.locationSize;he++)p(K.location+he);s.bindBuffer(s.ARRAY_BUFFER,se);for(let he=0;he<K.locationSize;he++)x(K.location+he,ye/K.locationSize,W,Me,ce*j,(q+ye/K.locationSize*he)*j,ne)}else{if(pe.isInstancedBufferAttribute){for(let ee=0;ee<K.locationSize;ee++)f(K.location+ee,pe.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=pe.meshPerAttribute*pe.count)}else for(let ee=0;ee<K.locationSize;ee++)p(K.location+ee);s.bindBuffer(s.ARRAY_BUFFER,se);for(let ee=0;ee<K.locationSize;ee++)x(K.location+ee,ye/K.locationSize,W,Me,ye*j,ye/K.locationSize*ee*j,ne)}}else if(G!==void 0){const Me=G[le];if(Me!==void 0)switch(Me.length){case 2:s.vertexAttrib2fv(K.location,Me);break;case 3:s.vertexAttrib3fv(K.location,Me);break;case 4:s.vertexAttrib4fv(K.location,Me);break;default:s.vertexAttrib1fv(K.location,Me)}}}}v()}function F(){L();for(const E in n){const P=n[E];for(const z in P){const H=P[z];for(const Q in H)d(H[Q].object),delete H[Q];delete P[z]}delete n[E]}}function C(E){if(n[E.id]===void 0)return;const P=n[E.id];for(const z in P){const H=P[z];for(const Q in H)d(H[Q].object),delete H[Q];delete P[z]}delete n[E.id]}function R(E){for(const P in n){const z=n[P];if(z[E.id]===void 0)continue;const H=z[E.id];for(const Q in H)d(H[Q].object),delete H[Q];delete z[E.id]}}function L(){A(),a=!0,r!==i&&(r=i,c(r.object))}function A(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:o,reset:L,resetDefaultState:A,dispose:F,releaseStatesOfGeometry:C,releaseStatesOfProgram:R,initAttributes:_,enableAttribute:p,disableUnusedAttributes:v}}function Bp(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 a(c,d,m){m!==0&&(s.drawArraysInstanced(n,c,d,m),t.update(d,n,m))}function o(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++)a(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=a,this.renderMultiDraw=o,this.renderMultiDrawInstances=l}function Op(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 a(R){return!(R!==ei&&n.convert(R)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function o(R){const L=R===Sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(R!==gi&&n.convert(R)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&R!==pi&&!L)}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),x=s.getParameter(s.MAX_VARYING_VECTORS),b=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),F=g>0,C=s.getParameter(s.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:a,textureTypeReadable:o,precision:c,logarithmicDepthBuffer:m,reverseDepthBuffer:u,maxTextures:h,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:v,maxVaryings:x,maxFragmentUniforms:b,vertexTextures:F,maxSamples:C}}function kp(s){const e=this;let t=null,n=0,i=!1,r=!1;const a=new Zn,o=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,x=v*4;let b=f.clippingState||null;l.value=b,b=d(g,u,x,h);for(let F=0;F!==x;++F)b[F]=t[F];f.clippingState=b,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;o.getNormalMatrix(v),(p===null||p.length<f)&&(p=new Float32Array(f));for(let x=0,b=h;x!==_;++x,b+=4)a.copy(m[x]).applyMatrix4(v,o),a.normal.toArray(p,b),p[b+3]=a.constant}l.value=p,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,p}}function Vp(s){let e=new WeakMap;function t(a,o){return o===Zo?a.mapping=Gs:o===Qo&&(a.mapping=Ws),a}function n(a){if(a&&a.isTexture){const o=a.mapping;if(o===Zo||o===Qo)if(e.has(a)){const l=e.get(a).texture;return t(l,a.mapping)}else{const l=a.image;if(l&&l.height>0){const c=new r1(l.height);return c.fromEquirectangularTexture(s,a),e.set(a,c),a.addEventListener("dispose",i),t(c.texture,a.mapping)}else return null}}return a}function i(a){const o=a.target;o.removeEventListener("dispose",i);const l=e.get(o);l!==void 0&&(e.delete(o),l.dispose())}function r(){e=new WeakMap}return{get:n,dispose:r}}const zs=4,xh=[.125,.215,.35,.446,.526,.582],os=20,Ao=new Ha,Mh=new Tt;let wo=null,To=0,Co=0,Ro=!1;const rs=(1+Math.sqrt(5))/2,Ls=1/rs,bh=[new I(-rs,Ls,0),new I(rs,Ls,0),new I(-Ls,0,rs),new I(Ls,0,rs),new I(0,rs,-Ls),new I(0,rs,Ls),new I(-1,1,-1),new I(1,1,-1),new I(-1,1,1),new I(1,1,1)],Hp=new I;class Sh{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:a=256,position:o=Hp}=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(a);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,i,l,o),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=wh(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Ah(),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:jn,minFilter:jn,generateMipmaps:!1,type:Sr,format:ei,colorSpace:Xs,depthBuffer:!1},i=Eh(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Eh(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=Gp(r)),this._blurMaterial=Wp(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 wn(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(Mh),m.toneMapping=ji,m.autoClear=!1;const g=new $i({name:"PMREM.Background",side:On,depthWrite:!1,depthTest:!1}),_=new zt(new Yi,g);let p=!1;const f=e.background;f?f.isColor&&(g.color.copy(f),e.background=null,p=!0):(g.color.copy(Mh),p=!0);for(let v=0;v<6;v++){const x=v%3;x===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)):x===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 b=this._cubeSize;ia(i,x*b,v>2?b:0,b,b),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=wh()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Ah());const r=i?this._cubemapMaterial:this._equirectMaterial,a=new zt(this._lodPlanes[0],r),o=r.uniforms;o.envMap.value=e;const l=this._cubeSize;ia(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(a,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 a=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),o=bh[(i-r-1)%bh.length];this._blur(e,r-1,r,a,o)}t.autoClear=n}_blur(e,t,n,i,r){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",r),this._halfBlur(a,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,a,o){const l=this._renderer,c=this._blurMaterial;a!=="latitudinal"&&a!=="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*os-1),_=r/g,p=isFinite(r)?1+Math.floor(d*_):os;p>os&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${os}`);const f=[];let v=0;for(let R=0;R<os;++R){const L=R/_,A=Math.exp(-L*L/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=a==="latitudinal",o&&(u.poleAxis.value=o);const{_lodMax:x}=this;u.dTheta.value=g,u.mipInt.value=x-n;const b=this._sizeLods[i],F=3*b*(i>x-zs?i-x+zs:0),C=4*(this._cubeSize-b);ia(t,F,C,3*b,2*b),l.setRenderTarget(t),l.render(m,Ao)}}function Gp(s){const e=[],t=[],n=[];let i=s;const r=s-zs+1+xh.length;for(let a=0;a<r;a++){const o=Math.pow(2,i);t.push(o);let l=1/o;a>s-zs?l=xh[a-s+zs-1]:a===0&&(l=0),n.push(l);const c=1/(o-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),x=new Float32Array(p*g*h),b=new Float32Array(f*g*h);for(let C=0;C<h;C++){const R=C%3*2/3-1,L=C>2?0:-1,A=[R,L,0,R+2/3,L,0,R+2/3,L+1,0,R,L,0,R+2/3,L+1,0,R,L+1,0];v.set(A,_*g*C),x.set(u,p*g*C);const E=[C,C,C,C,C,C];b.set(E,f*g*C)}const F=new hn;F.setAttribute("position",new _n(v,_)),F.setAttribute("uv",new _n(x,p)),F.setAttribute("faceIndex",new _n(b,f)),e.push(F),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Eh(s,e,t){const n=new ds(s,e,t);return n.texture.mapping=Ua,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 Wp(s,e,t){const n=new Float32Array(os),i=new I(0,1,0);return new Li({name:"SphericalGaussianBlur",defines:{n:os,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:dc(),fragmentShader:`
|
|
3574
|
+
}`,Vt={alphahash_fragment:td,alphahash_pars_fragment:nd,alphamap_fragment:id,alphamap_pars_fragment:sd,alphatest_fragment:rd,alphatest_pars_fragment:ad,aomap_fragment:od,aomap_pars_fragment:ld,batching_pars_vertex:cd,batching_vertex:hd,begin_vertex:ud,beginnormal_vertex:dd,bsdfs:fd,iridescence_fragment:pd,bumpmap_pars_fragment:md,clipping_planes_fragment:gd,clipping_planes_pars_fragment:_d,clipping_planes_pars_vertex:vd,clipping_planes_vertex:yd,color_fragment:xd,color_pars_fragment:Md,color_pars_vertex:bd,color_vertex:Sd,common:Ed,cube_uv_reflection_fragment:Ad,defaultnormal_vertex:wd,displacementmap_pars_vertex:Td,displacementmap_vertex:Cd,emissivemap_fragment:Rd,emissivemap_pars_fragment:Dd,colorspace_fragment:Ld,colorspace_pars_fragment:Pd,envmap_fragment:Fd,envmap_common_pars_fragment:Nd,envmap_pars_fragment:Ud,envmap_pars_vertex:Id,envmap_physical_pars_fragment:qd,envmap_vertex:zd,fog_vertex:Bd,fog_pars_vertex:Od,fog_fragment:kd,fog_pars_fragment:Vd,gradientmap_pars_fragment:Hd,lightmap_pars_fragment:Gd,lights_lambert_fragment:Wd,lights_lambert_pars_fragment:Xd,lights_pars_begin:jd,lights_toon_fragment:$d,lights_toon_pars_fragment:Yd,lights_phong_fragment:Jd,lights_phong_pars_fragment:Kd,lights_physical_fragment:Zd,lights_physical_pars_fragment:Qd,lights_fragment_begin:ef,lights_fragment_maps:tf,lights_fragment_end:nf,logdepthbuf_fragment:sf,logdepthbuf_pars_fragment:rf,logdepthbuf_pars_vertex:af,logdepthbuf_vertex:of,map_fragment:lf,map_pars_fragment:cf,map_particle_fragment:hf,map_particle_pars_fragment:uf,metalnessmap_fragment:df,metalnessmap_pars_fragment:ff,morphinstance_vertex:pf,morphcolor_vertex:mf,morphnormal_vertex:gf,morphtarget_pars_vertex:_f,morphtarget_vertex:vf,normal_fragment_begin:yf,normal_fragment_maps:xf,normal_pars_fragment:Mf,normal_pars_vertex:bf,normal_vertex:Sf,normalmap_pars_fragment:Ef,clearcoat_normal_fragment_begin:Af,clearcoat_normal_fragment_maps:wf,clearcoat_pars_fragment:Tf,iridescence_pars_fragment:Cf,opaque_fragment:Rf,packing:Df,premultiplied_alpha_fragment:Lf,project_vertex:Pf,dithering_fragment:Ff,dithering_pars_fragment:Nf,roughnessmap_fragment:Uf,roughnessmap_pars_fragment:If,shadowmap_pars_fragment:zf,shadowmap_pars_vertex:Bf,shadowmap_vertex:Of,shadowmask_pars_fragment:kf,skinbase_vertex:Vf,skinning_pars_vertex:Hf,skinning_vertex:Gf,skinnormal_vertex:Wf,specularmap_fragment:Xf,specularmap_pars_fragment:jf,tonemapping_fragment:qf,tonemapping_pars_fragment:$f,transmission_fragment:Yf,transmission_pars_fragment:Jf,uv_pars_fragment:Kf,uv_pars_vertex:Zf,uv_vertex:Qf,worldpos_vertex:ep,background_vert:tp,background_frag:np,backgroundCube_vert:ip,backgroundCube_frag:sp,cube_vert:rp,cube_frag:ap,depth_vert:op,depth_frag:lp,distanceRGBA_vert:cp,distanceRGBA_frag:hp,equirect_vert:up,equirect_frag:dp,linedashed_vert:fp,linedashed_frag:pp,meshbasic_vert:mp,meshbasic_frag:gp,meshlambert_vert:_p,meshlambert_frag:vp,meshmatcap_vert:yp,meshmatcap_frag:xp,meshnormal_vert:Mp,meshnormal_frag:bp,meshphong_vert:Sp,meshphong_frag:Ep,meshphysical_vert:Ap,meshphysical_frag:wp,meshtoon_vert:Tp,meshtoon_frag:Cp,points_vert:Rp,points_frag:Dp,shadow_vert:Lp,shadow_frag:Pp,sprite_vert:Fp,sprite_frag:Np},Ke={common:{diffuse:{value:new Tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ot}},envmap:{envMap:{value:null},envMapRotation:{value:new Ot},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ot}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ot}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ot},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ot},normalScale:{value:new et(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ot},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ot}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ot}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ot}},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 Ot},alphaTest:{value:0},uvTransform:{value:new Ot}},sprite:{diffuse:{value:new Tt(16777215)},opacity:{value:1},center:{value:new et(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}}},Vn={basic:{uniforms:In([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.fog]),vertexShader:Vt.meshbasic_vert,fragmentShader:Vt.meshbasic_frag},lambert:{uniforms:In([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Vt.meshlambert_vert,fragmentShader:Vt.meshlambert_frag},phong:{uniforms:In([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)},specular:{value:new Tt(1118481)},shininess:{value:30}}]),vertexShader:Vt.meshphong_vert,fragmentShader:Vt.meshphong_frag},standard:{uniforms:In([Ke.common,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.roughnessmap,Ke.metalnessmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Vt.meshphysical_vert,fragmentShader:Vt.meshphysical_frag},toon:{uniforms:In([Ke.common,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.gradientmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Vt.meshtoon_vert,fragmentShader:Vt.meshtoon_frag},matcap:{uniforms:In([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,{matcap:{value:null}}]),vertexShader:Vt.meshmatcap_vert,fragmentShader:Vt.meshmatcap_frag},points:{uniforms:In([Ke.points,Ke.fog]),vertexShader:Vt.points_vert,fragmentShader:Vt.points_frag},dashed:{uniforms:In([Ke.common,Ke.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Vt.linedashed_vert,fragmentShader:Vt.linedashed_frag},depth:{uniforms:In([Ke.common,Ke.displacementmap]),vertexShader:Vt.depth_vert,fragmentShader:Vt.depth_frag},normal:{uniforms:In([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,{opacity:{value:1}}]),vertexShader:Vt.meshnormal_vert,fragmentShader:Vt.meshnormal_frag},sprite:{uniforms:In([Ke.sprite,Ke.fog]),vertexShader:Vt.sprite_vert,fragmentShader:Vt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ot},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Vt.background_vert,fragmentShader:Vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ot}},vertexShader:Vt.backgroundCube_vert,fragmentShader:Vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Vt.cube_vert,fragmentShader:Vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Vt.equirect_vert,fragmentShader:Vt.equirect_frag},distanceRGBA:{uniforms:In([Ke.common,Ke.displacementmap,{referencePosition:{value:new I},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Vt.distanceRGBA_vert,fragmentShader:Vt.distanceRGBA_frag},shadow:{uniforms:In([Ke.lights,Ke.fog,{color:{value:new Tt(0)},opacity:{value:1}}]),vertexShader:Vt.shadow_vert,fragmentShader:Vt.shadow_frag}};Vn.physical={uniforms:In([Vn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ot},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ot},clearcoatNormalScale:{value:new et(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ot},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ot},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ot},sheen:{value:0},sheenColor:{value:new Tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ot},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ot},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ot},transmissionSamplerSize:{value:new et},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ot},attenuationDistance:{value:0},attenuationColor:{value:new Tt(0)},specularColor:{value:new Tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ot},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ot},anisotropyVector:{value:new et},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ot}}]),vertexShader:Vt.meshphysical_vert,fragmentShader:Vt.meshphysical_frag};const na={r:0,b:0,g:0},es=new En,Up=new At;function Ip(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(x){let S=x.isScene===!0?x.background:null;return S&&S.isTexture&&(S=(x.backgroundBlurriness>0?t:e).get(S)),S}function _(x){let S=!1;const F=g(x);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(x,S){const F=g(S);F&&(F.isCubeTexture||F.mapping===Na)?(d===void 0&&(d=new Bt(new $i(1,1,1),new Li({name:"BackgroundCubeMaterial",uniforms:qs(Vn.backgroundCube.uniforms),vertexShader:Vn.backgroundCube.vertexShader,fragmentShader:Vn.backgroundCube.fragmentShader,side:zn,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(Up.makeRotationFromEuler(es)),d.material.toneMapped=Ht.getTransfer(F.colorSpace)!==on,(m!==F||u!==F.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=F,u=F.version,h=s.toneMapping),d.layers.enableAll(),x.unshift(d,d.geometry,d.material,0,0,null)):F&&F.isTexture&&(c===void 0&&(c=new Bt(new Di(2,2),new Li({name:"BackgroundMaterial",uniforms:qs(Vn.background.uniforms),vertexShader:Vn.background.vertexShader,fragmentShader:Vn.background.fragmentShader,side:ei,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=Ht.getTransfer(F.colorSpace)!==on,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(),x.unshift(c,c.geometry,c.material,0,0,null))}function f(x,S){x.getRGB(na,U0(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(x,S=1){a.set(x),l=S,f(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,f(a,l)},render:_,addToRenderList:p,dispose:v}}function zp(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=u(null);let r=i,o=!1;function a(E,L,z,H,Q){let re=!1;const G=m(H,z,L);r!==G&&(r=G,c(r.object)),re=h(E,H,z,Q),re&&g(E,H,z,Q),Q!==null&&e.update(Q,s.ELEMENT_ARRAY_BUFFER),(re||o)&&(o=!1,S(E,L,z,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,z){const H=z.wireframe===!0;let Q=n[E.id];Q===void 0&&(Q={},n[E.id]=Q);let re=Q[L.id];re===void 0&&(re={},Q[L.id]=re);let G=re[H];return G===void 0&&(G=u(l()),re[H]=G),G}function u(E){const L=[],z=[],H=[];for(let Q=0;Q<t;Q++)L[Q]=0,z[Q]=0,H[Q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:z,attributeDivisors:H,object:E,attributes:{},index:null}}function h(E,L,z,H){const Q=r.attributes,re=L.attributes;let G=0;const le=z.getAttributes();for(const Z in le)if(le[Z].location>=0){const Ee=Q[Z];let Me=re[Z];if(Me===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(Me=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(Me=E.instanceColor)),Ee===void 0||Ee.attribute!==Me||Me&&Ee.data!==Me.data)return!0;G++}return r.attributesNum!==G||r.index!==H}function g(E,L,z,H){const Q={},re=L.attributes;let G=0;const le=z.getAttributes();for(const Z in le)if(le[Z].location>=0){let Ee=re[Z];Ee===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(Ee=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(Ee=E.instanceColor));const Me={};Me.attribute=Ee,Ee&&Ee.data&&(Me.data=Ee.data),Q[Z]=Me,G++}r.attributes=Q,r.attributesNum=G,r.index=H}function _(){const E=r.newAttributes;for(let L=0,z=E.length;L<z;L++)E[L]=0}function p(E){f(E,0)}function f(E,L){const z=r.newAttributes,H=r.enabledAttributes,Q=r.attributeDivisors;z[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 z=0,H=L.length;z<H;z++)L[z]!==E[z]&&(s.disableVertexAttribArray(z),L[z]=0)}function x(E,L,z,H,Q,re,G){G===!0?s.vertexAttribIPointer(E,L,z,Q,re):s.vertexAttribPointer(E,L,z,H,Q,re)}function S(E,L,z,H){_();const Q=H.attributes,re=z.getAttributes(),G=L.defaultAttributeValues;for(const le in re){const Z=re[le];if(Z.location>=0){let _e=Q[le];if(_e===void 0&&(le==="instanceMatrix"&&E.instanceMatrix&&(_e=E.instanceMatrix),le==="instanceColor"&&E.instanceColor&&(_e=E.instanceColor)),_e!==void 0){const Ee=_e.normalized,Me=_e.itemSize,me=e.get(_e);if(me===void 0)continue;const se=me.buffer,j=me.type,q=me.bytesPerElement,ie=j===s.INT||j===s.UNSIGNED_INT||_e.gpuType===Xl;if(_e.isInterleavedBufferAttribute){const ee=_e.data,ue=ee.stride,J=_e.offset;if(ee.isInstancedInterleavedBuffer){for(let de=0;de<Z.locationSize;de++)f(Z.location+de,ee.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let de=0;de<Z.locationSize;de++)p(Z.location+de);s.bindBuffer(s.ARRAY_BUFFER,se);for(let de=0;de<Z.locationSize;de++)x(Z.location+de,Me/Z.locationSize,j,Ee,ue*q,(J+Me/Z.locationSize*de)*q,ie)}else{if(_e.isInstancedBufferAttribute){for(let ee=0;ee<Z.locationSize;ee++)f(Z.location+ee,_e.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=_e.meshPerAttribute*_e.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++)x(Z.location+ee,Me/Z.locationSize,j,Ee,Me*q,Me/Z.locationSize*ee*q,ie)}}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 z in L){const H=L[z];for(const Q in H)d(H[Q].object),delete H[Q];delete L[z]}delete n[E]}}function C(E){if(n[E.id]===void 0)return;const L=n[E.id];for(const z in L){const H=L[z];for(const Q in H)d(H[Q].object),delete H[Q];delete L[z]}delete n[E.id]}function R(E){for(const L in n){const z=n[L];if(z[E.id]===void 0)continue;const H=z[E.id];for(const Q in H)d(H[Q].object),delete H[Q];delete z[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 Bp(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 Op(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!==Qn&&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),x=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:x,maxFragmentUniforms:S,vertexTextures:F,maxSamples:C}}function kp(s){const e=this;let t=null,n=0,i=!1,r=!1;const o=new Kn,a=new Ot,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,x=v*4;let S=f.clippingState||null;l.value=S,S=d(g,u,x,h);for(let F=0;F!==x;++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 x=0,S=h;x!==_;++x,S+=4)o.copy(m[x]).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 Vp(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 r1(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,xh=[.125,.215,.35,.446,.526,.582],as=20,Ao=new Ha,Mh=new Tt;let wo=null,To=0,Co=0,Ro=!1;const ss=(1+Math.sqrt(5))/2,Ps=1/ss,bh=[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)],Hp=new I;class Sh{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=Hp}=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=wh(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Ah(),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:jn,minFilter:jn,generateMipmaps:!1,type:Sr,format:Qn,colorSpace:Xs,depthBuffer:!1},i=Eh(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Eh(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=Gp(r)),this._blurMaterial=Wp(r,e,t)}return i}_compileMaterial(e){const t=new Bt(this._lodPlanes[0],e);this._renderer.compile(t,Ao)}_sceneToCubeUV(e,t,n,i,r){const l=new Sn(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(Mh),m.toneMapping=Xi,m.autoClear=!1;const g=new qi({name:"PMREM.Background",side:zn,depthWrite:!1,depthTest:!1}),_=new Bt(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(Mh),p=!0);for(let v=0;v<6;v++){const x=v%3;x===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)):x===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,x*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=wh()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Ah());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new Bt(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=bh[(i-r-1)%bh.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 Bt(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:x}=this;u.dTheta.value=g,u.mipInt.value=x-n;const S=this._sizeLods[i],F=3*S*(i>x-zs?i-x+zs:0),C=4*(this._cubeSize-S);ia(t,F,C,3*S,2*S),l.setRenderTarget(t),l.render(m,Ao)}}function Gp(s){const e=[],t=[],n=[];let i=s;const r=s-zs+1+xh.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=xh[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),x=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),x.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 _n(v,_)),F.setAttribute("uv",new _n(x,p)),F.setAttribute("faceIndex",new _n(S,f)),e.push(F),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Eh(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 Wp(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:dc(),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:Wi,depthTest:!1,depthWrite:!1})}function Ah(){return new Li({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:dc(),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:Wi,depthTest:!1,depthWrite:!1})}function wh(){return new Li({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:dc(),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:Wi,depthTest:!1,depthWrite:!1})}function dc(){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 Xp(s){let e=new WeakMap,t=null;function n(o){if(o&&o.isTexture){const l=o.mapping,c=l===Zo||l===Qo,d=l===Gs||l===Ws;if(c||d){let m=e.get(o);const u=m!==void 0?m.texture.pmremVersion:0;if(o.isRenderTargetTexture&&o.pmremVersion!==u)return t===null&&(t=new Sh(s)),m=c?t.fromEquirectangular(o,m):t.fromCubemap(o,m),m.texture.pmremVersion=o.pmremVersion,e.set(o,m),m.texture;if(m!==void 0)return m.texture;{const h=o.image;return c&&h&&h.height>0||d&&h&&i(h)?(t===null&&(t=new Sh(s)),m=c?t.fromEquirectangular(o):t.fromCubemap(o),m.texture.pmremVersion=o.pmremVersion,e.set(o,m),o.addEventListener("dispose",r),m.texture):null}}}return o}function i(o){let l=0;const c=6;for(let d=0;d<c;d++)o[d]!==void 0&&l++;return l===c}function r(o){const l=o.target;l.removeEventListener("dispose",r);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function a(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:a}}function jp(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 qp(s,e,t,n){const i={},r=new WeakMap;function a(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",a),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 o(m,u){return i[u.id]===!0||(u.addEventListener("dispose",a),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 x=0,b=v.length;x<b;x+=3){const F=v[x+0],C=v[x+1],R=v[x+2];u.push(F,C,C,R,R,F)}}else if(g!==void 0){const v=g.array;_=g.version;for(let x=0,b=v.length/3-1;x<b;x+=3){const F=x+0,C=x+1,R=x+2;u.push(F,C,C,R,R,F)}}else return;const p=new(D0(u)?U0:F0)(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:o,update:l,getWireframeAttribute:d}}function $p(s,e,t){let n;function i(u){n=u}let r,a;function o(u){r=u.type,a=u.bytesPerElement}function l(u,h){s.drawElements(n,h,r,u*a),t.update(h,n,1)}function c(u,h,g){g!==0&&(s.drawElementsInstanced(n,h,r,u*a,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]/a,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=o,this.render=l,this.renderInstances=c,this.renderMultiDraw=d,this.renderMultiDrawInstances=m}function Yp(s){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(r,a,o){switch(t.calls++,a){case s.TRIANGLES:t.triangles+=o*(r/3);break;case s.LINES:t.lines+=o*(r/2);break;case s.LINE_STRIP:t.lines+=o*(r-1);break;case s.LINE_LOOP:t.lines+=o*r;break;case s.POINTS:t.points+=o*r;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",a);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 Jp(s,e,t){const n=new WeakMap,i=new qt;function r(a,o,l){const c=a.morphTargetInfluences,d=o.morphAttributes.position||o.morphAttributes.normal||o.morphAttributes.color,m=d!==void 0?d.length:0;let u=n.get(o);if(u===void 0||u.count!==m){let A=function(){R.dispose(),n.delete(o),o.removeEventListener("dispose",A)};u!==void 0&&u.texture.dispose();const h=o.morphAttributes.position!==void 0,g=o.morphAttributes.normal!==void 0,_=o.morphAttributes.color!==void 0,p=o.morphAttributes.position||[],f=o.morphAttributes.normal||[],v=o.morphAttributes.color||[];let x=0;h===!0&&(x=1),g===!0&&(x=2),_===!0&&(x=3);let b=o.attributes.position.count*x,F=1;b>e.maxTextureSize&&(F=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const C=new Float32Array(b*F*4*m),R=new P0(C,b,F,m);R.type=pi,R.needsUpdate=!0;const L=x*4;for(let E=0;E<m;E++){const P=p[E],z=f[E],H=v[E],Q=b*F*4*E;for(let re=0;re<P.count;re++){const G=re*L;h===!0&&(i.fromBufferAttribute(P,re),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(z,re),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,re),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 Ze(b,F)},n.set(o,u),o.addEventListener("dispose",A)}if(a.isInstancedMesh===!0&&a.morphTexture!==null)l.getUniforms().setValue(s,"morphTexture",a.morphTexture,t);else{let h=0;for(let _=0;_<c.length;_++)h+=c[_];const g=o.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",o)===!1&&l.addEventListener("dispose",o),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 a(){i=new WeakMap}function o(l){const c=l.target;c.removeEventListener("dispose",o),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:r,dispose:a}}const eu=new Pn,Th=new G0(1,1),tu=new P0,nu=new H2,iu=new z0,Ch=[],Rh=[],Dh=new Float32Array(16),Ph=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=Ch[i];if(r===void 0&&(r=new Float32Array(i),Ch[i]=r),e!==0){n.toArray(r,0);for(let a=1,o=0;a!==e;++a)o+=t,s[a].toArray(r,o)}return r}function Mn(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 bn(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Ga(s,e){let t=Rh[e];t===void 0&&(t=new Int32Array(e),Rh[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function Zp(s,e){const t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function Qp(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(Mn(t,e))return;s.uniform2fv(this.addr,e),bn(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)&&(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(Mn(t,e))return;s.uniform3fv(this.addr,e),bn(t,e)}}function tm(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(Mn(t,e))return;s.uniform4fv(this.addr,e),bn(t,e)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(Mn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),bn(t,e)}else{if(Mn(t,n))return;Lh.set(n),s.uniformMatrix2fv(this.addr,!1,Lh),bn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(Mn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),bn(t,e)}else{if(Mn(t,n))return;Ph.set(n),s.uniformMatrix3fv(this.addr,!1,Ph),bn(t,n)}}function sm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(Mn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),bn(t,e)}else{if(Mn(t,n))return;Dh.set(n),s.uniformMatrix4fv(this.addr,!1,Dh),bn(t,n)}}function rm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function am(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(Mn(t,e))return;s.uniform2iv(this.addr,e),bn(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)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(Mn(t,e))return;s.uniform3iv(this.addr,e),bn(t,e)}}function lm(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(Mn(t,e))return;s.uniform4iv(this.addr,e),bn(t,e)}}function cm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function hm(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(Mn(t,e))return;s.uniform2uiv(this.addr,e),bn(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)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(Mn(t,e))return;s.uniform3uiv(this.addr,e),bn(t,e)}}function dm(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(Mn(t,e))return;s.uniform4uiv(this.addr,e),bn(t,e)}}function fm(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?(Th.compareFunction=R0,r=Th):r=eu,t.setTexture2D(e||r,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.setTexture3D(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.setTextureCube(e||iu,i)}function gm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||tu,i)}function _m(s){switch(s){case 5126:return Zp;case 35664:return Qp;case 35665:return em;case 35666:return tm;case 35674:return nm;case 35675:return im;case 35676:return sm;case 5124:case 35670:return rm;case 35667:case 35671:return am;case 35668:case 35672:return om;case 35669:case 35673:return lm;case 5125:return cm;case 36294:return hm;case 36295:return um;case 36296:return dm;case 35678:case 36198:case 36298:case 36306:case 35682:return fm;case 35679:case 36299:case 36307:return pm;case 35680:case 36300:case 36308:case 36293:return mm;case 36289:case 36303:case 36311:case 36292:return gm}}function vm(s,e){s.uniform1fv(this.addr,e)}function ym(s,e){const t=Qs(e,this.size,2);s.uniform2fv(this.addr,t)}function xm(s,e){const t=Qs(e,this.size,3);s.uniform3fv(this.addr,t)}function Mm(s,e){const t=Qs(e,this.size,4);s.uniform4fv(this.addr,t)}function bm(s,e){const t=Qs(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function Sm(s,e){const t=Qs(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function Em(s,e){const t=Qs(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function Am(s,e){s.uniform1iv(this.addr,e)}function wm(s,e){s.uniform2iv(this.addr,e)}function Tm(s,e){s.uniform3iv(this.addr,e)}function Cm(s,e){s.uniform4iv(this.addr,e)}function Rm(s,e){s.uniform1uiv(this.addr,e)}function Dm(s,e){s.uniform2uiv(this.addr,e)}function Pm(s,e){s.uniform3uiv(this.addr,e)}function Lm(s,e){s.uniform4uiv(this.addr,e)}function Fm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);Mn(n,r)||(s.uniform1iv(this.addr,r),bn(n,r));for(let a=0;a!==i;++a)t.setTexture2D(e[a]||eu,r[a])}function Um(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);Mn(n,r)||(s.uniform1iv(this.addr,r),bn(n,r));for(let a=0;a!==i;++a)t.setTexture3D(e[a]||nu,r[a])}function Nm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);Mn(n,r)||(s.uniform1iv(this.addr,r),bn(n,r));for(let a=0;a!==i;++a)t.setTextureCube(e[a]||iu,r[a])}function Im(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);Mn(n,r)||(s.uniform1iv(this.addr,r),bn(n,r));for(let a=0;a!==i;++a)t.setTexture2DArray(e[a]||tu,r[a])}function zm(s){switch(s){case 5126:return vm;case 35664:return ym;case 35665:return xm;case 35666:return Mm;case 35674:return bm;case 35675:return Sm;case 35676:return Em;case 5124:case 35670:return Am;case 35667:case 35671:return wm;case 35668:case 35672:return Tm;case 35669:case 35673:return Cm;case 5125:return Rm;case 36294:return Dm;case 36295:return Pm;case 36296:return Lm;case 35678:case 36198:case 36298:case 36306:case 35682:return Fm;case 35679:case 36299:case 36307:return Um;case 35680:case 36300:case 36308:case 36293:return Nm;case 36289:case 36303:case 36311:case 36292:return Im}}class Bm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=_m(t.type)}}class Om{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=zm(t.type)}}class km{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,a=i.length;r!==a;++r){const o=i[r];o.setValue(e,t[o.id],n)}}}const Do=/(\w+)(\])?(\[|\.)?/g;function Fh(s,e){s.seq.push(e),s.map[e.id]=e}function Vm(s,e,t){const n=s.name,i=n.length;for(Do.lastIndex=0;;){const r=Do.exec(n),a=Do.lastIndex;let o=r[1];const l=r[2]==="]",c=r[3];if(l&&(o=o|0),c===void 0||c==="["&&a+2===i){Fh(t,c===void 0?new Bm(o,s,e):new Om(o,s,e));break}else{let m=t.map[o];m===void 0&&(m=new km(o),Fh(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),a=e.getUniformLocation(t,r.name);Vm(r,a,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,a=t.length;r!==a;++r){const o=t[r],l=n[o.id];l.needsUpdate!==!1&&o.setValue(e,l.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const a=e[i];a.id in t&&n.push(a)}return n}}function Uh(s,e,t){const n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}const Hm=37297;let Gm=0;function Wm(s,e){const t=s.split(`
|
|
3725
|
-
`),n=[],i=Math.max(e-6,0),r=Math.min(e+6,t.length);for(let
|
|
3726
|
-
`)}const
|
|
3724
|
+
`}function Xp(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 Sh(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 Sh(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 jp(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 qp(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 x=0,S=v.length;x<S;x+=3){const F=v[x+0],C=v[x+1],R=v[x+2];u.push(F,C,C,R,R,F)}}else if(g!==void 0){const v=g.array;_=g.version;for(let x=0,S=v.length/3-1;x<S;x+=3){const F=x+0,C=x+1,R=x+2;u.push(F,C,C,R,R,F)}}else return;const p=new(D0(u)?N0:F0)(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 $p(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 Yp(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 Jp(s,e,t){const n=new WeakMap,i=new Gt;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 x=0;h===!0&&(x=1),g===!0&&(x=2),_===!0&&(x=3);let S=a.attributes.position.count*x,F=1;S>e.maxTextureSize&&(F=Math.ceil(S/e.maxTextureSize),S=e.maxTextureSize);const C=new Float32Array(S*F*4*m),R=new L0(C,S,F,m);R.type=fi,R.needsUpdate=!0;const P=x*4;for(let E=0;E<m;E++){const L=p[E],z=f[E],H=v[E],Q=S*F*4*E;for(let re=0;re<L.count;re++){const G=re*P;h===!0&&(i.fromBufferAttribute(L,re),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(z,re),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,re),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 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 eu=new Cn,Th=new G0(1,1),tu=new L0,nu=new H2,iu=new z0,Ch=[],Rh=[],Dh=new Float32Array(16),Lh=new Float32Array(9),Ph=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=Ch[i];if(r===void 0&&(r=new Float32Array(i),Ch[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 xn(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 Mn(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Ga(s,e){let t=Rh[e];t===void 0&&(t=new Int32Array(e),Rh[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function Zp(s,e){const t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function Qp(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(xn(t,e))return;s.uniform2fv(this.addr,e),Mn(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)&&(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(xn(t,e))return;s.uniform3fv(this.addr,e),Mn(t,e)}}function tm(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(xn(t,e))return;s.uniform4fv(this.addr,e),Mn(t,e)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(xn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),Mn(t,e)}else{if(xn(t,n))return;Ph.set(n),s.uniformMatrix2fv(this.addr,!1,Ph),Mn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(xn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),Mn(t,e)}else{if(xn(t,n))return;Lh.set(n),s.uniformMatrix3fv(this.addr,!1,Lh),Mn(t,n)}}function sm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(xn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),Mn(t,e)}else{if(xn(t,n))return;Dh.set(n),s.uniformMatrix4fv(this.addr,!1,Dh),Mn(t,n)}}function rm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function am(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(xn(t,e))return;s.uniform2iv(this.addr,e),Mn(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)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(xn(t,e))return;s.uniform3iv(this.addr,e),Mn(t,e)}}function lm(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(xn(t,e))return;s.uniform4iv(this.addr,e),Mn(t,e)}}function cm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function hm(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(xn(t,e))return;s.uniform2uiv(this.addr,e),Mn(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)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(xn(t,e))return;s.uniform3uiv(this.addr,e),Mn(t,e)}}function dm(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(xn(t,e))return;s.uniform4uiv(this.addr,e),Mn(t,e)}}function fm(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?(Th.compareFunction=R0,r=Th):r=eu,t.setTexture2D(e||r,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.setTexture3D(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.setTextureCube(e||iu,i)}function gm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||tu,i)}function _m(s){switch(s){case 5126:return Zp;case 35664:return Qp;case 35665:return em;case 35666:return tm;case 35674:return nm;case 35675:return im;case 35676:return sm;case 5124:case 35670:return rm;case 35667:case 35671:return am;case 35668:case 35672:return om;case 35669:case 35673:return lm;case 5125:return cm;case 36294:return hm;case 36295:return um;case 36296:return dm;case 35678:case 36198:case 36298:case 36306:case 35682:return fm;case 35679:case 36299:case 36307:return pm;case 35680:case 36300:case 36308:case 36293:return mm;case 36289:case 36303:case 36311:case 36292:return gm}}function vm(s,e){s.uniform1fv(this.addr,e)}function ym(s,e){const t=Qs(e,this.size,2);s.uniform2fv(this.addr,t)}function xm(s,e){const t=Qs(e,this.size,3);s.uniform3fv(this.addr,t)}function Mm(s,e){const t=Qs(e,this.size,4);s.uniform4fv(this.addr,t)}function bm(s,e){const t=Qs(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function Sm(s,e){const t=Qs(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function Em(s,e){const t=Qs(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function Am(s,e){s.uniform1iv(this.addr,e)}function wm(s,e){s.uniform2iv(this.addr,e)}function Tm(s,e){s.uniform3iv(this.addr,e)}function Cm(s,e){s.uniform4iv(this.addr,e)}function Rm(s,e){s.uniform1uiv(this.addr,e)}function Dm(s,e){s.uniform2uiv(this.addr,e)}function Lm(s,e){s.uniform3uiv(this.addr,e)}function Pm(s,e){s.uniform4uiv(this.addr,e)}function Fm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);xn(n,r)||(s.uniform1iv(this.addr,r),Mn(n,r));for(let o=0;o!==i;++o)t.setTexture2D(e[o]||eu,r[o])}function Nm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);xn(n,r)||(s.uniform1iv(this.addr,r),Mn(n,r));for(let o=0;o!==i;++o)t.setTexture3D(e[o]||nu,r[o])}function Um(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);xn(n,r)||(s.uniform1iv(this.addr,r),Mn(n,r));for(let o=0;o!==i;++o)t.setTextureCube(e[o]||iu,r[o])}function Im(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);xn(n,r)||(s.uniform1iv(this.addr,r),Mn(n,r));for(let o=0;o!==i;++o)t.setTexture2DArray(e[o]||tu,r[o])}function zm(s){switch(s){case 5126:return vm;case 35664:return ym;case 35665:return xm;case 35666:return Mm;case 35674:return bm;case 35675:return Sm;case 35676:return Em;case 5124:case 35670:return Am;case 35667:case 35671:return wm;case 35668:case 35672:return Tm;case 35669:case 35673:return Cm;case 5125:return Rm;case 36294:return Dm;case 36295:return Lm;case 36296:return Pm;case 35678:case 36198:case 36298:case 36306:case 35682:return Fm;case 35679:case 36299:case 36307:return Nm;case 35680:case 36300:case 36308:case 36293:return Um;case 36289:case 36303:case 36311:case 36292:return Im}}class Bm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=_m(t.type)}}class Om{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=zm(t.type)}}class km{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 Fh(s,e){s.seq.push(e),s.map[e.id]=e}function Vm(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){Fh(t,c===void 0?new Bm(a,s,e):new Om(a,s,e));break}else{let m=t.map[a];m===void 0&&(m=new km(a),Fh(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);Vm(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 Nh(s,e,t){const n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}const Hm=37297;let Gm=0;function Wm(s,e){const t=s.split(`
|
|
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 Uh=new Ot;function Xm(s){Ht._getMatrix(Uh,Ht.workingColorSpace,s);const e=`mat3( ${Uh.elements.map(t=>t.toFixed(4))} )`;switch(Ht.getTransfer(s)){case Aa:return[e,"LinearTransferOETF"];case on:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",s),[e,"LinearTransferOETF"]}}function Ih(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
|
-
`+Wm(s.getShaderSource(e),
|
|
3731
|
-
`)}function qm(s,e){let t;switch(e){case Zu:t="Linear";break;case Qu:t="Reinhard";break;case e2:t="Cineon";break;case Wl:t="ACESFilmic";break;case n2:t="AgX";break;case i2:t="Neutral";break;case t2: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 I;function $m(){
|
|
3730
|
+
`+Wm(s.getShaderSource(e),o)}else return i}function jm(s,e){const t=Xm(e);return[`vec4 ${s}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(`
|
|
3731
|
+
`)}function qm(s,e){let t;switch(e){case Zu:t="Linear";break;case Qu:t="Reinhard";break;case e2:t="Cineon";break;case Wl:t="ACESFilmic";break;case n2:t="AgX";break;case i2:t="Neutral";break;case t2: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 I;function $m(){Ht.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 Ym(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 Jm(s){const e=[];for(const t in s){const n=s[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(`
|
|
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),
|
|
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 zh(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 Bh(s,e){return s.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Zm=/^[ \t]*#include +<([\w\d./]+)>/gm;function Fl(s){return s.replace(Zm,e3)}const Qm=new Map;function e3(s,e){let t=Vt[e];if(t===void 0){const n=Qm.get(e);if(n!==void 0)t=Vt[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 t3=/#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 Oh(s){return s.replace(t3,n3)}function n3(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 kh(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 i3(s){let e="SHADOWMAP_TYPE_BASIC";return s.shadowMapType===y0?e="SHADOWMAP_TYPE_PCF":s.shadowMapType===Gl?e="SHADOWMAP_TYPE_PCF_SOFT":s.shadowMapType===
|
|
3754
|
+
#define LOW_PRECISION`),e}function i3(s){let e="SHADOWMAP_TYPE_BASIC";return s.shadowMapType===y0?e="SHADOWMAP_TYPE_PCF":s.shadowMapType===Gl?e="SHADOWMAP_TYPE_PCF_SOFT":s.shadowMapType===Si&&(e="SHADOWMAP_TYPE_VSM"),e}function s3(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 r3(s){let e="ENVMAP_MODE_REFLECTION";if(s.envMap)switch(s.envMapMode){case Ws:e="ENVMAP_MODE_REFRACTION";break}return e}function a3(s){let e="ENVMAP_BLENDING_NONE";if(s.envMap)switch(s.combine){case Fa:e="ENVMAP_BLENDING_MULTIPLY";break;case Ju:e="ENVMAP_BLENDING_MIX";break;case Ku:e="ENVMAP_BLENDING_ADD";break}return e}function o3(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 l3(s,e,t,n){const i=s.getContext(),r=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=i3(t),c=s3(t),d=r3(t),m=a3(t),u=o3(t),h=Ym(t),g=Jm(r),_=i.createProgram();let p,f,v=t.glslVersion?"#version "+t.glslVersion+`
|
|
3755
3755
|
`:"";t.isRawShaderMaterial?(p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(ur).join(`
|
|
3756
3756
|
`),p.length>0&&(p+=`
|
|
3757
3757
|
`),f=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(ur).join(`
|
|
3758
3758
|
`),f.length>0&&(f+=`
|
|
3759
3759
|
`)):(p=[kh(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
|
-
`),f=[kh(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!==
|
|
3761
|
+
`),f=[kh(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!==Xi?"#define TONE_MAPPING":"",t.toneMapping!==Xi?Vt.tonemapping_pars_fragment:"",t.toneMapping!==Xi?qm("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Vt.colorspace_pars_fragment,jm("linearToOutputTexel",t.outputColorSpace),$m(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
|
|
3762
3762
|
`].filter(ur).join(`
|
|
3763
|
-
`)),
|
|
3763
|
+
`)),o=Fl(o),o=zh(o,t),o=Bh(o,t),a=Fl(a),a=zh(a,t),a=Bh(a,t),o=Oh(o),a=Oh(a),t.isRawShaderMaterial!==!0&&(v=`#version 300 es
|
|
3764
3764
|
`,p=[h,"#define attribute in","#define varying out","#define texture2D texture"].join(`
|
|
3765
3765
|
`)+`
|
|
3766
3766
|
`+p,f=["#define varying in",t.glslVersion===Cc?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Cc?"":"#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
|
-
`+f);const x=v+p+
|
|
3768
|
+
`+f);const x=v+p+o,S=v+f+a,F=Nh(i,i.VERTEX_SHADER,x),C=Nh(i,i.FRAGMENT_SHADER,S);i.attachShader(_,F),i.attachShader(_,C),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function R(L){if(s.debug.checkShaderErrors){const z=i.getProgramInfoLog(_).trim(),H=i.getShaderInfoLog(F).trim(),Q=i.getShaderInfoLog(C).trim();let re=!0,G=!0;if(i.getProgramParameter(_,i.LINK_STATUS)===!1)if(re=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(i,_,F,C);else{const le=Ih(i,F,"vertex"),Z=Ih(i,C,"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: `+L.name+`
|
|
3771
|
+
Material Type: `+L.type+`
|
|
3772
3772
|
|
|
3773
3773
|
Program Info Log: `+z+`
|
|
3774
3774
|
`+le+`
|
|
3775
|
-
`+K)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(H===""||Q==="")&&(G=!1);G&&(P.diagnostics={runnable:re,programLog:z,vertexShader:{log:H,prefix:p},fragmentShader:{log:Q,prefix:f}})}i.deleteShader(F),i.deleteShader(C),L=new Ma(i,_),A=Km(i,_)}let L;this.getUniforms=function(){return L===void 0&&R(this),L};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(_,Hm)),E},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Gm++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=F,this.fragmentShader=C,this}let c3=0;class h3{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),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(r)===!1&&(a.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 u3(e),t.set(e,n)),n}}class u3{constructor(e){this.id=c3++,this.code=e,this.usedTimes=0}}function d3(s,e,t,n,i,r,a){const o=new Ql,l=new h3,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,P,z,H){const Q=z.fog,re=H.geometry,G=A.isMeshStandardMaterial?z.environment:null,le=(A.isMeshStandardMaterial?t:e).get(A.envMap||G),K=le&&le.mapping===Ua?le.image.height:null,pe=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 Me=re.morphAttributes.position||re.morphAttributes.normal||re.morphAttributes.color,ye=Me!==void 0?Me.length:0;let de=0;re.morphAttributes.position!==void 0&&(de=1),re.morphAttributes.normal!==void 0&&(de=2),re.morphAttributes.color!==void 0&&(de=3);let se,W,j,ne;if(pe){const It=Hn[pe];se=It.vertexShader,W=It.fragmentShader}else se=A.vertexShader,W=A.fragmentShader,l.update(A),j=l.getVertexShaderID(A),ne=l.getFragmentShaderID(A);const ee=s.getRenderTarget(),ce=s.state.buffers.depth.getReversed(),q=H.isInstancedMesh===!0,he=H.isBatchedMesh===!0,Se=!!A.map,Ke=!!A.matcap,Ve=!!le,B=!!A.aoMap,yt=!!A.lightMap,ht=!!A.bumpMap,nt=!!A.normalMap,Le=!!A.displacementMap,Qe=!!A.emissiveMap,Ce=!!A.metalnessMap,st=!!A.roughnessMap,tn=A.anisotropy>0,k=A.clearcoat>0,T=A.dispersion>0,ae=A.iridescence>0,xe=A.sheen>0,Te=A.transmission>0,me=tn&&!!A.anisotropyMap,gt=k&&!!A.clearcoatMap,Xe=k&&!!A.clearcoatNormalMap,dt=k&&!!A.clearcoatRoughnessMap,mt=ae&&!!A.iridescenceMap,De=ae&&!!A.iridescenceThicknessMap,rt=xe&&!!A.sheenColorMap,Ct=xe&&!!A.sheenRoughnessMap,xt=!!A.specularMap,Ye=!!A.specularColorMap,Lt=!!A.specularIntensityMap,Y=Te&&!!A.transmissionMap,et=Te&&!!A.thicknessMap,Pe=!!A.gradientMap,at=!!A.alphaMap,ze=A.alphaTest>0,be=!!A.alphaHash,ut=!!A.extensions;let Ut=ji;A.toneMapped&&(ee===null||ee.isXRRenderTarget===!0)&&(Ut=s.toneMapping);const sn={shaderID:pe,shaderType:A.type,shaderName:A.name,vertexShader:se,fragmentShader:W,defines:A.defines,customVertexShaderID:j,customFragmentShaderID:ne,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:h,batching:he,batchingColor:he&&H._colorsTexture!==null,instancing:q,instancingColor:q&&H.instanceColor!==null,instancingMorph:q&&H.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ee===null?s.outputColorSpace:ee.isXRRenderTarget===!0?ee.texture.colorSpace:Xs,alphaToCoverage:!!A.alphaToCoverage,map:Se,matcap:Ke,envMap:Ve,envMapMode:Ve&&le.mapping,envMapCubeUVHeight:K,aoMap:B,lightMap:yt,bumpMap:ht,normalMap:nt,displacementMap:u&&Le,emissiveMap:Qe,normalMapObjectSpace:nt&&A.normalMapType===c2,normalMapTangentSpace:nt&&A.normalMapType===Na,metalnessMap:Ce,roughnessMap:st,anisotropy:tn,anisotropyMap:me,clearcoat:k,clearcoatMap:gt,clearcoatNormalMap:Xe,clearcoatRoughnessMap:dt,dispersion:T,iridescence:ae,iridescenceMap:mt,iridescenceThicknessMap:De,sheen:xe,sheenColorMap:rt,sheenRoughnessMap:Ct,specularMap:xt,specularColorMap:Ye,specularIntensityMap:Lt,transmission:Te,transmissionMap:Y,thicknessMap:et,gradientMap:Pe,opaque:A.transparent===!1&&A.blending===Bs&&A.alphaToCoverage===!1,alphaMap:at,alphaTest:ze,alphaHash:be,combine:A.combine,mapUv:Se&&_(A.map.channel),aoMapUv:B&&_(A.aoMap.channel),lightMapUv:yt&&_(A.lightMap.channel),bumpMapUv:ht&&_(A.bumpMap.channel),normalMapUv:nt&&_(A.normalMap.channel),displacementMapUv:Le&&_(A.displacementMap.channel),emissiveMapUv:Qe&&_(A.emissiveMap.channel),metalnessMapUv:Ce&&_(A.metalnessMap.channel),roughnessMapUv:st&&_(A.roughnessMap.channel),anisotropyMapUv:me&&_(A.anisotropyMap.channel),clearcoatMapUv:gt&&_(A.clearcoatMap.channel),clearcoatNormalMapUv:Xe&&_(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:dt&&_(A.clearcoatRoughnessMap.channel),iridescenceMapUv:mt&&_(A.iridescenceMap.channel),iridescenceThicknessMapUv:De&&_(A.iridescenceThicknessMap.channel),sheenColorMapUv:rt&&_(A.sheenColorMap.channel),sheenRoughnessMapUv:Ct&&_(A.sheenRoughnessMap.channel),specularMapUv:xt&&_(A.specularMap.channel),specularColorMapUv:Ye&&_(A.specularColorMap.channel),specularIntensityMapUv:Lt&&_(A.specularIntensityMap.channel),transmissionMapUv:Y&&_(A.transmissionMap.channel),thicknessMapUv:et&&_(A.thicknessMap.channel),alphaMapUv:at&&_(A.alphaMap.channel),vertexTangents:!!re.attributes.tangent&&(nt||tn),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!re.attributes.color&&re.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!re.attributes.uv&&(Se||at),fog:!!Q,useFog:A.fog===!0,fogExp2:!!Q&&Q.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:ce,skinning:H.isSkinnedMesh===!0,morphTargets:re.morphAttributes.position!==void 0,morphNormals:re.morphAttributes.normal!==void 0,morphColors:re.morphAttributes.color!==void 0,morphTargetsCount:ye,morphTextureStride:de,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:a.numPlanes,numClipIntersection:a.numIntersection,dithering:A.dithering,shadowMapEnabled:s.shadowMap.enabled&&P.length>0,shadowMapType:s.shadowMap.type,toneMapping:Ut,decodeVideoTexture:Se&&A.map.isVideoTexture===!0&&Wt.getTransfer(A.map.colorSpace)===on,decodeVideoTextureEmissive:Qe&&A.emissiveMap.isVideoTexture===!0&&Wt.getTransfer(A.emissiveMap.colorSpace)===on,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===gn,flipSided:A.side===On,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionClipCullDistance:ut&&A.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ut&&A.extensions.multiDraw===!0||he)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return sn.vertexUv1s=c.has(1),sn.vertexUv2s=c.has(2),sn.vertexUv3s=c.has(3),c.clear(),sn}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 P in A.defines)E.push(P),E.push(A.defines[P]);return A.isRawShaderMaterial===!1&&(v(E,A),x(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 x(A,E){o.disableAll(),E.supportsVertexTextures&&o.enable(0),E.instancing&&o.enable(1),E.instancingColor&&o.enable(2),E.instancingMorph&&o.enable(3),E.matcap&&o.enable(4),E.envMap&&o.enable(5),E.normalMapObjectSpace&&o.enable(6),E.normalMapTangentSpace&&o.enable(7),E.clearcoat&&o.enable(8),E.iridescence&&o.enable(9),E.alphaTest&&o.enable(10),E.vertexColors&&o.enable(11),E.vertexAlphas&&o.enable(12),E.vertexUv1s&&o.enable(13),E.vertexUv2s&&o.enable(14),E.vertexUv3s&&o.enable(15),E.vertexTangents&&o.enable(16),E.anisotropy&&o.enable(17),E.alphaHash&&o.enable(18),E.batching&&o.enable(19),E.dispersion&&o.enable(20),E.batchingColor&&o.enable(21),A.push(o.mask),o.disableAll(),E.fog&&o.enable(0),E.useFog&&o.enable(1),E.flatShading&&o.enable(2),E.logarithmicDepthBuffer&&o.enable(3),E.reverseDepthBuffer&&o.enable(4),E.skinning&&o.enable(5),E.morphTargets&&o.enable(6),E.morphNormals&&o.enable(7),E.morphColors&&o.enable(8),E.premultipliedAlpha&&o.enable(9),E.shadowMapEnabled&&o.enable(10),E.doubleSided&&o.enable(11),E.flipSided&&o.enable(12),E.useDepthPacking&&o.enable(13),E.dithering&&o.enable(14),E.transmission&&o.enable(15),E.sheen&&o.enable(16),E.opaque&&o.enable(17),E.pointsUvs&&o.enable(18),E.decodeVideoTexture&&o.enable(19),E.decodeVideoTextureEmissive&&o.enable(20),E.alphaToCoverage&&o.enable(21),A.push(o.mask)}function b(A){const E=g[A.type];let P;if(E){const z=Hn[E];P=ec.clone(z.uniforms)}else P=A.uniforms;return P}function F(A,E){let P;for(let z=0,H=d.length;z<H;z++){const Q=d[z];if(Q.cacheKey===E){P=Q,++P.usedTimes;break}}return P===void 0&&(P=new l3(s,E,A,r),d.push(P)),P}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 L(){l.dispose()}return{getParameters:p,getProgramCacheKey:f,getUniforms:b,acquireProgram:F,releaseProgram:C,releaseShaderCache:R,programs:d,dispose:L}}function f3(){let s=new WeakMap;function e(a){return s.has(a)}function t(a){let o=s.get(a);return o===void 0&&(o={},s.set(a,o)),o}function n(a){s.delete(a)}function i(a,o,l){s.get(a)[o]=l}function r(){s=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:r}}function p3(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 Vh(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 Hh(){const s=[];let e=0;const t=[],n=[],i=[];function r(){e=0,t.length=0,n.length=0,i.length=0}function a(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 o(m,u,h,g,_,p){const f=a(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=a(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||p3),n.length>1&&n.sort(u||Vh),i.length>1&&i.sort(u||Vh)}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:o,unshift:l,finish:d,sort:c}}function m3(){let s=new WeakMap;function e(n,i){const r=s.get(n);let a;return r===void 0?(a=new Hh,s.set(n,[a])):i>=r.length?(a=new Hh,r.push(a)):a=r[i],a}function t(){s=new WeakMap}return{get:e,dispose: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={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 _3(){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 Ze};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ze};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ze,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let v3=0;function y3(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function x3(s){const e=new g3,t=_3(),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,a=new Et;function o(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,x=0,b=0,F=0,C=0,R=0;c.sort(y3);for(let A=0,E=c.length;A<E;A++){const P=c[A],z=P.color,H=P.intensity,Q=P.distance,re=P.shadow&&P.shadow.map?P.shadow.map.texture:null;if(P.isAmbientLight)d+=z.r*H,m+=z.g*H,u+=z.b*H;else if(P.isLightProbe){for(let G=0;G<9;G++)n.probe[G].addScaledVector(P.sh.coefficients[G],H);R++}else if(P.isDirectionalLight){const G=e.get(P);if(G.color.copy(P.color).multiplyScalar(P.intensity),P.castShadow){const le=P.shadow,K=t.get(P);K.shadowIntensity=le.intensity,K.shadowBias=le.bias,K.shadowNormalBias=le.normalBias,K.shadowRadius=le.radius,K.shadowMapSize=le.mapSize,n.directionalShadow[h]=K,n.directionalShadowMap[h]=re,n.directionalShadowMatrix[h]=P.shadow.matrix,v++}n.directional[h]=G,h++}else if(P.isSpotLight){const G=e.get(P);G.position.setFromMatrixPosition(P.matrixWorld),G.color.copy(z).multiplyScalar(H),G.distance=Q,G.coneCos=Math.cos(P.angle),G.penumbraCos=Math.cos(P.angle*(1-P.penumbra)),G.decay=P.decay,n.spot[_]=G;const le=P.shadow;if(P.map&&(n.spotLightMap[F]=P.map,F++,le.updateMatrices(P),P.castShadow&&C++),n.spotLightMatrix[_]=le.matrix,P.castShadow){const K=t.get(P);K.shadowIntensity=le.intensity,K.shadowBias=le.bias,K.shadowNormalBias=le.normalBias,K.shadowRadius=le.radius,K.shadowMapSize=le.mapSize,n.spotShadow[_]=K,n.spotShadowMap[_]=re,b++}_++}else if(P.isRectAreaLight){const G=e.get(P);G.color.copy(z).multiplyScalar(H),G.halfWidth.set(P.width*.5,0,0),G.halfHeight.set(0,P.height*.5,0),n.rectArea[p]=G,p++}else if(P.isPointLight){const G=e.get(P);if(G.color.copy(P.color).multiplyScalar(P.intensity),G.distance=P.distance,G.decay=P.decay,P.castShadow){const le=P.shadow,K=t.get(P);K.shadowIntensity=le.intensity,K.shadowBias=le.bias,K.shadowNormalBias=le.normalBias,K.shadowRadius=le.radius,K.shadowMapSize=le.mapSize,K.shadowCameraNear=le.camera.near,K.shadowCameraFar=le.camera.far,n.pointShadow[g]=K,n.pointShadowMap[g]=re,n.pointShadowMatrix[g]=P.shadow.matrix,x++}n.point[g]=G,g++}else if(P.isHemisphereLight){const G=e.get(P);G.skyColor.copy(P.color).multiplyScalar(H),G.groundColor.copy(P.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 L=n.hash;(L.directionalLength!==h||L.pointLength!==g||L.spotLength!==_||L.rectAreaLength!==p||L.hemiLength!==f||L.numDirectionalShadows!==v||L.numPointShadows!==x||L.numSpotShadows!==b||L.numSpotMaps!==F||L.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=x,n.pointShadowMap.length=x,n.spotShadow.length=b,n.spotShadowMap.length=b,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=x,n.spotLightMatrix.length=b+F-C,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=C,n.numLightProbes=R,L.directionalLength=h,L.pointLength=g,L.spotLength=_,L.rectAreaLength=p,L.hemiLength=f,L.numDirectionalShadows=v,L.numPointShadows=x,L.numSpotShadows=b,L.numSpotMaps=F,L.numLightProbes=R,n.version=v3++)}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 x=c[f];if(x.isDirectionalLight){const b=n.directional[m];b.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(p),m++}else if(x.isSpotLight){const b=n.spot[h];b.position.setFromMatrixPosition(x.matrixWorld),b.position.applyMatrix4(p),b.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(p),h++}else if(x.isRectAreaLight){const b=n.rectArea[g];b.position.setFromMatrixPosition(x.matrixWorld),b.position.applyMatrix4(p),a.identity(),r.copy(x.matrixWorld),r.premultiply(p),a.extractRotation(r),b.halfWidth.set(x.width*.5,0,0),b.halfHeight.set(0,x.height*.5,0),b.halfWidth.applyMatrix4(a),b.halfHeight.applyMatrix4(a),g++}else if(x.isPointLight){const b=n.point[u];b.position.setFromMatrixPosition(x.matrixWorld),b.position.applyMatrix4(p),u++}else if(x.isHemisphereLight){const b=n.hemi[_];b.direction.setFromMatrixPosition(x.matrixWorld),b.direction.transformDirection(p),_++}}}return{setup:o,setupView:l,state:n}}function Gh(s){const e=new x3(s),t=[],n=[];function i(d){c.camera=d,t.length=0,n.length=0}function r(d){t.push(d)}function a(d){n.push(d)}function o(){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:o,setupLightsView:l,pushLight:r,pushShadow:a}}function M3(s){let e=new WeakMap;function t(i,r=0){const a=e.get(i);let o;return a===void 0?(o=new Gh(s),e.set(i,[o])):r>=a.length?(o=new Gh(s),a.push(o)):o=a[r],o}function n(){e=new WeakMap}return{get:t,dispose:n}}const b3=`void main() {
|
|
3775
|
+
`+Z)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(H===""||Q==="")&&(G=!1);G&&(L.diagnostics={runnable:re,programLog:z,vertexShader:{log:H,prefix:p},fragmentShader:{log:Q,prefix:f}})}i.deleteShader(F),i.deleteShader(C),P=new Ma(i,_),A=Km(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(_,Hm)),E},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Gm++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=F,this.fragmentShader=C,this}let c3=0;class h3{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 u3(e),t.set(e,n)),n}}class u3{constructor(e){this.id=c3++,this.code=e,this.usedTimes=0}}function d3(s,e,t,n,i,r,o){const a=new Ql,l=new h3,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,z,H){const Q=z.fog,re=H.geometry,G=A.isMeshStandardMaterial?z.environment:null,le=(A.isMeshStandardMaterial?t:e).get(A.envMap||G),Z=le&&le.mapping===Na?le.image.height:null,_e=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=re.morphAttributes.position||re.morphAttributes.normal||re.morphAttributes.color,Me=Ee!==void 0?Ee.length:0;let me=0;re.morphAttributes.position!==void 0&&(me=1),re.morphAttributes.normal!==void 0&&(me=2),re.morphAttributes.color!==void 0&&(me=3);let se,j,q,ie;if(_e){const zt=Vn[_e];se=zt.vertexShader,j=zt.fragmentShader}else se=A.vertexShader,j=A.fragmentShader,l.update(A),q=l.getVertexShaderID(A),ie=l.getFragmentShaderID(A);const ee=s.getRenderTarget(),ue=s.state.buffers.depth.getReversed(),J=H.isInstancedMesh===!0,de=H.isBatchedMesh===!0,we=!!A.map,Ze=!!A.matcap,We=!!le,B=!!A.aoMap,bt=!!A.lightMap,ht=!!A.bumpMap,it=!!A.normalMap,Ne=!!A.displacementMap,tt=!!A.emissiveMap,Le=!!A.metalnessMap,st=!!A.roughnessMap,Yt=A.anisotropy>0,V=A.clearcoat>0,T=A.dispersion>0,ae=A.iridescence>0,be=A.sheen>0,Re=A.transmission>0,ve=Yt&&!!A.anisotropyMap,_t=V&&!!A.clearcoatMap,Qe=V&&!!A.clearcoatNormalMap,pt=V&&!!A.clearcoatRoughnessMap,vt=ae&&!!A.iridescenceMap,Pe=ae&&!!A.iridescenceThicknessMap,lt=be&&!!A.sheenColorMap,Dt=be&&!!A.sheenRoughnessMap,Ct=!!A.specularMap,Je=!!A.specularColorMap,Pt=!!A.specularIntensityMap,K=Re&&!!A.transmissionMap,nt=Re&&!!A.thicknessMap,Fe=!!A.gradientMap,at=!!A.alphaMap,Oe=A.alphaTest>0,Ae=!!A.alphaHash,dt=!!A.extensions;let Ft=Xi;A.toneMapped&&(ee===null||ee.isXRRenderTarget===!0)&&(Ft=s.toneMapping);const Jt={shaderID:_e,shaderType:A.type,shaderName:A.name,vertexShader:se,fragmentShader:j,defines:A.defines,customVertexShaderID:q,customFragmentShaderID:ie,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:h,batching:de,batchingColor:de&&H._colorsTexture!==null,instancing:J,instancingColor:J&&H.instanceColor!==null,instancingMorph:J&&H.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ee===null?s.outputColorSpace:ee.isXRRenderTarget===!0?ee.texture.colorSpace:Xs,alphaToCoverage:!!A.alphaToCoverage,map:we,matcap:Ze,envMap:We,envMapMode:We&&le.mapping,envMapCubeUVHeight:Z,aoMap:B,lightMap:bt,bumpMap:ht,normalMap:it,displacementMap:u&&Ne,emissiveMap:tt,normalMapObjectSpace:it&&A.normalMapType===c2,normalMapTangentSpace:it&&A.normalMapType===Ua,metalnessMap:Le,roughnessMap:st,anisotropy:Yt,anisotropyMap:ve,clearcoat:V,clearcoatMap:_t,clearcoatNormalMap:Qe,clearcoatRoughnessMap:pt,dispersion:T,iridescence:ae,iridescenceMap:vt,iridescenceThicknessMap:Pe,sheen:be,sheenColorMap:lt,sheenRoughnessMap:Dt,specularMap:Ct,specularColorMap:Je,specularIntensityMap:Pt,transmission:Re,transmissionMap:K,thicknessMap:nt,gradientMap:Fe,opaque:A.transparent===!1&&A.blending===Bs&&A.alphaToCoverage===!1,alphaMap:at,alphaTest:Oe,alphaHash:Ae,combine:A.combine,mapUv:we&&_(A.map.channel),aoMapUv:B&&_(A.aoMap.channel),lightMapUv:bt&&_(A.lightMap.channel),bumpMapUv:ht&&_(A.bumpMap.channel),normalMapUv:it&&_(A.normalMap.channel),displacementMapUv:Ne&&_(A.displacementMap.channel),emissiveMapUv:tt&&_(A.emissiveMap.channel),metalnessMapUv:Le&&_(A.metalnessMap.channel),roughnessMapUv:st&&_(A.roughnessMap.channel),anisotropyMapUv:ve&&_(A.anisotropyMap.channel),clearcoatMapUv:_t&&_(A.clearcoatMap.channel),clearcoatNormalMapUv:Qe&&_(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:pt&&_(A.clearcoatRoughnessMap.channel),iridescenceMapUv:vt&&_(A.iridescenceMap.channel),iridescenceThicknessMapUv:Pe&&_(A.iridescenceThicknessMap.channel),sheenColorMapUv:lt&&_(A.sheenColorMap.channel),sheenRoughnessMapUv:Dt&&_(A.sheenRoughnessMap.channel),specularMapUv:Ct&&_(A.specularMap.channel),specularColorMapUv:Je&&_(A.specularColorMap.channel),specularIntensityMapUv:Pt&&_(A.specularIntensityMap.channel),transmissionMapUv:K&&_(A.transmissionMap.channel),thicknessMapUv:nt&&_(A.thicknessMap.channel),alphaMapUv:at&&_(A.alphaMap.channel),vertexTangents:!!re.attributes.tangent&&(it||Yt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!re.attributes.color&&re.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!re.attributes.uv&&(we||at),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:re.morphAttributes.position!==void 0,morphNormals:re.morphAttributes.normal!==void 0,morphColors:re.morphAttributes.color!==void 0,morphTargetsCount:Me,morphTextureStride:me,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:we&&A.map.isVideoTexture===!0&&Ht.getTransfer(A.map.colorSpace)===on,decodeVideoTextureEmissive:tt&&A.emissiveMap.isVideoTexture===!0&&Ht.getTransfer(A.emissiveMap.colorSpace)===on,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===gn,flipSided:A.side===zn,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionClipCullDistance:dt&&A.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(dt&&A.extensions.multiDraw===!0||de)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return Jt.vertexUv1s=c.has(1),Jt.vertexUv2s=c.has(2),Jt.vertexUv3s=c.has(3),c.clear(),Jt}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),x(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 x(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 z=Vn[E];L=ec.clone(z.uniforms)}else L=A.uniforms;return L}function F(A,E){let L;for(let z=0,H=d.length;z<H;z++){const Q=d[z];if(Q.cacheKey===E){L=Q,++L.usedTimes;break}}return L===void 0&&(L=new l3(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 f3(){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 p3(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 Vh(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 Hh(){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||p3),n.length>1&&n.sort(u||Vh),i.length>1&&i.sort(u||Vh)}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 m3(){let s=new WeakMap;function e(n,i){const r=s.get(n);let o;return r===void 0?(o=new Hh,s.set(n,[o])):i>=r.length?(o=new Hh,r.push(o)):o=r[i],o}function t(){s=new WeakMap}return{get:e,dispose: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={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 _3(){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 v3=0;function y3(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function x3(s){const e=new g3,t=_3(),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 At,o=new At;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,x=0,S=0,F=0,C=0,R=0;c.sort(y3);for(let A=0,E=c.length;A<E;A++){const L=c[A],z=L.color,H=L.intensity,Q=L.distance,re=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)d+=z.r*H,m+=z.g*H,u+=z.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]=re,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(z).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[_]=re,S++}_++}else if(L.isRectAreaLight){const G=e.get(L);G.color.copy(z).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]=re,n.pointShadowMatrix[g]=L.shadow.matrix,x++}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=Ke.LTC_FLOAT_1,n.rectAreaLTC2=Ke.LTC_FLOAT_2):(n.rectAreaLTC1=Ke.LTC_HALF_1,n.rectAreaLTC2=Ke.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!==x||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=x,n.pointShadowMap.length=x,n.spotShadow.length=S,n.spotShadowMap.length=S,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=x,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=x,P.numSpotShadows=S,P.numSpotMaps=F,P.numLightProbes=R,n.version=v3++)}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 x=c[f];if(x.isDirectionalLight){const S=n.directional[m];S.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),m++}else if(x.isSpotLight){const S=n.spot[h];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(p),S.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),h++}else if(x.isRectAreaLight){const S=n.rectArea[g];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(p),o.identity(),r.copy(x.matrixWorld),r.premultiply(p),o.extractRotation(r),S.halfWidth.set(x.width*.5,0,0),S.halfHeight.set(0,x.height*.5,0),S.halfWidth.applyMatrix4(o),S.halfHeight.applyMatrix4(o),g++}else if(x.isPointLight){const S=n.point[u];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(p),u++}else if(x.isHemisphereLight){const S=n.hemi[_];S.direction.setFromMatrixPosition(x.matrixWorld),S.direction.transformDirection(p),_++}}}return{setup:a,setupView:l,state:n}}function Gh(s){const e=new x3(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 M3(s){let e=new WeakMap;function t(i,r=0){const o=e.get(i);let a;return o===void 0?(a=new Gh(s),e.set(i,[a])):r>=o.length?(a=new Gh(s),o.push(a)):a=o[r],a}function n(){e=new WeakMap}return{get:t,dispose:n}}const b3=`void main() {
|
|
3776
3776
|
gl_Position = vec4( position, 1.0 );
|
|
3777
3777
|
}`,S3=`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 E3(s,e,t){let n=new ic;const i=new Ze,r=new Ze,a=new qt,o=new D1({depthPacking:l2}),l=new P1,c={},d=t.maxTextureSize,m={[ti]:On,[On]:ti,[gn]:gn},u=new Li({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ze},radius:{value:4}},vertexShader:b3,fragmentShader:S3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new _n(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=y0;let f=this.type;this.render=function(C,R,L){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||C.length===0)return;const A=s.getRenderTarget(),E=s.getActiveCubeFace(),P=s.getActiveMipmapLevel(),z=s.state;z.setBlending(Xi),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const H=f!==Ei&&this.type===Ei,Q=f===Ei&&this.type!==Ei;for(let re=0,G=C.length;re<G;re++){const le=C[re],K=le.shadow;if(K===void 0){console.warn("THREE.WebGLShadowMap:",le,"has no shadow.");continue}if(K.autoUpdate===!1&&K.needsUpdate===!1)continue;i.copy(K.mapSize);const pe=K.getFrameExtents();if(i.multiply(pe),r.copy(K.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/pe.x),i.x=r.x*pe.x,K.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/pe.y),i.y=r.y*pe.y,K.mapSize.y=r.y)),K.map===null||H===!0||Q===!0){const ye=this.type!==Ei?{minFilter:qn,magFilter:qn}:{};K.map!==null&&K.map.dispose(),K.map=new ds(i.x,i.y,ye),K.map.texture.name=le.name+".shadowMap",K.camera.updateProjectionMatrix()}s.setRenderTarget(K.map),s.clear();const Me=K.getViewportCount();for(let ye=0;ye<Me;ye++){const de=K.getViewport(ye);a.set(r.x*de.x,r.y*de.y,r.x*de.z,r.y*de.w),z.viewport(a),K.updateMatrices(le,ye),n=K.getFrustum(),b(R,L,K.camera,le,this.type)}K.isPointLightShadow!==!0&&this.type===Ei&&v(K,L),K.needsUpdate=!1}f=this.type,p.needsUpdate=!1,s.setRenderTarget(A,E,P)};function v(C,R){const L=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 ds(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,L,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,L,h,_,null)}function x(C,R,L,A){let E=null;const P=L.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(P!==void 0)E=P;else if(E=L.isPointLight===!0?l:o,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 z=E.uuid,H=R.uuid;let Q=c[z];Q===void 0&&(Q={},c[z]=Q);let re=Q[H];re===void 0&&(re=E.clone(),Q[H]=re,R.addEventListener("dispose",F)),E=re}if(E.visible=R.visible,E.wireframe=R.wireframe,A===Ei?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,L.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const z=s.properties.get(E);z.light=L}return E}function b(C,R,L,A,E){if(C.visible===!1)return;if(C.layers.test(R.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&E===Ei)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,C.matrixWorld);const H=e.update(C),Q=C.material;if(Array.isArray(Q)){const re=H.groups;for(let G=0,le=re.length;G<le;G++){const K=re[G],pe=Q[K.materialIndex];if(pe&&pe.visible){const Me=x(C,pe,A,E);C.onBeforeShadow(s,C,R,L,H,Me,K),s.renderBufferDirect(L,null,H,Me,C,K),C.onAfterShadow(s,C,R,L,H,Me,K)}}}else if(Q.visible){const re=x(C,Q,A,E);C.onBeforeShadow(s,C,R,L,H,re,null),s.renderBufferDirect(L,null,H,re,C,null),C.onAfterShadow(s,C,R,L,H,re,null)}}const z=C.children;for(let H=0,Q=z.length;H<Q;H++)b(z[H],R,L,A,E)}function F(C){C.target.removeEventListener("dispose",F);for(const L in c){const A=c[L],E=C.target.uuid;E in A&&(A[E].dispose(),delete A[E])}}}const A3={[Xo]:jo,[qo]:Jo,[$o]:Ko,[Hs]:Yo,[jo]:Xo,[Jo]:qo,[Ko]:$o,[Yo]:Hs};function w3(s,e){function t(){let Y=!1;const et=new qt;let Pe=null;const at=new qt(0,0,0,0);return{setMask:function(ze){Pe!==ze&&!Y&&(s.colorMask(ze,ze,ze,ze),Pe=ze)},setLocked:function(ze){Y=ze},setClear:function(ze,be,ut,Ut,sn){sn===!0&&(ze*=Ut,be*=Ut,ut*=Ut),et.set(ze,be,ut,Ut),at.equals(et)===!1&&(s.clearColor(ze,be,ut,Ut),at.copy(et))},reset:function(){Y=!1,Pe=null,at.set(-1,0,0,0)}}}function n(){let Y=!1,et=!1,Pe=null,at=null,ze=null;return{setReversed:function(be){if(et!==be){const ut=e.get("EXT_clip_control");be?ut.clipControlEXT(ut.LOWER_LEFT_EXT,ut.ZERO_TO_ONE_EXT):ut.clipControlEXT(ut.LOWER_LEFT_EXT,ut.NEGATIVE_ONE_TO_ONE_EXT),et=be;const Ut=ze;ze=null,this.setClear(Ut)}},getReversed:function(){return et},setTest:function(be){be?ee(s.DEPTH_TEST):ce(s.DEPTH_TEST)},setMask:function(be){Pe!==be&&!Y&&(s.depthMask(be),Pe=be)},setFunc:function(be){if(et&&(be=A3[be]),at!==be){switch(be){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)}at=be}},setLocked:function(be){Y=be},setClear:function(be){ze!==be&&(et&&(be=1-be),s.clearDepth(be),ze=be)},reset:function(){Y=!1,Pe=null,at=null,ze=null,et=!1}}}function i(){let Y=!1,et=null,Pe=null,at=null,ze=null,be=null,ut=null,Ut=null,sn=null;return{setTest:function(It){Y||(It?ee(s.STENCIL_TEST):ce(s.STENCIL_TEST))},setMask:function(It){et!==It&&!Y&&(s.stencilMask(It),et=It)},setFunc:function(It,Z,$){(Pe!==It||at!==Z||ze!==$)&&(s.stencilFunc(It,Z,$),Pe=It,at=Z,ze=$)},setOp:function(It,Z,$){(be!==It||ut!==Z||Ut!==$)&&(s.stencilOp(It,Z,$),be=It,ut=Z,Ut=$)},setLocked:function(It){Y=It},setClear:function(It){sn!==It&&(s.clearStencil(It),sn=It)},reset:function(){Y=!1,et=null,Pe=null,at=null,ze=null,be=null,ut=null,Ut=null,sn=null}}}const r=new t,a=new n,o=new i,l=new WeakMap,c=new WeakMap;let d={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,v=null,x=null,b=null,F=null,C=null,R=new Tt(0,0,0),L=0,A=!1,E=null,P=null,z=null,H=null,Q=null;const re=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let G=!1,le=0;const K=s.getParameter(s.VERSION);K.indexOf("WebGL")!==-1?(le=parseFloat(/^WebGL (\d)/.exec(K)[1]),G=le>=1):K.indexOf("OpenGL ES")!==-1&&(le=parseFloat(/^OpenGL ES (\d)/.exec(K)[1]),G=le>=2);let pe=null,Me={};const ye=s.getParameter(s.SCISSOR_BOX),de=s.getParameter(s.VIEWPORT),se=new qt().fromArray(ye),W=new qt().fromArray(de);function j(Y,et,Pe,at){const ze=new Uint8Array(4),be=s.createTexture();s.bindTexture(Y,be),s.texParameteri(Y,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(Y,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let ut=0;ut<Pe;ut++)Y===s.TEXTURE_3D||Y===s.TEXTURE_2D_ARRAY?s.texImage3D(et,0,s.RGBA,1,1,at,0,s.RGBA,s.UNSIGNED_BYTE,ze):s.texImage2D(et+ut,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,ze);return be}const ne={};ne[s.TEXTURE_2D]=j(s.TEXTURE_2D,s.TEXTURE_2D,1),ne[s.TEXTURE_CUBE_MAP]=j(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),ne[s.TEXTURE_2D_ARRAY]=j(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),ne[s.TEXTURE_3D]=j(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),a.setClear(1),o.setClear(0),ee(s.DEPTH_TEST),a.setFunc(Hs),ht(!1),nt(yc),ee(s.CULL_FACE),B(Xi);function ee(Y){d[Y]!==!0&&(s.enable(Y),d[Y]=!0)}function ce(Y){d[Y]!==!1&&(s.disable(Y),d[Y]=!1)}function q(Y,et){return m[Y]!==et?(s.bindFramebuffer(Y,et),m[Y]=et,Y===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=et),Y===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=et),!0):!1}function he(Y,et){let Pe=h,at=!1;if(Y){Pe=u.get(et),Pe===void 0&&(Pe=[],u.set(et,Pe));const ze=Y.textures;if(Pe.length!==ze.length||Pe[0]!==s.COLOR_ATTACHMENT0){for(let be=0,ut=ze.length;be<ut;be++)Pe[be]=s.COLOR_ATTACHMENT0+be;Pe.length=ze.length,at=!0}}else Pe[0]!==s.BACK&&(Pe[0]=s.BACK,at=!0);at&&s.drawBuffers(Pe)}function Se(Y){return g!==Y?(s.useProgram(Y),g=Y,!0):!1}const Ke={[as]:s.FUNC_ADD,[Fu]:s.FUNC_SUBTRACT,[Uu]:s.FUNC_REVERSE_SUBTRACT};Ke[Nu]=s.MIN,Ke[Iu]=s.MAX;const Ve={[zu]:s.ZERO,[Bu]:s.ONE,[Ou]:s.SRC_COLOR,[Go]:s.SRC_ALPHA,[Xu]:s.SRC_ALPHA_SATURATE,[Gu]:s.DST_COLOR,[Vu]:s.DST_ALPHA,[ku]:s.ONE_MINUS_SRC_COLOR,[Wo]:s.ONE_MINUS_SRC_ALPHA,[Wu]:s.ONE_MINUS_DST_COLOR,[Hu]:s.ONE_MINUS_DST_ALPHA,[ju]:s.CONSTANT_COLOR,[qu]:s.ONE_MINUS_CONSTANT_COLOR,[$u]:s.CONSTANT_ALPHA,[Yu]:s.ONE_MINUS_CONSTANT_ALPHA};function B(Y,et,Pe,at,ze,be,ut,Ut,sn,It){if(Y===Xi){_===!0&&(ce(s.BLEND),_=!1);return}if(_===!1&&(ee(s.BLEND),_=!0),Y!==Lu){if(Y!==p||It!==A){if((f!==as||b!==as)&&(s.blendEquation(s.FUNC_ADD),f=as,b=as),It)switch(Y){case Bs:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case xc:s.blendFunc(s.ONE,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case bc:s.blendFuncSeparate(s.ZERO,s.SRC_COLOR,s.ZERO,s.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y);break}else switch(Y){case Bs:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case xc:s.blendFunc(s.SRC_ALPHA,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case bc:s.blendFunc(s.ZERO,s.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y);break}v=null,x=null,F=null,C=null,R.set(0,0,0),L=0,p=Y,A=It}return}ze=ze||et,be=be||Pe,ut=ut||at,(et!==f||ze!==b)&&(s.blendEquationSeparate(Ke[et],Ke[ze]),f=et,b=ze),(Pe!==v||at!==x||be!==F||ut!==C)&&(s.blendFuncSeparate(Ve[Pe],Ve[at],Ve[be],Ve[ut]),v=Pe,x=at,F=be,C=ut),(Ut.equals(R)===!1||sn!==L)&&(s.blendColor(Ut.r,Ut.g,Ut.b,sn),R.copy(Ut),L=sn),p=Y,A=!1}function yt(Y,et){Y.side===gn?ce(s.CULL_FACE):ee(s.CULL_FACE);let Pe=Y.side===On;et&&(Pe=!Pe),ht(Pe),Y.blending===Bs&&Y.transparent===!1?B(Xi):B(Y.blending,Y.blendEquation,Y.blendSrc,Y.blendDst,Y.blendEquationAlpha,Y.blendSrcAlpha,Y.blendDstAlpha,Y.blendColor,Y.blendAlpha,Y.premultipliedAlpha),a.setFunc(Y.depthFunc),a.setTest(Y.depthTest),a.setMask(Y.depthWrite),r.setMask(Y.colorWrite);const at=Y.stencilWrite;o.setTest(at),at&&(o.setMask(Y.stencilWriteMask),o.setFunc(Y.stencilFunc,Y.stencilRef,Y.stencilFuncMask),o.setOp(Y.stencilFail,Y.stencilZFail,Y.stencilZPass)),Qe(Y.polygonOffset,Y.polygonOffsetFactor,Y.polygonOffsetUnits),Y.alphaToCoverage===!0?ee(s.SAMPLE_ALPHA_TO_COVERAGE):ce(s.SAMPLE_ALPHA_TO_COVERAGE)}function ht(Y){E!==Y&&(Y?s.frontFace(s.CW):s.frontFace(s.CCW),E=Y)}function nt(Y){Y!==Du?(ee(s.CULL_FACE),Y!==P&&(Y===yc?s.cullFace(s.BACK):Y===Pu?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):ce(s.CULL_FACE),P=Y}function Le(Y){Y!==z&&(G&&s.lineWidth(Y),z=Y)}function Qe(Y,et,Pe){Y?(ee(s.POLYGON_OFFSET_FILL),(H!==et||Q!==Pe)&&(s.polygonOffset(et,Pe),H=et,Q=Pe)):ce(s.POLYGON_OFFSET_FILL)}function Ce(Y){Y?ee(s.SCISSOR_TEST):ce(s.SCISSOR_TEST)}function st(Y){Y===void 0&&(Y=s.TEXTURE0+re-1),pe!==Y&&(s.activeTexture(Y),pe=Y)}function tn(Y,et,Pe){Pe===void 0&&(pe===null?Pe=s.TEXTURE0+re-1:Pe=pe);let at=Me[Pe];at===void 0&&(at={type:void 0,texture:void 0},Me[Pe]=at),(at.type!==Y||at.texture!==et)&&(pe!==Pe&&(s.activeTexture(Pe),pe=Pe),s.bindTexture(Y,et||ne[Y]),at.type=Y,at.texture=et)}function k(){const Y=Me[pe];Y!==void 0&&Y.type!==void 0&&(s.bindTexture(Y.type,null),Y.type=void 0,Y.texture=void 0)}function T(){try{s.compressedTexImage2D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function ae(){try{s.compressedTexImage3D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function xe(){try{s.texSubImage2D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function Te(){try{s.texSubImage3D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function me(){try{s.compressedTexSubImage2D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function gt(){try{s.compressedTexSubImage3D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function Xe(){try{s.texStorage2D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function dt(){try{s.texStorage3D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function mt(){try{s.texImage2D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function De(){try{s.texImage3D(...arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function rt(Y){se.equals(Y)===!1&&(s.scissor(Y.x,Y.y,Y.z,Y.w),se.copy(Y))}function Ct(Y){W.equals(Y)===!1&&(s.viewport(Y.x,Y.y,Y.z,Y.w),W.copy(Y))}function xt(Y,et){let Pe=c.get(et);Pe===void 0&&(Pe=new WeakMap,c.set(et,Pe));let at=Pe.get(Y);at===void 0&&(at=s.getUniformBlockIndex(et,Y.name),Pe.set(Y,at))}function Ye(Y,et){const at=c.get(et).get(Y);l.get(et)!==at&&(s.uniformBlockBinding(et,at,Y.__bindingPointIndex),l.set(et,at))}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),a.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={},pe=null,Me={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,v=null,x=null,b=null,F=null,C=null,R=new Tt(0,0,0),L=0,A=!1,E=null,P=null,z=null,H=null,Q=null,se.set(0,0,s.canvas.width,s.canvas.height),W.set(0,0,s.canvas.width,s.canvas.height),r.reset(),a.reset(),o.reset()}return{buffers:{color:r,depth:a,stencil:o},enable:ee,disable:ce,bindFramebuffer:q,drawBuffers:he,useProgram:Se,setBlending:B,setMaterial:yt,setFlipSided:ht,setCullFace:nt,setLineWidth:Le,setPolygonOffset:Qe,setScissorTest:Ce,activeTexture:st,bindTexture:tn,unbindTexture:k,compressedTexImage2D:T,compressedTexImage3D:ae,texImage2D:mt,texImage3D:De,updateUBOMapping:xt,uniformBlockBinding:Ye,texStorage2D:Xe,texStorage3D:dt,texSubImage2D:xe,texSubImage3D:Te,compressedTexSubImage2D:me,compressedTexSubImage3D:gt,scissor:rt,viewport:Ct,reset:Lt}}function T3(s,e,t,n,i,r,a){const o=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 Ze,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,ae){let xe=1;const Te=tn(k);if((Te.width>ae||Te.height>ae)&&(xe=ae/Math.max(Te.width,Te.height)),xe<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 me=Math.floor(xe*Te.width),gt=Math.floor(xe*Te.height);m===void 0&&(m=g(me,gt));const Xe=T?g(me,gt):m;return Xe.width=me,Xe.height=gt,Xe.getContext("2d").drawImage(k,0,0,me,gt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Te.width+"x"+Te.height+") to ("+me+"x"+gt+")."),Xe}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Te.width+"x"+Te.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 x(k,T,ae,xe,Te=!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 me=T;if(T===s.RED&&(ae===s.FLOAT&&(me=s.R32F),ae===s.HALF_FLOAT&&(me=s.R16F),ae===s.UNSIGNED_BYTE&&(me=s.R8)),T===s.RED_INTEGER&&(ae===s.UNSIGNED_BYTE&&(me=s.R8UI),ae===s.UNSIGNED_SHORT&&(me=s.R16UI),ae===s.UNSIGNED_INT&&(me=s.R32UI),ae===s.BYTE&&(me=s.R8I),ae===s.SHORT&&(me=s.R16I),ae===s.INT&&(me=s.R32I)),T===s.RG&&(ae===s.FLOAT&&(me=s.RG32F),ae===s.HALF_FLOAT&&(me=s.RG16F),ae===s.UNSIGNED_BYTE&&(me=s.RG8)),T===s.RG_INTEGER&&(ae===s.UNSIGNED_BYTE&&(me=s.RG8UI),ae===s.UNSIGNED_SHORT&&(me=s.RG16UI),ae===s.UNSIGNED_INT&&(me=s.RG32UI),ae===s.BYTE&&(me=s.RG8I),ae===s.SHORT&&(me=s.RG16I),ae===s.INT&&(me=s.RG32I)),T===s.RGB_INTEGER&&(ae===s.UNSIGNED_BYTE&&(me=s.RGB8UI),ae===s.UNSIGNED_SHORT&&(me=s.RGB16UI),ae===s.UNSIGNED_INT&&(me=s.RGB32UI),ae===s.BYTE&&(me=s.RGB8I),ae===s.SHORT&&(me=s.RGB16I),ae===s.INT&&(me=s.RGB32I)),T===s.RGBA_INTEGER&&(ae===s.UNSIGNED_BYTE&&(me=s.RGBA8UI),ae===s.UNSIGNED_SHORT&&(me=s.RGBA16UI),ae===s.UNSIGNED_INT&&(me=s.RGBA32UI),ae===s.BYTE&&(me=s.RGBA8I),ae===s.SHORT&&(me=s.RGBA16I),ae===s.INT&&(me=s.RGBA32I)),T===s.RGB&&ae===s.UNSIGNED_INT_5_9_9_9_REV&&(me=s.RGB9_E5),T===s.RGBA){const gt=Te?Aa:Wt.getTransfer(xe);ae===s.FLOAT&&(me=s.RGBA32F),ae===s.HALF_FLOAT&&(me=s.RGBA16F),ae===s.UNSIGNED_BYTE&&(me=gt===on?s.SRGB8_ALPHA8:s.RGBA8),ae===s.UNSIGNED_SHORT_4_4_4_4&&(me=s.RGBA4),ae===s.UNSIGNED_SHORT_5_5_5_1&&(me=s.RGB5_A1)}return(me===s.R16F||me===s.R32F||me===s.RG16F||me===s.RG32F||me===s.RGBA16F||me===s.RGBA32F)&&e.get("EXT_color_buffer_float"),me}function b(k,T){let ae;return k?T===null||T===us||T===vr?ae=s.DEPTH24_STENCIL8:T===pi?ae=s.DEPTH32F_STENCIL8:T===_r&&(ae=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):T===null||T===us||T===vr?ae=s.DEPTH_COMPONENT24:T===pi?ae=s.DEPTH_COMPONENT32F:T===_r&&(ae=s.DEPTH_COMPONENT16),ae}function F(k,T){return p(k)===!0||k.isFramebufferTexture&&k.minFilter!==qn&&k.minFilter!==jn?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),L(T),T.isVideoTexture&&d.delete(T)}function R(k){const T=k.target;T.removeEventListener("dispose",R),E(T)}function L(k){const T=n.get(k);if(T.__webglInit===void 0)return;const ae=k.source,xe=u.get(ae);if(xe){const Te=xe[T.__cacheKey];Te.usedTimes--,Te.usedTimes===0&&A(k),Object.keys(xe).length===0&&u.delete(ae)}n.remove(k)}function A(k){const T=n.get(k);s.deleteTexture(T.__webglTexture);const ae=k.source,xe=u.get(ae);delete xe[T.__cacheKey],a.memory.textures--}function E(k){const T=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let xe=0;xe<6;xe++){if(Array.isArray(T.__webglFramebuffer[xe]))for(let Te=0;Te<T.__webglFramebuffer[xe].length;Te++)s.deleteFramebuffer(T.__webglFramebuffer[xe][Te]);else s.deleteFramebuffer(T.__webglFramebuffer[xe]);T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer[xe])}else{if(Array.isArray(T.__webglFramebuffer))for(let xe=0;xe<T.__webglFramebuffer.length;xe++)s.deleteFramebuffer(T.__webglFramebuffer[xe]);else s.deleteFramebuffer(T.__webglFramebuffer);if(T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer),T.__webglMultisampledFramebuffer&&s.deleteFramebuffer(T.__webglMultisampledFramebuffer),T.__webglColorRenderbuffer)for(let xe=0;xe<T.__webglColorRenderbuffer.length;xe++)T.__webglColorRenderbuffer[xe]&&s.deleteRenderbuffer(T.__webglColorRenderbuffer[xe]);T.__webglDepthRenderbuffer&&s.deleteRenderbuffer(T.__webglDepthRenderbuffer)}const ae=k.textures;for(let xe=0,Te=ae.length;xe<Te;xe++){const me=n.get(ae[xe]);me.__webglTexture&&(s.deleteTexture(me.__webglTexture),a.memory.textures--),n.remove(ae[xe])}n.remove(k)}let P=0;function z(){P=0}function H(){const k=P;return k>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+i.maxTextures),P+=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 re(k,T){const ae=n.get(k);if(k.isVideoTexture&&Ce(k),k.isRenderTargetTexture===!1&&k.version>0&&ae.__version!==k.version){const xe=k.image;if(xe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(xe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ne(ae,k,T);return}}t.bindTexture(s.TEXTURE_2D,ae.__webglTexture,s.TEXTURE0+T)}function G(k,T){const ae=n.get(k);if(k.version>0&&ae.__version!==k.version){ne(ae,k,T);return}t.bindTexture(s.TEXTURE_2D_ARRAY,ae.__webglTexture,s.TEXTURE0+T)}function le(k,T){const ae=n.get(k);if(k.version>0&&ae.__version!==k.version){ne(ae,k,T);return}t.bindTexture(s.TEXTURE_3D,ae.__webglTexture,s.TEXTURE0+T)}function K(k,T){const ae=n.get(k);if(k.version>0&&ae.__version!==k.version){ee(ae,k,T);return}t.bindTexture(s.TEXTURE_CUBE_MAP,ae.__webglTexture,s.TEXTURE0+T)}const pe={[fi]:s.REPEAT,[ai]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},Me={[qn]:s.NEAREST,[r2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[jn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[wi]:s.LINEAR_MIPMAP_LINEAR},ye={[h2]:s.NEVER,[g2]:s.ALWAYS,[u2]:s.LESS,[R0]:s.LEQUAL,[d2]:s.EQUAL,[m2]:s.GEQUAL,[f2]:s.GREATER,[p2]:s.NOTEQUAL};function de(k,T){if(T.type===pi&&e.has("OES_texture_float_linear")===!1&&(T.magFilter===jn||T.magFilter===Xa||T.magFilter===wr||T.magFilter===wi||T.minFilter===jn||T.minFilter===Xa||T.minFilter===wr||T.minFilter===wi)&&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,pe[T.wrapS]),s.texParameteri(k,s.TEXTURE_WRAP_T,pe[T.wrapT]),(k===s.TEXTURE_3D||k===s.TEXTURE_2D_ARRAY)&&s.texParameteri(k,s.TEXTURE_WRAP_R,pe[T.wrapR]),s.texParameteri(k,s.TEXTURE_MAG_FILTER,Me[T.magFilter]),s.texParameteri(k,s.TEXTURE_MIN_FILTER,Me[T.minFilter]),T.compareFunction&&(s.texParameteri(k,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(k,s.TEXTURE_COMPARE_FUNC,ye[T.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(T.magFilter===qn||T.minFilter!==wr&&T.minFilter!==wi||T.type===pi&&e.has("OES_texture_float_linear")===!1)return;if(T.anisotropy>1||n.get(T).__currentAnisotropy){const ae=e.get("EXT_texture_filter_anisotropic");s.texParameterf(k,ae.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(T.anisotropy,i.getMaxAnisotropy())),n.get(T).__currentAnisotropy=T.anisotropy}}}function se(k,T){let ae=!1;k.__webglInit===void 0&&(k.__webglInit=!0,T.addEventListener("dispose",C));const xe=T.source;let Te=u.get(xe);Te===void 0&&(Te={},u.set(xe,Te));const me=Q(T);if(me!==k.__cacheKey){Te[me]===void 0&&(Te[me]={texture:s.createTexture(),usedTimes:0},a.memory.textures++,ae=!0),Te[me].usedTimes++;const gt=Te[k.__cacheKey];gt!==void 0&&(Te[k.__cacheKey].usedTimes--,gt.usedTimes===0&&A(T)),k.__cacheKey=me,k.__webglTexture=Te[me].texture}return ae}function W(k,T,ae){return Math.floor(Math.floor(k/ae)/T)}function j(k,T,ae,xe){const me=k.updateRanges;if(me.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,T.width,T.height,ae,xe,T.data);else{me.sort((De,rt)=>De.start-rt.start);let gt=0;for(let De=1;De<me.length;De++){const rt=me[gt],Ct=me[De],xt=rt.start+rt.count,Ye=W(Ct.start,T.width,4),Lt=W(rt.start,T.width,4);Ct.start<=xt+1&&Ye===Lt&&W(Ct.start+Ct.count-1,T.width,4)===Ye?rt.count=Math.max(rt.count,Ct.start+Ct.count-rt.start):(++gt,me[gt]=Ct)}me.length=gt+1;const Xe=s.getParameter(s.UNPACK_ROW_LENGTH),dt=s.getParameter(s.UNPACK_SKIP_PIXELS),mt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,T.width);for(let De=0,rt=me.length;De<rt;De++){const Ct=me[De],xt=Math.floor(Ct.start/4),Ye=Math.ceil(Ct.count/4),Lt=xt%T.width,Y=Math.floor(xt/T.width),et=Ye,Pe=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,Lt),s.pixelStorei(s.UNPACK_SKIP_ROWS,Y),t.texSubImage2D(s.TEXTURE_2D,0,Lt,Y,et,Pe,ae,xe,T.data)}k.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Xe),s.pixelStorei(s.UNPACK_SKIP_PIXELS,dt),s.pixelStorei(s.UNPACK_SKIP_ROWS,mt)}}function ne(k,T,ae){let xe=s.TEXTURE_2D;(T.isDataArrayTexture||T.isCompressedArrayTexture)&&(xe=s.TEXTURE_2D_ARRAY),T.isData3DTexture&&(xe=s.TEXTURE_3D);const Te=se(k,T),me=T.source;t.bindTexture(xe,k.__webglTexture,s.TEXTURE0+ae);const gt=n.get(me);if(me.version!==gt.__version||Te===!0){t.activeTexture(s.TEXTURE0+ae);const Xe=Wt.getPrimaries(Wt.workingColorSpace),dt=T.colorSpace===Gi?null:Wt.getPrimaries(T.colorSpace),mt=T.colorSpace===Gi||Xe===dt?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);let De=_(T.image,!1,i.maxTextureSize);De=st(T,De);const rt=r.convert(T.format,T.colorSpace),Ct=r.convert(T.type);let xt=x(T.internalFormat,rt,Ct,T.colorSpace,T.isVideoTexture);de(xe,T);let Ye;const Lt=T.mipmaps,Y=T.isVideoTexture!==!0,et=gt.__version===void 0||Te===!0,Pe=me.dataReady,at=F(T,De);if(T.isDepthTexture)xt=b(T.format===xr,T.type),et&&(Y?t.texStorage2D(s.TEXTURE_2D,1,xt,De.width,De.height):t.texImage2D(s.TEXTURE_2D,0,xt,De.width,De.height,0,rt,Ct,null));else if(T.isDataTexture)if(Lt.length>0){Y&&et&&t.texStorage2D(s.TEXTURE_2D,at,xt,Lt[0].width,Lt[0].height);for(let ze=0,be=Lt.length;ze<be;ze++)Ye=Lt[ze],Y?Pe&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,rt,Ct,Ye.data):t.texImage2D(s.TEXTURE_2D,ze,xt,Ye.width,Ye.height,0,rt,Ct,Ye.data);T.generateMipmaps=!1}else Y?(et&&t.texStorage2D(s.TEXTURE_2D,at,xt,De.width,De.height),Pe&&j(T,De,rt,Ct)):t.texImage2D(s.TEXTURE_2D,0,xt,De.width,De.height,0,rt,Ct,De.data);else if(T.isCompressedTexture)if(T.isCompressedArrayTexture){Y&&et&&t.texStorage3D(s.TEXTURE_2D_ARRAY,at,xt,Lt[0].width,Lt[0].height,De.depth);for(let ze=0,be=Lt.length;ze<be;ze++)if(Ye=Lt[ze],T.format!==ei)if(rt!==null)if(Y){if(Pe)if(T.layerUpdates.size>0){const ut=yh(Ye.width,Ye.height,T.format,T.type);for(const Ut of T.layerUpdates){const sn=Ye.data.subarray(Ut*ut/Ye.data.BYTES_PER_ELEMENT,(Ut+1)*ut/Ye.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,Ut,Ye.width,Ye.height,1,rt,sn)}T.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Ye.width,Ye.height,De.depth,rt,Ye.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,ze,xt,Ye.width,Ye.height,De.depth,0,Ye.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Y?Pe&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Ye.width,Ye.height,De.depth,rt,Ct,Ye.data):t.texImage3D(s.TEXTURE_2D_ARRAY,ze,xt,Ye.width,Ye.height,De.depth,0,rt,Ct,Ye.data)}else{Y&&et&&t.texStorage2D(s.TEXTURE_2D,at,xt,Lt[0].width,Lt[0].height);for(let ze=0,be=Lt.length;ze<be;ze++)Ye=Lt[ze],T.format!==ei?rt!==null?Y?Pe&&t.compressedTexSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,rt,Ye.data):t.compressedTexImage2D(s.TEXTURE_2D,ze,xt,Ye.width,Ye.height,0,Ye.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Y?Pe&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,rt,Ct,Ye.data):t.texImage2D(s.TEXTURE_2D,ze,xt,Ye.width,Ye.height,0,rt,Ct,Ye.data)}else if(T.isDataArrayTexture)if(Y){if(et&&t.texStorage3D(s.TEXTURE_2D_ARRAY,at,xt,De.width,De.height,De.depth),Pe)if(T.layerUpdates.size>0){const ze=yh(De.width,De.height,T.format,T.type);for(const be of T.layerUpdates){const ut=De.data.subarray(be*ze/De.data.BYTES_PER_ELEMENT,(be+1)*ze/De.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,be,De.width,De.height,1,rt,Ct,ut)}T.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,De.width,De.height,De.depth,rt,Ct,De.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,xt,De.width,De.height,De.depth,0,rt,Ct,De.data);else if(T.isData3DTexture)Y?(et&&t.texStorage3D(s.TEXTURE_3D,at,xt,De.width,De.height,De.depth),Pe&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,De.width,De.height,De.depth,rt,Ct,De.data)):t.texImage3D(s.TEXTURE_3D,0,xt,De.width,De.height,De.depth,0,rt,Ct,De.data);else if(T.isFramebufferTexture){if(et)if(Y)t.texStorage2D(s.TEXTURE_2D,at,xt,De.width,De.height);else{let ze=De.width,be=De.height;for(let ut=0;ut<at;ut++)t.texImage2D(s.TEXTURE_2D,ut,xt,ze,be,0,rt,Ct,null),ze>>=1,be>>=1}}else if(Lt.length>0){if(Y&&et){const ze=tn(Lt[0]);t.texStorage2D(s.TEXTURE_2D,at,xt,ze.width,ze.height)}for(let ze=0,be=Lt.length;ze<be;ze++)Ye=Lt[ze],Y?Pe&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,rt,Ct,Ye):t.texImage2D(s.TEXTURE_2D,ze,xt,rt,Ct,Ye);T.generateMipmaps=!1}else if(Y){if(et){const ze=tn(De);t.texStorage2D(s.TEXTURE_2D,at,xt,ze.width,ze.height)}Pe&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,rt,Ct,De)}else t.texImage2D(s.TEXTURE_2D,0,xt,rt,Ct,De);p(T)&&f(xe),gt.__version=me.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function ee(k,T,ae){if(T.image.length!==6)return;const xe=se(k,T),Te=T.source;t.bindTexture(s.TEXTURE_CUBE_MAP,k.__webglTexture,s.TEXTURE0+ae);const me=n.get(Te);if(Te.version!==me.__version||xe===!0){t.activeTexture(s.TEXTURE0+ae);const gt=Wt.getPrimaries(Wt.workingColorSpace),Xe=T.colorSpace===Gi?null:Wt.getPrimaries(T.colorSpace),dt=T.colorSpace===Gi||gt===Xe?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,dt);const mt=T.isCompressedTexture||T.image[0].isCompressedTexture,De=T.image[0]&&T.image[0].isDataTexture,rt=[];for(let be=0;be<6;be++)!mt&&!De?rt[be]=_(T.image[be],!0,i.maxCubemapSize):rt[be]=De?T.image[be].image:T.image[be],rt[be]=st(T,rt[be]);const Ct=rt[0],xt=r.convert(T.format,T.colorSpace),Ye=r.convert(T.type),Lt=x(T.internalFormat,xt,Ye,T.colorSpace),Y=T.isVideoTexture!==!0,et=me.__version===void 0||xe===!0,Pe=Te.dataReady;let at=F(T,Ct);de(s.TEXTURE_CUBE_MAP,T);let ze;if(mt){Y&&et&&t.texStorage2D(s.TEXTURE_CUBE_MAP,at,Lt,Ct.width,Ct.height);for(let be=0;be<6;be++){ze=rt[be].mipmaps;for(let ut=0;ut<ze.length;ut++){const Ut=ze[ut];T.format!==ei?xt!==null?Y?Pe&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut,0,0,Ut.width,Ut.height,xt,Ut.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut,Lt,Ut.width,Ut.height,0,Ut.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Y?Pe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut,0,0,Ut.width,Ut.height,xt,Ye,Ut.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut,Lt,Ut.width,Ut.height,0,xt,Ye,Ut.data)}}}else{if(ze=T.mipmaps,Y&&et){ze.length>0&&at++;const be=tn(rt[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,at,Lt,be.width,be.height)}for(let be=0;be<6;be++)if(De){Y?Pe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,0,0,0,rt[be].width,rt[be].height,xt,Ye,rt[be].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,0,Lt,rt[be].width,rt[be].height,0,xt,Ye,rt[be].data);for(let ut=0;ut<ze.length;ut++){const sn=ze[ut].image[be].image;Y?Pe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut+1,0,0,sn.width,sn.height,xt,Ye,sn.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut+1,Lt,sn.width,sn.height,0,xt,Ye,sn.data)}}else{Y?Pe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,0,0,0,xt,Ye,rt[be]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,0,Lt,xt,Ye,rt[be]);for(let ut=0;ut<ze.length;ut++){const Ut=ze[ut];Y?Pe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut+1,0,0,xt,Ye,Ut.image[be]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+be,ut+1,Lt,xt,Ye,Ut.image[be])}}}p(T)&&f(s.TEXTURE_CUBE_MAP),me.__version=Te.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function ce(k,T,ae,xe,Te,me){const gt=r.convert(ae.format,ae.colorSpace),Xe=r.convert(ae.type),dt=x(ae.internalFormat,gt,Xe,ae.colorSpace),mt=n.get(T),De=n.get(ae);if(De.__renderTarget=T,!mt.__hasExternalTextures){const rt=Math.max(1,T.width>>me),Ct=Math.max(1,T.height>>me);Te===s.TEXTURE_3D||Te===s.TEXTURE_2D_ARRAY?t.texImage3D(Te,me,dt,rt,Ct,T.depth,0,gt,Xe,null):t.texImage2D(Te,me,dt,rt,Ct,0,gt,Xe,null)}t.bindFramebuffer(s.FRAMEBUFFER,k),Qe(T)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,xe,Te,De.__webglTexture,0,Le(T)):(Te===s.TEXTURE_2D||Te>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Te<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,xe,Te,De.__webglTexture,me),t.bindFramebuffer(s.FRAMEBUFFER,null)}function q(k,T,ae){if(s.bindRenderbuffer(s.RENDERBUFFER,k),T.depthBuffer){const xe=T.depthTexture,Te=xe&&xe.isDepthTexture?xe.type:null,me=b(T.stencilBuffer,Te),gt=T.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Xe=Le(T);Qe(T)?o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Xe,me,T.width,T.height):ae?s.renderbufferStorageMultisample(s.RENDERBUFFER,Xe,me,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,me,T.width,T.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,gt,s.RENDERBUFFER,k)}else{const xe=T.textures;for(let Te=0;Te<xe.length;Te++){const me=xe[Te],gt=r.convert(me.format,me.colorSpace),Xe=r.convert(me.type),dt=x(me.internalFormat,gt,Xe,me.colorSpace),mt=Le(T);ae&&Qe(T)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,mt,dt,T.width,T.height):Qe(T)?o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,mt,dt,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,dt,T.width,T.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function he(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 xe=n.get(T.depthTexture);xe.__renderTarget=T,(!xe.__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),re(T.depthTexture,0);const Te=xe.__webglTexture,me=Le(T);if(T.depthTexture.format===yr)Qe(T)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Te,0,me):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Te,0);else if(T.depthTexture.format===xr)Qe(T)?o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Te,0,me):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Te,0);else throw new Error("Unknown depthTexture format")}function Se(k){const T=n.get(k),ae=k.isWebGLCubeRenderTarget===!0;if(T.__boundDepthTexture!==k.depthTexture){const xe=k.depthTexture;if(T.__depthDisposeCallback&&T.__depthDisposeCallback(),xe){const Te=()=>{delete T.__boundDepthTexture,delete T.__depthDisposeCallback,xe.removeEventListener("dispose",Te)};xe.addEventListener("dispose",Te),T.__depthDisposeCallback=Te}T.__boundDepthTexture=xe}if(k.depthTexture&&!T.__autoAllocateDepthBuffer){if(ae)throw new Error("target.depthTexture not supported in Cube render targets");const xe=k.texture.mipmaps;xe&&xe.length>0?he(T.__webglFramebuffer[0],k):he(T.__webglFramebuffer,k)}else if(ae){T.__webglDepthbuffer=[];for(let xe=0;xe<6;xe++)if(t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[xe]),T.__webglDepthbuffer[xe]===void 0)T.__webglDepthbuffer[xe]=s.createRenderbuffer(),q(T.__webglDepthbuffer[xe],k,!1);else{const Te=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,me=T.__webglDepthbuffer[xe];s.bindRenderbuffer(s.RENDERBUFFER,me),s.framebufferRenderbuffer(s.FRAMEBUFFER,Te,s.RENDERBUFFER,me)}}else{const xe=k.texture.mipmaps;if(xe&&xe.length>0?t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer),T.__webglDepthbuffer===void 0)T.__webglDepthbuffer=s.createRenderbuffer(),q(T.__webglDepthbuffer,k,!1);else{const Te=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,me=T.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,me),s.framebufferRenderbuffer(s.FRAMEBUFFER,Te,s.RENDERBUFFER,me)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function Ke(k,T,ae){const xe=n.get(k);T!==void 0&&ce(xe.__webglFramebuffer,k,k.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),ae!==void 0&&Se(k)}function Ve(k){const T=k.texture,ae=n.get(k),xe=n.get(T);k.addEventListener("dispose",R);const Te=k.textures,me=k.isWebGLCubeRenderTarget===!0,gt=Te.length>1;if(gt||(xe.__webglTexture===void 0&&(xe.__webglTexture=s.createTexture()),xe.__version=T.version,a.memory.textures++),me){ae.__webglFramebuffer=[];for(let Xe=0;Xe<6;Xe++)if(T.mipmaps&&T.mipmaps.length>0){ae.__webglFramebuffer[Xe]=[];for(let dt=0;dt<T.mipmaps.length;dt++)ae.__webglFramebuffer[Xe][dt]=s.createFramebuffer()}else ae.__webglFramebuffer[Xe]=s.createFramebuffer()}else{if(T.mipmaps&&T.mipmaps.length>0){ae.__webglFramebuffer=[];for(let Xe=0;Xe<T.mipmaps.length;Xe++)ae.__webglFramebuffer[Xe]=s.createFramebuffer()}else ae.__webglFramebuffer=s.createFramebuffer();if(gt)for(let Xe=0,dt=Te.length;Xe<dt;Xe++){const mt=n.get(Te[Xe]);mt.__webglTexture===void 0&&(mt.__webglTexture=s.createTexture(),a.memory.textures++)}if(k.samples>0&&Qe(k)===!1){ae.__webglMultisampledFramebuffer=s.createFramebuffer(),ae.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglMultisampledFramebuffer);for(let Xe=0;Xe<Te.length;Xe++){const dt=Te[Xe];ae.__webglColorRenderbuffer[Xe]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,ae.__webglColorRenderbuffer[Xe]);const mt=r.convert(dt.format,dt.colorSpace),De=r.convert(dt.type),rt=x(dt.internalFormat,mt,De,dt.colorSpace,k.isXRRenderTarget===!0),Ct=Le(k);s.renderbufferStorageMultisample(s.RENDERBUFFER,Ct,rt,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Xe,s.RENDERBUFFER,ae.__webglColorRenderbuffer[Xe])}s.bindRenderbuffer(s.RENDERBUFFER,null),k.depthBuffer&&(ae.__webglDepthRenderbuffer=s.createRenderbuffer(),q(ae.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(me){t.bindTexture(s.TEXTURE_CUBE_MAP,xe.__webglTexture),de(s.TEXTURE_CUBE_MAP,T);for(let Xe=0;Xe<6;Xe++)if(T.mipmaps&&T.mipmaps.length>0)for(let dt=0;dt<T.mipmaps.length;dt++)ce(ae.__webglFramebuffer[Xe][dt],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Xe,dt);else ce(ae.__webglFramebuffer[Xe],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Xe,0);p(T)&&f(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(gt){for(let Xe=0,dt=Te.length;Xe<dt;Xe++){const mt=Te[Xe],De=n.get(mt);t.bindTexture(s.TEXTURE_2D,De.__webglTexture),de(s.TEXTURE_2D,mt),ce(ae.__webglFramebuffer,k,mt,s.COLOR_ATTACHMENT0+Xe,s.TEXTURE_2D,0),p(mt)&&f(s.TEXTURE_2D)}t.unbindTexture()}else{let Xe=s.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(Xe=k.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Xe,xe.__webglTexture),de(Xe,T),T.mipmaps&&T.mipmaps.length>0)for(let dt=0;dt<T.mipmaps.length;dt++)ce(ae.__webglFramebuffer[dt],k,T,s.COLOR_ATTACHMENT0,Xe,dt);else ce(ae.__webglFramebuffer,k,T,s.COLOR_ATTACHMENT0,Xe,0);p(T)&&f(Xe),t.unbindTexture()}k.depthBuffer&&Se(k)}function B(k){const T=k.textures;for(let ae=0,xe=T.length;ae<xe;ae++){const Te=T[ae];if(p(Te)){const me=v(k),gt=n.get(Te).__webglTexture;t.bindTexture(me,gt),f(me),t.unbindTexture()}}}const yt=[],ht=[];function nt(k){if(k.samples>0){if(Qe(k)===!1){const T=k.textures,ae=k.width,xe=k.height;let Te=s.COLOR_BUFFER_BIT;const me=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,gt=n.get(k),Xe=T.length>1;if(Xe)for(let mt=0;mt<T.length;mt++)t.bindFramebuffer(s.FRAMEBUFFER,gt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+mt,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,gt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+mt,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,gt.__webglMultisampledFramebuffer);const dt=k.texture.mipmaps;dt&&dt.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,gt.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,gt.__webglFramebuffer);for(let mt=0;mt<T.length;mt++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(Te|=s.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(Te|=s.STENCIL_BUFFER_BIT)),Xe){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,gt.__webglColorRenderbuffer[mt]);const De=n.get(T[mt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,De,0)}s.blitFramebuffer(0,0,ae,xe,0,0,ae,xe,Te,s.NEAREST),l===!0&&(yt.length=0,ht.length=0,yt.push(s.COLOR_ATTACHMENT0+mt),k.depthBuffer&&k.resolveDepthBuffer===!1&&(yt.push(me),ht.push(me),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,ht)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,yt))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Xe)for(let mt=0;mt<T.length;mt++){t.bindFramebuffer(s.FRAMEBUFFER,gt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+mt,s.RENDERBUFFER,gt.__webglColorRenderbuffer[mt]);const De=n.get(T[mt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,gt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+mt,s.TEXTURE_2D,De,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,gt.__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 Le(k){return Math.min(i.maxSamples,k.samples)}function Qe(k){const T=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&T.__useRenderToTexture!==!1}function Ce(k){const T=a.render.frame;d.get(k)!==T&&(d.set(k,T),k.update())}function st(k,T){const ae=k.colorSpace,xe=k.format,Te=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||ae!==Xs&&ae!==Gi&&(Wt.getTransfer(ae)===on?(xe!==ei||Te!==gi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ae)),T}function tn(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=z,this.setTexture2D=re,this.setTexture2DArray=G,this.setTexture3D=le,this.setTextureCube=K,this.rebindTextures=Ke,this.setupRenderTarget=Ve,this.updateRenderTargetMipmap=B,this.updateMultisampleRenderTarget=nt,this.setupDepthRenderbuffer=Se,this.setupFrameBufferTexture=ce,this.useMultisampledRTT=Qe}function C3(s,e){function t(n,i=Gi){let r;const a=Wt.getTransfer(i);if(n===gi)return s.UNSIGNED_BYTE;if(n===jl)return s.UNSIGNED_SHORT_4_4_4_4;if(n===ql)return s.UNSIGNED_SHORT_5_5_5_1;if(n===S0)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===M0)return s.BYTE;if(n===b0)return s.SHORT;if(n===_r)return s.UNSIGNED_SHORT;if(n===Xl)return s.INT;if(n===us)return s.UNSIGNED_INT;if(n===pi)return s.FLOAT;if(n===Sr)return s.HALF_FLOAT;if(n===E0)return s.ALPHA;if(n===A0)return s.RGB;if(n===ei)return s.RGBA;if(n===yr)return s.DEPTH_COMPONENT;if(n===xr)return s.DEPTH_STENCIL;if(n===w0)return s.RED;if(n===$l)return s.RED_INTEGER;if(n===T0)return s.RG;if(n===Yl)return s.RG_INTEGER;if(n===Jl)return s.RGBA_INTEGER;if(n===ga||n===_a||n===va||n===ya)if(a===on)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 a===on?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return a===on?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 a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return a===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return a===on?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 a===on?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===C0||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 R3=`
|
|
3803
|
+
}`;function E3(s,e,t){let n=new ic;const i=new et,r=new et,o=new Gt,a=new D1({depthPacking:l2}),l=new L1,c={},d=t.maxTextureSize,m={[ei]:zn,[zn]:ei,[gn]:gn},u=new Li({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new et},radius:{value:4}},vertexShader:b3,fragmentShader:S3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new _n(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Bt(g,u),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=y0;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(),z=s.state;z.setBlending(Wi),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const H=f!==Si&&this.type===Si,Q=f===Si&&this.type!==Si;for(let re=0,G=C.length;re<G;re++){const le=C[re],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 _e=Z.getFrameExtents();if(i.multiply(_e),r.copy(Z.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/_e.x),i.x=r.x*_e.x,Z.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/_e.y),i.y=r.y*_e.y,Z.mapSize.y=r.y)),Z.map===null||H===!0||Q===!0){const Me=this.type!==Si?{minFilter:qn,magFilter:qn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new us(i.x,i.y,Me),Z.map.texture.name=le.name+".shadowMap",Z.camera.updateProjectionMatrix()}s.setRenderTarget(Z.map),s.clear();const Ee=Z.getViewportCount();for(let Me=0;Me<Ee;Me++){const me=Z.getViewport(Me);o.set(r.x*me.x,r.y*me.y,r.x*me.z,r.y*me.w),z.viewport(o),Z.updateMatrices(le,Me),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 x(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 z=E.uuid,H=R.uuid;let Q=c[z];Q===void 0&&(Q={},c[z]=Q);let re=Q[H];re===void 0&&(re=E.clone(),Q[H]=re,R.addEventListener("dispose",F)),E=re}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 z=s.properties.get(E);z.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 re=H.groups;for(let G=0,le=re.length;G<le;G++){const Z=re[G],_e=Q[Z.materialIndex];if(_e&&_e.visible){const Ee=x(C,_e,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 re=x(C,Q,A,E);C.onBeforeShadow(s,C,R,P,H,re,null),s.renderBufferDirect(P,null,H,re,C,null),C.onAfterShadow(s,C,R,P,H,re,null)}}const z=C.children;for(let H=0,Q=z.length;H<Q;H++)S(z[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 A3={[Xo]:jo,[qo]:Jo,[$o]:Ko,[Hs]:Yo,[jo]:Xo,[Jo]:qo,[Ko]:$o,[Yo]:Hs};function w3(s,e){function t(){let K=!1;const nt=new Gt;let Fe=null;const at=new Gt(0,0,0,0);return{setMask:function(Oe){Fe!==Oe&&!K&&(s.colorMask(Oe,Oe,Oe,Oe),Fe=Oe)},setLocked:function(Oe){K=Oe},setClear:function(Oe,Ae,dt,Ft,Jt){Jt===!0&&(Oe*=Ft,Ae*=Ft,dt*=Ft),nt.set(Oe,Ae,dt,Ft),at.equals(nt)===!1&&(s.clearColor(Oe,Ae,dt,Ft),at.copy(nt))},reset:function(){K=!1,Fe=null,at.set(-1,0,0,0)}}}function n(){let K=!1,nt=!1,Fe=null,at=null,Oe=null;return{setReversed:function(Ae){if(nt!==Ae){const dt=e.get("EXT_clip_control");Ae?dt.clipControlEXT(dt.LOWER_LEFT_EXT,dt.ZERO_TO_ONE_EXT):dt.clipControlEXT(dt.LOWER_LEFT_EXT,dt.NEGATIVE_ONE_TO_ONE_EXT),nt=Ae;const Ft=Oe;Oe=null,this.setClear(Ft)}},getReversed:function(){return nt},setTest:function(Ae){Ae?ee(s.DEPTH_TEST):ue(s.DEPTH_TEST)},setMask:function(Ae){Fe!==Ae&&!K&&(s.depthMask(Ae),Fe=Ae)},setFunc:function(Ae){if(nt&&(Ae=A3[Ae]),at!==Ae){switch(Ae){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)}at=Ae}},setLocked:function(Ae){K=Ae},setClear:function(Ae){Oe!==Ae&&(nt&&(Ae=1-Ae),s.clearDepth(Ae),Oe=Ae)},reset:function(){K=!1,Fe=null,at=null,Oe=null,nt=!1}}}function i(){let K=!1,nt=null,Fe=null,at=null,Oe=null,Ae=null,dt=null,Ft=null,Jt=null;return{setTest:function(zt){K||(zt?ee(s.STENCIL_TEST):ue(s.STENCIL_TEST))},setMask:function(zt){nt!==zt&&!K&&(s.stencilMask(zt),nt=zt)},setFunc:function(zt,Rn,Gn){(Fe!==zt||at!==Rn||Oe!==Gn)&&(s.stencilFunc(zt,Rn,Gn),Fe=zt,at=Rn,Oe=Gn)},setOp:function(zt,Rn,Gn){(Ae!==zt||dt!==Rn||Ft!==Gn)&&(s.stencilOp(zt,Rn,Gn),Ae=zt,dt=Rn,Ft=Gn)},setLocked:function(zt){K=zt},setClear:function(zt){Jt!==zt&&(s.clearStencil(zt),Jt=zt)},reset:function(){K=!1,nt=null,Fe=null,at=null,Oe=null,Ae=null,dt=null,Ft=null,Jt=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,x=null,S=null,F=null,C=null,R=new Tt(0,0,0),P=0,A=!1,E=null,L=null,z=null,H=null,Q=null;const re=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 _e=null,Ee={};const Me=s.getParameter(s.SCISSOR_BOX),me=s.getParameter(s.VIEWPORT),se=new Gt().fromArray(Me),j=new Gt().fromArray(me);function q(K,nt,Fe,at){const Oe=new Uint8Array(4),Ae=s.createTexture();s.bindTexture(K,Ae),s.texParameteri(K,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(K,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let dt=0;dt<Fe;dt++)K===s.TEXTURE_3D||K===s.TEXTURE_2D_ARRAY?s.texImage3D(nt,0,s.RGBA,1,1,at,0,s.RGBA,s.UNSIGNED_BYTE,Oe):s.texImage2D(nt+dt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,Oe);return Ae}const ie={};ie[s.TEXTURE_2D]=q(s.TEXTURE_2D,s.TEXTURE_2D,1),ie[s.TEXTURE_CUBE_MAP]=q(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),ie[s.TEXTURE_2D_ARRAY]=q(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),ie[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),ht(!1),it(yc),ee(s.CULL_FACE),B(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 J(K,nt){return m[K]!==nt?(s.bindFramebuffer(K,nt),m[K]=nt,K===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=nt),K===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=nt),!0):!1}function de(K,nt){let Fe=h,at=!1;if(K){Fe=u.get(nt),Fe===void 0&&(Fe=[],u.set(nt,Fe));const Oe=K.textures;if(Fe.length!==Oe.length||Fe[0]!==s.COLOR_ATTACHMENT0){for(let Ae=0,dt=Oe.length;Ae<dt;Ae++)Fe[Ae]=s.COLOR_ATTACHMENT0+Ae;Fe.length=Oe.length,at=!0}}else Fe[0]!==s.BACK&&(Fe[0]=s.BACK,at=!0);at&&s.drawBuffers(Fe)}function we(K){return g!==K?(s.useProgram(K),g=K,!0):!1}const Ze={[rs]:s.FUNC_ADD,[Fu]:s.FUNC_SUBTRACT,[Nu]:s.FUNC_REVERSE_SUBTRACT};Ze[Uu]=s.MIN,Ze[Iu]=s.MAX;const We={[zu]:s.ZERO,[Bu]:s.ONE,[Ou]:s.SRC_COLOR,[Go]:s.SRC_ALPHA,[Xu]:s.SRC_ALPHA_SATURATE,[Gu]:s.DST_COLOR,[Vu]:s.DST_ALPHA,[ku]:s.ONE_MINUS_SRC_COLOR,[Wo]:s.ONE_MINUS_SRC_ALPHA,[Wu]:s.ONE_MINUS_DST_COLOR,[Hu]:s.ONE_MINUS_DST_ALPHA,[ju]:s.CONSTANT_COLOR,[qu]:s.ONE_MINUS_CONSTANT_COLOR,[$u]:s.CONSTANT_ALPHA,[Yu]:s.ONE_MINUS_CONSTANT_ALPHA};function B(K,nt,Fe,at,Oe,Ae,dt,Ft,Jt,zt){if(K===Wi){_===!0&&(ue(s.BLEND),_=!1);return}if(_===!1&&(ee(s.BLEND),_=!0),K!==Pu){if(K!==p||zt!==A){if((f!==rs||S!==rs)&&(s.blendEquation(s.FUNC_ADD),f=rs,S=rs),zt)switch(K){case Bs:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case xc:s.blendFunc(s.ONE,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case bc: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 xc:s.blendFunc(s.SRC_ALPHA,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case bc:s.blendFunc(s.ZERO,s.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}v=null,x=null,F=null,C=null,R.set(0,0,0),P=0,p=K,A=zt}return}Oe=Oe||nt,Ae=Ae||Fe,dt=dt||at,(nt!==f||Oe!==S)&&(s.blendEquationSeparate(Ze[nt],Ze[Oe]),f=nt,S=Oe),(Fe!==v||at!==x||Ae!==F||dt!==C)&&(s.blendFuncSeparate(We[Fe],We[at],We[Ae],We[dt]),v=Fe,x=at,F=Ae,C=dt),(Ft.equals(R)===!1||Jt!==P)&&(s.blendColor(Ft.r,Ft.g,Ft.b,Jt),R.copy(Ft),P=Jt),p=K,A=!1}function bt(K,nt){K.side===gn?ue(s.CULL_FACE):ee(s.CULL_FACE);let Fe=K.side===zn;nt&&(Fe=!Fe),ht(Fe),K.blending===Bs&&K.transparent===!1?B(Wi):B(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 at=K.stencilWrite;a.setTest(at),at&&(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 ht(K){E!==K&&(K?s.frontFace(s.CW):s.frontFace(s.CCW),E=K)}function it(K){K!==Du?(ee(s.CULL_FACE),K!==L&&(K===yc?s.cullFace(s.BACK):K===Lu?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):ue(s.CULL_FACE),L=K}function Ne(K){K!==z&&(G&&s.lineWidth(K),z=K)}function tt(K,nt,Fe){K?(ee(s.POLYGON_OFFSET_FILL),(H!==nt||Q!==Fe)&&(s.polygonOffset(nt,Fe),H=nt,Q=Fe)):ue(s.POLYGON_OFFSET_FILL)}function Le(K){K?ee(s.SCISSOR_TEST):ue(s.SCISSOR_TEST)}function st(K){K===void 0&&(K=s.TEXTURE0+re-1),_e!==K&&(s.activeTexture(K),_e=K)}function Yt(K,nt,Fe){Fe===void 0&&(_e===null?Fe=s.TEXTURE0+re-1:Fe=_e);let at=Ee[Fe];at===void 0&&(at={type:void 0,texture:void 0},Ee[Fe]=at),(at.type!==K||at.texture!==nt)&&(_e!==Fe&&(s.activeTexture(Fe),_e=Fe),s.bindTexture(K,nt||ie[K]),at.type=K,at.texture=nt)}function V(){const K=Ee[_e];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 ae(){try{s.compressedTexImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function be(){try{s.texSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Re(){try{s.texSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function ve(){try{s.compressedTexSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function _t(){try{s.compressedTexSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Qe(){try{s.texStorage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function pt(){try{s.texStorage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function vt(){try{s.texImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Pe(){try{s.texImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function lt(K){se.equals(K)===!1&&(s.scissor(K.x,K.y,K.z,K.w),se.copy(K))}function Dt(K){j.equals(K)===!1&&(s.viewport(K.x,K.y,K.z,K.w),j.copy(K))}function Ct(K,nt){let Fe=c.get(nt);Fe===void 0&&(Fe=new WeakMap,c.set(nt,Fe));let at=Fe.get(K);at===void 0&&(at=s.getUniformBlockIndex(nt,K.name),Fe.set(K,at))}function Je(K,nt){const at=c.get(nt).get(K);l.get(nt)!==at&&(s.uniformBlockBinding(nt,at,K.__bindingPointIndex),l.set(nt,at))}function Pt(){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={},_e=null,Ee={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,v=null,x=null,S=null,F=null,C=null,R=new Tt(0,0,0),P=0,A=!1,E=null,L=null,z=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:J,drawBuffers:de,useProgram:we,setBlending:B,setMaterial:bt,setFlipSided:ht,setCullFace:it,setLineWidth:Ne,setPolygonOffset:tt,setScissorTest:Le,activeTexture:st,bindTexture:Yt,unbindTexture:V,compressedTexImage2D:T,compressedTexImage3D:ae,texImage2D:vt,texImage3D:Pe,updateUBOMapping:Ct,uniformBlockBinding:Je,texStorage2D:Qe,texStorage3D:pt,texSubImage2D:be,texSubImage3D:Re,compressedTexSubImage2D:ve,compressedTexSubImage3D:_t,scissor:lt,viewport:Dt,reset:Pt}}function T3(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(V,T){return h?new OffscreenCanvas(V,T):Mr("canvas")}function _(V,T,ae){let be=1;const Re=Yt(V);if((Re.width>ae||Re.height>ae)&&(be=ae/Math.max(Re.width,Re.height)),be<1)if(typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&V instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&V instanceof ImageBitmap||typeof VideoFrame<"u"&&V instanceof VideoFrame){const ve=Math.floor(be*Re.width),_t=Math.floor(be*Re.height);m===void 0&&(m=g(ve,_t));const Qe=T?g(ve,_t):m;return Qe.width=ve,Qe.height=_t,Qe.getContext("2d").drawImage(V,0,0,ve,_t),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Re.width+"x"+Re.height+") to ("+ve+"x"+_t+")."),Qe}else return"data"in V&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Re.width+"x"+Re.height+")."),V;return V}function p(V){return V.generateMipmaps}function f(V){s.generateMipmap(V)}function v(V){return V.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:V.isWebGL3DRenderTarget?s.TEXTURE_3D:V.isWebGLArrayRenderTarget||V.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function x(V,T,ae,be,Re=!1){if(V!==null){if(s[V]!==void 0)return s[V];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+V+"'")}let ve=T;if(T===s.RED&&(ae===s.FLOAT&&(ve=s.R32F),ae===s.HALF_FLOAT&&(ve=s.R16F),ae===s.UNSIGNED_BYTE&&(ve=s.R8)),T===s.RED_INTEGER&&(ae===s.UNSIGNED_BYTE&&(ve=s.R8UI),ae===s.UNSIGNED_SHORT&&(ve=s.R16UI),ae===s.UNSIGNED_INT&&(ve=s.R32UI),ae===s.BYTE&&(ve=s.R8I),ae===s.SHORT&&(ve=s.R16I),ae===s.INT&&(ve=s.R32I)),T===s.RG&&(ae===s.FLOAT&&(ve=s.RG32F),ae===s.HALF_FLOAT&&(ve=s.RG16F),ae===s.UNSIGNED_BYTE&&(ve=s.RG8)),T===s.RG_INTEGER&&(ae===s.UNSIGNED_BYTE&&(ve=s.RG8UI),ae===s.UNSIGNED_SHORT&&(ve=s.RG16UI),ae===s.UNSIGNED_INT&&(ve=s.RG32UI),ae===s.BYTE&&(ve=s.RG8I),ae===s.SHORT&&(ve=s.RG16I),ae===s.INT&&(ve=s.RG32I)),T===s.RGB_INTEGER&&(ae===s.UNSIGNED_BYTE&&(ve=s.RGB8UI),ae===s.UNSIGNED_SHORT&&(ve=s.RGB16UI),ae===s.UNSIGNED_INT&&(ve=s.RGB32UI),ae===s.BYTE&&(ve=s.RGB8I),ae===s.SHORT&&(ve=s.RGB16I),ae===s.INT&&(ve=s.RGB32I)),T===s.RGBA_INTEGER&&(ae===s.UNSIGNED_BYTE&&(ve=s.RGBA8UI),ae===s.UNSIGNED_SHORT&&(ve=s.RGBA16UI),ae===s.UNSIGNED_INT&&(ve=s.RGBA32UI),ae===s.BYTE&&(ve=s.RGBA8I),ae===s.SHORT&&(ve=s.RGBA16I),ae===s.INT&&(ve=s.RGBA32I)),T===s.RGB&&ae===s.UNSIGNED_INT_5_9_9_9_REV&&(ve=s.RGB9_E5),T===s.RGBA){const _t=Re?Aa:Ht.getTransfer(be);ae===s.FLOAT&&(ve=s.RGBA32F),ae===s.HALF_FLOAT&&(ve=s.RGBA16F),ae===s.UNSIGNED_BYTE&&(ve=_t===on?s.SRGB8_ALPHA8:s.RGBA8),ae===s.UNSIGNED_SHORT_4_4_4_4&&(ve=s.RGBA4),ae===s.UNSIGNED_SHORT_5_5_5_1&&(ve=s.RGB5_A1)}return(ve===s.R16F||ve===s.R32F||ve===s.RG16F||ve===s.RG32F||ve===s.RGBA16F||ve===s.RGBA32F)&&e.get("EXT_color_buffer_float"),ve}function S(V,T){let ae;return V?T===null||T===hs||T===vr?ae=s.DEPTH24_STENCIL8:T===fi?ae=s.DEPTH32F_STENCIL8:T===_r&&(ae=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?ae=s.DEPTH_COMPONENT24:T===fi?ae=s.DEPTH_COMPONENT32F:T===_r&&(ae=s.DEPTH_COMPONENT16),ae}function F(V,T){return p(V)===!0||V.isFramebufferTexture&&V.minFilter!==qn&&V.minFilter!==jn?Math.log2(Math.max(T.width,T.height))+1:V.mipmaps!==void 0&&V.mipmaps.length>0?V.mipmaps.length:V.isCompressedTexture&&Array.isArray(V.image)?T.mipmaps.length:1}function C(V){const T=V.target;T.removeEventListener("dispose",C),P(T),T.isVideoTexture&&d.delete(T)}function R(V){const T=V.target;T.removeEventListener("dispose",R),E(T)}function P(V){const T=n.get(V);if(T.__webglInit===void 0)return;const ae=V.source,be=u.get(ae);if(be){const Re=be[T.__cacheKey];Re.usedTimes--,Re.usedTimes===0&&A(V),Object.keys(be).length===0&&u.delete(ae)}n.remove(V)}function A(V){const T=n.get(V);s.deleteTexture(T.__webglTexture);const ae=V.source,be=u.get(ae);delete be[T.__cacheKey],o.memory.textures--}function E(V){const T=n.get(V);if(V.depthTexture&&(V.depthTexture.dispose(),n.remove(V.depthTexture)),V.isWebGLCubeRenderTarget)for(let be=0;be<6;be++){if(Array.isArray(T.__webglFramebuffer[be]))for(let Re=0;Re<T.__webglFramebuffer[be].length;Re++)s.deleteFramebuffer(T.__webglFramebuffer[be][Re]);else s.deleteFramebuffer(T.__webglFramebuffer[be]);T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer[be])}else{if(Array.isArray(T.__webglFramebuffer))for(let be=0;be<T.__webglFramebuffer.length;be++)s.deleteFramebuffer(T.__webglFramebuffer[be]);else s.deleteFramebuffer(T.__webglFramebuffer);if(T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer),T.__webglMultisampledFramebuffer&&s.deleteFramebuffer(T.__webglMultisampledFramebuffer),T.__webglColorRenderbuffer)for(let be=0;be<T.__webglColorRenderbuffer.length;be++)T.__webglColorRenderbuffer[be]&&s.deleteRenderbuffer(T.__webglColorRenderbuffer[be]);T.__webglDepthRenderbuffer&&s.deleteRenderbuffer(T.__webglDepthRenderbuffer)}const ae=V.textures;for(let be=0,Re=ae.length;be<Re;be++){const ve=n.get(ae[be]);ve.__webglTexture&&(s.deleteTexture(ve.__webglTexture),o.memory.textures--),n.remove(ae[be])}n.remove(V)}let L=0;function z(){L=0}function H(){const V=L;return V>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+V+" texture units while this GPU supports only "+i.maxTextures),L+=1,V}function Q(V){const T=[];return T.push(V.wrapS),T.push(V.wrapT),T.push(V.wrapR||0),T.push(V.magFilter),T.push(V.minFilter),T.push(V.anisotropy),T.push(V.internalFormat),T.push(V.format),T.push(V.type),T.push(V.generateMipmaps),T.push(V.premultiplyAlpha),T.push(V.flipY),T.push(V.unpackAlignment),T.push(V.colorSpace),T.join()}function re(V,T){const ae=n.get(V);if(V.isVideoTexture&&Le(V),V.isRenderTargetTexture===!1&&V.version>0&&ae.__version!==V.version){const be=V.image;if(be===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(be.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ie(ae,V,T);return}}t.bindTexture(s.TEXTURE_2D,ae.__webglTexture,s.TEXTURE0+T)}function G(V,T){const ae=n.get(V);if(V.version>0&&ae.__version!==V.version){ie(ae,V,T);return}t.bindTexture(s.TEXTURE_2D_ARRAY,ae.__webglTexture,s.TEXTURE0+T)}function le(V,T){const ae=n.get(V);if(V.version>0&&ae.__version!==V.version){ie(ae,V,T);return}t.bindTexture(s.TEXTURE_3D,ae.__webglTexture,s.TEXTURE0+T)}function Z(V,T){const ae=n.get(V);if(V.version>0&&ae.__version!==V.version){ee(ae,V,T);return}t.bindTexture(s.TEXTURE_CUBE_MAP,ae.__webglTexture,s.TEXTURE0+T)}const _e={[di]:s.REPEAT,[ri]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},Ee={[qn]:s.NEAREST,[r2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[jn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[Ai]:s.LINEAR_MIPMAP_LINEAR},Me={[h2]:s.NEVER,[g2]:s.ALWAYS,[u2]:s.LESS,[R0]:s.LEQUAL,[d2]:s.EQUAL,[m2]:s.GEQUAL,[f2]:s.GREATER,[p2]:s.NOTEQUAL};function me(V,T){if(T.type===fi&&e.has("OES_texture_float_linear")===!1&&(T.magFilter===jn||T.magFilter===Xa||T.magFilter===wr||T.magFilter===Ai||T.minFilter===jn||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(V,s.TEXTURE_WRAP_S,_e[T.wrapS]),s.texParameteri(V,s.TEXTURE_WRAP_T,_e[T.wrapT]),(V===s.TEXTURE_3D||V===s.TEXTURE_2D_ARRAY)&&s.texParameteri(V,s.TEXTURE_WRAP_R,_e[T.wrapR]),s.texParameteri(V,s.TEXTURE_MAG_FILTER,Ee[T.magFilter]),s.texParameteri(V,s.TEXTURE_MIN_FILTER,Ee[T.minFilter]),T.compareFunction&&(s.texParameteri(V,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(V,s.TEXTURE_COMPARE_FUNC,Me[T.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(T.magFilter===qn||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 ae=e.get("EXT_texture_filter_anisotropic");s.texParameterf(V,ae.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(T.anisotropy,i.getMaxAnisotropy())),n.get(T).__currentAnisotropy=T.anisotropy}}}function se(V,T){let ae=!1;V.__webglInit===void 0&&(V.__webglInit=!0,T.addEventListener("dispose",C));const be=T.source;let Re=u.get(be);Re===void 0&&(Re={},u.set(be,Re));const ve=Q(T);if(ve!==V.__cacheKey){Re[ve]===void 0&&(Re[ve]={texture:s.createTexture(),usedTimes:0},o.memory.textures++,ae=!0),Re[ve].usedTimes++;const _t=Re[V.__cacheKey];_t!==void 0&&(Re[V.__cacheKey].usedTimes--,_t.usedTimes===0&&A(T)),V.__cacheKey=ve,V.__webglTexture=Re[ve].texture}return ae}function j(V,T,ae){return Math.floor(Math.floor(V/ae)/T)}function q(V,T,ae,be){const ve=V.updateRanges;if(ve.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,T.width,T.height,ae,be,T.data);else{ve.sort((Pe,lt)=>Pe.start-lt.start);let _t=0;for(let Pe=1;Pe<ve.length;Pe++){const lt=ve[_t],Dt=ve[Pe],Ct=lt.start+lt.count,Je=j(Dt.start,T.width,4),Pt=j(lt.start,T.width,4);Dt.start<=Ct+1&&Je===Pt&&j(Dt.start+Dt.count-1,T.width,4)===Je?lt.count=Math.max(lt.count,Dt.start+Dt.count-lt.start):(++_t,ve[_t]=Dt)}ve.length=_t+1;const Qe=s.getParameter(s.UNPACK_ROW_LENGTH),pt=s.getParameter(s.UNPACK_SKIP_PIXELS),vt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,T.width);for(let Pe=0,lt=ve.length;Pe<lt;Pe++){const Dt=ve[Pe],Ct=Math.floor(Dt.start/4),Je=Math.ceil(Dt.count/4),Pt=Ct%T.width,K=Math.floor(Ct/T.width),nt=Je,Fe=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,Pt),s.pixelStorei(s.UNPACK_SKIP_ROWS,K),t.texSubImage2D(s.TEXTURE_2D,0,Pt,K,nt,Fe,ae,be,T.data)}V.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Qe),s.pixelStorei(s.UNPACK_SKIP_PIXELS,pt),s.pixelStorei(s.UNPACK_SKIP_ROWS,vt)}}function ie(V,T,ae){let be=s.TEXTURE_2D;(T.isDataArrayTexture||T.isCompressedArrayTexture)&&(be=s.TEXTURE_2D_ARRAY),T.isData3DTexture&&(be=s.TEXTURE_3D);const Re=se(V,T),ve=T.source;t.bindTexture(be,V.__webglTexture,s.TEXTURE0+ae);const _t=n.get(ve);if(ve.version!==_t.__version||Re===!0){t.activeTexture(s.TEXTURE0+ae);const Qe=Ht.getPrimaries(Ht.workingColorSpace),pt=T.colorSpace===Hi?null:Ht.getPrimaries(T.colorSpace),vt=T.colorSpace===Hi||Qe===pt?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,vt);let Pe=_(T.image,!1,i.maxTextureSize);Pe=st(T,Pe);const lt=r.convert(T.format,T.colorSpace),Dt=r.convert(T.type);let Ct=x(T.internalFormat,lt,Dt,T.colorSpace,T.isVideoTexture);me(be,T);let Je;const Pt=T.mipmaps,K=T.isVideoTexture!==!0,nt=_t.__version===void 0||Re===!0,Fe=ve.dataReady,at=F(T,Pe);if(T.isDepthTexture)Ct=S(T.format===xr,T.type),nt&&(K?t.texStorage2D(s.TEXTURE_2D,1,Ct,Pe.width,Pe.height):t.texImage2D(s.TEXTURE_2D,0,Ct,Pe.width,Pe.height,0,lt,Dt,null));else if(T.isDataTexture)if(Pt.length>0){K&&nt&&t.texStorage2D(s.TEXTURE_2D,at,Ct,Pt[0].width,Pt[0].height);for(let Oe=0,Ae=Pt.length;Oe<Ae;Oe++)Je=Pt[Oe],K?Fe&&t.texSubImage2D(s.TEXTURE_2D,Oe,0,0,Je.width,Je.height,lt,Dt,Je.data):t.texImage2D(s.TEXTURE_2D,Oe,Ct,Je.width,Je.height,0,lt,Dt,Je.data);T.generateMipmaps=!1}else K?(nt&&t.texStorage2D(s.TEXTURE_2D,at,Ct,Pe.width,Pe.height),Fe&&q(T,Pe,lt,Dt)):t.texImage2D(s.TEXTURE_2D,0,Ct,Pe.width,Pe.height,0,lt,Dt,Pe.data);else if(T.isCompressedTexture)if(T.isCompressedArrayTexture){K&&nt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,at,Ct,Pt[0].width,Pt[0].height,Pe.depth);for(let Oe=0,Ae=Pt.length;Oe<Ae;Oe++)if(Je=Pt[Oe],T.format!==Qn)if(lt!==null)if(K){if(Fe)if(T.layerUpdates.size>0){const dt=yh(Je.width,Je.height,T.format,T.type);for(const Ft of T.layerUpdates){const Jt=Je.data.subarray(Ft*dt/Je.data.BYTES_PER_ELEMENT,(Ft+1)*dt/Je.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Oe,0,0,Ft,Je.width,Je.height,1,lt,Jt)}T.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Oe,0,0,0,Je.width,Je.height,Pe.depth,lt,Je.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,Oe,Ct,Je.width,Je.height,Pe.depth,0,Je.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else K?Fe&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,Oe,0,0,0,Je.width,Je.height,Pe.depth,lt,Dt,Je.data):t.texImage3D(s.TEXTURE_2D_ARRAY,Oe,Ct,Je.width,Je.height,Pe.depth,0,lt,Dt,Je.data)}else{K&&nt&&t.texStorage2D(s.TEXTURE_2D,at,Ct,Pt[0].width,Pt[0].height);for(let Oe=0,Ae=Pt.length;Oe<Ae;Oe++)Je=Pt[Oe],T.format!==Qn?lt!==null?K?Fe&&t.compressedTexSubImage2D(s.TEXTURE_2D,Oe,0,0,Je.width,Je.height,lt,Je.data):t.compressedTexImage2D(s.TEXTURE_2D,Oe,Ct,Je.width,Je.height,0,Je.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):K?Fe&&t.texSubImage2D(s.TEXTURE_2D,Oe,0,0,Je.width,Je.height,lt,Dt,Je.data):t.texImage2D(s.TEXTURE_2D,Oe,Ct,Je.width,Je.height,0,lt,Dt,Je.data)}else if(T.isDataArrayTexture)if(K){if(nt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,at,Ct,Pe.width,Pe.height,Pe.depth),Fe)if(T.layerUpdates.size>0){const Oe=yh(Pe.width,Pe.height,T.format,T.type);for(const Ae of T.layerUpdates){const dt=Pe.data.subarray(Ae*Oe/Pe.data.BYTES_PER_ELEMENT,(Ae+1)*Oe/Pe.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,Ae,Pe.width,Pe.height,1,lt,Dt,dt)}T.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,Pe.width,Pe.height,Pe.depth,lt,Dt,Pe.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,Ct,Pe.width,Pe.height,Pe.depth,0,lt,Dt,Pe.data);else if(T.isData3DTexture)K?(nt&&t.texStorage3D(s.TEXTURE_3D,at,Ct,Pe.width,Pe.height,Pe.depth),Fe&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,Pe.width,Pe.height,Pe.depth,lt,Dt,Pe.data)):t.texImage3D(s.TEXTURE_3D,0,Ct,Pe.width,Pe.height,Pe.depth,0,lt,Dt,Pe.data);else if(T.isFramebufferTexture){if(nt)if(K)t.texStorage2D(s.TEXTURE_2D,at,Ct,Pe.width,Pe.height);else{let Oe=Pe.width,Ae=Pe.height;for(let dt=0;dt<at;dt++)t.texImage2D(s.TEXTURE_2D,dt,Ct,Oe,Ae,0,lt,Dt,null),Oe>>=1,Ae>>=1}}else if(Pt.length>0){if(K&&nt){const Oe=Yt(Pt[0]);t.texStorage2D(s.TEXTURE_2D,at,Ct,Oe.width,Oe.height)}for(let Oe=0,Ae=Pt.length;Oe<Ae;Oe++)Je=Pt[Oe],K?Fe&&t.texSubImage2D(s.TEXTURE_2D,Oe,0,0,lt,Dt,Je):t.texImage2D(s.TEXTURE_2D,Oe,Ct,lt,Dt,Je);T.generateMipmaps=!1}else if(K){if(nt){const Oe=Yt(Pe);t.texStorage2D(s.TEXTURE_2D,at,Ct,Oe.width,Oe.height)}Fe&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,lt,Dt,Pe)}else t.texImage2D(s.TEXTURE_2D,0,Ct,lt,Dt,Pe);p(T)&&f(be),_t.__version=ve.version,T.onUpdate&&T.onUpdate(T)}V.__version=T.version}function ee(V,T,ae){if(T.image.length!==6)return;const be=se(V,T),Re=T.source;t.bindTexture(s.TEXTURE_CUBE_MAP,V.__webglTexture,s.TEXTURE0+ae);const ve=n.get(Re);if(Re.version!==ve.__version||be===!0){t.activeTexture(s.TEXTURE0+ae);const _t=Ht.getPrimaries(Ht.workingColorSpace),Qe=T.colorSpace===Hi?null:Ht.getPrimaries(T.colorSpace),pt=T.colorSpace===Hi||_t===Qe?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,pt);const vt=T.isCompressedTexture||T.image[0].isCompressedTexture,Pe=T.image[0]&&T.image[0].isDataTexture,lt=[];for(let Ae=0;Ae<6;Ae++)!vt&&!Pe?lt[Ae]=_(T.image[Ae],!0,i.maxCubemapSize):lt[Ae]=Pe?T.image[Ae].image:T.image[Ae],lt[Ae]=st(T,lt[Ae]);const Dt=lt[0],Ct=r.convert(T.format,T.colorSpace),Je=r.convert(T.type),Pt=x(T.internalFormat,Ct,Je,T.colorSpace),K=T.isVideoTexture!==!0,nt=ve.__version===void 0||be===!0,Fe=Re.dataReady;let at=F(T,Dt);me(s.TEXTURE_CUBE_MAP,T);let Oe;if(vt){K&&nt&&t.texStorage2D(s.TEXTURE_CUBE_MAP,at,Pt,Dt.width,Dt.height);for(let Ae=0;Ae<6;Ae++){Oe=lt[Ae].mipmaps;for(let dt=0;dt<Oe.length;dt++){const Ft=Oe[dt];T.format!==Qn?Ct!==null?K?Fe&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt,0,0,Ft.width,Ft.height,Ct,Ft.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt,Pt,Ft.width,Ft.height,0,Ft.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):K?Fe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt,0,0,Ft.width,Ft.height,Ct,Je,Ft.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt,Pt,Ft.width,Ft.height,0,Ct,Je,Ft.data)}}}else{if(Oe=T.mipmaps,K&&nt){Oe.length>0&&at++;const Ae=Yt(lt[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,at,Pt,Ae.width,Ae.height)}for(let Ae=0;Ae<6;Ae++)if(Pe){K?Fe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,0,0,lt[Ae].width,lt[Ae].height,Ct,Je,lt[Ae].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,Pt,lt[Ae].width,lt[Ae].height,0,Ct,Je,lt[Ae].data);for(let dt=0;dt<Oe.length;dt++){const Jt=Oe[dt].image[Ae].image;K?Fe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt+1,0,0,Jt.width,Jt.height,Ct,Je,Jt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt+1,Pt,Jt.width,Jt.height,0,Ct,Je,Jt.data)}}else{K?Fe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,0,0,Ct,Je,lt[Ae]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,Pt,Ct,Je,lt[Ae]);for(let dt=0;dt<Oe.length;dt++){const Ft=Oe[dt];K?Fe&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt+1,0,0,Ct,Je,Ft.image[Ae]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,dt+1,Pt,Ct,Je,Ft.image[Ae])}}}p(T)&&f(s.TEXTURE_CUBE_MAP),ve.__version=Re.version,T.onUpdate&&T.onUpdate(T)}V.__version=T.version}function ue(V,T,ae,be,Re,ve){const _t=r.convert(ae.format,ae.colorSpace),Qe=r.convert(ae.type),pt=x(ae.internalFormat,_t,Qe,ae.colorSpace),vt=n.get(T),Pe=n.get(ae);if(Pe.__renderTarget=T,!vt.__hasExternalTextures){const lt=Math.max(1,T.width>>ve),Dt=Math.max(1,T.height>>ve);Re===s.TEXTURE_3D||Re===s.TEXTURE_2D_ARRAY?t.texImage3D(Re,ve,pt,lt,Dt,T.depth,0,_t,Qe,null):t.texImage2D(Re,ve,pt,lt,Dt,0,_t,Qe,null)}t.bindFramebuffer(s.FRAMEBUFFER,V),tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,be,Re,Pe.__webglTexture,0,Ne(T)):(Re===s.TEXTURE_2D||Re>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Re<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,be,Re,Pe.__webglTexture,ve),t.bindFramebuffer(s.FRAMEBUFFER,null)}function J(V,T,ae){if(s.bindRenderbuffer(s.RENDERBUFFER,V),T.depthBuffer){const be=T.depthTexture,Re=be&&be.isDepthTexture?be.type:null,ve=S(T.stencilBuffer,Re),_t=T.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Qe=Ne(T);tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Qe,ve,T.width,T.height):ae?s.renderbufferStorageMultisample(s.RENDERBUFFER,Qe,ve,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,ve,T.width,T.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,_t,s.RENDERBUFFER,V)}else{const be=T.textures;for(let Re=0;Re<be.length;Re++){const ve=be[Re],_t=r.convert(ve.format,ve.colorSpace),Qe=r.convert(ve.type),pt=x(ve.internalFormat,_t,Qe,ve.colorSpace),vt=Ne(T);ae&&tt(T)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,vt,pt,T.width,T.height):tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,vt,pt,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,pt,T.width,T.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function de(V,T){if(T&&T.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,V),!(T.depthTexture&&T.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const be=n.get(T.depthTexture);be.__renderTarget=T,(!be.__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),re(T.depthTexture,0);const Re=be.__webglTexture,ve=Ne(T);if(T.depthTexture.format===yr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Re,0,ve):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Re,0);else if(T.depthTexture.format===xr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Re,0,ve):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Re,0);else throw new Error("Unknown depthTexture format")}function we(V){const T=n.get(V),ae=V.isWebGLCubeRenderTarget===!0;if(T.__boundDepthTexture!==V.depthTexture){const be=V.depthTexture;if(T.__depthDisposeCallback&&T.__depthDisposeCallback(),be){const Re=()=>{delete T.__boundDepthTexture,delete T.__depthDisposeCallback,be.removeEventListener("dispose",Re)};be.addEventListener("dispose",Re),T.__depthDisposeCallback=Re}T.__boundDepthTexture=be}if(V.depthTexture&&!T.__autoAllocateDepthBuffer){if(ae)throw new Error("target.depthTexture not supported in Cube render targets");const be=V.texture.mipmaps;be&&be.length>0?de(T.__webglFramebuffer[0],V):de(T.__webglFramebuffer,V)}else if(ae){T.__webglDepthbuffer=[];for(let be=0;be<6;be++)if(t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[be]),T.__webglDepthbuffer[be]===void 0)T.__webglDepthbuffer[be]=s.createRenderbuffer(),J(T.__webglDepthbuffer[be],V,!1);else{const Re=V.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ve=T.__webglDepthbuffer[be];s.bindRenderbuffer(s.RENDERBUFFER,ve),s.framebufferRenderbuffer(s.FRAMEBUFFER,Re,s.RENDERBUFFER,ve)}}else{const be=V.texture.mipmaps;if(be&&be.length>0?t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer),T.__webglDepthbuffer===void 0)T.__webglDepthbuffer=s.createRenderbuffer(),J(T.__webglDepthbuffer,V,!1);else{const Re=V.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ve=T.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,ve),s.framebufferRenderbuffer(s.FRAMEBUFFER,Re,s.RENDERBUFFER,ve)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function Ze(V,T,ae){const be=n.get(V);T!==void 0&&ue(be.__webglFramebuffer,V,V.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),ae!==void 0&&we(V)}function We(V){const T=V.texture,ae=n.get(V),be=n.get(T);V.addEventListener("dispose",R);const Re=V.textures,ve=V.isWebGLCubeRenderTarget===!0,_t=Re.length>1;if(_t||(be.__webglTexture===void 0&&(be.__webglTexture=s.createTexture()),be.__version=T.version,o.memory.textures++),ve){ae.__webglFramebuffer=[];for(let Qe=0;Qe<6;Qe++)if(T.mipmaps&&T.mipmaps.length>0){ae.__webglFramebuffer[Qe]=[];for(let pt=0;pt<T.mipmaps.length;pt++)ae.__webglFramebuffer[Qe][pt]=s.createFramebuffer()}else ae.__webglFramebuffer[Qe]=s.createFramebuffer()}else{if(T.mipmaps&&T.mipmaps.length>0){ae.__webglFramebuffer=[];for(let Qe=0;Qe<T.mipmaps.length;Qe++)ae.__webglFramebuffer[Qe]=s.createFramebuffer()}else ae.__webglFramebuffer=s.createFramebuffer();if(_t)for(let Qe=0,pt=Re.length;Qe<pt;Qe++){const vt=n.get(Re[Qe]);vt.__webglTexture===void 0&&(vt.__webglTexture=s.createTexture(),o.memory.textures++)}if(V.samples>0&&tt(V)===!1){ae.__webglMultisampledFramebuffer=s.createFramebuffer(),ae.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,ae.__webglMultisampledFramebuffer);for(let Qe=0;Qe<Re.length;Qe++){const pt=Re[Qe];ae.__webglColorRenderbuffer[Qe]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,ae.__webglColorRenderbuffer[Qe]);const vt=r.convert(pt.format,pt.colorSpace),Pe=r.convert(pt.type),lt=x(pt.internalFormat,vt,Pe,pt.colorSpace,V.isXRRenderTarget===!0),Dt=Ne(V);s.renderbufferStorageMultisample(s.RENDERBUFFER,Dt,lt,V.width,V.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Qe,s.RENDERBUFFER,ae.__webglColorRenderbuffer[Qe])}s.bindRenderbuffer(s.RENDERBUFFER,null),V.depthBuffer&&(ae.__webglDepthRenderbuffer=s.createRenderbuffer(),J(ae.__webglDepthRenderbuffer,V,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(ve){t.bindTexture(s.TEXTURE_CUBE_MAP,be.__webglTexture),me(s.TEXTURE_CUBE_MAP,T);for(let Qe=0;Qe<6;Qe++)if(T.mipmaps&&T.mipmaps.length>0)for(let pt=0;pt<T.mipmaps.length;pt++)ue(ae.__webglFramebuffer[Qe][pt],V,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Qe,pt);else ue(ae.__webglFramebuffer[Qe],V,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Qe,0);p(T)&&f(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(_t){for(let Qe=0,pt=Re.length;Qe<pt;Qe++){const vt=Re[Qe],Pe=n.get(vt);t.bindTexture(s.TEXTURE_2D,Pe.__webglTexture),me(s.TEXTURE_2D,vt),ue(ae.__webglFramebuffer,V,vt,s.COLOR_ATTACHMENT0+Qe,s.TEXTURE_2D,0),p(vt)&&f(s.TEXTURE_2D)}t.unbindTexture()}else{let Qe=s.TEXTURE_2D;if((V.isWebGL3DRenderTarget||V.isWebGLArrayRenderTarget)&&(Qe=V.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Qe,be.__webglTexture),me(Qe,T),T.mipmaps&&T.mipmaps.length>0)for(let pt=0;pt<T.mipmaps.length;pt++)ue(ae.__webglFramebuffer[pt],V,T,s.COLOR_ATTACHMENT0,Qe,pt);else ue(ae.__webglFramebuffer,V,T,s.COLOR_ATTACHMENT0,Qe,0);p(T)&&f(Qe),t.unbindTexture()}V.depthBuffer&&we(V)}function B(V){const T=V.textures;for(let ae=0,be=T.length;ae<be;ae++){const Re=T[ae];if(p(Re)){const ve=v(V),_t=n.get(Re).__webglTexture;t.bindTexture(ve,_t),f(ve),t.unbindTexture()}}}const bt=[],ht=[];function it(V){if(V.samples>0){if(tt(V)===!1){const T=V.textures,ae=V.width,be=V.height;let Re=s.COLOR_BUFFER_BIT;const ve=V.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,_t=n.get(V),Qe=T.length>1;if(Qe)for(let vt=0;vt<T.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 pt=V.texture.mipmaps;pt&&pt.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglFramebuffer);for(let vt=0;vt<T.length;vt++){if(V.resolveDepthBuffer&&(V.depthBuffer&&(Re|=s.DEPTH_BUFFER_BIT),V.stencilBuffer&&V.resolveStencilBuffer&&(Re|=s.STENCIL_BUFFER_BIT)),Qe){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,_t.__webglColorRenderbuffer[vt]);const Pe=n.get(T[vt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Pe,0)}s.blitFramebuffer(0,0,ae,be,0,0,ae,be,Re,s.NEAREST),l===!0&&(bt.length=0,ht.length=0,bt.push(s.COLOR_ATTACHMENT0+vt),V.depthBuffer&&V.resolveDepthBuffer===!1&&(bt.push(ve),ht.push(ve),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,ht)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,bt))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Qe)for(let vt=0;vt<T.length;vt++){t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.RENDERBUFFER,_t.__webglColorRenderbuffer[vt]);const Pe=n.get(T[vt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.TEXTURE_2D,Pe,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglMultisampledFramebuffer)}else if(V.depthBuffer&&V.resolveDepthBuffer===!1&&l){const T=V.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[T])}}}function Ne(V){return Math.min(i.maxSamples,V.samples)}function tt(V){const T=n.get(V);return V.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&T.__useRenderToTexture!==!1}function Le(V){const T=o.render.frame;d.get(V)!==T&&(d.set(V,T),V.update())}function st(V,T){const ae=V.colorSpace,be=V.format,Re=V.type;return V.isCompressedTexture===!0||V.isVideoTexture===!0||ae!==Xs&&ae!==Hi&&(Ht.getTransfer(ae)===on?(be!==Qn||Re!==mi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ae)),T}function Yt(V){return typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement?(c.width=V.naturalWidth||V.width,c.height=V.naturalHeight||V.height):typeof VideoFrame<"u"&&V instanceof VideoFrame?(c.width=V.displayWidth,c.height=V.displayHeight):(c.width=V.width,c.height=V.height),c}this.allocateTextureUnit=H,this.resetTextureUnits=z,this.setTexture2D=re,this.setTexture2DArray=G,this.setTexture3D=le,this.setTextureCube=Z,this.rebindTextures=Ze,this.setupRenderTarget=We,this.updateRenderTargetMipmap=B,this.updateMultisampleRenderTarget=it,this.setupDepthRenderbuffer=we,this.setupFrameBufferTexture=ue,this.useMultisampledRTT=tt}function C3(s,e){function t(n,i=Hi){let r;const o=Ht.getTransfer(i);if(n===mi)return s.UNSIGNED_BYTE;if(n===jl)return s.UNSIGNED_SHORT_4_4_4_4;if(n===ql)return s.UNSIGNED_SHORT_5_5_5_1;if(n===S0)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===M0)return s.BYTE;if(n===b0)return s.SHORT;if(n===_r)return s.UNSIGNED_SHORT;if(n===Xl)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===E0)return s.ALPHA;if(n===A0)return s.RGB;if(n===Qn)return s.RGBA;if(n===yr)return s.DEPTH_COMPONENT;if(n===xr)return s.DEPTH_STENCIL;if(n===w0)return s.RED;if(n===$l)return s.RED_INTEGER;if(n===T0)return s.RG;if(n===Yl)return s.RG_INTEGER;if(n===Jl)return s.RGBA_INTEGER;if(n===ga||n===_a||n===va||n===ya)if(o===on)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===on?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return o===on?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===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return o===on?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return o===on?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===on?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===C0||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 R3=`
|
|
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 P3{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new Pn,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:R3,fragmentShader:D3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new zt(new Pi(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class L3 extends fs{constructor(e,t){super();const n=this;let i=null,r=1,a=null,o="local-floor",l=1,c=null,d=null,m=null,u=null,h=null,g=null;const _=new P3,p=t.getContextAttributes();let f=null,v=null;const x=[],b=[],F=new Ze;let C=null;const R=new wn;R.viewport=new qt;const L=new wn;L.viewport=new qt;const A=[R,L],E=new $1;let P=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(W){let j=x[W];return j===void 0&&(j=new po,x[W]=j),j.getTargetRaySpace()},this.getControllerGrip=function(W){let j=x[W];return j===void 0&&(j=new po,x[W]=j),j.getGripSpace()},this.getHand=function(W){let j=x[W];return j===void 0&&(j=new po,x[W]=j),j.getHandSpace()};function H(W){const j=b.indexOf(W.inputSource);if(j===-1)return;const ne=x[j];ne!==void 0&&(ne.update(W.inputSource,W.frame,c||a),ne.dispatchEvent({type:W.type,data:W.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",re);for(let W=0;W<x.length;W++){const j=b[W];j!==null&&(b[W]=null,x[W].disconnect(j))}P=null,z=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(W){r=W,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(W){o=W,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(W){c=W},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(W){if(i=W,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",re),p.xrCompatible!==!0&&await t.makeXRCompatible(),C=e.getPixelRatio(),e.getSize(F),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ne=null,ee=null,ce=null;p.depth&&(ce=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ne=p.stencil?xr:yr,ee=p.stencil?vr:us);const q={colorFormat:t.RGBA8,depthFormat:ce,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer(q),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),v=new ds(u.textureWidth,u.textureHeight,{format:ei,type:gi,depthTexture:new G0(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 ds(h.framebufferWidth,h.framebufferHeight,{format:ei,type:gi,colorSpace:e.outputColorSpace,stencilBuffer:p.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}v.isXRRenderTarget=!0,this.setFoveation(l),c=null,a=await i.requestReferenceSpace(o),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 re(W){for(let j=0;j<W.removed.length;j++){const ne=W.removed[j],ee=b.indexOf(ne);ee>=0&&(b[ee]=null,x[ee].disconnect(ne))}for(let j=0;j<W.added.length;j++){const ne=W.added[j];let ee=b.indexOf(ne);if(ee===-1){for(let q=0;q<x.length;q++)if(q>=b.length){b.push(ne),ee=q;break}else if(b[q]===null){b[q]=ne,ee=q;break}if(ee===-1)break}const ce=x[ee];ce&&ce.connect(ne)}}const G=new I,le=new I;function K(W,j,ne){G.setFromMatrixPosition(j.matrixWorld),le.setFromMatrixPosition(ne.matrixWorld);const ee=G.distanceTo(le),ce=j.projectionMatrix.elements,q=ne.projectionMatrix.elements,he=ce[14]/(ce[10]-1),Se=ce[14]/(ce[10]+1),Ke=(ce[9]+1)/ce[5],Ve=(ce[9]-1)/ce[5],B=(ce[8]-1)/ce[0],yt=(q[8]+1)/q[0],ht=he*B,nt=he*yt,Le=ee/(-B+yt),Qe=Le*-B;if(j.matrixWorld.decompose(W.position,W.quaternion,W.scale),W.translateX(Qe),W.translateZ(Le),W.matrixWorld.compose(W.position,W.quaternion,W.scale),W.matrixWorldInverse.copy(W.matrixWorld).invert(),ce[10]===-1)W.projectionMatrix.copy(j.projectionMatrix),W.projectionMatrixInverse.copy(j.projectionMatrixInverse);else{const Ce=he+Le,st=Se+Le,tn=ht-Qe,k=nt+(ee-Qe),T=Ke*Se/st*Ce,ae=Ve*Se/st*Ce;W.projectionMatrix.makePerspective(tn,k,T,ae,Ce,st),W.projectionMatrixInverse.copy(W.projectionMatrix).invert()}}function pe(W,j){j===null?W.matrixWorld.copy(W.matrix):W.matrixWorld.multiplyMatrices(j.matrixWorld,W.matrix),W.matrixWorldInverse.copy(W.matrixWorld).invert()}this.updateCamera=function(W){if(i===null)return;let j=W.near,ne=W.far;_.texture!==null&&(_.depthNear>0&&(j=_.depthNear),_.depthFar>0&&(ne=_.depthFar)),E.near=L.near=R.near=j,E.far=L.far=R.far=ne,(P!==E.near||z!==E.far)&&(i.updateRenderState({depthNear:E.near,depthFar:E.far}),P=E.near,z=E.far),R.layers.mask=W.layers.mask|2,L.layers.mask=W.layers.mask|4,E.layers.mask=R.layers.mask|L.layers.mask;const ee=W.parent,ce=E.cameras;pe(E,ee);for(let q=0;q<ce.length;q++)pe(ce[q],ee);ce.length===2?K(E,R,L):E.projectionMatrix.copy(R.projectionMatrix),Me(W,E,ee)};function Me(W,j,ne){ne===null?W.matrix.copy(j.matrixWorld):(W.matrix.copy(ne.matrixWorld),W.matrix.invert(),W.matrix.multiply(j.matrixWorld)),W.matrix.decompose(W.position,W.quaternion,W.scale),W.updateMatrixWorld(!0),W.projectionMatrix.copy(j.projectionMatrix),W.projectionMatrixInverse.copy(j.projectionMatrixInverse),W.isPerspectiveCamera&&(W.fov=js*2*Math.atan(1/W.projectionMatrix.elements[5]),W.zoom=1)}this.getCamera=function(){return E},this.getFoveation=function(){if(!(u===null&&h===null))return l},this.setFoveation=function(W){l=W,u!==null&&(u.fixedFoveation=W),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=W)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(E)};let ye=null;function de(W,j){if(d=j.getViewerPose(c||a),g=j,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 he=0;he<ne.length;he++){const Se=ne[he];let Ke=null;if(h!==null)Ke=h.getViewport(Se);else{const B=m.getViewSubImage(u,Se);Ke=B.viewport,he===0&&(e.setRenderTargetTextures(v,B.colorTexture,B.depthStencilTexture),e.setRenderTarget(v))}let Ve=A[he];Ve===void 0&&(Ve=new wn,Ve.layers.enable(he),Ve.viewport=new qt,A[he]=Ve),Ve.matrix.fromArray(Se.transform.matrix),Ve.matrix.decompose(Ve.position,Ve.quaternion,Ve.scale),Ve.projectionMatrix.fromArray(Se.projectionMatrix),Ve.projectionMatrixInverse.copy(Ve.projectionMatrix).invert(),Ve.viewport.set(Ke.x,Ke.y,Ke.width,Ke.height),he===0&&(E.matrix.copy(Ve.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),ee===!0&&E.cameras.push(Ve)}const ce=i.enabledFeatures;if(ce&&ce.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const he=m.getDepthInformation(ne[0]);he&&he.isValid&&he.texture&&_.init(e,he,i.renderState)}}for(let ne=0;ne<x.length;ne++){const ee=b[ne],ce=x[ne];ee!==null&&ce!==void 0&&ce.update(ee,j,c||a)}ye&&ye(W,j),j.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:j}),g=null}const se=new Q0;se.setAnimationLoop(de),this.setAnimationLoop=function(W){ye=W},this.dispose=function(){}}}const ns=new Tn,F3=new Et;function U3(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,x,b){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,b)):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?(a(p,f),f.isLineDashedMaterial&&o(p,f)):f.isPointsMaterial?l(p,f,v,x):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===On&&(p.bumpScale.value*=-1)),f.normalMap&&(p.normalMap.value=f.normalMap,t(f.normalMap,p.normalMapTransform),p.normalScale.value.copy(f.normalScale),f.side===On&&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),x=v.envMap,b=v.envMapRotation;x&&(p.envMap.value=x,ns.copy(b),ns.x*=-1,ns.y*=-1,ns.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(ns.y*=-1,ns.z*=-1),p.envMapRotation.value.setFromMatrix4(F3.makeRotationFromEuler(ns)),p.flipEnvMap.value=x.isCubeTexture&&x.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 a(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 o(p,f){p.dashSize.value=f.dashSize,p.totalSize.value=f.dashSize+f.gapSize,p.scale.value=f.scale}function l(p,f,v,x){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.size.value=f.size*v,p.scale.value=x*.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===On&&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={},a=[];const o=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,x){const b=x.program;n.uniformBlockBinding(v,b)}function c(v,x){let b=i[v.id];b===void 0&&(g(v),b=d(v),i[v.id]=b,v.addEventListener("dispose",p));const F=x.program;n.updateUBOMapping(v,F);const C=e.render.frame;r[v.id]!==C&&(u(v),r[v.id]=C)}function d(v){const x=m();v.__bindingPointIndex=x;const b=s.createBuffer(),F=v.__size,C=v.usage;return s.bindBuffer(s.UNIFORM_BUFFER,b),s.bufferData(s.UNIFORM_BUFFER,F,C),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,x,b),b}function m(){for(let v=0;v<o;v++)if(a.indexOf(v)===-1)return a.push(v),v;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function u(v){const x=i[v.id],b=v.uniforms,F=v.__cache;s.bindBuffer(s.UNIFORM_BUFFER,x);for(let C=0,R=b.length;C<R;C++){const L=Array.isArray(b[C])?b[C]:[b[C]];for(let A=0,E=L.length;A<E;A++){const P=L[A];if(h(P,C,A,F)===!0){const z=P.__offset,H=Array.isArray(P.value)?P.value:[P.value];let Q=0;for(let re=0;re<H.length;re++){const G=H[re],le=_(G);typeof G=="number"||typeof G=="boolean"?(P.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,z+Q,P.__data)):G.isMatrix3?(P.__data[0]=G.elements[0],P.__data[1]=G.elements[1],P.__data[2]=G.elements[2],P.__data[3]=0,P.__data[4]=G.elements[3],P.__data[5]=G.elements[4],P.__data[6]=G.elements[5],P.__data[7]=0,P.__data[8]=G.elements[6],P.__data[9]=G.elements[7],P.__data[10]=G.elements[8],P.__data[11]=0):(G.toArray(P.__data,Q),Q+=le.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,z,P.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(v,x,b,F){const C=v.value,R=x+"_"+b;if(F[R]===void 0)return typeof C=="number"||typeof C=="boolean"?F[R]=C:F[R]=C.clone(),!0;{const L=F[R];if(typeof C=="number"||typeof C=="boolean"){if(L!==C)return F[R]=C,!0}else if(L.equals(C)===!1)return L.copy(C),!0}return!1}function g(v){const x=v.uniforms;let b=0;const F=16;for(let R=0,L=x.length;R<L;R++){const A=Array.isArray(x[R])?x[R]:[x[R]];for(let E=0,P=A.length;E<P;E++){const z=A[E],H=Array.isArray(z.value)?z.value:[z.value];for(let Q=0,re=H.length;Q<re;Q++){const G=H[Q],le=_(G),K=b%F,pe=K%le.boundary,Me=K+pe;b+=pe,Me!==0&&F-Me<le.storage&&(b+=F-Me),z.__data=new Float32Array(le.storage/Float32Array.BYTES_PER_ELEMENT),z.__offset=b,b+=le.storage}}}const C=b%F;return C>0&&(b+=F-C),v.__size=b,v.__cache={},this}function _(v){const x={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(x.boundary=4,x.storage=4):v.isVector2?(x.boundary=8,x.storage=8):v.isVector3||v.isColor?(x.boundary=16,x.storage=12):v.isVector4?(x.boundary=16,x.storage=16):v.isMatrix3?(x.boundary=48,x.storage=48):v.isMatrix4?(x.boundary=64,x.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),x}function p(v){const x=v.target;x.removeEventListener("dispose",p);const b=a.indexOf(x.__bindingPointIndex);a.splice(b,1),s.deleteBuffer(i[x.id]),delete i[x.id],delete r[x.id]}function f(){for(const v in i)s.deleteBuffer(i[v]);a=[],i={},r={}}return{bind:l,update:c,dispose:f}}class su{constructor(e={}){const{canvas:t=F2(),context:n=null,depth:i=!0,stencil:r=!1,alpha:a=!1,antialias:o=!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=a;const g=new Uint32Array(4),_=new Int32Array(4);let p=null,f=null;const v=[],x=[];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=ji,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const b=this;let F=!1;this._outputColorSpace=Zt;let C=0,R=0,L=null,A=-1,E=null;const P=new qt,z=new qt;let H=null;const Q=new Tt(0);let re=0,G=t.width,le=t.height,K=1,pe=null,Me=null;const ye=new qt(0,0,G,le),de=new qt(0,0,G,le);let se=!1;const W=new ic;let j=!1,ne=!1;const ee=new Et,ce=new Et,q=new I,he=new qt,Se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ke=!1;function Ve(){return L===null?K:1}let B=n;function yt(w,O){return t.getContext(w,O)}try{const w={alpha:!0,depth:i,stencil:r,antialias:o,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:m};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Hl}`),t.addEventListener("webglcontextlost",at,!1),t.addEventListener("webglcontextrestored",ze,!1),t.addEventListener("webglcontextcreationerror",be,!1),B===null){const O="webgl2";if(B=yt(O,w),B===null)throw yt(O)?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 ht,nt,Le,Qe,Ce,st,tn,k,T,ae,xe,Te,me,gt,Xe,dt,mt,De,rt,Ct,xt,Ye,Lt,Y;function et(){ht=new jp(B),ht.init(),Ye=new C3(B,ht),nt=new Op(B,ht,e,Ye),Le=new w3(B,ht),nt.reverseDepthBuffer&&u&&Le.buffers.depth.setReversed(!0),Qe=new Yp(B),Ce=new f3,st=new T3(B,ht,Le,Ce,nt,Ye,Qe),tn=new Vp(b),k=new Xp(b),T=new ed(B),Lt=new zp(B,T),ae=new qp(B,T,Qe,Lt),xe=new Kp(B,ae,T,Qe),rt=new Jp(B,nt,st),dt=new kp(Ce),Te=new d3(b,tn,k,ht,nt,Lt,dt),me=new U3(b,Ce),gt=new m3,Xe=new M3(ht),De=new Ip(b,tn,k,Le,xe,h,l),mt=new E3(b,xe,nt),Y=new N3(B,Qe,nt,Le),Ct=new Bp(B,ht,Qe),xt=new $p(B,ht,Qe),Qe.programs=Te.programs,b.capabilities=nt,b.extensions=ht,b.properties=Ce,b.renderLists=gt,b.shadowMap=mt,b.state=Le,b.info=Qe}et();const Pe=new L3(b,B);this.xr=Pe,this.getContext=function(){return B},this.getContextAttributes=function(){return B.getContextAttributes()},this.forceContextLoss=function(){const w=ht.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){const w=ht.get("WEBGL_lose_context");w&&w.restoreContext()},this.getPixelRatio=function(){return K},this.setPixelRatio=function(w){w!==void 0&&(K=w,this.setSize(G,le,!1))},this.getSize=function(w){return w.set(G,le)},this.setSize=function(w,O,J=!0){if(Pe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=w,le=O,t.width=Math.floor(w*K),t.height=Math.floor(O*K),J===!0&&(t.style.width=w+"px",t.style.height=O+"px"),this.setViewport(0,0,w,O)},this.getDrawingBufferSize=function(w){return w.set(G*K,le*K).floor()},this.setDrawingBufferSize=function(w,O,J){G=w,le=O,K=J,t.width=Math.floor(w*J),t.height=Math.floor(O*J),this.setViewport(0,0,w,O)},this.getCurrentViewport=function(w){return w.copy(P)},this.getViewport=function(w){return w.copy(ye)},this.setViewport=function(w,O,J,V){w.isVector4?ye.set(w.x,w.y,w.z,w.w):ye.set(w,O,J,V),Le.viewport(P.copy(ye).multiplyScalar(K).round())},this.getScissor=function(w){return w.copy(de)},this.setScissor=function(w,O,J,V){w.isVector4?de.set(w.x,w.y,w.z,w.w):de.set(w,O,J,V),Le.scissor(z.copy(de).multiplyScalar(K).round())},this.getScissorTest=function(){return se},this.setScissorTest=function(w){Le.setScissorTest(se=w)},this.setOpaqueSort=function(w){pe=w},this.setTransparentSort=function(w){Me=w},this.getClearColor=function(w){return w.copy(De.getClearColor())},this.setClearColor=function(){De.setClearColor(...arguments)},this.getClearAlpha=function(){return De.getClearAlpha()},this.setClearAlpha=function(){De.setClearAlpha(...arguments)},this.clear=function(w=!0,O=!0,J=!0){let V=0;if(w){let X=!1;if(L!==null){const ie=L.texture.format;X=ie===Jl||ie===Yl||ie===$l}if(X){const ie=L.texture.type,_e=ie===gi||ie===us||ie===_r||ie===vr||ie===jl||ie===ql,Ie=De.getClearColor(),Be=De.getClearAlpha(),tt=Ie.r,We=Ie.g,qe=Ie.b;_e?(g[0]=tt,g[1]=We,g[2]=qe,g[3]=Be,B.clearBufferuiv(B.COLOR,0,g)):(_[0]=tt,_[1]=We,_[2]=qe,_[3]=Be,B.clearBufferiv(B.COLOR,0,_))}else V|=B.COLOR_BUFFER_BIT}O&&(V|=B.DEPTH_BUFFER_BIT),J&&(V|=B.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),B.clear(V)},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",at,!1),t.removeEventListener("webglcontextrestored",ze,!1),t.removeEventListener("webglcontextcreationerror",be,!1),De.dispose(),gt.dispose(),Xe.dispose(),Ce.dispose(),tn.dispose(),k.dispose(),xe.dispose(),Lt.dispose(),Y.dispose(),Te.dispose(),Pe.dispose(),Pe.removeEventListener("sessionstart",ue),Pe.removeEventListener("sessionend",Re),Ee.stop()};function at(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),F=!0}function ze(){console.log("THREE.WebGLRenderer: Context Restored."),F=!1;const w=Qe.autoReset,O=mt.enabled,J=mt.autoUpdate,V=mt.needsUpdate,X=mt.type;et(),Qe.autoReset=w,mt.enabled=O,mt.autoUpdate=J,mt.needsUpdate=V,mt.type=X}function be(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function ut(w){const O=w.target;O.removeEventListener("dispose",ut),Ut(O)}function Ut(w){sn(w),Ce.remove(w)}function sn(w){const O=Ce.get(w).programs;O!==void 0&&(O.forEach(function(J){Te.releaseProgram(J)}),w.isShaderMaterial&&Te.releaseShaderCache(w))}this.renderBufferDirect=function(w,O,J,V,X,ie){O===null&&(O=Se);const _e=X.isMesh&&X.matrixWorld.determinant()<0,Ie=bt(w,O,J,V,X);Le.setMaterial(V,_e);let Be=J.index,tt=1;if(V.wireframe===!0){if(Be=ae.getWireframeAttribute(J),Be===void 0)return;tt=2}const We=J.drawRange,qe=J.attributes.position;let lt=We.start*tt,Ft=(We.start+We.count)*tt;ie!==null&&(lt=Math.max(lt,ie.start*tt),Ft=Math.min(Ft,(ie.start+ie.count)*tt)),Be!==null?(lt=Math.max(lt,0),Ft=Math.min(Ft,Be.count)):qe!=null&&(lt=Math.max(lt,0),Ft=Math.min(Ft,qe.count));const Bt=Ft-lt;if(Bt<0||Bt===1/0)return;Lt.setup(X,V,Ie,J,Be);let Xt,Pt=Ct;if(Be!==null&&(Xt=T.get(Be),Pt=xt,Pt.setIndex(Xt)),X.isMesh)V.wireframe===!0?(Le.setLineWidth(V.wireframeLinewidth*Ve()),Pt.setMode(B.LINES)):Pt.setMode(B.TRIANGLES);else if(X.isLine){let pt=V.linewidth;pt===void 0&&(pt=1),Le.setLineWidth(pt*Ve()),X.isLineSegments?Pt.setMode(B.LINES):X.isLineLoop?Pt.setMode(B.LINE_LOOP):Pt.setMode(B.LINE_STRIP)}else X.isPoints?Pt.setMode(B.POINTS):X.isSprite&&Pt.setMode(B.TRIANGLES);if(X.isBatchedMesh)if(X._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Pt.renderMultiDrawInstances(X._multiDrawStarts,X._multiDrawCounts,X._multiDrawCount,X._multiDrawInstances);else if(ht.get("WEBGL_multi_draw"))Pt.renderMultiDraw(X._multiDrawStarts,X._multiDrawCounts,X._multiDrawCount);else{const pt=X._multiDrawStarts,Fe=X._multiDrawCounts,At=X._multiDrawCount,Ot=Be?T.get(Be).bytesPerElement:1,Ht=Ce.get(V).currentProgram.getUniforms();for(let un=0;un<At;un++)Ht.setValue(B,"_gl_DrawID",un),Pt.render(pt[un]/Ot,Fe[un])}else if(X.isInstancedMesh)Pt.renderInstances(lt,Bt,X.count);else if(J.isInstancedBufferGeometry){const pt=J._maxInstanceCount!==void 0?J._maxInstanceCount:1/0,Fe=Math.min(J.instanceCount,pt);Pt.renderInstances(lt,Bt,Fe)}else Pt.render(lt,Bt)};function It(w,O,J){w.transparent===!0&&w.side===gn&&w.forceSinglePass===!1?(w.side=On,w.needsUpdate=!0,te(w,O,J),w.side=ti,w.needsUpdate=!0,te(w,O,J),w.side=gn):te(w,O,J)}this.compile=function(w,O,J=null){J===null&&(J=w),f=Xe.get(J),f.init(O),x.push(f),J.traverseVisible(function(X){X.isLight&&X.layers.test(O.layers)&&(f.pushLight(X),X.castShadow&&f.pushShadow(X))}),w!==J&&w.traverseVisible(function(X){X.isLight&&X.layers.test(O.layers)&&(f.pushLight(X),X.castShadow&&f.pushShadow(X))}),f.setupLights();const V=new Set;return w.traverse(function(X){if(!(X.isMesh||X.isPoints||X.isLine||X.isSprite))return;const ie=X.material;if(ie)if(Array.isArray(ie))for(let _e=0;_e<ie.length;_e++){const Ie=ie[_e];It(Ie,J,X),V.add(Ie)}else It(ie,J,X),V.add(ie)}),f=x.pop(),V},this.compileAsync=function(w,O,J=null){const V=this.compile(w,O,J);return new Promise(X=>{function ie(){if(V.forEach(function(_e){Ce.get(_e).currentProgram.isReady()&&V.delete(_e)}),V.size===0){X(w);return}setTimeout(ie,10)}ht.get("KHR_parallel_shader_compile")!==null?ie():setTimeout(ie,10)})};let Z=null;function $(w){Z&&Z(w)}function ue(){Ee.stop()}function Re(){Ee.start()}const Ee=new Q0;Ee.setAnimationLoop($),typeof self<"u"&&Ee.setContext(self),this.setAnimationLoop=function(w){Z=w,Pe.setAnimationLoop(w),w===null?Ee.stop():Ee.start()},Pe.addEventListener("sessionstart",ue),Pe.addEventListener("sessionend",Re),this.render=function(w,O){if(O!==void 0&&O.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(),O.parent===null&&O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),Pe.enabled===!0&&Pe.isPresenting===!0&&(Pe.cameraAutoUpdate===!0&&Pe.updateCamera(O),O=Pe.getCamera()),w.isScene===!0&&w.onBeforeRender(b,w,O,L),f=Xe.get(w,x.length),f.init(O),x.push(f),ce.multiplyMatrices(O.projectionMatrix,O.matrixWorldInverse),W.setFromProjectionMatrix(ce),ne=this.localClippingEnabled,j=dt.init(this.clippingPlanes,ne),p=gt.get(w,v.length),p.init(),v.push(p),Pe.enabled===!0&&Pe.isPresenting===!0){const ie=b.xr.getDepthSensingMesh();ie!==null&&ge(ie,O,-1/0,b.sortObjects)}ge(w,O,0,b.sortObjects),p.finish(),b.sortObjects===!0&&p.sort(pe,Me),Ke=Pe.enabled===!1||Pe.isPresenting===!1||Pe.hasDepthSensing()===!1,Ke&&De.addToRenderList(p,w),this.info.render.frame++,j===!0&&dt.beginShadows();const J=f.state.shadowsArray;mt.render(J,w,O),j===!0&&dt.endShadows(),this.info.autoReset===!0&&this.info.reset();const V=p.opaque,X=p.transmissive;if(f.setupLights(),O.isArrayCamera){const ie=O.cameras;if(X.length>0)for(let _e=0,Ie=ie.length;_e<Ie;_e++){const Be=ie[_e];ve(V,X,w,Be)}Ke&&De.render(w);for(let _e=0,Ie=ie.length;_e<Ie;_e++){const Be=ie[_e];Oe(p,w,Be,Be.viewport)}}else X.length>0&&ve(V,X,w,O),Ke&&De.render(w),Oe(p,w,O);L!==null&&R===0&&(st.updateMultisampleRenderTarget(L),st.updateRenderTargetMipmap(L)),w.isScene===!0&&w.onAfterRender(b,w,O),Lt.resetDefaultState(),A=-1,E=null,x.pop(),x.length>0?(f=x[x.length-1],j===!0&&dt.setGlobalState(b.clippingPlanes,f.state.camera)):f=null,v.pop(),v.length>0?p=v[v.length-1]:p=null};function ge(w,O,J,V){if(w.visible===!1)return;if(w.layers.test(O.layers)){if(w.isGroup)J=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(O);else if(w.isLight)f.pushLight(w),w.castShadow&&f.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||W.intersectsSprite(w)){V&&he.setFromMatrixPosition(w.matrixWorld).applyMatrix4(ce);const _e=xe.update(w),Ie=w.material;Ie.visible&&p.push(w,_e,Ie,J,he.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||W.intersectsObject(w))){const _e=xe.update(w),Ie=w.material;if(V&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),he.copy(w.boundingSphere.center)):(_e.boundingSphere===null&&_e.computeBoundingSphere(),he.copy(_e.boundingSphere.center)),he.applyMatrix4(w.matrixWorld).applyMatrix4(ce)),Array.isArray(Ie)){const Be=_e.groups;for(let tt=0,We=Be.length;tt<We;tt++){const qe=Be[tt],lt=Ie[qe.materialIndex];lt&<.visible&&p.push(w,_e,lt,J,he.z,qe)}}else Ie.visible&&p.push(w,_e,Ie,J,he.z,null)}}const ie=w.children;for(let _e=0,Ie=ie.length;_e<Ie;_e++)ge(ie[_e],O,J,V)}function Oe(w,O,J,V){const X=w.opaque,ie=w.transmissive,_e=w.transparent;f.setupLightsView(J),j===!0&&dt.setGlobalState(b.clippingPlanes,J),V&&Le.viewport(P.copy(V)),X.length>0&&Ae(X,O,J),ie.length>0&&Ae(ie,O,J),_e.length>0&&Ae(_e,O,J),Le.buffers.depth.setTest(!0),Le.buffers.depth.setMask(!0),Le.buffers.color.setMask(!0),Le.setPolygonOffset(!1)}function ve(w,O,J,V){if((J.isScene===!0?J.overrideMaterial:null)!==null)return;f.state.transmissionRenderTarget[V.id]===void 0&&(f.state.transmissionRenderTarget[V.id]=new ds(1,1,{generateMipmaps:!0,type:ht.has("EXT_color_buffer_half_float")||ht.has("EXT_color_buffer_float")?Sr:gi,minFilter:wi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Wt.workingColorSpace}));const ie=f.state.transmissionRenderTarget[V.id],_e=V.viewport||P;ie.setSize(_e.z*b.transmissionResolutionScale,_e.w*b.transmissionResolutionScale);const Ie=b.getRenderTarget();b.setRenderTarget(ie),b.getClearColor(Q),re=b.getClearAlpha(),re<1&&b.setClearColor(16777215,.5),b.clear(),Ke&&De.render(J);const Be=b.toneMapping;b.toneMapping=ji;const tt=V.viewport;if(V.viewport!==void 0&&(V.viewport=void 0),f.setupLightsView(V),j===!0&&dt.setGlobalState(b.clippingPlanes,V),Ae(w,J,V),st.updateMultisampleRenderTarget(ie),st.updateRenderTargetMipmap(ie),ht.has("WEBGL_multisampled_render_to_texture")===!1){let We=!1;for(let qe=0,lt=O.length;qe<lt;qe++){const Ft=O[qe],Bt=Ft.object,Xt=Ft.geometry,Pt=Ft.material,pt=Ft.group;if(Pt.side===gn&&Bt.layers.test(V.layers)){const Fe=Pt.side;Pt.side=On,Pt.needsUpdate=!0,je(Bt,J,V,Xt,Pt,pt),Pt.side=Fe,Pt.needsUpdate=!0,We=!0}}We===!0&&(st.updateMultisampleRenderTarget(ie),st.updateRenderTargetMipmap(ie))}b.setRenderTarget(Ie),b.setClearColor(Q,re),tt!==void 0&&(V.viewport=tt),b.toneMapping=Be}function Ae(w,O,J){const V=O.isScene===!0?O.overrideMaterial:null;for(let X=0,ie=w.length;X<ie;X++){const _e=w[X],Ie=_e.object,Be=_e.geometry,tt=_e.group;let We=_e.material;We.allowOverride===!0&&V!==null&&(We=V),Ie.layers.test(J.layers)&&je(Ie,O,J,Be,We,tt)}}function je(w,O,J,V,X,ie){w.onBeforeRender(b,O,J,V,X,ie),w.modelViewMatrix.multiplyMatrices(J.matrixWorldInverse,w.matrixWorld),w.normalMatrix.getNormalMatrix(w.modelViewMatrix),X.onBeforeRender(b,O,J,V,w,ie),X.transparent===!0&&X.side===gn&&X.forceSinglePass===!1?(X.side=On,X.needsUpdate=!0,b.renderBufferDirect(J,O,V,X,w,ie),X.side=ti,X.needsUpdate=!0,b.renderBufferDirect(J,O,V,X,w,ie),X.side=gn):b.renderBufferDirect(J,O,V,X,w,ie),w.onAfterRender(b,O,J,V,X,ie)}function te(w,O,J){O.isScene!==!0&&(O=Se);const V=Ce.get(w),X=f.state.lights,ie=f.state.shadowsArray,_e=X.state.version,Ie=Te.getParameters(w,X.state,ie,O,J),Be=Te.getProgramCacheKey(Ie);let tt=V.programs;V.environment=w.isMeshStandardMaterial?O.environment:null,V.fog=O.fog,V.envMap=(w.isMeshStandardMaterial?k:tn).get(w.envMap||V.environment),V.envMapRotation=V.environment!==null&&w.envMap===null?O.environmentRotation:w.envMapRotation,tt===void 0&&(w.addEventListener("dispose",ut),tt=new Map,V.programs=tt);let We=tt.get(Be);if(We!==void 0){if(V.currentProgram===We&&V.lightsStateVersion===_e)return Mt(w,Ie),We}else Ie.uniforms=Te.getUniforms(w),w.onBeforeCompile(Ie,b),We=Te.acquireProgram(Ie,Be),tt.set(Be,We),V.uniforms=Ie.uniforms;const qe=V.uniforms;return(!w.isShaderMaterial&&!w.isRawShaderMaterial||w.clipping===!0)&&(qe.clippingPlanes=dt.uniform),Mt(w,Ie),V.needsLights=Yt(w),V.lightsStateVersion=_e,V.needsLights&&(qe.ambientLightColor.value=X.state.ambient,qe.lightProbe.value=X.state.probe,qe.directionalLights.value=X.state.directional,qe.directionalLightShadows.value=X.state.directionalShadow,qe.spotLights.value=X.state.spot,qe.spotLightShadows.value=X.state.spotShadow,qe.rectAreaLights.value=X.state.rectArea,qe.ltc_1.value=X.state.rectAreaLTC1,qe.ltc_2.value=X.state.rectAreaLTC2,qe.pointLights.value=X.state.point,qe.pointLightShadows.value=X.state.pointShadow,qe.hemisphereLights.value=X.state.hemi,qe.directionalShadowMap.value=X.state.directionalShadowMap,qe.directionalShadowMatrix.value=X.state.directionalShadowMatrix,qe.spotShadowMap.value=X.state.spotShadowMap,qe.spotLightMatrix.value=X.state.spotLightMatrix,qe.spotLightMap.value=X.state.spotLightMap,qe.pointShadowMap.value=X.state.pointShadowMap,qe.pointShadowMatrix.value=X.state.pointShadowMatrix),V.currentProgram=We,V.uniformsList=null,We}function He(w){if(w.uniformsList===null){const O=w.currentProgram.getUniforms();w.uniformsList=Ma.seqWithValue(O.seq,w.uniforms)}return w.uniformsList}function Mt(w,O){const J=Ce.get(w);J.outputColorSpace=O.outputColorSpace,J.batching=O.batching,J.batchingColor=O.batchingColor,J.instancing=O.instancing,J.instancingColor=O.instancingColor,J.instancingMorph=O.instancingMorph,J.skinning=O.skinning,J.morphTargets=O.morphTargets,J.morphNormals=O.morphNormals,J.morphColors=O.morphColors,J.morphTargetsCount=O.morphTargetsCount,J.numClippingPlanes=O.numClippingPlanes,J.numIntersection=O.numClipIntersection,J.vertexAlphas=O.vertexAlphas,J.vertexTangents=O.vertexTangents,J.toneMapping=O.toneMapping}function bt(w,O,J,V,X){O.isScene!==!0&&(O=Se),st.resetTextureUnits();const ie=O.fog,_e=V.isMeshStandardMaterial?O.environment:null,Ie=L===null?b.outputColorSpace:L.isXRRenderTarget===!0?L.texture.colorSpace:Xs,Be=(V.isMeshStandardMaterial?k:tn).get(V.envMap||_e),tt=V.vertexColors===!0&&!!J.attributes.color&&J.attributes.color.itemSize===4,We=!!J.attributes.tangent&&(!!V.normalMap||V.anisotropy>0),qe=!!J.morphAttributes.position,lt=!!J.morphAttributes.normal,Ft=!!J.morphAttributes.color;let Bt=ji;V.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(Bt=b.toneMapping);const Xt=J.morphAttributes.position||J.morphAttributes.normal||J.morphAttributes.color,Pt=Xt!==void 0?Xt.length:0,pt=Ce.get(V),Fe=f.state.lights;if(j===!0&&(ne===!0||w!==E)){const Kt=w===E&&V.id===A;dt.setState(V,w,Kt)}let At=!1;V.version===pt.__version?(pt.needsLights&&pt.lightsStateVersion!==Fe.state.version||pt.outputColorSpace!==Ie||X.isBatchedMesh&&pt.batching===!1||!X.isBatchedMesh&&pt.batching===!0||X.isBatchedMesh&&pt.batchingColor===!0&&X.colorTexture===null||X.isBatchedMesh&&pt.batchingColor===!1&&X.colorTexture!==null||X.isInstancedMesh&&pt.instancing===!1||!X.isInstancedMesh&&pt.instancing===!0||X.isSkinnedMesh&&pt.skinning===!1||!X.isSkinnedMesh&&pt.skinning===!0||X.isInstancedMesh&&pt.instancingColor===!0&&X.instanceColor===null||X.isInstancedMesh&&pt.instancingColor===!1&&X.instanceColor!==null||X.isInstancedMesh&&pt.instancingMorph===!0&&X.morphTexture===null||X.isInstancedMesh&&pt.instancingMorph===!1&&X.morphTexture!==null||pt.envMap!==Be||V.fog===!0&&pt.fog!==ie||pt.numClippingPlanes!==void 0&&(pt.numClippingPlanes!==dt.numPlanes||pt.numIntersection!==dt.numIntersection)||pt.vertexAlphas!==tt||pt.vertexTangents!==We||pt.morphTargets!==qe||pt.morphNormals!==lt||pt.morphColors!==Ft||pt.toneMapping!==Bt||pt.morphTargetsCount!==Pt)&&(At=!0):(At=!0,pt.__version=V.version);let Ot=pt.currentProgram;At===!0&&(Ot=te(V,O,X));let Ht=!1,un=!1,Sn=!1;const ke=Ot.getUniforms(),Ue=pt.uniforms;if(Le.useProgram(Ot.program)&&(Ht=!0,un=!0,Sn=!0),V.id!==A&&(A=V.id,un=!0),Ht||E!==w){Le.buffers.depth.getReversed()?(ee.copy(w.projectionMatrix),N2(ee),I2(ee),ke.setValue(B,"projectionMatrix",ee)):ke.setValue(B,"projectionMatrix",w.projectionMatrix),ke.setValue(B,"viewMatrix",w.matrixWorldInverse);const jt=ke.map.cameraPosition;jt!==void 0&&jt.setValue(B,q.setFromMatrixPosition(w.matrixWorld)),nt.logarithmicDepthBuffer&&ke.setValue(B,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),(V.isMeshPhongMaterial||V.isMeshToonMaterial||V.isMeshLambertMaterial||V.isMeshBasicMaterial||V.isMeshStandardMaterial||V.isShaderMaterial)&&ke.setValue(B,"isOrthographic",w.isOrthographicCamera===!0),E!==w&&(E=w,un=!0,Sn=!0)}if(X.isSkinnedMesh){ke.setOptional(B,X,"bindMatrix"),ke.setOptional(B,X,"bindMatrixInverse");const Kt=X.skeleton;Kt&&(Kt.boneTexture===null&&Kt.computeBoneTexture(),ke.setValue(B,"boneTexture",Kt.boneTexture,st))}X.isBatchedMesh&&(ke.setOptional(B,X,"batchingTexture"),ke.setValue(B,"batchingTexture",X._matricesTexture,st),ke.setOptional(B,X,"batchingIdTexture"),ke.setValue(B,"batchingIdTexture",X._indirectTexture,st),ke.setOptional(B,X,"batchingColorTexture"),X._colorsTexture!==null&&ke.setValue(B,"batchingColorTexture",X._colorsTexture,st));const Jt=J.morphAttributes;if((Jt.position!==void 0||Jt.normal!==void 0||Jt.color!==void 0)&&rt.update(X,J,Ot),(un||pt.receiveShadow!==X.receiveShadow)&&(pt.receiveShadow=X.receiveShadow,ke.setValue(B,"receiveShadow",X.receiveShadow)),V.isMeshGouraudMaterial&&V.envMap!==null&&(Ue.envMap.value=Be,Ue.flipEnvMap.value=Be.isCubeTexture&&Be.isRenderTargetTexture===!1?-1:1),V.isMeshStandardMaterial&&V.envMap===null&&O.environment!==null&&(Ue.envMapIntensity.value=O.environmentIntensity),un&&(ke.setValue(B,"toneMappingExposure",b.toneMappingExposure),pt.needsLights&&$t(Ue,Sn),ie&&V.fog===!0&&me.refreshFogUniforms(Ue,ie),me.refreshMaterialUniforms(Ue,V,K,le,f.state.transmissionRenderTarget[w.id]),Ma.upload(B,He(pt),Ue,st)),V.isShaderMaterial&&V.uniformsNeedUpdate===!0&&(Ma.upload(B,He(pt),Ue,st),V.uniformsNeedUpdate=!1),V.isSpriteMaterial&&ke.setValue(B,"center",X.center),ke.setValue(B,"modelViewMatrix",X.modelViewMatrix),ke.setValue(B,"normalMatrix",X.normalMatrix),ke.setValue(B,"modelMatrix",X.matrixWorld),V.isShaderMaterial||V.isRawShaderMaterial){const Kt=V.uniformsGroups;for(let jt=0,En=Kt.length;jt<En;jt++){const yn=Kt[jt];Y.update(yn,Ot),Y.bind(yn,Ot)}}return Ot}function $t(w,O){w.ambientLightColor.needsUpdate=O,w.lightProbe.needsUpdate=O,w.directionalLights.needsUpdate=O,w.directionalLightShadows.needsUpdate=O,w.pointLights.needsUpdate=O,w.pointLightShadows.needsUpdate=O,w.spotLights.needsUpdate=O,w.spotLightShadows.needsUpdate=O,w.rectAreaLights.needsUpdate=O,w.hemisphereLights.needsUpdate=O}function Yt(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 L},this.setRenderTargetTextures=function(w,O,J){const V=Ce.get(w);V.__autoAllocateDepthBuffer=w.resolveDepthBuffer===!1,V.__autoAllocateDepthBuffer===!1&&(V.__useRenderToTexture=!1),Ce.get(w.texture).__webglTexture=O,Ce.get(w.depthTexture).__webglTexture=V.__autoAllocateDepthBuffer?void 0:J,V.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(w,O){const J=Ce.get(w);J.__webglFramebuffer=O,J.__useDefaultFramebuffer=O===void 0};const ot=B.createFramebuffer();this.setRenderTarget=function(w,O=0,J=0){L=w,C=O,R=J;let V=!0,X=null,ie=!1,_e=!1;if(w){const Be=Ce.get(w);if(Be.__useDefaultFramebuffer!==void 0)Le.bindFramebuffer(B.FRAMEBUFFER,null),V=!1;else if(Be.__webglFramebuffer===void 0)st.setupRenderTarget(w);else if(Be.__hasExternalTextures)st.rebindTextures(w,Ce.get(w.texture).__webglTexture,Ce.get(w.depthTexture).__webglTexture);else if(w.depthBuffer){const qe=w.depthTexture;if(Be.__boundDepthTexture!==qe){if(qe!==null&&Ce.has(qe)&&(w.width!==qe.image.width||w.height!==qe.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");st.setupDepthRenderbuffer(w)}}const tt=w.texture;(tt.isData3DTexture||tt.isDataArrayTexture||tt.isCompressedArrayTexture)&&(_e=!0);const We=Ce.get(w).__webglFramebuffer;w.isWebGLCubeRenderTarget?(Array.isArray(We[O])?X=We[O][J]:X=We[O],ie=!0):w.samples>0&&st.useMultisampledRTT(w)===!1?X=Ce.get(w).__webglMultisampledFramebuffer:Array.isArray(We)?X=We[J]:X=We,P.copy(w.viewport),z.copy(w.scissor),H=w.scissorTest}else P.copy(ye).multiplyScalar(K).floor(),z.copy(de).multiplyScalar(K).floor(),H=se;if(J!==0&&(X=ot),Le.bindFramebuffer(B.FRAMEBUFFER,X)&&V&&Le.drawBuffers(w,X),Le.viewport(P),Le.scissor(z),Le.setScissorTest(H),ie){const Be=Ce.get(w.texture);B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_CUBE_MAP_POSITIVE_X+O,Be.__webglTexture,J)}else if(_e){const Be=Ce.get(w.texture),tt=O;B.framebufferTextureLayer(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,Be.__webglTexture,J,tt)}else if(w!==null&&J!==0){const Be=Ce.get(w.texture);B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,Be.__webglTexture,J)}A=-1},this.readRenderTargetPixels=function(w,O,J,V,X,ie,_e,Ie=0){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Be=Ce.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&_e!==void 0&&(Be=Be[_e]),Be){Le.bindFramebuffer(B.FRAMEBUFFER,Be);try{const tt=w.textures[Ie],We=tt.format,qe=tt.type;if(!nt.textureFormatReadable(We)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!nt.textureTypeReadable(qe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}O>=0&&O<=w.width-V&&J>=0&&J<=w.height-X&&(w.textures.length>1&&B.readBuffer(B.COLOR_ATTACHMENT0+Ie),B.readPixels(O,J,V,X,Ye.convert(We),Ye.convert(qe),ie))}finally{const tt=L!==null?Ce.get(L).__webglFramebuffer:null;Le.bindFramebuffer(B.FRAMEBUFFER,tt)}}},this.readRenderTargetPixelsAsync=async function(w,O,J,V,X,ie,_e,Ie=0){if(!(w&&w.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Be=Ce.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&_e!==void 0&&(Be=Be[_e]),Be)if(O>=0&&O<=w.width-V&&J>=0&&J<=w.height-X){Le.bindFramebuffer(B.FRAMEBUFFER,Be);const tt=w.textures[Ie],We=tt.format,qe=tt.type;if(!nt.textureFormatReadable(We))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!nt.textureTypeReadable(qe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const lt=B.createBuffer();B.bindBuffer(B.PIXEL_PACK_BUFFER,lt),B.bufferData(B.PIXEL_PACK_BUFFER,ie.byteLength,B.STREAM_READ),w.textures.length>1&&B.readBuffer(B.COLOR_ATTACHMENT0+Ie),B.readPixels(O,J,V,X,Ye.convert(We),Ye.convert(qe),0);const Ft=L!==null?Ce.get(L).__webglFramebuffer:null;Le.bindFramebuffer(B.FRAMEBUFFER,Ft);const Bt=B.fenceSync(B.SYNC_GPU_COMMANDS_COMPLETE,0);return B.flush(),await U2(B,Bt,4),B.bindBuffer(B.PIXEL_PACK_BUFFER,lt),B.getBufferSubData(B.PIXEL_PACK_BUFFER,0,ie),B.deleteBuffer(lt),B.deleteSync(Bt),ie}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(w,O=null,J=0){const V=Math.pow(2,-J),X=Math.floor(w.image.width*V),ie=Math.floor(w.image.height*V),_e=O!==null?O.x:0,Ie=O!==null?O.y:0;st.setTexture2D(w,0),B.copyTexSubImage2D(B.TEXTURE_2D,J,0,0,_e,Ie,X,ie),Le.unbindTexture()};const _t=B.createFramebuffer(),we=B.createFramebuffer();this.copyTextureToTexture=function(w,O,J=null,V=null,X=0,ie=null){ie===null&&(X!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),ie=X,X=0):ie=0);let _e,Ie,Be,tt,We,qe,lt,Ft,Bt;const Xt=w.isCompressedTexture?w.mipmaps[ie]:w.image;if(J!==null)_e=J.max.x-J.min.x,Ie=J.max.y-J.min.y,Be=J.isBox3?J.max.z-J.min.z:1,tt=J.min.x,We=J.min.y,qe=J.isBox3?J.min.z:0;else{const Jt=Math.pow(2,-X);_e=Math.floor(Xt.width*Jt),Ie=Math.floor(Xt.height*Jt),w.isDataArrayTexture?Be=Xt.depth:w.isData3DTexture?Be=Math.floor(Xt.depth*Jt):Be=1,tt=0,We=0,qe=0}V!==null?(lt=V.x,Ft=V.y,Bt=V.z):(lt=0,Ft=0,Bt=0);const Pt=Ye.convert(O.format),pt=Ye.convert(O.type);let Fe;O.isData3DTexture?(st.setTexture3D(O,0),Fe=B.TEXTURE_3D):O.isDataArrayTexture||O.isCompressedArrayTexture?(st.setTexture2DArray(O,0),Fe=B.TEXTURE_2D_ARRAY):(st.setTexture2D(O,0),Fe=B.TEXTURE_2D),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,O.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,O.unpackAlignment);const At=B.getParameter(B.UNPACK_ROW_LENGTH),Ot=B.getParameter(B.UNPACK_IMAGE_HEIGHT),Ht=B.getParameter(B.UNPACK_SKIP_PIXELS),un=B.getParameter(B.UNPACK_SKIP_ROWS),Sn=B.getParameter(B.UNPACK_SKIP_IMAGES);B.pixelStorei(B.UNPACK_ROW_LENGTH,Xt.width),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,Xt.height),B.pixelStorei(B.UNPACK_SKIP_PIXELS,tt),B.pixelStorei(B.UNPACK_SKIP_ROWS,We),B.pixelStorei(B.UNPACK_SKIP_IMAGES,qe);const ke=w.isDataArrayTexture||w.isData3DTexture,Ue=O.isDataArrayTexture||O.isData3DTexture;if(w.isDepthTexture){const Jt=Ce.get(w),Kt=Ce.get(O),jt=Ce.get(Jt.__renderTarget),En=Ce.get(Kt.__renderTarget);Le.bindFramebuffer(B.READ_FRAMEBUFFER,jt.__webglFramebuffer),Le.bindFramebuffer(B.DRAW_FRAMEBUFFER,En.__webglFramebuffer);for(let yn=0;yn<Be;yn++)ke&&(B.framebufferTextureLayer(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Ce.get(w).__webglTexture,X,qe+yn),B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Ce.get(O).__webglTexture,ie,Bt+yn)),B.blitFramebuffer(tt,We,_e,Ie,lt,Ft,_e,Ie,B.DEPTH_BUFFER_BIT,B.NEAREST);Le.bindFramebuffer(B.READ_FRAMEBUFFER,null),Le.bindFramebuffer(B.DRAW_FRAMEBUFFER,null)}else if(X!==0||w.isRenderTargetTexture||Ce.has(w)){const Jt=Ce.get(w),Kt=Ce.get(O);Le.bindFramebuffer(B.READ_FRAMEBUFFER,_t),Le.bindFramebuffer(B.DRAW_FRAMEBUFFER,we);for(let jt=0;jt<Be;jt++)ke?B.framebufferTextureLayer(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Jt.__webglTexture,X,qe+jt):B.framebufferTexture2D(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,Jt.__webglTexture,X),Ue?B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Kt.__webglTexture,ie,Bt+jt):B.framebufferTexture2D(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,Kt.__webglTexture,ie),X!==0?B.blitFramebuffer(tt,We,_e,Ie,lt,Ft,_e,Ie,B.COLOR_BUFFER_BIT,B.NEAREST):Ue?B.copyTexSubImage3D(Fe,ie,lt,Ft,Bt+jt,tt,We,_e,Ie):B.copyTexSubImage2D(Fe,ie,lt,Ft,tt,We,_e,Ie);Le.bindFramebuffer(B.READ_FRAMEBUFFER,null),Le.bindFramebuffer(B.DRAW_FRAMEBUFFER,null)}else Ue?w.isDataTexture||w.isData3DTexture?B.texSubImage3D(Fe,ie,lt,Ft,Bt,_e,Ie,Be,Pt,pt,Xt.data):O.isCompressedArrayTexture?B.compressedTexSubImage3D(Fe,ie,lt,Ft,Bt,_e,Ie,Be,Pt,Xt.data):B.texSubImage3D(Fe,ie,lt,Ft,Bt,_e,Ie,Be,Pt,pt,Xt):w.isDataTexture?B.texSubImage2D(B.TEXTURE_2D,ie,lt,Ft,_e,Ie,Pt,pt,Xt.data):w.isCompressedTexture?B.compressedTexSubImage2D(B.TEXTURE_2D,ie,lt,Ft,Xt.width,Xt.height,Pt,Xt.data):B.texSubImage2D(B.TEXTURE_2D,ie,lt,Ft,_e,Ie,Pt,pt,Xt);B.pixelStorei(B.UNPACK_ROW_LENGTH,At),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,Ot),B.pixelStorei(B.UNPACK_SKIP_PIXELS,Ht),B.pixelStorei(B.UNPACK_SKIP_ROWS,un),B.pixelStorei(B.UNPACK_SKIP_IMAGES,Sn),ie===0&&O.generateMipmaps&&B.generateMipmap(Fe),Le.unbindTexture()},this.copyTextureToTexture3D=function(w,O,J=null,V=null,X=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(w,O,J,V,X)},this.initRenderTarget=function(w){Ce.get(w).__webglFramebuffer===void 0&&st.setupRenderTarget(w)},this.initTexture=function(w){w.isCubeTexture?st.setTextureCube(w,0):w.isData3DTexture?st.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?st.setTexture2DArray(w,0):st.setTexture2D(w,0),Le.unbindTexture()},this.resetState=function(){C=0,R=0,L=null,Le.reset(),Lt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ti}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Wt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Wt._getUnpackColorSpace()}}const Wh={type:"change"},fc={type:"start"},ru={type:"end"},ra=new Ys,Xh=new Zn,I3=Math.cos(70*Ai.DEG2RAD),xn=new I,Vn=2*Math.PI,ln={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Po=1e-6;class au extends Z1{constructor(e,t=null){super(e,t),this.state=ln.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:Ci.ROTATE,MIDDLE:Ci.DOLLY,RIGHT:Ci.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 Gn,this._lastTargetPosition=new I,this._quat=new Gn().setFromUnitVectors(e.up,new I(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Ll,this._sphericalDelta=new Ll,this._scale=1,this._panOffset=new I,this._rotateStart=new Ze,this._rotateEnd=new Ze,this._rotateDelta=new Ze,this._panStart=new Ze,this._panEnd=new Ze,this._panDelta=new Ze,this._dollyStart=new Ze,this._dollyEnd=new Ze,this._dollyDelta=new Ze,this._dollyDirection=new I,this._mouse=new Ze,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=B3.bind(this),this._onPointerDown=z3.bind(this),this._onPointerUp=O3.bind(this),this._onContextMenu=j3.bind(this),this._onMouseWheel=H3.bind(this),this._onKeyDown=G3.bind(this),this._onTouchStart=W3.bind(this),this._onTouchMove=X3.bind(this),this._onMouseDown=k3.bind(this),this._onMouseMove=V3.bind(this),this._interceptControlDown=q3.bind(this),this._interceptControlUp=$3.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(Wh),this.update(),this.state=ln.NONE}update(e=null){const t=this.object.position;xn.copy(t).sub(this.target),xn.applyQuaternion(this._quat),this._spherical.setFromVector3(xn),this.autoRotate&&this.state===ln.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+=Vn:n>Math.PI&&(n-=Vn),i<-Math.PI?i+=Vn:i>Math.PI&&(i-=Vn),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 a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=a!=this._spherical.radius}if(xn.setFromSpherical(this._spherical),xn.applyQuaternion(this._quatInverse),t.copy(this.target).add(xn),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 a=null;if(this.object.isPerspectiveCamera){const o=xn.length();a=this._clampDistance(o*this._scale);const l=o-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const o=new I(this._mouse.x,this._mouse.y,0);o.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(o),this.object.updateMatrixWorld(),a=xn.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).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))<I3?this.object.lookAt(this.target):(Xh.setFromNormalAndCoplanarPoint(this.object.up,this.target),ra.intersectPlane(Xh,this.target))))}else if(this.object.isOrthographicCamera){const a=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),a!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>Po||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Po||this._lastTargetPosition.distanceToSquared(this.target)>Po?(this.dispatchEvent(Wh),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Vn/60*this.autoRotateSpeed*e:Vn/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){xn.setFromMatrixColumn(t,0),xn.multiplyScalar(-e),this._panOffset.add(xn)}_panUp(e,t){this.screenSpacePanning===!0?xn.setFromMatrixColumn(t,1):(xn.setFromMatrixColumn(t,0),xn.crossVectors(this.object.up,xn)),xn.multiplyScalar(e),this._panOffset.add(xn)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;xn.copy(i).sub(this.target);let r=xn.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,a=n.width,o=n.height;this._mouse.x=i/a*2-1,this._mouse.y=-(r/o)*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(Vn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Vn*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(Vn*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(-Vn*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(Vn*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(-Vn*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(Vn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Vn*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 a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_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 Ze,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 z3(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 B3(s){this.enabled!==!1&&(s.pointerType==="touch"?this._onTouchMove(s):this._onMouseMove(s))}function O3(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(ru),this.state=ln.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 k3(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 Ci.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(s),this.state=ln.DOLLY;break;case Ci.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=ln.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=ln.ROTATE}break;case Ci.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=ln.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=ln.PAN}break;default:this.state=ln.NONE}this.state!==ln.NONE&&this.dispatchEvent(fc)}function V3(s){switch(this.state){case ln.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case ln.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case ln.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function H3(s){this.enabled===!1||this.enableZoom===!1||this.state!==ln.NONE||(s.preventDefault(),this.dispatchEvent(fc),this._handleMouseWheel(this._customWheelEvent(s)),this.dispatchEvent(ru))}function G3(s){this.enabled!==!1&&this._handleKeyDown(s)}function W3(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=ln.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=ln.TOUCH_PAN;break;default:this.state=ln.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=ln.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=ln.TOUCH_DOLLY_ROTATE;break;default:this.state=ln.NONE}break;default:this.state=ln.NONE}this.state!==ln.NONE&&this.dispatchEvent(fc)}function X3(s){switch(this._trackPointer(s),this.state){case ln.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case ln.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case ln.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case ln.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=ln.NONE}}function j3(s){this.enabled!==!1&&s.preventDefault()}function q3(s){s.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function $3(s){s.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var Y3=Object.defineProperty,J3=(s,e,t)=>e in s?Y3(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,nn=(s,e,t)=>J3(s,typeof e!="symbol"?e+"":e,t);const ou=(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:a,left:o,right:l,bottom:c}=t;return Object.assign(r.style,{id:n,position:"absolute",zIndex:"1000",height:`${e}px`,width:`${e}px`,margin:`${a}px ${l}px ${c}px ${o}px`,borderRadius:"100%"}),ou(r,s),n&&(r.id=n),i&&(r.className=i),r},Z3=s=>{const e=typeof s=="string"?document.querySelector(s):s;if(!e)throw Error("Invalid DOM element");return e};function Ul(s,e,t){return Math.max(e,Math.min(t,s))}const Q3=[["x",0,3],["y",1,4],["z",2,5]],jh=new I;function qh({isSphere:s},e,t){s&&(jh.set(0,0,1).applyQuaternion(t.quaternion),Q3.forEach(([n,i,r])=>{const a=jh[n];let o=e[i],l=o.userData.opacity;o.material.opacity=Ul(a>=0?l:l/2,0,1),o=e[r],l=o.userData.opacity,o.material.opacity=Ul(a>=0?l/2:l,0,1)}))}const e4=(s,e,t=10)=>Math.abs(s.clientX-e.x)<t&&Math.abs(s.clientY-e.y)<t,$h=new J1,Yh=new Ze,Jh=(s,e,t,n)=>{Yh.set((s.clientX-e.left)/e.width*2-1,-((s.clientY-e.top)/e.height)*2+1),$h.setFromCamera(Yh,t);const i=$h.intersectObjects(n,!1),r=i.length?i[0]:null;return!r||!r.object.visible?null:r},Lo=1e-6,t4=2*Math.PI,lu=["x","y","z"],br=[...lu,"nx","ny","nz"],n4=["x","z","y","nx","nz","ny"],i4=["z","x","y","nz","nx","ny"],Nl="Right",ba="Top",Il="Front",zl="Left",Sa="Bottom",Bl="Back",s4=[Nl,ba,Il,zl,Sa,Bl].map(s=>s.toLocaleLowerCase()),cu=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},is=s=>JSON.parse(JSON.stringify(s)),r4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=cn.DEFAULT_UP,r=i.z===1,a=i.x===1,{container:o}=s;s.container=void 0,s=JSON.parse(JSON.stringify(s)),s.container=o;const l=r?n4:a?i4:br;s4.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:{...is(c),...t?{label:"X",color:16725587,line:!0}:{label:a?ba:Nl}},y:{...is(c),...t?{label:"Y",color:9100032,line:!0}:{label:r||a?Il:ba}},z:{...is(c),...t?{label:"Z",color:2920447,line:!0}:{label:r?ba:a?Nl:Il}},nx:{...is(d),label:t?"":a?Sa:zl},ny:{...is(d),label:t?"":r||a?Bl:Sa},nz:{...is(d),label:t?"":r?Sa:a?zl:Bl}};return Ol(s,m),lu.forEach(u=>Ol(s[`n${u}`],is(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 a4=(s,e=2)=>{const t=new Tt,n=e*2,{isSphere:i,resolution:r,radius:a,font:o,corners:l,edges:c}=s,d=br.map(R=>({...s[R],radius:a}));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,o);d.forEach(({radius:R,label:L,color:A,labelColor:E,border:P,hover:{color:z,labelColor:H,border:Q}},re)=>{const G=r*re+re*n+e;b(e,G,e,r,R,L,P,A,E),b(r+e*3,G,e,r,R,L,Q??P,z??A,H??E)});const _=d.length,p=e/(r*2),f=e/(r*6),v=1/_,x=new d1(m);return x.repeat.set(.5-2*p,v-2*f),x.offset.set(p,1-f),Object.assign(x,{colorSpace:Zt,wrapS:fi,wrapT:fi,userData:{offsetX:p,offsetY:f,cellHeight:v}}),x;function b(R,L,A,E,P,z,H,Q,re){if(P=P*(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,L+=le,E-=H.size*E,P=Math.max(0,P-le),G(),u.strokeStyle=t.set(H.color).getStyle(),u.lineWidth=H.size*E,u.stroke()}z&&C(u,R+E/2,L+(E+A)/2,z,t.set(re).getStyle());function G(){u.beginPath(),u.moveTo(R+P,L),u.lineTo(R+E-P,L),u.arcTo(R+E,L,R+E,L+P,P),u.lineTo(R+E,L+E-P),u.arcTo(R+E,L+E,R+E-P,L+E,P),u.lineTo(R+P,L+E),u.arcTo(R,L+E,R,L+E-P,P),u.lineTo(R,L+P),u.arcTo(R,L,R+P,L,P),u.closePath()}}function F(R,L,A){const E=[...R].sort((Me,ye)=>{var de,se;return(((de=Me.label)==null?void 0:de.length)||0)-(((se=ye.label)==null?void 0:se.length)||0)}).pop().label,{family:P,weight:z}=A,H=i?Math.sqrt(Math.pow(L*.7,2)/2):L;let Q=H,re=0,G=0;do{u.font=`${z} ${Q}px ${P}`;const Me=u.measureText(E);re=Me.width,G=Me.fontBoundingBoxDescent,Q--}while(re>H&&Q>0);const le=H/G,K=Math.min(H/re,le),pe=Math.floor(Q*K);return[`${z} ${pe}px ${P}`,le]}function C(R,L,A,E,P){R.font=h,R.textAlign="center",R.textBaseline="middle",R.fillStyle=P,R.fillText(E,L,A+(i?g:0))}},o4=(s,e)=>s.offset.x=(e?.5:0)+s.userData.offsetX,pc=(s,e)=>{const{offset:t,userData:{offsetY:n,cellHeight:i}}=s;t.y=1-(e+1)*i+n};function mc(s,e,t=2,n=2){const i=t/2-s,r=n/2-s,a=s/t,o=(t-s)/t,l=s/n,c=(n-s)/n,d=[i,r,0,-i,r,0,-i,-r,0,i,-r,0],m=[o,c,a,c,a,l,o,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,x,b,F;for(let C=0;C<4;C++){f=C<1||C>2?i:-i,v=C<2?r:-r,x=C<1||C>2?o:a,b=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(x+a*_,b+l*p),R<e&&(F=(e+1)*C+R+4,h.push(C,F,F+1))}return new hn().setIndex(new _n(new Uint32Array(h),1)).setAttribute("position",new _n(new Float32Array(d),3)).setAttribute("uv",new _n(new Float32Array(m),2))}const l4=(s,e)=>{const t=new I,{isSphere:n,radius:i,smoothness:r}=s,a=mc(i,r);return br.map((o,l)=>{const c=l<3,d=br[l],m=l?e.clone():e;pc(m,l);const{enabled:u,scale:h,opacity:g,hover:_}=s[d],p={map:m,opacity:g,transparent:!0},f=n?new tc(new za(p)):new zt(a,new $i(p)),v=c?d:d[1];return f.position[v]=(c?1:-1)*(n?cu: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})},c4=(s,e)=>{const{isSphere:t,corners:n}=s;if(!n.enabled)return[];const{color:i,opacity:r,scale:a,radius:o,smoothness:l,hover:c}=n,d=t?null:mc(o,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();pc(v,6),m.map=v}else m.color=i;const p=t?new tc(new za(m)):new zt(d,new $i(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(a),p.lookAt(h.copy(p.position).multiplyScalar(2)),p.renderOrder=1,p.userData={color:i,opacity:r,scale:a,hover:c},p})},h4=(s,e,t)=>{const{isSphere:n,edges:i}=s;if(!i.enabled)return[];const{color:r,opacity:a,scale:o,hover:l,radius:c,smoothness:d}=i,m=n?null:mc(c,d,1.2,.25),u={transparent:!0,opacity:a},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 b=e.clone();pc(b,t),u.map=b}else u.color=r;const v=n?new tc(new za(u)):new zt(m,new $i(u)),x=f*3;return v.position.set(h[x],h[x+1],h[x+2]),n&&v.position.normalize().multiplyScalar(1.7),v.scale.setScalar(o),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:a,scale:o,hover:l},v})};function u4(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={},a={},o=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(o!==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;a[h]===void 0&&(a[h]=[]),a[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=Zh(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 a){const m=a[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;_<a[d].length;++_)h.push(a[d][_][u]);const g=Zh(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 Zh(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 a=new e(r),o=new _n(a,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);o.setComponent(u+m,g,_)}}else a.set(d.array,l);l+=d.count*t}return i!==void 0&&(o.gpuType=i),o}const d4=(s,e)=>{const{isSphere:t,background:{enabled:n,color:i,opacity:r,hover:a}}=e;let o;const l=new $i({color:i,side:On,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)o=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?u4([c,u]):u,d.scale.setScalar(m)}),o=new zt(c,l)}return o.userData={color:i,opacity:r,hover:a},o},Qh=new In,aa=new I;class hu extends q1{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 Nt(e,3)),this.setAttribute("uv",new Nt(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 mi(n,3,0)),this.setAttribute("instanceEnd",new mi(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 mi(n,3,0)),this.setAttribute("instanceColorEnd",new mi(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 C1(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new In);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Qh.setFromBufferAttribute(t),this.boundingBox.union(Qh))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ui),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,a=e.count;r<a;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 Ze(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Hn.line={uniforms:ec.merge([Je.common,Je.fog,Je.line]),vertexShader:`
|
|
3827
|
+
}`;class L3{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new Cn,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:R3,fragmentShader:D3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Bt(new Di(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class P3 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 L3,p=t.getContextAttributes();let f=null,v=null;const x=[],S=[],F=new et;let C=null;const R=new Sn;R.viewport=new Gt;const P=new Sn;P.viewport=new Gt;const A=[R,P],E=new $1;let L=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let q=x[j];return q===void 0&&(q=new po,x[j]=q),q.getTargetRaySpace()},this.getControllerGrip=function(j){let q=x[j];return q===void 0&&(q=new po,x[j]=q),q.getGripSpace()},this.getHand=function(j){let q=x[j];return q===void 0&&(q=new po,x[j]=q),q.getHandSpace()};function H(j){const q=S.indexOf(j.inputSource);if(q===-1)return;const ie=x[q];ie!==void 0&&(ie.update(j.inputSource,j.frame,c||o),ie.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",re);for(let j=0;j<x.length;j++){const q=S[j];q!==null&&(S[j]=null,x[j].disconnect(q))}L=null,z=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",re),p.xrCompatible!==!0&&await t.makeXRCompatible(),C=e.getPixelRatio(),e.getSize(F),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ie=null,ee=null,ue=null;p.depth&&(ue=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ie=p.stencil?xr:yr,ee=p.stencil?vr:hs);const J={colorFormat:t.RGBA8,depthFormat:ue,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer(J),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),v=new us(u.textureWidth,u.textureHeight,{format:Qn,type:mi,depthTexture:new G0(u.textureWidth,u.textureHeight,ee,void 0,void 0,void 0,void 0,void 0,void 0,ie),stencilBuffer:p.stencil,colorSpace:e.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:u.ignoreDepthValues===!1,resolveStencilBuffer:u.ignoreDepthValues===!1})}else{const ie={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,ie),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),v=new us(h.framebufferWidth,h.framebufferHeight,{format:Qn,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 re(j){for(let q=0;q<j.removed.length;q++){const ie=j.removed[q],ee=S.indexOf(ie);ee>=0&&(S[ee]=null,x[ee].disconnect(ie))}for(let q=0;q<j.added.length;q++){const ie=j.added[q];let ee=S.indexOf(ie);if(ee===-1){for(let J=0;J<x.length;J++)if(J>=S.length){S.push(ie),ee=J;break}else if(S[J]===null){S[J]=ie,ee=J;break}if(ee===-1)break}const ue=x[ee];ue&&ue.connect(ie)}}const G=new I,le=new I;function Z(j,q,ie){G.setFromMatrixPosition(q.matrixWorld),le.setFromMatrixPosition(ie.matrixWorld);const ee=G.distanceTo(le),ue=q.projectionMatrix.elements,J=ie.projectionMatrix.elements,de=ue[14]/(ue[10]-1),we=ue[14]/(ue[10]+1),Ze=(ue[9]+1)/ue[5],We=(ue[9]-1)/ue[5],B=(ue[8]-1)/ue[0],bt=(J[8]+1)/J[0],ht=de*B,it=de*bt,Ne=ee/(-B+bt),tt=Ne*-B;if(q.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(tt),j.translateZ(Ne),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=de+Ne,st=we+Ne,Yt=ht-tt,V=it+(ee-tt),T=Ze*we/st*Le,ae=We*we/st*Le;j.projectionMatrix.makePerspective(Yt,V,T,ae,Le,st),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}}function _e(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,ie=j.far;_.texture!==null&&(_.depthNear>0&&(q=_.depthNear),_.depthFar>0&&(ie=_.depthFar)),E.near=P.near=R.near=q,E.far=P.far=R.far=ie,(L!==E.near||z!==E.far)&&(i.updateRenderState({depthNear:E.near,depthFar:E.far}),L=E.near,z=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;_e(E,ee);for(let J=0;J<ue.length;J++)_e(ue[J],ee);ue.length===2?Z(E,R,P):E.projectionMatrix.copy(R.projectionMatrix),Ee(j,E,ee)};function Ee(j,q,ie){ie===null?j.matrix.copy(q.matrixWorld):(j.matrix.copy(ie.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 Me=null;function me(j,q){if(d=q.getViewerPose(c||o),g=q,d!==null){const ie=d.views;h!==null&&(e.setRenderTargetFramebuffer(v,h.framebuffer),e.setRenderTarget(v));let ee=!1;ie.length!==E.cameras.length&&(E.cameras.length=0,ee=!0);for(let de=0;de<ie.length;de++){const we=ie[de];let Ze=null;if(h!==null)Ze=h.getViewport(we);else{const B=m.getViewSubImage(u,we);Ze=B.viewport,de===0&&(e.setRenderTargetTextures(v,B.colorTexture,B.depthStencilTexture),e.setRenderTarget(v))}let We=A[de];We===void 0&&(We=new Sn,We.layers.enable(de),We.viewport=new Gt,A[de]=We),We.matrix.fromArray(we.transform.matrix),We.matrix.decompose(We.position,We.quaternion,We.scale),We.projectionMatrix.fromArray(we.projectionMatrix),We.projectionMatrixInverse.copy(We.projectionMatrix).invert(),We.viewport.set(Ze.x,Ze.y,Ze.width,Ze.height),de===0&&(E.matrix.copy(We.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),ee===!0&&E.cameras.push(We)}const ue=i.enabledFeatures;if(ue&&ue.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const de=m.getDepthInformation(ie[0]);de&&de.isValid&&de.texture&&_.init(e,de,i.renderState)}}for(let ie=0;ie<x.length;ie++){const ee=S[ie],ue=x[ie];ee!==null&&ue!==void 0&&ue.update(ee,q,c||o)}Me&&Me(j,q),q.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:q}),g=null}const se=new Q0;se.setAnimationLoop(me),this.setAnimationLoop=function(j){Me=j},this.dispose=function(){}}}const ts=new En,F3=new At;function N3(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,U0(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,x,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,x):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===zn&&(p.bumpScale.value*=-1)),f.normalMap&&(p.normalMap.value=f.normalMap,t(f.normalMap,p.normalMapTransform),p.normalScale.value.copy(f.normalScale),f.side===zn&&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),x=v.envMap,S=v.envMapRotation;x&&(p.envMap.value=x,ts.copy(S),ts.x*=-1,ts.y*=-1,ts.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(ts.y*=-1,ts.z*=-1),p.envMapRotation.value.setFromMatrix4(F3.makeRotationFromEuler(ts)),p.flipEnvMap.value=x.isCubeTexture&&x.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,x){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.size.value=f.size*v,p.scale.value=x*.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===zn&&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 U3(s,e,t,n){let i={},r={},o=[];const a=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,x){const S=x.program;n.uniformBlockBinding(v,S)}function c(v,x){let S=i[v.id];S===void 0&&(g(v),S=d(v),i[v.id]=S,v.addEventListener("dispose",p));const F=x.program;n.updateUBOMapping(v,F);const C=e.render.frame;r[v.id]!==C&&(u(v),r[v.id]=C)}function d(v){const x=m();v.__bindingPointIndex=x;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,x,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 x=i[v.id],S=v.uniforms,F=v.__cache;s.bindBuffer(s.UNIFORM_BUFFER,x);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 z=L.__offset,H=Array.isArray(L.value)?L.value:[L.value];let Q=0;for(let re=0;re<H.length;re++){const G=H[re],le=_(G);typeof G=="number"||typeof G=="boolean"?(L.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,z+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,z,L.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(v,x,S,F){const C=v.value,R=x+"_"+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 x=v.uniforms;let S=0;const F=16;for(let R=0,P=x.length;R<P;R++){const A=Array.isArray(x[R])?x[R]:[x[R]];for(let E=0,L=A.length;E<L;E++){const z=A[E],H=Array.isArray(z.value)?z.value:[z.value];for(let Q=0,re=H.length;Q<re;Q++){const G=H[Q],le=_(G),Z=S%F,_e=Z%le.boundary,Ee=Z+_e;S+=_e,Ee!==0&&F-Ee<le.storage&&(S+=F-Ee),z.__data=new Float32Array(le.storage/Float32Array.BYTES_PER_ELEMENT),z.__offset=S,S+=le.storage}}}const C=S%F;return C>0&&(S+=F-C),v.__size=S,v.__cache={},this}function _(v){const x={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(x.boundary=4,x.storage=4):v.isVector2?(x.boundary=8,x.storage=8):v.isVector3||v.isColor?(x.boundary=16,x.storage=12):v.isVector4?(x.boundary=16,x.storage=16):v.isMatrix3?(x.boundary=48,x.storage=48):v.isMatrix4?(x.boundary=64,x.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),x}function p(v){const x=v.target;x.removeEventListener("dispose",p);const S=o.indexOf(x.__bindingPointIndex);o.splice(S,1),s.deleteBuffer(i[x.id]),delete i[x.id],delete r[x.id]}function f(){for(const v in i)s.deleteBuffer(i[v]);o=[],i={},r={}}return{bind:l,update:c,dispose:f}}class su{constructor(e={}){const{canvas:t=F2(),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=[],x=[];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=jt;let C=0,R=0,P=null,A=-1,E=null;const L=new Gt,z=new Gt;let H=null;const Q=new Tt(0);let re=0,G=t.width,le=t.height,Z=1,_e=null,Ee=null;const Me=new Gt(0,0,G,le),me=new Gt(0,0,G,le);let se=!1;const j=new ic;let q=!1,ie=!1;const ee=new At,ue=new At,J=new I,de=new Gt,we={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ze=!1;function We(){return P===null?Z:1}let B=n;function bt(w,O){return t.getContext(w,O)}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${Hl}`),t.addEventListener("webglcontextlost",at,!1),t.addEventListener("webglcontextrestored",Oe,!1),t.addEventListener("webglcontextcreationerror",Ae,!1),B===null){const O="webgl2";if(B=bt(O,w),B===null)throw bt(O)?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 ht,it,Ne,tt,Le,st,Yt,V,T,ae,be,Re,ve,_t,Qe,pt,vt,Pe,lt,Dt,Ct,Je,Pt,K;function nt(){ht=new jp(B),ht.init(),Je=new C3(B,ht),it=new Op(B,ht,e,Je),Ne=new w3(B,ht),it.reverseDepthBuffer&&u&&Ne.buffers.depth.setReversed(!0),tt=new Yp(B),Le=new f3,st=new T3(B,ht,Ne,Le,it,Je,tt),Yt=new Vp(S),V=new Xp(S),T=new ed(B),Pt=new zp(B,T),ae=new qp(B,T,tt,Pt),be=new Kp(B,ae,T,tt),lt=new Jp(B,it,st),pt=new kp(Le),Re=new d3(S,Yt,V,ht,it,Pt,pt),ve=new N3(S,Le),_t=new m3,Qe=new M3(ht),Pe=new Ip(S,Yt,V,Ne,be,h,l),vt=new E3(S,be,it),K=new U3(B,tt,it,Ne),Dt=new Bp(B,ht,tt),Ct=new $p(B,ht,tt),tt.programs=Re.programs,S.capabilities=it,S.extensions=ht,S.properties=Le,S.renderLists=_t,S.shadowMap=vt,S.state=Ne,S.info=tt}nt();const Fe=new P3(S,B);this.xr=Fe,this.getContext=function(){return B},this.getContextAttributes=function(){return B.getContextAttributes()},this.forceContextLoss=function(){const w=ht.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){const w=ht.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,O,Y=!0){if(Fe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=w,le=O,t.width=Math.floor(w*Z),t.height=Math.floor(O*Z),Y===!0&&(t.style.width=w+"px",t.style.height=O+"px"),this.setViewport(0,0,w,O)},this.getDrawingBufferSize=function(w){return w.set(G*Z,le*Z).floor()},this.setDrawingBufferSize=function(w,O,Y){G=w,le=O,Z=Y,t.width=Math.floor(w*Y),t.height=Math.floor(O*Y),this.setViewport(0,0,w,O)},this.getCurrentViewport=function(w){return w.copy(L)},this.getViewport=function(w){return w.copy(Me)},this.setViewport=function(w,O,Y,k){w.isVector4?Me.set(w.x,w.y,w.z,w.w):Me.set(w,O,Y,k),Ne.viewport(L.copy(Me).multiplyScalar(Z).round())},this.getScissor=function(w){return w.copy(me)},this.setScissor=function(w,O,Y,k){w.isVector4?me.set(w.x,w.y,w.z,w.w):me.set(w,O,Y,k),Ne.scissor(z.copy(me).multiplyScalar(Z).round())},this.getScissorTest=function(){return se},this.setScissorTest=function(w){Ne.setScissorTest(se=w)},this.setOpaqueSort=function(w){_e=w},this.setTransparentSort=function(w){Ee=w},this.getClearColor=function(w){return w.copy(Pe.getClearColor())},this.setClearColor=function(){Pe.setClearColor(...arguments)},this.getClearAlpha=function(){return Pe.getClearAlpha()},this.setClearAlpha=function(){Pe.setClearAlpha(...arguments)},this.clear=function(w=!0,O=!0,Y=!0){let k=0;if(w){let X=!1;if(P!==null){const ne=P.texture.format;X=ne===Jl||ne===Yl||ne===$l}if(X){const ne=P.texture.type,ye=ne===mi||ne===hs||ne===_r||ne===vr||ne===jl||ne===ql,oe=Pe.getClearColor(),De=Pe.getClearAlpha(),Se=oe.r,Be=oe.g,Ge=oe.b;ye?(g[0]=Se,g[1]=Be,g[2]=Ge,g[3]=De,B.clearBufferuiv(B.COLOR,0,g)):(_[0]=Se,_[1]=Be,_[2]=Ge,_[3]=De,B.clearBufferiv(B.COLOR,0,_))}else k|=B.COLOR_BUFFER_BIT}O&&(k|=B.DEPTH_BUFFER_BIT),Y&&(k|=B.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),B.clear(k)},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",at,!1),t.removeEventListener("webglcontextrestored",Oe,!1),t.removeEventListener("webglcontextcreationerror",Ae,!1),Pe.dispose(),_t.dispose(),Qe.dispose(),Le.dispose(),Yt.dispose(),V.dispose(),be.dispose(),Pt.dispose(),K.dispose(),Re.dispose(),Fe.dispose(),Fe.removeEventListener("sessionstart",Yi),Fe.removeEventListener("sessionend",fs),$.stop()};function at(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),F=!0}function Oe(){console.log("THREE.WebGLRenderer: Context Restored."),F=!1;const w=tt.autoReset,O=vt.enabled,Y=vt.autoUpdate,k=vt.needsUpdate,X=vt.type;nt(),tt.autoReset=w,vt.enabled=O,vt.autoUpdate=Y,vt.needsUpdate=k,vt.type=X}function Ae(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function dt(w){const O=w.target;O.removeEventListener("dispose",dt),Ft(O)}function Ft(w){Jt(w),Le.remove(w)}function Jt(w){const O=Le.get(w).programs;O!==void 0&&(O.forEach(function(Y){Re.releaseProgram(Y)}),w.isShaderMaterial&&Re.releaseShaderCache(w))}this.renderBufferDirect=function(w,O,Y,k,X,ne){O===null&&(O=we);const ye=X.isMesh&&X.matrixWorld.determinant()<0,oe=Ye(w,O,Y,k,X);Ne.setMaterial(k,ye);let De=Y.index,Se=1;if(k.wireframe===!0){if(De=ae.getWireframeAttribute(Y),De===void 0)return;Se=2}const Be=Y.drawRange,Ge=Y.attributes.position;let ct=Be.start*Se,Et=(Be.start+Be.count)*Se;ne!==null&&(ct=Math.max(ct,ne.start*Se),Et=Math.min(Et,(ne.start+ne.count)*Se)),De!==null?(ct=Math.max(ct,0),Et=Math.min(Et,De.count)):Ge!=null&&(ct=Math.max(ct,0),Et=Math.min(Et,Ge.count));const yt=Et-ct;if(yt<0||yt===1/0)return;Pt.setup(X,k,oe,Y,De);let Nt,xt=Dt;if(De!==null&&(Nt=T.get(De),xt=Ct,xt.setIndex(Nt)),X.isMesh)k.wireframe===!0?(Ne.setLineWidth(k.wireframeLinewidth*We()),xt.setMode(B.LINES)):xt.setMode(B.TRIANGLES);else if(X.isLine){let rt=k.linewidth;rt===void 0&&(rt=1),Ne.setLineWidth(rt*We()),X.isLineSegments?xt.setMode(B.LINES):X.isLineLoop?xt.setMode(B.LINE_LOOP):xt.setMode(B.LINE_STRIP)}else X.isPoints?xt.setMode(B.POINTS):X.isSprite&&xt.setMode(B.TRIANGLES);if(X.isBatchedMesh)if(X._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),xt.renderMultiDrawInstances(X._multiDrawStarts,X._multiDrawCounts,X._multiDrawCount,X._multiDrawInstances);else if(ht.get("WEBGL_multi_draw"))xt.renderMultiDraw(X._multiDrawStarts,X._multiDrawCounts,X._multiDrawCount);else{const rt=X._multiDrawStarts,Xt=X._multiDrawCounts,Ut=X._multiDrawCount,Zt=De?T.get(De).bytesPerElement:1,Wt=Le.get(k).currentProgram.getUniforms();for(let Ie=0;Ie<Ut;Ie++)Wt.setValue(B,"_gl_DrawID",Ie),xt.render(rt[Ie]/Zt,Xt[Ie])}else if(X.isInstancedMesh)xt.renderInstances(ct,yt,X.count);else if(Y.isInstancedBufferGeometry){const rt=Y._maxInstanceCount!==void 0?Y._maxInstanceCount:1/0,Xt=Math.min(Y.instanceCount,rt);xt.renderInstances(ct,yt,Xt)}else xt.render(ct,yt)};function zt(w,O,Y){w.transparent===!0&&w.side===gn&&w.forceSinglePass===!1?(w.side=zn,w.needsUpdate=!0,Ue(w,O,Y),w.side=ei,w.needsUpdate=!0,Ue(w,O,Y),w.side=gn):Ue(w,O,Y)}this.compile=function(w,O,Y=null){Y===null&&(Y=w),f=Qe.get(Y),f.init(O),x.push(f),Y.traverseVisible(function(X){X.isLight&&X.layers.test(O.layers)&&(f.pushLight(X),X.castShadow&&f.pushShadow(X))}),w!==Y&&w.traverseVisible(function(X){X.isLight&&X.layers.test(O.layers)&&(f.pushLight(X),X.castShadow&&f.pushShadow(X))}),f.setupLights();const k=new Set;return w.traverse(function(X){if(!(X.isMesh||X.isPoints||X.isLine||X.isSprite))return;const ne=X.material;if(ne)if(Array.isArray(ne))for(let ye=0;ye<ne.length;ye++){const oe=ne[ye];zt(oe,Y,X),k.add(oe)}else zt(ne,Y,X),k.add(ne)}),f=x.pop(),k},this.compileAsync=function(w,O,Y=null){const k=this.compile(w,O,Y);return new Promise(X=>{function ne(){if(k.forEach(function(ye){Le.get(ye).currentProgram.isReady()&&k.delete(ye)}),k.size===0){X(w);return}setTimeout(ne,10)}ht.get("KHR_parallel_shader_compile")!==null?ne():setTimeout(ne,10)})};let Rn=null;function Gn(w){Rn&&Rn(w)}function Yi(){$.stop()}function fs(){$.start()}const $=new Q0;$.setAnimationLoop(Gn),typeof self<"u"&&$.setContext(self),this.setAnimationLoop=function(w){Rn=w,Fe.setAnimationLoop(w),w===null?$.stop():$.start()},Fe.addEventListener("sessionstart",Yi),Fe.addEventListener("sessionend",fs),this.render=function(w,O){if(O!==void 0&&O.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(),O.parent===null&&O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),Fe.enabled===!0&&Fe.isPresenting===!0&&(Fe.cameraAutoUpdate===!0&&Fe.updateCamera(O),O=Fe.getCamera()),w.isScene===!0&&w.onBeforeRender(S,w,O,P),f=Qe.get(w,x.length),f.init(O),x.push(f),ue.multiplyMatrices(O.projectionMatrix,O.matrixWorldInverse),j.setFromProjectionMatrix(ue),ie=this.localClippingEnabled,q=pt.init(this.clippingPlanes,ie),p=_t.get(w,v.length),p.init(),v.push(p),Fe.enabled===!0&&Fe.isPresenting===!0){const ne=S.xr.getDepthSensingMesh();ne!==null&&W(ne,O,-1/0,S.sortObjects)}W(w,O,0,S.sortObjects),p.finish(),S.sortObjects===!0&&p.sort(_e,Ee),Ze=Fe.enabled===!1||Fe.isPresenting===!1||Fe.hasDepthSensing()===!1,Ze&&Pe.addToRenderList(p,w),this.info.render.frame++,q===!0&&pt.beginShadows();const Y=f.state.shadowsArray;vt.render(Y,w,O),q===!0&&pt.endShadows(),this.info.autoReset===!0&&this.info.reset();const k=p.opaque,X=p.transmissive;if(f.setupLights(),O.isArrayCamera){const ne=O.cameras;if(X.length>0)for(let ye=0,oe=ne.length;ye<oe;ye++){const De=ne[ye];fe(k,X,w,De)}Ze&&Pe.render(w);for(let ye=0,oe=ne.length;ye<oe;ye++){const De=ne[ye];ce(p,w,De,De.viewport)}}else X.length>0&&fe(k,X,w,O),Ze&&Pe.render(w),ce(p,w,O);P!==null&&R===0&&(st.updateMultisampleRenderTarget(P),st.updateRenderTargetMipmap(P)),w.isScene===!0&&w.onAfterRender(S,w,O),Pt.resetDefaultState(),A=-1,E=null,x.pop(),x.length>0?(f=x[x.length-1],q===!0&&pt.setGlobalState(S.clippingPlanes,f.state.camera)):f=null,v.pop(),v.length>0?p=v[v.length-1]:p=null};function W(w,O,Y,k){if(w.visible===!1)return;if(w.layers.test(O.layers)){if(w.isGroup)Y=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(O);else if(w.isLight)f.pushLight(w),w.castShadow&&f.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||j.intersectsSprite(w)){k&&de.setFromMatrixPosition(w.matrixWorld).applyMatrix4(ue);const ye=be.update(w),oe=w.material;oe.visible&&p.push(w,ye,oe,Y,de.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||j.intersectsObject(w))){const ye=be.update(w),oe=w.material;if(k&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),de.copy(w.boundingSphere.center)):(ye.boundingSphere===null&&ye.computeBoundingSphere(),de.copy(ye.boundingSphere.center)),de.applyMatrix4(w.matrixWorld).applyMatrix4(ue)),Array.isArray(oe)){const De=ye.groups;for(let Se=0,Be=De.length;Se<Be;Se++){const Ge=De[Se],ct=oe[Ge.materialIndex];ct&&ct.visible&&p.push(w,ye,ct,Y,de.z,Ge)}}else oe.visible&&p.push(w,ye,oe,Y,de.z,null)}}const ne=w.children;for(let ye=0,oe=ne.length;ye<oe;ye++)W(ne[ye],O,Y,k)}function ce(w,O,Y,k){const X=w.opaque,ne=w.transmissive,ye=w.transparent;f.setupLightsView(Y),q===!0&&pt.setGlobalState(S.clippingPlanes,Y),k&&Ne.viewport(L.copy(k)),X.length>0&&ge(X,O,Y),ne.length>0&&ge(ne,O,Y),ye.length>0&&ge(ye,O,Y),Ne.buffers.depth.setTest(!0),Ne.buffers.depth.setMask(!0),Ne.buffers.color.setMask(!0),Ne.setPolygonOffset(!1)}function fe(w,O,Y,k){if((Y.isScene===!0?Y.overrideMaterial:null)!==null)return;f.state.transmissionRenderTarget[k.id]===void 0&&(f.state.transmissionRenderTarget[k.id]=new us(1,1,{generateMipmaps:!0,type:ht.has("EXT_color_buffer_half_float")||ht.has("EXT_color_buffer_float")?Sr:mi,minFilter:Ai,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Ht.workingColorSpace}));const ne=f.state.transmissionRenderTarget[k.id],ye=k.viewport||L;ne.setSize(ye.z*S.transmissionResolutionScale,ye.w*S.transmissionResolutionScale);const oe=S.getRenderTarget();S.setRenderTarget(ne),S.getClearColor(Q),re=S.getClearAlpha(),re<1&&S.setClearColor(16777215,.5),S.clear(),Ze&&Pe.render(Y);const De=S.toneMapping;S.toneMapping=Xi;const Se=k.viewport;if(k.viewport!==void 0&&(k.viewport=void 0),f.setupLightsView(k),q===!0&&pt.setGlobalState(S.clippingPlanes,k),ge(w,Y,k),st.updateMultisampleRenderTarget(ne),st.updateRenderTargetMipmap(ne),ht.has("WEBGL_multisampled_render_to_texture")===!1){let Be=!1;for(let Ge=0,ct=O.length;Ge<ct;Ge++){const Et=O[Ge],yt=Et.object,Nt=Et.geometry,xt=Et.material,rt=Et.group;if(xt.side===gn&&yt.layers.test(k.layers)){const Xt=xt.side;xt.side=zn,xt.needsUpdate=!0,pe(yt,Y,k,Nt,xt,rt),xt.side=Xt,xt.needsUpdate=!0,Be=!0}}Be===!0&&(st.updateMultisampleRenderTarget(ne),st.updateRenderTargetMipmap(ne))}S.setRenderTarget(oe),S.setClearColor(Q,re),Se!==void 0&&(k.viewport=Se),S.toneMapping=De}function ge(w,O,Y){const k=O.isScene===!0?O.overrideMaterial:null;for(let X=0,ne=w.length;X<ne;X++){const ye=w[X],oe=ye.object,De=ye.geometry,Se=ye.group;let Be=ye.material;Be.allowOverride===!0&&k!==null&&(Be=k),oe.layers.test(Y.layers)&&pe(oe,O,Y,De,Be,Se)}}function pe(w,O,Y,k,X,ne){w.onBeforeRender(S,O,Y,k,X,ne),w.modelViewMatrix.multiplyMatrices(Y.matrixWorldInverse,w.matrixWorld),w.normalMatrix.getNormalMatrix(w.modelViewMatrix),X.onBeforeRender(S,O,Y,k,w,ne),X.transparent===!0&&X.side===gn&&X.forceSinglePass===!1?(X.side=zn,X.needsUpdate=!0,S.renderBufferDirect(Y,O,k,X,w,ne),X.side=ei,X.needsUpdate=!0,S.renderBufferDirect(Y,O,k,X,w,ne),X.side=gn):S.renderBufferDirect(Y,O,k,X,w,ne),w.onAfterRender(S,O,Y,k,X,ne)}function Ue(w,O,Y){O.isScene!==!0&&(O=we);const k=Le.get(w),X=f.state.lights,ne=f.state.shadowsArray,ye=X.state.version,oe=Re.getParameters(w,X.state,ne,O,Y),De=Re.getProgramCacheKey(oe);let Se=k.programs;k.environment=w.isMeshStandardMaterial?O.environment:null,k.fog=O.fog,k.envMap=(w.isMeshStandardMaterial?V:Yt).get(w.envMap||k.environment),k.envMapRotation=k.environment!==null&&w.envMap===null?O.environmentRotation:w.envMapRotation,Se===void 0&&(w.addEventListener("dispose",dt),Se=new Map,k.programs=Se);let Be=Se.get(De);if(Be!==void 0){if(k.currentProgram===Be&&k.lightsStateVersion===ye)return Ce(w,oe),Be}else oe.uniforms=Re.getUniforms(w),w.onBeforeCompile(oe,S),Be=Re.acquireProgram(oe,De),Se.set(De,Be),k.uniforms=oe.uniforms;const Ge=k.uniforms;return(!w.isShaderMaterial&&!w.isRawShaderMaterial||w.clipping===!0)&&(Ge.clippingPlanes=pt.uniform),Ce(w,oe),k.needsLights=ke(w),k.lightsStateVersion=ye,k.needsLights&&(Ge.ambientLightColor.value=X.state.ambient,Ge.lightProbe.value=X.state.probe,Ge.directionalLights.value=X.state.directional,Ge.directionalLightShadows.value=X.state.directionalShadow,Ge.spotLights.value=X.state.spot,Ge.spotLightShadows.value=X.state.spotShadow,Ge.rectAreaLights.value=X.state.rectArea,Ge.ltc_1.value=X.state.rectAreaLTC1,Ge.ltc_2.value=X.state.rectAreaLTC2,Ge.pointLights.value=X.state.point,Ge.pointLightShadows.value=X.state.pointShadow,Ge.hemisphereLights.value=X.state.hemi,Ge.directionalShadowMap.value=X.state.directionalShadowMap,Ge.directionalShadowMatrix.value=X.state.directionalShadowMatrix,Ge.spotShadowMap.value=X.state.spotShadowMap,Ge.spotLightMatrix.value=X.state.spotLightMatrix,Ge.spotLightMap.value=X.state.spotLightMap,Ge.pointShadowMap.value=X.state.pointShadowMap,Ge.pointShadowMatrix.value=X.state.pointShadowMatrix),k.currentProgram=Be,k.uniformsList=null,Be}function Te(w){if(w.uniformsList===null){const O=w.currentProgram.getUniforms();w.uniformsList=Ma.seqWithValue(O.seq,w.uniforms)}return w.uniformsList}function Ce(w,O){const Y=Le.get(w);Y.outputColorSpace=O.outputColorSpace,Y.batching=O.batching,Y.batchingColor=O.batchingColor,Y.instancing=O.instancing,Y.instancingColor=O.instancingColor,Y.instancingMorph=O.instancingMorph,Y.skinning=O.skinning,Y.morphTargets=O.morphTargets,Y.morphNormals=O.morphNormals,Y.morphColors=O.morphColors,Y.morphTargetsCount=O.morphTargetsCount,Y.numClippingPlanes=O.numClippingPlanes,Y.numIntersection=O.numClipIntersection,Y.vertexAlphas=O.vertexAlphas,Y.vertexTangents=O.vertexTangents,Y.toneMapping=O.toneMapping}function Ye(w,O,Y,k,X){O.isScene!==!0&&(O=we),st.resetTextureUnits();const ne=O.fog,ye=k.isMeshStandardMaterial?O.environment:null,oe=P===null?S.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:Xs,De=(k.isMeshStandardMaterial?V:Yt).get(k.envMap||ye),Se=k.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,Be=!!Y.attributes.tangent&&(!!k.normalMap||k.anisotropy>0),Ge=!!Y.morphAttributes.position,ct=!!Y.morphAttributes.normal,Et=!!Y.morphAttributes.color;let yt=Xi;k.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(yt=S.toneMapping);const Nt=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,xt=Nt!==void 0?Nt.length:0,rt=Le.get(k),Xt=f.state.lights;if(q===!0&&(ie===!0||w!==E)){const Kt=w===E&&k.id===A;pt.setState(k,w,Kt)}let Ut=!1;k.version===rt.__version?(rt.needsLights&&rt.lightsStateVersion!==Xt.state.version||rt.outputColorSpace!==oe||X.isBatchedMesh&&rt.batching===!1||!X.isBatchedMesh&&rt.batching===!0||X.isBatchedMesh&&rt.batchingColor===!0&&X.colorTexture===null||X.isBatchedMesh&&rt.batchingColor===!1&&X.colorTexture!==null||X.isInstancedMesh&&rt.instancing===!1||!X.isInstancedMesh&&rt.instancing===!0||X.isSkinnedMesh&&rt.skinning===!1||!X.isSkinnedMesh&&rt.skinning===!0||X.isInstancedMesh&&rt.instancingColor===!0&&X.instanceColor===null||X.isInstancedMesh&&rt.instancingColor===!1&&X.instanceColor!==null||X.isInstancedMesh&&rt.instancingMorph===!0&&X.morphTexture===null||X.isInstancedMesh&&rt.instancingMorph===!1&&X.morphTexture!==null||rt.envMap!==De||k.fog===!0&&rt.fog!==ne||rt.numClippingPlanes!==void 0&&(rt.numClippingPlanes!==pt.numPlanes||rt.numIntersection!==pt.numIntersection)||rt.vertexAlphas!==Se||rt.vertexTangents!==Be||rt.morphTargets!==Ge||rt.morphNormals!==ct||rt.morphColors!==Et||rt.toneMapping!==yt||rt.morphTargetsCount!==xt)&&(Ut=!0):(Ut=!0,rt.__version=k.version);let Zt=rt.currentProgram;Ut===!0&&(Zt=Ue(k,O,X));let Wt=!1,Ie=!1,Qt=!1;const Rt=Zt.getUniforms(),tn=rt.uniforms;if(Ne.useProgram(Zt.program)&&(Wt=!0,Ie=!0,Qt=!0),k.id!==A&&(A=k.id,Ie=!0),Wt||E!==w){Ne.buffers.depth.getReversed()?(ee.copy(w.projectionMatrix),U2(ee),I2(ee),Rt.setValue(B,"projectionMatrix",ee)):Rt.setValue(B,"projectionMatrix",w.projectionMatrix),Rt.setValue(B,"viewMatrix",w.matrixWorldInverse);const je=Rt.map.cameraPosition;je!==void 0&&je.setValue(B,J.setFromMatrixPosition(w.matrixWorld)),it.logarithmicDepthBuffer&&Rt.setValue(B,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),(k.isMeshPhongMaterial||k.isMeshToonMaterial||k.isMeshLambertMaterial||k.isMeshBasicMaterial||k.isMeshStandardMaterial||k.isShaderMaterial)&&Rt.setValue(B,"isOrthographic",w.isOrthographicCamera===!0),E!==w&&(E=w,Ie=!0,Qt=!0)}if(X.isSkinnedMesh){Rt.setOptional(B,X,"bindMatrix"),Rt.setOptional(B,X,"bindMatrixInverse");const Kt=X.skeleton;Kt&&(Kt.boneTexture===null&&Kt.computeBoneTexture(),Rt.setValue(B,"boneTexture",Kt.boneTexture,st))}X.isBatchedMesh&&(Rt.setOptional(B,X,"batchingTexture"),Rt.setValue(B,"batchingTexture",X._matricesTexture,st),Rt.setOptional(B,X,"batchingIdTexture"),Rt.setValue(B,"batchingIdTexture",X._indirectTexture,st),Rt.setOptional(B,X,"batchingColorTexture"),X._colorsTexture!==null&&Rt.setValue(B,"batchingColorTexture",X._colorsTexture,st));const un=Y.morphAttributes;if((un.position!==void 0||un.normal!==void 0||un.color!==void 0)&<.update(X,Y,Zt),(Ie||rt.receiveShadow!==X.receiveShadow)&&(rt.receiveShadow=X.receiveShadow,Rt.setValue(B,"receiveShadow",X.receiveShadow)),k.isMeshGouraudMaterial&&k.envMap!==null&&(tn.envMap.value=De,tn.flipEnvMap.value=De.isCubeTexture&&De.isRenderTargetTexture===!1?-1:1),k.isMeshStandardMaterial&&k.envMap===null&&O.environment!==null&&(tn.envMapIntensity.value=O.environmentIntensity),Ie&&(Rt.setValue(B,"toneMappingExposure",S.toneMappingExposure),rt.needsLights&&te(tn,Qt),ne&&k.fog===!0&&ve.refreshFogUniforms(tn,ne),ve.refreshMaterialUniforms(tn,k,Z,le,f.state.transmissionRenderTarget[w.id]),Ma.upload(B,Te(rt),tn,st)),k.isShaderMaterial&&k.uniformsNeedUpdate===!0&&(Ma.upload(B,Te(rt),tn,st),k.uniformsNeedUpdate=!1),k.isSpriteMaterial&&Rt.setValue(B,"center",X.center),Rt.setValue(B,"modelViewMatrix",X.modelViewMatrix),Rt.setValue(B,"normalMatrix",X.normalMatrix),Rt.setValue(B,"modelMatrix",X.matrixWorld),k.isShaderMaterial||k.isRawShaderMaterial){const Kt=k.uniformsGroups;for(let je=0,He=Kt.length;je<He;je++){const rn=Kt[je];K.update(rn,Zt),K.bind(rn,Zt)}}return Zt}function te(w,O){w.ambientLightColor.needsUpdate=O,w.lightProbe.needsUpdate=O,w.directionalLights.needsUpdate=O,w.directionalLightShadows.needsUpdate=O,w.pointLights.needsUpdate=O,w.pointLightShadows.needsUpdate=O,w.spotLights.needsUpdate=O,w.spotLightShadows.needsUpdate=O,w.rectAreaLights.needsUpdate=O,w.hemisphereLights.needsUpdate=O}function ke(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,O,Y){const k=Le.get(w);k.__autoAllocateDepthBuffer=w.resolveDepthBuffer===!1,k.__autoAllocateDepthBuffer===!1&&(k.__useRenderToTexture=!1),Le.get(w.texture).__webglTexture=O,Le.get(w.depthTexture).__webglTexture=k.__autoAllocateDepthBuffer?void 0:Y,k.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(w,O){const Y=Le.get(w);Y.__webglFramebuffer=O,Y.__useDefaultFramebuffer=O===void 0};const Xe=B.createFramebuffer();this.setRenderTarget=function(w,O=0,Y=0){P=w,C=O,R=Y;let k=!0,X=null,ne=!1,ye=!1;if(w){const De=Le.get(w);if(De.__useDefaultFramebuffer!==void 0)Ne.bindFramebuffer(B.FRAMEBUFFER,null),k=!1;else if(De.__webglFramebuffer===void 0)st.setupRenderTarget(w);else if(De.__hasExternalTextures)st.rebindTextures(w,Le.get(w.texture).__webglTexture,Le.get(w.depthTexture).__webglTexture);else if(w.depthBuffer){const Ge=w.depthTexture;if(De.__boundDepthTexture!==Ge){if(Ge!==null&&Le.has(Ge)&&(w.width!==Ge.image.width||w.height!==Ge.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");st.setupDepthRenderbuffer(w)}}const Se=w.texture;(Se.isData3DTexture||Se.isDataArrayTexture||Se.isCompressedArrayTexture)&&(ye=!0);const Be=Le.get(w).__webglFramebuffer;w.isWebGLCubeRenderTarget?(Array.isArray(Be[O])?X=Be[O][Y]:X=Be[O],ne=!0):w.samples>0&&st.useMultisampledRTT(w)===!1?X=Le.get(w).__webglMultisampledFramebuffer:Array.isArray(Be)?X=Be[Y]:X=Be,L.copy(w.viewport),z.copy(w.scissor),H=w.scissorTest}else L.copy(Me).multiplyScalar(Z).floor(),z.copy(me).multiplyScalar(Z).floor(),H=se;if(Y!==0&&(X=Xe),Ne.bindFramebuffer(B.FRAMEBUFFER,X)&&k&&Ne.drawBuffers(w,X),Ne.viewport(L),Ne.scissor(z),Ne.setScissorTest(H),ne){const De=Le.get(w.texture);B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_CUBE_MAP_POSITIVE_X+O,De.__webglTexture,Y)}else if(ye){const De=Le.get(w.texture),Se=O;B.framebufferTextureLayer(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,De.__webglTexture,Y,Se)}else if(w!==null&&Y!==0){const De=Le.get(w.texture);B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,De.__webglTexture,Y)}A=-1},this.readRenderTargetPixels=function(w,O,Y,k,X,ne,ye,oe=0){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let De=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ye!==void 0&&(De=De[ye]),De){Ne.bindFramebuffer(B.FRAMEBUFFER,De);try{const Se=w.textures[oe],Be=Se.format,Ge=Se.type;if(!it.textureFormatReadable(Be)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!it.textureTypeReadable(Ge)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}O>=0&&O<=w.width-k&&Y>=0&&Y<=w.height-X&&(w.textures.length>1&&B.readBuffer(B.COLOR_ATTACHMENT0+oe),B.readPixels(O,Y,k,X,Je.convert(Be),Je.convert(Ge),ne))}finally{const Se=P!==null?Le.get(P).__webglFramebuffer:null;Ne.bindFramebuffer(B.FRAMEBUFFER,Se)}}},this.readRenderTargetPixelsAsync=async function(w,O,Y,k,X,ne,ye,oe=0){if(!(w&&w.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let De=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ye!==void 0&&(De=De[ye]),De)if(O>=0&&O<=w.width-k&&Y>=0&&Y<=w.height-X){Ne.bindFramebuffer(B.FRAMEBUFFER,De);const Se=w.textures[oe],Be=Se.format,Ge=Se.type;if(!it.textureFormatReadable(Be))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(Ge))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const ct=B.createBuffer();B.bindBuffer(B.PIXEL_PACK_BUFFER,ct),B.bufferData(B.PIXEL_PACK_BUFFER,ne.byteLength,B.STREAM_READ),w.textures.length>1&&B.readBuffer(B.COLOR_ATTACHMENT0+oe),B.readPixels(O,Y,k,X,Je.convert(Be),Je.convert(Ge),0);const Et=P!==null?Le.get(P).__webglFramebuffer:null;Ne.bindFramebuffer(B.FRAMEBUFFER,Et);const yt=B.fenceSync(B.SYNC_GPU_COMMANDS_COMPLETE,0);return B.flush(),await N2(B,yt,4),B.bindBuffer(B.PIXEL_PACK_BUFFER,ct),B.getBufferSubData(B.PIXEL_PACK_BUFFER,0,ne),B.deleteBuffer(ct),B.deleteSync(yt),ne}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(w,O=null,Y=0){const k=Math.pow(2,-Y),X=Math.floor(w.image.width*k),ne=Math.floor(w.image.height*k),ye=O!==null?O.x:0,oe=O!==null?O.y:0;st.setTexture2D(w,0),B.copyTexSubImage2D(B.TEXTURE_2D,Y,0,0,ye,oe,X,ne),Ne.unbindTexture()};const ut=B.createFramebuffer(),St=B.createFramebuffer();this.copyTextureToTexture=function(w,O,Y=null,k=null,X=0,ne=null){ne===null&&(X!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),ne=X,X=0):ne=0);let ye,oe,De,Se,Be,Ge,ct,Et,yt;const Nt=w.isCompressedTexture?w.mipmaps[ne]:w.image;if(Y!==null)ye=Y.max.x-Y.min.x,oe=Y.max.y-Y.min.y,De=Y.isBox3?Y.max.z-Y.min.z:1,Se=Y.min.x,Be=Y.min.y,Ge=Y.isBox3?Y.min.z:0;else{const un=Math.pow(2,-X);ye=Math.floor(Nt.width*un),oe=Math.floor(Nt.height*un),w.isDataArrayTexture?De=Nt.depth:w.isData3DTexture?De=Math.floor(Nt.depth*un):De=1,Se=0,Be=0,Ge=0}k!==null?(ct=k.x,Et=k.y,yt=k.z):(ct=0,Et=0,yt=0);const xt=Je.convert(O.format),rt=Je.convert(O.type);let Xt;O.isData3DTexture?(st.setTexture3D(O,0),Xt=B.TEXTURE_3D):O.isDataArrayTexture||O.isCompressedArrayTexture?(st.setTexture2DArray(O,0),Xt=B.TEXTURE_2D_ARRAY):(st.setTexture2D(O,0),Xt=B.TEXTURE_2D),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,O.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,O.unpackAlignment);const Ut=B.getParameter(B.UNPACK_ROW_LENGTH),Zt=B.getParameter(B.UNPACK_IMAGE_HEIGHT),Wt=B.getParameter(B.UNPACK_SKIP_PIXELS),Ie=B.getParameter(B.UNPACK_SKIP_ROWS),Qt=B.getParameter(B.UNPACK_SKIP_IMAGES);B.pixelStorei(B.UNPACK_ROW_LENGTH,Nt.width),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,Nt.height),B.pixelStorei(B.UNPACK_SKIP_PIXELS,Se),B.pixelStorei(B.UNPACK_SKIP_ROWS,Be),B.pixelStorei(B.UNPACK_SKIP_IMAGES,Ge);const Rt=w.isDataArrayTexture||w.isData3DTexture,tn=O.isDataArrayTexture||O.isData3DTexture;if(w.isDepthTexture){const un=Le.get(w),Kt=Le.get(O),je=Le.get(un.__renderTarget),He=Le.get(Kt.__renderTarget);Ne.bindFramebuffer(B.READ_FRAMEBUFFER,je.__webglFramebuffer),Ne.bindFramebuffer(B.DRAW_FRAMEBUFFER,He.__webglFramebuffer);for(let rn=0;rn<De;rn++)Rt&&(B.framebufferTextureLayer(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Le.get(w).__webglTexture,X,Ge+rn),B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Le.get(O).__webglTexture,ne,yt+rn)),B.blitFramebuffer(Se,Be,ye,oe,ct,Et,ye,oe,B.DEPTH_BUFFER_BIT,B.NEAREST);Ne.bindFramebuffer(B.READ_FRAMEBUFFER,null),Ne.bindFramebuffer(B.DRAW_FRAMEBUFFER,null)}else if(X!==0||w.isRenderTargetTexture||Le.has(w)){const un=Le.get(w),Kt=Le.get(O);Ne.bindFramebuffer(B.READ_FRAMEBUFFER,ut),Ne.bindFramebuffer(B.DRAW_FRAMEBUFFER,St);for(let je=0;je<De;je++)Rt?B.framebufferTextureLayer(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,un.__webglTexture,X,Ge+je):B.framebufferTexture2D(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,un.__webglTexture,X),tn?B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Kt.__webglTexture,ne,yt+je):B.framebufferTexture2D(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,Kt.__webglTexture,ne),X!==0?B.blitFramebuffer(Se,Be,ye,oe,ct,Et,ye,oe,B.COLOR_BUFFER_BIT,B.NEAREST):tn?B.copyTexSubImage3D(Xt,ne,ct,Et,yt+je,Se,Be,ye,oe):B.copyTexSubImage2D(Xt,ne,ct,Et,Se,Be,ye,oe);Ne.bindFramebuffer(B.READ_FRAMEBUFFER,null),Ne.bindFramebuffer(B.DRAW_FRAMEBUFFER,null)}else tn?w.isDataTexture||w.isData3DTexture?B.texSubImage3D(Xt,ne,ct,Et,yt,ye,oe,De,xt,rt,Nt.data):O.isCompressedArrayTexture?B.compressedTexSubImage3D(Xt,ne,ct,Et,yt,ye,oe,De,xt,Nt.data):B.texSubImage3D(Xt,ne,ct,Et,yt,ye,oe,De,xt,rt,Nt):w.isDataTexture?B.texSubImage2D(B.TEXTURE_2D,ne,ct,Et,ye,oe,xt,rt,Nt.data):w.isCompressedTexture?B.compressedTexSubImage2D(B.TEXTURE_2D,ne,ct,Et,Nt.width,Nt.height,xt,Nt.data):B.texSubImage2D(B.TEXTURE_2D,ne,ct,Et,ye,oe,xt,rt,Nt);B.pixelStorei(B.UNPACK_ROW_LENGTH,Ut),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,Zt),B.pixelStorei(B.UNPACK_SKIP_PIXELS,Wt),B.pixelStorei(B.UNPACK_SKIP_ROWS,Ie),B.pixelStorei(B.UNPACK_SKIP_IMAGES,Qt),ne===0&&O.generateMipmaps&&B.generateMipmap(Xt),Ne.unbindTexture()},this.copyTextureToTexture3D=function(w,O,Y=null,k=null,X=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(w,O,Y,k,X)},this.initRenderTarget=function(w){Le.get(w).__webglFramebuffer===void 0&&st.setupRenderTarget(w)},this.initTexture=function(w){w.isCubeTexture?st.setTextureCube(w,0):w.isData3DTexture?st.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?st.setTexture2DArray(w,0):st.setTexture2D(w,0),Ne.unbindTexture()},this.resetState=function(){C=0,R=0,P=null,Ne.reset(),Pt.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=Ht._getDrawingBufferColorSpace(e),t.unpackColorSpace=Ht._getUnpackColorSpace()}}const Wh={type:"change"},fc={type:"start"},ru={type:"end"},ra=new Ys,Xh=new Kn,I3=Math.cos(70*Ei.DEG2RAD),yn=new I,On=2*Math.PI,ln={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 au extends Z1{constructor(e,t=null){super(e,t),this.state=ln.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 Hn,this._lastTargetPosition=new I,this._quat=new Hn().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=B3.bind(this),this._onPointerDown=z3.bind(this),this._onPointerUp=O3.bind(this),this._onContextMenu=j3.bind(this),this._onMouseWheel=H3.bind(this),this._onKeyDown=G3.bind(this),this._onTouchStart=W3.bind(this),this._onTouchMove=X3.bind(this),this._onMouseDown=k3.bind(this),this._onMouseMove=V3.bind(this),this._interceptControlDown=q3.bind(this),this._interceptControlUp=$3.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(Wh),this.update(),this.state=ln.NONE}update(e=null){const t=this.object.position;yn.copy(t).sub(this.target),yn.applyQuaternion(this._quat),this._spherical.setFromVector3(yn),this.autoRotate&&this.state===ln.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+=On:n>Math.PI&&(n-=On),i<-Math.PI?i+=On:i>Math.PI&&(i-=On),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(yn.setFromSpherical(this._spherical),yn.applyQuaternion(this._quatInverse),t.copy(this.target).add(yn),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=yn.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=yn.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))<I3?this.object.lookAt(this.target):(Xh.setFromNormalAndCoplanarPoint(this.object.up,this.target),ra.intersectPlane(Xh,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(Wh),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?On/60*this.autoRotateSpeed*e:On/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){yn.setFromMatrixColumn(t,0),yn.multiplyScalar(-e),this._panOffset.add(yn)}_panUp(e,t){this.screenSpacePanning===!0?yn.setFromMatrixColumn(t,1):(yn.setFromMatrixColumn(t,0),yn.crossVectors(this.object.up,yn)),yn.multiplyScalar(e),this._panOffset.add(yn)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;yn.copy(i).sub(this.target);let r=yn.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(On*this._rotateDelta.x/t.clientHeight),this._rotateUp(On*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(On*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(-On*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(On*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(-On*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(On*this._rotateDelta.x/t.clientHeight),this._rotateUp(On*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 z3(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 B3(s){this.enabled!==!1&&(s.pointerType==="touch"?this._onTouchMove(s):this._onMouseMove(s))}function O3(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(ru),this.state=ln.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 k3(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=ln.DOLLY;break;case Ti.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=ln.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=ln.ROTATE}break;case Ti.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=ln.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=ln.PAN}break;default:this.state=ln.NONE}this.state!==ln.NONE&&this.dispatchEvent(fc)}function V3(s){switch(this.state){case ln.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case ln.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case ln.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function H3(s){this.enabled===!1||this.enableZoom===!1||this.state!==ln.NONE||(s.preventDefault(),this.dispatchEvent(fc),this._handleMouseWheel(this._customWheelEvent(s)),this.dispatchEvent(ru))}function G3(s){this.enabled!==!1&&this._handleKeyDown(s)}function W3(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=ln.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=ln.TOUCH_PAN;break;default:this.state=ln.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=ln.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=ln.TOUCH_DOLLY_ROTATE;break;default:this.state=ln.NONE}break;default:this.state=ln.NONE}this.state!==ln.NONE&&this.dispatchEvent(fc)}function X3(s){switch(this._trackPointer(s),this.state){case ln.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case ln.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case ln.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case ln.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=ln.NONE}}function j3(s){this.enabled!==!1&&s.preventDefault()}function q3(s){s.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function $3(s){s.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var Y3=Object.defineProperty,J3=(s,e,t)=>e in s?Y3(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,en=(s,e,t)=>J3(s,typeof e!="symbol"?e+"":e,t);const ou=(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%"}),ou(r,s),n&&(r.id=n),i&&(r.className=i),r},Z3=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 Q3=[["x",0,3],["y",1,4],["z",2,5]],jh=new I;function qh({isSphere:s},e,t){s&&(jh.set(0,0,1).applyQuaternion(t.quaternion),Q3.forEach(([n,i,r])=>{const o=jh[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 e4=(s,e,t=10)=>Math.abs(s.clientX-e.x)<t&&Math.abs(s.clientY-e.y)<t,$h=new J1,Yh=new et,Jh=(s,e,t,n)=>{Yh.set((s.clientX-e.left)/e.width*2-1,-((s.clientY-e.top)/e.height)*2+1),$h.setFromCamera(Yh,t);const i=$h.intersectObjects(n,!1),r=i.length?i[0]:null;return!r||!r.object.visible?null:r},Po=1e-6,t4=2*Math.PI,lu=["x","y","z"],br=[...lu,"nx","ny","nz"],n4=["x","z","y","nx","nz","ny"],i4=["z","x","y","nz","nx","ny"],Ul="Right",ba="Top",Il="Front",zl="Left",Sa="Bottom",Bl="Back",s4=[Ul,ba,Il,zl,Sa,Bl].map(s=>s.toLocaleLowerCase()),cu=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},ns=s=>JSON.parse(JSON.stringify(s)),r4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=cn.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?n4:o?i4:br;s4.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),lu.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 a4=(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:z,labelColor:H,border:Q}},re)=>{const G=r*re+re*n+e;S(e,G,e,r,R,P,L,A,E),S(r+e*3,G,e,r,R,P,Q??L,z??A,H??E)});const _=d.length,p=e/(r*2),f=e/(r*6),v=1/_,x=new d1(m);return x.repeat.set(.5-2*p,v-2*f),x.offset.set(p,1-f),Object.assign(x,{colorSpace:jt,wrapS:di,wrapT:di,userData:{offsetX:p,offsetY:f,cellHeight:v}}),x;function S(R,P,A,E,L,z,H,Q,re){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()}z&&C(u,R+E/2,P+(E+A)/2,z,t.set(re).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,Me)=>{var me,se;return(((me=Ee.label)==null?void 0:me.length)||0)-(((se=Me.label)==null?void 0:se.length)||0)}).pop().label,{family:L,weight:z}=A,H=i?Math.sqrt(Math.pow(P*.7,2)/2):P;let Q=H,re=0,G=0;do{u.font=`${z} ${Q}px ${L}`;const Ee=u.measureText(E);re=Ee.width,G=Ee.fontBoundingBoxDescent,Q--}while(re>H&&Q>0);const le=H/G,Z=Math.min(H/re,le),_e=Math.floor(Q*Z);return[`${z} ${_e}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))}},o4=(s,e)=>s.offset.x=(e?.5:0)+s.userData.offsetX,pc=(s,e)=>{const{offset:t,userData:{offsetY:n,cellHeight:i}}=s;t.y=1-(e+1)*i+n};function mc(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,x,S,F;for(let C=0;C<4;C++){f=C<1||C>2?i:-i,v=C<2?r:-r,x=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(x+o*_,S+l*p),R<e&&(F=(e+1)*C+R+4,h.push(C,F,F+1))}return new hn().setIndex(new _n(new Uint32Array(h),1)).setAttribute("position",new _n(new Float32Array(d),3)).setAttribute("uv",new _n(new Float32Array(m),2))}const l4=(s,e)=>{const t=new I,{isSphere:n,radius:i,smoothness:r}=s,o=mc(i,r);return br.map((a,l)=>{const c=l<3,d=br[l],m=l?e.clone():e;pc(m,l);const{enabled:u,scale:h,opacity:g,hover:_}=s[d],p={map:m,opacity:g,transparent:!0},f=n?new tc(new za(p)):new Bt(o,new qi(p)),v=c?d:d[1];return f.position[v]=(c?1:-1)*(n?cu: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})},c4=(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:mc(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();pc(v,6),m.map=v}else m.color=i;const p=t?new tc(new za(m)):new Bt(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})},h4=(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:mc(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();pc(S,t),u.map=S}else u.color=r;const v=n?new tc(new za(u)):new Bt(m,new qi(u)),x=f*3;return v.position.set(h[x],h[x+1],h[x+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 u4(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=Zh(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=Zh(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 Zh(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 _n(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 d4=(s,e)=>{const{isSphere:t,background:{enabled:n,color:i,opacity:r,hover:o}}=e;let a;const l=new qi({color:i,side:zn,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)a=new Bt(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?u4([c,u]):u,d.scale.setScalar(m)}),a=new Bt(c,l)}return a.userData={color:i,opacity:r,hover:o},a},Qh=new Nn,aa=new I;class hu extends q1{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 C1(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Nn);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Qh.setFromBufferAttribute(t),this.boundingBox.union(Qh))}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)}}Ke.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}};Vn.line={uniforms:ec.merge([Ke.common,Ke.fog,Ke.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 gc extends Li{constructor(e){super({type:"LineMaterial",uniforms:ec.clone(Hn.line.uniforms),vertexShader:Hn.line.vertexShader,fragmentShader:Hn.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 qt,e0=new I,t0=new I,Cn=new qt,Rn=new qt,hi=new qt,Uo=new I,No=new Et,Dn=new K1,n0=new I,oa=new In,la=new Ui,ui=new qt;let di,ls;function i0(s,e,t){return ui.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),ui.multiplyScalar(1/ui.w),ui.x=ls/t.width,ui.y=ls/t.height,ui.applyMatrix4(s.projectionMatrixInverse),ui.multiplyScalar(1/ui.w),Math.abs(Math.max(ui.x,ui.y))}function f4(s,e){const t=s.matrixWorld,n=s.geometry,i=n.attributes.instanceStart,r=n.attributes.instanceEnd,a=Math.min(n.instanceCount,i.count);for(let o=0,l=a;o<l;o++){Dn.start.fromBufferAttribute(i,o),Dn.end.fromBufferAttribute(r,o),Dn.applyMatrix4(t);const c=new I,d=new I;di.distanceSqToSegment(Dn.start,Dn.end,d,c),d.distanceTo(c)<ls*.5&&e.push({point:d,pointOnLine:c,distance:di.origin.distanceTo(d),object:s,face:null,faceIndex:o,uv:null,uv1:null})}}function p4(s,e,t){const n=e.projectionMatrix,i=s.material.resolution,r=s.matrixWorld,a=s.geometry,o=a.attributes.instanceStart,l=a.attributes.instanceEnd,c=Math.min(a.instanceCount,o.count),d=-e.near;di.at(1,hi),hi.w=1,hi.applyMatrix4(e.matrixWorldInverse),hi.applyMatrix4(n),hi.multiplyScalar(1/hi.w),hi.x*=i.x/2,hi.y*=i.y/2,hi.z=0,Uo.copy(hi),No.multiplyMatrices(e.matrixWorldInverse,r);for(let m=0,u=c;m<u;m++){if(Cn.fromBufferAttribute(o,m),Rn.fromBufferAttribute(l,m),Cn.w=1,Rn.w=1,Cn.applyMatrix4(No),Rn.applyMatrix4(No),Cn.z>d&&Rn.z>d)continue;if(Cn.z>d){const f=Cn.z-Rn.z,v=(Cn.z-d)/f;Cn.lerp(Rn,v)}else if(Rn.z>d){const f=Rn.z-Cn.z,v=(Rn.z-d)/f;Rn.lerp(Cn,v)}Cn.applyMatrix4(n),Rn.applyMatrix4(n),Cn.multiplyScalar(1/Cn.w),Rn.multiplyScalar(1/Rn.w),Cn.x*=i.x/2,Cn.y*=i.y/2,Rn.x*=i.x/2,Rn.y*=i.y/2,Dn.start.copy(Cn),Dn.start.z=0,Dn.end.copy(Rn),Dn.end.z=0;const h=Dn.closestPointToPointParameter(Uo,!0);Dn.at(h,n0);const g=Ai.lerp(Cn.z,Rn.z,h),_=g>=-1&&g<=1,p=Uo.distanceTo(n0)<ls*.5;if(_&&p){Dn.start.fromBufferAttribute(o,m),Dn.end.fromBufferAttribute(l,m),Dn.start.applyMatrix4(r),Dn.end.applyMatrix4(r);const f=new I,v=new I;di.distanceSqToSegment(Dn.start,Dn.end,v,f),t.push({point:v,pointOnLine:f,distance:di.origin.distanceTo(v),object:s,face:null,faceIndex:m,uv:null,uv1:null})}}}class m4 extends zt{constructor(e=new hu,t=new gc({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 a=0,o=0,l=t.count;a<l;a++,o+=2)e0.fromBufferAttribute(t,a),t0.fromBufferAttribute(n,a),i[o]=o===0?0:i[o-1],i[o+1]=i[o]+e0.distanceTo(t0);const r=new Dl(i,2,1);return e.setAttribute("instanceDistanceStart",new mi(r,1,0)),e.setAttribute("instanceDistanceEnd",new mi(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;di=e.ray;const a=this.matrixWorld,o=this.geometry,l=this.material;ls=l.linewidth+r,o.boundingSphere===null&&o.computeBoundingSphere(),la.copy(o.boundingSphere).applyMatrix4(a);let c;if(n)c=ls*.5;else{const m=Math.max(i.near,la.distanceToPoint(di.origin));c=i0(i,m,l.resolution)}if(la.radius+=c,di.intersectsSphere(la)===!1)return;o.boundingBox===null&&o.computeBoundingBox(),oa.copy(o.boundingBox).applyMatrix4(a);let d;if(n)d=ls*.5;else{const m=Math.max(i.near,oa.distanceToPoint(di.origin));d=i0(i,m,l.resolution)}oa.expandByScalar(d),di.intersectsBox(oa)!==!1&&(n?f4(this,t):p4(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 uu extends hu{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 g4 extends m4{constructor(e=new uu,t=new gc({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}const _4=s=>{const e=new Tt,t=[],n=[],{isSphere:i}=s;if(br.forEach((o,l)=>{const{enabled:c,line:d,scale:m,color:u}=s[o];if(!c||!d)return;const h=l<3?1:-1,g=(i?cu-m/2:.975)*h;t.push(o.includes("x")?g:0,o.includes("y")?g:0,o.includes("z")?g:0,0,0,0);const _=e.set(u).toArray();n.push(..._,..._)}),!t.length)return null;const r=new uu().setPositions(t).setColors(n),a=new gc({linewidth:s.lineWidth,vertexColors:!0,resolution:new Ze(window.innerWidth,window.innerHeight)});return new g4(r,a).computeLineDistances()},v4=s=>{const{corners:e,edges:t}=s,n=[],i=a4(s),r=l4(s,i);n.push(...r),e.enabled&&n.push(...c4(s,i)),t.enabled&&n.push(...h4(s,i,e.enabled?7:6));const a=d4(r,s),o=_4(s);return[n,a,o]},cr=(s,e=!0)=>{const{material:t,userData:n}=s,{opacity:i,color:r,scale:a}=e?n.hover:n;s.scale.setScalar(a),t.opacity=i,t.map?o4(t.map,e):t.color.set(r)},Fs=new Et,s0=new Ll,y4=new Ze,ss=new I,r0=new qt;class du extends cn{constructor(e,t,n={}){super(),nn(this,"enabled",!0),nn(this,"camera"),nn(this,"renderer"),nn(this,"options"),nn(this,"target",new I),nn(this,"animated",!0),nn(this,"speed",1),nn(this,"animating",!1),nn(this,"_options"),nn(this,"_intersections"),nn(this,"_background",null),nn(this,"_viewport",[0,0,0,0]),nn(this,"_originalViewport",[0,0,0,0]),nn(this,"_originalScissor",[0,0,0,0]),nn(this,"_scene"),nn(this,"_camera"),nn(this,"_container"),nn(this,"_domElement"),nn(this,"_domRect"),nn(this,"_dragging",!1),nn(this,"_distance",0),nn(this,"_clock",new Y1),nn(this,"_targetQuaternion",new Gn),nn(this,"_quaternionStart",new Gn),nn(this,"_quaternionEnd",new Gn),nn(this,"_pointerStart",new Ze),nn(this,"_focus",null),nn(this,"_placement"),nn(this,"_controls"),nn(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=ou(this._domElement,e),this.domUpdate()}set(e={}){this.dispose(),this.options=e,this._options=r4(e),this._camera=this._options.isSphere?new Ha(-1.8,1.8,1.8,-1.8,5,10):new wn(26,1,5,10),this._camera.position.set(0,0,7);const[t,n,i]=v4(this._options);n&&this.add(n),i&&this.add(i),this.add(...t),this._background=n,this._intersections=t;const{container:r,animated:a,speed:o}=this._options;return this.animated=a,this.speed=o,this._container=r?Z3(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(r0).toArray(this._originalViewport),e.getScissorTest()&&e.getScissor(r0).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,a;this.remove(t);const o=t;(n=o.material)==null||n.dispose(),(r=(i=o.material)==null?void 0:i.map)==null||r.dispose(),(a=o.geometry)==null||a.dispose()}),(e=this._domElement)==null||e.remove()}_updateOrientation(e=!0){e&&(this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()),qh(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()*t4*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)<Lo&&(this._controls&&(this._controls.enabled=!0),this.animating=!1,this.dispatchEvent({type:"end"}))}_setOrientation(e){const t=this.camera,n=this.target;ss.copy(e).multiplyScalar(this._distance),Fs.setPosition(ss).lookAt(ss,this.position,this.up),this._targetQuaternion.setFromRotationMatrix(Fs),ss.add(n),Fs.lookAt(ss,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(e4(l,this._pointerStart))return;this._dragging=!0}const c=y4.set(l.clientX,l.clientY).sub(this._pointerStart).multiplyScalar(1/this._domRect.width*Math.PI),d=this.coordinateConversion(ss.subVectors(this.camera.position,this.target)),m=s0.setFromVector3(d);m.theta=a-c.x,m.phi=Ul(o-c.y,Lo,Math.PI-Lo),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(ss.subVectors(this.camera.position,this.target)),r=s0.setFromVector3(i),a=r.theta,o=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,a=cn.DEFAULT_UP;return a.x===1?t?e.set(i,r,n):e.set(r,n,i):a.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=Jh(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=Jh(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):qh(this._options,this._intersections,this.camera))}}function x4(s){let e=null,t=null,n=null,i=null,r=null,a=null,o=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 P=s.value;t=new wn(75,P.clientWidth/P.clientHeight,.1,1e4),t.position.set(8,-8,6),t.up.set(0,0,1),t.lookAt(0,0,0),n=new su({antialias:!0,alpha:!0}),n.setSize(P.clientWidth,P.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Gl,n.toneMapping=Wl,n.toneMappingExposure=1,n.outputColorSpace=Zt,P.appendChild(n.domElement),i=new au(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Ci.PAN,RIGHT:Ci.ROTATE},i.panSpeed=.7,r=new du(t,n,{container:P,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(),x()},p=(P,z)=>{o&&(e.remove(o),o.dispose()),l&&(e.remove(l),l.geometry.dispose(),l.material.dispose());const H=Math.min(Math.max(Math.floor(P/20),30),40);o=new Z0(P,H,13421772,14540253),o.rotateX(Math.PI/2),o.position.copy(z),e.add(o);const Q=new Pi(P,P),re=new j0({opacity:.3,color:0});l=new zt(Q,re),l.position.copy(z),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},f=()=>{if(u.value.length===0)return;const P=new In;let z=!1;if(u.value.forEach(K=>{if(K.userData.boundingBox)P.union(K.userData.boundingBox),z=!0;else if(K.userData.modelId&&modelBoundingBoxes.has(K.userData.modelId)){const pe=modelBoundingBoxes.get(K.userData.modelId);P.union(pe.box),z=!0}else P.expandByObject(K),z=!0}),!z){console.warn("无法计算包围盒,网格更新失败");return}const H=P.getSize(new I),Q=P.getCenter(new I),re=Math.max(H.x,H.y,H.z),G=Math.max(re*8,50),le=new I(Q.x,Q.y,P.min.z);p(G,le)},v=()=>{const P=new hc(4210752,.6);e.add(P);const z=new gr(16777215,2);z.position.set(10,10,8),z.castShadow=!0,z.shadow.mapSize.width=4096,z.shadow.mapSize.height=4096,z.shadow.camera.near=.5,z.shadow.camera.far=50,z.shadow.camera.left=-50,z.shadow.camera.right=50,z.shadow.camera.top=50,z.shadow.camera.bottom=-50,e.add(z);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 re=new K0(16777215,4473924,.8);e.add(re);const G=new La(16777215,1,50);G.position.set(15,15,15),e.add(G);const le=new La(16777215,.5,50);le.position.set(-15,-15,15),e.add(le)},x=()=>{a=requestAnimationFrame(x),i&&i.update();const P=performance.now(),z=P-m;z<d||(m=P-z%d,n&&e&&t&&n.render(e,t),r&&r.render())},b=P=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(H=>{P[H]&&P[H].dispose&&P[H].dispose()}),P.dispose&&P.dispose()},F=P=>{P==null||P.traverse(z=>{z.geometry&&z.geometry.dispose(),z.material&&(Array.isArray(z.material)?z.material.forEach(H=>{b(H)}):b(z.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const P=s.value,z=P.clientWidth,H=P.clientHeight;t.aspect=z/H,t.updateProjectionMatrix(),n.setSize(z,H),r.update()},fitCameraToAllModels:P=>{if(!t||!i||u.value.length===0)return;const z=new In;let H=!1;if(u.value.forEach(pe=>{if(pe.userData.boundingBox)z.union(pe.userData.boundingBox),H=!0;else if(pe.userData.modelId&&P.has(pe.userData.modelId)){const Me=P.get(pe.userData.modelId);z.union(Me.box),H=!0}else z.expandByObject(pe),H=!0}),!H){console.warn("无法计算包围盒");return}const Q=z.getSize(new I),re=z.getCenter(new I),le=Math.max(Q.x,Q.y,Q.z)*.8,K=new I(re.x+le,re.y-le,re.z+le);t.position.copy(K),t.lookAt(re),i.target.copy(re),i.update(),h.value.copy(K),g.value.copy(re),f()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(z=>{e.remove(z),F(z)});const P=[];e.children.forEach(z=>{!z.isLight&&!z.isCamera&&z.type!=="GridHelper"&&z!==l&&P.push(z)}),P.forEach(z=>{e.remove(z),F(z)}),u.value=[],f()},cleanup:()=>{a&&cancelAnimationFrame(a),o&&o.dispose(),l&&(l.geometry.dispose(),l.material.dispose()),n&&n.dispose(),i&&i.dispose(),r&&r.dispose()},updateGridForModels:f}}function M4(s,e){const t=y.ref(!1);let n=null,i=12700,r=new I,a=new I,o=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,x=new I(o.x+v,o.y,o.z),b=new I(o.x,o.y+v,o.z),F=new I(o.x,o.y-v,o.z);if(p<=.567){const R=p/.567*Math.PI*2;f.x=o.x+Math.cos(R)*v,f.z=o.z+Math.sin(R)*v,f.y=o.y}else if(p<=.724){const C=(p-.567)/.157,R=d(C);f.lerpVectors(x,b,R)}else if(p<=.881){const C=(p-.724)/.157,L=d(C)*Math.PI;f.x=o.x+Math.sin(L)*v,f.y=o.y+Math.cos(L)*v,f.z=o.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,x=Math.min(v/i,1);if(x>=1){g();return}const b=m(x);p.position.copy(b),p.lookAt(o),f.target.copy(o),c=requestAnimationFrame(u)},h=()=>{if(e.value.length===0)return;const{camera:p,controls:f}=s();if(!p||!f)return;r.copy(p.position),a.copy(f.target);const v=new In;e.value.forEach(A=>{v.expandByObject(A)});const x=v.getSize(new I);o=v.getCenter(new I),l=Math.max(x.x,x.y,x.z)*1.2;const b=new I(o.x+l*1.2,o.y,o.z);f.enabled=!1;const F=p.position.clone(),C=1e3,R=Date.now(),L=()=>{const A=Date.now()-R,E=Math.min(A/C,1),P=d(E);p.position.lerpVectors(F,b,P),p.lookAt(o),f.target.copy(o),E<1?requestAnimationFrame(L):(t.value=!0,n=null,u())};L()},g=()=>{t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{controls:p}=s();p&&(p.enabled=!0,p.target.copy(a))};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(),x=f.target.clone(),b=1500,F=Date.now(),C=()=>{const R=Date.now()-F,L=Math.min(R/b,1),A=d(L);p.position.lerpVectors(v,r,A),f.target.lerpVectors(x,a,A),L<1&&requestAnimationFrame(C)};C()}else h()},startAnimation:h,stopAnimation:g}}function b4(s,e){const t=y.ref(!1),n=y.ref("none");let i=[],r=[],a=new In,o=new I;const l=()=>{i=[new Zn(new I(1,0,0),0),new Zn(new I(0,1,0),0),new Zn(new I(0,0,1),0)]},c=()=>{a.makeEmpty(),e.value.forEach(_=>{a.expandByObject(_)}),o=a.getCenter(new I)},d=_=>{const p=a.getSize(new I);let f,v,x;_==="x"?(f=new Pi(p.z*1.2,p.y*1.2),v=new I(o.x,o.y,o.z),x=new Tn(0,Math.PI/2,0)):_==="y"?(f=new Pi(p.x*1.2,p.z*1.2),v=new I(o.x,o.y,o.z),x=new Tn(Math.PI/2,0,0)):_==="z"&&(f=new Pi(p.x*1.2,p.y*1.2),v=new I(o.x,o.y,o.z),x=new Tn(0,0,0));const b=new mn({color:8900331,transparent:!0,opacity:.3,side:gn,depthWrite:!1}),F=new zt(f,b);return F.position.copy(v),F.rotation.copy(x),F},m=()=>{if(u(),h(),n.value==="none")return;c();let _=null;if(n.value==="x"?(i[0].constant=-o.x,_=i[0]):n.value==="y"?(i[1].constant=-o.y,_=i[1]):n.value==="z"&&(i[2].constant=-o.z,_=i[2]),_){e.value.forEach(f=>{f.traverse(v=>{v.isMesh&&v.material&&(Array.isArray(v.material)?v.material.forEach(x=>{x.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 qi extends li{constructor(e){super(e)}load(e,t,n,i){const r=this,a=new Zs(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(o){try{t(r.parse(o))}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,x,b;for(let P=0;P<70;P++)d.getUint32(P,!1)==1129270351&&d.getUint8(P+4)==82&&d.getUint8(P+5)==61&&(_=!0,p=new Float32Array(m*3*3),f=d.getUint8(P+6)/255,v=d.getUint8(P+7)/255,x=d.getUint8(P+8)/255,b=d.getUint8(P+9)/255);const F=84,C=12*4+2,R=new hn,L=new Float32Array(m*3*3),A=new Float32Array(m*3*3),E=new Tt;for(let P=0;P<m;P++){const z=F+P*C,H=d.getFloat32(z,!0),Q=d.getFloat32(z+4,!0),re=d.getFloat32(z+8,!0);if(_){const G=d.getUint16(z+48,!0);(G&32768)===0?(u=(G&31)/31,h=(G>>5&31)/31,g=(G>>10&31)/31):(u=f,h=v,g=x)}for(let G=1;G<=3;G++){const le=z+G*12,K=P*3*3+(G-1)*3;L[K]=d.getFloat32(le,!0),L[K+1]=d.getFloat32(le+4,!0),L[K+2]=d.getFloat32(le+8,!0),A[K]=H,A[K+1]=Q,A[K+2]=re,_&&(E.setRGB(u,h,g,Zt),p[K]=E.r,p[K+1]=E.g,p[K+2]=E.b)}}return R.setAttribute("position",new _n(L,3)),R.setAttribute("normal",new _n(A,3)),_&&(R.setAttribute("color",new _n(p,3)),R.hasColors=!0,R.alpha=b),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=[],x=[],b=[],F=new I;let C,R=0,L=0,A=0;for(;(C=m.exec(c))!==null;){L=A;const E=C[0],P=(C=h.exec(E))!==null?C[1]:"";for(b.push(P);(C=u.exec(E))!==null;){let Q=0,re=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]),re++;for(;(C=p.exec(G))!==null;)v.push(parseFloat(C[1]),parseFloat(C[2]),parseFloat(C[3])),x.push(F.x,F.y,F.z),Q++,A++;re!==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 z=L,H=A-L;d.userData.groupNames=b,d.addGroup(z,H,R),R++}return d.setAttribute("position",new Nt(v,3)),d.setAttribute("normal",new Nt(x,3)),d}function a(c){return typeof c!="string"?new TextDecoder().decode(c):c}function o(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=o(e);return t(l)?i(l):r(a(e))}}class a0 extends H1{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,K,pe,Me){let ye,de;const se=K.pixel_size>>3,W=K.width*K.height*se;if(le&&(de=Me.subarray(pe,pe+=K.colormap_length*(K.colormap_size>>3))),G){ye=new Uint8Array(W);let j,ne,ee,ce=0;const q=new Uint8Array(se);for(;ce<W;)if(j=Me[pe++],ne=(j&127)+1,j&128){for(ee=0;ee<se;++ee)q[ee]=Me[pe++];for(ee=0;ee<ne;++ee)ye.set(q,ce+ee*se);ce+=se*ne}else{for(ne*=se,ee=0;ee<ne;++ee)ye[ce+ee]=Me[pe++];ce+=ne}}else ye=Me.subarray(pe,pe+=le?K.width*K.height:W);return{pixel_data:ye,palettes:de}}function i(G,le,K,pe,Me,ye,de,se,W){const j=W;let ne,ee=0,ce,q;const he=E.width;for(q=le;q!==pe;q+=K)for(ce=Me;ce!==de;ce+=ye,ee++)ne=se[ee],G[(ce+he*q)*4+3]=255,G[(ce+he*q)*4+2]=j[ne*3+0],G[(ce+he*q)*4+1]=j[ne*3+1],G[(ce+he*q)*4+0]=j[ne*3+2];return G}function r(G,le,K,pe,Me,ye,de,se){let W,j=0,ne,ee;const ce=E.width;for(ee=le;ee!==pe;ee+=K)for(ne=Me;ne!==de;ne+=ye,j+=2)W=se[j+0]+(se[j+1]<<8),G[(ne+ce*ee)*4+0]=(W&31744)>>7,G[(ne+ce*ee)*4+1]=(W&992)>>2,G[(ne+ce*ee)*4+2]=(W&31)<<3,G[(ne+ce*ee)*4+3]=W&32768?0:255;return G}function a(G,le,K,pe,Me,ye,de,se){let W=0,j,ne;const ee=E.width;for(ne=le;ne!==pe;ne+=K)for(j=Me;j!==de;j+=ye,W+=3)G[(j+ee*ne)*4+3]=255,G[(j+ee*ne)*4+2]=se[W+0],G[(j+ee*ne)*4+1]=se[W+1],G[(j+ee*ne)*4+0]=se[W+2];return G}function o(G,le,K,pe,Me,ye,de,se){let W=0,j,ne;const ee=E.width;for(ne=le;ne!==pe;ne+=K)for(j=Me;j!==de;j+=ye,W+=4)G[(j+ee*ne)*4+2]=se[W+0],G[(j+ee*ne)*4+1]=se[W+1],G[(j+ee*ne)*4+0]=se[W+2],G[(j+ee*ne)*4+3]=se[W+3];return G}function l(G,le,K,pe,Me,ye,de,se){let W,j=0,ne,ee;const ce=E.width;for(ee=le;ee!==pe;ee+=K)for(ne=Me;ne!==de;ne+=ye,j++)W=se[j],G[(ne+ce*ee)*4+0]=W,G[(ne+ce*ee)*4+1]=W,G[(ne+ce*ee)*4+2]=W,G[(ne+ce*ee)*4+3]=255;return G}function c(G,le,K,pe,Me,ye,de,se){let W=0,j,ne;const ee=E.width;for(ne=le;ne!==pe;ne+=K)for(j=Me;j!==de;j+=ye,W+=2)G[(j+ee*ne)*4+0]=se[W+0],G[(j+ee*ne)*4+1]=se[W+0],G[(j+ee*ne)*4+2]=se[W+0],G[(j+ee*ne)*4+3]=se[W+1];return G}function d(G,le,K,pe,Me){let ye,de,se,W,j,ne;switch((E.flags&v)>>x){default:case C:ye=0,se=1,j=le,de=0,W=1,ne=K;break;case b:ye=0,se=1,j=le,de=K-1,W=-1,ne=-1;break;case R:ye=le-1,se=-1,j=-1,de=0,W=1,ne=K;break;case F:ye=le-1,se=-1,j=-1,de=K-1,W=-1,ne=-1;break}if(H)switch(E.pixel_size){case 8:l(G,de,W,ne,ye,se,j,pe);break;case 16:c(G,de,W,ne,ye,se,j,pe);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(E.pixel_size){case 8:i(G,de,W,ne,ye,se,j,pe,Me);break;case 16:r(G,de,W,ne,ye,se,j,pe);break;case 24:a(G,de,W,ne,ye,se,j,pe);break;case 32:o(G,de,W,ne,ye,se,j,pe);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,x=4,b=0,F=1,C=2,R=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let L=0;const A=new Uint8Array(e),E={id_length:A[L++],colormap_type:A[L++],image_type:A[L++],colormap_index:A[L++]|A[L++]<<8,colormap_length:A[L++]|A[L++]<<8,colormap_size:A[L++],origin:[A[L++]|A[L++]<<8,A[L++]|A[L++]<<8],width:A[L++]|A[L++]<<8,height:A[L++]|A[L++]<<8,pixel_size:A[L++],flags:A[L++]};if(t(E),E.id_length+L>e.length)throw new Error("THREE.TGALoader: No data.");L+=E.id_length;let P=!1,z=!1,H=!1;switch(E.image_type){case _:P=!0,z=!0;break;case u:z=!0;break;case p:P=!0;break;case h:break;case f:P=!0,H=!0;break;case g:H=!0;break}const Q=new Uint8Array(E.width*E.height*4),re=n(P,z,E,L,A);return d(Q,E.width,E.height,re.pixel_data,re.palettes),{data:Q,width:E.width,height:E.height,flipY:!0,generateMipmaps:!0,minFilter:wi}}}class S4 extends li{load(e,t,n,i){const r=this,a=r.path===""?uc.extractUrlBase(e):r.path,o=new Zs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(l){try{t(r.parse(l,a))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},n,i)}parse(e,t){function n(S,M){const U=[],D=S.childNodes;for(let N=0,oe=D.length;N<oe;N++){const fe=D[N];fe.nodeName===M&&U.push(fe)}return U}function i(S){if(S.length===0)return[];const M=S.trim().split(/\s+/),U=new Array(M.length);for(let D=0,N=M.length;D<N;D++)U[D]=M[D];return U}function r(S){if(S.length===0)return[];const M=S.trim().split(/\s+/),U=new Array(M.length);for(let D=0,N=M.length;D<N;D++)U[D]=parseFloat(M[D]);return U}function a(S){if(S.length===0)return[];const M=S.trim().split(/\s+/),U=new Array(M.length);for(let D=0,N=M.length;D<N;D++)U[D]=parseInt(M[D]);return U}function o(S){return S.substring(1)}function l(){return"three_default_"+yn++}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,M,U,D){const N=n(S,M)[0];if(N!==void 0){const oe=n(N,U);for(let fe=0;fe<oe.length;fe++)D(oe[fe])}}function g(S,M){for(const U in S){const D=S[U];D.build=M(S[U])}}function _(S,M){return S.build!==void 0||(S.build=M(S)),S.build}function p(S){const M={sources:{},samplers:{},channels:{}};let U=!1;for(let D=0,N=S.childNodes.length;D<N;D++){const oe=S.childNodes[D];if(oe.nodeType!==1)continue;let fe;switch(oe.nodeName){case"source":fe=oe.getAttribute("id"),M.sources[fe]=Pe(oe);break;case"sampler":fe=oe.getAttribute("id"),M.samplers[fe]=f(oe);break;case"channel":fe=oe.getAttribute("target"),M.channels[fe]=v(oe);break;case"animation":p(oe),U=!0;break;default:console.log(oe)}}U===!1&&(Rt.animations[S.getAttribute("id")||Ai.generateUUID()]=M)}function f(S){const M={inputs:{}};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"input":const oe=o(N.getAttribute("source")),fe=N.getAttribute("semantic");M.inputs[fe]=oe;break}}return M}function v(S){const M={};let D=S.getAttribute("target").split("/");const N=D.shift();let oe=D.shift();const fe=oe.indexOf("(")!==-1,ct=oe.indexOf(".")!==-1;if(ct)D=oe.split("."),oe=D.shift(),M.member=D.shift();else if(fe){const $e=oe.split("(");oe=$e.shift();for(let it=0;it<$e.length;it++)$e[it]=parseInt($e[it].replace(/\)/,""));M.indices=$e}return M.id=N,M.sid=oe,M.arraySyntax=fe,M.memberSyntax=ct,M.sampler=o(S.getAttribute("source")),M}function x(S){const M=[],U=S.channels,D=S.samplers,N=S.sources;for(const oe in U)if(U.hasOwnProperty(oe)){const fe=U[oe],ct=D[fe.sampler],$e=ct.inputs.INPUT,it=ct.inputs.OUTPUT,St=N[$e],Ne=N[it],vt=F(fe,St,Ne);E(vt,M)}return M}function b(S){return _(Rt.animations[S],x)}function F(S,M,U){const D=Rt.nodes[S.id],N=lt(D.id),oe=D.transforms[S.sid],fe=D.matrix.clone().transpose();let ct,$e,it,St,Ne,vt;const ft={};switch(oe){case"matrix":for(it=0,St=M.array.length;it<St;it++)if(ct=M.array[it],$e=it*U.stride,ft[ct]===void 0&&(ft[ct]={}),S.arraySyntax===!0){const fn=U.array[$e],rn=S.indices[0]+4*S.indices[1];ft[ct][rn]=fn}else for(Ne=0,vt=U.stride;Ne<vt;Ne++)ft[ct][Ne]=U.array[$e+Ne];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',oe);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',oe);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',oe);break}const Dt=C(ft,fe);return{name:N.uuid,keyframes:Dt}}function C(S,M){const U=[];for(const N in S)U.push({time:parseFloat(N),value:S[N]});U.sort(D);for(let N=0;N<16;N++)P(U,N,M.elements[N]);return U;function D(N,oe){return N.time-oe.time}}const R=new I,L=new I,A=new Gn;function E(S,M){const U=S.keyframes,D=S.name,N=[],oe=[],fe=[],ct=[];for(let $e=0,it=U.length;$e<it;$e++){const St=U[$e],Ne=St.time,vt=St.value;O.fromArray(vt).transpose(),O.decompose(R,A,L),N.push(Ne),oe.push(R.x,R.y,R.z),fe.push(A.x,A.y,A.z,A.w),ct.push(L.x,L.y,L.z)}return oe.length>0&&M.push(new $s(D+".position",N,oe)),fe.length>0&&M.push(new Er(D+".quaternion",N,fe)),ct.length>0&&M.push(new $s(D+".scale",N,ct)),M}function P(S,M,U){let D,N=!0,oe,fe;for(oe=0,fe=S.length;oe<fe;oe++)D=S[oe],D.value[M]===void 0?D.value[M]=null:N=!1;if(N===!0)for(oe=0,fe=S.length;oe<fe;oe++)D=S[oe],D.value[M]=U;else z(S,M)}function z(S,M){let U,D;for(let N=0,oe=S.length;N<oe;N++){const fe=S[N];if(fe.value[M]===null){if(U=H(S,N,M),D=Q(S,N,M),U===null){fe.value[M]=D.value[M];continue}if(D===null){fe.value[M]=U.value[M];continue}re(fe,U,D,M)}}}function H(S,M,U){for(;M>=0;){const D=S[M];if(D.value[U]!==null)return D;M--}return null}function Q(S,M,U){for(;M<S.length;){const D=S[M];if(D.value[U]!==null)return D;M++}return null}function re(S,M,U,D){if(U.time-M.time===0){S.value[D]=M.value[D];return}S.value[D]=(S.time-M.time)*(U.value[D]-M.value[D])/(U.time-M.time)+M.value[D]}function G(S){const M={name:S.getAttribute("id")||"default",start:parseFloat(S.getAttribute("start")||0),end:parseFloat(S.getAttribute("end")||0),animations:[]};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"instance_animation":M.animations.push(o(N.getAttribute("url")));break}}Rt.clips[S.getAttribute("id")]=M}function le(S){const M=[],U=S.name,D=S.end-S.start||-1,N=S.animations;for(let oe=0,fe=N.length;oe<fe;oe++){const ct=b(N[oe]);for(let $e=0,it=ct.length;$e<it;$e++)M.push(ct[$e])}return new uh(U,D,M)}function K(S){return _(Rt.clips[S],le)}function pe(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"skin":M.id=o(N.getAttribute("source")),M.skin=Me(N);break;case"morph":M.id=o(N.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}Rt.controllers[S.getAttribute("id")]=M}function Me(S){const M={sources:{}};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"bind_shape_matrix":M.bindShapeMatrix=r(N.textContent);break;case"source":const oe=N.getAttribute("id");M.sources[oe]=Pe(N);break;case"joints":M.joints=ye(N);break;case"vertex_weights":M.vertexWeights=de(N);break}}return M}function ye(S){const M={inputs:{}};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"input":const oe=N.getAttribute("semantic"),fe=o(N.getAttribute("source"));M.inputs[oe]=fe;break}}return M}function de(S){const M={inputs:{}};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"input":const oe=N.getAttribute("semantic"),fe=o(N.getAttribute("source")),ct=parseInt(N.getAttribute("offset"));M.inputs[oe]={id:fe,offset:ct};break;case"vcount":M.vcount=a(N.textContent);break;case"v":M.v=a(N.textContent);break}}return M}function se(S){const M={id:S.id},U=Rt.geometries[M.id];return S.skin!==void 0&&(M.skin=W(S.skin),U.sources.skinIndices=M.skin.indices,U.sources.skinWeights=M.skin.weights),M}function W(S){const U={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},D=S.sources,N=S.vertexWeights,oe=N.vcount,fe=N.v,ct=N.inputs.JOINT.offset,$e=N.inputs.WEIGHT.offset,it=S.sources[S.joints.inputs.JOINT],St=S.sources[S.joints.inputs.INV_BIND_MATRIX],Ne=D[N.inputs.WEIGHT.id].array;let vt=0,ft,Dt,wt;for(ft=0,wt=oe.length;ft<wt;ft++){const rn=oe[ft],Qt=[];for(Dt=0;Dt<rn;Dt++){const en=fe[vt+ct],_i=fe[vt+$e],kn=Ne[_i];Qt.push({index:en,weight:kn}),vt+=2}for(Qt.sort(fn),Dt=0;Dt<4;Dt++){const en=Qt[Dt];en!==void 0?(U.indices.array.push(en.index),U.weights.array.push(en.weight)):(U.indices.array.push(0),U.weights.array.push(0))}}for(S.bindShapeMatrix?U.bindMatrix=new Et().fromArray(S.bindShapeMatrix).transpose():U.bindMatrix=new Et().identity(),ft=0,wt=it.array.length;ft<wt;ft++){const rn=it.array[ft],Qt=new Et().fromArray(St.array,ft*St.stride).transpose();U.joints.push({name:rn,boneInverse:Qt})}return U;function fn(rn,Qt){return Qt.weight-rn.weight}}function j(S){return _(Rt.controllers[S],se)}function ne(S){const M={init_from:n(S,"init_from")[0].textContent};Rt.images[S.getAttribute("id")]=M}function ee(S){return S.build!==void 0?S.build:S.init_from}function ce(S){const M=Rt.images[S];return M!==void 0?_(M,ee):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",S),null)}function q(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"profile_COMMON":M.profile=he(N);break}}Rt.effects[S.getAttribute("id")]=M}function he(S){const M={surfaces:{},samplers:{}};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"newparam":Se(N,M);break;case"technique":M.technique=B(N);break;case"extra":M.extra=Ce(N);break}}return M}function Se(S,M){const U=S.getAttribute("sid");for(let D=0,N=S.childNodes.length;D<N;D++){const oe=S.childNodes[D];if(oe.nodeType===1)switch(oe.nodeName){case"surface":M.surfaces[U]=Ke(oe);break;case"sampler2D":M.samplers[U]=Ve(oe);break}}}function Ke(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"init_from":M.init_from=N.textContent;break}}return M}function Ve(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"source":M.source=N.textContent;break}}return M}function B(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"constant":case"lambert":case"blinn":case"phong":M.type=N.nodeName,M.parameters=yt(N);break;case"extra":M.extra=Ce(N);break}}return M}function yt(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":M[N.nodeName]=ht(N);break;case"transparent":M[N.nodeName]={opaque:N.hasAttribute("opaque")?N.getAttribute("opaque"):"A_ONE",data:ht(N)};break}}return M}function ht(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"color":M[N.nodeName]=r(N.textContent);break;case"float":M[N.nodeName]=parseFloat(N.textContent);break;case"texture":M[N.nodeName]={id:N.getAttribute("texture"),extra:nt(N)};break}}return M}function nt(S){const M={technique:{}};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"extra":Le(N,M);break}}return M}function Le(S,M){for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"technique":Qe(N,M);break}}}function Qe(S,M){for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":M.technique[N.nodeName]=parseFloat(N.textContent);break;case"wrapU":case"wrapV":N.textContent.toUpperCase()==="TRUE"?M.technique[N.nodeName]=1:N.textContent.toUpperCase()==="FALSE"?M.technique[N.nodeName]=0:M.technique[N.nodeName]=parseInt(N.textContent);break;case"bump":M[N.nodeName]=tn(N);break}}}function Ce(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"technique":M.technique=st(N);break}}return M}function st(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"double_sided":M[N.nodeName]=parseInt(N.textContent);break;case"bump":M[N.nodeName]=tn(N);break}}return M}function tn(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"texture":M[N.nodeName]={id:N.getAttribute("texture"),texcoord:N.getAttribute("texcoord"),extra:nt(N)};break}}return M}function k(S){return S}function T(S){return _(Rt.effects[S],k)}function ae(S){const M={name:S.getAttribute("name")};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"instance_effect":M.url=o(N.getAttribute("url"));break}}Rt.materials[S.getAttribute("id")]=M}function xe(S){let M,U=S.slice((S.lastIndexOf(".")-1>>>0)+2);switch(U=U.toLowerCase(),U){case"tga":M=Jt;break;default:M=Ue}return M}function Te(S){const M=T(S.url),U=M.profile.technique;let D;switch(U.type){case"phong":case"blinn":D=new mn;break;case"lambert":D=new R1;break;default:D=new $i;break}D.name=S.name||"";function N($e,it=null){const St=M.profile.samplers[$e.id];let Ne=null;if(St!==void 0){const vt=M.profile.surfaces[St.source];Ne=ce(vt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),Ne=ce($e.id);if(Ne!==null){const vt=xe(Ne);if(vt!==void 0){const ft=vt.load(Ne),Dt=$e.extra;if(Dt!==void 0&&Dt.technique!==void 0&&c(Dt.technique)===!1){const wt=Dt.technique;ft.wrapS=wt.wrapU?fi:ai,ft.wrapT=wt.wrapV?fi:ai,ft.offset.set(wt.offsetU||0,wt.offsetV||0),ft.repeat.set(wt.repeatU||1,wt.repeatV||1)}else ft.wrapS=fi,ft.wrapT=fi;return it!==null&&(ft.colorSpace=it),ft}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:",$e.id),null}const oe=U.parameters;for(const $e in oe){const it=oe[$e];switch($e){case"diffuse":it.color&&D.color.fromArray(it.color),it.texture&&(D.map=N(it.texture,Zt));break;case"specular":it.color&&D.specular&&D.specular.fromArray(it.color),it.texture&&(D.specularMap=N(it.texture));break;case"bump":it.texture&&(D.normalMap=N(it.texture));break;case"ambient":it.texture&&(D.lightMap=N(it.texture,Zt));break;case"shininess":it.float&&D.shininess&&(D.shininess=it.float);break;case"emission":it.color&&D.emissive&&D.emissive.fromArray(it.color),it.texture&&(D.emissiveMap=N(it.texture,Zt));break}}Wt.colorSpaceToWorking(D.color,Zt),D.specular&&Wt.colorSpaceToWorking(D.specular,Zt),D.emissive&&Wt.colorSpaceToWorking(D.emissive,Zt);let fe=oe.transparent,ct=oe.transparency;if(ct===void 0&&fe&&(ct={float:1}),fe===void 0&&ct&&(fe={opaque:"A_ONE",data:{color:[1,1,1,1]}}),fe&&ct)if(fe.data.texture)D.transparent=!0;else{const $e=fe.data.color;switch(fe.opaque){case"A_ONE":D.opacity=$e[3]*ct.float;break;case"RGB_ZERO":D.opacity=1-$e[0]*ct.float;break;case"A_ZERO":D.opacity=1-$e[3]*ct.float;break;case"RGB_ONE":D.opacity=$e[0]*ct.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',fe.opaque)}D.opacity<1&&(D.transparent=!0)}if(U.extra!==void 0&&U.extra.technique!==void 0){const $e=U.extra.technique;for(const it in $e){const St=$e[it];switch(it){case"double_sided":D.side=St===1?gn:ti;break;case"bump":D.normalMap=N(St.texture),D.normalScale=new Ze(1,1);break}}}return D}function me(S){return _(Rt.materials[S],Te)}function gt(S){const M={name:S.getAttribute("name")};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"optics":M.optics=Xe(N);break}}Rt.cameras[S.getAttribute("id")]=M}function Xe(S){for(let M=0;M<S.childNodes.length;M++){const U=S.childNodes[M];switch(U.nodeName){case"technique_common":return dt(U)}}return{}}function dt(S){const M={};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];switch(D.nodeName){case"perspective":case"orthographic":M.technique=D.nodeName,M.parameters=mt(D);break}}return M}function mt(S){const M={};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];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 De(S){let M;switch(S.optics.technique){case"perspective":M=new wn(S.optics.parameters.yfov,S.optics.parameters.aspect_ratio,S.optics.parameters.znear,S.optics.parameters.zfar);break;case"orthographic":let U=S.optics.parameters.ymag,D=S.optics.parameters.xmag;const N=S.optics.parameters.aspect_ratio;D=D===void 0?U*N:D,U=U===void 0?D/N:U,D*=.5,U*=.5,M=new Ha(-D,D,U,-U,S.optics.parameters.znear,S.optics.parameters.zfar);break;default:M=new wn;break}return M.name=S.name||"",M}function rt(S){const M=Rt.cameras[S];return M!==void 0?_(M,De):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",S),null)}function Ct(S){let M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"technique_common":M=xt(N);break}}Rt.lights[S.getAttribute("id")]=M}function xt(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"directional":case"point":case"spot":case"ambient":M.technique=N.nodeName,M.parameters=Ye(N)}}return M}function Ye(S){const M={};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"color":const oe=r(N.textContent);M.color=new Tt().fromArray(oe),Wt.colorSpaceToWorking(M.color,Zt);break;case"falloff_angle":M.falloffAngle=parseFloat(N.textContent);break;case"quadratic_attenuation":const fe=parseFloat(N.textContent);M.distance=fe?Math.sqrt(1/fe):0;break}}return M}function Lt(S){let M;switch(S.technique){case"directional":M=new gr;break;case"point":M=new La;break;case"spot":M=new W1;break;case"ambient":M=new hc;break}return S.parameters.color&&M.color.copy(S.parameters.color),S.parameters.distance&&(M.distance=S.parameters.distance),M}function Y(S){const M=Rt.lights[S];return M!==void 0?_(M,Lt):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",S),null)}function et(S){const M={name:S.getAttribute("name"),sources:{},vertices:{},primitives:[]},U=n(S,"mesh")[0];if(U!==void 0){for(let D=0;D<U.childNodes.length;D++){const N=U.childNodes[D];if(N.nodeType!==1)continue;const oe=N.getAttribute("id");switch(N.nodeName){case"source":M.sources[oe]=Pe(N);break;case"vertices":M.vertices=at(N);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",N.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":M.primitives.push(ze(N));break;default:console.log(N)}}Rt.geometries[S.getAttribute("id")]=M}}function Pe(S){const M={array:[],stride:3};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];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 N=n(D,"accessor")[0];N!==void 0&&(M.stride=parseInt(N.getAttribute("stride")));break}}return M}function at(S){const M={};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];D.nodeType===1&&(M[D.getAttribute("semantic")]=o(D.getAttribute("source")))}return M}function ze(S){const M={type:S.nodeName,material:S.getAttribute("material"),count:parseInt(S.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let U=0,D=S.childNodes.length;U<D;U++){const N=S.childNodes[U];if(N.nodeType===1)switch(N.nodeName){case"input":const oe=o(N.getAttribute("source")),fe=N.getAttribute("semantic"),ct=parseInt(N.getAttribute("offset")),$e=parseInt(N.getAttribute("set")),it=$e>0?fe+$e:fe;M.inputs[it]={id:oe,offset:ct},M.stride=Math.max(M.stride,ct+1),fe==="TEXCOORD"&&(M.hasUV=!0);break;case"vcount":M.vcount=a(N.textContent);break;case"p":M.p=a(N.textContent);break}}return M}function be(S){const M={};for(let U=0;U<S.length;U++){const D=S[U];M[D.type]===void 0&&(M[D.type]=[]),M[D.type].push(D)}return M}function ut(S){let M=0;for(let U=0,D=S.length;U<D;U++)S[U].hasUV===!0&&M++;M>0&&M<S.length&&(S.uvsNeedsFix=!0)}function Ut(S){const M={},U=S.sources,D=S.vertices,N=S.primitives;if(N.length===0)return{};const oe=be(N);for(const fe in oe){const ct=oe[fe];ut(ct),M[fe]=sn(ct,U,D)}return M}function sn(S,M,U){const D={},N={array:[],stride:0},oe={array:[],stride:0},fe={array:[],stride:0},ct={array:[],stride:0},$e={array:[],stride:0},it={array:[],stride:4},St={array:[],stride:4},Ne=new hn,vt=[];let ft=0;for(let Dt=0;Dt<S.length;Dt++){const wt=S[Dt],fn=wt.inputs;let rn=0;switch(wt.type){case"lines":case"linestrips":rn=wt.count*2;break;case"triangles":rn=wt.count*3;break;case"polylist":for(let Qt=0;Qt<wt.count;Qt++){const en=wt.vcount[Qt];switch(en){case 3:rn+=3;break;case 4:rn+=6;break;default:rn+=(en-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",wt.type)}Ne.addGroup(ft,rn,Dt),ft+=rn,wt.material&&vt.push(wt.material);for(const Qt in fn){const en=fn[Qt];switch(Qt){case"VERTEX":for(const _i in U){const kn=U[_i];switch(_i){case"POSITION":const ps=N.array.length;if(It(wt,M[kn],en.offset,N.array),N.stride=M[kn].stride,M.skinWeights&&M.skinIndices&&(It(wt,M.skinIndices,en.offset,it.array),It(wt,M.skinWeights,en.offset,St.array)),wt.hasUV===!1&&S.uvsNeedsFix===!0){const wu=(N.array.length-ps)/N.stride;for(let vc=0;vc<wu;vc++)fe.array.push(0,0)}break;case"NORMAL":It(wt,M[kn],en.offset,oe.array),oe.stride=M[kn].stride;break;case"COLOR":It(wt,M[kn],en.offset,$e.array),$e.stride=M[kn].stride;break;case"TEXCOORD":It(wt,M[kn],en.offset,fe.array),fe.stride=M[kn].stride;break;case"TEXCOORD1":It(wt,M[kn],en.offset,ct.array),fe.stride=M[kn].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',_i)}}break;case"NORMAL":It(wt,M[en.id],en.offset,oe.array),oe.stride=M[en.id].stride;break;case"COLOR":It(wt,M[en.id],en.offset,$e.array,!0),$e.stride=M[en.id].stride;break;case"TEXCOORD":It(wt,M[en.id],en.offset,fe.array),fe.stride=M[en.id].stride;break;case"TEXCOORD1":It(wt,M[en.id],en.offset,ct.array),ct.stride=M[en.id].stride;break}}}return N.array.length>0&&Ne.setAttribute("position",new Nt(N.array,N.stride)),oe.array.length>0&&Ne.setAttribute("normal",new Nt(oe.array,oe.stride)),$e.array.length>0&&Ne.setAttribute("color",new Nt($e.array,$e.stride)),fe.array.length>0&&Ne.setAttribute("uv",new Nt(fe.array,fe.stride)),ct.array.length>0&&Ne.setAttribute("uv1",new Nt(ct.array,ct.stride)),it.array.length>0&&Ne.setAttribute("skinIndex",new Nt(it.array,it.stride)),St.array.length>0&&Ne.setAttribute("skinWeight",new Nt(St.array,St.stride)),D.data=Ne,D.type=S[0].type,D.materialKeys=vt,D}function It(S,M,U,D,N=!1){const oe=S.p,fe=S.stride,ct=S.vcount;function $e(Ne){let vt=oe[Ne+U]*St;const ft=vt+St;for(;vt<ft;vt++)D.push(it[vt]);if(N){const Dt=D.length-St-1;Kt.setRGB(D[Dt+0],D[Dt+1],D[Dt+2],Zt),D[Dt+0]=Kt.r,D[Dt+1]=Kt.g,D[Dt+2]=Kt.b}}const it=M.array,St=M.stride;if(S.vcount!==void 0){let Ne=0;for(let vt=0,ft=ct.length;vt<ft;vt++){const Dt=ct[vt];if(Dt===4){const wt=Ne+fe*0,fn=Ne+fe*1,rn=Ne+fe*2,Qt=Ne+fe*3;$e(wt),$e(fn),$e(Qt),$e(fn),$e(rn),$e(Qt)}else if(Dt===3){const wt=Ne+fe*0,fn=Ne+fe*1,rn=Ne+fe*2;$e(wt),$e(fn),$e(rn)}else if(Dt>4)for(let wt=1,fn=Dt-2;wt<=fn;wt++){const rn=Ne+fe*0,Qt=Ne+fe*wt,en=Ne+fe*(wt+1);$e(rn),$e(Qt),$e(en)}Ne+=fe*Dt}}else for(let Ne=0,vt=oe.length;Ne<vt;Ne+=fe)$e(Ne)}function Z(S){return _(Rt.geometries[S],Ut)}function $(S){const M={name:S.getAttribute("name")||"",joints:{},links:[]};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"technique_common":Ee(D,M);break}}Rt.kinematicsModels[S.getAttribute("id")]=M}function ue(S){return S.build!==void 0?S.build:S}function Re(S){return _(Rt.kinematicsModels[S],ue)}function Ee(S,M){for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"joint":M.joints[D.getAttribute("sid")]=ge(D);break;case"link":M.links.push(ve(D));break}}}function ge(S){let M;for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"prismatic":case"revolute":M=Oe(D);break}}return M}function Oe(S){const M={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",axis:new I,limits:{min:0,max:0},type:S.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"axis":const N=r(D.textContent);M.axis.fromArray(N);break;case"limits":const oe=D.getElementsByTagName("max")[0],fe=D.getElementsByTagName("min")[0];M.limits.max=parseFloat(oe.textContent),M.limits.min=parseFloat(fe.textContent);break}}return M.limits.min>=M.limits.max&&(M.static=!0),M.middlePosition=(M.limits.min+M.limits.max)/2,M}function ve(S){const M={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",attachments:[],transforms:[]};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"attachment_full":M.attachments.push(Ae(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(je(D));break}}return M}function Ae(S){const M={joint:S.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"link":M.links.push(ve(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(je(D));break}}return M}function je(S){const M={type:S.nodeName},U=r(S.textContent);switch(M.type){case"matrix":M.obj=new Et,M.obj.fromArray(U).transpose();break;case"translate":M.obj=new I,M.obj.fromArray(U);break;case"rotate":M.obj=new I,M.obj.fromArray(U),M.angle=Ai.degToRad(U[3]);break}return M}function te(S){const M={name:S.getAttribute("name")||"",rigidBodies:{}};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"rigid_body":M.rigidBodies[D.getAttribute("name")]={},He(D,M.rigidBodies[D.getAttribute("name")]);break}}Rt.physicsModels[S.getAttribute("id")]=M}function He(S,M){for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"technique_common":Mt(D,M);break}}}function Mt(S,M){for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];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 bt(S){const M={bindJointAxis:[]};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"bind_joint_axis":M.bindJointAxis.push($t(D));break}}Rt.kinematicsScenes[o(S.getAttribute("url"))]=M}function $t(S){const M={target:S.getAttribute("target").split("/").pop()};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType===1)switch(D.nodeName){case"axis":const N=D.getElementsByTagName("param")[0];M.axis=N.textContent;const oe=M.axis.split("inst_").pop().split("axis")[0];M.jointIndex=oe.substring(0,oe.length-1);break}}return M}function Yt(S){return S.build!==void 0?S.build:S}function ot(S){return _(Rt.kinematicsScenes[S],Yt)}function _t(){const S=Object.keys(Rt.kinematicsModels)[0],M=Object.keys(Rt.kinematicsScenes)[0],U=Object.keys(Rt.visualScenes)[0];if(S===void 0||M===void 0)return;const D=Re(S),N=ot(M),oe=Pt(U),fe=N.bindJointAxis,ct={};for(let St=0,Ne=fe.length;St<Ne;St++){const vt=fe[St],ft=Ht.querySelector('[sid="'+vt.target+'"]');if(ft){const Dt=ft.parentElement;$e(vt.jointIndex,Dt)}}function $e(St,Ne){const vt=Ne.getAttribute("name"),ft=D.joints[St];oe.traverse(function(Dt){Dt.name===vt&&(ct[St]={object:Dt,transforms:we(Ne),joint:ft,position:ft.zeroPosition})})}const it=new Et;En={joints:D&&D.joints,getJointValue:function(St){const Ne=ct[St];if(Ne)return Ne.position;console.warn("THREE.ColladaLoader: Joint "+St+" doesn't exist.")},setJointValue:function(St,Ne){const vt=ct[St];if(vt){const ft=vt.joint;if(Ne>ft.limits.max||Ne<ft.limits.min)console.warn("THREE.ColladaLoader: Joint "+St+" value "+Ne+" outside of limits (min: "+ft.limits.min+", max: "+ft.limits.max+").");else if(ft.static)console.warn("THREE.ColladaLoader: Joint "+St+" is static.");else{const Dt=vt.object,wt=ft.axis,fn=vt.transforms;O.identity();for(let rn=0;rn<fn.length;rn++){const Qt=fn[rn];if(Qt.sid&&Qt.sid.indexOf(St)!==-1)switch(ft.type){case"revolute":O.multiply(it.makeRotationAxis(wt,Ai.degToRad(Ne)));break;case"prismatic":O.multiply(it.makeTranslation(wt.x*Ne,wt.y*Ne,wt.z*Ne));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+ft.type);break}else switch(Qt.type){case"matrix":O.multiply(Qt.obj);break;case"translate":O.multiply(it.makeTranslation(Qt.obj.x,Qt.obj.y,Qt.obj.z));break;case"scale":O.scale(Qt.obj);break;case"rotate":O.multiply(it.makeRotationAxis(Qt.obj,Qt.angle));break}}Dt.matrix.copy(O),Dt.matrix.decompose(Dt.position,Dt.quaternion,Dt.scale),ct[St].position=Ne}}else console.log("THREE.ColladaLoader: "+St+" does not exist.")}}}function we(S){const M=[],U=Ht.querySelector('[id="'+S.id+'"]');for(let D=0;D<U.childNodes.length;D++){const N=U.childNodes[D];if(N.nodeType!==1)continue;let oe,fe;switch(N.nodeName){case"matrix":oe=r(N.textContent);const ct=new Et().fromArray(oe).transpose();M.push({sid:N.getAttribute("sid"),type:N.nodeName,obj:ct});break;case"translate":case"scale":oe=r(N.textContent),fe=new I().fromArray(oe),M.push({sid:N.getAttribute("sid"),type:N.nodeName,obj:fe});break;case"rotate":oe=r(N.textContent),fe=new I().fromArray(oe);const $e=Ai.degToRad(oe[3]);M.push({sid:N.getAttribute("sid"),type:N.nodeName,obj:fe,angle:$e});break}}return M}function w(S){const M=S.getElementsByTagName("node");for(let U=0;U<M.length;U++){const D=M[U];D.hasAttribute("id")===!1&&D.setAttribute("id",l())}}const O=new Et,J=new I;function V(S){const M={name:S.getAttribute("name")||"",type:S.getAttribute("type"),id:S.getAttribute("id"),sid:S.getAttribute("sid"),matrix:new Et,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];if(D.nodeType!==1)continue;let N;switch(D.nodeName){case"node":M.nodes.push(D.getAttribute("id")),V(D);break;case"instance_camera":M.instanceCameras.push(o(D.getAttribute("url")));break;case"instance_controller":M.instanceControllers.push(X(D));break;case"instance_light":M.instanceLights.push(o(D.getAttribute("url")));break;case"instance_geometry":M.instanceGeometries.push(X(D));break;case"instance_node":M.instanceNodes.push(o(D.getAttribute("url")));break;case"matrix":N=r(D.textContent),M.matrix.multiply(O.fromArray(N).transpose()),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"translate":N=r(D.textContent),J.fromArray(N),M.matrix.multiply(O.makeTranslation(J.x,J.y,J.z)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"rotate":N=r(D.textContent);const oe=Ai.degToRad(N[3]);M.matrix.multiply(O.makeRotationAxis(J.fromArray(N),oe)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"scale":N=r(D.textContent),M.matrix.scale(J.fromArray(N)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"extra":break;default:console.log(D)}}return qe(M.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",M.id):Rt.nodes[M.id]=M,M}function X(S){const M={id:o(S.getAttribute("url")),materials:{},skeletons:[]};for(let U=0;U<S.childNodes.length;U++){const D=S.childNodes[U];switch(D.nodeName){case"bind_material":const N=D.getElementsByTagName("instance_material");for(let oe=0;oe<N.length;oe++){const fe=N[oe],ct=fe.getAttribute("symbol"),$e=fe.getAttribute("target");M.materials[ct]=o($e)}break;case"skeleton":M.skeletons.push(o(D.textContent));break}}return M}function ie(S,M){const U=[],D=[];let N,oe,fe;for(N=0;N<S.length;N++){const it=S[N];let St;if(qe(it))St=lt(it),_e(St,M,U);else if(Xt(it)){const vt=Rt.visualScenes[it].children;for(let ft=0;ft<vt.length;ft++){const Dt=vt[ft];if(Dt.type==="JOINT"){const wt=lt(Dt.id);_e(wt,M,U)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",it)}for(N=0;N<M.length;N++)for(oe=0;oe<U.length;oe++)if(fe=U[oe],fe.bone.name===M[N].name){D[N]=fe,fe.processed=!0;break}for(N=0;N<U.length;N++)fe=U[N],fe.processed===!1&&(D.push(fe),fe.processed=!0);const ct=[],$e=[];for(N=0;N<D.length;N++)fe=D[N],ct.push(fe.bone),$e.push(fe.boneInverse);return new nc(ct,$e)}function _e(S,M,U){S.traverse(function(D){if(D.isBone===!0){let N;for(let oe=0;oe<M.length;oe++){const fe=M[oe];if(fe.name===D.name){N=fe.boneInverse;break}}N===void 0&&(N=new Et),U.push({bone:D,boneInverse:N,processed:!1})}})}function Ie(S){const M=[],U=S.matrix,D=S.nodes,N=S.type,oe=S.instanceCameras,fe=S.instanceControllers,ct=S.instanceLights,$e=S.instanceGeometries,it=S.instanceNodes;for(let Ne=0,vt=D.length;Ne<vt;Ne++)M.push(lt(D[Ne]));for(let Ne=0,vt=oe.length;Ne<vt;Ne++){const ft=rt(oe[Ne]);ft!==null&&M.push(ft.clone())}for(let Ne=0,vt=fe.length;Ne<vt;Ne++){const ft=fe[Ne],Dt=j(ft.id),wt=Z(Dt.id),fn=We(wt,ft.materials),rn=ft.skeletons,Qt=Dt.skin.joints,en=ie(rn,Qt);for(let _i=0,kn=fn.length;_i<kn;_i++){const ps=fn[_i];ps.isSkinnedMesh&&(ps.bind(en,Dt.skin.bindMatrix),ps.normalizeSkinWeights()),M.push(ps)}}for(let Ne=0,vt=ct.length;Ne<vt;Ne++){const ft=Y(ct[Ne]);ft!==null&&M.push(ft.clone())}for(let Ne=0,vt=$e.length;Ne<vt;Ne++){const ft=$e[Ne],Dt=Z(ft.id),wt=We(Dt,ft.materials);for(let fn=0,rn=wt.length;fn<rn;fn++)M.push(wt[fn])}for(let Ne=0,vt=it.length;Ne<vt;Ne++)M.push(lt(it[Ne]).clone());let St;if(D.length===0&&M.length===1)St=M[0];else{St=N==="JOINT"?new V0:new Un;for(let Ne=0;Ne<M.length;Ne++)St.add(M[Ne])}return St.name=N==="JOINT"?S.sid:S.name,St.matrix.copy(U),St.matrix.decompose(St.position,St.quaternion,St.scale),St}const Be=new $i({name:li.DEFAULT_MATERIAL_NAME,color:16711935});function tt(S,M){const U=[];for(let D=0,N=S.length;D<N;D++){const oe=M[S[D]];oe===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",S[D]),U.push(Be)):U.push(me(oe))}return U}function We(S,M){const U=[];for(const D in S){const N=S[D],oe=tt(N.materialKeys,M);if(oe.length===0&&(D==="lines"||D==="linestrips"?oe.push(new Di):oe.push(new mn)),D==="lines"||D==="linestrips")for(let it=0,St=oe.length;it<St;it++){const Ne=oe[it];if(Ne.isMeshPhongMaterial===!0||Ne.isMeshLambertMaterial===!0){const vt=new Di;vt.color.copy(Ne.color),vt.opacity=Ne.opacity,vt.transparent=Ne.transparent,oe[it]=vt}}const fe=N.data.attributes.skinIndex!==void 0,ct=oe.length===1?oe[0]:oe;let $e;switch(D){case"lines":$e=new Ra(N.data,ct);break;case"linestrips":$e=new Ba(N.data,ct);break;case"triangles":case"polylist":fe?$e=new l1(N.data,ct):$e=new zt(N.data,ct);break}U.push($e)}return U}function qe(S){return Rt.nodes[S]!==void 0}function lt(S){return _(Rt.nodes[S],Ie)}function Ft(S){const M={name:S.getAttribute("name"),children:[]};w(S);const U=n(S,"node");for(let D=0;D<U.length;D++)M.children.push(V(U[D]));Rt.visualScenes[S.getAttribute("id")]=M}function Bt(S){const M=new Un;M.name=S.name;const U=S.children;for(let D=0;D<U.length;D++){const N=U[D];M.add(lt(N.id))}return M}function Xt(S){return Rt.visualScenes[S]!==void 0}function Pt(S){return _(Rt.visualScenes[S],Bt)}function pt(S){const M=n(S,"instance_visual_scene")[0];return Pt(o(M.getAttribute("url")))}function Fe(){const S=Rt.clips;if(c(S)===!0){if(c(Rt.animations)===!1){const M=[];for(const U in Rt.animations){const D=b(U);for(let N=0,oe=D.length;N<oe;N++)M.push(D[N])}jt.push(new uh("default",-1,M))}}else for(const M in S)jt.push(K(M))}function At(S){let M="";const U=[S];for(;U.length;){const D=U.shift();D.nodeType===Node.TEXT_NODE?M+=D.textContent:(M+=`
|
|
4198
|
-
`,
|
|
4199
|
-
`,M),null}const Sn=Ht.getAttribute("version");console.debug("THREE.ColladaLoader: File version",Sn);const ke=d(n(Ht,"asset")[0]),Ue=new lc(this.manager);Ue.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let Jt;a0&&(Jt=new a0(this.manager),Jt.setPath(this.resourcePath||t));const Kt=new Tt,jt=[];let En={},yn=0;const Rt={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(Ht,"library_animations","animation",p),h(Ht,"library_animation_clips","animation_clip",G),h(Ht,"library_controllers","controller",pe),h(Ht,"library_images","image",ne),h(Ht,"library_effects","effect",q),h(Ht,"library_materials","material",ae),h(Ht,"library_cameras","camera",gt),h(Ht,"library_lights","light",Ct),h(Ht,"library_geometries","geometry",et),h(Ht,"library_nodes","node",V),h(Ht,"library_visual_scenes","visual_scene",Ft),h(Ht,"library_kinematics_models","kinematics_model",$),h(Ht,"library_physics_models","physics_model",te),h(Ht,"scene","instance_kinematics_scene",bt),g(Rt.animations,x),g(Rt.clips,le),g(Rt.controllers,se),g(Rt.images,ee),g(Rt.effects,k),g(Rt.materials,Te),g(Rt.cameras,De),g(Rt.lights,Lt),g(Rt.geometries,Ut),g(Rt.visualScenes,Bt),Fe(),_t();const Ji=pt(n(Ht,"scene")[0]);return Ji.animations=jt,ke.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."),Ji.rotation.set(-Math.PI/2,0,0)),Ji.scale.multiplyScalar(ke.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),jt},kinematics:En,library:Rt,scene:Ji}}}const o0=new I,E4=new Tn,ca=new Et,Hi=new Et,ha=new Gn,ua=new I(1,1,1),da=new I;class Wa extends cn{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 A4 extends Wa{constructor(...e){super(...e),this.isURDFCollider=!0,this.type="URDFCollider"}}class w4 extends Wa{constructor(...e){super(...e),this.isURDFVisual=!0,this.type="URDFVisual"}}class fu extends Wa{constructor(...e){super(...e),this.isURDFLink=!0,this.type="URDFLink"}}class pu 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),o0.copy(this.axis).applyEuler(this.rotation),this.position.addScaledVector(o0,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],Hi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromEuler(E4.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),Hi.premultiply(ca),this.position.setFromMatrixPosition(Hi),this.rotation.setFromRotationMatrix(Hi),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],Hi.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),Hi.premultiply(ca),this.position.setFromMatrixPosition(Hi),this.rotation.setFromRotationMatrix(Hi),this.matrixWorldNeedsUpdate=!0,!0)}return t}}class l0 extends pu{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 T4 extends fu{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 Gn,c0=new Tn;function Us(s){return s?s.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function h0(s,e,t=!1){t||s.rotation.set(0,0,0),c0.set(e[0],e[1],e[2],"ZYX"),Io.setFromEuler(c0),Io.multiply(s.quaternion),s.quaternion.copy(Io)}class _c{constructor(e){this.manager=e||oc,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,a=uc.extractUrlBase(e),o=this.manager.resolveURL(e);r.itemStart(o),fetch(o,this.fetchOptions).then(l=>{if(l.ok)return n&&n(null),l.text();throw new Error(`URDFLoader: Failed to load url '${o}' with error code ${l.status} : ${l.statusText}.`)}).then(l=>{const c=this.parse(l,this.workingPath||a);t(c),r.itemEnd(o)}).catch(l=>{i?i(l):console.error("URDFLoader: Error loading file.",l),r.itemError(o),r.itemEnd(o)})}parse(e,t=this.workingPath){const n=this.packages,i=this.loadMeshCb,r=this.parseVisual,a=this.parseCollision,o=this.manager,l={},c={},d={};function m(v){if(!/^package:\/\//.test(v))return t?t+v:v;const[x,b]=v.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(x)?n+"/"+b:n+"/"+x+"/"+b;if(n instanceof Function)return n(x)+"/"+b;if(typeof n=="object")return x in n?n[x]+"/"+b:(console.error(`URDFLoader : ${x} not found in provided package list.`),null)}function u(v){let x;v instanceof Document?x=[...v.children]:v instanceof Element?x=[v]:x=[...new DOMParser().parseFromString(v,"text/xml").children];const b=x.filter(F=>F.nodeName==="robot").pop();return h(b)}function h(v){const x=[...v.children],b=x.filter(P=>P.nodeName.toLowerCase()==="link"),F=x.filter(P=>P.nodeName.toLowerCase()==="joint"),C=x.filter(P=>P.nodeName.toLowerCase()==="material"),R=new T4;R.robotName=v.getAttribute("name"),R.urdfRobotNode=v,C.forEach(P=>{const z=P.getAttribute("name");d[z]=p(P)});const L={},A={};b.forEach(P=>{const z=P.getAttribute("name"),H=v.querySelector(`child[link="${z}"]`)===null;l[z]=_(P,L,A,H?R:null)}),F.forEach(P=>{const z=P.getAttribute("name");c[z]=g(P)}),R.joints=c,R.links=l,R.colliders=A,R.visual=L;const E=Object.values(c);return E.forEach(P=>{P instanceof l0&&c[P.mimicJoint].mimicJoints.push(P)}),E.forEach(P=>{const z=new Set,H=Q=>{if(z.has(Q))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");z.add(Q),Q.mimicJoints.forEach(re=>{H(re)})};H(P)}),R.frames={...A,...L,...l,...c},R}function g(v){const x=[...v.children],b=v.getAttribute("type");let F;const C=x.find(z=>z.nodeName.toLowerCase()==="mimic");C?(F=new l0,F.mimicJoint=C.getAttribute("joint"),F.multiplier=parseFloat(C.getAttribute("multiplier")||1),F.offset=parseFloat(C.getAttribute("offset")||0)):F=new pu,F.urdfNode=v,F.name=v.getAttribute("name"),F.urdfName=F.name,F.jointType=b;let R=null,L=null,A=[0,0,0],E=[0,0,0];x.forEach(z=>{const H=z.nodeName.toLowerCase();H==="origin"?(A=Us(z.getAttribute("xyz")),E=Us(z.getAttribute("rpy"))):H==="child"?L=l[z.getAttribute("link")]:H==="parent"?R=l[z.getAttribute("link")]:H==="limit"&&(F.limit.lower=parseFloat(z.getAttribute("lower")||F.limit.lower),F.limit.upper=parseFloat(z.getAttribute("upper")||F.limit.upper))}),R.add(F),F.add(L),h0(F,E),F.position.set(A[0],A[1],A[2]);const P=x.filter(z=>z.nodeName.toLowerCase()==="axis")[0];if(P){const z=P.getAttribute("xyz").split(/\s+/g).map(H=>parseFloat(H));F.axis=new I(z[0],z[1],z[2]),F.axis.normalize()}return F}function _(v,x,b,F=null){F===null&&(F=new fu);const C=[...v.children];return F.name=v.getAttribute("name"),F.urdfName=F.name,F.urdfNode=v,r&&C.filter(L=>L.nodeName.toLowerCase()==="visual").forEach(L=>{const A=f(L,d);if(F.add(A),L.hasAttribute("name")){const E=L.getAttribute("name");A.name=E,A.urdfName=E,x[E]=A}}),a&&C.filter(L=>L.nodeName.toLowerCase()==="collision").forEach(L=>{const A=f(L);if(F.add(A),L.hasAttribute("name")){const E=L.getAttribute("name");A.name=E,A.urdfName=E,b[E]=A}}),F}function p(v){const x=[...v.children],b=new mn;return b.name=v.getAttribute("name")||"",x.forEach(F=>{const C=F.nodeName.toLowerCase();if(C==="color"){const R=F.getAttribute("rgba").split(/\s/g).map(L=>parseFloat(L));b.color.setRGB(R[0],R[1],R[2]),b.opacity=R[3],b.transparent=R[3]<1,b.depthWrite=!b.transparent}else if(C==="texture"){const R=F.getAttribute("filename");if(R){const L=new lc(o),A=m(R);b.map=L.load(A),b.map.colorSpace=Zt}}}),b}function f(v,x={}){const b=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 x?C=x[A]:C=p(R)}else C=new mn;const L=b?new A4:new w4;return L.urdfNode=v,F.forEach(A=>{const E=A.nodeName.toLowerCase();if(E==="geometry"){const P=A.children[0].nodeName.toLowerCase();if(P==="mesh"){const z=A.children[0].getAttribute("filename"),H=m(z);if(H!==null){const Q=A.children[0].getAttribute("scale");if(Q){const re=Us(Q);L.scale.set(re[0],re[1],re[2])}i(H,o,(re,G)=>{G?console.error("URDFLoader: Error loading mesh.",G):re&&(re instanceof zt&&(re.material=C),re.position.set(0,0,0),re.quaternion.identity(),L.add(re))})}}else if(P==="box"){const z=new zt;z.geometry=new Yi(1,1,1),z.material=C;const H=Us(A.children[0].getAttribute("size"));z.scale.set(H[0],H[1],H[2]),L.add(z)}else if(P==="sphere"){const z=new zt;z.geometry=new Oa(1,30,30),z.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0;z.scale.set(H,H,H),L.add(z)}else if(P==="cylinder"){const z=new zt;z.geometry=new sc(1,1,1,30),z.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0,Q=parseFloat(A.children[0].getAttribute("length"))||0;z.scale.set(H,Q,H),z.rotation.set(Math.PI/2,0,0),L.add(z)}}else if(E==="origin"){const P=Us(A.getAttribute("xyz")),z=Us(A.getAttribute("rpy"));L.position.set(P[0],P[1],P[2]),L.rotation.set(0,0,0),h0(L,z)}}),L}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new qi(t).load(e,r=>{const a=new zt(r,new mn);n(a)}):/\.dae$/i.test(e)?new S4(t).load(e,r=>n(r.scene)):console.warn(`URDFLoader: Could not load model at ${e}.
|
|
4200
|
-
No loader available`)}}const C4=/^[og]\s*(.+)?/,R4=/^mtllib /,D4=/^usemtl /,
|
|
4197
|
+
`};class gc extends Li{constructor(e){super({type:"LineMaterial",uniforms:ec.clone(Vn.line.uniforms),vertexShader:Vn.line.vertexShader,fragmentShader:Vn.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 Gt,e0=new I,t0=new I,An=new Gt,wn=new Gt,ci=new Gt,No=new I,Uo=new At,Tn=new K1,n0=new I,oa=new Nn,la=new Fi,hi=new Gt;let ui,os;function i0(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 f4(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++){Tn.start.fromBufferAttribute(i,a),Tn.end.fromBufferAttribute(r,a),Tn.applyMatrix4(t);const c=new I,d=new I;ui.distanceSqToSegment(Tn.start,Tn.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 p4(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(An.fromBufferAttribute(a,m),wn.fromBufferAttribute(l,m),An.w=1,wn.w=1,An.applyMatrix4(Uo),wn.applyMatrix4(Uo),An.z>d&&wn.z>d)continue;if(An.z>d){const f=An.z-wn.z,v=(An.z-d)/f;An.lerp(wn,v)}else if(wn.z>d){const f=wn.z-An.z,v=(wn.z-d)/f;wn.lerp(An,v)}An.applyMatrix4(n),wn.applyMatrix4(n),An.multiplyScalar(1/An.w),wn.multiplyScalar(1/wn.w),An.x*=i.x/2,An.y*=i.y/2,wn.x*=i.x/2,wn.y*=i.y/2,Tn.start.copy(An),Tn.start.z=0,Tn.end.copy(wn),Tn.end.z=0;const h=Tn.closestPointToPointParameter(No,!0);Tn.at(h,n0);const g=Ei.lerp(An.z,wn.z,h),_=g>=-1&&g<=1,p=No.distanceTo(n0)<os*.5;if(_&&p){Tn.start.fromBufferAttribute(a,m),Tn.end.fromBufferAttribute(l,m),Tn.start.applyMatrix4(r),Tn.end.applyMatrix4(r);const f=new I,v=new I;ui.distanceSqToSegment(Tn.start,Tn.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 m4 extends Bt{constructor(e=new hu,t=new gc({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)e0.fromBufferAttribute(t,o),t0.fromBufferAttribute(n,o),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+e0.distanceTo(t0);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=i0(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=i0(i,m,l.resolution)}oa.expandByScalar(d),ui.intersectsBox(oa)!==!1&&(n?f4(this,t):p4(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 uu extends hu{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 g4 extends m4{constructor(e=new uu,t=new gc({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}const _4=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?cu-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 uu().setPositions(t).setColors(n),o=new gc({linewidth:s.lineWidth,vertexColors:!0,resolution:new et(window.innerWidth,window.innerHeight)});return new g4(r,o).computeLineDistances()},v4=s=>{const{corners:e,edges:t}=s,n=[],i=a4(s),r=l4(s,i);n.push(...r),e.enabled&&n.push(...c4(s,i)),t.enabled&&n.push(...h4(s,i,e.enabled?7:6));const o=d4(r,s),a=_4(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?o4(t.map,e):t.color.set(r)},Fs=new At,s0=new Pl,y4=new et,is=new I,r0=new Gt;class du extends cn{constructor(e,t,n={}){super(),en(this,"enabled",!0),en(this,"camera"),en(this,"renderer"),en(this,"options"),en(this,"target",new I),en(this,"animated",!0),en(this,"speed",1),en(this,"animating",!1),en(this,"_options"),en(this,"_intersections"),en(this,"_background",null),en(this,"_viewport",[0,0,0,0]),en(this,"_originalViewport",[0,0,0,0]),en(this,"_originalScissor",[0,0,0,0]),en(this,"_scene"),en(this,"_camera"),en(this,"_container"),en(this,"_domElement"),en(this,"_domRect"),en(this,"_dragging",!1),en(this,"_distance",0),en(this,"_clock",new Y1),en(this,"_targetQuaternion",new Hn),en(this,"_quaternionStart",new Hn),en(this,"_quaternionEnd",new Hn),en(this,"_pointerStart",new et),en(this,"_focus",null),en(this,"_placement"),en(this,"_controls"),en(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=ou(this._domElement,e),this.domUpdate()}set(e={}){this.dispose(),this.options=e,this._options=r4(e),this._camera=this._options.isSphere?new Ha(-1.8,1.8,1.8,-1.8,5,10):new Sn(26,1,5,10),this._camera.position.set(0,0,7);const[t,n,i]=v4(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?Z3(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(r0).toArray(this._originalViewport),e.getScissorTest()&&e.getScissor(r0).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()),qh(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()*t4*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(e4(l,this._pointerStart))return;this._dragging=!0}const c=y4.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=s0.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=s0.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=cn.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=Jh(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=Jh(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):qh(this._options,this._intersections,this.camera))}}function x4(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 Sn(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 su({antialias:!0,alpha:!0}),n.setSize(L.clientWidth,L.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Gl,n.toneMapping=Wl,n.toneMappingExposure=1,n.outputColorSpace=jt,L.appendChild(n.domElement),i=new au(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Ti.PAN,RIGHT:Ti.ROTATE},i.panSpeed=.7,r=new du(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(),x()},p=(L,z)=>{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 Z0(L,H,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(z),e.add(a);const Q=new Di(L,L),re=new j0({opacity:.3,color:0});l=new Bt(Q,re),l.position.copy(z),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},f=()=>{if(u.value.length===0)return;const L=new Nn;let z=!1;if(u.value.forEach(Z=>{if(Z.userData.boundingBox)L.union(Z.userData.boundingBox),z=!0;else if(Z.userData.modelId&&modelBoundingBoxes.has(Z.userData.modelId)){const _e=modelBoundingBoxes.get(Z.userData.modelId);L.union(_e.box),z=!0}else L.expandByObject(Z),z=!0}),!z){console.warn("无法计算包围盒,网格更新失败");return}const H=L.getSize(new I),Q=L.getCenter(new I),re=Math.max(H.x,H.y,H.z),G=Math.max(re*8,50),le=new I(Q.x,Q.y,L.min.z);p(G,le)},v=()=>{const L=new hc(4210752,.6);e.add(L);const z=new gr(16777215,2);z.position.set(10,10,8),z.castShadow=!0,z.shadow.mapSize.width=4096,z.shadow.mapSize.height=4096,z.shadow.camera.near=.5,z.shadow.camera.far=50,z.shadow.camera.left=-50,z.shadow.camera.right=50,z.shadow.camera.top=50,z.shadow.camera.bottom=-50,e.add(z);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 re=new K0(16777215,4473924,.8);e.add(re);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)},x=()=>{o=requestAnimationFrame(x),i&&i.update();const L=performance.now(),z=L-m;z<d||(m=L-z%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(z=>{z.geometry&&z.geometry.dispose(),z.material&&(Array.isArray(z.material)?z.material.forEach(H=>{S(H)}):S(z.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const L=s.value,z=L.clientWidth,H=L.clientHeight;t.aspect=z/H,t.updateProjectionMatrix(),n.setSize(z,H),r.update()},fitCameraToAllModels:L=>{if(!t||!i||u.value.length===0)return;const z=new Nn;let H=!1;if(u.value.forEach(_e=>{if(_e.userData.boundingBox)z.union(_e.userData.boundingBox),H=!0;else if(_e.userData.modelId&&L.has(_e.userData.modelId)){const Ee=L.get(_e.userData.modelId);z.union(Ee.box),H=!0}else z.expandByObject(_e),H=!0}),!H){console.warn("无法计算包围盒");return}const Q=z.getSize(new I),re=z.getCenter(new I),le=Math.max(Q.x,Q.y,Q.z)*.8,Z=new I(re.x+le,re.y-le,re.z+le);t.position.copy(Z),t.lookAt(re),i.target.copy(re),i.update(),h.value.copy(Z),g.value.copy(re),f()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(z=>{e.remove(z),F(z)});const L=[];e.children.forEach(z=>{!z.isLight&&!z.isCamera&&z.type!=="GridHelper"&&z!==l&&L.push(z)}),L.forEach(z=>{e.remove(z),F(z)}),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 M4(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,x=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(x,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,x=Math.min(v/i,1);if(x>=1){g();return}const S=m(x);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 Nn;e.value.forEach(A=>{v.expandByObject(A)});const x=v.getSize(new I);a=v.getCenter(new I),l=Math.max(x.x,x.y,x.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(),x=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(x,o,A),P<1&&requestAnimationFrame(C)};C()}else h()},startAnimation:h,stopAnimation:g}}function b4(s,e){const t=y.ref(!1),n=y.ref("none");let i=[],r=[],o=new Nn,a=new I;const l=()=>{i=[new Kn(new I(1,0,0),0),new Kn(new I(0,1,0),0),new Kn(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,x;_==="x"?(f=new Di(p.z*1.2,p.y*1.2),v=new I(a.x,a.y,a.z),x=new En(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),x=new En(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),x=new En(0,0,0));const S=new mn({color:8900331,transparent:!0,opacity:.3,side:gn,depthWrite:!1}),F=new Bt(f,S);return F.position.copy(v),F.rotation.copy(x),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(x=>{x.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,x,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,x=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 z=F+L*C,H=d.getFloat32(z,!0),Q=d.getFloat32(z+4,!0),re=d.getFloat32(z+8,!0);if(_){const G=d.getUint16(z+48,!0);(G&32768)===0?(u=(G&31)/31,h=(G>>5&31)/31,g=(G>>10&31)/31):(u=f,h=v,g=x)}for(let G=1;G<=3;G++){const le=z+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]=re,_&&(E.setRGB(u,h,g,jt),p[Z]=E.r,p[Z+1]=E.g,p[Z+2]=E.b)}}return R.setAttribute("position",new _n(P,3)),R.setAttribute("normal",new _n(A,3)),_&&(R.setAttribute("color",new _n(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=[],x=[],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,re=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]),re++;for(;(C=p.exec(G))!==null;)v.push(parseFloat(C[1]),parseFloat(C[2]),parseFloat(C[3])),x.push(F.x,F.y,F.z),Q++,A++;re!==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 z=P,H=A-P;d.userData.groupNames=S,d.addGroup(z,H,R),R++}return d.setAttribute("position",new It(v,3)),d.setAttribute("normal",new It(x,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 a0 extends H1{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,_e,Ee){let Me,me;const se=Z.pixel_size>>3,j=Z.width*Z.height*se;if(le&&(me=Ee.subarray(_e,_e+=Z.colormap_length*(Z.colormap_size>>3))),G){Me=new Uint8Array(j);let q,ie,ee,ue=0;const J=new Uint8Array(se);for(;ue<j;)if(q=Ee[_e++],ie=(q&127)+1,q&128){for(ee=0;ee<se;++ee)J[ee]=Ee[_e++];for(ee=0;ee<ie;++ee)Me.set(J,ue+ee*se);ue+=se*ie}else{for(ie*=se,ee=0;ee<ie;++ee)Me[ue+ee]=Ee[_e++];ue+=ie}}else Me=Ee.subarray(_e,_e+=le?Z.width*Z.height:j);return{pixel_data:Me,palettes:me}}function i(G,le,Z,_e,Ee,Me,me,se,j){const q=j;let ie,ee=0,ue,J;const de=E.width;for(J=le;J!==_e;J+=Z)for(ue=Ee;ue!==me;ue+=Me,ee++)ie=se[ee],G[(ue+de*J)*4+3]=255,G[(ue+de*J)*4+2]=q[ie*3+0],G[(ue+de*J)*4+1]=q[ie*3+1],G[(ue+de*J)*4+0]=q[ie*3+2];return G}function r(G,le,Z,_e,Ee,Me,me,se){let j,q=0,ie,ee;const ue=E.width;for(ee=le;ee!==_e;ee+=Z)for(ie=Ee;ie!==me;ie+=Me,q+=2)j=se[q+0]+(se[q+1]<<8),G[(ie+ue*ee)*4+0]=(j&31744)>>7,G[(ie+ue*ee)*4+1]=(j&992)>>2,G[(ie+ue*ee)*4+2]=(j&31)<<3,G[(ie+ue*ee)*4+3]=j&32768?0:255;return G}function o(G,le,Z,_e,Ee,Me,me,se){let j=0,q,ie;const ee=E.width;for(ie=le;ie!==_e;ie+=Z)for(q=Ee;q!==me;q+=Me,j+=3)G[(q+ee*ie)*4+3]=255,G[(q+ee*ie)*4+2]=se[j+0],G[(q+ee*ie)*4+1]=se[j+1],G[(q+ee*ie)*4+0]=se[j+2];return G}function a(G,le,Z,_e,Ee,Me,me,se){let j=0,q,ie;const ee=E.width;for(ie=le;ie!==_e;ie+=Z)for(q=Ee;q!==me;q+=Me,j+=4)G[(q+ee*ie)*4+2]=se[j+0],G[(q+ee*ie)*4+1]=se[j+1],G[(q+ee*ie)*4+0]=se[j+2],G[(q+ee*ie)*4+3]=se[j+3];return G}function l(G,le,Z,_e,Ee,Me,me,se){let j,q=0,ie,ee;const ue=E.width;for(ee=le;ee!==_e;ee+=Z)for(ie=Ee;ie!==me;ie+=Me,q++)j=se[q],G[(ie+ue*ee)*4+0]=j,G[(ie+ue*ee)*4+1]=j,G[(ie+ue*ee)*4+2]=j,G[(ie+ue*ee)*4+3]=255;return G}function c(G,le,Z,_e,Ee,Me,me,se){let j=0,q,ie;const ee=E.width;for(ie=le;ie!==_e;ie+=Z)for(q=Ee;q!==me;q+=Me,j+=2)G[(q+ee*ie)*4+0]=se[j+0],G[(q+ee*ie)*4+1]=se[j+0],G[(q+ee*ie)*4+2]=se[j+0],G[(q+ee*ie)*4+3]=se[j+1];return G}function d(G,le,Z,_e,Ee){let Me,me,se,j,q,ie;switch((E.flags&v)>>x){default:case C:Me=0,se=1,q=le,me=0,j=1,ie=Z;break;case S:Me=0,se=1,q=le,me=Z-1,j=-1,ie=-1;break;case R:Me=le-1,se=-1,q=-1,me=0,j=1,ie=Z;break;case F:Me=le-1,se=-1,q=-1,me=Z-1,j=-1,ie=-1;break}if(H)switch(E.pixel_size){case 8:l(G,me,j,ie,Me,se,q,_e);break;case 16:c(G,me,j,ie,Me,se,q,_e);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(E.pixel_size){case 8:i(G,me,j,ie,Me,se,q,_e,Ee);break;case 16:r(G,me,j,ie,Me,se,q,_e);break;case 24:o(G,me,j,ie,Me,se,q,_e);break;case 32:a(G,me,j,ie,Me,se,q,_e);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,x=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,z=!1,H=!1;switch(E.image_type){case _:L=!0,z=!0;break;case u:z=!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),re=n(L,z,E,P,A);return d(Q,E.width,E.height,re.pixel_data,re.palettes),{data:Q,width:E.width,height:E.height,flipY:!0,generateMipmaps:!0,minFilter:Ai}}}class S4 extends oi{load(e,t,n,i){const r=this,o=r.path===""?uc.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(b,M){const N=[],D=b.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(b){if(b.length===0)return[];const M=b.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(b){if(b.length===0)return[];const M=b.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(b){if(b.length===0)return[];const M=b.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(b){return b.substring(1)}function l(){return"three_default_"+rn++}function c(b){return Object.keys(b).length===0}function d(b){return{unit:m(n(b,"unit")[0]),upAxis:u(n(b,"up_axis")[0])}}function m(b){return b!==void 0&&b.hasAttribute("meter")===!0?parseFloat(b.getAttribute("meter")):1}function u(b){return b!==void 0?b.textContent:"Y_UP"}function h(b,M,N,D){const U=n(b,M)[0];if(U!==void 0){const he=n(U,N);for(let xe=0;xe<he.length;xe++)D(he[xe])}}function g(b,M){for(const N in b){const D=b[N];D.build=M(b[N])}}function _(b,M){return b.build!==void 0||(b.build=M(b)),b.build}function p(b){const M={sources:{},samplers:{},channels:{}};let N=!1;for(let D=0,U=b.childNodes.length;D<U;D++){const he=b.childNodes[D];if(he.nodeType!==1)continue;let xe;switch(he.nodeName){case"source":xe=he.getAttribute("id"),M.sources[xe]=Fe(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&&(mt.animations[b.getAttribute("id")||Ei.generateUUID()]=M)}function f(b){const M={inputs:{}};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.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(b){const M={};let D=b.getAttribute("target").split("/");const U=D.shift();let he=D.shift();const xe=he.indexOf("(")!==-1,ot=he.indexOf(".")!==-1;if(ot)D=he.split("."),he=D.shift(),M.member=D.shift();else if(xe){const qe=he.split("(");he=qe.shift();for(let $e=0;$e<qe.length;$e++)qe[$e]=parseInt(qe[$e].replace(/\)/,""));M.indices=qe}return M.id=U,M.sid=he,M.arraySyntax=xe,M.memberSyntax=ot,M.sampler=a(b.getAttribute("source")),M}function x(b){const M=[],N=b.channels,D=b.samplers,U=b.sources;for(const he in N)if(N.hasOwnProperty(he)){const xe=N[he],ot=D[xe.sampler],qe=ot.inputs.INPUT,$e=ot.inputs.OUTPUT,ft=U[qe],ze=U[$e],Mt=F(xe,ft,ze);E(Mt,M)}return M}function S(b){return _(mt.animations[b],x)}function F(b,M,N){const D=mt.nodes[b.id],U=ct(D.id),he=D.transforms[b.sid],xe=D.matrix.clone().transpose();let ot,qe,$e,ft,ze,Mt;const gt={};switch(he){case"matrix":for($e=0,ft=M.array.length;$e<ft;$e++)if(ot=M.array[$e],qe=$e*N.stride,gt[ot]===void 0&&(gt[ot]={}),b.arraySyntax===!0){const pn=N.array[qe],nn=b.indices[0]+4*b.indices[1];gt[ot][nn]=pn}else for(ze=0,Mt=N.stride;ze<Mt;ze++)gt[ot][ze]=N.array[qe+ze];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 Lt=C(gt,xe);return{name:U.uuid,keyframes:Lt}}function C(b,M){const N=[];for(const U in b)N.push({time:parseFloat(U),value:b[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 Hn;function E(b,M){const N=b.keyframes,D=b.name,U=[],he=[],xe=[],ot=[];for(let qe=0,$e=N.length;qe<$e;qe++){const ft=N[qe],ze=ft.time,Mt=ft.value;O.fromArray(Mt).transpose(),O.decompose(R,A,P),U.push(ze),he.push(R.x,R.y,R.z),xe.push(A.x,A.y,A.z,A.w),ot.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)),ot.length>0&&M.push(new $s(D+".scale",U,ot)),M}function L(b,M,N){let D,U=!0,he,xe;for(he=0,xe=b.length;he<xe;he++)D=b[he],D.value[M]===void 0?D.value[M]=null:U=!1;if(U===!0)for(he=0,xe=b.length;he<xe;he++)D=b[he],D.value[M]=N;else z(b,M)}function z(b,M){let N,D;for(let U=0,he=b.length;U<he;U++){const xe=b[U];if(xe.value[M]===null){if(N=H(b,U,M),D=Q(b,U,M),N===null){xe.value[M]=D.value[M];continue}if(D===null){xe.value[M]=N.value[M];continue}re(xe,N,D,M)}}}function H(b,M,N){for(;M>=0;){const D=b[M];if(D.value[N]!==null)return D;M--}return null}function Q(b,M,N){for(;M<b.length;){const D=b[M];if(D.value[N]!==null)return D;M++}return null}function re(b,M,N,D){if(N.time-M.time===0){b.value[D]=M.value[D];return}b.value[D]=(b.time-M.time)*(N.value[D]-M.value[D])/(N.time-M.time)+M.value[D]}function G(b){const M={name:b.getAttribute("id")||"default",start:parseFloat(b.getAttribute("start")||0),end:parseFloat(b.getAttribute("end")||0),animations:[]};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"instance_animation":M.animations.push(a(U.getAttribute("url")));break}}mt.clips[b.getAttribute("id")]=M}function le(b){const M=[],N=b.name,D=b.end-b.start||-1,U=b.animations;for(let he=0,xe=U.length;he<xe;he++){const ot=S(U[he]);for(let qe=0,$e=ot.length;qe<$e;qe++)M.push(ot[qe])}return new uh(N,D,M)}function Z(b){return _(mt.clips[b],le)}function _e(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.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}}mt.controllers[b.getAttribute("id")]=M}function Ee(b){const M={sources:{}};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.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]=Fe(U);break;case"joints":M.joints=Me(U);break;case"vertex_weights":M.vertexWeights=me(U);break}}return M}function Me(b){const M={inputs:{}};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.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 me(b){const M={inputs:{}};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=U.getAttribute("semantic"),xe=a(U.getAttribute("source")),ot=parseInt(U.getAttribute("offset"));M.inputs[he]={id:xe,offset:ot};break;case"vcount":M.vcount=o(U.textContent);break;case"v":M.v=o(U.textContent);break}}return M}function se(b){const M={id:b.id},N=mt.geometries[M.id];return b.skin!==void 0&&(M.skin=j(b.skin),N.sources.skinIndices=M.skin.indices,N.sources.skinWeights=M.skin.weights),M}function j(b){const N={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},D=b.sources,U=b.vertexWeights,he=U.vcount,xe=U.v,ot=U.inputs.JOINT.offset,qe=U.inputs.WEIGHT.offset,$e=b.sources[b.joints.inputs.JOINT],ft=b.sources[b.joints.inputs.INV_BIND_MATRIX],ze=D[U.inputs.WEIGHT.id].array;let Mt=0,gt,Lt,wt;for(gt=0,wt=he.length;gt<wt;gt++){const nn=he[gt],qt=[];for(Lt=0;Lt<nn;Lt++){const $t=xe[Mt+ot],gi=xe[Mt+qe],Bn=ze[gi];qt.push({index:$t,weight:Bn}),Mt+=2}for(qt.sort(pn),Lt=0;Lt<4;Lt++){const $t=qt[Lt];$t!==void 0?(N.indices.array.push($t.index),N.weights.array.push($t.weight)):(N.indices.array.push(0),N.weights.array.push(0))}}for(b.bindShapeMatrix?N.bindMatrix=new At().fromArray(b.bindShapeMatrix).transpose():N.bindMatrix=new At().identity(),gt=0,wt=$e.array.length;gt<wt;gt++){const nn=$e.array[gt],qt=new At().fromArray(ft.array,gt*ft.stride).transpose();N.joints.push({name:nn,boneInverse:qt})}return N;function pn(nn,qt){return qt.weight-nn.weight}}function q(b){return _(mt.controllers[b],se)}function ie(b){const M={init_from:n(b,"init_from")[0].textContent};mt.images[b.getAttribute("id")]=M}function ee(b){return b.build!==void 0?b.build:b.init_from}function ue(b){const M=mt.images[b];return M!==void 0?_(M,ee):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",b),null)}function J(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"profile_COMMON":M.profile=de(U);break}}mt.effects[b.getAttribute("id")]=M}function de(b){const M={surfaces:{},samplers:{}};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"newparam":we(U,M);break;case"technique":M.technique=B(U);break;case"extra":M.extra=Le(U);break}}return M}function we(b,M){const N=b.getAttribute("sid");for(let D=0,U=b.childNodes.length;D<U;D++){const he=b.childNodes[D];if(he.nodeType===1)switch(he.nodeName){case"surface":M.surfaces[N]=Ze(he);break;case"sampler2D":M.samplers[N]=We(he);break}}}function Ze(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"init_from":M.init_from=U.textContent;break}}return M}function We(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"source":M.source=U.textContent;break}}return M}function B(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"constant":case"lambert":case"blinn":case"phong":M.type=U.nodeName,M.parameters=bt(U);break;case"extra":M.extra=Le(U);break}}return M}function bt(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.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]=ht(U);break;case"transparent":M[U.nodeName]={opaque:U.hasAttribute("opaque")?U.getAttribute("opaque"):"A_ONE",data:ht(U)};break}}return M}function ht(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.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:it(U)};break}}return M}function it(b){const M={technique:{}};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"extra":Ne(U,M);break}}return M}function Ne(b,M){for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique":tt(U,M);break}}}function tt(b,M){for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.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]=Yt(U);break}}}function Le(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique":M.technique=st(U);break}}return M}function st(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"double_sided":M[U.nodeName]=parseInt(U.textContent);break;case"bump":M[U.nodeName]=Yt(U);break}}return M}function Yt(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"texture":M[U.nodeName]={id:U.getAttribute("texture"),texcoord:U.getAttribute("texcoord"),extra:it(U)};break}}return M}function V(b){return b}function T(b){return _(mt.effects[b],V)}function ae(b){const M={name:b.getAttribute("name")};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"instance_effect":M.url=a(U.getAttribute("url"));break}}mt.materials[b.getAttribute("id")]=M}function be(b){let M,N=b.slice((b.lastIndexOf(".")-1>>>0)+2);switch(N=N.toLowerCase(),N){case"tga":M=un;break;default:M=tn}return M}function Re(b){const M=T(b.url),N=M.profile.technique;let D;switch(N.type){case"phong":case"blinn":D=new mn;break;case"lambert":D=new R1;break;default:D=new qi;break}D.name=b.name||"";function U(qe,$e=null){const ft=M.profile.samplers[qe.id];let ze=null;if(ft!==void 0){const Mt=M.profile.surfaces[ft.source];ze=ue(Mt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),ze=ue(qe.id);if(ze!==null){const Mt=be(ze);if(Mt!==void 0){const gt=Mt.load(ze),Lt=qe.extra;if(Lt!==void 0&&Lt.technique!==void 0&&c(Lt.technique)===!1){const wt=Lt.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 $e!==null&&(gt.colorSpace=$e),gt}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",ze),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",qe.id),null}const he=N.parameters;for(const qe in he){const $e=he[qe];switch(qe){case"diffuse":$e.color&&D.color.fromArray($e.color),$e.texture&&(D.map=U($e.texture,jt));break;case"specular":$e.color&&D.specular&&D.specular.fromArray($e.color),$e.texture&&(D.specularMap=U($e.texture));break;case"bump":$e.texture&&(D.normalMap=U($e.texture));break;case"ambient":$e.texture&&(D.lightMap=U($e.texture,jt));break;case"shininess":$e.float&&D.shininess&&(D.shininess=$e.float);break;case"emission":$e.color&&D.emissive&&D.emissive.fromArray($e.color),$e.texture&&(D.emissiveMap=U($e.texture,jt));break}}Ht.colorSpaceToWorking(D.color,jt),D.specular&&Ht.colorSpaceToWorking(D.specular,jt),D.emissive&&Ht.colorSpaceToWorking(D.emissive,jt);let xe=he.transparent,ot=he.transparency;if(ot===void 0&&xe&&(ot={float:1}),xe===void 0&&ot&&(xe={opaque:"A_ONE",data:{color:[1,1,1,1]}}),xe&&ot)if(xe.data.texture)D.transparent=!0;else{const qe=xe.data.color;switch(xe.opaque){case"A_ONE":D.opacity=qe[3]*ot.float;break;case"RGB_ZERO":D.opacity=1-qe[0]*ot.float;break;case"A_ZERO":D.opacity=1-qe[3]*ot.float;break;case"RGB_ONE":D.opacity=qe[0]*ot.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 qe=N.extra.technique;for(const $e in qe){const ft=qe[$e];switch($e){case"double_sided":D.side=ft===1?gn:ei;break;case"bump":D.normalMap=U(ft.texture),D.normalScale=new et(1,1);break}}}return D}function ve(b){return _(mt.materials[b],Re)}function _t(b){const M={name:b.getAttribute("name")};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"optics":M.optics=Qe(U);break}}mt.cameras[b.getAttribute("id")]=M}function Qe(b){for(let M=0;M<b.childNodes.length;M++){const N=b.childNodes[M];switch(N.nodeName){case"technique_common":return pt(N)}}return{}}function pt(b){const M={};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];switch(D.nodeName){case"perspective":case"orthographic":M.technique=D.nodeName,M.parameters=vt(D);break}}return M}function vt(b){const M={};for(let N=0;N<b.childNodes.length;N++){const D=b.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 Pe(b){let M;switch(b.optics.technique){case"perspective":M=new Sn(b.optics.parameters.yfov,b.optics.parameters.aspect_ratio,b.optics.parameters.znear,b.optics.parameters.zfar);break;case"orthographic":let N=b.optics.parameters.ymag,D=b.optics.parameters.xmag;const U=b.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,b.optics.parameters.znear,b.optics.parameters.zfar);break;default:M=new Sn;break}return M.name=b.name||"",M}function lt(b){const M=mt.cameras[b];return M!==void 0?_(M,Pe):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",b),null)}function Dt(b){let M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique_common":M=Ct(U);break}}mt.lights[b.getAttribute("id")]=M}function Ct(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"directional":case"point":case"spot":case"ambient":M.technique=U.nodeName,M.parameters=Je(U)}}return M}function Je(b){const M={};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"color":const he=r(U.textContent);M.color=new Tt().fromArray(he),Ht.colorSpaceToWorking(M.color,jt);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 Pt(b){let M;switch(b.technique){case"directional":M=new gr;break;case"point":M=new Pa;break;case"spot":M=new W1;break;case"ambient":M=new hc;break}return b.parameters.color&&M.color.copy(b.parameters.color),b.parameters.distance&&(M.distance=b.parameters.distance),M}function K(b){const M=mt.lights[b];return M!==void 0?_(M,Pt):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",b),null)}function nt(b){const M={name:b.getAttribute("name"),sources:{},vertices:{},primitives:[]},N=n(b,"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]=Fe(U);break;case"vertices":M.vertices=at(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(Oe(U));break;default:console.log(U)}}mt.geometries[b.getAttribute("id")]=M}}function Fe(b){const M={array:[],stride:3};for(let N=0;N<b.childNodes.length;N++){const D=b.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 at(b){const M={};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];D.nodeType===1&&(M[D.getAttribute("semantic")]=a(D.getAttribute("source")))}return M}function Oe(b){const M={type:b.nodeName,material:b.getAttribute("material"),count:parseInt(b.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let N=0,D=b.childNodes.length;N<D;N++){const U=b.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=a(U.getAttribute("source")),xe=U.getAttribute("semantic"),ot=parseInt(U.getAttribute("offset")),qe=parseInt(U.getAttribute("set")),$e=qe>0?xe+qe:xe;M.inputs[$e]={id:he,offset:ot},M.stride=Math.max(M.stride,ot+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 Ae(b){const M={};for(let N=0;N<b.length;N++){const D=b[N];M[D.type]===void 0&&(M[D.type]=[]),M[D.type].push(D)}return M}function dt(b){let M=0;for(let N=0,D=b.length;N<D;N++)b[N].hasUV===!0&&M++;M>0&&M<b.length&&(b.uvsNeedsFix=!0)}function Ft(b){const M={},N=b.sources,D=b.vertices,U=b.primitives;if(U.length===0)return{};const he=Ae(U);for(const xe in he){const ot=he[xe];dt(ot),M[xe]=Jt(ot,N,D)}return M}function Jt(b,M,N){const D={},U={array:[],stride:0},he={array:[],stride:0},xe={array:[],stride:0},ot={array:[],stride:0},qe={array:[],stride:0},$e={array:[],stride:4},ft={array:[],stride:4},ze=new hn,Mt=[];let gt=0;for(let Lt=0;Lt<b.length;Lt++){const wt=b[Lt],pn=wt.inputs;let nn=0;switch(wt.type){case"lines":case"linestrips":nn=wt.count*2;break;case"triangles":nn=wt.count*3;break;case"polylist":for(let qt=0;qt<wt.count;qt++){const $t=wt.vcount[qt];switch($t){case 3:nn+=3;break;case 4:nn+=6;break;default:nn+=($t-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",wt.type)}ze.addGroup(gt,nn,Lt),gt+=nn,wt.material&&Mt.push(wt.material);for(const qt in pn){const $t=pn[qt];switch(qt){case"VERTEX":for(const gi in N){const Bn=N[gi];switch(gi){case"POSITION":const ps=U.array.length;if(zt(wt,M[Bn],$t.offset,U.array),U.stride=M[Bn].stride,M.skinWeights&&M.skinIndices&&(zt(wt,M.skinIndices,$t.offset,$e.array),zt(wt,M.skinWeights,$t.offset,ft.array)),wt.hasUV===!1&&b.uvsNeedsFix===!0){const wu=(U.array.length-ps)/U.stride;for(let vc=0;vc<wu;vc++)xe.array.push(0,0)}break;case"NORMAL":zt(wt,M[Bn],$t.offset,he.array),he.stride=M[Bn].stride;break;case"COLOR":zt(wt,M[Bn],$t.offset,qe.array),qe.stride=M[Bn].stride;break;case"TEXCOORD":zt(wt,M[Bn],$t.offset,xe.array),xe.stride=M[Bn].stride;break;case"TEXCOORD1":zt(wt,M[Bn],$t.offset,ot.array),xe.stride=M[Bn].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',gi)}}break;case"NORMAL":zt(wt,M[$t.id],$t.offset,he.array),he.stride=M[$t.id].stride;break;case"COLOR":zt(wt,M[$t.id],$t.offset,qe.array,!0),qe.stride=M[$t.id].stride;break;case"TEXCOORD":zt(wt,M[$t.id],$t.offset,xe.array),xe.stride=M[$t.id].stride;break;case"TEXCOORD1":zt(wt,M[$t.id],$t.offset,ot.array),ot.stride=M[$t.id].stride;break}}}return U.array.length>0&&ze.setAttribute("position",new It(U.array,U.stride)),he.array.length>0&&ze.setAttribute("normal",new It(he.array,he.stride)),qe.array.length>0&&ze.setAttribute("color",new It(qe.array,qe.stride)),xe.array.length>0&&ze.setAttribute("uv",new It(xe.array,xe.stride)),ot.array.length>0&&ze.setAttribute("uv1",new It(ot.array,ot.stride)),$e.array.length>0&&ze.setAttribute("skinIndex",new It($e.array,$e.stride)),ft.array.length>0&&ze.setAttribute("skinWeight",new It(ft.array,ft.stride)),D.data=ze,D.type=b[0].type,D.materialKeys=Mt,D}function zt(b,M,N,D,U=!1){const he=b.p,xe=b.stride,ot=b.vcount;function qe(ze){let Mt=he[ze+N]*ft;const gt=Mt+ft;for(;Mt<gt;Mt++)D.push($e[Mt]);if(U){const Lt=D.length-ft-1;Kt.setRGB(D[Lt+0],D[Lt+1],D[Lt+2],jt),D[Lt+0]=Kt.r,D[Lt+1]=Kt.g,D[Lt+2]=Kt.b}}const $e=M.array,ft=M.stride;if(b.vcount!==void 0){let ze=0;for(let Mt=0,gt=ot.length;Mt<gt;Mt++){const Lt=ot[Mt];if(Lt===4){const wt=ze+xe*0,pn=ze+xe*1,nn=ze+xe*2,qt=ze+xe*3;qe(wt),qe(pn),qe(qt),qe(pn),qe(nn),qe(qt)}else if(Lt===3){const wt=ze+xe*0,pn=ze+xe*1,nn=ze+xe*2;qe(wt),qe(pn),qe(nn)}else if(Lt>4)for(let wt=1,pn=Lt-2;wt<=pn;wt++){const nn=ze+xe*0,qt=ze+xe*wt,$t=ze+xe*(wt+1);qe(nn),qe(qt),qe($t)}ze+=xe*Lt}}else for(let ze=0,Mt=he.length;ze<Mt;ze+=xe)qe(ze)}function Rn(b){return _(mt.geometries[b],Ft)}function Gn(b){const M={name:b.getAttribute("name")||"",joints:{},links:[]};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"technique_common":$(D,M);break}}mt.kinematicsModels[b.getAttribute("id")]=M}function Yi(b){return b.build!==void 0?b.build:b}function fs(b){return _(mt.kinematicsModels[b],Yi)}function $(b,M){for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"joint":M.joints[D.getAttribute("sid")]=W(D);break;case"link":M.links.push(fe(D));break}}}function W(b){let M;for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"prismatic":case"revolute":M=ce(D);break}}return M}function ce(b){const M={sid:b.getAttribute("sid"),name:b.getAttribute("name")||"",axis:new I,limits:{min:0,max:0},type:b.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let N=0;N<b.childNodes.length;N++){const D=b.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 fe(b){const M={sid:b.getAttribute("sid"),name:b.getAttribute("name")||"",attachments:[],transforms:[]};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"attachment_full":M.attachments.push(ge(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(pe(D));break}}return M}function ge(b){const M={joint:b.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"link":M.links.push(fe(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(pe(D));break}}return M}function pe(b){const M={type:b.nodeName},N=r(b.textContent);switch(M.type){case"matrix":M.obj=new At,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 Ue(b){const M={name:b.getAttribute("name")||"",rigidBodies:{}};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"rigid_body":M.rigidBodies[D.getAttribute("name")]={},Te(D,M.rigidBodies[D.getAttribute("name")]);break}}mt.physicsModels[b.getAttribute("id")]=M}function Te(b,M){for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"technique_common":Ce(D,M);break}}}function Ce(b,M){for(let N=0;N<b.childNodes.length;N++){const D=b.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 Ye(b){const M={bindJointAxis:[]};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"bind_joint_axis":M.bindJointAxis.push(te(D));break}}mt.kinematicsScenes[a(b.getAttribute("url"))]=M}function te(b){const M={target:b.getAttribute("target").split("/").pop()};for(let N=0;N<b.childNodes.length;N++){const D=b.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 ke(b){return b.build!==void 0?b.build:b}function Xe(b){return _(mt.kinematicsScenes[b],ke)}function ut(){const b=Object.keys(mt.kinematicsModels)[0],M=Object.keys(mt.kinematicsScenes)[0],N=Object.keys(mt.visualScenes)[0];if(b===void 0||M===void 0)return;const D=fs(b),U=Xe(M),he=xt(N),xe=U.bindJointAxis,ot={};for(let ft=0,ze=xe.length;ft<ze;ft++){const Mt=xe[ft],gt=Wt.querySelector('[sid="'+Mt.target+'"]');if(gt){const Lt=gt.parentElement;qe(Mt.jointIndex,Lt)}}function qe(ft,ze){const Mt=ze.getAttribute("name"),gt=D.joints[ft];he.traverse(function(Lt){Lt.name===Mt&&(ot[ft]={object:Lt,transforms:St(ze),joint:gt,position:gt.zeroPosition})})}const $e=new At;He={joints:D&&D.joints,getJointValue:function(ft){const ze=ot[ft];if(ze)return ze.position;console.warn("THREE.ColladaLoader: Joint "+ft+" doesn't exist.")},setJointValue:function(ft,ze){const Mt=ot[ft];if(Mt){const gt=Mt.joint;if(ze>gt.limits.max||ze<gt.limits.min)console.warn("THREE.ColladaLoader: Joint "+ft+" value "+ze+" outside of limits (min: "+gt.limits.min+", max: "+gt.limits.max+").");else if(gt.static)console.warn("THREE.ColladaLoader: Joint "+ft+" is static.");else{const Lt=Mt.object,wt=gt.axis,pn=Mt.transforms;O.identity();for(let nn=0;nn<pn.length;nn++){const qt=pn[nn];if(qt.sid&&qt.sid.indexOf(ft)!==-1)switch(gt.type){case"revolute":O.multiply($e.makeRotationAxis(wt,Ei.degToRad(ze)));break;case"prismatic":O.multiply($e.makeTranslation(wt.x*ze,wt.y*ze,wt.z*ze));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+gt.type);break}else switch(qt.type){case"matrix":O.multiply(qt.obj);break;case"translate":O.multiply($e.makeTranslation(qt.obj.x,qt.obj.y,qt.obj.z));break;case"scale":O.scale(qt.obj);break;case"rotate":O.multiply($e.makeRotationAxis(qt.obj,qt.angle));break}}Lt.matrix.copy(O),Lt.matrix.decompose(Lt.position,Lt.quaternion,Lt.scale),ot[ft].position=ze}}else console.log("THREE.ColladaLoader: "+ft+" does not exist.")}}}function St(b){const M=[],N=Wt.querySelector('[id="'+b.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 ot=new At().fromArray(he).transpose();M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:ot});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 qe=Ei.degToRad(he[3]);M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:xe,angle:qe});break}}return M}function w(b){const M=b.getElementsByTagName("node");for(let N=0;N<M.length;N++){const D=M[N];D.hasAttribute("id")===!1&&D.setAttribute("id",l())}}const O=new At,Y=new I;function k(b){const M={name:b.getAttribute("name")||"",type:b.getAttribute("type"),id:b.getAttribute("id"),sid:b.getAttribute("sid"),matrix:new At,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let N=0;N<b.childNodes.length;N++){const D=b.childNodes[N];if(D.nodeType!==1)continue;let U;switch(D.nodeName){case"node":M.nodes.push(D.getAttribute("id")),k(D);break;case"instance_camera":M.instanceCameras.push(a(D.getAttribute("url")));break;case"instance_controller":M.instanceControllers.push(X(D));break;case"instance_light":M.instanceLights.push(a(D.getAttribute("url")));break;case"instance_geometry":M.instanceGeometries.push(X(D));break;case"instance_node":M.instanceNodes.push(a(D.getAttribute("url")));break;case"matrix":U=r(D.textContent),M.matrix.multiply(O.fromArray(U).transpose()),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"translate":U=r(D.textContent),Y.fromArray(U),M.matrix.multiply(O.makeTranslation(Y.x,Y.y,Y.z)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"rotate":U=r(D.textContent);const he=Ei.degToRad(U[3]);M.matrix.multiply(O.makeRotationAxis(Y.fromArray(U),he)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"scale":U=r(D.textContent),M.matrix.scale(Y.fromArray(U)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"extra":break;default:console.log(D)}}return Ge(M.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",M.id):mt.nodes[M.id]=M,M}function X(b){const M={id:a(b.getAttribute("url")),materials:{},skeletons:[]};for(let N=0;N<b.childNodes.length;N++){const D=b.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],ot=xe.getAttribute("symbol"),qe=xe.getAttribute("target");M.materials[ot]=a(qe)}break;case"skeleton":M.skeletons.push(a(D.textContent));break}}return M}function ne(b,M){const N=[],D=[];let U,he,xe;for(U=0;U<b.length;U++){const $e=b[U];let ft;if(Ge($e))ft=ct($e),ye(ft,M,N);else if(Nt($e)){const Mt=mt.visualScenes[$e].children;for(let gt=0;gt<Mt.length;gt++){const Lt=Mt[gt];if(Lt.type==="JOINT"){const wt=ct(Lt.id);ye(wt,M,N)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",$e)}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 ot=[],qe=[];for(U=0;U<D.length;U++)xe=D[U],ot.push(xe.bone),qe.push(xe.boneInverse);return new nc(ot,qe)}function ye(b,M,N){b.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 At),N.push({bone:D,boneInverse:U,processed:!1})}})}function oe(b){const M=[],N=b.matrix,D=b.nodes,U=b.type,he=b.instanceCameras,xe=b.instanceControllers,ot=b.instanceLights,qe=b.instanceGeometries,$e=b.instanceNodes;for(let ze=0,Mt=D.length;ze<Mt;ze++)M.push(ct(D[ze]));for(let ze=0,Mt=he.length;ze<Mt;ze++){const gt=lt(he[ze]);gt!==null&&M.push(gt.clone())}for(let ze=0,Mt=xe.length;ze<Mt;ze++){const gt=xe[ze],Lt=q(gt.id),wt=Rn(Lt.id),pn=Be(wt,gt.materials),nn=gt.skeletons,qt=Lt.skin.joints,$t=ne(nn,qt);for(let gi=0,Bn=pn.length;gi<Bn;gi++){const ps=pn[gi];ps.isSkinnedMesh&&(ps.bind($t,Lt.skin.bindMatrix),ps.normalizeSkinWeights()),M.push(ps)}}for(let ze=0,Mt=ot.length;ze<Mt;ze++){const gt=K(ot[ze]);gt!==null&&M.push(gt.clone())}for(let ze=0,Mt=qe.length;ze<Mt;ze++){const gt=qe[ze],Lt=Rn(gt.id),wt=Be(Lt,gt.materials);for(let pn=0,nn=wt.length;pn<nn;pn++)M.push(wt[pn])}for(let ze=0,Mt=$e.length;ze<Mt;ze++)M.push(ct($e[ze]).clone());let ft;if(D.length===0&&M.length===1)ft=M[0];else{ft=U==="JOINT"?new V0:new Pn;for(let ze=0;ze<M.length;ze++)ft.add(M[ze])}return ft.name=U==="JOINT"?b.sid:b.name,ft.matrix.copy(N),ft.matrix.decompose(ft.position,ft.quaternion,ft.scale),ft}const De=new qi({name:oi.DEFAULT_MATERIAL_NAME,color:16711935});function Se(b,M){const N=[];for(let D=0,U=b.length;D<U;D++){const he=M[b[D]];he===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",b[D]),N.push(De)):N.push(ve(he))}return N}function Be(b,M){const N=[];for(const D in b){const U=b[D],he=Se(U.materialKeys,M);if(he.length===0&&(D==="lines"||D==="linestrips"?he.push(new Ri):he.push(new mn)),D==="lines"||D==="linestrips")for(let $e=0,ft=he.length;$e<ft;$e++){const ze=he[$e];if(ze.isMeshPhongMaterial===!0||ze.isMeshLambertMaterial===!0){const Mt=new Ri;Mt.color.copy(ze.color),Mt.opacity=ze.opacity,Mt.transparent=ze.transparent,he[$e]=Mt}}const xe=U.data.attributes.skinIndex!==void 0,ot=he.length===1?he[0]:he;let qe;switch(D){case"lines":qe=new Ra(U.data,ot);break;case"linestrips":qe=new Ba(U.data,ot);break;case"triangles":case"polylist":xe?qe=new l1(U.data,ot):qe=new Bt(U.data,ot);break}N.push(qe)}return N}function Ge(b){return mt.nodes[b]!==void 0}function ct(b){return _(mt.nodes[b],oe)}function Et(b){const M={name:b.getAttribute("name"),children:[]};w(b);const N=n(b,"node");for(let D=0;D<N.length;D++)M.children.push(k(N[D]));mt.visualScenes[b.getAttribute("id")]=M}function yt(b){const M=new Pn;M.name=b.name;const N=b.children;for(let D=0;D<N.length;D++){const U=N[D];M.add(ct(U.id))}return M}function Nt(b){return mt.visualScenes[b]!==void 0}function xt(b){return _(mt.visualScenes[b],yt)}function rt(b){const M=n(b,"instance_visual_scene")[0];return xt(a(M.getAttribute("url")))}function Xt(){const b=mt.clips;if(c(b)===!0){if(c(mt.animations)===!1){const M=[];for(const N in mt.animations){const D=S(N);for(let U=0,he=D.length;U<he;U++)M.push(D[U])}je.push(new uh("default",-1,M))}}else for(const M in b)je.push(Z(M))}function Ut(b){let M="";const N=[b];for(;N.length;){const D=N.shift();D.nodeType===Node.TEXT_NODE?M+=D.textContent:(M+=`
|
|
4198
|
+
`,N.push(...D.childNodes))}return M.trim()}if(e.length===0)return{scene:new Ia};const Zt=new DOMParser().parseFromString(e,"application/xml"),Wt=n(Zt,"COLLADA")[0],Ie=Zt.getElementsByTagName("parsererror")[0];if(Ie!==void 0){const b=n(Ie,"div")[0];let M;return b?M=b.textContent:M=Ut(Ie),console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
4199
|
+
`,M),null}const Qt=Wt.getAttribute("version");console.debug("THREE.ColladaLoader: File version",Qt);const Rt=d(n(Wt,"asset")[0]),tn=new lc(this.manager);tn.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let un;a0&&(un=new a0(this.manager),un.setPath(this.resourcePath||t));const Kt=new Tt,je=[];let He={},rn=0;const mt={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(Wt,"library_animations","animation",p),h(Wt,"library_animation_clips","animation_clip",G),h(Wt,"library_controllers","controller",_e),h(Wt,"library_images","image",ie),h(Wt,"library_effects","effect",J),h(Wt,"library_materials","material",ae),h(Wt,"library_cameras","camera",_t),h(Wt,"library_lights","light",Dt),h(Wt,"library_geometries","geometry",nt),h(Wt,"library_nodes","node",k),h(Wt,"library_visual_scenes","visual_scene",Et),h(Wt,"library_kinematics_models","kinematics_model",Gn),h(Wt,"library_physics_models","physics_model",Ue),h(Wt,"scene","instance_kinematics_scene",Ye),g(mt.animations,x),g(mt.clips,le),g(mt.controllers,se),g(mt.images,ee),g(mt.effects,V),g(mt.materials,Re),g(mt.cameras,Pe),g(mt.lights,Pt),g(mt.geometries,Ft),g(mt.visualScenes,yt),Xt(),ut();const fn=rt(n(Wt,"scene")[0]);return fn.animations=je,Rt.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."),fn.rotation.set(-Math.PI/2,0,0)),fn.scale.multiplyScalar(Rt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),je},kinematics:He,library:mt,scene:fn}}}const o0=new I,E4=new En,ca=new At,Vi=new At,ha=new Hn,ua=new I(1,1,1),da=new I;class Wa extends cn{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 A4 extends Wa{constructor(...e){super(...e),this.isURDFCollider=!0,this.type="URDFCollider"}}class w4 extends Wa{constructor(...e){super(...e),this.isURDFVisual=!0,this.type="URDFVisual"}}class fu extends Wa{constructor(...e){super(...e),this.isURDFLink=!0,this.type="URDFLink"}}class pu 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),o0.copy(this.axis).applyEuler(this.rotation),this.position.addScaledVector(o0,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(E4.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 l0 extends pu{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 T4 extends fu{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 Hn,c0=new En;function Ns(s){return s?s.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function h0(s,e,t=!1){t||s.rotation.set(0,0,0),c0.set(e[0],e[1],e[2],"ZYX"),Io.setFromEuler(c0),Io.multiply(s.quaternion),s.quaternion.copy(Io)}class _c{constructor(e){this.manager=e||oc,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=uc.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[x,S]=v.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(x)?n+"/"+S:n+"/"+x+"/"+S;if(n instanceof Function)return n(x)+"/"+S;if(typeof n=="object")return x in n?n[x]+"/"+S:(console.error(`URDFLoader : ${x} not found in provided package list.`),null)}function u(v){let x;v instanceof Document?x=[...v.children]:v instanceof Element?x=[v]:x=[...new DOMParser().parseFromString(v,"text/xml").children];const S=x.filter(F=>F.nodeName==="robot").pop();return h(S)}function h(v){const x=[...v.children],S=x.filter(L=>L.nodeName.toLowerCase()==="link"),F=x.filter(L=>L.nodeName.toLowerCase()==="joint"),C=x.filter(L=>L.nodeName.toLowerCase()==="material"),R=new T4;R.robotName=v.getAttribute("name"),R.urdfRobotNode=v,C.forEach(L=>{const z=L.getAttribute("name");d[z]=p(L)});const P={},A={};S.forEach(L=>{const z=L.getAttribute("name"),H=v.querySelector(`child[link="${z}"]`)===null;l[z]=_(L,P,A,H?R:null)}),F.forEach(L=>{const z=L.getAttribute("name");c[z]=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 l0&&c[L.mimicJoint].mimicJoints.push(L)}),E.forEach(L=>{const z=new Set,H=Q=>{if(z.has(Q))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");z.add(Q),Q.mimicJoints.forEach(re=>{H(re)})};H(L)}),R.frames={...A,...P,...l,...c},R}function g(v){const x=[...v.children],S=v.getAttribute("type");let F;const C=x.find(z=>z.nodeName.toLowerCase()==="mimic");C?(F=new l0,F.mimicJoint=C.getAttribute("joint"),F.multiplier=parseFloat(C.getAttribute("multiplier")||1),F.offset=parseFloat(C.getAttribute("offset")||0)):F=new pu,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];x.forEach(z=>{const H=z.nodeName.toLowerCase();H==="origin"?(A=Ns(z.getAttribute("xyz")),E=Ns(z.getAttribute("rpy"))):H==="child"?P=l[z.getAttribute("link")]:H==="parent"?R=l[z.getAttribute("link")]:H==="limit"&&(F.limit.lower=parseFloat(z.getAttribute("lower")||F.limit.lower),F.limit.upper=parseFloat(z.getAttribute("upper")||F.limit.upper))}),R.add(F),F.add(P),h0(F,E),F.position.set(A[0],A[1],A[2]);const L=x.filter(z=>z.nodeName.toLowerCase()==="axis")[0];if(L){const z=L.getAttribute("xyz").split(/\s+/g).map(H=>parseFloat(H));F.axis=new I(z[0],z[1],z[2]),F.axis.normalize()}return F}function _(v,x,S,F=null){F===null&&(F=new fu);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,x[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 x=[...v.children],S=new mn;return S.name=v.getAttribute("name")||"",x.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 lc(a),A=m(R);S.map=P.load(A),S.map.colorSpace=jt}}}),S}function f(v,x={}){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 x?C=x[A]:C=p(R)}else C=new mn;const P=S?new A4:new w4;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 z=A.children[0].getAttribute("filename"),H=m(z);if(H!==null){const Q=A.children[0].getAttribute("scale");if(Q){const re=Ns(Q);P.scale.set(re[0],re[1],re[2])}i(H,a,(re,G)=>{G?console.error("URDFLoader: Error loading mesh.",G):re&&(re instanceof Bt&&(re.material=C),re.position.set(0,0,0),re.quaternion.identity(),P.add(re))})}}else if(L==="box"){const z=new Bt;z.geometry=new $i(1,1,1),z.material=C;const H=Ns(A.children[0].getAttribute("size"));z.scale.set(H[0],H[1],H[2]),P.add(z)}else if(L==="sphere"){const z=new Bt;z.geometry=new Oa(1,30,30),z.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0;z.scale.set(H,H,H),P.add(z)}else if(L==="cylinder"){const z=new Bt;z.geometry=new sc(1,1,1,30),z.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0,Q=parseFloat(A.children[0].getAttribute("length"))||0;z.scale.set(H,Q,H),z.rotation.set(Math.PI/2,0,0),P.add(z)}}else if(E==="origin"){const L=Ns(A.getAttribute("xyz")),z=Ns(A.getAttribute("rpy"));P.position.set(L[0],L[1],L[2]),P.rotation.set(0,0,0),h0(P,z)}}),P}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new ji(t).load(e,r=>{const o=new Bt(r,new mn);n(o)}):/\.dae$/i.test(e)?new S4(t).load(e,r=>n(r.scene)):console.warn(`URDFLoader: Could not load model at ${e}.
|
|
4200
|
+
No loader available`)}}const C4=/^[og]\s*(.+)?/,R4=/^mtllib /,D4=/^usemtl /,L4=/^usemap /,u0=/\s+/,d0=new I,zo=new I,f0=new I,p0=new I,Jn=new I,fa=new Tt;function P4(){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;d0.fromArray(i,e),zo.fromArray(i,t),f0.fromArray(i,n),Jn.subVectors(f0,zo),p0.subVectors(d0,zo),Jn.cross(p0),Jn.normalize(),r.push(Jn.x,Jn.y,Jn.z),r.push(Jn.x,Jn.y,Jn.z),r.push(Jn.x,Jn.y,Jn.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 ls extends oi{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 P4;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
|
|
4205
|
-
`);let i={};const r=/\s+/,
|
|
4206
|
-
`||
|
|
4207
|
-
`);for(let f=0,v=p.length;f<v;f++){if(p[f]==="")continue;const x=p[f].split(" ");if(h.x!==void 0&&(r.push(parseFloat(x[h.x])),r.push(parseFloat(x[h.y])),r.push(parseFloat(x[h.z]))),h.rgb!==void 0){const b=i.fields.findIndex(P=>P==="rgb"),F=i.type[b],C=parseFloat(x[h.rgb]);let R=C;if(F==="F"){const P=new Float32Array(1);P[0]=C,R=new Int32Array(P.buffer)[0]}const L=(R>>16&255)/255,A=(R>>8&255)/255,E=(R>>0&255)/255;d.setRGB(L,A,E,Zt),o.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(a.push(parseFloat(x[h.normal_x])),a.push(parseFloat(x[h.normal_y])),a.push(parseFloat(x[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(x[h.intensity])),h.label!==void 0&&c.push(parseInt(x[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 x=0;x<i.points;x++){if(v.x!==void 0){const b=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[b]*x,i.type[b],i.size[b])),r.push(this._getDataView(f,i.points*v.y+i.size[F]*x,i.type[F],i.size[F])),r.push(this._getDataView(f,i.points*v.z+i.size[C]*x,i.type[C],i.size[C]))}if(v.rgb!==void 0){const b=i.fields.indexOf("rgb"),F=f.getUint8(i.points*v.rgb+i.size[b]*x+2)/255,C=f.getUint8(i.points*v.rgb+i.size[b]*x+1)/255,R=f.getUint8(i.points*v.rgb+i.size[b]*x+0)/255;d.setRGB(F,C,R,Zt),o.push(d.r,d.g,d.b)}if(v.normal_x!==void 0){const b=i.fields.indexOf("normal_x"),F=i.fields.indexOf("normal_y"),C=i.fields.indexOf("normal_z");a.push(this._getDataView(f,i.points*v.normal_x+i.size[b]*x,i.type[b],i.size[b])),a.push(this._getDataView(f,i.points*v.normal_y+i.size[F]*x,i.type[F],i.size[F])),a.push(this._getDataView(f,i.points*v.normal_z+i.size[C]*x,i.type[C],i.size[C]))}if(v.intensity!==void 0){const b=i.fields.indexOf("intensity");l.push(this._getDataView(f,i.points*v.intensity+i.size[b]*x,i.type[b],i.size[b]))}if(v.label!==void 0){const b=i.fields.indexOf("label");c.push(f.getInt32(i.points*v.label+i.size[b]*x,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"),x=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[x],i.size[x]))}if(g.rgb!==void 0){const f=h.getUint8(p+g.rgb+2)/255,v=h.getUint8(p+g.rgb+1)/255,x=h.getUint8(p+g.rgb+0)/255;d.setRGB(f,v,x,Zt),o.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"),x=i.fields.indexOf("normal_z");a.push(this._getDataView(h,p+g.normal_x,i.type[f],i.size[f])),a.push(this._getDataView(h,p+g.normal_y,i.type[v],i.size[v])),a.push(this._getDataView(h,p+g.normal_z,i.type[x],i.size[x]))}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 Nt(r,3)),a.length>0&&m.setAttribute("normal",new Nt(a,3)),o.length>0&&m.setAttribute("color",new Nt(o,3)),l.length>0&&m.setAttribute("intensity",new Nt(l,1)),c.length>0&&m.setAttribute("label",new Z2(c,1)),m.computeBoundingSphere();const u=new Wi({size:.005});return o.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const N4=Vl.useModelComp(Ge.pinia),{systemPath:m0}=Ge.storeToRefs(N4),pa=y.ref(),g0=new Map;function I4(s,e,t,n,i){const r=async u=>{try{const h=await Kn.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},a=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,x=new hs().parse(f);x.preload(),h(x)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),o=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 mn({color:8947848,side:gn}))},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 a(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 x=null;h&&h.length>0&&(h.length===1?x=await a(h[0]):x=await o(h));const b=new cs;x&&b.setMaterials(x);const F=b.parse(v);x||F.traverse(C=>{C.isMesh&&(C.material=new mn({color:8947848,side:gn}))}),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),x=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,b=new File([v],x,{type:v.type});let F=[];if(f.mtlUrls){const R=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let L=0;L<R.length;L++){const A=R[L],E=await r(A),P=(A==null?void 0:A.split("/").pop())||`material_${p}_${L}.mtl`,z=new File([E],P,{type:E.type});F.push(z)}}const C=await l(b,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 q=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Se=[...v.matchAll(q)].map(B=>({x:parseFloat(B[1]),y:parseFloat(B[2]),z:parseFloat(B[3])})),Ke=new hn,Ve=Se.flatMap(B=>[B.x,B.y,B.z]);if(Ke.setAttribute("position",new Nt(Ve,3)),f===".txt"){const B=new Wi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ke,B)}else if(f===".cpt"){const B=new Di({color:"#5B5C99",linewidth:100});p=new Ba(Ke,B)}}else if(f===".obj"){const q=new cs;if(g&&g.length>0){const he=new hs;for(const Se of g){const Ke=await Se.text(),Ve=he.parse(Ke);Ve.preload(),q.setMaterials(Ve);break}}p=q.parse(v),(!g||g.length===0)&&p.traverse(he=>{he.isMesh&&(he.material=new mn({color:"#B3B3D4"})),he instanceof zt&&(he.material.side=gn)})}break;case".stl":const x=await h.arrayBuffer(),F=new qi().parse(x),C=new mn({color:"#B3B3D4",side:gn});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"],L={"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 Un,E=R.map(q=>new Promise((he,Se)=>{new qi().load(m0.value===""?`/model/${q}`:`${m0.value}\\${q}`,Ve=>{const B=new mn({color:L[q]||"#B3B3D4",side:gn}),yt=new zt(Ve,B);he(yt)},void 0,Se)}));try{(await Promise.all(E)).forEach(he=>A.add(he)),p=A}catch(q){throw console.error("加载NC文件对应的STL文件失败:",q),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const P=new mu,z=new Un;try{const q=await Nn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),he=new Blob([q.data],{type:"application/octet-stream;charset=UTF-8"}),Se=await Nn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ke=new Blob([Se.data],{type:"application/octet-stream;charset=UTF-8"}),Ve=await new Promise((yt,ht)=>{const nt=URL.createObjectURL(he);P.load(nt,Le=>{const Qe=new Float32Array(Le.geometry.attributes.position.count*3);for(let Ce=0;Ce<Le.geometry.attributes.position.count;Ce++)Qe[Ce*3]=1,Qe[Ce*3+1]=0,Qe[Ce*3+2]=0;Le.geometry.setAttribute("color",new _n(Qe,3)),Le.material.vertexColors=!0,Le.scale.set(.3,.3,.3),URL.revokeObjectURL(nt),yt(Le)},void 0,ht)}),B=await new Promise((yt,ht)=>{const nt=URL.createObjectURL(Ke);P.load(nt,Le=>{const Qe=new Float32Array(Le.geometry.attributes.position.count*3);for(let Ce=0;Ce<Le.geometry.attributes.position.count;Ce++)Qe[Ce*3]=0,Qe[Ce*3+1]=1,Qe[Ce*3+2]=0;Le.geometry.setAttribute("color",new _n(Qe,3)),Le.material.vertexColors=!0,Le.scale.set(.3,.3,.3),URL.revokeObjectURL(nt),yt(Le)},void 0,ht)});z.add(Ve),z.add(B),p=z}catch(q){throw console.error("PCD文件加载失败:",q),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new _c,re="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,K=new Map,pe=new Map,Me=async q=>{if(le.has(q))return console.log(`从缓存加载: ${q}`),le.get(q);try{const he=await Nn.axios.get(`${re}/${q}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Se=new Blob([he.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set(q,Se),Se}catch(he){throw console.error(`加载文件失败: ${q}`,he),new Error(`无法加载文件: ${q}`)}},ye=(q="default")=>{if(K.has(q))return K.get(q);const he=new mn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:ti});return K.set(q,he),he},de=q=>{try{q.isBufferGeometry&&q.mergeVertices&&q.mergeVertices(),q.computeVertexNormals&&q.computeVertexNormals(),q.computeBoundingSphere&&q.computeBoundingSphere(),q.deleteAttribute&&q.deleteAttribute("uv2")}catch(he){console.warn("几何体优化失败,使用原始几何体:",he)}return q},se=async(q,he,Se)=>{const Ke=`stl_${he}`;if(pe.has(Ke)){const ht=pe.get(Ke);return new zt(ht,ye())}const Ve=await q.arrayBuffer();let yt=new qi(Se).parse(Ve);return yt=de(yt),pe.set(Ke,yt),new zt(yt,ye())},W=async(q,he,Se)=>{const Ke=`obj_${he}`;if(le.has(Ke))return le.get(Ke).clone();const Ve=await q.text(),B=new cs(Se),yt=he.replace(".obj",".mtl");try{const Le=await(await Me(yt)).text(),Ce=new hs(Se).parse(Le);Ce.preload(),B.setMaterials(Ce)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${yt}`)}const ht=B.parse(Ve);return ht.traverse(nt=>{nt.isMesh&&(nt.geometry=de(nt.geometry),nt.castShadow=!0,nt.receiveShadow=!0,nt.renderOrder=1)}),le.set(Ke,ht),ht},j=(q,he)=>{const Se=new k0;if(Se.addLevel(q,0),q.geometry){const Ke=q.geometry.clone(),Ve=new zt(Ke,q.material);Se.addLevel(Ve,50)}return Se};let ne=0,ee=0;const ce=[];Q.loadMeshCb=async(q,he,Se,Ke,Ve)=>{const B=q.split("/").pop(),yt=Se||(()=>{});ne++;const ht=new Promise(async(nt,Le)=>{try{const Qe=await Me(B);if(!Qe||Qe.size===0)throw new Error(`文件为空: ${B}`);const Ce=B.split(".").pop().toLowerCase();let st;switch(Ce){case"stl":st=await se(Qe,B,he);break;case"obj":st=await W(Qe,B,he);break;default:throw new Error(`不支持的文件格式: ${Ce}`)}G.enableLOD&&st.isMesh&&(st=j(st,B)),yt(st),ee++,Ke&&Ke({loaded:ee,total:ne,progress:ee/ne}),nt(st)}catch(Qe){console.error(`mesh文件加载失败: ${B}`,Qe);const Ce=new Un;yt(Ce),nt(Ce);const st=new Yi(.1,.1,.1),tn=new q0({color:16711680,wireframe:!0});return new zt(st,tn)}});ce.push(ht)};try{if(!H){pa.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ne}个mesh文件加载...`),ce.length>0)try{await Promise.allSettled(ce),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ne}`)}catch(Se){console.warn("部分mesh文件加载失败,但继续显示模型",Se)}p.traverse(Se=>{Se.isMesh&&(Se.castShadow=!0,Se.receiveShadow=!0,Se.renderOrder=1,Se.material&&(Se.material.needsUpdate=!0))}),console.time("计算包围盒");const q=new In;q.expandByObject(p);const he=`urdf_${Date.now()}`;p.userData.boundingBox=q.clone(),p.userData.modelId=he,g0.set(he,{box:q.clone(),center:q.getCenter(new I),size:q.getSize(new I),maxSize:Math.max(...q.getSize(new I).toArray())}),pa.value=p,console.log("URDF模型加载完成并优化")}catch(q){console.error("URDF加载失败:",q),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:g0}}const z4={class:"panel-content"},B4={__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=Ge.cloneDeep(e==null?void 0:e.animationData))==null?void 0:i.动画输出Content)??[];n&&(t.value=n)},{deep:!0,immediate:!0}),(n,i)=>{var r,a,o;return y.openBlock(),y.createElementBlock("div",z4,[(y.openBlock(),y.createBlock(Au,{itemData:(r=t.value)==null?void 0:r.compData,key:(a=t.value)==null?void 0:a.id,index:(o=t.value)==null?void 0:o.id,showHeader:!1},null,8,["itemData","index"]))])}}},O4=Fi._export_sfc(B4,[["__scopeId","data-v-9363d85a"]]),k4={class:"panel-content"},V4={key:0,class:"joints-list"},H4={class:"joint-info-row"},G4={class:"joint-left"},W4={class:"joint-name"},X4={class:"joint-range"},j4={class:"joint-type"},q4={key:0,class:"joint-control-row"},$4={class:"slider-container"},Y4=["min","max","value","onInput","disabled"],J4={class:"value-display"},K4={class:"joint-value"},Z4={class:"unit"},Q4={key:1,class:"empty-state"},hr=.001,e6=1e3,ko=60,t6={__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),a=y.ref(12.5),o=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),_=Ai.degToRad,p=y.ref(1),f=()=>e6/ko/p.value;let v=[];y.watch(()=>t.animationData,se=>{var j;l.value=se.extra.管长,a.value=se.extra.外径/2;let W=((j=Ge.cloneDeep(se))==null?void 0:j.动画输出)??[];W&&W.length>0&&(v=W)},{deep:!0}),y.computed(()=>v.length>0);const x=(se,W=!1)=>se==="revolute"?W?Math.PI:-Math.PI:se==="prismatic"?W?1:-1:0,b=()=>{if(!i.value)return Nn.ElMessage.error("未加载 URDF"),!1;let se=null;return i.value.traverse(W=>{se||W.name==="Pipe_Link"&&W.traverse(j=>{j instanceof zt&&!se&&(se=j)})}),se?(se.position.y-=c.value*hr,o.value=se,se.material=new mn({color:11184810,shininess:80,side:gn}),!0):(Nn.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},F=se=>{if(!se||!se.joints)return console.warn("URDF模型没有关节信息"),[];let W=null;if(se.traverse(ne=>{ne.name==="Pipe_Link"&&!W&&(W=ne)}),W)o.value=W;else return console.warn("未找到管子模型"),[];const j=[];return Object.keys(se.joints).forEach(ne=>{const ee=se.joints[ne];if(ee._jointType==="fixed")return;const ce=ee.limit?{lower:ee.limit.lower??x(ee._jointType,!1),upper:ee.limit.upper??x(ee._jointType,!0)}:{lower:x(ee._jointType,!1),upper:x(ee._jointType,!0)};j.push({name:ne,type:ee._jointType||"unknown",limit:ce,currentValue:ee.angle||0,urdfJoint:ee})}),j.sort((ne,ee)=>ne.name.localeCompare(ee.name))},C=(se,W)=>{const j=n.value.find(ee=>ee.name===se);if(!j)return;const ne=parseFloat(W);if(j.limit){const ee=Math.max(j.limit.lower,Math.min(j.limit.upper,ne));j.currentValue=ee}else j.currentValue=ne;t.model&&t.model.setJointValue?t.model.setJointValue(se,j.currentValue):j.urdfJoint&&j.urdfJoint.setJointValue(j.currentValue)},R=se=>se.reduce((W,j)=>{let ne=0;const ee=j.Y??0,ce=j.C??0,q=j.R??0;return ee>0&&(ne+=ee),ce>0&&q>0&&(ne+=q*_(ce)),W+ne},0),L=se=>{const W=[],j=se.Y??0,ne=se.B??0,ee=se.C??0,ce=se.R??0,q={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(!j&&!ee)return W;if(W.push(q.pos.clone()),ne!==0){const he=new Et().makeRotationAxis(q.localY,_(ne));q.localX.applyMatrix4(he),q.localZ.applyMatrix4(he)}if(j>0&&(q.pos.add(q.localY.clone().multiplyScalar(j*hr)),W.push(q.pos.clone())),ee>0&&ce>0){const he=_(ee),Se=ce*hr,Ke=q.pos.clone().add(q.localX.clone().multiplyScalar(-Se)),Ve=Math.max(16,Math.ceil(ee/5));for(let B=1;B<=Ve;B++){const yt=he*B/Ve,ht=new Et().makeRotationAxis(q.localZ,yt),Le=q.localX.clone().multiplyScalar(Se).applyMatrix4(ht),Qe=Ke.clone().add(Le);W.push(Qe)}}return W},A=(se,W=0)=>{let j=v.slice(0,se+1);const ne=v[se+1];if(ne&&W>0){const Ve={...ne,B:(ne.B??0)*W,C:(ne.C??0)*W};j.push(Ve)}const ee=R(j),ce=Math.max(0,l.value-ee),q=[];q.push(new I(0,0,0));const he=new I(0,ce*hr,0);ce>0&&q.push(he);let Se={pos:he.clone(),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};const Ke=[];for(let Ve=j.length-1;Ve>=0;Ve--){const B=j[Ve],yt=L(B);if(yt.length>0){const ht=yt.map(Ce=>{const st=Ce.clone(),tn=new Et;return tn.makeBasis(Se.localX,Se.localY,Se.localZ),st.applyMatrix4(tn),st.add(Se.pos)});Ke.push(ht);const nt=ht[ht.length-1];Se.pos=nt.clone();const Le=B.B??0,Qe=B.C??0;if(Le!==0){const Ce=new Et().makeRotationAxis(Se.localY,_(Le));Se.localX.applyMatrix4(Ce),Se.localZ.applyMatrix4(Ce)}if(Qe>0){const Ce=_(Qe),st=new Et().makeRotationAxis(Se.localZ,Ce);Se.localY.applyMatrix4(st),Se.localX.applyMatrix4(st)}}}for(const Ve of Ke)Ve.length>1&&q.push(...Ve.slice(1));q.length<2&&q.push(new I(0,.001,0));try{const Ve=new ac(q,!1,"catmullrom",.01),B=new ka(Ve,Math.max(2,q.length*4),a.value*hr,18,!1);o.value.geometry.dispose(),o.value.geometry=B}catch(Ve){console.error("管件更新失败",Ve)}},E=(se,W,j=1)=>{se&&(Object.keys(se).forEach(ne=>{const ee=se[ne],ce=n.value.find(q=>q.name===ne);ce&&(ce.currentValue=ee,t.model&&t.model.setJointValue?t.model.setJointValue(ne,ee):ce.urdfJoint&&ce.urdfJoint.setJointValue(ee))}),A(W,j))},P=(se,W,j)=>se+(W-se)*j,z=(se,W,j)=>{if(!se||!W)return se||W;const ne={};return Object.keys(se).forEach(ee=>{const ce=se[ee],q=W[ee];ne[ee]=P(ce,q||ce,j)}),ne},H=()=>{if(v.length===0){console.warn("没有动画数据");return}b(),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 W=h.value/ko,j=v[se],ne=v[se+1];if(ne){const ee=z(j,ne,W);E(ee,se,W)}else E(j,se);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Q,f())},re=()=>{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:re,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 Me=()=>{!t.model||d.value&&!m.value||n.value.forEach(se=>{se.urdfJoint&&se.urdfJoint.angle!==void 0&&(se.currentValue=se.urdfJoint.angle)})},ye=()=>{const se=()=>{Me(),r.value=requestAnimationFrame(se)};se()},de=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return y.onMounted(()=>{ye()}),y.onUnmounted(()=>{de(),G()}),(se,W)=>(y.openBlock(),y.createElementBlock("div",k4,[n.value.length>0?(y.openBlock(),y.createElementBlock("div",V4,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n.value,j=>{var ne,ee,ce,q;return y.openBlock(),y.createElementBlock("div",{key:j.name,class:"joint-item"},[y.createElementVNode("div",H4,[y.createElementVNode("div",G4,[y.createElementVNode("span",W4,y.toDisplayString(j.name),1),y.createElementVNode("span",X4," ["+y.toDisplayString(((ne=j.limit)==null?void 0:ne.lower.toFixed(2))??(j.type==="revolute"?"-3.14":"-1.00"))+", "+y.toDisplayString(((ee=j.limit)==null?void 0:ee.upper.toFixed(2))??(j.type==="revolute"?"3.14":"1.00"))+"] ",1)]),y.createElementVNode("span",j4,y.toDisplayString(j.type),1)]),j.type==="revolute"||j.type==="prismatic"?(y.openBlock(),y.createElementBlock("div",q4,[y.createElementVNode("div",$4,[y.createElementVNode("input",{type:"range",min:((ce=j.limit)==null?void 0:ce.lower)??(j.type==="revolute"?-Math.PI:-1),max:((q=j.limit)==null?void 0:q.upper)??(j.type==="revolute"?Math.PI:1),step:.01,value:j.currentValue,onInput:he=>C(j.name,he.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,Y4)]),y.createElementVNode("div",J4,[y.createElementVNode("span",K4,y.toDisplayString(j.currentValue?Number(j.currentValue).toFixed(3):"0.000"),1),y.createElementVNode("span",Z4,y.toDisplayString(j.type==="revolute"?"rad":"m"),1)])])):y.createCommentVNode("",!0)])}),128))])):(y.openBlock(),y.createElementBlock("div",Q4,W[0]||(W[0]=[y.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},n6=Fi._export_sfc(t6,[["__scopeId","data-v-b83e7f77"]]),i6={class:"panel-content"},s6="id",r6={__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"},a=h=>{n("nodeClick",h)},o=(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:o(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:o(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",i6,[y.createVNode(_,{data:i.value,props:r,"default-expanded-keys":m.value,"node-key":s6,onNodeClick:a},null,8,["data","default-expanded-keys"])])}}},a6=Fi._export_sfc(r6,[["__scopeId","data-v-0dda287c"]]),o6=["xlink:href"],l6=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 a=`${r}`;return a=`${a.replace("px","")}px`,{width:a,height:a}});return(r,a)=>(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,o6)],6))],6))}}),dn=Fi._export_sfc(l6,[["__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,a,o,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,a=s.document,o=!1,d(),a.onreadystatechange=function(){a.readyState=="complete"&&(a.onreadystatechange=null,c())})}function c(){o||(o=!0,r())}function d(){try{a.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const c6={class:"obj-viewer-container"},h6={class:"buttonGroup-top"},u6={class:"buttonGroup-topLeft"},d6={class:"buttonGroup-left"},f6={class:"buttonGroup-right"},p6={class:"buttonGroup-bottom"},m6={class:"left-panel"},g6={class:"panel-header"},_6={key:1,class:"clipping-content"},v6={class:"radio-group"},y6={class:"radio-label"},x6={class:"radio-label"},M6={class:"radio-label"},b6={class:"radio-label"},S6={class:"right-panel"},E6={class:"panel-header"},A6={key:0,class:"loading-overlay"},w6={__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 a=y.ref(null),o=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:x,getThreeJSObjects:b,clearAllModels:F,cleanup:C}=x4(a),{loadUrdfFromUrl:R}=U4(b,_,o,l),{isAnimating:L,toggleAnimation:A,stopAnimation:E}=M4(b,_),{isClipping:P,activeClippingAxis:z,toggleClipping:H,updateClippingPlanes:Q}=b4(b,_),{urdfModel:re}=I4(b,_,o,l,F),G=()=>{if(c.value||_.value.length===0)return;c.value=!0,L.value&&E();const{camera:ye,controls:de}=b();if(!ye||!de)return;de.enabled=!0;const se=q=>q<.5?4*q*q*q:1-Math.pow(-2*q+2,3)/2,W=ye.position.clone(),j=de.target.clone(),ne=1500,ee=Date.now(),ce=()=>{const q=Date.now()-ee,he=Math.min(q/ne,1),Se=se(he);ye.position.lerpVectors(W,p.value,Se),de.target.lerpVectors(j,f.value,Se),he<1?requestAnimationFrame(ce):c.value=!1};ce()},le=async()=>r?Promise.resolve():new Promise(ye=>{const de=()=>{r?ye():requestAnimationFrame(de)};de()}),K=ye=>{d.value=!0,m.value=ye,ye==="剖面视图"&&!P.value&&H()},pe=ye=>{u.value=!0,h.value=ye,ye==="动画仿真"&&t("getAnimationData")},Me=()=>{y.nextTick(()=>{var ye;(ye=g.value)==null||ye.startAnimation()})};return y.watch(()=>n.urdfUrl,async(ye,de)=>{if(ye)try{if(await le(),await R(ye)){const{camera:W}=b();W&&(W.position.set(3,3,4),W.near=.01,W.far=1e4,W.updateProjectionMatrix())}}catch(se){console.error("加载urdf模型失败",se),Nn.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),y.onMounted(async()=>{await y.nextTick();try{v(),i=b().scene,r=!0,window.addEventListener("resize",x)}catch(ye){console.error("Three.js初始化失败:",ye)}}),y.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",x),L.value&&E(),C()}),(ye,de)=>{var W,j,ne,ee;const se=y.resolveComponent("el-scrollbar");return y.openBlock(),y.createElementBlock("div",c6,[y.createElementVNode("div",{ref_key:"threejsContainer",ref:a,class:"threejs-container"},null,512),y.createElementVNode("div",h6,[y.createVNode(dn,{name:"guanjianjiexi",size:"34"}),y.createVNode(dn,{name:"guanjiekongzhi",size:"34"}),y.createVNode(dn,{name:"gongyishengcheng",size:"34"}),y.createVNode(dn,{name:"buchangshezhi",size:"34"}),y.createVNode(dn,{name:"shuchujiagongchengxu",size:"34"})]),y.createElementVNode("div",u6,[y.createVNode(dn,{name:"viewReset",size:"24",onClick:G,title:"重置"}),y.createVNode(dn,{name:"fangda",size:"24",title:"放大"}),y.createVNode(dn,{name:"suoxiao",size:"24",title:"缩小"}),y.createVNode(dn,{name:"lookAround",size:"24",onClick:y.unref(A),title:y.unref(L)?"停止动画":"动画视图"},null,8,["onClick","title"])]),y.createElementVNode("div",d6,[y.createVNode(dn,{name:"jiegoushu",size:"24",onClick:de[0]||(de[0]=ce=>K("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),y.createVNode(dn,{name:"clipping",size:"24",onClick:de[1]||(de[1]=ce=>K("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),y.createVNode(dn,{name:"donghuafangzhen",size:"24",onClick:de[2]||(de[2]=ce=>K("场景树3"))}),y.createVNode(dn,{name:"donghuafangzhen",size:"24",onClick:de[3]||(de[3]=ce=>K("场景4"))})]),y.createElementVNode("div",f6,[y.createVNode(dn,{name:"donghuafangzhen",size:"24"}),y.createVNode(dn,{name:"donghuafangzhen",size:"24"}),y.createVNode(dn,{name:"guanjiekongzhi",size:"24",onClick:de[4]||(de[4]=ce=>pe("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),y.createVNode(dn,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:de[5]||(de[5]=ce=>pe("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),y.createVNode(dn,{name:"donghuafangzhen",size:"24"}),y.createVNode(dn,{name:"donghuafangzhen",size:"24"})]),y.createElementVNode("div",p6,[y.createVNode(dn,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(W=g.value)==null?void 0:W.fastBackward},null,8,["onClick"]),y.createVNode(dn,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Me}),y.createVNode(dn,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(j=g.value)==null?void 0:j.fastForward},null,8,["onClick"]),y.createVNode(dn,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(ne=g.value)==null?void 0:ne.pauseAnimation},null,8,["onClick"]),y.createVNode(dn,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(ee=g.value)==null?void 0:ee.resetAll},null,8,["onClick"])]),y.withDirectives(y.createElementVNode("div",m6,[y.createElementVNode("div",g6,[y.createElementVNode("span",null,y.toDisplayString(m.value),1),y.createElementVNode("span",{class:"close",onClick:de[6]||(de[6]=ce=>d.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[m.value==="场景树"?(y.openBlock(),y.createBlock(a6,{key:0,model:y.unref(re)},null,8,["model"])):y.createCommentVNode("",!0),m.value==="剖面视图"?(y.openBlock(),y.createElementBlock("div",_6,[y.createElementVNode("div",v6,[y.createElementVNode("label",y6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":de[7]||(de[7]=ce=>y.isRef(z)?z.value=ce:null),onChange:de[8]||(de[8]=(...ce)=>y.unref(Q)&&y.unref(Q)(...ce))},null,544),[[y.vModelRadio,y.unref(z)]]),de[16]||(de[16]=y.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),y.createElementVNode("label",x6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":de[9]||(de[9]=ce=>y.isRef(z)?z.value=ce:null),onChange:de[10]||(de[10]=(...ce)=>y.unref(Q)&&y.unref(Q)(...ce))},null,544),[[y.vModelRadio,y.unref(z)]]),de[17]||(de[17]=y.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),y.createElementVNode("label",M6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":de[11]||(de[11]=ce=>y.isRef(z)?z.value=ce:null),onChange:de[12]||(de[12]=(...ce)=>y.unref(Q)&&y.unref(Q)(...ce))},null,544),[[y.vModelRadio,y.unref(z)]]),de[18]||(de[18]=y.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),y.createElementVNode("label",b6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":de[13]||(de[13]=ce=>y.isRef(z)?z.value=ce:null),onChange:de[14]||(de[14]=(...ce)=>y.unref(Q)&&y.unref(Q)(...ce))},null,544),[[y.vModelRadio,y.unref(z)]]),de[19]||(de[19]=y.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):y.createCommentVNode("",!0)]),_:1})],512),[[y.vShow,d.value]]),y.withDirectives(y.createElementVNode("div",S6,[y.createElementVNode("div",E6,[y.createElementVNode("span",null,y.toDisplayString(h.value),1),y.createElementVNode("span",{class:"close",onClick:de[15]||(de[15]=ce=>u.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[y.withDirectives(y.createVNode(n6,{ref_key:"jointRef",ref:g,model:y.unref(re),scene:y.unref(i),animationData:s.animationData},null,8,["model","scene","animationData"]),[[y.vShow,h.value==="关节控制"]]),y.withDirectives(y.createVNode(O4,{animationData:s.animationData},null,8,["animationData"]),[[y.vShow,h.value==="动画仿真"]])]),_:1})],512),[[y.vShow,u.value]]),o.value?(y.openBlock(),y.createElementBlock("div",A6,[de[20]||(de[20]=y.createElementVNode("div",{class:"loading-spinner"},null,-1)),y.createElementVNode("p",null,y.toDisplayString(l.value),1)])):y.createCommentVNode("",!0)])}}},gu=Fi._export_sfc(w6,[["__scopeId","data-v-e3790e10"]]),T6={class:"extra-button-content"},C6={class:"table-operator-wrap"},R6={class:"extra-button-filter"},D6={title:"条件查询"},P6={class:"form-content-value"},L6={key:0,class:"extra-header"},F6={__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),a=y.ref([]),o=y.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),l=u=>{var g;const h=(g=a.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;a.value=(g=(h=pn.getColumnChild(Ge.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=Ge.cloneDeep(u==null?void 0:u.content);for(const _ in g)g[_]="";a.value=(h=a.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",T6,[y.createElementVNode("div",{class:y.normalizeClass(s.compName?"table-name-wrap":"")},y.toDisplayString(s.compName),3),y.createElementVNode("div",C6,[y.createElementVNode("div",R6,[y.createVNode(Ru,{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(Nn.search_default),clearable:"",onInput:l},{append:y.withCtx(()=>[y.createElementVNode("span",D6,[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",P6,[(y.openBlock(),y.createBlock(Kn.ssForm,{rowContents:a.value,buttonValue:o.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:o.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,x)=>(y.openBlock(),y.createElementBlock("div",{class:"extra-contents",key:x},[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:b=>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)])])}}},U6=Fi._export_sfc(F6,[["__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 a=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",null,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(s.buttons,o=>{var l;return y.openBlock(),y.createBlock(a,{key:o==null?void 0:o.label,class:y.normalizeClass((l=o==null?void 0:o.label)!=null&&l.includes("删除")?"warning-type":"default-type"),onClick:c=>n(o==null?void 0:o.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(o==null?void 0:o.label),1)]),_:2},1032,["class","onClick"])}),128))])}}}),I6=Fi._export_sfc(N6,[["__scopeId","data-v-73ec704e"]]),z6=Vl.useModelComp(Ge.pinia),{systemPath:_0}=Ge.storeToRefs(z6),ma=y.ref(),v0=new Map;function B6(s,e,t,n,i){const r=async u=>{try{const h=await Kn.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},a=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,x=new hs().parse(f);x.preload(),h(x)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),o=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 mn({color:8947848,side:gn}))},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 a(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 x=null;h&&h.length>0&&(h.length===1?x=await a(h[0]):x=await o(h));const b=new cs;x&&b.setMaterials(x);const F=b.parse(v);x||F.traverse(C=>{C.isMesh&&(C.material=new mn({color:8947848,side:gn}))}),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),x=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,b=new File([v],x,{type:v.type});let F=[];if(f.mtlUrls){const R=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let L=0;L<R.length;L++){const A=R[L],E=await r(A),P=(A==null?void 0:A.split("/").pop())||`material_${p}_${L}.mtl`,z=new File([E],P,{type:E.type});F.push(z)}}const C=await l(b,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 q=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Se=[...v.matchAll(q)].map(B=>({x:parseFloat(B[1]),y:parseFloat(B[2]),z:parseFloat(B[3])})),Ke=new hn,Ve=Se.flatMap(B=>[B.x,B.y,B.z]);if(Ke.setAttribute("position",new Nt(Ve,3)),f===".txt"){const B=new Wi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ke,B)}else if(f===".cpt"){const B=new Di({color:"#5B5C99",linewidth:100});p=new Ba(Ke,B)}}else if(f===".obj"){const q=new cs;if(g&&g.length>0){const he=new hs;for(const Se of g){const Ke=await Se.text(),Ve=he.parse(Ke);Ve.preload(),q.setMaterials(Ve);break}}p=q.parse(v),(!g||g.length===0)&&p.traverse(he=>{he.isMesh&&(he.material=new mn({color:"#B3B3D4"})),he instanceof zt&&(he.material.side=gn)})}break;case".stl":const x=await h.arrayBuffer(),F=new qi().parse(x),C=new mn({color:"#B3B3D4",side:gn});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"],L={"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 Un,E=R.map(q=>new Promise((he,Se)=>{new qi().load(_0.value===""?`/model/${q}`:`${_0.value}\\${q}`,Ve=>{const B=new mn({color:L[q]||"#B3B3D4",side:gn}),yt=new zt(Ve,B);he(yt)},void 0,Se)}));try{(await Promise.all(E)).forEach(he=>A.add(he)),p=A}catch(q){throw console.error("加载NC文件对应的STL文件失败:",q),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const P=new mu,z=new Un;try{const q=await Nn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),he=new Blob([q.data],{type:"application/octet-stream;charset=UTF-8"}),Se=await Nn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ke=new Blob([Se.data],{type:"application/octet-stream;charset=UTF-8"}),Ve=await new Promise((yt,ht)=>{const nt=URL.createObjectURL(he);P.load(nt,Le=>{const Qe=new Float32Array(Le.geometry.attributes.position.count*3);for(let Ce=0;Ce<Le.geometry.attributes.position.count;Ce++)Qe[Ce*3]=1,Qe[Ce*3+1]=0,Qe[Ce*3+2]=0;Le.geometry.setAttribute("color",new _n(Qe,3)),Le.material.vertexColors=!0,Le.scale.set(.3,.3,.3),URL.revokeObjectURL(nt),yt(Le)},void 0,ht)}),B=await new Promise((yt,ht)=>{const nt=URL.createObjectURL(Ke);P.load(nt,Le=>{const Qe=new Float32Array(Le.geometry.attributes.position.count*3);for(let Ce=0;Ce<Le.geometry.attributes.position.count;Ce++)Qe[Ce*3]=0,Qe[Ce*3+1]=1,Qe[Ce*3+2]=0;Le.geometry.setAttribute("color",new _n(Qe,3)),Le.material.vertexColors=!0,Le.scale.set(.3,.3,.3),URL.revokeObjectURL(nt),yt(Le)},void 0,ht)});z.add(Ve),z.add(B),p=z}catch(q){throw console.error("PCD文件加载失败:",q),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new _c,re="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,K=new Map,pe=new Map,Me=async q=>{if(le.has(q))return console.log(`从缓存加载: ${q}`),le.get(q);try{const he=await Nn.axios.get(`${re}/${q}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Se=new Blob([he.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set(q,Se),Se}catch(he){throw console.error(`加载文件失败: ${q}`,he),new Error(`无法加载文件: ${q}`)}},ye=(q="default")=>{if(K.has(q))return K.get(q);const he=new mn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:ti});return K.set(q,he),he},de=q=>{try{q.isBufferGeometry&&q.mergeVertices&&q.mergeVertices(),q.computeVertexNormals&&q.computeVertexNormals(),q.computeBoundingSphere&&q.computeBoundingSphere(),q.deleteAttribute&&q.deleteAttribute("uv2")}catch(he){console.warn("几何体优化失败,使用原始几何体:",he)}return q},se=async(q,he,Se)=>{const Ke=`stl_${he}`;if(pe.has(Ke)){const ht=pe.get(Ke);return new zt(ht,ye())}const Ve=await q.arrayBuffer();let yt=new qi(Se).parse(Ve);return yt=de(yt),pe.set(Ke,yt),new zt(yt,ye())},W=async(q,he,Se)=>{const Ke=`obj_${he}`;if(le.has(Ke))return le.get(Ke).clone();const Ve=await q.text(),B=new cs(Se),yt=he.replace(".obj",".mtl");try{const Le=await(await Me(yt)).text(),Ce=new hs(Se).parse(Le);Ce.preload(),B.setMaterials(Ce)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${yt}`)}const ht=B.parse(Ve);return ht.traverse(nt=>{nt.isMesh&&(nt.geometry=de(nt.geometry),nt.castShadow=!0,nt.receiveShadow=!0,nt.renderOrder=1)}),le.set(Ke,ht),ht},j=(q,he)=>{const Se=new k0;if(Se.addLevel(q,0),q.geometry){const Ke=q.geometry.clone(),Ve=new zt(Ke,q.material);Se.addLevel(Ve,50)}return Se};let ne=0,ee=0;const ce=[];Q.loadMeshCb=async(q,he,Se,Ke,Ve)=>{const B=q.split("/").pop(),yt=Se||(()=>{});ne++;const ht=new Promise(async(nt,Le)=>{try{const Qe=await Me(B);if(!Qe||Qe.size===0)throw new Error(`文件为空: ${B}`);const Ce=B.split(".").pop().toLowerCase();let st;switch(Ce){case"stl":st=await se(Qe,B,he);break;case"obj":st=await W(Qe,B,he);break;default:throw new Error(`不支持的文件格式: ${Ce}`)}G.enableLOD&&st.isMesh&&(st=j(st,B)),yt(st),ee++,Ke&&Ke({loaded:ee,total:ne,progress:ee/ne}),nt(st)}catch(Qe){console.error(`mesh文件加载失败: ${B}`,Qe);const Ce=new Un;yt(Ce),nt(Ce);const st=new Yi(.1,.1,.1),tn=new q0({color:16711680,wireframe:!0});return new zt(st,tn)}});ce.push(ht)};try{if(!H){ma.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ne}个mesh文件加载...`),ce.length>0)try{await Promise.allSettled(ce),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ne}`)}catch(Se){console.warn("部分mesh文件加载失败,但继续显示模型",Se)}p.traverse(Se=>{Se.isMesh&&(Se.castShadow=!0,Se.receiveShadow=!0,Se.renderOrder=1,Se.material&&(Se.material.needsUpdate=!0))}),console.time("计算包围盒");const q=new In;q.expandByObject(p);const he=`urdf_${Date.now()}`;p.userData.boundingBox=q.clone(),p.userData.modelId=he,v0.set(he,{box:q.clone(),center:q.getCenter(new I),size:q.getSize(new I),maxSize:Math.max(...q.getSize(new I).toArray())}),ma.value=p,console.log("URDF模型加载完成并优化")}catch(q){console.error("URDF加载失败:",q),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:v0}}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,a,o,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,a=s.document,o=!1,d(),a.onreadystatechange=function(){a.readyState=="complete"&&(a.onreadystatechange=null,c())})}function c(){o||(o=!0,r())}function d(){try{a.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const _u=Ge.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(s){this.selectArray=s},setSelectString(s){this.selectString=s}}}),O6={class:"calculator-content"},k6={class:"calculator-child"},V6={class:"calculator-child"},H6=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",O6,[y.createElementVNode("div",k6,[y.createVNode(Kn.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),y.createElementVNode("div",V6,[y.createVNode(Kn.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),G6=Fi._export_sfc(H6,[["__scopeId","data-v-73db0fe7"]]),vu=Ge.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(s){this.selectIndex=s},setSelectMenu(s){this.selectMenu=s},setSelectTitle(s){this.selectTitle=s}}}),yu=(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 a={};return i=i==null?void 0:i.forEach((o,l)=>{var c;(c=n==null?void 0:n[l])!=null&&c.prop?a[n[l].prop]=o:Array.isArray(o)&&(a.children=yu(o,n))}),Object.assign(a,{id:r})}else return i})),t},xu=(s,e,t)=>{let n=s,i=e;return n=n==null?void 0:n.map((r,a)=>{var o,l;return!Array.isArray(r)||!((o=i==null?void 0:i[a])!=null&&o.label)&&!t||(r.unshift(((l=i==null?void 0:i[a])==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=xu(c,(d=i==null?void 0:i[a])==null?void 0:d.children,t)),c}))),r}),n},W6=(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 X6(s,n,t)}},X6=(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=Mu(r,i,t)),r)),n},Mu=(s,e,t)=>{var r,a;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=(r=n.children)==null?void 0:r.filter(o=>o.id!==t):n.children=(a=n.children)==null?void 0:a.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Mu(o,i,t)),o)),n},j6=(s,e,t)=>{if(e==="")return t;{const n=e.split("-");return q6(s,n,t)}},q6=(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=bu(r,i,t)),r)),n},bu=(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(a=>(a.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),a=bu(a,i,t)),a)),n},Su=Ge.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Eu=Ge.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(s){this.objUrl=s},setBlobUrls(s){this.blobUrls=s}}}),kl=async s=>{var r,a,o,l,c,d,m;let e=(a=(r=Ge.cloneDeep(s))==null?void 0:r.optionUrl)==null?void 0:a.menuSelect,t=[];e==null||e.forEach(u=>{});let n="";const i=await pn.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,p;(u==null?void 0:u.name)===(((p=(_=(g=(h=Ge.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=(o=i==null?void 0:i[0])==null?void 0:o.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(pn.getValueToObjectValue(_,h))})}return t},$6={class:"table-content"},Y6={class:"menu-config-wrap"},J6=["onClick"],K6={key:0,class:"viewport-wrap"},Z6=["onClick"],Q6={title:"选择显示列信息"},e5={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","max-height":"300px",width:"300px",overflow:"auto"}},t5={class:"form-content"},n5={key:0,class:"dialog-footer"},i5={class:"dialog-footer"},s5={__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=Eu(Ge.pinia),i=y.ref(null),r=s,a=e,o=y.ref([]),l=y.ref([]),c=y.ref(!1),d=y.ref([]),m=y.ref(!1),u=y.ref(),h=Ge.useMenuState(),{activeMenuPath:g}=Ge.storeToRefs(h),_=Su(Ge.pinia),p=Vl.useModelComp(Ge.pinia),{extraContents:f}=Ge.storeToRefs(p),v=y.ref([]);y.ref(!1);const x=y.ref("");y.ref();const b=y.ref(!0),F=y.ref(0),C=y.ref(!1),R=y.ref(""),L=y.ref(!1),A=y.ref({label:"查看三维模型"}),E=y.ref(!1),P=y.ref(),z=y.ref([]),H=y.ref([]),Q=y.ref(!1),re=y.ref(),G=y.ref([]),le=y.ref([]),K=y.ref([]),pe=y.ref(),Me=y.ref(),ye=_u(Ge.pinia),de=y.ref(),se=vu(Ge.pinia),{selectIndex:W,selectMenu:j,selectTitle:ne}=Ge.storeToRefs(se),{selectString:ee}=Ge.storeToRefs(ye),ce=Tu.useLoginState(Ge.pinia),{loginUserInfo:q}=Ge.storeToRefs(ce),he=y.ref(720),Se=y.ref(!1),Ke=y.ref([]),Ve=y.ref(),B=y.ref(!0),yt=Z=>{Ke.value=Z},ht=(Z,$)=>{Ve.value===$?B.value=!1:B.value=!0,Ve.value=$==null?void 0:$.changeProp},nt=y.computed(()=>{var Z;return(Z=o.value)==null?void 0:Z.filter($=>($==null?void 0:$.label)!=="操作")}),Le=()=>{L.value=!1},Qe=Z=>{a("clickTrigger",Z)},Ce=async Z=>{var Re,Ee,ge,Oe,ve,Ae,je,te,He,Mt;const $=Z==null?void 0:Z.row;if((Re=$==null?void 0:$.toString())!=null&&Re.includes(".urdf")){re.value=$,c.value=!0;return}let ue=[];if((Ee=$==null?void 0:$.toString())!=null&&Ee.includes(".stl")||(ge=$==null?void 0:$.toString())!=null&&ge.includes(".STL")||(Oe=$==null?void 0:$.toString())!=null&&Oe.includes(".obj")||(ve=$==null?void 0:$.toString())!=null&&ve.includes(".mtl")){let bt,$t=[],Yt={};if(Array.isArray($)?bt=$:bt=$==null?void 0:$.split(","),bt==null||bt.forEach(ot=>{ot.includes(".mtl")?$t.push(ot):Yt.blob=Yt.blob?Yt.blob+","+ot:ot}),($t==null?void 0:$t.length)>0&&(Yt.mtlBlobs=$t),(je=(Ae=Object.values(Yt))==null?void 0:Ae[0])!=null&&je.includes("http:"))ue.push(Yt);else{const ot=new Blob([Yt.blob],{type:"application/octet-stream;charset=UTF-8"});let _t=URL.createObjectURL(ot),we="";(te=$==null?void 0:$.split("/"))==null||te.forEach((w,O)=>{var J;O===((J=$==null?void 0:$.split("/"))==null?void 0:J.length)-1&&(we=w)}),(He=Yt.blob)!=null&&He.includes(".stl")&&(we=(we==null?void 0:we.replaceAll(">",""))+".urdf"),u.value=[{name:we,blobUrl:_t}],m.value=!0}}else{const bt=await axios.get($,{responseType:"blob",headers:{"Content-Type":"application/json"}}),$t=new Blob([bt.data],{type:"application/octet-stream;charset=UTF-8"});let Yt=URL.createObjectURL($t),ot="";(Mt=$==null?void 0:$.split("/"))==null||Mt.forEach((_t,we)=>{var w;we===((w=$==null?void 0:$.split("/"))==null?void 0:w.length)-1&&(ot=_t)}),u.value=[{name:ot,blobUrl:Yt}],m.value=!0}(ue==null?void 0:ue.length)>0&&n.setBlobUrls(ue)},st=(Z,$)=>{if(Object.values($).length!==0)return Object.values($).find(ue=>{var Re,Ee,ge;return((Re=ue==null?void 0:ue.toString())==null?void 0:Re.includes(".txt"))||((Ee=ue==null?void 0:ue.toString())==null?void 0:Ee.includes(".cpt"))||((ge=ue==null?void 0:ue.toString())==null?void 0:ge.includes(".obj"))})?[...Z,A.value]:Z},tn=Z=>{var Ee;ee.value===""?Z==null||Z[0]:(Z==null?void 0:Z.find(ge=>(ge==null?void 0:ge.selectLabel)==="("+ee.value+")"))??(Z==null||Z.find(ge=>!(ge!=null&&ge.selectLabel)));let $=Z;(Ee=o.value)!=null&&Ee.find(ge=>ge.prop==="index");let ue=pe.value;const Re=[];return $==null||$.forEach((ge,Oe)=>{var Ae;let ve={};if(Array.isArray(ge)){let je=[];ge==null||ge.filter(te=>!(te!=null&&te.id)).forEach((te,He)=>{var Mt,bt,$t,Yt,ot;if((Mt=ue==null?void 0:ue[He])!=null&&Mt.prop&&!Array.isArray(te)){let _t={};_t[ue[He].column]=te,f!=null&&f.value&&((bt=f==null?void 0:f.value)==null?void 0:bt.length)>0&&(($t=f==null?void 0:f.value)!=null&&$t.find(we=>JSON.stringify(we==null?void 0:we[0])===JSON.stringify(_t)))&&(je=(Yt=f==null?void 0:f.value)==null?void 0:Yt.find(we=>JSON.stringify(we==null?void 0:we[0])===JSON.stringify(_t))),je&&je.length>0?ve[ue[He].prop]=je!=null&&je.find(we=>{var w;return((w=Object.keys(we))==null?void 0:w[0])===ue[He].column})?(ot=je==null?void 0:je.find(we=>{var w;return((w=Object.keys(we))==null?void 0:w[0])===ue[He].column}))==null?void 0:ot[ue[He].column]:te:ve[ue[He].prop]=te}})}else ve=ge;Array.isArray(ge)&&ge.some(je=>je==null?void 0:je.id)?Re.push(Object.assign(ve,{id:(Ae=ge==null?void 0:ge.find(je=>je.id))==null?void 0:Ae.id})):ve.id?Re.push(ve):Re.push(Object.assign(ve,{id:Oe}))}),Re},k=async Z=>{var Ee,ge,Oe,ve,Ae;let $={};for(let je in Z)Z[je]!==""&&($["tableData."+je]=Z[je]);const ue=await pn.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:g.value},$),Re=(Oe=(ge=(Ee=Ge.cloneDeep(ue))==null?void 0:Ee.data)==null?void 0:ge.result)==null?void 0:Oe.map(je=>{var He;let te=[];return te.push({id:je.id}),te.push((He=je==null?void 0:je.value)==null?void 0:He.tableData),te});v.value=tn(pn.getTableContents(Re,(Ae=(ve=Ge.cloneDeep(o.value))==null?void 0:ve.map(je=>je.label))==null?void 0:Ae.filter(je=>je!=="操作")))},T=async Z=>{var Re,Ee,ge,Oe,ve,Ae,je,te,He,Mt,bt,$t,Yt,ot;const $=(Re=Ge.cloneDeep(o.value))==null?void 0:Re.filter(_t=>_t==null?void 0:_t.isRoute);if(($==null?void 0:$.length)>0){let _t=(Ee=$==null?void 0:$[0])==null?void 0:Ee.prop,we=Ge.cloneDeep(g).value+"/"+(Z==null?void 0:Z[_t]),w=Ge.cloneDeep(g).value,O=await pn.getItemData(we,sessionStorage.getItem("systemKey"),"");if((O==null?void 0:O.length)>0)await pn.loadingConstruct(we,we+`/updateLoading${(ge=q.value)==null?void 0:ge.account}`),p.setRouteToChildPath(w),h.setActiveMenuPath(we+`/updateLoading${(Oe=q.value)==null?void 0:Oe.account}`);else{let J=(ve=$==null?void 0:$[0])==null?void 0:ve.prop,V=Ge.cloneDeep(g).value+"/"+(Z==null?void 0:Z[J]),X=Ge.cloneDeep(g).value;await pn.getItemData(X+"/",sessionStorage.getItem("systemKey"),""),await pn.loadingConstruct(X+"/",V),await pn.loadingConstruct(V,V+`/updateLoading${(Ae=q.value)==null?void 0:Ae.account}`),p.setRouteToChildPath(X),h.setActiveMenuPath(V+`/updateLoading${(je=q.value)==null?void 0:je.account}`)}}let ue=await pn.getItemData(g.value,sessionStorage.getItem("systemKey"),Z.id);if(ue=ue==null?void 0:ue.filter(_t=>_t.comp!=="methodButton"),ue&&ue.length>0){const _t=!Array.isArray(ne.value)&&((te=ne.value)==null?void 0:te.key)!=="main"?[]:ne.value;_t.push({key:j.value===""?(He=Z==null?void 0:Z.id)==null?void 0:He.toString():j.value+"-"+((Mt=Z==null?void 0:Z.id)==null?void 0:Mt.toString()),value:Z[(bt=Object.keys(Z))==null?void 0:bt.filter(we=>we!=="index"&&we!=="id")[0]]}),se.setSelectMenu(j.value===""?($t=Z==null?void 0:Z.id)==null?void 0:$t.toString():j.value+"-"+((Yt=Z==null?void 0:Z.id)==null?void 0:Yt.toString())),se.setSelectTitle(_t),se.setSelectIndex((ot=Z==null?void 0:Z.id)==null?void 0:ot.toString()),a("pageChange",ue)}},ae=Z=>{var $;($=Ge.cloneDeep(r.itemData))==null||$.map(ue=>((ue==null?void 0:ue.key)==="tableContents"&&(ue.contents=Z),ue))},xe=async(Z,$,ue,Re)=>{var Ee;if((Re==null?void 0:Re.data)==="查看"&&(Z!=null&&Z.every(ge=>(ge==null?void 0:ge.url)&&(ge==null?void 0:ge.name)))){let ge=Ge.cloneDeep(Z);ge=await((Ee=Ge.cloneDeep(ge))==null?void 0:Ee.map(async ve=>{var te,He,Mt,bt;const Ae=await Kn.downloadAvatarApi({url:ve==null?void 0:ve.url});let je=URL.createObjectURL(Ae.data);return{name:(ve==null?void 0:ve.name)+"."+((bt=(te=ve==null?void 0:ve.url)==null?void 0:te.split("."))==null?void 0:bt[((Mt=(He=ve==null?void 0:ve.url)==null?void 0:He.split("."))==null?void 0:Mt.length)-1]),blobUrl:je}}));let Oe=await Promise.all(ge);u.value=Oe,m.value=!0}a("contentClick",Z,$,ue,{id:r==null?void 0:r.index,type:"table"})},Te=()=>{m.value=!1},me=Z=>{a("rowClick",Z)};y.watch(()=>r.changedContent,()=>{var ue,Re;if(!r.changedContent)return;let Z=(ue=v.value)==null?void 0:ue.map(Ee=>{var ge;return Ee.id===((ge=r.changedContent)==null?void 0:ge.id)&&(Ee={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete Ee.newId),Ee});const $=(Re=r.itemData)==null?void 0:Re.map(Ee=>((Ee==null?void 0:Ee.key)==="tableContents"&&(Ee.contents=Z),Ee));v.value=Z,a("contentChange",{contents:$,index:r.index}),a("change",{content:Z,index:r==null?void 0:r.index,buttonName:"",id:r==null?void 0:r.index})},{deep:!0,immediate:!0});const gt=()=>{},Xe=(Z,$,ue)=>{var Re,Ee,ge,Oe,ve,Ae,je;if(x.value="",Q.value=!0,b.value=!0,a("onButtonClick",Z,$),Z==="删除"){v.value=(Re=Ge.cloneDeep(v.value))==null?void 0:Re.filter(He=>(He==null?void 0:He.id)!==($==null?void 0:$.id));const te=W6(de.value,j.value,$==null?void 0:$.id);ae(te),a("change",{content:v.value,singleContent:$,index:r==null?void 0:r.index,type:"delete",buttonName:Z,column:o.value})}else if(Z==="批量删除"){if(((Ee=Ke.value)==null?void 0:Ee.length)===0)return Nn.ElMessage.warning("请先勾选操作的数据");a("change",{content:v.value,singleContent:null,selectItems:Ke.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:Z,column:o.value})}else if(Z==="复制新增"){R.value="新增";const te=Ge.cloneDeep($),He=(ge=o.value)==null?void 0:ge[0],Mt=(Oe=le.value)==null?void 0:Oe.find(bt=>(bt==null?void 0:bt.label)==="新建");rt(!0,Mt,{data:te,firstCol:He})}else if(Z==="新增")R.value="新增",xt(""),L.value=!0;else if(Z==="编辑")R.value="编辑",xt($),L.value=!0;else if(Z==="查看")R.value="查看",xt($),Q.value=!1,b.value=!1,L.value=!0;else if(Z==="查看三维模型"){const te={};for(let Mt in $)Mt!=="id"&&(te[Mt]=$[Mt]);let He=(ve=Object.values(te))==null?void 0:ve[1];_.setTableShowThree(He)}else if(((Ae=ue==null?void 0:ue.extra)==null?void 0:Ae.type)==="modelExample")R.value=Z,E.value=!0;else if(Z==="新建"){const te=(je=le.value)==null?void 0:je.find(He=>(He==null?void 0:He.label)==="新建");rt(!1,te)}else if(Z==="修改模板"){let te=Ge.cloneDeep(g).value;p.setRouteToChildPath(te),h.setActiveMenuPath(te+"/")}},dt=async Z=>{var ue,Re,Ee,ge,Oe,ve;const $=await Nn.getInsofDataApi({key:{pageKey:Z,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((ue=$==null?void 0:$.data)==null?void 0:ue.code)===200)return Array.isArray((Re=$==null?void 0:$.data)==null?void 0:Re.result)&&((ge=(Ee=$==null?void 0:$.data)==null?void 0:Ee.result)==null?void 0:ge.length)>0?(ve=(Oe=$==null?void 0:$.data)==null?void 0:Oe.result)==null?void 0:ve.map(Ae=>{var je;return{id:Ae==null?void 0:Ae.id,...(je=Ae==null?void 0:Ae.value)==null?void 0:je.pageData}}):[]},mt=(Z,$,ue,Re)=>{var Ee;a("contentChange",{contents:(Ee=Z==null?void 0:Z.compData)==null?void 0:Ee.map(ge=>{var Oe;return(ge==null?void 0:ge.key)==="formContent"?{...ge,contents:(Oe=ge==null?void 0:ge.contents)==null?void 0:Oe.map(ve=>(ve==null?void 0:ve.key)===$?{...ve,value:ue}:ve)}:ge}),index:Z==null?void 0:Z.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(Re)},De=(Z,$)=>{let ue=Z==null?void 0:Z[$==null?void 0:$.prop],Re=1;if(v.value.some(Ee=>(Ee==null?void 0:Ee[$==null?void 0:$.prop])===ue)){const Ee=ue;for(;v.value.some(ge=>(ge==null?void 0:ge[$==null?void 0:$.prop])===`${Ee}(${Re})`);)Re++;ue=`${Ee}(${Re})`}return ue},rt=async(Z,$,ue)=>{var Oe,ve,Ae,je,te;let Re,Ee;const ge=De(ue==null?void 0:ue.data,ue==null?void 0:ue.firstCol);if(Z?(Re=Ge.cloneDeep(g).value+"/"+((Ae=ue==null?void 0:ue.data)==null?void 0:Ae[(ve=ue==null?void 0:ue.firstCol)==null?void 0:ve.prop]),Ee=Ge.cloneDeep(g).value+"/"+ge):(Re=Ge.cloneDeep(g).value+"/",Ee=Ge.cloneDeep(Re)+`loading${(Oe=q.value)==null?void 0:Oe.account}`),$){const He=await pn.getItemData(Ee,sessionStorage.getItem("systemKey"),"");if((He==null?void 0:He.length)>0)if(Z){const Mt=He==null?void 0:He.find(bt=>{var $t;return(($t=bt==null?void 0:bt.comp)==null?void 0:$t.toUpperCase())==="FORM"});Mt&&mt(Mt,(je=ue==null?void 0:ue.firstCol)==null?void 0:je.label,ge,g.value)}else p.setRouteToChildPath(Ge.cloneDeep(g).value),h.setActiveMenuPath(Ee);else if(await pn.loadingConstruct(Re,Ee),Z){const Mt=await dt(Ee);if((Mt==null?void 0:Mt.length)>0){const bt=Mt==null?void 0:Mt.find($t=>{var Yt;return((Yt=$t==null?void 0:$t.comp)==null?void 0:Yt.toUpperCase())==="FORM"});bt&&mt(bt,(te=ue==null?void 0:ue.firstCol)==null?void 0:te.label,ge,g.value)}}else p.setRouteToChildPath(Ge.cloneDeep(g).value),h.setActiveMenuPath(Ee)}else Z?(x.value="",Me.value=ue==null?void 0:ue.data,Y(!0,ue==null?void 0:ue.firstCol,ge)):(p.setRouteToChildPath(Ge.cloneDeep(g).value),h.setActiveMenuPath(Ee))},Ct=()=>{c.value=!1,re.value=null},xt=Z=>{var Ee,ge,Oe,ve,Ae,je;const $=[];let ue=[];for(let te in Z)Array.isArray(Z==null?void 0:Z[te])&&ue.push(te);l.value=Ge.cloneDeep(o.value),(ge=pn.getColumnChild((Ee=Ge.cloneDeep(o.value))==null?void 0:Ee.filter(te=>(te==null?void 0:te.label)!=="操作")))==null||ge.forEach((te,He)=>{var Mt;ue.find(bt=>bt===(te==null?void 0:te.prop))||(te!=null&&te.formType&&((Mt=te==null?void 0:te.formType)==null?void 0:Mt.toUpperCase())==="SELECT"?$.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+He,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(Z==null?void 0:Z[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??He,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}}):$.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+He,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(Z==null?void 0:Z[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??He,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden}))}),Z===""||!Z||(x.value=(Z==null?void 0:Z.id)??"");let Re=pn.getColumnChild((Oe=Ge.cloneDeep(o.value))==null?void 0:Oe.filter(te=>(te==null?void 0:te.label)!=="操作"));z.value&&((ve=z.value)==null?void 0:ve.length)>0&&(z.value=(Ae=Ge.cloneDeep(z).value)==null?void 0:Ae.map(te=>{var Mt;let He=(Mt=Re==null?void 0:Re.find(bt=>(bt==null?void 0:bt.label)===(te==null?void 0:te.label)))==null?void 0:Mt.prop;return He&&(te.value=Z[He]),te})),K.value=z.value&&((je=z.value)==null?void 0:je.length)>0?pn.getTableFormToForm(z.value):$},Ye=async()=>{var $;await y.nextTick();const Z=($=i.value)==null?void 0:$.$el;Z&&pn.Sortable.create(Z,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ue=>{var Oe;const{oldIndex:Re,newIndex:Ee}=ue;if(Re===Ee)return;const ge=nt.value.splice(Re,1)[0];nt.value.splice(Ee,0,ge),o.value=(Oe=o.value)==null?void 0:Oe.slice().sort((ve,Ae)=>{var je,te;return ve.label==="操作"?1:Ae.label==="操作"?-1:((je=nt.value)==null?void 0:je.indexOf(ve))-((te=nt.value)==null?void 0:te.indexOf(Ae))})}})};y.onMounted(()=>{P.value=window.innerWidth-240*2});const Lt=()=>{y.nextTick(()=>{Ye()})},Y=(Z=!0,$,ue)=>{var Oe;let Re=pn.getColumnChild((Oe=Ge.cloneDeep(o.value))==null?void 0:Oe.filter(ve=>(ve==null?void 0:ve.label)!=="操作")),Ee,ge=Ge.cloneDeep(v.value);if(!Me.value){L.value=!1;return}if(x.value===""){F.value++;let ve;$&&ue?ve={id:F.value,[$==null?void 0:$.prop]:ue}:ve={id:F.value},ge.push(Object.assign(Me.value,ve)),Ee=Object.assign(Me.value,ve)}else ge=ge==null?void 0:ge.map(ve=>{var Ae,je;if((ve==null?void 0:ve.id)===x.value){let te={};for(let He in ve){let Mt=(Ae=Re==null?void 0:Re.find(bt=>(bt==null?void 0:bt.prop)===He))==null?void 0:Ae.label;Mt?te[He]=(je=Me.value)==null?void 0:je[Mt]:te[He]=ve[He]}ve=Object.assign(te,Me.value),Ee=ve}return ve});if(v.value=ge,Z){const ve=j6(de.value,j.value,ge);ae(ve),L.value=!1,Me.value=void 0,a("change",{content:ve,singleContent:Ee,index:r==null?void 0:r.index,buttonName:R.value,column:o.value})}},et=async(Z,$,ue)=>{var je,te,He,Mt,bt,$t,Yt,ot,_t,we,w;Ve.value=ue==null?void 0:ue.prop;const Re=Ge.cloneDeep(r.itemData),Ee=Re==null?void 0:Re.map(O=>{var J;return(O==null?void 0:O.key)==="header"&&((J=O.contents)==null||J.map((V,X)=>{var ie,_e,Ie,Be,tt,We,qe,lt,Ft,Bt,Xt,Pt,pt,Fe,At,Ot,Ht,un,Sn;return V.type=V!=null&&V.type?V.type:(Be=(Ie=(_e=(ie=V==null?void 0:V.key)==null?void 0:ie.split("$"))==null?void 0:_e[1])==null?void 0:Ie.split("("))!=null&&Be[0]?(We=(tt=pn.FormType)==null?void 0:tt.find(ke=>{var Ue,Jt,Kt,jt;return(ke==null?void 0:ke.key)===((jt=(Kt=(Jt=(Ue=V==null?void 0:V.key)==null?void 0:Ue.split("$"))==null?void 0:Jt[1])==null?void 0:Kt.split("("))==null?void 0:jt[0])}))==null?void 0:We.value:"Input",V.options=V!=null&&V.options?V.options:((Ft=(lt=(qe=V==null?void 0:V.key)==null?void 0:qe.split("$"))==null?void 0:lt[1])==null?void 0:Ft.length)>0?(pt=(Pt=Ho((Xt=(Bt=V==null?void 0:V.key)==null?void 0:Bt.split("$"))==null?void 0:Xt[1]))==null?void 0:Pt.split(","))==null?void 0:pt.map(ke=>({label:ke,value:ke})):[],(Fe=V==null?void 0:V.key)!=null&&Fe.includes("$")&&(V.key=(Ot=(At=V==null?void 0:V.key)==null?void 0:At.split("$"))==null?void 0:Ot[0]),V.value=(Ht=Object.values($))==null?void 0:Ht[X],V.optionUrl=V!=null&&V.formMenuSelect&&((un=V==null?void 0:V.formMenuSelect)==null?void 0:un.length)>0?{groupSelect:(Sn=V==null?void 0:V.groupSelect)==null?void 0:Sn.split(/[::]/).map(ke=>ke.trim()),menuSelect:V==null?void 0:V.formMenuSelect,selectRelateType:"",type:(V==null?void 0:V.formType)??(V!=null&&V.groupSelect?"Select":"")}:null,V})),O});let ge=Ge.cloneDeep(K.value),Oe=(te=(je=Ge.cloneDeep(Ee))==null?void 0:je.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:te.contents;ge=ge==null?void 0:ge.map(O=>{var J;return O.value=(J=Oe==null?void 0:Oe.find((V,X)=>X===(O==null?void 0:O.id)))==null?void 0:J.value,O});let ve="",Ae=(bt=(Mt=(He=Ge.cloneDeep(Ee))==null?void 0:He.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:Mt.contents)==null?void 0:bt.find((O,J)=>{var V,X;return(O==null?void 0:O.label)===Ve.value||(J==null?void 0:J.toString())===((X=(V=Ve.value)==null?void 0:V.split("a"))==null?void 0:X[1].toString())});if((ot=(Yt=($t=Ge.cloneDeep(Ee))==null?void 0:$t.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:Yt.contents)==null||ot.forEach(O=>{var J,V,X,ie,_e;ve===""&&((X=(V=(J=O==null?void 0:O.optionUrl)==null?void 0:J.groupSelect)==null?void 0:V[1])!=null&&X.includes("["))&&(ve=(_e=(ie=O==null?void 0:O.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:_e[1])}),(_t=Ae==null?void 0:Ae.optionUrl)!=null&&_t.menuSelect){let O=await kl(Ae),J;if(O==null||O.forEach(V=>{var X,ie,_e,Ie,Be,tt,We,qe,lt,Ft;ve===((ie=(X=Ae==null?void 0:Ae.optionUrl)==null?void 0:X.groupSelect)==null?void 0:ie[1])&&((Be=(Ie=(_e=Ae==null?void 0:Ae.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:Ie[1])!=null&&Be.includes("["))&&((Ft=Ge.cloneDeep(V))==null?void 0:Ft[(lt=(qe=(We=(tt=Ae==null?void 0:Ae.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:We[1])==null?void 0:qe.replaceAll("[",""))==null?void 0:lt.replaceAll("]","")])===(Ae==null?void 0:Ae.value)&&(J=V)}),J){let V=Ge.cloneDeep(ge);V=V==null?void 0:V.map(ie=>{var _e,Ie,Be,tt,We,qe,lt,Ft,Bt,Xt,Pt;return(J!=null&&J[ie==null?void 0:ie.label]||J!=null&&J[(tt=(Be=(Ie=(_e=ie==null?void 0:ie.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:Ie[1])==null?void 0:Be.replaceAll("[",""))==null?void 0:tt.replaceAll("]","")])&&((lt=(qe=(We=ie==null?void 0:ie.optionUrl)==null?void 0:We.groupSelect)==null?void 0:qe[1])!=null&<.includes("["))&&(ie.value=(J==null?void 0:J[ie==null?void 0:ie.label])||(J==null?void 0:J[(Pt=(Xt=(Bt=(Ft=ie==null?void 0:ie.optionUrl)==null?void 0:Ft.groupSelect)==null?void 0:Bt[1])==null?void 0:Xt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")])),ie}),v.value=(we=Ge.cloneDeep(v.value))==null?void 0:we.map(ie=>{if((ie==null?void 0:ie.id)===($==null?void 0:$.id)){const _e={};return V==null||V.forEach(Ie=>{_e[Ie.name]=Ie.value}),_e.id=ie==null?void 0:ie.id,_e}return ie});let X=Ge.cloneDeep(V);X=X==null?void 0:X.map(ie=>{var _e,Ie,Be,tt;return(Ie=(_e=ie==null?void 0:ie.optionUrl)==null?void 0:_e.menuSelect)!=null&&Ie.some(We=>We==null?void 0:We.includes)&&(ie.optionUrl.menuSelect=(tt=(Be=ie==null?void 0:ie.optionUrl)==null?void 0:Be.menuSelect)==null?void 0:tt.map(We=>{var qe,lt,Ft,Bt;if(We!=null&&We.includes("[")){let Xt=(lt=(qe=We==null?void 0:We.replaceAll("[","").replaceAll("]",""))==null?void 0:qe.split(":"))==null?void 0:lt[1];We=(Bt=(Ft=Ge.cloneDeep(V))==null?void 0:Ft.find(Pt=>(Pt==null?void 0:Pt.label)===Xt))==null?void 0:Bt.value}return We})),ie}),v.value=(w=Ge.cloneDeep(v.value))==null?void 0:w.map(ie=>{if((ie==null?void 0:ie.id)===($==null?void 0:$.id)){const _e={};return X==null||X.forEach(Ie=>{_e[Ie.name]=Ie.value}),_e.id=ie==null?void 0:ie.id,_e}return ie})}}},Pe=async Z=>{var ve,Ae,je,te,He,Mt,bt,$t,Yt;if(!Z)return;Me.value=Z,a("onFormChange",Z);const $=Ge.cloneDeep(r.itemData),ue=$==null?void 0:$.map(ot=>{var _t;return(ot==null?void 0:ot.key)==="header"&&((_t=ot.contents)==null||_t.map((we,w)=>{var O,J,V,X,ie,_e,Ie,Be,tt,We,qe,lt,Ft,Bt,Xt,Pt,pt,Fe,At;return we.type=we!=null&&we.type?we.type:(X=(V=(J=(O=we==null?void 0:we.key)==null?void 0:O.split("$"))==null?void 0:J[1])==null?void 0:V.split("("))!=null&&X[0]?(_e=(ie=pn.FormType)==null?void 0:ie.find(Ot=>{var Ht,un,Sn,ke;return(Ot==null?void 0:Ot.key)===((ke=(Sn=(un=(Ht=we==null?void 0:we.key)==null?void 0:Ht.split("$"))==null?void 0:un[1])==null?void 0:Sn.split("("))==null?void 0:ke[0])}))==null?void 0:_e.value:"Input",we.options=we!=null&&we.options?we.options:((tt=(Be=(Ie=we==null?void 0:we.key)==null?void 0:Ie.split("$"))==null?void 0:Be[1])==null?void 0:tt.length)>0?(Ft=(lt=Ho((qe=(We=we==null?void 0:we.key)==null?void 0:We.split("$"))==null?void 0:qe[1]))==null?void 0:lt.split(","))==null?void 0:Ft.map(Ot=>({label:Ot,value:Ot})):[],(Bt=we==null?void 0:we.key)!=null&&Bt.includes("$")&&(we.key=(Pt=(Xt=we==null?void 0:we.key)==null?void 0:Xt.split("$"))==null?void 0:Pt[0]),we.value=(pt=Object.values(Z))==null?void 0:pt[w],we.optionUrl=we!=null&&we.formMenuSelect&&((Fe=we==null?void 0:we.formMenuSelect)==null?void 0:Fe.length)>0?{groupSelect:(At=we==null?void 0:we.groupSelect)==null?void 0:At.split(/[::]/).map(Ot=>Ot.trim()),menuSelect:we==null?void 0:we.formMenuSelect,selectRelateType:"",type:(we==null?void 0:we.formType)??(we!=null&&we.groupSelect?"Select":"")}:null,we})),ot});let Re=Ge.cloneDeep(K.value),Ee=(Ae=(ve=Ge.cloneDeep(ue))==null?void 0:ve.find(ot=>(ot==null?void 0:ot.key)==="header"))==null?void 0:Ae.contents;if(Re=Re==null?void 0:Re.map(ot=>{var _t;return ot.value=(_t=Ee==null?void 0:Ee.find((we,w)=>w===(ot==null?void 0:ot.id)))==null?void 0:_t.value,ot}),!B.value)return;let ge="",Oe=(He=(te=(je=Ge.cloneDeep(ue))==null?void 0:je.find(ot=>(ot==null?void 0:ot.key)==="header"))==null?void 0:te.contents)==null?void 0:He.find((ot,_t)=>{var we,w;return(ot==null?void 0:ot.label)===Ve.value||(_t==null?void 0:_t.toString())===((w=(we=Ve.value)==null?void 0:we.split("a"))==null?void 0:w[1].toString())});if(($t=(bt=(Mt=Ge.cloneDeep(ue))==null?void 0:Mt.find(ot=>(ot==null?void 0:ot.key)==="header"))==null?void 0:bt.contents)==null||$t.forEach(ot=>{var _t,we,w,O,J;ge===""&&((w=(we=(_t=ot==null?void 0:ot.optionUrl)==null?void 0:_t.groupSelect)==null?void 0:we[1])!=null&&w.includes("["))&&(ge=(J=(O=ot==null?void 0:ot.optionUrl)==null?void 0:O.groupSelect)==null?void 0:J[1])}),(Yt=Oe==null?void 0:Oe.optionUrl)!=null&&Yt.menuSelect&&B.value){let ot=await kl(Oe),_t;if(ot==null||ot.forEach(we=>{var w,O,J,V,X,ie,_e,Ie,Be,tt;ge===((O=(w=Oe==null?void 0:Oe.optionUrl)==null?void 0:w.groupSelect)==null?void 0:O[1])&&((X=(V=(J=Oe==null?void 0:Oe.optionUrl)==null?void 0:J.groupSelect)==null?void 0:V[1])!=null&&X.includes("["))&&((tt=Ge.cloneDeep(we))==null?void 0:tt[(Be=(Ie=(_e=(ie=Oe==null?void 0:Oe.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:_e[1])==null?void 0:Ie.replaceAll("[",""))==null?void 0:Be.replaceAll("]","")])===(Oe==null?void 0:Oe.value)&&(_t=we)}),_t){let we=Ge.cloneDeep(Re);we=we==null?void 0:we.map(O=>{var J,V,X,ie,_e,Ie,Be,tt,We,qe,lt;return(_t!=null&&_t[O==null?void 0:O.label]||_t!=null&&_t[(ie=(X=(V=(J=O==null?void 0:O.optionUrl)==null?void 0:J.groupSelect)==null?void 0:V[1])==null?void 0:X.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])&&((Be=(Ie=(_e=O==null?void 0:O.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:Ie[1])!=null&&Be.includes("["))&&(O.value=(_t==null?void 0:_t[O==null?void 0:O.label])||(_t==null?void 0:_t[(lt=(qe=(We=(tt=O==null?void 0:O.optionUrl)==null?void 0:tt.groupSelect)==null?void 0:We[1])==null?void 0:qe.replaceAll("[",""))==null?void 0:lt.replaceAll("]","")])),O}),K.value=we;let w=Ge.cloneDeep(we);w=w==null?void 0:w.map(O=>{var J,V,X,ie;return(V=(J=O==null?void 0:O.optionUrl)==null?void 0:J.menuSelect)!=null&&V.some(_e=>_e==null?void 0:_e.includes)&&(O.optionUrl.menuSelect=(ie=(X=O==null?void 0:O.optionUrl)==null?void 0:X.menuSelect)==null?void 0:ie.map(_e=>{var Ie,Be,tt,We;if(_e!=null&&_e.includes("[")){let qe=(Be=(Ie=_e==null?void 0:_e.replaceAll("[","").replaceAll("]",""))==null?void 0:Ie.split(":"))==null?void 0:Be[1];_e=(We=(tt=Ge.cloneDeep(we))==null?void 0:tt.find(lt=>(lt==null?void 0:lt.label)===qe))==null?void 0:We.value}return _e})),O}),K.value=w}}B.value=!1},at=Z=>Z?(Z==null?void 0:Z.toUpperCase())==="INPUT"?"TEXTAREA":Z:"TEXTAREA",ze=Z=>{var ge,Oe;const $=(Oe=(ge=z.value)==null?void 0:ge.find(ve=>(ve==null?void 0:ve.label)===(Z==null?void 0:Z.label)))==null?void 0:Oe.multiple,ue=Z==null?void 0:Z.prop;if((Z==null?void 0:Z.formType)!="Select")return;v.value.forEach(ve=>{const Ae=ve==null?void 0:ve[ue];$&&Vo(Ae)&&(ve[ue]=[Ae]),!$&&!Vo(Ae)&&(ve[ue]="")})},be=Z=>{var ue,Re,Ee,ge,Oe,ve;xt("");const $=(ue=K.value)==null?void 0:ue.reduce((Ae,je)=>(Ae[je.name]=je.value,Ae),{});((Re=Object.keys($))==null?void 0:Re.length)>0&&(Me.value=$,x.value="",F.value=(Ee=v.value)==null?void 0:Ee.length,G.value=(ge=le.value)==null?void 0:ge.filter(Ae=>(Ae==null?void 0:Ae.label)!=="新增"),o.value=(ve=(Oe=l.value)==null?void 0:Oe.filter(Ae=>(Ae==null?void 0:Ae.label)!=="操作"))==null?void 0:ve.map(Ae=>{var te,He,Mt;const je=(He=(te=z.value)==null?void 0:te.find(bt=>(bt==null?void 0:bt.label)===(Ae==null?void 0:Ae.label)))==null?void 0:He.multiple;return ze(Ae),{...Ae,type:"edit",optionUrl:Ae!=null&&Ae.formMenuSelect&&((Mt=Ae==null?void 0:Ae.formMenuSelect)==null?void 0:Mt.length)>0?{groupSelect:Ae==null?void 0:Ae.groupSelect,menuSelect:Ae==null?void 0:Ae.formMenuSelect,selectRelateType:"",type:Ae==null?void 0:Ae.formType,multiple:je}:null,columnType:at(Ae==null?void 0:Ae.formType)}}),Z==="createClick"&&Y(!1))};y.watch(()=>[r.itemData,ee.value,W.value,j.value,f==null?void 0:f.value],()=>{var Ae,je,te,He,Mt,bt,$t,Yt,ot,_t,we,w,O,J,V,X,ie,_e,Ie,Be,tt,We,qe,lt,Ft,Bt,Xt,Pt,pt;const Z=(Ae=Ge.cloneDeep(r.itemData))==null?void 0:Ae.filter(Fe=>(Fe==null?void 0:Fe.key)==="header");(je=Ge.cloneDeep(r.itemData))==null||je.filter(Fe=>(Fe==null?void 0:Fe.key)==="tableIndexColumn")[0];const $=(te=Ge.cloneDeep(r.itemData))==null?void 0:te.find(Fe=>(Fe==null?void 0:Fe.key)==="page"),ue=(He=Ge.cloneDeep(r.itemData))==null?void 0:He.find(Fe=>(Fe==null?void 0:Fe.key)==="rowButton"),Re=(Mt=Ge.cloneDeep(r.itemData))==null?void 0:Mt.find(Fe=>(Fe==null?void 0:Fe.key)==="extraButton"),Ee=(bt=Ge.cloneDeep(r.itemData))==null?void 0:bt.filter(Fe=>(Fe==null?void 0:Fe.key)==="tableContents"),ge=($t=Ge.cloneDeep(r.itemData))==null?void 0:$t.filter(Fe=>(Fe==null?void 0:Fe.key)==="tableIndex");z.value=(_t=(ot=(Yt=Ge.cloneDeep(r.itemData))==null?void 0:Yt.filter(Fe=>(Fe==null?void 0:Fe.key)==="tableToForm"))==null?void 0:ot[0])==null?void 0:_t.contents,C.value=($==null?void 0:$.contents)??!1;let Oe=[];ee.value===""?Oe=Z==null?void 0:Z[0]:Oe=(Z==null?void 0:Z.find(Fe=>(Fe==null?void 0:Fe.selectLabel)==="("+ee.value+")"))??(Z==null?void 0:Z.find(Fe=>!(Fe!=null&&Fe.selectLabel)));let ve=[];if(ee.value===""?ve=ge==null?void 0:ge[0]:ve=(ge==null?void 0:ge.find(Fe=>(Fe==null?void 0:Fe.selectLabel)==="("+ee.value+")"))??(ge==null?void 0:ge.find(Fe=>!(Fe!=null&&Fe.selectLabel))),((we=Oe==null?void 0:Oe.contents)==null?void 0:we.length)>0){let Fe=[];if(Oe!=null&&Oe.contents.some(ke=>Array.isArray(ke)&&(ke==null?void 0:ke.find(Ue=>Ue.children))))j.value===""?Fe=(O=(w=pn.getGradeColumns(Ge.cloneDeep(Oe==null?void 0:Oe.contents)))==null?void 0:w[0])==null?void 0:O.filter(ke=>!Array.isArray(ke)):(j.value.split("-"),Fe=(J=pn.getGradeColumns(Ge.cloneDeep(Oe==null?void 0:Oe.contents)))==null?void 0:J[0]);else{const ke=Oe!=null&&Oe.contents.some(Ue=>Array.isArray(Ue))?(V=Oe==null?void 0:Oe.contents)==null?void 0:V[0]:Oe==null?void 0:Oe.contents;ke==null||ke.forEach((Ue,Jt)=>{var Kt;Fe.push({label:(Ue==null?void 0:Ue.label)??"",prop:(Ue==null?void 0:Ue.label)==="操作"?"operate":(Ue==null?void 0:Ue.prop)??"a"+Jt,width:Ue!=null&&Ue.width?parseInt(Ue.width):"",fixed:(Ue==null?void 0:Ue.fixed)??void 0,sortable:(Ue==null?void 0:Ue.sortable)??!1,align:(Ue==null?void 0:Ue.align)??"left",showOverflowTooltip:(Ue==null?void 0:Ue.showOverflowTooltip)??!0,isNotDrag:(Ue==null?void 0:Ue.isNotDrag)??!1,isEditCol:(Ue==null?void 0:Ue.isEditCol)??!1,isOperate:(Ue==null?void 0:Ue.isOperate)??!1,id:(Ue==null?void 0:Ue.id)??Jt,type:(Ue==null?void 0:Ue.label)==="操作"?"operate":void 0,formType:(Ue==null?void 0:Ue.formType)??(Ue!=null&&Ue.groupSelect?"Select":""),isTableColHidden:Ue==null?void 0:Ue.isTableColHidden,isFormColHidden:Ue==null?void 0:Ue.isFormColHidden,options:(Ue==null?void 0:Ue.options)??[],value:(Ue==null?void 0:Ue.value)??"",formMenuSelect:(Ue==null?void 0:Ue.formMenuSelect)??[],isRoute:(Ue==null?void 0:Ue.isRoute)??!1,groupSelect:Ue!=null&&Ue.groupSelect?(Kt=Ue==null?void 0:Ue.groupSelect)==null?void 0:Kt.replaceAll('"',"").split(":"):[]})})}o.value=Fe,d.value=Fe,t.value=(X=o.value)==null?void 0:X.map(ke=>ke==null?void 0:ke.label);let At=(_e=(ie=pn.getAllLeafNodes(Ge.cloneDeep(o.value)))==null?void 0:ie.filter(ke=>(ke==null?void 0:ke.type)!=="operate"))==null?void 0:_e.map((ke,Ue)=>({prop:(ke==null?void 0:ke.prop)??"a"+Ue,column:ke.label}));pe.value=At;let Ot=[];ee.value===""?Ot=Ee==null?void 0:Ee[0]:Ot=(Ee==null?void 0:Ee.find(ke=>(ke==null?void 0:ke.selectLabel)==="("+ee.value+")"))??(Ee==null?void 0:Ee.find(ke=>!(ke!=null&&ke.selectLabel)));let Ht=Array.isArray((Ie=Ot==null?void 0:Ot.contents)==null?void 0:Ie[0])&&((Be=Ot==null?void 0:Ot.contents)!=null&&Be[0].every(ke=>Array.isArray(ke)))?(tt=Ge.cloneDeep(Ot==null?void 0:Ot.contents))==null?void 0:tt[0]:Ge.cloneDeep(Ot==null?void 0:Ot.contents);ve!=null&&ve.contents&&((We=ve==null?void 0:ve.contents)==null?void 0:We.length)!==0&&(Ht=(qe=Ge.cloneDeep(Ht))==null?void 0:qe.map((ke,Ue)=>{if(!Array.isArray(ke)){let Jt={};for(let Kt in ke)Kt!=="id"&&Kt!=="index"&&(Jt[Kt]=ke[Kt]);ke=Object.values(Jt)}return ke}));const un=!!((lt=o.value)!=null&<.find(ke=>ke.prop==="index"));Ht=xu(Ge.cloneDeep(Ht),ve==null?void 0:ve.contents,un);const Sn=[];Ht==null||Ht.forEach((ke,Ue)=>{var Kt;let Jt={};if(Array.isArray(ke)){let jt=[];ke==null||ke.filter(En=>!(En!=null&&En.id)).forEach((En,yn)=>{var Rt,Ji,S,M,U,D;if((Rt=At==null?void 0:At[yn])!=null&&Rt.prop&&!Array.isArray(En)){let N={};N[At[yn].column]=En,f!=null&&f.value&&((Ji=f==null?void 0:f.value)==null?void 0:Ji.length)>0&&((S=f==null?void 0:f.value)!=null&&S.find(oe=>JSON.stringify(oe==null?void 0:oe[0])===JSON.stringify(N)))&&(jt=(M=f==null?void 0:f.value)==null?void 0:M.find(oe=>JSON.stringify(oe==null?void 0:oe[0])===JSON.stringify(N))),jt&&jt.length>0?Jt[At[yn].prop]=jt!=null&&jt.find(oe=>{var fe;return((fe=Object.keys(oe))==null?void 0:fe[0])===At[yn].column})?(U=jt==null?void 0:jt.find(oe=>{var fe;return((fe=Object.keys(oe))==null?void 0:fe[0])===At[yn].column}))==null?void 0:U[At[yn].column]:En:Jt[At[yn].prop]=En}else Array.isArray(En)&&((D=At[yn])!=null&&D.prop?Jt[At[yn].prop]=En:Jt.children=yu(En,At))})}else Jt=ke;Array.isArray(ke)&&ke.some(jt=>jt==null?void 0:jt.id)?Sn.push(Object.assign(Jt,{id:(Kt=ke==null?void 0:ke.find(jt=>jt.id))==null?void 0:Kt.id})):Jt.id?Sn.push(Jt):Sn.push(Object.assign(Jt,{id:Ue.toString()}))}),v.value=Sn}else o.value=[],l.value=[],v.value=[];((Ft=ue==null?void 0:ue.contents)==null?void 0:Ft.length)>0?H.value=ue==null?void 0:ue.contents:H.value=[],((Bt=Re==null?void 0:Re.contents)==null?void 0:Bt.length)>0?(G.value=Re==null?void 0:Re.contents,le.value=Re==null?void 0:Re.contents):(G.value=[],le.value=[]),F.value=((Xt=v==null?void 0:v.value)==null?void 0:Xt.length)??0,de.value=v.value,Se.value&&(o.value=(pt=(Pt=l.value)==null?void 0:Pt.filter(Fe=>(Fe==null?void 0:Fe.label)!=="操作"))==null?void 0:pt.map(Fe=>{var At;return{...Fe,type:"edit",optionUrl:Fe!=null&&Fe.formMenuSelect&&((At=Fe==null?void 0:Fe.formMenuSelect)==null?void 0:At.length)>0?{groupSelect:Fe==null?void 0:Fe.groupSelect,menuSelect:Fe==null?void 0:Fe.formMenuSelect,selectRelateType:"",type:Fe==null?void 0:Fe.formType}:null}}),be())},{deep:!0,immediate:!0}),y.watch(()=>r==null?void 0:r.operatingForm,Z=>{Z!=null&&Z.form&&(xt(Z==null?void 0:Z.form),R.value=Z==null?void 0:Z.dialogTitle,Q.value=!0,L.value=!0)},{immediate:!0,deep:!0});const ut=Z=>{Se.value=!Se.value,Se.value?be("viewChange"):(G.value=le.value,o.value=d.value)};y.ref(!1);const Ut=Z=>{be("createClick")},sn=(Z,$,ue)=>{var Re,Ee;Me.value=Ge.cloneDeep(Z),x.value=Z==null?void 0:Z.id,F.value=(Re=v.value)==null?void 0:Re.length,R.value=(Z==null?void 0:Z.id)===((Ee=v.value)==null?void 0:Ee.length)?"新增":"编辑",Y(!0)},It=Z=>{var Ae,je,te,He,Mt,bt,$t,Yt,ot,_t;const{row:$,column:ue,item:Re,slotData:Ee}=Z;let ge=$!=null&&$[ue==null?void 0:ue.prop]?((je=(Ae=$==null?void 0:$[ue==null?void 0:ue.prop])==null?void 0:Ae[0])==null?void 0:je.contents)??($==null?void 0:$[ue==null?void 0:ue.prop]):((He=(te=$==null?void 0:$[Re==null?void 0:Re.prop])==null?void 0:te[0])==null?void 0:He.contents)??($==null?void 0:$[Re==null?void 0:Re.prop])??((bt=(Mt=Ee==null?void 0:Ee[Re==null?void 0:Re.prop])==null?void 0:Mt[0])==null?void 0:bt.contents)??(Ee==null?void 0:Ee[Re==null?void 0:Re.prop])??((ot=(Yt=$==null?void 0:$[($t=Re==null?void 0:Re.child)==null?void 0:$t.prop])==null?void 0:Yt[0])==null?void 0:ot.contents)??($==null?void 0:$[(_t=Re==null?void 0:Re.child)==null?void 0:_t.prop]),ve=Array.isArray(ge)&&!(ge!=null&&ge.every(we=>typeof we=="string"||typeof we=="number"))?"查看":ge;return ve=Array.isArray(ve)?ve.join(","):ve,ve};return(Z,$)=>{var Ae,je;const ue=y.resolveComponent("el-icon"),Re=y.resolveComponent("el-popover"),Ee=y.resolveComponent("svg-icon"),ge=y.resolveComponent("el-checkbox"),Oe=y.resolveComponent("el-checkbox-group"),ve=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",$6,[(y.openBlock(),y.createBlock(Kn.ssTable,{columns:o.value,checkedColumns:t.value,key:o.value,tableData:v.value,isEditViewport:Se.value,isShowPagination:C.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:T,extraButton:G.value,onContentClick:xe,onRowClick:me,onSelectChange:yt,onCellChange:sn,onChange:et,onPreview:Ce},y.createSlots({headerButton:y.withCtx(te=>[s.showHeader?(y.openBlock(),y.createBlock(U6,{key:0,compName:s.compName,buttons:te.buttons,onButtonClick:$[0]||($[0]=He=>Xe(He,"",{})),columns:o.value,onFilter:k},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",K6,[y.createElementVNode("span",{title:"编辑视图",onClick:$[2]||($[2]=He=>ut())},[y.createVNode(Ee,{name:"editTable",class:"view-icon"})])])):y.createCommentVNode("",!0)]}),rowCreate:y.withCtx(({row:te})=>[y.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:He=>Ut()},[y.createVNode(Ee,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Z6)]),operateCol:y.withCtx(()=>[y.createVNode(Re,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:Lt},{reference:y.withCtx(()=>[y.createElementVNode("span",Q6,[y.createVNode(Ee,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:y.withCtx(()=>[y.createElementVNode("div",e5,[y.createVNode(Oe,{modelValue:t.value,"onUpdate:modelValue":$[3]||($[3]=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(nt.value,te=>(y.openBlock(),y.createBlock(ge,{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(Ee,{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=>[y.createTextVNode(y.toDisplayString(It(te)),1)]),_:2},[((Ae=H.value)==null?void 0:Ae.length)>0?{name:"actions",fn:y.withCtx(({item:te})=>[y.createVNode(Re,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:y.withCtx(()=>[y.createVNode(ue,null,{default:y.withCtx(()=>[y.createVNode(y.unref(Nn.more_filled_default))]),_:1})]),default:y.withCtx(()=>[y.createElementVNode("div",Y6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(st(H.value,te),(He,Mt)=>(y.openBlock(),y.createElementBlock("div",{class:"menu-config-item",key:Mt,onClick:bt=>Xe(He==null?void 0:He.label,te,{extra:He})},[y.createElementVNode("div",{style:y.normalizeStyle({color:He==null?void 0:He.textColor}),class:"extra-button-label"},y.toDisplayString(He==null?void 0:He.label),5)],8,J6))),128))])]),_:2},1024)]),key:"0"}:void 0,((je=v.value)==null?void 0:je.length)>0?{name:"batchButton",fn:y.withCtx(te=>[y.createVNode(I6,{buttons:te.buttons,onButtonClick:$[1]||($[1]=He=>Xe(He,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),y.createVNode(Kn.ssDialog,{title:R.value,visible:L.value,width:he.value,onBeforeDestroy:Le},{default:y.withCtx(()=>[y.createElementVNode("div",t5,[y.createVNode(Kn.ssForm,{rowContents:K.value,isEnableWrap:!1,onChange:Pe,onClickTrigger:Qe,isEdit:b.value,onBlurChange:ht},null,8,["rowContents","isEdit"])])]),footer:y.withCtx(()=>[Q.value?(y.openBlock(),y.createElementBlock("div",n5,[y.createVNode(ve,{onClick:$[4]||($[4]=te=>L.value=!1),id:"themeBorderButton"},{default:y.withCtx(()=>$[7]||($[7]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[7]}),y.createVNode(ve,{class:"ok-button",onClick:Y,id:"themeButton"},{default:y.withCtx(()=>$[8]||($[8]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[8]})])):y.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),y.createVNode(Kn.ssDialog,{title:R.value,visible:E.value,width:P.value,onBeforeDestroy:$[6]||($[6]=te=>E.value=!1)},{default:y.withCtx(()=>[y.createVNode(G6)]),footer:y.withCtx(()=>[y.createElementVNode("div",i5,[y.createVNode(ve,{onClick:$[5]||($[5]=te=>E.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:y.withCtx(()=>$[9]||($[9]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[9]}),y.createVNode(ve,{class:"ok-button",onClick:gt,id:"themeButton"},{default:y.withCtx(()=>$[10]||($[10]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["title","visible","width"]),m.value?(y.openBlock(),y.createBlock(Kn.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:Te},null,8,["fileDataList"])):y.createCommentVNode("",!0),c.value?(y.openBlock(),y.createBlock(Kn.ssDialog,{key:1,visible:c.value,onBeforeDestroy:Ct,style:{height:"700px",width:"1000px"}},{default:y.withCtx(()=>[c.value?(y.openBlock(),y.createBlock(gu,{key:0,"urdf-url":re.value},null,8,["urdf-url"])):y.createCommentVNode("",!0)]),_:1},8,["visible"])):y.createCommentVNode("",!0)])}}},Au=Fi._export_sfc(s5,[["__scopeId","data-v-2c5a4080"]]);exports.ACESFilmicToneMapping=Wl;exports.AmbientLight=hc;exports.Box3=In;exports.CatmullRomCurve3=ac;exports.Color=Tt;exports.DirectionalLight=gr;exports.DoubleSide=gn;exports.Euler=Tn;exports.GridHelper=Z0;exports.HemisphereLight=K0;exports.MOUSE=Ci;exports.MathUtils=Ai;exports.Matrix4=Et;exports.Mesh=zt;exports.MeshPhongMaterial=mn;exports.OrbitControls=au;exports.PCFSoftShadowMap=Gl;exports.PerspectiveCamera=wn;exports.Plane=Zn;exports.PlaneGeometry=Pi;exports.PointLight=La;exports.SRGBColorSpace=Zt;exports.Scene=Ia;exports.ShadowMaterial=j0;exports.TubeGeometry=ka;exports.Vector3=I;exports.WebGLRenderer=su;exports.Xe=du;exports.formGetOptions=Ho;exports.getSelectRow=kl;exports.isString=Vo;exports.ssTable=Au;exports.threeView=gu;exports.useFormComp=Eu;exports.useFormToTableComp=_u;exports.useModelLoader=B6;exports.useTableComp=Su;exports.useUnit=vu;
|
|
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(u0);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]),jt),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(u0),h=[];for(let _=0,p=u.length;_<p;_++){const f=u[_];if(f.length>0){const v=f.split("/");h.push(v)}}const g=h[0];for(let _=1,p=h.length-1;_<p;_++){const f=h[_],v=h[_+1];t.addFace(g[0],f[0],v[0],g[1],f[1],v[1],g[2],f[2],v[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 p=m[g].split("/");p[0]!==""&&u.push(p[0]),p[1]!==""&&h.push(p[1])}t.addLineGeometry(u,h)}else if(d==="p"){const u=c.slice(1).trim().split(" ");t.addPointGeometry(u)}else if((i=C4.exec(c))!==null){const m=(" "+i[0].slice(1).trim()).slice(1);t.startObject(m)}else if(D4.test(c))t.object.startMaterial(c.substring(7).trim(),t.materialLibraries);else if(R4.test(c))t.materialLibraries.push(c.substring(7).trim());else if(L4.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 Pn;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 hn;_.setAttribute("position",new It(d.vertices,3)),d.normals.length>0&&_.setAttribute("normal",new It(d.normals,3)),d.colors.length>0&&(g=!0,_.setAttribute("color",new It(d.colors,3))),d.hasUVIndices===!0&&_.setAttribute("uv",new It(d.uvs,2));const p=[];for(let v=0,x=m.length;v<x;v++){const S=m[v],F=S.name+"_"+S.smooth+"_"+g;let C=t.materials[F];if(this.materials!==null){if(C=this.materials.create(S.name),u&&C&&!(C instanceof Ri)){const R=new Ri;$n.prototype.copy.call(R,C),R.color.copy(C.color),C=R}else if(h&&C&&!(C instanceof Gi)){const R=new Gi({size:10,sizeAttenuation:!1});$n.prototype.copy.call(R,C),R.color.copy(C.color),R.map=C.map,C=R}}C===void 0&&(u?C=new Ri:h?C=new Gi({size:1,sizeAttenuation:!1}):C=new mn,C.name=S.name,C.flatShading=!S.smooth,C.vertexColors=g,t.materials[F]=C),p.push(C)}let f;if(p.length>1){for(let v=0,x=m.length;v<x;v++){const S=m[v];_.addGroup(S.groupStart,S.groupCount,v)}u?f=new Ra(_,p):h?f=new Vs(_,p):f=new Bt(_,p)}else u?f=new Ra(_,p[0]):h?f=new Vs(_,p[0]):f=new Bt(_,p[0]);f.name=c.name,r.add(f)}else if(t.vertices.length>0){const a=new Gi({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new It(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(l.setAttribute("color",new It(t.colors,3)),a.vertexColors=!0);const c=new Vs(l,a);r.add(c)}return r}}class cs extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=this.path===""?uc.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 F4(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class F4{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:ei,this.wrap=this.options.wrap!==void 0?this.options.wrap:di}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=jt),i[a]=d}for(const a in n){const l=n[a];let c;if(l!=="")switch(a.toLowerCase()){case"kd":i.color=Ht.colorSpaceToWorking(new Tt().fromArray(l),jt);break;case"ks":i.specular=Ht.colorSpaceToWorking(new Tt().fromArray(l),jt);break;case"ke":i.emissive=Ht.colorSpaceToWorking(new Tt().fromArray(l),jt);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 mn(i),this.materials[e]}getTextureParams(e,t){const n={scale:new et(1,1),offset:new et(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:oc;let a=o.getHandler(e);a===null&&(a=new lc(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 N4(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 J0;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),p=Oo(u);g&&g>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${p}(${Us(h)} / ${Us(g)})`:`正在下载: ${p}(${Us(h)} / ${Us(g)})`:h&&h>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${p}(已下载 ${Us(h)})`:`正在下载: ${p}(已下载 ${Us(h)})`:n.value=a?`正在下载第 ${_} / ${a} 个文件: ${p}`:`正在下载: ${p}`},m=new _c(c);m.packages=u=>`${Bo.endsWith("/")?Bo:Bo+"/"}${u}/`,m.loadMeshCb=(u,h,g)=>{const _=(()=>{const p=u.split("?")[0].split("#")[0],f=p.lastIndexOf(".");return f>=0?p.slice(f+1).toLowerCase():void 0})();switch(_){case"obj":{const p=(()=>{try{return new URL(".",u).toString()}catch{const F=u.lastIndexOf("/");return F>=0?u.slice(0,F+1):u}})(),f=(()=>{var C;return(((C=u.split("/").pop())==null?void 0:C.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),v=`${p}${f}.mtl`,x=F=>{const C=new ls(h);F&&C.setMaterials(F),C.load(u,R=>g(R),R=>{d(u,R==null?void 0:R.loaded,R==null?void 0:R.total)},R=>{console.error(`加载 OBJ 失败: ${u}`,R),g(new Pn)})},S=new cs(h);S.setResourcePath(p),S.load(v,F=>{try{F.preload()}catch{}x(F)},F=>{d(v,F==null?void 0:F.loaded,F==null?void 0:F.total)},F=>{console.warn(`未找到或加载材质失败: ${v}`),x(void 0)});break}case"stl":{new ji(h).load(u,f=>{const v=new mn({color:12303291,shininess:30}),x=new Bt(f,v);x.castShadow=!0,x.receiveShadow=!0,g(x)},f=>{d(u,f==null?void 0:f.loaded,f==null?void 0:f.total)},f=>{console.error(`加载 STL 失败: ${u}`,f),g(new Pn)});break}default:console.error(`不支持的网格格式: .${_} (路径: ${u})`),g(new Pn)}};try{const u=r.split("/").pop();n.value=`正在下载 URDF 文件: ${u}`;const h=await new Promise((g,_)=>{m.load(r,p=>g(p),p=>{d(r,p==null?void 0:p.loaded,p==null?void 0:p.total)},p=>_(p))});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 mu extends oi{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,p=new Uint8Array(g);let f=0,v=0,x,S,F;do if(x=h[f++],x<32){if(x++,v+x>g)throw new Error("Output buffer is not large enough");if(f+x>_)throw new Error("Invalid compressed data");do p[v++]=h[f++];while(--x)}else{if(S=x>>5,F=v-((x&31)<<8)-1,f>=_)throw new Error("Invalid compressed data");if(S===7&&(S+=h[f++],f>=_))throw new Error("Invalid compressed data");if(F-=h[f++],v+S+2>g)throw new Error("Output buffer is not large enough");if(F<0)throw new Error("Invalid compressed data");if(F>=v)throw new Error("Invalid compressed data");do p[v++]=p[F++];while(--S+2)}while(f<_);return p}function n(h){const g={},_=new Uint8Array(h);let p="",f="",v=0,x=!1;const S=_.length;for(;v<S&&x===!1;){const P=String.fromCharCode(_[v++]);P===`
|
|
4206
|
+
`||P==="\r"?(f.trim().toLowerCase().startsWith("data")&&(x=!0),f=""):f+=P,p+=P}const F=p.search(/[\r\n]DATA\s(\S*)\s/i),C=/[\r\n]DATA\s(\S*)\s/i.exec(p.slice(F-1));if(g.data=C[1],g.headerLen=C[0].length+F,g.str=p.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(P){return parseInt(P,10)})),g.count!==null)g.count=g.count[1].split(" ").map(function(P){return parseInt(P,10)});else{g.count=[];for(let P=0,A=g.fields.length;P<A;P++)g.count.push(1)}g.offset={};let R=0;for(let P=0,A=g.fields.length;P<A;P++)g.data==="ascii"?g.offset[g.fields[P]]=P:(g.offset[g.fields[P]]=R,R+=g.size[P]*g.count[P]);return g.rowSize=R,g}const i=n(e),r=[],o=[],a=[],l=[],c=[],d=new Tt;if(i.data==="ascii"){const h=i.offset,p=new TextDecoder().decode(e).slice(i.headerLen).split(`
|
|
4207
|
+
`);for(let f=0,v=p.length;f<v;f++){if(p[f]==="")continue;const x=p[f].split(" ");if(h.x!==void 0&&(r.push(parseFloat(x[h.x])),r.push(parseFloat(x[h.y])),r.push(parseFloat(x[h.z]))),h.rgb!==void 0){const S=i.fields.findIndex(L=>L==="rgb"),F=i.type[S],C=parseFloat(x[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,jt),a.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(o.push(parseFloat(x[h.normal_x])),o.push(parseFloat(x[h.normal_y])),o.push(parseFloat(x[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(x[h.intensity])),h.label!==void 0&&c.push(parseInt(x[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 x=0;x<i.points;x++){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]*x,i.type[S],i.size[S])),r.push(this._getDataView(f,i.points*v.y+i.size[F]*x,i.type[F],i.size[F])),r.push(this._getDataView(f,i.points*v.z+i.size[C]*x,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]*x+2)/255,C=f.getUint8(i.points*v.rgb+i.size[S]*x+1)/255,R=f.getUint8(i.points*v.rgb+i.size[S]*x+0)/255;d.setRGB(F,C,R,jt),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]*x,i.type[S],i.size[S])),o.push(this._getDataView(f,i.points*v.normal_y+i.size[F]*x,i.type[F],i.size[F])),o.push(this._getDataView(f,i.points*v.normal_z+i.size[C]*x,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]*x,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]*x,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"),x=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[x],i.size[x]))}if(g.rgb!==void 0){const f=h.getUint8(p+g.rgb+2)/255,v=h.getUint8(p+g.rgb+1)/255,x=h.getUint8(p+g.rgb+0)/255;d.setRGB(f,v,x,jt),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"),x=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[x],i.size[x]))}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 Z2(c,1)),m.computeBoundingSphere();const u=new Gi({size:.005});return a.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const U4=Vl.useModelComp(Ve.pinia),{systemPath:m0}=Ve.storeToRefs(U4),pa=y.ref(),g0=new Map;function I4(s,e,t,n,i){const r=async u=>{try{const h=await kn.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,x=new cs().parse(f);x.preload(),h(x)}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 mn({color:8947848,side:gn}))},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 x=null;h&&h.length>0&&(h.length===1?x=await o(h[0]):x=await a(h));const S=new ls;x&&S.setMaterials(x);const F=S.parse(v);x||F.traverse(C=>{C.isMesh&&(C.material=new mn({color:8947848,side:gn}))}),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),x=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([v],x,{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`,z=new File([E],L,{type:E.type});F.push(z)}}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 J=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,we=[...v.matchAll(J)].map(B=>({x:parseFloat(B[1]),y:parseFloat(B[2]),z:parseFloat(B[3])})),Ze=new hn,We=we.flatMap(B=>[B.x,B.y,B.z]);if(Ze.setAttribute("position",new It(We,3)),f===".txt"){const B=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ze,B)}else if(f===".cpt"){const B=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(Ze,B)}}else if(f===".obj"){const J=new ls;if(g&&g.length>0){const de=new cs;for(const we of g){const Ze=await we.text(),We=de.parse(Ze);We.preload(),J.setMaterials(We);break}}p=J.parse(v),(!g||g.length===0)&&p.traverse(de=>{de.isMesh&&(de.material=new mn({color:"#B3B3D4"})),de instanceof Bt&&(de.material.side=gn)})}break;case".stl":const x=await h.arrayBuffer(),F=new ji().parse(x),C=new mn({color:"#B3B3D4",side:gn});p=new Bt(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 Pn,E=R.map(J=>new Promise((de,we)=>{new ji().load(m0.value===""?`/model/${J}`:`${m0.value}\\${J}`,We=>{const B=new mn({color:P[J]||"#B3B3D4",side:gn}),bt=new Bt(We,B);de(bt)},void 0,we)}));try{(await Promise.all(E)).forEach(de=>A.add(de)),p=A}catch(J){throw console.error("加载NC文件对应的STL文件失败:",J),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const L=new mu,z=new Pn;try{const J=await Fn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),de=new Blob([J.data],{type:"application/octet-stream;charset=UTF-8"}),we=await Fn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ze=new Blob([we.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((bt,ht)=>{const it=URL.createObjectURL(de);L.load(it,Ne=>{const tt=new Float32Array(Ne.geometry.attributes.position.count*3);for(let Le=0;Le<Ne.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Ne.geometry.setAttribute("color",new _n(tt,3)),Ne.material.vertexColors=!0,Ne.scale.set(.3,.3,.3),URL.revokeObjectURL(it),bt(Ne)},void 0,ht)}),B=await new Promise((bt,ht)=>{const it=URL.createObjectURL(Ze);L.load(it,Ne=>{const tt=new Float32Array(Ne.geometry.attributes.position.count*3);for(let Le=0;Le<Ne.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Ne.geometry.setAttribute("color",new _n(tt,3)),Ne.material.vertexColors=!0,Ne.scale.set(.3,.3,.3),URL.revokeObjectURL(it),bt(Ne)},void 0,ht)});z.add(We),z.add(B),p=z}catch(J){throw console.error("PCD文件加载失败:",J),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new _c,re="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,_e=new Map,Ee=async J=>{if(le.has(J))return console.log(`从缓存加载: ${J}`),le.get(J);try{const de=await Fn.axios.get(`${re}/${J}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),we=new Blob([de.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set(J,we),we}catch(de){throw console.error(`加载文件失败: ${J}`,de),new Error(`无法加载文件: ${J}`)}},Me=(J="default")=>{if(Z.has(J))return Z.get(J);const de=new mn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:ei});return Z.set(J,de),de},me=J=>{try{J.isBufferGeometry&&J.mergeVertices&&J.mergeVertices(),J.computeVertexNormals&&J.computeVertexNormals(),J.computeBoundingSphere&&J.computeBoundingSphere(),J.deleteAttribute&&J.deleteAttribute("uv2")}catch(de){console.warn("几何体优化失败,使用原始几何体:",de)}return J},se=async(J,de,we)=>{const Ze=`stl_${de}`;if(_e.has(Ze)){const ht=_e.get(Ze);return new Bt(ht,Me())}const We=await J.arrayBuffer();let bt=new ji(we).parse(We);return bt=me(bt),_e.set(Ze,bt),new Bt(bt,Me())},j=async(J,de,we)=>{const Ze=`obj_${de}`;if(le.has(Ze))return le.get(Ze).clone();const We=await J.text(),B=new ls(we),bt=de.replace(".obj",".mtl");try{const Ne=await(await Ee(bt)).text(),Le=new cs(we).parse(Ne);Le.preload(),B.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${bt}`)}const ht=B.parse(We);return ht.traverse(it=>{it.isMesh&&(it.geometry=me(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),le.set(Ze,ht),ht},q=(J,de)=>{const we=new k0;if(we.addLevel(J,0),J.geometry){const Ze=J.geometry.clone(),We=new Bt(Ze,J.material);we.addLevel(We,50)}return we};let ie=0,ee=0;const ue=[];Q.loadMeshCb=async(J,de,we,Ze,We)=>{const B=J.split("/").pop(),bt=we||(()=>{});ie++;const ht=new Promise(async(it,Ne)=>{try{const tt=await Ee(B);if(!tt||tt.size===0)throw new Error(`文件为空: ${B}`);const Le=B.split(".").pop().toLowerCase();let st;switch(Le){case"stl":st=await se(tt,B,de);break;case"obj":st=await j(tt,B,de);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&st.isMesh&&(st=q(st,B)),bt(st),ee++,Ze&&Ze({loaded:ee,total:ie,progress:ee/ie}),it(st)}catch(tt){console.error(`mesh文件加载失败: ${B}`,tt);const Le=new Pn;bt(Le),it(Le);const st=new $i(.1,.1,.1),Yt=new q0({color:16711680,wireframe:!0});return new Bt(st,Yt)}});ue.push(ht)};try{if(!H){pa.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ie}个mesh文件加载...`),ue.length>0)try{await Promise.allSettled(ue),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ie}`)}catch(we){console.warn("部分mesh文件加载失败,但继续显示模型",we)}p.traverse(we=>{we.isMesh&&(we.castShadow=!0,we.receiveShadow=!0,we.renderOrder=1,we.material&&(we.material.needsUpdate=!0))}),console.time("计算包围盒");const J=new Nn;J.expandByObject(p);const de=`urdf_${Date.now()}`;p.userData.boundingBox=J.clone(),p.userData.modelId=de,g0.set(de,{box:J.clone(),center:J.getCenter(new I),size:J.getSize(new I),maxSize:Math.max(...J.getSize(new I).toArray())}),pa.value=p,console.log("URDF模型加载完成并优化")}catch(J){console.error("URDF加载失败:",J),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:g0}}const z4={class:"panel-content"},B4={__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",z4,[(y.openBlock(),y.createBlock(Au,{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"]))])}}},O4=Pi._export_sfc(B4,[["__scopeId","data-v-9363d85a"]]),k4={class:"panel-content"},V4={key:0,class:"joints-list"},H4={class:"joint-info-row"},G4={class:"joint-left"},W4={class:"joint-name"},X4={class:"joint-range"},j4={class:"joint-type"},q4={key:0,class:"joint-control-row"},$4={class:"slider-container"},Y4=["min","max","value","onInput","disabled"],J4={class:"value-display"},K4={class:"joint-value"},Z4={class:"unit"},Q4={key:1,class:"empty-state"},hr=.001,e6=1e3,ko=60,t6={__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=()=>e6/ko/p.value;let v=[];y.watch(()=>t.animationData,se=>{var q;l.value=se.extra.管长,o.value=se.extra.外径/2;let j=((q=Ve.cloneDeep(se))==null?void 0:q.动画输出)??[];j&&j.length>0&&(v=j)},{deep:!0}),y.computed(()=>v.length>0);const x=(se,j=!1)=>se==="revolute"?j?Math.PI:-Math.PI:se==="prismatic"?j?1:-1:0,S=()=>{if(!i.value)return Fn.ElMessage.error("未加载 URDF"),!1;let se=null;return i.value.traverse(j=>{se||j.name==="Pipe_Link"&&j.traverse(q=>{q instanceof Bt&&!se&&(se=q)})}),se?(se.position.y-=c.value*hr,a.value=se,se.material=new mn({color:11184810,shininess:80,side:gn}),!0):(Fn.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},F=se=>{if(!se||!se.joints)return console.warn("URDF模型没有关节信息"),[];let j=null;if(se.traverse(ie=>{ie.name==="Pipe_Link"&&!j&&(j=ie)}),j)a.value=j;else return console.warn("未找到管子模型"),[];const q=[];return Object.keys(se.joints).forEach(ie=>{const ee=se.joints[ie];if(ee._jointType==="fixed")return;const ue=ee.limit?{lower:ee.limit.lower??x(ee._jointType,!1),upper:ee.limit.upper??x(ee._jointType,!0)}:{lower:x(ee._jointType,!1),upper:x(ee._jointType,!0)};q.push({name:ie,type:ee._jointType||"unknown",limit:ue,currentValue:ee.angle||0,urdfJoint:ee})}),q.sort((ie,ee)=>ie.name.localeCompare(ee.name))},C=(se,j)=>{const q=n.value.find(ee=>ee.name===se);if(!q)return;const ie=parseFloat(j);if(q.limit){const ee=Math.max(q.limit.lower,Math.min(q.limit.upper,ie));q.currentValue=ee}else q.currentValue=ie;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 ie=0;const ee=q.Y??0,ue=q.C??0,J=q.R??0;return ee>0&&(ie+=ee),ue>0&&J>0&&(ie+=J*_(ue)),j+ie},0),P=se=>{const j=[],q=se.Y??0,ie=se.B??0,ee=se.C??0,ue=se.R??0,J={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(J.pos.clone()),ie!==0){const de=new At().makeRotationAxis(J.localY,_(ie));J.localX.applyMatrix4(de),J.localZ.applyMatrix4(de)}if(q>0&&(J.pos.add(J.localY.clone().multiplyScalar(q*hr)),j.push(J.pos.clone())),ee>0&&ue>0){const de=_(ee),we=ue*hr,Ze=J.pos.clone().add(J.localX.clone().multiplyScalar(-we)),We=Math.max(16,Math.ceil(ee/5));for(let B=1;B<=We;B++){const bt=de*B/We,ht=new At().makeRotationAxis(J.localZ,bt),Ne=J.localX.clone().multiplyScalar(we).applyMatrix4(ht),tt=Ze.clone().add(Ne);j.push(tt)}}return j},A=(se,j=0)=>{let q=v.slice(0,se+1);const ie=v[se+1];if(ie&&j>0){const We={...ie,B:(ie.B??0)*j,C:(ie.C??0)*j};q.push(We)}const ee=R(q),ue=Math.max(0,l.value-ee),J=[];J.push(new I(0,0,0));const de=new I(0,ue*hr,0);ue>0&&J.push(de);let we={pos:de.clone(),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};const Ze=[];for(let We=q.length-1;We>=0;We--){const B=q[We],bt=P(B);if(bt.length>0){const ht=bt.map(Le=>{const st=Le.clone(),Yt=new At;return Yt.makeBasis(we.localX,we.localY,we.localZ),st.applyMatrix4(Yt),st.add(we.pos)});Ze.push(ht);const it=ht[ht.length-1];we.pos=it.clone();const Ne=B.B??0,tt=B.C??0;if(Ne!==0){const Le=new At().makeRotationAxis(we.localY,_(Ne));we.localX.applyMatrix4(Le),we.localZ.applyMatrix4(Le)}if(tt>0){const Le=_(tt),st=new At().makeRotationAxis(we.localZ,Le);we.localY.applyMatrix4(st),we.localX.applyMatrix4(st)}}}for(const We of Ze)We.length>1&&J.push(...We.slice(1));J.length<2&&J.push(new I(0,.001,0));try{const We=new ac(J,!1,"catmullrom",.01),B=new ka(We,Math.max(2,J.length*4),o.value*hr,18,!1);a.value.geometry.dispose(),a.value.geometry=B}catch(We){console.error("管件更新失败",We)}},E=(se,j,q=1)=>{se&&(Object.keys(se).forEach(ie=>{const ee=se[ie],ue=n.value.find(J=>J.name===ie);ue&&(ue.currentValue=ee,t.model&&t.model.setJointValue?t.model.setJointValue(ie,ee):ue.urdfJoint&&ue.urdfJoint.setJointValue(ee))}),A(j,q))},L=(se,j,q)=>se+(j-se)*q,z=(se,j,q)=>{if(!se||!j)return se||j;const ie={};return Object.keys(se).forEach(ee=>{const ue=se[ee],J=j[ee];ie[ee]=L(ue,J||ue,q)}),ie},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],ie=v[se+1];if(ie){const ee=z(q,ie,j);E(ee,se,j)}else E(q,se);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Q,f())},re=()=>{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:re,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)})},Me=()=>{const se=()=>{Ee(),r.value=requestAnimationFrame(se)};se()},me=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return y.onMounted(()=>{Me()}),y.onUnmounted(()=>{me(),G()}),(se,j)=>(y.openBlock(),y.createElementBlock("div",k4,[n.value.length>0?(y.openBlock(),y.createElementBlock("div",V4,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n.value,q=>{var ie,ee,ue,J;return y.openBlock(),y.createElementBlock("div",{key:q.name,class:"joint-item"},[y.createElementVNode("div",H4,[y.createElementVNode("div",G4,[y.createElementVNode("span",W4,y.toDisplayString(q.name),1),y.createElementVNode("span",X4," ["+y.toDisplayString(((ie=q.limit)==null?void 0:ie.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",j4,y.toDisplayString(q.type),1)]),q.type==="revolute"||q.type==="prismatic"?(y.openBlock(),y.createElementBlock("div",q4,[y.createElementVNode("div",$4,[y.createElementVNode("input",{type:"range",min:((ue=q.limit)==null?void 0:ue.lower)??(q.type==="revolute"?-Math.PI:-1),max:((J=q.limit)==null?void 0:J.upper)??(q.type==="revolute"?Math.PI:1),step:.01,value:q.currentValue,onInput:de=>C(q.name,de.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,Y4)]),y.createElementVNode("div",J4,[y.createElementVNode("span",K4,y.toDisplayString(q.currentValue?Number(q.currentValue).toFixed(3):"0.000"),1),y.createElementVNode("span",Z4,y.toDisplayString(q.type==="revolute"?"rad":"m"),1)])])):y.createCommentVNode("",!0)])}),128))])):(y.openBlock(),y.createElementBlock("div",Q4,j[0]||(j[0]=[y.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},n6=Pi._export_sfc(t6,[["__scopeId","data-v-b83e7f77"]]),i6={class:"panel-content"},s6="id",r6={__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",i6,[y.createVNode(_,{data:i.value,props:r,"default-expanded-keys":m.value,"node-key":s6,onNodeClick:o},null,8,["data","default-expanded-keys"])])}}},a6=Pi._export_sfc(r6,[["__scopeId","data-v-0dda287c"]]),o6=["xlink:href"],l6=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,o6)],6))],6))}}),dn=Pi._export_sfc(l6,[["__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 c6={class:"obj-viewer-container"},h6={class:"buttonGroup-top"},u6={class:"buttonGroup-topLeft"},d6={class:"buttonGroup-left"},f6={class:"buttonGroup-right"},p6={class:"buttonGroup-bottom"},m6={class:"left-panel"},g6={class:"panel-header"},_6={key:1,class:"clipping-content"},v6={class:"radio-group"},y6={class:"radio-label"},x6={class:"radio-label"},M6={class:"radio-label"},b6={class:"radio-label"},S6={class:"right-panel"},E6={class:"panel-header"},A6={key:0,class:"loading-overlay"},w6={__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:x,getThreeJSObjects:S,clearAllModels:F,cleanup:C}=x4(o),{loadUrdfFromUrl:R}=N4(S,_,a,l),{isAnimating:P,toggleAnimation:A,stopAnimation:E}=M4(S,_),{isClipping:L,activeClippingAxis:z,toggleClipping:H,updateClippingPlanes:Q}=b4(S,_),{urdfModel:re}=I4(S,_,a,l,F),G=()=>{if(c.value||_.value.length===0)return;c.value=!0,P.value&&E();const{camera:Me,controls:me}=S();if(!Me||!me)return;me.enabled=!0;const se=J=>J<.5?4*J*J*J:1-Math.pow(-2*J+2,3)/2,j=Me.position.clone(),q=me.target.clone(),ie=1500,ee=Date.now(),ue=()=>{const J=Date.now()-ee,de=Math.min(J/ie,1),we=se(de);Me.position.lerpVectors(j,p.value,we),me.target.lerpVectors(q,f.value,we),de<1?requestAnimationFrame(ue):c.value=!1};ue()},le=async()=>r?Promise.resolve():new Promise(Me=>{const me=()=>{r?Me():requestAnimationFrame(me)};me()}),Z=Me=>{d.value=!0,m.value=Me,Me==="剖面视图"&&!L.value&&H()},_e=Me=>{u.value=!0,h.value=Me,Me==="动画仿真"&&t("getAnimationData")},Ee=()=>{y.nextTick(()=>{var Me;(Me=g.value)==null||Me.startAnimation()})};return y.watch(()=>n.urdfUrl,async(Me,me)=>{if(Me)try{if(await le(),await R(Me)){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),Fn.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),y.onMounted(async()=>{await y.nextTick();try{v(),i=S().scene,r=!0,window.addEventListener("resize",x)}catch(Me){console.error("Three.js初始化失败:",Me)}}),y.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",x),P.value&&E(),C()}),(Me,me)=>{var j,q,ie,ee;const se=y.resolveComponent("el-scrollbar");return y.openBlock(),y.createElementBlock("div",c6,[y.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),y.createElementVNode("div",h6,[y.createVNode(dn,{name:"guanjianjiexi",size:"34"}),y.createVNode(dn,{name:"guanjiekongzhi",size:"34"}),y.createVNode(dn,{name:"gongyishengcheng",size:"34"}),y.createVNode(dn,{name:"buchangshezhi",size:"34"}),y.createVNode(dn,{name:"shuchujiagongchengxu",size:"34"})]),y.createElementVNode("div",u6,[y.createVNode(dn,{name:"viewReset",size:"24",onClick:G,title:"重置"}),y.createVNode(dn,{name:"fangda",size:"24",title:"放大"}),y.createVNode(dn,{name:"suoxiao",size:"24",title:"缩小"}),y.createVNode(dn,{name:"lookAround",size:"24",onClick:y.unref(A),title:y.unref(P)?"停止动画":"动画视图"},null,8,["onClick","title"])]),y.createElementVNode("div",d6,[y.createVNode(dn,{name:"jiegoushu",size:"24",onClick:me[0]||(me[0]=ue=>Z("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),y.createVNode(dn,{name:"clipping",size:"24",onClick:me[1]||(me[1]=ue=>Z("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),y.createVNode(dn,{name:"donghuafangzhen",size:"24",onClick:me[2]||(me[2]=ue=>Z("场景树3"))}),y.createVNode(dn,{name:"donghuafangzhen",size:"24",onClick:me[3]||(me[3]=ue=>Z("场景4"))})]),y.createElementVNode("div",f6,[y.createVNode(dn,{name:"donghuafangzhen",size:"24"}),y.createVNode(dn,{name:"donghuafangzhen",size:"24"}),y.createVNode(dn,{name:"guanjiekongzhi",size:"24",onClick:me[4]||(me[4]=ue=>_e("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),y.createVNode(dn,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:me[5]||(me[5]=ue=>_e("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),y.createVNode(dn,{name:"donghuafangzhen",size:"24"}),y.createVNode(dn,{name:"donghuafangzhen",size:"24"})]),y.createElementVNode("div",p6,[y.createVNode(dn,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(j=g.value)==null?void 0:j.fastBackward},null,8,["onClick"]),y.createVNode(dn,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Ee}),y.createVNode(dn,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(q=g.value)==null?void 0:q.fastForward},null,8,["onClick"]),y.createVNode(dn,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(ie=g.value)==null?void 0:ie.pauseAnimation},null,8,["onClick"]),y.createVNode(dn,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(ee=g.value)==null?void 0:ee.resetAll},null,8,["onClick"])]),y.withDirectives(y.createElementVNode("div",m6,[y.createElementVNode("div",g6,[y.createElementVNode("span",null,y.toDisplayString(m.value),1),y.createElementVNode("span",{class:"close",onClick:me[6]||(me[6]=ue=>d.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[m.value==="场景树"?(y.openBlock(),y.createBlock(a6,{key:0,model:y.unref(re)},null,8,["model"])):y.createCommentVNode("",!0),m.value==="剖面视图"?(y.openBlock(),y.createElementBlock("div",_6,[y.createElementVNode("div",v6,[y.createElementVNode("label",y6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":me[7]||(me[7]=ue=>y.isRef(z)?z.value=ue:null),onChange:me[8]||(me[8]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(z)]]),me[16]||(me[16]=y.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),y.createElementVNode("label",x6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":me[9]||(me[9]=ue=>y.isRef(z)?z.value=ue:null),onChange:me[10]||(me[10]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(z)]]),me[17]||(me[17]=y.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),y.createElementVNode("label",M6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":me[11]||(me[11]=ue=>y.isRef(z)?z.value=ue:null),onChange:me[12]||(me[12]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(z)]]),me[18]||(me[18]=y.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),y.createElementVNode("label",b6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":me[13]||(me[13]=ue=>y.isRef(z)?z.value=ue:null),onChange:me[14]||(me[14]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(z)]]),me[19]||(me[19]=y.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):y.createCommentVNode("",!0)]),_:1})],512),[[y.vShow,d.value]]),y.withDirectives(y.createElementVNode("div",S6,[y.createElementVNode("div",E6,[y.createElementVNode("span",null,y.toDisplayString(h.value),1),y.createElementVNode("span",{class:"close",onClick:me[15]||(me[15]=ue=>u.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[y.withDirectives(y.createVNode(n6,{ref_key:"jointRef",ref:g,model:y.unref(re),scene:y.unref(i),animationData:s.animationData},null,8,["model","scene","animationData"]),[[y.vShow,h.value==="关节控制"]]),y.withDirectives(y.createVNode(O4,{animationData:s.animationData},null,8,["animationData"]),[[y.vShow,h.value==="动画仿真"]])]),_:1})],512),[[y.vShow,u.value]]),a.value?(y.openBlock(),y.createElementBlock("div",A6,[me[20]||(me[20]=y.createElementVNode("div",{class:"loading-spinner"},null,-1)),y.createElementVNode("p",null,y.toDisplayString(l.value),1)])):y.createCommentVNode("",!0)])}}},gu=Pi._export_sfc(w6,[["__scopeId","data-v-e3790e10"]]),T6={class:"extra-button-content"},C6={class:"table-operator-wrap"},R6={class:"extra-button-filter"},D6={title:"条件查询"},L6={class:"form-content-value"},P6={key:0,class:"extra-header"},F6={__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=an.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 f;const g=y.resolveComponent("svg-icon"),_=y.resolveComponent("el-input"),p=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",T6,[y.createElementVNode("div",{class:y.normalizeClass(s.compName?"table-name-wrap":"")},y.toDisplayString(s.compName),3),y.createElementVNode("div",C6,[y.createElementVNode("div",R6,[y.createVNode(Ru,{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(Fn.search_default),clearable:"",onInput:l},{append:y.withCtx(()=>[y.createElementVNode("span",D6,[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",L6,[(y.openBlock(),y.createBlock(kn.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",P6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n==null?void 0:n.buttons,(v,x)=>(y.openBlock(),y.createElementBlock("div",{class:"extra-contents",key:x},[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)])])}}},N6=Pi._export_sfc(F6,[["__scopeId","data-v-e343d690"]]),U6=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))])}}}),I6=Pi._export_sfc(U6,[["__scopeId","data-v-73ec704e"]]),z6=Vl.useModelComp(Ve.pinia),{systemPath:_0}=Ve.storeToRefs(z6),ma=y.ref(),v0=new Map;function B6(s,e,t,n,i){const r=async u=>{try{const h=await kn.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,x=new cs().parse(f);x.preload(),h(x)}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 mn({color:8947848,side:gn}))},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 x=null;h&&h.length>0&&(h.length===1?x=await o(h[0]):x=await a(h));const S=new ls;x&&S.setMaterials(x);const F=S.parse(v);x||F.traverse(C=>{C.isMesh&&(C.material=new mn({color:8947848,side:gn}))}),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),x=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([v],x,{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`,z=new File([E],L,{type:E.type});F.push(z)}}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 J=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,we=[...v.matchAll(J)].map(B=>({x:parseFloat(B[1]),y:parseFloat(B[2]),z:parseFloat(B[3])})),Ze=new hn,We=we.flatMap(B=>[B.x,B.y,B.z]);if(Ze.setAttribute("position",new It(We,3)),f===".txt"){const B=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ze,B)}else if(f===".cpt"){const B=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(Ze,B)}}else if(f===".obj"){const J=new ls;if(g&&g.length>0){const de=new cs;for(const we of g){const Ze=await we.text(),We=de.parse(Ze);We.preload(),J.setMaterials(We);break}}p=J.parse(v),(!g||g.length===0)&&p.traverse(de=>{de.isMesh&&(de.material=new mn({color:"#B3B3D4"})),de instanceof Bt&&(de.material.side=gn)})}break;case".stl":const x=await h.arrayBuffer(),F=new ji().parse(x),C=new mn({color:"#B3B3D4",side:gn});p=new Bt(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 Pn,E=R.map(J=>new Promise((de,we)=>{new ji().load(_0.value===""?`/model/${J}`:`${_0.value}\\${J}`,We=>{const B=new mn({color:P[J]||"#B3B3D4",side:gn}),bt=new Bt(We,B);de(bt)},void 0,we)}));try{(await Promise.all(E)).forEach(de=>A.add(de)),p=A}catch(J){throw console.error("加载NC文件对应的STL文件失败:",J),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const L=new mu,z=new Pn;try{const J=await Fn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),de=new Blob([J.data],{type:"application/octet-stream;charset=UTF-8"}),we=await Fn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ze=new Blob([we.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((bt,ht)=>{const it=URL.createObjectURL(de);L.load(it,Ne=>{const tt=new Float32Array(Ne.geometry.attributes.position.count*3);for(let Le=0;Le<Ne.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Ne.geometry.setAttribute("color",new _n(tt,3)),Ne.material.vertexColors=!0,Ne.scale.set(.3,.3,.3),URL.revokeObjectURL(it),bt(Ne)},void 0,ht)}),B=await new Promise((bt,ht)=>{const it=URL.createObjectURL(Ze);L.load(it,Ne=>{const tt=new Float32Array(Ne.geometry.attributes.position.count*3);for(let Le=0;Le<Ne.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Ne.geometry.setAttribute("color",new _n(tt,3)),Ne.material.vertexColors=!0,Ne.scale.set(.3,.3,.3),URL.revokeObjectURL(it),bt(Ne)},void 0,ht)});z.add(We),z.add(B),p=z}catch(J){throw console.error("PCD文件加载失败:",J),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new _c,re="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,_e=new Map,Ee=async J=>{if(le.has(J))return console.log(`从缓存加载: ${J}`),le.get(J);try{const de=await Fn.axios.get(`${re}/${J}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),we=new Blob([de.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set(J,we),we}catch(de){throw console.error(`加载文件失败: ${J}`,de),new Error(`无法加载文件: ${J}`)}},Me=(J="default")=>{if(Z.has(J))return Z.get(J);const de=new mn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:ei});return Z.set(J,de),de},me=J=>{try{J.isBufferGeometry&&J.mergeVertices&&J.mergeVertices(),J.computeVertexNormals&&J.computeVertexNormals(),J.computeBoundingSphere&&J.computeBoundingSphere(),J.deleteAttribute&&J.deleteAttribute("uv2")}catch(de){console.warn("几何体优化失败,使用原始几何体:",de)}return J},se=async(J,de,we)=>{const Ze=`stl_${de}`;if(_e.has(Ze)){const ht=_e.get(Ze);return new Bt(ht,Me())}const We=await J.arrayBuffer();let bt=new ji(we).parse(We);return bt=me(bt),_e.set(Ze,bt),new Bt(bt,Me())},j=async(J,de,we)=>{const Ze=`obj_${de}`;if(le.has(Ze))return le.get(Ze).clone();const We=await J.text(),B=new ls(we),bt=de.replace(".obj",".mtl");try{const Ne=await(await Ee(bt)).text(),Le=new cs(we).parse(Ne);Le.preload(),B.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${bt}`)}const ht=B.parse(We);return ht.traverse(it=>{it.isMesh&&(it.geometry=me(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),le.set(Ze,ht),ht},q=(J,de)=>{const we=new k0;if(we.addLevel(J,0),J.geometry){const Ze=J.geometry.clone(),We=new Bt(Ze,J.material);we.addLevel(We,50)}return we};let ie=0,ee=0;const ue=[];Q.loadMeshCb=async(J,de,we,Ze,We)=>{const B=J.split("/").pop(),bt=we||(()=>{});ie++;const ht=new Promise(async(it,Ne)=>{try{const tt=await Ee(B);if(!tt||tt.size===0)throw new Error(`文件为空: ${B}`);const Le=B.split(".").pop().toLowerCase();let st;switch(Le){case"stl":st=await se(tt,B,de);break;case"obj":st=await j(tt,B,de);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&st.isMesh&&(st=q(st,B)),bt(st),ee++,Ze&&Ze({loaded:ee,total:ie,progress:ee/ie}),it(st)}catch(tt){console.error(`mesh文件加载失败: ${B}`,tt);const Le=new Pn;bt(Le),it(Le);const st=new $i(.1,.1,.1),Yt=new q0({color:16711680,wireframe:!0});return new Bt(st,Yt)}});ue.push(ht)};try{if(!H){ma.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ie}个mesh文件加载...`),ue.length>0)try{await Promise.allSettled(ue),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ie}`)}catch(we){console.warn("部分mesh文件加载失败,但继续显示模型",we)}p.traverse(we=>{we.isMesh&&(we.castShadow=!0,we.receiveShadow=!0,we.renderOrder=1,we.material&&(we.material.needsUpdate=!0))}),console.time("计算包围盒");const J=new Nn;J.expandByObject(p);const de=`urdf_${Date.now()}`;p.userData.boundingBox=J.clone(),p.userData.modelId=de,v0.set(de,{box:J.clone(),center:J.getCenter(new I),size:J.getSize(new I),maxSize:Math.max(...J.getSize(new I).toArray())}),ma.value=p,console.log("URDF模型加载完成并优化")}catch(J){console.error("URDF加载失败:",J),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:v0}}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 _u=Ve.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(s){this.selectArray=s},setSelectString(s){this.selectString=s}}}),O6={class:"calculator-content"},k6={class:"calculator-child"},V6={class:"calculator-child"},H6=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",O6,[y.createElementVNode("div",k6,[y.createVNode(kn.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),y.createElementVNode("div",V6,[y.createVNode(kn.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),G6=Pi._export_sfc(H6,[["__scopeId","data-v-73db0fe7"]]),vu=Ve.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(s){this.selectIndex=s},setSelectMenu(s){this.selectMenu=s},setSelectTitle(s){this.selectTitle=s}}}),yu=(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=yu(a,n))}),Object.assign(o,{id:r})}else return i})),t},xu=(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=xu(c,(d=i==null?void 0:i[o])==null?void 0:d.children,t)),c}))),r}),n},W6=(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 X6(s,n,t)}},X6=(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=Mu(r,i,t)),r)),n},Mu=(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=Mu(a,i,t)),a)),n},j6=(s,e,t)=>{if(e==="")return t;{const n=e.split("-");return q6(s,n,t)}},q6=(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=bu(r,i,t)),r)),n},bu=(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=bu(o,i,t)),o)),n},Su=Ve.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Eu=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 an.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,p;(u==null?void 0:u.name)===(((p=(_=(g=(h=Ve.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(an.getValueToObjectValue(_,h))})}return t},$6={class:"table-content"},Y6={class:"menu-config-wrap"},J6=["onClick"],K6={key:0,class:"viewport-wrap"},Z6=["onClick"],Q6={title:"选择显示列信息"},e5={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","max-height":"300px",width:"300px",overflow:"auto"}},t5={class:"file-list-pop"},n5=["title","onClick"],i5=["onClick"],s5={class:"form-content"},r5={key:0,class:"dialog-footer"},a5={class:"dialog-footer"},o5={__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=Eu(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(),{activeMenuPath:g}=Ve.storeToRefs(h),_=Su(Ve.pinia),p=Vl.useModelComp(Ve.pinia),{extraContents:f}=Ve.storeToRefs(p),v=y.ref([]);y.ref(!1);const x=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(),z=y.ref([]),H=y.ref([]),Q=y.ref(!1),re=y.ref(),G=y.ref([]),le=y.ref([]),Z=y.ref([]),_e=y.ref(),Ee=y.ref(),Me=_u(Ve.pinia),me=y.ref(),se=vu(Ve.pinia),{selectIndex:j,selectMenu:q,selectTitle:ie}=Ve.storeToRefs(se),{selectString:ee}=Ve.storeToRefs(Me),ue=Tu.useLoginState(Ve.pinia),{loginUserInfo:J}=Ve.storeToRefs(ue),de=y.ref(720),we=y.ref(!1),Ze=y.ref([]),We=y.ref(),B=y.ref(!0),bt=$=>{Ze.value=$},ht=($,W)=>{We.value===W?B.value=!1:B.value=!0,We.value=W==null?void 0:W.changeProp},it=y.computed(()=>{var $;return($=a.value)==null?void 0:$.filter(W=>(W==null?void 0:W.label)!=="操作")}),Ne=()=>{P.value=!1},tt=$=>{o("clickTrigger",$)},Le=async $=>{var fe,ge,pe,Ue,Te,Ce,Ye,te,ke,Xe;const W=$==null?void 0:$.row;if((fe=W==null?void 0:W.toString())!=null&&fe.includes(".urdf")){re.value=W,c.value=!0;return}let ce=[];if((ge=W==null?void 0:W.toString())!=null&&ge.includes(".stl")||(pe=W==null?void 0:W.toString())!=null&&pe.includes(".STL")||(Ue=W==null?void 0:W.toString())!=null&&Ue.includes(".obj")||(Te=W==null?void 0:W.toString())!=null&&Te.includes(".mtl")){let ut,St=[],w={};if(Array.isArray(W)?ut=W:ut=W==null?void 0:W.split(","),ut==null||ut.forEach(O=>{O.includes(".mtl")?St.push(O):w.blob=w.blob?w.blob+","+O:O}),(St==null?void 0:St.length)>0&&(w.mtlBlobs=St),(Ye=(Ce=Object.values(w))==null?void 0:Ce[0])!=null&&Ye.includes("http:"))ce.push(w);else{const O=new Blob([w.blob],{type:"application/octet-stream;charset=UTF-8"});let Y=URL.createObjectURL(O),k="";(te=W==null?void 0:W.split("/"))==null||te.forEach((X,ne)=>{var ye;ne===((ye=W==null?void 0:W.split("/"))==null?void 0:ye.length)-1&&(k=X)}),(ke=w.blob)!=null&&ke.includes(".stl")&&(k=(k==null?void 0:k.replaceAll(">",""))+".urdf"),u.value=[{name:k,blobUrl:Y}],m.value=!0}}else{const ut=await axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}}),St=new Blob([ut.data],{type:"application/octet-stream;charset=UTF-8"});let w=URL.createObjectURL(St),O="";(Xe=W==null?void 0:W.split("/"))==null||Xe.forEach((Y,k)=>{var X;k===((X=W==null?void 0:W.split("/"))==null?void 0:X.length)-1&&(O=Y)}),u.value=[{name:O,blobUrl:w}],m.value=!0}(ce==null?void 0:ce.length)>0&&n.setBlobUrls(ce)},st=$=>{var fe,ge,pe,Ue;const W=(Ue=(fe=$==null?void 0:$.url)==null?void 0:fe.split("."))==null?void 0:Ue[((pe=(ge=$==null?void 0:$.url)==null?void 0:ge.split("."))==null?void 0:pe.length)-1];return($==null?void 0:$.name)+"."+W},Yt=async $=>{const W=await kn.downloadAvatarApi({url:$==null?void 0:$.url}),ce=URL.createObjectURL(W.data),ge={name:st($),blobUrl:ce};u.value=[ge],m.value=!0},V=async $=>{const W=await kn.downloadAvatarApi({url:$==null?void 0:$.url}),ce=URL.createObjectURL(W.data),ge={name:st($),blobUrl:ce},pe=document.createElement("a");pe.href=ge.blobUrl,pe.download=ge.name,pe.style.display="none",document.body.appendChild(pe),pe.click(),setTimeout(()=>{document.body.removeChild(pe)},100)},T=($,W)=>{if(Object.values(W).length!==0)return Object.values(W).find(ce=>{var fe,ge,pe;return((fe=ce==null?void 0:ce.toString())==null?void 0:fe.includes(".txt"))||((ge=ce==null?void 0:ce.toString())==null?void 0:ge.includes(".cpt"))||((pe=ce==null?void 0:ce.toString())==null?void 0:pe.includes(".obj"))})?[...$,A.value]:$},ae=$=>{var ge;ee.value===""?$==null||$[0]:($==null?void 0:$.find(pe=>(pe==null?void 0:pe.selectLabel)==="("+ee.value+")"))??($==null||$.find(pe=>!(pe!=null&&pe.selectLabel)));let W=$;(ge=a.value)!=null&&ge.find(pe=>pe.prop==="index");let ce=_e.value;const fe=[];return W==null||W.forEach((pe,Ue)=>{var Ce;let Te={};if(Array.isArray(pe)){let Ye=[];pe==null||pe.filter(te=>!(te!=null&&te.id)).forEach((te,ke)=>{var Xe,ut,St,w,O;if((Xe=ce==null?void 0:ce[ke])!=null&&Xe.prop&&!Array.isArray(te)){let Y={};Y[ce[ke].column]=te,f!=null&&f.value&&((ut=f==null?void 0:f.value)==null?void 0:ut.length)>0&&((St=f==null?void 0:f.value)!=null&&St.find(k=>JSON.stringify(k==null?void 0:k[0])===JSON.stringify(Y)))&&(Ye=(w=f==null?void 0:f.value)==null?void 0:w.find(k=>JSON.stringify(k==null?void 0:k[0])===JSON.stringify(Y))),Ye&&Ye.length>0?Te[ce[ke].prop]=Ye!=null&&Ye.find(k=>{var X;return((X=Object.keys(k))==null?void 0:X[0])===ce[ke].column})?(O=Ye==null?void 0:Ye.find(k=>{var X;return((X=Object.keys(k))==null?void 0:X[0])===ce[ke].column}))==null?void 0:O[ce[ke].column]:te:Te[ce[ke].prop]=te}})}else Te=pe;Array.isArray(pe)&&pe.some(Ye=>Ye==null?void 0:Ye.id)?fe.push(Object.assign(Te,{id:(Ce=pe==null?void 0:pe.find(Ye=>Ye.id))==null?void 0:Ce.id})):Te.id?fe.push(Te):fe.push(Object.assign(Te,{id:Ue}))}),fe},be=async $=>{var ge,pe,Ue,Te,Ce;let W={};for(let Ye in $)$[Ye]!==""&&(W["tableData."+Ye]=$[Ye]);const ce=await an.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:g.value},W),fe=(Ue=(pe=(ge=Ve.cloneDeep(ce))==null?void 0:ge.data)==null?void 0:pe.result)==null?void 0:Ue.map(Ye=>{var ke;let te=[];return te.push({id:Ye.id}),te.push((ke=Ye==null?void 0:Ye.value)==null?void 0:ke.tableData),te});v.value=ae(an.getTableContents(fe,(Ce=(Te=Ve.cloneDeep(a.value))==null?void 0:Te.map(Ye=>Ye.label))==null?void 0:Ce.filter(Ye=>Ye!=="操作")))},Re=async $=>{var fe,ge,pe,Ue,Te,Ce,Ye,te,ke,Xe,ut,St,w,O;const W=(fe=Ve.cloneDeep(a.value))==null?void 0:fe.filter(Y=>Y==null?void 0:Y.isRoute);if((W==null?void 0:W.length)>0){let Y=(ge=W==null?void 0:W[0])==null?void 0:ge.prop,k=Ve.cloneDeep(g).value+"/"+($==null?void 0:$[Y]),X=Ve.cloneDeep(g).value,ne=await an.getItemData(k,sessionStorage.getItem("systemKey"),"");if((ne==null?void 0:ne.length)>0)await an.loadingConstruct(k,k+`/updateLoading${(pe=J.value)==null?void 0:pe.account}`),p.setRouteToChildPath(X),h.setActiveMenuPath(k+`/updateLoading${(Ue=J.value)==null?void 0:Ue.account}`);else{let ye=(Te=W==null?void 0:W[0])==null?void 0:Te.prop,oe=Ve.cloneDeep(g).value+"/"+($==null?void 0:$[ye]),De=Ve.cloneDeep(g).value;await an.getItemData(De+"/",sessionStorage.getItem("systemKey"),""),await an.loadingConstruct(De+"/",oe),await an.loadingConstruct(oe,oe+`/updateLoading${(Ce=J.value)==null?void 0:Ce.account}`),p.setRouteToChildPath(De),h.setActiveMenuPath(oe+`/updateLoading${(Ye=J.value)==null?void 0:Ye.account}`)}}let ce=await an.getItemData(g.value,sessionStorage.getItem("systemKey"),$.id);if(ce=ce==null?void 0:ce.filter(Y=>Y.comp!=="methodButton"),ce&&ce.length>0){const Y=!Array.isArray(ie.value)&&((te=ie.value)==null?void 0:te.key)!=="main"?[]:ie.value;Y.push({key:q.value===""?(ke=$==null?void 0:$.id)==null?void 0:ke.toString():q.value+"-"+((Xe=$==null?void 0:$.id)==null?void 0:Xe.toString()),value:$[(ut=Object.keys($))==null?void 0:ut.filter(k=>k!=="index"&&k!=="id")[0]]}),se.setSelectMenu(q.value===""?(St=$==null?void 0:$.id)==null?void 0:St.toString():q.value+"-"+((w=$==null?void 0:$.id)==null?void 0:w.toString())),se.setSelectTitle(Y),se.setSelectIndex((O=$==null?void 0:$.id)==null?void 0:O.toString()),o("pageChange",ce)}},ve=$=>{var W;(W=Ve.cloneDeep(r.itemData))==null||W.map(ce=>((ce==null?void 0:ce.key)==="tableContents"&&(ce.contents=$),ce))},_t=async($,W,ce,fe)=>{var pe,Ue,Te,Ce,Ye,te,ke;if((fe==null?void 0:fe.data)==="查看"&&($!=null&&$.every(Xe=>(Xe==null?void 0:Xe.url)&&(Xe==null?void 0:Xe.name)))){let Xe=Ve.cloneDeep($);Xe=await((pe=Ve.cloneDeep(Xe))==null?void 0:pe.map(async St=>{var Y,k,X,ne;const w=await kn.downloadAvatarApi({url:St==null?void 0:St.url});let O=URL.createObjectURL(w.data);return{name:(St==null?void 0:St.name)+"."+((ne=(Y=St==null?void 0:St.url)==null?void 0:Y.split("."))==null?void 0:ne[((X=(k=St==null?void 0:St.url)==null?void 0:k.split("."))==null?void 0:X.length)-1]),blobUrl:O}}));let ut=await Promise.all(Xe);u.value=ut,m.value=!0}o("contentClick",$,W,ce,{id:r==null?void 0:r.index,type:"table"});const ge=Ve.cloneDeep(a.value);if((fe==null?void 0:fe.isMainKey)===!0&&(ge==null?void 0:ge.length)>0){(Ue=ge==null?void 0:ge[0])==null||Ue.prop;let Xe=Ve.cloneDeep(g).value+"/"+(fe==null?void 0:fe.data),ut=Ve.cloneDeep(g).value,St=await an.getItemData(Xe,sessionStorage.getItem("systemKey"),"");if((St==null?void 0:St.length)>0)await an.loadingConstruct(Xe,Xe+`/updateLoading${(Te=J.value)==null?void 0:Te.account}`),p.setRouteToChildPath(ut),h.setActiveMenuPath(Xe+`/updateLoading${(Ce=J.value)==null?void 0:Ce.account}`);else{(Ye=ge==null?void 0:ge[0])==null||Ye.prop;let w=Ve.cloneDeep(g).value+"/"+(fe==null?void 0:fe.data),O=Ve.cloneDeep(g).value;await an.getItemData(O+"/",sessionStorage.getItem("systemKey"),""),await an.loadingConstruct(O+"/",w),await an.loadingConstruct(w,w+`/updateLoading${(te=J.value)==null?void 0:te.account}`),p.setRouteToChildPath(O),h.setActiveMenuPath(w+`/updateLoading${(ke=J.value)==null?void 0:ke.account}`)}}},Qe=()=>{m.value=!1},pt=$=>{o("rowClick",$)};y.watch(()=>r.changedContent,()=>{var ce,fe;if(!r.changedContent)return;let $=(ce=v.value)==null?void 0:ce.map(ge=>{var pe;return ge.id===((pe=r.changedContent)==null?void 0:pe.id)&&(ge={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete ge.newId),ge});const W=(fe=r.itemData)==null?void 0:fe.map(ge=>((ge==null?void 0:ge.key)==="tableContents"&&(ge.contents=$),ge));v.value=$,o("contentChange",{contents:W,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 vt=()=>{},Pe=($,W,ce)=>{var fe,ge,pe,Ue,Te,Ce,Ye,te;if(x.value="",Q.value=!0,S.value=!0,o("onButtonClick",$,W),$==="删除"){v.value=(fe=Ve.cloneDeep(v.value))==null?void 0:fe.filter(Xe=>(Xe==null?void 0:Xe.id)!==(W==null?void 0:W.id));const ke=W6(me.value,q.value,W==null?void 0:W.id);ve(ke),o("change",{content:v.value,singleContent:W,index:r==null?void 0:r.index,type:"delete",buttonName:$,column:a.value})}else if($==="批量删除"){if(((ge=Ze.value)==null?void 0:ge.length)===0)return Fn.ElMessage.warning("请先勾选操作的数据");o("change",{content:v.value,singleContent:null,selectItems:Ze.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:$,column:a.value})}else if($==="复制新增"){R.value="新增";const ke=Ve.cloneDeep(W),Xe=(pe=a.value)==null?void 0:pe.find(w=>w==null?void 0:w.isMainKey),ut=Xe||((Ue=a.value)==null?void 0:Ue[0]),St=(Te=le.value)==null?void 0:Te.find(w=>(w==null?void 0:w.label)==="新建");Je(!0,St,{data:ke,firstCol:ut})}else if($==="新增")R.value="新增",K(""),P.value=!0;else if($==="编辑")R.value="编辑",K(W),P.value=!0;else if($==="查看")R.value="查看",K(W),Q.value=!1,S.value=!1,P.value=!0;else if($==="查看三维模型"){const ke={};for(let ut in W)ut!=="id"&&(ke[ut]=W[ut]);let Xe=(Ce=Object.values(ke))==null?void 0:Ce[1];_.setTableShowThree(Xe)}else if(((Ye=ce==null?void 0:ce.extra)==null?void 0:Ye.type)==="modelExample")R.value=$,E.value=!0;else if($==="新建"){const ke=(te=le.value)==null?void 0:te.find(Xe=>(Xe==null?void 0:Xe.label)==="新建");Je(!1,ke)}else if($==="修改模板"){let ke=Ve.cloneDeep(g).value;p.setRouteToChildPath(ke),h.setActiveMenuPath(ke+"/")}},lt=async $=>{var ce,fe,ge,pe,Ue,Te;const W=await Fn.getInsofDataApi({key:{pageKey:$,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((ce=W==null?void 0:W.data)==null?void 0:ce.code)===200)return Array.isArray((fe=W==null?void 0:W.data)==null?void 0:fe.result)&&((pe=(ge=W==null?void 0:W.data)==null?void 0:ge.result)==null?void 0:pe.length)>0?(Te=(Ue=W==null?void 0:W.data)==null?void 0:Ue.result)==null?void 0:Te.map(Ce=>{var Ye;return{id:Ce==null?void 0:Ce.id,...(Ye=Ce==null?void 0:Ce.value)==null?void 0:Ye.pageData}}):[]},Dt=($,W,ce,fe)=>{var ge;o("contentChange",{contents:(ge=$==null?void 0:$.compData)==null?void 0:ge.map(pe=>{var Ue;return(pe==null?void 0:pe.key)==="formContent"?{...pe,contents:(Ue=pe==null?void 0:pe.contents)==null?void 0:Ue.map(Te=>(Te==null?void 0:Te.key)===W?{...Te,value:ce}:Te)}:pe}),index:$==null?void 0:$.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(fe)},Ct=($,W)=>{let ce=$==null?void 0:$[W==null?void 0:W.prop],fe=1;if(v.value.some(ge=>(ge==null?void 0:ge[W==null?void 0:W.prop])===ce)){const ge=ce;for(;v.value.some(pe=>(pe==null?void 0:pe[W==null?void 0:W.prop])===`${ge}(${fe})`);)fe++;ce=`${ge}(${fe})`}return ce},Je=async($,W,ce)=>{var Ue,Te,Ce,Ye,te;let fe,ge;const pe=Ct(ce==null?void 0:ce.data,ce==null?void 0:ce.firstCol);if(console.log(1234,pe,W),$?(fe=Ve.cloneDeep(g).value+"/"+((Ce=ce==null?void 0:ce.data)==null?void 0:Ce[(Te=ce==null?void 0:ce.firstCol)==null?void 0:Te.prop]),ge=Ve.cloneDeep(g).value+"/"+pe):(fe=Ve.cloneDeep(g).value+"/",ge=Ve.cloneDeep(fe)+`loading${(Ue=J.value)==null?void 0:Ue.account}`),W){const ke=await an.getItemData(ge,sessionStorage.getItem("systemKey"),"");if((ke==null?void 0:ke.length)>0)if($){const Xe=ke==null?void 0:ke.find(ut=>{var St;return((St=ut==null?void 0:ut.comp)==null?void 0:St.toUpperCase())==="FORM"});Xe&&Dt(Xe,(Ye=ce==null?void 0:ce.firstCol)==null?void 0:Ye.label,pe,g.value)}else p.setRouteToChildPath(Ve.cloneDeep(g).value),h.setActiveMenuPath(ge);else if(await an.loadingConstruct(fe,ge),$){const Xe=await lt(ge);if((Xe==null?void 0:Xe.length)>0){const ut=Xe==null?void 0:Xe.find(St=>{var w;return((w=St==null?void 0:St.comp)==null?void 0:w.toUpperCase())==="FORM"});ut&&Dt(ut,(te=ce==null?void 0:ce.firstCol)==null?void 0:te.label,pe,g.value)}}else p.setRouteToChildPath(Ve.cloneDeep(g).value),h.setActiveMenuPath(ge)}else $?(x.value="",Ee.value=ce==null?void 0:ce.data,at(!0,ce==null?void 0:ce.firstCol,pe)):(p.setRouteToChildPath(Ve.cloneDeep(g).value),h.setActiveMenuPath(ge))},Pt=()=>{c.value=!1,re.value=null},K=$=>{var ge,pe,Ue,Te,Ce,Ye;const W=[];let ce=[];for(let te in $)Array.isArray($==null?void 0:$[te])&&ce.push(te);l.value=Ve.cloneDeep(a.value),(pe=an.getColumnChild((ge=Ve.cloneDeep(a.value))==null?void 0:ge.filter(te=>(te==null?void 0:te.label)!=="操作")))==null||pe.forEach((te,ke)=>{var Xe;ce.find(ut=>ut===(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"+ke,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:($==null?void 0:$[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??ke,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"+ke,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:($==null?void 0:$[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??ke,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden}))}),$===""||!$||(x.value=($==null?void 0:$.id)??"");let fe=an.getColumnChild((Ue=Ve.cloneDeep(a.value))==null?void 0:Ue.filter(te=>(te==null?void 0:te.label)!=="操作"));z.value&&((Te=z.value)==null?void 0:Te.length)>0&&(z.value=(Ce=Ve.cloneDeep(z).value)==null?void 0:Ce.map(te=>{var Xe;let ke=(Xe=fe==null?void 0:fe.find(ut=>(ut==null?void 0:ut.label)===(te==null?void 0:te.label)))==null?void 0:Xe.prop;return ke&&(te.value=$[ke]),te})),Z.value=z.value&&((Ye=z.value)==null?void 0:Ye.length)>0?an.getTableFormToForm(z.value):W},nt=async()=>{var W;await y.nextTick();const $=(W=i.value)==null?void 0:W.$el;$&&an.Sortable.create($,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ce=>{var Ue;const{oldIndex:fe,newIndex:ge}=ce;if(fe===ge)return;const pe=it.value.splice(fe,1)[0];it.value.splice(ge,0,pe),a.value=(Ue=a.value)==null?void 0:Ue.slice().sort((Te,Ce)=>{var Ye,te;return Te.label==="操作"?1:Ce.label==="操作"?-1:((Ye=it.value)==null?void 0:Ye.indexOf(Te))-((te=it.value)==null?void 0:te.indexOf(Ce))})}})};y.onMounted(()=>{L.value=window.innerWidth-240*2});const Fe=()=>{y.nextTick(()=>{nt()})},at=($=!0,W,ce)=>{var Ue;let fe=an.getColumnChild((Ue=Ve.cloneDeep(a.value))==null?void 0:Ue.filter(Te=>(Te==null?void 0:Te.label)!=="操作")),ge,pe=Ve.cloneDeep(v.value);if(!Ee.value){P.value=!1;return}if(x.value===""){F.value++;let Te;W&&ce?Te={id:F.value,[W==null?void 0:W.prop]:ce}:Te={id:F.value},pe.push(Object.assign(Ee.value,Te)),ge=Object.assign(Ee.value,Te)}else pe=pe==null?void 0:pe.map(Te=>{var Ce,Ye;if((Te==null?void 0:Te.id)===x.value){let te={};for(let ke in Te){let Xe=(Ce=fe==null?void 0:fe.find(ut=>(ut==null?void 0:ut.prop)===ke))==null?void 0:Ce.label;Xe?te[ke]=(Ye=Ee.value)==null?void 0:Ye[Xe]:te[ke]=Te[ke]}Te=Object.assign(te,Ee.value),ge=Te}return Te});if(v.value=pe,$){const Te=j6(me.value,q.value,pe);ve(Te),P.value=!1,Ee.value=void 0,o("change",{content:Te,singleContent:ge,index:r==null?void 0:r.index,buttonName:R.value,column:a.value})}},Oe=async($,W,ce)=>{var Ye,te,ke,Xe,ut,St,w,O,Y,k,X;We.value=ce==null?void 0:ce.prop;const fe=Ve.cloneDeep(r.itemData),ge=fe==null?void 0:fe.map(ne=>{var ye;return(ne==null?void 0:ne.key)==="header"&&((ye=ne.contents)==null||ye.map((oe,De)=>{var Se,Be,Ge,ct,Et,yt,Nt,xt,rt,Xt,Ut,Zt,Wt,Ie,Qt,Rt,tn,un,Kt;return oe.type=oe!=null&&oe.type?oe.type:(ct=(Ge=(Be=(Se=oe==null?void 0:oe.key)==null?void 0:Se.split("$"))==null?void 0:Be[1])==null?void 0:Ge.split("("))!=null&&ct[0]?(yt=(Et=an.FormType)==null?void 0:Et.find(je=>{var He,rn,mt,fn;return(je==null?void 0:je.key)===((fn=(mt=(rn=(He=oe==null?void 0:oe.key)==null?void 0:He.split("$"))==null?void 0:rn[1])==null?void 0:mt.split("("))==null?void 0:fn[0])}))==null?void 0:yt.value:"Input",oe.options=oe!=null&&oe.options?oe.options:((rt=(xt=(Nt=oe==null?void 0:oe.key)==null?void 0:Nt.split("$"))==null?void 0:xt[1])==null?void 0:rt.length)>0?(Wt=(Zt=Ho((Ut=(Xt=oe==null?void 0:oe.key)==null?void 0:Xt.split("$"))==null?void 0:Ut[1]))==null?void 0:Zt.split(","))==null?void 0:Wt.map(je=>({label:je,value:je})):[],(Ie=oe==null?void 0:oe.key)!=null&&Ie.includes("$")&&(oe.key=(Rt=(Qt=oe==null?void 0:oe.key)==null?void 0:Qt.split("$"))==null?void 0:Rt[0]),oe.value=(tn=Object.values(W))==null?void 0:tn[De],oe.optionUrl=oe!=null&&oe.formMenuSelect&&((un=oe==null?void 0:oe.formMenuSelect)==null?void 0:un.length)>0?{groupSelect:(Kt=oe==null?void 0:oe.groupSelect)==null?void 0:Kt.split(/[::]/).map(je=>je.trim()),menuSelect:oe==null?void 0:oe.formMenuSelect,selectRelateType:"",type:(oe==null?void 0:oe.formType)??(oe!=null&&oe.groupSelect?"Select":"")}:null,oe})),ne});let pe=Ve.cloneDeep(Z.value),Ue=(te=(Ye=Ve.cloneDeep(ge))==null?void 0:Ye.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:te.contents;pe=pe==null?void 0:pe.map(ne=>{var ye;return ne.value=(ye=Ue==null?void 0:Ue.find((oe,De)=>De===(ne==null?void 0:ne.id)))==null?void 0:ye.value,ne});let Te="",Ce=(ut=(Xe=(ke=Ve.cloneDeep(ge))==null?void 0:ke.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:Xe.contents)==null?void 0:ut.find((ne,ye)=>{var oe,De;return(ne==null?void 0:ne.label)===We.value||(ye==null?void 0:ye.toString())===((De=(oe=We.value)==null?void 0:oe.split("a"))==null?void 0:De[1].toString())});if((O=(w=(St=Ve.cloneDeep(ge))==null?void 0:St.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:w.contents)==null||O.forEach(ne=>{var ye,oe,De,Se,Be;Te===""&&((De=(oe=(ye=ne==null?void 0:ne.optionUrl)==null?void 0:ye.groupSelect)==null?void 0:oe[1])!=null&&De.includes("["))&&(Te=(Be=(Se=ne==null?void 0:ne.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Be[1])}),(Y=Ce==null?void 0:Ce.optionUrl)!=null&&Y.menuSelect){let ne=await kl(Ce),ye;if(ne==null||ne.forEach(oe=>{var De,Se,Be,Ge,ct,Et,yt,Nt,xt,rt;Te===((Se=(De=Ce==null?void 0:Ce.optionUrl)==null?void 0:De.groupSelect)==null?void 0:Se[1])&&((ct=(Ge=(Be=Ce==null?void 0:Ce.optionUrl)==null?void 0:Be.groupSelect)==null?void 0:Ge[1])!=null&&ct.includes("["))&&((rt=Ve.cloneDeep(oe))==null?void 0:rt[(xt=(Nt=(yt=(Et=Ce==null?void 0:Ce.optionUrl)==null?void 0:Et.groupSelect)==null?void 0:yt[1])==null?void 0:Nt.replaceAll("[",""))==null?void 0:xt.replaceAll("]","")])===(Ce==null?void 0:Ce.value)&&(ye=oe)}),ye){let oe=Ve.cloneDeep(pe);oe=oe==null?void 0:oe.map(Se=>{var Be,Ge,ct,Et,yt,Nt,xt,rt,Xt,Ut,Zt;return(ye!=null&&ye[Se==null?void 0:Se.label]||ye!=null&&ye[(Et=(ct=(Ge=(Be=Se==null?void 0:Se.optionUrl)==null?void 0:Be.groupSelect)==null?void 0:Ge[1])==null?void 0:ct.replaceAll("[",""))==null?void 0:Et.replaceAll("]","")])&&((xt=(Nt=(yt=Se==null?void 0:Se.optionUrl)==null?void 0:yt.groupSelect)==null?void 0:Nt[1])!=null&&xt.includes("["))&&(Se.value=(ye==null?void 0:ye[Se==null?void 0:Se.label])||(ye==null?void 0:ye[(Zt=(Ut=(Xt=(rt=Se==null?void 0:Se.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Xt[1])==null?void 0:Ut.replaceAll("[",""))==null?void 0:Zt.replaceAll("]","")])),Se}),v.value=(k=Ve.cloneDeep(v.value))==null?void 0:k.map(Se=>{if((Se==null?void 0:Se.id)===(W==null?void 0:W.id)){const Be={};return oe==null||oe.forEach(Ge=>{Be[Ge.name]=Ge.value}),Be.id=Se==null?void 0:Se.id,Be}return Se});let De=Ve.cloneDeep(oe);De=De==null?void 0:De.map(Se=>{var Be,Ge,ct,Et;return(Ge=(Be=Se==null?void 0:Se.optionUrl)==null?void 0:Be.menuSelect)!=null&&Ge.some(yt=>yt==null?void 0:yt.includes)&&(Se.optionUrl.menuSelect=(Et=(ct=Se==null?void 0:Se.optionUrl)==null?void 0:ct.menuSelect)==null?void 0:Et.map(yt=>{var Nt,xt,rt,Xt;if(yt!=null&&yt.includes("[")){let Ut=(xt=(Nt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Nt.split(":"))==null?void 0:xt[1];yt=(Xt=(rt=Ve.cloneDeep(oe))==null?void 0:rt.find(Zt=>(Zt==null?void 0:Zt.label)===Ut))==null?void 0:Xt.value}return yt})),Se}),v.value=(X=Ve.cloneDeep(v.value))==null?void 0:X.map(Se=>{if((Se==null?void 0:Se.id)===(W==null?void 0:W.id)){const Be={};return De==null||De.forEach(Ge=>{Be[Ge.name]=Ge.value}),Be.id=Se==null?void 0:Se.id,Be}return Se})}}},Ae=async $=>{var Te,Ce,Ye,te,ke,Xe,ut,St,w;if(!$)return;Ee.value=$,o("onFormChange",$);const W=Ve.cloneDeep(r.itemData),ce=W==null?void 0:W.map(O=>{var Y;return(O==null?void 0:O.key)==="header"&&((Y=O.contents)==null||Y.map((k,X)=>{var ne,ye,oe,De,Se,Be,Ge,ct,Et,yt,Nt,xt,rt,Xt,Ut,Zt,Wt,Ie,Qt;return k.type=k!=null&&k.type?k.type:(De=(oe=(ye=(ne=k==null?void 0:k.key)==null?void 0:ne.split("$"))==null?void 0:ye[1])==null?void 0:oe.split("("))!=null&&De[0]?(Be=(Se=an.FormType)==null?void 0:Se.find(Rt=>{var tn,un,Kt,je;return(Rt==null?void 0:Rt.key)===((je=(Kt=(un=(tn=k==null?void 0:k.key)==null?void 0:tn.split("$"))==null?void 0:un[1])==null?void 0:Kt.split("("))==null?void 0:je[0])}))==null?void 0:Be.value:"Input",k.options=k!=null&&k.options?k.options:((Et=(ct=(Ge=k==null?void 0:k.key)==null?void 0:Ge.split("$"))==null?void 0:ct[1])==null?void 0:Et.length)>0?(rt=(xt=Ho((Nt=(yt=k==null?void 0:k.key)==null?void 0:yt.split("$"))==null?void 0:Nt[1]))==null?void 0:xt.split(","))==null?void 0:rt.map(Rt=>({label:Rt,value:Rt})):[],(Xt=k==null?void 0:k.key)!=null&&Xt.includes("$")&&(k.key=(Zt=(Ut=k==null?void 0:k.key)==null?void 0:Ut.split("$"))==null?void 0:Zt[0]),k.value=(Wt=Object.values($))==null?void 0:Wt[X],k.optionUrl=k!=null&&k.formMenuSelect&&((Ie=k==null?void 0:k.formMenuSelect)==null?void 0:Ie.length)>0?{groupSelect:(Qt=k==null?void 0:k.groupSelect)==null?void 0:Qt.split(/[::]/).map(Rt=>Rt.trim()),menuSelect:k==null?void 0:k.formMenuSelect,selectRelateType:"",type:(k==null?void 0:k.formType)??(k!=null&&k.groupSelect?"Select":"")}:null,k})),O});let fe=Ve.cloneDeep(Z.value),ge=(Ce=(Te=Ve.cloneDeep(ce))==null?void 0:Te.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:Ce.contents;if(fe=fe==null?void 0:fe.map(O=>{var Y;return O.value=(Y=ge==null?void 0:ge.find((k,X)=>X===(O==null?void 0:O.id)))==null?void 0:Y.value,O}),!B.value)return;let pe="",Ue=(ke=(te=(Ye=Ve.cloneDeep(ce))==null?void 0:Ye.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:te.contents)==null?void 0:ke.find((O,Y)=>{var k,X;return(O==null?void 0:O.label)===We.value||(Y==null?void 0:Y.toString())===((X=(k=We.value)==null?void 0:k.split("a"))==null?void 0:X[1].toString())});if((St=(ut=(Xe=Ve.cloneDeep(ce))==null?void 0:Xe.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:ut.contents)==null||St.forEach(O=>{var Y,k,X,ne,ye;pe===""&&((X=(k=(Y=O==null?void 0:O.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:k[1])!=null&&X.includes("["))&&(pe=(ye=(ne=O==null?void 0:O.optionUrl)==null?void 0:ne.groupSelect)==null?void 0:ye[1])}),(w=Ue==null?void 0:Ue.optionUrl)!=null&&w.menuSelect&&B.value){let O=await kl(Ue),Y;if(O==null||O.forEach(k=>{var X,ne,ye,oe,De,Se,Be,Ge,ct,Et;pe===((ne=(X=Ue==null?void 0:Ue.optionUrl)==null?void 0:X.groupSelect)==null?void 0:ne[1])&&((De=(oe=(ye=Ue==null?void 0:Ue.optionUrl)==null?void 0:ye.groupSelect)==null?void 0:oe[1])!=null&&De.includes("["))&&((Et=Ve.cloneDeep(k))==null?void 0:Et[(ct=(Ge=(Be=(Se=Ue==null?void 0:Ue.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Be[1])==null?void 0:Ge.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(Ue==null?void 0:Ue.value)&&(Y=k)}),Y){let k=Ve.cloneDeep(fe);k=k==null?void 0:k.map(ne=>{var ye,oe,De,Se,Be,Ge,ct,Et,yt,Nt,xt;return(Y!=null&&Y[ne==null?void 0:ne.label]||Y!=null&&Y[(Se=(De=(oe=(ye=ne==null?void 0:ne.optionUrl)==null?void 0:ye.groupSelect)==null?void 0:oe[1])==null?void 0:De.replaceAll("[",""))==null?void 0:Se.replaceAll("]","")])&&((ct=(Ge=(Be=ne==null?void 0:ne.optionUrl)==null?void 0:Be.groupSelect)==null?void 0:Ge[1])!=null&&ct.includes("["))&&(ne.value=(Y==null?void 0:Y[ne==null?void 0:ne.label])||(Y==null?void 0:Y[(xt=(Nt=(yt=(Et=ne==null?void 0:ne.optionUrl)==null?void 0:Et.groupSelect)==null?void 0:yt[1])==null?void 0:Nt.replaceAll("[",""))==null?void 0:xt.replaceAll("]","")])),ne}),Z.value=k;let X=Ve.cloneDeep(k);X=X==null?void 0:X.map(ne=>{var ye,oe,De,Se;return(oe=(ye=ne==null?void 0:ne.optionUrl)==null?void 0:ye.menuSelect)!=null&&oe.some(Be=>Be==null?void 0:Be.includes)&&(ne.optionUrl.menuSelect=(Se=(De=ne==null?void 0:ne.optionUrl)==null?void 0:De.menuSelect)==null?void 0:Se.map(Be=>{var Ge,ct,Et,yt;if(Be!=null&&Be.includes("[")){let Nt=(ct=(Ge=Be==null?void 0:Be.replaceAll("[","").replaceAll("]",""))==null?void 0:Ge.split(":"))==null?void 0:ct[1];Be=(yt=(Et=Ve.cloneDeep(k))==null?void 0:Et.find(xt=>(xt==null?void 0:xt.label)===Nt))==null?void 0:yt.value}return Be})),ne}),Z.value=X}}B.value=!1},dt=$=>$?($==null?void 0:$.toUpperCase())==="INPUT"?"TEXTAREA":$:"TEXTAREA",Ft=$=>{var pe,Ue;const W=(Ue=(pe=z.value)==null?void 0:pe.find(Te=>(Te==null?void 0:Te.label)===($==null?void 0:$.label)))==null?void 0:Ue.multiple,ce=$==null?void 0:$.prop;if(($==null?void 0:$.formType)!="Select")return;v.value.forEach(Te=>{const Ce=Te==null?void 0:Te[ce];W&&Vo(Ce)&&(Te[ce]=[Ce]),!W&&!Vo(Ce)&&(Te[ce]="")})},Jt=$=>{var ce,fe,ge,pe,Ue,Te;K("");const W=(ce=Z.value)==null?void 0:ce.reduce((Ce,Ye)=>(Ce[Ye.name]=Ye.value,Ce),{});((fe=Object.keys(W))==null?void 0:fe.length)>0&&(Ee.value=W,x.value="",F.value=(ge=v.value)==null?void 0:ge.length,G.value=(pe=le.value)==null?void 0:pe.filter(Ce=>(Ce==null?void 0:Ce.label)!=="新增"),a.value=(Te=(Ue=l.value)==null?void 0:Ue.filter(Ce=>(Ce==null?void 0:Ce.label)!=="操作"))==null?void 0:Te.map(Ce=>{var te,ke,Xe;const Ye=(ke=(te=z.value)==null?void 0:te.find(ut=>(ut==null?void 0:ut.label)===(Ce==null?void 0:Ce.label)))==null?void 0:ke.multiple;return Ft(Ce),{...Ce,type:"edit",optionUrl:Ce!=null&&Ce.formMenuSelect&&((Xe=Ce==null?void 0:Ce.formMenuSelect)==null?void 0:Xe.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:Ye}:null,columnType:dt(Ce==null?void 0:Ce.formType)}}),$==="createClick"&&at(!1))};y.watch(()=>[r.itemData,ee.value,j.value,q.value,f==null?void 0:f.value],()=>{var Ce,Ye,te,ke,Xe,ut,St,w,O,Y,k,X,ne,ye,oe,De,Se,Be,Ge,ct,Et,yt,Nt,xt,rt,Xt,Ut,Zt,Wt;const $=(Ce=Ve.cloneDeep(r.itemData))==null?void 0:Ce.filter(Ie=>(Ie==null?void 0:Ie.key)==="header");(Ye=Ve.cloneDeep(r.itemData))==null||Ye.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableIndexColumn")[0];const W=(te=Ve.cloneDeep(r.itemData))==null?void 0:te.find(Ie=>(Ie==null?void 0:Ie.key)==="page"),ce=(ke=Ve.cloneDeep(r.itemData))==null?void 0:ke.find(Ie=>(Ie==null?void 0:Ie.key)==="rowButton"),fe=(Xe=Ve.cloneDeep(r.itemData))==null?void 0:Xe.find(Ie=>(Ie==null?void 0:Ie.key)==="extraButton"),ge=(ut=Ve.cloneDeep(r.itemData))==null?void 0:ut.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"),pe=(St=Ve.cloneDeep(r.itemData))==null?void 0:St.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableIndex");z.value=(Y=(O=(w=Ve.cloneDeep(r.itemData))==null?void 0:w.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableToForm"))==null?void 0:O[0])==null?void 0:Y.contents,C.value=(W==null?void 0:W.contents)??!1;let Ue=[];ee.value===""?Ue=$==null?void 0:$[0]:Ue=($==null?void 0:$.find(Ie=>(Ie==null?void 0:Ie.selectLabel)==="("+ee.value+")"))??($==null?void 0:$.find(Ie=>!(Ie!=null&&Ie.selectLabel)));let Te=[];if(ee.value===""?Te=pe==null?void 0:pe[0]:Te=(pe==null?void 0:pe.find(Ie=>(Ie==null?void 0:Ie.selectLabel)==="("+ee.value+")"))??(pe==null?void 0:pe.find(Ie=>!(Ie!=null&&Ie.selectLabel))),((k=Ue==null?void 0:Ue.contents)==null?void 0:k.length)>0){let Ie=[];if(Ue!=null&&Ue.contents.some(je=>Array.isArray(je)&&(je==null?void 0:je.find(He=>He.children))))q.value===""?Ie=(ne=(X=an.getGradeColumns(Ve.cloneDeep(Ue==null?void 0:Ue.contents)))==null?void 0:X[0])==null?void 0:ne.filter(je=>!Array.isArray(je)):(q.value.split("-"),Ie=(ye=an.getGradeColumns(Ve.cloneDeep(Ue==null?void 0:Ue.contents)))==null?void 0:ye[0]);else{const je=Ue!=null&&Ue.contents.some(He=>Array.isArray(He))?(oe=Ue==null?void 0:Ue.contents)==null?void 0:oe[0]:Ue==null?void 0:Ue.contents;je==null||je.forEach((He,rn)=>{var mt;Ie.push({label:(He==null?void 0:He.label)??"",prop:(He==null?void 0:He.label)==="操作"?"operate":(He==null?void 0:He.prop)??"a"+rn,width:He!=null&&He.width?parseInt(He.width):"",fixed:(He==null?void 0:He.fixed)??void 0,sortable:(He==null?void 0:He.sortable)??!1,align:(He==null?void 0:He.align)??"left",showOverflowTooltip:(He==null?void 0:He.showOverflowTooltip)??!0,isNotDrag:(He==null?void 0:He.isNotDrag)??!1,isEditCol:(He==null?void 0:He.isEditCol)??!1,isOperate:(He==null?void 0:He.isOperate)??!1,id:(He==null?void 0:He.id)??rn,type:(He==null?void 0:He.label)==="操作"?"operate":void 0,formType:(He==null?void 0:He.formType)??(He!=null&&He.groupSelect?"Select":""),isTableColHidden:He==null?void 0:He.isTableColHidden,isFormColHidden:He==null?void 0:He.isFormColHidden,options:(He==null?void 0:He.options)??[],value:(He==null?void 0:He.value)??"",formMenuSelect:(He==null?void 0:He.formMenuSelect)??[],isRoute:(He==null?void 0:He.isRoute)??!1,groupSelect:He!=null&&He.groupSelect?(mt=He==null?void 0:He.groupSelect)==null?void 0:mt.replaceAll('"',"").split(":"):[],isMainKey:He==null?void 0:He.isMainKey})})}a.value=Ie,d.value=Ie,t.value=(De=a.value)==null?void 0:De.map(je=>je==null?void 0:je.label);let Qt=(Be=(Se=an.getAllLeafNodes(Ve.cloneDeep(a.value)))==null?void 0:Se.filter(je=>(je==null?void 0:je.type)!=="operate"))==null?void 0:Be.map((je,He)=>({prop:(je==null?void 0:je.prop)??"a"+He,column:je.label}));_e.value=Qt;let Rt=[];ee.value===""?Rt=ge==null?void 0:ge[0]:Rt=(ge==null?void 0:ge.find(je=>(je==null?void 0:je.selectLabel)==="("+ee.value+")"))??(ge==null?void 0:ge.find(je=>!(je!=null&&je.selectLabel)));let tn=Array.isArray((Ge=Rt==null?void 0:Rt.contents)==null?void 0:Ge[0])&&((ct=Rt==null?void 0:Rt.contents)!=null&&ct[0].every(je=>Array.isArray(je)))?(Et=Ve.cloneDeep(Rt==null?void 0:Rt.contents))==null?void 0:Et[0]:Ve.cloneDeep(Rt==null?void 0:Rt.contents);Te!=null&&Te.contents&&((yt=Te==null?void 0:Te.contents)==null?void 0:yt.length)!==0&&(tn=(Nt=Ve.cloneDeep(tn))==null?void 0:Nt.map((je,He)=>{if(!Array.isArray(je)){let rn={};for(let mt in je)mt!=="id"&&mt!=="index"&&(rn[mt]=je[mt]);je=Object.values(rn)}return je}));const un=!!((xt=a.value)!=null&&xt.find(je=>je.prop==="index"));tn=xu(Ve.cloneDeep(tn),Te==null?void 0:Te.contents,un);const Kt=[];tn==null||tn.forEach((je,He)=>{var mt;let rn={};if(Array.isArray(je)){let fn=[];je==null||je.filter(b=>!(b!=null&&b.id)).forEach((b,M)=>{var N,D,U,he,xe,ot;if((N=Qt==null?void 0:Qt[M])!=null&&N.prop&&!Array.isArray(b)){let qe={};qe[Qt[M].column]=b,f!=null&&f.value&&((D=f==null?void 0:f.value)==null?void 0:D.length)>0&&((U=f==null?void 0:f.value)!=null&&U.find($e=>JSON.stringify($e==null?void 0:$e[0])===JSON.stringify(qe)))&&(fn=(he=f==null?void 0:f.value)==null?void 0:he.find($e=>JSON.stringify($e==null?void 0:$e[0])===JSON.stringify(qe))),fn&&fn.length>0?rn[Qt[M].prop]=fn!=null&&fn.find($e=>{var ft;return((ft=Object.keys($e))==null?void 0:ft[0])===Qt[M].column})?(xe=fn==null?void 0:fn.find($e=>{var ft;return((ft=Object.keys($e))==null?void 0:ft[0])===Qt[M].column}))==null?void 0:xe[Qt[M].column]:b:rn[Qt[M].prop]=b}else Array.isArray(b)&&((ot=Qt[M])!=null&&ot.prop?rn[Qt[M].prop]=b:rn.children=yu(b,Qt))})}else rn=je;Array.isArray(je)&&je.some(fn=>fn==null?void 0:fn.id)?Kt.push(Object.assign(rn,{id:(mt=je==null?void 0:je.find(fn=>fn.id))==null?void 0:mt.id})):rn.id?Kt.push(rn):Kt.push(Object.assign(rn,{id:He.toString()}))}),v.value=Kt}else a.value=[],l.value=[],v.value=[];((rt=ce==null?void 0:ce.contents)==null?void 0:rt.length)>0?H.value=ce==null?void 0:ce.contents:H.value=[],((Xt=fe==null?void 0:fe.contents)==null?void 0:Xt.length)>0?(G.value=fe==null?void 0:fe.contents,le.value=fe==null?void 0:fe.contents):(G.value=[],le.value=[]),F.value=((Ut=v==null?void 0:v.value)==null?void 0:Ut.length)??0,me.value=v.value,we.value&&(a.value=(Wt=(Zt=l.value)==null?void 0:Zt.filter(Ie=>(Ie==null?void 0:Ie.label)!=="操作"))==null?void 0:Wt.map(Ie=>{var Qt;return{...Ie,type:"edit",optionUrl:Ie!=null&&Ie.formMenuSelect&&((Qt=Ie==null?void 0:Ie.formMenuSelect)==null?void 0:Qt.length)>0?{groupSelect:Ie==null?void 0:Ie.groupSelect,menuSelect:Ie==null?void 0:Ie.formMenuSelect,selectRelateType:"",type:Ie==null?void 0:Ie.formType}:null}}),Jt())},{deep:!0,immediate:!0}),y.watch(()=>r==null?void 0:r.operatingForm,$=>{$!=null&&$.form&&(K($==null?void 0:$.form),R.value=$==null?void 0:$.dialogTitle,Q.value=!0,P.value=!0)},{immediate:!0,deep:!0});const zt=$=>{we.value=!we.value,we.value?Jt("viewChange"):(G.value=le.value,a.value=d.value)};y.ref(!1);const Rn=$=>{Jt("createClick")},Gn=($,W,ce)=>{var fe,ge;Ee.value=Ve.cloneDeep($),x.value=$==null?void 0:$.id,F.value=(fe=v.value)==null?void 0:fe.length,R.value=($==null?void 0:$.id)===((ge=v.value)==null?void 0:ge.length)?"新增":"编辑",at(!0)},Yi=$=>{var Ce,Ye,te,ke,Xe,ut,St,w,O,Y;const{row:W,column:ce,item:fe,slotData:ge}=$;let pe=W!=null&&W[ce==null?void 0:ce.prop]?((Ye=(Ce=W==null?void 0:W[ce==null?void 0:ce.prop])==null?void 0:Ce[0])==null?void 0:Ye.contents)??(W==null?void 0:W[ce==null?void 0:ce.prop]):((ke=(te=W==null?void 0:W[fe==null?void 0:fe.prop])==null?void 0:te[0])==null?void 0:ke.contents)??(W==null?void 0:W[fe==null?void 0:fe.prop])??((ut=(Xe=ge==null?void 0:ge[fe==null?void 0:fe.prop])==null?void 0:Xe[0])==null?void 0:ut.contents)??(ge==null?void 0:ge[fe==null?void 0:fe.prop])??((O=(w=W==null?void 0:W[(St=fe==null?void 0:fe.child)==null?void 0:St.prop])==null?void 0:w[0])==null?void 0:O.contents)??(W==null?void 0:W[(Y=fe==null?void 0:fe.child)==null?void 0:Y.prop]),Te=Array.isArray(pe)&&!(pe!=null&&pe.every(k=>typeof k=="string"||typeof k=="number"))?"查看":pe;return Te=Array.isArray(Te)?Te.join(","):Te,Te},fs=$=>{var Ye,te,ke,Xe,ut,St,w,O,Y,k;const{row:W,column:ce,item:fe,slotData:ge}=$;let pe=W!=null&&W[ce==null?void 0:ce.prop]?((te=(Ye=W==null?void 0:W[ce==null?void 0:ce.prop])==null?void 0:Ye[0])==null?void 0:te.contents)??(W==null?void 0:W[ce==null?void 0:ce.prop]):((Xe=(ke=W==null?void 0:W[fe==null?void 0:fe.prop])==null?void 0:ke[0])==null?void 0:Xe.contents)??(W==null?void 0:W[fe==null?void 0:fe.prop])??((St=(ut=ge==null?void 0:ge[fe==null?void 0:fe.prop])==null?void 0:ut[0])==null?void 0:St.contents)??(ge==null?void 0:ge[fe==null?void 0:fe.prop])??((Y=(O=W==null?void 0:W[(w=fe==null?void 0:fe.child)==null?void 0:w.prop])==null?void 0:O[0])==null?void 0:Y.contents)??(W==null?void 0:W[(k=fe==null?void 0:fe.child)==null?void 0:k.prop]);const Te=Array.isArray(pe)&&!(pe!=null&&pe.every(X=>typeof X=="string"||typeof X=="number")),Ce=Array.isArray(pe)&&(pe==null?void 0:pe.find(X=>X==null?void 0:X.url));return Te&&Ce};return($,W)=>{var Ce,Ye;const ce=y.resolveComponent("el-icon"),fe=y.resolveComponent("el-popover"),ge=y.resolveComponent("svg-icon"),pe=y.resolveComponent("el-checkbox"),Ue=y.resolveComponent("el-checkbox-group"),Te=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",$6,[(y.openBlock(),y.createBlock(kn.ssTable,{columns:a.value,checkedColumns:t.value,key:a.value,tableData:v.value,isEditViewport:we.value,isShowPagination:C.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:Re,extraButton:G.value,onContentClick:_t,onRowClick:pt,onSelectChange:bt,onCellChange:Gn,onChange:Oe,onPreview:Le},y.createSlots({headerButton:y.withCtx(te=>[s.showHeader?(y.openBlock(),y.createBlock(N6,{key:0,compName:s.compName,buttons:te.buttons,onButtonClick:W[0]||(W[0]=ke=>Pe(ke,"",{})),columns:a.value,onFilter:be},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",K6,[y.createElementVNode("span",{title:"编辑视图",onClick:W[2]||(W[2]=ke=>zt())},[y.createVNode(ge,{name:"editTable",class:"view-icon"})])])):y.createCommentVNode("",!0)]}),rowCreate:y.withCtx(({row:te})=>[y.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ke=>Rn()},[y.createVNode(ge,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Z6)]),operateCol:y.withCtx(()=>[y.createVNode(fe,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:Fe},{reference:y.withCtx(()=>[y.createElementVNode("span",Q6,[y.createVNode(ge,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:y.withCtx(()=>[y.createElementVNode("div",e5,[y.createVNode(Ue,{modelValue:t.value,"onUpdate:modelValue":W[3]||(W[3]=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(it.value,te=>(y.openBlock(),y.createBlock(pe,{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(ge,{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=>[fs(te)?(y.openBlock(),y.createBlock(fe,{key:0,placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:y.withCtx(()=>[y.createElementVNode("span",null,y.toDisplayString(Yi(te)),1)]),default:y.withCtx(()=>{var ke;return[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(te==null?void 0:te.row[(ke=te==null?void 0:te.column)==null?void 0:ke.prop],Xe=>(y.openBlock(),y.createElementBlock("div",t5,[y.createElementVNode("div",{class:"prop-url",title:st(Xe),onClick:ut=>Yt(Xe)},y.toDisplayString(st(Xe)),9,n5),y.createElementVNode("div",{class:"prop-download",onClick:ut=>V(Xe)}," 下载 ",8,i5)]))),256))]}),_:2},1024)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.createTextVNode(y.toDisplayString(Yi(te)),1)],64))]),_:2},[((Ce=H.value)==null?void 0:Ce.length)>0?{name:"actions",fn:y.withCtx(({item:te})=>[y.createVNode(fe,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:y.withCtx(()=>[y.createVNode(ce,null,{default:y.withCtx(()=>[y.createVNode(y.unref(Fn.more_filled_default))]),_:1})]),default:y.withCtx(()=>[y.createElementVNode("div",Y6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(T(H.value,te),(ke,Xe)=>(y.openBlock(),y.createElementBlock("div",{class:"menu-config-item",key:Xe,onClick:ut=>Pe(ke==null?void 0:ke.label,te,{extra:ke})},[y.createElementVNode("div",{style:y.normalizeStyle({color:ke==null?void 0:ke.textColor}),class:"extra-button-label"},y.toDisplayString(ke==null?void 0:ke.label),5)],8,J6))),128))])]),_:2},1024)]),key:"0"}:void 0,((Ye=v.value)==null?void 0:Ye.length)>0?{name:"batchButton",fn:y.withCtx(te=>[y.createVNode(I6,{buttons:te.buttons,onButtonClick:W[1]||(W[1]=ke=>Pe(ke,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),y.createVNode(kn.ssDialog,{title:R.value,visible:P.value,width:de.value,onBeforeDestroy:Ne},{default:y.withCtx(()=>[y.createElementVNode("div",s5,[y.createVNode(kn.ssForm,{rowContents:Z.value,isEnableWrap:!1,onChange:Ae,onClickTrigger:tt,isEdit:S.value,onBlurChange:ht},null,8,["rowContents","isEdit"])])]),footer:y.withCtx(()=>[Q.value?(y.openBlock(),y.createElementBlock("div",r5,[y.createVNode(Te,{onClick:W[4]||(W[4]=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:at,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(kn.ssDialog,{title:R.value,visible:E.value,width:L.value,onBeforeDestroy:W[6]||(W[6]=te=>E.value=!1)},{default:y.withCtx(()=>[y.createVNode(G6)]),footer:y.withCtx(()=>[y.createElementVNode("div",a5,[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:vt,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(kn.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:Qe},null,8,["fileDataList"])):y.createCommentVNode("",!0),c.value?(y.openBlock(),y.createBlock(kn.ssDialog,{key:1,visible:c.value,onBeforeDestroy:Pt,style:{height:"700px",width:"1000px"}},{default:y.withCtx(()=>[c.value?(y.openBlock(),y.createBlock(gu,{key:0,"urdf-url":re.value},null,8,["urdf-url"])):y.createCommentVNode("",!0)]),_:1},8,["visible"])):y.createCommentVNode("",!0)])}}},Au=Pi._export_sfc(o5,[["__scopeId","data-v-f68c0505"]]);exports.ACESFilmicToneMapping=Wl;exports.AmbientLight=hc;exports.Box3=Nn;exports.CatmullRomCurve3=ac;exports.Color=Tt;exports.DirectionalLight=gr;exports.DoubleSide=gn;exports.Euler=En;exports.GridHelper=Z0;exports.HemisphereLight=K0;exports.MOUSE=Ti;exports.MathUtils=Ei;exports.Matrix4=At;exports.Mesh=Bt;exports.MeshPhongMaterial=mn;exports.OrbitControls=au;exports.PCFSoftShadowMap=Gl;exports.PerspectiveCamera=Sn;exports.Plane=Kn;exports.PlaneGeometry=Di;exports.PointLight=Pa;exports.SRGBColorSpace=jt;exports.Scene=Ia;exports.ShadowMaterial=j0;exports.TubeGeometry=ka;exports.Vector3=I;exports.WebGLRenderer=su;exports.Xe=du;exports.formGetOptions=Ho;exports.getSelectRow=kl;exports.isString=Vo;exports.ssTable=Au;exports.threeView=gu;exports.useFormComp=Eu;exports.useFormToTableComp=_u;exports.useModelLoader=B6;exports.useTableComp=Su;exports.useUnit=vu;
|