ss-component-new 1.1.310 → 1.1.311

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 (81) hide show
  1. package/dist/{array-CFIAOkpU.js → array-DE6wt1mS.js} +2 -2
  2. package/dist/{array-Dp3mG6qP.cjs → array-_-oOMLLg.cjs} +1 -1
  3. package/dist/{cloneDeep-BC6hApUL.js → cloneDeep-CyHCXJlk.js} +1 -1
  4. package/dist/{cloneDeep-Dqfzct8G.cjs → cloneDeep-q1KhEZrF.cjs} +1 -1
  5. package/dist/index-2aEbosYj.cjs +9 -0
  6. package/dist/{index-Dj4GAvUp.js → index-4Js8S8G9.js} +3 -3
  7. package/dist/{index-DCCRnjTu.cjs → index-B-I0Iuvk.cjs} +1 -1
  8. package/dist/{index-DjAg2mhq.js → index-B6jJAqA9.js} +3 -3
  9. package/dist/{index-BUzuQGku.cjs → index-B90Lci_3.cjs} +1 -1
  10. package/dist/{index-D25w_LCd.js → index-B9YEmj0W.js} +4 -4
  11. package/dist/{index-DA3Sh1Tz.cjs → index-B9u5T6Jx.cjs} +1 -1
  12. package/dist/{index-DzHb-2qg.cjs → index-BQbU2sYG.cjs} +1 -1
  13. package/dist/{index-B1nJ-Z39.js → index-BWMcR2en.js} +3 -3
  14. package/dist/{index-CfUQUcR0.js → index-Bbu4BYFT.js} +1 -1
  15. package/dist/{index-Dk4rHBYA.js → index-BcyJYFsy.js} +1 -1
  16. package/dist/{index-D4-10GVB.js → index-BdHZ4SEQ.js} +5 -5
  17. package/dist/{index-CG7LSylY.cjs → index-BgOykyF1.cjs} +1 -1
  18. package/dist/{index-Dv0cT1Jj.cjs → index-BlG3gOmC.cjs} +1 -1
  19. package/dist/{index-Cehda098.cjs → index-Blho7wFH.cjs} +1 -1
  20. package/dist/{index-Cykuj77e.js → index-BwtVQqbI.js} +7 -7
  21. package/dist/{index-CND4bAN1.js → index-C616PlsM.js} +6 -6
  22. package/dist/{index-C098N8un.cjs → index-C8bF8ful.cjs} +1 -1
  23. package/dist/{index-BRebILsV.cjs → index-CBLqYPs7.cjs} +1 -1
  24. package/dist/{index-BPoaubFA.cjs → index-CKbrFSeR.cjs} +1 -1
  25. package/dist/index-CVJuOGW3.js +5419 -0
  26. package/dist/{index-CSMb6JUa.js → index-CbexiBQe.js} +9 -9
  27. package/dist/{index-COWtJfBt.js → index-CdEaCxt5.js} +6 -6
  28. package/dist/{index-Cd3MpYaF.js → index-Cgemtxhh.js} +20 -20
  29. package/dist/index-CljOK1lF.cjs +1 -0
  30. package/dist/{index-DE3uvzqv.js → index-Cp2TaWYh.js} +1 -1
  31. package/dist/{index-5W3FYly6.cjs → index-CptolTSx.cjs} +1 -1
  32. package/dist/{index-B2-tbMJV.js → index-CwgTNqtN.js} +4 -4
  33. package/dist/{index-Ci-roF0f.cjs → index-D1xZ8Qfd.cjs} +1 -1
  34. package/dist/{index-B0WB2KTa.cjs → index-D2bZ9sIF.cjs} +1 -1
  35. package/dist/{index-CqoO4f6W.cjs → index-D6fA5kvF.cjs} +1 -1
  36. package/dist/{index-CMhrZyHq.cjs → index-D9fYMR3C.cjs} +1 -1
  37. package/dist/{index-BsoflaB1.js → index-DAauIjIj.js} +3 -3
  38. package/dist/{index-CxHjQMe7.js → index-DGVE4c4g.js} +5 -5
  39. package/dist/{index-6DprAE2h.js → index-DJcVEb-N.js} +6 -6
  40. package/dist/{index-i0BszWbX.cjs → index-DKdYYwzJ.cjs} +1 -1
  41. package/dist/{index-BiA96Te2.js → index-DLHInWju.js} +4 -4
  42. package/dist/{index-DhNtgRPf.js → index-DOkwVl15.js} +1 -1
  43. package/dist/{index-epYwDqWZ.js → index-DWHRYVGl.js} +5 -5
  44. package/dist/{index-CeIsvjm_.js → index-DdC45q63.js} +8 -8
  45. package/dist/{index-KxCRKhYW.js → index-DlAxFgFi.js} +7 -7
  46. package/dist/{index-ukJ-kt4p.cjs → index-Dpt4c5d2.cjs} +1 -1
  47. package/dist/{index-563TMWMC.cjs → index-DzzDMdTV.cjs} +1 -1
  48. package/dist/{index-DpgIfvxQ.cjs → index-OOftrl9c.cjs} +1 -1
  49. package/dist/{index-CKbCejX8.cjs → index-RTqx4ZaI.cjs} +1 -1
  50. package/dist/{index-DJUjFOtq.js → index-SZCNAPk4.js} +3 -3
  51. package/dist/{index-Tu-PtE4a.cjs → index-TKqKxTvD.cjs} +1 -1
  52. package/dist/{index-BlnkYO02.cjs → index-eJgzaacx.cjs} +1 -1
  53. package/dist/{index-BqyjHr9C.js → index-fZ4gxL76.js} +4 -4
  54. package/dist/{index-C4Sp8WeM.js → index-m1ui_gZB.js} +4 -4
  55. package/dist/{index-BTnKTcJy.cjs → index-pdXSCRCL.cjs} +1 -1
  56. package/dist/{index-Cb4nldBH.cjs → index-wJlCuDLQ.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_script_setup_true_lang-C1lQOWLE.cjs → index.vue_vue_type_script_setup_true_lang-DtXhNelA.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_script_setup_true_lang-CApK0j7g.js → index.vue_vue_type_script_setup_true_lang-sulrbmY4.js} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-CmoZt9g1.cjs → index.vue_vue_type_style_index_0_scoped_63a4bd9d_lang-Sm4RXYda.cjs} +1 -1
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-PEeio78T.js → index.vue_vue_type_style_index_0_scoped_63a4bd9d_lang-edqxqSbC.js} +13 -13
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-r-NO8sGY.cjs → index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-B28adiLm.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-DOzj8ZRs.js → index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-Dx6ocgA9.js} +8 -8
  63. package/dist/{login-UhUPZuPH.js → login-CbV19Ghf.js} +2 -2
  64. package/dist/{login-BPkLsYkz.cjs → login-DhrP4Uu5.cjs} +1 -1
  65. package/dist/{main-BTYMrU5V.cjs → main-Bj3ypHov.cjs} +1 -1
  66. package/dist/{main-dSK-267_.js → main-xiP7-YZK.js} +7 -7
  67. package/dist/{menu-dd51TtC8.js → menu-Cz_bKvvF.js} +1 -1
  68. package/dist/{menu-D1SsYDhc.cjs → menu-DQN34Kz_.cjs} +1 -1
  69. package/dist/ss-component.cjs +1 -1
  70. package/dist/ss-component.css +1 -1
  71. package/dist/ss-component.js +7 -7
  72. package/dist/ss-component3.cjs +1 -1
  73. package/dist/ss-component3.js +1 -1
  74. package/package.json +1 -1
  75. package/dist/index-DX-ZG8i5.cjs +0 -1
  76. package/dist/index-Dl7Iwabv.cjs +0 -9
  77. package/dist/index-ts5b_rKm.js +0 -5283
  78. package/dist/obj/model.mtl +0 -42
  79. package/dist/obj/model.obj +0 -26110
  80. package/public/obj/model.mtl +0 -42
  81. package/public/obj/model.obj +0 -26110
@@ -1,6 +1,6 @@
1
1
  import { ref as Q } from "vue";
