ss-component-new 1.3.39 → 1.3.41

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 (80) hide show
  1. package/dist/{MTLLoader-2i72y41c.js → MTLLoader-0j4FnCmg.js} +1 -1
  2. package/dist/{MTLLoader-DXzoNrir.cjs → MTLLoader-D1On5cQW.cjs} +1 -1
  3. package/dist/{OrbitControls-DLMbmcAk.js → OrbitControls-BudbhVMs.js} +1 -1
  4. package/dist/{OrbitControls-25f9O6FX.cjs → OrbitControls-CJ6Z_1he.cjs} +1 -1
  5. package/dist/{URDFLoader-Cr4cwEF8.cjs → URDFLoader-DI_H4g1V.cjs} +1 -1
  6. package/dist/{URDFLoader-C9bE_XzP.js → URDFLoader-DzxcCl4w.js} +2 -2
  7. package/dist/{animationData-Bq1xWpzh.cjs → animationData-CCwSzs0m.cjs} +1 -1
  8. package/dist/{animationData-0idWk1St.js → animationData-CUCZQOwn.js} +1 -1
  9. package/dist/{array-BcZ8wZJh.cjs → array-CjCFNkzp.cjs} +1 -1
  10. package/dist/{array-D7ZpHOUW.js → array-aVLi45HQ.js} +3 -3
  11. package/dist/{iconfont-C8smb8wH.cjs → iconfont-B1jFivpH.cjs} +1 -1
  12. package/dist/{iconfont-D_lKvP4A.js → iconfont-DlCT_O46.js} +2 -2
  13. package/dist/{index-Dl-Z36zZ.cjs → index-28o8Qzv1.cjs} +12 -12
  14. package/dist/{index-SG3iZ1zi.cjs → index-3VHVULya.cjs} +1 -1
  15. package/dist/{index-De99NYNm.cjs → index-8kLrRxQi.cjs} +1 -1
  16. package/dist/{index-2cLYbH8L.js → index-B7BGAOvy.js} +1 -1
  17. package/dist/{index-CXF4fGBx.cjs → index-B7Bn9-XL.cjs} +1 -1
  18. package/dist/{index-BjVhxFhd.js → index-B986vOOF.js} +4 -4
  19. package/dist/{index-HWbROorb.js → index-BD6swq7a.js} +1 -1
  20. package/dist/{index-Ccqg6q19.cjs → index-BNdGY7Vu.cjs} +1 -1
  21. package/dist/{index-BmPlus3L.cjs → index-BRPuiD1r.cjs} +1 -1
  22. package/dist/{index-O6tv0Wzx.js → index-BVUxJfPw.js} +9 -9
  23. package/dist/{index-mMYvuatu.js → index-BX8LEwbU.js} +13 -13
  24. package/dist/{index-CYttSa5h.js → index-BrJb_hfO.js} +1 -1
  25. package/dist/{index-CldRoanF.js → index-CCgEiFqh.js} +1 -1
  26. package/dist/{index-CZZ8Ifs9.js → index-CEiVTWOX.js} +1 -1
  27. package/dist/{index-C09fhtZ7.js → index-CI0y2Ngq.js} +1 -1
  28. package/dist/{index-BSzis22W.cjs → index-CUT9aZAK.cjs} +1 -1
  29. package/dist/{index-DQeVX7pl.js → index-CYd6nNAm.js} +3 -3
  30. package/dist/{index-OaeHF7Y4.cjs → index-CcbaZdha.cjs} +1 -1
  31. package/dist/{index-DPmCVTf0.cjs → index-CiNWEK5r.cjs} +1 -1
  32. package/dist/{index-CEcgrss3.cjs → index-CjYhPM4D.cjs} +1 -1
  33. package/dist/{index-CuwDFx38.cjs → index-CzBNplaZ.cjs} +1 -1
  34. package/dist/{index-BC4zbL4W.cjs → index-D2Y6bGDu.cjs} +1 -1
  35. package/dist/{index-DdKUuRez.js → index-DCAhH2Q_.js} +1 -1
  36. package/dist/{index-BFqQiTF3.cjs → index-DI7LzfXh.cjs} +1 -1
  37. package/dist/{index-Dhu1H8ka.js → index-DOKe-Rq5.js} +1 -1
  38. package/dist/{index-DkCH5VtE.js → index-DYAJM0UF.js} +2454 -2455
  39. package/dist/{index-CqvnJnTM.cjs → index-DaadY5Fj.cjs} +1 -1
  40. package/dist/{index-U0xNmCVP.cjs → index-DfO9Plpb.cjs} +1 -1
  41. package/dist/{index-C-_cejgk.js → index-Dqc-pVgE.js} +3 -3
  42. package/dist/{index-BeF439qb.js → index-Dsc6mjjc.js} +5 -5
  43. package/dist/{index-CvwIVk4C.js → index-DvZZF0gp.js} +2 -2
  44. package/dist/{index-C0hS-bj5.js → index-DyBXHAZg.js} +1 -1
  45. package/dist/{index-BJ4dYIP9.js → index-JMCMzR9f.js} +1 -1
  46. package/dist/{index-DM30Ja8n.cjs → index-J_XQ7DtD.cjs} +1 -1
  47. package/dist/{index-CMro3YG1.cjs → index-VUIR6NzF.cjs} +1 -1
  48. package/dist/{index-BFkiAoiG.cjs → index-_6YAsYAJ.cjs} +1 -1
  49. package/dist/{index-Bmjp4oN2.cjs → index-j9IeTOVQ.cjs} +1 -1
  50. package/dist/{index-BeqcmxG1.js → index-kktJA0O9.js} +4 -4
  51. package/dist/{index-BAu0NK04.cjs → index-r2DVVP5e.cjs} +1 -1
  52. package/dist/{index-CyiMl_77.js → index-ypkucSOj.js} +1 -1
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BUcTpnS3.js} +18580 -18578
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-NuCat8Ra.cjs} +348 -348
  55. package/dist/{index.vue_vue_type_style_index_1_lang-BIBuo_6N.cjs → index.vue_vue_type_style_index_1_lang-CXfxO2DQ.cjs} +1 -1
  56. package/dist/{index.vue_vue_type_style_index_1_lang-M5fbenhC.js → index.vue_vue_type_style_index_1_lang-CzG4Ixbn.js} +3 -3
  57. package/dist/{main-pPT0wg-M.cjs → main-5bn6xArO.cjs} +1 -1
  58. package/dist/{main-CZBz_zjr.js → main-D-uZYVrH.js} +3 -3
  59. package/dist/ss-component.cjs +1 -1
  60. package/dist/ss-component.css +1 -1
  61. package/dist/ss-component.js +8 -8
  62. package/dist/ss-component2.cjs +1 -1
  63. package/dist/ss-component2.js +10 -10
  64. package/dist/{threeModel-hIc2ofR5.cjs → threeModel-Bi6pMoHQ.cjs} +1 -1
  65. package/dist/{threeModel-BObCDF1v.js → threeModel-fISlfCWr.js} +4 -4
  66. package/dist/{threePreview-Dm8s6ZzZ.cjs → threePreview-CzgI_Ga-.cjs} +1 -1
  67. package/dist/{threePreview-STh6e4ji.js → threePreview-DyaKRBMS.js} +3 -3
  68. package/dist/{threeSceneView-BrPJwJe5.js → threeSceneView-BAagRxe4.js} +8 -8
  69. package/dist/{threeSceneView-DsimUKrC.cjs → threeSceneView-Dw7yTQ4z.cjs} +1 -1
  70. package/dist/{threeSceneViewForCPMPIP-C5cYg_nz.cjs → threeSceneViewForCPMPIP-5Yxk0S_K.cjs} +1 -1
  71. package/dist/{threeSceneViewForCPMPIP-BjnGQodx.js → threeSceneViewForCPMPIP-DaMzez72.js} +7 -7
  72. package/dist/{threeTrackPathView-CJsgvwfM.cjs → threeTrackPathView-BvqhHDfT.cjs} +1 -1
  73. package/dist/{threeTrackPathView-BQYAP4DB.js → threeTrackPathView-CjMTJc-a.js} +3 -3
  74. package/dist/{threeViewerHost-Sk5pSWMo.js → threeViewerHost-DhS7aiRq.js} +2 -2
  75. package/dist/{threeViewerHost-B9_P3rIV.cjs → threeViewerHost-kvZbrmx4.cjs} +1 -1
  76. package/dist/{urdfTree-B1eVnyil.js → urdfTree-B4OAVLm0.js} +1 -1
  77. package/dist/{urdfTree-DoHqwX6e.cjs → urdfTree-CRJ7jWql.cjs} +1 -1
  78. package/dist/{workpieceTreePanel-CZA2q-tk.js → workpieceTreePanel-Bf1BS9dL.js} +4 -4
  79. package/dist/{workpieceTreePanel-DKNEmjW7.cjs → workpieceTreePanel-CB2lRrXt.cjs} +1 -1
  80. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { aQ as Q, aR as X, aF as D, Q as P, X as I, aX as H, V as O, aS as k, aC as ie, aY as N, bn as Y, aU as T, a6 as ne, br as Z, aV as W, a1 as K, b2 as ae, a_ as oe, bk as le, bE as q, b4 as $, bQ as ce, bb as he } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js";
