ss-component-new 1.2.179 → 1.2.181

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.
Files changed (89) hide show
  1. package/dist/{MTLLoader-CMpGG9Bd.cjs → MTLLoader-BTzWsYw_.cjs} +1 -1
  2. package/dist/{MTLLoader-d2OpvLOW.js → MTLLoader-DlOCq_sz.js} +1 -1
  3. package/dist/{OrbitControls-DpyXjBNP.cjs → OrbitControls-D7H4f_sG.cjs} +1 -1
  4. package/dist/{OrbitControls-DBHqNrQL.js → OrbitControls-DCbMLAja.js} +1 -1
  5. package/dist/{URDFLoader-C7hv2huD.js → URDFLoader-DSUuVt4R.js} +2 -2
  6. package/dist/{URDFLoader-wguISxmK.cjs → URDFLoader-YD4JI4sU.cjs} +1 -1
  7. package/dist/{animationData-iNdJN_D_.js → animationData-B5xqHLuz.js} +1 -1
  8. package/dist/{animationData-C5sjWEaT.cjs → animationData-BYxqN-uC.cjs} +1 -1
  9. package/dist/{array-ByUgkJ37.cjs → array-BhwYx3CX.cjs} +1 -1
  10. package/dist/{array-Bgrj1oV3.js → array-C-MjDZXh.js} +1 -1
  11. package/dist/{iconfont-Buh2Df98.cjs → iconfont-BtG836y-.cjs} +1 -1
  12. package/dist/{iconfont-BPJ9ourc.js → iconfont-Cm6W7V0P.js} +2 -2
  13. package/dist/{index-D1RoGIsd.js → index-3Y-fsm3p.js} +1 -1
  14. package/dist/{index-DHZH0zPO.js → index-5mnjOCYW.js} +1 -1
  15. package/dist/{index-BNidg3es.cjs → index-7Rgwef3k.cjs} +1 -1
  16. package/dist/{index-D5CeFNcY.cjs → index-9ApOn61r.cjs} +1 -1
  17. package/dist/{index-ZHpKUOhR.js → index-B0MQCBhs.js} +1 -1
  18. package/dist/{index-BynBceMd.js → index-B2-M6ik1.js} +3 -3
  19. package/dist/{index-DDmxZO6i.cjs → index-B5ppr9pu.cjs} +1 -1
  20. package/dist/{index-CCUAW6sC.cjs → index-BEn3QVcQ.cjs} +1 -1
  21. package/dist/index-BLoH9dR_.cjs +1 -0
  22. package/dist/{index-CvarvnV1.js → index-BMZrbMHo.js} +2 -2
  23. package/dist/{index-EofXU0MK.js → index-Ba_0Eysx.js} +1 -1
  24. package/dist/{index-BjhN2cZK.cjs → index-BgXZt8Yv.cjs} +1 -1
  25. package/dist/{index-BxNdoe0W.js → index-BjqURa8X.js} +16 -16
  26. package/dist/{index-CN-T4mBv.js → index-Bo6yVJ9h.js} +119 -122
  27. package/dist/{index-D0LjT3cL.js → index-C4wWbHco.js} +4 -4
  28. package/dist/{index-CqbOb7X5.js → index-CFfdoEXp.js} +2 -2
  29. package/dist/{index-ClmxTuZZ.js → index-CIsLzHcf.js} +1 -1
  30. package/dist/{index-CcosIFS7.js → index-CNoioYHZ.js} +1 -1
  31. package/dist/{index-BMHV_Brb.cjs → index-CO7kEMmf.cjs} +1 -1
  32. package/dist/{index-CbBel_Ly.cjs → index-CanI2V9h.cjs} +1 -1
  33. package/dist/{index-y6LkQUgu.cjs → index-CavNDUBi.cjs} +1 -1
  34. package/dist/{index-xzZKgB24.cjs → index-CbpyErg_.cjs} +1 -1
  35. package/dist/{index-DMkTj7aZ.cjs → index-ChnNZfEN.cjs} +1 -1
  36. package/dist/{index-BQKz83nF.js → index-Cv5oRI7Q.js} +1 -1
  37. package/dist/{index-Co4vN6r7.cjs → index-D49xaWHR.cjs} +1 -1
  38. package/dist/{index-BxS6-5bI.cjs → index-D8WLnGRC.cjs} +1 -1
  39. package/dist/{index-Duk7yWiP.cjs → index-DL_aJUHm.cjs} +1 -1
  40. package/dist/{index-lvZVl2Vw.js → index-DPnffFdz.js} +8 -8
  41. package/dist/{index-BCWHX3eK.cjs → index-D_tiSZ9j.cjs} +1 -1
  42. package/dist/{index-Cn3W-yV7.cjs → index-DdeUgqk3.cjs} +1 -1
  43. package/dist/{index-xHfmd7Ni.js → index-DeXx8Vko.js} +1 -1
  44. package/dist/{index-CHQVBVEk.cjs → index-DkU8Eq1c.cjs} +1 -1
  45. package/dist/{index-DqMnk5wX.cjs → index-EXE6oqX9.cjs} +1 -1
  46. package/dist/{index-BKK7zx0h.js → index-Iobde4Mg.js} +4 -4
  47. package/dist/{index-C8X6R7q5.js → index-KO6c2_4C.js} +4 -4
  48. package/dist/{index-DXselp6c.cjs → index-Xfa3De_r.cjs} +1 -1
  49. package/dist/{index-BYvy0l-n.cjs → index-bBQaYoAM.cjs} +1 -1
  50. package/dist/{index-BYDeJDc_.js → index-bXwcWWT4.js} +3 -3
  51. package/dist/{index-B3Kt07UJ.js → index-cnLMVBEH.js} +1 -1
  52. package/dist/{index-3ZZbSXzg.js → index-eMDBWTDY.js} +7 -7
  53. package/dist/{index-CtrZr-Cc.js → index-h6qSKvm4.js} +1 -1
  54. package/dist/{index-CEZuSXRM.js → index-iuHQqiR7.js} +1 -1
  55. package/dist/{index-BKxw0UBQ.cjs → index-nKXcthha.cjs} +1 -1
  56. package/dist/{index-BJnycjrK.cjs → index-xrC3zZoP.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BhTZLmHo.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-ClX-um0I.js} +7 -7
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-C4PEXKSp.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DXY29h1f.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtDy8n8V.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CfZR3ABW.cjs} +212 -212
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9XvSEGdS.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-T859a6kf.js} +14884 -14899
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-B5QsbB6Q.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BJK4Ar7-.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DPVGY0eJ.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-CyUG5izb.js} +4 -4
  63. package/dist/{index.vue_vue_type_style_index_1_lang-ClIZyFAZ.cjs → index.vue_vue_type_style_index_1_lang-CNa3MLOt.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_1_lang-DBIY-mVS.js → index.vue_vue_type_style_index_1_lang-Dml01rWN.js} +3 -3
  65. package/dist/{main-CjhywWOM.js → main-43YwuY9x.js} +3 -3
  66. package/dist/{main-CuyIrRZV.cjs → main-BwzBl_3h.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +1 -1
  69. package/dist/ss-component.js +9 -9
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +10 -10
  72. package/dist/{threeModel-ukCJmnVO.cjs → threeModel-Cs1MSH2i.cjs} +1 -1
  73. package/dist/{threeModel-DdsWlYl2.js → threeModel-DgFpDEHd.js} +4 -4
  74. package/dist/{threePreview-BZvdxIa2.cjs → threePreview-C3AbBY21.cjs} +1 -1
  75. package/dist/{threePreview-p9D877JF.js → threePreview-z9rz6n5g.js} +3 -3
  76. package/dist/{threeSceneView-B12dxEfS.cjs → threeSceneView-B3y6V-yN.cjs} +1 -1
  77. package/dist/{threeSceneView-C2zoPlRp.js → threeSceneView-C8vMKO0w.js} +8 -8
  78. package/dist/{threeSceneViewForCPMPIP-CIEoqdr8.cjs → threeSceneViewForCPMPIP-B7HSnAYV.cjs} +1 -1
  79. package/dist/{threeSceneViewForCPMPIP-B7s_szJB.js → threeSceneViewForCPMPIP-C8Lgc1n_.js} +7 -7
  80. package/dist/{threeTrackPathView-Cap0mVmC.cjs → threeTrackPathView-VB2cv_wS.cjs} +1 -1
  81. package/dist/{threeTrackPathView-BxK49ljq.js → threeTrackPathView-x9nKVqZP.js} +3 -3
  82. package/dist/{threeViewerHost-DGNd3WrL.js → threeViewerHost-Bi6Ire9J.js} +2 -2
  83. package/dist/{threeViewerHost-Cg_dRiGk.cjs → threeViewerHost-t-1xFz37.cjs} +1 -1
  84. package/dist/{urdfTree-Lfkc4b95.js → urdfTree-B7VGj9Ok.js} +1 -1
  85. package/dist/{urdfTree-B0LbjhKN.cjs → urdfTree-BbcmeygS.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-D60hJ3BF.js → workpieceTreePanel-D1eW_Xi1.js} +4 -4
  87. package/dist/{workpieceTreePanel-BrOxOnjQ.cjs → workpieceTreePanel-DTXRhhGv.cjs} +1 -1
  88. package/package.json +1 -1
  89. package/dist/index-dRtOvQRS.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtDy8n8V.cjs");class H extends o.Loader{constructor(t){super(t)}load(t,s,i,e){const r=this,u=new o.FileLoader(this.manager);u.setPath(this.path),u.setResponseType("arraybuffer"),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},i,e)}parse(t){function s(n){const a=new DataView(n),l=32/8*3+32/8*3*3+16/8,f=a.getUint32(80,!0);if(80+32/8+f*l===a.byteLength)return!0;const g=[115,111,108,105,100];for(let p=0;p<5;p++)if(i(g,a,p))return!1;return!0}function i(n,a,l){for(let f=0,m=n.length;f<m;f++)if(n[f]!==a.getUint8(l+f))return!1;return!0}function e(n){const a=new DataView(n),l=a.getUint32(80,!0);let f,m,g,p=!1,b,x,w,j,F;for(let v=0;v<70;v++)a.getUint32(v,!1)==1129270351&&a.getUint8(v+4)==82&&a.getUint8(v+5)==61&&(p=!0,b=new Float32Array(l*3*3),x=a.getUint8(v+6)/255,w=a.getUint8(v+7)/255,j=a.getUint8(v+8)/255,F=a.getUint8(v+9)/255);const M=84,d=12*4+2,y=new o.BufferGeometry,A=new Float32Array(l*3*3),V=new Float32Array(l*3*3),S=new o.Color;for(let v=0;v<l;v++){const k=M+v*d,O=a.getFloat32(k,!0),U=a.getFloat32(k+4,!0),P=a.getFloat32(k+8,!0);if(p){const L=a.getUint16(k+48,!0);(L&32768)===0?(f=(L&31)/31,m=(L>>5&31)/31,g=(L>>10&31)/31):(f=x,m=w,g=j)}for(let L=1;L<=3;L++){const R=k+L*12,_=v*3*3+(L-1)*3;A[_]=a.getFloat32(R,!0),A[_+1]=a.getFloat32(R+4,!0),A[_+2]=a.getFloat32(R+8,!0),V[_]=O,V[_+1]=U,V[_+2]=P,p&&(S.setRGB(f,m,g,o.SRGBColorSpace),b[_]=S.r,b[_+1]=S.g,b[_+2]=S.b)}}return y.setAttribute("position",new o.BufferAttribute(A,3)),y.setAttribute("normal",new o.BufferAttribute(V,3)),p&&(y.setAttribute("color",new o.BufferAttribute(b,3)),y.hasColors=!0,y.alpha=F),y}function r(n){const a=new o.BufferGeometry,l=/solid([\s\S]*?)endsolid/g,f=/facet([\s\S]*?)endfacet/g,m=/solid\s(.+)/;let g=0;const p=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,b=new RegExp("vertex"+p+p+p,"g"),x=new RegExp("normal"+p+p+p,"g"),w=[],j=[],F=[],M=new o.Vector3;let d,y=0,A=0,V=0;for(;(d=l.exec(n))!==null;){A=V;const S=d[0],v=(d=m.exec(S))!==null?d[1]:"";for(F.push(v);(d=f.exec(S))!==null;){let U=0,P=0;const L=d[0];for(;(d=x.exec(L))!==null;)M.x=parseFloat(d[1]),M.y=parseFloat(d[2]),M.z=parseFloat(d[3]),P++;for(;(d=b.exec(L))!==null;)w.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),j.push(M.x,M.y,M.z),U++,V++;P!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),U!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const k=A,O=V-A;a.userData.groupNames=F,a.addGroup(k,O,y),y++}return a.setAttribute("position",new o.Float32BufferAttribute(w,3)),a.setAttribute("normal",new o.Float32BufferAttribute(j,3)),a}function u(n){return typeof n!="string"?new TextDecoder().decode(n):n}function h(n){if(typeof n=="string"){const a=new Uint8Array(n.length);for(let l=0;l<n.length;l++)a[l]=n.charCodeAt(l)&255;return a.buffer||a}else return n}const c=h(t);return s(c)?e(c):r(u(t))}}const N=/^[og]\s*(.+)?/,W=/^mtllib /,q=/^usemtl /,J=/^usemap /,G=/\s+/,T=new o.Vector3,z=new o.Vector3,D=new o.Vector3,E=new o.Vector3,C=new o.Vector3,I=new o.Color;function Z(){const B={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,s){if(this.object&&this.object.fromDeclaration===!1){this.object.name=t,this.object.fromDeclaration=s!==!1;return}const i=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:t||"",fromDeclaration:s!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,r){const u=this._finalize(!1);u&&(u.inherited||u.groupCount<=0)&&this.materials.splice(u.index,1);const h={index:this.materials.length,name:e||"",mtllib:Array.isArray(r)&&r.length>0?r[r.length-1]:"",smooth:u!==void 0?u.smooth:this.smooth,groupStart:u!==void 0?u.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(c){const n={index:typeof c=="number"?c:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return n.clone=this.clone.bind(n),n}};return this.materials.push(h),h},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){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),e&&this.materials.length>1)for(let u=this.materials.length-1;u>=0;u--)this.materials[u].groupCount<=0&&this.materials.splice(u,1);return e&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),r}},i&&i.name&&typeof i.clone=="function"){const e=i.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseNormalIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseUVIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/2)*2},addVertex:function(t,s,i){const e=this.vertices,r=this.object.geometry.vertices;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[i+0],e[i+1],e[i+2])},addVertexPoint:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addVertexLine:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addNormal:function(t,s,i){const e=this.normals,r=this.object.geometry.normals;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[i+0],e[i+1],e[i+2])},addFaceNormal:function(t,s,i){const e=this.vertices,r=this.object.geometry.normals;T.fromArray(e,t),z.fromArray(e,s),D.fromArray(e,i),C.subVectors(D,z),E.subVectors(T,z),C.cross(E),C.normalize(),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z)},addColor:function(t,s,i){const e=this.colors,r=this.object.geometry.colors;e[t]!==void 0&&r.push(e[t+0],e[t+1],e[t+2]),e[s]!==void 0&&r.push(e[s+0],e[s+1],e[s+2]),e[i]!==void 0&&r.push(e[i+0],e[i+1],e[i+2])},addUV:function(t,s,i){const e=this.uvs,r=this.object.geometry.uvs;r.push(e[t+0],e[t+1]),r.push(e[s+0],e[s+1]),r.push(e[i+0],e[i+1])},addDefaultUV:function(){const t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){const s=this.uvs;this.object.geometry.uvs.push(s[t+0],s[t+1])},addFace:function(t,s,i,e,r,u,h,c,n){const a=this.vertices.length;let l=this.parseVertexIndex(t,a),f=this.parseVertexIndex(s,a),m=this.parseVertexIndex(i,a);if(this.addVertex(l,f,m),this.addColor(l,f,m),h!==void 0&&h!==""){const g=this.normals.length;l=this.parseNormalIndex(h,g),f=this.parseNormalIndex(c,g),m=this.parseNormalIndex(n,g),this.addNormal(l,f,m)}else this.addFaceNormal(l,f,m);if(e!==void 0&&e!==""){const g=this.uvs.length;l=this.parseUVIndex(e,g),f=this.parseUVIndex(r,g),m=this.parseUVIndex(u,g),this.addUV(l,f,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";const s=this.vertices.length;for(let i=0,e=t.length;i<e;i++){const r=this.parseVertexIndex(t[i],s);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(t,s){this.object.geometry.type="Line";const i=this.vertices.length,e=this.uvs.length;for(let r=0,u=t.length;r<u;r++)this.addVertexLine(this.parseVertexIndex(t[r],i));for(let r=0,u=s.length;r<u;r++)this.addUVLine(this.parseUVIndex(s[r],e))}};return B.startObject("",!1),B}class X extends o.Loader{constructor(t){super(t),this.materials=null}load(t,s,i,e){const r=this,u=new o.FileLoader(this.manager);u.setPath(this.path),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},i,e)}setMaterials(t){return this.materials=t,this}parse(t){const s=new Z;t.indexOf(`\r
1
+ "use strict";const o=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CfZR3ABW.cjs");class H extends o.Loader{constructor(t){super(t)}load(t,s,i,e){const r=this,u=new o.FileLoader(this.manager);u.setPath(this.path),u.setResponseType("arraybuffer"),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},i,e)}parse(t){function s(n){const a=new DataView(n),l=32/8*3+32/8*3*3+16/8,f=a.getUint32(80,!0);if(80+32/8+f*l===a.byteLength)return!0;const g=[115,111,108,105,100];for(let p=0;p<5;p++)if(i(g,a,p))return!1;return!0}function i(n,a,l){for(let f=0,m=n.length;f<m;f++)if(n[f]!==a.getUint8(l+f))return!1;return!0}function e(n){const a=new DataView(n),l=a.getUint32(80,!0);let f,m,g,p=!1,b,x,w,j,F;for(let v=0;v<70;v++)a.getUint32(v,!1)==1129270351&&a.getUint8(v+4)==82&&a.getUint8(v+5)==61&&(p=!0,b=new Float32Array(l*3*3),x=a.getUint8(v+6)/255,w=a.getUint8(v+7)/255,j=a.getUint8(v+8)/255,F=a.getUint8(v+9)/255);const M=84,d=12*4+2,y=new o.BufferGeometry,A=new Float32Array(l*3*3),V=new Float32Array(l*3*3),S=new o.Color;for(let v=0;v<l;v++){const k=M+v*d,O=a.getFloat32(k,!0),U=a.getFloat32(k+4,!0),P=a.getFloat32(k+8,!0);if(p){const L=a.getUint16(k+48,!0);(L&32768)===0?(f=(L&31)/31,m=(L>>5&31)/31,g=(L>>10&31)/31):(f=x,m=w,g=j)}for(let L=1;L<=3;L++){const R=k+L*12,_=v*3*3+(L-1)*3;A[_]=a.getFloat32(R,!0),A[_+1]=a.getFloat32(R+4,!0),A[_+2]=a.getFloat32(R+8,!0),V[_]=O,V[_+1]=U,V[_+2]=P,p&&(S.setRGB(f,m,g,o.SRGBColorSpace),b[_]=S.r,b[_+1]=S.g,b[_+2]=S.b)}}return y.setAttribute("position",new o.BufferAttribute(A,3)),y.setAttribute("normal",new o.BufferAttribute(V,3)),p&&(y.setAttribute("color",new o.BufferAttribute(b,3)),y.hasColors=!0,y.alpha=F),y}function r(n){const a=new o.BufferGeometry,l=/solid([\s\S]*?)endsolid/g,f=/facet([\s\S]*?)endfacet/g,m=/solid\s(.+)/;let g=0;const p=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,b=new RegExp("vertex"+p+p+p,"g"),x=new RegExp("normal"+p+p+p,"g"),w=[],j=[],F=[],M=new o.Vector3;let d,y=0,A=0,V=0;for(;(d=l.exec(n))!==null;){A=V;const S=d[0],v=(d=m.exec(S))!==null?d[1]:"";for(F.push(v);(d=f.exec(S))!==null;){let U=0,P=0;const L=d[0];for(;(d=x.exec(L))!==null;)M.x=parseFloat(d[1]),M.y=parseFloat(d[2]),M.z=parseFloat(d[3]),P++;for(;(d=b.exec(L))!==null;)w.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),j.push(M.x,M.y,M.z),U++,V++;P!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),U!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const k=A,O=V-A;a.userData.groupNames=F,a.addGroup(k,O,y),y++}return a.setAttribute("position",new o.Float32BufferAttribute(w,3)),a.setAttribute("normal",new o.Float32BufferAttribute(j,3)),a}function u(n){return typeof n!="string"?new TextDecoder().decode(n):n}function h(n){if(typeof n=="string"){const a=new Uint8Array(n.length);for(let l=0;l<n.length;l++)a[l]=n.charCodeAt(l)&255;return a.buffer||a}else return n}const c=h(t);return s(c)?e(c):r(u(t))}}const N=/^[og]\s*(.+)?/,W=/^mtllib /,q=/^usemtl /,J=/^usemap /,G=/\s+/,T=new o.Vector3,z=new o.Vector3,D=new o.Vector3,E=new o.Vector3,C=new o.Vector3,I=new o.Color;function Z(){const B={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,s){if(this.object&&this.object.fromDeclaration===!1){this.object.name=t,this.object.fromDeclaration=s!==!1;return}const i=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:t||"",fromDeclaration:s!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,r){const u=this._finalize(!1);u&&(u.inherited||u.groupCount<=0)&&this.materials.splice(u.index,1);const h={index:this.materials.length,name:e||"",mtllib:Array.isArray(r)&&r.length>0?r[r.length-1]:"",smooth:u!==void 0?u.smooth:this.smooth,groupStart:u!==void 0?u.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(c){const n={index:typeof c=="number"?c:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return n.clone=this.clone.bind(n),n}};return this.materials.push(h),h},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){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),e&&this.materials.length>1)for(let u=this.materials.length-1;u>=0;u--)this.materials[u].groupCount<=0&&this.materials.splice(u,1);return e&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),r}},i&&i.name&&typeof i.clone=="function"){const e=i.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseNormalIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseUVIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/2)*2},addVertex:function(t,s,i){const e=this.vertices,r=this.object.geometry.vertices;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[i+0],e[i+1],e[i+2])},addVertexPoint:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addVertexLine:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addNormal:function(t,s,i){const e=this.normals,r=this.object.geometry.normals;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[i+0],e[i+1],e[i+2])},addFaceNormal:function(t,s,i){const e=this.vertices,r=this.object.geometry.normals;T.fromArray(e,t),z.fromArray(e,s),D.fromArray(e,i),C.subVectors(D,z),E.subVectors(T,z),C.cross(E),C.normalize(),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z)},addColor:function(t,s,i){const e=this.colors,r=this.object.geometry.colors;e[t]!==void 0&&r.push(e[t+0],e[t+1],e[t+2]),e[s]!==void 0&&r.push(e[s+0],e[s+1],e[s+2]),e[i]!==void 0&&r.push(e[i+0],e[i+1],e[i+2])},addUV:function(t,s,i){const e=this.uvs,r=this.object.geometry.uvs;r.push(e[t+0],e[t+1]),r.push(e[s+0],e[s+1]),r.push(e[i+0],e[i+1])},addDefaultUV:function(){const t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){const s=this.uvs;this.object.geometry.uvs.push(s[t+0],s[t+1])},addFace:function(t,s,i,e,r,u,h,c,n){const a=this.vertices.length;let l=this.parseVertexIndex(t,a),f=this.parseVertexIndex(s,a),m=this.parseVertexIndex(i,a);if(this.addVertex(l,f,m),this.addColor(l,f,m),h!==void 0&&h!==""){const g=this.normals.length;l=this.parseNormalIndex(h,g),f=this.parseNormalIndex(c,g),m=this.parseNormalIndex(n,g),this.addNormal(l,f,m)}else this.addFaceNormal(l,f,m);if(e!==void 0&&e!==""){const g=this.uvs.length;l=this.parseUVIndex(e,g),f=this.parseUVIndex(r,g),m=this.parseUVIndex(u,g),this.addUV(l,f,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";const s=this.vertices.length;for(let i=0,e=t.length;i<e;i++){const r=this.parseVertexIndex(t[i],s);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(t,s){this.object.geometry.type="Line";const i=this.vertices.length,e=this.uvs.length;for(let r=0,u=t.length;r<u;r++)this.addVertexLine(this.parseVertexIndex(t[r],i));for(let r=0,u=s.length;r<u;r++)this.addUVLine(this.parseUVIndex(s[r],e))}};return B.startObject("",!1),B}class X extends o.Loader{constructor(t){super(t),this.materials=null}load(t,s,i,e){const r=this,u=new o.FileLoader(this.manager);u.setPath(this.path),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},i,e)}setMaterials(t){return this.materials=t,this}parse(t){const s=new Z;t.indexOf(`\r
2
2
  `)!==-1&&(t=t.replace(/\r\n/g,`
3
3
  `)),t.indexOf(`\\
4
4
  `)!==-1&&(t=t.replace(/\\\n/g,""));const i=t.split(`
@@ -1,4 +1,4 @@
1
- import { b9 as Z, ba as Y, a$ as D, ae as P, aj as S, bg as H, ab as O, bb as V, aY as ie, bh as N, bI as X, bd as B, au as ne, bM as $, be as W, ap as K, bn as oe, bj as ae, bF as le, bZ as q, bp as Q, c9 as ce, bw as he } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9XvSEGdS.js";
1
+ import { b9 as Z, ba as Y, a$ as D, ae as P, aj as S, bg as H, ab as O, bb as V, aY as ie, bh as N, bI as X, bd as B, au as ne, bM as $, be as W, ap as K, bn as oe, bj as ae, bF as le, bZ as q, bp as Q, c9 as ce, bw as he } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-T859a6kf.js";
2
2
  class xe extends Z {
3
3
  /**
4
4
  * Constructs a new STL loader.
@@ -1 +1 @@
1
- "use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtDy8n8V.cjs"),y={type:"change"},m={type:"start"},g={type:"end"},_=new s.Ray,b=new s.Plane,E=Math.cos(70*s.MathUtils.DEG2RAD),h=new s.Vector3,l=2*Math.PI,a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},u=1e-6;class P extends s.Controls{constructor(t,e=null){super(t,e),this.state=a.NONE,this.target=new s.Vector3,this.cursor=new s.Vector3,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:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN},this.touches={ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new s.Vector3,this._lastQuaternion=new s.Quaternion,this._lastTargetPosition=new s.Vector3,this._quat=new s.Quaternion().setFromUnitVectors(t.up,new s.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new s.Spherical,this._sphericalDelta=new s.Spherical,this._scale=1,this._panOffset=new s.Vector3,this._rotateStart=new s.Vector2,this._rotateEnd=new s.Vector2,this._rotateDelta=new s.Vector2,this._panStart=new s.Vector2,this._panEnd=new s.Vector2,this._panDelta=new s.Vector2,this._dollyStart=new s.Vector2,this._dollyEnd=new s.Vector2,this._dollyDelta=new s.Vector2,this._dollyDirection=new s.Vector3,this._mouse=new s.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=D.bind(this),this._onPointerDown=T.bind(this),this._onPointerUp=M.bind(this),this._onContextMenu=L.bind(this),this._onMouseWheel=w.bind(this),this._onKeyDown=R.bind(this),this._onTouchStart=j.bind(this),this._onTouchMove=A.bind(this),this._onMouseDown=S.bind(this),this._onMouseMove=O.bind(this),this._interceptControlDown=C.bind(this),this._interceptControlUp=x.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),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(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}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(y),this.update(),this.state=a.NONE}update(t=null){const e=this.object.position;h.copy(e).sub(this.target),h.applyQuaternion(this._quat),this._spherical.setFromVector3(h),this.autoRotate&&this.state===a.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),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 o=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(o)&&isFinite(n)&&(o<-Math.PI?o+=l:o>Math.PI&&(o-=l),n<-Math.PI?n+=l:n>Math.PI&&(n-=l),o<=n?this._spherical.theta=Math.max(o,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+n)/2?Math.max(o,this._spherical.theta):Math.min(n,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 c=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=c!=this._spherical.radius}if(h.setFromSpherical(this._spherical),h.applyQuaternion(this._quatInverse),e.copy(this.target).add(h),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 c=null;if(this.object.isPerspectiveCamera){const p=h.length();c=this._clampDistance(p*this._scale);const d=p-c;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),r=!!d}else if(this.object.isOrthographicCamera){const p=new s.Vector3(this._mouse.x,this._mouse.y,0);p.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=d!==this.object.zoom;const f=new s.Vector3(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(p),this.object.updateMatrixWorld(),c=h.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;c!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(c).add(this.object.position):(_.origin.copy(this.object.position),_.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(_.direction))<E?this.object.lookAt(this.target):(b.setFromNormalAndCoplanarPoint(this.object.up,this.target),_.intersectPlane(b,this.target))))}else if(this.object.isOrthographicCamera){const c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),c!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>u||8*(1-this._lastQuaternion.dot(this.object.quaternion))>u||this._lastTargetPosition.distanceToSquared(this.target)>u?(this.dispatchEvent(y),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?l/60*this.autoRotateSpeed*t:l/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){h.setFromMatrixColumn(e,0),h.multiplyScalar(-t),this._panOffset.add(h)}_panUp(t,e){this.screenSpacePanning===!0?h.setFromMatrixColumn(e,1):(h.setFromMatrixColumn(e,0),h.crossVectors(this.object.up,h)),h.multiplyScalar(t),this._panOffset.add(h)}_pan(t,e){const o=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;h.copy(n).sub(this.target);let r=h.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*r/o.clientHeight,this.object.matrix),this._panUp(2*e*r/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/o.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),n=t-o.left,r=e-o.top,c=o.width,p=o.height;this._mouse.x=n/c*2-1,this._mouse.y=-(r/p)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.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(t){this._panEnd.set(t.clientX,t.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(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),e=!0;break}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._rotateStart.set(o,n)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panStart.set(o,n)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),r=.5*(t.pageY+o.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panEnd.set(o,n)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);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 c=(t.pageX+e.x)*.5,p=(t.pageY+e.y)*.5;this._updateZoomParameters(c,p)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId){this._pointers.splice(e,1);return}}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];e===void 0&&(e=new s.Vector2,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,o={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function T(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function D(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function M(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(g),this.state=a.NONE;break;case 1:const t=this._pointers[0],e=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:e.x,pageY:e.y});break}}function S(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case s.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=a.DOLLY;break;case s.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}break;case s.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function O(i){switch(this.state){case a.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case a.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case a.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function w(i){this.enabled===!1||this.enableZoom===!1||this.state!==a.NONE||(i.preventDefault(),this.dispatchEvent(m),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(g))}function R(i){this.enabled!==!1&&this._handleKeyDown(i)}function j(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case s.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=a.TOUCH_ROTATE;break;case s.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=a.TOUCH_PAN;break;default:this.state=a.NONE}break;case 2:switch(this.touches.TWO){case s.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=a.TOUCH_DOLLY_PAN;break;case s.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=a.TOUCH_DOLLY_ROTATE;break;default:this.state=a.NONE}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function A(i){switch(this._trackPointer(i),this.state){case a.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case a.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case a.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case a.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=a.NONE}}function L(i){this.enabled!==!1&&i.preventDefault()}function C(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function x(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}exports.OrbitControls=P;
1
+ "use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CfZR3ABW.cjs"),y={type:"change"},m={type:"start"},g={type:"end"},_=new s.Ray,b=new s.Plane,E=Math.cos(70*s.MathUtils.DEG2RAD),h=new s.Vector3,l=2*Math.PI,a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},u=1e-6;class P extends s.Controls{constructor(t,e=null){super(t,e),this.state=a.NONE,this.target=new s.Vector3,this.cursor=new s.Vector3,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:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN},this.touches={ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new s.Vector3,this._lastQuaternion=new s.Quaternion,this._lastTargetPosition=new s.Vector3,this._quat=new s.Quaternion().setFromUnitVectors(t.up,new s.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new s.Spherical,this._sphericalDelta=new s.Spherical,this._scale=1,this._panOffset=new s.Vector3,this._rotateStart=new s.Vector2,this._rotateEnd=new s.Vector2,this._rotateDelta=new s.Vector2,this._panStart=new s.Vector2,this._panEnd=new s.Vector2,this._panDelta=new s.Vector2,this._dollyStart=new s.Vector2,this._dollyEnd=new s.Vector2,this._dollyDelta=new s.Vector2,this._dollyDirection=new s.Vector3,this._mouse=new s.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=D.bind(this),this._onPointerDown=T.bind(this),this._onPointerUp=M.bind(this),this._onContextMenu=L.bind(this),this._onMouseWheel=w.bind(this),this._onKeyDown=R.bind(this),this._onTouchStart=j.bind(this),this._onTouchMove=A.bind(this),this._onMouseDown=S.bind(this),this._onMouseMove=O.bind(this),this._interceptControlDown=C.bind(this),this._interceptControlUp=x.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),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(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}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(y),this.update(),this.state=a.NONE}update(t=null){const e=this.object.position;h.copy(e).sub(this.target),h.applyQuaternion(this._quat),this._spherical.setFromVector3(h),this.autoRotate&&this.state===a.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),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 o=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(o)&&isFinite(n)&&(o<-Math.PI?o+=l:o>Math.PI&&(o-=l),n<-Math.PI?n+=l:n>Math.PI&&(n-=l),o<=n?this._spherical.theta=Math.max(o,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+n)/2?Math.max(o,this._spherical.theta):Math.min(n,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 c=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=c!=this._spherical.radius}if(h.setFromSpherical(this._spherical),h.applyQuaternion(this._quatInverse),e.copy(this.target).add(h),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 c=null;if(this.object.isPerspectiveCamera){const p=h.length();c=this._clampDistance(p*this._scale);const d=p-c;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),r=!!d}else if(this.object.isOrthographicCamera){const p=new s.Vector3(this._mouse.x,this._mouse.y,0);p.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=d!==this.object.zoom;const f=new s.Vector3(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(p),this.object.updateMatrixWorld(),c=h.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;c!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(c).add(this.object.position):(_.origin.copy(this.object.position),_.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(_.direction))<E?this.object.lookAt(this.target):(b.setFromNormalAndCoplanarPoint(this.object.up,this.target),_.intersectPlane(b,this.target))))}else if(this.object.isOrthographicCamera){const c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),c!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>u||8*(1-this._lastQuaternion.dot(this.object.quaternion))>u||this._lastTargetPosition.distanceToSquared(this.target)>u?(this.dispatchEvent(y),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?l/60*this.autoRotateSpeed*t:l/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){h.setFromMatrixColumn(e,0),h.multiplyScalar(-t),this._panOffset.add(h)}_panUp(t,e){this.screenSpacePanning===!0?h.setFromMatrixColumn(e,1):(h.setFromMatrixColumn(e,0),h.crossVectors(this.object.up,h)),h.multiplyScalar(t),this._panOffset.add(h)}_pan(t,e){const o=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;h.copy(n).sub(this.target);let r=h.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*r/o.clientHeight,this.object.matrix),this._panUp(2*e*r/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/o.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),n=t-o.left,r=e-o.top,c=o.width,p=o.height;this._mouse.x=n/c*2-1,this._mouse.y=-(r/p)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.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(t){this._panEnd.set(t.clientX,t.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(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),e=!0;break}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._rotateStart.set(o,n)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panStart.set(o,n)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),r=.5*(t.pageY+o.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panEnd.set(o,n)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);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 c=(t.pageX+e.x)*.5,p=(t.pageY+e.y)*.5;this._updateZoomParameters(c,p)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId){this._pointers.splice(e,1);return}}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];e===void 0&&(e=new s.Vector2,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,o={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function T(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function D(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function M(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(g),this.state=a.NONE;break;case 1:const t=this._pointers[0],e=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:e.x,pageY:e.y});break}}function S(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case s.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=a.DOLLY;break;case s.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}break;case s.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function O(i){switch(this.state){case a.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case a.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case a.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function w(i){this.enabled===!1||this.enableZoom===!1||this.state!==a.NONE||(i.preventDefault(),this.dispatchEvent(m),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(g))}function R(i){this.enabled!==!1&&this._handleKeyDown(i)}function j(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case s.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=a.TOUCH_ROTATE;break;case s.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=a.TOUCH_PAN;break;default:this.state=a.NONE}break;case 2:switch(this.touches.TWO){case s.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=a.TOUCH_DOLLY_PAN;break;case s.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=a.TOUCH_DOLLY_ROTATE;break;default:this.state=a.NONE}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function A(i){switch(this._trackPointer(i),this.state){case a.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case a.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case a.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case a.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=a.NONE}}function L(i){this.enabled!==!1&&i.preventDefault()}function C(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function x(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}exports.OrbitControls=P;
@@ -1,4 +1,4 @@
1
- import { cj as S, ab as p, ak as u, ck as _, bt as E, cl as P, bp as c, cm as w, aw as O, az as R } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9XvSEGdS.js";
1
+ import { cj as S, ab as p, ak as u, ck as _, bt as E, cl as P, bp as c, cm as w, aw as O, az as R } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-T859a6kf.js";
2
2
  const D = { type: "change" }, b = { type: "start" }, M = { type: "end" }, f = new w(), T = new O(), j = Math.cos(70 * R.DEG2RAD), n = new p(), r = 2 * Math.PI, o = {
3
3
  NONE: -1,
4
4
  ROTATE: 0,
@@ -1,5 +1,5 @@
1
- import { S as Ln } from "./MTLLoader-d2OpvLOW.js";
2
- import { c7 as vn, bz as Rn, b9 as lt, bn as At, ba as In, ab as pe, ay as he, bJ as dt, ad as Mn, bw as Tt, ae as ut, az as Le, bQ as ft, c8 as Sn, au as ve, bZ as Se, aj as me, bp as On, av as Gn, bj as qn, af as ht, bO as Pn, aq as jn, br as Fn, at as Un, ar as Hn, aY as pt, bt as Et, bW as mt, bY as Bn, a$ as zn, bb as ye, bR as Dn, bh as bt, bL as Vn, ap as Ce, b1 as Jn, bM as Wn, bP as Kn, bF as Oe, bH as gt, c9 as Yn, ca as Xn, cb as yt, cc as $n, cd as Zn, ce as Qn, cf as ei, bf as ti, cg as ni, ch as ii, ax as si } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9XvSEGdS.js";
1
+ import { S as Ln } from "./MTLLoader-DlOCq_sz.js";
2
+ import { c7 as vn, bz as Rn, b9 as lt, bn as At, ba as In, ab as pe, ay as he, bJ as dt, ad as Mn, bw as Tt, ae as ut, az as Le, bQ as ft, c8 as Sn, au as ve, bZ as Se, aj as me, bp as On, av as Gn, bj as qn, af as ht, bO as Pn, aq as jn, br as Fn, at as Un, ar as Hn, aY as pt, bt as Et, bW as mt, bY as Bn, a$ as zn, bb as ye, bR as Dn, bh as bt, bL as Vn, ap as Ce, b1 as Jn, bM as Wn, bP as Kn, bF as Oe, bH as gt, c9 as Yn, ca as Xn, cb as yt, cc as $n, cd as Zn, ce as Qn, cf as ei, bf as ti, cg as ni, ch as ii, ax as si } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-T859a6kf.js";
3
3
  class wt extends vn {
4
4
  /**
5
5
  * Constructs a new TGA loader.
@@ -1,4 +1,4 @@
1
- "use strict";const an=require("./MTLLoader-CMpGG9Bd.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtDy8n8V.cjs");class tt extends a.DataTextureLoader{constructor(O){super(O)}parse(O){function ee(f){switch(f.image_type){case ye:case te:if(f.colormap_length>256||f.colormap_size!==24||f.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case Z:case se:case pe:case me:if(f.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case be:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+f.image_type)}if(f.width<=0||f.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(f.pixel_size!==8&&f.pixel_size!==16&&f.pixel_size!==24&&f.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+f.pixel_size)}function v(f,Y,z,D,$){let j,V;const _=z.pixel_size>>3,C=z.width*z.height*_;if(Y&&(V=$.subarray(D,D+=z.colormap_length*(z.colormap_size>>3))),f){j=new Uint8Array(C);let A,h,T,J=0;const de=new Uint8Array(_);for(;J<C;)if(A=$[D++],h=(A&127)+1,A&128){for(T=0;T<_;++T)de[T]=$[D++];for(T=0;T<h;++T)j.set(de,J+T*_);J+=_*h}else{for(h*=_,T=0;T<h;++T)j[J+T]=$[D++];J+=h}}else j=$.subarray(D,D+=Y?z.width*z.height:C);return{pixel_data:j,palettes:V}}function oe(f,Y,z,D,$,j,V,_,C){const A=C;let h,T=0,J,de;const we=L.width;for(de=Y;de!==D;de+=z)for(J=$;J!==V;J+=j,T++)h=_[T],f[(J+we*de)*4+3]=255,f[(J+we*de)*4+2]=A[h*3+0],f[(J+we*de)*4+1]=A[h*3+1],f[(J+we*de)*4+0]=A[h*3+2];return f}function R(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A+=2)C=_[A+0]+(_[A+1]<<8),f[(h+J*T)*4+0]=(C&31744)>>7,f[(h+J*T)*4+1]=(C&992)>>2,f[(h+J*T)*4+2]=(C&31)<<3,f[(h+J*T)*4+3]=C&32768?0:255;return f}function re(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=3)f[(A+T*h)*4+3]=255,f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2];return f}function S(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=4)f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2],f[(A+T*h)*4+3]=_[C+3];return f}function X(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A++)C=_[A],f[(h+J*T)*4+0]=C,f[(h+J*T)*4+1]=C,f[(h+J*T)*4+2]=C,f[(h+J*T)*4+3]=255;return f}function ie(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=2)f[(A+T*h)*4+0]=_[C+0],f[(A+T*h)*4+1]=_[C+0],f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+3]=_[C+1];return f}function ge(f,Y,z,D,$){let j,V,_,C,A,h;switch((L.flags&I)>>U){default:case W:j=0,_=1,A=Y,V=0,C=1,h=z;break;case B:j=0,_=1,A=Y,V=z-1,C=-1,h=-1;break;case G:j=Y-1,_=-1,A=-1,V=0,C=1,h=z;break;case x:j=Y-1,_=-1,A=-1,V=z-1,C=-1,h=-1;break}if(q)switch(L.pixel_size){case 8:X(f,V,C,h,j,_,A,D);break;case 16:ie(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(L.pixel_size){case 8:oe(f,V,C,h,j,_,A,D,$);break;case 16:R(f,V,C,h,j,_,A,D);break;case 24:re(f,V,C,h,j,_,A,D);break;case 32:S(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return f}const be=0,ye=1,Z=2,se=3,te=9,pe=10,me=11,I=48,U=4,B=0,x=1,W=2,G=3;if(O.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let g=0;const p=new Uint8Array(O),L={id_length:p[g++],colormap_type:p[g++],image_type:p[g++],colormap_index:p[g++]|p[g++]<<8,colormap_length:p[g++]|p[g++]<<8,colormap_size:p[g++],origin:[p[g++]|p[g++]<<8,p[g++]|p[g++]<<8],width:p[g++]|p[g++]<<8,height:p[g++]|p[g++]<<8,pixel_size:p[g++],flags:p[g++]};if(ee(L),L.id_length+g>O.length)throw new Error("THREE.TGALoader: No data.");g+=L.id_length;let M=!1,N=!1,q=!1;switch(L.image_type){case te:M=!0,N=!0;break;case ye:N=!0;break;case pe:M=!0;break;case Z:break;case me:M=!0,q=!0;break;case se:q=!0;break}const ce=new Uint8Array(L.width*L.height*4),ne=v(M,N,L,g,p);return ge(ce,L.width,L.height,ne.pixel_data,ne.palettes),{data:ce,width:L.width,height:L.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class cn extends a.Loader{load(O,ee,v,oe){const R=this,re=R.path===""?a.LoaderUtils.extractUrlBase(O):R.path,S=new a.FileLoader(R.manager);S.setPath(R.path),S.setRequestHeader(R.requestHeader),S.setWithCredentials(R.withCredentials),S.load(O,function(X){try{ee(R.parse(X,re))}catch(ie){oe?oe(ie):console.error(ie),R.manager.itemError(O)}},v,oe)}parse(O,ee){function v(t,e){const i=[],n=t.childNodes;for(let s=0,o=n.length;s<o;s++){const r=n[s];r.nodeName===e&&i.push(r)}return i}function oe(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function R(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function re(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function S(t){return t.substring(1)}function X(){return"three_default_"+on++}function ie(t){return Object.keys(t).length===0}function ge(t){return{unit:be(v(t,"unit")[0]),upAxis:ye(v(t,"up_axis")[0])}}function be(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function ye(t){return t!==void 0?t.textContent:"Y_UP"}function Z(t,e,i,n){const s=v(t,e)[0];if(s!==void 0){const o=v(s,i);for(let r=0;r<o.length;r++)n(o[r])}}function se(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function te(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function pe(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType!==1)continue;let r;switch(o.nodeName){case"source":r=o.getAttribute("id"),e.sources[r]=_e(o);break;case"sampler":r=o.getAttribute("id"),e.samplers[r]=me(o);break;case"channel":r=o.getAttribute("target"),e.channels[r]=I(o);break;case"animation":pe(o),i=!0;break;default:console.log(o)}}i===!1&&(E.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function me(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic");e.inputs[r]=o;break}}return e}function I(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let o=n.shift();const r=o.indexOf("(")!==-1,u=o.indexOf(".")!==-1;if(u)n=o.split("."),o=n.shift(),e.member=n.shift();else if(r){const l=o.split("(");o=l.shift();for(let d=0;d<l.length;d++)l[d]=parseInt(l[d].replace(/\)/,""));e.indices=l}return e.id=s,e.sid=o,e.arraySyntax=r,e.memberSyntax=u,e.sampler=S(t.getAttribute("source")),e}function U(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const o in i)if(i.hasOwnProperty(o)){const r=i[o],u=n[r.sampler],l=u.inputs.INPUT,d=u.inputs.OUTPUT,y=s[l],c=s[d],b=x(r,y,c);L(b,e)}return e}function B(t){return te(E.animations[t],U)}function x(t,e,i){const n=E.nodes[t.id],s=Ne(n.id),o=n.transforms[t.sid],r=n.matrix.clone().transpose();let u,l,d,y,c,b;const m={};switch(o){case"matrix":for(d=0,y=e.array.length;d<y;d++)if(u=e.array[d],l=d*i.stride,m[u]===void 0&&(m[u]={}),t.arraySyntax===!0){const K=i.array[l],H=t.indices[0]+4*t.indices[1];m[u][H]=K}else for(c=0,b=i.stride;c<b;c++)m[u][c]=i.array[l+c];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break}const k=W(m,r);return{name:s.uuid,keyframes:k}}function W(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)M(i,s,e.elements[s]);return i;function n(s,o){return s.time-o.time}}const G=new a.Vector3,g=new a.Vector3,p=new a.Quaternion;function L(t,e){const i=t.keyframes,n=t.name,s=[],o=[],r=[],u=[];for(let l=0,d=i.length;l<d;l++){const y=i[l],c=y.time,b=y.value;le.fromArray(b).transpose(),le.decompose(G,p,g),s.push(c),o.push(G.x,G.y,G.z),r.push(p.x,p.y,p.z,p.w),u.push(g.x,g.y,g.z)}return o.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,o)),r.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,r)),u.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,u)),e}function M(t,e,i){let n,s=!0,o,r;for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]=i;else N(t,e)}function N(t,e){let i,n;for(let s=0,o=t.length;s<o;s++){const r=t[s];if(r.value[e]===null){if(i=q(t,s,e),n=ce(t,s,e),i===null){r.value[e]=n.value[e];continue}if(n===null){r.value[e]=i.value[e];continue}ne(r,i,n,e)}}}function q(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function ce(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function ne(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function f(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(S(s.getAttribute("url")));break}}E.clips[t.getAttribute("id")]=e}function Y(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let o=0,r=s.length;o<r;o++){const u=B(s[o]);for(let l=0,d=u.length;l<d;l++)e.push(u[l])}return new a.AnimationClip(i,n,e)}function z(t){return te(E.clips[t],Y)}function D(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=S(s.getAttribute("source")),e.skin=$(s);break;case"morph":e.id=S(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}E.controllers[t.getAttribute("id")]=e}function $(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=R(s.textContent);break;case"source":const o=s.getAttribute("id");e.sources[o]=_e(s);break;case"joints":e.joints=j(s);break;case"vertex_weights":e.vertexWeights=V(s);break}}return e}function j(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source"));e.inputs[o]=r;break}}return e}function V(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source")),u=parseInt(s.getAttribute("offset"));e.inputs[o]={id:r,offset:u};break;case"vcount":e.vcount=re(s.textContent);break;case"v":e.v=re(s.textContent);break}}return e}function _(t){const e={id:t.id},i=E.geometries[e.id];return t.skin!==void 0&&(e.skin=C(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function C(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,o=s.vcount,r=s.v,u=s.inputs.JOINT.offset,l=s.inputs.WEIGHT.offset,d=t.sources[t.joints.inputs.JOINT],y=t.sources[t.joints.inputs.INV_BIND_MATRIX],c=n[s.inputs.WEIGHT.id].array;let b=0,m,k,w;for(m=0,w=o.length;m<w;m++){const H=o[m],F=[];for(k=0;k<H;k++){const P=r[b+u],he=r[b+l],ae=c[he];F.push({index:P,weight:ae}),b+=2}for(F.sort(K),k=0;k<4;k++){const P=F[k];P!==void 0?(i.indices.array.push(P.index),i.weights.array.push(P.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),m=0,w=d.array.length;m<w;m++){const H=d.array[m],F=new a.Matrix4().fromArray(y.array,m*y.stride).transpose();i.joints.push({name:H,boneInverse:F})}return i;function K(H,F){return F.weight-H.weight}}function A(t){return te(E.controllers[t],_)}function h(t){const e={init_from:v(t,"init_from")[0].textContent};E.images[t.getAttribute("id")]=e}function T(t){return t.build!==void 0?t.build:t.init_from}function J(t){const e=E.images[t];return e!==void 0?te(e,T):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function de(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=we(s);break}}E.effects[t.getAttribute("id")]=e}function we(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":st(s,e);break;case"technique":e.technique=at(s);break;case"extra":e.extra=Ge(s);break}}return e}function st(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType===1)switch(o.nodeName){case"surface":e.surfaces[i]=ot(o);break;case"sampler2D":e.samplers[i]=rt(o);break}}}function ot(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function rt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function at(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=ct(s);break;case"extra":e.extra=Ge(s);break}}return e}function ct(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=Se(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:Se(s)};break}}return e}function Se(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=R(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:Ie(s)};break}}return e}function Ie(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":lt(s,e);break}}return e}function lt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":dt(s,e);break}}}function dt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}}function Ge(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=ut(s);break}}return e}function ut(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}return e}function Oe(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:Ie(s)};break}}return e}function Fe(t){return t}function ft(t){return te(E.effects[t],Fe)}function ht(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=S(s.getAttribute("url"));break}}E.materials[t.getAttribute("id")]=e}function pt(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=Re;break;default:e=Ze}return e}function Pe(t){const e=ft(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(l,d=null){const y=e.profile.samplers[l.id];let c=null;if(y!==void 0){const b=e.profile.surfaces[y.source];c=J(b.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),c=J(l.id);if(c!==null){const b=pt(c);if(b!==void 0){const m=b.load(c),k=l.extra;if(k!==void 0&&k.technique!==void 0&&ie(k.technique)===!1){const w=k.technique;m.wrapS=w.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,m.wrapT=w.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,m.offset.set(w.offsetU||0,w.offsetV||0),m.repeat.set(w.repeatU||1,w.repeatV||1)}else m.wrapS=a.RepeatWrapping,m.wrapT=a.RepeatWrapping;return d!==null&&(m.colorSpace=d),m}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",c),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",l.id),null}const o=i.parameters;for(const l in o){const d=o[l];switch(l){case"diffuse":d.color&&n.color.fromArray(d.color),d.texture&&(n.map=s(d.texture,a.SRGBColorSpace));break;case"specular":d.color&&n.specular&&n.specular.fromArray(d.color),d.texture&&(n.specularMap=s(d.texture));break;case"bump":d.texture&&(n.normalMap=s(d.texture));break;case"ambient":d.texture&&(n.lightMap=s(d.texture,a.SRGBColorSpace));break;case"shininess":d.float&&n.shininess&&(n.shininess=d.float);break;case"emission":d.color&&n.emissive&&n.emissive.fromArray(d.color),d.texture&&(n.emissiveMap=s(d.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let r=o.transparent,u=o.transparency;if(u===void 0&&r&&(u={float:1}),r===void 0&&u&&(r={opaque:"A_ONE",data:{color:[1,1,1,1]}}),r&&u)if(r.data.texture)n.transparent=!0;else{const l=r.data.color;switch(r.opaque){case"A_ONE":n.opacity=l[3]*u.float;break;case"RGB_ZERO":n.opacity=1-l[0]*u.float;break;case"A_ZERO":n.opacity=1-l[3]*u.float;break;case"RGB_ONE":n.opacity=l[0]*u.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',r.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const l=i.extra.technique;for(const d in l){const y=l[d];switch(d){case"double_sided":n.side=y===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(y.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function mt(t){return te(E.materials[t],Pe)}function gt(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=bt(s);break}}E.cameras[t.getAttribute("id")]=e}function bt(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return yt(i)}}return{}}function yt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=wt(n);break}}return e}function wt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function Ue(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function kt(t){const e=E.cameras[t];return e!==void 0?te(e,Ue):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function Nt(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=At(s);break}}E.lights[t.getAttribute("id")]=e}function At(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=Tt(s)}}return e}function Tt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const o=R(s.textContent);e.color=new a.Color().fromArray(o),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const r=parseFloat(s.textContent);e.distance=r?Math.sqrt(1/r):0;break}}return e}function qe(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function Et(t){const e=E.lights[t];return e!==void 0?te(e,qe):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function xt(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=v(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const o=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[o]=_e(s);break;case"vertices":e.vertices=Ct(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(_t(s));break;default:console.log(s)}}E.geometries[t.getAttribute("id")]=e}}function _e(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=R(n.textContent);break;case"Name_array":e.array=oe(n.textContent);break;case"technique_common":const s=v(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function Ct(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=S(n.getAttribute("source")))}return e}function _t(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic"),u=parseInt(s.getAttribute("offset")),l=parseInt(s.getAttribute("set")),d=l>0?r+l:r;e.inputs[d]={id:o,offset:u},e.stride=Math.max(e.stride,u+1),r==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=re(s.textContent);break;case"p":e.p=re(s.textContent);break}}return e}function Lt(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function Mt(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function je(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const o=Lt(s);for(const r in o){const u=o[r];Mt(u),e[r]=Rt(u,i,n)}return e}function Rt(t,e,i){const n={},s={array:[],stride:0},o={array:[],stride:0},r={array:[],stride:0},u={array:[],stride:0},l={array:[],stride:0},d={array:[],stride:4},y={array:[],stride:4},c=new a.BufferGeometry,b=[];let m=0;for(let k=0;k<t.length;k++){const w=t[k],K=w.inputs;let H=0;switch(w.type){case"lines":case"linestrips":H=w.count*2;break;case"triangles":H=w.count*3;break;case"polylist":for(let F=0;F<w.count;F++){const P=w.vcount[F];switch(P){case 3:H+=3;break;case 4:H+=6;break;default:H+=(P-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",w.type)}c.addGroup(m,H,k),m+=H,w.material&&b.push(w.material);for(const F in K){const P=K[F];switch(F){case"VERTEX":for(const he in i){const ae=i[he];switch(he){case"POSITION":const Ae=s.array.length;if(ue(w,e[ae],P.offset,s.array),s.stride=e[ae].stride,e.skinWeights&&e.skinIndices&&(ue(w,e.skinIndices,P.offset,d.array),ue(w,e.skinWeights,P.offset,y.array)),w.hasUV===!1&&t.uvsNeedsFix===!0){const rn=(s.array.length-Ae)/s.stride;for(let et=0;et<rn;et++)r.array.push(0,0)}break;case"NORMAL":ue(w,e[ae],P.offset,o.array),o.stride=e[ae].stride;break;case"COLOR":ue(w,e[ae],P.offset,l.array),l.stride=e[ae].stride;break;case"TEXCOORD":ue(w,e[ae],P.offset,r.array),r.stride=e[ae].stride;break;case"TEXCOORD1":ue(w,e[ae],P.offset,u.array),r.stride=e[ae].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',he)}}break;case"NORMAL":ue(w,e[P.id],P.offset,o.array),o.stride=e[P.id].stride;break;case"COLOR":ue(w,e[P.id],P.offset,l.array,!0),l.stride=e[P.id].stride;break;case"TEXCOORD":ue(w,e[P.id],P.offset,r.array),r.stride=e[P.id].stride;break;case"TEXCOORD1":ue(w,e[P.id],P.offset,u.array),u.stride=e[P.id].stride;break}}}return s.array.length>0&&c.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),o.array.length>0&&c.setAttribute("normal",new a.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&c.setAttribute("color",new a.Float32BufferAttribute(l.array,l.stride)),r.array.length>0&&c.setAttribute("uv",new a.Float32BufferAttribute(r.array,r.stride)),u.array.length>0&&c.setAttribute("uv1",new a.Float32BufferAttribute(u.array,u.stride)),d.array.length>0&&c.setAttribute("skinIndex",new a.Float32BufferAttribute(d.array,d.stride)),y.array.length>0&&c.setAttribute("skinWeight",new a.Float32BufferAttribute(y.array,y.stride)),n.data=c,n.type=t[0].type,n.materialKeys=b,n}function ue(t,e,i,n,s=!1){const o=t.p,r=t.stride,u=t.vcount;function l(c){let b=o[c+i]*y;const m=b+y;for(;b<m;b++)n.push(d[b]);if(s){const k=n.length-y-1;Ee.setRGB(n[k+0],n[k+1],n[k+2],a.SRGBColorSpace),n[k+0]=Ee.r,n[k+1]=Ee.g,n[k+2]=Ee.b}}const d=e.array,y=e.stride;if(t.vcount!==void 0){let c=0;for(let b=0,m=u.length;b<m;b++){const k=u[b];if(k===4){const w=c+r*0,K=c+r*1,H=c+r*2,F=c+r*3;l(w),l(K),l(F),l(K),l(H),l(F)}else if(k===3){const w=c+r*0,K=c+r*1,H=c+r*2;l(w),l(K),l(H)}else if(k>4)for(let w=1,K=k-2;w<=K;w++){const H=c+r*0,F=c+r*w,P=c+r*(w+1);l(H),l(F),l(P)}c+=r*k}}else for(let c=0,b=o.length;c<b;c+=r)l(c)}function Be(t){return te(E.geometries[t],je)}function vt(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":Gt(n,e);break}}E.kinematicsModels[t.getAttribute("id")]=e}function St(t){return t.build!==void 0?t.build:t}function It(t){return te(E.kinematicsModels[t],St)}function Gt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=Ot(n);break;case"link":e.links.push(He(n));break}}}function Ot(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=Ft(n);break}}return e}function Ft(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=R(n.textContent);e.axis.fromArray(s);break;case"limits":const o=n.getElementsByTagName("max")[0],r=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(o.textContent),e.limits.min=parseFloat(r.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function He(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(Pt(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function Pt(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(He(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function De(t){const e={type:t.nodeName},i=R(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function Ut(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},qt(n,e.rigidBodies[n.getAttribute("name")]);break}}E.physicsModels[t.getAttribute("id")]=e}function qt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":jt(n,e);break}}}function jt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=R(n.textContent);break;case"mass":e.mass=R(n.textContent)[0];break}}}function Bt(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(Ht(n));break}}E.kinematicsScenes[S(t.getAttribute("url"))]=e}function Ht(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const o=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=o.substring(0,o.length-1);break}}return e}function Dt(t){return t.build!==void 0?t.build:t}function Vt(t){return te(E.kinematicsScenes[t],Dt)}function zt(){const t=Object.keys(E.kinematicsModels)[0],e=Object.keys(E.kinematicsScenes)[0],i=Object.keys(E.visualScenes)[0];if(t===void 0||e===void 0)return;const n=It(t),s=Vt(e),o=Ye(i),r=s.bindJointAxis,u={};for(let y=0,c=r.length;y<c;y++){const b=r[y],m=Q.querySelector('[sid="'+b.target+'"]');if(m){const k=m.parentElement;l(b.jointIndex,k)}}function l(y,c){const b=c.getAttribute("name"),m=n.joints[y];o.traverse(function(k){k.name===b&&(u[y]={object:k,transforms:Jt(c),joint:m,position:m.zeroPosition})})}const d=new a.Matrix4;Qe={joints:n&&n.joints,getJointValue:function(y){const c=u[y];if(c)return c.position;console.warn("THREE.ColladaLoader: Joint "+y+" doesn't exist.")},setJointValue:function(y,c){const b=u[y];if(b){const m=b.joint;if(c>m.limits.max||c<m.limits.min)console.warn("THREE.ColladaLoader: Joint "+y+" value "+c+" outside of limits (min: "+m.limits.min+", max: "+m.limits.max+").");else if(m.static)console.warn("THREE.ColladaLoader: Joint "+y+" is static.");else{const k=b.object,w=m.axis,K=b.transforms;le.identity();for(let H=0;H<K.length;H++){const F=K[H];if(F.sid&&F.sid.indexOf(y)!==-1)switch(m.type){case"revolute":le.multiply(d.makeRotationAxis(w,a.MathUtils.degToRad(c)));break;case"prismatic":le.multiply(d.makeTranslation(w.x*c,w.y*c,w.z*c));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+m.type);break}else switch(F.type){case"matrix":le.multiply(F.obj);break;case"translate":le.multiply(d.makeTranslation(F.obj.x,F.obj.y,F.obj.z));break;case"scale":le.scale(F.obj);break;case"rotate":le.multiply(d.makeRotationAxis(F.obj,F.angle));break}}k.matrix.copy(le),k.matrix.decompose(k.position,k.quaternion,k.scale),u[y].position=c}}else console.log("THREE.ColladaLoader: "+y+" does not exist.")}}}function Jt(t){const e=[],i=Q.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let o,r;switch(s.nodeName){case"matrix":o=R(s.textContent);const u=new a.Matrix4().fromArray(o).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:u});break;case"translate":case"scale":o=R(s.textContent),r=new a.Vector3().fromArray(o),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r});break;case"rotate":o=R(s.textContent),r=new a.Vector3().fromArray(o);const l=a.MathUtils.degToRad(o[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r,angle:l});break}}return e}function Wt(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const le=new a.Matrix4,ke=new a.Vector3;function Le(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),Le(n);break;case"instance_camera":e.instanceCameras.push(S(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(Ve(n));break;case"instance_light":e.instanceLights.push(S(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(Ve(n));break;case"instance_node":e.instanceNodes.push(S(n.getAttribute("url")));break;case"matrix":s=R(n.textContent),e.matrix.multiply(le.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=R(n.textContent),ke.fromArray(s),e.matrix.multiply(le.makeTranslation(ke.x,ke.y,ke.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=R(n.textContent);const o=a.MathUtils.degToRad(s[3]);e.matrix.multiply(le.makeRotationAxis(ke.fromArray(s),o)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=R(n.textContent),e.matrix.scale(ke.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return We(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):E.nodes[e.id]=e,e}function Ve(t){const e={id:S(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let o=0;o<s.length;o++){const r=s[o],u=r.getAttribute("symbol"),l=r.getAttribute("target");e.materials[u]=S(l)}break;case"skeleton":e.skeletons.push(S(n.textContent));break}}return e}function Kt(t,e){const i=[],n=[];let s,o,r;for(s=0;s<t.length;s++){const d=t[s];let y;if(We(d))y=Ne(d),ze(y,e,i);else if(Qt(d)){const b=E.visualScenes[d].children;for(let m=0;m<b.length;m++){const k=b[m];if(k.type==="JOINT"){const w=Ne(k.id);ze(w,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",d)}for(s=0;s<e.length;s++)for(o=0;o<i.length;o++)if(r=i[o],r.bone.name===e[s].name){n[s]=r,r.processed=!0;break}for(s=0;s<i.length;s++)r=i[s],r.processed===!1&&(n.push(r),r.processed=!0);const u=[],l=[];for(s=0;s<n.length;s++)r=n[s],u.push(r.bone),l.push(r.boneInverse);return new a.Skeleton(u,l)}function ze(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let o=0;o<e.length;o++){const r=e[o];if(r.name===n.name){s=r.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function Yt(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,o=t.instanceCameras,r=t.instanceControllers,u=t.instanceLights,l=t.instanceGeometries,d=t.instanceNodes;for(let c=0,b=n.length;c<b;c++)e.push(Ne(n[c]));for(let c=0,b=o.length;c<b;c++){const m=kt(o[c]);m!==null&&e.push(m.clone())}for(let c=0,b=r.length;c<b;c++){const m=r[c],k=A(m.id),w=Be(k.id),K=Je(w,m.materials),H=m.skeletons,F=k.skin.joints,P=Kt(H,F);for(let he=0,ae=K.length;he<ae;he++){const Ae=K[he];Ae.isSkinnedMesh&&(Ae.bind(P,k.skin.bindMatrix),Ae.normalizeSkinWeights()),e.push(Ae)}}for(let c=0,b=u.length;c<b;c++){const m=Et(u[c]);m!==null&&e.push(m.clone())}for(let c=0,b=l.length;c<b;c++){const m=l[c],k=Be(m.id),w=Je(k,m.materials);for(let K=0,H=w.length;K<H;K++)e.push(w[K])}for(let c=0,b=d.length;c<b;c++)e.push(Ne(d[c]).clone());let y;if(n.length===0&&e.length===1)y=e[0];else{y=s==="JOINT"?new a.Bone:new a.Group;for(let c=0;c<e.length;c++)y.add(e[c])}return y.name=s==="JOINT"?t.sid:t.name,y.matrix.copy(i),y.matrix.decompose(y.position,y.quaternion,y.scale),y}const Xt=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function $t(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const o=e[t[n]];o===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(Xt)):i.push(mt(o))}return i}function Je(t,e){const i=[];for(const n in t){const s=t[n],o=$t(s.materialKeys,e);if(o.length===0&&(n==="lines"||n==="linestrips"?o.push(new a.LineBasicMaterial):o.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let d=0,y=o.length;d<y;d++){const c=o[d];if(c.isMeshPhongMaterial===!0||c.isMeshLambertMaterial===!0){const b=new a.LineBasicMaterial;b.color.copy(c.color),b.opacity=c.opacity,b.transparent=c.transparent,o[d]=b}}const r=s.data.attributes.skinIndex!==void 0,u=o.length===1?o[0]:o;let l;switch(n){case"lines":l=new a.LineSegments(s.data,u);break;case"linestrips":l=new a.Line(s.data,u);break;case"triangles":case"polylist":r?l=new a.SkinnedMesh(s.data,u):l=new a.Mesh(s.data,u);break}i.push(l)}return i}function We(t){return E.nodes[t]!==void 0}function Ne(t){return te(E.nodes[t],Yt)}function Zt(t){const e={name:t.getAttribute("name"),children:[]};Wt(t);const i=v(t,"node");for(let n=0;n<i.length;n++)e.children.push(Le(i[n]));E.visualScenes[t.getAttribute("id")]=e}function Ke(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(Ne(s.id))}return e}function Qt(t){return E.visualScenes[t]!==void 0}function Ye(t){return te(E.visualScenes[t],Ke)}function en(t){const e=v(t,"instance_visual_scene")[0];return Ye(S(e.getAttribute("url")))}function tn(){const t=E.clips;if(ie(t)===!0){if(ie(E.animations)===!1){const e=[];for(const i in E.animations){const n=B(i);for(let s=0,o=n.length;s<o;s++)e.push(n[s])}xe.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)xe.push(z(e))}function nn(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
1
+ "use strict";const an=require("./MTLLoader-BTzWsYw_.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CfZR3ABW.cjs");class tt extends a.DataTextureLoader{constructor(O){super(O)}parse(O){function ee(f){switch(f.image_type){case ye:case te:if(f.colormap_length>256||f.colormap_size!==24||f.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case Z:case se:case pe:case me:if(f.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case be:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+f.image_type)}if(f.width<=0||f.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(f.pixel_size!==8&&f.pixel_size!==16&&f.pixel_size!==24&&f.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+f.pixel_size)}function v(f,Y,z,D,$){let j,V;const _=z.pixel_size>>3,C=z.width*z.height*_;if(Y&&(V=$.subarray(D,D+=z.colormap_length*(z.colormap_size>>3))),f){j=new Uint8Array(C);let A,h,T,J=0;const de=new Uint8Array(_);for(;J<C;)if(A=$[D++],h=(A&127)+1,A&128){for(T=0;T<_;++T)de[T]=$[D++];for(T=0;T<h;++T)j.set(de,J+T*_);J+=_*h}else{for(h*=_,T=0;T<h;++T)j[J+T]=$[D++];J+=h}}else j=$.subarray(D,D+=Y?z.width*z.height:C);return{pixel_data:j,palettes:V}}function oe(f,Y,z,D,$,j,V,_,C){const A=C;let h,T=0,J,de;const we=L.width;for(de=Y;de!==D;de+=z)for(J=$;J!==V;J+=j,T++)h=_[T],f[(J+we*de)*4+3]=255,f[(J+we*de)*4+2]=A[h*3+0],f[(J+we*de)*4+1]=A[h*3+1],f[(J+we*de)*4+0]=A[h*3+2];return f}function R(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A+=2)C=_[A+0]+(_[A+1]<<8),f[(h+J*T)*4+0]=(C&31744)>>7,f[(h+J*T)*4+1]=(C&992)>>2,f[(h+J*T)*4+2]=(C&31)<<3,f[(h+J*T)*4+3]=C&32768?0:255;return f}function re(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=3)f[(A+T*h)*4+3]=255,f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2];return f}function S(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=4)f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2],f[(A+T*h)*4+3]=_[C+3];return f}function X(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A++)C=_[A],f[(h+J*T)*4+0]=C,f[(h+J*T)*4+1]=C,f[(h+J*T)*4+2]=C,f[(h+J*T)*4+3]=255;return f}function ie(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=2)f[(A+T*h)*4+0]=_[C+0],f[(A+T*h)*4+1]=_[C+0],f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+3]=_[C+1];return f}function ge(f,Y,z,D,$){let j,V,_,C,A,h;switch((L.flags&I)>>U){default:case W:j=0,_=1,A=Y,V=0,C=1,h=z;break;case B:j=0,_=1,A=Y,V=z-1,C=-1,h=-1;break;case G:j=Y-1,_=-1,A=-1,V=0,C=1,h=z;break;case x:j=Y-1,_=-1,A=-1,V=z-1,C=-1,h=-1;break}if(q)switch(L.pixel_size){case 8:X(f,V,C,h,j,_,A,D);break;case 16:ie(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(L.pixel_size){case 8:oe(f,V,C,h,j,_,A,D,$);break;case 16:R(f,V,C,h,j,_,A,D);break;case 24:re(f,V,C,h,j,_,A,D);break;case 32:S(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return f}const be=0,ye=1,Z=2,se=3,te=9,pe=10,me=11,I=48,U=4,B=0,x=1,W=2,G=3;if(O.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let g=0;const p=new Uint8Array(O),L={id_length:p[g++],colormap_type:p[g++],image_type:p[g++],colormap_index:p[g++]|p[g++]<<8,colormap_length:p[g++]|p[g++]<<8,colormap_size:p[g++],origin:[p[g++]|p[g++]<<8,p[g++]|p[g++]<<8],width:p[g++]|p[g++]<<8,height:p[g++]|p[g++]<<8,pixel_size:p[g++],flags:p[g++]};if(ee(L),L.id_length+g>O.length)throw new Error("THREE.TGALoader: No data.");g+=L.id_length;let M=!1,N=!1,q=!1;switch(L.image_type){case te:M=!0,N=!0;break;case ye:N=!0;break;case pe:M=!0;break;case Z:break;case me:M=!0,q=!0;break;case se:q=!0;break}const ce=new Uint8Array(L.width*L.height*4),ne=v(M,N,L,g,p);return ge(ce,L.width,L.height,ne.pixel_data,ne.palettes),{data:ce,width:L.width,height:L.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class cn extends a.Loader{load(O,ee,v,oe){const R=this,re=R.path===""?a.LoaderUtils.extractUrlBase(O):R.path,S=new a.FileLoader(R.manager);S.setPath(R.path),S.setRequestHeader(R.requestHeader),S.setWithCredentials(R.withCredentials),S.load(O,function(X){try{ee(R.parse(X,re))}catch(ie){oe?oe(ie):console.error(ie),R.manager.itemError(O)}},v,oe)}parse(O,ee){function v(t,e){const i=[],n=t.childNodes;for(let s=0,o=n.length;s<o;s++){const r=n[s];r.nodeName===e&&i.push(r)}return i}function oe(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function R(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function re(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function S(t){return t.substring(1)}function X(){return"three_default_"+on++}function ie(t){return Object.keys(t).length===0}function ge(t){return{unit:be(v(t,"unit")[0]),upAxis:ye(v(t,"up_axis")[0])}}function be(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function ye(t){return t!==void 0?t.textContent:"Y_UP"}function Z(t,e,i,n){const s=v(t,e)[0];if(s!==void 0){const o=v(s,i);for(let r=0;r<o.length;r++)n(o[r])}}function se(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function te(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function pe(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType!==1)continue;let r;switch(o.nodeName){case"source":r=o.getAttribute("id"),e.sources[r]=_e(o);break;case"sampler":r=o.getAttribute("id"),e.samplers[r]=me(o);break;case"channel":r=o.getAttribute("target"),e.channels[r]=I(o);break;case"animation":pe(o),i=!0;break;default:console.log(o)}}i===!1&&(E.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function me(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic");e.inputs[r]=o;break}}return e}function I(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let o=n.shift();const r=o.indexOf("(")!==-1,u=o.indexOf(".")!==-1;if(u)n=o.split("."),o=n.shift(),e.member=n.shift();else if(r){const l=o.split("(");o=l.shift();for(let d=0;d<l.length;d++)l[d]=parseInt(l[d].replace(/\)/,""));e.indices=l}return e.id=s,e.sid=o,e.arraySyntax=r,e.memberSyntax=u,e.sampler=S(t.getAttribute("source")),e}function U(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const o in i)if(i.hasOwnProperty(o)){const r=i[o],u=n[r.sampler],l=u.inputs.INPUT,d=u.inputs.OUTPUT,y=s[l],c=s[d],b=x(r,y,c);L(b,e)}return e}function B(t){return te(E.animations[t],U)}function x(t,e,i){const n=E.nodes[t.id],s=Ne(n.id),o=n.transforms[t.sid],r=n.matrix.clone().transpose();let u,l,d,y,c,b;const m={};switch(o){case"matrix":for(d=0,y=e.array.length;d<y;d++)if(u=e.array[d],l=d*i.stride,m[u]===void 0&&(m[u]={}),t.arraySyntax===!0){const K=i.array[l],H=t.indices[0]+4*t.indices[1];m[u][H]=K}else for(c=0,b=i.stride;c<b;c++)m[u][c]=i.array[l+c];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break}const k=W(m,r);return{name:s.uuid,keyframes:k}}function W(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)M(i,s,e.elements[s]);return i;function n(s,o){return s.time-o.time}}const G=new a.Vector3,g=new a.Vector3,p=new a.Quaternion;function L(t,e){const i=t.keyframes,n=t.name,s=[],o=[],r=[],u=[];for(let l=0,d=i.length;l<d;l++){const y=i[l],c=y.time,b=y.value;le.fromArray(b).transpose(),le.decompose(G,p,g),s.push(c),o.push(G.x,G.y,G.z),r.push(p.x,p.y,p.z,p.w),u.push(g.x,g.y,g.z)}return o.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,o)),r.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,r)),u.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,u)),e}function M(t,e,i){let n,s=!0,o,r;for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]=i;else N(t,e)}function N(t,e){let i,n;for(let s=0,o=t.length;s<o;s++){const r=t[s];if(r.value[e]===null){if(i=q(t,s,e),n=ce(t,s,e),i===null){r.value[e]=n.value[e];continue}if(n===null){r.value[e]=i.value[e];continue}ne(r,i,n,e)}}}function q(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function ce(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function ne(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function f(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(S(s.getAttribute("url")));break}}E.clips[t.getAttribute("id")]=e}function Y(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let o=0,r=s.length;o<r;o++){const u=B(s[o]);for(let l=0,d=u.length;l<d;l++)e.push(u[l])}return new a.AnimationClip(i,n,e)}function z(t){return te(E.clips[t],Y)}function D(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=S(s.getAttribute("source")),e.skin=$(s);break;case"morph":e.id=S(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}E.controllers[t.getAttribute("id")]=e}function $(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=R(s.textContent);break;case"source":const o=s.getAttribute("id");e.sources[o]=_e(s);break;case"joints":e.joints=j(s);break;case"vertex_weights":e.vertexWeights=V(s);break}}return e}function j(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source"));e.inputs[o]=r;break}}return e}function V(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source")),u=parseInt(s.getAttribute("offset"));e.inputs[o]={id:r,offset:u};break;case"vcount":e.vcount=re(s.textContent);break;case"v":e.v=re(s.textContent);break}}return e}function _(t){const e={id:t.id},i=E.geometries[e.id];return t.skin!==void 0&&(e.skin=C(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function C(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,o=s.vcount,r=s.v,u=s.inputs.JOINT.offset,l=s.inputs.WEIGHT.offset,d=t.sources[t.joints.inputs.JOINT],y=t.sources[t.joints.inputs.INV_BIND_MATRIX],c=n[s.inputs.WEIGHT.id].array;let b=0,m,k,w;for(m=0,w=o.length;m<w;m++){const H=o[m],F=[];for(k=0;k<H;k++){const P=r[b+u],he=r[b+l],ae=c[he];F.push({index:P,weight:ae}),b+=2}for(F.sort(K),k=0;k<4;k++){const P=F[k];P!==void 0?(i.indices.array.push(P.index),i.weights.array.push(P.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),m=0,w=d.array.length;m<w;m++){const H=d.array[m],F=new a.Matrix4().fromArray(y.array,m*y.stride).transpose();i.joints.push({name:H,boneInverse:F})}return i;function K(H,F){return F.weight-H.weight}}function A(t){return te(E.controllers[t],_)}function h(t){const e={init_from:v(t,"init_from")[0].textContent};E.images[t.getAttribute("id")]=e}function T(t){return t.build!==void 0?t.build:t.init_from}function J(t){const e=E.images[t];return e!==void 0?te(e,T):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function de(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=we(s);break}}E.effects[t.getAttribute("id")]=e}function we(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":st(s,e);break;case"technique":e.technique=at(s);break;case"extra":e.extra=Ge(s);break}}return e}function st(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType===1)switch(o.nodeName){case"surface":e.surfaces[i]=ot(o);break;case"sampler2D":e.samplers[i]=rt(o);break}}}function ot(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function rt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function at(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=ct(s);break;case"extra":e.extra=Ge(s);break}}return e}function ct(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=Se(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:Se(s)};break}}return e}function Se(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=R(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:Ie(s)};break}}return e}function Ie(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":lt(s,e);break}}return e}function lt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":dt(s,e);break}}}function dt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}}function Ge(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=ut(s);break}}return e}function ut(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}return e}function Oe(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:Ie(s)};break}}return e}function Fe(t){return t}function ft(t){return te(E.effects[t],Fe)}function ht(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=S(s.getAttribute("url"));break}}E.materials[t.getAttribute("id")]=e}function pt(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=Re;break;default:e=Ze}return e}function Pe(t){const e=ft(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(l,d=null){const y=e.profile.samplers[l.id];let c=null;if(y!==void 0){const b=e.profile.surfaces[y.source];c=J(b.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),c=J(l.id);if(c!==null){const b=pt(c);if(b!==void 0){const m=b.load(c),k=l.extra;if(k!==void 0&&k.technique!==void 0&&ie(k.technique)===!1){const w=k.technique;m.wrapS=w.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,m.wrapT=w.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,m.offset.set(w.offsetU||0,w.offsetV||0),m.repeat.set(w.repeatU||1,w.repeatV||1)}else m.wrapS=a.RepeatWrapping,m.wrapT=a.RepeatWrapping;return d!==null&&(m.colorSpace=d),m}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",c),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",l.id),null}const o=i.parameters;for(const l in o){const d=o[l];switch(l){case"diffuse":d.color&&n.color.fromArray(d.color),d.texture&&(n.map=s(d.texture,a.SRGBColorSpace));break;case"specular":d.color&&n.specular&&n.specular.fromArray(d.color),d.texture&&(n.specularMap=s(d.texture));break;case"bump":d.texture&&(n.normalMap=s(d.texture));break;case"ambient":d.texture&&(n.lightMap=s(d.texture,a.SRGBColorSpace));break;case"shininess":d.float&&n.shininess&&(n.shininess=d.float);break;case"emission":d.color&&n.emissive&&n.emissive.fromArray(d.color),d.texture&&(n.emissiveMap=s(d.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let r=o.transparent,u=o.transparency;if(u===void 0&&r&&(u={float:1}),r===void 0&&u&&(r={opaque:"A_ONE",data:{color:[1,1,1,1]}}),r&&u)if(r.data.texture)n.transparent=!0;else{const l=r.data.color;switch(r.opaque){case"A_ONE":n.opacity=l[3]*u.float;break;case"RGB_ZERO":n.opacity=1-l[0]*u.float;break;case"A_ZERO":n.opacity=1-l[3]*u.float;break;case"RGB_ONE":n.opacity=l[0]*u.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',r.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const l=i.extra.technique;for(const d in l){const y=l[d];switch(d){case"double_sided":n.side=y===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(y.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function mt(t){return te(E.materials[t],Pe)}function gt(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=bt(s);break}}E.cameras[t.getAttribute("id")]=e}function bt(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return yt(i)}}return{}}function yt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=wt(n);break}}return e}function wt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function Ue(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function kt(t){const e=E.cameras[t];return e!==void 0?te(e,Ue):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function Nt(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=At(s);break}}E.lights[t.getAttribute("id")]=e}function At(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=Tt(s)}}return e}function Tt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const o=R(s.textContent);e.color=new a.Color().fromArray(o),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const r=parseFloat(s.textContent);e.distance=r?Math.sqrt(1/r):0;break}}return e}function qe(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function Et(t){const e=E.lights[t];return e!==void 0?te(e,qe):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function xt(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=v(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const o=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[o]=_e(s);break;case"vertices":e.vertices=Ct(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(_t(s));break;default:console.log(s)}}E.geometries[t.getAttribute("id")]=e}}function _e(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=R(n.textContent);break;case"Name_array":e.array=oe(n.textContent);break;case"technique_common":const s=v(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function Ct(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=S(n.getAttribute("source")))}return e}function _t(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic"),u=parseInt(s.getAttribute("offset")),l=parseInt(s.getAttribute("set")),d=l>0?r+l:r;e.inputs[d]={id:o,offset:u},e.stride=Math.max(e.stride,u+1),r==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=re(s.textContent);break;case"p":e.p=re(s.textContent);break}}return e}function Lt(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function Mt(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function je(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const o=Lt(s);for(const r in o){const u=o[r];Mt(u),e[r]=Rt(u,i,n)}return e}function Rt(t,e,i){const n={},s={array:[],stride:0},o={array:[],stride:0},r={array:[],stride:0},u={array:[],stride:0},l={array:[],stride:0},d={array:[],stride:4},y={array:[],stride:4},c=new a.BufferGeometry,b=[];let m=0;for(let k=0;k<t.length;k++){const w=t[k],K=w.inputs;let H=0;switch(w.type){case"lines":case"linestrips":H=w.count*2;break;case"triangles":H=w.count*3;break;case"polylist":for(let F=0;F<w.count;F++){const P=w.vcount[F];switch(P){case 3:H+=3;break;case 4:H+=6;break;default:H+=(P-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",w.type)}c.addGroup(m,H,k),m+=H,w.material&&b.push(w.material);for(const F in K){const P=K[F];switch(F){case"VERTEX":for(const he in i){const ae=i[he];switch(he){case"POSITION":const Ae=s.array.length;if(ue(w,e[ae],P.offset,s.array),s.stride=e[ae].stride,e.skinWeights&&e.skinIndices&&(ue(w,e.skinIndices,P.offset,d.array),ue(w,e.skinWeights,P.offset,y.array)),w.hasUV===!1&&t.uvsNeedsFix===!0){const rn=(s.array.length-Ae)/s.stride;for(let et=0;et<rn;et++)r.array.push(0,0)}break;case"NORMAL":ue(w,e[ae],P.offset,o.array),o.stride=e[ae].stride;break;case"COLOR":ue(w,e[ae],P.offset,l.array),l.stride=e[ae].stride;break;case"TEXCOORD":ue(w,e[ae],P.offset,r.array),r.stride=e[ae].stride;break;case"TEXCOORD1":ue(w,e[ae],P.offset,u.array),r.stride=e[ae].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',he)}}break;case"NORMAL":ue(w,e[P.id],P.offset,o.array),o.stride=e[P.id].stride;break;case"COLOR":ue(w,e[P.id],P.offset,l.array,!0),l.stride=e[P.id].stride;break;case"TEXCOORD":ue(w,e[P.id],P.offset,r.array),r.stride=e[P.id].stride;break;case"TEXCOORD1":ue(w,e[P.id],P.offset,u.array),u.stride=e[P.id].stride;break}}}return s.array.length>0&&c.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),o.array.length>0&&c.setAttribute("normal",new a.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&c.setAttribute("color",new a.Float32BufferAttribute(l.array,l.stride)),r.array.length>0&&c.setAttribute("uv",new a.Float32BufferAttribute(r.array,r.stride)),u.array.length>0&&c.setAttribute("uv1",new a.Float32BufferAttribute(u.array,u.stride)),d.array.length>0&&c.setAttribute("skinIndex",new a.Float32BufferAttribute(d.array,d.stride)),y.array.length>0&&c.setAttribute("skinWeight",new a.Float32BufferAttribute(y.array,y.stride)),n.data=c,n.type=t[0].type,n.materialKeys=b,n}function ue(t,e,i,n,s=!1){const o=t.p,r=t.stride,u=t.vcount;function l(c){let b=o[c+i]*y;const m=b+y;for(;b<m;b++)n.push(d[b]);if(s){const k=n.length-y-1;Ee.setRGB(n[k+0],n[k+1],n[k+2],a.SRGBColorSpace),n[k+0]=Ee.r,n[k+1]=Ee.g,n[k+2]=Ee.b}}const d=e.array,y=e.stride;if(t.vcount!==void 0){let c=0;for(let b=0,m=u.length;b<m;b++){const k=u[b];if(k===4){const w=c+r*0,K=c+r*1,H=c+r*2,F=c+r*3;l(w),l(K),l(F),l(K),l(H),l(F)}else if(k===3){const w=c+r*0,K=c+r*1,H=c+r*2;l(w),l(K),l(H)}else if(k>4)for(let w=1,K=k-2;w<=K;w++){const H=c+r*0,F=c+r*w,P=c+r*(w+1);l(H),l(F),l(P)}c+=r*k}}else for(let c=0,b=o.length;c<b;c+=r)l(c)}function Be(t){return te(E.geometries[t],je)}function vt(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":Gt(n,e);break}}E.kinematicsModels[t.getAttribute("id")]=e}function St(t){return t.build!==void 0?t.build:t}function It(t){return te(E.kinematicsModels[t],St)}function Gt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=Ot(n);break;case"link":e.links.push(He(n));break}}}function Ot(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=Ft(n);break}}return e}function Ft(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=R(n.textContent);e.axis.fromArray(s);break;case"limits":const o=n.getElementsByTagName("max")[0],r=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(o.textContent),e.limits.min=parseFloat(r.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function He(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(Pt(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function Pt(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(He(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function De(t){const e={type:t.nodeName},i=R(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function Ut(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},qt(n,e.rigidBodies[n.getAttribute("name")]);break}}E.physicsModels[t.getAttribute("id")]=e}function qt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":jt(n,e);break}}}function jt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=R(n.textContent);break;case"mass":e.mass=R(n.textContent)[0];break}}}function Bt(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(Ht(n));break}}E.kinematicsScenes[S(t.getAttribute("url"))]=e}function Ht(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const o=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=o.substring(0,o.length-1);break}}return e}function Dt(t){return t.build!==void 0?t.build:t}function Vt(t){return te(E.kinematicsScenes[t],Dt)}function zt(){const t=Object.keys(E.kinematicsModels)[0],e=Object.keys(E.kinematicsScenes)[0],i=Object.keys(E.visualScenes)[0];if(t===void 0||e===void 0)return;const n=It(t),s=Vt(e),o=Ye(i),r=s.bindJointAxis,u={};for(let y=0,c=r.length;y<c;y++){const b=r[y],m=Q.querySelector('[sid="'+b.target+'"]');if(m){const k=m.parentElement;l(b.jointIndex,k)}}function l(y,c){const b=c.getAttribute("name"),m=n.joints[y];o.traverse(function(k){k.name===b&&(u[y]={object:k,transforms:Jt(c),joint:m,position:m.zeroPosition})})}const d=new a.Matrix4;Qe={joints:n&&n.joints,getJointValue:function(y){const c=u[y];if(c)return c.position;console.warn("THREE.ColladaLoader: Joint "+y+" doesn't exist.")},setJointValue:function(y,c){const b=u[y];if(b){const m=b.joint;if(c>m.limits.max||c<m.limits.min)console.warn("THREE.ColladaLoader: Joint "+y+" value "+c+" outside of limits (min: "+m.limits.min+", max: "+m.limits.max+").");else if(m.static)console.warn("THREE.ColladaLoader: Joint "+y+" is static.");else{const k=b.object,w=m.axis,K=b.transforms;le.identity();for(let H=0;H<K.length;H++){const F=K[H];if(F.sid&&F.sid.indexOf(y)!==-1)switch(m.type){case"revolute":le.multiply(d.makeRotationAxis(w,a.MathUtils.degToRad(c)));break;case"prismatic":le.multiply(d.makeTranslation(w.x*c,w.y*c,w.z*c));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+m.type);break}else switch(F.type){case"matrix":le.multiply(F.obj);break;case"translate":le.multiply(d.makeTranslation(F.obj.x,F.obj.y,F.obj.z));break;case"scale":le.scale(F.obj);break;case"rotate":le.multiply(d.makeRotationAxis(F.obj,F.angle));break}}k.matrix.copy(le),k.matrix.decompose(k.position,k.quaternion,k.scale),u[y].position=c}}else console.log("THREE.ColladaLoader: "+y+" does not exist.")}}}function Jt(t){const e=[],i=Q.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let o,r;switch(s.nodeName){case"matrix":o=R(s.textContent);const u=new a.Matrix4().fromArray(o).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:u});break;case"translate":case"scale":o=R(s.textContent),r=new a.Vector3().fromArray(o),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r});break;case"rotate":o=R(s.textContent),r=new a.Vector3().fromArray(o);const l=a.MathUtils.degToRad(o[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r,angle:l});break}}return e}function Wt(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const le=new a.Matrix4,ke=new a.Vector3;function Le(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),Le(n);break;case"instance_camera":e.instanceCameras.push(S(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(Ve(n));break;case"instance_light":e.instanceLights.push(S(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(Ve(n));break;case"instance_node":e.instanceNodes.push(S(n.getAttribute("url")));break;case"matrix":s=R(n.textContent),e.matrix.multiply(le.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=R(n.textContent),ke.fromArray(s),e.matrix.multiply(le.makeTranslation(ke.x,ke.y,ke.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=R(n.textContent);const o=a.MathUtils.degToRad(s[3]);e.matrix.multiply(le.makeRotationAxis(ke.fromArray(s),o)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=R(n.textContent),e.matrix.scale(ke.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return We(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):E.nodes[e.id]=e,e}function Ve(t){const e={id:S(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let o=0;o<s.length;o++){const r=s[o],u=r.getAttribute("symbol"),l=r.getAttribute("target");e.materials[u]=S(l)}break;case"skeleton":e.skeletons.push(S(n.textContent));break}}return e}function Kt(t,e){const i=[],n=[];let s,o,r;for(s=0;s<t.length;s++){const d=t[s];let y;if(We(d))y=Ne(d),ze(y,e,i);else if(Qt(d)){const b=E.visualScenes[d].children;for(let m=0;m<b.length;m++){const k=b[m];if(k.type==="JOINT"){const w=Ne(k.id);ze(w,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",d)}for(s=0;s<e.length;s++)for(o=0;o<i.length;o++)if(r=i[o],r.bone.name===e[s].name){n[s]=r,r.processed=!0;break}for(s=0;s<i.length;s++)r=i[s],r.processed===!1&&(n.push(r),r.processed=!0);const u=[],l=[];for(s=0;s<n.length;s++)r=n[s],u.push(r.bone),l.push(r.boneInverse);return new a.Skeleton(u,l)}function ze(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let o=0;o<e.length;o++){const r=e[o];if(r.name===n.name){s=r.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function Yt(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,o=t.instanceCameras,r=t.instanceControllers,u=t.instanceLights,l=t.instanceGeometries,d=t.instanceNodes;for(let c=0,b=n.length;c<b;c++)e.push(Ne(n[c]));for(let c=0,b=o.length;c<b;c++){const m=kt(o[c]);m!==null&&e.push(m.clone())}for(let c=0,b=r.length;c<b;c++){const m=r[c],k=A(m.id),w=Be(k.id),K=Je(w,m.materials),H=m.skeletons,F=k.skin.joints,P=Kt(H,F);for(let he=0,ae=K.length;he<ae;he++){const Ae=K[he];Ae.isSkinnedMesh&&(Ae.bind(P,k.skin.bindMatrix),Ae.normalizeSkinWeights()),e.push(Ae)}}for(let c=0,b=u.length;c<b;c++){const m=Et(u[c]);m!==null&&e.push(m.clone())}for(let c=0,b=l.length;c<b;c++){const m=l[c],k=Be(m.id),w=Je(k,m.materials);for(let K=0,H=w.length;K<H;K++)e.push(w[K])}for(let c=0,b=d.length;c<b;c++)e.push(Ne(d[c]).clone());let y;if(n.length===0&&e.length===1)y=e[0];else{y=s==="JOINT"?new a.Bone:new a.Group;for(let c=0;c<e.length;c++)y.add(e[c])}return y.name=s==="JOINT"?t.sid:t.name,y.matrix.copy(i),y.matrix.decompose(y.position,y.quaternion,y.scale),y}const Xt=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function $t(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const o=e[t[n]];o===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(Xt)):i.push(mt(o))}return i}function Je(t,e){const i=[];for(const n in t){const s=t[n],o=$t(s.materialKeys,e);if(o.length===0&&(n==="lines"||n==="linestrips"?o.push(new a.LineBasicMaterial):o.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let d=0,y=o.length;d<y;d++){const c=o[d];if(c.isMeshPhongMaterial===!0||c.isMeshLambertMaterial===!0){const b=new a.LineBasicMaterial;b.color.copy(c.color),b.opacity=c.opacity,b.transparent=c.transparent,o[d]=b}}const r=s.data.attributes.skinIndex!==void 0,u=o.length===1?o[0]:o;let l;switch(n){case"lines":l=new a.LineSegments(s.data,u);break;case"linestrips":l=new a.Line(s.data,u);break;case"triangles":case"polylist":r?l=new a.SkinnedMesh(s.data,u):l=new a.Mesh(s.data,u);break}i.push(l)}return i}function We(t){return E.nodes[t]!==void 0}function Ne(t){return te(E.nodes[t],Yt)}function Zt(t){const e={name:t.getAttribute("name"),children:[]};Wt(t);const i=v(t,"node");for(let n=0;n<i.length;n++)e.children.push(Le(i[n]));E.visualScenes[t.getAttribute("id")]=e}function Ke(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(Ne(s.id))}return e}function Qt(t){return E.visualScenes[t]!==void 0}function Ye(t){return te(E.visualScenes[t],Ke)}function en(t){const e=v(t,"instance_visual_scene")[0];return Ye(S(e.getAttribute("url")))}function tn(){const t=E.clips;if(ie(t)===!0){if(ie(E.animations)===!1){const e=[];for(const i in E.animations){const n=B(i);for(let s=0,o=n.length;s<o;s++)e.push(n[s])}xe.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)xe.push(z(e))}function nn(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
2
2
  `,i.push(...n.childNodes))}return e.trim()}if(O.length===0)return{scene:new a.Scene};const Xe=new DOMParser().parseFromString(O,"application/xml"),Q=v(Xe,"COLLADA")[0],Me=Xe.getElementsByTagName("parsererror")[0];if(Me!==void 0){const t=v(Me,"div")[0];let e;return t?e=t.textContent:e=nn(Me),console.error(`THREE.ColladaLoader: Failed to parse collada file.
3
3
  `,e),null}const sn=Q.getAttribute("version");console.debug("THREE.ColladaLoader: File version",sn);const $e=ge(v(Q,"asset")[0]),Ze=new a.TextureLoader(this.manager);Ze.setPath(this.resourcePath||ee).setCrossOrigin(this.crossOrigin);let Re;tt&&(Re=new tt(this.manager),Re.setPath(this.resourcePath||ee));const Ee=new a.Color,xe=[];let Qe={},on=0;const E={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};Z(Q,"library_animations","animation",pe),Z(Q,"library_animation_clips","animation_clip",f),Z(Q,"library_controllers","controller",D),Z(Q,"library_images","image",h),Z(Q,"library_effects","effect",de),Z(Q,"library_materials","material",ht),Z(Q,"library_cameras","camera",gt),Z(Q,"library_lights","light",Nt),Z(Q,"library_geometries","geometry",xt),Z(Q,"library_nodes","node",Le),Z(Q,"library_visual_scenes","visual_scene",Zt),Z(Q,"library_kinematics_models","kinematics_model",vt),Z(Q,"library_physics_models","physics_model",Ut),Z(Q,"scene","instance_kinematics_scene",Bt),se(E.animations,U),se(E.clips,Y),se(E.controllers,_),se(E.images,T),se(E.effects,Fe),se(E.materials,Pe),se(E.cameras,Ue),se(E.lights,qe),se(E.geometries,je),se(E.visualScenes,Ke),tn(),zt();const Ce=en(v(Q,"scene")[0]);return Ce.animations=xe,$e.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."),Ce.rotation.set(-Math.PI/2,0,0)),Ce.scale.multiplyScalar($e.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),xe},kinematics:Qe,library:E,scene:Ce}}}const ve=new a.Quaternion,nt=new a.Euler;function Te(fe){return fe?fe.trim().split(/\s+/g).map(O=>parseFloat(O)):[0,0,0]}function it(fe,O,ee=!1){ee||fe.rotation.set(0,0,0),nt.set(O[0],O[1],O[2],"ZYX"),ve.setFromEuler(nt),ve.multiply(fe.quaternion),fe.quaternion.copy(ve)}class ln{constructor(O){this.manager=O||a.DefaultLoadingManager,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(O){return new Promise((ee,v)=>{this.load(O,ee,null,v)})}load(O,ee,v,oe){const R=this.manager,re=a.LoaderUtils.extractUrlBase(O),S=this.manager.resolveURL(O);R.itemStart(S),fetch(S,this.fetchOptions).then(X=>{if(X.ok)return v&&v(null),X.text();throw new Error(`URDFLoader: Failed to load url '${S}' with error code ${X.status} : ${X.statusText}.`)}).then(X=>{const ie=this.parse(X,this.workingPath||re);ee(ie),R.itemEnd(S)}).catch(X=>{oe?oe(X):console.error("URDFLoader: Error loading file.",X),R.itemError(S),R.itemEnd(S)})}parse(O,ee=this.workingPath){const v=this.packages,oe=this.loadMeshCb,R=this.parseVisual,re=this.parseCollision,S=this.manager,X={},ie={},ge={};function be(I){if(!/^package:\/\//.test(I))return ee?ee+I:I;const[U,B]=I.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof v=="string")return v.endsWith(U)?v+"/"+B:v+"/"+U+"/"+B;if(v instanceof Function)return v(U)+"/"+B;if(typeof v=="object")return U in v?v[U]+"/"+B:(console.error(`URDFLoader : ${U} not found in provided package list.`),null)}function ye(I){let U;I instanceof Document?U=[...I.children]:I instanceof Element?U=[I]:U=[...new DOMParser().parseFromString(I,"text/xml").children];const B=U.filter(x=>x.nodeName==="robot").pop();return Z(B)}function Z(I){const U=[...I.children],B=U.filter(M=>M.nodeName.toLowerCase()==="link"),x=U.filter(M=>M.nodeName.toLowerCase()==="joint"),W=U.filter(M=>M.nodeName.toLowerCase()==="material"),G=new a.URDFRobot;G.robotName=I.getAttribute("name"),G.urdfRobotNode=I,W.forEach(M=>{const N=M.getAttribute("name");ge[N]=pe(M)});const g={},p={};B.forEach(M=>{const N=M.getAttribute("name"),q=I.querySelector(`child[link="${N}"]`)===null;X[N]=te(M,g,p,q?G:null)}),x.forEach(M=>{const N=M.getAttribute("name");ie[N]=se(M)}),G.joints=ie,G.links=X,G.colliders=p,G.visual=g;const L=Object.values(ie);return L.forEach(M=>{M instanceof a.URDFMimicJoint&&ie[M.mimicJoint].mimicJoints.push(M)}),L.forEach(M=>{const N=new Set,q=ce=>{if(N.has(ce))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");N.add(ce),ce.mimicJoints.forEach(ne=>{q(ne)})};q(M)}),G.frames={...p,...g,...X,...ie},G}function se(I){const U=[...I.children],B=I.getAttribute("type");let x;const W=U.find(N=>N.nodeName.toLowerCase()==="mimic");W?(x=new a.URDFMimicJoint,x.mimicJoint=W.getAttribute("joint"),x.multiplier=parseFloat(W.getAttribute("multiplier")||1),x.offset=parseFloat(W.getAttribute("offset")||0)):x=new a.URDFJoint,x.urdfNode=I,x.name=I.getAttribute("name"),x.urdfName=x.name,x.jointType=B;let G=null,g=null,p=[0,0,0],L=[0,0,0];U.forEach(N=>{const q=N.nodeName.toLowerCase();q==="origin"?(p=Te(N.getAttribute("xyz")),L=Te(N.getAttribute("rpy"))):q==="child"?g=X[N.getAttribute("link")]:q==="parent"?G=X[N.getAttribute("link")]:q==="limit"&&(x.limit.lower=parseFloat(N.getAttribute("lower")||x.limit.lower),x.limit.upper=parseFloat(N.getAttribute("upper")||x.limit.upper))}),G.add(x),x.add(g),it(x,L),x.position.set(p[0],p[1],p[2]);const M=U.filter(N=>N.nodeName.toLowerCase()==="axis")[0];if(M){const N=M.getAttribute("xyz").split(/\s+/g).map(q=>parseFloat(q));x.axis=new a.Vector3(N[0],N[1],N[2]),x.axis.normalize()}return x}function te(I,U,B,x=null){x===null&&(x=new a.URDFLink);const W=[...I.children];return x.name=I.getAttribute("name"),x.urdfName=x.name,x.urdfNode=I,R&&W.filter(g=>g.nodeName.toLowerCase()==="visual").forEach(g=>{const p=me(g,ge);if(x.add(p),g.hasAttribute("name")){const L=g.getAttribute("name");p.name=L,p.urdfName=L,U[L]=p}}),re&&W.filter(g=>g.nodeName.toLowerCase()==="collision").forEach(g=>{const p=me(g);if(x.add(p),g.hasAttribute("name")){const L=g.getAttribute("name");p.name=L,p.urdfName=L,B[L]=p}}),x}function pe(I){const U=[...I.children],B=new a.MeshPhongMaterial;return B.name=I.getAttribute("name")||"",U.forEach(x=>{const W=x.nodeName.toLowerCase();if(W==="color"){const G=x.getAttribute("rgba").split(/\s/g).map(g=>parseFloat(g));B.color.setRGB(G[0],G[1],G[2]),B.opacity=G[3],B.transparent=G[3]<1,B.depthWrite=!B.transparent}else if(W==="texture"){const G=x.getAttribute("filename");if(G){const g=new a.TextureLoader(S),p=be(G);B.map=g.load(p),B.map.colorSpace=a.SRGBColorSpace}}}),B}function me(I,U={}){const B=I.nodeName.toLowerCase()==="collision",x=[...I.children];let W=null;const G=x.filter(p=>p.nodeName.toLowerCase()==="material")[0];if(G){const p=G.getAttribute("name");p&&p in U?W=U[p]:W=pe(G)}else W=new a.MeshPhongMaterial;const g=B?new a.URDFCollider:new a.URDFVisual;return g.urdfNode=I,x.forEach(p=>{const L=p.nodeName.toLowerCase();if(L==="geometry"){const M=p.children[0].nodeName.toLowerCase();if(M==="mesh"){const N=p.children[0].getAttribute("filename"),q=be(N);if(q!==null){const ce=p.children[0].getAttribute("scale");if(ce){const ne=Te(ce);g.scale.set(ne[0],ne[1],ne[2])}oe(q,S,(ne,f)=>{f?console.error("URDFLoader: Error loading mesh.",f):ne&&(ne instanceof a.Mesh&&(ne.material=W),ne.position.set(0,0,0),ne.quaternion.identity(),g.add(ne))})}}else if(M==="box"){const N=new a.Mesh;N.geometry=new a.BoxGeometry(1,1,1),N.material=W;const q=Te(p.children[0].getAttribute("size"));N.scale.set(q[0],q[1],q[2]),g.add(N)}else if(M==="sphere"){const N=new a.Mesh;N.geometry=new a.SphereGeometry(1,30,30),N.material=W;const q=parseFloat(p.children[0].getAttribute("radius"))||0;N.scale.set(q,q,q),g.add(N)}else if(M==="cylinder"){const N=new a.Mesh;N.geometry=new a.CylinderGeometry(1,1,1,30),N.material=W;const q=parseFloat(p.children[0].getAttribute("radius"))||0,ce=parseFloat(p.children[0].getAttribute("length"))||0;N.scale.set(q,ce,q),N.rotation.set(Math.PI/2,0,0),g.add(N)}}else if(L==="origin"){const M=Te(p.getAttribute("xyz")),N=Te(p.getAttribute("rpy"));g.position.set(M[0],M[1],M[2]),g.rotation.set(0,0,0),it(g,N)}}),g}return ye(O)}defaultMeshLoader(O,ee,v){/\.stl$/i.test(O)?new an.STLLoader(ee).load(O,R=>{const re=new a.Mesh(R,new a.MeshPhongMaterial);v(re)}):/\.dae$/i.test(O)?new cn(ee).load(O,R=>v(R.scene)):console.warn(`URDFLoader: Could not load model at ${O}.
4
4
  No loader available`)}}exports.URDFLoader=ln;
@@ -1,4 +1,4 @@
1
- import { g as B, b5 as C, b as x, aX as K, c6 as N } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9XvSEGdS.js";
1
+ import { g as B, b5 as C, b as x, aX as K, c6 as N } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-T859a6kf.js";
2
2
  import { c as O } from "./index-KFoWHXov.js";
3
3
  const g = async (n) => {
4
4
  const e = n.join("/"), c = sessionStorage.getItem("systemKey");
@@ -1 +1 @@
1
- "use strict";const p=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtDy8n8V.cjs"),x=require("./index-y1mE3_ai.cjs"),D=async n=>{const a=n.join("/"),c=sessionStorage.getItem("systemKey");return await p.getItemData(a,c,"")},T=n=>{var s;const a=n==null?void 0:n.compData,c=(s=a==null?void 0:a.find(i=>{const{key:r}=i;return r==="formContent"}))==null?void 0:s.contents,l={};return c==null||c.forEach(i=>{const{prop:r,value:b}=i;l[r]=b}),l},V=async()=>{let n={};const c=await D(["弯管仿真加工分析","模具筛选安装"]),l=p.getTargetGroup("输入(加工件)",c),s=T(l),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["弯管仿真加工分析","加工位姿生成"]),R=p.getTargetGroup("输入",G),d=T(R),P=d.夹持长度||0;console.log("夹持长度",P,d);const A=Number(P),u={},m=await D(["弯管仿真加工分析","仿真动画生成"]);m==null||m.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],h=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),g=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));g==null||g.forEach(t=>{C.push(p.getValueToObjectValue(t,h==null?void 0:h.filter(o=>o!=="操作")))}),u[e.name]=C,u[e.name+"Content"]=e}});const k=x.cloneDeep(u)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:A,animationData:k},n},j=async()=>{let n={};const c=await D(["双弯管仿真加工分析","模具筛选安装"]),l=p.getTargetGroup("输入(加工件)",c),s=T(l),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["双弯管仿真加工分析","加工工艺生成"]),R=p.getTargetGroup("输入",G),d=T(R),P=d.夹持位置||0;console.log("夹持长度",P,d);const A=Number(P),u={},m=await D(["双弯管仿真加工分析","仿真动画生成"]);m==null||m.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],h=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),g=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));g==null||g.forEach(t=>{C.push(p.getValueToObjectValue(t,h==null?void 0:h.filter(o=>o!=="操作")))}),u[e.name]=C,u[e.name+"Content"]=e}});const k=x.cloneDeep(u)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:A,animationData:k},n},B=async n=>await p.downloadFile(n),S=async n=>await p.readCsv(n),X=async n=>{const a=await B(n);return await S(a)};exports.fetchDoubleRobotAnimationData=j;exports.fetchSingleRobotAnimationData=V;exports.getFormData=T;exports.getMenuData=D;exports.initXYZBCList=X;
1
+ "use strict";const p=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CfZR3ABW.cjs"),x=require("./index-y1mE3_ai.cjs"),D=async n=>{const a=n.join("/"),c=sessionStorage.getItem("systemKey");return await p.getItemData(a,c,"")},T=n=>{var s;const a=n==null?void 0:n.compData,c=(s=a==null?void 0:a.find(i=>{const{key:r}=i;return r==="formContent"}))==null?void 0:s.contents,l={};return c==null||c.forEach(i=>{const{prop:r,value:b}=i;l[r]=b}),l},V=async()=>{let n={};const c=await D(["弯管仿真加工分析","模具筛选安装"]),l=p.getTargetGroup("输入(加工件)",c),s=T(l),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["弯管仿真加工分析","加工位姿生成"]),R=p.getTargetGroup("输入",G),d=T(R),P=d.夹持长度||0;console.log("夹持长度",P,d);const A=Number(P),u={},m=await D(["弯管仿真加工分析","仿真动画生成"]);m==null||m.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],h=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),g=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));g==null||g.forEach(t=>{C.push(p.getValueToObjectValue(t,h==null?void 0:h.filter(o=>o!=="操作")))}),u[e.name]=C,u[e.name+"Content"]=e}});const k=x.cloneDeep(u)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:A,animationData:k},n},j=async()=>{let n={};const c=await D(["双弯管仿真加工分析","模具筛选安装"]),l=p.getTargetGroup("输入(加工件)",c),s=T(l),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["双弯管仿真加工分析","加工工艺生成"]),R=p.getTargetGroup("输入",G),d=T(R),P=d.夹持位置||0;console.log("夹持长度",P,d);const A=Number(P),u={},m=await D(["双弯管仿真加工分析","仿真动画生成"]);m==null||m.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],h=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),g=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));g==null||g.forEach(t=>{C.push(p.getValueToObjectValue(t,h==null?void 0:h.filter(o=>o!=="操作")))}),u[e.name]=C,u[e.name+"Content"]=e}});const k=x.cloneDeep(u)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:A,animationData:k},n},B=async n=>await p.downloadFile(n),S=async n=>await p.readCsv(n),X=async n=>{const a=await B(n);return await S(a)};exports.fetchDoubleRobotAnimationData=j;exports.fetchSingleRobotAnimationData=V;exports.getFormData=T;exports.getMenuData=D;exports.initXYZBCList=X;
@@ -1,4 +1,4 @@
1
- "use strict";const m=require("vue"),le=require("./index-C5woD5Cw.cjs"),a=require("./index-y1mE3_ai.cjs"),j=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtDy8n8V.cjs"),B=le.useModelComp(a.pinia),{pageMapState:ue}=a.storeToRefs(B),oe=le.useMenuState(),{activeMenuPath:V}=a.storeToRefs(oe),O=m.ref([]),x=m.ref([]),pe=m.computed(()=>[{label:"任务配置",name:"任务配置",component:{comp:"Table",name:"任务配置",isShow:!0,compData:[{key:"header",contents:[{prop:"任务名称",align:"center",isRun:!1,label:"任务名称",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"任务关键词",align:"center",isRun:!1,label:"任务关键词",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"执行任务",align:"center",isRun:!1,label:"执行任务",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"执行交互",align:"center",isRun:!1,label:"执行交互",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"任务状态",align:"center",isRun:!1,label:"任务状态",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"创建时间",align:"center",isRun:!1,label:"创建时间",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{label:"操作"}]},{key:"rowButton",contents:[{label:"访问"},{label:"删除"}]},{key:"extraButton",contents:[{label:"创建"},{label:"批量删除"}]},{key:"tableFilter",contents:[]},{key:"tableContents",contents:O.value}]}},{label:"任务关联",name:"任务关联",component:{comp:"Table",name:"任务关联",isShow:!0,compData:[{key:"header",contents:[{prop:"关联名称",align:"center",isRun:!1,label:"关联名称",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"关联形式",align:"center",isRun:!1,label:"关联形式",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"关联任务集合",align:"center",isRun:!1,label:"关联任务集合",isRoute:!1,isTableColHidden:!0,isFormColHidden:!1},{prop:"关联状态",align:"center",isRun:!1,label:"关联状态",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{label:"操作"}]},{key:"rowButton",contents:[{label:"访问"},{label:"删除"}]},{key:"extraButton",contents:[{label:"创建"},{label:"批量删除"}]},{key:"tableFilter",contents:[]},{key:"tableContents",contents:x.value}]}}]),N=m.ref([]),ie=m.computed(()=>{var l;return(l=N.value)==null?void 0:l.map((s,n)=>({value:s==null?void 0:s.id,label:s==null?void 0:s.name}))}),se=m.ref("data"),F=m.ref("任务配置"),M=m.ref({}),_=m.ref(null),$=m.reactive({width:"30%",title:"任务配置",type:"创建",show:!1}),fe=()=>{$.show=!1},de=(l,s)=>{var e,r,t,u,o,D,f,A,c;if(M.value=a.cloneDeep(s),l==="删除")return F.value==="任务配置"?O.value=(e=O.value)==null?void 0:e.filter(b=>(b==null?void 0:b.id)!==(s==null?void 0:s.id)):F.value==="任务关联"&&(x.value=(r=x.value)==null?void 0:r.filter(b=>(b==null?void 0:b.id)!==(s==null?void 0:s.id))),B.setItemExtendData({任务配置:{pageKey:V.value,compId:(t=_.value)==null?void 0:t.id,results:O.value},任务关联:{pageKey:V.value,compId:(u=_.value)==null?void 0:u.id,results:x.value}});const n=s?(o=Object.keys(s))==null?void 0:o[1]:"";F.value==="任务配置"?$.title=`当前配置:${(D=_.value)==null?void 0:D.name}>任务配置>【${(s==null?void 0:s[n])||l}】`:F.value==="任务关联"&&($.title=`当前配置:${(f=_.value)==null?void 0:f.name}>任务关联>【${(s==null?void 0:s[n])||l}】`),$.type=typeof((A=M.value)==null?void 0:A.id)=="string"||!((c=M.value)!=null&&c.id)?"创建":"编辑",$.show=l==="创建"||l==="访问"},he=l=>{var s;typeof l=="number"&&(_.value=(s=N.value)==null?void 0:s[l],me()),se.value="data"},be=l=>{},De=l=>{var s,n;switch(F.value){case"任务配置":$.type==="创建"?O.value.push(l==null?void 0:l.data):O.value=(s=O.value)==null?void 0:s.map(e=>{var r;return(e==null?void 0:e.id)===((r=l==null?void 0:l.data)==null?void 0:r.id)?{...e,...l==null?void 0:l.data}:e});break;case"任务关联":$.type==="创建"?x.value.push(l==null?void 0:l.data):x.value=(n=x.value)==null?void 0:n.map(e=>{var r;return(e==null?void 0:e.id)===((r=l==null?void 0:l.data)==null?void 0:r.id)?{...e,...l==null?void 0:l.data}:e});break}console.log("handleTableData:",O.value,l,$.type),B.setItemExtendData({任务配置:{pageKey:V.value,compId:l==null?void 0:l.compId,results:O.value},任务关联:{pageKey:V.value,compId:l==null?void 0:l.compId,results:x.value}}),$.show=!1},ge=l=>{var s,n;if((l==null?void 0:l.buttonName)==="取消")$.show=!1;else if((l==null?void 0:l.buttonName)==="保存"){const e={compId:(s=_.value)==null?void 0:s.id,data:{...l==null?void 0:l.content,id:(n=M.value)==null?void 0:n.id}};De(e)}},ke=(l,s)=>{var t,u;const{target:n,styleConfigs:e}=l;if(!e)return;const r=e==null?void 0:e.reduce((o,D)=>(o[D.prop]=D.value,o),{});s?N.value=(u=N.value)==null?void 0:u.map(o=>(o==null?void 0:o.id)===(s==null?void 0:s.id)?{...o,...r}:o):N.value=(t=N.value)==null?void 0:t.map(o=>({...o,...r})),B.setItemData(N.value)},ye=l=>{},ee=(l,s)=>{var n;return(n=l==null?void 0:l.filter(e=>{var r,t,u,o,D;return((t=(r=e==null?void 0:e.key)==null?void 0:r.relatedInfo)==null?void 0:t.target)===s&&((o=(u=e==null?void 0:e.key)==null?void 0:u.relatedInfo)==null?void 0:o.compId)===((D=_.value)==null?void 0:D.id)}))==null?void 0:n.map(e=>{var r;return{...(r=e==null?void 0:e.value)==null?void 0:r.tableData,id:e==null?void 0:e.id}})},me=()=>{var s,n;const l=(n=(s=ue.value)==null?void 0:s[V.value])==null?void 0:n.filter(e=>{var r;return((r=e==null?void 0:e.key)==null?void 0:r.type)==="extend"});(l==null?void 0:l.length)!==0&&(O.value=ee(l,"任务配置"),x.value=ee(l,"任务关联"))};m.ref(0);const re=l=>{var s,n;if(Array.isArray(Object.keys(l))&&((s=Object.keys(l))==null?void 0:s.length)>0){let e=[];return(n=Object.entries(l))==null||n.forEach(([r,t])=>{var o,D;let u=[];if(u.push(r),((o=Object.keys(t))==null?void 0:o.length)>0){let f=[];(D=re(t))==null||D.forEach(A=>{f.push(A)}),f==null||f.forEach(A=>{u.push(A)})}e.push(u)}),e}},ve=(l,s)=>{var e;let n=s;return Array.isArray(Object.keys(l))&&((e=Object.entries(l))==null||e.forEach(([r,t])=>{let u=[r];if(typeof t=="object"&&t!==null){let o=re(t);o==null||o.forEach(D=>{u.push(D)})}n.push(u)})),n},Te=l=>{const s={};return l.forEach(e=>{const r=e.split("/");let t=s;r.forEach(u=>{t[u]||(t[u]={}),t=t[u]})}),ve(s,[])},Ce=l=>Te(l);m.ref(0);m.ref(1);const ne=l=>{let s;l.replaceAll(" ",`\r
1
+ "use strict";const m=require("vue"),le=require("./index-C5woD5Cw.cjs"),a=require("./index-y1mE3_ai.cjs"),j=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CfZR3ABW.cjs"),B=le.useModelComp(a.pinia),{pageMapState:ue}=a.storeToRefs(B),oe=le.useMenuState(),{activeMenuPath:V}=a.storeToRefs(oe),O=m.ref([]),x=m.ref([]),pe=m.computed(()=>[{label:"任务配置",name:"任务配置",component:{comp:"Table",name:"任务配置",isShow:!0,compData:[{key:"header",contents:[{prop:"任务名称",align:"center",isRun:!1,label:"任务名称",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"任务关键词",align:"center",isRun:!1,label:"任务关键词",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"执行任务",align:"center",isRun:!1,label:"执行任务",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"执行交互",align:"center",isRun:!1,label:"执行交互",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"任务状态",align:"center",isRun:!1,label:"任务状态",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"创建时间",align:"center",isRun:!1,label:"创建时间",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{label:"操作"}]},{key:"rowButton",contents:[{label:"访问"},{label:"删除"}]},{key:"extraButton",contents:[{label:"创建"},{label:"批量删除"}]},{key:"tableFilter",contents:[]},{key:"tableContents",contents:O.value}]}},{label:"任务关联",name:"任务关联",component:{comp:"Table",name:"任务关联",isShow:!0,compData:[{key:"header",contents:[{prop:"关联名称",align:"center",isRun:!1,label:"关联名称",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"关联形式",align:"center",isRun:!1,label:"关联形式",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"关联任务集合",align:"center",isRun:!1,label:"关联任务集合",isRoute:!1,isTableColHidden:!0,isFormColHidden:!1},{prop:"关联状态",align:"center",isRun:!1,label:"关联状态",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{label:"操作"}]},{key:"rowButton",contents:[{label:"访问"},{label:"删除"}]},{key:"extraButton",contents:[{label:"创建"},{label:"批量删除"}]},{key:"tableFilter",contents:[]},{key:"tableContents",contents:x.value}]}}]),N=m.ref([]),ie=m.computed(()=>{var l;return(l=N.value)==null?void 0:l.map((s,n)=>({value:s==null?void 0:s.id,label:s==null?void 0:s.name}))}),se=m.ref("data"),F=m.ref("任务配置"),M=m.ref({}),_=m.ref(null),$=m.reactive({width:"30%",title:"任务配置",type:"创建",show:!1}),fe=()=>{$.show=!1},de=(l,s)=>{var e,r,t,u,o,D,f,A,c;if(M.value=a.cloneDeep(s),l==="删除")return F.value==="任务配置"?O.value=(e=O.value)==null?void 0:e.filter(b=>(b==null?void 0:b.id)!==(s==null?void 0:s.id)):F.value==="任务关联"&&(x.value=(r=x.value)==null?void 0:r.filter(b=>(b==null?void 0:b.id)!==(s==null?void 0:s.id))),B.setItemExtendData({任务配置:{pageKey:V.value,compId:(t=_.value)==null?void 0:t.id,results:O.value},任务关联:{pageKey:V.value,compId:(u=_.value)==null?void 0:u.id,results:x.value}});const n=s?(o=Object.keys(s))==null?void 0:o[1]:"";F.value==="任务配置"?$.title=`当前配置:${(D=_.value)==null?void 0:D.name}>任务配置>【${(s==null?void 0:s[n])||l}】`:F.value==="任务关联"&&($.title=`当前配置:${(f=_.value)==null?void 0:f.name}>任务关联>【${(s==null?void 0:s[n])||l}】`),$.type=typeof((A=M.value)==null?void 0:A.id)=="string"||!((c=M.value)!=null&&c.id)?"创建":"编辑",$.show=l==="创建"||l==="访问"},he=l=>{var s;typeof l=="number"&&(_.value=(s=N.value)==null?void 0:s[l],me()),se.value="data"},be=l=>{},De=l=>{var s,n;switch(F.value){case"任务配置":$.type==="创建"?O.value.push(l==null?void 0:l.data):O.value=(s=O.value)==null?void 0:s.map(e=>{var r;return(e==null?void 0:e.id)===((r=l==null?void 0:l.data)==null?void 0:r.id)?{...e,...l==null?void 0:l.data}:e});break;case"任务关联":$.type==="创建"?x.value.push(l==null?void 0:l.data):x.value=(n=x.value)==null?void 0:n.map(e=>{var r;return(e==null?void 0:e.id)===((r=l==null?void 0:l.data)==null?void 0:r.id)?{...e,...l==null?void 0:l.data}:e});break}console.log("handleTableData:",O.value,l,$.type),B.setItemExtendData({任务配置:{pageKey:V.value,compId:l==null?void 0:l.compId,results:O.value},任务关联:{pageKey:V.value,compId:l==null?void 0:l.compId,results:x.value}}),$.show=!1},ge=l=>{var s,n;if((l==null?void 0:l.buttonName)==="取消")$.show=!1;else if((l==null?void 0:l.buttonName)==="保存"){const e={compId:(s=_.value)==null?void 0:s.id,data:{...l==null?void 0:l.content,id:(n=M.value)==null?void 0:n.id}};De(e)}},ke=(l,s)=>{var t,u;const{target:n,styleConfigs:e}=l;if(!e)return;const r=e==null?void 0:e.reduce((o,D)=>(o[D.prop]=D.value,o),{});s?N.value=(u=N.value)==null?void 0:u.map(o=>(o==null?void 0:o.id)===(s==null?void 0:s.id)?{...o,...r}:o):N.value=(t=N.value)==null?void 0:t.map(o=>({...o,...r})),B.setItemData(N.value)},ye=l=>{},ee=(l,s)=>{var n;return(n=l==null?void 0:l.filter(e=>{var r,t,u,o,D;return((t=(r=e==null?void 0:e.key)==null?void 0:r.relatedInfo)==null?void 0:t.target)===s&&((o=(u=e==null?void 0:e.key)==null?void 0:u.relatedInfo)==null?void 0:o.compId)===((D=_.value)==null?void 0:D.id)}))==null?void 0:n.map(e=>{var r;return{...(r=e==null?void 0:e.value)==null?void 0:r.tableData,id:e==null?void 0:e.id}})},me=()=>{var s,n;const l=(n=(s=ue.value)==null?void 0:s[V.value])==null?void 0:n.filter(e=>{var r;return((r=e==null?void 0:e.key)==null?void 0:r.type)==="extend"});(l==null?void 0:l.length)!==0&&(O.value=ee(l,"任务配置"),x.value=ee(l,"任务关联"))};m.ref(0);const re=l=>{var s,n;if(Array.isArray(Object.keys(l))&&((s=Object.keys(l))==null?void 0:s.length)>0){let e=[];return(n=Object.entries(l))==null||n.forEach(([r,t])=>{var o,D;let u=[];if(u.push(r),((o=Object.keys(t))==null?void 0:o.length)>0){let f=[];(D=re(t))==null||D.forEach(A=>{f.push(A)}),f==null||f.forEach(A=>{u.push(A)})}e.push(u)}),e}},ve=(l,s)=>{var e;let n=s;return Array.isArray(Object.keys(l))&&((e=Object.entries(l))==null||e.forEach(([r,t])=>{let u=[r];if(typeof t=="object"&&t!==null){let o=re(t);o==null||o.forEach(D=>{u.push(D)})}n.push(u)})),n},Te=l=>{const s={};return l.forEach(e=>{const r=e.split("/");let t=s;r.forEach(u=>{t[u]||(t[u]={}),t=t[u]})}),ve(s,[])},Ce=l=>Te(l);m.ref(0);m.ref(1);const ne=l=>{let s;l.replaceAll(" ",`\r
2
2
  `).replaceAll(`
3
3
  `,`\r
4
4
  `).includes(`\r
@@ -1,7 +1,7 @@
1
1
  import { ref as C, computed as se, reactive as ce } from "vue";
2
2
  import { a as ue, u as pe } from "./index-Dh_LOm8w.js";
3
3
  import { c as t, s as re, p as oe } from "./index-KFoWHXov.js";
4
- import { O as z, P as J } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9XvSEGdS.js";
4
+ import { O as z, P as J } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-T859a6kf.js";
5
5
  const K = ue(oe), { pageMapState: ie } = re(K), fe = pe(), { activeMenuPath: _ } = re(fe), j = C([
6
6
  // [
7
7
  // {