2
- import { c as o } from "./cloneDeep-BC6hApUL.js";
3
- import { aj as z } from "./index-COWtJfBt.js";
2
+ import { c as o } from "./cloneDeep-CyHCXJlk.js";
3
+ import { aj as z } from "./index-CdEaCxt5.js";
4
4
  const J = [
5
5
  {
6
6
  key: "FormName",
@@ -1,4 +1,4 @@
1
- "use strict";const Q=require("vue"),o=require("./cloneDeep-Dqfzct8G.cjs"),z=require("./index-B0WB2KTa.cjs"),E=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],N=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],M=Q.ref(0),Pe=l=>{const[t,s]=l.split(/=(.+)/),e=t.replace(/['"]/g,"").trim(),r=s.replace(/^['"]|['"]$/g,"");return{key:e,value:r}},V=l=>{try{return JSON.parse(l),!0}catch{return!1}},Be=l=>l.includes("$")&&l.trim().endsWith("(")?l+")":l,Ge=l=>{let t=l;const s=[];let e="";for(const r of t)r.includes("{")||e.includes("{")||r.includes("[")||e.includes("[")||r.includes("【")||e.includes("【")||r.includes("(")||e.includes("(")||r.includes("(")||e.includes("(")||r.includes("/*")||e.includes("/*")?(e+=r.trim(),o.cloneDeep(e).split("{").length-1===o.cloneDeep(e).split("}").length-1&&o.cloneDeep(e).split("【").length-1===o.cloneDeep(e).split("】").length-1&&o.cloneDeep(e).split("[").length-1===o.cloneDeep(e).split("]").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("/*").length-1===o.cloneDeep(e).split("*/").length-1&&(s.push(e),e="")):s.push(r.trim());return s==null?void 0:s.filter(r=>r.includes("{"))},We=l=>{var s;let t=[];return(s=Ge(l.slice(1,-1)))==null||s.forEach(e=>{var n,c,a,f;let r=((c=(n=e.slice(1,-1))==null?void 0:n.split(","))==null?void 0:c.length)??1;(f=(a=e.slice(1,-1))==null?void 0:a.split(","))==null||f.forEach(p=>{var A,h,j,b,$,i,y,m,g,T,F,I,P;let u=p==null?void 0:p.split(":"),d=u!=null&&u[0]?(u==null?void 0:u[1].split("$").length)-1===1?((A=u==null?void 0:u[0])==null?void 0:A.replace(/^"(.*)"$/,"$1"))+((h=u==null?void 0:u[1])==null?void 0:h.replace(/^"(.*)"$/,"$1")):Array.isArray((b=(j=u==null?void 0:u[1])==null?void 0:j.replace(/^"(.*)"$/,"$1"))==null?void 0:b.split("("))&&((y=(i=($=u==null?void 0:u[1])==null?void 0:$.replace(/^"(.*)"$/,"$1"))==null?void 0:i.split("("))==null?void 0:y.length)>1?((m=u==null?void 0:u[0])==null?void 0:m.replace(/^"(.*)"$/,"$1"))+((F=(T=(g=u==null?void 0:u[1])==null?void 0:g.replace(/^"(.*)"$/,"$1"))==null?void 0:T.split("("))==null?void 0:F[0])+"()":(I=u==null?void 0:u[0])==null?void 0:I.replace(/^"(.*)"$/,"$1"):"",k=(u==null?void 0:u[1].split("$").length)-1===0?(P=u==null?void 0:u[1])==null?void 0:P.replace(/^"(.*)"$/,"$1"):"";M.value++,t.push({id:M.value,key:d,value:k,width:r,extraContent:u==null?void 0:u[1]})})}),t},De=l=>{var t,s;try{const e=l.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(o.cloneDeep(e).split("{").length-1>1){let r=o.cloneDeep(e).replace(/^\{(.*)\}$/,"[$1]");if(V(r)&&!r.includes("$")||(r=r.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),V(r)){const n=JSON.parse(r);let c=[];return n==null||n.forEach(a=>{var f;(f=Object.entries(o.cloneDeep(a)))==null||f.forEach(p=>{M.value++,c.push({id:M.value,key:(p==null?void 0:p[0])??"",value:(p==null?void 0:p[1])===""?"":p==null?void 0:p[1],width:Object.keys(o.cloneDeep(a)).length})})}),c}else return e.trim().startsWith("{{")?We(e.trim()):se(r)}else if(V(e)){const r=JSON.parse(e);return Object.entries(r).map(([n,c])=>(M.value++,{id:M.value,key:n,value:c===""?"":c,width:1}))}else return((t=se(e))==null?void 0:t.length)===0?e:(s=se(e))==null?void 0:s.map(r=>({label:r.label,method:Be(r.method)}))}catch(e){return console.error("转换失败:",e),[]}},se=l=>{l=l.trim().replace(/^\{|\}$/g,"").trim();const t=[];let s=0;for(;s<l.length;){const e=l.slice(s).match(/^\s*"([^"]+)"\s*:\s*/);if(!e)break;const r=e[1];s+=e[0].length;let n="",c=0,a=!1,f="";for(let p=s;p<l.length;p++){const u=l[p];if((u==='"'||u==="'")&&!a?(a=!0,f=u):u===f&&a&&(a=!1,f=""),!a&&((u==="{"||u==="("||u==="[")&&c++,(u==="}"||u===")"||u==="]")&&c--,u===","&&c===0||p===l.length-1)){n=l.slice(s,p+1).trim(),s=p+1;break}}t.push({label:r,method:n})}return t},Le=(l,t)=>{try{if(E!=null&&E.find(s=>(s==null?void 0:s.key)===t))return l.replace(/['"]/g,"").trim();if(o.cloneDeep(l).split("[").length-1>1){const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else{const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(V(s)){const e=JSON.parse(s);return Array.isArray(e)?e.map(r=>({label:r})):e}else return De(o.cloneDeep(l))}}catch(s){return console.error("解析失败:",s),l}},_e=l=>({[l==null?void 0:l.key]:Le(l==null?void 0:l.value,l==null?void 0:l.key)}),ze=l=>{try{if(o.cloneDeep(l).split("[").length-1>1){const t=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(s=>({label:s}))}catch(t){return console.error("解析失败:",t),l}},Ze=l=>{const t=l.match(/\(([^)]+)\)/);return t?t[1]:""},He=l=>{const t=l.match(/^([^(]+)\s*\(/);return t?t[1].trim():l},me=l=>l.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(t=>t.trim()).filter(t=>t).join("/"),qe=l=>{var c,a;let t=[],s=[];const e=(c=o.cloneDeep(l))==null?void 0:c.map(f=>f==null?void 0:f.key),r=[...new Set((a=o.cloneDeep(e))==null?void 0:a.map(f=>Ze(f)))];r==null||r.forEach(f=>{let p=l==null?void 0:l.filter(k=>k.key.includes(f));p==null||p.forEach(k=>{k!=null&&k.key.includes("Menus")&&(t.push({key:"GroupName",value:me(k==null?void 0:k.value)}),s.push(me(k==null?void 0:k.value)))});let u=l==null?void 0:l.filter(k=>k.key.includes(f)&&!(k!=null&&k.key.includes("Menus")));u=u==null?void 0:u.map(k=>(k.key=He(k.key),k));const d={key:"GroupContents",value:u};t.push(d)});const n={key:"Menus",value:s};return t.unshift(n),t},Ce=l=>{var t,s;if(Array.isArray(Object.keys(l))&&((t=Object.keys(l))==null?void 0:t.length)>0){let e=[];return(s=Object.entries(l))==null||s.forEach(([r,n])=>{var a,f;let c=[];if(c.push(r),((a=Object.keys(n))==null?void 0:a.length)>0){let p=[];(f=Ce(n))==null||f.forEach(u=>{p.push(u)}),p==null||p.forEach(u=>{c.push(u)})}e.push(c)}),e}},Me=(l,t)=>{var e;let s=t;return Array.isArray(Object.keys(l))&&((e=Object.entries(l))==null||e.forEach(([r,n])=>{let c=[r];if(typeof n=="object"&&n!==null){let a=Ce(n);a==null||a.forEach(f=>{c.push(f)})}s.push(c)})),s},Qe=l=>{const t={};return l.forEach(e=>{const r=e.split("/");let n=t;r.forEach(c=>{n[c]||(n[c]={}),n=n[c]})}),Me(t,[])},ce=l=>Qe(l),Re=l=>{var t,s,e,r,n,c,a,f;try{const p=ee((s=(t=o.cloneDeep(l))==null?void 0:t.replace("(","("))==null?void 0:s.replace(")",")")),u=(r=(e=o.cloneDeep(p))==null?void 0:e.filter(h=>!h.includes("/*")))==null?void 0:r.map(h=>Pe(h)),d=qe(u),k=[];if(((n=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="Menus"))==null?void 0:n.value.length)===0)return!1;(c=o.cloneDeep(d))==null||c.forEach(h=>{var j,b,$,i,y;E!=null&&E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})?k.push({comp:((j=E==null?void 0:E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:j.value)??"",name:(b=h==null?void 0:h.value)==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]}):N!=null&&N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})&&((k==null?void 0:k.length)===0&&($=h.key)!=null&&$.includes("Menus")&&k.push({comp:"Menu",name:"",compData:[]}),(i=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&i.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(y=N==null?void 0:N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:y.value,contents:h==null?void 0:h.value}))});let A=(a=o.cloneDeep(k))==null?void 0:a.map(h=>{var j;return h!=null&&h.compData&&(h.compData=(j=h==null?void 0:h.compData)==null?void 0:j.map(b=>{var $,i,y,m,g,T,F,I,P,G,W;if((b==null?void 0:b.key)==="formFlex")b.contents=((i=($=b.contents)==null?void 0:$.replace(/[’]|[‘]|[']/g,""))==null?void 0:i.toUpperCase())!=="Vertical".toUpperCase();else if((b==null?void 0:b.key)==="groupContents")b.contents=(y=o.cloneDeep(b.contents))==null?void 0:y.map(L=>_e(o.cloneDeep(L)));else if(Array.isArray(b==null?void 0:b.contents))b.contents=ce(b.contents);else if(((g=(m=b==null?void 0:b.contents)==null?void 0:m.trim())!=null&&g.startsWith("[")||(F=(T=b.contents)==null?void 0:T.trim())!=null&&F.startsWith("【"))&&((P=(I=b.contents)==null?void 0:I.trim())!=null&&P.endsWith("]")||(W=(G=b.contents)==null?void 0:G.trim())!=null&&W.endsWith("】")))b.contents=ze(o.cloneDeep(b.contents));else{if(!b.contents)return;b.contents=De(o.cloneDeep(b.contents))}return b})),h});return A=(f=o.cloneDeep(A))==null?void 0:f.map(h=>{var j;return(h==null?void 0:h.comp)==="Group"&&(h.compData=(j=h.compData)==null?void 0:j.map(b=>{var i;let $=[];return(i=b.contents)==null||i.forEach(y=>{var m,g,T,F,I,P,G,W,L,x,O,C;if(E!=null&&E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))$.push({comp:(m=E==null?void 0:E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:m.value,name:(T=(g=Object.values(y))==null?void 0:g[0])==null?void 0:T.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(N!=null&&N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())})){if(($==null?void 0:$.length)===0)return;(F=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&F.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(I=N==null?void 0:N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:I.value,contents:(P=Object.values(y))==null?void 0:P[0]})}else if((W=(G=Object.keys(y))==null?void 0:G[0])!=null&&W.includes("$")){const D=(x=(L=Object.keys(o.cloneDeep(y)))==null?void 0:L[0])==null?void 0:x.split("$");$[($==null?void 0:$.length)-1].compData.push({key:(O=N==null?void 0:N.find(J=>{var U,S;return((U=J==null?void 0:J.key)==null?void 0:U.toUpperCase())===((S=D==null?void 0:D[0])==null?void 0:S.toUpperCase())}))==null?void 0:O.value,contents:(C=Object.values(y))==null?void 0:C[0],selectLabel:D==null?void 0:D[1]})}return y}),b.contents=$,b})),h}),A}catch{return!1}},de=Q.ref(0),Oe=l=>{const t=[];let s=null;for(let e=0;e<l.length;e++){const r=l[e];if(Array.isArray(r))s&&(s.children=Oe(r));else{const n={label:r};t.push(n),s=n}}return t},Te=l=>{let t=0;for(const s of l)t++,s.children&&(t+=Te(s.children));return t},xe=(l,t,s=[])=>{let e=0;for(const r of t){if(e>=l.length)break;const n=[...l[e]];if(s.push(n),e++,r.children&&r.children.length>0){const c=[];xe(l.slice(e),r.children,c),c.length>0&&(n.push(c),e+=Te(r.children))}}return s},Xe=(l,t)=>{let s=[];return l==null||l.forEach(r=>{r.some(n=>Array.isArray(n))?s.push(...r):s.push(r)}),xe(s,t)},ne=l=>{const t={label:l[0].trim()};if(l.length>1){const s=l.slice(1);s.length===1&&Array.isArray(s[0])?t.children=s[0].map(e=>Array.isArray(e)?ne(e):{label:e.trim()}):t.children=s.map(e=>Array.isArray(e)?ne(e):{label:e.trim()})}return t},ke=l=>{let t=l.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return t=t.replace(/:}(?=,|]|}|$)/g,':""}'),t=t.replace(/:,(?=\s*")/g,':"",'),t=t.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(s,e,r)=>`"${e}://${r}"`),t=t.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),t},Ye=l=>{var s;return l.some(e=>!Array.isArray(e))?l:(s=o.cloneDeep(l))==null?void 0:s.map(e=>{let r=[];return e.some(n=>Array.isArray(n))?e==null||e.forEach(n=>{Array.isArray(n)&&r.push(ne(n))}):e.some(n=>n.includes("["))?r.push(e):r=e.map(n=>({label:n.trim()})),r})},Je=(l,t,s)=>{let e=l,r=s,n=t;return n.children&&(Array.isArray(r[r.length-1])?r[r.length-1].push(e[0]):r.push(e[0]),e.shift(),n=n.children),Array.isArray(n)&&n.forEach(c=>{if(c.children){const a=Je(e,c,r);r=a[0],e=a[1]}}),[r,e]},Ke=(l,t)=>{let s=l,e=[];return t.length>0?t==null||t.forEach(r=>{let n=s==null?void 0:s[0];s.shift();const c=Je(o.cloneDeep(s),r,n);n=c[0],s=c[1],e.push(n)}):e=s,e},ae=(l,t)=>{const s=Ye(o.cloneDeep(l));return Ke(s,t)},Ve=l=>{const t=[];let s=0;const e=l.length;for(;s<e;){const r=l[s];r.key==="tableColumns"&&s+1<e&&l[s+1].key==="tableContents"?(t.push({comp:"Table",compData:[r,l[s+1]],name:""}),s+=2):(t.push(r),s+=1)}return t},Ne=l=>ae([l],[]),v=l=>{const t=[];return l==null||l.forEach(s=>s==null?void 0:s.forEach(r=>{var n,c;de.value++,t.push({id:de.value,key:(n=Object.keys(r))==null?void 0:n[0],value:(c=Object.values(r))==null?void 0:c[0],width:s.length})})),t},ge=l=>{let t=Ve(l);return t=t==null?void 0:t.map(s=>{var e,r,n,c;if(s.comp==="Table")(e=s.compData)!=null&&e.find(a=>(a==null?void 0:a.key)==="header")||(s.compData=(r=s.compData)==null?void 0:r.map(a=>(a.key==="tableColumns"?a={key:"header",contents:ae(a.value,[])}:a={key:a.key,contents:a.value},a)),s.compData.push({key:"extraButton",contents:[{label:"新增"}]}),s.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(s.key==="form"){const a=(n=s==null?void 0:s.value)==null?void 0:n.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)}],name:""}}else if(s.key==="formTop"){const a=(c=s==null?void 0:s.value)==null?void 0:c.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return s}),t},we=(l,t)=>{var a,f,p,u,d,k;const s=[],e=Oe((f=(a=l==null?void 0:l.find(A=>A.key==="tableIndex"))==null?void 0:a.value)==null?void 0:f[0]);s.push({key:"tableIndexColumn",contents:t}),s.push({key:"tableIndex",contents:e});let r=[];const n=(p=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:p.value;n.length===1&&!(n!=null&&n[0].some(A=>Array.isArray(A)))?r=(u=n==null?void 0:n[0])==null?void 0:u.map(A=>({label:A})):r=ae((d=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:d.value,e),s.push({key:"header",contents:r});const c=Xe((k=l==null?void 0:l.find(A=>A.key==="tableContents"))==null?void 0:k.value,e);return s.push({key:"tableContents",contents:c}),s.push({key:"extraButton",contents:[{label:"新增"}]}),s.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),s},Ee=l=>l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(t,s,e)=>{const r=Ee(e);return`"${s}",${r}`}),Y=l=>{const t=l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ee(t).replace(/^"(.*)"$/,"$1")},ve=l=>{const t=new Set;return l.filter(s=>{const e=JSON.stringify(s);return t.has(e)?!1:t.add(e)})},be=l=>{var s;let t=[];return(s=o.cloneDeep(l))==null||s.forEach(e=>{var r;(r=e.contents)==null||r.forEach(n=>{t.push(n)})}),t=ve(t),t.push({label:"操作"}),[t]},el=(l,t)=>l.reduce((s,e,r)=>{const n=Math.floor(r/t);return s[n]||(s[n]=[]),s[n].push(e),s},[]),je=l=>l.reduce((t,s)=>s.children&&s.children.length>0?t+je(s.children):t+1,0),ll=(l,t)=>{var e;let s=[];return(e=el(l,je(t==null?void 0:t[0])-1))==null||e.forEach(r=>{let n=[];r.forEach(c=>{var a;Array.isArray(c.contents)?(a=c.contents)==null||a.forEach(f=>{n.push(f)}):n.push(c.contents)}),s.push(n)}),[s]},sl=["方法体","输入","输出"],$e=Q.ref(1),ee=l=>{let t;l.replaceAll(" ",`\r
1
+ "use strict";const Q=require("vue"),o=require("./cloneDeep-q1KhEZrF.cjs"),z=require("./index-D2bZ9sIF.cjs"),E=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],N=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],M=Q.ref(0),Pe=l=>{const[t,s]=l.split(/=(.+)/),e=t.replace(/['"]/g,"").trim(),r=s.replace(/^['"]|['"]$/g,"");return{key:e,value:r}},V=l=>{try{return JSON.parse(l),!0}catch{return!1}},Be=l=>l.includes("$")&&l.trim().endsWith("(")?l+")":l,Ge=l=>{let t=l;const s=[];let e="";for(const r of t)r.includes("{")||e.includes("{")||r.includes("[")||e.includes("[")||r.includes("【")||e.includes("【")||r.includes("(")||e.includes("(")||r.includes("(")||e.includes("(")||r.includes("/*")||e.includes("/*")?(e+=r.trim(),o.cloneDeep(e).split("{").length-1===o.cloneDeep(e).split("}").length-1&&o.cloneDeep(e).split("【").length-1===o.cloneDeep(e).split("】").length-1&&o.cloneDeep(e).split("[").length-1===o.cloneDeep(e).split("]").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("/*").length-1===o.cloneDeep(e).split("*/").length-1&&(s.push(e),e="")):s.push(r.trim());return s==null?void 0:s.filter(r=>r.includes("{"))},We=l=>{var s;let t=[];return(s=Ge(l.slice(1,-1)))==null||s.forEach(e=>{var n,c,a,f;let r=((c=(n=e.slice(1,-1))==null?void 0:n.split(","))==null?void 0:c.length)??1;(f=(a=e.slice(1,-1))==null?void 0:a.split(","))==null||f.forEach(p=>{var A,h,j,b,$,i,y,m,g,T,F,I,P;let u=p==null?void 0:p.split(":"),d=u!=null&&u[0]?(u==null?void 0:u[1].split("$").length)-1===1?((A=u==null?void 0:u[0])==null?void 0:A.replace(/^"(.*)"$/,"$1"))+((h=u==null?void 0:u[1])==null?void 0:h.replace(/^"(.*)"$/,"$1")):Array.isArray((b=(j=u==null?void 0:u[1])==null?void 0:j.replace(/^"(.*)"$/,"$1"))==null?void 0:b.split("("))&&((y=(i=($=u==null?void 0:u[1])==null?void 0:$.replace(/^"(.*)"$/,"$1"))==null?void 0:i.split("("))==null?void 0:y.length)>1?((m=u==null?void 0:u[0])==null?void 0:m.replace(/^"(.*)"$/,"$1"))+((F=(T=(g=u==null?void 0:u[1])==null?void 0:g.replace(/^"(.*)"$/,"$1"))==null?void 0:T.split("("))==null?void 0:F[0])+"()":(I=u==null?void 0:u[0])==null?void 0:I.replace(/^"(.*)"$/,"$1"):"",k=(u==null?void 0:u[1].split("$").length)-1===0?(P=u==null?void 0:u[1])==null?void 0:P.replace(/^"(.*)"$/,"$1"):"";M.value++,t.push({id:M.value,key:d,value:k,width:r,extraContent:u==null?void 0:u[1]})})}),t},De=l=>{var t,s;try{const e=l.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(o.cloneDeep(e).split("{").length-1>1){let r=o.cloneDeep(e).replace(/^\{(.*)\}$/,"[$1]");if(V(r)&&!r.includes("$")||(r=r.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),V(r)){const n=JSON.parse(r);let c=[];return n==null||n.forEach(a=>{var f;(f=Object.entries(o.cloneDeep(a)))==null||f.forEach(p=>{M.value++,c.push({id:M.value,key:(p==null?void 0:p[0])??"",value:(p==null?void 0:p[1])===""?"":p==null?void 0:p[1],width:Object.keys(o.cloneDeep(a)).length})})}),c}else return e.trim().startsWith("{{")?We(e.trim()):se(r)}else if(V(e)){const r=JSON.parse(e);return Object.entries(r).map(([n,c])=>(M.value++,{id:M.value,key:n,value:c===""?"":c,width:1}))}else return((t=se(e))==null?void 0:t.length)===0?e:(s=se(e))==null?void 0:s.map(r=>({label:r.label,method:Be(r.method)}))}catch(e){return console.error("转换失败:",e),[]}},se=l=>{l=l.trim().replace(/^\{|\}$/g,"").trim();const t=[];let s=0;for(;s<l.length;){const e=l.slice(s).match(/^\s*"([^"]+)"\s*:\s*/);if(!e)break;const r=e[1];s+=e[0].length;let n="",c=0,a=!1,f="";for(let p=s;p<l.length;p++){const u=l[p];if((u==='"'||u==="'")&&!a?(a=!0,f=u):u===f&&a&&(a=!1,f=""),!a&&((u==="{"||u==="("||u==="[")&&c++,(u==="}"||u===")"||u==="]")&&c--,u===","&&c===0||p===l.length-1)){n=l.slice(s,p+1).trim(),s=p+1;break}}t.push({label:r,method:n})}return t},Le=(l,t)=>{try{if(E!=null&&E.find(s=>(s==null?void 0:s.key)===t))return l.replace(/['"]/g,"").trim();if(o.cloneDeep(l).split("[").length-1>1){const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else{const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(V(s)){const e=JSON.parse(s);return Array.isArray(e)?e.map(r=>({label:r})):e}else return De(o.cloneDeep(l))}}catch(s){return console.error("解析失败:",s),l}},_e=l=>({[l==null?void 0:l.key]:Le(l==null?void 0:l.value,l==null?void 0:l.key)}),ze=l=>{try{if(o.cloneDeep(l).split("[").length-1>1){const t=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(s=>({label:s}))}catch(t){return console.error("解析失败:",t),l}},Ze=l=>{const t=l.match(/\(([^)]+)\)/);return t?t[1]:""},He=l=>{const t=l.match(/^([^(]+)\s*\(/);return t?t[1].trim():l},me=l=>l.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(t=>t.trim()).filter(t=>t).join("/"),qe=l=>{var c,a;let t=[],s=[];const e=(c=o.cloneDeep(l))==null?void 0:c.map(f=>f==null?void 0:f.key),r=[...new Set((a=o.cloneDeep(e))==null?void 0:a.map(f=>Ze(f)))];r==null||r.forEach(f=>{let p=l==null?void 0:l.filter(k=>k.key.includes(f));p==null||p.forEach(k=>{k!=null&&k.key.includes("Menus")&&(t.push({key:"GroupName",value:me(k==null?void 0:k.value)}),s.push(me(k==null?void 0:k.value)))});let u=l==null?void 0:l.filter(k=>k.key.includes(f)&&!(k!=null&&k.key.includes("Menus")));u=u==null?void 0:u.map(k=>(k.key=He(k.key),k));const d={key:"GroupContents",value:u};t.push(d)});const n={key:"Menus",value:s};return t.unshift(n),t},Ce=l=>{var t,s;if(Array.isArray(Object.keys(l))&&((t=Object.keys(l))==null?void 0:t.length)>0){let e=[];return(s=Object.entries(l))==null||s.forEach(([r,n])=>{var a,f;let c=[];if(c.push(r),((a=Object.keys(n))==null?void 0:a.length)>0){let p=[];(f=Ce(n))==null||f.forEach(u=>{p.push(u)}),p==null||p.forEach(u=>{c.push(u)})}e.push(c)}),e}},Me=(l,t)=>{var e;let s=t;return Array.isArray(Object.keys(l))&&((e=Object.entries(l))==null||e.forEach(([r,n])=>{let c=[r];if(typeof n=="object"&&n!==null){let a=Ce(n);a==null||a.forEach(f=>{c.push(f)})}s.push(c)})),s},Qe=l=>{const t={};return l.forEach(e=>{const r=e.split("/");let n=t;r.forEach(c=>{n[c]||(n[c]={}),n=n[c]})}),Me(t,[])},ce=l=>Qe(l),Re=l=>{var t,s,e,r,n,c,a,f;try{const p=ee((s=(t=o.cloneDeep(l))==null?void 0:t.replace("(","("))==null?void 0:s.replace(")",")")),u=(r=(e=o.cloneDeep(p))==null?void 0:e.filter(h=>!h.includes("/*")))==null?void 0:r.map(h=>Pe(h)),d=qe(u),k=[];if(((n=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="Menus"))==null?void 0:n.value.length)===0)return!1;(c=o.cloneDeep(d))==null||c.forEach(h=>{var j,b,$,i,y;E!=null&&E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})?k.push({comp:((j=E==null?void 0:E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:j.value)??"",name:(b=h==null?void 0:h.value)==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]}):N!=null&&N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})&&((k==null?void 0:k.length)===0&&($=h.key)!=null&&$.includes("Menus")&&k.push({comp:"Menu",name:"",compData:[]}),(i=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&i.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(y=N==null?void 0:N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:y.value,contents:h==null?void 0:h.value}))});let A=(a=o.cloneDeep(k))==null?void 0:a.map(h=>{var j;return h!=null&&h.compData&&(h.compData=(j=h==null?void 0:h.compData)==null?void 0:j.map(b=>{var $,i,y,m,g,T,F,I,P,G,W;if((b==null?void 0:b.key)==="formFlex")b.contents=((i=($=b.contents)==null?void 0:$.replace(/[’]|[‘]|[']/g,""))==null?void 0:i.toUpperCase())!=="Vertical".toUpperCase();else if((b==null?void 0:b.key)==="groupContents")b.contents=(y=o.cloneDeep(b.contents))==null?void 0:y.map(L=>_e(o.cloneDeep(L)));else if(Array.isArray(b==null?void 0:b.contents))b.contents=ce(b.contents);else if(((g=(m=b==null?void 0:b.contents)==null?void 0:m.trim())!=null&&g.startsWith("[")||(F=(T=b.contents)==null?void 0:T.trim())!=null&&F.startsWith("【"))&&((P=(I=b.contents)==null?void 0:I.trim())!=null&&P.endsWith("]")||(W=(G=b.contents)==null?void 0:G.trim())!=null&&W.endsWith("】")))b.contents=ze(o.cloneDeep(b.contents));else{if(!b.contents)return;b.contents=De(o.cloneDeep(b.contents))}return b})),h});return A=(f=o.cloneDeep(A))==null?void 0:f.map(h=>{var j;return(h==null?void 0:h.comp)==="Group"&&(h.compData=(j=h.compData)==null?void 0:j.map(b=>{var i;let $=[];return(i=b.contents)==null||i.forEach(y=>{var m,g,T,F,I,P,G,W,L,x,O,C;if(E!=null&&E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))$.push({comp:(m=E==null?void 0:E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:m.value,name:(T=(g=Object.values(y))==null?void 0:g[0])==null?void 0:T.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(N!=null&&N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())})){if(($==null?void 0:$.length)===0)return;(F=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&F.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(I=N==null?void 0:N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:I.value,contents:(P=Object.values(y))==null?void 0:P[0]})}else if((W=(G=Object.keys(y))==null?void 0:G[0])!=null&&W.includes("$")){const D=(x=(L=Object.keys(o.cloneDeep(y)))==null?void 0:L[0])==null?void 0:x.split("$");$[($==null?void 0:$.length)-1].compData.push({key:(O=N==null?void 0:N.find(J=>{var U,S;return((U=J==null?void 0:J.key)==null?void 0:U.toUpperCase())===((S=D==null?void 0:D[0])==null?void 0:S.toUpperCase())}))==null?void 0:O.value,contents:(C=Object.values(y))==null?void 0:C[0],selectLabel:D==null?void 0:D[1]})}return y}),b.contents=$,b})),h}),A}catch{return!1}},de=Q.ref(0),Oe=l=>{const t=[];let s=null;for(let e=0;e<l.length;e++){const r=l[e];if(Array.isArray(r))s&&(s.children=Oe(r));else{const n={label:r};t.push(n),s=n}}return t},Te=l=>{let t=0;for(const s of l)t++,s.children&&(t+=Te(s.children));return t},xe=(l,t,s=[])=>{let e=0;for(const r of t){if(e>=l.length)break;const n=[...l[e]];if(s.push(n),e++,r.children&&r.children.length>0){const c=[];xe(l.slice(e),r.children,c),c.length>0&&(n.push(c),e+=Te(r.children))}}return s},Xe=(l,t)=>{let s=[];return l==null||l.forEach(r=>{r.some(n=>Array.isArray(n))?s.push(...r):s.push(r)}),xe(s,t)},ne=l=>{const t={label:l[0].trim()};if(l.length>1){const s=l.slice(1);s.length===1&&Array.isArray(s[0])?t.children=s[0].map(e=>Array.isArray(e)?ne(e):{label:e.trim()}):t.children=s.map(e=>Array.isArray(e)?ne(e):{label:e.trim()})}return t},ke=l=>{let t=l.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return t=t.replace(/:}(?=,|]|}|$)/g,':""}'),t=t.replace(/:,(?=\s*")/g,':"",'),t=t.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(s,e,r)=>`"${e}://${r}"`),t=t.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),t},Ye=l=>{var s;return l.some(e=>!Array.isArray(e))?l:(s=o.cloneDeep(l))==null?void 0:s.map(e=>{let r=[];return e.some(n=>Array.isArray(n))?e==null||e.forEach(n=>{Array.isArray(n)&&r.push(ne(n))}):e.some(n=>n.includes("["))?r.push(e):r=e.map(n=>({label:n.trim()})),r})},Je=(l,t,s)=>{let e=l,r=s,n=t;return n.children&&(Array.isArray(r[r.length-1])?r[r.length-1].push(e[0]):r.push(e[0]),e.shift(),n=n.children),Array.isArray(n)&&n.forEach(c=>{if(c.children){const a=Je(e,c,r);r=a[0],e=a[1]}}),[r,e]},Ke=(l,t)=>{let s=l,e=[];return t.length>0?t==null||t.forEach(r=>{let n=s==null?void 0:s[0];s.shift();const c=Je(o.cloneDeep(s),r,n);n=c[0],s=c[1],e.push(n)}):e=s,e},ae=(l,t)=>{const s=Ye(o.cloneDeep(l));return Ke(s,t)},Ve=l=>{const t=[];let s=0;const e=l.length;for(;s<e;){const r=l[s];r.key==="tableColumns"&&s+1<e&&l[s+1].key==="tableContents"?(t.push({comp:"Table",compData:[r,l[s+1]],name:""}),s+=2):(t.push(r),s+=1)}return t},Ne=l=>ae([l],[]),v=l=>{const t=[];return l==null||l.forEach(s=>s==null?void 0:s.forEach(r=>{var n,c;de.value++,t.push({id:de.value,key:(n=Object.keys(r))==null?void 0:n[0],value:(c=Object.values(r))==null?void 0:c[0],width:s.length})})),t},ge=l=>{let t=Ve(l);return t=t==null?void 0:t.map(s=>{var e,r,n,c;if(s.comp==="Table")(e=s.compData)!=null&&e.find(a=>(a==null?void 0:a.key)==="header")||(s.compData=(r=s.compData)==null?void 0:r.map(a=>(a.key==="tableColumns"?a={key:"header",contents:ae(a.value,[])}:a={key:a.key,contents:a.value},a)),s.compData.push({key:"extraButton",contents:[{label:"新增"}]}),s.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(s.key==="form"){const a=(n=s==null?void 0:s.value)==null?void 0:n.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)}],name:""}}else if(s.key==="formTop"){const a=(c=s==null?void 0:s.value)==null?void 0:c.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return s}),t},we=(l,t)=>{var a,f,p,u,d,k;const s=[],e=Oe((f=(a=l==null?void 0:l.find(A=>A.key==="tableIndex"))==null?void 0:a.value)==null?void 0:f[0]);s.push({key:"tableIndexColumn",contents:t}),s.push({key:"tableIndex",contents:e});let r=[];const n=(p=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:p.value;n.length===1&&!(n!=null&&n[0].some(A=>Array.isArray(A)))?r=(u=n==null?void 0:n[0])==null?void 0:u.map(A=>({label:A})):r=ae((d=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:d.value,e),s.push({key:"header",contents:r});const c=Xe((k=l==null?void 0:l.find(A=>A.key==="tableContents"))==null?void 0:k.value,e);return s.push({key:"tableContents",contents:c}),s.push({key:"extraButton",contents:[{label:"新增"}]}),s.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),s},Ee=l=>l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(t,s,e)=>{const r=Ee(e);return`"${s}",${r}`}),Y=l=>{const t=l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ee(t).replace(/^"(.*)"$/,"$1")},ve=l=>{const t=new Set;return l.filter(s=>{const e=JSON.stringify(s);return t.has(e)?!1:t.add(e)})},be=l=>{var s;let t=[];return(s=o.cloneDeep(l))==null||s.forEach(e=>{var r;(r=e.contents)==null||r.forEach(n=>{t.push(n)})}),t=ve(t),t.push({label:"操作"}),[t]},el=(l,t)=>l.reduce((s,e,r)=>{const n=Math.floor(r/t);return s[n]||(s[n]=[]),s[n].push(e),s},[]),je=l=>l.reduce((t,s)=>s.children&&s.children.length>0?t+je(s.children):t+1,0),ll=(l,t)=>{var e;let s=[];return(e=el(l,je(t==null?void 0:t[0])-1))==null||e.forEach(r=>{let n=[];r.forEach(c=>{var a;Array.isArray(c.contents)?(a=c.contents)==null||a.forEach(f=>{n.push(f)}):n.push(c.contents)}),s.push(n)}),[s]},sl=["方法体","输入","输出"],$e=Q.ref(1),ee=l=>{let t;l.replaceAll(" ",`\r
2
2
  `).includes(`\r
3
3
  `)?t=l.replaceAll(" ",`\r
4
4
  `).split(`\r
@@ -1,4 +1,4 @@
1
- import { a7 as A, a8 as l, f as re, a4 as ye, a9 as de, a5 as h, aa as w, ab as Te, i as I, ac as P, ad as v, a3 as je, ae as T, S as D } from "./index-CSMb6JUa.js";
1
+ import { a7 as A, a8 as l, f as re, a4 as ye, a9 as de, a5 as h, aa as w, ab as Te, i as I, ac as P, ad as v, a3 as je, ae as T, S as D } from "./index-CbexiBQe.js";
2
2
  var O = A(l, "WeakMap"), F = Object.create, $e = /* @__PURE__ */ function() {
3
3
  function e() {
4
4
  }
@@ -1 +1 @@
1
- "use strict";const n=require("./index-BlnkYO02.cjs");var A=n.getNative(n.root,"WeakMap"),x=Object.create,ge=function(){function e(){}return function(t){if(!n.isObject(t))return{};if(x)return x(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),h=function(){try{var e=n.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}();function be(e,t){for(var r=-1,a=e==null?0:e.length;++r<a&&t(e[r],r,e)!==!1;);return e}var pe=9007199254740991,ye=/^(?:0|[1-9]\d*)$/;function Y(e,t){var r=typeof e;return t=t??pe,!!t&&(r=="number"||r!="symbol"&&ye.test(e))&&e>-1&&e%1==0&&e<t}function Te(e,t,r){t=="__proto__"&&h?h(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var le=Object.prototype,je=le.hasOwnProperty;function H(e,t,r){var a=e[t];(!(je.call(e,t)&&n.eq(a,r))||r===void 0&&!(t in e))&&Te(e,t,r)}var de=9007199254740991;function _(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=de}function $e(e){return e!=null&&_(e.length)&&!n.isFunction$1(e)}var Ae=Object.prototype;function Z(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ae;return e===r}function he(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var ve="[object Arguments]";function C(e){return n.isObjectLike(e)&&n.baseGetTag(e)==ve}var J=Object.prototype,we=J.hasOwnProperty,me=J.propertyIsEnumerable,Q=C(function(){return arguments}())?C:function(e){return n.isObjectLike(e)&&we.call(e,"callee")&&!me.call(e,"callee")};function Oe(){return!1}var ee=typeof exports=="object"&&exports&&!exports.nodeType&&exports,B=ee&&typeof module=="object"&&module&&!module.nodeType&&module,_e=B&&B.exports===ee,L=_e?n.root.Buffer:void 0,Se=L?L.isBuffer:void 0,S=Se||Oe,Pe="[object Arguments]",Ee="[object Array]",Ie="[object Boolean]",Me="[object Date]",xe="[object Error]",Ce="[object Function]",Be="[object Map]",Le="[object Number]",Ue="[object Object]",De="[object RegExp]",Fe="[object Set]",Ge="[object String]",Ne="[object WeakMap]",Ve="[object ArrayBuffer]",Re="[object DataView]",ze="[object Float32Array]",Ke="[object Float64Array]",We="[object Int8Array]",qe="[object Int16Array]",ke="[object Int32Array]",Xe="[object Uint8Array]",Ye="[object Uint8ClampedArray]",He="[object Uint16Array]",Ze="[object Uint32Array]",i={};i[ze]=i[Ke]=i[We]=i[qe]=i[ke]=i[Xe]=i[Ye]=i[He]=i[Ze]=!0;i[Pe]=i[Ee]=i[Ve]=i[Ie]=i[Re]=i[Me]=i[xe]=i[Ce]=i[Be]=i[Le]=i[Ue]=i[De]=i[Fe]=i[Ge]=i[Ne]=!1;function Je(e){return n.isObjectLike(e)&&_(e.length)&&!!i[n.baseGetTag(e)]}function P(e){return function(t){return e(t)}}var te=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j=te&&typeof module=="object"&&module&&!module.nodeType&&module,Qe=j&&j.exports===te,$=Qe&&n.freeGlobal.process,l=function(){try{var e=j&&j.require&&j.require("util").types;return e||$&&$.binding&&$.binding("util")}catch{}}(),U=l&&l.isTypedArray,re=U?P(U):Je,et=Object.prototype,tt=et.hasOwnProperty;function rt(e,t){var r=n.isArray(e),a=!r&&Q(e),f=!r&&!a&&S(e),s=!r&&!a&&!f&&re(e),c=r||a||f||s,T=c?he(e.length,String):[],g=T.length;for(var u in e)tt.call(e,u)&&!(c&&(u=="length"||f&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Y(u,g)))&&T.push(u);return T}function ne(e,t){return function(r){return e(t(r))}}var nt=ne(Object.keys,Object),at=Object.prototype,ot=at.hasOwnProperty;function it(e){if(!Z(e))return nt(e);var t=[];for(var r in Object(e))ot.call(e,r)&&r!="constructor"&&t.push(r);return t}function ct(e){return $e(e)?rt(e):it(e)}function ae(e,t){for(var r=-1,a=t.length,f=e.length;++r<a;)e[f+r]=t[r];return e}var st=ne(Object.getPrototypeOf,Object);function ut(){this.__data__=new n.ListCache,this.size=0}function ft(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function gt(e){return this.__data__.get(e)}function bt(e){return this.__data__.has(e)}var pt=200;function yt(e,t){var r=this.__data__;if(r instanceof n.ListCache){var a=r.__data__;if(!n.Map||a.length<pt-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new n.MapCache(a)}return r.set(e,t),this.size=r.size,this}function y(e){var t=this.__data__=new n.ListCache(e);this.size=t.size}y.prototype.clear=ut;y.prototype.delete=ft;y.prototype.get=gt;y.prototype.has=bt;y.prototype.set=yt;var oe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D=oe&&typeof module=="object"&&module&&!module.nodeType&&module,Tt=D&&D.exports===oe,F=Tt?n.root.Buffer:void 0;F&&F.allocUnsafe;function lt(e,t){return e.slice()}function jt(e,t){for(var r=-1,a=e==null?0:e.length,f=0,s=[];++r<a;){var c=e[r];t(c,r,e)&&(s[f++]=c)}return s}function dt(){return[]}var $t=Object.prototype,At=$t.propertyIsEnumerable,G=Object.getOwnPropertySymbols,ht=G?function(e){return e==null?[]:(e=Object(e),jt(G(e),function(t){return At.call(e,t)}))}:dt;function vt(e,t,r){var a=t(e);return n.isArray(e)?a:ae(a,r(e))}function ie(e){return vt(e,ct,ht)}var v=n.getNative(n.root,"DataView"),w=n.getNative(n.root,"Promise"),m=n.getNative(n.root,"Set"),N="[object Map]",wt="[object Object]",V="[object Promise]",R="[object Set]",z="[object WeakMap]",K="[object DataView]",mt=n.toSource(v),Ot=n.toSource(n.Map),_t=n.toSource(w),St=n.toSource(m),Pt=n.toSource(A);exports.getTag=n.baseGetTag;(v&&exports.getTag(new v(new ArrayBuffer(1)))!=K||n.Map&&exports.getTag(new n.Map)!=N||w&&exports.getTag(w.resolve())!=V||m&&exports.getTag(new m)!=R||A&&exports.getTag(new A)!=z)&&(exports.getTag=function(e){var t=n.baseGetTag(e),r=t==wt?e.constructor:void 0,a=r?n.toSource(r):"";if(a)switch(a){case mt:return K;case Ot:return N;case _t:return V;case St:return R;case Pt:return z}return t});var Et=Object.prototype,It=Et.hasOwnProperty;function Mt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&It.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var O=n.root.Uint8Array;function E(e){var t=new e.constructor(e.byteLength);return new O(t).set(new O(e)),t}function xt(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Ct=/\w*$/;function Bt(e){var t=new e.constructor(e.source,Ct.exec(e));return t.lastIndex=e.lastIndex,t}var W=n.Symbol?n.Symbol.prototype:void 0,q=W?W.valueOf:void 0;function Lt(e){return q?Object(q.call(e)):{}}function Ut(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var Dt="[object Boolean]",Ft="[object Date]",Gt="[object Map]",Nt="[object Number]",Vt="[object RegExp]",Rt="[object Set]",zt="[object String]",Kt="[object Symbol]",Wt="[object ArrayBuffer]",qt="[object DataView]",kt="[object Float32Array]",Xt="[object Float64Array]",Yt="[object Int8Array]",Ht="[object Int16Array]",Zt="[object Int32Array]",Jt="[object Uint8Array]",Qt="[object Uint8ClampedArray]",er="[object Uint16Array]",tr="[object Uint32Array]";function rr(e,t,r){var a=e.constructor;switch(t){case Wt:return E(e);case Dt:case Ft:return new a(+e);case qt:return xt(e);case kt:case Xt:case Yt:case Ht:case Zt:case Jt:case Qt:case er:case tr:return Ut(e);case Gt:return new a;case Nt:case zt:return new a(e);case Vt:return Bt(e);case Rt:return new a;case Kt:return Lt(e)}}function nr(e){return typeof e.constructor=="function"&&!Z(e)?ge(st(e)):{}}var ar="[object Map]";function or(e){return n.isObjectLike(e)&&exports.getTag(e)==ar}var k=l&&l.isMap,ir=k?P(k):or,cr="[object Set]";function sr(e){return n.isObjectLike(e)&&exports.getTag(e)==cr}var X=l&&l.isSet,ur=X?P(X):sr,ce="[object Arguments]",fr="[object Array]",gr="[object Boolean]",br="[object Date]",pr="[object Error]",se="[object Function]",yr="[object GeneratorFunction]",Tr="[object Map]",lr="[object Number]",ue="[object Object]",jr="[object RegExp]",dr="[object Set]",$r="[object String]",Ar="[object Symbol]",hr="[object WeakMap]",vr="[object ArrayBuffer]",wr="[object DataView]",mr="[object Float32Array]",Or="[object Float64Array]",_r="[object Int8Array]",Sr="[object Int16Array]",Pr="[object Int32Array]",Er="[object Uint8Array]",Ir="[object Uint8ClampedArray]",Mr="[object Uint16Array]",xr="[object Uint32Array]",o={};o[ce]=o[fr]=o[vr]=o[wr]=o[gr]=o[br]=o[mr]=o[Or]=o[_r]=o[Sr]=o[Pr]=o[Tr]=o[lr]=o[ue]=o[jr]=o[dr]=o[$r]=o[Ar]=o[Er]=o[Ir]=o[Mr]=o[xr]=!0;o[pr]=o[se]=o[hr]=!1;function d(e,t,r,a,f,s){var c;if(c!==void 0)return c;if(!n.isObject(e))return e;var T=n.isArray(e);if(T)c=Mt(e);else{var g=exports.getTag(e),u=g==se||g==yr;if(S(e))return lt(e);if(g==ue||g==ce||u&&!f)c=u?{}:nr(e);else{if(!o[g])return f?e:{};c=rr(e,g)}}s||(s=new y);var I=s.get(e);if(I)return I;s.set(e,c),ur(e)?e.forEach(function(b){c.add(d(b,t,r,b,e,s))}):ir(e)&&e.forEach(function(b,p){c.set(p,d(b,t,r,p,e,s))});var fe=ie,M=T?void 0:fe(e);return be(M||e,function(b,p){M&&(p=b,b=e[p]),H(c,p,d(b,t,r,p,e,s))}),c}var Cr=1,Br=4;function Lr(e){return d(e,Cr|Br)}exports.Stack=y;exports.Uint8Array=O;exports.arrayPush=ae;exports.assignValue=H;exports.cloneDeep=Lr;exports.defineProperty=h;exports.getAllKeys=ie;exports.isArguments=Q;exports.isBuffer=S;exports.isIndex=Y;exports.isLength=_;exports.isTypedArray=re;
1
+ "use strict";const n=require("./index-eJgzaacx.cjs");var A=n.getNative(n.root,"WeakMap"),x=Object.create,ge=function(){function e(){}return function(t){if(!n.isObject(t))return{};if(x)return x(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),h=function(){try{var e=n.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}();function be(e,t){for(var r=-1,a=e==null?0:e.length;++r<a&&t(e[r],r,e)!==!1;);return e}var pe=9007199254740991,ye=/^(?:0|[1-9]\d*)$/;function Y(e,t){var r=typeof e;return t=t??pe,!!t&&(r=="number"||r!="symbol"&&ye.test(e))&&e>-1&&e%1==0&&e<t}function Te(e,t,r){t=="__proto__"&&h?h(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var le=Object.prototype,je=le.hasOwnProperty;function H(e,t,r){var a=e[t];(!(je.call(e,t)&&n.eq(a,r))||r===void 0&&!(t in e))&&Te(e,t,r)}var de=9007199254740991;function _(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=de}function $e(e){return e!=null&&_(e.length)&&!n.isFunction$1(e)}var Ae=Object.prototype;function Z(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ae;return e===r}function he(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var ve="[object Arguments]";function C(e){return n.isObjectLike(e)&&n.baseGetTag(e)==ve}var J=Object.prototype,we=J.hasOwnProperty,me=J.propertyIsEnumerable,Q=C(function(){return arguments}())?C:function(e){return n.isObjectLike(e)&&we.call(e,"callee")&&!me.call(e,"callee")};function Oe(){return!1}var ee=typeof exports=="object"&&exports&&!exports.nodeType&&exports,B=ee&&typeof module=="object"&&module&&!module.nodeType&&module,_e=B&&B.exports===ee,L=_e?n.root.Buffer:void 0,Se=L?L.isBuffer:void 0,S=Se||Oe,Pe="[object Arguments]",Ee="[object Array]",Ie="[object Boolean]",Me="[object Date]",xe="[object Error]",Ce="[object Function]",Be="[object Map]",Le="[object Number]",Ue="[object Object]",De="[object RegExp]",Fe="[object Set]",Ge="[object String]",Ne="[object WeakMap]",Ve="[object ArrayBuffer]",Re="[object DataView]",ze="[object Float32Array]",Ke="[object Float64Array]",We="[object Int8Array]",qe="[object Int16Array]",ke="[object Int32Array]",Xe="[object Uint8Array]",Ye="[object Uint8ClampedArray]",He="[object Uint16Array]",Ze="[object Uint32Array]",i={};i[ze]=i[Ke]=i[We]=i[qe]=i[ke]=i[Xe]=i[Ye]=i[He]=i[Ze]=!0;i[Pe]=i[Ee]=i[Ve]=i[Ie]=i[Re]=i[Me]=i[xe]=i[Ce]=i[Be]=i[Le]=i[Ue]=i[De]=i[Fe]=i[Ge]=i[Ne]=!1;function Je(e){return n.isObjectLike(e)&&_(e.length)&&!!i[n.baseGetTag(e)]}function P(e){return function(t){return e(t)}}var te=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j=te&&typeof module=="object"&&module&&!module.nodeType&&module,Qe=j&&j.exports===te,$=Qe&&n.freeGlobal.process,l=function(){try{var e=j&&j.require&&j.require("util").types;return e||$&&$.binding&&$.binding("util")}catch{}}(),U=l&&l.isTypedArray,re=U?P(U):Je,et=Object.prototype,tt=et.hasOwnProperty;function rt(e,t){var r=n.isArray(e),a=!r&&Q(e),f=!r&&!a&&S(e),s=!r&&!a&&!f&&re(e),c=r||a||f||s,T=c?he(e.length,String):[],g=T.length;for(var u in e)tt.call(e,u)&&!(c&&(u=="length"||f&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Y(u,g)))&&T.push(u);return T}function ne(e,t){return function(r){return e(t(r))}}var nt=ne(Object.keys,Object),at=Object.prototype,ot=at.hasOwnProperty;function it(e){if(!Z(e))return nt(e);var t=[];for(var r in Object(e))ot.call(e,r)&&r!="constructor"&&t.push(r);return t}function ct(e){return $e(e)?rt(e):it(e)}function ae(e,t){for(var r=-1,a=t.length,f=e.length;++r<a;)e[f+r]=t[r];return e}var st=ne(Object.getPrototypeOf,Object);function ut(){this.__data__=new n.ListCache,this.size=0}function ft(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function gt(e){return this.__data__.get(e)}function bt(e){return this.__data__.has(e)}var pt=200;function yt(e,t){var r=this.__data__;if(r instanceof n.ListCache){var a=r.__data__;if(!n.Map||a.length<pt-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new n.MapCache(a)}return r.set(e,t),this.size=r.size,this}function y(e){var t=this.__data__=new n.ListCache(e);this.size=t.size}y.prototype.clear=ut;y.prototype.delete=ft;y.prototype.get=gt;y.prototype.has=bt;y.prototype.set=yt;var oe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D=oe&&typeof module=="object"&&module&&!module.nodeType&&module,Tt=D&&D.exports===oe,F=Tt?n.root.Buffer:void 0;F&&F.allocUnsafe;function lt(e,t){return e.slice()}function jt(e,t){for(var r=-1,a=e==null?0:e.length,f=0,s=[];++r<a;){var c=e[r];t(c,r,e)&&(s[f++]=c)}return s}function dt(){return[]}var $t=Object.prototype,At=$t.propertyIsEnumerable,G=Object.getOwnPropertySymbols,ht=G?function(e){return e==null?[]:(e=Object(e),jt(G(e),function(t){return At.call(e,t)}))}:dt;function vt(e,t,r){var a=t(e);return n.isArray(e)?a:ae(a,r(e))}function ie(e){return vt(e,ct,ht)}var v=n.getNative(n.root,"DataView"),w=n.getNative(n.root,"Promise"),m=n.getNative(n.root,"Set"),N="[object Map]",wt="[object Object]",V="[object Promise]",R="[object Set]",z="[object WeakMap]",K="[object DataView]",mt=n.toSource(v),Ot=n.toSource(n.Map),_t=n.toSource(w),St=n.toSource(m),Pt=n.toSource(A);exports.getTag=n.baseGetTag;(v&&exports.getTag(new v(new ArrayBuffer(1)))!=K||n.Map&&exports.getTag(new n.Map)!=N||w&&exports.getTag(w.resolve())!=V||m&&exports.getTag(new m)!=R||A&&exports.getTag(new A)!=z)&&(exports.getTag=function(e){var t=n.baseGetTag(e),r=t==wt?e.constructor:void 0,a=r?n.toSource(r):"";if(a)switch(a){case mt:return K;case Ot:return N;case _t:return V;case St:return R;case Pt:return z}return t});var Et=Object.prototype,It=Et.hasOwnProperty;function Mt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&It.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var O=n.root.Uint8Array;function E(e){var t=new e.constructor(e.byteLength);return new O(t).set(new O(e)),t}function xt(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Ct=/\w*$/;function Bt(e){var t=new e.constructor(e.source,Ct.exec(e));return t.lastIndex=e.lastIndex,t}var W=n.Symbol?n.Symbol.prototype:void 0,q=W?W.valueOf:void 0;function Lt(e){return q?Object(q.call(e)):{}}function Ut(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var Dt="[object Boolean]",Ft="[object Date]",Gt="[object Map]",Nt="[object Number]",Vt="[object RegExp]",Rt="[object Set]",zt="[object String]",Kt="[object Symbol]",Wt="[object ArrayBuffer]",qt="[object DataView]",kt="[object Float32Array]",Xt="[object Float64Array]",Yt="[object Int8Array]",Ht="[object Int16Array]",Zt="[object Int32Array]",Jt="[object Uint8Array]",Qt="[object Uint8ClampedArray]",er="[object Uint16Array]",tr="[object Uint32Array]";function rr(e,t,r){var a=e.constructor;switch(t){case Wt:return E(e);case Dt:case Ft:return new a(+e);case qt:return xt(e);case kt:case Xt:case Yt:case Ht:case Zt:case Jt:case Qt:case er:case tr:return Ut(e);case Gt:return new a;case Nt:case zt:return new a(e);case Vt:return Bt(e);case Rt:return new a;case Kt:return Lt(e)}}function nr(e){return typeof e.constructor=="function"&&!Z(e)?ge(st(e)):{}}var ar="[object Map]";function or(e){return n.isObjectLike(e)&&exports.getTag(e)==ar}var k=l&&l.isMap,ir=k?P(k):or,cr="[object Set]";function sr(e){return n.isObjectLike(e)&&exports.getTag(e)==cr}var X=l&&l.isSet,ur=X?P(X):sr,ce="[object Arguments]",fr="[object Array]",gr="[object Boolean]",br="[object Date]",pr="[object Error]",se="[object Function]",yr="[object GeneratorFunction]",Tr="[object Map]",lr="[object Number]",ue="[object Object]",jr="[object RegExp]",dr="[object Set]",$r="[object String]",Ar="[object Symbol]",hr="[object WeakMap]",vr="[object ArrayBuffer]",wr="[object DataView]",mr="[object Float32Array]",Or="[object Float64Array]",_r="[object Int8Array]",Sr="[object Int16Array]",Pr="[object Int32Array]",Er="[object Uint8Array]",Ir="[object Uint8ClampedArray]",Mr="[object Uint16Array]",xr="[object Uint32Array]",o={};o[ce]=o[fr]=o[vr]=o[wr]=o[gr]=o[br]=o[mr]=o[Or]=o[_r]=o[Sr]=o[Pr]=o[Tr]=o[lr]=o[ue]=o[jr]=o[dr]=o[$r]=o[Ar]=o[Er]=o[Ir]=o[Mr]=o[xr]=!0;o[pr]=o[se]=o[hr]=!1;function d(e,t,r,a,f,s){var c;if(c!==void 0)return c;if(!n.isObject(e))return e;var T=n.isArray(e);if(T)c=Mt(e);else{var g=exports.getTag(e),u=g==se||g==yr;if(S(e))return lt(e);if(g==ue||g==ce||u&&!f)c=u?{}:nr(e);else{if(!o[g])return f?e:{};c=rr(e,g)}}s||(s=new y);var I=s.get(e);if(I)return I;s.set(e,c),ur(e)?e.forEach(function(b){c.add(d(b,t,r,b,e,s))}):ir(e)&&e.forEach(function(b,p){c.set(p,d(b,t,r,p,e,s))});var fe=ie,M=T?void 0:fe(e);return be(M||e,function(b,p){M&&(p=b,b=e[p]),H(c,p,d(b,t,r,p,e,s))}),c}var Cr=1,Br=4;function Lr(e){return d(e,Cr|Br)}exports.Stack=y;exports.Uint8Array=O;exports.arrayPush=ae;exports.assignValue=H;exports.cloneDeep=Lr;exports.defineProperty=h;exports.getAllKeys=ie;exports.isArguments=Q;exports.isBuffer=S;exports.isIndex=Y;exports.isLength=_;exports.isTypedArray=re;
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),dt=require("./index-BgOykyF1.cjs"),Ft=require("./index-wJlCuDLQ.cjs"),Je=require("./index-B9u5T6Jx.cjs"),r=require("./index-D2bZ9sIF.cjs"),pe=require("./menu-DQN34Kz_.cjs"),zn=require("./index-Dpt4c5d2.cjs"),he=require("./index.vue_vue_type_style_index_0_scoped_63a4bd9d_lang-Sm4RXYda.cjs"),bt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),gt=require("./array-_-oOMLLg.cjs"),dn=require("./login-DhrP4Uu5.cjs"),ft=require("./index-BpPyaNFa.cjs"),un=require("./index-eJgzaacx.cjs"),mt=require("./cloneDeep-q1KhEZrF.cjs"),jt=require("./index-C8bF8ful.cjs"),Qt=require("./index-OOftrl9c.cjs"),en={type:"change"},Ot={type:"start"},hn={type:"end"},Nt=new r.Ray,tn=new r.Plane,Gn=Math.cos(70*r.MathUtils.DEG2RAD),Fe=new r.Vector3,He=2*Math.PI,xe={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Lt=1e-6;class qn extends r.Controls{constructor(o,l=null){super(o,l),this.state=xe.NONE,this.target=new r.Vector3,this.cursor=new r.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:r.MOUSE.ROTATE,MIDDLE:r.MOUSE.DOLLY,RIGHT:r.MOUSE.PAN},this.touches={ONE:r.TOUCH.ROTATE,TWO:r.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 r.Vector3,this._lastQuaternion=new r.Quaternion,this._lastTargetPosition=new r.Vector3,this._quat=new r.Quaternion().setFromUnitVectors(o.up,new r.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new r.Spherical,this._sphericalDelta=new r.Spherical,this._scale=1,this._panOffset=new r.Vector3,this._rotateStart=new r.Vector2,this._rotateEnd=new r.Vector2,this._rotateDelta=new r.Vector2,this._panStart=new r.Vector2,this._panEnd=new r.Vector2,this._panDelta=new r.Vector2,this._dollyStart=new r.Vector2,this._dollyEnd=new r.Vector2,this._dollyDelta=new r.Vector2,this._dollyDirection=new r.Vector3,this._mouse=new r.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=$n.bind(this),this._onPointerDown=Hn.bind(this),this._onPointerUp=Yn.bind(this),this._onContextMenu=eo.bind(this),this._onMouseWheel=Zn.bind(this),this._onKeyDown=Jn.bind(this),this._onTouchStart=Xn.bind(this),this._onTouchMove=Qn.bind(this),this._onMouseDown=Kn.bind(this),this._onMouseMove=Wn.bind(this),this._interceptControlDown=to.bind(this),this._interceptControlUp=no.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(o){super.connect(o),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(o){o.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=o}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(en),this.update(),this.state=xe.NONE}update(o=null){const l=this.object.position;Fe.copy(l).sub(this.target),Fe.applyQuaternion(this._quat),this._spherical.setFromVector3(Fe),this.autoRotate&&this.state===xe.NONE&&this._rotateLeft(this._getAutoRotationAngle(o)),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 d=this.minAzimuthAngle,u=this.maxAzimuthAngle;isFinite(d)&&isFinite(u)&&(d<-Math.PI?d+=He:d>Math.PI&&(d-=He),u<-Math.PI?u+=He:u>Math.PI&&(u-=He),d<=u?this._spherical.theta=Math.max(d,Math.min(u,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(d+u)/2?Math.max(d,this._spherical.theta):Math.min(u,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 c=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const v=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),c=v!=this._spherical.radius}if(Fe.setFromSpherical(this._spherical),Fe.applyQuaternion(this._quatInverse),l.copy(this.target).add(Fe),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 v=null;if(this.object.isPerspectiveCamera){const h=Fe.length();v=this._clampDistance(h*this._scale);const b=h-v;this.object.position.addScaledVector(this._dollyDirection,b),this.object.updateMatrixWorld(),c=!!b}else if(this.object.isOrthographicCamera){const h=new r.Vector3(this._mouse.x,this._mouse.y,0);h.unproject(this.object);const b=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),c=b!==this.object.zoom;const m=new r.Vector3(this._mouse.x,this._mouse.y,0);m.unproject(this.object),this.object.position.sub(m).add(h),this.object.updateMatrixWorld(),v=Fe.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;v!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(v).add(this.object.position):(Nt.origin.copy(this.object.position),Nt.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(Nt.direction))<Gn?this.object.lookAt(this.target):(tn.setFromNormalAndCoplanarPoint(this.object.up,this.target),Nt.intersectPlane(tn,this.target))))}else if(this.object.isOrthographicCamera){const v=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),v!==this.object.zoom&&(this.object.updateProjectionMatrix(),c=!0)}return this._scale=1,this._performCursorZoom=!1,c||this._lastPosition.distanceToSquared(this.object.position)>Lt||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Lt||this._lastTargetPosition.distanceToSquared(this.target)>Lt?(this.dispatchEvent(en),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(o){return o!==null?He/60*this.autoRotateSpeed*o:He/60/60*this.autoRotateSpeed}_getZoomScale(o){const l=Math.abs(o*.01);return Math.pow(.95,this.zoomSpeed*l)}_rotateLeft(o){this._sphericalDelta.theta-=o}_rotateUp(o){this._sphericalDelta.phi-=o}_panLeft(o,l){Fe.setFromMatrixColumn(l,0),Fe.multiplyScalar(-o),this._panOffset.add(Fe)}_panUp(o,l){this.screenSpacePanning===!0?Fe.setFromMatrixColumn(l,1):(Fe.setFromMatrixColumn(l,0),Fe.crossVectors(this.object.up,Fe)),Fe.multiplyScalar(o),this._panOffset.add(Fe)}_pan(o,l){const d=this.domElement;if(this.object.isPerspectiveCamera){const u=this.object.position;Fe.copy(u).sub(this.target);let c=Fe.length();c*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*o*c/d.clientHeight,this.object.matrix),this._panUp(2*l*c/d.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(o*(this.object.right-this.object.left)/this.object.zoom/d.clientWidth,this.object.matrix),this._panUp(l*(this.object.top-this.object.bottom)/this.object.zoom/d.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(o){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(o){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(o,l){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const d=this.domElement.getBoundingClientRect(),u=o-d.left,c=l-d.top,v=d.width,h=d.height;this._mouse.x=u/v*2-1,this._mouse.y=-(c/h)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(o){return Math.max(this.minDistance,Math.min(this.maxDistance,o))}_handleMouseDownRotate(o){this._rotateStart.set(o.clientX,o.clientY)}_handleMouseDownDolly(o){this._updateZoomParameters(o.clientX,o.clientX),this._dollyStart.set(o.clientX,o.clientY)}_handleMouseDownPan(o){this._panStart.set(o.clientX,o.clientY)}_handleMouseMoveRotate(o){this._rotateEnd.set(o.clientX,o.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const l=this.domElement;this._rotateLeft(He*this._rotateDelta.x/l.clientHeight),this._rotateUp(He*this._rotateDelta.y/l.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(o){this._dollyEnd.set(o.clientX,o.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(o){this._panEnd.set(o.clientX,o.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(o){this._updateZoomParameters(o.clientX,o.clientY),o.deltaY<0?this._dollyIn(this._getZoomScale(o.deltaY)):o.deltaY>0&&this._dollyOut(this._getZoomScale(o.deltaY)),this.update()}_handleKeyDown(o){let l=!1;switch(o.code){case this.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?this.enableRotate&&this._rotateUp(He*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),l=!0;break;case this.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?this.enableRotate&&this._rotateUp(-He*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),l=!0;break;case this.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?this.enableRotate&&this._rotateLeft(He*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),l=!0;break;case this.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?this.enableRotate&&this._rotateLeft(-He*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),l=!0;break}l&&(o.preventDefault(),this.update())}_handleTouchStartRotate(o){if(this._pointers.length===1)this._rotateStart.set(o.pageX,o.pageY);else{const l=this._getSecondPointerPosition(o),d=.5*(o.pageX+l.x),u=.5*(o.pageY+l.y);this._rotateStart.set(d,u)}}_handleTouchStartPan(o){if(this._pointers.length===1)this._panStart.set(o.pageX,o.pageY);else{const l=this._getSecondPointerPosition(o),d=.5*(o.pageX+l.x),u=.5*(o.pageY+l.y);this._panStart.set(d,u)}}_handleTouchStartDolly(o){const l=this._getSecondPointerPosition(o),d=o.pageX-l.x,u=o.pageY-l.y,c=Math.sqrt(d*d+u*u);this._dollyStart.set(0,c)}_handleTouchStartDollyPan(o){this.enableZoom&&this._handleTouchStartDolly(o),this.enablePan&&this._handleTouchStartPan(o)}_handleTouchStartDollyRotate(o){this.enableZoom&&this._handleTouchStartDolly(o),this.enableRotate&&this._handleTouchStartRotate(o)}_handleTouchMoveRotate(o){if(this._pointers.length==1)this._rotateEnd.set(o.pageX,o.pageY);else{const d=this._getSecondPointerPosition(o),u=.5*(o.pageX+d.x),c=.5*(o.pageY+d.y);this._rotateEnd.set(u,c)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const l=this.domElement;this._rotateLeft(He*this._rotateDelta.x/l.clientHeight),this._rotateUp(He*this._rotateDelta.y/l.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(o){if(this._pointers.length===1)this._panEnd.set(o.pageX,o.pageY);else{const l=this._getSecondPointerPosition(o),d=.5*(o.pageX+l.x),u=.5*(o.pageY+l.y);this._panEnd.set(d,u)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(o){const l=this._getSecondPointerPosition(o),d=o.pageX-l.x,u=o.pageY-l.y,c=Math.sqrt(d*d+u*u);this._dollyEnd.set(0,c),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 v=(o.pageX+l.x)*.5,h=(o.pageY+l.y)*.5;this._updateZoomParameters(v,h)}_handleTouchMoveDollyPan(o){this.enableZoom&&this._handleTouchMoveDolly(o),this.enablePan&&this._handleTouchMovePan(o)}_handleTouchMoveDollyRotate(o){this.enableZoom&&this._handleTouchMoveDolly(o),this.enableRotate&&this._handleTouchMoveRotate(o)}_addPointer(o){this._pointers.push(o.pointerId)}_removePointer(o){delete this._pointerPositions[o.pointerId];for(let l=0;l<this._pointers.length;l++)if(this._pointers[l]==o.pointerId){this._pointers.splice(l,1);return}}_isTrackingPointer(o){for(let l=0;l<this._pointers.length;l++)if(this._pointers[l]==o.pointerId)return!0;return!1}_trackPointer(o){let l=this._pointerPositions[o.pointerId];l===void 0&&(l=new r.Vector2,this._pointerPositions[o.pointerId]=l),l.set(o.pageX,o.pageY)}_getSecondPointerPosition(o){const l=o.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[l]}_customWheelEvent(o){const l=o.deltaMode,d={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(l){case 1:d.deltaY*=16;break;case 2:d.deltaY*=100;break}return o.ctrlKey&&!this._controlActive&&(d.deltaY*=10),d}}function Hn(M){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(M.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(M)&&(this._addPointer(M),M.pointerType==="touch"?this._onTouchStart(M):this._onMouseDown(M)))}function $n(M){this.enabled!==!1&&(M.pointerType==="touch"?this._onTouchMove(M):this._onMouseMove(M))}function Yn(M){switch(this._removePointer(M),this._pointers.length){case 0:this.domElement.releasePointerCapture(M.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(hn),this.state=xe.NONE;break;case 1:const o=this._pointers[0],l=this._pointerPositions[o];this._onTouchStart({pointerId:o,pageX:l.x,pageY:l.y});break}}function Kn(M){let o;switch(M.button){case 0:o=this.mouseButtons.LEFT;break;case 1:o=this.mouseButtons.MIDDLE;break;case 2:o=this.mouseButtons.RIGHT;break;default:o=-1}switch(o){case r.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(M),this.state=xe.DOLLY;break;case r.MOUSE.ROTATE:if(M.ctrlKey||M.metaKey||M.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(M),this.state=xe.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(M),this.state=xe.ROTATE}break;case r.MOUSE.PAN:if(M.ctrlKey||M.metaKey||M.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(M),this.state=xe.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(M),this.state=xe.PAN}break;default:this.state=xe.NONE}this.state!==xe.NONE&&this.dispatchEvent(Ot)}function Wn(M){switch(this.state){case xe.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(M);break;case xe.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(M);break;case xe.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(M);break}}function Zn(M){this.enabled===!1||this.enableZoom===!1||this.state!==xe.NONE||(M.preventDefault(),this.dispatchEvent(Ot),this._handleMouseWheel(this._customWheelEvent(M)),this.dispatchEvent(hn))}function Jn(M){this.enabled!==!1&&this._handleKeyDown(M)}function Xn(M){switch(this._trackPointer(M),this._pointers.length){case 1:switch(this.touches.ONE){case r.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(M),this.state=xe.TOUCH_ROTATE;break;case r.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(M),this.state=xe.TOUCH_PAN;break;default:this.state=xe.NONE}break;case 2:switch(this.touches.TWO){case r.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(M),this.state=xe.TOUCH_DOLLY_PAN;break;case r.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(M),this.state=xe.TOUCH_DOLLY_ROTATE;break;default:this.state=xe.NONE}break;default:this.state=xe.NONE}this.state!==xe.NONE&&this.dispatchEvent(Ot)}function Qn(M){switch(this._trackPointer(M),this.state){case xe.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(M),this.update();break;case xe.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(M),this.update();break;case xe.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(M),this.update();break;case xe.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(M),this.update();break;default:this.state=xe.NONE}}function eo(M){this.enabled!==!1&&M.preventDefault()}function to(M){M.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function no(M){M.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function oo(M){let o=null,l=null,d=null,u=null,c=null,v=null;const h=e.ref([]),b=e.ref(new r.Vector3),m=e.ref(new r.Vector3),L=()=>{if(!M.value)return;o=new r.Scene,o.background=new r.Color(16777215);const A=M.value;l=new r.PerspectiveCamera(75,A.clientWidth/A.clientHeight,.1,1e4),d=new r.WebGLRenderer({antialias:!0,alpha:!0}),d.setSize(A.clientWidth,A.clientHeight),d.localClippingEnabled=!0,d.shadowMap.enabled=!0,d.shadowMap.type=r.PCFSoftShadowMap,d.toneMapping=r.ACESFilmicToneMapping,d.toneMappingExposure=1,d.outputColorSpace=r.SRGBColorSpace,A.appendChild(d.domElement),u=new qn(l,d.domElement),u.enableDamping=!0,u.dampingFactor=.05,c=new r.Xe(l,d,{container:A,type:"cube",placement:"bottom-left",offset:{left:350,bottom:22},background:{color:"#D1D1D1"}}),c.attachControls(u),R(),O()},R=()=>{const A=new r.AmbientLight(4210752,.6);o.add(A);const _=new r.DirectionalLight(16777215,2);_.position.set(10,10,8),_.castShadow=!0,_.shadow.mapSize.width=2048,_.shadow.mapSize.height=2048,_.shadow.camera.near=.5,_.shadow.camera.far=50,o.add(_);const g=new r.DirectionalLight(16777215,.8);g.position.set(-8,-8,6),o.add(g);const j=new r.DirectionalLight(16777215,.6);j.position.set(0,-15,2),o.add(j);const S=new r.HemisphereLight(16777215,4473924,.8);o.add(S);const x=new r.PointLight(16777215,1,50);x.position.set(15,15,15),o.add(x);const Y=new r.PointLight(16777215,.5,50);Y.position.set(-15,-15,15),o.add(Y)},O=()=>{v=requestAnimationFrame(O),u&&u.update(),d&&o&&l&&d.render(o,l),c&&c.render()},N=A=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(g=>{A[g]&&A[g].dispose&&A[g].dispose()}),A.dispose&&A.dispose()},P=A=>{A.traverse(_=>{_.geometry&&_.geometry.dispose(),_.material&&(Array.isArray(_.material)?_.material.forEach(g=>{N(g)}):N(_.material))})};return{currentModels:h,initialCameraPosition:b,initialTargetPosition:m,initThreeJS:L,handleResize:()=>{if(!M.value||!l||!d||!c)return;const A=M.value,_=A.clientWidth,g=A.clientHeight;l.aspect=_/g,l.updateProjectionMatrix(),d.setSize(_,g),c.update()},fitCameraToAllModels:()=>{if(!l||!u||h.value.length===0)return;const A=new r.Box3;h.value.forEach(F=>{A.expandByObject(F)});const _=A.getSize(new r.Vector3),g=A.getCenter(new r.Vector3),S=Math.max(_.x,_.y,_.z)*.8,x=new r.Vector3(g.x+S,g.y+S,g.z+S),Y=g.clone();l.position.copy(x),l.lookAt(Y),u.target.copy(Y),u.update(),b.value.copy(x),m.value.copy(Y)},getThreeJSObjects:()=>({scene:o,camera:l,renderer:d,controls:u,gizmo:c}),clearAllModels:()=>{if(!o)return;h.value.forEach(_=>{o.remove(_),P(_)});const A=[];o.children.forEach(_=>{!_.isLight&&!_.isCamera&&A.push(_)}),A.forEach(_=>{o.remove(_),P(_)}),h.value=[]},cleanup:()=>{v&&cancelAnimationFrame(v),d&&d.dispose(),u&&u.dispose(),c&&c.dispose()}}}function so(M,o){const l=e.ref(!1);let d=null,u=12700,c=new r.Vector3,v=new r.Vector3,h=new r.Vector3,b=0,m=null;const L=y=>y<.5?4*y*y*y:1-Math.pow(-2*y+2,3)/2,R=y=>{const E=new r.Vector3,k=b*1.2,G=new r.Vector3(h.x+k,h.y,h.z),A=new r.Vector3(h.x,h.y+k,h.z),_=new r.Vector3(h.x,h.y-k,h.z);if(y<=.567){const j=y/.567*Math.PI*2;E.x=h.x+Math.cos(j)*k,E.z=h.z+Math.sin(j)*k,E.y=h.y}else if(y<=.724){const g=(y-.567)/.157,j=L(g);E.lerpVectors(G,A,j)}else if(y<=.881){const g=(y-.724)/.157,S=L(g)*Math.PI;E.x=h.x+Math.sin(S)*k,E.y=h.y+Math.cos(S)*k,E.z=h.z}else{const g=(y-.881)/.119,j=L(g);E.lerpVectors(_,c,j)}return E},O=()=>{const{camera:y,controls:E}=M();if(!y||!E)return;d||(d=Date.now());const k=Date.now()-d,G=Math.min(k/u,1);if(G>=1){P();return}const A=R(G);y.position.copy(A),y.lookAt(h),E.target.copy(h),m=requestAnimationFrame(O)},N=()=>{if(o.value.length===0)return;const{camera:y,controls:E}=M();if(!y||!E)return;c.copy(y.position),v.copy(E.target);const k=new r.Box3;o.value.forEach(x=>{k.expandByObject(x)});const G=k.getSize(new r.Vector3);h=k.getCenter(new r.Vector3),b=Math.max(G.x,G.y,G.z)*1.2;const A=new r.Vector3(h.x+b*1.2,h.y,h.z);E.enabled=!1;const _=y.position.clone(),g=1e3,j=Date.now(),S=()=>{const x=Date.now()-j,Y=Math.min(x/g,1),F=L(Y);y.position.lerpVectors(_,A,F),y.lookAt(h),E.target.copy(h),Y<1?requestAnimationFrame(S):(l.value=!0,d=null,O())};S()},P=()=>{l.value=!1,d=null,m&&(cancelAnimationFrame(m),m=null);const{controls:y}=M();y&&(y.enabled=!0,y.target.copy(v))};return{isAnimating:l,toggleAnimation:()=>{if(l.value){l.value=!1,d=null,m&&(cancelAnimationFrame(m),m=null);const{camera:y,controls:E}=M();if(!y||!E)return;E.enabled=!0;const k=y.position.clone(),G=E.target.clone(),A=1500,_=Date.now(),g=()=>{const j=Date.now()-_,S=Math.min(j/A,1),x=L(S);y.position.lerpVectors(k,c,x),E.target.lerpVectors(G,v,x),S<1&&requestAnimationFrame(g)};g()}else N()},startAnimation:N,stopAnimation:P}}function io(M,o){const l=e.ref(!1),d=e.ref("none");let u=[],c=[],v=new r.Box3,h=new r.Vector3;const b=()=>{u=[new r.Plane(new r.Vector3(1,0,0),0),new r.Plane(new r.Vector3(0,1,0),0),new r.Plane(new r.Vector3(0,0,1),0)]},m=()=>{v.makeEmpty(),o.value.forEach(T=>{v.expandByObject(T)}),h=v.getCenter(new r.Vector3)},L=T=>{const y=v.getSize(new r.Vector3);let E,k,G;T==="x"?(E=new r.PlaneGeometry(y.z*1.2,y.y*1.2),k=new r.Vector3(h.x,h.y,h.z),G=new r.Euler(0,Math.PI/2,0)):T==="y"?(E=new r.PlaneGeometry(y.x*1.2,y.z*1.2),k=new r.Vector3(h.x,h.y,h.z),G=new r.Euler(Math.PI/2,0,0)):T==="z"&&(E=new r.PlaneGeometry(y.x*1.2,y.y*1.2),k=new r.Vector3(h.x,h.y,h.z),G=new r.Euler(0,0,0));const A=new r.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:r.DoubleSide,depthWrite:!1}),_=new r.Mesh(E,A);return _.position.copy(k),_.rotation.copy(G),_},R=()=>{if(O(),N(),d.value==="none")return;m();let T=null;if(d.value==="x"?(u[0].constant=-h.x,T=u[0]):d.value==="y"?(u[1].constant=-h.y,T=u[1]):d.value==="z"&&(u[2].constant=-h.z,T=u[2]),T){o.value.forEach(E=>{E.traverse(k=>{k.isMesh&&k.material&&(Array.isArray(k.material)?k.material.forEach(G=>{G.clippingPlanes=[T]}):k.material.clippingPlanes=[T])})});const{scene:y}=M();if(y){const E=L(d.value);y.add(E),c.push(E)}}},O=()=>{o.value.forEach(T=>{T.traverse(y=>{y.isMesh&&y.material&&(Array.isArray(y.material)?y.material.forEach(E=>{E.clippingPlanes=[]}):y.material.clippingPlanes=[])})})},N=()=>{const{scene:T}=M();T&&c.forEach(y=>{T.remove(y),y.geometry.dispose(),y.material.dispose()}),c=[]};return{isClipping:l,activeClippingAxis:d,toggleClipping:()=>{l.value=!l.value,l.value?(b(),o.value.length>0&&m()):(d.value="none",O(),N())},updateClippingPlanes:R,clearClippingPlanes:O,clearClippingMeshes:N}}const ao=/^[og]\s*(.+)?/,ro=/^mtllib /,lo=/^usemtl /,co=/^usemap /,nn=/\s+/,on=new r.Vector3,Vt=new r.Vector3,sn=new r.Vector3,an=new r.Vector3,Ze=new r.Vector3,Tt=new r.Color;function uo(){const M={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(o,l){if(this.object&&this.object.fromDeclaration===!1){this.object.name=o,this.object.fromDeclaration=l!==!1;return}const d=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:o||"",fromDeclaration:l!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(u,c){const v=this._finalize(!1);v&&(v.inherited||v.groupCount<=0)&&this.materials.splice(v.index,1);const h={index:this.materials.length,name:u||"",mtllib:Array.isArray(c)&&c.length>0?c[c.length-1]:"",smooth:v!==void 0?v.smooth:this.smooth,groupStart:v!==void 0?v.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(b){const m={index:typeof b=="number"?b:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return m.clone=this.clone.bind(m),m}};return this.materials.push(h),h},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(u){const c=this.currentMaterial();if(c&&c.groupEnd===-1&&(c.groupEnd=this.geometry.vertices.length/3,c.groupCount=c.groupEnd-c.groupStart,c.inherited=!1),u&&this.materials.length>1)for(let v=this.materials.length-1;v>=0;v--)this.materials[v].groupCount<=0&&this.materials.splice(v,1);return u&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),c}},d&&d.name&&typeof d.clone=="function"){const u=d.clone(0);u.inherited=!0,this.object.materials.push(u)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(o,l){const d=parseInt(o,10);return(d>=0?d-1:d+l/3)*3},parseNormalIndex:function(o,l){const d=parseInt(o,10);return(d>=0?d-1:d+l/3)*3},parseUVIndex:function(o,l){const d=parseInt(o,10);return(d>=0?d-1:d+l/2)*2},addVertex:function(o,l,d){const u=this.vertices,c=this.object.geometry.vertices;c.push(u[o+0],u[o+1],u[o+2]),c.push(u[l+0],u[l+1],u[l+2]),c.push(u[d+0],u[d+1],u[d+2])},addVertexPoint:function(o){const l=this.vertices;this.object.geometry.vertices.push(l[o+0],l[o+1],l[o+2])},addVertexLine:function(o){const l=this.vertices;this.object.geometry.vertices.push(l[o+0],l[o+1],l[o+2])},addNormal:function(o,l,d){const u=this.normals,c=this.object.geometry.normals;c.push(u[o+0],u[o+1],u[o+2]),c.push(u[l+0],u[l+1],u[l+2]),c.push(u[d+0],u[d+1],u[d+2])},addFaceNormal:function(o,l,d){const u=this.vertices,c=this.object.geometry.normals;on.fromArray(u,o),Vt.fromArray(u,l),sn.fromArray(u,d),Ze.subVectors(sn,Vt),an.subVectors(on,Vt),Ze.cross(an),Ze.normalize(),c.push(Ze.x,Ze.y,Ze.z),c.push(Ze.x,Ze.y,Ze.z),c.push(Ze.x,Ze.y,Ze.z)},addColor:function(o,l,d){const u=this.colors,c=this.object.geometry.colors;u[o]!==void 0&&c.push(u[o+0],u[o+1],u[o+2]),u[l]!==void 0&&c.push(u[l+0],u[l+1],u[l+2]),u[d]!==void 0&&c.push(u[d+0],u[d+1],u[d+2])},addUV:function(o,l,d){const u=this.uvs,c=this.object.geometry.uvs;c.push(u[o+0],u[o+1]),c.push(u[l+0],u[l+1]),c.push(u[d+0],u[d+1])},addDefaultUV:function(){const o=this.object.geometry.uvs;o.push(0,0),o.push(0,0),o.push(0,0)},addUVLine:function(o){const l=this.uvs;this.object.geometry.uvs.push(l[o+0],l[o+1])},addFace:function(o,l,d,u,c,v,h,b,m){const L=this.vertices.length;let R=this.parseVertexIndex(o,L),O=this.parseVertexIndex(l,L),N=this.parseVertexIndex(d,L);if(this.addVertex(R,O,N),this.addColor(R,O,N),h!==void 0&&h!==""){const P=this.normals.length;R=this.parseNormalIndex(h,P),O=this.parseNormalIndex(b,P),N=this.parseNormalIndex(m,P),this.addNormal(R,O,N)}else this.addFaceNormal(R,O,N);if(u!==void 0&&u!==""){const P=this.uvs.length;R=this.parseUVIndex(u,P),O=this.parseUVIndex(c,P),N=this.parseUVIndex(v,P),this.addUV(R,O,N),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(o){this.object.geometry.type="Points";const l=this.vertices.length;for(let d=0,u=o.length;d<u;d++){const c=this.parseVertexIndex(o[d],l);this.addVertexPoint(c),this.addColor(c)}},addLineGeometry:function(o,l){this.object.geometry.type="Line";const d=this.vertices.length,u=this.uvs.length;for(let c=0,v=o.length;c<v;c++)this.addVertexLine(this.parseVertexIndex(o[c],d));for(let c=0,v=l.length;c<v;c++)this.addUVLine(this.parseUVIndex(l[c],u))}};return M.startObject("",!1),M}class Bt extends r.Loader{constructor(o){super(o),this.materials=null}load(o,l,d,u){const c=this,v=new r.FileLoader(this.manager);v.setPath(this.path),v.setRequestHeader(this.requestHeader),v.setWithCredentials(this.withCredentials),v.load(o,function(h){try{l(c.parse(h))}catch(b){u?u(b):console.error(b),c.manager.itemError(o)}},d,u)}setMaterials(o){return this.materials=o,this}parse(o){const l=new uo;o.indexOf(`\r
2
+ `)!==-1&&(o=o.replace(/\r\n/g,`
3
+ `)),o.indexOf(`\\
4
+ `)!==-1&&(o=o.replace(/\\\n/g,""));const d=o.split(`
5
+ `);let u=[];for(let h=0,b=d.length;h<b;h++){const m=d[h].trimStart();if(m.length===0)continue;const L=m.charAt(0);if(L!=="#")if(L==="v"){const R=m.split(nn);switch(R[0]){case"v":l.vertices.push(parseFloat(R[1]),parseFloat(R[2]),parseFloat(R[3])),R.length>=7?(Tt.setRGB(parseFloat(R[4]),parseFloat(R[5]),parseFloat(R[6]),r.SRGBColorSpace),l.colors.push(Tt.r,Tt.g,Tt.b)):l.colors.push(void 0,void 0,void 0);break;case"vn":l.normals.push(parseFloat(R[1]),parseFloat(R[2]),parseFloat(R[3]));break;case"vt":l.uvs.push(parseFloat(R[1]),parseFloat(R[2]));break}}else if(L==="f"){const O=m.slice(1).trim().split(nn),N=[];for(let T=0,y=O.length;T<y;T++){const E=O[T];if(E.length>0){const k=E.split("/");N.push(k)}}const P=N[0];for(let T=1,y=N.length-1;T<y;T++){const E=N[T],k=N[T+1];l.addFace(P[0],E[0],k[0],P[1],E[1],k[1],P[2],E[2],k[2])}}else if(L==="l"){const R=m.substring(1).trim().split(" ");let O=[];const N=[];if(m.indexOf("/")===-1)O=R;else for(let P=0,T=R.length;P<T;P++){const y=R[P].split("/");y[0]!==""&&O.push(y[0]),y[1]!==""&&N.push(y[1])}l.addLineGeometry(O,N)}else if(L==="p"){const O=m.slice(1).trim().split(" ");l.addPointGeometry(O)}else if((u=ao.exec(m))!==null){const R=(" "+u[0].slice(1).trim()).slice(1);l.startObject(R)}else if(lo.test(m))l.object.startMaterial(m.substring(7).trim(),l.materialLibraries);else if(ro.test(m))l.materialLibraries.push(m.substring(7).trim());else if(co.test(m))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(L==="s"){if(u=m.split(" "),u.length>1){const O=u[1].trim().toLowerCase();l.object.smooth=O!=="0"&&O!=="off"}else l.object.smooth=!0;const R=l.object.currentMaterial();R&&(R.smooth=l.object.smooth)}else{if(m==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+m+'"')}}l.finalize();const c=new r.Group;if(c.materialLibraries=[].concat(l.materialLibraries),!(l.objects.length===1&&l.objects[0].geometry.vertices.length===0)===!0)for(let h=0,b=l.objects.length;h<b;h++){const m=l.objects[h],L=m.geometry,R=m.materials,O=L.type==="Line",N=L.type==="Points";let P=!1;if(L.vertices.length===0)continue;const T=new r.BufferGeometry;T.setAttribute("position",new r.Float32BufferAttribute(L.vertices,3)),L.normals.length>0&&T.setAttribute("normal",new r.Float32BufferAttribute(L.normals,3)),L.colors.length>0&&(P=!0,T.setAttribute("color",new r.Float32BufferAttribute(L.colors,3))),L.hasUVIndices===!0&&T.setAttribute("uv",new r.Float32BufferAttribute(L.uvs,2));const y=[];for(let k=0,G=R.length;k<G;k++){const A=R[k],_=A.name+"_"+A.smooth+"_"+P;let g=l.materials[_];if(this.materials!==null){if(g=this.materials.create(A.name),O&&g&&!(g instanceof r.LineBasicMaterial)){const j=new r.LineBasicMaterial;r.Material.prototype.copy.call(j,g),j.color.copy(g.color),g=j}else if(N&&g&&!(g instanceof r.PointsMaterial)){const j=new r.PointsMaterial({size:10,sizeAttenuation:!1});r.Material.prototype.copy.call(j,g),j.color.copy(g.color),j.map=g.map,g=j}}g===void 0&&(O?g=new r.LineBasicMaterial:N?g=new r.PointsMaterial({size:1,sizeAttenuation:!1}):g=new r.MeshPhongMaterial,g.name=A.name,g.flatShading=!A.smooth,g.vertexColors=P,l.materials[_]=g),y.push(g)}let E;if(y.length>1){for(let k=0,G=R.length;k<G;k++){const A=R[k];T.addGroup(A.groupStart,A.groupCount,k)}O?E=new r.LineSegments(T,y):N?E=new r.Points(T,y):E=new r.Mesh(T,y)}else O?E=new r.LineSegments(T,y[0]):N?E=new r.Points(T,y[0]):E=new r.Mesh(T,y[0]);E.name=m.name,c.add(E)}else if(l.vertices.length>0){const h=new r.PointsMaterial({size:1,sizeAttenuation:!1}),b=new r.BufferGeometry;b.setAttribute("position",new r.Float32BufferAttribute(l.vertices,3)),l.colors.length>0&&l.colors[0]!==void 0&&(b.setAttribute("color",new r.Float32BufferAttribute(l.colors,3)),h.vertexColors=!0);const m=new r.Points(b,h);c.add(m)}return c}}class Rt extends r.Loader{constructor(o){super(o)}load(o,l,d,u){const c=this,v=this.path===""?r.LoaderUtils.extractUrlBase(o):this.path,h=new r.FileLoader(this.manager);h.setPath(this.path),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(o,function(b){try{l(c.parse(b,v))}catch(m){u?u(m):console.error(m),c.manager.itemError(o)}},d,u)}setMaterialOptions(o){return this.materialOptions=o,this}parse(o,l){const d=o.split(`
6
+ `);let u={};const c=/\s+/,v={};for(let b=0;b<d.length;b++){let m=d[b];if(m=m.trim(),m.length===0||m.charAt(0)==="#")continue;const L=m.indexOf(" ");let R=L>=0?m.substring(0,L):m;R=R.toLowerCase();let O=L>=0?m.substring(L+1):"";if(O=O.trim(),R==="newmtl")u={name:O},v[O]=u;else if(R==="ka"||R==="kd"||R==="ks"||R==="ke"){const N=O.split(c,3);u[R]=[parseFloat(N[0]),parseFloat(N[1]),parseFloat(N[2])]}else u[R]=O}const h=new ho(this.resourcePath||l,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(v),h}}class ho{constructor(o="",l={}){this.baseUrl=o,this.options=l,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:r.FrontSide,this.wrap=this.options.wrap!==void 0?this.options.wrap:r.RepeatWrapping}setCrossOrigin(o){return this.crossOrigin=o,this}setManager(o){this.manager=o}setMaterials(o){this.materialsInfo=this.convert(o),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(o){if(!this.options)return o;const l={};for(const d in o){const u=o[d],c={};l[d]=c;for(const v in u){let h=!0,b=u[v];const m=v.toLowerCase();switch(m){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(b=[b[0]/255,b[1]/255,b[2]/255]),this.options&&this.options.ignoreZeroRGBs&&b[0]===0&&b[1]===0&&b[2]===0&&(h=!1);break}h&&(c[m]=b)}}return l}preload(){for(const o in this.materialsInfo)this.create(o)}getIndex(o){return this.nameLookup[o]}getAsArray(){let o=0;for(const l in this.materialsInfo)this.materialsArray[o]=this.create(l),this.nameLookup[l]=o,o++;return this.materialsArray}create(o){return this.materials[o]===void 0&&this.createMaterial_(o),this.materials[o]}createMaterial_(o){const l=this,d=this.materialsInfo[o],u={name:o,side:this.side};function c(h,b){return typeof b!="string"||b===""?"":/^https?:\/\//i.test(b)?b:h+b}function v(h,b){if(u[h])return;const m=l.getTextureParams(b,u),L=l.loadTexture(c(l.baseUrl,m.url));L.repeat.copy(m.scale),L.offset.copy(m.offset),L.wrapS=l.wrap,L.wrapT=l.wrap,(h==="map"||h==="emissiveMap")&&(L.colorSpace=r.SRGBColorSpace),u[h]=L}for(const h in d){const b=d[h];let m;if(b!=="")switch(h.toLowerCase()){case"kd":u.color=r.ColorManagement.colorSpaceToWorking(new r.Color().fromArray(b),r.SRGBColorSpace);break;case"ks":u.specular=r.ColorManagement.colorSpaceToWorking(new r.Color().fromArray(b),r.SRGBColorSpace);break;case"ke":u.emissive=r.ColorManagement.colorSpaceToWorking(new r.Color().fromArray(b),r.SRGBColorSpace);break;case"map_kd":v("map",b);break;case"map_ks":v("specularMap",b);break;case"map_ke":v("emissiveMap",b);break;case"norm":v("normalMap",b);break;case"map_bump":case"bump":v("bumpMap",b);break;case"disp":v("displacementMap",b);break;case"map_d":v("alphaMap",b),u.transparent=!0;break;case"ns":u.shininess=parseFloat(b);break;case"d":m=parseFloat(b),m<1&&(u.opacity=m,u.transparent=!0);break;case"tr":m=parseFloat(b),this.options&&this.options.invertTrProperty&&(m=1-m),m>0&&(u.opacity=1-m,u.transparent=!0);break}}return this.materials[o]=new r.MeshPhongMaterial(u),this.materials[o]}getTextureParams(o,l){const d={scale:new r.Vector2(1,1),offset:new r.Vector2(0,0)},u=o.split(/\s+/);let c;return c=u.indexOf("-bm"),c>=0&&(l.bumpScale=parseFloat(u[c+1]),u.splice(c,2)),c=u.indexOf("-mm"),c>=0&&(l.displacementBias=parseFloat(u[c+1]),l.displacementScale=parseFloat(u[c+2]),u.splice(c,3)),c=u.indexOf("-s"),c>=0&&(d.scale.set(parseFloat(u[c+1]),parseFloat(u[c+2])),u.splice(c,4)),c=u.indexOf("-o"),c>=0&&(d.offset.set(parseFloat(u[c+1]),parseFloat(u[c+2])),u.splice(c,4)),d.url=u.join(" ").trim(),d}loadTexture(o,l,d,u,c){const v=this.manager!==void 0?this.manager:r.DefaultLoadingManager;let h=v.getHandler(o);h===null&&(h=new r.TextureLoader(v)),h.setCrossOrigin&&h.setCrossOrigin(this.crossOrigin);const b=h.load(o,d,u,c);return l!==void 0&&(b.mapping=l),b}}class At extends r.Loader{constructor(o){super(o)}load(o,l,d,u){const c=this,v=new r.FileLoader(this.manager);v.setPath(this.path),v.setResponseType("arraybuffer"),v.setRequestHeader(this.requestHeader),v.setWithCredentials(this.withCredentials),v.load(o,function(h){try{l(c.parse(h))}catch(b){u?u(b):console.error(b),c.manager.itemError(o)}},d,u)}parse(o){function l(m){const L=new DataView(m),R=32/8*3+32/8*3*3+16/8,O=L.getUint32(80,!0);if(80+32/8+O*R===L.byteLength)return!0;const P=[115,111,108,105,100];for(let T=0;T<5;T++)if(d(P,L,T))return!1;return!0}function d(m,L,R){for(let O=0,N=m.length;O<N;O++)if(m[O]!==L.getUint8(R+O))return!1;return!0}function u(m){const L=new DataView(m),R=L.getUint32(80,!0);let O,N,P,T=!1,y,E,k,G,A;for(let F=0;F<70;F++)L.getUint32(F,!1)==1129270351&&L.getUint8(F+4)==82&&L.getUint8(F+5)==61&&(T=!0,y=new Float32Array(R*3*3),E=L.getUint8(F+6)/255,k=L.getUint8(F+7)/255,G=L.getUint8(F+8)/255,A=L.getUint8(F+9)/255);const _=84,g=12*4+2,j=new r.BufferGeometry,S=new Float32Array(R*3*3),x=new Float32Array(R*3*3),Y=new r.Color;for(let F=0;F<R;F++){const q=_+F*g,se=L.getFloat32(q,!0),ce=L.getFloat32(q+4,!0),D=L.getFloat32(q+8,!0);if(T){const p=L.getUint16(q+48,!0);(p&32768)===0?(O=(p&31)/31,N=(p>>5&31)/31,P=(p>>10&31)/31):(O=E,N=k,P=G)}for(let p=1;p<=3;p++){const J=q+p*12,ae=F*3*3+(p-1)*3;S[ae]=L.getFloat32(J,!0),S[ae+1]=L.getFloat32(J+4,!0),S[ae+2]=L.getFloat32(J+8,!0),x[ae]=se,x[ae+1]=ce,x[ae+2]=D,T&&(Y.setRGB(O,N,P,r.SRGBColorSpace),y[ae]=Y.r,y[ae+1]=Y.g,y[ae+2]=Y.b)}}return j.setAttribute("position",new r.BufferAttribute(S,3)),j.setAttribute("normal",new r.BufferAttribute(x,3)),T&&(j.setAttribute("color",new r.BufferAttribute(y,3)),j.hasColors=!0,j.alpha=A),j}function c(m){const L=new r.BufferGeometry,R=/solid([\s\S]*?)endsolid/g,O=/facet([\s\S]*?)endfacet/g,N=/solid\s(.+)/;let P=0;const T=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,y=new RegExp("vertex"+T+T+T,"g"),E=new RegExp("normal"+T+T+T,"g"),k=[],G=[],A=[],_=new r.Vector3;let g,j=0,S=0,x=0;for(;(g=R.exec(m))!==null;){S=x;const Y=g[0],F=(g=N.exec(Y))!==null?g[1]:"";for(A.push(F);(g=O.exec(Y))!==null;){let ce=0,D=0;const p=g[0];for(;(g=E.exec(p))!==null;)_.x=parseFloat(g[1]),_.y=parseFloat(g[2]),_.z=parseFloat(g[3]),D++;for(;(g=y.exec(p))!==null;)k.push(parseFloat(g[1]),parseFloat(g[2]),parseFloat(g[3])),G.push(_.x,_.y,_.z),ce++,x++;D!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+P),ce!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+P),P++}const q=S,se=x-S;L.userData.groupNames=A,L.addGroup(q,se,j),j++}return L.setAttribute("position",new r.Float32BufferAttribute(k,3)),L.setAttribute("normal",new r.Float32BufferAttribute(G,3)),L}function v(m){return typeof m!="string"?new TextDecoder().decode(m):m}function h(m){if(typeof m=="string"){const L=new Uint8Array(m.length);for(let R=0;R<m.length;R++)L[R]=m.charCodeAt(R)&255;return L.buffer||L}else return m}const b=h(o);return l(b)?u(b):c(v(o))}}class rn extends r.DataTextureLoader{constructor(o){super(o)}parse(o){function l(p){switch(p.image_type){case O:case T:if(p.colormap_length>256||p.colormap_size!==24||p.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case N:case P:case y:case E:if(p.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case R:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+p.image_type)}if(p.width<=0||p.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(p.pixel_size!==8&&p.pixel_size!==16&&p.pixel_size!==24&&p.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+p.pixel_size)}function d(p,J,ae,V,$){let X,ne;const U=ae.pixel_size>>3,z=ae.width*ae.height*U;if(J&&(ne=$.subarray(V,V+=ae.colormap_length*(ae.colormap_size>>3))),p){X=new Uint8Array(z);let w,I,W,re=0;const _e=new Uint8Array(U);for(;re<z;)if(w=$[V++],I=(w&127)+1,w&128){for(W=0;W<U;++W)_e[W]=$[V++];for(W=0;W<I;++W)X.set(_e,re+W*U);re+=U*I}else{for(I*=U,W=0;W<I;++W)X[re+W]=$[V++];re+=I}}else X=$.subarray(V,V+=J?ae.width*ae.height:z);return{pixel_data:X,palettes:ne}}function u(p,J,ae,V,$,X,ne,U,z){const w=z;let I,W=0,re,_e;const Ae=Y.width;for(_e=J;_e!==V;_e+=ae)for(re=$;re!==ne;re+=X,W++)I=U[W],p[(re+Ae*_e)*4+3]=255,p[(re+Ae*_e)*4+2]=w[I*3+0],p[(re+Ae*_e)*4+1]=w[I*3+1],p[(re+Ae*_e)*4+0]=w[I*3+2];return p}function c(p,J,ae,V,$,X,ne,U){let z,w=0,I,W;const re=Y.width;for(W=J;W!==V;W+=ae)for(I=$;I!==ne;I+=X,w+=2)z=U[w+0]+(U[w+1]<<8),p[(I+re*W)*4+0]=(z&31744)>>7,p[(I+re*W)*4+1]=(z&992)>>2,p[(I+re*W)*4+2]=(z&31)<<3,p[(I+re*W)*4+3]=z&32768?0:255;return p}function v(p,J,ae,V,$,X,ne,U){let z=0,w,I;const W=Y.width;for(I=J;I!==V;I+=ae)for(w=$;w!==ne;w+=X,z+=3)p[(w+W*I)*4+3]=255,p[(w+W*I)*4+2]=U[z+0],p[(w+W*I)*4+1]=U[z+1],p[(w+W*I)*4+0]=U[z+2];return p}function h(p,J,ae,V,$,X,ne,U){let z=0,w,I;const W=Y.width;for(I=J;I!==V;I+=ae)for(w=$;w!==ne;w+=X,z+=4)p[(w+W*I)*4+2]=U[z+0],p[(w+W*I)*4+1]=U[z+1],p[(w+W*I)*4+0]=U[z+2],p[(w+W*I)*4+3]=U[z+3];return p}function b(p,J,ae,V,$,X,ne,U){let z,w=0,I,W;const re=Y.width;for(W=J;W!==V;W+=ae)for(I=$;I!==ne;I+=X,w++)z=U[w],p[(I+re*W)*4+0]=z,p[(I+re*W)*4+1]=z,p[(I+re*W)*4+2]=z,p[(I+re*W)*4+3]=255;return p}function m(p,J,ae,V,$,X,ne,U){let z=0,w,I;const W=Y.width;for(I=J;I!==V;I+=ae)for(w=$;w!==ne;w+=X,z+=2)p[(w+W*I)*4+0]=U[z+0],p[(w+W*I)*4+1]=U[z+0],p[(w+W*I)*4+2]=U[z+0],p[(w+W*I)*4+3]=U[z+1];return p}function L(p,J,ae,V,$){let X,ne,U,z,w,I;switch((Y.flags&k)>>G){default:case g:X=0,U=1,w=J,ne=0,z=1,I=ae;break;case A:X=0,U=1,w=J,ne=ae-1,z=-1,I=-1;break;case j:X=J-1,U=-1,w=-1,ne=0,z=1,I=ae;break;case _:X=J-1,U=-1,w=-1,ne=ae-1,z=-1,I=-1;break}if(se)switch(Y.pixel_size){case 8:b(p,ne,z,I,X,U,w,V);break;case 16:m(p,ne,z,I,X,U,w,V);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(Y.pixel_size){case 8:u(p,ne,z,I,X,U,w,V,$);break;case 16:c(p,ne,z,I,X,U,w,V);break;case 24:v(p,ne,z,I,X,U,w,V);break;case 32:h(p,ne,z,I,X,U,w,V);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return p}const R=0,O=1,N=2,P=3,T=9,y=10,E=11,k=48,G=4,A=0,_=1,g=2,j=3;if(o.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let S=0;const x=new Uint8Array(o),Y={id_length:x[S++],colormap_type:x[S++],image_type:x[S++],colormap_index:x[S++]|x[S++]<<8,colormap_length:x[S++]|x[S++]<<8,colormap_size:x[S++],origin:[x[S++]|x[S++]<<8,x[S++]|x[S++]<<8],width:x[S++]|x[S++]<<8,height:x[S++]|x[S++]<<8,pixel_size:x[S++],flags:x[S++]};if(l(Y),Y.id_length+S>o.length)throw new Error("THREE.TGALoader: No data.");S+=Y.id_length;let F=!1,q=!1,se=!1;switch(Y.image_type){case T:F=!0,q=!0;break;case O:q=!0;break;case y:F=!0;break;case N:break;case E:F=!0,se=!0;break;case P:se=!0;break}const ce=new Uint8Array(Y.width*Y.height*4),D=d(F,q,Y,S,x);return L(ce,Y.width,Y.height,D.pixel_data,D.palettes),{data:ce,width:Y.width,height:Y.height,flipY:!0,generateMipmaps:!0,minFilter:r.LinearMipmapLinearFilter}}}class po extends r.Loader{load(o,l,d,u){const c=this,v=c.path===""?r.LoaderUtils.extractUrlBase(o):c.path,h=new r.FileLoader(c.manager);h.setPath(c.path),h.setRequestHeader(c.requestHeader),h.setWithCredentials(c.withCredentials),h.load(o,function(b){try{l(c.parse(b,v))}catch(m){u?u(m):console.error(m),c.manager.itemError(o)}},d,u)}parse(o,l){function d(n,t){const i=[],s=n.childNodes;for(let a=0,f=s.length;a<f;a++){const C=s[a];C.nodeName===t&&i.push(C)}return i}function u(n){if(n.length===0)return[];const t=n.trim().split(/\s+/),i=new Array(t.length);for(let s=0,a=t.length;s<a;s++)i[s]=t[s];return i}function c(n){if(n.length===0)return[];const t=n.trim().split(/\s+/),i=new Array(t.length);for(let s=0,a=t.length;s<a;s++)i[s]=parseFloat(t[s]);return i}function v(n){if(n.length===0)return[];const t=n.trim().split(/\s+/),i=new Array(t.length);for(let s=0,a=t.length;s<a;s++)i[s]=parseInt(t[s]);return i}function h(n){return n.substring(1)}function b(){return"three_default_"+In++}function m(n){return Object.keys(n).length===0}function L(n){return{unit:R(d(n,"unit")[0]),upAxis:O(d(n,"up_axis")[0])}}function R(n){return n!==void 0&&n.hasAttribute("meter")===!0?parseFloat(n.getAttribute("meter")):1}function O(n){return n!==void 0?n.textContent:"Y_UP"}function N(n,t,i,s){const a=d(n,t)[0];if(a!==void 0){const f=d(a,i);for(let C=0;C<f.length;C++)s(f[C])}}function P(n,t){for(const i in n){const s=n[i];s.build=t(n[i])}}function T(n,t){return n.build!==void 0||(n.build=t(n)),n.build}function y(n){const t={sources:{},samplers:{},channels:{}};let i=!1;for(let s=0,a=n.childNodes.length;s<a;s++){const f=n.childNodes[s];if(f.nodeType!==1)continue;let C;switch(f.nodeName){case"source":C=f.getAttribute("id"),t.sources[C]=me(f);break;case"sampler":C=f.getAttribute("id"),t.samplers[C]=E(f);break;case"channel":C=f.getAttribute("target"),t.channels[C]=k(f);break;case"animation":y(f),i=!0;break;default:console.log(f)}}i===!1&&(le.animations[n.getAttribute("id")||r.MathUtils.generateUUID()]=t)}function E(n){const t={inputs:{}};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"input":const f=h(a.getAttribute("source")),C=a.getAttribute("semantic");t.inputs[C]=f;break}}return t}function k(n){const t={};let s=n.getAttribute("target").split("/");const a=s.shift();let f=s.shift();const C=f.indexOf("(")!==-1,Z=f.indexOf(".")!==-1;if(Z)s=f.split("."),f=s.shift(),t.member=s.shift();else if(C){const H=f.split("(");f=H.shift();for(let K=0;K<H.length;K++)H[K]=parseInt(H[K].replace(/\)/,""));t.indices=H}return t.id=a,t.sid=f,t.arraySyntax=C,t.memberSyntax=Z,t.sampler=h(n.getAttribute("source")),t}function G(n){const t=[],i=n.channels,s=n.samplers,a=n.sources;for(const f in i)if(i.hasOwnProperty(f)){const C=i[f],Z=s[C.sampler],H=Z.inputs.INPUT,K=Z.inputs.OUTPUT,te=a[H],B=a[K],ee=_(C,te,B);Y(ee,t)}return t}function A(n){return T(le.animations[n],G)}function _(n,t,i){const s=le.nodes[n.id],a=wt(s.id),f=s.transforms[n.sid],C=s.matrix.clone().transpose();let Z,H,K,te,B,ee;const Q={};switch(f){case"matrix":for(K=0,te=t.array.length;K<te;K++)if(Z=t.array[K],H=K*i.stride,Q[Z]===void 0&&(Q[Z]={}),n.arraySyntax===!0){const Pe=i.array[H],Ce=n.indices[0]+4*n.indices[1];Q[Z][Ce]=Pe}else for(B=0,ee=i.stride;B<ee;B++)Q[Z][B]=i.array[H+B];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',f);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',f);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',f);break}const ie=g(Q,C);return{name:a.uuid,keyframes:ie}}function g(n,t){const i=[];for(const a in n)i.push({time:parseFloat(a),value:n[a]});i.sort(s);for(let a=0;a<16;a++)F(i,a,t.elements[a]);return i;function s(a,f){return a.time-f.time}}const j=new r.Vector3,S=new r.Vector3,x=new r.Quaternion;function Y(n,t){const i=n.keyframes,s=n.name,a=[],f=[],C=[],Z=[];for(let H=0,K=i.length;H<K;H++){const te=i[H],B=te.time,ee=te.value;Ke.fromArray(ee).transpose(),Ke.decompose(j,x,S),a.push(B),f.push(j.x,j.y,j.z),C.push(x.x,x.y,x.z,x.w),Z.push(S.x,S.y,S.z)}return f.length>0&&t.push(new r.VectorKeyframeTrack(s+".position",a,f)),C.length>0&&t.push(new r.QuaternionKeyframeTrack(s+".quaternion",a,C)),Z.length>0&&t.push(new r.VectorKeyframeTrack(s+".scale",a,Z)),t}function F(n,t,i){let s,a=!0,f,C;for(f=0,C=n.length;f<C;f++)s=n[f],s.value[t]===void 0?s.value[t]=null:a=!1;if(a===!0)for(f=0,C=n.length;f<C;f++)s=n[f],s.value[t]=i;else q(n,t)}function q(n,t){let i,s;for(let a=0,f=n.length;a<f;a++){const C=n[a];if(C.value[t]===null){if(i=se(n,a,t),s=ce(n,a,t),i===null){C.value[t]=s.value[t];continue}if(s===null){C.value[t]=i.value[t];continue}D(C,i,s,t)}}}function se(n,t,i){for(;t>=0;){const s=n[t];if(s.value[i]!==null)return s;t--}return null}function ce(n,t,i){for(;t<n.length;){const s=n[t];if(s.value[i]!==null)return s;t++}return null}function D(n,t,i,s){if(i.time-t.time===0){n.value[s]=t.value[s];return}n.value[s]=(n.time-t.time)*(i.value[s]-t.value[s])/(i.time-t.time)+t.value[s]}function p(n){const t={name:n.getAttribute("id")||"default",start:parseFloat(n.getAttribute("start")||0),end:parseFloat(n.getAttribute("end")||0),animations:[]};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"instance_animation":t.animations.push(h(a.getAttribute("url")));break}}le.clips[n.getAttribute("id")]=t}function J(n){const t=[],i=n.name,s=n.end-n.start||-1,a=n.animations;for(let f=0,C=a.length;f<C;f++){const Z=A(a[f]);for(let H=0,K=Z.length;H<K;H++)t.push(Z[H])}return new r.AnimationClip(i,s,t)}function ae(n){return T(le.clips[n],J)}function V(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"skin":t.id=h(a.getAttribute("source")),t.skin=$(a);break;case"morph":t.id=h(a.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}le.controllers[n.getAttribute("id")]=t}function $(n){const t={sources:{}};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"bind_shape_matrix":t.bindShapeMatrix=c(a.textContent);break;case"source":const f=a.getAttribute("id");t.sources[f]=me(a);break;case"joints":t.joints=X(a);break;case"vertex_weights":t.vertexWeights=ne(a);break}}return t}function X(n){const t={inputs:{}};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"input":const f=a.getAttribute("semantic"),C=h(a.getAttribute("source"));t.inputs[f]=C;break}}return t}function ne(n){const t={inputs:{}};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"input":const f=a.getAttribute("semantic"),C=h(a.getAttribute("source")),Z=parseInt(a.getAttribute("offset"));t.inputs[f]={id:C,offset:Z};break;case"vcount":t.vcount=v(a.textContent);break;case"v":t.v=v(a.textContent);break}}return t}function U(n){const t={id:n.id},i=le.geometries[t.id];return n.skin!==void 0&&(t.skin=z(n.skin),i.sources.skinIndices=t.skin.indices,i.sources.skinWeights=t.skin.weights),t}function z(n){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},s=n.sources,a=n.vertexWeights,f=a.vcount,C=a.v,Z=a.inputs.JOINT.offset,H=a.inputs.WEIGHT.offset,K=n.sources[n.joints.inputs.JOINT],te=n.sources[n.joints.inputs.INV_BIND_MATRIX],B=s[a.inputs.WEIGHT.id].array;let ee=0,Q,ie,oe;for(Q=0,oe=f.length;Q<oe;Q++){const Ce=f[Q],ye=[];for(ie=0;ie<Ce;ie++){const we=C[ee+Z],ct=C[ee+H],qe=B[ct];ye.push({index:we,weight:qe}),ee+=2}for(ye.sort(Pe),ie=0;ie<4;ie++){const we=ye[ie];we!==void 0?(i.indices.array.push(we.index),i.weights.array.push(we.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(n.bindShapeMatrix?i.bindMatrix=new r.Matrix4().fromArray(n.bindShapeMatrix).transpose():i.bindMatrix=new r.Matrix4().identity(),Q=0,oe=K.array.length;Q<oe;Q++){const Ce=K.array[Q],ye=new r.Matrix4().fromArray(te.array,Q*te.stride).transpose();i.joints.push({name:Ce,boneInverse:ye})}return i;function Pe(Ce,ye){return ye.weight-Ce.weight}}function w(n){return T(le.controllers[n],U)}function I(n){const t={init_from:d(n,"init_from")[0].textContent};le.images[n.getAttribute("id")]=t}function W(n){return n.build!==void 0?n.build:n.init_from}function re(n){const t=le.images[n];return t!==void 0?T(t,W):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",n),null)}function _e(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"profile_COMMON":t.profile=Ae(a);break}}le.effects[n.getAttribute("id")]=t}function Ae(n){const t={surfaces:{},samplers:{}};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"newparam":je(a,t);break;case"technique":t.technique=de(a);break;case"extra":t.extra=Xe(a);break}}return t}function je(n,t){const i=n.getAttribute("sid");for(let s=0,a=n.childNodes.length;s<a;s++){const f=n.childNodes[s];if(f.nodeType===1)switch(f.nodeName){case"surface":t.surfaces[i]=$e(f);break;case"sampler2D":t.samplers[i]=Ee(f);break}}}function $e(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"init_from":t.init_from=a.textContent;break}}return t}function Ee(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"source":t.source=a.textContent;break}}return t}function de(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"constant":case"lambert":case"blinn":case"phong":t.type=a.nodeName,t.parameters=Ue(a);break;case"extra":t.extra=Xe(a);break}}return t}function Ue(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":t[a.nodeName]=ze(a);break;case"transparent":t[a.nodeName]={opaque:a.hasAttribute("opaque")?a.getAttribute("opaque"):"A_ONE",data:ze(a)};break}}return t}function ze(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"color":t[a.nodeName]=c(a.textContent);break;case"float":t[a.nodeName]=parseFloat(a.textContent);break;case"texture":t[a.nodeName]={id:a.getAttribute("texture"),extra:Ye(a)};break}}return t}function Ye(n){const t={technique:{}};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"extra":et(a,t);break}}return t}function et(n,t){for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"technique":tt(a,t);break}}}function tt(n,t){for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":t.technique[a.nodeName]=parseFloat(a.textContent);break;case"wrapU":case"wrapV":a.textContent.toUpperCase()==="TRUE"?t.technique[a.nodeName]=1:a.textContent.toUpperCase()==="FALSE"?t.technique[a.nodeName]=0:t.technique[a.nodeName]=parseInt(a.textContent);break;case"bump":t[a.nodeName]=Be(a);break}}}function Xe(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"technique":t.technique=nt(a);break}}return t}function nt(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"double_sided":t[a.nodeName]=parseInt(a.textContent);break;case"bump":t[a.nodeName]=Be(a);break}}return t}function Be(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"texture":t[a.nodeName]={id:a.getAttribute("texture"),texcoord:a.getAttribute("texcoord"),extra:Ye(a)};break}}return t}function Me(n){return n}function We(n){return T(le.effects[n],Me)}function ve(n){const t={name:n.getAttribute("name")};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"instance_effect":t.url=h(a.getAttribute("url"));break}}le.materials[n.getAttribute("id")]=t}function Se(n){let t,i=n.slice((n.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":t=Pt;break;default:t=Zt}return t}function ue(n){const t=We(n.url),i=t.profile.technique;let s;switch(i.type){case"phong":case"blinn":s=new r.MeshPhongMaterial;break;case"lambert":s=new r.MeshLambertMaterial;break;default:s=new r.MeshBasicMaterial;break}s.name=n.name||"";function a(H,K=null){const te=t.profile.samplers[H.id];let B=null;if(te!==void 0){const ee=t.profile.surfaces[te.source];B=re(ee.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),B=re(H.id);if(B!==null){const ee=Se(B);if(ee!==void 0){const Q=ee.load(B),ie=H.extra;if(ie!==void 0&&ie.technique!==void 0&&m(ie.technique)===!1){const oe=ie.technique;Q.wrapS=oe.wrapU?r.RepeatWrapping:r.ClampToEdgeWrapping,Q.wrapT=oe.wrapV?r.RepeatWrapping:r.ClampToEdgeWrapping,Q.offset.set(oe.offsetU||0,oe.offsetV||0),Q.repeat.set(oe.repeatU||1,oe.repeatV||1)}else Q.wrapS=r.RepeatWrapping,Q.wrapT=r.RepeatWrapping;return K!==null&&(Q.colorSpace=K),Q}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",B),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",H.id),null}const f=i.parameters;for(const H in f){const K=f[H];switch(H){case"diffuse":K.color&&s.color.fromArray(K.color),K.texture&&(s.map=a(K.texture,r.SRGBColorSpace));break;case"specular":K.color&&s.specular&&s.specular.fromArray(K.color),K.texture&&(s.specularMap=a(K.texture));break;case"bump":K.texture&&(s.normalMap=a(K.texture));break;case"ambient":K.texture&&(s.lightMap=a(K.texture,r.SRGBColorSpace));break;case"shininess":K.float&&s.shininess&&(s.shininess=K.float);break;case"emission":K.color&&s.emissive&&s.emissive.fromArray(K.color),K.texture&&(s.emissiveMap=a(K.texture,r.SRGBColorSpace));break}}r.ColorManagement.colorSpaceToWorking(s.color,r.SRGBColorSpace),s.specular&&r.ColorManagement.colorSpaceToWorking(s.specular,r.SRGBColorSpace),s.emissive&&r.ColorManagement.colorSpaceToWorking(s.emissive,r.SRGBColorSpace);let C=f.transparent,Z=f.transparency;if(Z===void 0&&C&&(Z={float:1}),C===void 0&&Z&&(C={opaque:"A_ONE",data:{color:[1,1,1,1]}}),C&&Z)if(C.data.texture)s.transparent=!0;else{const H=C.data.color;switch(C.opaque){case"A_ONE":s.opacity=H[3]*Z.float;break;case"RGB_ZERO":s.opacity=1-H[0]*Z.float;break;case"A_ZERO":s.opacity=1-H[3]*Z.float;break;case"RGB_ONE":s.opacity=H[0]*Z.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',C.opaque)}s.opacity<1&&(s.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const H=i.extra.technique;for(const K in H){const te=H[K];switch(K){case"double_sided":s.side=te===1?r.DoubleSide:r.FrontSide;break;case"bump":s.normalMap=a(te.texture),s.normalScale=new r.Vector2(1,1);break}}}return s}function Ge(n){return T(le.materials[n],ue)}function rt(n){const t={name:n.getAttribute("name")};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"optics":t.optics=Ne(a);break}}le.cameras[n.getAttribute("id")]=t}function Ne(n){for(let t=0;t<n.childNodes.length;t++){const i=n.childNodes[t];switch(i.nodeName){case"technique_common":return ot(i)}}return{}}function ot(n){const t={};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];switch(s.nodeName){case"perspective":case"orthographic":t.technique=s.nodeName,t.parameters=st(s);break}}return t}function st(n){const t={};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];switch(s.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":t[s.nodeName]=parseFloat(s.textContent);break}}return t}function it(n){let t;switch(n.optics.technique){case"perspective":t=new r.PerspectiveCamera(n.optics.parameters.yfov,n.optics.parameters.aspect_ratio,n.optics.parameters.znear,n.optics.parameters.zfar);break;case"orthographic":let i=n.optics.parameters.ymag,s=n.optics.parameters.xmag;const a=n.optics.parameters.aspect_ratio;s=s===void 0?i*a:s,i=i===void 0?s/a:i,s*=.5,i*=.5,t=new r.OrthographicCamera(-s,s,i,-i,n.optics.parameters.znear,n.optics.parameters.zfar);break;default:t=new r.PerspectiveCamera;break}return t.name=n.name||"",t}function Le(n){const t=le.cameras[n];return t!==void 0?T(t,it):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",n),null)}function be(n){let t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"technique_common":t=Qe(a);break}}le.lights[n.getAttribute("id")]=t}function Qe(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"directional":case"point":case"spot":case"ambient":t.technique=a.nodeName,t.parameters=fe(a)}}return t}function fe(n){const t={};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"color":const f=c(a.textContent);t.color=new r.Color().fromArray(f),r.ColorManagement.colorSpaceToWorking(t.color,r.SRGBColorSpace);break;case"falloff_angle":t.falloffAngle=parseFloat(a.textContent);break;case"quadratic_attenuation":const C=parseFloat(a.textContent);t.distance=C?Math.sqrt(1/C):0;break}}return t}function ke(n){let t;switch(n.technique){case"directional":t=new r.DirectionalLight;break;case"point":t=new r.PointLight;break;case"spot":t=new r.SpotLight;break;case"ambient":t=new r.AmbientLight;break}return n.parameters.color&&t.color.copy(n.parameters.color),n.parameters.distance&&(t.distance=n.parameters.distance),t}function Oe(n){const t=le.lights[n];return t!==void 0?T(t,ke):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",n),null)}function Te(n){const t={name:n.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=d(n,"mesh")[0];if(i!==void 0){for(let s=0;s<i.childNodes.length;s++){const a=i.childNodes[s];if(a.nodeType!==1)continue;const f=a.getAttribute("id");switch(a.nodeName){case"source":t.sources[f]=me(a);break;case"vertices":t.vertices=Re(a);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",a.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":t.primitives.push(Ve(a));break;default:console.log(a)}}le.geometries[n.getAttribute("id")]=t}}function me(n){const t={array:[],stride:3};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"float_array":t.array=c(s.textContent);break;case"Name_array":t.array=u(s.textContent);break;case"technique_common":const a=d(s,"accessor")[0];a!==void 0&&(t.stride=parseInt(a.getAttribute("stride")));break}}return t}function Re(n){const t={};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];s.nodeType===1&&(t[s.getAttribute("semantic")]=h(s.getAttribute("source")))}return t}function Ve(n){const t={type:n.nodeName,material:n.getAttribute("material"),count:parseInt(n.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,s=n.childNodes.length;i<s;i++){const a=n.childNodes[i];if(a.nodeType===1)switch(a.nodeName){case"input":const f=h(a.getAttribute("source")),C=a.getAttribute("semantic"),Z=parseInt(a.getAttribute("offset")),H=parseInt(a.getAttribute("set")),K=H>0?C+H:C;t.inputs[K]={id:f,offset:Z},t.stride=Math.max(t.stride,Z+1),C==="TEXCOORD"&&(t.hasUV=!0);break;case"vcount":t.vcount=v(a.textContent);break;case"p":t.p=v(a.textContent);break}}return t}function lt(n){const t={};for(let i=0;i<n.length;i++){const s=n[i];t[s.type]===void 0&&(t[s.type]=[]),t[s.type].push(s)}return t}function ut(n){let t=0;for(let i=0,s=n.length;i<s;i++)n[i].hasUV===!0&&t++;t>0&&t<n.length&&(n.uvsNeedsFix=!0)}function ht(n){const t={},i=n.sources,s=n.vertices,a=n.primitives;if(a.length===0)return{};const f=lt(a);for(const C in f){const Z=f[C];ut(Z),t[C]=pt(Z,i,s)}return t}function pt(n,t,i){const s={},a={array:[],stride:0},f={array:[],stride:0},C={array:[],stride:0},Z={array:[],stride:0},H={array:[],stride:0},K={array:[],stride:4},te={array:[],stride:4},B=new r.BufferGeometry,ee=[];let Q=0;for(let ie=0;ie<n.length;ie++){const oe=n[ie],Pe=oe.inputs;let Ce=0;switch(oe.type){case"lines":case"linestrips":Ce=oe.count*2;break;case"triangles":Ce=oe.count*3;break;case"polylist":for(let ye=0;ye<oe.count;ye++){const we=oe.vcount[ye];switch(we){case 3:Ce+=3;break;case 4:Ce+=6;break;default:Ce+=(we-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",oe.type)}B.addGroup(Q,Ce,ie),Q+=Ce,oe.material&&ee.push(oe.material);for(const ye in Pe){const we=Pe[ye];switch(ye){case"VERTEX":for(const ct in i){const qe=i[ct];switch(ct){case"POSITION":const _t=a.array.length;if(Ie(oe,t[qe],we.offset,a.array),a.stride=t[qe].stride,t.skinWeights&&t.skinIndices&&(Ie(oe,t.skinIndices,we.offset,K.array),Ie(oe,t.skinWeights,we.offset,te.array)),oe.hasUV===!1&&n.uvsNeedsFix===!0){const Un=(a.array.length-_t)/a.stride;for(let Xt=0;Xt<Un;Xt++)C.array.push(0,0)}break;case"NORMAL":Ie(oe,t[qe],we.offset,f.array),f.stride=t[qe].stride;break;case"COLOR":Ie(oe,t[qe],we.offset,H.array),H.stride=t[qe].stride;break;case"TEXCOORD":Ie(oe,t[qe],we.offset,C.array),C.stride=t[qe].stride;break;case"TEXCOORD1":Ie(oe,t[qe],we.offset,Z.array),C.stride=t[qe].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',ct)}}break;case"NORMAL":Ie(oe,t[we.id],we.offset,f.array),f.stride=t[we.id].stride;break;case"COLOR":Ie(oe,t[we.id],we.offset,H.array,!0),H.stride=t[we.id].stride;break;case"TEXCOORD":Ie(oe,t[we.id],we.offset,C.array),C.stride=t[we.id].stride;break;case"TEXCOORD1":Ie(oe,t[we.id],we.offset,Z.array),Z.stride=t[we.id].stride;break}}}return a.array.length>0&&B.setAttribute("position",new r.Float32BufferAttribute(a.array,a.stride)),f.array.length>0&&B.setAttribute("normal",new r.Float32BufferAttribute(f.array,f.stride)),H.array.length>0&&B.setAttribute("color",new r.Float32BufferAttribute(H.array,H.stride)),C.array.length>0&&B.setAttribute("uv",new r.Float32BufferAttribute(C.array,C.stride)),Z.array.length>0&&B.setAttribute("uv1",new r.Float32BufferAttribute(Z.array,Z.stride)),K.array.length>0&&B.setAttribute("skinIndex",new r.Float32BufferAttribute(K.array,K.stride)),te.array.length>0&&B.setAttribute("skinWeight",new r.Float32BufferAttribute(te.array,te.stride)),s.data=B,s.type=n[0].type,s.materialKeys=ee,s}function Ie(n,t,i,s,a=!1){const f=n.p,C=n.stride,Z=n.vcount;function H(B){let ee=f[B+i]*te;const Q=ee+te;for(;ee<Q;ee++)s.push(K[ee]);if(a){const ie=s.length-te-1;vt.setRGB(s[ie+0],s[ie+1],s[ie+2],r.SRGBColorSpace),s[ie+0]=vt.r,s[ie+1]=vt.g,s[ie+2]=vt.b}}const K=t.array,te=t.stride;if(n.vcount!==void 0){let B=0;for(let ee=0,Q=Z.length;ee<Q;ee++){const ie=Z[ee];if(ie===4){const oe=B+C*0,Pe=B+C*1,Ce=B+C*2,ye=B+C*3;H(oe),H(Pe),H(ye),H(Pe),H(Ce),H(ye)}else if(ie===3){const oe=B+C*0,Pe=B+C*1,Ce=B+C*2;H(oe),H(Pe),H(Ce)}else if(ie>4)for(let oe=1,Pe=ie-2;oe<=Pe;oe++){const Ce=B+C*0,ye=B+C*oe,we=B+C*(oe+1);H(Ce),H(ye),H(we)}B+=C*ie}}else for(let B=0,ee=f.length;B<ee;B+=C)H(B)}function at(n){return T(le.geometries[n],ht)}function Ct(n){const t={name:n.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":gn(s,t);break}}le.kinematicsModels[n.getAttribute("id")]=t}function fn(n){return n.build!==void 0?n.build:n}function mn(n){return T(le.kinematicsModels[n],fn)}function gn(n,t){for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"joint":t.joints[s.getAttribute("sid")]=bn(s);break;case"link":t.links.push(It(s));break}}}function bn(n){let t;for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"prismatic":case"revolute":t=yn(s);break}}return t}function yn(n){const t={sid:n.getAttribute("sid"),name:n.getAttribute("name")||"",axis:new r.Vector3,limits:{min:0,max:0},type:n.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"axis":const a=c(s.textContent);t.axis.fromArray(a);break;case"limits":const f=s.getElementsByTagName("max")[0],C=s.getElementsByTagName("min")[0];t.limits.max=parseFloat(f.textContent),t.limits.min=parseFloat(C.textContent);break}}return t.limits.min>=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function It(n){const t={sid:n.getAttribute("sid"),name:n.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"attachment_full":t.attachments.push(wn(s));break;case"matrix":case"translate":case"rotate":t.transforms.push(Ut(s));break}}return t}function wn(n){const t={joint:n.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"link":t.links.push(It(s));break;case"matrix":case"translate":case"rotate":t.transforms.push(Ut(s));break}}return t}function Ut(n){const t={type:n.nodeName},i=c(n.textContent);switch(t.type){case"matrix":t.obj=new r.Matrix4,t.obj.fromArray(i).transpose();break;case"translate":t.obj=new r.Vector3,t.obj.fromArray(i);break;case"rotate":t.obj=new r.Vector3,t.obj.fromArray(i),t.angle=r.MathUtils.degToRad(i[3]);break}return t}function _n(n){const t={name:n.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"rigid_body":t.rigidBodies[s.getAttribute("name")]={},kn(s,t.rigidBodies[s.getAttribute("name")]);break}}le.physicsModels[n.getAttribute("id")]=t}function kn(n,t){for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":Cn(s,t);break}}}function Cn(n,t){for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"inertia":t.inertia=c(s.textContent);break;case"mass":t.mass=c(s.textContent)[0];break}}}function vn(n){const t={bindJointAxis:[]};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_joint_axis":t.bindJointAxis.push(xn(s));break}}le.kinematicsScenes[h(n.getAttribute("url"))]=t}function xn(n){const t={target:n.getAttribute("target").split("/").pop()};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"axis":const a=s.getElementsByTagName("param")[0];t.axis=a.textContent;const f=t.axis.split("inst_").pop().split("axis")[0];t.jointIndex=f.substring(0,f.length-1);break}}return t}function En(n){return n.build!==void 0?n.build:n}function Nn(n){return T(le.kinematicsScenes[n],En)}function Tn(){const n=Object.keys(le.kinematicsModels)[0],t=Object.keys(le.kinematicsScenes)[0],i=Object.keys(le.visualScenes)[0];if(n===void 0||t===void 0)return;const s=mn(n),a=Nn(t),f=Yt(i),C=a.bindJointAxis,Z={};for(let te=0,B=C.length;te<B;te++){const ee=C[te],Q=De.querySelector('[sid="'+ee.target+'"]');if(Q){const ie=Q.parentElement;H(ee.jointIndex,ie)}}function H(te,B){const ee=B.getAttribute("name"),Q=s.joints[te];f.traverse(function(ie){ie.name===ee&&(Z[te]={object:ie,transforms:An(B),joint:Q,position:Q.zeroPosition})})}const K=new r.Matrix4;Jt={joints:s&&s.joints,getJointValue:function(te){const B=Z[te];if(B)return B.position;console.warn("THREE.ColladaLoader: Joint "+te+" doesn't exist.")},setJointValue:function(te,B){const ee=Z[te];if(ee){const Q=ee.joint;if(B>Q.limits.max||B<Q.limits.min)console.warn("THREE.ColladaLoader: Joint "+te+" value "+B+" outside of limits (min: "+Q.limits.min+", max: "+Q.limits.max+").");else if(Q.static)console.warn("THREE.ColladaLoader: Joint "+te+" is static.");else{const ie=ee.object,oe=Q.axis,Pe=ee.transforms;Ke.identity();for(let Ce=0;Ce<Pe.length;Ce++){const ye=Pe[Ce];if(ye.sid&&ye.sid.indexOf(te)!==-1)switch(Q.type){case"revolute":Ke.multiply(K.makeRotationAxis(oe,r.MathUtils.degToRad(B)));break;case"prismatic":Ke.multiply(K.makeTranslation(oe.x*B,oe.y*B,oe.z*B));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+Q.type);break}else switch(ye.type){case"matrix":Ke.multiply(ye.obj);break;case"translate":Ke.multiply(K.makeTranslation(ye.obj.x,ye.obj.y,ye.obj.z));break;case"scale":Ke.scale(ye.obj);break;case"rotate":Ke.multiply(K.makeRotationAxis(ye.obj,ye.angle));break}}ie.matrix.copy(Ke),ie.matrix.decompose(ie.position,ie.quaternion,ie.scale),Z[te].position=B}}else console.log("THREE.ColladaLoader: "+te+" does not exist.")}}}function An(n){const t=[],i=De.querySelector('[id="'+n.id+'"]');for(let s=0;s<i.childNodes.length;s++){const a=i.childNodes[s];if(a.nodeType!==1)continue;let f,C;switch(a.nodeName){case"matrix":f=c(a.textContent);const Z=new r.Matrix4().fromArray(f).transpose();t.push({sid:a.getAttribute("sid"),type:a.nodeName,obj:Z});break;case"translate":case"scale":f=c(a.textContent),C=new r.Vector3().fromArray(f),t.push({sid:a.getAttribute("sid"),type:a.nodeName,obj:C});break;case"rotate":f=c(a.textContent),C=new r.Vector3().fromArray(f);const H=r.MathUtils.degToRad(f[3]);t.push({sid:a.getAttribute("sid"),type:a.nodeName,obj:C,angle:H});break}}return t}function Mn(n){const t=n.getElementsByTagName("node");for(let i=0;i<t.length;i++){const s=t[i];s.hasAttribute("id")===!1&&s.setAttribute("id",b())}}const Ke=new r.Matrix4,yt=new r.Vector3;function Mt(n){const t={name:n.getAttribute("name")||"",type:n.getAttribute("type"),id:n.getAttribute("id"),sid:n.getAttribute("sid"),matrix:new r.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];if(s.nodeType!==1)continue;let a;switch(s.nodeName){case"node":t.nodes.push(s.getAttribute("id")),Mt(s);break;case"instance_camera":t.instanceCameras.push(h(s.getAttribute("url")));break;case"instance_controller":t.instanceControllers.push(zt(s));break;case"instance_light":t.instanceLights.push(h(s.getAttribute("url")));break;case"instance_geometry":t.instanceGeometries.push(zt(s));break;case"instance_node":t.instanceNodes.push(h(s.getAttribute("url")));break;case"matrix":a=c(s.textContent),t.matrix.multiply(Ke.fromArray(a).transpose()),t.transforms[s.getAttribute("sid")]=s.nodeName;break;case"translate":a=c(s.textContent),yt.fromArray(a),t.matrix.multiply(Ke.makeTranslation(yt.x,yt.y,yt.z)),t.transforms[s.getAttribute("sid")]=s.nodeName;break;case"rotate":a=c(s.textContent);const f=r.MathUtils.degToRad(a[3]);t.matrix.multiply(Ke.makeRotationAxis(yt.fromArray(a),f)),t.transforms[s.getAttribute("sid")]=s.nodeName;break;case"scale":a=c(s.textContent),t.matrix.scale(yt.fromArray(a)),t.transforms[s.getAttribute("sid")]=s.nodeName;break;case"extra":break;default:console.log(s)}}return Ht(t.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",t.id):le.nodes[t.id]=t,t}function zt(n){const t={id:h(n.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<n.childNodes.length;i++){const s=n.childNodes[i];switch(s.nodeName){case"bind_material":const a=s.getElementsByTagName("instance_material");for(let f=0;f<a.length;f++){const C=a[f],Z=C.getAttribute("symbol"),H=C.getAttribute("target");t.materials[Z]=h(H)}break;case"skeleton":t.skeletons.push(h(s.textContent));break}}return t}function Sn(n,t){const i=[],s=[];let a,f,C;for(a=0;a<n.length;a++){const K=n[a];let te;if(Ht(K))te=wt(K),Gt(te,t,i);else if(Rn(K)){const ee=le.visualScenes[K].children;for(let Q=0;Q<ee.length;Q++){const ie=ee[Q];if(ie.type==="JOINT"){const oe=wt(ie.id);Gt(oe,t,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",K)}for(a=0;a<t.length;a++)for(f=0;f<i.length;f++)if(C=i[f],C.bone.name===t[a].name){s[a]=C,C.processed=!0;break}for(a=0;a<i.length;a++)C=i[a],C.processed===!1&&(s.push(C),C.processed=!0);const Z=[],H=[];for(a=0;a<s.length;a++)C=s[a],Z.push(C.bone),H.push(C.boneInverse);return new r.Skeleton(Z,H)}function Gt(n,t,i){n.traverse(function(s){if(s.isBone===!0){let a;for(let f=0;f<t.length;f++){const C=t[f];if(C.name===s.name){a=C.boneInverse;break}}a===void 0&&(a=new r.Matrix4),i.push({bone:s,boneInverse:a,processed:!1})}})}function Pn(n){const t=[],i=n.matrix,s=n.nodes,a=n.type,f=n.instanceCameras,C=n.instanceControllers,Z=n.instanceLights,H=n.instanceGeometries,K=n.instanceNodes;for(let B=0,ee=s.length;B<ee;B++)t.push(wt(s[B]));for(let B=0,ee=f.length;B<ee;B++){const Q=Le(f[B]);Q!==null&&t.push(Q.clone())}for(let B=0,ee=C.length;B<ee;B++){const Q=C[B],ie=w(Q.id),oe=at(ie.id),Pe=qt(oe,Q.materials),Ce=Q.skeletons,ye=ie.skin.joints,we=Sn(Ce,ye);for(let ct=0,qe=Pe.length;ct<qe;ct++){const _t=Pe[ct];_t.isSkinnedMesh&&(_t.bind(we,ie.skin.bindMatrix),_t.normalizeSkinWeights()),t.push(_t)}}for(let B=0,ee=Z.length;B<ee;B++){const Q=Oe(Z[B]);Q!==null&&t.push(Q.clone())}for(let B=0,ee=H.length;B<ee;B++){const Q=H[B],ie=at(Q.id),oe=qt(ie,Q.materials);for(let Pe=0,Ce=oe.length;Pe<Ce;Pe++)t.push(oe[Pe])}for(let B=0,ee=K.length;B<ee;B++)t.push(wt(K[B]).clone());let te;if(s.length===0&&t.length===1)te=t[0];else{te=a==="JOINT"?new r.Bone:new r.Group;for(let B=0;B<t.length;B++)te.add(t[B])}return te.name=a==="JOINT"?n.sid:n.name,te.matrix.copy(i),te.matrix.decompose(te.position,te.quaternion,te.scale),te}const Ln=new r.MeshBasicMaterial({name:r.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function Vn(n,t){const i=[];for(let s=0,a=n.length;s<a;s++){const f=t[n[s]];f===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",n[s]),i.push(Ln)):i.push(Ge(f))}return i}function qt(n,t){const i=[];for(const s in n){const a=n[s],f=Vn(a.materialKeys,t);if(f.length===0&&(s==="lines"||s==="linestrips"?f.push(new r.LineBasicMaterial):f.push(new r.MeshPhongMaterial)),s==="lines"||s==="linestrips")for(let K=0,te=f.length;K<te;K++){const B=f[K];if(B.isMeshPhongMaterial===!0||B.isMeshLambertMaterial===!0){const ee=new r.LineBasicMaterial;ee.color.copy(B.color),ee.opacity=B.opacity,ee.transparent=B.transparent,f[K]=ee}}const C=a.data.attributes.skinIndex!==void 0,Z=f.length===1?f[0]:f;let H;switch(s){case"lines":H=new r.LineSegments(a.data,Z);break;case"linestrips":H=new r.Line(a.data,Z);break;case"triangles":case"polylist":C?H=new r.SkinnedMesh(a.data,Z):H=new r.Mesh(a.data,Z);break}i.push(H)}return i}function Ht(n){return le.nodes[n]!==void 0}function wt(n){return T(le.nodes[n],Pn)}function Bn(n){const t={name:n.getAttribute("name"),children:[]};Mn(n);const i=d(n,"node");for(let s=0;s<i.length;s++)t.children.push(Mt(i[s]));le.visualScenes[n.getAttribute("id")]=t}function $t(n){const t=new r.Group;t.name=n.name;const i=n.children;for(let s=0;s<i.length;s++){const a=i[s];t.add(wt(a.id))}return t}function Rn(n){return le.visualScenes[n]!==void 0}function Yt(n){return T(le.visualScenes[n],$t)}function Dn(n){const t=d(n,"instance_visual_scene")[0];return Yt(h(t.getAttribute("url")))}function Fn(){const n=le.clips;if(m(n)===!0){if(m(le.animations)===!1){const t=[];for(const i in le.animations){const s=A(i);for(let a=0,f=s.length;a<f;a++)t.push(s[a])}xt.push(new r.AnimationClip("default",-1,t))}}else for(const t in n)xt.push(ae(t))}function jn(n){let t="";const i=[n];for(;i.length;){const s=i.shift();s.nodeType===Node.TEXT_NODE?t+=s.textContent:(t+=`
7
+ `,i.push(...s.childNodes))}return t.trim()}if(o.length===0)return{scene:new r.Scene};const Kt=new DOMParser().parseFromString(o,"application/xml"),De=d(Kt,"COLLADA")[0],St=Kt.getElementsByTagName("parsererror")[0];if(St!==void 0){const n=d(St,"div")[0];let t;return n?t=n.textContent:t=jn(St),console.error(`THREE.ColladaLoader: Failed to parse collada file.
8
+ `,t),null}const On=De.getAttribute("version");console.debug("THREE.ColladaLoader: File version",On);const Wt=L(d(De,"asset")[0]),Zt=new r.TextureLoader(this.manager);Zt.setPath(this.resourcePath||l).setCrossOrigin(this.crossOrigin);let Pt;rn&&(Pt=new rn(this.manager),Pt.setPath(this.resourcePath||l));const vt=new r.Color,xt=[];let Jt={},In=0;const le={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};N(De,"library_animations","animation",y),N(De,"library_animation_clips","animation_clip",p),N(De,"library_controllers","controller",V),N(De,"library_images","image",I),N(De,"library_effects","effect",_e),N(De,"library_materials","material",ve),N(De,"library_cameras","camera",rt),N(De,"library_lights","light",be),N(De,"library_geometries","geometry",Te),N(De,"library_nodes","node",Mt),N(De,"library_visual_scenes","visual_scene",Bn),N(De,"library_kinematics_models","kinematics_model",Ct),N(De,"library_physics_models","physics_model",_n),N(De,"scene","instance_kinematics_scene",vn),P(le.animations,G),P(le.clips,J),P(le.controllers,U),P(le.images,W),P(le.effects,Me),P(le.materials,ue),P(le.cameras,it),P(le.lights,ke),P(le.geometries,ht),P(le.visualScenes,$t),Fn(),Tn();const Et=Dn(d(De,"scene")[0]);return Et.animations=xt,Wt.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."),Et.rotation.set(-Math.PI/2,0,0)),Et.scale.multiplyScalar(Wt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),xt},kinematics:Jt,library:le,scene:Et}}}const Dt=new r.Quaternion,ln=new r.Euler;function kt(M){return M?M.trim().split(/\s+/g).map(o=>parseFloat(o)):[0,0,0]}function cn(M,o,l=!1){l||M.rotation.set(0,0,0),ln.set(o[0],o[1],o[2],"ZYX"),Dt.setFromEuler(ln),Dt.multiply(M.quaternion),M.quaternion.copy(Dt)}class fo{constructor(o){this.manager=o||r.DefaultLoadingManager,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(o){return new Promise((l,d)=>{this.load(o,l,null,d)})}load(o,l,d,u){const c=this.manager,v=r.LoaderUtils.extractUrlBase(o),h=this.manager.resolveURL(o);c.itemStart(h),fetch(h,this.fetchOptions).then(b=>{if(b.ok)return d&&d(null),b.text();throw new Error(`URDFLoader: Failed to load url '${h}' with error code ${b.status} : ${b.statusText}.`)}).then(b=>{const m=this.parse(b,this.workingPath||v);l(m),c.itemEnd(h)}).catch(b=>{u?u(b):console.error("URDFLoader: Error loading file.",b),c.itemError(h),c.itemEnd(h)})}parse(o,l=this.workingPath){const d=this.packages,u=this.loadMeshCb,c=this.parseVisual,v=this.parseCollision,h=this.manager,b={},m={},L={};function R(k){if(!/^package:\/\//.test(k))return l?l+k:k;const[G,A]=k.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof d=="string")return d.endsWith(G)?d+"/"+A:d+"/"+G+"/"+A;if(d instanceof Function)return d(G)+"/"+A;if(typeof d=="object")return G in d?d[G]+"/"+A:(console.error(`URDFLoader : ${G} not found in provided package list.`),null)}function O(k){let G;k instanceof Document?G=[...k.children]:k instanceof Element?G=[k]:G=[...new DOMParser().parseFromString(k,"text/xml").children];const A=G.filter(_=>_.nodeName==="robot").pop();return N(A)}function N(k){const G=[...k.children],A=G.filter(F=>F.nodeName.toLowerCase()==="link"),_=G.filter(F=>F.nodeName.toLowerCase()==="joint"),g=G.filter(F=>F.nodeName.toLowerCase()==="material"),j=new r.URDFRobot;j.robotName=k.getAttribute("name"),j.urdfRobotNode=k,g.forEach(F=>{const q=F.getAttribute("name");L[q]=y(F)});const S={},x={};A.forEach(F=>{const q=F.getAttribute("name"),se=k.querySelector(`child[link="${q}"]`)===null;b[q]=T(F,S,x,se?j:null)}),_.forEach(F=>{const q=F.getAttribute("name");m[q]=P(F)}),j.joints=m,j.links=b,j.colliders=x,j.visual=S;const Y=Object.values(m);return Y.forEach(F=>{F instanceof r.URDFMimicJoint&&m[F.mimicJoint].mimicJoints.push(F)}),Y.forEach(F=>{const q=new Set,se=ce=>{if(q.has(ce))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");q.add(ce),ce.mimicJoints.forEach(D=>{se(D)})};se(F)}),j.frames={...x,...S,...b,...m},j}function P(k){const G=[...k.children],A=k.getAttribute("type");let _;const g=G.find(q=>q.nodeName.toLowerCase()==="mimic");g?(_=new r.URDFMimicJoint,_.mimicJoint=g.getAttribute("joint"),_.multiplier=parseFloat(g.getAttribute("multiplier")||1),_.offset=parseFloat(g.getAttribute("offset")||0)):_=new r.URDFJoint,_.urdfNode=k,_.name=k.getAttribute("name"),_.urdfName=_.name,_.jointType=A;let j=null,S=null,x=[0,0,0],Y=[0,0,0];G.forEach(q=>{const se=q.nodeName.toLowerCase();se==="origin"?(x=kt(q.getAttribute("xyz")),Y=kt(q.getAttribute("rpy"))):se==="child"?S=b[q.getAttribute("link")]:se==="parent"?j=b[q.getAttribute("link")]:se==="limit"&&(_.limit.lower=parseFloat(q.getAttribute("lower")||_.limit.lower),_.limit.upper=parseFloat(q.getAttribute("upper")||_.limit.upper))}),j.add(_),_.add(S),cn(_,Y),_.position.set(x[0],x[1],x[2]);const F=G.filter(q=>q.nodeName.toLowerCase()==="axis")[0];if(F){const q=F.getAttribute("xyz").split(/\s+/g).map(se=>parseFloat(se));_.axis=new r.Vector3(q[0],q[1],q[2]),_.axis.normalize()}return _}function T(k,G,A,_=null){_===null&&(_=new r.URDFLink);const g=[...k.children];return _.name=k.getAttribute("name"),_.urdfName=_.name,_.urdfNode=k,c&&g.filter(S=>S.nodeName.toLowerCase()==="visual").forEach(S=>{const x=E(S,L);if(_.add(x),S.hasAttribute("name")){const Y=S.getAttribute("name");x.name=Y,x.urdfName=Y,G[Y]=x}}),v&&g.filter(S=>S.nodeName.toLowerCase()==="collision").forEach(S=>{const x=E(S);if(_.add(x),S.hasAttribute("name")){const Y=S.getAttribute("name");x.name=Y,x.urdfName=Y,A[Y]=x}}),_}function y(k){const G=[...k.children],A=new r.MeshPhongMaterial;return A.name=k.getAttribute("name")||"",G.forEach(_=>{const g=_.nodeName.toLowerCase();if(g==="color"){const j=_.getAttribute("rgba").split(/\s/g).map(S=>parseFloat(S));A.color.setRGB(j[0],j[1],j[2]),A.opacity=j[3],A.transparent=j[3]<1,A.depthWrite=!A.transparent}else if(g==="texture"){const j=_.getAttribute("filename");if(j){const S=new r.TextureLoader(h),x=R(j);A.map=S.load(x),A.map.colorSpace=r.SRGBColorSpace}}}),A}function E(k,G={}){const A=k.nodeName.toLowerCase()==="collision",_=[...k.children];let g=null;const j=_.filter(x=>x.nodeName.toLowerCase()==="material")[0];if(j){const x=j.getAttribute("name");x&&x in G?g=G[x]:g=y(j)}else g=new r.MeshPhongMaterial;const S=A?new r.URDFCollider:new r.URDFVisual;return S.urdfNode=k,_.forEach(x=>{const Y=x.nodeName.toLowerCase();if(Y==="geometry"){const F=x.children[0].nodeName.toLowerCase();if(F==="mesh"){const q=x.children[0].getAttribute("filename"),se=R(q);if(se!==null){const ce=x.children[0].getAttribute("scale");if(ce){const D=kt(ce);S.scale.set(D[0],D[1],D[2])}u(se,h,(D,p)=>{p?console.error("URDFLoader: Error loading mesh.",p):D&&(D instanceof r.Mesh&&(D.material=g),D.position.set(0,0,0),D.quaternion.identity(),S.add(D))})}}else if(F==="box"){const q=new r.Mesh;q.geometry=new r.BoxGeometry(1,1,1),q.material=g;const se=kt(x.children[0].getAttribute("size"));q.scale.set(se[0],se[1],se[2]),S.add(q)}else if(F==="sphere"){const q=new r.Mesh;q.geometry=new r.SphereGeometry(1,30,30),q.material=g;const se=parseFloat(x.children[0].getAttribute("radius"))||0;q.scale.set(se,se,se),S.add(q)}else if(F==="cylinder"){const q=new r.Mesh;q.geometry=new r.CylinderGeometry(1,1,1,30),q.material=g;const se=parseFloat(x.children[0].getAttribute("radius"))||0,ce=parseFloat(x.children[0].getAttribute("length"))||0;q.scale.set(se,ce,se),q.rotation.set(Math.PI/2,0,0),S.add(q)}}else if(Y==="origin"){const F=kt(x.getAttribute("xyz")),q=kt(x.getAttribute("rpy"));S.position.set(F[0],F[1],F[2]),S.rotation.set(0,0,0),cn(S,q)}}),S}return O(o)}defaultMeshLoader(o,l,d){/\.stl$/i.test(o)?new At(l).load(o,c=>{const v=new r.Mesh(c,new r.MeshPhongMaterial);d(v)}):/\.dae$/i.test(o)?new po(l).load(o,c=>d(c.scene)):console.warn(`URDFLoader: Could not load model at ${o}.
9
+ No loader available`)}}function mo(M,o,l,d,u){const c=async O=>{try{const N=await jt.downloadAvatarApi({url:O});if(N.status!==200)throw new Error(`下载失败: ${N.status}`);return N.data}catch(N){throw console.error("addModelFromUrl失败:",N),N}},v=O=>new Promise((N,P)=>{const T=new FileReader;T.onload=y=>{try{const E=y.target.result,G=new Rt().parse(E);G.preload(),N(G)}catch(E){P(E)}},T.onerror=()=>{P(new Error("MTL文件读取失败"))},T.readAsText(O)}),h=async O=>{const N={materials:{},create:function(P){return this.materials[P]?this.materials[P]:(console.warn(`Material '${P}' not found, using default material`),new r.MeshPhongMaterial({color:8947848,side:r.DoubleSide}))},getAsArray:function(){const P=[];for(const T in this.materials)P.push(this.materials[T]);return P},preload:function(){for(const P in this.materials)this.materials[P].map&&(this.materials[P].map.needsUpdate=!0)}};for(const P of O){const T=await v(P);Object.assign(N.materials,T.materials)}return N.preload(),N},b=async(O,N=[])=>new Promise((P,T)=>{const y=new FileReader;y.onload=async E=>{try{const k=E.target.result;let G=null;N&&N.length>0&&(N.length===1?G=await v(N[0]):G=await h(N));const A=new Bt;G&&A.setMaterials(G);const _=A.parse(k);G||_.traverse(g=>{g.isMesh&&(g.material=new r.MeshPhongMaterial({color:8947848,side:r.DoubleSide}))}),P(_)}catch(k){T(k)}},y.onerror=()=>{T(new Error("OBJ文件读取失败"))},y.readAsText(O)}),m=async O=>{var N;try{l.value=!0;const{scene:P}=M();if(!P)throw new Error("Scene not initialized");u();const T=[];for(let y=0;y<O.length;y++){const E=O[y];d.value=`正在加载模型 ${y+1}/${O.length}...`;const k=await c(E.objUrl),G=((N=E.objUrl)==null?void 0:N.split("/").pop())||`model_${y}.obj`,A=new File([k],G,{type:k.type});let _=[];if(E.mtlUrls){const j=Array.isArray(E.mtlUrls)?E.mtlUrls:[E.mtlUrls];for(let S=0;S<j.length;S++){const x=j[S],Y=await c(x),F=(x==null?void 0:x.split("/").pop())||`material_${y}_${S}.mtl`,q=new File([Y],F,{type:Y.type});_.push(q)}}const g=await b(A,_);P.add(g),o.value.push(g),T.push(g)}return l.value=!1,T}catch(P){throw console.error("加载模型失败:",P),l.value=!1,P}},L=async(O,N,P=[],T=[])=>{let y;const E=O.toLowerCase();switch(E){case".txt":case".cpt":case".obj":const k=await N.text();if(E===".txt"||E===".cpt"){const ce=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,p=[...k.matchAll(ce)].map(V=>({x:parseFloat(V[1]),y:parseFloat(V[2]),z:parseFloat(V[3])})),J=new r.BufferGeometry,ae=p.flatMap(V=>[V.x,V.y,V.z]);if(J.setAttribute("position",new r.Float32BufferAttribute(ae,3)),E===".txt"){const V=new r.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});y=new r.Points(J,V)}else if(E===".cpt"){const V=new r.LineBasicMaterial({color:"#5B5C99",linewidth:100});y=new r.Line(J,V)}}else if(E===".obj"){const ce=new Bt;if(P&&P.length>0){const D=new Rt;for(const p of P){const J=await p.text(),ae=D.parse(J);ae.preload(),ce.setMaterials(ae);break}}y=ce.parse(k),(!P||P.length===0)&&y.traverse(D=>{D.isMesh&&(D.material=new r.MeshPhongMaterial({color:"#B3B3D4"})),D instanceof r.Mesh&&(D.material.side=r.DoubleSide)})}break;case".stl":const G=await N.arrayBuffer(),_=new At().parse(G),g=new r.MeshPhongMaterial({color:"#B3B3D4",side:r.DoubleSide});y=new r.Mesh(_,g);break;case".urdf":const j=await N.text(),S=new fo,x=new Map;T.forEach(ce=>{x.set(ce.name,ce.blob)}),S.loadMeshCb=async(ce,D,p,J,ae)=>{const V=ce.split("/").pop(),$=x.get(V);if(!$){ae(new Error(`找不到文件: ${V}`));return}const X=V.split(".").pop().toLowerCase();switch(X){case"stl":const ne=await $.arrayBuffer(),z=new At(D).parse(ne),w=new r.Mesh(z,new r.MeshPhongMaterial);p(w);break;case"obj":const I=await $.text(),W=new Bt(D),re=V.replace(".obj",".mtl"),_e=x.get(re);if(_e){const je=await _e.text(),Ee=new Rt(D).parse(je);Ee.preload(),W.setMaterials(Ee)}const Ae=W.parse(I);p(Ae);break;default:ae(new Error(`不支持的文件格式: ${X}`))}},y=S.parse(j);break;case".nc":const Y=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],F={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},q=new r.Group,se=Y.map(ce=>new Promise((D,p)=>{new At().load(`/model/${ce}`,ae=>{const V=new r.MeshPhongMaterial({color:F[ce]||"#B3B3D4",side:r.DoubleSide}),$=new r.Mesh(ae,V);D($)},void 0,p)}));try{(await Promise.all(se)).forEach(D=>q.add(D)),y=q}catch(ce){throw console.error("加载NC文件对应的STL文件失败:",ce),new Error("无法加载.NC文件对应的STL文件")}break;default:throw new Error(`不支持的文件格式: ${O}`)}return y};return{addModelsFromUrls:m,loadModelByDefaultPath:async O=>{console.log(O);try{l.value=!0,d.value="正在加载模型...";const{scene:N}=M();if(!N)throw new Error("Scene not initialized");u(),await new Promise(T=>setTimeout(T,100));const P=[];for(let T=0;T<O.length;T++){const y=O[T],E=await L(y.suffix,y.blob,y.mtlBlobs||[],y.meshFiles||[]);N.add(E),o.value.push(E),P.push(E)}return l.value=!1,d.value="",P}catch(N){throw console.error("加载模型失败:",N),l.value=!1,d.value="",N}}}}const go={class:"obj-viewer-container"},bo={class:"floating-controls"},yo=["disabled"],wo=["disabled","title"],_o={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},ko={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Co=["disabled"],vo=["title"],xo={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Eo={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},No={key:0,class:"clipping-panel"},To={class:"panel-content"},Ao={class:"radio-group"},Mo={class:"radio-label"},So={class:"radio-label"},Po={class:"radio-label"},Lo={class:"radio-label"},Vo={key:1,class:"loading-overlay"},Bo={__name:"threeModel",setup(M,{expose:o}){const l=e.ref(null),d=e.ref(!1),u=e.ref(""),c=e.ref(!1),v=e.ref(!1),{currentModels:h,initialCameraPosition:b,initialTargetPosition:m,initThreeJS:L,handleResize:R,fitCameraToAllModels:O,getThreeJSObjects:N,clearAllModels:P,cleanup:T}=oo(l),{isAnimating:y,toggleAnimation:E,stopAnimation:k}=so(N,h),{isClipping:G,activeClippingAxis:A,toggleClipping:_,updateClippingPlanes:g}=io(N,h),{addModelsFromUrls:j,loadModelByDefaultPath:S}=mo(N,h,d,u,P),x=()=>{if(v.value||h.value.length===0)return;v.value=!0,y.value&&k();const{camera:D,controls:p}=N();if(!D||!p)return;p.enabled=!0;const J=U=>U<.5?4*U*U*U:1-Math.pow(-2*U+2,3)/2,ae=D.position.clone(),V=p.target.clone(),$=1500,X=Date.now(),ne=()=>{const U=Date.now()-X,z=Math.min(U/$,1),w=J(z);D.position.lerpVectors(ae,b.value,w),p.target.lerpVectors(V,m.value,w),z<1?requestAnimationFrame(ne):v.value=!1};ne()},Y=()=>{document.fullscreenElement?document.exitFullscreen().then(()=>{c.value=!1,e.nextTick(()=>{R()})}).catch(D=>{console.error("无法退出全屏:",D)}):l.value.requestFullscreen().then(()=>{c.value=!0,e.nextTick(()=>{R()})}).catch(D=>{console.error("无法进入全屏:",D)})},F=()=>{c.value=!!document.fullscreenElement,c.value||e.nextTick(()=>{R()})},q=async(D,p)=>{try{y.value&&k(),G.value&&_();const J=await p(D);return O(),J}catch(J){throw console.error("加载模型失败:",J),J}},se=async D=>q(D,j),ce=async D=>q(D,S);return e.onMounted(async()=>{await e.nextTick(),L(),window.addEventListener("resize",R),document.addEventListener("fullscreenchange",F)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",R),document.removeEventListener("fullscreenchange",F),y.value&&k(),T()}),o({addModelsFromUrls:se,loadModelByDefaultPath:ce}),(D,p)=>(e.openBlock(),e.createElementBlock("div",go,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:l,class:"threejs-container"},null,512),e.createElementVNode("div",bo,[e.createElementVNode("button",{onClick:x,class:e.normalizeClass(["control-btn","reset-btn"]),disabled:d.value||e.unref(h).length===0||v.value,title:"重置"},p[10]||(p[10]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),e.createElementVNode("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)]),8,yo),e.createElementVNode("button",{onClick:p[0]||(p[0]=(...J)=>e.unref(E)&&e.unref(E)(...J)),class:e.normalizeClass(["control-btn","animation-btn",{active:e.unref(y)}]),disabled:d.value||e.unref(h).length===0,title:e.unref(y)?"停止动画":"动画视图"},[e.unref(y)?(e.openBlock(),e.createElementBlock("svg",ko,p[12]||(p[12]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("rect",{x:"9.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1),e.createElementVNode("rect",{x:"12.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",_o,p[11]||(p[11]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("polygon",{points:"10,8 16,12 10,16",fill:"currentColor"},null,-1)])))],10,wo),e.createElementVNode("button",{onClick:p[1]||(p[1]=(...J)=>e.unref(_)&&e.unref(_)(...J)),class:e.normalizeClass(["control-btn","clipping-btn",{active:e.unref(G)}]),disabled:d.value||e.unref(h).length===0,title:"剖面视图"},p[13]||(p[13]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"3",y:"3",width:"18",height:"18"}),e.createElementVNode("line",{x1:"-14",y1:"12",x2:"30",y2:"12","stroke-dasharray":"4,2"})],-1)]),10,Co),e.createElementVNode("button",{onClick:Y,class:e.normalizeClass(["control-btn","fullscreen-btn"]),title:c.value?"退出全屏":"全屏"},[c.value?(e.openBlock(),e.createElementBlock("svg",Eo,p[15]||(p[15]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",xo,p[14]||(p[14]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])))],8,vo)]),e.unref(G)?(e.openBlock(),e.createElementBlock("div",No,[e.createElementVNode("div",To,[e.createElementVNode("div",Ao,[e.createElementVNode("label",Mo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":p[2]||(p[2]=J=>e.isRef(A)?A.value=J:null),onChange:p[3]||(p[3]=(...J)=>e.unref(g)&&e.unref(g)(...J))},null,544),[[e.vModelRadio,e.unref(A)]]),p[16]||(p[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",So,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":p[4]||(p[4]=J=>e.isRef(A)?A.value=J:null),onChange:p[5]||(p[5]=(...J)=>e.unref(g)&&e.unref(g)(...J))},null,544),[[e.vModelRadio,e.unref(A)]]),p[17]||(p[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Po,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":p[6]||(p[6]=J=>e.isRef(A)?A.value=J:null),onChange:p[7]||(p[7]=(...J)=>e.unref(g)&&e.unref(g)(...J))},null,544),[[e.vModelRadio,e.unref(A)]]),p[18]||(p[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Lo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":p[8]||(p[8]=J=>e.isRef(A)?A.value=J:null),onChange:p[9]||(p[9]=(...J)=>e.unref(g)&&e.unref(g)(...J))},null,544),[[e.vModelRadio,e.unref(A)]]),p[19]||(p[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("div",Vo,[p[20]||(p[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(u.value),1)])):e.createCommentVNode("",!0)]))}},Ro=bt._export_sfc(Bo,[["__scopeId","data-v-4d1111d9"]]),Do={class:"bread-content"},Fo=["onClick"],jo={key:0,class:"split-title"},Oo={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(M,{emit:o}){const l=M,d=e.ref([]),u=o;e.onMounted(()=>{d.value=l==null?void 0:l.breadArray}),e.watch(()=>l==null?void 0:l.breadArray,()=>{d.value=l==null?void 0:l.breadArray},{deep:!0,immediate:!0});const c=v=>{u("click",v)};return(v,h)=>(e.openBlock(),e.createElementBlock("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(b,m)=>{var L;return e.openBlock(),e.createElementBlock("div",{key:m,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:R=>c(b),style:e.normalizeStyle({opacity:((L=d.value)==null?void 0:L.length)-1===m?"0.7":"1"})},e.toDisplayString(b.value),13,Fo),m!==d.value.length-1&&Array.isArray(d.value)?(e.openBlock(),e.createElementBlock("div",jo,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},pn=bt._export_sfc(Oo,[["__scopeId","data-v-ded7e2bd"]]),Io={class:"item-menu-content"},Uo={class:"item-left-content"},zo={key:0,class:"page-icon"},Go={class:"avatar"},qo={style:{display:"flex"}},Ho={class:"select-icon"},$o={key:0,class:"model-operate",style:{width:"0px"}},Yo={class:"model-select"},Ko={class:"model-fill"},Wo={key:1,class:"show-main-content"},Zo={class:"show-content"},Jo={class:"item-view-group"},Xo={class:"show-item-content"},Qo={class:"item-view-group"},es={key:2,class:"show-main-content"},ts={__name:"browser",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(M,{emit:o}){const l=dn.useLoginState(),{loginUserInfo:d,cryptoInfo:u}=pe.storeToRefs(l);e.onMounted(()=>{un.ElNotification({title:"温馨提示:",type:"success",message:"欢迎使用系统",duration:1e3})});const c=r.useModelComp(Je.pinia);r.useFormToTableComp(Je.pinia),e.ref(!0);const v=pe.useMenuState();e.ref(!0);const{itemData:h,isEdit:b,isRefreshCurStructure:m,curStructureCompIds:L}=pe.storeToRefs(c),R=r.useUnit(Je.pinia),{activeMenuPath:O,menus:N,importLoading:P}=pe.storeToRefs(v),{selectIndex:T,selectTitle:y}=pe.storeToRefs(R);return e.ref([]),e.ref(!1),(E,k)=>{const G=e.resolveComponent("el-aside"),A=e.resolveComponent("el-button"),_=e.resolveComponent("el-avatar"),g=e.resolveComponent("el-header"),j=e.resolveComponent("router-view"),S=e.resolveComponent("el-main"),x=e.resolveComponent("el-container"),Y=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(x,{"element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.unref(b)==="view"?(e.openBlock(),e.createBlock(G,{key:0,width:"250px"},{default:e.withCtx(()=>[e.createVNode(Ft.default,{mode:"vertical"})]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>{var F;return[e.createElementVNode("div",Io,[e.createElementVNode("div",Uo,[e.unref(b)==="edit"?(e.openBlock(),e.createElementBlock("div",zo,[e.createVNode(A,{text:"",onClick:e.unref(he.onBack)},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[2]},8,["onClick"]),e.createVNode(A,{text:"",onClick:k[0]||(k[0]=q=>{var se,ce;return e.unref(he.clickSavePage)((ce=(se=e.unref(y))==null?void 0:se.map(D=>D.value))==null?void 0:ce.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(ft.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[k[3]||(k[3]=e.createTextVNode(" 保存页面 "))]),_:1,__:[3]})])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(pn,{key:e.unref(y),breadArray:e.unref(y),onClick:e.unref(he.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",Go,[e.unref(b)==="view"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-icon",onClick:k[1]||(k[1]=(...q)=>e.unref(he.onSelectFixContent)&&e.unref(he.onSelectFixContent)(...q))},[e.createElementVNode("div",qo,[e.createVNode(ft.SvgIcon,{name:"write",style:{width:"clamp(12px, 0.9375rem, 15px)",height:"clamp(12px, 0.9375rem, 15px)"}})]),k[4]||(k[4]=e.createElementVNode("div",{class:"layout-trigger"},e.toDisplayString("修改布局"),-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",Ho,[e.renderSlot(E.$slots,"default",{},void 0,!0)]),e.createVNode(_,{size:35,src:(F=e.unref(d))==null?void 0:F.avatarUrl},{default:e.withCtx(()=>{var q;return[e.createTextVNode(e.toDisplayString(((q=e.unref(d))==null?void 0:q.account)??"未知"),1)]}),_:1},8,["src"])])])]}),_:3}),e.createVNode(S,null,{default:e.withCtx(()=>{var F,q,se,ce;return[e.unref(b)==="edit"?(e.openBlock(),e.createElementBlock("div",$o,[e.createElementVNode("div",Yo,[e.createVNode(dt.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:E.innerWidth},[e.createVNode(dt.modelShow)])),e.createElementVNode("div",Ko,[e.createVNode(dt.modelFill)])])):E.$route.path==="/"&&((F=e.unref(he.showItems))==null?void 0:F.length)>0&&e.unref(b)==="view"?(e.openBlock(),e.createElementBlock("div",Wo,[e.createElementVNode("div",Zo,[(q=e.unref(mt.cloneDeep)(e.unref(he.showItems)))!=null&&q.find(D=>D.comp==="FormTop")?(e.openBlock(),e.createElementBlock("div",{class:"show-header",key:E.index},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=e.unref(mt.cloneDeep)(e.unref(he.showItems)))==null?void 0:se.filter(D=>D.comp==="FormTop"),(D,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:p},[e.createElementVNode("div",Jo,e.toDisplayString(D.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(he.getComponents)(D.comp)),{itemData:D==null?void 0:D.compData,childItemData:D==null?void 0:D.itemChildData,key:(D==null?void 0:D.id)??p,onChange:e.unref(he.onChange),index:(D==null?void 0:D.id)??p,onContentChange:e.unref(he.onContentChange),onPageChange:e.unref(he.onPageChange)},null,40,["itemData","childItemData","onChange","index","onContentChange","onPageChange"]))]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ce=e.unref(mt.cloneDeep)(e.unref(he.showItems)))==null?void 0:ce.filter(D=>D.comp!=="FormTop"),(D,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:p},[e.createElementVNode("div",Qo,e.toDisplayString(D.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(he.getComponents)(D.comp)),{itemData:D==null?void 0:D.compData,childItemData:D==null?void 0:D.itemChildData,key:(D==null?void 0:D.id)??p,onChange:e.unref(he.onChange),index:(D==null?void 0:D.id)??p,onContentChange:e.unref(he.onContentChange),onPageChange:e.unref(he.onPageChange)},null,40,["itemData","childItemData","onChange","index","onContentChange","onPageChange"]))]))),128))])])])):e.unref(b)==="view"?(e.openBlock(),e.createElementBlock("div",es,[e.createVNode(j)])):e.createCommentVNode("",!0)]}),_:1})]),_:3})]),_:3})),[[Y,e.unref(P)]])}}},ns=bt._export_sfc(ts,[["__scopeId","data-v-d2611062"]]);function os(M,o,l,d,u,c){const v=e.resolveComponent("svg-icon"),h=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(h,{mode:M.mode,menuList:M.renderMenuList,onClickMenu:M.clickMenu,onOpenMenu:M.openMenu,onCloseMenu:M.closeMenu},{title:e.withCtx(({menu:b})=>[e.createVNode(v,{name:b.icon??"Fold",class:"menu-icon"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(b.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const ss=bt._export_sfc(he._sfc_main,[["render",os],["__scopeId","data-v-e003bdbb"]]),ge=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],is={class:"structure-buttons"},as={class:"structure-paths"},rs={class:"client-header-user"},ls={class:"select-icon"},cs={class:"model-select"},ds={class:"model-show"},us={class:"model-fill"},hs={class:"client-header-logo"},ps={class:"client-header-menu"},fs={class:"client-header-user"},ms={style:{display:"flex"}},gs={class:"select-icon"},bs={class:"client-main-content"},ys={key:0,class:"item-view-group"},ws={key:0,class:"calculator"},_s={class:"router-aside"},ks=e.defineComponent({__name:"client",props:{windowConfig:{type:Object,default:()=>{}}},setup(M){const o=r.useUnit(Je.pinia),l=e.ref(0),d=e.ref(!1),{selectTitle:u}=pe.storeToRefs(o),c=e.ref(!1),v=e.ref(!1),h=e.ref(!1),b=r.useTableComp(Je.pinia),{tableShowThree:m}=pe.storeToRefs(b),L=dn.useLoginState(),{loginUserInfo:R}=pe.storeToRefs(L),O=r.useModelComp(Je.pinia),{isEdit:N}=pe.storeToRefs(O),P=pe.useMenuState(Je.pinia),T=zn.useFormComp(Je.pinia),{objUrl:y,blobUrls:E}=pe.storeToRefs(T),k=e.ref(null),G=e.ref(!0),{importLoading:A,activeMenuPath:_,platName:g}=pe.storeToRefs(P),j=e.ref(!1);e.watch(()=>_.value,async V=>{V&&(j.value=!0)},{immediate:!0});const S=async V=>{var ne,U,z,w,I,W,re;const $=(ne=V==null?void 0:V.split("/"))==null?void 0:ne[0],X=await pe.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:$}});return((U=X==null?void 0:X.data)==null?void 0:U.type)==="success"?((re=(W=(I=(w=(z=X==null?void 0:X.data)==null?void 0:z.result)==null?void 0:w[0])==null?void 0:I.value)==null?void 0:W.tableData)==null?void 0:re.隐藏三维显示)!==!0:!0};e.watch(()=>he.showItems.value,()=>{var V,$,X,ne,U;if(((V=he.showItems.value)==null?void 0:V.length)===2&&(($=he.showItems.value)!=null&&$.find(z=>(z==null?void 0:z.name)==="输入"))&&((X=he.showItems.value)!=null&&X.find(z=>(z==null?void 0:z.name)==="输出"))){const z=(ne=he.showItems.value)==null?void 0:ne.find(w=>(w==null?void 0:w.name)==="输出");v.value=((U=z==null?void 0:z.comp)==null?void 0:U.toUpperCase())==="FORM",c.value=!0}else c.value=!1,v.value=!1},{deep:!0,immediate:!0}),e.watch(()=>_.value,async()=>{_.value&&(G.value=await S(_.value))},{deep:!0,immediate:!0}),e.watch(()=>[y.value,k.value],()=>{var V;((V=y.value)==null?void 0:V.length)>0&&k.value&&k.value.addModelsFromUrls(y.value)},{immediate:!0,deep:!0}),e.watch(()=>E==null?void 0:E.value,async()=>{var V,$,X,ne;if(E!=null&&E.value&&((V=E==null?void 0:E.value)==null?void 0:V.length)>0&&!(($=he.showItems.value)!=null&&$.find(U=>(U==null?void 0:U.name)==="输入")&&((X=he.showItems.value)!=null&&X.find(U=>(U==null?void 0:U.name)==="输出")))){let U=[];const z=await((ne=mt.cloneDeep(E==null?void 0:E.value))==null?void 0:ne.map(async w=>{var _e,Ae,je,$e,Ee,de,Ue,ze,Ye,et,tt,Xe,nt,Be,Me;let I,W,re=(_e=w==null?void 0:w.blob)==null?void 0:_e.split(",");if((re==null?void 0:re.length)>1){let We=await(re==null?void 0:re.map(async ve=>{var ue,Ge,rt,Ne,ot,st;I=await pe.axios.get(ve,{responseType:"blob",headers:{"Content-Type":"application/json"}});let Se=[];if(((ue=w==null?void 0:w.mtlBlobs)==null?void 0:ue.length)>0){let it=await((Ge=w==null?void 0:w.mtlBlobs)==null?void 0:Ge.map(async Le=>{let be=await pe.axios.get(Le,{responseType:"blob",headers:{"Content-Type":"application/json"}});return Se.push(new Blob([be.data],{type:"application/octet-stream;charset=UTF-8"})),be}));await Promise.all(it)}return((Ne=ve==null?void 0:ve.split("."))==null?void 0:Ne[((rt=ve==null?void 0:ve.split("."))==null?void 0:rt.length)-1])!=="undefined"&&U.push({suffix:"."+((st=ve==null?void 0:ve.split("."))==null?void 0:st[((ot=ve==null?void 0:ve.split("."))==null?void 0:ot.length)-1]),blob:new Blob([I.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:Se}),I}));await Promise.all(We)}else if(!((Ae=w==null?void 0:w.blob)!=null&&Ae.includes("https://"))&&!((je=w==null?void 0:w.blob)!=null&&je.includes("http://"))){I=await jt.downloadAvatarApi({url:w==null?void 0:w.blob});let We=[];if((($e=w==null?void 0:w.mtlBlobs)==null?void 0:$e.length)>0){let ve=await((Ee=w==null?void 0:w.mtlBlobs)==null?void 0:Ee.map(async Se=>{let ue=await jt.downloadAvatarApi({url:Se});return We.push(new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"})),ue}));await Promise.all(ve)}W={suffix:"."+((Ye=(de=w==null?void 0:w.blob)==null?void 0:de.split("."))==null?void 0:Ye[((ze=(Ue=w==null?void 0:w.blob)==null?void 0:Ue.split("."))==null?void 0:ze.length)-1]),blob:new Blob([I.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:We}}else{I=await pe.axios.get(w==null?void 0:w.blob,{responseType:"blob",headers:{"Content-Type":"application/json"}});let We=[];if(((et=w==null?void 0:w.mtlBlobs)==null?void 0:et.length)>0){let ve=await((tt=w==null?void 0:w.mtlBlobs)==null?void 0:tt.map(async Se=>{let ue=await pe.axios.get(Se,{responseType:"blob",headers:{"Content-Type":"application/json"}});return We.push(new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"})),ue}));await Promise.all(ve)}W={suffix:"."+((Me=(Xe=w==null?void 0:w.blob)==null?void 0:Xe.split("."))==null?void 0:Me[((Be=(nt=w==null?void 0:w.blob)==null?void 0:nt.split("."))==null?void 0:Be.length)-1]),blob:new Blob([I.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:We}}W&&U.push(W)}));await Promise.all(z),k.value.loadModelByDefaultPath(U)}},{immediate:!0,deep:!0}),e.watch(()=>m.value,async()=>{var $,X,ne,U;if(m.value!==""&&m.value){let z=($=_.value)==null?void 0:$.split("/"),w=z[(z==null?void 0:z.length)-2];const W=(((X=ge==null?void 0:ge.find(je=>(je==null?void 0:je.key)===w))==null?void 0:X.download)??"")+"/"+m.value,re=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),_e=await pe.axios.post(W,null,{responseType:"blob",headers:{Authorization:re,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var V=new Blob([_e.data],{type:"application/octet-stream;charset=UTF-8"});const Ae=[{suffix:"."+((U=(ne=m.value)==null?void 0:ne.split("."))==null?void 0:U[1]),blob:V,mtlBlobs:[]}];k.value.loadModelByDefaultPath(Ae)}},{deep:!0,immediate:!0});const x=async()=>{var I,W,re,_e,Ae,je,$e,Ee,de,Ue,ze,Ye,et,tt,Xe,nt,Be;d.value=!0;let V=(I=_.value)==null?void 0:I.split("/"),$=V[(V==null?void 0:V.length)-2];const X=((W=ge==null?void 0:ge.find(Me=>(Me==null?void 0:Me.key)===$))==null?void 0:W.value)??"";let ne="";const U=await pe.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});((re=U==null?void 0:U.data)==null?void 0:re.code)===200&&(ne=`Bearer ${(Ae=(_e=U.data)==null?void 0:_e.result)==null?void 0:Ae.accessToken}`,sessionStorage.setItem("magicToken",ne));const z=ne===""?"123456":ne,w=await pe.axios.post(X,null,{headers:{Authorization:z,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((je=w==null?void 0:w.data)==null?void 0:je.type)==="success"&&r.IsJson((Ee=($e=w==null?void 0:w.data)==null?void 0:$e.result)==null?void 0:Ee.result)){const Me=(et=(Ye=(ze=JSON.parse((Ue=(de=w==null?void 0:w.data)==null?void 0:de.result)==null?void 0:Ue.result))==null?void 0:ze.lines_file_paths)==null?void 0:Ye[0])==null?void 0:et.split("\\"),ve=(((tt=ge==null?void 0:ge.find(ue=>(ue==null?void 0:ue.key)===$))==null?void 0:tt.resources)??"")+"/"+(((Me==null?void 0:Me[(Me==null?void 0:Me.length)-2])==="inputResources"?"outputResources":Me==null?void 0:Me[(Me==null?void 0:Me.length)-2])??"outputResources"),Se=await pe.axios.post(ve,null,{headers:{Authorization:z,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((Xe=Se==null?void 0:Se.data)==null?void 0:Xe.type)==="success"){const ue=(nt=Se==null?void 0:Se.data)==null?void 0:nt.result,Ge=he.showItems.value,rt=await((Be=mt.cloneDeep(Ge))==null?void 0:Be.map(async Ne=>{var ot,st,it,Le,be,Qe;if((Ne==null?void 0:Ne.name)==="输出"){if((Ne==null?void 0:Ne.comp)==="Table")Ne.compData=(ot=Ne==null?void 0:Ne.compData)==null?void 0:ot.map(fe=>{var ke,Oe;return(fe==null?void 0:fe.key)==="tableContents"&&(fe.contents=(Oe=(ke=fe==null?void 0:fe.contents)==null?void 0:ke.map(Te=>(Te=Te==null?void 0:Te.map((me,Re)=>{var Ve,lt,ut;return typeof me=="string"&&Re>1?((Ve=fe==null?void 0:fe.contents)==null?void 0:Ve.length)>1?me=((lt=ue==null?void 0:ue[Re-1])!=null&&lt.includes("input")?me:ue==null?void 0:ue[Re-1])??me:me=ue==null?void 0:ue[0]:me=((ut=ue==null?void 0:ue[Re-1])!=null&&ut.includes("input")?me:ue==null?void 0:ue[Re-1])??me,me}),Te)))==null?void 0:Oe.filter((Te,me)=>me<=(ue==null?void 0:ue.length)-1)),fe});else if((Ne==null?void 0:Ne.comp)==="Form"){let fe="";if(ue==null||ue.forEach(ke=>{fe=fe===""?fe+ke:fe+","+ke}),Ne.compData=(st=Ne==null?void 0:Ne.compData)==null?void 0:st.map(ke=>{var Oe;return(ke==null?void 0:ke.key)==="formContent"&&(ke.contents=(Oe=ke.contents)==null?void 0:Oe.map(Te=>(Te.value=fe,Te))),ke}),(it=fe==null?void 0:fe.split(","))!=null&&it.find(ke=>ke.includes(".obj"))){let ke={};ke.suffix=".obj";const Oe=[];let Te=await((be=(Le=fe==null?void 0:fe.split(","))==null?void 0:Le.filter(me=>me.includes(".obj")||me.includes(".mtl")))==null?void 0:be.map(async me=>{var Ve,lt;if(me.includes(".obj")){const ht=(((Ve=ge==null?void 0:ge.find(at=>(at==null?void 0:at.key)===$))==null?void 0:Ve.download)??"")+"/"+me,pt=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ie=await pe.axios.post(ht,null,{responseType:"blob",headers:{Authorization:pt,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var Re=new Blob([Ie.data],{type:"application/octet-stream;charset=UTF-8"});ke.blob=Re}else if(me.includes(".mtl")){const ht=(((lt=ge==null?void 0:ge.find(Ct=>(Ct==null?void 0:Ct.key)===$))==null?void 0:lt.download)??"")+"/"+me,pt=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ie=await pe.axios.post(ht,null,{responseType:"blob",headers:{Authorization:pt,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var Re=new Blob([Ie.data],{type:"application/octet-stream;charset=UTF-8"});Oe.push(Re)}}));await Promise.all(Te),ke.mtlBlobs=Oe,k.value.loadModelByDefaultPath([ke])}else{const ke=[];let Oe=await((Qe=fe==null?void 0:fe.split(","))==null?void 0:Qe.map(async Te=>{var pt,Ie;let me={};me.suffix="."+((pt=Te==null?void 0:Te.split("."))==null?void 0:pt[1]);const Ve=(((Ie=ge==null?void 0:ge.find(at=>(at==null?void 0:at.key)===$))==null?void 0:Ie.download)??"")+"/"+Te,lt=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),ut=await pe.axios.post(Ve,null,{responseType:"blob",headers:{Authorization:lt,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var ht=new Blob([ut.data],{type:"application/octet-stream;charset=UTF-8"});me.blob=ht,ke.push(me)}));await Promise.all(Oe),k.value.loadModelByDefaultPath(ke)}}}return Ne}));he.showItems.value=await Promise.all(rt)}}l.value++,d.value=!1},Y=e.ref(""),F=e.ref("open"),q=e.ref("open"),se=e.ref(!1),ce=()=>{const V=document.getElementById("menuCollapse");F.value==="open"?(V.style.width="18.75rem",V.style.height="96%",V.style.overflow="auto"):(V.style.width="50px",V.style.height="50px",V.style.overflow="hidden")},D=()=>{const V=document.getElementById("operateCollapse");q.value==="open"?(V.style.width="25rem",V.style.height="96%",V.style.overflow="auto"):(V.style.width="50px",V.style.height="50px",V.style.overflow="hidden")},p=()=>{se.value=!se.value;const V=document.getElementById("operateCollapse"),$=document.getElementById("menuCollapse");se.value?($.style.width="18.75rem",V.style.width="calc(100% - 24rem)"):V.style.width="400px"},J=V=>{const $=URL.createObjectURL(V),X=document.createElement("a");X.href=$,X.download="file.txt",document.body.appendChild(X),X.click(),document.body.removeChild(X),URL.revokeObjectURL($),h.value=!1},ae=async()=>{var I,W,re,_e,Ae,je,$e,Ee,de,Ue,ze,Ye,et,tt,Xe,nt;h.value=!0;let V=(I=_.value)==null?void 0:I.split("/"),$=V[(V==null?void 0:V.length)-2];const X=((W=ge==null?void 0:ge.find(Be=>(Be==null?void 0:Be.key)===$))==null?void 0:W.value)??"";let ne="";const U=await pe.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});if(((re=U==null?void 0:U.data)==null?void 0:re.code)===200)ne=`Bearer ${(Ae=(_e=U.data)==null?void 0:_e.result)==null?void 0:Ae.accessToken}`,sessionStorage.setItem("magicToken",ne);else throw pe.ElMessage.error("响应出错了"),new Error("响应出错了");const z=ne===""?"123456":ne,w=await pe.axios.post(X,null,{headers:{Authorization:z,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((je=w==null?void 0:w.data)==null?void 0:je.code)===200){if(r.IsJson((Ee=($e=w==null?void 0:w.data)==null?void 0:$e.result)==null?void 0:Ee.result)){const Be=(et=(Ye=(ze=JSON.parse((Ue=(de=w==null?void 0:w.data)==null?void 0:de.result)==null?void 0:Ue.result))==null?void 0:ze.lines_file_paths)==null?void 0:Ye[0])==null?void 0:et.split("\\"),We=(((tt=ge==null?void 0:ge.find(Se=>(Se==null?void 0:Se.key)===$))==null?void 0:tt.resources)??"")+"/"+((Be==null?void 0:Be[(Be==null?void 0:Be.length)-2])??"outputResources"),ve=await pe.axios.post(We,null,{headers:{Authorization:z,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((Xe=ve==null?void 0:ve.data)==null?void 0:Xe.code)===200){const Se=(nt=ve==null?void 0:ve.data)==null?void 0:nt.result,ue=mt.cloneDeep(he.showItems.value);ue==null||ue.map(async Ge=>{var rt,Ne,ot,st,it;if((Ge==null?void 0:Ge.name)==="输出"&&(Ge==null?void 0:Ge.comp)==="Form"){let Le="";Se==null||Se.forEach(be=>{Le=Le===""?Le+be:Le+","+be}),Ge.compData=(rt=Ge==null?void 0:Ge.compData)==null?void 0:rt.map(be=>{var Qe;return(be==null?void 0:be.key)==="formContent"&&(be.contents=(Qe=be.contents)==null?void 0:Qe.map(fe=>(fe.value=Le,fe))),be}),console.log(221,Le),(Ne=Le==null?void 0:Le.split(","))!=null&&Ne.find(be=>be.includes(".obj"))?(st=(ot=Le==null?void 0:Le.split(","))==null?void 0:ot.filter(be=>be.includes(".obj")||be.includes(".mtl")))==null||st.map(async be=>{var Qe,fe;if(be.includes(".obj")){const Oe=(((Qe=ge==null?void 0:ge.find(Ve=>(Ve==null?void 0:Ve.key)===$))==null?void 0:Qe.download)??"")+"/"+be,Te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),me=await pe.axios.post(Oe,null,{responseType:"blob",headers:{Authorization:Te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let Re=new Blob([me.data],{type:"application/octet-stream;charset=UTF-8"});J(Re)}else if(be.includes(".mtl")){const Oe=(((fe=ge==null?void 0:ge.find(Ve=>(Ve==null?void 0:Ve.key)===$))==null?void 0:fe.download)??"")+"/"+be,Te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),me=await pe.axios.post(Oe,null,{responseType:"blob",headers:{Authorization:Te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let Re=new Blob([me.data],{type:"application/octet-stream;charset=UTF-8"});J(Re)}}):(it=Le==null?void 0:Le.split(","))==null||it.map(async be=>{var me,Re;""+((me=be==null?void 0:be.split("."))==null?void 0:me[1]);const fe=(((Re=ge==null?void 0:ge.find(Ve=>(Ve==null?void 0:Ve.key)===$))==null?void 0:Re.download)??"")+"/"+be,ke=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Oe=await pe.axios.post(fe,null,{responseType:"blob",headers:{Authorization:ke,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let Te=new Blob([Oe.data],{type:"application/octet-stream;charset=UTF-8"});J(Te)})}})}else throw pe.ElMessage.error("响应出错了"),new Error("响应出错了")}}else throw pe.ElMessage.error("响应出错了"),new Error("响应出错了")};return(V,$)=>{const X=e.resolveComponent("el-button"),ne=e.resolveComponent("el-avatar"),U=e.resolveComponent("el-header"),z=e.resolveComponent("el-container"),w=e.resolveComponent("el-icon"),I=e.resolveComponent("el-input"),W=e.resolveComponent("el-aside"),re=e.resolveComponent("el-collapse-item"),_e=e.resolveComponent("el-collapse"),Ae=e.resolveComponent("el-main"),je=e.resolveComponent("router-view"),$e=e.resolveDirective("loading");return e.unref(N)==="edit"?(e.openBlock(),e.createBlock(z,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(U,{class:"client-structure-header"},{default:e.withCtx(()=>{var Ee;return[e.createElementVNode("div",is,[e.createVNode(X,{class:"select-icon",onClick:e.unref(he.onBack)},{default:e.withCtx(()=>$[6]||($[6]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[6]},8,["onClick"]),e.createVNode(X,{class:"select-icon",onClick:$[0]||($[0]=de=>{var Ue,ze;return e.unref(he.clickSavePage)((ze=(Ue=e.unref(u))==null?void 0:Ue.map(Ye=>Ye.value))==null?void 0:ze.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(ft.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[$[7]||($[7]=e.createTextVNode(" 保存页面 "))]),_:1,__:[7]})]),e.createElementVNode("div",as,[(e.openBlock(),e.createBlock(pn,{key:e.unref(u),breadArray:e.unref(u),onClick:e.unref(he.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",rs,[e.createElementVNode("div",ls,[e.renderSlot(V.$slots,"default",{},void 0,!0)]),e.createVNode(ne,{size:35,src:(Ee=e.unref(R))==null?void 0:Ee.avatarUrl},{default:e.withCtx(()=>{var de;return[e.createTextVNode(e.toDisplayString(((de=e.unref(R))==null?void 0:de.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(N)==="edit"?(e.openBlock(),e.createBlock(z,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",cs,[e.createVNode(dt.modelSelect)]),e.createElementVNode("div",ds,[e.createVNode(dt.modelShow)]),e.createElementVNode("div",us,[e.createVNode(dt.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(z,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(U,{class:"client-header"},{default:e.withCtx(()=>{var Ee;return[e.createElementVNode("div",hs,[e.createVNode(ft.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),e.createTextVNode(" "+e.toDisplayString(e.unref(g)===""?"CPMPIP":e.unref(g)),1)]),e.createElementVNode("div",ps,[e.createVNode(ss,{mode:"horizontal"})]),e.createElementVNode("div",fs,[e.createVNode(I,{modelValue:Y.value,"onUpdate:modelValue":$[1]||($[1]=de=>Y.value=de),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(w,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(un.search_default))]),_:1})]),_:1},8,["modelValue"]),e.unref(N)==="view"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-icon",onClick:$[2]||($[2]=(...de)=>e.unref(he.onSelectFixContent)&&e.unref(he.onSelectFixContent)(...de))},[e.createElementVNode("div",ms,[e.createVNode(ft.SvgIcon,{name:"write",style:{width:"clamp(12px, 0.9375rem, 15px)",height:"clamp(12px, 0.9375rem, 15px)"}})]),$[8]||($[8]=e.createElementVNode("div",{class:"layout-trigger"},e.toDisplayString("修改布局"),-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",gs,[e.renderSlot(V.$slots,"default",{},void 0,!0)]),e.createVNode(ne,{size:35,src:(Ee=e.unref(R))==null?void 0:Ee.avatarUrl},{default:e.withCtx(()=>{var de;return[e.createTextVNode(e.toDisplayString(((de=e.unref(R))==null?void 0:de.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(z,{class:"client-body"},{default:e.withCtx(()=>[V.$route.path==="/"?(e.openBlock(),e.createBlock(Ae,{key:0,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(_e,{modelValue:F.value,"onUpdate:modelValue":$[3]||($[3]=Ee=>F.value=Ee),accordion:"",class:"client-aside",id:"menuCollapse",onChange:ce},{default:e.withCtx(()=>[e.createVNode(re,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(ft.SvgIcon,{name:F.value===""?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>[e.createVNode(W,{style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Ft.default,{mode:"vertical"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",bs,[e.createVNode(Ro,{isShow:j.value,windowConfig:M.windowConfig,ref_key:"threeModelRef",ref:k},null,8,["isShow","windowConfig"])]),e.createVNode(_e,{modelValue:q.value,"onUpdate:modelValue":$[5]||($[5]=Ee=>q.value=Ee),accordion:"",class:"client-main-operate",id:"operateCollapse",onChange:D},{default:e.withCtx(()=>[e.createVNode(re,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(ft.SvgIcon,{name:q.value==="open"?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>{var Ee;return[e.createElementVNode("div",null,[e.createVNode(ft.SvgIcon,{class:"fold-icon",name:se.value?"Right":"Left",onClick:p},null,8,["name"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ee=e.unref(mt.cloneDeep)(e.unref(he.showItems)))==null?void 0:Ee.filter(de=>de.comp!=="FormTop"),(de,Ue)=>{var ze;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:Ue},[((ze=de==null?void 0:de.comp)==null?void 0:ze.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",ys,e.toDisplayString(de.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(he.getComponents)(de.comp)),{compName:de.name,itemData:de==null?void 0:de.compData,childItemData:de==null?void 0:de.itemChildData,key:(de==null?void 0:de.id)??Ue,onChange:e.unref(he.onChange),index:(de==null?void 0:de.id)??Ue,onContentChange:e.unref(he.onContentChange),onPageChange:e.unref(he.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),c.value?(e.openBlock(),e.createElementBlock("div",ws,[v.value?(e.openBlock(),e.createBlock(Qt._sfc_main,{key:0,class:"calculator-content",onClickTrigger:ae,loading:h.value,modelValue:"预览"},null,8,["loading"])):e.createCommentVNode("",!0),e.createVNode(Qt._sfc_main,{class:"calculator-content",onClickTrigger:$[4]||($[4]=de=>x()),loading:d.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0)])]}),_:1})]),_:1},8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(Ae,{key:1,class:"client-router"},{default:e.withCtx(()=>[e.createElementVNode("div",_s,[e.createVNode(W,{width:"300px"},{default:e.withCtx(()=>[e.createVNode(Ft.default,{mode:"vertical"})]),_:1})]),e.createVNode(Ae,{class:"router-main"},{default:e.withCtx(()=>[e.createVNode(je)]),_:1})]),_:1}))]),_:1})]),_:3})),[[$e,e.unref(A)]])}}}),Cs=bt._export_sfc(ks,[["__scopeId","data-v-52361f55"]]),vs={class:"system-wrap"},xs={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},content:String,jsonContents:Array},setup(M){const o=r.useModelComp(Je.pinia),l=r.useUnit(Je.pinia),d=pe.useMenuState();e.ref(!1);const u=e.ref(!0),c=M,v=e.computed(()=>(c==null?void 0:c.platform)==="browser"?[{name:"--ssbutton-theme-color",value:"#fff"},{name:"--ssbutton-theme-bg",value:"var(--ssComponent-primary-color)"}]:[{name:"--ssbutton-theme-color",value:"#323333"},{name:"--ssbutton-theme-bg",value:"#72B02D"}]),h=b=>{const m=document.documentElement;b==null||b.forEach(L=>{m.style.setProperty(L.name,L.value)})};return e.watch(()=>c.platform,(b,m)=>{b&&h(v.value)},{immediate:!0}),e.watch(()=>[c==null?void 0:c.content,c==null?void 0:c.jsonContents],async()=>{var L,R,O,N;if(((L=c==null?void 0:c.jsonContents)==null?void 0:L.length)>0){o.setOriginalData(c==null?void 0:c.jsonContents);return}if(!(c!=null&&c.content)||((R=c==null?void 0:c.content)==null?void 0:R.length)===0)return;u.value=!0,d.setImportLoading(!0);let b=[],m=[];l.setSelectTitle([]),l.setSelectIndex(""),l.setSelectMenu(""),(N=(O=c==null?void 0:c.content)==null?void 0:O.filter(P=>P!==""))==null||N.forEach(P=>{gt.isExpandStringToJson(P)?m.push(gt.expandStringToJson(P)):gt.expandNewStringToJson(P)?m.push(gt.expandNewStringToJson(P)):gt.expandContentStringToJson(P)?m.push(gt.expandContentStringToJson(P)):m.push(he.expandToNewContents(P))}),b=m==null?void 0:m[0],await he.savePageDataAsync(b),await r.loadingSystemType(),o.setOriginalData(b),d.setImportLoading(!1)},{deep:!0,immediate:!0}),(b,m)=>(e.openBlock(),e.createElementBlock("div",vs,[M.platform==="browser"?(e.openBlock(),e.createBlock(ns,{key:0},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default",{},void 0,!0)]),_:3})):(e.openBlock(),e.createBlock(Cs,{key:1,windowConfig:M.windowConfig},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig"]))]))}},Es=bt._export_sfc(xs,[["__scopeId","data-v-136f5a47"]]),Ns={class:"add-model-content"},Ts={key:0,class:"model-operate"},As={class:"model-select"},Ms={class:"model-fill"},Ss={key:1,class:"model-view"},Ps={key:0,class:"model-import-data"},Ls={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(M,{emit:o}){const l=M,d=o,u=e.ref([]),c=e.ref([]),v=e.ref([]),h=e.ref(0),b=r.useModelComp(Je.pinia),m=pe.useMenuState(Je.pinia),{itemData:L,originalData:R}=pe.storeToRefs(b),{activeMenuPath:O,platform:N}=pe.storeToRefs(m),P=e.ref(null),T=e.ref(0),y=e.ref([]);e.ref("");const E=e.ref(0),k=g=>{d("contentChange",g)},G=g=>{var S;const j=(S=mt.cloneDeep(g==null?void 0:g.wholeValue))==null?void 0:S.map(x=>{var Y;return(x==null?void 0:x.comp)==="Form"&&(x.compData=(Y=x.compData)==null?void 0:Y.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=gt.arrayToNumberArray(F==null?void 0:F.contents)),F))),x});d("change",{originalContents:R.value,currentContents:g==null?void 0:g.wholeValue,editContent:g==null?void 0:g.editValue,arrayToContents:j})};e.watch(()=>c.value,()=>{E.value===c.value.length&&c.value.length!==0&&(u.value=c.value)},{deep:!0,immediate:!0});const A=()=>{P.value.click()},_=async g=>{const j=g.target.files;if(!j)return;new FileReader,u.value=[],c.value=[],E.value=j.length;const S=Array.from(j).map(async x=>await new Promise(Y=>{const F=new FileReader;F.onload=q=>{try{c.value.push(q.target.result),T.value++}catch(se){console.error("解析失败:",se);return}},F.onerror=()=>Y(`读取 ${x.name} 失败`),F.readAsText(x),g.target.value="",P.value=null}));await Promise.all(S)};return e.watch(()=>[l==null?void 0:l.content,l==null?void 0:l.jsonContents],async()=>{await r.loadingSystemType(),u.value=l.content,v.value=l==null?void 0:l.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>T.value,()=>{var g;((g=y.value)==null?void 0:g.length)!==0&&(b.setOriginalData(y.value),b.setItemData(y.value))},{deep:!0,immediate:!0}),(g,j)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ns,[(l==null?void 0:l.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",As,[e.createVNode(dt.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:h.value},[e.createVNode(dt.modelShow)])),e.createElementVNode("div",Ms,[e.createVNode(dt.modelFill)])])):e.createCommentVNode("",!0),(l==null?void 0:l.mode)==="view"?(e.openBlock(),e.createElementBlock("div",Ss,[(e.openBlock(),e.createBlock(Es,{platform:e.unref(N),content:u.value,onChange:G,jsonContents:v.value,onContentChange:k,key:h.value},{default:e.withCtx(()=>{var x;return[((x=l==null?void 0:l.jsonContents)==null?void 0:x.length)===0&&(l!=null&&l.showButton)?(e.openBlock(),e.createElementBlock("div",Ps,[e.createElementVNode("div",{class:"import-button",onClick:A},[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:P,accept:".txt, .inm",onChange:_,style:{display:"none"},multiple:""},null,544),e.createVNode(S,{name:"import",style:{width:"clamp(12px, 0.9375rem, 15px)",height:"clamp(12px, 0.9375rem, 15px)"}}),j[0]||(j[0]=e.createElementVNode("div",{class:"import-trigger"},e.toDisplayString("导入模型"),-1))])])):e.createCommentVNode("",!0)]}),_:1},8,["platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Vs=bt._export_sfc(Ls,[["__scopeId","data-v-63a4bd9d"]]);exports.default=Vs;
@@ -1,6 +1,6 @@
1
- import { g as S, u as P, E as v } from "./menu-dd51TtC8.js";
2
- import { p as K } from "./index-DE3uvzqv.js";
3
- import { u as k } from "./login-UhUPZuPH.js";
1
+ import { g as S, u as P, E as v } from "./menu-Cz_bKvvF.js";
2
+ import { p as K } from "./index-Cp2TaWYh.js";
3
+ import { u as k } from "./login-CbV19Ghf.js";
4
4
  import { ref as h } from "vue";
5
5
  const A = P(K), E = k(K), x = h(!1), D = h(!1), q = async () => {
6
6
  const I = S({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-C1lQOWLE.cjs");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-DtXhNelA.cjs");exports.default=e._sfc_main;
@@ -1,8 +1,8 @@
1
1
  import { computed as b, getCurrentInstance as qe, inject as ve, unref as u, ref as A, onMounted as ie, watch as W, toRef as Ke, onUnmounted as Vn, shallowRef as Ve, nextTick as V, defineComponent as Z, useAttrs as _n, useSlots as un, createElementBlock as F, openBlock as E, normalizeStyle as Ye, normalizeClass as w, createCommentVNode as k, Fragment as _e, createElementVNode as P, renderSlot as Y, createBlock as M, withCtx as L, resolveDynamicComponent as K, mergeProps as ut, withModifiers as ke, createVNode as oe, toDisplayString as J, onBeforeUnmount as xe, provide as cn, Text as Dn, reactive as dn, h as Un, watchEffect as Kn, isRef as Yn, onScopeDispose as Wn, markRaw as ct, toRefs as Gn, resolveComponent as Ce, Transition as qn, withDirectives as tt, withKeys as Re, createTextVNode as nt, vShow as ot, isVNode as fn, render as vn } from "vue";
2
- import { S as Ft, i as pn, d as bt, t as hn, f as Pt, g as Xn, h as se, j as Ht, k as Xe, m as de, n as ye, o as We, p as gn, q as fe, v as jn, w as Jn, x as Zn, y as Qn, z as Te, A as Ie, B as Me, _ as Be, C as pe, V as eo, D as to, F as no, G as oo, H as ae, N as De, I as ao, J as Ge, K as mn, L as yt, M as ro, O as dt, P as so, Q as $t, R as io, T as zt, U as lo, W as uo, X as co, Y as fo, Z as vo, $ as po, a0 as Vt, a1 as _t, a2 as ho } from "./index-CSMb6JUa.js";
2
+ import { S as Ft, i as pn, d as bt, t as hn, f as Pt, g as Xn, h as se, j as Ht, k as Xe, m as de, n as ye, o as We, p as gn, q as fe, v as jn, w as Jn, x as Zn, y as Qn, z as Te, A as Ie, B as Me, _ as Be, C as pe, V as eo, D as to, F as no, G as oo, H as ae, N as De, I as ao, J as Ge, K as mn, L as yt, M as ro, O as dt, P as so, Q as $t, R as io, T as zt, U as lo, W as uo, X as co, Y as fo, Z as vo, $ as po, a0 as Vt, a1 as _t, a2 as ho } from "./index-CbexiBQe.js";
3
3
  import { m as go } from "./typescript-BpuhIBuJ.js";
4
- import { d as Dt, i as bn, a as mo, b as bo, e as yn, f as yo } from "./cloneDeep-BC6hApUL.js";
5
- import { i as En } from "./index.vue_vue_type_script_setup_true_lang-CApK0j7g.js";
4
+ import { d as Dt, i as bn, a as mo, b as bo, e as yn, f as yo } from "./cloneDeep-CyHCXJlk.js";
5
+ import { i as En } from "./index.vue_vue_type_script_setup_true_lang-sulrbmY4.js";
6
6
  function Eo(e) {
7
7
  return e;
8
8
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DpgIfvxQ.cjs"),a=require("./index-B0WB2KTa.cjs"),r=require("./index-BTnKTcJy.cjs"),o=require("./index-Tu-PtE4a.cjs"),s=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c={class:"role-wrapper"},i=e.defineComponent({__name:"index",setup(d){const t=e.reactive({...r.State});return e.onMounted(async()=>{t.structureId=await o.getActivePageStructureId()}),(l,_)=>(e.openBlock(),e.createElementBlock("div",c,[e.createVNode(n.ssForm,{class:"role-header",rowContents:t.queryFormData,isEnableWrap:!1,isEdit:!0,onChange:t.handleQueryChange},null,8,["rowContents","onChange"]),e.createVNode(a.ssTable,{class:"role-body",itemData:t.pageData,onChange:t.handleItemDataChange},null,8,["itemData","onChange"])]))}}),u=s._export_sfc(i,[["__scopeId","data-v-c1856cfa"]]);exports.default=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-OOftrl9c.cjs"),a=require("./index-D2bZ9sIF.cjs"),r=require("./index-pdXSCRCL.cjs"),o=require("./index-TKqKxTvD.cjs"),s=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c={class:"role-wrapper"},i=e.defineComponent({__name:"index",setup(d){const t=e.reactive({...r.State});return e.onMounted(async()=>{t.structureId=await o.getActivePageStructureId()}),(l,_)=>(e.openBlock(),e.createElementBlock("div",c,[e.createVNode(n.ssForm,{class:"role-header",rowContents:t.queryFormData,isEnableWrap:!1,isEdit:!0,onChange:t.handleQueryChange},null,8,["rowContents","onChange"]),e.createVNode(a.ssTable,{class:"role-body",itemData:t.pageData,onChange:t.handleItemDataChange},null,8,["itemData","onChange"])]))}}),u=s._export_sfc(i,[["__scopeId","data-v-c1856cfa"]]);exports.default=u;