1
+ import { aQ as Q, aR as X, aF as D, Q as P, X as I, aX as H, V as O, aS as k, aC as ie, aY as N, bn as Y, aU as T, a6 as ne, br as Z, aV as W, a1 as K, b2 as ae, a_ as oe, bk as le, bE as q, b4 as $, bQ as ce, bb as he } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BUcTpnS3.js";
2
2
  class xe extends Q {
3
3
  /**
4
4
  * Constructs a new STL loader.
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.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-NuCat8Ra.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 { b_ as S, V as p, Y as u, b$ as _, b8 as E, c0 as P, b4 as c, c1 as w, a8 as O, ab as R } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js";
1
+ import { b_ as S, V as p, Y as u, b$ as _, b8 as E, c0 as P, b4 as c, c1 as w, a8 as O, ab as R } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BUcTpnS3.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 +1 @@
1
- "use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.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-NuCat8Ra.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
- "use strict";const an=require("./MTLLoader-DXzoNrir.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.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-D1On5cQW.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-NuCat8Ra.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,5 +1,5 @@
1
- import { S as Ln } from "./MTLLoader-2i72y41c.js";
2
- import { bO as vn, be as Rn, aQ as lt, b2 as At, aR as In, V as pe, aa as he, bo as dt, P as Mn, bb as Tt, Q as ut, ab as Le, bv as ft, bP as Sn, a6 as ve, bE as Se, X as me, b4 as On, a7 as Gn, a_ as Pn, R as ht, bt as qn, a2 as Fn, b6 as Un, a5 as jn, a3 as Hn, aC as pt, b8 as Et, bB as mt, bD as Bn, aF as Dn, aS as ye, bw as zn, aY as bt, bq as Vn, a1 as Ce, aH as Jn, br as Wn, bu as Kn, bk as Oe, bm as gt, bQ as Yn, bR as Xn, bS as yt, bT as $n, bU as Qn, bV as Zn, bW as ei, aW as ti, bX as ni, bY as ii, a9 as si } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js";
1
+ import { S as Ln } from "./MTLLoader-0j4FnCmg.js";
2
+ import { bO as vn, be as Rn, aQ as lt, b2 as At, aR as In, V as pe, aa as he, bo as dt, P as Mn, bb as Tt, Q as ut, ab as Le, bv as ft, bP as Sn, a6 as ve, bE as Se, X as me, b4 as On, a7 as Gn, a_ as Pn, R as ht, bt as qn, a2 as Fn, b6 as Un, a5 as jn, a3 as Hn, aC as pt, b8 as Et, bB as mt, bD as Bn, aF as Dn, aS as ye, bw as zn, aY as bt, bq as Vn, a1 as Ce, aH as Jn, br as Wn, bu as Kn, bk as Oe, bm as gt, bQ as Yn, bR as Xn, bS as yt, bT as $n, bU as Qn, bV as Zn, bW as ei, aW as ti, bX as ni, bY as ii, a9 as si } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BUcTpnS3.js";
3
3
  class wt extends vn {
4
4
  /**
5
5
  * Constructs a new TGA loader.
@@ -1 +1 @@
1
- "use strict";const p=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs"),x=require("./index-DRTxe12U.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-NuCat8Ra.cjs"),x=require("./index-DRTxe12U.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
- import { g as B, aL as C, c as x, ae as K, bN as S } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js";
1
+ import { g as B, aL as C, c as x, ae as K, bN as S } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BUcTpnS3.js";
2
2
  import { c as N } from "./index-COQpDVsv.js";
3
3
  const g = async (n) => {
4
4
  const e = n.join("/"), c = sessionStorage.getItem("systemKey");
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),K=require("./index-Ccqg6q19.cjs"),v=require("./index-DRTxe12U.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=require("./index-BVaHwt5f.cjs"),Ie=require("./index-Dl-Z36zZ.cjs"),Re=require("./index-BFkiAoiG.cjs"),Le=require("./index-C5pQXH0_.cjs"),Me={class:"type-select"},$e={class:"group-label"},Fe={class:"group-items"},He=["onDragstart"],Oe={__name:"index",props:{compContainerRef:Object},emits:[""],setup(l,{emit:n}){const d=v.useModelComp(v.pinia),{itemData:r,activeItemIndex:y}=v.storeToRefs(d),c=n,w=e.ref(null),h=e.computed(()=>{var P,O,$;const I={label:"布局",items:["TABS","LAYOUT"]},E={label:"常用",items:["FORM","TABLE"]},S={label:"高级",items:["STEP","TIMELINE","CHART","SIGNATURE","AVATAR","FOLD"]},b=(P=K.slotContent.value)==null?void 0:P.filter(R=>{var i,o;return(o=I==null?void 0:I.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())}),j=(O=K.slotContent.value)==null?void 0:O.filter(R=>{var i,o;return(o=E==null?void 0:E.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())}),N=($=K.slotContent.value)==null?void 0:$.filter(R=>{var i,o;return(o=S==null?void 0:S.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())});return[{...I,items:b},{...E,items:j},{...S,items:N}]}),V=(I,E)=>{try{I.dataTransfer.clearData();const S={...E,timestamp:Date.now()};I.dataTransfer.setData("application/json",JSON.stringify(S)),I.dataTransfer.effectAllowed="copyMove",I.target.classList.add("dragging"),c("handleDragStart",E)}catch(S){console.error("Drag start error:",S)}};return(I,E)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,b=>(e.openBlock(),e.createElementBlock("div",{class:"group-item",key:b==null?void 0:b.label},[e.createElementVNode("div",$e,e.toDisplayString(b==null?void 0:b.label),1),e.createElementVNode("div",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b==null?void 0:b.items,(j,N)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",title:"鼠标拖动",ref_for:!0,ref_key:"dragItem",ref:w,key:N,draggable:!0,onDragstart:P=>V(P,j)},[e.createVNode(S,{name:j.icon,style:{width:"15px",height:"15px"}},null,8,["name"]),e.createElementVNode("div",null,e.toDisplayString(j.name),1)],40,He))),128))])]))),128))])}}},Ae=oe._export_sfc(Oe,[["__scopeId","data-v-951fb5b4"]]),le=v.useModelComp(v.pinia),{pageMapState:Ue}=v.storeToRefs(le),qe=v.useMenuState(),{activeMenuPath:Z}=v.storeToRefs(qe),q=e.ref([]),W=e.ref([]),ze=e.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:q.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:W.value}]}}]),M=e.ref([]),Ve=e.computed(()=>{var l;return(l=M.value)==null?void 0:l.map((n,d)=>({value:n==null?void 0:n.id,label:n==null?void 0:n.name}))}),te=e.ref("data"),Y=e.ref("任务配置"),Q=e.ref({}),z=e.ref(null),A=e.reactive({width:"30%",title:"任务配置",type:"创建",show:!1}),Ge=()=>{A.show=!1},Ke=(l,n)=>{var r,y,c,w,h,V,I,E,S;if(Q.value=v.cloneDeep(n),l==="删除")return Y.value==="任务配置"?q.value=(r=q.value)==null?void 0:r.filter(b=>(b==null?void 0:b.id)!==(n==null?void 0:n.id)):Y.value==="任务关联"&&(W.value=(y=W.value)==null?void 0:y.filter(b=>(b==null?void 0:b.id)!==(n==null?void 0:n.id))),le.setItemExtendData({任务配置:{pageKey:Z.value,compId:(c=z.value)==null?void 0:c.id,results:q.value},任务关联:{pageKey:Z.value,compId:(w=z.value)==null?void 0:w.id,results:W.value}});const d=n?(h=Object.keys(n))==null?void 0:h[1]:"";Y.value==="任务配置"?A.title=`当前配置:${(V=z.value)==null?void 0:V.name}>任务配置>【${(n==null?void 0:n[d])||l}】`:Y.value==="任务关联"&&(A.title=`当前配置:${(I=z.value)==null?void 0:I.name}>任务关联>【${(n==null?void 0:n[d])||l}】`),A.type=typeof((E=Q.value)==null?void 0:E.id)=="string"||!((S=Q.value)!=null&&S.id)?"创建":"编辑",A.show=l==="创建"||l==="访问"},je=l=>{var n;typeof l=="number"&&(z.value=(n=M.value)==null?void 0:n[l],Je()),te.value="data"},Pe=l=>{},We=l=>{var n,d;switch(Y.value){case"任务配置":A.type==="创建"?q.value.push(l==null?void 0:l.data):q.value=(n=q.value)==null?void 0:n.map(r=>{var y;return(r==null?void 0:r.id)===((y=l==null?void 0:l.data)==null?void 0:y.id)?{...r,...l==null?void 0:l.data}:r});break;case"任务关联":A.type==="创建"?W.value.push(l==null?void 0:l.data):W.value=(d=W.value)==null?void 0:d.map(r=>{var y;return(r==null?void 0:r.id)===((y=l==null?void 0:l.data)==null?void 0:y.id)?{...r,...l==null?void 0:l.data}:r});break}console.log("handleTableData:",q.value,l,A.type),le.setItemExtendData({任务配置:{pageKey:Z.value,compId:l==null?void 0:l.compId,results:q.value},任务关联:{pageKey:Z.value,compId:l==null?void 0:l.compId,results:W.value}}),A.show=!1},Ye=l=>{var n,d;if((l==null?void 0:l.buttonName)==="取消")A.show=!1;else if((l==null?void 0:l.buttonName)==="保存"){const r={compId:(n=z.value)==null?void 0:n.id,data:{...l==null?void 0:l.content,id:(d=Q.value)==null?void 0:d.id}};We(r)}},Ne=(l,n)=>{var c,w;const{target:d,styleConfigs:r}=l;if(!r)return;const y=r==null?void 0:r.reduce((h,V)=>(h[V.prop]=V.value,h),{});n?M.value=(w=M.value)==null?void 0:w.map(h=>(h==null?void 0:h.id)===(n==null?void 0:n.id)?{...h,...y}:h):M.value=(c=M.value)==null?void 0:c.map(h=>({...h,...y})),le.setItemData(M.value)},Te=l=>{},Ee=(l,n)=>{var d;return(d=l==null?void 0:l.filter(r=>{var y,c,w,h,V;return((c=(y=r==null?void 0:r.key)==null?void 0:y.relatedInfo)==null?void 0:c.target)===n&&((h=(w=r==null?void 0:r.key)==null?void 0:w.relatedInfo)==null?void 0:h.compId)===((V=z.value)==null?void 0:V.id)}))==null?void 0:d.map(r=>{var y;return{...(y=r==null?void 0:r.value)==null?void 0:y.tableData,id:r==null?void 0:r.id}})},Je=()=>{var n,d;const l=(d=(n=Ue.value)==null?void 0:n[Z.value])==null?void 0:d.filter(r=>{var y;return((y=r==null?void 0:r.key)==null?void 0:y.type)==="extend"});(l==null?void 0:l.length)!==0&&(q.value=Ee(l,"任务配置"),W.value=Ee(l,"任务关联"))},Xe={class:"fill-content"},Qe={class:"overall-config-wrapper"},Ze={class:"operate-content"},et=["onClick"],tt={class:"collapse-title-item",title:"编辑"},lt={key:1},at=["onClick"],ot={class:"icon-content"},nt={key:0,class:"edit-content"},st=["onClick"],rt={title:"设置"},ct=["onClick"],ut={class:"parent-main"},it={style:{display:"flex","justify-content":"space-between"}},dt={title:"样式"},pt={title:"交互"},vt={title:"扩展"},ft={style:{width:"100%","max-height":"500px",overflow:"auto"}},ht={__name:"index",setup(l){const n=v.useModelComp(v.pinia),{itemData:d,originalData:r}=v.storeToRefs(n),y=v.useMenuState(),{activeMenuPath:c}=v.storeToRefs(y);e.ref([]);const w=e.ref([]),h=e.ref([]),V=e.ref([]),I=e.computed(()=>{var i,o,g,f;return((i=M.value)==null?void 0:i.length)>0&&(o=M.value)!=null&&o.every(m=>{var L,F;return(m==null?void 0:m.comp)===((F=(L=M.value)==null?void 0:L[0])==null?void 0:F.comp)})?(f=(g=M.value)==null?void 0:g[0])==null?void 0:f.comp:null}),E=i=>{var g;let o=(g=v.cloneDeep(h.value))==null?void 0:g.map((f,m)=>(i===m&&(f.content=!0),f));h.value=o},S=i=>{var g;let o=(g=v.cloneDeep(h.value))==null?void 0:g.map((f,m)=>(i===m&&(f.content=!1),f));h.value=o,M.value=v.cloneDeep(d.value)},b=(i,o)=>{var L;let g=(L=v.cloneDeep(h.value))==null?void 0:L.map((F,u)=>(i===u&&(F.content=!1),F));h.value=g;const f=v.cloneDeep(d.value),m=f==null?void 0:f.filter((F,u)=>(u===i&&(F.name=o),F));n.setOriginalData(m),n.setItemData(m)},j=i=>{const o=v.cloneDeep(d.value),g=o==null?void 0:o.map((f,m)=>((f==null?void 0:f.name)===(i==null?void 0:i.name)?f.isShow=!(i!=null&&i.isShow):f.isShow=f.isShow,f));d.value=g};e.watch(()=>d.value,()=>{var i,o,g,f;!d.value||((i=d.value)==null?void 0:i.length)===0?M.value=[]:M.value=(o=d.value)==null?void 0:o.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),w.value=M.value,h.value=(g=v.cloneDeep(w.value))==null?void 0:g.map((m,L)=>({id:L,content:!1})),V.value=(f=v.cloneDeep(w.value))==null?void 0:f.map((m,L)=>({id:L,isShow:m==null?void 0:m.isShow}))},{deep:!0,immediate:!0});const N=i=>K.getComponent(i),P=(i,o,g,f)=>{var L,F;if(!i)return;let m=v.cloneDeep(d.value);m=(L=m==null?void 0:m.map((u,_)=>{if(f&&_===g){const{compData:p,itemChildData:U}=i;return u.compData=p,u.itemChildData=U,u}return _===g&&(u.compData=i),u}))==null?void 0:L.filter(u=>(u==null?void 0:u.comp)!=="methodButton"),h.value=(F=v.cloneDeep(m))==null?void 0:F.map((u,_)=>({id:_,content:!1})),n.setOriginalData(m),n.setItemData(m)},O=e.ref(null),$=(i,o)=>{if(!o){n.setActiveItemIndex(i);return}n.setActiveItemIndex(-1)},R=i=>{v.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const o=v.cloneDeep(d.value),g=o==null?void 0:o.filter((f,m)=>m!==i);n.setOriginalData(g),n.setItemData(g),n.setActiveItemIndex(-1),Le.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(i,o)=>{var F;const g=e.resolveComponent("svg-icon"),f=e.resolveComponent("el-tab-pane"),m=e.resolveComponent("el-card"),L=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",Xe,[o[10]||(o[10]=e.createElementVNode("div",{class:"fill-operate"},"操作栏",-1)),e.createElementVNode("div",Qe,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(I.value+"style")),{target:"overall",optionItems:e.unref(Ve),compType:I.value,comp:(F=e.unref(M))==null?void 0:F[0],onChange:e.unref(Ne)},null,40,["optionItems","compType","comp","onChange"]))]),e.createElementVNode("div",Ze,[e.createVNode(Se.default,{class:"collapse-content",collapseContents:e.unref(M),accordion:!0,onChange:e.unref(je),ref_key:"ssCollapseRef",ref:O},{title:e.withCtx(({item:u,index:_,isActive:p})=>{var U,T,H,a,s,C,D,k,G,J;return[e.createElementVNode("div",{class:"collapse-title-content",onClick:x=>$(_,p)},[e.createElementVNode("div",tt,[(T=(U=h.value)==null?void 0:U.find(x=>x.id===_))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:u.name&&u.name!==""?"8px":"0px"})},e.toDisplayString(u.name),5)),(a=(H=h.value)==null?void 0:H.find(x=>x.id===_))!=null&&a.content?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(Ie._sfc_main$2,{modelValue:u.name,"onUpdate:modelValue":x=>u.name=x,onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(C=(s=h.value)==null?void 0:s.find(x=>x.id===_))!=null&&C.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(x=>E(_),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Edit",style:{width:"13px",height:"13px"}})],8,at))]),e.createElementVNode("div",ot,[(k=(D=h.value)==null?void 0:D.find(x=>x.id===_))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(g,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(x=>S(_),["stop"])},null,8,["onClick"]),e.createVNode(g,{name:"Save",onClick:e.withModifiers(x=>b(_,u.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(J=(G=h.value)==null?void 0:G.find(x=>x.id===_))!=null&&J.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(x=>R(_),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,st))])],8,et)]}),content:e.withCtx(({item:u,index:_})=>[e.createVNode(L,{modelValue:e.unref(te),"onUpdate:modelValue":o[2]||(o[2]=p=>e.isRef(te)?te.value=p:null),class:"config-tabs",onTabClick:$},{default:e.withCtx(()=>[e.createVNode(f,{label:"设置",name:"data"},{label:e.withCtx(()=>[e.createElementVNode("span",rt,[e.createVNode(g,{name:"LowCodeSetting",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[3]||(o[3]=e.createTextVNode("设置"))])]),default:e.withCtx(()=>{var p,U;return[e.createElementVNode("div",{class:"comp-child",onClick:T=>$(_)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(u.comp+"Operate")),{itemContents:u==null?void 0:u.compData,originalItemContents:(U=(p=w.value)==null?void 0:p.find((T,H)=>H===_))==null?void 0:U.compData,itemChildData:u==null?void 0:u.itemChildData,onChange:(T,H)=>P(T,u,_,H)},null,40,["itemContents","originalItemContents","itemChildData","onChange"]))],8,ct),e.createElementVNode("div",ut,[o[5]||(o[5]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("显隐控制"))],-1)),e.createElementVNode("div",it,[o[4]||(o[4]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否显示"),-1)),e.createVNode(Ie._sfc_main$1,{value:V.value.find(T=>T.id===_).isShow,"onUpdate:value":T=>V.value.find(H=>H.id===_).isShow=T,onClick:T=>j(u)},null,8,["value","onUpdate:value","onClick"])])])]}),_:2},1024),e.createVNode(f,{label:"样式",name:"style"},{label:e.withCtx(()=>[e.createElementVNode("span",dt,[e.createVNode(g,{name:"LowCodeStyle",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[6]||(o[6]=e.createTextVNode("样式"))])]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N((u==null?void 0:u.comp)+"style")),{target:"alone",compType:u==null?void 0:u.comp,comp:u,optionItems:e.unref(Ve),onChange:p=>e.unref(Ne)(p,u)},null,40,["compType","comp","optionItems","onChange"]))]),_:2},1024),e.createVNode(f,{label:"交互",name:"event"},{label:e.withCtx(()=>[e.createElementVNode("span",pt,[e.createVNode(g,{name:"LowCodeEvent",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[7]||(o[7]=e.createTextVNode("交互"))])]),default:e.withCtx(()=>[o[8]||(o[8]=e.createTextVNode(" 交互 "))]),_:1,__:[8]}),e.createVNode(f,{label:"扩展",name:"extend"},{label:e.withCtx(()=>[e.createElementVNode("span",vt,[e.createVNode(g,{name:"LowCodeExtend",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[9]||(o[9]=e.createTextVNode("扩展"))])]),default:e.withCtx(()=>[e.createVNode(L,{"tab-position":"left",modelValue:e.unref(Y),"onUpdate:modelValue":o[1]||(o[1]=p=>e.isRef(Y)?Y.value=p:null),class:"extend-tabs",onTabChange:e.unref(Pe)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ze),(p,U)=>(e.openBlock(),e.createBlock(f,{key:p==null?void 0:p.name,label:p==null?void 0:p.label,name:p==null?void 0:p.name},{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>{var T,H,a;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N((T=p==null?void 0:p.component)==null?void 0:T.comp)),{compItem:p==null?void 0:p.component,itemData:(H=p==null?void 0:p.component)==null?void 0:H.compData,childItemData:(a=p==null?void 0:p.component)==null?void 0:a.itemChildData,key:U,level:1,onChange:e.unref(Te),onOnButtonClick:e.unref(Ke)},null,40,["compItem","itemData","childItemData","onChange","onOnButtonClick"]))]}),_:2},1024)]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue","onTabChange"])]),_:1})]),_:2},1032,["modelValue"])]),_:1},8,["collapseContents","onChange"])]),e.createVNode(Re.ssDialog,{class:"task-dialog-wrapper",visible:e.unref(A).show,title:e.unref(A).title,dialogWidth:e.unref(A).width,onBeforeDestroy:e.unref(Ge)},{default:e.withCtx(()=>{var u,_;return[e.createElementVNode("div",ft,[e.unref(z)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(((u=e.unref(z))==null?void 0:u.comp)+"extend")),{key:0,target:"alone",comp:e.unref(z),extendItem:e.unref(Q),compType:(_=e.unref(z))==null?void 0:_.comp,activeTabName:e.unref(Y),relatedData:e.unref(q),onChange:e.unref(Te),onOnButtonClick:e.unref(Ye)},null,40,["comp","extendItem","compType","activeTabName","relatedData","onChange","onOnButtonClick"])):e.createCommentVNode("",!0)])]}),_:1},8,["visible","title","dialogWidth","onBeforeDestroy"])])}}},mt=oe._export_sfc(ht,[["__scopeId","data-v-0ecba574"]]),gt={style:{display:"flex"}},Ct={style:{display:"flex"}},kt={key:2},yt={key:4,style:{"margin-top":"30px"}},_t={__name:"index",setup(l){const n=v.useModelComp(v.pinia),{itemData:d,activeItemIndex:r,pageMapState:y}=v.storeToRefs(n),c=e.ref([]),w=e.ref(0),h=e.ref(""),V=v.useMenuState(v.pinia),{activeMenuPath:I}=v.storeToRefs(V),E=e.ref(null),S=e.ref(null),b=e.ref(24),j=e.ref(2),N=e.ref([]),P=e.ref([]),O=e.computed(()=>{var a,s,C;return{default:!i.value&&!R.value&&$.value==="vertical"&&((a=c.value)==null?void 0:a.length)>0,grid:i.value&&!R.value&&$.value==="vertical",tab:$.value==="horizontal"&&((s=c.value)==null?void 0:s.length)>0,step:R.value&&$.value==="vertical"&&((C=c.value)==null?void 0:C.length)>0}}),$=e.computed(()=>{var a,s,C,D;return((a=c.value)==null?void 0:a.length)>0&&((s=c.value)!=null&&s.every(k=>k==null?void 0:k.layout))?(D=(C=c.value)==null?void 0:C[0])==null?void 0:D.layout:"vertical"}),R=e.computed(()=>{var a,s;return(s=(a=c.value)==null?void 0:a[0])==null?void 0:s.isStepLayout}),i=e.computed(()=>{var a,s;return(s=(a=c.value)==null?void 0:a[0])==null?void 0:s.isGridLayout}),o=e.ref(null),g=e.computed(()=>{var a,s,C;return((a=c.value)==null?void 0:a.length)>0&&$.value==="horizontal"?(C=(s=c.value)==null?void 0:s[0])==null?void 0:C.name:""}),f=(a,s)=>{w.value=s,o.value=a},m=a=>{var k;if(!a)return;let s=null;const C=v.cloneDeep(c.value);if(r.value>=0&&(s=C==null?void 0:C[r.value]),s&&s.comp==="Layout"){const{compData:G=[]}=s;((k=G==null?void 0:G.find(x=>{const{key:ee}=x;return ee==="children"}))==null?void 0:k.contents).push({comp:a.comp,name:a.name,compData:[]}),n.setItemData(C);return}const D=v.cloneDeep(c.value);D.push({comp:a.comp,name:a.name,compData:[]}),n.setItemData(D),T(D)},L=a=>{a.preventDefault(),a.dataTransfer.dropEffect="copy"},F=async a=>{try{const s=a.dataTransfer.getData("application/json");if(!s)return;const C=JSON.parse(s),D=await u(a),k=_(C,D);await e.nextTick(),p(k),m(JSON.parse(s||"")),console.log("drop"),U()}catch(s){console.error("Drop error:",s),U()}},u=async a=>E.value?new Promise(s=>{requestAnimationFrame(()=>{const C=E.value.getBoundingClientRect(),D=a.clientX-C.left,k=a.clientY,G=Math.floor(D/(C.width/b.value)),J=Math.floor(k/(C.width/b.value));s({x:Math.max(0,G),y:Math.max(0,J),w:b.value,h:j.value})})}):{x:0,y:0},_=(a,s)=>{var D,k;const C=`item_${Date.now()}_${(k=(D=Math.random())==null?void 0:D.toString(36))==null?void 0:k.substring(2,9)}`;return{i:C,id:C,x:s.x,y:s.y,w:s.w,h:s.h,component:a,minW:2,minH:2}},p=a=>{T([...N.value,a],!0)},U=()=>{document.querySelectorAll(".dragging").forEach(a=>{a.classList.remove("dragging")})},T=(a,s)=>{N.value=s?a:K.generateLayouts(a),n.setItemGridData({pageKey:I.value,results:N.value}),V.setContentLoading(!1)};e.watch(()=>O.value.step,a=>{var s;a&&f((s=c.value)==null?void 0:s[0],1)},{immediate:!0}),e.watch(()=>O.value.grid,a=>{var s,C;!a&&((s=N.value)==null?void 0:s.length)>0&&n.setItemGridData({pageKey:I.value,results:(C=N.value)==null?void 0:C.map(D=>D==null?void 0:D.id),isDelete:!0})},{immediate:!0}),e.watch(()=>d.value,a=>{var s,C,D;V.setContentLoading(!0),c.value=!a||(a==null?void 0:a.length)===0?[]:(s=v.cloneDeep(a))==null?void 0:s.filter(k=>!(k!=null&&k.affix)||(k==null?void 0:k.affix)==="default"),P.value=!a||(a==null?void 0:a.length)===0?[]:(C=v.cloneDeep(a))==null?void 0:C.filter(k=>(k==null?void 0:k.affix)&&(k==null?void 0:k.affix)!=="default"),(D=O.value)!=null&&D.grid&&T(c.value)},{deep:!0,immediate:!0});const H=a=>K.getComponent(a);return(a,s)=>{var J,x,ee,ne,se,re,ce,ue,ie,de,pe,ve;const C=e.resolveComponent("el-tab-pane"),D=e.resolveComponent("el-tabs"),k=e.resolveComponent("el-step"),G=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:E,class:"low-code-wrapper",onDragover:L,onDrop:F},[(J=O.value)!=null&&J.default?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(t,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",gt,e.toDisplayString(t.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(t.comp)),{itemData:t==null?void 0:t.compData,childItemData:t==null?void 0:t.itemChildData,key:B,config:{showIndex:t==null?void 0:t.showIndex,allowMove:t==null?void 0:t.allowMove,viewport:t==null?void 0:t.viewport},pageLayout:$.value,parentTableId:t==null?void 0:t.tableId,children:t==null?void 0:t.children,level:1},null,8,["itemData","childItemData","config","pageLayout","parentTableId","children"]))]))),128)):e.createCommentVNode("",!0),(x=O.value)!=null&&x.grid?(e.openBlock(),e.createBlock(e.unref(K.De),{key:1,ref_key:"gridLayoutRef",ref:S,layout:N.value,"onUpdate:layout":s[0]||(s[0]=t=>N.value=t),"prevent-collision":!1,"is-draggable":!0,"is-resizable":!0,responsive:!1,"col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t,B)=>{var ae,fe;return e.openBlock(),e.createBlock(e.unref(K.st),{key:t.i,x:t.x,y:t.y,"min-h":t.minH,"max-h":t.maxH,"min-w":t.minW,w:t.w,h:e.unref(K.verifyButton)((ae=c.value[B])==null?void 0:ae.comp)?0:t.h,i:t.i,class:e.normalizeClass(e.unref(K.verifyButton)((fe=c.value[B])==null?void 0:fe.comp)?"grid-method-button":"")},{default:e.withCtx(()=>{var he,me,ge,Ce,ke,ye,_e,be,De,we,xe,Be;return[e.createElementVNode("div",{class:e.normalizeClass((me=P.value)!=null&&me.includes((he=t==null?void 0:t.component)==null?void 0:he.id)?"comp-wrapper affix-content":"comp-wrapper")},[e.createElementVNode("div",Ct,e.toDisplayString((ge=c.value[B])==null?void 0:ge.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H((Ce=c.value[B])==null?void 0:Ce.comp)),{pageLayout:$.value,itemData:(ke=c.value[B])==null?void 0:ke.compData,childItemData:(ye=c.value[B])==null?void 0:ye.itemChildData,index:((_e=c.value[B])==null?void 0:_e.id)??B,parentTableId:(be=c.value[B])==null?void 0:be.tableId,children:(De=c.value[B])==null?void 0:De.children,level:1,config:{showIndex:(we=c.value[B])==null?void 0:we.showIndex,allowMove:(xe=c.value[B])==null?void 0:xe.allowMove,viewport:(Be=c.value[B])==null?void 0:Be.viewport}},null,8,["pageLayout","itemData","childItemData","index","parentTableId","children","config"]))],2)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i","class"])}),128))]),_:1},8,["layout"])):e.createCommentVNode("",!0),(ee=O.value)!=null&&ee.tab?(e.openBlock(),e.createElementBlock("div",kt,[e.createVNode(D,{modelValue:g.value,"onUpdate:modelValue":s[1]||(s[1]=t=>g.value=t),type:"card",class:"display-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,B)=>(e.openBlock(),e.createBlock(C,{key:t.i,label:t==null?void 0:t.name,name:t==null?void 0:t.name},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(t==null?void 0:t.comp)),{pageLayout:$.value,itemData:t==null?void 0:t.compData,childItemData:t==null?void 0:t.itemChildData,key:B,config:{showIndex:t==null?void 0:t.showIndex,allowMove:t==null?void 0:t.allowMove,viewport:t==null?void 0:t.viewport}},null,8,["pageLayout","itemData","childItemData","config"]))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),(ne=O.value)!=null&&ne.step?(e.openBlock(),e.createBlock(G,{key:3,direction:"horizontal",active:w.value,"align-center":!0,class:"display-steps"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,B)=>(e.openBlock(),e.createBlock(k,{key:B,class:"step-item",status:h.value,onClick:ae=>f(t,B+1)},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t==null?void 0:t.name),1)]),_:2},1032,["status","onClick"]))),128))]),_:1},8,["active"])):e.createCommentVNode("",!0),(se=O.value)!=null&&se.step?(e.openBlock(),e.createElementBlock("div",yt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H((re=o.value)==null?void 0:re.comp)),{pageLayout:$.value,itemData:(ce=o.value)==null?void 0:ce.compData,childItemData:(ue=o.value)==null?void 0:ue.itemChildData,key:(ie=o.value)==null?void 0:ie.id,config:{showIndex:(de=o.value)==null?void 0:de.showIndex,allowMove:(pe=o.value)==null?void 0:pe.allowMove,viewport:(ve=o.value)==null?void 0:ve.viewport}},null,8,["pageLayout","itemData","childItemData","config"]))])):e.createCommentVNode("",!0)],544)}}},bt=oe._export_sfc(_t,[["__scopeId","data-v-fda67a9b"]]),X=e.ref(0),Dt=l=>l.reduce((d,r)=>{var c,w;const y=Object.values(d);return(((c=Object.keys(d))==null?void 0:c.length)===0||y[y.length-1].length>=(r==null?void 0:r.width))&&(d[X.value]=[],X.value++),d[X.value-1].push(r),((w=Object.keys(d))==null?void 0:w.length)===(r==null?void 0:r.width)&&(d[X.value]=[],X.value++),d},{});exports.arrayToNumberArray=Dt;exports.modelFill=mt;exports.modelSelect=Ae;exports.modelShow=bt;
1
+ "use strict";const e=require("vue"),K=require("./index-BNdGY7Vu.cjs"),v=require("./index-DRTxe12U.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=require("./index-BVaHwt5f.cjs"),Ie=require("./index-28o8Qzv1.cjs"),Re=require("./index-_6YAsYAJ.cjs"),Le=require("./index-C5pQXH0_.cjs"),Me={class:"type-select"},$e={class:"group-label"},Fe={class:"group-items"},He=["onDragstart"],Oe={__name:"index",props:{compContainerRef:Object},emits:[""],setup(l,{emit:n}){const d=v.useModelComp(v.pinia),{itemData:r,activeItemIndex:y}=v.storeToRefs(d),c=n,w=e.ref(null),h=e.computed(()=>{var P,O,$;const I={label:"布局",items:["TABS","LAYOUT"]},E={label:"常用",items:["FORM","TABLE"]},S={label:"高级",items:["STEP","TIMELINE","CHART","SIGNATURE","AVATAR","FOLD"]},b=(P=K.slotContent.value)==null?void 0:P.filter(R=>{var i,o;return(o=I==null?void 0:I.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())}),j=(O=K.slotContent.value)==null?void 0:O.filter(R=>{var i,o;return(o=E==null?void 0:E.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())}),N=($=K.slotContent.value)==null?void 0:$.filter(R=>{var i,o;return(o=S==null?void 0:S.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())});return[{...I,items:b},{...E,items:j},{...S,items:N}]}),V=(I,E)=>{try{I.dataTransfer.clearData();const S={...E,timestamp:Date.now()};I.dataTransfer.setData("application/json",JSON.stringify(S)),I.dataTransfer.effectAllowed="copyMove",I.target.classList.add("dragging"),c("handleDragStart",E)}catch(S){console.error("Drag start error:",S)}};return(I,E)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,b=>(e.openBlock(),e.createElementBlock("div",{class:"group-item",key:b==null?void 0:b.label},[e.createElementVNode("div",$e,e.toDisplayString(b==null?void 0:b.label),1),e.createElementVNode("div",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b==null?void 0:b.items,(j,N)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",title:"鼠标拖动",ref_for:!0,ref_key:"dragItem",ref:w,key:N,draggable:!0,onDragstart:P=>V(P,j)},[e.createVNode(S,{name:j.icon,style:{width:"15px",height:"15px"}},null,8,["name"]),e.createElementVNode("div",null,e.toDisplayString(j.name),1)],40,He))),128))])]))),128))])}}},Ae=oe._export_sfc(Oe,[["__scopeId","data-v-951fb5b4"]]),le=v.useModelComp(v.pinia),{pageMapState:Ue}=v.storeToRefs(le),qe=v.useMenuState(),{activeMenuPath:Z}=v.storeToRefs(qe),q=e.ref([]),W=e.ref([]),ze=e.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:q.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:W.value}]}}]),M=e.ref([]),Ve=e.computed(()=>{var l;return(l=M.value)==null?void 0:l.map((n,d)=>({value:n==null?void 0:n.id,label:n==null?void 0:n.name}))}),te=e.ref("data"),Y=e.ref("任务配置"),Q=e.ref({}),z=e.ref(null),A=e.reactive({width:"30%",title:"任务配置",type:"创建",show:!1}),Ge=()=>{A.show=!1},Ke=(l,n)=>{var r,y,c,w,h,V,I,E,S;if(Q.value=v.cloneDeep(n),l==="删除")return Y.value==="任务配置"?q.value=(r=q.value)==null?void 0:r.filter(b=>(b==null?void 0:b.id)!==(n==null?void 0:n.id)):Y.value==="任务关联"&&(W.value=(y=W.value)==null?void 0:y.filter(b=>(b==null?void 0:b.id)!==(n==null?void 0:n.id))),le.setItemExtendData({任务配置:{pageKey:Z.value,compId:(c=z.value)==null?void 0:c.id,results:q.value},任务关联:{pageKey:Z.value,compId:(w=z.value)==null?void 0:w.id,results:W.value}});const d=n?(h=Object.keys(n))==null?void 0:h[1]:"";Y.value==="任务配置"?A.title=`当前配置:${(V=z.value)==null?void 0:V.name}>任务配置>【${(n==null?void 0:n[d])||l}】`:Y.value==="任务关联"&&(A.title=`当前配置:${(I=z.value)==null?void 0:I.name}>任务关联>【${(n==null?void 0:n[d])||l}】`),A.type=typeof((E=Q.value)==null?void 0:E.id)=="string"||!((S=Q.value)!=null&&S.id)?"创建":"编辑",A.show=l==="创建"||l==="访问"},je=l=>{var n;typeof l=="number"&&(z.value=(n=M.value)==null?void 0:n[l],Je()),te.value="data"},Pe=l=>{},We=l=>{var n,d;switch(Y.value){case"任务配置":A.type==="创建"?q.value.push(l==null?void 0:l.data):q.value=(n=q.value)==null?void 0:n.map(r=>{var y;return(r==null?void 0:r.id)===((y=l==null?void 0:l.data)==null?void 0:y.id)?{...r,...l==null?void 0:l.data}:r});break;case"任务关联":A.type==="创建"?W.value.push(l==null?void 0:l.data):W.value=(d=W.value)==null?void 0:d.map(r=>{var y;return(r==null?void 0:r.id)===((y=l==null?void 0:l.data)==null?void 0:y.id)?{...r,...l==null?void 0:l.data}:r});break}console.log("handleTableData:",q.value,l,A.type),le.setItemExtendData({任务配置:{pageKey:Z.value,compId:l==null?void 0:l.compId,results:q.value},任务关联:{pageKey:Z.value,compId:l==null?void 0:l.compId,results:W.value}}),A.show=!1},Ye=l=>{var n,d;if((l==null?void 0:l.buttonName)==="取消")A.show=!1;else if((l==null?void 0:l.buttonName)==="保存"){const r={compId:(n=z.value)==null?void 0:n.id,data:{...l==null?void 0:l.content,id:(d=Q.value)==null?void 0:d.id}};We(r)}},Ne=(l,n)=>{var c,w;const{target:d,styleConfigs:r}=l;if(!r)return;const y=r==null?void 0:r.reduce((h,V)=>(h[V.prop]=V.value,h),{});n?M.value=(w=M.value)==null?void 0:w.map(h=>(h==null?void 0:h.id)===(n==null?void 0:n.id)?{...h,...y}:h):M.value=(c=M.value)==null?void 0:c.map(h=>({...h,...y})),le.setItemData(M.value)},Te=l=>{},Ee=(l,n)=>{var d;return(d=l==null?void 0:l.filter(r=>{var y,c,w,h,V;return((c=(y=r==null?void 0:r.key)==null?void 0:y.relatedInfo)==null?void 0:c.target)===n&&((h=(w=r==null?void 0:r.key)==null?void 0:w.relatedInfo)==null?void 0:h.compId)===((V=z.value)==null?void 0:V.id)}))==null?void 0:d.map(r=>{var y;return{...(y=r==null?void 0:r.value)==null?void 0:y.tableData,id:r==null?void 0:r.id}})},Je=()=>{var n,d;const l=(d=(n=Ue.value)==null?void 0:n[Z.value])==null?void 0:d.filter(r=>{var y;return((y=r==null?void 0:r.key)==null?void 0:y.type)==="extend"});(l==null?void 0:l.length)!==0&&(q.value=Ee(l,"任务配置"),W.value=Ee(l,"任务关联"))},Xe={class:"fill-content"},Qe={class:"overall-config-wrapper"},Ze={class:"operate-content"},et=["onClick"],tt={class:"collapse-title-item",title:"编辑"},lt={key:1},at=["onClick"],ot={class:"icon-content"},nt={key:0,class:"edit-content"},st=["onClick"],rt={title:"设置"},ct=["onClick"],ut={class:"parent-main"},it={style:{display:"flex","justify-content":"space-between"}},dt={title:"样式"},pt={title:"交互"},vt={title:"扩展"},ft={style:{width:"100%","max-height":"500px",overflow:"auto"}},ht={__name:"index",setup(l){const n=v.useModelComp(v.pinia),{itemData:d,originalData:r}=v.storeToRefs(n),y=v.useMenuState(),{activeMenuPath:c}=v.storeToRefs(y);e.ref([]);const w=e.ref([]),h=e.ref([]),V=e.ref([]),I=e.computed(()=>{var i,o,g,f;return((i=M.value)==null?void 0:i.length)>0&&(o=M.value)!=null&&o.every(m=>{var L,F;return(m==null?void 0:m.comp)===((F=(L=M.value)==null?void 0:L[0])==null?void 0:F.comp)})?(f=(g=M.value)==null?void 0:g[0])==null?void 0:f.comp:null}),E=i=>{var g;let o=(g=v.cloneDeep(h.value))==null?void 0:g.map((f,m)=>(i===m&&(f.content=!0),f));h.value=o},S=i=>{var g;let o=(g=v.cloneDeep(h.value))==null?void 0:g.map((f,m)=>(i===m&&(f.content=!1),f));h.value=o,M.value=v.cloneDeep(d.value)},b=(i,o)=>{var L;let g=(L=v.cloneDeep(h.value))==null?void 0:L.map((F,u)=>(i===u&&(F.content=!1),F));h.value=g;const f=v.cloneDeep(d.value),m=f==null?void 0:f.filter((F,u)=>(u===i&&(F.name=o),F));n.setOriginalData(m),n.setItemData(m)},j=i=>{const o=v.cloneDeep(d.value),g=o==null?void 0:o.map((f,m)=>((f==null?void 0:f.name)===(i==null?void 0:i.name)?f.isShow=!(i!=null&&i.isShow):f.isShow=f.isShow,f));d.value=g};e.watch(()=>d.value,()=>{var i,o,g,f;!d.value||((i=d.value)==null?void 0:i.length)===0?M.value=[]:M.value=(o=d.value)==null?void 0:o.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),w.value=M.value,h.value=(g=v.cloneDeep(w.value))==null?void 0:g.map((m,L)=>({id:L,content:!1})),V.value=(f=v.cloneDeep(w.value))==null?void 0:f.map((m,L)=>({id:L,isShow:m==null?void 0:m.isShow}))},{deep:!0,immediate:!0});const N=i=>K.getComponent(i),P=(i,o,g,f)=>{var L,F;if(!i)return;let m=v.cloneDeep(d.value);m=(L=m==null?void 0:m.map((u,_)=>{if(f&&_===g){const{compData:p,itemChildData:U}=i;return u.compData=p,u.itemChildData=U,u}return _===g&&(u.compData=i),u}))==null?void 0:L.filter(u=>(u==null?void 0:u.comp)!=="methodButton"),h.value=(F=v.cloneDeep(m))==null?void 0:F.map((u,_)=>({id:_,content:!1})),n.setOriginalData(m),n.setItemData(m)},O=e.ref(null),$=(i,o)=>{if(!o){n.setActiveItemIndex(i);return}n.setActiveItemIndex(-1)},R=i=>{v.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const o=v.cloneDeep(d.value),g=o==null?void 0:o.filter((f,m)=>m!==i);n.setOriginalData(g),n.setItemData(g),n.setActiveItemIndex(-1),Le.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(i,o)=>{var F;const g=e.resolveComponent("svg-icon"),f=e.resolveComponent("el-tab-pane"),m=e.resolveComponent("el-card"),L=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",Xe,[o[10]||(o[10]=e.createElementVNode("div",{class:"fill-operate"},"操作栏",-1)),e.createElementVNode("div",Qe,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(I.value+"style")),{target:"overall",optionItems:e.unref(Ve),compType:I.value,comp:(F=e.unref(M))==null?void 0:F[0],onChange:e.unref(Ne)},null,40,["optionItems","compType","comp","onChange"]))]),e.createElementVNode("div",Ze,[e.createVNode(Se.default,{class:"collapse-content",collapseContents:e.unref(M),accordion:!0,onChange:e.unref(je),ref_key:"ssCollapseRef",ref:O},{title:e.withCtx(({item:u,index:_,isActive:p})=>{var U,T,H,a,s,C,D,k,G,J;return[e.createElementVNode("div",{class:"collapse-title-content",onClick:x=>$(_,p)},[e.createElementVNode("div",tt,[(T=(U=h.value)==null?void 0:U.find(x=>x.id===_))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:u.name&&u.name!==""?"8px":"0px"})},e.toDisplayString(u.name),5)),(a=(H=h.value)==null?void 0:H.find(x=>x.id===_))!=null&&a.content?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(Ie._sfc_main$2,{modelValue:u.name,"onUpdate:modelValue":x=>u.name=x,onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(C=(s=h.value)==null?void 0:s.find(x=>x.id===_))!=null&&C.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(x=>E(_),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Edit",style:{width:"13px",height:"13px"}})],8,at))]),e.createElementVNode("div",ot,[(k=(D=h.value)==null?void 0:D.find(x=>x.id===_))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(g,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(x=>S(_),["stop"])},null,8,["onClick"]),e.createVNode(g,{name:"Save",onClick:e.withModifiers(x=>b(_,u.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(J=(G=h.value)==null?void 0:G.find(x=>x.id===_))!=null&&J.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(x=>R(_),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,st))])],8,et)]}),content:e.withCtx(({item:u,index:_})=>[e.createVNode(L,{modelValue:e.unref(te),"onUpdate:modelValue":o[2]||(o[2]=p=>e.isRef(te)?te.value=p:null),class:"config-tabs",onTabClick:$},{default:e.withCtx(()=>[e.createVNode(f,{label:"设置",name:"data"},{label:e.withCtx(()=>[e.createElementVNode("span",rt,[e.createVNode(g,{name:"LowCodeSetting",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[3]||(o[3]=e.createTextVNode("设置"))])]),default:e.withCtx(()=>{var p,U;return[e.createElementVNode("div",{class:"comp-child",onClick:T=>$(_)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(u.comp+"Operate")),{itemContents:u==null?void 0:u.compData,originalItemContents:(U=(p=w.value)==null?void 0:p.find((T,H)=>H===_))==null?void 0:U.compData,itemChildData:u==null?void 0:u.itemChildData,onChange:(T,H)=>P(T,u,_,H)},null,40,["itemContents","originalItemContents","itemChildData","onChange"]))],8,ct),e.createElementVNode("div",ut,[o[5]||(o[5]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("显隐控制"))],-1)),e.createElementVNode("div",it,[o[4]||(o[4]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否显示"),-1)),e.createVNode(Ie._sfc_main$1,{value:V.value.find(T=>T.id===_).isShow,"onUpdate:value":T=>V.value.find(H=>H.id===_).isShow=T,onClick:T=>j(u)},null,8,["value","onUpdate:value","onClick"])])])]}),_:2},1024),e.createVNode(f,{label:"样式",name:"style"},{label:e.withCtx(()=>[e.createElementVNode("span",dt,[e.createVNode(g,{name:"LowCodeStyle",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[6]||(o[6]=e.createTextVNode("样式"))])]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N((u==null?void 0:u.comp)+"style")),{target:"alone",compType:u==null?void 0:u.comp,comp:u,optionItems:e.unref(Ve),onChange:p=>e.unref(Ne)(p,u)},null,40,["compType","comp","optionItems","onChange"]))]),_:2},1024),e.createVNode(f,{label:"交互",name:"event"},{label:e.withCtx(()=>[e.createElementVNode("span",pt,[e.createVNode(g,{name:"LowCodeEvent",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[7]||(o[7]=e.createTextVNode("交互"))])]),default:e.withCtx(()=>[o[8]||(o[8]=e.createTextVNode(" 交互 "))]),_:1,__:[8]}),e.createVNode(f,{label:"扩展",name:"extend"},{label:e.withCtx(()=>[e.createElementVNode("span",vt,[e.createVNode(g,{name:"LowCodeExtend",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[9]||(o[9]=e.createTextVNode("扩展"))])]),default:e.withCtx(()=>[e.createVNode(L,{"tab-position":"left",modelValue:e.unref(Y),"onUpdate:modelValue":o[1]||(o[1]=p=>e.isRef(Y)?Y.value=p:null),class:"extend-tabs",onTabChange:e.unref(Pe)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ze),(p,U)=>(e.openBlock(),e.createBlock(f,{key:p==null?void 0:p.name,label:p==null?void 0:p.label,name:p==null?void 0:p.name},{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>{var T,H,a;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N((T=p==null?void 0:p.component)==null?void 0:T.comp)),{compItem:p==null?void 0:p.component,itemData:(H=p==null?void 0:p.component)==null?void 0:H.compData,childItemData:(a=p==null?void 0:p.component)==null?void 0:a.itemChildData,key:U,level:1,onChange:e.unref(Te),onOnButtonClick:e.unref(Ke)},null,40,["compItem","itemData","childItemData","onChange","onOnButtonClick"]))]}),_:2},1024)]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue","onTabChange"])]),_:1})]),_:2},1032,["modelValue"])]),_:1},8,["collapseContents","onChange"])]),e.createVNode(Re.ssDialog,{class:"task-dialog-wrapper",visible:e.unref(A).show,title:e.unref(A).title,dialogWidth:e.unref(A).width,onBeforeDestroy:e.unref(Ge)},{default:e.withCtx(()=>{var u,_;return[e.createElementVNode("div",ft,[e.unref(z)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(((u=e.unref(z))==null?void 0:u.comp)+"extend")),{key:0,target:"alone",comp:e.unref(z),extendItem:e.unref(Q),compType:(_=e.unref(z))==null?void 0:_.comp,activeTabName:e.unref(Y),relatedData:e.unref(q),onChange:e.unref(Te),onOnButtonClick:e.unref(Ye)},null,40,["comp","extendItem","compType","activeTabName","relatedData","onChange","onOnButtonClick"])):e.createCommentVNode("",!0)])]}),_:1},8,["visible","title","dialogWidth","onBeforeDestroy"])])}}},mt=oe._export_sfc(ht,[["__scopeId","data-v-0ecba574"]]),gt={style:{display:"flex"}},Ct={style:{display:"flex"}},kt={key:2},yt={key:4,style:{"margin-top":"30px"}},_t={__name:"index",setup(l){const n=v.useModelComp(v.pinia),{itemData:d,activeItemIndex:r,pageMapState:y}=v.storeToRefs(n),c=e.ref([]),w=e.ref(0),h=e.ref(""),V=v.useMenuState(v.pinia),{activeMenuPath:I}=v.storeToRefs(V),E=e.ref(null),S=e.ref(null),b=e.ref(24),j=e.ref(2),N=e.ref([]),P=e.ref([]),O=e.computed(()=>{var a,s,C;return{default:!i.value&&!R.value&&$.value==="vertical"&&((a=c.value)==null?void 0:a.length)>0,grid:i.value&&!R.value&&$.value==="vertical",tab:$.value==="horizontal"&&((s=c.value)==null?void 0:s.length)>0,step:R.value&&$.value==="vertical"&&((C=c.value)==null?void 0:C.length)>0}}),$=e.computed(()=>{var a,s,C,D;return((a=c.value)==null?void 0:a.length)>0&&((s=c.value)!=null&&s.every(k=>k==null?void 0:k.layout))?(D=(C=c.value)==null?void 0:C[0])==null?void 0:D.layout:"vertical"}),R=e.computed(()=>{var a,s;return(s=(a=c.value)==null?void 0:a[0])==null?void 0:s.isStepLayout}),i=e.computed(()=>{var a,s;return(s=(a=c.value)==null?void 0:a[0])==null?void 0:s.isGridLayout}),o=e.ref(null),g=e.computed(()=>{var a,s,C;return((a=c.value)==null?void 0:a.length)>0&&$.value==="horizontal"?(C=(s=c.value)==null?void 0:s[0])==null?void 0:C.name:""}),f=(a,s)=>{w.value=s,o.value=a},m=a=>{var k;if(!a)return;let s=null;const C=v.cloneDeep(c.value);if(r.value>=0&&(s=C==null?void 0:C[r.value]),s&&s.comp==="Layout"){const{compData:G=[]}=s;((k=G==null?void 0:G.find(x=>{const{key:ee}=x;return ee==="children"}))==null?void 0:k.contents).push({comp:a.comp,name:a.name,compData:[]}),n.setItemData(C);return}const D=v.cloneDeep(c.value);D.push({comp:a.comp,name:a.name,compData:[]}),n.setItemData(D),T(D)},L=a=>{a.preventDefault(),a.dataTransfer.dropEffect="copy"},F=async a=>{try{const s=a.dataTransfer.getData("application/json");if(!s)return;const C=JSON.parse(s),D=await u(a),k=_(C,D);await e.nextTick(),p(k),m(JSON.parse(s||"")),console.log("drop"),U()}catch(s){console.error("Drop error:",s),U()}},u=async a=>E.value?new Promise(s=>{requestAnimationFrame(()=>{const C=E.value.getBoundingClientRect(),D=a.clientX-C.left,k=a.clientY,G=Math.floor(D/(C.width/b.value)),J=Math.floor(k/(C.width/b.value));s({x:Math.max(0,G),y:Math.max(0,J),w:b.value,h:j.value})})}):{x:0,y:0},_=(a,s)=>{var D,k;const C=`item_${Date.now()}_${(k=(D=Math.random())==null?void 0:D.toString(36))==null?void 0:k.substring(2,9)}`;return{i:C,id:C,x:s.x,y:s.y,w:s.w,h:s.h,component:a,minW:2,minH:2}},p=a=>{T([...N.value,a],!0)},U=()=>{document.querySelectorAll(".dragging").forEach(a=>{a.classList.remove("dragging")})},T=(a,s)=>{N.value=s?a:K.generateLayouts(a),n.setItemGridData({pageKey:I.value,results:N.value}),V.setContentLoading(!1)};e.watch(()=>O.value.step,a=>{var s;a&&f((s=c.value)==null?void 0:s[0],1)},{immediate:!0}),e.watch(()=>O.value.grid,a=>{var s,C;!a&&((s=N.value)==null?void 0:s.length)>0&&n.setItemGridData({pageKey:I.value,results:(C=N.value)==null?void 0:C.map(D=>D==null?void 0:D.id),isDelete:!0})},{immediate:!0}),e.watch(()=>d.value,a=>{var s,C,D;V.setContentLoading(!0),c.value=!a||(a==null?void 0:a.length)===0?[]:(s=v.cloneDeep(a))==null?void 0:s.filter(k=>!(k!=null&&k.affix)||(k==null?void 0:k.affix)==="default"),P.value=!a||(a==null?void 0:a.length)===0?[]:(C=v.cloneDeep(a))==null?void 0:C.filter(k=>(k==null?void 0:k.affix)&&(k==null?void 0:k.affix)!=="default"),(D=O.value)!=null&&D.grid&&T(c.value)},{deep:!0,immediate:!0});const H=a=>K.getComponent(a);return(a,s)=>{var J,x,ee,ne,se,re,ce,ue,ie,de,pe,ve;const C=e.resolveComponent("el-tab-pane"),D=e.resolveComponent("el-tabs"),k=e.resolveComponent("el-step"),G=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:E,class:"low-code-wrapper",onDragover:L,onDrop:F},[(J=O.value)!=null&&J.default?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(t,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",gt,e.toDisplayString(t.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(t.comp)),{itemData:t==null?void 0:t.compData,childItemData:t==null?void 0:t.itemChildData,key:B,config:{showIndex:t==null?void 0:t.showIndex,allowMove:t==null?void 0:t.allowMove,viewport:t==null?void 0:t.viewport},pageLayout:$.value,parentTableId:t==null?void 0:t.tableId,children:t==null?void 0:t.children,level:1},null,8,["itemData","childItemData","config","pageLayout","parentTableId","children"]))]))),128)):e.createCommentVNode("",!0),(x=O.value)!=null&&x.grid?(e.openBlock(),e.createBlock(e.unref(K.De),{key:1,ref_key:"gridLayoutRef",ref:S,layout:N.value,"onUpdate:layout":s[0]||(s[0]=t=>N.value=t),"prevent-collision":!1,"is-draggable":!0,"is-resizable":!0,responsive:!1,"col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t,B)=>{var ae,fe;return e.openBlock(),e.createBlock(e.unref(K.st),{key:t.i,x:t.x,y:t.y,"min-h":t.minH,"max-h":t.maxH,"min-w":t.minW,w:t.w,h:e.unref(K.verifyButton)((ae=c.value[B])==null?void 0:ae.comp)?0:t.h,i:t.i,class:e.normalizeClass(e.unref(K.verifyButton)((fe=c.value[B])==null?void 0:fe.comp)?"grid-method-button":"")},{default:e.withCtx(()=>{var he,me,ge,Ce,ke,ye,_e,be,De,we,xe,Be;return[e.createElementVNode("div",{class:e.normalizeClass((me=P.value)!=null&&me.includes((he=t==null?void 0:t.component)==null?void 0:he.id)?"comp-wrapper affix-content":"comp-wrapper")},[e.createElementVNode("div",Ct,e.toDisplayString((ge=c.value[B])==null?void 0:ge.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H((Ce=c.value[B])==null?void 0:Ce.comp)),{pageLayout:$.value,itemData:(ke=c.value[B])==null?void 0:ke.compData,childItemData:(ye=c.value[B])==null?void 0:ye.itemChildData,index:((_e=c.value[B])==null?void 0:_e.id)??B,parentTableId:(be=c.value[B])==null?void 0:be.tableId,children:(De=c.value[B])==null?void 0:De.children,level:1,config:{showIndex:(we=c.value[B])==null?void 0:we.showIndex,allowMove:(xe=c.value[B])==null?void 0:xe.allowMove,viewport:(Be=c.value[B])==null?void 0:Be.viewport}},null,8,["pageLayout","itemData","childItemData","index","parentTableId","children","config"]))],2)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i","class"])}),128))]),_:1},8,["layout"])):e.createCommentVNode("",!0),(ee=O.value)!=null&&ee.tab?(e.openBlock(),e.createElementBlock("div",kt,[e.createVNode(D,{modelValue:g.value,"onUpdate:modelValue":s[1]||(s[1]=t=>g.value=t),type:"card",class:"display-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,B)=>(e.openBlock(),e.createBlock(C,{key:t.i,label:t==null?void 0:t.name,name:t==null?void 0:t.name},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(t==null?void 0:t.comp)),{pageLayout:$.value,itemData:t==null?void 0:t.compData,childItemData:t==null?void 0:t.itemChildData,key:B,config:{showIndex:t==null?void 0:t.showIndex,allowMove:t==null?void 0:t.allowMove,viewport:t==null?void 0:t.viewport}},null,8,["pageLayout","itemData","childItemData","config"]))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),(ne=O.value)!=null&&ne.step?(e.openBlock(),e.createBlock(G,{key:3,direction:"horizontal",active:w.value,"align-center":!0,class:"display-steps"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,B)=>(e.openBlock(),e.createBlock(k,{key:B,class:"step-item",status:h.value,onClick:ae=>f(t,B+1)},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t==null?void 0:t.name),1)]),_:2},1032,["status","onClick"]))),128))]),_:1},8,["active"])):e.createCommentVNode("",!0),(se=O.value)!=null&&se.step?(e.openBlock(),e.createElementBlock("div",yt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H((re=o.value)==null?void 0:re.comp)),{pageLayout:$.value,itemData:(ce=o.value)==null?void 0:ce.compData,childItemData:(ue=o.value)==null?void 0:ue.itemChildData,key:(ie=o.value)==null?void 0:ie.id,config:{showIndex:(de=o.value)==null?void 0:de.showIndex,allowMove:(pe=o.value)==null?void 0:pe.allowMove,viewport:(ve=o.value)==null?void 0:ve.viewport}},null,8,["pageLayout","itemData","childItemData","config"]))])):e.createCommentVNode("",!0)],544)}}},bt=oe._export_sfc(_t,[["__scopeId","data-v-fda67a9b"]]),X=e.ref(0),Dt=l=>l.reduce((d,r)=>{var c,w;const y=Object.values(d);return(((c=Object.keys(d))==null?void 0:c.length)===0||y[y.length-1].length>=(r==null?void 0:r.width))&&(d[X.value]=[],X.value++),d[X.value-1].push(r),((w=Object.keys(d))==null?void 0:w.length)===(r==null?void 0:r.width)&&(d[X.value]=[],X.value++),d},{});exports.arrayToNumberArray=Dt;exports.modelFill=mt;exports.modelSelect=Ae;exports.modelShow=bt;