ss-component-new 1.1.429 → 1.1.430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-C3OjTdFF.cjs → array-BE8kxwbF.cjs} +1 -1
- package/dist/{array-DriW7TrH.js → array-CmTW1wXQ.js} +1 -1
- package/dist/icons/svg/EyeFill.svg +1 -0
- package/dist/{index-BHxlvMv6.js → index-B3sv--5l.js} +10 -10
- package/dist/{index-CeMds4uE.cjs → index-B8ONEgpW.cjs} +1 -1
- package/dist/{index-C041luJT.cjs → index-BCFtIIf_.cjs} +1 -1
- package/dist/{index-B1X-bNE0.js → index-BWHERznY.js} +4 -4
- package/dist/{index-DAgE3WO9.cjs → index-BZkQ29Tz.cjs} +1 -1
- package/dist/{index-D9rAVZEL.cjs → index-B_AUqKy_.cjs} +1 -1
- package/dist/{index-o4WPwqzp.cjs → index-Bb7GoIJp.cjs} +2 -2
- package/dist/{index-DdLcYvE3.js → index-BiuhwvlL.js} +9 -9
- package/dist/{index-BGLizV4G.js → index-BnlhM9YS.js} +7 -7
- package/dist/{index-DjBjjDpg.js → index-BwhVhBYj.js} +5 -5
- package/dist/index-C-jjWrUl.cjs +1 -0
- package/dist/{index-X7EJLhQp.js → index-CMBrDaM5.js} +1 -1
- package/dist/{index-De1s3ea7.cjs → index-CNpklHzK.cjs} +1 -1
- package/dist/index-CONyMR2I.cjs +74 -0
- package/dist/{index-DuomA_Ys.js → index-CSj1osh5.js} +6 -6
- package/dist/{index-CLr3y5Du.js → index-CYOSbBn4.js} +212 -219
- package/dist/{index-DGnJNcjc.cjs → index-CjlMUufz.cjs} +1 -1
- package/dist/{index-Drc2BWLn.cjs → index-Clor83sA.cjs} +1 -1
- package/dist/{index-DB1AfPdQ.cjs → index-CqaFuVhy.cjs} +1 -1
- package/dist/{index-CrsymeXk.js → index-Cqd4dRu7.js} +4 -4
- package/dist/{index-exhk8lMr.js → index-CrtuDvMe.js} +1 -1
- package/dist/{index-D2PXGh3y.cjs → index-CsHPoVQL.cjs} +1 -1
- package/dist/{index-BDHFJwhX.js → index-CzfGrSpV.js} +7021 -7051
- package/dist/{index-Ci4dnyyZ.cjs → index-D2aIlMCu.cjs} +1 -1
- package/dist/{index-DErdQiE5.cjs → index-D3ah-UXX.cjs} +1 -1
- package/dist/{index-DMqZtCR1.cjs → index-D5JRjtWD.cjs} +1 -1
- package/dist/{index-B7NzplQm.cjs → index-D6iTzH06.cjs} +1 -1
- package/dist/{index-dpjmnZm7.js → index-DDoTCY3C.js} +5 -5
- package/dist/{index-BHO7rTdQ.js → index-DFilfUFX.js} +3 -3
- package/dist/{index-CaW2QXnl.cjs → index-DIxSv5u4.cjs} +1 -1
- package/dist/{index-oM_7BEoi.cjs → index-DOm1fXtU.cjs} +1 -1
- package/dist/{index-C5htghVN.js → index-DQq3rsff.js} +5 -5
- package/dist/{index-DpCi5S7b.cjs → index-DUPkZILz.cjs} +1 -1
- package/dist/{index-ByT2pf2G.js → index-DXtXtduX.js} +4 -4
- package/dist/{index-Cu9nFCcK.cjs → index-D_j7_Hn_.cjs} +1 -1
- package/dist/{index-BkvkvC9V.js → index-Daqdy9e9.js} +17274 -17247
- package/dist/{index-DOdaH5Dk.js → index-DeXnZk4X.js} +6 -6
- package/dist/{index-uSX5QLdo.js → index-Di1ajNKI.js} +4 -4
- package/dist/{index-F-6m4uLc.js → index-DkiBGvqU.js} +1 -1
- package/dist/{index-C4I9I7dr.js → index-DxCiQhlC.js} +2 -2
- package/dist/{index-DhsJZNDO.cjs → index-DxNyBY1w.cjs} +1 -1
- package/dist/{index-b6bi-mnI.cjs → index-DygfoHkC.cjs} +1 -1
- package/dist/{index-BNA4Hofc.js → index-EzZiR3ly.js} +4 -4
- package/dist/{index-BMTUQiR1.js → index-LoH8EwXA.js} +3 -3
- package/dist/{index-Nzu-Yg3L.cjs → index-N9Y_z5k_.cjs} +1 -1
- package/dist/{index-CRBAzfEs.cjs → index-PdwN7EaB.cjs} +1 -1
- package/dist/{index-DqlG2nHS.js → index-eH2F0oMQ.js} +3 -3
- package/dist/{index-AFInDriS.cjs → index-gXA0eS6O.cjs} +13 -13
- package/dist/{index-BGNfD1q7.cjs → index-o5dof3CA.cjs} +1 -1
- package/dist/{index-BEBs6lDF.js → index-pvjM6t0d.js} +6 -6
- package/dist/{index-1lEb6AxE.js → index-qEFkFDy8.js} +7 -7
- package/dist/{index-d_3spDmN.js → index-uatggqnf.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-CQS0yIXC.cjs → index.vue_vue_type_script_setup_true_lang-EaaJleWP.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-r5ntXx1H.js → index.vue_vue_type_script_setup_true_lang-YlUeUQJ4.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BcnUrtwr.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bw_ydbnW.cjs} +58 -58
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DhjhVvbJ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CClJxB6F.js} +6849 -6849
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B95fnBYd.cjs → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B2duMdZT.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-_nLEVa23.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-CcYfjXoA.js} +8 -8
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-TQjM60R4.js +1947 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-Z8fBYrL9.cjs +1 -0
- package/dist/{login-Dz-Choxe.js → login-B520hsEu.js} +1 -1
- package/dist/{login-4CQsNYqj.cjs → login-BMAi9yYX.cjs} +1 -1
- package/dist/{main-D4TIX5ZJ.js → main-Dpbg9Pxc.js} +6 -6
- package/dist/{main-Dr2n-t77.cjs → main-yzKa6bxy.cjs} +1 -1
- package/dist/{menu-DRqy2FlY.cjs → menu-BAEUpxbd.cjs} +8 -8
- package/dist/{menu-C47R8xaz.js → menu-qAL8FiSW.js} +5 -3
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +10 -10
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/dist/{threeModel-DC6dUe7Z.js → threeModel-ClGUp5fG.js} +628 -752
- package/dist/threeModel-CxKWxMlL.cjs +1 -0
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_e7dd7d83_lang-P-VgKxw9.cjs → threeModel.vue_vue_type_style_index_0_scoped_3e87dec6_lang-BOT5Tivd.cjs} +181 -181
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_e7dd7d83_lang-DHvoNEJo.js → threeModel.vue_vue_type_style_index_0_scoped_3e87dec6_lang-DYhzYEGg.js} +4567 -5349
- package/package.json +1 -1
- package/public/icons/svg/EyeFill.svg +1 -0
- package/dist/index-D5QWCaxA.cjs +0 -87
- package/dist/index-DsAxFIrB.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-B9DK4OqF.js +0 -1929
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-CBxAbUn1.cjs +0 -1
- package/dist/threeModel-CiX5oIo9.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const ge=require("./index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B95fnBYd.cjs"),R=require("vue"),N=require("./menu-DRqy2FlY.cjs"),ra=require("vue-router"),Ve=require("./login-4CQsNYqj.cjs"),ta=require("./index-AFInDriS.cjs"),J=require("./index-DhsJZNDO.cjs"),y=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BcnUrtwr.cjs"),je=require("./crypto-CRbcEKIz.cjs"),Ce=require("./index-CRBAzfEs.cjs"),Qe=require("./index-Ci4dnyyZ.cjs"),oa=require("./index-De1s3ea7.cjs"),ca=require("./index-Nzu-Yg3L.cjs"),Fe=require("./threeModel.vue_vue_type_style_index_0_scoped_e7dd7d83_lang-P-VgKxw9.cjs"),se=require("./index-o4WPwqzp.cjs"),ia=require("./index-DB1AfPdQ.cjs"),ua=require("./index-DErdQiE5.cjs"),ke=require("./array-C3OjTdFF.cjs");function pa(e,a){let s;const n=R.ref(!1),l=R.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function t(d){l.text=d}function c(){const d=l.parent,M=D.ns;if(!d.vLoadingAddClassList){let v=d.getAttribute("loading-number");v=Number.parseInt(v)-1,v?d.setAttribute("loading-number",v.toString()):(se.removeClass(d,M.bm("parent","relative")),d.removeAttribute("loading-number")),se.removeClass(d,M.bm("parent","hidden"))}f(),i.unmount()}function f(){var d,M;(M=(d=D.$el)==null?void 0:d.parentNode)==null||M.removeChild(D.$el)}function u(){var d;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(s),s=setTimeout(r,400),l.visible=!1,(d=e.closed)==null||d.call(e))}function r(){if(!n.value)return;const d=l.parent;n.value=!1,d.vLoadingAddClassList=void 0,c()}const o=R.defineComponent({name:"ElLoading",setup(d,{expose:M}){const{ns:v,zIndex:A}=se.useGlobalComponentSettings("loading");return M({ns:v,zIndex:A}),()=>{const E=l.spinner||l.svg,k=R.h("svg",{class:"circular",viewBox:l.svgViewBox?l.svgViewBox:"0 0 50 50",...E?{innerHTML:E}:{}},[R.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),B=l.text?R.h("p",{class:v.b("text")},[l.text]):void 0;return R.h(R.Transition,{name:v.b("fade"),onAfterLeave:r},{default:R.withCtx(()=>[R.withDirectives(R.createVNode("div",{style:{backgroundColor:l.background||""},class:[v.b("mask"),l.customClass,l.fullscreen?"is-fullscreen":""]},[R.h("div",{class:v.b("spinner")},[k,B])]),[[R.vShow,l.visible]])])})}}}),i=R.createApp(o);Object.assign(i._context,a??{});const D=i.mount(document.createElement("div"));return{...R.toRefs(l),setText:t,removeElLoadingChild:f,close:u,handleAfterLeave:r,vm:D,get $el(){return D.$el}}}let we;const De=function(e={}){if(!se.isClient)return;const a=fa(e);if(a.fullscreen&&we)return we;const s=pa({...a,closed:()=>{var l;(l=a.closed)==null||l.call(a),a.fullscreen&&(we=void 0)}},De._context);ya(a,a.parent,s),Re(a,a.parent,s),a.parent.vLoadingAddClassList=()=>Re(a,a.parent,s);let n=a.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",a.parent.setAttribute("loading-number",n),a.parent.appendChild(s.$el),R.nextTick(()=>s.visible.value=a.visible),a.fullscreen&&(we=s),s},fa=e=>{var a,s,n,l;let t;return se.isString(e.target)?t=(a=document.querySelector(e.target))!=null?a:document.body:t=e.target||document.body,{parent:t===document.body||e.body?document.body:t,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:t===document.body&&((s=e.fullscreen)!=null?s:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(l=e.visible)!=null?l:!0,beforeClose:e.beforeClose,closed:e.closed,target:t}},ya=async(e,a,s)=>{const{nextZIndex:n}=s.vm.zIndex||s.vm._.exposed.zIndex,l={};if(e.fullscreen)s.originalPosition.value=se.getStyle(document.body,"position"),s.originalOverflow.value=se.getStyle(document.body,"overflow"),l.zIndex=n();else if(e.parent===document.body){s.originalPosition.value=se.getStyle(document.body,"position"),await R.nextTick();for(const t of["top","left"]){const c=t==="top"?"scrollTop":"scrollLeft";l[t]=`${e.target.getBoundingClientRect()[t]+document.body[c]+document.documentElement[c]-Number.parseInt(se.getStyle(document.body,`margin-${t}`),10)}px`}for(const t of["height","width"])l[t]=`${e.target.getBoundingClientRect()[t]}px`}else s.originalPosition.value=se.getStyle(a,"position");for(const[t,c]of Object.entries(l))s.$el.style[t]=c},Re=(e,a,s)=>{const n=s.vm.ns||s.vm._.exposed.ns;["absolute","fixed","sticky"].includes(s.originalPosition.value)?se.removeClass(a,n.bm("parent","relative")):se.addClass(a,n.bm("parent","relative")),e.fullscreen&&e.lock?se.addClass(a,n.bm("parent","hidden")):se.removeClass(a,n.bm("parent","hidden"))};De._context=null;const Ie=Symbol("ElLoading"),Ue=(e,a)=>{var s,n,l,t;const c=a.instance,f=d=>se.isObject(a.value)?a.value[d]:void 0,u=d=>{const M=se.isString(d)&&(c==null?void 0:c[d])||d;return M&&R.ref(M)},r=d=>u(f(d)||e.getAttribute(`element-loading-${se.hyphenate(d)}`)),o=(s=f("fullscreen"))!=null?s:a.modifiers.fullscreen,i={text:r("text"),svg:r("svg"),svgViewBox:r("svgViewBox"),spinner:r("spinner"),background:r("background"),customClass:r("customClass"),fullscreen:o,target:(n=f("target"))!=null?n:o?void 0:e,body:(l=f("body"))!=null?l:a.modifiers.body,lock:(t=f("lock"))!=null?t:a.modifiers.lock},D=De(i);D._context=Ae._context,e[Ie]={options:i,instance:D}},da=(e,a)=>{for(const s of Object.keys(a))R.isRef(a[s])&&(a[s].value=e[s])},Ae={mounted(e,a){a.value&&Ue(e,a)},updated(e,a){const s=e[Ie];a.oldValue!==a.value&&(a.value&&!a.oldValue?Ue(e,a):a.value&&a.oldValue?se.isObject(a.value)&&da(a.value,s.options):s==null||s.instance.close())},unmounted(e){var a;(a=e[Ie])==null||a.instance.close(),e[Ie]=null}};Ae._context=null;const ga={install(e){De._context=e._context,Ae._context=e._context,e.directive("loading",Ae),e.config.globalProperties.$loading=De},directive:Ae,service:De},ha=(e,a)=>{var n;return(n=J.tableEveryContents(y.cloneDeep(e)))==null?void 0:n.map(l=>{var t,c,f,u;if(e.comp==="Table")return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a.name,type:"structure",version:1,parentTable:(l==null?void 0:l.parentTableContents)??""},value:{pageData:{comp:(t=J.tableToStruct(y.cloneDeep(l)))==null?void 0:t.comp,compData:(c=J.tableToStruct(y.cloneDeep(l)))==null?void 0:c.compData,name:(f=J.tableToStruct(y.cloneDeep(l)))==null?void 0:f.name}}};if((l==null?void 0:l.key)==="extraButton"){if(((u=Object.values(l==null?void 0:l.value))==null?void 0:u.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a.name,type:"structureMethod",version:1},value:{pageData:l.value}}}else return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a.name,type:"structure",version:1,parentTable:(l==null?void 0:l.parentTableContents)??""},value:{pageData:l}}})},Da=async e=>{let a=[],s=[];e==null||e.map(async n=>{var l;await((l=n.compData)==null?void 0:l.forEach(async t=>{var f,u,r;const c=(f=y.cloneDeep(t==null?void 0:t.contents))==null?void 0:f.map(o=>{if(!Array.isArray(o)){const i=ha(y.cloneDeep(o),n);return i==null?void 0:i[0]}});if(s.push({parentKey:J.getParentKey((u=y.cloneDeep(n))==null?void 0:u.name),content:c}),(c==null?void 0:c.length)>0){const o=await N.batchAddInsofDataApi({dataList:c});a.push(o)}(r=t.contents)==null||r.map(async o=>{var i;Array.isArray(o)||(i=J.tableEveryContents(y.cloneDeep(o)))==null||i.forEach(async D=>{var d,M,v,A,E,k,B;if(o.comp==="Table"){const G=(E=(A=(await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure",version:1,parentTable:(D==null?void 0:D.parentTableContents)??""},value:{pageData:{comp:(d=J.tableToStruct(y.cloneDeep(D)))==null?void 0:d.comp,compData:(M=J.tableToStruct(y.cloneDeep(D)))==null?void 0:M.compData,name:(v=J.tableToStruct(y.cloneDeep(D)))==null?void 0:v.name}}})).data.result)==null?void 0:A[0])==null?void 0:E.id,z=(k=J.tableToContents(y.cloneDeep(D)))==null?void 0:k.map(T=>{var x,h,j,O;if((T==null?void 0:T.length)!==0)return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"data",tableId:G},value:{tableData:J.getValueToObjectValue(T,(O=J.getColumnContents((j=(h=(x=J.tableToStruct(y.cloneDeep(D)))==null?void 0:x.compData)==null?void 0:h.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:j.contents))==null?void 0:O.filter(U=>U!=="操作"))}}}),W=await N.batchAddInsofDataApi({dataList:z});a.push(W);const m=await((B=J.tableToContents(y.cloneDeep(D)))==null?void 0:B.map(async T=>{var O,U,$,P,Z;let x;return(T==null?void 0:T.length)!==0&&(x=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"data",tableId:G},value:{tableData:J.getValueToObjectValue(T,(P=J.getColumnContents(($=(U=(O=J.tableToStruct(y.cloneDeep(D)))==null?void 0:O.compData)==null?void 0:U.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:$.contents))==null?void 0:P.filter(X=>X!=="操作"))}})),await((Z=(await N.getInsofDataApi({key:{parentTable:T,systemKey:sessionStorage.getItem("systemKey"),pageKey:n.name,type:"structure"}})).data.result)==null?void 0:Z.map(async X=>{var ne,ce;return await N.updateInsofDataApi({id:X.id,key:{systemKey:X.key.systemKey,pageKey:X.key.pageKey,type:X.key.type,version:X.key.version,parentTable:X.key.parentTable===""?"":(ce=(ne=x.data.result)==null?void 0:ne[0])==null?void 0:ce.id}})}))}));a.push(m)}})})}))}),await Promise.all(a)},ve=e=>{var n;let a="",s=[];return(n=y.cloneDeep(e).split("/"))==null||n.forEach((l,t)=>{t!==y.cloneDeep(e).split("/").length-1&&s.push(l)}),s==null||s.forEach(l=>{a=a===""?a+l:a+"/"+l}),a},qe=(e,a)=>{var l;let s=(l=e==null?void 0:e.filter(t=>(t==null?void 0:t.label)!=="操作"))==null?void 0:l.map(t=>t==null?void 0:t.label);return a==null?void 0:a.map(t=>J.getValueToObjectValue(t,s))},Je=(e,a)=>{var s,n,l,t,c,f,u,r;return((n=(s=e==null?void 0:e.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:s.contents)==null?void 0:n.length)===0?qe((c=(t=(l=a==null?void 0:a.value)==null?void 0:l.compData)==null?void 0:t.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:c.contents,(f=e==null?void 0:e.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:f.contents):qe((u=e==null?void 0:e.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:u.contents,(r=e==null?void 0:e.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:r.contents)},me=(e,a)=>{var n;let s=y.cloneDeep(e);return s.compData=(n=y.cloneDeep(s.compData))==null?void 0:n.map(l=>((l==null?void 0:l.key)==="formContent"&&(l.contents=a==null?void 0:a.map(t=>{var c,f;return t.value=((f=(c=l.contents)==null?void 0:c.find(u=>u.key===t.key))==null?void 0:f.value)??"",t})),l)),s},va=async e=>{var c,f,u;let a=(c=y.cloneDeep(e))==null?void 0:c.map(r=>r==null?void 0:r.path);const s=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});if(s.data.code!==200)return;let n=new Map;(f=s.data.result)==null||f.forEach(r=>{var i,D,d,M;let o=[{key:r==null?void 0:r.id,name:((D=(i=r==null?void 0:r.value)==null?void 0:i.pageData)==null?void 0:D.name)??"",value:(d=r==null?void 0:r.value)==null?void 0:d.pageData}];n[r.key.pageKey]=((M=n[r.key.pageKey])==null?void 0:M.length)>0?[...n[r.key.pageKey],...o]:o});let l=new Map;a==null||a.forEach(r=>{n[r]&&(l[r]=n[r])});let t=y.cloneDeep(e);t=(u=y.cloneDeep(t))==null?void 0:u.map(r=>{var i,D,d,M;let o=(i=y.cloneDeep(r))==null?void 0:i.key;return o.tableId=(d=(D=l[r==null?void 0:r.path])==null?void 0:D.find(v=>{var A;return(v==null?void 0:v.name)===((A=y.cloneDeep(r))==null?void 0:A.name)}))==null?void 0:d.key,r={key:o,value:(M=y.cloneDeep(r))==null?void 0:M.value},r}),t.length!==0&&await N.batchAddInsofDataApi({dataList:t})},Ke=(e,a)=>{var s,n,l,t,c,f,u,r,o,i,D,d,M,v,A;if(((n=(s=y.cloneDeep(e))==null?void 0:s.filter(E=>{var k;return(E==null?void 0:E.name)===((k=y.cloneDeep(a))==null?void 0:k.name)}))==null?void 0:n.length)===1)return{contents:(u=(f=(c=(t=(l=y.cloneDeep(e))==null?void 0:l.find(E=>{var k;return(E==null?void 0:E.name)===((k=y.cloneDeep(a))==null?void 0:k.name)}))==null?void 0:t.value)==null?void 0:c.compData)==null?void 0:f.find(E=>(E==null?void 0:E.key)==="formContent"))==null?void 0:u.contents,key:(o=(r=y.cloneDeep(e))==null?void 0:r.find(E=>{var k;return(E==null?void 0:E.name)===((k=y.cloneDeep(a))==null?void 0:k.name)}))==null?void 0:o.key};{let E,k,B=(M=(d=(D=(i=y.cloneDeep(a))==null?void 0:i.compData)==null?void 0:D.find(I=>(I==null?void 0:I.key)==="formContent"))==null?void 0:d.contents)==null?void 0:M.map(I=>I==null?void 0:I.key);return(A=(v=y.cloneDeep(e))==null?void 0:v.filter(I=>{var G;return(I==null?void 0:I.name)===((G=y.cloneDeep(a))==null?void 0:G.name)}))==null||A.forEach(I=>{var z,W,m,T,x,h,j,O;let G=(x=(T=(m=(W=(z=y.cloneDeep(I))==null?void 0:z.value)==null?void 0:W.compData)==null?void 0:m.find(U=>(U==null?void 0:U.key)==="formContent"))==null?void 0:T.contents)==null?void 0:x.map(U=>U==null?void 0:U.key);B.every(U=>G.includes(U))&&(E=(O=(j=(h=I==null?void 0:I.value)==null?void 0:h.compData)==null?void 0:j.find(U=>(U==null?void 0:U.key)==="formContent"))==null?void 0:O.contents,k=I==null?void 0:I.key)}),{contents:E,key:k}}},Aa=async e=>{var u,r,o;let a=[];(u=y.cloneDeep(e))==null||u.forEach(i=>{a.push(i.name);let D=ve(y.cloneDeep(i.name));D!==""&&a.push(D)}),a=[...new Set(a)];const s=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});if(s.data.code!==200)return;let n=new Map;(r=s.data.result)==null||r.forEach(i=>{var d,M,v,A;let D=[{key:i==null?void 0:i.id,name:((M=(d=i==null?void 0:i.value)==null?void 0:d.pageData)==null?void 0:M.name)??"",value:(v=i==null?void 0:i.value)==null?void 0:v.pageData}];n[i.key.pageKey]=((A=n[i.key.pageKey])==null?void 0:A.length)>0?[...n[i.key.pageKey],...D]:D});let l=new Map;for(let i in n)a!=null&&a.find(D=>D===i)&&(l[i]=n[i]);let t=[],c=[],f=[];(o=y.cloneDeep(e))==null||o.forEach(i=>{var D,d;l!=null&&l[i.name]?(D=i==null?void 0:i.compData)==null||D.forEach(M=>{var v;(v=M==null?void 0:M.contents)==null||v.forEach(A=>{var E,k,B,I,G,z,W;if((A==null?void 0:A.comp)==="Table"){let m=Je((E=y.cloneDeep(A))==null?void 0:E.compData,(k=y.cloneDeep(l==null?void 0:l[i.name]))==null?void 0:k.find(T=>(T==null?void 0:T.name)===(A==null?void 0:A.name)));m==null||m.forEach(T=>{var x,h;c.push({key:{type:"data",pageKey:i==null?void 0:i.name,tableId:(h=(x=l==null?void 0:l[i.name])==null?void 0:x.find(j=>(j==null?void 0:j.name)===(A==null?void 0:A.name)))==null?void 0:h.key,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:T}})})}else if((I=Ke((B=y.cloneDeep(l))==null?void 0:B[i.name],y.cloneDeep(A)))!=null&&I.contents){let m=me(y.cloneDeep(A),(G=Ke(l==null?void 0:l[i.name],y.cloneDeep(A)))==null?void 0:G.contents);t!=null&&t.find(T=>{var x,h;return(T==null?void 0:T.id)===((h=Ke((x=y.cloneDeep(l))==null?void 0:x[i.name],y.cloneDeep(A)))==null?void 0:h.key)})||t.push({id:(W=Ke((z=y.cloneDeep(l))==null?void 0:z[i.name],y.cloneDeep(A)))==null?void 0:W.key,value:{pageData:m}})}})}):l!=null&&l[ve(i.name)]&&((d=i==null?void 0:i.compData)==null||d.forEach(M=>{var v;(v=M==null?void 0:M.contents)==null||v.forEach(A=>{var E,k,B,I,G,z,W,m,T;if((A==null?void 0:A.comp)==="Table"){let x=(k=(E=l==null?void 0:l[ve(i.name)])==null?void 0:E.find(j=>(j==null?void 0:j.name)===(A==null?void 0:A.name)))==null?void 0:k.value;c.push({key:{type:"structure",pageKey:i==null?void 0:i.name,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),version:1},value:{pageData:x}});let h=Je((B=y.cloneDeep(A))==null?void 0:B.compData,(I=y.cloneDeep(l==null?void 0:l[ve(i.name)]))==null?void 0:I.find(j=>(j==null?void 0:j.name)===(A==null?void 0:A.name)));h==null||h.forEach(j=>{f.push({name:A.name,path:i.name,key:{type:"data",pageKey:i==null?void 0:i.name,tableId:"",systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else{let x=me(y.cloneDeep(A),(T=(m=(W=(z=(G=y.cloneDeep(l==null?void 0:l[ve(i.name)]))==null?void 0:G.find(h=>(h==null?void 0:h.name)===(A==null?void 0:A.name)))==null?void 0:z.value)==null?void 0:W.compData)==null?void 0:m.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:T.contents);c.push({key:{type:"structure",pageKey:i==null?void 0:i.name,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),version:1},value:{pageData:x}})}})}))}),c.length!==0&&(await N.batchAddInsofDataApi({dataList:c}),f.length!==0&&await va(f),t.length!==0&&await N.batchUpdateInsofDataApi({dataList:t}))},ea=N.useMenuState(),Le=e=>e==null?void 0:e.map(a=>(a.contents&&(a.contents=a.contents.filter(s=>{var n;return((n=s.comp)==null?void 0:n.toUpperCase())!=="CALCULATOR"})),a.compData&&(a.compData=Le(a.compData)),a)),ka=async e=>{var s,n,l,t,c,f,u,r,o,i,D,d,M,v,A,E,k,B,I,G,z,W,m;const a=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if((e==null?void 0:e.length)===0){if(((s=a==null?void 0:a.data)==null?void 0:s.code)===200&&(t=(l=(n=a==null?void 0:a.data)==null?void 0:n.result)==null?void 0:l[0])!=null&&t.id){const T=(f=(c=a==null?void 0:a.data)==null?void 0:c.result)==null?void 0:f[0],x=(o=(r=(u=a==null?void 0:a.data)==null?void 0:u.result)==null?void 0:r[0])==null?void 0:o.key;x.systemType="管理系统",await N.updateInsofDataApi({id:T==null?void 0:T.id,key:x})}return}try{if(((i=a==null?void 0:a.data)==null?void 0:i.code)===200&&(M=(d=(D=a==null?void 0:a.data)==null?void 0:D.result)==null?void 0:d[0])!=null&&M.id){const T=(A=(v=a==null?void 0:a.data)==null?void 0:v.result)==null?void 0:A[0],x=(B=(k=(E=a==null?void 0:a.data)==null?void 0:E.result)==null?void 0:k[0])==null?void 0:B.key,h=(I=y.cloneDeep(e))==null?void 0:I.map(j=>{var O;return(O=j.compData)==null?void 0:O[0]});x.systemType=(z=(G=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="type"))==null?void 0:G.contents)==null?void 0:z[0],x.name=(m=(W=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="name"))==null?void 0:W.contents)==null?void 0:m[0],await N.updateInsofDataApi({id:T==null?void 0:T.id,key:x})}}catch(T){return Promise.reject(T)}},Ge=async e=>{var a,s,n,l;try{const t=await N.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"},value:{pageData:e}});if(((a=t==null?void 0:t.data)==null?void 0:a.code)===200){const c=(n=(s=e==null?void 0:e.compData)==null?void 0:s[0])==null?void 0:n.contents;ea.setRawMenus(c??[])}return(l=t==null?void 0:t.data)==null?void 0:l.code}catch(t){return Promise.reject(t)}},Sa=async()=>{var e,a,s,n,l,t,c,f;try{const u=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"}});return((e=u==null?void 0:u.data)==null?void 0:e.code)===200&&((n=(s=(a=u==null?void 0:u.data)==null?void 0:a.result)==null?void 0:s[0])!=null&&n.id)&&await N.deleteInsofDataApi({id:(c=(t=(l=u==null?void 0:u.data)==null?void 0:l.result)==null?void 0:t[0])==null?void 0:c.id}),(f=u==null?void 0:u.data)==null?void 0:f.code}catch(u){return Promise.reject(u)}},ba=async(e,a)=>{var s,n,l,t;try{const c=await N.updateInsofDataApi({id:e,value:{pageData:a}});if(((s=c==null?void 0:c.data)==null?void 0:s.code)===200){const f=(l=(n=a==null?void 0:a.compData)==null?void 0:n[0])==null?void 0:l.contents;ea.setRawMenus(f??[])}return(t=c==null?void 0:c.data)==null?void 0:t.code}catch(c){return Promise.reject(c)}},Ea=async()=>{var e;try{const a=je.generateKeyPair(),s=await N.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"},value:{cryptoInfo:{publicKey:a.publicKey,privateKey:a.privateKey}}});return((e=s==null?void 0:s.data)==null?void 0:e.code)===200}catch(a){throw a}},Ma=async()=>{var a,s,n;const e=await N.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return!(((a=e==null?void 0:e.data)==null?void 0:a.code)===200&&((n=(s=e==null?void 0:e.data)==null?void 0:s.result)==null?void 0:n.length)>0)},wa=async()=>{var a,s,n;const e=await N.getInsofDataApi({key:{type:"structure",pageKey:"secret",systemKey:sessionStorage.getItem("systemKey")}});return!(((a=e==null?void 0:e.data)==null?void 0:a.code)===200&&((n=(s=e==null?void 0:e.data)==null?void 0:s.result)==null?void 0:n.length)>0)},Ka=async e=>{var s,n;let a=y.cloneDeep(e);if(a=[...a,Ce.tempUserPageData,Qe.tempRolePageData,oa.tempDeptPageData,ca.tempPostPageData],sessionStorage.getItem("systemKey"))if(e!=null&&e.find(l=>(l==null?void 0:l.comp)==="MenuTop")){const l=a==null?void 0:a.find(r=>r.comp==="Menu"),t=a==null?void 0:a.filter(r=>r.comp==="System"),c=await Ma(),f=await wa();c&&await Ge(l),await ka(t),f&&Ea();const u=(s=Le(y.cloneDeep(a)))==null?void 0:s.filter(r=>{var o,i,D;return((o=r==null?void 0:r.comp)==null?void 0:o.toUpperCase())!=="MENU"&&((i=r==null?void 0:r.comp)==null?void 0:i.toUpperCase())!=="MENUTOP"&&((D=r==null?void 0:r.comp)==null?void 0:D.toUpperCase())!=="SYSTEM"});await Da(u)}else{const l=a==null?void 0:a.find(c=>c.comp==="Menu");await Sa(),await Ge(l);const t=(n=Le(y.cloneDeep(a)))==null?void 0:n.filter(c=>{var f,u,r;return((f=c==null?void 0:c.comp)==null?void 0:f.toUpperCase())!=="MENU"&&((u=c==null?void 0:c.comp)==null?void 0:u.toUpperCase())!=="MENUTOP"&&((r=c==null?void 0:c.comp)==null?void 0:r.toUpperCase())!=="SYSTEM"});await Aa(t)}},Ia=R.defineComponent({name:"menu",components:{ssMenu:ge.ssMenu,DynamicIcon:ge._sfc_main$1},setup(){const e=R.defineProps({mode:{type:String,default:"vertical"}}),a=R.ref("sub-menu-more"),s=N.useMenuState(),n=Fe.useModelComp(N.pinia),l=R.ref(0),t=ra.useRouter(),{rawMenus:c,activeTopMenuPath:f,isRefreshMenus:u,menuTriggerType:r,permissionSideMenus:o,platform:i,cacheInputMenu:D,activeMainMenu:d}=N.storeToRefs(s),M=Ve.useLoginState(),{structureData:v}=N.storeToRefs(M),A=R.ref([]),E=R.ref([]),k=R.computed(()=>e==null?void 0:e.mode),B=p=>{const g=ga.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});p||g.close()},I=p=>{let g=[],b=[];return p==null||p.forEach(S=>{g=G(S,b)}),g},G=(p,g)=>{const b=g,S=[];p==null||p.forEach(K=>{Array.isArray(K)?S.push({children:G(K,[])}):S.push({title:K})});let w=S.reduce((K,Y)=>(Object.entries(Y).forEach(([_,L])=>{K[_]===void 0?L!=null&&L.title?K[_]=[L]:K[_]=L:(Array.isArray(K[_])||(K[_]=[{title:K[_]}]),L!=null&&L.title||Array.isArray(L)?K[_].push(L):K[_].push({title:L}))}),K),{});return w=z(y.cloneDeep(w)),b.push(w),Array.isArray(b)&&(b==null?void 0:b.length)>1?b:b==null?void 0:b[0]},z=p=>{var g,b,S;return Array.isArray(p==null?void 0:p.title)&&((g=p==null?void 0:p.title)==null?void 0:g.length)===((S=(b=p==null?void 0:p.title)==null?void 0:b.filter(w=>w.title))==null?void 0:S.length)?p==null?void 0:p.title:Array.isArray(p==null?void 0:p.children)?W(p):p},W=p=>{var b;const g=p;return g.children=(b=g.children)==null?void 0:b.map(S=>{var w;return(w=S==null?void 0:S.title)!=null&&w.children?S==null?void 0:S.title:S}),g},m=R.ref({}),T=p=>p==null?void 0:p.map(g=>g.children&&g.children.length>0?{...g,children:g.level===0?[]:g.children??[],childMenus:T(g.children)}:g),x=(p,g)=>{var b,S;return g===0?((S=(b=E.value)==null?void 0:b.find(w=>{var K;return(K=p.title)==null?void 0:K.includes(w.value)}))==null?void 0:S.value)??"wenjianjia":g===1?"wenjianjia":"wenjian"},h=p=>{var g,b;return(b=(g=E.value)==null?void 0:g.find(S=>{var w;return(w=p.title)==null?void 0:w.includes(S.value)}))==null?void 0:b.value},j=(p,g="",b=0)=>{var Y;let S,w=y.cloneDeep(p);const K=(Y=v.value)==null?void 0:Y.map(_=>{var L;return(L=_==null?void 0:_.key)==null?void 0:L.pageKey});return Array.isArray(w)||(w=[w]),S=w==null?void 0:w.map(_=>{const L=g?`${g}/${_.title}`:_.title,F={..._,path:L,level:b,show:!0,icon:i.value==="client"?x(_,b):h(_),carryData:K==null?void 0:K.includes(L),isPenultimate:!_.children,children:[],childMenus:[]};return _.children&&_.children.length>0&&(F.children=j(_.children,L,b+1)),F}),S},O=R.computed(()=>{let p=y.cloneDeep(A.value);if(p=[...p,...o.value],(p==null?void 0:p.length)===0)return t.push("/"),[];const g=C(p,ye.value);g.isFlag||(p=g==null?void 0:g.data);const b=T(p);return s.setMenus(b),b}),U=async p=>{var w,K,Y;let g,b;(p==null?void 0:p.level)===0?b={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),rootNodePath:p==null?void 0:p.path,tableId:""}}:b={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:"/平台管理/菜单管理/"+(p==null?void 0:p.path),tableId:""}};const S=await N.getInsofDataApi(b);return((w=S==null?void 0:S.data)==null?void 0:w.code)===200&&(g=(Y=(K=S.data)==null?void 0:K.result)==null?void 0:Y.map(_=>{var L;return{id:_==null?void 0:_.id,...(L=_==null?void 0:_.value)==null?void 0:L.tableData}}),(p==null?void 0:p.level)===0&&(m.value=y.cloneDeep(g),console.log(77782,m.value))),(g==null?void 0:g.length)>0?g:null},$=async(p,g)=>{var b,S;if(!Array.isArray(g))return p;for(const w of g){let K=(w==null?void 0:w.path)===p.path;if(console.log("findMatchingMenu",w,p),K)return{...p,config:await U(p),icon:(S=(b=w==null?void 0:w.data)==null?void 0:b.menuConfig)==null?void 0:S.menuIcon}}return p},P=R.ref(null),Z=async(p,g=null)=>await Promise.all(p==null?void 0:p.map(async b=>{var K;let S=await $(b,m.value);console.log("recurseFormatAsideMenus",S,m.value);const w=(S==null?void 0:S.config)??((K=g==null?void 0:g.filter(Y=>Y.allowInherit))==null?void 0:K.map(Y=>{var _,L;return{...Y,structureIds:(L=(_=g==null?void 0:g.find(F=>{var H;return((H=F==null?void 0:F.structureIds)==null?void 0:H.length)>0}))==null?void 0:_.structureIds)==null?void 0:L.filter(F=>(F==null?void 0:F.key)==="contentConfig")}}));return S!=null&&S.childMenus&&(S==null?void 0:S.childMenus.length)>0&&(S={...S,config:w,children:await Z(b==null?void 0:b.childMenus,w),childMenus:await Z(b==null?void 0:b.childMenus,w)}),{...S,config:w}})),X=async p=>{var b;const g=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",rootNodePath:p==null?void 0:p.path,structureBelong:"dialogConfig",parentTable:"",version:1}});if(((b=g==null?void 0:g.data)==null?void 0:b.code)===200){P.value=null;const S=y.cloneDeep(g.data.result);return(S==null?void 0:S.length)===0?S:await Z(p.childMenus)}},re=async p=>{var g,b,S;if(s.setMenuTriggerType("click"),n.setRouteToChildPath(""),s.setActiveTopMenuPath(p==null?void 0:p.path),s.setActiveMainMenu(p),await U(p),P.value=null,p!=null&&p.childMenus&&((g=p==null?void 0:p.childMenus)==null?void 0:g.length)>0){const w=(S=(b=p==null?void 0:p.childMenus)==null?void 0:b[0])==null?void 0:S.path;s.setActiveMenuPath(w);const K=await X(p);console.log(666,K);const Y=(K==null?void 0:K.length)===0?p==null?void 0:p.childMenus:K;s.setAsideMenus(Y)}else s.setAsideMenus([]);p.isRouter?t.push(p.path):t.push("/")},ne=p=>{n.setRouteToChildPath(""),r.value==="click"?l.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):p!==a.value&&s.setActiveMenuPath(p):s.setMenuTriggerType("click"),p!=null&&p.startsWith("/")?t.push(p):t.push("/"),l.value++},ce=p=>{p!==a.value&&s.setActiveMenuPath(p)},te=p=>{const g=document.documentElement;p==null||p.forEach(b=>{g.style.setProperty(b.name,b.value)})};R.onMounted(()=>{l.value=1,E.value=ta.getSvgIcons()});const ye=R.computed(()=>{const p=sessionStorage.getItem("authority");return p?JSON.parse(p):[]});R.watch(()=>i.value,p=>{p==="browser"?(te(ge.browserVerticalMenuClasses),te(ge.browserHorizontalMenuClasses)):p==="client"&&(te(ge.clientHorizontalMenuClasses),te(ge.clientVerticalMenuClasses))},{immediate:!0}),R.watch(()=>c.value,p=>{if(p){const g=p;A.value=j(I(g))}else s.setActiveMenuPath("")},{immediate:!0});const q=(p,g)=>{function b(S){S==null||S.forEach(w=>{w.show=g==null?void 0:g.some(K=>K==null?void 0:K.includes(w.path)),w.children&&b(w.children)})}return b(p),p},C=(p,g)=>{if(Array.isArray(g)){const b=Array.from(new Set(g==null?void 0:g.map(S=>S.substring(0,S.lastIndexOf("/")))));return{data:q(p,b),isFlag:!1}}else return{isFlag:(g==null?void 0:g.toUpperCase())==="SUPERADMIN"}},V=p=>{var b;const g=[p==null?void 0:p.title];if(p!=null&&p.children&&((b=p==null?void 0:p.children)==null?void 0:b.length)>0){const S=p.children.map(w=>V(w));g.push(...S)}return g},ie=(p,g,b,S)=>p.map(w=>{var K,Y;if(w.path===b){const _={...w};return console.log(7771,_,S),S==="create"?_.children.push(g):S==="update"?_.children=(K=_.children)==null?void 0:K.map(L=>(L==null?void 0:L.path)===(g==null?void 0:g.path)?g:L):S==="delete"&&(_.children=(Y=_.children)==null?void 0:Y.filter(L=>(L==null?void 0:L.path)!==(g==null?void 0:g.path))),_}else return{...w,children:ie(w.children,g,b,S)}}),Q=async p=>{var b,S,w,K,Y,_;const g=(b=v.value)==null?void 0:b.find(L=>{var F;return((F=L==null?void 0:L.key)==null?void 0:F.pageKey)==="menu"});if(g){const L={...(S=g.value)==null?void 0:S.pageData,compData:(Y=(K=(w=g.value)==null?void 0:w.pageData)==null?void 0:K.compData)==null?void 0:Y.map(H=>H.key==="menuContents"?{...H,contents:p}:H)};await ba(g==null?void 0:g.id,L);const F=(_=O.value)==null?void 0:_.find(H=>(H==null?void 0:H.path)===f.value);await re(F),B(!1),N.ElMessage.success("响应成功")}},ue=async p=>{var S,w,K,Y,_;const g=await N.getInsofDataApi({id:p});let b;return((S=g==null?void 0:g.data)==null?void 0:S.code)===200&&(b=(_=(Y=(K=(w=g==null?void 0:g.data)==null?void 0:w.result)==null?void 0:K[0])==null?void 0:Y.value)==null?void 0:_.pageData,console.log(1829,g)),b},ae=async p=>{var _,L,F;const g=(F=(L=(_=p==null?void 0:p.config)==null?void 0:_.find(H=>(H==null?void 0:H.operateType)==="新增"))==null?void 0:L.structureIds)==null?void 0:F.filter(H=>(H==null?void 0:H.key)==="contentConfig"),b=g==null?void 0:g.map(H=>H==null?void 0:H.id);let S=[],w=[];b==null||b.forEach(H=>{H&&S.push(ue(H))});const K=await Promise.all(S);K==null||K.forEach(H=>{H&&w.push(N.createInsofDataApi({key:{pageKey:p==null?void 0:p.path,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",version:1},value:{pageData:H}}))});const Y=await Promise.all(w);console.log("handleStoreNewMenuStructure-0",K,Y,p,b)};return R.watch(()=>u.value,async p=>{var g,b,S,w,K,Y,_,L,F;if(p)try{const H=(S=(b=(g=D.value)==null?void 0:g.data)==null?void 0:b.path)==null?void 0:S.split("/").slice(0,-1).join("/"),be=ie(A.value,(w=D.value)==null?void 0:w.data,H,(K=D.value)==null?void 0:K.type),Oe=(Y=be==null?void 0:be.filter(Me=>Me.path!=="系统管理"&&Me.path!=="平台管理"))==null?void 0:Y.map(Me=>V(Me));console.log(777,be,Oe,(_=D.value)==null?void 0:_.data),await ae((L=D.value)==null?void 0:L.data),B(!0),await Q(Oe);const Ee=await X(d.value),na=(Ee==null?void 0:Ee.length)===0?(F=d.value)==null?void 0:F.childMenus:Ee;s.setAsideMenus(na)}catch(H){throw N.ElMessage.error(H),new Error(H)}},{immediate:!0}),{mode:k,renderMenuList:O,clickMenu:re,openMenu:ne,closeMenu:ce,changeMenuStyle:te}}});var Pe={exports:{}},Pa=Pe.exports,He;function _a(){return He||(He=1,function(e,a){(function(s,n){n()})(Pa,function(){function s(r,o){return typeof o>"u"?o={autoBom:!1}:typeof o!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}function n(r,o,i){var D=new XMLHttpRequest;D.open("GET",r),D.responseType="blob",D.onload=function(){u(D.response,o,i)},D.onerror=function(){console.error("could not download file")},D.send()}function l(r){var o=new XMLHttpRequest;o.open("HEAD",r,!1);try{o.send()}catch{}return 200<=o.status&&299>=o.status}function t(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(o)}}var c=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof y.commonjsGlobal=="object"&&y.commonjsGlobal.global===y.commonjsGlobal?y.commonjsGlobal:void 0,f=c.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=c.saveAs||(typeof window!="object"||window!==c?function(){}:"download"in HTMLAnchorElement.prototype&&!f?function(r,o,i){var D=c.URL||c.webkitURL,d=document.createElement("a");o=o||r.name||"download",d.download=o,d.rel="noopener",typeof r=="string"?(d.href=r,d.origin===location.origin?t(d):l(d.href)?n(r,o,i):t(d,d.target="_blank")):(d.href=D.createObjectURL(r),setTimeout(function(){D.revokeObjectURL(d.href)},4e4),setTimeout(function(){t(d)},0))}:"msSaveOrOpenBlob"in navigator?function(r,o,i){if(o=o||r.name||"download",typeof r!="string")navigator.msSaveOrOpenBlob(s(r,i),o);else if(l(r))n(r,o,i);else{var D=document.createElement("a");D.href=r,D.target="_blank",setTimeout(function(){t(D)})}}:function(r,o,i,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof r=="string")return n(r,o,i);var d=r.type==="application/octet-stream",M=/constructor/i.test(c.HTMLElement)||c.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||d&&M||f)&&typeof FileReader<"u"){var A=new FileReader;A.onloadend=function(){var B=A.result;B=v?B:B.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=B:location=B,D=null},A.readAsDataURL(r)}else{var E=c.URL||c.webkitURL,k=E.createObjectURL(r);D?D.location=k:location.href=k,D=null,setTimeout(function(){E.revokeObjectURL(k)},4e4)}});c.saveAs=u.saveAs=u,e.exports=u})}(Pe)),Pe.exports}var xa=_a();const Ta=Ve.useLoginState(),{loginUserInfo:ze,cryptoInfo:he}=N.storeToRefs(Ta),ee=Fe.useModelComp(N.pinia),{itemData:Na,curStructureCompIds:$e,isSubmitCurStructure:ja,isRefreshCurStructure:Ca,freshContent:Ye}=N.storeToRefs(ee),aa=N.useMenuState(N.pinia),{activeMenuPath:pe,platform:We,buttonTriggerType:La}=N.storeToRefs(aa),fe=J.useUnit(N.pinia),{selectTitle:de}=N.storeToRefs(fe);Qe.useAuthorityState(N.pinia);const Ba=(e,a)=>{const s=new y.JSZip;e.forEach(n=>{s.file(n.name,n.content)}),s.generateAsync({type:"blob"}).then(n=>{xa.saveAs(n,`${a}.zip`)})},Oa=()=>{const e=[{name:We.value==="browser"?"insoftest-SSIP.exe":"insofrobot-TubeBending.exe",content:"欢迎使用"}],a=We.value==="browser"?"insoftest-SSIP":"insofrobot-TubeBending";Ba(e,a)},Ra=()=>{ee.setIsEdit("edit"),ee.setSubmitCurStructure(pe.value!=="/平台管理/菜单管理")},Ua=()=>{ee.setIsEdit("view"),ee.setRefreshCurStructure(!0)},qa=async e=>{var a;if((e==null?void 0:e.key)==="main"||de.value.length===1)le.value=await J.getItemData(pe.value,sessionStorage.getItem("systemKey")),fe.setSelectIndex(""),fe.setSelectMenu(""),fe.setSelectTitle([]);else{const s=[],n=(e==null?void 0:e.key)===""||!(e!=null&&e.key)?"":parseInt(e==null?void 0:e.key);le.value=await J.getItemData(pe.value,sessionStorage.getItem("systemKey"),n);let l=-1;(a=de.value)==null||a.forEach((t,c)=>{(t==null?void 0:t.key)===(e==null?void 0:e.key)&&(l=c),(l===-1||l>=c)&&s.push(t)}),fe.setSelectTitle(s),n!==""?fe.setSelectMenu(e==null?void 0:e.key):(fe.setSelectIndex(""),fe.setSelectMenu(""))}ee.setItemData(le.value),ee.setOriginalData(le.value)},xe=async(e,a,s,n="contentConfig")=>{var l,t,c;try{let f,u;a==="create"?(f={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s,type:"structure",structureBelong:n,parentTable:"",version:1},value:{pageData:{...e,compData:(l=e==null?void 0:e.compData)==null?void 0:l.filter(o=>(o==null?void 0:o.key)!=="tableContents")}}},u=N.createInsofDataApi):a==="update"?(f={id:e==null?void 0:e.id,key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s,type:"structure",structureBelong:n,parentTable:"",version:1},value:{pageData:{...e,compData:(t=e==null?void 0:e.compData)==null?void 0:t.filter(o=>(o==null?void 0:o.key)!=="tableContents")}}},u=N.updateInsofDataApi):a==="delete"&&(f={id:e,key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s,type:"structure",structureBelong:n,parentTable:"",version:1}},u=N.deleteInsofDataApi);const r=await u(f);if(((c=r==null?void 0:r.data)==null?void 0:c.code)===200)return r.data.result;throw N.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{N.ElMessage.error("保存响应失败")}},Ja=async e=>{var r;const a=JSON.parse(y.cloneDeep(JSON.stringify(Na.value)));if(!ja.value)return aa.setCacheStructures({key:La.value,data:a}),N.ElMessage.success("已暂存");const s=a==null?void 0:a.map(o=>o.id),n=s.filter(o=>{var i;return!((i=$e.value)!=null&&i.includes(o))}),l=(r=$e.value)==null?void 0:r.filter(o=>!s.includes(o)),t=[...n,...l],c=a==null?void 0:a.filter(o=>!o.id),f=a==null?void 0:a.filter(o=>o.id);let u=[];t&&(t==null?void 0:t.length)>0&&(t==null||t.forEach(o=>{o&&u.push(xe(o,"delete",e))})),c&&(c==null?void 0:c.length)>0&&(c==null||c.forEach(o=>{o&&u.push(xe(o,"create",e))})),f&&(f==null?void 0:f.length)>0&&(f==null||f.forEach(o=>{s!=null&&s.includes(o.id)&&(console.log("clickSavePage5","包含"),o&&u.push(xe(o,"update",e)))})),Promise.all(u).then(()=>{N.ElMessage.success("保存成功"),ee.setRefreshCurStructure(!0)}).catch(o=>{N.ElMessage.success(o)})},ma=e=>ia.getComponent(e),le=R.ref([]),Ga=async(e,a="data")=>{var n,l,t,c,f,u;if((e==null?void 0:e.type)==="delete")await J.deleteTableContents((n=e==null?void 0:e.singleContent)==null?void 0:n.id);else if((e==null?void 0:e.buttonName)==="新增"){let r={};for(let o in e==null?void 0:e.singleContent)o!=="id"&&o!=="index"&&(r[o]=e==null?void 0:e.singleContent[o]);await J.addTableContents(a,pe.value,e==null?void 0:e.index,sessionStorage.getItem("systemKey"),Object.values(r),e==null?void 0:e.column,e)}else if((e==null?void 0:e.buttonName)==="编辑"){let r={},o=(l=e==null?void 0:e.singleContent)==null?void 0:l.id;for(let i in e==null?void 0:e.singleContent)i!=="id"&&i!=="index"&&(r[i]=e==null?void 0:e.singleContent[i]);await J.fixTableContents(a,pe.value,e==null?void 0:e.index,o,sessionStorage.getItem("systemKey"),Object.values(r),e==null?void 0:e.column)}let s=(c=(t=de.value)==null?void 0:t[de.value.length-1])!=null&&c.key?parseInt((u=(f=de.value)==null?void 0:f[de.value.length-1])==null?void 0:u.key):"";le.value=await J.getItemData(pe.value,sessionStorage.getItem("systemKey"),s),ee.setItemData(le.value),ee.setOriginalData(le.value)},Ha=async e=>{var s,n,l,t,c;const a=await N.getInsofDataApi({id:e});return(c=(t=(l=(n=(s=a==null?void 0:a.data)==null?void 0:s.result)==null?void 0:n[0])==null?void 0:l.value)==null?void 0:t.pageData)==null?void 0:c.name},za=async e=>{var n,l;const a=await Ha(e==null?void 0:e.index);await J.fixFormContents(e==null?void 0:e.index,{comp:"Form",compData:(n=y.cloneDeep(e==null?void 0:e.contents))==null?void 0:n.filter(t=>t.contents),name:a});const s=(l=y.cloneDeep(le.value))==null?void 0:l.map(t=>((t==null?void 0:t.id)===(e==null?void 0:e.index)&&(t.compData=e==null?void 0:e.contents),t));ee.setItemData(s),ee.setOriginalData(s)},$a=e=>{le.value=e,ee.setItemData(le.value),ee.setOriginalData(le.value)},Xe=e=>{var a,s,n;return((s=(a=ze.value)==null?void 0:a.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN"?!0:((n=ze.value)==null?void 0:n.account)===(e==null?void 0:e.account)},Ze=async(e,a,s)=>{const n=Ce.getPageDataAsync("/系统管理/角色管理"),l=Ce.getPageDataAsync("/系统管理/部门管理");return await Promise.all([n,l]).then(c=>{var r,o;const f=(r=c==null?void 0:c[0])==null?void 0:r.map(i=>({label:i==null?void 0:i.roleName,value:i==null?void 0:i.roleName})),u=(o=c==null?void 0:c[1])==null?void 0:o.map(i=>({label:i==null?void 0:i.deptName,value:i==null?void 0:i.deptName}));return s?e==null?void 0:e.map(i=>{var D;return{...i,compData:(D=i==null?void 0:i.compData)==null?void 0:D.map(d=>{var M,v;return(d==null?void 0:d.key)==="header"?{...d,contents:(M=d==null?void 0:d.contents)==null?void 0:M.map(A=>A.prop==="userDept"?{...A,options:u}:A.prop==="userRoles"?{...A,options:f}:A)}:(d==null?void 0:d.key)==="tableContents"?{...d,contents:(v=d==null?void 0:d.contents)==null?void 0:v.map(A=>{var E;return{...A,password:Xe(A)?je.decryptData(A==null?void 0:A.password,(E=he==null?void 0:he.value)==null?void 0:E.privateKey):A==null?void 0:A.password}})}:d})}}):e==null?void 0:e.map(i=>{var D;return{...i,compData:(D=i==null?void 0:i.compData)==null?void 0:D.map(d=>{var M,v,A;return(d==null?void 0:d.key)==="rowButton"||(d==null?void 0:d.key)==="extraButton"?{...d,contents:(M=d==null?void 0:d.contents)==null?void 0:M.filter(E=>a==null?void 0:a.includes(E==null?void 0:E.label))}:(d==null?void 0:d.key)==="header"?{...d,contents:(v=d==null?void 0:d.contents)==null?void 0:v.map(E=>E.prop==="userDept"?{...E,options:u}:E.prop==="userRoles"?{...E,options:f}:E)}:(d==null?void 0:d.key)==="tableContents"?{...d,contents:(A=d==null?void 0:d.contents)==null?void 0:A.map(E=>{var k;return{...E,password:Xe(E)?je.decryptData(E==null?void 0:E.password,(k=he==null?void 0:he.value)==null?void 0:k.privateKey):E==null?void 0:E.password}})}:d})}})})},Ya=async(e,a)=>{const s=sessionStorage.getItem("authority"),n=JSON.parse(s||"");if(console.log("点击菜单获取页面结构:",e,a,n),Array.isArray(n)){const l=Array.isArray(n)&&(n==null?void 0:n.filter(f=>f==null?void 0:f.includes(e))),t=l==null?void 0:l.map(f=>{var u;return((u=f==null?void 0:f.split("/"))==null?void 0:u.pop())||""});return e==="/系统管理/用户管理"?await Ze(a,t,!1):a==null?void 0:a.map(f=>{var u;return{...f,compData:(u=f==null?void 0:f.compData)==null?void 0:u.map(r=>{var o;return(r==null?void 0:r.key)==="rowButton"||(r==null?void 0:r.key)==="extraButton"?{...r,contents:(o=r==null?void 0:r.contents)==null?void 0:o.filter(i=>t==null?void 0:t.includes(i==null?void 0:i.label))}:r})}})}else return typeof n=="string"&&(n==null?void 0:n.toUpperCase())==="SUPERADMIN"?e==="/系统管理/用户管理"?await Ze(a,null,!0):a:[]};R.watch(()=>[pe.value,Ca.value],async e=>{var n,l;const a=e==null?void 0:e[0],s=e==null?void 0:e[1];if(a||s){await ua.verifyStructureDataToStore(),sessionStorage.setItem("pageKey",pe.value);const t=await J.getItemData(a,sessionStorage.getItem("systemKey"),"",pe.value);ee.setExtraContents([]),le.value=await Ya(a,t),fe.setSelectTitle([]),fe.setSelectIndex(""),fe.setSelectMenu(""),ee.setItemData(le.value),ee.setOriginalData(le.value),ee.setCurStructureCompIds((n=le.value)==null?void 0:n.map(c=>c==null?void 0:c.id)),ee.setRefreshCurStructure(!1),de.value=(l=pe.value)==null?void 0:l.split("/").filter(c=>c!=="").map(c=>({value:c.trim()}))}},{immediate:!0});R.watch(()=>Ye.value,async()=>{Ye.value&&(le.value=await J.getItemData(pe.value,sessionStorage.getItem("systemKey"),"",pe.value),ee.setFreshContent(!1))},{deep:!0});const Wa=e=>{var l,t,c;const a=(l=e.map(f=>{var r,o;let u=(o=(r=f.key.split("("))==null?void 0:r[1])==null?void 0:o.trim();return u==null?void 0:u.slice(0,u.length-1)}))==null?void 0:l.filter(f=>f),s=[];a==null||a.forEach(f=>{var r,o;const u=[];if((r=ke.contentTrans(f))==null||r.forEach(i=>{var D,d,M,v,A,E,k,B,I,G,z,W,m,T;if(i.includes("{")&&i.includes("[")){let x=y.cloneDeep(i).split(":");i=(E=(d=(D=y.cloneDeep(x))==null?void 0:D[0])==null?void 0:d.split("{"))==null?void 0:E[((A=(v=(M=y.cloneDeep(x))==null?void 0:M[0])==null?void 0:v.split("{"))==null?void 0:A.length)-1].replaceAll("'",""),u.push(i);let h=(I=(B=(k=x==null?void 0:x[(x==null?void 0:x.length)-1])==null?void 0:k.split("}"))==null?void 0:B[0])==null?void 0:I.replaceAll("'",'"'),j=[];(z=(G=h.slice(1,h.length-1))==null?void 0:G.split(","))==null||z.forEach(O=>{j.push(O)}),u.push(j)}else if(i.includes("{")){let x=(W=i.split(":"))==null?void 0:W[0];i=(T=x==null?void 0:x.split("{"))==null?void 0:T[((m=x==null?void 0:x.split("{"))==null?void 0:m.length)-1].replaceAll("'",""),u.push(i)}else u.push(i)}),!u.some(i=>Array.isArray(i)))s.push(u);else{let i=[];u==null||u.forEach((D,d)=>{d!==u.length-1&&i.push(D)}),(o=u==null?void 0:u[(u==null?void 0:u.length)-1])==null||o.forEach(D=>{let d=y.cloneDeep(i);d.push(D),s.push(d)})}});const n=(c=(t=s.filter(f=>f.length!==0))==null?void 0:t.filter(f=>f.length!==0))==null?void 0:c.map(f=>{let u="";return f.forEach(r=>{r.includes("{")||(u=u===""?u+y.cloneDeep(r):u+"/"+y.cloneDeep(r))}),u});return ke.menuArray([...new Set(n)])},Xa=e=>({comp:"Menu",compData:[{contents:Wa(y.cloneDeep(e)),key:"menuContents"}],name:""}),Za=e=>({comp:"MenuTop",compData:[{key:"menuContents",contents:JSON.parse(e==null?void 0:e.value.trim().replaceAll("'",'"'))}],name:""}),Va=e=>{const a=e==null?void 0:e.filter(n=>{var l;return!((l=n==null?void 0:n.key)!=null&&l.includes("("))}),s=a==null?void 0:a.find(n=>{var l;return J.IsJson(n.value.replaceAll("'",'"'))&&((l=JSON.parse(n.value.replaceAll("'",'"')))==null?void 0:l.every(t=>typeof t=="string"))});if(s)return Za(s)},Qa=e=>{var l;let a=[];const s=e==null?void 0:e.filter(t=>{var c;return!((c=t==null?void 0:t.key)!=null&&c.includes("("))}),n=s==null?void 0:s.find(t=>{var c;return J.IsJson(t.value.replaceAll("'",'"'))&&!((c=JSON.parse(t.value.replaceAll("'",'"')))!=null&&c.every(f=>typeof f=="string"))});if(n)return(l=JSON.parse(n.value.replaceAll("'",'"')))==null||l.forEach(t=>{var c,f,u,r;((c=Object.keys(t))==null?void 0:c[0])==="类型"?a.push({comp:"System",compData:[{key:"type",contents:[(f=Object.values(t))==null?void 0:f[0]]}]}):((u=Object.keys(t))==null?void 0:u[0])==="名称"&&a.push({comp:"System",compData:[{key:"name",contents:[(r=Object.values(t))==null?void 0:r[0]]}]})}),a},sa=e=>{const a=[];let s=!1;return e.forEach(n=>{Array.isArray(n)&&(s=!0,n.forEach(l=>{const t=e.map(c=>c===n?l:c);a.push(...sa(t))}))}),s?a:[e]},Fa=e=>{var c,f;if(!e)return;let a=[];const s=ke.getContentValue(e),n=y.cloneDeep(s).replaceAll("{","").replaceAll("}","").trim();let l=[];return n.split(":").forEach(u=>{var r;if(u.includes("[")){const o=(r=u.slice(1,u.length-1))==null?void 0:r.split(",");l.push(o)}else l.push(u)}),(c=sa(l))==null||c.forEach(u=>{a.push(u)}),(f=a==null?void 0:a.filter(u=>u.length!==0))==null?void 0:f.map(u=>{let r="";return u.forEach(o=>{o.includes("{")||(r=r===""?r+y.cloneDeep(o).trim():r+"/"+y.cloneDeep(o).trim())}),r})},Te=e=>{var f,u,r,o,i,D,d,M,v,A,E,k,B,I,G,z,W,m,T,x,h,j,O,U;const a=Be(e)?(f=Se(y.cloneDeep(e)))==null?void 0:f[0]:"[]",s=Be(e)?"["+((u=Se(y.cloneDeep(e)))==null?void 0:u[2])+"]":"["+e+"]";let n=[],l=[],t="";const c=(o=(r=s==null?void 0:s.trim())==null?void 0:r.slice(1,(s==null?void 0:s.trim().length)-1))==null?void 0:o.replaceAll("'",'"');if(J.IsJson(c)?n=JSON.parse(c):J.IsJson((d=(D=(i=c==null?void 0:c.split("}"))==null?void 0:i[0])==null?void 0:D.replace(":",""))==null?void 0:d.replaceAll("\\","\\\\"))&&(n=JSON.parse((A=(v=(M=c==null?void 0:c.split("}"))==null?void 0:M[0])==null?void 0:v.replace(":",""))==null?void 0:A.replaceAll("\\","\\\\"))),n=n!=null&&n.every($=>Array.isArray($)&&$.every(P=>Array.isArray(P)))?n==null?void 0:n[0]:n,!(a!=null&&a.includes("(")))!a.includes("{")&&J.IsJson(a==null?void 0:a.replaceAll("'",'"'))?l=JSON.parse(a==null?void 0:a.replaceAll("'",'"')):J.IsJson((k=(E=a==null?void 0:a.split("{"))==null?void 0:E[1])==null?void 0:k.replaceAll("'",'"'))&&(l=JSON.parse((I=(B=a==null?void 0:a.split("{"))==null?void 0:B[1])==null?void 0:I.replaceAll("'",'"')));else{let $=[];if(((z=(G=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:G.split(","))==null?void 0:z.length)>1)(m=(W=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:W.split(","))==null||m.forEach(P=>{var Z,X,re,ne,ce,te,ye,q,C,V,ie,Q,ue,ae,p,g,b,S;if(!(P!=null&&P.includes("(")))$.push(P==null?void 0:P.replaceAll("'",""));else if(P!=null&&P.includes("[")){let w=(ae=(ue=(Q=(ie=P==null?void 0:P.split("["))==null?void 0:ie[((V=P==null?void 0:P.split("["))==null?void 0:V.length)-1])==null?void 0:Q.split("]"))==null?void 0:ue[0])==null?void 0:ae.replaceAll("'","");w=w+"["+((S=(b=(g=P==null?void 0:P.split("("))==null?void 0:g[((p=P==null?void 0:P.split("("))==null?void 0:p.length)-1])==null?void 0:b.split(")"))==null?void 0:S[0].replaceAll(":","/").replaceAll("'",""))+"]()",$.push(w)}else{let w=(ce=(ne=(re=(X=P==null?void 0:P.split(":"))==null?void 0:X[((Z=P==null?void 0:P.split(":"))==null?void 0:Z.length)-1])==null?void 0:re.split(")"))==null?void 0:ne[0])==null?void 0:ce.replaceAll("'","");w=w+"["+((C=(q=(ye=P==null?void 0:P.split("("))==null?void 0:ye[((te=P==null?void 0:P.split("("))==null?void 0:te.length)-1])==null?void 0:q.split(")"))==null?void 0:C[0].replaceAll(":","/").replaceAll("'",""))+"]",$.push(w)}}),l=$;else{const P=((j=(h=(x=(T=a==null?void 0:a.slice(1,a==null?void 0:a.length))==null?void 0:T.split("("))==null?void 0:x[1])==null?void 0:h.split(")"))==null?void 0:j[0]).replaceAll("{","").replaceAll("}","").replaceAll(":","/").replaceAll("'","");t=t+P+"["+((U=(O=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:O.split("["))==null?void 0:U[1])}}return{tableColumns:l,tableContents:n!=null&&n.every($=>Array.isArray($))?n:[n],tablePath:t}};let oe="$R";const es=e=>/^'[^']+':\{.*\}$/.exec(y.cloneDeep(e)),as=e=>/^'([^']+)':.*$/.exec(y.cloneDeep(e)),Se=e=>{let a=e;const s=[];let n="";for(const l of a)l.includes("{")||n.includes("{")||l.includes("[")||n.includes("[")||l.includes("【")||n.includes("【")||l.includes("(")||n.includes("(")||l.includes("(")||n.includes("(")||l.includes("/*")||n.includes("/*")?(n+=l.trim(),y.cloneDeep(n).split("{").length-1===y.cloneDeep(n).split("}").length-1&&y.cloneDeep(n).split("【").length-1===y.cloneDeep(n).split("】").length-1&&y.cloneDeep(n).split("[").length-1===y.cloneDeep(n).split("]").length-1&&y.cloneDeep(n).split("(").length-1===y.cloneDeep(n).split(")").length-1&&y.cloneDeep(n).split("(").length-1===y.cloneDeep(n).split(")").length-1&&y.cloneDeep(n).split("/*").length-1===y.cloneDeep(n).split("*/").length-1&&n[n.length-1]!==","&&(s.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):s.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},Be=e=>/^\[.*?\]:\[.*?\]$/.exec(y.cloneDeep(e)),ss=e=>{var a,s,n,l,t,c,f,u,r,o,i,D,d,M,v,A,E;if(as(e)){let k={},B=(n=(s=(a=e==null?void 0:e.replace(":",oe))==null?void 0:a.split(oe))==null?void 0:s[0])==null?void 0:n.replaceAll("'",""),I="";return I=I+((f=(c=(t=(l=e==null?void 0:e.split("{"))==null?void 0:l[1])==null?void 0:t.split("}"))==null?void 0:c[0])==null?void 0:f.replace(":","/").replaceAll("'",""))+"[",I=I+((o=(r=(u=e==null?void 0:e.split("["))==null?void 0:u[1])==null?void 0:r.split("]"))==null?void 0:o[0])+"]",k[B]=I,{groupName:"",formContents:[[k]]}}else{let k={},B="",I=(d=(D=(i=e==null?void 0:e.split("]"))==null?void 0:i[0])==null?void 0:D.split("["))==null?void 0:d[1];(M=I==null?void 0:I.split(":"))==null||M.forEach((z,W)=>{var m;((m=I==null?void 0:I.split(":"))==null?void 0:m.length)-1===W&&(B=z==null?void 0:z.replaceAll("'",""))});let G="";return G=(E=(A=(v=e==null?void 0:e.split("]"))==null?void 0:v[1])==null?void 0:A.replace(":",oe).split(oe))==null?void 0:E[1].replaceAll("'",""),k[B]=G,{groupName:"",formContents:[[k]]}}},ls=e=>(e==null?void 0:e[0])==="["&&(e==null?void 0:e[e.length-1])==="]"&&!(e!=null&&e.includes("{")),la=e=>{var n,l,t,c,f,u,r,o,i,D,d,M,v,A,E,k,B,I,G,z,W,m,T,x,h,j,O,U,$,P,Z,X,re,ne,ce,te,ye;let a="";e=e.replace(/:([^=]*)==/g,":");let s=e;if(es(y.cloneDeep(e))!==null&&(a=(l=(n=y.cloneDeep(e).replace(":",oe).split(oe))==null?void 0:n[0])==null?void 0:l.replaceAll("'",""),s=(t=y.cloneDeep(e).replace(":",oe).split(oe))==null?void 0:t[1]),Be(y.cloneDeep(s).slice(1,((c=y.cloneDeep(s))==null?void 0:c.length)-1))||ls(y.cloneDeep(s).slice(1,((f=y.cloneDeep(s))==null?void 0:f.length)-1)))if(((r=y.cloneDeep(s).slice(1,((u=y.cloneDeep(s))==null?void 0:u.length)-1))==null?void 0:r[1])!=="["){const q=Te(y.cloneDeep(s).slice(1,((o=y.cloneDeep(s))==null?void 0:o.length)-1));return{groupName:a,tableColumn:q==null?void 0:q.tableColumns,tableContents:q==null?void 0:q.tableContents,tableColumnPath:q==null?void 0:q.tablePath}}else if(y.cloneDeep(s).slice(1,((i=y.cloneDeep(s))==null?void 0:i.length)-1).includes("{")){let q=y.cloneDeep(s).slice(1,((D=y.cloneDeep(s))==null?void 0:D.length)-1),C=q.indexOf("{"),V=q.slice(C,(q==null?void 0:q.length)-C);return(M=(d=Se(V))==null?void 0:d.filter(Q=>Q==null?void 0:Q.includes("{")))==null?void 0:M.map((Q,ue)=>{var p;let ae=Te(y.cloneDeep(Q).slice(1,((p=y.cloneDeep(Q))==null?void 0:p.length)-1));return{groupName:ue===0?a:"",tableColumn:ae==null?void 0:ae.tableColumns,tableContents:ae==null?void 0:ae.tableContents,tableColumnPath:ae==null?void 0:ae.tablePath}})}else{const q=Te(y.cloneDeep(s).slice(1,((v=y.cloneDeep(s))==null?void 0:v.length)-1));return{groupName:a,tableColumn:q==null?void 0:q.tableColumns,tableContents:q==null?void 0:q.tableContents,tableColumnPath:q==null?void 0:q.tablePath}}else{let q=[];if(J.IsJson((A=s.slice(1,(s==null?void 0:s.length)-1))==null?void 0:A.replaceAll("'",'"')))q=JSON.parse((E=s.slice(1,(s==null?void 0:s.length)-1))==null?void 0:E.replaceAll("'",'"'));else if(s.includes("(")){if((s==null?void 0:s[0])!=="{"){let C=(O=(j=(h=s==null?void 0:s.split("]"))==null?void 0:h[0])==null?void 0:j.split("["))==null?void 0:O[1],V="",Q=((X=(Z=(P=($=(U=s==null?void 0:s.split(")"))==null?void 0:U[0])==null?void 0:$.split("("))==null?void 0:P[1])==null?void 0:Z.replaceAll("[",""))==null?void 0:X.replaceAll("]","")).replaceAll("'","").replaceAll(":","/");return(re=Q==null?void 0:Q.split("/"))==null||re.forEach((ue,ae)=>{var p;ae!==((p=Q==null?void 0:Q.split("/"))==null?void 0:p.length)-1&&(V=V===""?V+ue:V+"/"+ue)}),{groupName:"",extraButton:(ce=C==null?void 0:C.split(":"))==null?void 0:ce[((ne=C==null?void 0:C.split(":"))==null?void 0:ne.length)-1].replaceAll("'",""),extraPath:V}}else if(s=s.slice(1,(s==null?void 0:s.length)-1),(s==null?void 0:s[0])!=="["){let C=ss(s);return{groupName:C==null?void 0:C.groupName,formContents:C==null?void 0:C.formContents}}else if((s==null?void 0:s[0])==="["&&(s==null?void 0:s[1])==="["){s=s.slice(1,(s==null?void 0:s.length)-1);let C=[];return(ye=(te=Se(s))==null?void 0:te.filter(V=>V!==","))==null||ye.forEach(V=>{var ie;Array.isArray(_e(V))||C.push((ie=_e(V))==null?void 0:ie.formContents)}),{groupName:a,formContents:C}}}else if(s="[["+s+"]]",J.IsJson((k=s.slice(1,(s==null?void 0:s.length)-1))==null?void 0:k.replaceAll("'",'"')))q=JSON.parse((B=s.slice(1,(s==null?void 0:s.length)-1))==null?void 0:B.replaceAll("'",'"'));else if(s=s.slice(2,s.length-2),((z=(G=(I=s==null?void 0:s.replace(":",oe))==null?void 0:I.split(oe))==null?void 0:G[1])==null?void 0:z[0])!=="{"){s=((m=(W=s==null?void 0:s.replace(":",oe))==null?void 0:W.split(oe))==null?void 0:m[0])+":{["+((x=(T=s==null?void 0:s.replace(":",oe))==null?void 0:T.split(oe))==null?void 0:x[1])+"]}";const C=la(s);return C!=null&&C.tableColumn?{groupName:C==null?void 0:C.groupName,tableColumn:C==null?void 0:C.tableColumn,tableContents:C==null?void 0:C.tableContents}:{groupName:C==null?void 0:C.groupName,formContents:C==null?void 0:C.formContents}}return{groupName:a,formContents:q}}},_e=e=>la(y.cloneDeep(e).slice(1,y.cloneDeep(e).length-1)),ns=e=>{var s;let a=[];if(!((e==null?void 0:e[0])==="["&&(e==null?void 0:e[1])==="[")){let n=(s=Se(e))==null?void 0:s.filter(l=>l!==",");n==null||n.forEach(l=>{a.push(_e(l))})}return a};R.ref(0);const rs=e=>{const a=[];let s=[];return e==null||e.forEach((n,l)=>{var t;(s==null?void 0:s.length)===0?s.push(n):(s.push(n),((t=e[l+1])==null?void 0:t.key)==="groupName"&&(a.push(s),s=[]))}),a.push(s),a},Ne=R.ref(0),ts=(e,a)=>{var l;let s=[],n=a==null?void 0:a.length;return(l=y.cloneDeep(a))==null||l.forEach((t,c)=>{let f=[];t==null||t.forEach(u=>{var r,o,i,D,d,M;if(f.push(y.cloneDeep(u)),J.IsJson(y.cloneDeep(e).replaceAll("'",'"'))&&((r=JSON.parse(y.cloneDeep(e).replaceAll("'",'"')))!=null&&r.every(v=>typeof v=="string")))(o=JSON.parse(y.cloneDeep(e).replaceAll("'",'"')))==null||o.forEach(v=>{var A,E;s.push([{key:(A=y.cloneDeep(u))==null?void 0:A.key,value:((E=y.cloneDeep(u))==null?void 0:E.value)+"/"+v}])});else{let v=[];if(((i=y.cloneDeep(e))==null?void 0:i[0])==="["&&((D=y.cloneDeep(e))==null?void 0:D[1])==="["){let A=e.slice(1,(e==null?void 0:e.length)-1);const E=ns(A.trim());E==null||E.forEach(k=>{var B;k!=null&&k.tableColumn?(f.push({key:"groupName",value:k==null?void 0:k.groupName}),f.push({key:"tableColumn",value:k==null?void 0:k.tableColumn}),f.push({key:"tableContents",value:k==null?void 0:k.tableContents}),f.push({key:"tablePath",value:(k==null?void 0:k.tableColumnPath)??""})):k!=null&&k.extraButton?(f.push({key:"groupName",value:k==null?void 0:k.groupName}),f.push({key:"extraButton",value:k==null?void 0:k.extraButton,path:k==null?void 0:k.extraPath})):(f.push({key:"groupName",value:k==null?void 0:k.groupName}),f.push({key:"formContent",value:n===1?k==null?void 0:k.formContents:(B=k==null?void 0:k.formContents)==null?void 0:B[c]}))})}else v=_e(y.cloneDeep(e.trim())),v!=null&&v.tableColumn?(f.push({key:"groupName",value:v==null?void 0:v.groupName}),f.push({key:"tableColumn",value:v==null?void 0:v.tableColumn}),f.push({key:"tableContents",value:n!==1?[(d=v==null?void 0:v.tableContents)==null?void 0:d[c]]:v==null?void 0:v.tableContents})):(f.push({key:"groupName",value:v==null?void 0:v.groupName}),f.push({key:"formContent",value:n!==1?[(M=v==null?void 0:v.formContents)==null?void 0:M[c]]:v==null?void 0:v.formContents}))}}),s.push(f)}),s},os=e=>{var l,t;const a=[],s=Fa((l=y.cloneDeep(e))==null?void 0:l.key);return s&&(s==null?void 0:s.length)>0&&(s==null||s.forEach(c=>{a.push([{key:"contentPath",value:c}])})),ts((t=y.cloneDeep(e))==null?void 0:t.value,a)},cs=e=>e.length===1&&(e==null?void 0:e[0])===void 0?[]:e,is=e=>{var s,n;return(n=(s=y.cloneDeep(e))==null?void 0:s.map(l=>{var c,f;let t=[];if((c=rs(l==null?void 0:l.filter(u=>(u==null?void 0:u.key)!=="contentPath")))==null||c.forEach(u=>{var i,D,d,M,v,A,E,k,B,I,G,z,W,m,T,x;let r=[];if(u.length===0)return;let o=(D=(i=u.find(h=>(h==null?void 0:h.key)==="tableColumn"))==null?void 0:i.value)==null?void 0:D.map(h=>({label:h}));if(Array.isArray(o)&&((d=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="tablePath"))!=null&&d.value&&((M=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="tablePath"))==null?void 0:M.value)!==""&&o.push({columnPath:(v=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="tablePath"))==null?void 0:v.value}),o=(A=y.cloneDeep(o))==null?void 0:A.map(h=>{var j,O,U,$,P,Z,X,re,ne;return h!=null&&h.label&&!((j=h==null?void 0:h.label)!=null&&j.includes("["))?h:{label:(U=(O=y.cloneDeep(h==null?void 0:h.label))==null?void 0:O.split("["))==null?void 0:U[0],formMenuSelect:(re=(X=(Z=(P=($=y.cloneDeep(h==null?void 0:h.label))==null?void 0:$.split("["))==null?void 0:P[1])==null?void 0:Z.split("]"))==null?void 0:X[0])==null?void 0:re.split("/"),columnPath:(h==null?void 0:h.columnPath)??"",isRoute:(ne=h==null?void 0:h.label)==null?void 0:ne.includes("(")}}),o.length!==0&&o.push({label:"操作"})),u!=null&&u.find(h=>(h==null?void 0:h.key)==="formContent")){const h=(E=u.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:E.value;let j=[];Array.isArray(h)&&h.forEach(O=>{let U=1;Array.isArray(O)&&(O!=null&&O.every($=>!Array.isArray($)))&&(U=O.length),O&&(Array.isArray(O)||(O=[O]),O.forEach($=>{Array.isArray($)||($=[$]);let P=[];$==null||$.forEach(Z=>{var X,re,ne,ce,te,ye,q,C,V,ie,Q,ue,ae,p,g,b;if(Ne.value++,!((re=(X=Object.values(Z))==null?void 0:X[0])!=null&&re.includes("/")&&((ce=(ne=Object.values(Z))==null?void 0:ne[0])!=null&&ce.includes("["))))P.push({id:Ne.value,key:(te=Object.keys(Z))==null?void 0:te[0],value:(ye=Object.values(Z))==null?void 0:ye[0],width:Math.max(U,$.length)});else{let S=(ie=(V=(C=(q=Object.values(Z))==null?void 0:q[0])==null?void 0:C.split("["))==null?void 0:V[0])==null?void 0:ie.split("/"),w=(ae=(ue=(Q=Object.values(Z))==null?void 0:Q[0])==null?void 0:ue.split("["))==null?void 0:ae[1],K=(g=(p=w==null?void 0:w.slice(0,w.length-1))==null?void 0:p.split(":"))==null?void 0:g.map(_=>_.replaceAll("'","")),Y=K;(K==null?void 0:K.length)===1&&Y.unshift(""),P.push({id:Ne.value,key:(b=Object.keys(Z))==null?void 0:b[0],value:"",width:Math.max(U,$.length),type:"Select",optionUrl:{type:"Select",selectRelateType:"关联绑定列",menuSelect:S,groupSelect:Y}})}}),P==null||P.forEach(Z=>{j.push(Z)})}))}),r.push({key:"formFlex",contents:""}),r.push({key:"formContent",contents:j}),t.push({comp:"Form",compData:y.cloneDeep(r),name:(B=(k=u.find(O=>(O==null?void 0:O.key)==="groupName"))==null?void 0:k.value)==null?void 0:B.replaceAll("'","")})}else u!=null&&u.find(h=>(h==null?void 0:h.key)==="extraButton")?t.push({key:"extraButton",value:{method:(I=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="extraButton"))==null?void 0:I.value,value:[],path:(G=u==null?void 0:u.find(h=>(h==null?void 0:h.key)==="extraButton"))==null?void 0:G.path}}):((o==null?void 0:o.length)!==0||((W=(z=u.find(h=>(h==null?void 0:h.key)==="tableContents"))==null?void 0:z.value)==null?void 0:W.length)>0)&&(r.push({key:"header",contents:o}),r.push({key:"tableContents",contents:cs((m=u.find(h=>(h==null?void 0:h.key)==="tableContents"))==null?void 0:m.value)}),r.push({key:"extraButton",contents:[{label:"新增"}]}),r.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),t.push({comp:"Table",compData:r,name:(x=(T=u.find(h=>(h==null?void 0:h.key)==="groupName"))==null?void 0:T.value)==null?void 0:x.replaceAll("'","")}))}),(t==null?void 0:t.length)>0)return{comp:"Group",compData:[{key:"groupContents",contents:t}],name:(f=l==null?void 0:l.find(r=>(r==null?void 0:r.key)==="contentPath"))==null?void 0:f.value}}))==null?void 0:n.filter(l=>l)},us=e=>{var f,u;let a=[];const s=Xa(y.cloneDeep(e));a.push(s);const n=Va(y.cloneDeep(e));n&&a.push(n);const l=Qa(y.cloneDeep(e));l&&((f=y.cloneDeep(l))==null||f.forEach(r=>{a.push(r)}));const t=(u=y.cloneDeep(e))==null?void 0:u.filter(r=>{var o;return(o=r==null?void 0:r.key)==null?void 0:o.includes("(")}).map(r=>os(r)).filter(r=>(r==null?void 0:r.length)!==0);let c=[];return t==null||t.forEach(r=>{r==null||r.forEach(o=>{c!=null&&c.find(i=>{var D,d;return((D=i==null?void 0:i.find(M=>(M==null?void 0:M.key)==="contentPath"))==null?void 0:D.value)===((d=o==null?void 0:o.find(M=>(M==null?void 0:M.key)==="contentPath"))==null?void 0:d.value)})?c=c==null?void 0:c.map(i=>{var d,M;return((d=i==null?void 0:i.find(v=>(v==null?void 0:v.key)==="contentPath"))==null?void 0:d.value)===((M=o==null?void 0:o.find(v=>(v==null?void 0:v.key)==="contentPath"))==null?void 0:M.value)&&(i=[...i,...o.filter(v=>(v==null?void 0:v.key)!=="contentPath")]),i}):c.push(o)})}),a=[...a,...is(c)],a},ps=e=>{var l,t,c;const a=(t=(l=ke.contentTransArray(y.cloneDeep(e)))==null?void 0:l.filter(f=>f!==""))==null?void 0:t.map(f=>f.replaceAll("<","[").replaceAll(">","]")),s=(c=a==null?void 0:a.filter(f=>!f.includes("/*")))==null?void 0:c.map(f=>ke.parseGroupValue(f));return us(s)};exports._sfc_main=Ia;exports.clickGenerateApp=Oa;exports.clickSavePage=Ja;exports.expandToNewContents=ps;exports.getComponents=ma;exports.onBack=Ua;exports.onChange=Ga;exports.onClick=qa;exports.onContentChange=za;exports.onPageChange=$a;exports.onSelectFixContent=Ra;exports.savePageDataAsync=Ka;exports.showItems=le;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./threeModel.vue_vue_type_style_index_0_scoped_e7dd7d83_lang-P-VgKxw9.cjs"),it=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Mt={class:"tree-container"},Et=e.defineComponent({__name:"index",props:{treeData:Array,expand:{type:Boolean,default:!1}},emits:["nodeClick"],setup(l,{emit:t}){const n=t,s=l,c={children:"children",label:"label"},J=G=>{n("nodeClick",G)};return(G,a)=>{const p=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Mt,[e.createVNode(p,{data:s==null?void 0:s.treeData,props:c,"default-expand-all":l.expand,onNodeClick:J},null,8,["data","default-expand-all"])])}}}),wt=it._export_sfc(Et,[["__scopeId","data-v-b4bd4658"]]),vt={key:0,class:"jointPanel-container"},Rt={class:"panel-content"},Bt=e.defineComponent({__name:"robotMenu",props:{model:Object},setup(l){const t=l,n=e.ref(!0),s=e.ref([]),c=(a,p=0)=>{const g=[];return Array.isArray(a)&&(a==null?void 0:a.length)>0&&a.forEach(u=>{if(!(u!=null&&u.isMesh)&&((u==null?void 0:u.type)==="URDFJoint"||(u==null?void 0:u.type)==="URDFLink")){const H={name:u==null?void 0:u.name,label:u==null?void 0:u.name,show:!0,level:p+1,isPenultimate:!1,type:u==null?void 0:u.type,id:u==null?void 0:u.id,limit:(u==null?void 0:u.limit)??"",children:c(u==null?void 0:u.children,p+1),path:u==null?void 0:u.name};g.push(H)}}),g},J=a=>a?[{name:a==null?void 0:a.name,label:a==null?void 0:a.name,show:!0,level:1,isPenultimate:!1,type:a==null?void 0:a.type,id:a==null?void 0:a.id,limit:(a==null?void 0:a.limit)??"",children:c(a==null?void 0:a.children,1),path:a==null?void 0:a.name}]:[],G=e.computed(()=>t!=null&&t.model?J(t.model):[]);return e.watch(G,a=>{s.value=JSON.parse(JSON.stringify(a))},{immediate:!0}),(a,p)=>{const g=e.resolveComponent("el-scrollbar"),u=e.resolveComponent("el-collapse-transition");return l.model?(e.openBlock(),e.createElementBlock("div",vt,[e.createElementVNode("div",{class:"panel-header",onClick:p[0]||(p[0]=H=>n.value=!n.value)},p[1]||(p[1]=[e.createElementVNode("h3",null,"URDF树",-1)])),e.createVNode(u,null,{default:e.withCtx(()=>[e.withDirectives(e.createVNode(g,{"max-height":"600px"},{default:e.withCtx(()=>[e.createElementVNode("div",Rt,[e.createVNode(wt,{treeData:s.value,expand:!0},null,8,["treeData"])])]),_:1},512),[[e.vShow,n.value]])]),_:1})])):e.createCommentVNode("",!0)}}}),xt=it._export_sfc(Bt,[["__scopeId","data-v-bc2f3f82"]]),ut={type:"change"},dt={type:"start"},pt={type:"end"},st=new o.Ray,Jt=new o.Plane,Dt=Math.cos(70*o.MathUtils.DEG2RAD),S=new o.Vector3,L=2*Math.PI,b={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ct=1e-6;class Vt extends o.Controls{constructor(t,n=null){super(t,n),this.state=b.NONE,this.target=new o.Vector3,this.cursor=new o.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:o.MOUSE.ROTATE,MIDDLE:o.MOUSE.DOLLY,RIGHT:o.MOUSE.PAN},this.touches={ONE:o.TOUCH.ROTATE,TWO:o.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 o.Vector3,this._lastQuaternion=new o.Quaternion,this._lastTargetPosition=new o.Vector3,this._quat=new o.Quaternion().setFromUnitVectors(t.up,new o.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new o.Spherical,this._sphericalDelta=new o.Spherical,this._scale=1,this._panOffset=new o.Vector3,this._rotateStart=new o.Vector2,this._rotateEnd=new o.Vector2,this._rotateDelta=new o.Vector2,this._panStart=new o.Vector2,this._panEnd=new o.Vector2,this._panDelta=new o.Vector2,this._dollyStart=new o.Vector2,this._dollyEnd=new o.Vector2,this._dollyDelta=new o.Vector2,this._dollyDirection=new o.Vector3,this._mouse=new o.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=Tt.bind(this),this._onPointerDown=St.bind(this),this._onPointerUp=Ct.bind(this),this._onContextMenu=Ht.bind(this),this._onMouseWheel=At.bind(this),this._onKeyDown=Ot.bind(this),this._onTouchStart=zt.bind(this),this._onTouchMove=Lt.bind(this),this._onMouseDown=kt.bind(this),this._onMouseMove=Nt.bind(this),this._interceptControlDown=jt.bind(this),this._interceptControlUp=It.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(ut),this.update(),this.state=b.NONE}update(t=null){const n=this.object.position;S.copy(n).sub(this.target),S.applyQuaternion(this._quat),this._spherical.setFromVector3(S),this.autoRotate&&this.state===b.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let s=this.minAzimuthAngle,c=this.maxAzimuthAngle;isFinite(s)&&isFinite(c)&&(s<-Math.PI?s+=L:s>Math.PI&&(s-=L),c<-Math.PI?c+=L:c>Math.PI&&(c-=L),s<=c?this._spherical.theta=Math.max(s,Math.min(c,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(s+c)/2?Math.max(s,this._spherical.theta):Math.min(c,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 J=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const G=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),J=G!=this._spherical.radius}if(S.setFromSpherical(this._spherical),S.applyQuaternion(this._quatInverse),n.copy(this.target).add(S),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 G=null;if(this.object.isPerspectiveCamera){const a=S.length();G=this._clampDistance(a*this._scale);const p=a-G;this.object.position.addScaledVector(this._dollyDirection,p),this.object.updateMatrixWorld(),J=!!p}else if(this.object.isOrthographicCamera){const a=new o.Vector3(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const p=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),J=p!==this.object.zoom;const g=new o.Vector3(this._mouse.x,this._mouse.y,0);g.unproject(this.object),this.object.position.sub(g).add(a),this.object.updateMatrixWorld(),G=S.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;G!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(G).add(this.object.position):(st.origin.copy(this.object.position),st.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(st.direction))<Dt?this.object.lookAt(this.target):(Jt.setFromNormalAndCoplanarPoint(this.object.up,this.target),st.intersectPlane(Jt,this.target))))}else if(this.object.isOrthographicCamera){const G=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),G!==this.object.zoom&&(this.object.updateProjectionMatrix(),J=!0)}return this._scale=1,this._performCursorZoom=!1,J||this._lastPosition.distanceToSquared(this.object.position)>ct||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ct||this._lastTargetPosition.distanceToSquared(this.target)>ct?(this.dispatchEvent(ut),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?L/60*this.autoRotateSpeed*t:L/60/60*this.autoRotateSpeed}_getZoomScale(t){const n=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*n)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,n){S.setFromMatrixColumn(n,0),S.multiplyScalar(-t),this._panOffset.add(S)}_panUp(t,n){this.screenSpacePanning===!0?S.setFromMatrixColumn(n,1):(S.setFromMatrixColumn(n,0),S.crossVectors(this.object.up,S)),S.multiplyScalar(t),this._panOffset.add(S)}_pan(t,n){const s=this.domElement;if(this.object.isPerspectiveCamera){const c=this.object.position;S.copy(c).sub(this.target);let J=S.length();J*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*J/s.clientHeight,this.object.matrix),this._panUp(2*n*J/s.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/s.clientWidth,this.object.matrix),this._panUp(n*(this.object.top-this.object.bottom)/this.object.zoom/s.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,n){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const s=this.domElement.getBoundingClientRect(),c=t-s.left,J=n-s.top,G=s.width,a=s.height;this._mouse.x=c/G*2-1,this._mouse.y=-(J/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const n=this.domElement;this._rotateLeft(L*this._rotateDelta.x/n.clientHeight),this._rotateUp(L*this._rotateDelta.y/n.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let n=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(L*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),n=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-L*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),n=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(L*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),n=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-L*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),n=!0;break}n&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const n=this._getSecondPointerPosition(t),s=.5*(t.pageX+n.x),c=.5*(t.pageY+n.y);this._rotateStart.set(s,c)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const n=this._getSecondPointerPosition(t),s=.5*(t.pageX+n.x),c=.5*(t.pageY+n.y);this._panStart.set(s,c)}}_handleTouchStartDolly(t){const n=this._getSecondPointerPosition(t),s=t.pageX-n.x,c=t.pageY-n.y,J=Math.sqrt(s*s+c*c);this._dollyStart.set(0,J)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const s=this._getSecondPointerPosition(t),c=.5*(t.pageX+s.x),J=.5*(t.pageY+s.y);this._rotateEnd.set(c,J)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const n=this.domElement;this._rotateLeft(L*this._rotateDelta.x/n.clientHeight),this._rotateUp(L*this._rotateDelta.y/n.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const n=this._getSecondPointerPosition(t),s=.5*(t.pageX+n.x),c=.5*(t.pageY+n.y);this._panEnd.set(s,c)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const n=this._getSecondPointerPosition(t),s=t.pageX-n.x,c=t.pageY-n.y,J=Math.sqrt(s*s+c*c);this._dollyEnd.set(0,J),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 G=(t.pageX+n.x)*.5,a=(t.pageY+n.y)*.5;this._updateZoomParameters(G,a)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let n=0;n<this._pointers.length;n++)if(this._pointers[n]==t.pointerId){this._pointers.splice(n,1);return}}_isTrackingPointer(t){for(let n=0;n<this._pointers.length;n++)if(this._pointers[n]==t.pointerId)return!0;return!1}_trackPointer(t){let n=this._pointerPositions[t.pointerId];n===void 0&&(n=new o.Vector2,this._pointerPositions[t.pointerId]=n),n.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const n=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[n]}_customWheelEvent(t){const n=t.deltaMode,s={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(n){case 1:s.deltaY*=16;break;case 2:s.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(s.deltaY*=10),s}}function St(l){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(l.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(l)&&(this._addPointer(l),l.pointerType==="touch"?this._onTouchStart(l):this._onMouseDown(l)))}function Tt(l){this.enabled!==!1&&(l.pointerType==="touch"?this._onTouchMove(l):this._onMouseMove(l))}function Ct(l){switch(this._removePointer(l),this._pointers.length){case 0:this.domElement.releasePointerCapture(l.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(pt),this.state=b.NONE;break;case 1:const t=this._pointers[0],n=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:n.x,pageY:n.y});break}}function kt(l){let t;switch(l.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case o.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(l),this.state=b.DOLLY;break;case o.MOUSE.ROTATE:if(l.ctrlKey||l.metaKey||l.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(l),this.state=b.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(l),this.state=b.ROTATE}break;case o.MOUSE.PAN:if(l.ctrlKey||l.metaKey||l.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(l),this.state=b.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(l),this.state=b.PAN}break;default:this.state=b.NONE}this.state!==b.NONE&&this.dispatchEvent(dt)}function Nt(l){switch(this.state){case b.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(l);break;case b.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(l);break;case b.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(l);break}}function At(l){this.enabled===!1||this.enableZoom===!1||this.state!==b.NONE||(l.preventDefault(),this.dispatchEvent(dt),this._handleMouseWheel(this._customWheelEvent(l)),this.dispatchEvent(pt))}function Ot(l){this.enabled!==!1&&this._handleKeyDown(l)}function zt(l){switch(this._trackPointer(l),this._pointers.length){case 1:switch(this.touches.ONE){case o.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(l),this.state=b.TOUCH_ROTATE;break;case o.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(l),this.state=b.TOUCH_PAN;break;default:this.state=b.NONE}break;case 2:switch(this.touches.TWO){case o.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(l),this.state=b.TOUCH_DOLLY_PAN;break;case o.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(l),this.state=b.TOUCH_DOLLY_ROTATE;break;default:this.state=b.NONE}break;default:this.state=b.NONE}this.state!==b.NONE&&this.dispatchEvent(dt)}function Lt(l){switch(this._trackPointer(l),this.state){case b.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(l),this.update();break;case b.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(l),this.update();break;case b.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(l),this.update();break;case b.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(l),this.update();break;default:this.state=b.NONE}}function Ht(l){this.enabled!==!1&&l.preventDefault()}function jt(l){l.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function It(l){l.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ut(l){let t=null,n=null,s=null,c=null,J=null,G=null,a=null,p=null;const g=e.ref([]),u=e.ref(new o.Vector3),H=e.ref(new o.Vector3),j=()=>{if(!l.value)return;t=new o.Scene,t.background=new o.Color(15790320);const r=l.value;n=new o.PerspectiveCamera(75,r.clientWidth/r.clientHeight,.1,1e4),n.position.set(8,-8,6),n.up.set(0,0,1),n.lookAt(0,0,0),s=new o.WebGLRenderer({antialias:!0,alpha:!0}),s.setSize(r.clientWidth,r.clientHeight),s.localClippingEnabled=!0,s.shadowMap.enabled=!0,s.shadowMap.type=o.PCFSoftShadowMap,s.toneMapping=o.ACESFilmicToneMapping,s.toneMappingExposure=1,s.outputColorSpace=o.SRGBColorSpace,r.appendChild(s.domElement),c=new Vt(n,s.domElement),c.enableDamping=!0,c.dampingFactor=.05,c.mouseButtons={LEFT:o.MOUSE.ROTATE,MIDDLE:o.MOUSE.PAN,RIGHT:null},c.panSpeed=.7,J=new o.Xe(n,s,{container:r,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),J.attachControls(c),E(),_()},U=(r,i)=>{a&&(t.remove(a),a.dispose()),p&&(t.remove(p),p.geometry.dispose(),p.material.dispose());const d=Math.min(Math.max(Math.floor(r/20),30),40);a=new o.GridHelper(r,d,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(i),t.add(a);const y=new o.PlaneGeometry(r,r),M=new o.ShadowMaterial({opacity:.3,color:0});p=new o.Mesh(y,M),p.position.copy(i),p.position.z-=.01,p.receiveShadow=!0,t.add(p)},O=()=>{if(g.value.length===0)return;const r=new o.Box3;g.value.forEach(T=>{r.expandByObject(T)});const i=r.getSize(new o.Vector3),d=r.getCenter(new o.Vector3),y=Math.max(i.x,i.y,i.z),M=Math.max(y*8,50),x=new o.Vector3(d.x,d.y,r.min.z);U(M,x)},E=()=>{const r=new o.AmbientLight(4210752,.6);t.add(r);const i=new o.DirectionalLight(16777215,2);i.position.set(10,10,8),i.castShadow=!0,i.shadow.mapSize.width=4096,i.shadow.mapSize.height=4096,i.shadow.camera.near=.5,i.shadow.camera.far=50,i.shadow.camera.left=-50,i.shadow.camera.right=50,i.shadow.camera.top=50,i.shadow.camera.bottom=-50,t.add(i);const d=new o.DirectionalLight(16777215,.8);d.position.set(-8,-8,6),t.add(d);const y=new o.DirectionalLight(16777215,.6);y.position.set(0,-15,2),t.add(y);const M=new o.HemisphereLight(16777215,4473924,.8);t.add(M);const x=new o.PointLight(16777215,1,50);x.position.set(15,15,15),t.add(x);const T=new o.PointLight(16777215,.5,50);T.position.set(-15,-15,15),t.add(T)},_=()=>{G=requestAnimationFrame(_),c&&c.update(),s&&t&&n&&s.render(t,n),J&&J.render()},m=r=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(d=>{r[d]&&r[d].dispose&&r[d].dispose()}),r.dispose&&r.dispose()},f=r=>{r==null||r.traverse(i=>{i.geometry&&i.geometry.dispose(),i.material&&(Array.isArray(i.material)?i.material.forEach(d=>{m(d)}):m(i.material))})};return{currentModels:g,initialCameraPosition:u,initialTargetPosition:H,initThreeJS:j,handleResize:()=>{if(!l.value||!n||!s||!J)return;const r=l.value,i=r.clientWidth,d=r.clientHeight;n.aspect=i/d,n.updateProjectionMatrix(),s.setSize(i,d),J.update()},fitCameraToAllModels:()=>{if(!n||!c||g.value.length===0)return;const r=new o.Box3;g.value.forEach(T=>{r.expandByObject(T)});const i=r.getSize(new o.Vector3),d=r.getCenter(new o.Vector3),M=Math.max(i.x,i.y,i.z)*.8,x=new o.Vector3(d.x+M,d.y-M,d.z+M);n.position.copy(x),n.lookAt(d),c.target.copy(d),c.update(),u.value.copy(x),H.value.copy(d),O()},getThreeJSObjects:()=>({scene:t,camera:n,renderer:s,controls:c,gizmo:J}),clearAllModels:()=>{if(!t)return;g.value.forEach(i=>{t.remove(i),f(i)});const r=[];t.children.forEach(i=>{!i.isLight&&!i.isCamera&&i.type!=="GridHelper"&&i!==p&&r.push(i)}),r.forEach(i=>{t.remove(i),f(i)}),g.value=[],O()},cleanup:()=>{G&&cancelAnimationFrame(G),a&&a.dispose(),p&&(p.geometry.dispose(),p.material.dispose()),s&&s.dispose(),c&&c.dispose(),J&&J.dispose()},updateGridForModels:O}}function Ft(l,t){const n=e.ref(!1);let s=null,c=12700,J=new o.Vector3,G=new o.Vector3,a=new o.Vector3,p=0,g=null;const u=_=>_<.5?4*_*_*_:1-Math.pow(-2*_+2,3)/2,H=_=>{const m=new o.Vector3,f=p*1.2,R=new o.Vector3(a.x+f,a.y,a.z),w=new o.Vector3(a.x,a.y+f,a.z),A=new o.Vector3(a.x,a.y-f,a.z);if(_<=.567){const h=_/.567*Math.PI*2;m.x=a.x+Math.cos(h)*f,m.z=a.z+Math.sin(h)*f,m.y=a.y}else if(_<=.724){const B=(_-.567)/.157,h=u(B);m.lerpVectors(R,w,h)}else if(_<=.881){const B=(_-.724)/.157,r=u(B)*Math.PI;m.x=a.x+Math.sin(r)*f,m.y=a.y+Math.cos(r)*f,m.z=a.z}else{const B=(_-.881)/.119,h=u(B);m.lerpVectors(A,J,h)}return m},j=()=>{const{camera:_,controls:m}=l();if(!_||!m)return;s||(s=Date.now());const f=Date.now()-s,R=Math.min(f/c,1);if(R>=1){O();return}const w=H(R);_.position.copy(w),_.lookAt(a),m.target.copy(a),g=requestAnimationFrame(j)},U=()=>{if(t.value.length===0)return;const{camera:_,controls:m}=l();if(!_||!m)return;J.copy(_.position),G.copy(m.target);const f=new o.Box3;t.value.forEach(i=>{f.expandByObject(i)});const R=f.getSize(new o.Vector3);a=f.getCenter(new o.Vector3),p=Math.max(R.x,R.y,R.z)*1.2;const w=new o.Vector3(a.x+p*1.2,a.y,a.z);m.enabled=!1;const A=_.position.clone(),B=1e3,h=Date.now(),r=()=>{const i=Date.now()-h,d=Math.min(i/B,1),y=u(d);_.position.lerpVectors(A,w,y),_.lookAt(a),m.target.copy(a),d<1?requestAnimationFrame(r):(n.value=!0,s=null,j())};r()},O=()=>{n.value=!1,s=null,g&&(cancelAnimationFrame(g),g=null);const{controls:_}=l();_&&(_.enabled=!0,_.target.copy(G))};return{isAnimating:n,toggleAnimation:()=>{if(n.value){n.value=!1,s=null,g&&(cancelAnimationFrame(g),g=null);const{camera:_,controls:m}=l();if(!_||!m)return;m.enabled=!0;const f=_.position.clone(),R=m.target.clone(),w=1500,A=Date.now(),B=()=>{const h=Date.now()-A,r=Math.min(h/w,1),i=u(r);_.position.lerpVectors(f,J,i),m.target.lerpVectors(R,G,i),r<1&&requestAnimationFrame(B)};B()}else U()},startAnimation:U,stopAnimation:O}}function Yt(l,t){const n=e.ref(!1),s=e.ref("none");let c=[],J=[],G=new o.Box3,a=new o.Vector3;const p=()=>{c=[new o.Plane(new o.Vector3(1,0,0),0),new o.Plane(new o.Vector3(0,1,0),0),new o.Plane(new o.Vector3(0,0,1),0)]},g=()=>{G.makeEmpty(),t.value.forEach(E=>{G.expandByObject(E)}),a=G.getCenter(new o.Vector3)},u=E=>{const _=G.getSize(new o.Vector3);let m,f,R;E==="x"?(m=new o.PlaneGeometry(_.z*1.2,_.y*1.2),f=new o.Vector3(a.x,a.y,a.z),R=new o.Euler(0,Math.PI/2,0)):E==="y"?(m=new o.PlaneGeometry(_.x*1.2,_.z*1.2),f=new o.Vector3(a.x,a.y,a.z),R=new o.Euler(Math.PI/2,0,0)):E==="z"&&(m=new o.PlaneGeometry(_.x*1.2,_.y*1.2),f=new o.Vector3(a.x,a.y,a.z),R=new o.Euler(0,0,0));const w=new o.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:o.DoubleSide,depthWrite:!1}),A=new o.Mesh(m,w);return A.position.copy(f),A.rotation.copy(R),A},H=()=>{if(j(),U(),s.value==="none")return;g();let E=null;if(s.value==="x"?(c[0].constant=-a.x,E=c[0]):s.value==="y"?(c[1].constant=-a.y,E=c[1]):s.value==="z"&&(c[2].constant=-a.z,E=c[2]),E){t.value.forEach(m=>{m.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(R=>{R.clippingPlanes=[E]}):f.material.clippingPlanes=[E])})});const{scene:_}=l();if(_){const m=u(s.value);_.add(m),J.push(m)}}},j=()=>{t.value.forEach(E=>{E.traverse(_=>{_.isMesh&&_.material&&(Array.isArray(_.material)?_.material.forEach(m=>{m.clippingPlanes=[]}):_.material.clippingPlanes=[])})})},U=()=>{const{scene:E}=l();E&&J.forEach(_=>{E.remove(_),_.geometry.dispose(),_.material.dispose()}),J=[]};return{isClipping:n,activeClippingAxis:s,toggleClipping:()=>{n.value=!n.value,n.value?(p(),t.value.length>0&&g()):(s.value="none",j(),U())},updateClippingPlanes:H,clearClippingPlanes:j,clearClippingMeshes:U}}const Zt=[{"J1_Joint(GP1)":-.003172089,"J2_Joint(GP1)":-.096027484,"J3_Joint(GP1)":-1.118475479,"J4_Joint(GP1)":1.57418324,"J5_Joint(GP1)":1.572865909,"J6_Joint(GP1)":-.549141112,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":0},{"J1_Joint(GP1)":-.003172089,"J2_Joint(GP1)":-.096027484,"J3_Joint(GP1)":-1.118475479,"J4_Joint(GP1)":1.57418324,"J5_Joint(GP1)":1.572865909,"J6_Joint(GP1)":-.549141112,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":0},{"J1_Joint(GP1)":-.051468453,"J2_Joint(GP1)":-.094548525,"J3_Joint(GP1)":-1.117172585,"J4_Joint(GP1)":1.615414534,"J5_Joint(GP1)":1.598024878,"J6_Joint(GP1)":-.548360986,"BendRotatePart_Joint(GP2)":.860623343,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":0},{"J1_Joint(GP1)":-.051468453,"J2_Joint(GP1)":-.094548525,"J3_Joint(GP1)":-1.117172585,"J4_Joint(GP1)":1.615414534,"J5_Joint(GP1)":1.598024878,"J6_Joint(GP1)":-.548360986,"BendRotatePart_Joint(GP2)":.860623343,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":0},{"J1_Joint(GP1)":-.054269136,"J2_Joint(GP1)":-.09438254,"J3_Joint(GP1)":-1.117026191,"J4_Joint(GP1)":1.617807288,"J5_Joint(GP1)":1.59948194,"J6_Joint(GP1)":-.548274538,"BendRotatePart_Joint(GP2)":.860623343,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":0},{"J1_Joint(GP1)":-.054269136,"J2_Joint(GP1)":-.09438254,"J3_Joint(GP1)":-1.117026191,"J4_Joint(GP1)":1.617807288,"J5_Joint(GP1)":1.59948194,"J6_Joint(GP1)":-.548274538,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":0},{"J1_Joint(GP1)":-.07106296,"J2_Joint(GP1)":-.093202686,"J3_Joint(GP1)":-1.115984624,"J4_Joint(GP1)":1.632161558,"J5_Joint(GP1)":1.608211995,"J6_Joint(GP1)":-.547662192,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-1.582839141},{"J1_Joint(GP1)":-.07106296,"J2_Joint(GP1)":-.093202686,"J3_Joint(GP1)":-1.115984624,"J4_Joint(GP1)":1.632161558,"J5_Joint(GP1)":1.608211995,"J6_Joint(GP1)":-.547662192,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":-1.582839141},{"J1_Joint(GP1)":-.15885978,"J2_Joint(GP1)":-.081876359,"J3_Joint(GP1)":-1.105898511,"J4_Joint(GP1)":1.707488829,"J5_Joint(GP1)":1.653550174,"J6_Joint(GP1)":-.541902553,"BendRotatePart_Joint(GP2)":1.584934783,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":-1.582839141},{"J1_Joint(GP1)":-.15885978,"J2_Joint(GP1)":-.081876359,"J3_Joint(GP1)":-1.105898511,"J4_Joint(GP1)":1.707488829,"J5_Joint(GP1)":1.653550174,"J6_Joint(GP1)":-.541902553,"BendRotatePart_Joint(GP2)":1.584934783,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-1.582839141},{"J1_Joint(GP1)":-.161596827,"J2_Joint(GP1)":-.081383753,"J3_Joint(GP1)":-1.105456248,"J4_Joint(GP1)":1.709847399,"J5_Joint(GP1)":1.654952777,"J6_Joint(GP1)":-.541656255,"BendRotatePart_Joint(GP2)":1.584934783,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-1.582839141},{"J1_Joint(GP1)":-.161596827,"J2_Joint(GP1)":-.081383753,"J3_Joint(GP1)":-1.105456248,"J4_Joint(GP1)":1.709847399,"J5_Joint(GP1)":1.654952777,"J6_Joint(GP1)":-.541656255,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-1.582839141},{"J1_Joint(GP1)":-.206647418,"J2_Joint(GP1)":-.072058188,"J3_Joint(GP1)":-1.097027028,"J4_Joint(GP1)":1.748782637,"J5_Joint(GP1)":1.677920661,"J6_Joint(GP1)":-.53705618,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-2.788687058},{"J1_Joint(GP1)":-.206647418,"J2_Joint(GP1)":-.072058188,"J3_Joint(GP1)":-1.097027028,"J4_Joint(GP1)":1.748782637,"J5_Joint(GP1)":1.677920661,"J6_Joint(GP1)":-.53705618,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":-2.788687058},{"J1_Joint(GP1)":-.222883715,"J2_Joint(GP1)":-.068132789,"J3_Joint(GP1)":-1.093446644,"J4_Joint(GP1)":1.762872336,"J5_Joint(GP1)":1.686139573,"J6_Joint(GP1)":-.535155089,"BendRotatePart_Joint(GP2)":.302813533,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":-2.788687058},{"J1_Joint(GP1)":-.222883715,"J2_Joint(GP1)":-.068132789,"J3_Joint(GP1)":-1.093446644,"J4_Joint(GP1)":1.762872336,"J5_Joint(GP1)":1.686139573,"J6_Joint(GP1)":-.535155089,"BendRotatePart_Joint(GP2)":.302813533,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-2.788687058},{"J1_Joint(GP1)":-.225553405,"J2_Joint(GP1)":-.067458613,"J3_Joint(GP1)":-1.092829796,"J4_Joint(GP1)":1.765192186,"J5_Joint(GP1)":1.687487837,"J6_Joint(GP1)":-.534830668,"BendRotatePart_Joint(GP2)":.302813533,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-2.788687058},{"J1_Joint(GP1)":-.225553405,"J2_Joint(GP1)":-.067458613,"J3_Joint(GP1)":-1.092829796,"J4_Joint(GP1)":1.765192186,"J5_Joint(GP1)":1.687487837,"J6_Joint(GP1)":-.534830668,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":-2.788687058},{"J1_Joint(GP1)":-.253794227,"J2_Joint(GP1)":-.059828421,"J3_Joint(GP1)":-1.085808974,"J4_Joint(GP1)":1.789788497,"J5_Joint(GP1)":1.701694229,"J6_Joint(GP1)":-.531201442,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.253794227,"J2_Joint(GP1)":-.059828421,"J3_Joint(GP1)":-1.085808974,"J4_Joint(GP1)":1.789788497,"J5_Joint(GP1)":1.701694229,"J6_Joint(GP1)":-.531201442,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.269664357,"J2_Joint(GP1)":-.055139299,"J3_Joint(GP1)":-1.081458321,"J4_Joint(GP1)":1.803657153,"J5_Joint(GP1)":1.709631958,"J6_Joint(GP1)":-.52900977,"BendRotatePart_Joint(GP2)":.302815131,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.269664357,"J2_Joint(GP1)":-.055139299,"J3_Joint(GP1)":-1.081458321,"J4_Joint(GP1)":1.803657153,"J5_Joint(GP1)":1.709631958,"J6_Joint(GP1)":-.52900977,"BendRotatePart_Joint(GP2)":.302815131,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.272271675,"J2_Joint(GP1)":-.05434119,"J3_Joint(GP1)":-1.080715087,"J4_Joint(GP1)":1.805938943,"J5_Joint(GP1)":1.710932883,"J6_Joint(GP1)":-.528639664,"BendRotatePart_Joint(GP2)":.302815131,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.272271675,"J2_Joint(GP1)":-.05434119,"J3_Joint(GP1)":-1.080715087,"J4_Joint(GP1)":1.805938943,"J5_Joint(GP1)":1.710932883,"J6_Joint(GP1)":-.528639664,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.666340342,"J2_Joint(GP1)":.165158009,"J3_Joint(GP1)":-.846100311,"J4_Joint(GP1)":2.1593725,"J5_Joint(GP1)":1.90543118,"J6_Joint(GP1)":-.458042565,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.666340342,"J2_Joint(GP1)":.165158009,"J3_Joint(GP1)":-.846100311,"J4_Joint(GP1)":2.1593725,"J5_Joint(GP1)":1.90543118,"J6_Joint(GP1)":-.458042565,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.676764437,"J2_Joint(GP1)":.174126178,"J3_Joint(GP1)":-.835263449,"J4_Joint(GP1)":2.168745148,"J5_Joint(GP1)":1.911070297,"J6_Joint(GP1)":-.456401397,"BendRotatePart_Joint(GP2)":.302813234,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.676764437,"J2_Joint(GP1)":.174126178,"J3_Joint(GP1)":-.835263449,"J4_Joint(GP1)":2.168745148,"J5_Joint(GP1)":1.911070297,"J6_Joint(GP1)":-.456401397,"BendRotatePart_Joint(GP2)":.302813234,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.678469051,"J2_Joint(GP1)":.175612656,"J3_Joint(GP1)":-.833458171,"J4_Joint(GP1)":2.170275986,"J5_Joint(GP1)":1.911999806,"J6_Joint(GP1)":-.456138025,"BendRotatePart_Joint(GP2)":.302813234,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.678469051,"J2_Joint(GP1)":.175612656,"J3_Joint(GP1)":-.833458171,"J4_Joint(GP1)":2.170275986,"J5_Joint(GP1)":1.911999806,"J6_Joint(GP1)":-.456138025,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":.352905596},{"J1_Joint(GP1)":-.696352039,"J2_Joint(GP1)":.191555012,"J3_Joint(GP1)":-.813935936,"J4_Joint(GP1)":2.186300561,"J5_Joint(GP1)":1.921886405,"J6_Joint(GP1)":-.453466278,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":3.49449825},{"J1_Joint(GP1)":-.696352039,"J2_Joint(GP1)":.191555012,"J3_Joint(GP1)":-.813935936,"J4_Joint(GP1)":2.186300561,"J5_Joint(GP1)":1.921886405,"J6_Joint(GP1)":-.453466278,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":3.49449825},{"J1_Joint(GP1)":-.706279886,"J2_Joint(GP1)":.200687848,"J3_Joint(GP1)":-.80262089,"J4_Joint(GP1)":2.195165367,"J5_Joint(GP1)":1.927490122,"J6_Joint(GP1)":-.452060238,"BendRotatePart_Joint(GP2)":.302814632,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":3.49449825},{"J1_Joint(GP1)":-.706279886,"J2_Joint(GP1)":.200687848,"J3_Joint(GP1)":-.80262089,"J4_Joint(GP1)":2.195165367,"J5_Joint(GP1)":1.927490122,"J6_Joint(GP1)":-.452060238,"BendRotatePart_Joint(GP2)":.302814632,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":3.49449825},{"J1_Joint(GP1)":-.707903161,"J2_Joint(GP1)":.202200891,"J3_Joint(GP1)":-.800737154,"J4_Joint(GP1)":2.196612452,"J5_Joint(GP1)":1.928414793,"J6_Joint(GP1)":-.45183595,"BendRotatePart_Joint(GP2)":.302814632,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":3.49449825},{"J1_Joint(GP1)":-.707903161,"J2_Joint(GP1)":.202200891,"J3_Joint(GP1)":-.800737154,"J4_Joint(GP1)":2.196612452,"J5_Joint(GP1)":1.928414793,"J6_Joint(GP1)":-.45183595,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":3.49449825},{"J1_Joint(GP1)":-.734200754,"J2_Joint(GP1)":.227518671,"J3_Joint(GP1)":-.768834774,"J4_Joint(GP1)":2.219949057,"J5_Joint(GP1)":1.943757592,"J6_Joint(GP1)":-.448441828,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":4.700346166},{"J1_Joint(GP1)":-.734200754,"J2_Joint(GP1)":.227518671,"J3_Joint(GP1)":-.768834774,"J4_Joint(GP1)":2.219949057,"J5_Joint(GP1)":1.943757592,"J6_Joint(GP1)":-.448441828,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":4.700346166},{"J1_Joint(GP1)":-.781149218,"J2_Joint(GP1)":.276839725,"J3_Joint(GP1)":-.704674666,"J4_Joint(GP1)":2.260965081,"J5_Joint(GP1)":1.973194737,"J6_Joint(GP1)":-.443707106,"BendRotatePart_Joint(GP2)":1.584933185,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":4.700346166},{"J1_Joint(GP1)":-.781149218,"J2_Joint(GP1)":.276839725,"J3_Joint(GP1)":-.704674666,"J4_Joint(GP1)":2.260965081,"J5_Joint(GP1)":1.973194737,"J6_Joint(GP1)":-.443707106,"BendRotatePart_Joint(GP2)":1.584933185,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":4.700346166},{"J1_Joint(GP1)":-.782563443,"J2_Joint(GP1)":.278415273,"J3_Joint(GP1)":-.702582574,"J4_Joint(GP1)":2.262184408,"J5_Joint(GP1)":1.974129872,"J6_Joint(GP1)":-.443595316,"BendRotatePart_Joint(GP2)":1.584933185,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":4.700346166},{"J1_Joint(GP1)":-.782563443,"J2_Joint(GP1)":.278415273,"J3_Joint(GP1)":-.702582574,"J4_Joint(GP1)":2.262184408,"J5_Joint(GP1)":1.974129872,"J6_Joint(GP1)":-.443595316,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":4.700346166},{"J1_Joint(GP1)":-.790970382,"J2_Joint(GP1)":.287898042,"J3_Joint(GP1)":-.689936686,"J4_Joint(GP1)":2.269409635,"J5_Joint(GP1)":1.979755278,"J6_Joint(GP1)":-.442972648,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.790970382,"J2_Joint(GP1)":.287898042,"J3_Joint(GP1)":-.689936686,"J4_Joint(GP1)":2.269409635,"J5_Joint(GP1)":1.979755278,"J6_Joint(GP1)":-.442972648,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.81430373,"J2_Joint(GP1)":.315316096,"J3_Joint(GP1)":-.652859101,"J4_Joint(GP1)":2.28923367,"J5_Joint(GP1)":1.996012131,"J6_Joint(GP1)":-.441647984,"BendRotatePart_Joint(GP2)":.860625939,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.81430373,"J2_Joint(GP1)":.315316096,"J3_Joint(GP1)":-.652859101,"J4_Joint(GP1)":2.28923367,"J5_Joint(GP1)":1.996012131,"J6_Joint(GP1)":-.441647984,"BendRotatePart_Joint(GP2)":.860625939,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.815624991,"J2_Joint(GP1)":.31691936,"J3_Joint(GP1)":-.650667784,"J4_Joint(GP1)":2.290345082,"J5_Joint(GP1)":1.9969632,"J6_Joint(GP1)":-.441592027,"BendRotatePart_Joint(GP2)":.860625939,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.815624991,"J2_Joint(GP1)":.31691936,"J3_Joint(GP1)":-.650667784,"J4_Joint(GP1)":2.290345082,"J5_Joint(GP1)":1.9969632,"J6_Joint(GP1)":-.441592027,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.856703221,"J2_Joint(GP1)":.369769111,"J3_Joint(GP1)":-.577053756,"J4_Joint(GP1)":2.324173006,"J5_Joint(GP1)":2.028430263,"J6_Joint(GP1)":-.441031864,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.856703221,"J2_Joint(GP1)":.369769111,"J3_Joint(GP1)":-.577053756,"J4_Joint(GP1)":2.324173006,"J5_Joint(GP1)":2.028430263,"J6_Joint(GP1)":-.441031864,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":0,"BendGuidePart_Joint(GP2)":0,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.856703221,"J2_Joint(GP1)":.369769111,"J3_Joint(GP1)":-.577053756,"J4_Joint(GP1)":2.324173006,"J5_Joint(GP1)":2.028430263,"J6_Joint(GP1)":-.441031864,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":6.283185307},{"J1_Joint(GP1)":-.85790624,"J2_Joint(GP1)":.371411093,"J3_Joint(GP1)":-.574724957,"J4_Joint(GP1)":2.325139523,"J5_Joint(GP1)":2.029413042,"J6_Joint(GP1)":-.441053498,"BendRotatePart_Joint(GP2)":0,"BendMainPart_Joint(GP2)":-.05,"BendGuidePart_Joint(GP2)":-.015,"HolderRoate_Joint(GP3)":6.283185307}],$t={class:"panel-actions"},Kt=["disabled"],Xt={class:"panel-content"},Wt={key:0,class:"joints-list"},qt={class:"joint-info-row"},Qt={class:"joint-left"},te={class:"joint-name"},ee={class:"joint-range"},oe={class:"joint-type"},ne={key:0,class:"joint-control-row"},ie={class:"slider-container"},ae=["min","max","value","onInput","disabled"],se={class:"value-display"},re={class:"joint-value"},le={class:"unit"},ce={key:1,class:"empty-state"},de=1e3,he={__name:"jointPanel",props:{model:Object,scene:Object},setup(l){const t=l;e.ref(!0);const n=e.ref([]),s=e.ref(null),c=e.ref(!1),J=e.ref(null),G=Zt;G.length>0&&Object.keys(G[0]);const a=(h,r=!1)=>h==="revolute"?r?Math.PI:-Math.PI:h==="prismatic"?r?1:-1:0,p=h=>{if(!h||!h.joints)return console.warn("URDF模型没有关节信息"),[];const r=[];return Object.keys(h.joints).forEach(i=>{const d=h.joints[i];if(d._jointType==="fixed")return;const y=d.limit?{lower:d.limit.lower??a(d._jointType,!1),upper:d.limit.upper??a(d._jointType,!0)}:{lower:a(d._jointType,!1),upper:a(d._jointType,!0)};r.push({name:i,type:d._jointType||"unknown",limit:y,currentValue:d.angle||0,urdfJoint:d})}),r.sort((i,d)=>i.name.localeCompare(d.name))},g=(h,r)=>{const i=n.value.find(y=>y.name===h);if(!i)return;const d=parseFloat(r);if(i.limit){const y=Math.max(i.limit.lower,Math.min(i.limit.upper,d));i.currentValue=y}else i.currentValue=d;t.model&&t.model.setJointValue?t.model.setJointValue(h,i.currentValue):i.urdfJoint&&i.urdfJoint.setJointValue(i.currentValue)},u=h=>{h&&Object.keys(h).forEach(r=>{const i=h[r],d=n.value.find(y=>y.name===r);d&&(d.currentValue=i,t.model&&t.model.setJointValue?t.model.setJointValue(r,i):d.urdfJoint&&d.urdfJoint.setJointValue(i))})},H=(h,r,i)=>h+(r-h)*i,j=(h,r,i)=>{if(!h||!r)return h||r;const d={};return Object.keys(h).forEach(y=>{const M=h[y],x=r[y];d[y]=H(M,x||M,i)}),d},U=()=>{c.value?E():O()},O=()=>{if(G.length===0){console.warn("没有动画数据");return}c.value=!0;const h=G.length,r=60,i=de/r;let d=0,y=0;const M=()=>{if(!c.value)return;const x=d/r,T=G[y],D=G[y+1];if(D){const P=j(T,D,x);u(P)}else u(T);if(d++,d>=r&&(d=0,y++,y>=h-1)){E();return}J.value=setTimeout(M,i)};M()},E=()=>{c.value=!1,J.value&&(clearTimeout(J.value),J.value=null)},_=()=>{n.value.forEach(h=>{(h.type==="revolute"||h.type==="prismatic")&&g(h.name,0)})};e.watch(()=>t.model,h=>{h?n.value=p(h):n.value=[]},{immediate:!0});const m=()=>{!t.model||c.value||n.value.forEach(h=>{h.urdfJoint&&h.urdfJoint.angle!==void 0&&(h.currentValue=h.urdfJoint.angle)})},f=()=>{const h=()=>{m(),s.value=requestAnimationFrame(h)};h()},R=()=>{s.value&&(cancelAnimationFrame(s.value),s.value=null)};e.onMounted(()=>{f()}),e.onUnmounted(()=>{R(),E()});const w=(h,r,i,d={})=>{const M={...{segmentDuration:3,position:new o.Vector3(1.128,-.699,.378),tubeSegments:12},...d},x=[...h].reverse().map((C,V,N)=>V===N.length-1?{...C,c:0,r:0}:{...C,c:N[V+1].c,r:N[V+1].r});if(!t.scene)return;const T=(C,V)=>Math.abs(C)*Math.PI*V/180,D=[];for(let C=0;C<x.length;C++){const{y:V,b:N,c:Y,r:F}=x[C];if(D.push({type:"straight",length:V,segmentIndex:C,twist:N}),Y!==0&&F!==0){const K=T(Y,F);D.push({type:"bend",length:K,angle:Y,radius:F,segmentIndex:C})}}const P=(C=[])=>{const V=[];let N=new o.Vector3(0,0,0),Y=new o.Vector3(1,0,0),F=new o.Vector3(0,1,0),K=new o.Vector3(0,0,1);V.push(N.clone());for(let I=0;I<D.length;I++){const z=D[I];if(z.type==="straight"){if(z.twist!==0){const X=z.twist*Math.PI/180,Z=new o.Matrix4().makeRotationAxis(F,X);Y.applyMatrix4(Z),K.applyMatrix4(Z)}const q=z.length/1e3,Q=Math.max(8,Math.floor(z.length*.05));for(let X=1;X<=Q;X++){const Z=X/Q,tt=N.clone().add(F.clone().multiplyScalar(q*Z));V.push(tt)}N.add(F.clone().multiplyScalar(q))}else if(z.type==="bend"){const q=C[z.segmentIndex]||0,Q=z.angle*Math.PI/180,X=z.radius/1e3;if(q>0){const Z=N.clone().add(Y.clone().multiplyScalar(-X)),tt=Math.max(16,Math.floor(Math.abs(z.angle)/5));for(let lt=1;lt<=tt;lt++){const ft=lt/tt,gt=Q*q*ft,yt=new o.Matrix4().makeRotationAxis(K,gt),Pt=Y.clone().multiplyScalar(X);Pt.applyMatrix4(yt);const bt=Z.clone().add(Pt);V.push(bt)}const ot=Q*q,nt=new o.Matrix4().makeRotationAxis(K,ot),at=Y.clone().multiplyScalar(X);at.applyMatrix4(nt),N=Z.clone().add(at),Y.applyMatrix4(nt),F.applyMatrix4(nt)}else{const Z=z.length/1e3,tt=Math.max(8,Math.floor(z.length*.05));for(let ot=1;ot<=tt;ot++){const nt=ot/tt,at=N.clone().add(F.clone().multiplyScalar(Z*nt));V.push(at)}N.add(F.clone().multiplyScalar(Z))}}}const rt=new o.CatmullRomCurve3(V);return new o.TubeGeometry(rt,V.length*2,i/1e3,M.tubeSegments,!1)},$=new o.MeshPhongMaterial({color:11119017,shininess:60}),v=x.map(()=>0),mt=P(v),W=new o.Mesh(mt,$);W.position.copy(M.position),t.scene.add(W);const ht=x.map((C,V)=>C.c!==0&&C.r!==0?V:-1).filter(C=>C!==-1),et=[...ht].reverse(),Gt=Date.now(),_t=()=>{const V=(Date.now()-Gt)/1e3,N=Math.min(Math.floor(V/M.segmentDuration),et.length),Y=V%M.segmentDuration,F=Math.min(Y/M.segmentDuration,1),K=[...Array(x.length)].map(()=>0);for(let I=0;I<N;I++)K[et[I]]=1;N<et.length&&(K[et[N]]=F);try{const I=P(K);W.geometry.dispose(),W.geometry=I}catch(I){console.error("更新几何体失败:",I)}const rt=et.length*M.segmentDuration;if(V<rt)requestAnimationFrame(_t);else{const I=[...Array(x.length)].map((q,Q)=>ht.includes(Q)?1:0),z=P(I);W.geometry.dispose(),W.geometry=z}};return _t(),W},A=()=>{if(!t.scene)return;const h=[];t.scene.traverse(r=>{r.isMesh&&r.geometry&&r.geometry.type==="TubeGeometry"&&h.push(r)}),h.forEach(r=>{r.geometry.dispose(),r.material&&r.material.dispose(),t.scene.remove(r)})},B=()=>{A(),w([{y:88.61,b:0,c:90,r:8},{y:54.29,b:-90,c:90,r:8},{y:460.1,b:180,c:90,r:8},{y:48.95,b:-90,c:90,r:8},{y:27,b:0,c:0,r:0}],729,3.17,{segmentDuration:3,position:new o.Vector3(1.128,-.699,.378)})};return(h,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",$t,[e.createElementVNode("button",{onClick:U,class:"animate-btn"},e.toDisplayString(c.value?"停止动画":"开始动画"),1),e.createElementVNode("button",{onClick:_,disabled:c.value},"重置所有关节",8,Kt),e.createElementVNode("button",{onClick:B},"弯管"),e.createElementVNode("button",{onClick:A},"清理管子")]),e.createElementVNode("div",Xt,[n.value.length>0?(e.openBlock(),e.createElementBlock("div",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,i=>{var d,y,M,x;return e.openBlock(),e.createElementBlock("div",{key:i.name,class:"joint-item"},[e.createElementVNode("div",qt,[e.createElementVNode("div",Qt,[e.createElementVNode("span",te,e.toDisplayString(i.name),1),e.createElementVNode("span",ee," ["+e.toDisplayString(((d=i.limit)==null?void 0:d.lower.toFixed(2))??(i.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((y=i.limit)==null?void 0:y.upper.toFixed(2))??(i.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",oe,e.toDisplayString(i.type),1)]),i.type==="revolute"||i.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ie,[e.createElementVNode("input",{type:"range",min:((M=i.limit)==null?void 0:M.lower)??(i.type==="revolute"?-Math.PI:-1),max:((x=i.limit)==null?void 0:x.upper)??(i.type==="revolute"?Math.PI:1),step:.01,value:i.currentValue,onInput:T=>g(i.name,T.target.value),class:"joint-slider",disabled:c.value},null,40,ae)]),e.createElementVNode("div",se,[e.createElementVNode("span",re,e.toDisplayString(i.currentValue.toFixed(3)),1),e.createElementVNode("span",le,e.toDisplayString(i.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",ce,r[0]||(r[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))])],64))}},_e=it._export_sfc(he,[["__scopeId","data-v-54b54492"]]),Pe={class:"container"},ue=["xlink:href"];function Je(l,t,n,s,c,J){return e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[l.$attrs.class,l.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(l.getStyle),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":l.symbolId},null,8,ue)],6))])}const k=it._export_sfc(o._sfc_main,[["render",Je],["__scopeId","data-v-16b4e6b0"]]),pe={class:"obj-viewer-container"},me={class:"buttonGroup-top"},Ge={class:"buttonGroup-topLeft"},fe={class:"buttonGroup-left"},ge={class:"buttonGroup-right"},ye={class:"left-panel"},be={class:"panel-header"},Me={key:1,class:"panel-content"},Ee={class:"radio-group"},we={class:"radio-label"},ve={class:"radio-label"},Re={class:"radio-label"},Be={class:"radio-label"},xe={class:"right-panel"},De={class:"panel-header"},Ve={key:0,class:"loading-overlay"},Se={__name:"threeModel",setup(l,{expose:t}){let n=null,s=!1;const c=e.ref(null),J=e.ref(!1),G=e.ref("");e.ref(!1),e.ref(!1);const a=e.ref(!1),p=e.ref(""),g=e.ref(!1),{currentModels:u,initThreeJS:H,handleResize:j,fitCameraToAllModels:U,getThreeJSObjects:O,clearAllModels:E,cleanup:_}=Ut(c),{isAnimating:m,stopAnimation:f}=Ft(O,u),{isClipping:R,activeClippingAxis:w,toggleClipping:A,updateClippingPlanes:B}=Yt(O,u),{addModelsFromUrls:h,loadModelByDefaultPath:r,urdfModel:i}=o.useModelLoader(O,u,J,G,E),d=async()=>s?Promise.resolve():new Promise(D=>{const P=()=>{s?D():requestAnimationFrame(P)};P()}),y=async(D,P)=>{try{await d(),m.value&&f(),R.value&&A();const $=await P(D);return U(),$}catch($){throw console.error("加载模型失败:",$),$}},M=async D=>y(D,h),x=async D=>y(D,r),T=D=>{a.value=!0,p.value=D,D==="剖面图"&&!R.value&&A()};return e.onMounted(async()=>{await e.nextTick();try{H(),n=O().scene,s=!0,window.addEventListener("resize",j)}catch(D){console.error("Three.js初始化失败:",D)}}),e.onBeforeUnmount(()=>{s=!1,window.removeEventListener("resize",j),m.value&&f(),_()}),t({addModelsFromUrls:M,loadModelByDefaultPath:x}),(D,P)=>{const $=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:c,class:"threejs-container"},null,512),e.createElementVNode("div",me,[e.createVNode(k,{name:"guanjianjiexi",size:"34"}),e.createVNode(k,{name:"guanjiekongzhi",size:"34"}),e.createVNode(k,{name:"gongyishengcheng",size:"34"}),e.createVNode(k,{name:"buchangshezhi",size:"34"}),e.createVNode(k,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",Ge,[e.createVNode(k,{name:"fangda",size:"24"}),e.createVNode(k,{name:"suoxiao",size:"24"}),e.createVNode(k,{name:"fangdazhichuangkou",size:"24"})]),e.createElementVNode("div",fe,[e.createVNode(k,{name:"jiegoushu",size:"24",onClick:P[0]||(P[0]=v=>T("场景树"))}),e.createVNode(k,{name:"donghuafangzhen",size:"24",onClick:P[1]||(P[1]=v=>T("剖面图"))}),e.createVNode(k,{name:"donghuafangzhen",size:"24",onClick:P[2]||(P[2]=v=>T("场景树3"))}),e.createVNode(k,{name:"donghuafangzhen",size:"24",onClick:P[3]||(P[3]=v=>T("场景4"))})]),e.createElementVNode("div",ge,[e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"guanjiekongzhi",size:"24",onClick:P[4]||(P[4]=v=>g.value=!0)}),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"})]),e.withDirectives(e.createElementVNode("div",ye,[e.createElementVNode("div",be,[e.createElementVNode("span",null,e.toDisplayString(p.value),1),e.createElementVNode("span",{class:"close",onClick:P[5]||(P[5]=v=>a.value=!1)}," X ")]),e.createVNode($,{"max-height":"650px"},{default:e.withCtx(()=>[p.value==="场景树"?(e.openBlock(),e.createBlock(xt,{key:0,model:e.unref(i)},null,8,["model"])):e.createCommentVNode("",!0),p.value==="剖面图"?(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",Ee,[e.createElementVNode("label",we,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":P[6]||(P[6]=v=>e.isRef(w)?w.value=v:null),onChange:P[7]||(P[7]=(...v)=>e.unref(B)&&e.unref(B)(...v))},null,544),[[e.vModelRadio,e.unref(w)]]),P[15]||(P[15]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",ve,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":P[8]||(P[8]=v=>e.isRef(w)?w.value=v:null),onChange:P[9]||(P[9]=(...v)=>e.unref(B)&&e.unref(B)(...v))},null,544),[[e.vModelRadio,e.unref(w)]]),P[16]||(P[16]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Re,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":P[10]||(P[10]=v=>e.isRef(w)?w.value=v:null),onChange:P[11]||(P[11]=(...v)=>e.unref(B)&&e.unref(B)(...v))},null,544),[[e.vModelRadio,e.unref(w)]]),P[17]||(P[17]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Be,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":P[12]||(P[12]=v=>e.isRef(w)?w.value=v:null),onChange:P[13]||(P[13]=(...v)=>e.unref(B)&&e.unref(B)(...v))},null,544),[[e.vModelRadio,e.unref(w)]]),P[18]||(P[18]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,a.value]]),e.withDirectives(e.createElementVNode("div",xe,[e.createElementVNode("div",De,[P[19]||(P[19]=e.createElementVNode("span",null,e.toDisplayString("关节控制"),-1)),e.createElementVNode("span",{class:"close",onClick:P[14]||(P[14]=v=>g.value=!1)}," X ")]),e.createVNode($,{"max-height":"650px"},{default:e.withCtx(()=>[e.createVNode(_e,{model:e.unref(i),scene:e.unref(n)},null,8,["model","scene"])]),_:1})],512),[[e.vShow,g.value]]),J.value?(e.openBlock(),e.createElementBlock("div",Ve,[P[20]||(P[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(G.value),1)])):e.createCommentVNode("",!0)])}}},Te=it._export_sfc(Se,[["__scopeId","data-v-e7dd7d83"]]);exports.default=Te;
|