ss-component-new 1.2.136 → 1.2.138
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/{MTLLoader-W2bcC1q8.js → MTLLoader-BQPWZhwJ.js} +1 -1
- package/dist/{MTLLoader-MINcyZJJ.cjs → MTLLoader-rHpbWTI_.cjs} +1 -1
- package/dist/{OrbitControls-DInp3xM3.js → OrbitControls-Bvp2b_M2.js} +1 -1
- package/dist/{OrbitControls-zIDPLP2N.cjs → OrbitControls-D2yX87zU.cjs} +1 -1
- package/dist/{animationData-9Rwp8uyx.js → animationData-B3zZOzAE.js} +3 -3
- package/dist/{animationData-CPq6_wNF.cjs → animationData-CuUj6JDb.cjs} +1 -1
- package/dist/{array-jPdolPpm.js → array-B9gWNnej.js} +1 -1
- package/dist/{array-CYnA_0YM.cjs → array-DXu383Fa.cjs} +1 -1
- package/dist/{dataUtil-B4sGo38_.cjs → dataUtil-Brpg9CSN.cjs} +1 -1
- package/dist/{dataUtil-DQX9rTvE.js → dataUtil-DcGEuoWS.js} +1 -1
- package/dist/{iconfont-Bfcif4Wm.cjs → iconfont-Cd-HtwmG.cjs} +1 -1
- package/dist/{iconfont-BP_QEXyH.js → iconfont-DXGCEldy.js} +2 -2
- package/dist/{index-Ctb0iFbe.cjs → index-0EgOP_zr.cjs} +1 -1
- package/dist/{index-VvTawd2K.cjs → index-1iBK4SOi.cjs} +1 -1
- package/dist/{index-BXRe2SdU.cjs → index-7Z4hH5DN.cjs} +1 -1
- package/dist/{index-DoqCGsXd.js → index-B2rc9xa6.js} +11 -11
- package/dist/{index-4LcggUsv.cjs → index-B8PUJh-M.cjs} +1 -1
- package/dist/{index-D-8Ve1vd.js → index-B8pM9LoP.js} +19 -19
- package/dist/{index-BcdrVmA2.js → index-BE4Ox6_a.js} +2 -2
- package/dist/{index-3WEMy5_p.js → index-BGui0vrG.js} +2 -2
- package/dist/{index-DOZJO31u.cjs → index-BUacsR_l.cjs} +1 -1
- package/dist/{index-D4KRA-ju.js → index-BV8CK8MT.js} +5 -5
- package/dist/{index-C9D1SCzp.js → index-BYCdUxqq.js} +5 -5
- package/dist/{index-CcklBwqU.js → index-Bnmx0uns.js} +2 -2
- package/dist/index-BotH0jHM.cjs +1 -0
- package/dist/{index-CBsOpx33.cjs → index-BqzSSymu.cjs} +1 -1
- package/dist/{index-WjmB2-oN.cjs → index-Bw2f8X7m.cjs} +1 -1
- package/dist/{index-Dc7vS45u.js → index-BxtkLab-.js} +2 -2
- package/dist/{index-Bo9YSg2v.js → index-CBLiY4kf.js} +1 -1
- package/dist/{index-BN4MhImz.js → index-CGeabbQ5.js} +7 -7
- package/dist/{index-CSQJCfDf.js → index-CIoVLl8r.js} +1 -1
- package/dist/{index-BxZ-k8Ww.js → index-CR1PuEcf.js} +1 -1
- package/dist/{index-B21qNg4A.cjs → index-CSUfNuHC.cjs} +1 -1
- package/dist/{index-CGRb8BQx.cjs → index-C_U3JqBH.cjs} +1 -1
- package/dist/{index-CfrzoYYm.js → index-Ck1jmhY4.js} +10 -10
- package/dist/{index-CmVXy6DG.js → index-ClzevDbG.js} +2 -2
- package/dist/{index-Cw3gRBT3.cjs → index-D6ZtjYlX.cjs} +1 -1
- package/dist/{index-sqKsSUMY.js → index-DCkDkfcv.js} +2 -2
- package/dist/{index-a6bC3A9D.cjs → index-DHMUS6aq.cjs} +1 -1
- package/dist/{index-CcwTi2WJ.js → index-DMB7b-Hz.js} +1 -1
- package/dist/{index-BP7w8f-l.cjs → index-DNd_R3Wc.cjs} +1 -1
- package/dist/{index-CXrryrro.js → index-DToa387-.js} +1 -1
- package/dist/{index-DH1jRFsR.js → index-DUvCKtvN.js} +1 -1
- package/dist/{index-eaKFpHpQ.cjs → index-DW4LUPva.cjs} +1 -1
- package/dist/{index-DhufphmT.cjs → index-DWozj8SO.cjs} +1 -1
- package/dist/{index-DRVFz7q3.js → index-DXKmyyiU.js} +2 -2
- package/dist/{index-CcvCPGjx.js → index-DZshon9L.js} +3 -3
- package/dist/{index-h4NtMFJ6.cjs → index-Da-jfSLY.cjs} +1 -1
- package/dist/{index-CqDh73Kp.js → index-DcZT1tEr.js} +3 -3
- package/dist/{index-Duq040ej.js → index-DiaETo4w.js} +5 -5
- package/dist/{index-lQ5itYsF.cjs → index-Dr6BN_zC.cjs} +1 -1
- package/dist/{index-BXfKtvF-.js → index-Dr9Egq23.js} +1 -1
- package/dist/{index-KgwRgulq.cjs → index-Dv2ROWAm.cjs} +1 -1
- package/dist/{index-CJOQxUog.js → index-DzBBqrxe.js} +2 -2
- package/dist/{index-CV2JWX-7.js → index-EqgbW679.js} +1 -1
- package/dist/{index-CUo9Rzi3.cjs → index-F-zgk6uc.cjs} +1 -1
- package/dist/{index-C_paG8gS.cjs → index-GBr-eArU.cjs} +1 -1
- package/dist/{index-DI1_OcYK.js → index-K_jsxywJ.js} +4 -4
- package/dist/{index-C1eL6q7Z.cjs → index-aJ6qSTMl.cjs} +1 -1
- package/dist/{index-8wlioSUm.cjs → index-bzux6PE0.cjs} +1 -1
- package/dist/{index-jYsmQ_MD.js → index-d7FbcLhM.js} +5 -5
- package/dist/{index-PHVmpaM3.cjs → index-dEECSdIC.cjs} +1 -1
- package/dist/{index-dT9Iek_K.cjs → index-eEf1sDte.cjs} +1 -1
- package/dist/{index-DqFTTAE_.cjs → index-h7b-2-4Q.cjs} +1 -1
- package/dist/{index-D3rnfXSB.cjs → index-jvD6GMrr.cjs} +1 -1
- package/dist/{index-yKyLlN3j.cjs → index-kddiRLxz.cjs} +1 -1
- package/dist/{index-DwFpQNpA.cjs → index-mDbSepFg.cjs} +1 -1
- package/dist/{index-DRizRbU3.js → index-u963fvJq.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-VeGs2jMN.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BPcGKxya.js} +11 -11
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DKaT8xTU.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-VXj1bZpQ.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-pcyvQAbK.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CSGUG8yi.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Ca5MAWqT.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-JTfuXDvR.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BJWbNR2V.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DSTQwClf.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-gNnmU49-.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-datljWVr.js} +5 -5
- package/dist/{index.vue_vue_type_style_index_1_lang-BqG2FKzs.cjs → index.vue_vue_type_style_index_1_lang-C3Kw83zI.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Cg1p_3ne.js → index.vue_vue_type_style_index_1_lang-DCNwSjkL.js} +1414 -1409
- package/dist/{index.vue_vue_type_style_index_1_lang-B8_elAaU.cjs → index.vue_vue_type_style_index_1_lang-_MRLV2pU.cjs} +5 -5
- package/dist/{index.vue_vue_type_style_index_1_lang-DbWCiN56.js → index.vue_vue_type_style_index_1_lang-rhYAIITv.js} +4 -4
- package/dist/{main-DL-OIsZx.js → main-CHpE2HyT.js} +4 -4
- package/dist/{main-rAd7GfHp.cjs → main-Wuj537Hx.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-BZ45sbaM.cjs → threeModel-B86bww-L.cjs} +1 -1
- package/dist/{threeModel-Bfr23IA3.js → threeModel-BJx5MH-m.js} +4 -4
- package/dist/{threePreview-n92dat47.js → threePreview-C8oiPD1l.js} +3 -3
- package/dist/{threePreview-DH6gyAm7.cjs → threePreview-DJLDHZlr.cjs} +1 -1
- package/dist/{threeSceneView-Bbv4UqdI.cjs → threeSceneView-8xsyz8QG.cjs} +1 -1
- package/dist/{threeSceneView-C3kjUyQz.js → threeSceneView-gxNGr3MP.js} +10 -10
- package/dist/{threeSceneViewForCPMPIP-CU85SdU2.js → threeSceneViewForCPMPIP-2m5nxgEF.js} +9 -9
- package/dist/{threeSceneViewForCPMPIP-Do8dA3xZ.cjs → threeSceneViewForCPMPIP-CLYeetY9.cjs} +1 -1
- package/dist/{threeTrackPathView-DundgA2K.cjs → threeTrackPathView-B8p4EFO1.cjs} +1 -1
- package/dist/{threeTrackPathView-DWqvizaQ.js → threeTrackPathView-DeQo7Wnu.js} +4 -4
- package/dist/{threeViewerHost-BRhsxthj.cjs → threeViewerHost-BDh0cvdZ.cjs} +2 -2
- package/dist/{threeViewerHost-BX-lA9Q_.js → threeViewerHost-DrxyqlfL.js} +3 -3
- package/dist/{urdfTree-Bd4DPzOI.cjs → urdfTree--UXeuTR1.cjs} +1 -1
- package/dist/{urdfTree-IrNrj52s.js → urdfTree-DlUtmYxX.js} +1 -1
- package/dist/{workpieceTreePanel-BCI9f-jE.cjs → workpieceTreePanel-82bZ2pJM.cjs} +1 -1
- package/dist/{workpieceTreePanel-BD3mDnhg.js → workpieceTreePanel-Tfx49DXu.js} +5 -5
- package/package.json +1 -1
- package/dist/index-O1JbRmM1.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const ea=require("./index-aJ6qSTMl.cjs"),e=require("vue"),p=require("./index-C8qRkCgn.cjs"),St=require("./index-F-zgk6uc.cjs"),Te=require("./index.vue_vue_type_style_index_1_lang-_MRLV2pU.cjs"),Gt=require("./index-DWozj8SO.cjs"),Vo=require("./threeViewerHost-BDh0cvdZ.cjs"),ta=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CSGUG8yi.cjs"),Pt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oo=require("./isString--eJE54G5.cjs"),Mo=require("./index-h7b-2-4Q.cjs"),kl=require("./index-BVaHwt5f.cjs"),Rr=require("./index-Dr6BN_zC.cjs");var Fr=/\s/;function Lr(a){for(var i=a.length;i--&&Fr.test(a.charAt(i)););return i}var $r=/^\s+/;function jr(a){return a&&a.slice(0,Lr(a)+1).replace($r,"")}var zo=NaN,Ur=/^[-+]0x[0-9a-f]+$/i,Kr=/^0b[01]+$/i,Wr=/^0o[0-7]+$/i,Hr=parseInt;function co(a){if(typeof a=="number")return a;if(p.isSymbol(a))return zo;if(p.isObject(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=jr(a);var s=Kr.test(a);return s||Wr.test(a)?Hr(a.slice(2),s?2:8):Ur.test(a)?zo:+a}var oo=function(){return p.root.Date.now()},qr="Expected a function",Gr=Math.max,Xr=Math.min;function vo(a,i,s){var l,c,d,b,v,h,C=0,_=!1,I=!1,P=!0;if(typeof a!="function")throw new TypeError(qr);i=co(i)||0,p.isObject(s)&&(_=!!s.leading,I="maxWait"in s,d=I?Gr(co(s.maxWait)||0,i):d,P="trailing"in s?!!s.trailing:P);function z(V){var B=l,ue=c;return l=c=void 0,C=V,b=a.apply(ue,B),b}function H(V){return C=V,v=setTimeout(U,i),_?z(V):b}function Ee(V){var B=V-h,ue=V-C,Re=i-B;return I?Xr(Re,d-ue):Re}function Z(V){var B=V-h,ue=V-C;return h===void 0||B>=i||B<0||I&&ue>=d}function U(){var V=oo();if(Z(V))return pe(V);v=setTimeout(U,Ee(V))}function pe(V){return v=void 0,P&&l?z(V):(l=c=void 0,b)}function D(){v!==void 0&&clearTimeout(v),C=0,l=h=c=v=void 0}function R(){return v===void 0?b:pe(oo())}function k(){var V=oo(),B=Z(V);if(l=arguments,c=this,h=V,B){if(v===void 0)return H(h);if(I)return clearTimeout(v),v=setTimeout(U,i),z(h)}return v===void 0&&(v=setTimeout(U,i)),b}return k.cancel=D,k.flush=R,k}var Yr="[object Boolean]";function xl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Yr}function wl(a){return a===void 0}const Jr={class:"form-content"},Zr={title:"选择标签"},Qr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ei={class:"col-operate-wrap"},ti={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ni={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:i}){const s=()=>{b.value=!1,v.value=!1,h.value=[]},l=a;e.computed(()=>{var E;const m=(E=je.value)==null?void 0:E.split("/");return(m==null?void 0:m.some(M=>(M==null?void 0:M.includes("updateLoading"))||(M==null?void 0:M.includes("loading"))))?!1:Ve.value==="view"});const c=i,d=e.ref([]),b=e.ref(!1),v=e.ref(!1),h=e.ref([]);Vo.useThreeSystem();const C=e.ref(),_=e.ref(!1),I=e.ref(!1),P=e.ref([]),z=e.ref(),H=e.ref(!1),Ee=e.ref([]),Z=ea.useFormToTableComp(p.pinia),U=ea.useFormComp(p.pinia),pe=e.ref(!1),D=e.ref(),R=p.useLoginState(p.pinia),{loginUserInfo:k}=p.storeToRefs(R),V=e.ref(),B=e.ref(!0),ue=Te.useModelComp(p.pinia),{tableViewContents:Re,itemData:tt,isEdit:Ve,routeToChildPath:Ue,lockingPage:De}=p.storeToRefs(ue),A=e.ref(null),le=e.ref(!1),ae=e.ref(!1),me=Te.useMenuState(),{activeMenuPath:je}=p.storeToRefs(me),lt=Te.useOriginalState(p.pinia),{originalPath:Ne}=p.storeToRefs(lt),S=e.ref([]),Ie=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),se=async m=>{ae.value=m,await Ye("disabled",null,m,!0)},Me=async m=>{await Ye("operable",null,m,!0)};e.watch(()=>je.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Fe=()=>{e.nextTick(()=>{Q()})},Ce=m=>{var L;d.value=(L=d.value)==null?void 0:L.map(E=>({...E,isFormColHidden:!(m!=null&&m.includes(E.label))}))};e.onUnmounted(()=>{A.value=null});const Le=m=>{c("clickTrigger",m)},rt=async m=>{var L,E,M,ie,q,K;if(m===""){let oe="";(L=d.value)==null||L.forEach(J=>{J!=null&&J.isMain&&(oe=J==null?void 0:J.value)});let ee=await Te.getItemData(Ue.value,sessionStorage.getItem("systemKey"),"");oe=((K=(q=(ie=(M=(E=ee==null?void 0:ee[0])==null?void 0:E.compData)==null?void 0:M.find(J=>(J==null?void 0:J.key)==="mainRouters"))==null?void 0:ie.contents)==null?void 0:q[0])==null?void 0:K.routerContent)+Ne.value+oe;let he=await Te.getItemData(oe,sessionStorage.getItem("systemKey"),"");H.value=!0,Ee.value=he==null?void 0:he.filter(J=>(J==null?void 0:J.comp)!=="methodButton"),c("routeUrl",Ee.value)}},Q=()=>{var L;const m=(L=A.value)==null?void 0:L.$el;m&&ta.Sortable.create(m,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:E=>{const{oldIndex:M,newIndex:ie}=E;if(M===ie)return;const q=d.value.splice(M,1)[0];d.value.splice(ie,0,q)}})},Ye=async(m,L,E,M=!1)=>{var ie,q,K,oe,ee,de,he,J;try{ue.setRefreshCurStructure(!1);const ve=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((ie=ve==null?void 0:ve.data)==null?void 0:ie.code)===200){let W=(ee=(oe=(K=(q=ve==null?void 0:ve.data)==null?void 0:q.result)==null?void 0:K[0])==null?void 0:oe.value)==null?void 0:ee.pageData;M?W={...W,compData:(he=W==null?void 0:W.compData)==null?void 0:he.map(Se=>{var ge;return(Se==null?void 0:Se.key)==="formContent"?{...Se,contents:(ge=Se==null?void 0:Se.contents)==null?void 0:ge.map(F=>({...F,[m]:E}))}:Se})}:W={...W,compData:(de=W==null?void 0:W.compData)==null?void 0:de.map(Se=>{var ge;return(Se==null?void 0:Se.key)==="formContent"?{...Se,contents:(ge=Se==null?void 0:Se.contents)==null?void 0:ge.map(F=>(F==null?void 0:F.prop)===(L==null?void 0:L.prop)?{...F,[m]:E}:F)}:Se})};const Oe=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:W}});((J=Oe==null?void 0:Oe.data)==null?void 0:J.code)===200?(p.ElMessage.success("编辑成功"),ue.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},ct=async(m,L)=>{await Ye("label",L,m)},Qe=async(m,L)=>{m&&await Ye("type",L,m)},ne=async(m,L,E)=>{await Ye(L,E,m,!1)},re=(m,L)=>{V.value===L?B.value=!1:B.value=!0,V.value=L==null?void 0:L.changeProp},_e=async m=>{var E,M,ie,q,K,oe,ee,de,he,J,ve,W,Oe,Se,ge;let L=[];if((E=m==null?void 0:m.toString())!=null&&E.includes(".urdf")){if(m.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[m],v.value=!0,b.value=!0;return}if((M=m==null?void 0:m.toString())!=null&&M.includes(".stl")||(ie=m==null?void 0:m.toString())!=null&&ie.includes(".STL")||(q=m==null?void 0:m.toString())!=null&&q.includes(".obj")||(K=m==null?void 0:m.toString())!=null&&K.includes(".mtl")){h.value=(oe=m==null?void 0:m.toString())==null?void 0:oe.split(","),v.value=!1,b.value=!0;return}if((ee=m==null?void 0:m.toString())!=null&&ee.includes(".stl")||(de=m==null?void 0:m.toString())!=null&&de.includes(".STL")||(he=m==null?void 0:m.toString())!=null&&he.includes(".obj")||(J=m==null?void 0:m.toString())!=null&&J.includes(".mtl")){let F,G=[],X={};if(Array.isArray(m)?F=m:F=m==null?void 0:m.split(","),F==null||F.forEach(O=>{O.includes(".mtl")?G.push(O):X.blob=X.blob?X.blob+","+O:O}),(G==null?void 0:G.length)>0&&(X.mtlBlobs=G),(W=(ve=Object.values(X))==null?void 0:ve[0])!=null&&W.includes("http:"))L.push(X);else{const O=new Blob([X.blob],{type:"application/octet-stream;charset=UTF-8"});let Ae=URL.createObjectURL(O),Ke="";(Oe=m==null?void 0:m.split("/"))==null||Oe.forEach((be,Be)=>{var xe;Be===((xe=m==null?void 0:m.split("/"))==null?void 0:xe.length)-1&&(Ke=be)}),(Se=X.blob)!=null&&Se.includes(".stl")&&(Ke=(Ke==null?void 0:Ke.replaceAll(">",""))+".urdf"),z.value=[{name:Ke,blobUrl:Ae}],I.value=!0}}else{const F=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),G=await p.axios.get(m,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{F.close()}),X=new Blob([G.data],{type:"application/octet-stream;charset=UTF-8"});let O=URL.createObjectURL(X),Ae="";(ge=m==null?void 0:m.split("/"))==null||ge.forEach((Ke,be)=>{var Be;be===((Be=m==null?void 0:m.split("/"))==null?void 0:Be.length)-1&&(Ae=Ke)}),z.value=[{name:Ae,blobUrl:O}],I.value=!0}(L==null?void 0:L.length)>0&&U.setBlobUrls(L)},ye=()=>{I.value=!1},Xe=m=>{var q,K,oe,ee;const L=(K=(q=p.cloneDeep(l.itemData))==null?void 0:q.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:K.contents,E=p.cloneDeep(m.content);let M={};E&&((oe=Object.values(E))==null?void 0:oe.length)>0&&((ee=Object.values(E))==null||ee.forEach((de,he)=>{M[L[he].key]=de}));const ie={content:M,index:l==null?void 0:l.index,buttonName:m==null?void 0:m.buttonName};c("change",ie)},Ze=e.computed(()=>"http://222.92.178.198:62001"),x=async m=>{var ve,W,Oe,Se,ge,F,G,X,O,Ae,Ke,be,Be,xe,ot,We;if(!m)return;(W=(ve=l==null?void 0:l.itemData)==null?void 0:ve.find(Y=>(Y==null?void 0:Y.key)==="parentFormPath"))==null||W.contents;let L=Re.value;(L==null?void 0:L.length)>0&&(L=L==null?void 0:L.map(Y=>{var fe,ze,it,j;let ce=(fe=Y==null?void 0:Y.key)==null?void 0:fe.split("/");return(l==null?void 0:l.compName)===(ce==null?void 0:ce[0])&&(ze=d.value)!=null&&ze.find(Ge=>(Ge==null?void 0:Ge.prop)===(ce==null?void 0:ce[1]))&&(Y.value=(j=(it=d.value)==null?void 0:it.find(Ge=>(Ge==null?void 0:Ge.prop)===(ce==null?void 0:ce[1])))==null?void 0:j.value),Y}),ue.setTableViewContents(L));const E=p.cloneDeep(l.itemData);let M=E==null?void 0:E.map(Y=>{var ce;return(Y==null?void 0:Y.key)==="formContent"&&((ce=Y.contents)==null||ce.map((fe,ze)=>{var it,j,Ge,qe,pt,gt,ft,st,ke,Je,nt,ut,Dt,Ct,yt,Et,Vt,Mt,Nt;return fe.type=(j=(it=d.value)==null?void 0:it.find(Tt=>(Tt==null?void 0:Tt.prop)===(fe==null?void 0:fe.prop)))==null?void 0:j.type,fe.options=fe!=null&&fe.options?fe.options:((pt=(qe=(Ge=fe==null?void 0:fe.key)==null?void 0:Ge.split("$"))==null?void 0:qe[1])==null?void 0:pt.length)>0?(ke=(st=ea.formGetOptions((ft=(gt=fe==null?void 0:fe.key)==null?void 0:gt.split("$"))==null?void 0:ft[1]))==null?void 0:st.split(","))==null?void 0:ke.map(Tt=>({label:Tt,value:Tt})):[],(Je=fe==null?void 0:fe.key)!=null&&Je.includes("$")&&(fe.key=(ut=(nt=fe==null?void 0:fe.key)==null?void 0:nt.split("$"))==null?void 0:ut[0]),fe.signature=(Ct=(Dt=d.value)==null?void 0:Dt.find(Tt=>(Tt==null?void 0:Tt.prop)===(fe==null?void 0:fe.prop)))==null?void 0:Ct.signature,fe.isLoginUser=(Et=(yt=d.value)==null?void 0:yt.find(Tt=>(Tt==null?void 0:Tt.prop)===(fe==null?void 0:fe.prop)))==null?void 0:Et.isLoginUser,fe.value=(Vt=Object.values(m))==null?void 0:Vt[ze],fe.isFormColHidden=(Nt=(Mt=d.value)==null?void 0:Mt.find(Tt=>(Tt==null?void 0:Tt.prop)===(fe==null?void 0:fe.prop)))==null?void 0:Nt.isFormColHidden,fe})),Y}),ie=d.value,q=(Se=(Oe=p.cloneDeep(M))==null?void 0:Oe.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:Se.contents;if(ie=ie==null?void 0:ie.map(Y=>{var ce;return Y.value=(ce=q==null?void 0:q.find((fe,ze)=>((fe==null?void 0:fe.id)??ze)===(Y==null?void 0:Y.id)))==null?void 0:ce.value,Y}),!B.value){c("contentChange",{contents:M,index:l.index});return}let K="",oe=(G=(F=(ge=p.cloneDeep(M))==null?void 0:ge.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:F.contents)==null?void 0:G.find((Y,ce)=>{var fe,ze,it;return(Y==null?void 0:Y.label)===V.value||ce.toString()===((it=(ze=(fe=V.value)==null?void 0:fe.split("t"))==null?void 0:ze[1])==null?void 0:it.toString())}),ee=(X=oe==null?void 0:oe.optionUrl)==null?void 0:X.menuSelect,de=!0;if((Ke=(Ae=(O=p.cloneDeep(M))==null?void 0:O.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:Ae.contents)==null||Ke.forEach(Y=>{var ce,fe,ze,it,j,Ge;de&&((ze=(fe=(ce=Y==null?void 0:Y.optionUrl)==null?void 0:ce.groupSelect)==null?void 0:fe[1])!=null&&ze.includes("["))&&(K=(j=(it=Y==null?void 0:Y.optionUrl)==null?void 0:it.groupSelect)==null?void 0:j[1],JSON.stringify(ee)===JSON.stringify((Ge=Y==null?void 0:Y.optionUrl)==null?void 0:Ge.menuSelect)&&(de=!1))}),(be=oe==null?void 0:oe.optionUrl)!=null&&be.menuSelect&&B.value){let Y=await ea.getSelectRow(oe),ce,fe=(Be=oe==null?void 0:oe.optionUrl)==null?void 0:Be.menuSelect;if(Y==null||Y.forEach(ze=>{var it,j,Ge,qe,pt,gt,ft,st,ke,Je;K===((j=(it=oe==null?void 0:oe.optionUrl)==null?void 0:it.groupSelect)==null?void 0:j[1])&&((pt=(qe=(Ge=oe==null?void 0:oe.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:qe[1])!=null&&pt.includes("["))&&((Je=p.cloneDeep(ze))==null?void 0:Je[(ke=(st=(ft=(gt=oe==null?void 0:oe.optionUrl)==null?void 0:gt.groupSelect)==null?void 0:ft[1])==null?void 0:st.replaceAll("[",""))==null?void 0:ke.replaceAll("]","")])===(oe==null?void 0:oe.value)&&(ce=ze)}),ce){let ze=p.cloneDeep(ie);ze=ze==null?void 0:ze.map(j=>{var Ge,qe,pt,gt,ft,st,ke,Je,nt,ut,Dt;return(ce!=null&&ce[j==null?void 0:j.label]||ce!=null&&ce[(gt=(pt=(qe=(Ge=j==null?void 0:j.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:qe[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:gt.replaceAll("]","")])&&((ke=(st=(ft=j==null?void 0:j.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:st[1])!=null&&ke.includes("["))&&fe!=null&&fe.every(Ct=>{var yt,Et;return(Et=(yt=j==null?void 0:j.optionUrl)==null?void 0:yt.menuSelect)==null?void 0:Et.includes(Ct)})&&(j.value=(ce==null?void 0:ce[j==null?void 0:j.label])||(ce==null?void 0:ce[(Dt=(ut=(nt=(Je=j==null?void 0:j.optionUrl)==null?void 0:Je.groupSelect)==null?void 0:nt[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:Dt.replaceAll("]","")]),Array.isArray(j.value)&&j.value.every(Ct=>(Ct==null?void 0:Ct.url)&&(Ct==null?void 0:Ct.name))&&(j.type="Upload")),j}),ze=ze==null?void 0:ze.map(j=>{var Ge,qe,pt;return(Ge=j==null?void 0:j.optionUrl)!=null&&Ge.oldMenuSelect&&(j.optionUrl.menuSelect=(pt=(qe=p.cloneDeep(j))==null?void 0:qe.optionUrl)==null?void 0:pt.oldMenuSelect),j}),d.value=p.cloneDeep(ze);let it=p.cloneDeep(ze);it=it==null?void 0:it.map(j=>{var Ge,qe,pt,gt,ft,st;return(qe=(Ge=j==null?void 0:j.optionUrl)==null?void 0:Ge.menuSelect)!=null&&qe.some(ke=>ke==null?void 0:ke.includes("["))&&(j.optionUrl.oldMenuSelect=(gt=(pt=p.cloneDeep(j))==null?void 0:pt.optionUrl)==null?void 0:gt.menuSelect,j.optionUrl.menuSelect=(st=(ft=j==null?void 0:j.optionUrl)==null?void 0:ft.menuSelect)==null?void 0:st.map(ke=>{var Je,nt,ut,Dt;if(ke!=null&&ke.includes("[")){let Ct=(nt=(Je=ke==null?void 0:ke.replaceAll("[","").replaceAll("]",""))==null?void 0:Je.split(":"))==null?void 0:nt[1];ke=(Dt=(ut=p.cloneDeep(ze))==null?void 0:ut.find(yt=>(yt==null?void 0:yt.label)===Ct))==null?void 0:Dt.value}return ke})),j}),d.value=it}else d.value=ie;M=M==null?void 0:M.map(ze=>{var it;return(ze==null?void 0:ze.key)==="formContent"&&(ze.contents=(it=ze.contents)==null?void 0:it.map(j=>{var Ge,qe,pt,gt;return j.value=((qe=(Ge=d.value)==null?void 0:Ge.find(ft=>(ft==null?void 0:ft.label)===(j==null?void 0:j.key)))==null?void 0:qe.value)??(j==null?void 0:j.value),j.type=((gt=(pt=d.value)==null?void 0:pt.find(ft=>(ft==null?void 0:ft.prop)===(j==null?void 0:j.key)))==null?void 0:gt.type)??(j==null?void 0:j.type),j})),ze})}B.value=!1,c("contentChange",{contents:M,index:l.index});let he=[],J=[];if((ot=p.cloneDeep((xe=M==null?void 0:M.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:xe.contents))==null||ot.forEach(Y=>{var ce;Array.isArray(Y==null?void 0:Y.value)&&((ce=Y==null?void 0:Y.value)!=null&&ce.find(fe=>{var ze;return(ze=fe==null?void 0:fe.url)==null?void 0:ze.includes(".obj")}))&&(J=Y==null?void 0:Y.value)}),(J==null?void 0:J.length)>0){const Y=(We=p.cloneDeep(J))==null?void 0:We.filter(ce=>{var fe;return(fe=ce==null?void 0:ce.url)==null?void 0:fe.includes(".obj")});Y==null||Y.forEach(ce=>{var ze,it,j,Ge;const fe=(ze=J==null?void 0:J.filter(qe=>{var pt;return(qe==null?void 0:qe.name)===(ce==null?void 0:ce.name)&&((pt=qe==null?void 0:qe.url)==null?void 0:pt.includes(".mtl"))}))==null?void 0:ze.map(qe=>qe==null?void 0:qe.url);he.push({objUrl:ce==null?void 0:ce.url,mtlUrls:((it=J==null?void 0:J.filter(qe=>{var pt;return(qe==null?void 0:qe.name)===(ce==null?void 0:ce.name)&&((pt=qe==null?void 0:qe.url)==null?void 0:pt.includes(".mtl"))}))==null?void 0:it.length)===1?(Ge=(j=J==null?void 0:J.filter(qe=>{var pt;return(qe==null?void 0:qe.name)===(ce==null?void 0:ce.name)&&((pt=qe==null?void 0:qe.url)==null?void 0:pt.includes(".mtl"))}))==null?void 0:j[0])==null?void 0:Ge.url:fe})}),U.setObjUrl(he)}},w=m=>{if(!m)return;const L=[];let E="";for(let M of m)(M.includes("[")||E.includes("["))&&(E+=M.trim(),p.cloneDeep(E).split("【").length-1===p.cloneDeep(E).split("】").length-1&&p.cloneDeep(E).split("[").length-1===p.cloneDeep(E).split("]").length-1&&(L.push(E.replace(/\/\*[\s\S]*?\*\//g,"")),E=""));return L};return e.watch(()=>l.itemData,async()=>{var K,oe,ee,de,he,J,ve,W,Oe,Se,ge,F;const m=(K=l.itemData)==null?void 0:K.find(G=>(G==null?void 0:G.key)==="formContent"),L=(oe=p.cloneDeep(l.itemData))==null?void 0:oe.find(G=>(G==null?void 0:G.key)==="formButton"),E=(ee=p.cloneDeep(l.itemData))==null?void 0:ee.find(G=>(G==null?void 0:G.key)==="formFlex"),M=(de=p.cloneDeep(l.itemData))==null?void 0:de.find(G=>(G==null?void 0:G.key)==="formWrap"),ie=(he=p.cloneDeep(l.itemData))==null?void 0:he.find(G=>(G==null?void 0:G.key)==="enableWrap");if((M==null?void 0:M.contents)==="纵向"?_.value=!1:_.value=!0,pe.value=(ie==null?void 0:ie.contents)===void 0?!1:ie==null?void 0:ie.contents,D.value=typeof(E==null?void 0:E.contents)!="boolean"?!(!(E!=null&&E.contents)===""||((J=E==null?void 0:E.contents)==null?void 0:J.toUpperCase())==="VERTICAL"):E==null?void 0:E.contents,((ve=m==null?void 0:m.contents)==null?void 0:ve.length)>0&&Array.isArray(m==null?void 0:m.contents)){let G=l.allMapContents,X=(Oe=(W=p.cloneDeep(m))==null?void 0:W.contents)==null?void 0:Oe.map((O,Ae)=>{var j,Ge,qe,pt,gt,ft,st,ke,Je,nt,ut,Dt,Ct,yt,Et,Vt,Mt,Nt,Tt,Ht,on,Wt,xn,hn,wn,Sn,vn,Tn,gn;let Ke=(O==null?void 0:O.label)??(O==null?void 0:O.key)??"",be=(O==null?void 0:O.type)??"",Be=(O==null?void 0:O.options)??[];if((j=O==null?void 0:O.key)!=null&&j.includes("$")&&(Ke=(Ge=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Ge[0],((pt=(qe=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:qe[1])==null?void 0:pt.length)>0)){const[mt,Yt]=(ft=(gt=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:gt[1])==null?void 0:ft.split(/[()]/);be=((st=Te.FormType.find(ht=>(ht==null?void 0:ht.key)===mt))==null?void 0:st.value)??"",((ke=Yt==null?void 0:Yt.split(","))==null?void 0:ke.length)>0&&(Be=(Je=Yt==null?void 0:Yt.split(","))==null?void 0:Je.map(ht=>({label:ht,value:ht})))}let xe=[];O!=null&&O.contents&&!Array.isArray(O==null?void 0:O.contents)&&(xe=(ut=(nt=O==null?void 0:O.contents)==null?void 0:nt.split(","))==null?void 0:ut.map(mt=>({label:mt,value:mt}))),((Dt=O==null?void 0:O.optionUrl)==null?void 0:Dt.selectRelateType)==="自定义绑定"&&(xe=(yt=(Ct=O==null?void 0:O.optionUrl)==null?void 0:Ct.defaultSelect)==null?void 0:yt.map(mt=>({label:mt,value:mt})));let ot=!1,We=(O==null?void 0:O.isFormColHidden)??!1,Y=Te.judgeContents((Et=p.cloneDeep(O))==null?void 0:Et.optionUrl,G),ce=Y!==void 0&&Y!==""?Y:O!=null&&O.originalContent&&(O==null?void 0:O.originalContent)!==""?O.originalContent:O!=null&&O.value?O.value:(Be==null?void 0:Be.length)>0?(Vt=Be==null?void 0:Be[0])==null?void 0:Vt.value:(O==null?void 0:O.value)??"",fe=!1,ze=Y!==void 0||be===""?"Input":be;if((Array.isArray(Y)&&(Y!=null&&Y.every(mt=>(mt==null?void 0:mt.name)&&(mt==null?void 0:mt.url)))||Array.isArray(ce)&&(ce!=null&&ce.every(mt=>(mt==null?void 0:mt.name)&&(mt==null?void 0:mt.url))))&&(ze="upload"),typeof ce=="string"&&(ce!=null&&ce.includes("loginUser"))&&!(ce!=null&&ce.includes("loginUserSign"))||O!=null&&O.isLoginUser)ot=!0,ce=((Mt=k.value)==null?void 0:Mt.姓名)||((Nt=k.value)==null?void 0:Nt.account)||((Tt=k.value)==null?void 0:Tt.账号)||((Ht=k.value)==null?void 0:Ht.userName);else if(typeof ce=="string"&&(ce!=null&&ce.includes("loginUserSign"))||O!=null&&O.signature||O!=null&&O.isShow)if(fe=!0,(O==null?void 0:O.isShow)==="originalSignature")ze="image",ce=Ze.value+"/"+((on=k.value)==null?void 0:on.signature);else{let mt=[...new Set(w(O.isShow))].map(wt=>{var mn,Xt,yn,Jt;return{key:(Jt=(yn=(Xt=(mn=wt==null?void 0:wt.split("["))==null?void 0:mn[1])==null?void 0:Xt.split("]"))==null?void 0:yn[0])==null?void 0:Jt.split(":"),value:""}});(Wt=tt.value)==null||Wt.forEach(wt=>{mt==null||mt.forEach((cn,mn)=>{var yn;let Xt=cn==null?void 0:cn.key;(wt==null?void 0:wt.name)===(Xt==null?void 0:Xt[0].replaceAll("'",""))&&((yn=wt==null?void 0:wt.compData)==null||yn.forEach(Jt=>{var ln;(Jt==null?void 0:Jt.key)==="formContent"&&((ln=Jt==null?void 0:Jt.contents)==null||ln.forEach(Qt=>{(Qt==null?void 0:Qt.prop)===(Xt==null?void 0:Xt[1].replaceAll("'",""))&&(mt[mn].value=Qt==null?void 0:Qt.value)}))}))})});let Yt=mt==null?void 0:mt.map(wt=>{var cn;return wt.key="["+((cn=wt.key)==null?void 0:cn.join(":"))+"]",wt}),ht=O==null?void 0:O.isShow;Yt==null||Yt.forEach(wt=>{wt!=null&&wt.value?ht=ht.replaceAll(wt==null?void 0:wt.key,"'"+(wt==null?void 0:wt.value)+"'"):ht=ht.replaceAll(wt==null?void 0:wt.key,"undefined")}),ht!=null&&ht.includes("(")||(ht!=null&&ht.includes("==")?ht=((xn=ht==null?void 0:ht.split("==="))==null?void 0:xn[0])+"==='"+((hn=ht==null?void 0:ht.split("==="))==null?void 0:hn[1])+"'":ht=((wn=ht==null?void 0:ht.split("="))==null?void 0:wn[0])+"='"+((Sn=ht==null?void 0:ht.split("="))==null?void 0:Sn[1])+"'"),ht!=null&&ht.includes("=")&&!(ht!=null&&ht.includes("=="))&&!(ht!=null&&ht.includes("==="))&&(ht=ht==null?void 0:ht.replaceAll("=","==")),new Function(`if (${ht}) { return true } else { return false }`)()?(We=!1,ze="image",ce=Ze.value+"/"+((vn=k.value)==null?void 0:vn.signature)):ce=""}return Array.isArray(ce)&&ce.every(mt=>(mt==null?void 0:mt.url)&&(mt==null?void 0:mt.name))&&(O.type="Upload"),O!=null&&O.isMainUrl&&(ze="Url"),(Tn=O==null?void 0:O.optionUrl)!=null&&Tn.type&&(ze=(gn=O==null?void 0:O.optionUrl)==null?void 0:gn.type),{label:Ke??"",name:"t"+Ae,prop:p.cloneDeep(O==null?void 0:O.key),type:ze,value:O!=null&&O.isNewDate&&ce===""?new Date:ce,id:(O==null?void 0:O.id)??Ae,contents:(xe==null?void 0:xe.length)>0?xe:Be??[],width:(O==null?void 0:O.width)??1,isLoginUser:ot,config:O==null?void 0:O.config,optionUrl:(O==null?void 0:O.optionUrl)??O,isFormColHidden:We,signature:fe,isMain:O==null?void 0:O.isMain,isMainUrl:O==null?void 0:O.isMainUrl,operable:(O==null?void 0:O.operable)??!1,disabled:(O==null?void 0:O.disabled)??!1}});setTimeout(async()=>{var ot,We,Y,ce,fe,ze,it;let O=await(X==null?void 0:X.map(async j=>{var Ge,qe,pt,gt,ft,st,ke;if(((Ge=j==null?void 0:j.type)==null?void 0:Ge.toUpperCase())==="UPLOAD"&&!Array.isArray(j==null?void 0:j.value)&&(j==null?void 0:j.value)!==""){let Je=await p.axios.get(j==null?void 0:j.value,{responseType:"blob",headers:{"Content-Type":"application/json"}}),nt="";nt=(ft=(gt=(pt=(qe=Je==null?void 0:Je.headers)==null?void 0:qe["content-disposition"])==null?void 0:pt.split("filename="))==null?void 0:gt[1])==null?void 0:ft.replaceAll('"',"");const ut=new FormData;ut.append("file",Je.data,nt);const Dt=await St.uploadFileApi(ut);let Ct=[{name:nt,url:(ke=(st=Dt==null?void 0:Dt.data)==null?void 0:st.result)==null?void 0:ke.url}];j.value=Ct}return j}));X=await Promise.all(O);const Ae=X==null?void 0:X.map(j=>j==null?void 0:j.value);let Ke="";Ae==null||Ae.forEach(j=>{j!==""&&j!==void 0&&(Ke=Ke===""?j:Ke+"/"+j)}),Z.setSelectArray(Ae),Z.setSelectString(Ke);let be=(ot=p.cloneDeep(X))==null?void 0:ot.map(j=>(j!=null&&j.value&&Te.IsJson(j==null?void 0:j.value)&&Array.isArray(JSON.parse(j==null?void 0:j.value))&&(j.value=JSON.parse(j.value)),j));be=be==null?void 0:be.map(j=>{var Ge,qe,pt,gt,ft,st,ke,Je;if((qe=(Ge=j==null?void 0:j.optionUrl)==null?void 0:Ge.menuSelect)!=null&&qe.some(nt=>nt==null?void 0:nt.includes("["))){let nt="";j.optionUrl.oldMenuSelect=(gt=(pt=p.cloneDeep(j))==null?void 0:pt.optionUrl)==null?void 0:gt.menuSelect,j.optionUrl.menuSelect=(st=(ft=j==null?void 0:j.optionUrl)==null?void 0:ft.menuSelect)==null?void 0:st.map(ut=>{var Dt,Ct,yt,Et,Vt,Mt;if(ut!=null&&ut.includes("[")){let Nt=(Ct=(Dt=ut==null?void 0:ut.replaceAll("[","").replaceAll("]",""))==null?void 0:Dt.split(":"))==null?void 0:Ct[1];nt=Te.getFindValue((yt=ut==null?void 0:ut.replaceAll("[","").replaceAll("]",""))==null?void 0:yt.split(":"),G==null?void 0:G[je.value],G),ut=((Vt=(Et=p.cloneDeep(be))==null?void 0:Et.find(Tt=>(Tt==null?void 0:Tt.label)===Nt))==null?void 0:Vt.value)||Te.getFindValue((Mt=ut==null?void 0:ut.replaceAll("[","").replaceAll("]",""))==null?void 0:Mt.split(":"),G==null?void 0:G[je.value],G)}return ut}),nt!==""&&j.value===""&&(j.value=Te.getNewValue(j.optionUrl.menuSelect,j.optionUrl.oldMenuSelect,(ke=j==null?void 0:j.optionUrl)==null?void 0:ke.groupSelect,G),Array.isArray(j.value)&&((Je=j.value)!=null&&Je.every(ut=>ut==null?void 0:ut.url))&&(j.type="UPLOAD"))}return j}),d.value=be,ae.value=((We=d.value)==null?void 0:We.every(j=>j==null?void 0:j.disabled))||De.value===je.value,le.value=(Y=d.value)==null?void 0:Y.every(j=>j==null?void 0:j.operable),S.value=(ce=d.value)==null?void 0:ce.map(j=>j==null?void 0:j.label);let Be=[],xe=[];if((fe=p.cloneDeep(d.value))==null||fe.forEach(j=>{var Ge;Array.isArray(j==null?void 0:j.value)&&((Ge=j==null?void 0:j.value)!=null&&Ge.find(qe=>{var pt;return(pt=qe==null?void 0:qe.url)==null?void 0:pt.includes(".obj")}))&&(xe=j==null?void 0:j.value)}),(xe==null?void 0:xe.length)>0){const j=(ze=p.cloneDeep(xe))==null?void 0:ze.filter(Ge=>{var qe;return(qe=Ge==null?void 0:Ge.url)==null?void 0:qe.includes(".obj")});j==null||j.forEach(Ge=>{var pt,gt,ft,st;const qe=(pt=xe==null?void 0:xe.filter(ke=>{var Je;return(ke==null?void 0:ke.name)===(Ge==null?void 0:Ge.name)&&((Je=ke==null?void 0:ke.url)==null?void 0:Je.includes(".mtl"))}))==null?void 0:pt.map(ke=>ke==null?void 0:ke.url);Be.push({objUrl:Ge==null?void 0:Ge.url,mtlUrls:((gt=xe==null?void 0:xe.filter(ke=>{var Je;return(ke==null?void 0:ke.name)===(Ge==null?void 0:Ge.name)&&((Je=ke==null?void 0:ke.url)==null?void 0:Je.includes(".mtl"))}))==null?void 0:gt.length)===1?(st=(ft=xe==null?void 0:xe.filter(ke=>{var Je;return(ke==null?void 0:ke.name)===(Ge==null?void 0:Ge.name)&&((Je=ke==null?void 0:ke.url)==null?void 0:Je.includes(".mtl"))}))==null?void 0:ft[0])==null?void 0:st.url:qe})}),U.setObjUrl(Be)}(it=p.cloneDeep(d.value))==null||it.forEach(j=>{var Ge,qe,pt,gt,ft,st,ke,Je,nt,ut,Dt,Ct,yt;if((qe=(Ge=j==null?void 0:j.value)==null?void 0:Ge.toString())!=null&&qe.includes(".stl")||(gt=(pt=j==null?void 0:j.value)==null?void 0:pt.toString())!=null&>.includes(".STL")||(st=(ft=j==null?void 0:j.value)==null?void 0:ft.toString())!=null&&st.includes(".obj")||(Je=(ke=j==null?void 0:j.value)==null?void 0:ke.toString())!=null&&Je.includes(".mtl")||(ut=(nt=j==null?void 0:j.value)==null?void 0:nt.toString())!=null&&ut.includes(".urdf")){let Et={},Vt=[],Mt;Array.isArray(j==null?void 0:j.value)?Mt=j==null?void 0:j.value:Mt=(Dt=j==null?void 0:j.value)==null?void 0:Dt.split(","),Mt==null||Mt.forEach(Nt=>{Nt.includes(".mtl")?Vt.push(Nt):Et.blob=Et.blob==="undefined"?Nt:Et.blob+","+Nt}),(Vt==null?void 0:Vt.length)>0&&(Et.mtlBlobs=Vt),(yt=(Ct=Object.values(Et))==null?void 0:Ct[0])!=null&&yt.includes("http:")}})},100)}else d.value=[];let q=Re.value;if((q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(G=>{var O,Ae,Ke,be;let X=(O=G==null?void 0:G.key)==null?void 0:O.split("/");return(l==null?void 0:l.compName)===(X==null?void 0:X[0])&&(Ae=d.value)!=null&&Ae.find(Be=>(Be==null?void 0:Be.prop)===(X==null?void 0:X[1]))&&(G.value=(be=(Ke=d.value)==null?void 0:Ke.find(Be=>(Be==null?void 0:Be.prop)===(X==null?void 0:X[1])))==null?void 0:be.value),G}),ue.setTableViewContents(q)),l!=null&&l.formRules)C.value=l==null?void 0:l.formRules;else{let G={};(Se=p.cloneDeep(d).value)==null||Se.forEach(X=>{(X==null?void 0:X.isMain)===!0&&(G[(X==null?void 0:X.prop)??(X==null?void 0:X.name)]=[{required:!0,message:`${(X==null?void 0:X.prop)||(X==null?void 0:X.name)}不能为空`}])}),C.value=G}if(((ge=L==null?void 0:L.contents)==null?void 0:ge.length)>0){const G=[];(F=L==null?void 0:L.contents)==null||F.forEach((X,O)=>{(X==null?void 0:X.label)!==""&&G.push({label:(X==null?void 0:X.label)??"",id:(X==null?void 0:X.id)??O,type:(X==null?void 0:X.type)??"",background:X==null?void 0:X.background})}),P.value=G}else P.value=[]},{deep:!0,immediate:!0}),e.watch(()=>De.value,m=>{ae.value=m===je.value},{immediate:!0}),(m,L)=>{const E=e.resolveComponent("svg-icon"),M=e.resolveComponent("el-switch"),ie=e.resolveComponent("el-checkbox"),q=e.resolveComponent("el-popover"),K=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jr,[e.createVNode(St.ssForm,{rowContents:d.value,formRules:C.value,buttonValue:P.value,isRowFlex:!1,isEnableWrap:pe.value,onOnButtonClick:Xe,onChange:x,formDisabled:ae.value,formLabelsOperable:le.value,isButtonRow:_.value,onPreview:_e,onBlurChange:re,onHandleColEditChange:ct,onHandleColTypeChange:Qe,onRouteUrl:rt,onClickTrigger:Le},{operateCol:e.withCtx(({renderColumns:oe,formDisabled:ee,formLabelsOperable:de})=>[e.createVNode(q,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Fe},{reference:e.withCtx(()=>[e.createElementVNode("span",Zr,[e.createVNode(E,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Qr,[L[1]||(L[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(M,{"model-value":ee,"active-text":"禁用","inactive-text":"",onChange:se,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(M,{"model-value":de,"active-text":"编辑所有标签","inactive-text":"",onChange:Me},null,8,["model-value"]),L[2]||(L[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(K,{modelValue:S.value,"onUpdate:modelValue":L[0]||(L[0]=he=>S.value=he),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:A,onChange:Ce},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe,he=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:he.label},[e.createVNode(ie,{value:he.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(he.label),1)]),_:2},1032,["value"]),e.createVNode(q,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(E,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var J;return[e.createElementVNode("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((J=Object.keys(he))==null?void 0:J.filter(ve=>{var W;return(W=Ie.value)==null?void 0:W.find(Oe=>(Oe==null?void 0:Oe.value)===ve)}),ve=>{var W,Oe;return e.openBlock(),e.createElementBlock("div",{key:ve},[e.createVNode(St._sfc_main$1,{value:he==null?void 0:he[ve],"active-text":(Oe=(W=Ie.value)==null?void 0:W.find(Se=>(Se==null?void 0:Se.value)===ve))==null?void 0:Oe.label,inactiveText:"",onChange:Se=>ne(Se,ve,he)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ti,[e.createVNode(E,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),I.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:z.value,onDestroy:ye},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Vo.ThreeViewerHost,{"file-urls":h.value,isThreeScene:v.value,onGetAnimationData:m.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Po=Pt._export_sfc(ni,[["__scopeId","data-v-550f0880"]]),qa=e.ref(0),Dl=a=>{var i;return!a||(a==null?void 0:a.length)===0?[]:(i=p.cloneDeep(a))==null?void 0:i.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Dl(l==null?void 0:l.children)},l))},ai=a=>{var s;return(s=p.cloneDeep(a))==null?void 0:s.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:Dl(l==null?void 0:l.children)},l))},Cl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===i)?(s=p.cloneDeep(a))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==i):(a=a==null?void 0:a.map(l=>(l.children=Cl(l==null?void 0:l.children,i),l)),a)},El=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,i),l)),a)},_l=(a,i)=>{var s;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(s=p.cloneDeep(a))==null?void 0:s.map(c=>{var d;return(c==null?void 0:c.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)&&(c=i==null?void 0:i.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,i),l)),a)},Sl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(i.contents)),c)):(a=a==null?void 0:a.map(l=>(l.children=Sl(l==null?void 0:l.children,i),l)),a)},At=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],oi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],Nn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Vn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},ii={class:"table-header-child-main"},si={class:"table-header-child-content"},ci={class:"table-header-child-content-item"},ui={class:"fix-button"},pi={key:0},di={class:"form-content"},fi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),b=Te.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(b);e.ref(0);const h=e.ref(""),C=e.ref([]),_=e.ref([]),I=D=>{var k;c.value=!0;let R=[];At==null||At.forEach(V=>{let B=p.cloneDeep(v.value)+1;b.setTableIndex(B),R.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:D[V.key],id:v.value,contents:V==null?void 0:V.options})}),D!=null&&D.children&&((k=D==null?void 0:D.children)==null?void 0:k.length)>0&&R.push({children:D==null?void 0:D.children,isFormColHidden:!0}),h.value=D==null?void 0:D.id,C.value=R,_.value=R},P=D=>{l("fixChange",p.cloneDeep(D))},z=D=>{l("deleteChange",p.cloneDeep(D))},H=D=>{c.value=!0;let R=[];At==null||At.forEach(k=>{let V=p.cloneDeep(v.value)+1;b.setTableIndex(V),R.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:v.value,contents:k==null?void 0:k.options})}),d.value=D==null?void 0:D.id,C.value=R,_.value=R},Ee=D=>{let R=p.cloneDeep(_.value);R=R==null?void 0:R.map(k=>(k.children||(k.value=D==null?void 0:D[k.name]),k)),_.value=R},Z=()=>{var R,k;C.value=_.value;let D={};if(h.value!=="")D.id=h.value,(R=C.value)==null||R.forEach(V=>{const B=At==null?void 0:At.find(ue=>(ue==null?void 0:ue.label)===(V==null?void 0:V.label));B?D[B.key]=V.value:V!=null&&V.children&&V.children.length>0&&(D.children=V.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(D),id:d.value,type:"fix"});else{let V=p.cloneDeep(v.value)+1;b.setTableIndex(V),D.id="id"+v.value,(k=C.value)==null||k.forEach(B=>{const ue=At==null?void 0:At.find(Re=>(Re==null?void 0:Re.label)===(B==null?void 0:B.label));ue?D[ue.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(D),id:d.value,type:"add"})}h.value="",C.value=[],_.value=[]},U=()=>{c.value=!1,h.value="",d.value="",C.value=[],_.value=[]},pe=D=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",D),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,R)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(V,B)=>(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,e.toDisplayString(V.label),1),e.createElementVNode("div",ui,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>H(V)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>I(V)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>pe(V)},null,8,["onClick"])])]),V!=null&&V.children&&V.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Tl,{tableChildContents:V==null?void 0:V.children,onDeleteChange:z,onFixChange:P},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:U,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:Z},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hi=Pt._export_sfc(fi,[["__scopeId","data-v-e0fef72d"]]),vi={class:"table-header-child"},gi={class:"table-header-child-main"},mi={class:"table-header-child-content"},yi={class:"table-header-child-content-item"},bi={class:"fix-button"},ki={key:0},xi={class:"form-content"},wi={class:"dialog-footer"},Di={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),b=Te.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(b),h=e.ref(""),C=e.ref([]),_=e.ref([]),I=D=>{l("fixChange",p.cloneDeep(D))},P=D=>{var k;c.value=!0;let R=[];At==null||At.forEach(V=>{let B=p.cloneDeep(v.value)+1;b.setTableIndex(B),R.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:D[V.key],id:v.value,contents:V==null?void 0:V.options})}),D!=null&&D.children&&((k=D==null?void 0:D.children)==null?void 0:k.length)>0&&R.push({children:D==null?void 0:D.children,isFormColHidden:!0}),h.value=D==null?void 0:D.id,C.value=R,_.value=R},z=D=>{c.value=!0;let R=[];At==null||At.forEach(k=>{let V=p.cloneDeep(v.value)+1;b.setTableIndex(V),R.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:v.value,contents:k==null?void 0:k.options})}),d.value=D==null?void 0:D.id,C.value=R,_.value=R},H=D=>{let R=p.cloneDeep(_.value);R=R==null?void 0:R.map(k=>(k.children||(k.value=D==null?void 0:D[k.name]),k)),_.value=R},Ee=()=>{var R,k;C.value=_.value;let D={};if(h.value!=="")D.id=h.value,(R=C.value)==null||R.forEach(V=>{const B=At==null?void 0:At.find(ue=>(ue==null?void 0:ue.label)===(V==null?void 0:V.label));B?D[B.key]=V.value:V!=null&&V.children&&V.children.length>0&&(D.children=V.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(D),id:d.value,type:"fix"});else{let V=p.cloneDeep(v.value)+1;b.setTableIndex(V),D.id="idChild"+v.value,(k=C.value)==null||k.forEach(B=>{const ue=At==null?void 0:At.find(Re=>(Re==null?void 0:Re.label)===(B==null?void 0:B.label));ue?D[ue.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(D),id:d.value,type:"add"})}h.value="",C.value=[],_.value=[]},Z=()=>{c.value=!1,h.value="",d.value="",C.value=[],_.value=[]},U=D=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",D),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pe=D=>{l("deleteChange",D)};return(D,R)=>{const k=e.resolveComponent("svg-icon"),V=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(B,ue)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createElementVNode("div",mi,[e.createElementVNode("div",yi,e.toDisplayString(B.label),1),e.createElementVNode("div",bi,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>z(B)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>P(B)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>U(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(hi,{tableChildContents:B==null?void 0:B.children,onDeleteChange:pe,onFixChange:I},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:Z,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:H},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(V,{onClick:Z,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(V,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=Pt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Ei={class:"table-operate-item"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={key:0},Ni={class:"operate-title"},Vi={class:"operate-content"},Oi={class:"fix-content"},Mi={class:"fix-content-label"},zi={class:"fix-button"},Pi={class:"operate-title"},Ri={class:"operate-content"},Fi={class:"fix-content"},Li={class:"fix-content-label"},$i={class:"fix-button"},ji={class:"operate-title"},Ui={class:"operate-content"},Ki={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={class:"operate-content"},Gi={style:{display:"flex","justify-content":"space-between"}},Xi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},ns={class:"dialog-footer"},as={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),b=e.ref(!1),v=e.ref([]),h=e.ref(!1),C=e.ref([]),_=e.ref(!1),I=e.ref([]),P=e.ref(""),z=e.ref(""),H=e.ref([]),Ee=e.ref([]),Z=e.ref([]),U=e.ref([]),pe=e.ref(!1),D=e.ref([]),R=e.ref([]),k=e.ref(0),V=e.ref([]),B=e.ref([]),ue=e.ref([]),Re=()=>{pe.value=!0;let x=[];Nn==null||Nn.forEach(w=>{k.value++,x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:(w==null?void 0:w.key)==="background"?"var(--ssComponent-primary-color)":"",id:k.value,contents:w==null?void 0:w.options})}),D.value=x,R.value=x},tt=()=>{var w,m,L;b.value=!0;let x=[];(L=(m=(w=Te.FormContent)==null?void 0:w.find(E=>(E==null?void 0:E.key)==="Input"))==null?void 0:m.value)==null||L.forEach(E=>{k.value++,x.push({label:E==null?void 0:E.label,name:(E==null?void 0:E.name)||(E==null?void 0:E.label),type:E.type,value:(E==null?void 0:E.label)==="类型"?"Input":"",id:k.value,contents:E==null?void 0:E.options})}),V.value=x,B.value=x},Ve=x=>{x||(V.value=B.value)},Ue=async x=>{var w,m,L,E,M,ie,q,K,oe,ee,de,he;if((x==null?void 0:x.类型)!==((m=(w=B.value)==null?void 0:w.find(J=>(J==null?void 0:J.label)==="类型"))==null?void 0:m.value)){let J=[],ve=await((M=(E=(L=Te.FormContent)==null?void 0:L.find(W=>(W==null?void 0:W.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:E.value)==null?void 0:M.value)?await((ee=(oe=(K=Te.FormContent)==null?void 0:K.find(W=>(W==null?void 0:W.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:oe.value)==null?void 0:ee.value):(q=(ie=Te.FormContent)==null?void 0:ie.find(W=>(W==null?void 0:W.key)===((x==null?void 0:x.类型)===""?"Input":x==null?void 0:x.类型)))==null?void 0:q.value;if(ve==null||ve.forEach(W=>{k.value++,J.push({label:W==null?void 0:W.label,name:(W==null?void 0:W.name)||(W==null?void 0:W.label),type:W.type,value:W!=null&&W.属性名?(x==null?void 0:x.prop)||(x==null?void 0:x.name)||(x==null?void 0:x.label):(x==null?void 0:x[W.label])??"",id:k.value,contents:W==null?void 0:W.options,prop:(W==null?void 0:W.prop)||(W==null?void 0:W.name)||(W==null?void 0:W.label)})}),x!=null&&x.菜单选项&&((de=x==null?void 0:x.菜单选项)==null?void 0:de.length)>0){const W=await Te.menuToContentType(x==null?void 0:x.菜单选项);J=J==null?void 0:J.map(Oe=>((Oe==null?void 0:Oe.name)==="组信息选项"&&(Oe.contents=W),Oe))}B.value=await Te.selectToBase(p.cloneDeep(J)),V.value=await Te.selectToBase(p.cloneDeep(J))}else{let J=p.cloneDeep(V.value);if(J=J==null?void 0:J.map(ve=>(ve.value=x==null?void 0:x[ve.name],ve)),x!=null&&x.菜单选项&&((he=x==null?void 0:x.菜单选项)==null?void 0:he.length)>0){const ve=await Te.menuToContentType(x==null?void 0:x.菜单选项);J=J==null?void 0:J.map(W=>((W==null?void 0:W.name)==="组信息选项"&&(W.contents=ve),W))}J=Te.formToOptionsContents(J),B.value=await Te.selectToBase(p.cloneDeep(J))}},De=async x=>{await Ue(x),V.value=B.value},A=(x,w)=>{if((w==null?void 0:w.type)=="Select"&&(x==null?void 0:x.key)==="selectRelateType"){const m=w==null?void 0:w.optionUrl;return(m==null?void 0:m.selectRelateType)||w[x.key]}if((w==null?void 0:w.type)=="Select"&&(x==null?void 0:x.key)==="menuSelect"){const m=w==null?void 0:w.optionUrl;return(m==null?void 0:m.menuSelect)||w[x.key]}if((w==null?void 0:w.type)=="Select"&&(x==null?void 0:x.key)==="groupSelect"){const m=w==null?void 0:w.optionUrl;return(m==null?void 0:m.groupSelect)||w[x.key]}if((w==null?void 0:w.type)=="Select"&&(x==null?void 0:x.key)==="originalContent")return(w==null?void 0:w.value)||w[x.key];if((w==null?void 0:w.type)=="Select"&&(x==null?void 0:x.key)==="multiple"){const m=w[x.key];return xl(m)?m:x.default}return(x==null?void 0:x.label)==="类型"&&w[x.key]===""?"Input":(x==null?void 0:x.key)==="isFormColHidden"&&!w[x.key]?!1:w[x.key]},le=async x=>{var L,E,M,ie,q,K,oe,ee,de;b.value=!0;let w=[];const m=await((M=(E=(L=Te.FormContent)==null?void 0:L.find(he=>(he==null?void 0:he.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:E.value)==null?void 0:M.value)?await((ee=(oe=(K=Te.FormContent)==null?void 0:K.find(he=>(he==null?void 0:he.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:oe.value)==null?void 0:ee.value):(q=(ie=Te.FormContent)==null?void 0:ie.find(he=>(he==null?void 0:he.key)===((x==null?void 0:x.type)===""?"Input":x==null?void 0:x.type)))==null?void 0:q.value;if(m==null||m.forEach(he=>{k.value++,w.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.name)||(he==null?void 0:he.label),type:he.type,value:(he==null?void 0:he.label)==="属性名"?(x==null?void 0:x.prop)||(x==null?void 0:x.name)||(x==null?void 0:x.label):A(he,x),id:k.value,contents:he==null?void 0:he.options})}),x!=null&&x.menuSelect&&((de=x==null?void 0:x.menuSelect)==null?void 0:de.length)>0){const he=await Te.menuToContentType(x==null?void 0:x.menuSelect);w=w==null?void 0:w.map(J=>((J==null?void 0:J.name)==="组信息选项"&&(J.contents=he),J))}P.value=x==null?void 0:x.id,V.value=await Te.selectToBase(Te.formToOptionsContents(w)),B.value=await Te.selectToBase(Te.formToOptionsContents(w))},ae=x=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var w,m;ue.value=(w=p.cloneDeep(ue.value))==null?void 0:w.filter(L=>(L==null?void 0:L.id)!==(x==null?void 0:x.id)),l("change",(m=p.cloneDeep(s.originalItemContents))==null?void 0:m.map(L=>((L==null?void 0:L.key)==="tableToForm"&&(L.contents=ue.value),L))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},me=()=>{b.value=!1,V.value=[],P.value=""},je=async()=>{var L,E,M,ie,q,K,oe,ee,de,he;V.value=B.value;let x={};P.value!==""?x.id=P.value:(k.value++,x.id="id"+k.value);let w=await((M=(E=(L=Te.FormContent)==null?void 0:L.find(J=>{var ve,W;return(J==null?void 0:J.key)===(((W=(ve=V.value)==null?void 0:ve.find(Oe=>(Oe==null?void 0:Oe.label)==="类型"))==null?void 0:W.value)??"label")}))==null?void 0:E.value)==null?void 0:M.value)??((q=(ie=Te.FormContent)==null?void 0:ie.find(J=>{var ve,W;return(J==null?void 0:J.key)===(((W=(ve=V.value)==null?void 0:ve.find(Oe=>(Oe==null?void 0:Oe.label)==="类型"))==null?void 0:W.value)??"label")}))==null?void 0:q.value);if((K=V.value)==null||K.forEach(J=>{const ve=w==null?void 0:w.find(W=>(W==null?void 0:W.label)===(J==null?void 0:J.label));ve&&(x[ve.key]=J.value)}),x.name=x.label,(oe=ue.value)!=null&&oe.find(J=>J.id===x.id))ue.value=(ee=ue.value)==null?void 0:ee.map(J=>(J.id===x.id&&(J=x),J));else{let J=p.cloneDeep(ue.value);ue.value||(ue.value=[]),J.push(x),ue.value=J}ue.value=ue.value.map(({id:J,...ve})=>ve),b.value=!1,P.value="";let m=p.cloneDeep(s.originalItemContents);(de=p.cloneDeep(s.originalItemContents))!=null&&de.find(J=>(J==null?void 0:J.key)==="tableToForm")?m=(he=p.cloneDeep(s.originalItemContents))==null?void 0:he.map(J=>((J==null?void 0:J.key)==="tableToForm"&&(J.contents=ue.value),J)):m.push({key:"tableToForm",contents:ue.value}),l("change",m)},lt=x=>{pe.value=!0;let w=[];Nn==null||Nn.forEach(m=>{k.value++,w.push({label:m==null?void 0:m.label,name:m==null?void 0:m.label,type:m.type,value:x[m.key],id:k.value,contents:m==null?void 0:m.options})}),P.value=x==null?void 0:x.id,D.value=w,R.value=w};e.watch(()=>_.value,()=>{var w,m;let x=p.cloneDeep(s.originalItemContents);(w=p.cloneDeep(s.originalItemContents))!=null&&w.find(L=>(L==null?void 0:L.key)==="page")?x=(m=p.cloneDeep(s.originalItemContents))==null?void 0:m.map(L=>((L==null?void 0:L.key)==="page"&&(L.contents=_.value),L)):x.push({key:"page",contents:_.value}),l("change",x)},{deep:!0});const Ne=x=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var w,m;Ee.value=(w=p.cloneDeep(Ee.value))==null?void 0:w.filter(L=>(L==null?void 0:L.id)!==(x==null?void 0:x.id)),l("change",(m=p.cloneDeep(s.originalItemContents))==null?void 0:m.map(L=>((L==null?void 0:L.key)==="extraButton"&&(L.contents=Ee.value),L))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>{var m,L,E,M,ie;D.value=R.value;let x={};if(P.value!==""?x.id=P.value:(k.value++,x.id="id"+k.value),(m=D.value)==null||m.forEach(q=>{const K=Nn==null?void 0:Nn.find(oe=>(oe==null?void 0:oe.label)===(q==null?void 0:q.label));K?x[K.key]=q.value:q!=null&&q.children&&q.children.length>0&&(x.children=q.children)}),(L=Ee.value)!=null&&L.find(q=>q.id===x.id))Ee.value=(E=Ee.value)==null?void 0:E.map(q=>(q.id===x.id&&(q=x),q));else{let q=p.cloneDeep(Ee.value)??[];q.push(x),Ee.value=q}pe.value=!1,P.value="";let w=p.cloneDeep(s.originalItemContents);(M=p.cloneDeep(s.originalItemContents))!=null&&M.find(q=>(q==null?void 0:q.key)==="extraButton")?w=(ie=p.cloneDeep(s.originalItemContents))==null?void 0:ie.map(q=>((q==null?void 0:q.key)==="extraButton"&&(q.contents=Ee.value),q)):w.push({key:"extraButton",contents:Ee.value}),l("change",w)},Ie=x=>{let w=p.cloneDeep(R.value);w=w==null?void 0:w.map(m=>(m.children||(m.value=x==null?void 0:x[m.name]),m)),R.value=w},se=()=>{pe.value=!1,D.value=[],P.value=""},Me=x=>{h.value=!0;let w=[];Vn==null||Vn.forEach(m=>{k.value++,w.push({label:m==null?void 0:m.label,name:m==null?void 0:m.label,type:m.type,value:x[m.key],id:k.value,contents:m==null?void 0:m.options})}),P.value=x==null?void 0:x.id,Z.value=w,U.value=w},Fe=x=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var w,m;H.value=(w=p.cloneDeep(H.value))==null?void 0:w.filter(L=>(L==null?void 0:L.id)!==(x==null?void 0:x.id)),l("change",(m=p.cloneDeep(s.originalItemContents))==null?void 0:m.map(L=>((L==null?void 0:L.key)==="rowButton"&&(L.contents=H.value),L))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ce=()=>{d.value=!0;let x=[];At==null||At.forEach(w=>{k.value++,x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:k.value,contents:w==null?void 0:w.options})}),C.value=x,I.value=x},Le=()=>{h.value=!0;let x=[];Vn==null||Vn.forEach(w=>{k.value++,x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:k.value,contents:w==null?void 0:w.options})}),Z.value=x,U.value=x},rt=x=>{let w=p.cloneDeep(U.value);w=w==null?void 0:w.map(m=>(m.children||(m.value=x==null?void 0:x[m.name]),m)),U.value=w},Q=()=>{var m,L,E,M,ie;Z.value=U.value;let x={};if(P.value!==""?x.id=P.value:(k.value++,x.id="id"+k.value),(m=Z.value)==null||m.forEach(q=>{const K=Vn==null?void 0:Vn.find(oe=>(oe==null?void 0:oe.label)===(q==null?void 0:q.label));K?x[K.key]=q.value:q!=null&&q.children&&q.children.length>0&&(x.children=q.children)}),(L=H.value)!=null&&L.find(q=>q.id===x.id))H.value=(E=H.value)==null?void 0:E.map(q=>(q.id===x.id&&(q=x),q));else{let q=p.cloneDeep(H.value);q.push(x),H.value=q}h.value=!1,P.value="";let w=p.cloneDeep(s.originalItemContents);(M=p.cloneDeep(s.originalItemContents))!=null&&M.find(q=>(q==null?void 0:q.key)==="rowButton")?w=(ie=p.cloneDeep(s.originalItemContents))==null?void 0:ie.map(q=>((q==null?void 0:q.key)==="rowButton"&&(q.contents=H.value),q)):w.push({key:"rowButton",contents:H.value}),l("change",w)},Ye=()=>{h.value=!1,P.value="",U.value=[],Z.value=[]},ct=x=>{d.value=!0;let w=[];At==null||At.forEach(m=>{k.value++,w.push({label:m==null?void 0:m.label,name:m==null?void 0:m.label,type:m.type,value:"",id:k.value,contents:m==null?void 0:m.options})}),C.value=w,z.value=x==null?void 0:x.id,I.value=w},Qe=x=>{var w;v.value=Cl(p.cloneDeep(v.value),x==null?void 0:x.id),l("change",(w=p.cloneDeep(s.originalItemContents))==null?void 0:w.map(m=>{var L;return(m==null?void 0:m.key)==="header"&&(m.contents=(L=v.value)!=null&&L.some(E=>E==null?void 0:E.children)?[v.value]:v.value),m}))},ne=x=>{var m,L,E;x.type==="fix"?x.id!==""?v.value=_l(v.value,x):v.value=El(v.value,x==null?void 0:x.contents):v.value=Sl(v.value,x),v.value=(m=v.value)!=null&&m.some(M=>M==null?void 0:M.children)?[v.value]:v.value,P.value="";let w=p.cloneDeep(s.originalItemContents);(L=p.cloneDeep(s.originalItemContents))!=null&&L.find(M=>(M==null?void 0:M.key)==="header")?w=(E=p.cloneDeep(s.originalItemContents))==null?void 0:E.map(M=>((M==null?void 0:M.key)==="header"&&(M.contents=v.value),M)):w.push({key:"header",contents:v.value}),l("change",w)},re=x=>{var m;d.value=!0;let w=[];At==null||At.forEach(L=>{k.value++,w.push({label:L==null?void 0:L.label,name:L==null?void 0:L.label,type:L.type,value:x[L.key],id:k.value,contents:L==null?void 0:L.options})}),x!=null&&x.children&&((m=x==null?void 0:x.children)==null?void 0:m.length)>0&&w.push({children:x==null?void 0:x.children,isFormColHidden:!0}),P.value=x==null?void 0:x.id,z.value="",C.value=w,I.value=w},_e=x=>{let w=p.cloneDeep(I.value);w=w==null?void 0:w.map(m=>(m.children||(m.value=x==null?void 0:x[m.name]),m)),I.value=w},ye=()=>{d.value=!1,P.value="",z.value="",I.value=[]},Xe=()=>{var m,L,E,M,ie,q;C.value=I.value;let x={};if(P.value!==""?x.id=P.value:(k.value++,x.id="id"+k.value),(m=C.value)==null||m.forEach(K=>{const oe=At==null?void 0:At.find(ee=>(ee==null?void 0:ee.label)===(K==null?void 0:K.label));oe?x[oe.key]=K.value:K!=null&&K.children&&K.children.length>0&&(x.children=K.children)}),(L=v.value)!=null&&L.find(K=>K.id===x.id))v.value=(E=v.value)==null?void 0:E.map(K=>(K.id===x.id&&(K=x),K));else{let K=p.cloneDeep(v.value)??[];z.value===""?K.push(x):K=K==null?void 0:K.map(oe=>(oe.id===z.value&&(oe.children||(oe.children=[]),oe.children.push(x)),oe)),v.value=K}v.value=(M=v.value)!=null&&M.some(K=>K==null?void 0:K.children)?[v.value]:v.value,d.value=!1,P.value="",z.value="";let w=p.cloneDeep(s.originalItemContents);(ie=p.cloneDeep(s.originalItemContents))!=null&&ie.find(K=>(K==null?void 0:K.key)==="header")?w=(q=p.cloneDeep(s.originalItemContents))==null?void 0:q.map(K=>((K==null?void 0:K.key)==="header"&&(K.contents=v.value),K)):w.push({key:"header",contents:v.value}),l("change",w)},Ze=x=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var w,m;v.value=(w=p.cloneDeep(v.value))==null?void 0:w.filter(L=>(L==null?void 0:L.id)!==(x==null?void 0:x.id)),l("change",(m=p.cloneDeep(s.originalItemContents))==null?void 0:m.map(L=>{var E;return(L==null?void 0:L.key)==="header"&&(L.contents=(E=v.value)!=null&&E.some(M=>M==null?void 0:M.children)?[v.value]:v.value),L})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var x,w,m,L,E,M,ie,q,K,oe,ee,de,he,J,ve,W,Oe,Se,ge;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),v.value=(w=(x=c.value)==null?void 0:x.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:w.contents,H.value=(L=(m=c.value)==null?void 0:m.find(F=>(F==null?void 0:F.key)==="rowButton"))==null?void 0:L.contents,Ee.value=(M=(E=c.value)==null?void 0:E.find(F=>(F==null?void 0:F.key)==="extraButton"))==null?void 0:M.contents,_.value=(q=(ie=c.value)==null?void 0:ie.find(F=>(F==null?void 0:F.key)==="page"))!=null&&q.contents?!!((oe=(K=c.value)==null?void 0:K.find(F=>(F==null?void 0:F.key)==="page"))!=null&&oe.contents):!1,ue.value=(de=(ee=c.value)==null?void 0:ee.find(F=>(F==null?void 0:F.key)==="tableToForm"))==null?void 0:de.contents,v.value=(he=v.value)==null?void 0:he.map((F,G)=>(Array.isArray(F)?F=ai(F):F={label:(F==null?void 0:F.label)??"",prop:(F==null?void 0:F.label)==="操作"?"operate":F==null?void 0:F.prop,width:F!=null&&F.width?parseInt(F.width):"",fixed:(F==null?void 0:F.fixed)??void 0,sortable:(F==null?void 0:F.sortable)??!1,align:(F==null?void 0:F.align)??"left",showOverflowTooltip:(F==null?void 0:F.showOverflowTooltip)??!0,isNotDrag:(F==null?void 0:F.isNotDrag)??!1,isEditCol:(F==null?void 0:F.isEditCol)??!1,isOperate:(F==null?void 0:F.isOperate)??!1,id:(F==null?void 0:F.id)??G,formMenuSelect:(F==null?void 0:F.formMenuSelect)??void 0,groupSelect:(F==null?void 0:F.groupSelect)??void 0},F)),v.value=(J=v.value)!=null&&J.every(F=>Array.isArray(F))?(ve=v.value)==null?void 0:ve[0]:v.value,H.value=(W=H.value)==null?void 0:W.map((F,G)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",textColor:(F==null?void 0:F.textColor)??"#000000",id:(F==null?void 0:F.id)??G}),Ee.value=(Oe=Ee.value)==null?void 0:Oe.map((F,G)=>F={label:(F==null?void 0:F.label)??"",type:(F==null?void 0:F.type)??"",background:(F==null?void 0:F.background)??"var(--ssComponent-primary-color)",id:(F==null?void 0:F.id)??G}),ue.value)ue.value=(ge=ue.value)==null?void 0:ge.map(F=>{k.value++;let G=F;return G.id=k.value,G});else{let F=[];const G=(Se=Te.getColumnChild(p.cloneDeep(v.value)))==null?void 0:Se.filter(X=>(X==null?void 0:X.prop)!=="operate");G==null||G.forEach(X=>{var O;k.value++,F.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X!=null&&X.groupSelect?"Select":"Input",value:"",id:k.value,contents:X==null?void 0:X.options,menuSelect:X==null?void 0:X.formMenuSelect,groupSelect:(O=X==null?void 0:X.groupSelect)==null?void 0:O.split(":"),selectRelateType:"关联绑定列"})}),ue.value=F}},{deep:!0,immediate:!0}),(x,w)=>{const m=e.resolveComponent("svg-icon"),L=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Ei,[e.createElementVNode("div",_i,[w[2]||(w[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(L,{class:"icon-content",onClick:Ce,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(m,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[w[1]||(w[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(E,M)=>(e.openBlock(),e.createElementBlock("div",{key:M},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(E==null?void 0:E.label),1),e.createElementVNode("div",Bi,[e.createVNode(m,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>ct(E)},null,8,["onClick"]),e.createVNode(m,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>re(E)},null,8,["onClick"]),e.createVNode(m,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>Ze(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Tl,{tableChildContents:E==null?void 0:E.children,onDeleteChange:Qe,onFixChange:ne},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[w[4]||(w[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(L,{class:"icon-content",id:"themeButton",onClick:Le},{icon:e.withCtx(()=>[e.createVNode(m,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[w[3]||(w[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(E,M)=>(e.openBlock(),e.createElementBlock("div",{key:M},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Mi,e.toDisplayString(E==null?void 0:E.label),1),e.createElementVNode("div",zi,[e.createVNode(m,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ie=>Me(E)},null,8,["onClick"]),e.createVNode(m,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>Fe(E)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Pi,[w[6]||(w[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(L,{class:"icon-content",id:"themeButton",onClick:Re},{icon:e.withCtx(()=>[e.createVNode(m,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[w[5]||(w[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,(E,M)=>(e.openBlock(),e.createElementBlock("div",{key:M},[e.createElementVNode("div",Fi,[e.createElementVNode("div",Li,e.toDisplayString(E==null?void 0:E.label),1),e.createElementVNode("div",$i,[e.createVNode(m,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ie=>lt(E)},null,8,["onClick"]),e.createVNode(m,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>Ne(E)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ji,[w[8]||(w[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(L,{class:"icon-content",id:"themeButton",onClick:tt},{icon:e.withCtx(()=>[e.createVNode(m,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[w[7]||(w[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,(E,M)=>(e.openBlock(),e.createElementBlock("div",{key:M},[e.createElementVNode("div",Ki,[e.createElementVNode("div",Wi,e.toDisplayString(E==null?void 0:E.label),1),e.createElementVNode("div",Hi,[e.createVNode(m,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ie=>le(E)},null,8,["onClick"]),e.createVNode(m,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>ae(E)},null,8,["onClick"])])])]))),128))]),w[10]||(w[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,[w[9]||(w[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(St._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":w[0]||(w[0]=E=>_.value=E)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:d.value,onBeforeDestroy:ye,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(L,{onClick:ye,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>w[11]||(w[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(L,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>w[12]||(w[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:h.value,onBeforeDestroy:Ye,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:Z.value,key:Z.value,isEnableWrap:!0,onChange:rt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(L,{onClick:Ye,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>w[13]||(w[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(L,{class:"ok-button button",onClick:Q,id:"themeButton"},{default:e.withCtx(()=>w[14]||(w[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:pe.value,onBeforeDestroy:se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:Ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(L,{onClick:se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>w[15]||(w[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(L,{class:"ok-button button",onClick:S,id:"themeButton"},{default:e.withCtx(()=>w[16]||(w[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:b.value,onBeforeDestroy:me,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:Ue,onChangeVisible:Ve,onBlurChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(L,{onClick:me,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>w[17]||(w[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(L,{class:"ok-button button",onClick:je,id:"themeButton"},{default:e.withCtx(()=>w[18]||(w[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},os=Pt._export_sfc(as,[["__scopeId","data-v-0a7fc163"]]),ls=Te.useModelComp(p.pinia),{pageMapState:rs}=p.storeToRefs(ls),is=Te.useMenuState(p.pinia),{activeMenuPath:ss}=p.storeToRefs(is),cs=e.ref(24),us=e.ref(6),ps=e.ref(70),ds=e.ref(.18),fs=e.ref(45),hs=(a,i,s,l)=>{var c,d,b,v,h,C,_,I,P,z,H,Ee,Z,U,pe,D;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((v=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:v.y)||i,w:((C=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:C.w)||cs.value,h:((I=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:I.h)||s,minW:((z=(P=a==null?void 0:a.value)==null?void 0:P.tableData)==null?void 0:z.minW)||us.value,minH:((Ee=(H=a==null?void 0:a.value)==null?void 0:H.tableData)==null?void 0:Ee.minH)||ds.value,maxH:((U=(Z=a==null?void 0:a.value)==null?void 0:Z.tableData)==null?void 0:U.maxH)||fs.value,i:((D=(pe=a==null?void 0:a.value)==null?void 0:pe.tableData)==null?void 0:D.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},vs=(a,i)=>{var l,c,d,b,v,h,C,_;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((b=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:b.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(s=((_=(C=(h=a==null?void 0:a.compData)==null?void 0:h.find(P=>(P==null?void 0:P.key)==="formContent"))==null?void 0:C.contents)==null?void 0:_.length)/5);return s*2},Il=(a,i,s)=>{var b,v;const l=(v=(b=rs.value)==null?void 0:b[ss.value])==null?void 0:v.filter(h=>{var C;return((C=h==null?void 0:h.key)==null?void 0:C.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var C,_,I;return((I=(_=(C=h==null?void 0:h.value)==null?void 0:C.tableData)==null?void 0:_.component)==null?void 0:I.id)===a.id}),d=vs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,C)=>Il(h,C))),{...hs(c,i,d,a)}},gs=(a,i)=>{if((a==null?void 0:a.length)===0)return[];const s=p.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((l,c)=>Il(l,c)):[]},ms=a=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ys=(a,i)=>a==null?void 0:a.map(s=>{for(const l in i)if(l===(s==null?void 0:s.prop))return{...s,value:i[l]};return s}),bs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]);e.watch(()=>s.compType,v=>{var _;const h=ms(s==null?void 0:s.optionItems),C=v?(_=h[v==null?void 0:v.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];c.value=C==null?void 0:C.map(I=>{for(const[P,z]of Object.entries((s==null?void 0:s.comp)||{}))if((I==null?void 0:I.prop)===P)return{...I,value:z};return I})},{immediate:!0});const d=v=>St.getComponent(v),b=v=>{var h,C;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(_=>{var I;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(I=_==null?void 0:_.options)==null?void 0:I.map(P=>({...P,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):c.value=(C=c.value)==null?void 0:C.map(_=>{var I;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(I=_==null?void 0:_.options)==null?void 0:I.map(P=>({...P,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),l("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:v==null?void 0:v.prop})};return(v,h)=>{const C=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,I=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:I==null?void 0:I.prop},{default:e.withCtx(()=>[e.createVNode(C,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I==null?void 0:I.label)+":",1)]),_:2},1024),e.createVNode(C,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(I.type)),{modelValue:I.value,"onUpdate:modelValue":P=>I.value=P,content:I==null?void 0:I.options,optionUrl:I==null?void 0:I.optionUrl,disabled:I==null?void 0:I.disabled,activeText:I==null?void 0:I.activeText,inactiveText:I==null?void 0:I.inactiveText,onChange:P=>b(I)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ks=Pt._export_sfc(bs,[["__scopeId","data-v-a99af9a7"]]),xs=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:i}){const s=a,l=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),b=U=>U==null?void 0:U.reduce((pe,D)=>(pe[D==null?void 0:D.prop]=D==null?void 0:D.rule,pe),{}),v=e.computed(()=>({formRules:b(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),C=e.ref(""),_=(U,pe,D)=>{var V;let R=[];(s==null?void 0:s.activeTabName)==="任务配置"?(R=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:U},{label:"按钮名称",value:"按钮名称",children:pe}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(R=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(V=s==null?void 0:s.relatedData)==null?void 0:V.map(B=>({label:B==null?void 0:B.任务名称,value:B==null?void 0:B.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let k;return D&&(D==null?void 0:D.length)>0?k=[...R,...I(U,pe,D)]:k=R,k},I=(U,pe,D)=>{const R=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return D?R==null?void 0:R.filter(k=>D==null?void 0:D.includes(k==null?void 0:k.prop)):R},P=(U,pe)=>{var B,ue,Re,tt,Ve,Ue,De,A,le;const D=((Ve=(tt=(Re=(ue=(B=s==null?void 0:s.comp)==null?void 0:B.compData)==null?void 0:ue.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:Re.contents)==null?void 0:tt.filter(ae=>(ae==null?void 0:ae.label)!=="操作"))==null?void 0:Ve.map(ae=>({value:ae==null?void 0:ae.prop,label:ae.label})))||[],R=/button/i,k=((le=(A=(De=(Ue=s==null?void 0:s.comp)==null?void 0:Ue.compData)==null?void 0:De.filter(ae=>R.test(ae==null?void 0:ae.key)))==null?void 0:A.flatMap(ae=>ae==null?void 0:ae.contents))==null?void 0:le.map(ae=>({value:ae==null?void 0:ae.label,label:ae.label})))||[],V=_(D,k,U);h.value=pe?ys(V,pe):V,U&&(U==null?void 0:U.length)>0&&d.value.push(...U==null?void 0:U.map(ae=>({prop:ae,rule:c})))};e.onMounted(()=>{P(null,s==null?void 0:s.extendItem)});const z=U=>{const pe=U==null?void 0:U[C.value];if(C.value==="执行任务"){if(!(pe!=null&&pe.join("/")))return;const D=pe==null?void 0:pe.join("/");P(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,U)}},H=U=>{l("change",{target:s==null?void 0:s.target,extendConfigs:U})},Ee=(U,pe)=>{C.value=pe==null?void 0:pe.changeProp,z(U)},Z=U=>{l("onButtonClick",U)};return(U,pe)=>(e.openBlock(),e.createBlock(St.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:H,onBlurChange:Ee,onOnButtonClick:Z},null,8,["rowContents","formRules","buttonValue"]))}}),ws=Pt._export_sfc(xs,[["__scopeId","data-v-7c660c1f"]]),Ds={};function Cs(a,i){return null}const Es=Pt._export_sfc(Ds,[["render",Cs]]),_s={class:"form-operate-content"},Ss={class:"form-operate-item"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={class:"operate-title"},Vs={class:"operate-content"},Os={class:"fix-content"},Ms={class:"fix-button"},zs={style:{display:"flex","justify-content":"space-between"}},Ps={class:"form-content"},Rs={class:"dialog-footer"},Fs={class:"form-content"},Ls={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref([]),b=e.ref([]),v=e.ref(!1),h=e.ref([]),C=e.ref([]),_=e.ref(""),I=e.ref(!1),P=e.ref(0),z=e.ref([]),H=e.ref([]),Ee=(A,le)=>{if((le==null?void 0:le.type)=="Select"&&(A==null?void 0:A.key)==="selectRelateType"){const ae=le==null?void 0:le.optionUrl;return(ae==null?void 0:ae.selectRelateType)||le[A.key]}if((le==null?void 0:le.type)=="Select"&&(A==null?void 0:A.key)==="menuSelect"){const ae=le==null?void 0:le.optionUrl;return(ae==null?void 0:ae.menuSelect)||le[A.key]}if((le==null?void 0:le.type)=="Select"&&(A==null?void 0:A.key)==="groupSelect"){const ae=le==null?void 0:le.optionUrl;return(ae==null?void 0:ae.groupSelect)||le[A.key]}if((le==null?void 0:le.type)=="Select"&&(A==null?void 0:A.key)==="originalContent")return(le==null?void 0:le.value)||le[A.key];if((le==null?void 0:le.type)=="Select"&&(A==null?void 0:A.key)==="multiple"){const ae=le[A.key];return xl(ae)?ae:A.default}return(A==null?void 0:A.label)==="类型"&&le[A.key]===""?"Input":(A==null?void 0:A.key)==="isFormColHidden"&&!le[A.key]?!1:le[A.key]},Z=async A=>{var me,je,lt,Ne,S,Ie;c.value=!0;let le=[];const ae=await((lt=(je=(me=Te.FormContent)==null?void 0:me.find(se=>(se==null?void 0:se.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:je.value)==null?void 0:lt.value)??((S=(Ne=Te.FormContent)==null?void 0:Ne.find(se=>(se==null?void 0:se.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:S.value);if(ae==null||ae.forEach(se=>{P.value++,le.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,prop:se==null?void 0:se.prop,value:Ee(se,A),id:P.value,contents:se==null?void 0:se.options,width:(A==null?void 0:A.width)??1})}),A!=null&&A.menuSelect&&((Ie=A==null?void 0:A.menuSelect)==null?void 0:Ie.length)>0){const se=await Te.menuToContentType(A==null?void 0:A.menuSelect);le=le==null?void 0:le.map(Me=>((Me==null?void 0:Me.name)==="组信息选项"&&(Me.contents=se),Me))}_.value=A==null?void 0:A.id,d.value=await Te.selectToBase(Te.formToOptionsContents(le)),b.value=await Te.selectToBase(Te.formToOptionsContents(le))},U=A=>{var ae;v.value=!0;let le=[];(ae=Te.FormButton)==null||ae.forEach(me=>{P.value++,le.push({label:me==null?void 0:me.label,name:me==null?void 0:me.label,type:me.type,value:(me==null?void 0:me.label)==="类型"&&A[me.key]===""?"normal":A[me.key],id:P.value,contents:me==null?void 0:me.options})}),z.value=le,H.value=le,_.value=A==null?void 0:A.id};e.watch(()=>I.value,()=>{var le,ae;let A=p.cloneDeep(s.originalItemContents);(le=p.cloneDeep(s.originalItemContents))!=null&&le.find(me=>(me==null?void 0:me.key)==="enableWrap")?A=(ae=p.cloneDeep(s.originalItemContents))==null?void 0:ae.map(me=>((me==null?void 0:me.key)==="enableWrap"&&(me.contents=!I.value),me)):A.push({key:"enableWrap",contents:!I.value}),l("change",A)},{deep:!0});const pe=()=>{var ae,me,je,lt,Ne;z.value=H.value;let A={};if(_.value!==""?A.id=_.value:(P.value++,A.id="id"+P.value),(ae=z.value)==null||ae.forEach(S=>{var se;const Ie=(se=Te.FormButton)==null?void 0:se.find(Me=>(Me==null?void 0:Me.label)===(S==null?void 0:S.label));Ie&&(A[Ie.key]=S.value)}),(me=h.value)!=null&&me.find(S=>S.id===A.id))h.value=(je=h.value)==null?void 0:je.map(S=>(S.id===A.id&&(S=A),S));else{let S=p.cloneDeep(h.value);h.value||(h.value=[]),S.push(A),h.value=S}v.value=!1,_.value="";let le=p.cloneDeep(s.originalItemContents);(lt=p.cloneDeep(s.originalItemContents))!=null&<.find(S=>(S==null?void 0:S.key)==="formButton")?le=(Ne=p.cloneDeep(s.originalItemContents))==null?void 0:Ne.map(S=>((S==null?void 0:S.key)==="formButton"&&(S.contents=h.value),S)):le.push({key:"formButton",contents:h.value}),l("change",le)},D=A=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var le,ae;C.value=(le=p.cloneDeep(C.value))==null?void 0:le.filter(me=>(me==null?void 0:me.id)!==(A==null?void 0:A.id)),l("change",(ae=p.cloneDeep(s.originalItemContents))==null?void 0:ae.map(me=>((me==null?void 0:me.key)==="formContent"&&(me.contents=C.value),me))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=A=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var le,ae;h.value=(le=p.cloneDeep(h.value))==null?void 0:le.filter(me=>(me==null?void 0:me.id)!==(A==null?void 0:A.id)),l("change",(ae=p.cloneDeep(s.originalItemContents))==null?void 0:ae.map(me=>((me==null?void 0:me.key)==="formButton"&&(me.contents=h.value),me))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var le;v.value=!0;let A=[];(le=Te.FormButton)==null||le.forEach(ae=>{P.value++,A.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:(ae==null?void 0:ae.label)==="类型"?"normal":"",id:P.value,contents:ae==null?void 0:ae.options})}),z.value=A,H.value=A},V=()=>{var le,ae,me;c.value=!0;let A=[];(me=(ae=(le=Te.FormContent)==null?void 0:le.find(je=>(je==null?void 0:je.key)==="Input"))==null?void 0:ae.value)==null||me.forEach(je=>{P.value++,A.push({label:je==null?void 0:je.label,name:je==null?void 0:je.label,type:je.type,value:(je==null?void 0:je.label)==="类型"?"Input":"",id:P.value,contents:je==null?void 0:je.options})}),d.value=A,b.value=A},B=A=>{let le=p.cloneDeep(H.value);le=le==null?void 0:le.map(ae=>(ae.value=A==null?void 0:A[ae.name],ae)),H.value=le},ue=A=>{const le=A.find(je=>(je==null?void 0:je.name)==="类型");if((le==null?void 0:le.value)!="Select")return;const ae=A.find(je=>(je==null?void 0:je.name)==="多选"),me=A.find(je=>(je==null?void 0:je.name)==="初始值");ae!=null&&ae.value&&Oo.isString(me.value)&&(me.value=[me.value]),!(ae!=null&&ae.value)&&!Oo.isString(me.value)&&(me.value="")},Re=async A=>{var le,ae,me,je,lt,Ne,S,Ie,se,Me,Fe,Ce;if((A==null?void 0:A.类型)!==((ae=(le=b.value)==null?void 0:le.find(Le=>(Le==null?void 0:Le.label)==="类型"))==null?void 0:ae.value)){let Le=[];const rt=await((lt=(je=(me=Te.FormContent)==null?void 0:me.find(Q=>(Q==null?void 0:Q.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:je.value)==null?void 0:lt.value)?await((Me=(se=(Ie=Te.FormContent)==null?void 0:Ie.find(Q=>(Q==null?void 0:Q.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:se.value)==null?void 0:Me.value):(S=(Ne=Te.FormContent)==null?void 0:Ne.find(Q=>(Q==null?void 0:Q.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:S.value;if(rt==null||rt.forEach(Q=>{var ct,Qe;P.value++;const Ye=wl(Q==null?void 0:Q.default)?(A==null?void 0:A[Q.label])??Q.value??"":Q==null?void 0:Q.default;Le.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:Ye,prop:Q==null?void 0:Q.prop,id:P.value,contents:Q==null?void 0:Q.options,width:((Qe=(ct=b.value)==null?void 0:ct[0])==null?void 0:Qe.width)??1})}),A!=null&&A.菜单选项&&((Fe=A==null?void 0:A.菜单选项)==null?void 0:Fe.length)>0){const Q=await Te.menuToContentType(A==null?void 0:A.菜单选项);Le=Le==null?void 0:Le.map(Ye=>((Ye==null?void 0:Ye.name)==="组信息选项"&&(Ye.contents=Q),Ye))}ue(Le),b.value=await Te.selectToBase(p.cloneDeep(Le)),d.value=await Te.selectToBase(p.cloneDeep(Le))}else{let Le=p.cloneDeep(b.value);if(Le=Le==null?void 0:Le.map(rt=>(rt.value=A==null?void 0:A[rt.name],rt)),A!=null&&A.菜单选项&&((Ce=A==null?void 0:A.菜单选项)==null?void 0:Ce.length)>0){const rt=await Te.menuToContentType(A==null?void 0:A.菜单选项);Le=Le==null?void 0:Le.map(Q=>((Q==null?void 0:Q.name)==="组信息选项"&&(Q.contents=rt),Q))}Le=Te.formToOptionsContents(Le),ue(Le),b.value=await Te.selectToBase(p.cloneDeep(Le))}},tt=A=>{A||(d.value=b.value)},Ve=async A=>{await Re(A),d.value=b.value},Ue=vo(async()=>{var me,je,lt,Ne,S,Ie,se,Me,Fe,Ce,Le,rt;d.value=b.value;let A={};A.width=((je=(me=d.value)==null?void 0:me[0])==null?void 0:je.width)??1,_.value!==""?A.id=_.value:(P.value++,A.id="id"+P.value);let le=await((S=(Ne=(lt=Te.FormContent)==null?void 0:lt.find(Q=>{var Ye,ct;return(Q==null?void 0:Q.key)===(((ct=(Ye=d.value)==null?void 0:Ye.find(Qe=>(Qe==null?void 0:Qe.label)==="类型"))==null?void 0:ct.value)??"label")}))==null?void 0:Ne.value)==null?void 0:S.value)??((se=(Ie=Te.FormContent)==null?void 0:Ie.find(Q=>{var Ye,ct;return(Q==null?void 0:Q.key)===(((ct=(Ye=d.value)==null?void 0:Ye.find(Qe=>(Qe==null?void 0:Qe.label)==="类型"))==null?void 0:ct.value)??"label")}))==null?void 0:se.value);if((Me=d.value)==null||Me.forEach(Q=>{const Ye=le==null?void 0:le.find(ct=>(ct==null?void 0:ct.label)===(Q==null?void 0:Q.label));Ye&&(A[Ye.key]=Q.value)}),A.width=A.width?A.width:1,A.key=A==null?void 0:A.label,A.isFormColHidden=A==null?void 0:A.isFormColHidden,(Fe=C.value)!=null&&Fe.find(Q=>Q.id===A.id))C.value=(Ce=C.value)==null?void 0:Ce.map(Q=>(Q.id===A.id&&(Q=A),Q));else{let Q=p.cloneDeep(C.value);Q.push(A),C.value=Q}C.value=C.value.map(({id:Q,...Ye})=>Ye),c.value=!1,_.value="";let ae=p.cloneDeep(s.originalItemContents);(Le=p.cloneDeep(s.originalItemContents))!=null&&Le.find(Q=>(Q==null?void 0:Q.key)==="formContent")?ae=(rt=p.cloneDeep(s.originalItemContents))==null?void 0:rt.map(Q=>((Q==null?void 0:Q.key)==="formContent"&&(Q.contents=C.value),Q)):ae.push({key:"formContent",contents:C.value}),l("change",ae)},300),De=()=>{c.value=!1,v.value=!1,_.value="",b.value=[],H.value=[]};return e.watch(()=>s.originalItemContents,()=>{var le,ae,me,je,lt,Ne;if(!s.originalItemContents||s.originalItemContents.length===0)return;const A=p.cloneDeep(s.originalItemContents);C.value=((le=A==null?void 0:A.find(S=>(S==null?void 0:S.key)==="formContent"))==null?void 0:le.contents)??[],h.value=((ae=A==null?void 0:A.find(S=>(S==null?void 0:S.key)==="formButton"))==null?void 0:ae.contents)??[],I.value=(me=A==null?void 0:A.find(S=>(S==null?void 0:S.key)==="enableWrap"))!=null&&me.contents?!((je=A==null?void 0:A.find(S=>(S==null?void 0:S.key)==="enableWrap"))!=null&&je.contents):!0,C.value=(lt=p.cloneDeep(C.value))==null?void 0:lt.map((S,Ie)=>{var Me;let se=S;return se.id=(S==null?void 0:S.id)??Ie,S!=null&&S.label||(S.label=(S==null?void 0:S.key)??(S==null?void 0:S.label)??""),S!=null&&S.type||(S.type=(S==null?void 0:S.type)??""),S.contents=((Me=S==null?void 0:S.options)==null?void 0:Me.length)===0?(S==null?void 0:S.contents)??"":S==null?void 0:S.options,se}),C.value=Te.formToOptionsContents(C.value),h.value=(Ne=h.value)==null?void 0:Ne.map((S,Ie)=>S={label:(S==null?void 0:S.label)??"",type:(S==null?void 0:S.type)??"",background:(S==null?void 0:S.background)??"var(--ssComponent-primary-color)",id:Ie})},{deep:!0,immediate:!0}),(A,le)=>{const ae=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Ss,[e.createElementVNode("div",Ts,[le[2]||(le[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:V},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[le[1]||(le[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(je,lt)=>(e.openBlock(),e.createElementBlock("div",{key:lt},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(je.label),1),e.createElementVNode("div",As,[e.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>Z(je)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>D(je)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[le[4]||(le[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[le[3]||(le[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(je,lt)=>(e.openBlock(),e.createElementBlock("div",{key:lt},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(je.label),1),e.createElementVNode("div",Ms,[e.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>U(je)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>R(je)},null,8,["onClick"])])])]))),128))]),le[6]||(le[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",zs,[le[5]||(le[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(St._sfc_main$1,{modelValue:I.value,"onUpdate:modelValue":le[0]||(le[0]=je=>I.value=je)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Re,onChangeVisible:tt,onBlurChange:Ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(me,{onClick:De,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>le[7]||(le[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(me,{class:"ok-button button",onClick:e.unref(Ue),id:"themeButton"},{default:e.withCtx(()=>le[8]||(le[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:v.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Fs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:z.value,key:z.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:De,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:pe},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ro=Pt._export_sfc(Ls,[["__scopeId","data-v-20850524"]]),$s={class:"step-module content"},js={class:"module-data"},Us={class:"step-module layout"},Ks={class:"form-content"},Ws=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),C=e.ref({}),_=e.ref([]),I=Z=>{var U;C.value=Z,l("change",(U=H())==null?void 0:U.compData)},P=(Z,U)=>{var pe,D;switch(Z){case"create":(pe=d.value)==null||pe.forEach(R=>{R.value=""}),h.value="create",v.visible=!0;break;case"update":(D=d.value)==null||D.forEach(R=>{R.value=U[R==null?void 0:R.prop]}),h.value="update",v.visible=!0;break;case"delete":_.value.splice(U,1),h.value="delete";break}},z=Z=>{var U,pe,D;if((Z==null?void 0:Z.buttonName)==="确认"){const R=p.cloneDeep(Z==null?void 0:Z.content);switch(Object.keys(R).forEach(k=>{R[k]===""&&delete R[k]}),h.value){case"create":_.value.push({...R,index:((U=_.value)==null?void 0:U.length)+1});break;case"update":_.value=(pe=_.value)==null?void 0:pe.map(k=>k.index===(R==null?void 0:R.index)?{...k,title:R==null?void 0:R.title,description:R==null?void 0:R.description}:k);break}l("change",(D=H())==null?void 0:D.compData),v.visible=!1}else v.visible=!1},H=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:C.value}]}),Ee=()=>{v.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Z=>{var U,pe;Z&&(C.value=((U=Z==null?void 0:Z.find(D=>D.key==="stepConfig"))==null?void 0:U.contents)??{},_.value=((pe=Z==null?void 0:Z.find(D=>D.key==="stepList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Z,U)=>{const pe=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$s,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=R=>P("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(R,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:V=>P("update",{...R,index:k+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:V=>P("delete",k)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Us,[U[5]||(U[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:c.value,onChange:I},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:Ee,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ks,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hs=Pt._export_sfc(Ws,[["__scopeId","data-v-7dbd17f2"]]),qs={class:"step-module content"},Gs={class:"module-data"},Xs={class:"step-module layout"},Ys={class:"form-content"},Js=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref("create"),d=e.ref({}),b=e.ref([]),v=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),C=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),I=Z=>{var U;d.value=Z,l("change",(U=H())==null?void 0:U.compData)},P=(Z,U)=>{var pe,D;switch(Z){case"create":(pe=h.value)==null||pe.forEach(R=>{R.value=""}),c.value="create",_.visible=!0;break;case"update":(D=h.value)==null||D.forEach(R=>{R.value=U[R==null?void 0:R.prop]}),c.value="update",_.visible=!0;break;case"delete":b.value.splice(U,1),c.value="delete";break}},z=Z=>{var U,pe,D,R;if((Z==null?void 0:Z.buttonName)==="确认"){const k=p.cloneDeep(Z==null?void 0:Z.content);switch(Object.keys(k).forEach(V=>{k[V]===""&&delete k[V]}),c.value){case"create":(pe=b.value)==null||pe.push({...k,index:((U=b.value)==null?void 0:U.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(V=>V.index===(k==null?void 0:k.index)?{...V,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:V);break}l("change",(R=H())==null?void 0:R.compData),_.visible=!1}else _.visible=!1},H=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:d.value}]}),Ee=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Z=>{var U,pe;Z&&(d.value=((U=Z==null?void 0:Z.find(D=>D.key==="timeLineConfig"))==null?void 0:U.contents)??{},b.value=((pe=Z==null?void 0:Z.find(D=>D.key==="timeLineList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Z,U)=>{const pe=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qs,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=R=>P("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(R,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:V=>P("update",{...R,index:k+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:V=>P("delete",k)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Xs,[U[5]||(U[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:v.value,onChange:I},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:Ee,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:C.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Zs=Pt._export_sfc(Js,[["__scopeId","data-v-39ffc861"]]),Qs={};function ec(a,i){return e.openBlock(),e.createElementBlock("div")}const tc=Pt._export_sfc(Qs,[["render",ec]]),nc={class:"extra-content"},ac={key:0},oc={key:1},lc={class:"dialog-footer"},rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:i}){const s=a,l=e.ref(0),c=e.ref(),d=e.ref(),b=i,v=e.ref(!1),h=e.ref({}),C=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var R;const D=p.cloneDeep(s.itemData);c.value=(R=p.cloneDeep(D))==null?void 0:R.map(k=>{var V;if(k.key==="extra"){let B=[];(V=k.value)==null||V.forEach(ue=>{var Re;B.push((Re=Object.values(ue))==null?void 0:Re[0])}),k.value=B}return k})},{deep:!0,immediate:!0});const I=(D,R,k,V)=>{var ue;let B={};((ue=D==null?void 0:D[0])==null?void 0:ue.contents)==="详情"&&(v.value=!0,B[R]=D,d.value=D==null?void 0:D.filter(Re=>(Re==null?void 0:Re.key)!=="tableContentName"),h.value=B,C.value=k,_.value=V.id)},P=D=>{var Re,tt,Ve,Ue;const R=(tt=(Re=Object.values(p.cloneDeep(h.value)))==null?void 0:Re[0])==null?void 0:tt.filter(De=>(De==null?void 0:De.key)==="tableContentName"),k=(Ue=(Ve=Object.values(p.cloneDeep(h.value)))==null?void 0:Ve[0])==null?void 0:Ue.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),V=k==null?void 0:k.map((De,A)=>{var le;return A===D.index&&(De==null?void 0:De.comp)==="Table"&&(De.compData=(le=De.compData)==null?void 0:le.map(ae=>{var me,je;return(ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=(je=(me=D.content)==null?void 0:me.map(lt=>{let Ne={};for(let S in lt)S!=="id"&&(Ne[S]=lt[S]);return Ne}))==null?void 0:je.map(lt=>Object.values(lt))),ae})),De});V.unshift(R==null?void 0:R[0]);let B=p.cloneDeep(h.value),ue={};for(let De in B)ue[De]=V;h.value=ue},z=()=>{v.value=!1,h.value={},C.value={},_.value=void 0,l.value++},H=D=>{var Re,tt,Ve,Ue;const R=(tt=(Re=Object.values(p.cloneDeep(h.value)))==null?void 0:Re[0])==null?void 0:tt.filter(De=>(De==null?void 0:De.key)==="tableContentName"),k=(Ue=(Ve=Object.values(p.cloneDeep(h.value)))==null?void 0:Ve[0])==null?void 0:Ue.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),V=k==null?void 0:k.map((De,A)=>(A===D.index&&(De.compData=D.contents),De));V.unshift(R==null?void 0:R[0]);let B=p.cloneDeep(h.value),ue={};for(let De in B)ue[De]=V;h.value=ue},Ee=()=>{var R,k;let D={};for(let V in C.value)V===((R=Object.keys(h.value))==null?void 0:R[0])?D[V]=(k=Object.values(h.value))==null?void 0:k[0]:D[V]=C.value[V];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),v.value=!1,h.value={},C.value={},_.value=void 0},Z=()=>{v.value=!1,h.value={},C.value={},_.value=void 0},U=D=>{b("change",D,"methodData")},pe=D=>oa(D);return(D,R)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(V,B)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(V==null?void 0:V.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ac)):(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(V.comp)),{itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:B,index:(V==null?void 0:V.id)??B,onContentClick:I,onChange:U},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:v.value,onBeforeDestroy:Z},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(V,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(V.comp)),{itemData:V==null?void 0:V.compData,onChange:P,childItemData:V==null?void 0:V.itemChildData,key:B,onContentChange:H,index:(V==null?void 0:V.id)??B,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createVNode(k,{class:"cancel-button footer-button",onClick:z,id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ic=Pt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]);let Bt="$R";const sc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),cc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),uc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),ha=a=>{let i=a;const s=[];let l="";for(const c of i)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(s.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},ma=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===i?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=b.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},pc=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===i)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=b.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===i||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Fo=(a,i)=>{let s=0;for(let l=0;l<a.length;l++)a[l]===i&&s++;return s%2===0},uo=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===i&&Fo(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=b.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&Fo(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},dc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),fc=a=>{var i,s,l,c,d,b,v,h,C,_,I,P,z,H,Ee,Z,U,pe,D,R,k,V,B,ue,Re,tt,Ve,Ue,De,A,le,ae,me,je,lt,Ne,S,Ie,se,Me,Fe,Ce,Le,rt,Q,Ye,ct,Qe,ne,re,_e,ye,Xe,Ze,x,w,m,L,E,M,ie,q,K,oe,ee,de,he,J,ve,W,Oe,Se,ge,F,G,X,O,Ae,Ke,be,Be,xe;if(uc(a)){let ot={},We=(l=(s=(i=a==null?void 0:a.replace(":",Bt))==null?void 0:i.split(Bt))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),Y="",ce="",fe=(d=(c=a==null?void 0:a.replace(":",Bt))==null?void 0:c.split(Bt))==null?void 0:d[1];if((fe==null?void 0:fe[0])==="("&&(ce=(h=(v=(b=fe==null?void 0:fe.split("("))==null?void 0:b[1])==null?void 0:v.split(")"))==null?void 0:h[0],fe=(_=(C=fe==null?void 0:fe.replace(")",Bt))==null?void 0:C.split(Bt))==null?void 0:_[1]),((I=uo(fe,"/"))==null?void 0:I.length)>1)Y=(P=uo(fe,"/"))==null?void 0:P.map(ze=>ze==null?void 0:ze.replaceAll("/","").replaceAll("'",""));else if(fe.includes("{")||fe.includes("("))if(fe.includes("{")?Y=Y+((pe=(U=(Z=(Ee=(H=(z=fe==null?void 0:fe.split("{"))==null?void 0:z[1])==null?void 0:H.split("}"))==null?void 0:Ee[0])==null?void 0:Z.replaceAll(":","/").replaceAll("'",""))==null?void 0:U.replaceAll("[","(["))==null?void 0:pe.replaceAll("]","])"))+"[":Y=Y+((ue=(B=(V=(k=(R=(D=fe==null?void 0:fe.split("("))==null?void 0:D[1])==null?void 0:R.split(")"))==null?void 0:k[0])==null?void 0:V.replaceAll(":","/").replaceAll("'",""))==null?void 0:B.replaceAll("[","(["))==null?void 0:ue.replaceAll("]","])"))+"[",!((Re=fe==null?void 0:fe.split(")"))!=null&&Re[1]))Y=Y+((Ue=(Ve=(tt=fe==null?void 0:fe.split("["))==null?void 0:tt[1])==null?void 0:Ve.split("]"))==null?void 0:Ue[0])+"]";else{const ze=(ae=(le=(A=(De=fe==null?void 0:fe.split(")"))==null?void 0:De[1])==null?void 0:A.replace("[",Bt))==null?void 0:le.split(Bt))==null?void 0:ae[1];if(fe!=null&&fe.includes("?"))Y=((me=fe==null?void 0:fe.split("?"))==null?void 0:me[1])+"&&"+((lt=(je=fe==null?void 0:fe.split("?"))==null?void 0:je[0])==null?void 0:lt.replaceAll("#","==="));else if(ze){const it=ze.lastIndexOf("]"),j=ze.substring(0,it)+Bt+ze.substring(it+1);Y=Y+((Ne=j==null?void 0:j.split(Bt))==null?void 0:Ne[0])+"]"}else Y=(se=(Ie=(S=a==null?void 0:a.replace(":",Bt))==null?void 0:S.split(Bt))==null?void 0:Ie[1])==null?void 0:se.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))Y=(Ce=(Fe=(Me=a==null?void 0:a.replace(":",Bt))==null?void 0:Me.split(Bt))==null?void 0:Fe[1])==null?void 0:Ce.replaceAll("'","");else{let ze=(Q=(rt=(Le=a==null?void 0:a.replace(":",Bt))==null?void 0:Le.split(Bt))==null?void 0:rt[1])==null?void 0:Q.replaceAll("'","");Y=((Qe=(ct=(Ye=ze==null?void 0:ze.split("?"))==null?void 0:Ye[1])==null?void 0:ct.split(":"))==null?void 0:Qe[0])+"&&"+((ne=ze==null?void 0:ze.split("?"))==null?void 0:ne[0])}return ot[We]=ce!==""?ce+"$##"+Y:Y,{groupName:"",formContents:[[ot]]}}else{let ot={},We="",Y="";if(a.includes("#")){We=(_e=(re=a==null?void 0:a.split("#"))==null?void 0:re[0])==null?void 0:_e.replaceAll("'","");let ce=(Xe=(ye=a==null?void 0:a.split("#"))==null?void 0:ye[1])==null?void 0:Xe.replaceAll("'","");ce!=null&&ce.includes("{")?Y=Y+((m=(w=(x=(Ze=ce==null?void 0:ce.split("{"))==null?void 0:Ze[1])==null?void 0:x.split("}"))==null?void 0:w[0])==null?void 0:m.replaceAll(":","/").replaceAll("'",""))+"[":Y=Y+((ie=(M=(E=(L=ce==null?void 0:ce.split("("))==null?void 0:L[1])==null?void 0:E.split(")"))==null?void 0:M[0])==null?void 0:ie.replaceAll(":","/").replaceAll("'",""))+"[",Y=Y+((he=(K=(q=ce==null?void 0:ce.replace("[",Bt))==null?void 0:q.split(Bt))==null?void 0:K[1])==null?void 0:he.slice(0,((de=(ee=(oe=ce==null?void 0:ce.replace("[",Bt))==null?void 0:oe.split(Bt))==null?void 0:ee[1])==null?void 0:de.length)-1))}else{let ce=(W=(ve=(J=a==null?void 0:a.split("]"))==null?void 0:J[0])==null?void 0:ve.split("["))==null?void 0:W[1];if((Oe=ce==null?void 0:ce.split(":"))==null||Oe.forEach((fe,ze)=>{var it;((it=ce==null?void 0:ce.split(":"))==null?void 0:it.length)-1===ze&&(We=fe==null?void 0:fe.replaceAll("'",""))}),!(a!=null&&a.includes("[")))Y=((G=(F=(ge=(Se=a==null?void 0:a.split("]"))==null?void 0:Se[1])==null?void 0:ge.replace(":",Bt).split(Bt))==null?void 0:F[1])==null?void 0:G.replaceAll("'",""))??"";else{let fe=(Be=(be=(Ke=(Ae=(O=(X=p.cloneDeep(a))==null?void 0:X.split("("))==null?void 0:O[1])==null?void 0:Ae.split(")"))==null?void 0:Ke[0])==null?void 0:be.replaceAll("{","").replaceAll("}",""))==null?void 0:Be.replaceAll("'","").replaceAll(":","/"),ze="";(xe=ce==null?void 0:ce.split(":"))==null||xe.forEach(it=>{ze=ze===""?ze+(it==null?void 0:it.replaceAll("'","")):ze+":"+(it==null?void 0:it.replaceAll("'",""))}),Y=fe+"["+ze+"]"}}return ot[We]=Y,{groupName:"",formContents:[[ot]]}}},hc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),vc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},gc=a=>{var d,b,v,h,C;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(b=(d=ha(p.cloneDeep(i)))==null?void 0:d.filter(_=>_!==","))==null?void 0:b.map(_=>_==null?void 0:_.slice(1,_.length-1)):(i="["+p.cloneDeep(i)+"]",s=(h=(v=ha(p.cloneDeep(i)))==null?void 0:v.filter(_=>_!==","))==null?void 0:h.map(_=>_==null?void 0:_.slice(1,_.length-1))),s=(C=p.cloneDeep(s))==null?void 0:C.map(_=>{var I,P;return _=(P=(I=_.replace(")",Bt))==null?void 0:I.split(Bt))==null?void 0:P[1],_});let l=[],c=[];return s==null||s.forEach(_=>{var z,H,Ee,Z,U,pe,D,R,k,V,B,ue,Re,tt,Ve,Ue,De,A,le,ae,me,je,lt,Ne,S,Ie,se,Me,Fe,Ce,Le,rt,Q,Ye,ct,Qe,ne,re,_e,ye,Xe,Ze,x,w,m,L,E,M;let I=(H=(z=p.cloneDeep(_))==null?void 0:z.slice(1,p.cloneDeep(_).length-1))==null?void 0:H.replace(":",Bt).split(Bt);if(((Z=(Ee=p.cloneDeep(I))==null?void 0:Ee[0])==null?void 0:Z.replaceAll("'",""))==="输入"){if(!((pe=(U=p.cloneDeep(I))==null?void 0:U[1])!=null&&pe.includes("["))&&!((R=(D=p.cloneDeep(I))==null?void 0:D[1])!=null&&R.includes("("))){Te.IsJson((k=p.cloneDeep(I))==null?void 0:k[1].replaceAll("'",'"'))&&c.push(JSON.parse((V=p.cloneDeep(I))==null?void 0:V[1].replaceAll("'",'"')));return}if(((ue=(B=p.cloneDeep(I))==null?void 0:B[1])==null?void 0:ue[0])==="["){let ie=(Ue=(Re=p.cloneDeep(I))==null?void 0:Re[1])==null?void 0:Ue.slice(1,((Ve=(tt=p.cloneDeep(I))==null?void 0:tt[1])==null?void 0:Ve.length)-1);(A=(De=ha(ie))==null?void 0:De.filter(q=>q!==","))==null||A.forEach(q=>{var he,J,ve,W,Oe,Se,ge,F,G,X,O,Ae,Ke,be,Be,xe,ot,We,Y,ce,fe,ze;let K={},oe=(ve=(J=p.cloneDeep(q))==null?void 0:J.slice(1,((he=p.cloneDeep(q))==null?void 0:he.length)-1))==null?void 0:ve.replace(":",Bt).split(Bt),ee=(W=oe==null?void 0:oe[0])==null?void 0:W.replaceAll("'",""),de;(Oe=oe==null?void 0:oe[1])!=null&&Oe.includes("(")?(de=(be=(Ke=(Ae=(O=(X=(G=(F=(ge=p.cloneDeep(oe))==null?void 0:ge[1])==null?void 0:F.replaceAll("{",""))==null?void 0:G.replaceAll("}",""))==null?void 0:X.split("("))==null?void 0:O[1])==null?void 0:Ae.split(")"))==null?void 0:Ke[0])==null?void 0:be.replaceAll(":","/").replaceAll("'",""),(xe=(Be=p.cloneDeep(oe))==null?void 0:Be[1])!=null&&xe.includes("[")&&(de=p.cloneDeep(de)+"["+((ze=(fe=(ce=(Y=(We=(ot=p.cloneDeep(oe))==null?void 0:ot[1])==null?void 0:We.split("["))==null?void 0:Y[1])==null?void 0:ce.split("]"))==null?void 0:fe[0])==null?void 0:ze.replaceAll("'",""))+"]")):de=(Se=oe==null?void 0:oe[1])==null?void 0:Se.replaceAll("'",""),K[ee]=de,c.push(K)})}}else{if(!((ae=(le=p.cloneDeep(I))==null?void 0:le[1])!=null&&ae.includes("["))&&!((je=(me=p.cloneDeep(I))==null?void 0:me[1])!=null&&je.includes("("))){Te.IsJson((lt=p.cloneDeep(I))==null?void 0:lt[1].replaceAll("'",'"'))&&l.push(JSON.parse((Ne=p.cloneDeep(I))==null?void 0:Ne[1].replaceAll("'",'"')));return}if(((Ie=(S=p.cloneDeep(I))==null?void 0:S[1])==null?void 0:Ie[0])==="["){let ie=(Ce=(se=p.cloneDeep(I))==null?void 0:se[1])==null?void 0:Ce.slice(1,((Fe=(Me=p.cloneDeep(I))==null?void 0:Me[1])==null?void 0:Fe.length)-1);(rt=(Le=ha(ie))==null?void 0:Le.filter(q=>q!==","))==null||rt.forEach(q=>{var he,J,ve,W,Oe,Se,ge,F,G,X,O,Ae,Ke,be,Be,xe,ot,We,Y,ce,fe,ze,it,j,Ge,qe,pt,gt,ft,st,ke,Je,nt,ut,Dt,Ct;let K={},oe=(ve=(J=p.cloneDeep(q))==null?void 0:J.slice(1,((he=p.cloneDeep(q))==null?void 0:he.length)-1))==null?void 0:ve.replace(":",Bt).split(Bt),ee=(W=oe==null?void 0:oe[0])==null?void 0:W.replaceAll("'",""),de;if(!((Oe=oe==null?void 0:oe[1])!=null&&Oe.includes("(")))de=(Se=oe==null?void 0:oe[1])==null?void 0:Se.replaceAll("'","");else if(de=(Ae=(O=(X=(G=(F=(ge=p.cloneDeep(oe))==null?void 0:ge[1])==null?void 0:F.replaceAll("{",""))==null?void 0:G.replaceAll("}",""))==null?void 0:X.replace("(",Bt))==null?void 0:O.split(Bt))==null?void 0:Ae[1],de=(be=(Ke=vc(p.cloneDeep(de),Bt))==null?void 0:Ke.split(Bt))==null?void 0:be[0],!(de!=null&&de.includes("(")))de=(Be=p.cloneDeep(de))==null?void 0:Be.replaceAll(":","/").replaceAll("'",""),(ot=(xe=p.cloneDeep(oe))==null?void 0:xe[1])!=null&&ot.includes("[")&&(de=p.cloneDeep(de)+"["+((qe=(Ge=(j=(it=(Y=(We=p.cloneDeep(oe))==null?void 0:We[1])==null?void 0:Y.split("["))==null?void 0:it[((ze=(fe=(ce=p.cloneDeep(oe))==null?void 0:ce[1])==null?void 0:fe.split("["))==null?void 0:ze.length)-1])==null?void 0:j.split("]"))==null?void 0:Ge[0])==null?void 0:qe.replaceAll("'",""))+"]");else{let yt="";(pt=ma(de,":"))==null||pt.forEach(Et=>{var Vt,Mt,Nt,Tt,Ht,on,Wt,xn,hn,wn,Sn,vn,Tn,gn,mt,Yt,ht,zn;if(!(Et!=null&&Et.includes("(")))yt=yt===""?yt+((Vt=Et==null?void 0:Et.replaceAll(":",""))==null?void 0:Vt.replaceAll("'","")):yt+"/"+((Mt=Et==null?void 0:Et.replaceAll(":",""))==null?void 0:Mt.replaceAll("'",""));else if(Et!=null&&Et.includes(")[")){let wt=(Ht=(Tt=(Nt=p.cloneDeep(Et))==null?void 0:Nt.split(")"))==null?void 0:Tt[0])==null?void 0:Ht.replaceAll("'","");yt=yt===""?yt+wt:yt+"/"+wt}else{let wt=(Tn=(vn=(Sn=(wn=(hn=(xn=(Wt=(on=p.cloneDeep(Et))==null?void 0:on.replaceAll("{",""))==null?void 0:Wt.replaceAll("}",""))==null?void 0:xn.replace("(",Bt))==null?void 0:hn.split(Bt))==null?void 0:wn[1])==null?void 0:Sn.split(")"))==null?void 0:vn[0])==null?void 0:Tn.replaceAll(":","/").replaceAll("'","");wt=wt+"["+((zn=(ht=(Yt=(mt=(gn=p.cloneDeep(Et))==null?void 0:gn.split("["))==null?void 0:mt[1])==null?void 0:Yt.split("]"))==null?void 0:ht[0])==null?void 0:zn.replaceAll("'",""))+"]",yt=yt===""?yt+"["+wt+"]":yt+"/["+wt+"]"}}),de=yt+"["+((Ct=(Dt=(ut=(nt=(ft=(gt=p.cloneDeep(oe))==null?void 0:gt[1])==null?void 0:ft.split("["))==null?void 0:nt[((Je=(ke=(st=p.cloneDeep(oe))==null?void 0:st[1])==null?void 0:ke.split("["))==null?void 0:Je.length)-1])==null?void 0:ut.split("]"))==null?void 0:Dt[0])==null?void 0:Ct.replaceAll("'",""))+"]"}K[ee]=de,l.push(K)})}else{let ie=(Qe=(Q=p.cloneDeep(I))==null?void 0:Q[1])==null?void 0:Qe.slice(1,((ct=(Ye=p.cloneDeep(I))==null?void 0:Ye[1])==null?void 0:ct.length)-1),q={},K=(m=(w=(_e=(re=(ne=p.cloneDeep(ie))==null?void 0:ne.split("]"))==null?void 0:re[0])==null?void 0:_e.split(":"))==null?void 0:w[((x=(Ze=(Xe=(ye=p.cloneDeep(ie))==null?void 0:ye.split("]"))==null?void 0:Xe[0])==null?void 0:Ze.split(":"))==null?void 0:x.length)-1])==null?void 0:m.replaceAll("'",""),oe=((M=(E=(L=p.cloneDeep(ie))==null?void 0:L.split("]"))==null?void 0:E[0])==null?void 0:M.replaceAll("'",""))+"]";q[K]=oe,l.push(q)}}}),{output:l,input:c}},mc=Te.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(mc),Bn=Te.useMenuState(p.pinia),{activeMenuPath:Wn}=p.storeToRefs(Bn),va=p.useLoginState(),{loginUserInfo:qt}=p.storeToRefs(va),yc=Te.useOriginalState(p.pinia),{originalPath:bc}=p.storeToRefs(yc),Zt=bc.value,kc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const b in c){const v=b.match(i);v&&d.push({idx:Number(v[1]),value:c[b]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((b,v)=>b.idx-v.idx),{item:c,names:d}});function l(c,d){var v;if(!c)return[];if(d>=((v=c==null?void 0:c[0])==null?void 0:v.names.length))return c.map(h=>h.item);const b=new Map;for(const h of c){const C=h.names[d].value;b.has(C)||b.set(C,[]),b.get(C).push(h)}return Array.from(b.entries()).map(([h,C])=>{var _,I,P;return(C[0].names.length===1||(C==null?void 0:C.length)===1)&&((I=(_=C[0].names)==null?void 0:_[0])==null?void 0:I.idx)===-1?(P=C==null?void 0:C[0])==null?void 0:P.item:{name:h,isShow:!0,comp:"ParentItem",children:l(C,d+1)}})}if(s)return l(s,0)},Ca=a=>a!=null&&a.every(i=>{var s,l;return((l=(s=Object.keys(i))==null?void 0:s.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:kc(a),Bl=async()=>{var d,b,v,h,C,_,I,P,z,H,Ee,Z,U,pe,D,R,k,V,B,ue,Re,tt,Ve,Ue,De,A,le,ae,me,je,lt,Ne,S,Ie,se,Me,Fe,Ce,Le,rt,Q,Ye,ct,Qe,ne,re,_e,ye,Xe,Ze,x,w,m,L,E,M,ie,q,K,oe,ee,de,he,J,ve,W,Oe;Bn.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((b=(d=i==null?void 0:i.data)==null?void 0:d.result)==null?void 0:b.length)>0){let Se=(z=(P=(I=(_=(C=(h=(v=i==null?void 0:i.data)==null?void 0:v.result)==null?void 0:h[0])==null?void 0:C.value)==null?void 0:_.pageData)==null?void 0:I.compData)==null?void 0:P.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:z.contents;a=(Ee=(H=p.cloneDeep(Se))==null?void 0:H[0])==null?void 0:Ee.label}let s=Wn.value;(pe=Wn.value)!=null&&pe.includes(`updateLoading${((Z=qt.value)==null?void 0:Z.account)||((U=qt.value)==null?void 0:U.账号)}`)?s=p.cloneDeep(Wn).value:(k=Wn.value)!=null&&k.includes(`loading${((D=qt.value)==null?void 0:D.account)||((R=qt.value)==null?void 0:R.账号)}`)&&(s=p.cloneDeep(_n).value+Zt+`loading${((V=qt.value)==null?void 0:V.account)||((B=qt.value)==null?void 0:B.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Re=(ue=l==null?void 0:l.data)==null?void 0:ue.result)==null?void 0:Re.length)>0){let Se="",ge=[];(Ve=(tt=l==null?void 0:l.data)==null?void 0:tt.result)==null||Ve.forEach(G=>{var X,O,Ae,Ke,be;((O=(X=G==null?void 0:G.value)==null?void 0:X.pageData)==null?void 0:O.comp)==="Form"&&((be=(Ke=(Ae=G==null?void 0:G.value)==null?void 0:Ae.pageData)==null?void 0:Ke.compData)==null||be.forEach(Be=>{(Be==null?void 0:Be.key)==="formContent"&&(ge=[...ge,...Be==null?void 0:Be.contents])}))});let F=ge==null?void 0:ge.find(G=>(G==null?void 0:G.isMain)===!0);if(F?(Se=F==null?void 0:F.value,a=F==null?void 0:F.key):Se=(Ne=(lt=(je=(me=(ae=(le=(A=(De=(Ue=l==null?void 0:l.data)==null?void 0:Ue.result)==null?void 0:De[0])==null?void 0:A.value)==null?void 0:le.pageData)==null?void 0:ae.compData)==null?void 0:me.find(G=>(G==null?void 0:G.key)==="formContent"))==null?void 0:je.contents)==null?void 0:lt.find(G=>{var X,O;return(G==null?void 0:G.key)===a||((O=(X=G==null?void 0:G.optionUrl)==null?void 0:X.groupSelect)==null?void 0:O[1])===a}))==null?void 0:Ne.value,(se=Wn.value)!=null&&se.includes(`updateLoading${((S=qt.value)==null?void 0:S.account)||((Ie=qt.value)==null?void 0:Ie.账号)}`)){let G=[],X=[];const O=await p.getInsofDataApi({key:{pageKey:(re=Wn.value.split(Zt+`updateLoading${((Qe=qt.value)==null?void 0:Qe.account)||((ne=qt.value)==null?void 0:ne.账号)}`))==null?void 0:re[0],systemKey:sessionStorage.getItem("systemKey")}});if(((ye=(_e=O==null?void 0:O.data)==null?void 0:_e.result)==null?void 0:ye.length)>0){let Ae=(Xe=l==null?void 0:l.data)==null?void 0:Xe.result,Ke=(Ze=p.cloneDeep(Ae))==null?void 0:Ze.map(async be=>{var Be,xe,ot,We,Y,ce,fe,ze,it,j,Ge,qe,pt,gt;if(((Be=be==null?void 0:be.key)==null?void 0:Be.type)==="structure"){let ft=(Y=(We=(ot=(xe=be==null?void 0:be.value)==null?void 0:xe.pageData)==null?void 0:ot.compData)==null?void 0:We.find(st=>(st==null?void 0:st.key)==="parentFormPath"))==null?void 0:Y.contents;if(ft){let st=await Te.getItemData(ft,sessionStorage.getItem("systemKey"),""),ke=(it=(ze=(fe=(ce=be==null?void 0:be.value)==null?void 0:ce.pageData)==null?void 0:fe.compData)==null?void 0:ze.find(nt=>(nt==null?void 0:nt.key)==="formContent"))==null?void 0:it.contents,Je=st==null?void 0:st.filter(nt=>(nt==null?void 0:nt.comp)==="Form");Je==null||Je.forEach(nt=>{var ut;(ut=nt==null?void 0:nt.compData)==null||ut.forEach(Dt=>{var Ct,yt;if((Dt==null?void 0:Dt.key)==="formContent"&&((Ct=Dt==null?void 0:Dt.contents)==null?void 0:Ct.some(Vt=>ke==null?void 0:ke.find(Mt=>(Mt==null?void 0:Mt.prop)===(Vt==null?void 0:Vt.prop))))){let Vt=nt;Vt.compData=(yt=Vt.compData)==null?void 0:yt.map(Nt=>{var Tt;return(Nt==null?void 0:Nt.key)==="formContent"&&(Nt.contents=(Tt=Nt.contents)==null?void 0:Tt.map(Ht=>{var on;return ke!=null&&ke.find(Wt=>(Wt==null?void 0:Wt.prop)===(Ht==null?void 0:Ht.prop))&&(Ht.value=(on=ke==null?void 0:ke.find(Wt=>(Wt==null?void 0:Wt.prop)===(Ht==null?void 0:Ht.prop)))==null?void 0:on.value),Ht})),Nt});let Mt={};for(let Nt in Vt)Nt!=="id"&&(Mt[Nt]=Vt[Nt]);c.push({id:nt==null?void 0:nt.id,value:{pageData:Mt}})}})})}else if((Ge=(j=O==null?void 0:O.data)==null?void 0:j.result)!=null&&Ge.find(st=>{var ke,Je,nt,ut;return((Je=(ke=st==null?void 0:st.value)==null?void 0:ke.pageData)==null?void 0:Je.name)===((ut=(nt=be==null?void 0:be.value)==null?void 0:nt.pageData)==null?void 0:ut.name)})){let st=be==null?void 0:be.key;st.pageKey=p.cloneDeep(_n).value+Zt+Se,c.push({id:(gt=(pt=(qe=O==null?void 0:O.data)==null?void 0:qe.result)==null?void 0:pt.find(ke=>{var Je,nt,ut,Dt;return((nt=(Je=ke==null?void 0:ke.value)==null?void 0:Je.pageData)==null?void 0:nt.name)===((Dt=(ut=be==null?void 0:be.value)==null?void 0:ut.pageData)==null?void 0:Dt.name)}))==null?void 0:gt.id,key:st,value:be==null?void 0:be.value})}else{let st=be==null?void 0:be.key;st.pageKey=p.cloneDeep(_n).value+Zt+Se,G.push({key:st,value:be==null?void 0:be.value})}}});await Promise.all(Ke),(w=(x=l==null?void 0:l.data)==null?void 0:x.result)==null||w.forEach(be=>{var xe,ot,We;let Be=(xe=p.cloneDeep(be))==null?void 0:xe.key;Be.pageKey=p.cloneDeep(_n).value+Zt+Se+Zt+`updateLoading${((ot=qt.value)==null?void 0:ot.account)||((We=qt.value)==null?void 0:We.账号)}`,Bn.setChildMenu(Be.pageKey),c.push({id:be==null?void 0:be.id,key:Be})})}if(Se===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Bn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(m=c==null?void 0:c[0])!=null&&m.key&&await va.setLogRecordAsync({type:"保存",data:c},(L=c==null?void 0:c[0])==null?void 0:L.key),(G==null?void 0:G.length)>0&&(await p.batchAddInsofDataApi({dataList:G}),(E=G==null?void 0:G[0])!=null&&E.key&&await va.setLogRecordAsync({type:"保存",data:G},(M=G==null?void 0:G[0])==null?void 0:M.key));const Ae=await p.getInsofDataApi({key:{pageKey:(K=Wn.value.split(Zt+`updateLoading${((ie=qt.value)==null?void 0:ie.account)||((q=qt.value)==null?void 0:q.账号)}`))==null?void 0:K[0],systemKey:sessionStorage.getItem("systemKey")}});if(((ee=(oe=Ae==null?void 0:Ae.data)==null?void 0:oe.result)==null?void 0:ee.length)>0){let Ke=[],be=(de=l==null?void 0:l.data)==null?void 0:de.result;(he=p.cloneDeep(be))==null||he.forEach(Be=>{var xe,ot,We,Y,ce,fe,ze,it,j,Ge,qe,pt;if(((xe=Be==null?void 0:Be.key)==null?void 0:xe.type)!=="structure"){let gt=(Y=(We=(ot=Ae==null?void 0:Ae.data)==null?void 0:ot.result)==null?void 0:We.filter(Je=>{var nt;return((nt=Je==null?void 0:Je.key)==null?void 0:nt.type)==="data"}))==null?void 0:Y.map(Je=>Je==null?void 0:Je.id);Ke=[...Ke,...gt];let ft=(it=(ze=(fe=(ce=p.cloneDeep(be))==null?void 0:ce.find(Je=>{var nt;return((nt=Be==null?void 0:Be.key)==null?void 0:nt.tableId)===(Je==null?void 0:Je.id)}))==null?void 0:fe.value)==null?void 0:ze.pageData)==null?void 0:it.name,st=(qe=(Ge=(j=Ae==null?void 0:Ae.data)==null?void 0:j.result)==null?void 0:Ge.find(Je=>{var nt,ut;return((ut=(nt=Je==null?void 0:Je.value)==null?void 0:nt.pageData)==null?void 0:ut.name)===ft}))==null?void 0:qe.id,ke=(pt=p.cloneDeep(Be))==null?void 0:pt.key;ke.tableId=st,ke.pageKey=p.cloneDeep(_n).value+Zt+Se,X.push({key:ke,value:Be==null?void 0:Be.value})}}),(Ke==null?void 0:Ke.length)>0&&(Ke=[...new Set(Ke)],await p.batchDeleteInsofDataApi({ids:Ke})),(ve=(J=l==null?void 0:l.data)==null?void 0:J.result)==null||ve.forEach(Be=>{var ot,We,Y;let xe=(ot=p.cloneDeep(Be))==null?void 0:ot.key;xe.pageKey=p.cloneDeep(_n).value+Zt+Se+Zt+`updateLoading${((We=qt.value)==null?void 0:We.account)||((Y=qt.value)==null?void 0:Y.账号)}`,Bn.setChildMenu(xe.pageKey),c.push({id:Be==null?void 0:Be.id,key:xe})})}(X==null?void 0:X.length)>0&&(await p.batchAddInsofDataApi({dataList:X}),(W=G==null?void 0:G[0])!=null&&W.key&&await va.setLogRecordAsync({type:"保存",data:X},(Oe=X==null?void 0:X[0])==null?void 0:Oe.key)),p.ElMessage.success("保存成功")}}else{if((Fe=(Me=l==null?void 0:l.data)==null?void 0:Me.result)==null||Fe.forEach(G=>{var O;let X=(O=p.cloneDeep(G))==null?void 0:O.key;X.pageKey=p.cloneDeep(_n).value+Zt+Se,Bn.setChildMenu(X.pageKey),c.push({id:G==null?void 0:G.id,key:X})}),Se===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Bn.setImportLoading(!1),Bn.setChildMenu("");return}(Ce=c==null?void 0:c[0])!=null&&Ce.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await va.setLogRecordAsync({type:"保存",data:c},(Le=c==null?void 0:c[0])==null?void 0:Le.key)),await Te.loadingConstruct(p.cloneDeep(_n).value+Zt+Se,p.cloneDeep(_n).value+Zt+Se+Zt+`updateLoading${((rt=qt.value)==null?void 0:rt.account)||((Q=qt.value)==null?void 0:Q.账号)}`),Bn.setActiveMenuPath(p.cloneDeep(_n).value+Zt+Se+Zt+`updateLoading${((Ye=qt.value)==null?void 0:Ye.account)||((ct=qt.value)==null?void 0:ct.账号)}`),p.ElMessage.success("保存成功")}}Bn.setImportLoading(!1)},xc={key:0,class:"method-content"},wc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=Te.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=a,d=e.ref(!1),b=e.ref(),v=Te.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(v),C=Te.useModelComp(p.pinia),_=e.ref(!1),I=Te.useMenuState(p.pinia),P=p.useLoginState(p.pinia),{itemData:z,isEdit:H,routeToChildPath:Ee,tableViewContents:Z,lockingPage:U,payloadTypes:pe}=p.storeToRefs(C),{activeMenuPath:D,platform:R,childMenu:k}=p.storeToRefs(I),{loginUserInfo:V}=p.storeToRefs(P),B=e.ref(!1),ue=(S,Ie)=>{const se=Ie;return S==null?void 0:S.map(Me=>{var Fe;return Me=(Fe=Me==null?void 0:Me.map((Ce,Le)=>{var rt,Q;return Ce!=null&&Ce.id?{key:"id",value:Ce==null?void 0:Ce.id}:se!=null&&se.find(Ye=>Ye==null?void 0:Ye.id)||Me!=null&&Me.find(Ye=>Ye==null?void 0:Ye.id)?{key:(rt=se[Le-1])==null?void 0:rt.label,value:Ce}:{key:(Q=se[Le])==null?void 0:Q.label,value:Ce}}))==null?void 0:Fe.filter(Ce=>Ce.key!=="操作"),Me})},Re=async()=>{var S,Ie;(S=i.value)!=null&&S.find(se=>(se==null?void 0:se.buttonName)==="保存")&&await me((Ie=i.value)==null?void 0:Ie.find(se=>(se==null?void 0:se.buttonName)==="保存")),await Bl()};e.watch(()=>z.value,async()=>{H.value==="view"&&!B.value&&await Ne(p.cloneDeep(c.itemData)),B.value=!1},{deep:!0});const tt=()=>{d.value=!1,b.value=void 0},Ve=S=>S.map(Ie=>{const se={};for(const Me in Ie){const Fe=Ie[Me];if(Me.includes(h.value)){const Ce=Me.split(h.value);let Le=se;Ce.forEach((rt,Q)=>{Q===Ce.length-1?Le[rt]=Fe:(Le[rt]||(Le[rt]={}),Le=Le[rt])})}else se[Me]=Fe}return se}),Ue=async(S,Ie,se=[])=>{var Fe,Ce,Le,rt,Q,Ye,ct,Qe,ne,re,_e,ye,Xe,Ze,x;let Me=(Fe=p.cloneDeep(Ie))==null?void 0:Fe.filter(w=>(w==null?void 0:w.comp)!=="methodButton");if(S!=null&&S.includes("[")){let w=(Ye=(Q=(rt=(Le=(Ce=p.cloneDeep(S))==null?void 0:Ce.split("["))==null?void 0:Le[1])==null?void 0:rt.split("]"))==null?void 0:Q[0])==null?void 0:Ye.split(":"),m="";if(w!=null&&w[0]){Me=Me==null?void 0:Me.map(E=>{var M;return E.compData=(M=E.compData)==null?void 0:M.map(ie=>{var q;return(ie==null?void 0:ie.key)==="formContent"&&(ie.contents=(q=ie.contents)==null?void 0:q.map(K=>{var oe,ee,de,he,J,ve,W,Oe;if((ee=(oe=K==null?void 0:K.optionUrl)==null?void 0:oe.menuSelect)!=null&&ee.some(Se=>Se==null?void 0:Se.includes("["))){let Se="";K.optionUrl.oldMenuSelect=(he=(de=p.cloneDeep(K))==null?void 0:de.optionUrl)==null?void 0:he.menuSelect,K.optionUrl.menuSelect=(ve=(J=K==null?void 0:K.optionUrl)==null?void 0:J.menuSelect)==null?void 0:ve.map(ge=>{var F,G,X,O,Ae,Ke;if(ge!=null&&ge.includes("[")){let be=(G=(F=ge==null?void 0:ge.replaceAll("[","").replaceAll("]",""))==null?void 0:F.split(":"))==null?void 0:G[1];Se=Te.getFindValue((X=ge==null?void 0:ge.replaceAll("[","").replaceAll("]",""))==null?void 0:X.split(":"),se==null?void 0:se[D.value],se),ge=((Ae=(O=p.cloneDeep(Me))==null?void 0:O.find(Be=>(Be==null?void 0:Be.label)===be))==null?void 0:Ae.value)||Te.getFindValue((Ke=ge==null?void 0:ge.replaceAll("[","").replaceAll("]",""))==null?void 0:Ke.split(":"),se==null?void 0:se[D.value],se)}return ge}),Se!==""&&(K.value===""||!(K!=null&&K.value))&&(K.value=Te.getNewValue(K.optionUrl.menuSelect,K.optionUrl.oldMenuSelect,(W=K==null?void 0:K.optionUrl)==null?void 0:W.groupSelect,se),Array.isArray(K.value)&&((Oe=K.value)!=null&&Oe.every(ge=>ge==null?void 0:ge.url))&&(K.type="UPLOAD"))}return K})),ie}),E});let L=(ct=Me==null?void 0:Me.find(E=>(E==null?void 0:E.name)===(w==null?void 0:w[0])))==null?void 0:ct.compData;if(!L){let E=(Qe=S==null?void 0:S.split("["))==null?void 0:Qe[0],M=await Te.getItemData(E,sessionStorage.getItem("systemKey"),"",!1,"","",se);L=(ne=M==null?void 0:M.find(ie=>(ie==null?void 0:ie.name)===(w==null?void 0:w[0])))==null?void 0:ne.compData}L==null||L.forEach(E=>{var M,ie,q,K,oe,ee;if((E==null?void 0:E.key)==="formContent")(M=E==null?void 0:E.contents)==null||M.forEach(de=>{var he;(de==null?void 0:de.key)===(w==null?void 0:w[1])&&(Array.isArray(de==null?void 0:de.value)?m=de==null?void 0:de.value:m=(he=de==null?void 0:de.value)==null?void 0:he.toString())});else if((E==null?void 0:E.key)==="tableContents"){let de=[],he=(ie=L==null?void 0:L.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:ie.contents,J=(w==null?void 0:w[1])??"";if(he!=null&&he.every(ve=>Array.isArray(ve))){let ve=Te.getColumnChild((oe=he==null?void 0:he[0])==null?void 0:oe.filter(W=>(W==null?void 0:W.label)!=="操作"));(ee=E.contents)==null||ee.forEach(W=>{let Oe={};W=W==null?void 0:W.filter(Se=>!(Se!=null&&Se.id)),ve==null||ve.forEach((Se,ge)=>{let F=W[ge];typeof W[ge]=="number"&&(F=W[ge].toString()),(J===""||J===Se.prop)&&(Oe[Se.prop]=F)}),de.push(Oe)}),de=Ve(de)}else{let ve=(q=he==null?void 0:he.map(W=>W==null?void 0:W.label))==null?void 0:q.filter(W=>W!=="操作");(K=E.contents)==null||K.forEach(W=>{let Oe={};W=W==null?void 0:W.filter(Se=>!(Se!=null&&Se.id)),ve==null||ve.forEach((Se,ge)=>{let F=W[ge];typeof W[ge]=="number"&&(F=W[ge].toString()),(J===""||J===Se)&&(Oe[Se]=F)}),de.push(Oe)})}m=de}})}return m}else if(S!=null&&S.includes("/")){let w={};return(re=p.cloneDeep(Me))==null||re.forEach((m,L)=>{var E,M,ie,q,K,oe,ee,de,he,J,ve,W,Oe,Se,ge,F,G,X,O;if((m==null?void 0:m.comp)==="Table"){let Ae=Array.isArray((ie=(M=(E=m==null?void 0:m.compData)==null?void 0:E.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:M.contents)==null?void 0:ie[0])?(ee=(oe=(K=(q=m==null?void 0:m.compData)==null?void 0:q.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:K.contents)==null?void 0:oe[0])==null?void 0:ee.some(xe=>xe==null?void 0:xe.children):[],Ke=(J=(he=(de=m==null?void 0:m.compData)==null?void 0:de.find(xe=>(xe==null?void 0:xe.key)==="tableContents"))==null?void 0:he.contents)==null?void 0:J.map(xe=>(xe!=null&&xe.find(ot=>ot==null?void 0:ot.id)&&(xe=xe.slice(1)),xe)),be=(ge=(Se=(Oe=(W=(ve=m==null?void 0:m.compData)==null?void 0:ve.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:W.contents)==null?void 0:Oe[0])==null?void 0:Se[0])==null?void 0:ge.label,Be=(G=(F=m==null?void 0:m.compData)==null?void 0:F.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:G.contents;if(Ae)(Ae==null?void 0:Ae.length)===0?w[m.name]=w!=null&&w[m.name]?w[m.name]:ue(Ke,Be):w[be]=ue(Ke,Be);else{const xe=[];Be=Be.slice(1,Be.length-1),Be==null||Be.forEach((ot,We)=>{Ke==null||Ke.forEach(Y=>{xe.push({key:ot.label+Y[0],value:Y[We+1]})})}),w["form"+L]=xe}}else{const Ae=(O=(X=m.compData)==null?void 0:X.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:O.contents;w!=null&&w.form||(w.form=[]);const Ke=[];Ae==null||Ae.forEach(be=>{be.key!==""&&(be={key:(be==null?void 0:be.key)??(be==null?void 0:be.label),value:be==null?void 0:be.value},Ke.push(be))}),w.form=[...Ke,...p.cloneDeep(w==null?void 0:w.form)]}}),w}else{if(S==="createInsofDataApi"){let w=(_e=p.cloneDeep(Ie))==null?void 0:_e[0];return w={comp:(ye=p.cloneDeep(w))==null?void 0:ye.comp,compData:(Xe=p.cloneDeep(w))==null?void 0:Xe.compData,name:(Ze=p.cloneDeep(w))==null?void 0:Ze.name,isShow:(x=p.cloneDeep(w))==null?void 0:x.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:w}}}return S}},De=async(S,Ie,se)=>{var Ce,Le,rt;let Me=await Te.getItemData(Ie,sessionStorage.getItem("systemKey"),""),Fe=Me==null?void 0:Me.find(Q=>(Q==null?void 0:Q.name)===(se==null?void 0:se[0]));if(Fe){if((Fe==null?void 0:Fe.comp)==="Table"){let Q={};for(let ye in p.cloneDeep(S))p.cloneDeep(S)[ye]!=="loginUser"?Q[ye]=p.cloneDeep(S)[ye]:Q[ye]=((Ce=V.value)==null?void 0:Ce.account)||((Le=V.value)==null?void 0:Le.账号);let Ye=[],ct=Q;Array.isArray(S)||(ct=[Q]),ct==null||ct.forEach(ye=>{Ye.push({[ye[se[1]]]:ye})});let Qe=[],ne=Ye==null?void 0:Ye.map(ye=>{var Xe;return(Xe=Object.keys(ye))==null?void 0:Xe[0]});Me==null||Me.forEach(ye=>{var Xe;(ye==null?void 0:ye.name)===(se==null?void 0:se[0])&&((Xe=ye==null?void 0:ye.compData)==null||Xe.forEach(Ze=>{var x;(Ze==null?void 0:Ze.key)==="tableContents"&&((x=Ze==null?void 0:Ze.contents)==null||x.forEach(w=>{w!=null&&w.some(m=>ne.includes(m))&&Qe.push({[w.find(m=>m.id).id]:w.find(m=>ne.includes(m))})}))}))});let re=Qe==null?void 0:Qe.map(ye=>{var Xe;return(Xe=Object.keys(ye))==null?void 0:Xe[0]}),_e=[];if(re==null||re.forEach(ye=>{var x;let Xe=(x=Qe==null?void 0:Qe.find(w=>{var m;return((m=Object.keys(w))==null?void 0:m[0].toString())===ye.toString()}))==null?void 0:x[ye],Ze=Ye==null?void 0:Ye.find(w=>{var m;return((m=Object.keys(w))==null?void 0:m[0])===Xe});_e.push({id:parseInt(ye),value:{tableData:Ze[Xe]}})}),(_e==null?void 0:_e.length)>0)return _e}else if((Fe==null?void 0:Fe.comp)==="Form"){let Q=p.cloneDeep(Fe);Q.compData=(rt=Q.compData)==null?void 0:rt.map(Qe=>{var ne;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(ne=Qe.contents)==null?void 0:ne.map(re=>((re==null?void 0:re.key)===(se==null?void 0:se[1])&&(re.value=(S==null?void 0:S[re==null?void 0:re.prop])||S),re))),Qe});let Ye={};for(let Qe in Q)Qe!=="id"&&(Ye[Qe]=Q[Qe]);let ct=[];if(ct.push({id:Fe==null?void 0:Fe.id,keyType:se==null?void 0:se[1],value:{pageData:Ye}}),(ct==null?void 0:ct.length)>0)return ct}}},A=async(S,Ie,se)=>{var Ce,Le,rt,Q,Ye,ct,Qe,ne,re,_e;let Me=await Te.getItemData(Ie,sessionStorage.getItem("systemKey"),""),Fe=Me==null?void 0:Me.find(ye=>(ye==null?void 0:ye.name)===(se==null?void 0:se[0]));if(Fe){if((Fe==null?void 0:Fe.comp)==="Table"){let ye={};for(let Xe in p.cloneDeep(S))p.cloneDeep(S)[Xe]!=="loginUser"?ye[Xe]=p.cloneDeep(S)[Xe]:ye[Xe]=((Ce=V.value)==null?void 0:Ce.account)||((Le=V.value)==null?void 0:Le.账号);await p.createInsofDataApi({key:{type:"data",pageKey:Ie,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ye}})}else if((Fe==null?void 0:Fe.comp)==="Form"){let ye=p.cloneDeep(Fe),Xe=Object.keys(S),Ze="";(Q=(rt=p.cloneDeep(ye))==null?void 0:rt.compData)==null||Q.forEach(M=>{var ie,q;(M==null?void 0:M.key)==="formContent"&&((q=(ie=p.cloneDeep(M))==null?void 0:ie.contents)==null||q.forEach(K=>{var oe;Xe.includes(K==null?void 0:K.key)&&(K==null?void 0:K.value)===((oe=V.value)==null?void 0:oe.姓名)&&(Ze=K==null?void 0:K.key)}))});let x=[];(Ye=Object.values(S[Ze]))==null||Ye.forEach(M=>{M!=null&&M.includes("(")&&x.push(M)}),x=[...new Set(x)];const w=x==null?void 0:x.map(async M=>{var ee,de,he,J,ve,W,Oe,Se,ge,F,G,X;let ie="";(W=(ve=(J=(he=(de=(ee=p.cloneDeep(M))==null?void 0:ee.split("("))==null?void 0:de[1])==null?void 0:he.split(")"))==null?void 0:J[0])==null?void 0:ve.split(":"))==null||W.forEach(O=>{ie=ie===""?ie+O.replaceAll("'",""):ie+"/"+O.replaceAll("'","")});let q=[];(X=(G=(F=(ge=(Se=(Oe=p.cloneDeep(M))==null?void 0:Oe.split("<"))==null?void 0:Se[1])==null?void 0:ge.split(">"))==null?void 0:F[0])==null?void 0:G.split(":"))==null||X.forEach(O=>{q.push(O.replaceAll("'",""))});const K=await Te.getItemData(ie,sessionStorage.getItem("systemKey"),"");let oe="";return K==null||K.forEach(O=>{var Ae;O.name===(q==null?void 0:q[0])&&((Ae=O==null?void 0:O.compData)==null||Ae.forEach(Ke=>{var be;(Ke==null?void 0:Ke.key)==="formContent"&&((be=Ke.contents)==null||be.forEach(Be=>{(Be==null?void 0:Be.key)===(q==null?void 0:q[1])&&(oe=Be==null?void 0:Be.value)}))}))}),{[M]:oe}}),m=await Promise.all(w);ye.compData=(Qe=(ct=p.cloneDeep(ye))==null?void 0:ct.compData)==null?void 0:Qe.map(M=>{var ie,q;return(M==null?void 0:M.key)==="formContent"&&(M.contents=(q=(ie=p.cloneDeep(M))==null?void 0:ie.contents)==null?void 0:q.map(K=>{var oe,ee,de,he;return(oe=S[Ze])!=null&&oe[K==null?void 0:K.key]&&(S[Ze][K==null?void 0:K.key].includes("(")?K.value=(ee=m==null?void 0:m.find(J=>{var ve;return((ve=Object.keys(J))==null?void 0:ve[0])===S[Ze][K==null?void 0:K.key]}))==null?void 0:ee[S[Ze][K==null?void 0:K.key]]:K.value=(he=(de=p.cloneDeep(S))==null?void 0:de[Ze])==null?void 0:he[K==null?void 0:K.key]),K})),M});const L=await p.getInsofDataApi({key:{type:"structure",pageKey:Ie,systemKey:sessionStorage.getItem("systemKey")}});let E="";((ne=L==null?void 0:L.data)==null?void 0:ne.type)==="success"&&((_e=(re=L==null?void 0:L.data)==null?void 0:re.result)==null||_e.forEach(M=>{var ie,q;((q=(ie=M==null?void 0:M.value)==null?void 0:ie.pageData)==null?void 0:q.name)===(se==null?void 0:se[0])&&(E=M.id)}),await p.updateInsofDataApi({id:E,value:{pageData:ye}}))}}},le=(S,Ie="",se={})=>{for(const[Me,Fe]of Object.entries(S)){const Ce=Ie?`${Ie}.${Me}`:Me;Fe!==null&&typeof Fe=="object"&&!Array.isArray(Fe)&&Object.prototype.toString.call(Fe)!=="[object Date]"?le(Fe,Ce,se):se[Ce]=Fe}return se},ae=async(S,Ie,se,Me)=>{var Le,rt,Q,Ye,ct,Qe,ne,re,_e,ye,Xe,Ze,x,w,m,L,E,M,ie,q,K,oe,ee,de,he;let Fe=await Te.getItemData(Ie,sessionStorage.getItem("systemKey"),""),Ce=Fe==null?void 0:Fe.find(J=>(J==null?void 0:J.name)===(se==null?void 0:se[0]));if(Ce){if(!(se!=null&&se[1])&&(Ce==null?void 0:Ce.comp)==="Table"){let J={},ve=[],W=(rt=(Le=Ce==null?void 0:Ce.compData)==null?void 0:Le.find(ge=>(ge==null?void 0:ge.key)==="header"))==null?void 0:rt.contents;W!=null&&W.every(ge=>Array.isArray(ge))?ve=(Ye=Te.getColumnChild((Q=W==null?void 0:W[0])==null?void 0:Q.filter(ge=>(ge==null?void 0:ge.label)!=="操作")))==null?void 0:Ye.map(ge=>ge==null?void 0:ge.prop):ve=W==null?void 0:W.map(ge=>ge==null?void 0:ge.label);for(let ge in p.cloneDeep(S))if(p.cloneDeep(S)[ge]!=="loginUser"){let F=le(p.cloneDeep(S)[ge]),G={};for(let X in F)if(ve!=null&&ve.find(O=>O===X))G[X]=F[X];else if(ve!=null&&ve.find(O=>(O==null?void 0:O.toUpperCase())===(X==null?void 0:X.toUpperCase()))){let O=ve==null?void 0:ve.find(Ae=>(Ae==null?void 0:Ae.toUpperCase())===(X==null?void 0:X.toUpperCase()));G[O]=F[X]}J[ge]=G}else J[ge]=((ct=V.value)==null?void 0:ct.account)||((Qe=V.value)==null?void 0:Qe.账号);let Oe=await p.getInsofDataApi({keyLikes:{tableId:Ce==null?void 0:Ce.id}});if(((re=(ne=Oe==null?void 0:Oe.data)==null?void 0:ne.result)==null?void 0:re.length)>0){let ge=(ye=(_e=Oe==null?void 0:Oe.data)==null?void 0:_e.result)==null?void 0:ye.map(F=>F==null?void 0:F.id);(ge==null?void 0:ge.length)>0&&await p.batchDeleteInsofDataApi({ids:ge})}let Se=[];if((Xe=Ce==null?void 0:Ce.compData)!=null&&Xe.find(ge=>(ge==null?void 0:ge.key)==="pageColumn")&&((w=(x=(Ze=Ce==null?void 0:Ce.compData)==null?void 0:Ze.find(ge=>(ge==null?void 0:ge.key)==="pageColumn"))==null?void 0:x.contents)!=null&&w.includes("["))){const ge=await p.getInsofDataApi({id:Ce==null?void 0:Ce.tableId});let F=((M=(E=(L=(m=ge==null?void 0:ge.data)==null?void 0:m.result)==null?void 0:L[0])==null?void 0:E.key)==null?void 0:M.pageKey)??"";(ie=Object.values(J))==null||ie.forEach(G=>{Se.push({key:{type:"data",pageKey:F,tableId:Ce==null?void 0:Ce.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:G}})})}else(q=Object.values(J))==null||q.forEach(ge=>{Se.push({key:{type:"data",pageKey:Ie,tableId:Ce==null?void 0:Ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ge}})});(Se==null?void 0:Se.length)>0&&await p.batchAddInsofDataApi({dataList:Se})}else if(!(se!=null&&se[1])&&(Ce==null?void 0:Ce.comp)==="Form"){let J=p.cloneDeep(Ce);J.compData=(oe=(K=p.cloneDeep(J))==null?void 0:K.compData)==null?void 0:oe.map(Oe=>{var Se,ge;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(ge=(Se=p.cloneDeep(Oe))==null?void 0:Se.contents)==null?void 0:ge.map(F=>{var G,X;return(G=p.cloneDeep(S))!=null&&G[F==null?void 0:F.key]&&(F.value=(X=p.cloneDeep(S))==null?void 0:X[F==null?void 0:F.key]),F})),Oe});const ve=await p.getInsofDataApi({key:{type:"structure",pageKey:Ie,systemKey:sessionStorage.getItem("systemKey")}});let W="";((ee=ve==null?void 0:ve.data)==null?void 0:ee.type)==="success"&&((he=(de=ve==null?void 0:ve.data)==null?void 0:de.result)==null||he.forEach(Oe=>{var Se,ge;((ge=(Se=Oe==null?void 0:Oe.value)==null?void 0:Se.pageData)==null?void 0:ge.name)===(se==null?void 0:se[0])&&(W=Oe.id)}),await p.updateInsofDataApi({id:W,value:{pageData:J}}))}}},me=async S=>{var Ie,se,Me,Fe,Ce,Le,rt,Q,Ye,ct,Qe,ne,re,_e,ye,Xe;I.setImportLoading(!0);try{if(S.api){let Ze=new WeakMap;(se=(Ie=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:pe.value})).data.result)==null?void 0:Ie.filter(ee=>{var de,he;return((de=ee==null?void 0:ee.key)==null?void 0:de.pageKey)!=="menu"&&((he=ee==null?void 0:ee.key)==null?void 0:he.pageKey)!=="secret"}))==null||se.forEach(ee=>{Ze[ee.key.pageKey]?Ze[ee.key.pageKey]=[...Ze[ee.key.pageKey],ee]:Ze[ee.key.pageKey]=[ee]});let w=await Te.getItemData((k==null?void 0:k.value)===""?D.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ze),m="";if(w=w==null?void 0:w.map(ee=>{var de,he,J,ve,W,Oe,Se,ge,F,G,X,O;if((ee==null?void 0:ee.comp)==="Form")ee.compData=(de=ee.compData)==null?void 0:de.map(Ae=>{var Ke;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(Ke=Ae.contents)==null?void 0:Ke.map(be=>{var Be;if((be==null?void 0:be.value)===""&&(be==null?void 0:be.type)==="Select"){let xe=Te.judgeContents((Be=p.cloneDeep(be))==null?void 0:Be.optionUrl,Ze,w);be.value=be.value||(xe??"")}return be})),Ae});else if((ee==null?void 0:ee.comp)==="Table"&&(he=ee.compData)!=null&&he.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn")){let Ae=(ve=(J=ee.compData)==null?void 0:J.find(xe=>(xe==null?void 0:xe.key)==="pageColumn"))==null?void 0:ve.contents,Ke=((Oe=(W=ee.compData)==null?void 0:W.find(xe=>(xe==null?void 0:xe.key)==="pageGroup"))==null?void 0:Oe.contents)??"",be=(F=(ge=(Se=Ae==null?void 0:Ae.split("["))==null?void 0:Se[1])==null?void 0:ge.split("]"))==null?void 0:F[0];m=((G=Ae==null?void 0:Ae.split("["))==null?void 0:G[0])+((O=(X=Z.value)==null?void 0:X.find(xe=>(xe==null?void 0:xe.key)===be))==null?void 0:O.value)}return ee}),!(m===""||m==="")){const ee=await Te.getItemData(m,sessionStorage.getItem("systemKey"),"",!1,"","",Ze);w=w==null?void 0:w.map(de=>{var he,J,ve,W,Oe,Se,ge,F,G,X,O,Ae,Ke;if((de==null?void 0:de.comp)==="Table"&&(he=de.compData)!=null&&he.find(be=>(be==null?void 0:be.key)==="pageColumn")){let be=(ve=(J=de.compData)==null?void 0:J.find(Y=>(Y==null?void 0:Y.key)==="pageColumn"))==null?void 0:ve.contents,Be=((Oe=(W=de.compData)==null?void 0:W.find(Y=>(Y==null?void 0:Y.key)==="pageGroup"))==null?void 0:Oe.contents)??"",xe=(F=(ge=(Se=be==null?void 0:be.split("["))==null?void 0:Se[1])==null?void 0:ge.split("]"))==null?void 0:F[0],ot=((G=be==null?void 0:be.split("["))==null?void 0:G[0])+((O=(X=Z.value)==null?void 0:X.find(Y=>(Y==null?void 0:Y.key)===xe))==null?void 0:O.value),We=(Ae=ee==null?void 0:ee.find(Y=>(Y==null?void 0:Y.name)===(Be===""?c==null?void 0:c.compName:Be)))==null?void 0:Ae.compData;de.compData=(Ke=de.compData)==null?void 0:Ke.map(Y=>{var ce;return(Y==null?void 0:Y.key)==="tableContents"&&(Y.contents=(ce=We==null?void 0:We.find(fe=>(fe==null?void 0:fe.key)==="tableContents"))==null?void 0:ce.contents),Y})}return de})}let L={};if(((Fe=(Me=S==null?void 0:S.extraValues)==null?void 0:Me.input)==null?void 0:Fe.length)>0){const ee=(Le=(Ce=S==null?void 0:S.extraValues)==null?void 0:Ce.input)==null?void 0:Le.map(async de=>{var he;je!=null&&je.find(J=>J===de)?L=await Ue(de,w):L[Object.keys(de)[0]]=await Ue((he=Object.values(de))==null?void 0:he[0],w,Ze)});await Promise.all(ee)}else L=await Ue("/",w);let E=!1;(Q=(rt=S==null?void 0:S.extraValues)==null?void 0:rt.output)==null||Q.forEach(ee=>{var de,he;(he=(de=Object.values(ee))==null?void 0:de[0])!=null&&he.includes(".doc")&&(E=!0)});let M;if(E){const ee=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});M=await p.axios.post(S.api,L,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ee.close()})}else M=await p.axios.post(S.api,L,{headers:{"Content-Type":"application/json"}});let ie=(ne=(Qe=(ct=(Ye=p.cloneDeep(S))==null?void 0:Ye.extraValues)==null?void 0:ct.output)==null?void 0:Qe.map(ee=>{var de,he,J,ve,W,Oe,Se,ge,F,G,X,O,Ae,Ke,be,Be;if(!((he=(de=Object.values(ee))==null?void 0:de[0])!=null&&he.includes(".doc"))){let xe=(G=(F=(ge=(ve=p.cloneDeep((J=Object.values(ee))==null?void 0:J[0]))==null?void 0:ve.split("["))==null?void 0:ge[((Se=(Oe=p.cloneDeep((W=Object.values(ee))==null?void 0:W[0]))==null?void 0:Oe.split("["))==null?void 0:Se.length)-1])==null?void 0:F.split("]"))==null?void 0:G[0],ot=xe==null?void 0:xe.split(":"),We=(Ae=p.cloneDeep((X=Object.values(ee))==null?void 0:X[0]))==null?void 0:Ae.substring(0,p.cloneDeep((O=Object.values(ee))==null?void 0:O[0]).lastIndexOf("["));if(We=(be=p.cloneDeep(We))==null?void 0:be.slice(0,((Ke=p.cloneDeep(We))==null?void 0:Ke.length)-1),We!=null&&We.includes("[")){let Y="";if((Be=ma(We,"/"))==null||Be.forEach(ce=>{var fe,ze,it,j,Ge,qe,pt;if(!(ce!=null&&ce.includes("[")))Y=Y===""?Y+ce.replaceAll("/",""):Y+"/"+ce.replaceAll("/","");else{let gt=p.cloneDeep(ce).slice(1,((fe=p.cloneDeep(ce))==null?void 0:fe.length)-1),ft=(qe=(Ge=(j=(it=(ze=p.cloneDeep(gt))==null?void 0:ze.split("["))==null?void 0:it[1])==null?void 0:j.split("]"))==null?void 0:Ge[0])==null?void 0:qe.split(":"),st="",ke=(pt=w==null?void 0:w.find(Je=>(Je==null?void 0:Je.name)===(ft==null?void 0:ft[0])))==null?void 0:pt.compData;ke==null||ke.forEach(Je=>{var nt;(Je==null?void 0:Je.key)==="formContent"&&((nt=Je==null?void 0:Je.contents)==null||nt.forEach(ut=>{(ut==null?void 0:ut.key)===(ft==null?void 0:ft[1])&&(st=ut==null?void 0:ut.value)}))}),Y=Y===""?Y+st.replaceAll("/",""):Y+"/"+st.replaceAll("/","")}}),We=Y,We[(We==null?void 0:We.length)-1]!=="/")return We}}}))==null?void 0:ne.filter(ee=>ee);ie=[...new Set(p.cloneDeep(ie))];let q=ie==null?void 0:ie.map(async ee=>{let de=await Te.getItemData(ee,sessionStorage.getItem("systemKey"),"",!1,"","",Ze);if((de==null?void 0:de.length)===0)return await Te.getParentContents(ee)});await Promise.all(q);let K=[],oe=(ye=(_e=(re=p.cloneDeep(S))==null?void 0:re.extraValues)==null?void 0:_e.output)==null?void 0:ye.map(async ee=>{var ge,F,G,X,O,Ae,Ke,be,Be,xe,ot,We,Y,ce,fe,ze,it,j,Ge,qe,pt,gt,ft,st,ke,Je,nt,ut,Dt,Ct,yt,Et,Vt,Mt,Nt,Tt,Ht,on,Wt,xn,hn,wn,Sn,vn,Tn,gn,mt,Yt,ht,zn,wt,cn,mn,Xt,yn,Jt,ln,Qt,Ea,la,ra,Jn,_a,Sa,ia,Ta,Ia,sa,ca,Ba;if((F=(ge=Object.values(ee))==null?void 0:ge[0])!=null&&F.includes(".doc")){var de=new Blob([M.data],{type:"application/octet-stream;charset=UTF-8"}),he=M.headers["content-disposition"],J=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ve=J.exec(he),W=ve==null?void 0:ve[1],Oe=document.createElement("a"),Se=window.URL.createObjectURL(de);b.value=[{name:W,blobUrl:Se}],d.value=!0}else{let Fn=(xe=(Be=(be=(X=p.cloneDeep((G=Object.values(ee))==null?void 0:G[0]))==null?void 0:X.split("["))==null?void 0:be[((Ke=(Ae=p.cloneDeep((O=Object.values(ee))==null?void 0:O[0]))==null?void 0:Ae.split("["))==null?void 0:Ke.length)-1])==null?void 0:Be.split("]"))==null?void 0:xe[0],Rt=Fn==null?void 0:Fn.split(":"),Ut=(Y=p.cloneDeep((ot=Object.values(ee))==null?void 0:ot[0]))==null?void 0:Y.substring(0,p.cloneDeep((We=Object.values(ee))==null?void 0:We[0]).lastIndexOf("["));if(Ut!=null&&Ut.includes("[")?Ut=(fe=p.cloneDeep(Ut))==null?void 0:fe.slice(0,((ce=p.cloneDeep(Ut))==null?void 0:ce.length)-1):Ut===""&&(Ut=D.value),Ut=Ut.replaceAll("<","[").replaceAll(">","]"),Ut!=null&&Ut.includes("[")){let kt="";(ze=ma(Ut,"/"))==null||ze.forEach((Ot,$t)=>{var Kt,Lt,rn,sn,Ln,Dn,$n,Aa,Zn,ua,Na;if(!(Ot!=null&&Ot.includes("[")))kt=kt===""?kt+Ot.replaceAll("/",""):kt+"/"+Ot.replaceAll("/","");else{let Pn="",Cn="";(Kt=p.cloneDeep(Ot))!=null&&Kt.includes("]")?(Pn=p.cloneDeep(Ot).slice(1,((Lt=p.cloneDeep(Ot))==null?void 0:Lt.length)-1),Cn=($n=(Dn=(Ln=(sn=(rn=p.cloneDeep(Pn))==null?void 0:rn.split("["))==null?void 0:sn[1])==null?void 0:Ln.split("]"))==null?void 0:Dn[0])==null?void 0:$n.split(":")):(Pn=p.cloneDeep(Ot).slice(1,(Aa=p.cloneDeep(Ot))==null?void 0:Aa.length),Cn=(Zn=p.cloneDeep(Pn))==null?void 0:Zn.split("/"));let jn="",Un=(ua=w==null?void 0:w.find(bn=>(bn==null?void 0:bn.name)===(Cn==null?void 0:Cn[0])))==null?void 0:ua.compData;Un==null||Un.forEach(bn=>{var Va;(bn==null?void 0:bn.key)==="formContent"&&((Va=bn==null?void 0:bn.contents)==null||Va.forEach(en=>{(en==null?void 0:en.key)===(Cn==null?void 0:Cn[1])&&(jn=en==null?void 0:en.value)}))}),((Na=ma(Ut,"/"))==null?void 0:Na.length)-1!==$t?kt=kt===""?kt+jn.replaceAll("/",""):kt+"/"+jn.replaceAll("/",""):kt=kt+l.value+jn.replaceAll("/","")}}),(it=D.value)!=null&&it.includes(kt)?Ut=D.value:Ut=kt}let un=p.cloneDeep((j=Object.keys(ee))==null?void 0:j[0]);if(((Ge=M==null?void 0:M.data)==null?void 0:Ge.statusCode)===200||((qe=M==null?void 0:M.data)==null?void 0:qe.code)===200){if(((gt=(pt=M==null?void 0:M.data)==null?void 0:pt.data)!=null&>[un]||(st=(ft=M==null?void 0:M.data)==null?void 0:ft.result)!=null&&st[un])&&(Rt==null?void 0:Rt.length)===1)return await ae(((Je=(ke=M==null?void 0:M.data)==null?void 0:ke.data)==null?void 0:Je[un])||((ut=(nt=M==null?void 0:M.data)==null?void 0:nt.result)==null?void 0:ut[un]),p.cloneDeep(Ut),Rt,m);if((Ct=(Dt=M==null?void 0:M.data)==null?void 0:Dt.data)!=null&&Ct[un]||(Et=(yt=M==null?void 0:M.data)==null?void 0:yt.result)!=null&&Et[un]){let kt=await De(((Mt=(Vt=M==null?void 0:M.data)==null?void 0:Vt.data)==null?void 0:Mt[un])||((Tt=(Nt=M==null?void 0:M.data)==null?void 0:Nt.result)==null?void 0:Tt[un]),p.cloneDeep(Ut),Rt);return kt&&(K=[...K,...kt]),kt}else{if(!((Ht=M==null?void 0:M.data)!=null&&Ht.data)){let kt=await Te.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ze);kt=kt==null?void 0:kt.map($t=>{var Kt;return($t==null?void 0:$t.name)===(Rt==null?void 0:Rt[0])&&($t.compData=(Kt=$t.compData)==null?void 0:Kt.map(Lt=>{var rn;return(Lt==null?void 0:Lt.key)==="formContent"&&(Lt.contents=(rn=Lt.contents)==null?void 0:rn.map(sn=>{var Ln,Dn;return(sn==null?void 0:sn.key)===(Rt==null?void 0:Rt[1])&&(sn.value=(Dn=(Ln=M==null?void 0:M.data)==null?void 0:Ln.result)==null?void 0:Dn[un==null?void 0:un.replaceAll(":","")]),sn})),Lt})),$t});let Ot=[];(on=kt==null?void 0:kt.filter($t=>($t==null?void 0:$t.comp)==="Form"))==null||on.forEach(async $t=>{let Kt={};for(let Lt in $t)Lt!=="id"&&(Kt[Lt]=$t[Lt]);Ot.push({id:$t==null?void 0:$t.id,value:{pageData:Kt}})}),(Ot==null?void 0:Ot.length)>0&&await p.batchUpdateInsofDataApi({dataList:Ot});return}if((Rt==null?void 0:Rt.length)===1){const kt=(hn=(xn=(Wt=M==null?void 0:M.data)==null?void 0:Wt.data)==null?void 0:xn.path)==null?void 0:hn.path;let Ot="";(gn=(Tn=(vn=(Sn=(wn=kt==null?void 0:kt.split("("))==null?void 0:wn[1])==null?void 0:Sn.split(")"))==null?void 0:vn[0])==null?void 0:Tn.split(":"))==null||gn.forEach(Lt=>{var rn,sn;Ot=Ot===""?Ot+((rn=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:rn.trim()):Ot+"/"+((sn=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:sn.trim())});let $t=[(wt=(zn=(ht=(Yt=(mt=kt==null?void 0:kt.split("<"))==null?void 0:mt[1])==null?void 0:Yt.split(">"))==null?void 0:ht[0])==null?void 0:zn.replaceAll("'",""))==null?void 0:wt.trim()],Kt;return(Xt=(mn=(cn=M==null?void 0:M.data)==null?void 0:cn.data)==null?void 0:mn.data)!=null&&Xt[Rt==null?void 0:Rt[0]]?Kt=await ae((ln=(Jt=(yn=M==null?void 0:M.data)==null?void 0:yn.data)==null?void 0:Jt.data)==null?void 0:ln[Rt==null?void 0:Rt[0]],Ot,Rt,m):Kt=await A((Ea=(Qt=M==null?void 0:M.data)==null?void 0:Qt.data)==null?void 0:Ea.data,Ot,$t,Ze),Kt}else{const kt=(Jn=(ra=(la=M==null?void 0:M.data)==null?void 0:la.data)==null?void 0:ra.path)==null?void 0:Jn.path;let Ot="";return(Ia=(Ta=(ia=(Sa=(_a=kt==null?void 0:kt.split("("))==null?void 0:_a[1])==null?void 0:Sa.split(")"))==null?void 0:ia[0])==null?void 0:Ta.split(":"))==null||Ia.forEach(Kt=>{var Lt,rn;Ot=Ot===""?Ot+((Lt=Kt==null?void 0:Kt.replaceAll("'",""))==null?void 0:Lt.trim()):Ot+"/"+((rn=Kt==null?void 0:Kt.replaceAll("'",""))==null?void 0:rn.trim())}),await De((Ba=(ca=(sa=M==null?void 0:M.data)==null?void 0:sa.data)==null?void 0:ca.data)==null?void 0:Ba[Rt==null?void 0:Rt[0]],Ot,Rt)}}}}});if(await Promise.all(oe),(K==null?void 0:K.length)>0){let ee=[];K==null||K.forEach(J=>{ee!=null&&ee.find(ve=>{var W,Oe,Se,ge;return((Oe=(W=ve==null?void 0:ve.value)==null?void 0:W.pageData)==null?void 0:Oe.name)===((ge=(Se=J==null?void 0:J.value)==null?void 0:Se.pageData)==null?void 0:ge.name)})||ee.push(J)});let de=[];ee==null||ee.forEach(J=>{var Oe,Se,ge,F;let ve=p.cloneDeep(J);ve.value.pageData.compData=(Oe=ve.value.pageData.compData)==null?void 0:Oe.map(G=>{var X;return(G==null?void 0:G.key)==="formContent"&&(G.contents=(X=G.contents)==null?void 0:X.map(O=>{var Ke,be,Be,xe;let Ae=(Ke=p.cloneDeep(K))==null?void 0:Ke.find(ot=>(ot==null?void 0:ot.keyType)===(O==null?void 0:O.key));if(Ae){let ot=(xe=(Be=(be=Ae.value.pageData.compData)==null?void 0:be.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:Be.contents)==null?void 0:xe.find(We=>(We==null?void 0:We.key)===(O==null?void 0:O.key));O.value=ot==null?void 0:ot.value}return O})),G}),de.push({id:ve==null?void 0:ve.id,value:ve==null?void 0:ve.value});let W=[];(F=(ge=(Se=ve==null?void 0:ve.value)==null?void 0:Se.pageData)==null?void 0:ge.compData)==null||F.forEach(G=>{var X;(G==null?void 0:G.key)==="formContent"&&((X=G==null?void 0:G.contents)==null||X.forEach(O=>{var Ae,Ke,be,Be,xe,ot;if((Ke=(Ae=O==null?void 0:O.optionUrl)==null?void 0:Ae.menuSelect)!=null&&Ke.find(We=>We==null?void 0:We.includes("[")))if(W!=null&&W.find(We=>{var Y,ce,fe;return((Y=We==null?void 0:We.key)==null?void 0:Y.join(","))===((fe=(ce=O==null?void 0:O.optionUrl)==null?void 0:ce.menuSelect)==null?void 0:fe.join(","))})){let We=(be=W==null?void 0:W.find(Y=>{var ce,fe,ze;return((ce=Y==null?void 0:Y.key)==null?void 0:ce.join(","))===((ze=(fe=O==null?void 0:O.optionUrl)==null?void 0:fe.menuSelect)==null?void 0:ze.join(","))}))==null?void 0:be.value;We.push({key:O==null?void 0:O.prop,groups:(Be=O==null?void 0:O.optionUrl)==null?void 0:Be.groupSelect,value:O==null?void 0:O.value}),W=W==null?void 0:W.map(Y=>{var ce,fe,ze;return((ce=Y==null?void 0:Y.key)==null?void 0:ce.join(","))===((ze=(fe=O==null?void 0:O.optionUrl)==null?void 0:fe.menuSelect)==null?void 0:ze.join(","))&&(Y.value=We),Y})}else W.push({key:(xe=O==null?void 0:O.optionUrl)==null?void 0:xe.menuSelect,value:[{key:O==null?void 0:O.prop,groups:(ot=O==null?void 0:O.optionUrl)==null?void 0:ot.groupSelect,value:O==null?void 0:O.value}]})}))}),(W==null?void 0:W.length)>0&&(W=W==null?void 0:W.map(G=>{var O;let X="";return(O=G==null?void 0:G.key)==null||O.forEach(Ae=>{var Ke;if(!(Ae!=null&&Ae.includes("[")))X=X===""?X+Ae:X+"/"+Ae;else{let be="",Be=(Ke=Ae==null?void 0:Ae.replaceAll("[","").replaceAll("]",""))==null?void 0:Ke.split(":");w==null||w.forEach(xe=>{var ot;(xe==null?void 0:xe.name)===(Be==null?void 0:Be[0])&&((ot=xe==null?void 0:xe.compData)==null||ot.forEach(We=>{var Y;(We==null?void 0:We.key)==="formContent"&&((Y=We==null?void 0:We.contents)==null||Y.forEach(ce=>{(ce==null?void 0:ce.prop)===(Be==null?void 0:Be[1])&&(be=ce==null?void 0:ce.value)}))}))}),X=X+l.value+be}}),G.key=X,G})),W==null||W.forEach(G=>{var Ke,be,Be;let X=(Ke=Ze[G.key])==null?void 0:Ke.find(xe=>{var ot,We,Y,ce,fe,ze,it;return((We=(ot=xe==null?void 0:xe.value)==null?void 0:ot.pageData)==null?void 0:We.name)===((fe=(ce=(Y=G==null?void 0:G.value)==null?void 0:Y[0])==null?void 0:ce.groups)==null?void 0:fe[0])&&((it=(ze=xe==null?void 0:xe.value)==null?void 0:ze.pageData)==null?void 0:it.name)!==void 0}),O=X==null?void 0:X.id,Ae=(be=X==null?void 0:X.value)==null?void 0:be.pageData;Ae.compData=(Be=Ae.compData)==null?void 0:Be.map(xe=>{var ot;return(xe==null?void 0:xe.key)==="formContent"&&(xe.contents=(ot=xe.contents)==null?void 0:ot.map(We=>{var ce;let Y=(ce=G.value)==null?void 0:ce.find(fe=>(fe==null?void 0:fe.key)===(We==null?void 0:We.prop));return Y&&(We.value=Y.value),We})),xe}),de.push({id:O,value:{pageData:Ae}})})});let he=(Xe=p.cloneDeep(K))==null?void 0:Xe[0];(de==null?void 0:de.length)>0&&await p.batchUpdateInsofDataApi({dataList:de})}C.setFreshContent(!0)}I.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),I.setImportLoading(!1)}B.value=!0},je=["createInsofDataApi"],lt=vo(async S=>{me(S)},100),Ne=async S=>{var rt,Q,Ye,ct,Qe;const Ie=p.cloneDeep(S);let se,Me=new WeakMap,Fe=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:pe.value});(Q=(rt=Fe.data.result)==null?void 0:rt.filter(ne=>{var re,_e;return((re=ne==null?void 0:ne.key)==null?void 0:re.pageKey)!=="menu"&&((_e=ne==null?void 0:ne.key)==null?void 0:_e.pageKey)!=="secret"}))==null||Q.forEach(ne=>{Me[ne.key.pageKey]?Me[ne.key.pageKey]=[...Me[ne.key.pageKey],ne]:Me[ne.key.pageKey]=[ne]}),S!=null&&S[0].path&&(se=await(Ie==null?void 0:Ie.map(async(ne,re)=>{var L,E,M,ie,q,K,oe,ee,de,he,J,ve,W,Oe,Se,ge;const ye=(L=Me[ne==null?void 0:ne.path])==null?void 0:L.filter(F=>{var G;return((G=F==null?void 0:F.key)==null?void 0:G.type)==="data"});let Xe="";const Ze=await Te.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Me);ye==null||ye.forEach(F=>{var G,X,O,Ae,Ke;((X=(G=F==null?void 0:F.value)==null?void 0:G.tableData)==null?void 0:X.算法名称)===((O=Ie==null?void 0:Ie[re])==null?void 0:O.method)&&(Xe=(Ke=(Ae=F==null?void 0:F.value)==null?void 0:Ae.tableData)==null?void 0:Ke.算法体)});const x=await Te.getItemData(ne==null?void 0:ne.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,Me);let w="",m=(q=(ie=(M=(E=x==null?void 0:x[0])==null?void 0:E.compData)==null?void 0:M.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:ie.contents)==null?void 0:q.findIndex(F=>(F==null?void 0:F.prop)==="算法体");return(oe=(K=x==null?void 0:x[0])==null?void 0:K.compData)==null||oe.forEach(F=>{var G;(F==null?void 0:F.key)==="tableContents"&&((G=F==null?void 0:F.contents)==null||G.forEach(X=>{X!=null&&X.find(O=>O===(ne==null?void 0:ne.method))&&(w=X[m])}))}),{buttonName:((ee=Ie==null?void 0:Ie[re])==null?void 0:ee.method)||((J=(he=(de=ye==null?void 0:ye[0])==null?void 0:de.value)==null?void 0:he.tableData)==null?void 0:J.算法名称),api:(Xe===""?(Oe=(W=(ve=ye==null?void 0:ye[0])==null?void 0:ve.value)==null?void 0:W.tableData)==null?void 0:Oe.算法体:Xe)||w,content:Ze==null?void 0:Ze.filter(F=>F.comp!=="methodButton"),extraContent:(Se=p.cloneDeep(ne.value))==null?void 0:Se.slice(1),methodName:(ne==null?void 0:ne.path)??"",extraValues:(ge=Ie==null?void 0:Ie[re])==null?void 0:ge.data}})));const Ce=Ie==null?void 0:Ie.map(async ne=>{var x,w,m,L,E,M;const re=(x=Fe.data.result)==null?void 0:x.filter(ie=>{var q,K,oe;return((q=ie==null?void 0:ie.key)==null?void 0:q.parentTable)===""&&((K=ie==null?void 0:ie.key)==null?void 0:K.type)==="method"&&((oe=ie==null?void 0:ie.key)==null?void 0:oe.methodName)===ie.method}),_e=re==null?void 0:re[0],ye=(w=Fe.data.result)==null?void 0:w.filter(ie=>{var q,K;return((q=ie==null?void 0:ie.key)==null?void 0:q.type)==="methodData"&&((K=ie==null?void 0:ie.key)==null?void 0:K.tableId)===(_e==null?void 0:_e.id)}),Xe=await Te.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Me),Ze=ye==null?void 0:ye[0];return{buttonName:(m=_e==null?void 0:_e.key)==null?void 0:m.methodKey,api:(E=(L=Ze==null?void 0:Ze.value)==null?void 0:L.tableData)==null?void 0:E[0],content:Xe==null?void 0:Xe.filter(ie=>ie.comp!=="methodButton"),extraContent:(M=p.cloneDeep(ne.value))==null?void 0:M.slice(1),methodName:(ne==null?void 0:ne.method)??""}}),Le=(Ye=S==null?void 0:S[0])!=null&&Ye.path&&((ct=S==null?void 0:S[0])==null?void 0:ct.path)!==""?await Promise.all(se):await Promise.all(Ce);i.value=Le==null?void 0:Le.filter(ne=>ne==null?void 0:ne.extraContent),(Qe=i.value)==null||Qe.forEach(ne=>{var re;ne.api===""&&((re=ne.content)==null||re.forEach(_e=>{var ye;_e.comp=="Table"&&C.setExtraContents(Te.methodTableToContent(_e.compData,(ye=ne.extraContent)==null?void 0:ye[0]))}))})};return e.watch(()=>c.itemData,async()=>{H.value=="view"&&!B.value&&await Ne(p.cloneDeep(c.itemData)),B.value=!1},{immediate:!0,deep:!0}),(S,Ie)=>{var se,Me,Fe;return e.unref(H)!=="edit"?(e.openBlock(),e.createElementBlock("div",xc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=i.value)==null?void 0:se.filter(Ce=>(Ce==null?void 0:Ce.buttonName)!=="保存"),Ce=>{var Le;return e.openBlock(),e.createElementBlock("div",null,[Ce.api!==""?(e.openBlock(),e.createBlock(e.unref(Gt._sfc_main),{key:0,disabled:e.unref(U)===e.unref(D)&&!((Le=Ce==null?void 0:Ce.buttonName)!=null&&Le.includes("预览")),class:"calculator-content",modelValue:Ce.buttonName,onClickTrigger:rt=>e.unref(lt)(Ce),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Ee)!==""&&((Fe=e.unref(D))==null?void 0:Fe[((Me=e.unref(D))==null?void 0:Me.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Gt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:Re,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:tt},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Dc=Pt._export_sfc(wc,[["__scopeId","data-v-8f34e24d"]]),Cc={};function Ec(a,i){return" 567 "}const _c=Pt._export_sfc(Cc,[["render",Ec]]),Sc={class:"module content"},Tc={class:"module data"},Ic={class:"module layout"},Bc={class:"form-content"},Ac=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),h=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),C=e.ref({}),_=e.ref([]),I=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:C.value}]}),P=Z=>{var U;C.value=p.cloneDeep(Z),l("change",(U=I())==null?void 0:U.compData)},z=Z=>{var U,pe;if((Z==null?void 0:Z.buttonName)==="确认"){const D=p.cloneDeep(Z==null?void 0:Z.content);switch(d.value){case"create":_.value.push({...D,index:((U=_.value)==null?void 0:U.length)+1});break}l("change",(pe=I())==null?void 0:pe.compData),c.visible=!1}else c.visible=!1},H=(Z,U)=>{var pe,D;switch(Z){case"create":(pe=h.value)==null||pe.forEach(R=>{R.value=""}),d.value="create",c.visible=!0;break;case"update":(D=h.value)==null||D.forEach(R=>{R.value=U[R==null?void 0:R.prop]}),d.value="update",c.visible=!0;break;case"delete":_.value.splice(U,1),d.value="delete";break}},Ee=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Z=>{var U,pe;Z&&(C.value=((U=Z==null?void 0:Z.find(D=>D.key==="signConfig"))==null?void 0:U.contents)??{},_.value=((pe=Z==null?void 0:Z.find(D=>D.key==="signTypeList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Z,U)=>{const pe=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Sc,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=R=>H("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(R,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:V=>H("update",{...R,index:k+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:V=>H("delete",k)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ic,[e.createVNode(St.ssForm,{rowContents:v.value,onChange:P},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Ee,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Bc,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Nc=Pt._export_sfc(Ac,[["__scopeId","data-v-487e0536"]]),Vc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(1),d=e.computed(()=>{var I,P;return(I=s==null?void 0:s.stepConfig)!=null&&I.allowTrigger?c.value:(P=s==null?void 0:s.stepConfig)==null?void 0:P.active}),b=(I,P)=>{c.value=P,l("clickStep",I,P)},v=I=>St.getComponent(I),h=()=>{var P;const I=(P=s==null?void 0:s.stepList)==null?void 0:P.find((z,H)=>H+1===d.value);return console.log("findStep",I),I?I==null?void 0:I.children:[]},C=I=>{l("clickTrigger",I)},_=I=>{l("changeTrigger",I)};return(I,P)=>{var Ee,Z,U,pe,D;const z=e.resolveComponent("el-step"),H=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(H,{direction:(Ee=a.stepConfig)==null?void 0:Ee.direction,active:d.value,"finish-status":"success",simple:(Z=a.stepConfig)==null?void 0:Z.simple,"align-center":((U=a.stepConfig)==null?void 0:U.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(R,k)=>(e.openBlock(),e.createBlock(z,{key:k,class:"step-item",onClick:V=>b(R,k+1)},{title:e.withCtx(()=>[e.renderSlot(I.$slots,"title",{title:R==null?void 0:R.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(I.$slots,"description",{description:R==null?void 0:R.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(pe=a.stepConfig)!=null&&pe.allowTrigger&&((D=a.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(R,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(R==null?void 0:R.type)),{modelValue:R.value,"onUpdate:modelValue":V=>R.value=V,onClickTrigger:C,onChangeTrigger:_,content:R==null?void 0:R.content},e.createSlots({_:2},[e.renderList(I.$slots,(V,B)=>({name:B,fn:e.withCtx(ue=>[e.renderSlot(I.$slots,B,e.mergeProps({ref_for:!0},ue||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Oc=Pt._export_sfc(Vc,[["__scopeId","data-v-d7c99969"]]),Mc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:i}){const s=a,l=i,c=e.ref({}),d=e.ref([]),b=(v,h)=>{l("clickStep",v,h)};return e.watch(()=>s==null?void 0:s.itemData,v=>{var h,C;d.value=(h=v==null?void 0:v.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:h.contents,c.value=(C=v==null?void 0:v.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:C.contents},{immediate:!0,deep:!0}),(v,h)=>{const C=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Oc,{stepConfig:c.value,stepList:d.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(C,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),zc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(i,s)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,b)=>(e.openBlock(),e.createBlock(l,{key:b,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Pc=Pt._export_sfc(zc,[["__scopeId","data-v-4172a886"]]),Rc={class:"line-content"},Fc={class:"line-time"},Lc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const i=a,s=e.ref({}),l=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var d,b;l.value=(d=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:d.contents,s.value=(b=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(Pc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:v})=>[e.createElementVNode("span",Rc,e.toDisplayString(b),1),e.createElementVNode("span",Fc,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),$c=Pt._export_sfc(Lc,[["__scopeId","data-v-b4d9deed"]]),jc={class:"tabs-content"},Uc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const i=a,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?s.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(St.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Kc=Pt._export_sfc(Uc,[["__scopeId","data-v-40865f68"]]),Qa=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Wc={class:"type-select"},Hc=["onClick"],qc={class:"list-icon"},Gc={__name:"modelSelect",setup(a){const i=Qa(p.pinia),{itemData:s}=p.storeToRefs(i),l=c=>{const d=p.cloneDeep(s.value);d.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(d)};return(c,d)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(lr),(v,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:C=>l(v)},[e.createElementVNode("div",qc,[e.createVNode(b,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,Hc)]))),128))])}}},Xc=Pt._export_sfc(Gc,[["__scopeId","data-v-91799bf8"]]),Yc={class:"fill-content"},Jc={class:"operate-content"},Zc={class:"collapse-title-content"},Qc={class:"collapse-title-item"},eu={key:1},tu=["onClick"],nu={class:"icon-content"},au={key:0,class:"edit-content"},ou=["onClick"],lu={class:"comp-child"},ru={__name:"modelFill",setup(a){const i=Qa(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),b=e.ref([]),v=z=>{var Ee;let H=(Ee=p.cloneDeep(b.value))==null?void 0:Ee.map((Z,U)=>(z===U&&(Z.content=!0),Z));b.value=H},h=z=>{var Ee;let H=(Ee=p.cloneDeep(b.value))==null?void 0:Ee.map((Z,U)=>(z===U&&(Z.content=!1),Z));b.value=H,c.value=p.cloneDeep(s.value)},C=(z,H)=>{var pe;let Ee=(pe=p.cloneDeep(b.value))==null?void 0:pe.map((D,R)=>(z===R&&(D.content=!1),D));b.value=Ee;const Z=p.cloneDeep(s.value),U=Z==null?void 0:Z.filter((D,R)=>(R===z&&(D.name=H),D));i.setOriginalData(U),i.setItemData(U)};e.watch(()=>s.value,()=>{var z,H,Ee;!s.value||((z=s.value)==null?void 0:z.length)===0?c.value=[]:c.value=(H=p.cloneDeep(s.value))==null?void 0:H.filter(Z=>(Z==null?void 0:Z.comp)!=="methodButton"),d.value=c.value,b.value=(Ee=p.cloneDeep(d.value))==null?void 0:Ee.map((Z,U)=>({id:U,content:!1}))},{deep:!0,immediate:!0});const _=z=>oa(z),I=(z,H,Ee)=>{var U,pe;if(!z)return;let Z=p.cloneDeep(s.value);Z=(U=Z==null?void 0:Z.map((D,R)=>(R===Ee&&(D.compData=z),D)))==null?void 0:U.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(pe=p.cloneDeep(Z))==null?void 0:pe.map((D,R)=>({id:R,content:!1})),i.setOriginalData(Z),i.setItemData(Z)},P=z=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const H=p.cloneDeep(s.value),Ee=H==null?void 0:H.filter((Z,U)=>U!==z);i.setOriginalData(Ee),i.setItemData(Ee),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(z,H)=>{const Ee=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Yc,[H[1]||(H[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Jc,[e.createVNode(kl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:Z,index:U})=>{var pe,D,R,k,V,B,ue,Re,tt,Ve;return[e.createElementVNode("div",Zc,[e.createElementVNode("div",Qc,[(D=(pe=b.value)==null?void 0:pe.find(Ue=>Ue.id===U))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:Z.name&&Z.name!==""?"8px":"0px"})},e.toDisplayString(Z.name),5)),(k=(R=b.value)==null?void 0:R.find(Ue=>Ue.id===U))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",eu,[e.createVNode(St._sfc_main$2,{modelValue:Z.name,"onUpdate:modelValue":Ue=>Z.name=Ue,onClick:H[0]||(H[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(B=(V=b.value)==null?void 0:V.find(Ue=>Ue.id===U))!=null&&B.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ue=>v(U),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Edit",style:{width:"16px",height:"16px"}})],8,tu))]),e.createElementVNode("div",nu,[(Re=(ue=b.value)==null?void 0:ue.find(Ue=>Ue.id===U))!=null&&Re.content?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(Ee,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ue=>h(U),["stop"])},null,8,["onClick"]),e.createVNode(Ee,{name:"Save",onClick:e.withModifiers(Ue=>C(U,Z.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ve=(tt=b.value)==null?void 0:tt.find(Ue=>Ue.id===U))!=null&&Ve.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ue=>P(U),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Delete",style:{width:"16px",height:"16px"}})],8,ou))])])]}),content:e.withCtx(({item:Z,index:U})=>{var pe,D;return[e.createElementVNode("div",lu,[e.createTextVNode(e.toDisplayString(_(Z.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(Z.comp+"Operate")),{itemContents:Z==null?void 0:Z.compData,originalItemContents:(D=(pe=d.value)==null?void 0:pe.find((R,k)=>k===U))==null?void 0:D.compData,onChange:R=>I(R,Z,U)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},iu=Pt._export_sfc(ru,[["__scopeId","data-v-a46a44b9"]]),su={key:0,class:"show-content"},cu={style:{display:"flex"}},uu={__name:"modelShow",setup(a){const i=Qa(p.pinia),{itemData:s}=p.storeToRefs(i),l=e.ref([]);e.watch(()=>s.value,()=>{var d;!s.value||((d=s.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=d=>oa(d);return(d,b)=>{var v;return((v=l.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,C)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:C},[e.createElementVNode("div",cu,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:C},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},pu=Pt._export_sfc(uu,[["__scopeId","data-v-3f3e863e"]]),du={class:"tabs-header"},fu={class:"tabs-list"},hu={class:"tab-name"},vu={class:"tab-actions"},gu=["onClick"],mu=["onClick"],yu=["onClick"],bu={class:"model-operate"},ku={class:"model-select",style:{display:"unset"}},xu={class:"existing-components"},wu={class:"component-list"},Du=["onClick"],Cu={class:"component-info"},Eu={class:"component-type"},_u={class:"component-name"},Su={class:"model-fill"},Tu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),b=e.ref(""),v=e.ref({title:""}),h=e.ref(-1),C=e.ref(!1),_=e.ref(-1),I=e.ref(new WeakMap),P=e.ref(null),z=Qa(p.pinia),{itemData:H}=p.storeToRefs(z),Ee=()=>{b.value="新增标签页",v.value.title="",h.value=-1,d.value=!0},Z=Ne=>{b.value="修改标签页",v.value.title=c.value[Ne].title,h.value=Ne,d.value=!0},U=Ne=>{const S=R(Ne);I.value.delete(S),c.value.splice(Ne,1),lt()},pe=()=>{if(v.value.title.trim()){if(h.value===-1){const Ne={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:D()};c.value.push(Ne)}else c.value[h.value].title=v.value.title,c.value[h.value].value=v.value.title,c.value[h.value].label=v.value.title;d.value=!1,lt()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,R=Ne=>{const S=c.value[Ne];return S.id||(S.id=D()),S.id},k=Ne=>{var se;_.value=Ne;const S=R(Ne);P.value=p.cloneDeep(H.value);let Ie=I.value.get(S);!Ie&&((se=c.value[Ne].children)==null?void 0:se.length)>0&&(Ie=Re(c.value[Ne].children)),Ie?z.setItemData(p.cloneDeep(Ie)):z.setItemData([]),C.value=!0},V=e.computed(()=>{const Ne=Te.useModelComp(p.pinia),S=p.storeToRefs(Ne).itemData.value;return console.log("可用组件数据",S),!S||!Array.isArray(S)?[]:S.filter(Ie=>{var se;if(Ie.comp==="Tabs"&&_.value>=0){const Me=R(_.value);if((se=Ie.compData)==null?void 0:se.some(Ce=>{var Le;return Ce.key==="stepList"&&((Le=Ce.contents)==null?void 0:Le.some(rt=>rt.id===Me))}))return!1}return!0})}),B=Ne=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Ne]||Ne,ue=Ne=>{var S;try{const Ie=p.cloneDeep(Ne);Ie.id=Date.now()+Math.random(),Ie.comp==="Tabs"&&((S=Ie.compData)==null||S.forEach(Me=>{Me.key==="stepList"&&Me.contents&&Me.contents.forEach(Fe=>{Fe.id=D()})}));const se=p.cloneDeep(H.value);se.push(Ie),z.setItemData(se)}catch(Ie){console.error("添加组件失败:",Ie)}},Re=Ne=>Ne.map(S=>{var Ie;switch(S.type){case"form":return{comp:"Form",name:S.value||"表单",compData:tt(S.content)};case"table":return{comp:"Table",name:S.value||"表格",compData:Ve(S.content)};default:return{comp:"Unknown",name:S.value||"",compData:((Ie=S.content)==null?void 0:Ie.originalData)||[]}}}),tt=Ne=>{if(!Ne)return[];const S=[];return Ne.rowContents&&S.push({key:"formContent",contents:Ne.rowContents}),Ne.buttonValue&&S.push({key:"formButton",contents:Ne.buttonValue}),typeof Ne.isEnableWrap<"u"&&S.push({key:"enableWrap",contents:Ne.isEnableWrap}),S},Ve=Ne=>[],Ue=()=>{if(_.value>=0&&_.value<c.value.length){const Ne=R(_.value);I.value.set(Ne,p.cloneDeep(H.value)),c.value[_.value].children=le(H.value),console.log("保存后的数据",le(H.value))}C.value=!1,_.value=-1,P.value=null,lt()},De=()=>{P.value&&z.setItemData(p.cloneDeep(P.value)),C.value=!1,_.value=-1,P.value=null},A=()=>{C.value&&De()},le=Ne=>{if(!Array.isArray(Ne))throw new Error("sourceData must be an array");return Ne.map((S,Ie)=>{if(!S||typeof S!="object")return S;const{comp:se,name:Me,compData:Fe}=S;switch(se){case"Form":return{type:"form",content:ae(Fe||[]),value:"表单"};case"Table":return{type:"table",content:me(Fe||[]),value:"表格"};default:return{type:"xxx",content:je(Fe||[]),value:""}}})},ae=Ne=>{const S={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},Ie={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Ne.forEach((se,Me)=>{if(!se||typeof se!="object"){console.warn(`Invalid config at index ${Me}:`,se);return}const{key:Fe,contents:Ce}=se,Le=Ie[Fe];if(!Le){console.warn(`Unknown Form config key: ${Fe}`);return}Fe==="enableWrap"?S[Le]=!!Ce:S[Le]=Array.isArray(Ce)?Ce:[]}),S},me=Ne=>{const S={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},Ie={header:"columns",tableContents:"tableData"};return Ne.forEach((se,Me)=>{if(!se||typeof se!="object"){console.warn(`Invalid config at index ${Me}:`,se);return}const{key:Fe,contents:Ce}=se,Le=Ie[Fe];if(!Le){console.warn(`Unknown Table config key: ${Fe}`);return}S[Le]=Array.isArray(Ce)?Ce:[]}),S},je=Ne=>(console.log("Default conversion logic - to be implemented"),{originalData:Ne,processed:!1,componentType:"unknown"}),lt=()=>{const Ne=[{key:"stepList",contents:c.value}];l("change",Ne)};return e.watch(()=>s.itemContents,Ne=>{if(Ne&&Ne.length>0){const S=Ne.find(Ie=>Ie.key==="stepList");S&&S.contents&&(c.value=S.contents.map(Ie=>({title:Ie.title||"",value:Ie.value||Ie.title||"",label:Ie.label||Ie.title||"",children:Ie.children||[],id:Ie.id||D()})))}},{immediate:!0,deep:!0}),(Ne,S)=>{const Ie=e.resolveComponent("svg-icon"),se=e.resolveComponent("el-input"),Me=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",du,[S[6]||(S[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Ee},[e.createVNode(Ie,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),S[5]||(S[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",fu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ce,Le)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Le},[e.createElementVNode("span",hu,e.toDisplayString(Ce.title),1),e.createElementVNode("div",vu,[e.createElementVNode("button",{onClick:rt=>Z(Le)},"修改标题",8,gu),e.createElementVNode("button",{onClick:rt=>k(Le)},"布局调整",8,mu),e.createElementVNode("button",{onClick:rt=>U(Le)},"删除",8,yu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":S[2]||(S[2]=Ce=>d.value=Ce),title:b.value,onBeforeDestroy:S[3]||(S[3]=Ce=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:S[1]||(S[1]=Ce=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:pe},"确定")]),default:e.withCtx(()=>[e.createVNode(Fe,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Me,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(se,{modelValue:v.value.title,"onUpdate:modelValue":S[0]||(S[0]=Ce=>v.value.title=Ce),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:C.value,"onUpdate:modelValue":S[4]||(S[4]=Ce=>C.value=Ce),title:"布局调整",fullScreen:"",onBeforeDestroy:A},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:De},"取消"),e.createElementVNode("button",{onClick:Ue},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",bu,[e.createElementVNode("div",ku,[e.createVNode(Xc),e.createElementVNode("div",xu,[S[8]||(S[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",wu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,Ce=>(e.openBlock(),e.createElementBlock("div",{key:Ce.id,class:"component-item",onClick:Le=>ue(Ce)},[e.createElementVNode("div",Cu,[e.createElementVNode("span",Eu,e.toDisplayString(B(Ce.comp)),1),e.createElementVNode("span",_u,e.toDisplayString(Ce.name),1)]),S[7]||(S[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Du))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Ne.innerWidth},[e.createVNode(pu)])),e.createElementVNode("div",Su,[e.createVNode(iu)])])]),_:1},8,["modelValue"])])}}},Iu=Pt._export_sfc(Tu,[["__scopeId","data-v-9096ed0d"]]);function Bu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function Au(a){return{type:"line",...a}}function Nu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function Vu(a){return{type:"bar",barWidth:"60%",...a}}function Ou(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Mu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Mn={line:{initBaseoptions:Bu,initSeries:Au},bar:{initBaseoptions:Nu,initSeries:Vu},pie:{initBaseoptions:Ou,initSeries:Mu}},Lo=Te.useMenuState(p.pinia),Al=(a,i)=>{var _;const s=[],l=[],{group:c,nameCol:d,valueCol:b}=i||{},v=a==null?void 0:a.find(I=>{const{name:P}=I;return P===c});if(!v)return{names:s,values:l};const h=(_=v==null?void 0:v.compData)==null?void 0:_.find(I=>{const{key:P}=I;return P==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(I=>{const P=I==null?void 0:I[0];let z=!1;p.isObject(P)&&(P!=null&&P.id)&&(z=!0);let H=d,Ee=b;z&&(H=H+1,Ee=Ee+1);const Z=I==null?void 0:I[H],U=I==null?void 0:I[Ee];s.push(Z),l.push(U)}),{names:s,values:l}},zu=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:b}=a||{};let v=null;const h=sessionStorage.getItem("systemKey");if(b&&Lo.activeMenuPath&&(v=await Te.getItemData(`${Lo.activeMenuPath}`,h,"")),!b){const C=i==null?void 0:i.join("/");v=await Te.getItemData(`${C}^${s}`,h,"")}return Al(v,{group:l,nameCol:c,valueCol:d})},Pu=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),v=await Te.getItemData(d,b,"");return Al(v,{group:s,nameCol:l,valueCol:c})},go=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:b}=a||{};if(!l.length||!c)return s;const{mainKey:v,group:h,nameCol:C,valueCol:_,isSelfDetail:I}=i||{};return v&&h&&St.isNumber(C)&&St.isNumber(_)?await zu({menu:l,mainKey:v,detailGroup:h,detailNameCol:C,detailValueCol:_,isSelfDetail:I}):St.isNumber(d)&&St.isNumber(b)?await Pu({menu:l,group:c,nameCol:d,valueCol:b}):s},Ru=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Mn==null?void 0:Mn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:C,values:_}=await go(i,s);if(!C||!_)return h;h.xAxis.data=C;const I=v({data:_});return h.series.push(I),h},Fu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Mn==null?void 0:Mn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:C,values:_}=await go(i,s);if(!C||!_)return h;h.xAxis.data=C;const I=v({data:_});return h.series.push(I),h},Lu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Mn==null?void 0:Mn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:C,values:_}=await go(i,s);if(!C||!_)return h;const I=[];for(let z=0;z<C.length;z++){const H=C[z],Ee=_[z];I.push({name:H,value:Ee})}const P=v({data:I});return h.series.push(P),h},$u=async(a=[])=>{var b,v,h;const i=((b=a==null?void 0:a.find(C=>C.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((v=a==null?void 0:a.find(C=>C.key==="chartDataConfig"))==null?void 0:v.contents)??{},l=((h=a==null?void 0:a.find(C=>C.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=i;let d={};return c==="line"&&(d=await Ru({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await Fu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Lu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},ju=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const i=a,s=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;s.value=await $u(c)});const l=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Rr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Uu=Pt._export_sfc(ju,[["__scopeId","data-v-d4c081e8"]]),Ku={class:"chart-module layout"},Wu={class:"chart-module content"},Hu={class:"chart-module content"},qu={class:"form-content"},Gu={class:"dialog-footer"},Xu={class:"form-content"},Yu={class:"dialog-footer"},Ju={class:"form-content"},Zu={class:"dialog-footer"},Qu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],v=e.ref({}),h=()=>{var ne;d.value=b(),(ne=d.value)==null||ne.forEach(re=>{var ye;const _e=re==null?void 0:re.prop;re.value=(ye=v==null?void 0:v.value)==null?void 0:ye[_e]}),c.visible=!0},C=ne=>{v.value=ne},_=()=>{var ne;c.visible=!1,l("change",(ne=ct())==null?void 0:ne.compData)},I=e.reactive({visible:!1,width:"840",title:"数据配置"}),P=e.ref([]),z=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],H=e.ref({}),Ee=()=>{const ne=P.value,re=p.cloneDeep(ne);return re==null||re.forEach(_e=>{var Xe;const ye=_e==null?void 0:_e.prop;_e.value=(Xe=H.value)==null?void 0:Xe[ye]}),re},Z=ne=>{var _e;H.value=ne;const re=Ee();P.value=re,l("change",(_e=ct())==null?void 0:_e.compData)},U=async()=>{const ne=await Te.getMenusContent(),re=Ee();re==null||re.forEach(_e=>{(_e==null?void 0:_e.prop)==="menu"&&(_e.contents=ne)}),P.value=re,I.visible=!0,await Ce(H.value.menu),await Q(H.value.group)},pe=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),R=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),V=()=>{const ne=D.value,re=p.cloneDeep(ne);return re==null||re.forEach(_e=>{var Xe;const ye=_e==null?void 0:_e.prop;_e.value=(Xe=k.value)==null?void 0:Xe[ye]}),re},B=ne=>{var _e;k.value=ne;const re=V();D.value=re,l("change",(_e=ct())==null?void 0:_e.compData)},ue=async()=>{await A();const ne=p.cloneDeep(Re.value),re=V();re==null||re.forEach(_e=>{var Xe;const ye=_e==null?void 0:_e.prop;_e.value=(Xe=k==null?void 0:k.value)==null?void 0:Xe[ye],ye==="mainKey"&&(_e.contents=ne)}),D.value=re,pe.visible=!0},Re=e.ref([]),tt=e.ref([]),Ve=e.ref({}),Ue=e.ref({}),De=()=>{const{compData:ne}=se.value||{},re=ne==null?void 0:ne.find(m=>{const{key:L}=m;return L==="header"}),_e=(re==null?void 0:re.contents)||[],ye=_e==null?void 0:_e.filter((m,L)=>{const{label:E}=m;return E!=="操作"}),Xe=ye==null?void 0:ye.findIndex((m,L)=>{const{isMainKey:E}=m;return E});if(Xe<0)return[];const Ze=ne==null?void 0:ne.find(m=>{const{key:L}=m;return L==="tableContents"}),x=(Ze==null?void 0:Ze.contents)||[];return x==null?void 0:x.map(m=>{const L=m==null?void 0:m[0];let E=Xe;p.isObject(L)&&(L!=null&&L.id)&&(E=E+1);const M=m==null?void 0:m[E];return{label:M,value:M}})},A=async()=>{const ne=await De();Re.value=ne},le=async ne=>{const re=sessionStorage.getItem("systemKey");return await Te.getItemData(ne,re,"")},ae=async ne=>{const re=ne;tt.value=re==null?void 0:re.map(_e=>{const{name:ye}=_e;return Ve.value[ye]=_e,{label:ye,value:ye}})},me=ne=>{const{comp:re,compData:_e}=Ue.value||{};if(re==="Table"){let ye=V();ye=ye.filter(Xe=>{const{prop:Ze}=Xe;return Ze!=="formItems"}),Le(ye,_e),D.value=ye}},je=async()=>{var _e,ye;const ne=(_e=k==null?void 0:k.value)==null?void 0:_e.mainKey,re=(ye=H==null?void 0:H.value)==null?void 0:ye.menu;if(ne){const Ze=`${re==null?void 0:re.join("/")}^${ne}`,x=await le(Ze);await ae(x);const w=V();w==null||w.forEach(m=>{(m==null?void 0:m.prop)==="group"&&(m.contents=tt.value)}),D.value=w}};e.watch(()=>{var ne;return(ne=k==null?void 0:k.value)==null?void 0:ne.mainKey},async(ne,re)=>{ne!=re&&ne&&await je()});const lt=async ne=>{const re=Ve.value[ne];Ue.value=re,await me()};e.watch(()=>{var ne;return(ne=k==null?void 0:k.value)==null?void 0:ne.group},async(ne,re)=>{ne!=re&&ne&<(ne)});const Ne=async()=>{var re;await je();const ne=(re=k.value)==null?void 0:re.group;await lt(ne)},S=e.ref([]),Ie=e.ref({}),se=e.ref({}),Me=async ne=>{const re=ne==null?void 0:ne.join("/"),_e=sessionStorage.getItem("systemKey");return await Te.getItemData(re,_e,"")},Fe=async ne=>{const re=await Me(ne);S.value=re==null?void 0:re.map(_e=>{const{name:ye}=_e;return Ie.value[ye]=_e,{label:ye,value:ye}})},Ce=async(ne,re)=>{await Fe(ne);const _e=Ee();_e==null||_e.forEach(ye=>{(ye==null?void 0:ye.prop)==="group"&&(ye.contents=S.value)}),P.value=_e};e.watch(()=>{var ne;return(ne=H==null?void 0:H.value)==null?void 0:ne.menu},async(ne,re)=>{const _e=ne==null?void 0:ne.join("/"),ye=re==null?void 0:re.join("/");_e!=ye&&await Ce(ne)});const Le=(ne,re)=>{const _e=re==null?void 0:re.find(x=>{const{key:w}=x;return w==="header"}),ye=(_e==null?void 0:_e.contents)||[],Xe=ye==null?void 0:ye.filter((x,w)=>{const{label:m}=x;return m!=="操作"}),Ze=Xe==null?void 0:Xe.map((x,w)=>{const{label:m}=x;return{label:m,value:w}});ne==null||ne.forEach(x=>{const w=x==null?void 0:x.prop;(w==="nameCol"||w==="valueCol")&&(x.contents=Ze)})},rt=ne=>{const{comp:re,compData:_e}=se.value||{};if(re==="Table"){H.value.formItems=[];let ye=Ee();ye=ye.filter(Xe=>{const{prop:Ze}=Xe;return Ze!=="formItems"}),Le(ye,_e),P.value=ye}},Q=async ne=>{const re=Ie.value[ne];se.value=re,await rt()};e.watch(()=>{var ne;return(ne=H==null?void 0:H.value)==null?void 0:ne.group},async(ne,re)=>{ne!=re&&Q(ne)});const Ye=async()=>{var _e,ye;const ne=(_e=H.value)==null?void 0:_e.menu;await Ce(ne);const re=(ye=H.value)==null?void 0:ye.group;await Q(re)},ct=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:H.value},{key:"chartDetailConfig",contents:k.value}]}),Qe=()=>{c.visible=!1,I.visible=!1,pe.visible=!1};return e.onMounted(async()=>{var re,_e,ye;P.value=z(),D.value=R();const ne=s==null?void 0:s.itemContents;v.value=((re=ne==null?void 0:ne.find(Xe=>Xe.key==="chartBaseConfig"))==null?void 0:re.contents)??{},H.value=((_e=ne==null?void 0:ne.find(Xe=>Xe.key==="chartDataConfig"))==null?void 0:_e.contents)??{},await Ye(),k.value=((ye=ne==null?void 0:ne.find(Xe=>Xe.key==="chartDetailConfig"))==null?void 0:ye.contents)??{},await Ne()}),(ne,re)=>{const _e=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ku,[re[4]||(re[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(_e,{id:"themeButton",onClick:re[0]||(re[0]=ye=>h())},{default:e.withCtx(()=>re[3]||(re[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Wu,[re[6]||(re[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(_e,{id:"themeButton",onClick:re[1]||(re[1]=ye=>U())},{default:e.withCtx(()=>re[5]||(re[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Hu,[re[8]||(re[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(_e,{id:"themeButton",onClick:re[2]||(re[2]=ye=>ue())},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Qe,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",qu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gu,[e.createVNode(_e,{class:"cancel-button button",onClick:Qe,id:"themeBorderButton"},{default:e.withCtx(()=>re[9]||(re[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(_e,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>re[10]||(re[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:I.visible,title:I.title,onBeforeDestroy:Qe,width:I.width},{default:e.withCtx(()=>[e.createElementVNode("div",Xu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:P.value,key:P.value,isEnableWrap:!0,onChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yu,[e.createVNode(_e,{class:"cancel-button button",onClick:Qe,id:"themeBorderButton"},{default:e.withCtx(()=>re[11]||(re[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(_e,{class:"ok-button button",onClick:Qe,id:"themeButton"},{default:e.withCtx(()=>re[12]||(re[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:pe.visible,title:pe.title,onBeforeDestroy:Qe,width:pe.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ju,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(_e,{class:"cancel-button button",onClick:Qe,id:"themeBorderButton"},{default:e.withCtx(()=>re[13]||(re[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(_e,{class:"ok-button button",onClick:Qe,id:"themeButton"},{default:e.withCtx(()=>re[14]||(re[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ep=Pt._export_sfc(Qu,[["__scopeId","data-v-fe119645"]]);var Ua={exports:{}},tp=Ua.exports,$o;function np(){return $o||($o=1,function(a,i){(function(s,l){l()})(tp,function(){function s(C,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(C.type)?new Blob(["\uFEFF",C],{type:C.type}):C}function l(C,_,I){var P=new XMLHttpRequest;P.open("GET",C),P.responseType="blob",P.onload=function(){h(P.response,_,I)},P.onerror=function(){console.error("could not download file")},P.send()}function c(C){var _=new XMLHttpRequest;_.open("HEAD",C,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function d(C){try{C.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),C.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ta.commonjsGlobal=="object"&&ta.commonjsGlobal.global===ta.commonjsGlobal?ta.commonjsGlobal:void 0,v=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(C,_,I){var P=b.URL||b.webkitURL,z=document.createElement("a");_=_||C.name||"download",z.download=_,z.rel="noopener",typeof C=="string"?(z.href=C,z.origin===location.origin?d(z):c(z.href)?l(C,_,I):d(z,z.target="_blank")):(z.href=P.createObjectURL(C),setTimeout(function(){P.revokeObjectURL(z.href)},4e4),setTimeout(function(){d(z)},0))}:"msSaveOrOpenBlob"in navigator?function(C,_,I){if(_=_||C.name||"download",typeof C!="string")navigator.msSaveOrOpenBlob(s(C,I),_);else if(c(C))l(C,_,I);else{var P=document.createElement("a");P.href=C,P.target="_blank",setTimeout(function(){d(P)})}}:function(C,_,I,P){if(P=P||open("","_blank"),P&&(P.document.title=P.document.body.innerText="downloading..."),typeof C=="string")return l(C,_,I);var z=C.type==="application/octet-stream",H=/constructor/i.test(b.HTMLElement)||b.safari,Ee=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ee||z&&H||v)&&typeof FileReader<"u"){var Z=new FileReader;Z.onloadend=function(){var D=Z.result;D=Ee?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),P?P.location.href=D:location=D,P=null},Z.readAsDataURL(C)}else{var U=b.URL||b.webkitURL,pe=U.createObjectURL(C);P?P.location=pe:location.href=pe,P=null,setTimeout(function(){U.revokeObjectURL(pe)},4e4)}});b.saveAs=h.saveAs=h,a.exports=h})}(Ua)),Ua.exports}np();const Xn=p.useLoginState(),{loginUserInfo:Ra}=p.storeToRefs(Xn),Ft=Te.useModelComp(p.pinia),Ka=e.ref(!1),{itemData:ap,itemGridData:Hn,curStructureCompIds:jo,isSubmitCurStructure:op,isRefreshCurStructure:lp,freshContent:Uo,routeToChildPath:rp,payloadTypes:ip,pageMapState:Ga,itemExtendData:Fa}=p.storeToRefs(Ft),fn=Te.useMenuState(p.pinia),{activeTopMenuPath:sp,activeMenuPath:zt,platform:Zd,activeAsideMenu:cp,buttonTriggerType:up}=p.storeToRefs(fn),kn=ea.useUnit(p.pinia),{selectTitle:Ko}=p.storeToRefs(kn),pp=Te.useOriginalState(p.pinia),{originalPath:eo}=p.storeToRefs(pp),Wo=Te.useAuthorityState(p.pinia),Xa=e.ref(!0),xa=e.ref(0),mo=e.ref([]),wa=e.computed(async()=>{var i,s;const a=(i=zt.value)!=null&&i.startsWith("/")?(s=zt.value)==null?void 0:s.substring(1):zt.value;return(a==null?void 0:a.includes(eo.value))||await xp(a)}),dp=()=>{Ft.setItemGridData([]),Ft.setIsEdit("edit"),Ft.setSubmitCurStructure(zt.value!=="/平台管理/菜单管理")},fp=()=>{Ft.setIsEdit("view"),Ft.setRefreshCurStructure(!0)},hp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Ko.value.length===1)_t.value=await Te.getItemData(zt.value,sessionStorage.getItem("systemKey"),"",!1,[],await wa.value),kn.setSelectIndex(""),kn.setSelectMenu(""),kn.setSelectTitle([]);else{const s=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);_t.value=await Te.getItemData(zt.value,sessionStorage.getItem("systemKey"),l,!1,[],await wa.value);let c=-1;(i=Ko.value)==null||i.forEach((d,b)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=b),(c===-1||c>=b)&&s.push(d)}),kn.setSelectTitle(s),l!==""?kn.setSelectMenu(a==null?void 0:a.key):(kn.setSelectIndex(""),kn.setSelectMenu(""))}_t.value=Ca(_t.value),Ft.setItemData(_t.value),Ft.setOriginalData(_t.value)},lo=async(a,i,s,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,b;i==="create"?(d={dataList:a==null?void 0:a.map(h=>{var C;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(C=h==null?void 0:h.compData)==null?void 0:C.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=p.batchAddInsofDataApi):i==="update"?(d={dataList:a==null?void 0:a.map(h=>{var C;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(C=h==null?void 0:h.compData)==null?void 0:C.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=p.batchUpdateInsofDataApi):i==="delete"&&(d={ids:a},b=p.batchDeleteInsofDataApi);const v=await b(d);if(((c=v==null?void 0:v.data)==null?void 0:c.code)===200)return v.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Ho=async(a,i,s,l)=>{var c,d,b,v,h,C,_,I,P,z,H;try{const Ee=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:d.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:k}})),Z=(v=(b=a==null?void 0:a.results)==null?void 0:b.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:v.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),U=JSON.parse(p.cloneDeep(JSON.stringify(a))),pe=(h=U==null?void 0:U.results)==null?void 0:h.map(k=>k.id);let D;s?D=(I=(_=(C=Ga.value)==null?void 0:C[zt.value])==null?void 0:_.filter(k=>{var V,B,ue;return((V=k==null?void 0:k.key)==null?void 0:V.type)===i&&((ue=(B=k==null?void 0:k.key)==null?void 0:B.relatedInfo)==null?void 0:ue.target)===l}))==null?void 0:I.map(k=>k==null?void 0:k.id):D=(H=(z=(P=Ga.value)==null?void 0:P[zt.value])==null?void 0:z.filter(k=>{var V;return((V=k==null?void 0:k.key)==null?void 0:V.type)===i}))==null?void 0:H.map(k=>k==null?void 0:k.id);const R=D==null?void 0:D.filter(k=>!(pe!=null&&pe.includes(k))&&typeof k=="number");(Ee==null?void 0:Ee.length)>0&&await p.batchAddInsofDataApi({dataList:Ee}),(Z==null?void 0:Z.length)>0&&await p.batchUpdateInsofDataApi({dataList:Z}),(R==null?void 0:R.length)>0&&await p.batchDeleteInsofDataApi({ids:R})}catch(Ee){throw new Error(Ee)}},vp=async a=>{var C,_,I,P,z,H,Ee,Z,U,pe;fn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(ap.value)));if(!op.value)return fn.setCacheStructures({key:up.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),l=s.filter(D=>{var R;return!((R=jo.value)!=null&&R.includes(D))}),c=(C=jo.value)==null?void 0:C.filter(D=>!s.includes(D)),d=[...l,...c].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),v=i==null?void 0:i.filter(D=>D.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(lo(d,"delete",a)),b&&(b==null?void 0:b.length)>0&&h.push(lo(b,"create",a)),v&&(v==null?void 0:v.length)>0&&h.push(lo(v,"update",a)),Hn.value&&((_=Hn.value)!=null&&_.isDelete&&((P=(I=Hn.value)==null?void 0:I.results)==null?void 0:P.length)>0&&((H=(z=Hn.value)==null?void 0:z.results)!=null&&H.every(D=>typeof D=="number"))?await p.batchDeleteInsofDataApi({ids:(Ee=Hn.value)==null?void 0:Ee.results}):(console.log("itemGridData.value",Hn.value),h.push(await Ho(Hn.value,"gridLayout")))),Fa.value)for(const D in Fa.value)h.push(await Ho((Z=Fa.value)==null?void 0:Z[D],"extend",{target:D,compId:(pe=(U=Fa.value)==null?void 0:U[D])==null?void 0:pe.compId},D));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Ft.setRefreshCurStructure(!0)}).catch(D=>{p.ElMessage.success(D)}),fn.setContentLoading(!1)},yo=a=>oa(a),_t=e.ref([]),gp=e.computed(()=>{var a;return(a=_t.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Nl=e.computed(()=>{var a;return(a=_t.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),mp=async a=>{var l,c,d,b,v,h;let i=p.cloneDeep(zt).value;i=i+eo.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const s=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((d=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:d.length)>0){const C=(v=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:v.map(I=>I==null?void 0:I.id),_=await p.batchDeleteInsofDataApi({ids:C});((h=_==null?void 0:_.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await Xn.setLogRecordAsync({type:"删除",data:a},i)):p.ElMessage.error("删除响应失败"),Ft.setTableLoading(!1)}},qo=async a=>{var i,s;try{let l=p.cloneDeep(zt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(b=>{var v;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+eo.value+((v=Object.values(b==null?void 0:b.singleContent))==null?void 0:v[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(b=>{var v;return((v=b==null?void 0:b.data)==null?void 0:v.code)===200}))){const b=Array.from(new Set((i=d==null?void 0:d.flatMap(h=>{var C;return(C=h==null?void 0:h.data)==null?void 0:C.result}))==null?void 0:i.map(h=>h==null?void 0:h.id))),v=await p.batchDeleteInsofDataApi({ids:b});((s=v==null?void 0:v.data)==null?void 0:s.code)===200?(p.ElMessage.success("删除成功"),await Xn.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await mp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Ft.setTableLoading(!1)}},yp=async a=>{var i,s;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:zt.value,tableId:(i=a==null?void 0:a.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=a==null?void 0:a.data)!=null&&s.id))return;const b=await Promise.all([d]);(b==null?void 0:b.every(h=>{var C;return((C=h==null?void 0:h.data)==null?void 0:C.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Vl=e.ref(0),Ya=e.ref(null),bo=async(a,i="data",s)=>{var l,c,d,b,v,h,C,_,I,P,z,H,Ee,Z,U,pe,D,R,k,V,B;if(Ya.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await qo(a):await Te.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await Xn.setLogRecordAsync({type:"删除",data:a},zt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(ue=>typeof(ue==null?void 0:ue.id)=="string")){const ue=(b=a==null?void 0:a.selectItems)==null?void 0:b.map(Re=>({content:a==null?void 0:a.content,singleContent:Re,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await qo(ue)}else{const ue=(v=a==null?void 0:a.selectItems)==null?void 0:v.map(Re=>Re==null?void 0:Re.id);await p.batchDeleteInsofDataApi({ids:ue}),await Xn.setLogRecordAsync({type:"删除",data:ue},zt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let ue={};for(let tt in a==null?void 0:a.singleContent)tt!=="id"&&tt!=="index"&&(ue[tt]=a==null?void 0:a.singleContent[tt]);const Re=await Te.addTableContents(i,zt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(ue),a==null?void 0:a.column,a,{param:s});Ya.value={resId:Re,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Ft.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let ue=[],Re=[],tt=((C=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:C.id)??"",Ve=s==null?void 0:s.url,Ue="",De="";if(tt!==""&&((_=a==null?void 0:a.content)==null?void 0:_.length)>1&&typeof((P=(I=a==null?void 0:a.content)==null?void 0:I[0])==null?void 0:P.id)!="string"){const A=await p.getInsofDataApi({id:tt});Ue=((Z=(Ee=(H=(z=A==null?void 0:A.data)==null?void 0:z.result)==null?void 0:H[0])==null?void 0:Ee.key)==null?void 0:Z.tableId)??"",De=((R=(D=(pe=(U=A==null?void 0:A.data)==null?void 0:U.result)==null?void 0:pe[0])==null?void 0:D.key)==null?void 0:R.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(A=>{let le={};for(let ae in A)ae!=="id"&&ae!=="index"&&(le[ae]=A[ae]);typeof(A==null?void 0:A.id)=="number"?ue.push({id:A==null?void 0:A.id,value:{tableData:le}}):Re.push({key:{type:i,pageKey:Ve||De||zt.value,tableId:Ue||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:le}})}),(Re==null?void 0:Re.length)>0&&await p.batchAddInsofDataApi({dataList:Re}),(ue==null?void 0:ue.length)>0&&await p.batchUpdateInsofDataApi({dataList:ue})}else{let ue={},Re=(V=a==null?void 0:a.singleContent)==null?void 0:V.id;for(let tt in a==null?void 0:a.singleContent)tt!=="id"&&tt!=="index"&&(ue[tt]=a==null?void 0:a.singleContent[tt]);await Te.fixTableContents(i,zt.value,a==null?void 0:a.index,Re,sessionStorage.getItem("systemKey"),Object.values(ue),a==null?void 0:a.column)}Ft.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await yp(a==null?void 0:a.value);Ft.setTableLoading(!1),(B=a==null?void 0:a.column)!=null&&B.some(ue=>ue==null?void 0:ue.isMainKey)||(_t.value=await Te.getItemData(zt.value,sessionStorage.getItem("systemKey"),"",!1,[],await wa.value)),_t.value=Ca(_t.value),Do.value&&(a==null?void 0:a.buttonName)!=="删除"&&Ft.setRefreshCurStructure(!0)},bp=async a=>{var s,l,c;const i=await p.getInsofDataApi({id:a});return(c=(l=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:l[0])==null?void 0:c.value},ko=async(a,i)=>{var c,d,b;if(Ka.value||typeof(a==null?void 0:a.index)=="string")return;const s=await bp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await Te.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(v=>v.contents),name:l,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(fn.setActiveMenuPath(null),fn.setActiveMenuPath(i))},xo=a=>{_t.value=Ca(a),Ft.setItemData(_t.value),Ft.setOriginalData(_t.value)},kp=async a=>{var i;await e.nextTick(),(i=cp.value)!=null&&i.isRouter?Wo.setRouterPageStructure(a):Wo.setRouterPageStructure([])},xp=async a=>{var d,b,v,h,C,_;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((I,P)=>{var z;((z=a==null?void 0:a.split("/"))==null?void 0:z.length)-2>P&&(i=i===""?i+I:i+"/"+I)}),(b=a==null?void 0:a.split("/"))==null||b.forEach((I,P)=>{var z;((z=a==null?void 0:a.split("/"))==null?void 0:z.length)-1>P&&(s=s===""?s+I:s+"/"+I)}),i=i+"/",s=s+"/";let l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(v=l==null?void 0:l.data)==null?void 0:v.result)==null?void 0:h.length)>0||((_=(C=c==null?void 0:c.data)==null?void 0:C.result)==null?void 0:_.length)>0},wp=e.ref(),On=e.ref(null),Dp=a=>{var C,_,I,P,z,H,Ee,Z,U,pe,D,R,k,V,B,ue,Re,tt,Ve,Ue;const i=(_=(C=Ga.value)==null?void 0:C[a])==null?void 0:_.filter(De=>{var A;return((A=De==null?void 0:De.key)==null?void 0:A.type)==="extend"});if((i==null?void 0:i.length)===0)return On.value=null;wp.value=i;const s=(P=(I=i==null?void 0:i.find(De=>{var A,le,ae;return(ae=(le=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:le.执行任务)==null?void 0:ae.includes("计时")}))==null?void 0:I.value)==null?void 0:P.tableData;if(!s)return On.value=null;const l=(Ee=(H=(z=i==null?void 0:i.find(De=>{var A,le,ae;return(ae=(le=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:le.执行任务)==null?void 0:ae.includes("计时")}))==null?void 0:z.key)==null?void 0:H.relatedInfo)==null?void 0:Ee.compId,c=(Z=_t.value)==null?void 0:Z.find(De=>(De==null?void 0:De.id)===l);if(!c)return On.value=null;const d=(pe=s==null?void 0:s.任务关键词)==null?void 0:pe[((U=s==null?void 0:s.任务关键词)==null?void 0:U.length)-1],b=(k=(R=(D=c==null?void 0:c.compData)==null?void 0:D.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:R.contents)==null?void 0:k.findIndex(De=>(De==null?void 0:De.prop)===d),v=(Re=(ue=(B=(V=c==null?void 0:c.compData)==null?void 0:V.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:B.contents)==null?void 0:ue.find(De=>De==null?void 0:De.isMainKey))==null?void 0:Re.prop,h=(Ue=(Ve=(tt=c==null?void 0:c.compData)==null?void 0:tt.find(De=>(De==null?void 0:De.key)==="tableContents"))==null?void 0:Ve.contents)==null?void 0:Ue[b];On.value={prop:d,value:h,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:v},console.log("getPageExtendData:",s,i)},Cp=()=>{var a,i;console.log("倒计时结束时"),Te.ElMessageBox.alert(`超时未提交,【${(i=(a=zt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ol=()=>{var a,i,s,l;try{if(sp.value!=="报告中心"||!((a=zt.value)!=null&&a.includes(eo.value)))return;const c=(i=_t.value)==null?void 0:i.find(h=>{var C;return((C=h==null?void 0:h.comp)==null?void 0:C.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},b=(l=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,v=b==null?void 0:b.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));v!=null&&v.value&&(v==null?void 0:v.value)!==(d==null?void 0:d.value)&&Ft.setLockingPage(zt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},wo=e.ref([]),Ep=e.computed(()=>{var a,i;return(i=(a=Ga.value)==null?void 0:a[zt.value])==null?void 0:i.filter(s=>{var l;return((l=s==null?void 0:s.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[zt.value,lp.value],async a=>{var d,b,v,h,C,_,I,P;if(!zt.value)return;Ft.setLockingPage(""),_t.value=[];let i=e.getCurrentInstance();(d=i==null?void 0:i.scope)==null||d.stop(),i=null,Xa.value=!1,Ka.value=!0;const s=(b=a==null?void 0:a[0])!=null&&b.startsWith("/")?(v=a==null?void 0:a[0])==null?void 0:v.substring(1):a==null?void 0:a[0];let l=new WeakMap;(C=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ip.value})).data.result)==null?void 0:h.filter(z=>{var H,Ee;return((H=z==null?void 0:z.key)==null?void 0:H.pageKey)!=="menu"&&((Ee=z==null?void 0:z.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||C.forEach(z=>{l[z.key.pageKey]?l[z.key.pageKey]=[...l[z.key.pageKey],z]:l[z.key.pageKey]=[z]}),mo.value=l,s?(fn.setContentLoading(!0),sessionStorage.setItem("pageKey",zt.value),_t.value=await Te.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await wa.value,l),await Xn.setLogRecordAsync({type:"查询",data:_t.value},zt.value),_t.value=Ca(_t.value),await kp(_t.value),Ol(),Dp(s),wo.value=(_=_t.value)==null?void 0:_.map(z=>({label:z==null?void 0:z.name,value:z==null?void 0:z.id})),Ft.setExtraContents([]),kn.setSelectTitle([]),kn.setSelectIndex(""),kn.setSelectMenu(""),Ft.setItemData(_t.value),Ft.setOriginalData(_t.value),Ft.setCurStructureCompIds((I=_t.value)==null?void 0:I.map(z=>z==null?void 0:z.id)),Ft.setRefreshCurStructure(!1),kn.setSelectTitle((P=zt.value)==null?void 0:P.split("/").map(z=>({value:z.trim()}))),fn.setChildMenu(""),fn.setContentLoading(!1),Ft.setTableLoading(!1),Ka.value=!1):(_t.value=[],Ka.value=!1),e.nextTick(()=>{xa.value=xa.value++,Xa.value=!0})},{immediate:!0});e.watch(()=>Uo.value,async()=>{if(Uo.value){let a=await Te.getItemData(zt.value,sessionStorage.getItem("systemKey"),"",!1,[],await wa.value);_t.value=Ca(a),Ft.setFreshContent(!1),Ol()}},{deep:!0});const _p=async()=>{var c,d,b,v,h,C,_,I;fn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Ra.value)==null?void 0:c.account)||((d=Ra.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=Ra.value)==null?void 0:b.account)||((v=Ra.value)==null?void 0:v.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(C=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:C.map(P=>P==null?void 0:P.id);const l=(I=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:I.map(P=>P==null?void 0:P.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(P=>P!==null&&P))&&(await p.batchDeleteInsofDataApi({ids:s}),await Xn.setLogRecordAsync({type:"删除",data:s},zt.value)),fn.setActiveMenuPath(rp.value),_t.value=null,Ft.setRouteToChildPath(""),fn.setChildMenu("")},Sp=a=>new RegExp("button","i").test(a),Tp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ml=a=>{if(Tp(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&fn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zl=a=>{var i;On.value&&(On.value={...On.value,mainKeyPropValue:a==null?void 0:a[(i=On.value)==null?void 0:i.mainKeyProp]})},Ip=a=>{Vl.value=a},na=e.reactive({index:0,comp:null}),Bp=e.computed(()=>{var a;return(a=_t.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:Ap(i,s)}))}),Pl=(a,i)=>{var h,C,_,I,P;const s=i?a:a-2,l=(h=_t.value)==null?void 0:h[s],c=(_=(C=l==null?void 0:l.compData)==null?void 0:C.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:_.contents,d=c==null?void 0:c.findIndex(z=>(z==null?void 0:z.isMainKey)&&(z==null?void 0:z.label)!=="操作"),b=d===-1?0:d,v=(P=(I=l==null?void 0:l.compData)==null?void 0:I.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:P.contents;return{valid:v==null?void 0:v.every(z=>z==null?void 0:z[b+1]),length:(v==null?void 0:v.length)||0}},Ap=(a,i)=>{var l;let s="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Pl(i,!0);na.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Rl=a=>{var s,l,c,d,b;const i=a+1;if(i>1&&((c=(l=(s=_t.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:v}=Pl(i);v?(na.index=i,na.comp=(d=_t.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else na.index=i,na.comp=(b=_t.value)==null?void 0:b[a]},Do=e.computed(()=>{var a,i;return(i=(a=Nl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>Do.value,a=>{a&&Rl(0)},{immediate:!0});const Np={class:"layout"},Vp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:i}){const s=i,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var _;const C=(_=c==null?void 0:c.value)==null?void 0:_.find(I=>{const{key:P}=I;return P==="baseConfig"});return C==null?void 0:C.contents}),b=e.computed(()=>{var _;const C=(_=c==null?void 0:c.value)==null?void 0:_.find(I=>{const{key:P}=I;return P==="children"});return C==null?void 0:C.contents}),v=e.computed(()=>{let C=p.cloneDeep(b.value)||[];const _=C.length;let I=0;const P=[];if(C=C.map(z=>{const H=z.span;return H?(z.span=Number(H),I=I+z.span):P.push(z),z}),I<24){const z=Math.floor((24-I)/_);P.forEach(H=>{H.span=z})}return C}),h=C=>{s("rowClick",C)};return(C,_)=>{var z;const I=e.resolveComponent("el-col"),P=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Np,[e.createVNode(P,{style:e.normalizeStyle({height:(z=d.value)==null?void 0:z.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(H,Ee)=>(e.openBlock(),e.createBlock(I,{span:H==null?void 0:H.span},{default:e.withCtx(()=>{var Z;return[e.unref(Xa)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(yo)(H.comp)),{key:e.unref(xa),compName:H.name,index:(H==null?void 0:H.id)??Ee,height:(Z=d.value)==null?void 0:Z.height,itemData:H==null?void 0:H.compData,childItemData:H==null?void 0:H.itemChildData,onChange:e.unref(bo),onContentChange:e.unref(ko),onPageChange:e.unref(xo),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Op=Pt._export_sfc(Vp,[["__scopeId","data-v-ab9a36ed"]]),Mp={class:"layout-operate"},zp={class:"layout-module"},Pp={class:"collapse-title-item"},Rp={class:"collapse-title"},Fp={class:"icon-content"},Lp=["onClick"],$p={class:"comp-child"},jp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i;e.onMounted(()=>{Ee()});const c=e.ref({}),d=e.ref({}),b=e.ref([]),v=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",R(),!0)},C=e.ref([]),_=e.ref([]),I=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],P=e.computed(()=>{const k=s==null?void 0:s.itemContents;return p.cloneDeep(k)}),z=e.computed(()=>{const k=P==null?void 0:P.value,V=k==null?void 0:k.find(B=>{const{key:ue}=B;return ue==="baseConfig"});return V==null?void 0:V.contents}),H=e.computed(()=>{const k=P==null?void 0:P.value,V=k==null?void 0:k.find(B=>{const{key:ue}=B;return ue==="children"});return V==null?void 0:V.contents}),Ee=()=>{var k;c.value=P.value||{},C.value=(H==null?void 0:H.value)||[],b.value=v(),b.value=(k=b.value)==null?void 0:k.map(V=>{var ue;const{prop:B}=V;return V.value=(ue=z.value)==null?void 0:ue[B],V})};e.watch(()=>{var k;return(k=H==null?void 0:H.value)==null?void 0:k.length},()=>{var k;C.value=(H==null?void 0:H.value)||[],_.value=(k=H.value)==null?void 0:k.map(V=>I(V))},{immediate:!0});const Z=(k,V)=>{const B=p.cloneDeep(H==null?void 0:H.value);B[V].span=k.span,C.value=B,l("change",R(),!0)},U=k=>oa(k),pe=(k,V,B)=>{if(!k)return;const ue=p.cloneDeep(H==null?void 0:H.value);ue[B]&&(ue[B].compData=k,C.value=ue,l("change",R(),!0))},D=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let V=p.cloneDeep(H==null?void 0:H.value);V=V==null?void 0:V.filter((B,ue)=>k!==ue),C.value=V,l("change",R(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:C==null?void 0:C.value}]});return(k,V)=>{const B=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Mp,[e.createElementVNode("div",zp,[V[1]||(V[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(St.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:V[0]||(V[0]=ue=>h(ue))},null,8,["rowContents"])])]),e.createVNode(kl.default,{class:"collapse-content",collapseContents:H.value},{title:e.withCtx(({item:ue,index:Re})=>[e.createElementVNode("div",Pp,[e.createElementVNode("div",Rp,e.toDisplayString(ue.name),1),e.createElementVNode("div",Fp,[e.createElementVNode("div",{onClick:e.withModifiers(tt=>D(Re),["stop"]),class:"icon-content"},[e.createVNode(B,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Lp)])])]),content:e.withCtx(({item:ue,index:Re})=>[e.createElementVNode("div",$p,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:_.value[Re],key:Re,isEnableWrap:!0,onChange:tt=>Z(tt,Re)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(U(ue.comp+"Operate")),{itemContents:ue==null?void 0:ue.compData,originalItemContents:ue.compData,onChange:tt=>pe(tt,ue,Re)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Up=Pt._export_sfc(jp,[["__scopeId","data-v-ba05456e"]]),Kp=typeof window<"u";var Go;Kp&&((Go=window==null?void 0:window.navigator)!=null&&Go.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function dn(a){return a==null}function Fl(){}const Wp=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Wp)));function Hp(){const a=new Map;return{on(i,s){const l=a.get(i);l!=null&&l.add(s)||a.set(i,new Set([s]))},off(i,s){const l=a.get(i);l&&l.delete(s)},clear(i){const s=a.get(i);s&&s.clear()},clearAll(){a.clear()},emit(i,...s){const l=a.get(i);l&&l.forEach(c=>{c(...s)})}}}function Xo(a,i=16){if(typeof a!="function")return Fl;const s=(...d)=>{a(...d)};if(i<=0)return Ll(s);let l=0,c;return function(...d){const b=Date.now(),v=b-l;clearTimeout(c),v>=i?(l=b,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-v))}}function qp(a,i=100){if(typeof a!="function")return Fl;const s=(...c)=>{a(...c)};if(i<=0)return Ll(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function Ll(a){if(typeof a!="function")return a;let i=!1,s,l;return function(...c){return s=c,i||(i=!0,l=Promise.resolve().then(()=>(i=!1,l=void 0,a(...s)))),l}}const ya=new Set,$l=new WeakMap;function Gp(){ya.forEach(a=>{a(...$l.get(a))}),ya.clear()}function an(a,...i){if(typeof a!="function")return a;$l.set(a,i),!ya.has(a)&&(ya.add(a),ya.size===1&&Promise.resolve().then(Gp))}const jl=Symbol("LAYOUT_KEY"),Ul=Symbol("EMITTER_KEY");function Xp(a){let i=0,s;for(let l=0,c=a.length;l<c;l++)s=a[l].y+a[l].h,s>i&&(i=s);return i}function po(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=Yp(a[s]);return i}function Yp(a){return{...a}}function Kl(a,i){return!(a===i||a.x+a.w<=i.x||a.x>=i.x+i.w||a.y+a.h<=i.y||a.y>=i.y+i.h)}function Qn(a,i,s){const l=Hl(a),c=ql(a),d=Array(a.length);for(let b=0,v=c.length;b<v;b++){let h=c[b];h.static||(h=Jp(l,h,i,s),l.push(h)),d[a.findIndex(C=>C.i===h.i)]=h,h.moved=!1}return d}function Jp(a,i,s,l){if(s)for(;i.y>0&&!ba(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!ba(a,i);)i.y--}let c;for(;c=ba(a,i);)i.y=c.y+c.h;return i}function Zp(a,i){const s=Hl(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>i.cols&&(d.x=i.cols-d.w),d.x<0&&(d.x=0,d.w=i.cols),!d.static)s.push(d);else for(;ba(s,d);)d.y++}return a}function Yo(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function ba(a,i){for(let s=0,l=a.length;s<l;s++)if(Kl(a[s],i))return a[s]}function Wl(a,i){return a.filter(s=>Kl(s,i))}function Hl(a){return a.filter(i=>i.static)}function fo(a,i,s,l,c=!1,d=!1){if(i.static)return a;const b=i.x,v=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let C=ql(a);h&&(C=C.reverse());const _=Wl(C,i);if(d&&_.length)return i.x=b,i.y=v,i.moved=!1,a;for(let I=0,P=_.length;I<P;I++){const z=_[I];z.moved||i.y>z.y&&i.y-z.y>z.h/4||(z.static?a=Jo(a,z,i,c):a=Jo(a,i,z,c))}return a}function Jo(a,i,s,l){if(l){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(i.y-s.h,0),!ba(a,c))return fo(a,s,void 0,c.y,!1)}return fo(a,s,void 0,s.y+1,!1)}function Qp(a,i,s,l){const c="translate3d("+i+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function ed(a,i,s,l){const c="translate3d("+i*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function td(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function nd(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function ql(a){return Array.from(a).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function ad(a,i){i=i||"Layout";const s=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(i+" must be an array!");for(let c=0,d=a.length;c<d;c++){const b=a[c];for(let v=0;v<s.length;v++)if(typeof b[s[v]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[v]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(l.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(l.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function od(a,i="vgl"){const s=()=>`${i}-${a}`;return{b:s,be:l=>`${s()}__${l}`,bm:l=>`${s()}--${l}`,bem:(l,c)=>`${s()}__${l}--${c}`}}function Zo(a){return ld(a)}function ld(a){var i;const s=((i=a.target)==null?void 0:i.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=a.clientX+s.scrollLeft-l.left,d=a.clientY+s.scrollTop-l.top;return{x:c,y:d}}function Qo(a,i,s,l){return rd(a)?{deltaX:s-a,deltaY:l-i,lastX:a,lastY:i,x:s,y:l}:{deltaX:0,deltaY:0,lastX:s,lastY:l,x:s,y:l}}function rd(a){return typeof a=="number"&&!Number.isNaN(a)}function id(a,i){const s=Xl(a);let l=s[0];for(let c=1,d=s.length;c<d;c++){const b=s[c];i>a[b]&&(l=b)}return l}function Gl(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function sd(a,i,s,l,c,d,b){if(i[l])return po(i[l]);let v=a;const h=Xl(s),C=h.slice(h.indexOf(l));for(let _=0,I=C.length;_<I;_++){const P=C[_];if(i[P]){v=i[P];break}}return v=po(v||[]),Qn(Zp(v,{cols:d}),b)}function Xl(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let cd="auto";function ud(){return typeof document<"u"}function el(){return ud()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):cd}var ga={exports:{}},pd=ga.exports,tl;function dd(){return tl||(tl=1,function(a,i){(function(s,l){a.exports=l()})(pd,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function b(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,Ee(r.key),r)}}function v(n,t,o){return t&&b(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=Ee(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function C(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&I(n,t)}function _(n){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(n)}function I(n,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},I(n,t)}function P(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function z(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,r=_(n);if(t){var u=_(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P(f)}(this,o)}}function H(){return H=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,g){for(;!Object.prototype.hasOwnProperty.call(f,g)&&(f=_(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},H.apply(this,arguments)}function Ee(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var Z=function(n){return!(!n||!n.Window)&&n instanceof n.Window},U=void 0,pe=void 0;function D(n){U=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),pe=n}function R(n){return Z(n)?n:(n.ownerDocument||n).defaultView||pe.window}typeof window<"u"&&window&&D(window);var k=function(n){return!!n&&c(n)==="object"},V=function(n){return typeof n=="function"},B={window:function(n){return n===pe||Z(n)},docFrag:function(n){return k(n)&&n.nodeType===11},object:k,func:V,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=R(n)||pe;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return k(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return k(n)&&n.length!==void 0&&V(n.splice)}};function ue(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Re(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var tt={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=tt.draggable,t.map.drag=tt,t.methodDict.drag="draggable",r.actions.drag=tt.defaults},listeners:{"interactions:before-action-move":ue,"interactions:action-resume":ue,"interactions:action-move":Re,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return B.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):B.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:ue,move:Re,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ve=tt,Ue={init:function(n){var t=n;Ue.document=t.document,Ue.DocumentFragment=t.DocumentFragment||De,Ue.SVGElement=t.SVGElement||De,Ue.SVGSVGElement=t.SVGSVGElement||De,Ue.SVGElementInstance=t.SVGElementInstance||De,Ue.Element=t.Element||De,Ue.HTMLElement=t.HTMLElement||Ue.Element,Ue.Event=t.Event,Ue.Touch=t.Touch||De,Ue.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function De(){}var A=Ue,le={init:function(n){var t=A.Element,o=n.navigator||{};le.supportsTouch="ontouchstart"in n||B.func(n.DocumentTouch)&&A.document instanceof n.DocumentTouch,le.supportsPointerEvent=o.pointerEnabled!==!1&&!!A.PointerEvent,le.isIOS=/iP(hone|od|ad)/.test(o.platform),le.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),le.isIe9=/MSIE 9/.test(o.userAgent),le.isOperaMobile=o.appName==="Opera"&&le.supportsTouch&&/Presto/.test(o.userAgent),le.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",le.pEventTypes=le.supportsPointerEvent?A.PointerEvent===n.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,le.wheelEvent=A.document&&"onmousewheel"in A.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ae=le;function me(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function je(n,t){for(;B.element(n);){if(Ne(n,t))return n;n=lt(n)}return null}function lt(n){var t=n.parentNode;if(B.docFrag(t)){for(;(t=t.host)&&B.docFrag(t););return t}return t}function Ne(n,t){return pe!==U&&(t=t.replace(/\/deep\//g," ")),n[ae.prefixedMatchesSelector](t)}var S=function(n){return n.parentNode||n.host};function Ie(n,t){for(var o,r=[],u=n;(o=S(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function se(n,t,o){for(;B.element(n);){if(Ne(n,t))return!0;if((n=lt(n))===o)return Ne(n,t)}return!1}function Me(n){return n.correspondingUseElement||n}function Fe(n){var t=n instanceof A.SVGElement?n.getBoundingClientRect():n.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Ce(n){var t,o=Fe(n);if(!ae.isIOS7&&o){var r={x:(t=(t=R(n))||pe).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function Le(n){for(var t=[];n;)t.push(n),n=lt(n);return t}function rt(n){return!!B.string(n)&&(A.document.querySelector(n),!0)}function Q(n,t){for(var o in t)n[o]=t[o];return n}function Ye(n,t,o){return n==="parent"?lt(o):n==="self"?t.getRect(o):je(o,n)}function ct(n,t,o,r){var u=n;return B.string(u)?u=Ye(u,t,o):B.func(u)&&(u=u.apply(void 0,r)),B.element(u)&&(u=Ce(u)),u}function Qe(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ne(n){return!n||"x"in n&&"y"in n||((n=Q({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function re(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function _e(n,t,o){var r=o&&n.options[o];return Qe(ct(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function ye(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},B.string(n)&&n.search(" ")!==-1&&(n=Xe(n)),B.array(n))return n.forEach(function(T){return ye(T,t,o,r)}),r;if(B.object(n)&&(t=n,n=""),B.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(B.array(t))for(var u=0,f=t;u<f.length;u++){var g=f[u];ye(n,g,o,r)}else if(B.object(t))for(var y in t)ye(Xe(y).map(function(T){return"".concat(n).concat(T)}),t[y],o,r);return r}function Xe(n){return n.trim().split(/ +/)}var Ze=function(n,t){return Math.sqrt(n*n+t*t)},x=["webkit","moz"];function w(n,t){n.__set||(n.__set={});var o=function(u){if(x.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function m(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function L(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function E(n){return n instanceof A.Event||n instanceof A.Touch}function M(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function ie(n,t){return t=t||{x:0,y:0},ae.isOperaMobile&&E(n)?(M("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):M("page",n,t),t}function q(n){return B.number(n.pointerId)?n.pointerId:n.identifier}function K(n,t,o){var r=t.length>1?ee(t):t[0];ie(r,n.page),function(u,f){f=f||{},ae.isOperaMobile&&E(u)?M("screen",u,f):M("client",u,f)}(r,n.client),n.timeStamp=o}function oe(n){var t=[];return B.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function ee(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function de(n){if(!n.length)return null;var t=oe(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function he(n,t){var o=t+"X",r=t+"Y",u=oe(n),f=u[0][o]-u[1][o],g=u[0][r]-u[1][r];return Ze(f,g)}function J(n,t){var o=t+"X",r=t+"Y",u=oe(n),f=u[1][o]-u[0][o],g=u[1][r]-u[0][r];return 180*Math.atan2(g,f)/Math.PI}function ve(n){return B.string(n.pointerType)?n.pointerType:B.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof A.Touch?"touch":"mouse"}function W(n){var t=B.func(n.composedPath)?n.composedPath():n.path;return[Me(t?t[0]:n.target),Me(n.currentTarget)]}var Oe=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Oe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Se=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},ge=function(n){return Se([],n)},F=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},G=function(n,t){return n[F(n,t)]},X=function(n){C(o,n);var t=z(o);function o(r,u,f){var g;d(this,o),(g=t.call(this,u._interaction)).dropzone=void 0,g.dragEvent=void 0,g.relatedTarget=void 0,g.draggable=void 0,g.propagationStopped=!1,g.immediatePropagationStopped=!1;var y=f==="dragleave"?r.prev:r.cur,T=y.element,$=y.dropzone;return g.type=f,g.target=T,g.currentTarget=T,g.dropzone=$,g.dragEvent=u,g.relatedTarget=u.target,g.draggable=u.interactable,g.timeStamp=u.timeStamp,g}return v(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,g=F(f,function(T){var $=T.dropzone,N=T.element;return $===r.dropzone&&N===r.target});u.activeDrops.splice(g,1);var y=new o(u,this.dragEvent,"dropdeactivate");y.dropzone=this.dropzone,y.target=this.target,this.dropzone.fire(y)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(Oe);function O(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,g=u.element;t.dropzone=f,t.target=g,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Ae(n,t){for(var o=function(f,g){for(var y=[],T=0,$=f.interactables.list;T<$.length;T++){var N=$[T];if(N.options.drop.enabled){var te=N.options.drop.accept;if(!(B.element(te)&&te!==g||B.string(te)&&!Ne(g,te)||B.func(te)&&!te({dropzone:N,draggableElement:g})))for(var we=0,$e=N.getAllElements();we<$e.length;we++){var Pe=$e[we];Pe!==g&&y.push({dropzone:N,element:Pe,rect:N.getRect(Pe)})}}}return y}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Ke(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,g=[],y=0,T=r.activeDrops;y<T.length;y++){var $=T[y],N=$.dropzone,te=$.element,we=$.rect,$e=N.dropCheck(t,o,u,f,te,we);g.push($e?te:null)}var Pe=function(He){for(var at,et,dt,bt=[],It=0;It<He.length;It++){var vt=He[It],xt=He[at];if(vt&&It!==at)if(xt){var nn=S(vt),jt=S(xt);if(nn!==vt.ownerDocument)if(jt!==vt.ownerDocument)if(nn!==jt){bt=bt.length?bt:Ie(xt);var pn=void 0;if(xt instanceof A.HTMLElement&&vt instanceof A.SVGElement&&!(vt instanceof A.SVGSVGElement)){if(vt===jt)continue;pn=vt.ownerSVGElement}else pn=vt;for(var En=Ie(pn,xt.ownerDocument),An=0;En[An]&&En[An]===bt[An];)An++;var Pa=[En[An-1],En[An],bt[An]];if(Pa[0])for(var fa=Pa[0].lastChild;fa;){if(fa===Pa[1]){at=It,bt=En;break}if(fa===Pa[2])break;fa=fa.previousSibling}}else dt=xt,(parseInt(R(et=vt).getComputedStyle(et).zIndex,10)||0)>=(parseInt(R(dt).getComputedStyle(dt).zIndex,10)||0)&&(at=It);else at=It}else at=It}return at}(g);return r.activeDrops[Pe]||null}function be(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new X(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new X(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new X(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new X(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new X(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new X(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function Be(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&O(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function xe(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Ae(t,o.element));var g=r,y=Ke(o,g,u);f.rejected=f.rejected&&!!y&&y.dropzone===f.cur.dropzone&&y.element===f.cur.element,f.cur.dropzone=y&&y.dropzone,f.cur.element=y&&y.element,f.events=be(o,0,g)}}var ot={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Ve),r.prototype.dropzone=function(f){return function(g,y){if(B.object(y)){if(g.options.drop.enabled=y.enabled!==!1,y.listeners){var T=ye(y.listeners),$=Object.keys(T).reduce(function(te,we){return te[/^(enter|leave)/.test(we)?"drag".concat(we):/^(activate|deactivate|move)/.test(we)?"drop".concat(we):we]=T[we],te},{}),N=g.options.drop.listeners;N&&g.off(N),g.on($),g.options.drop.listeners=$}return B.func(y.ondrop)&&g.on("drop",y.ondrop),B.func(y.ondropactivate)&&g.on("dropactivate",y.ondropactivate),B.func(y.ondropdeactivate)&&g.on("dropdeactivate",y.ondropdeactivate),B.func(y.ondragenter)&&g.on("dragenter",y.ondragenter),B.func(y.ondragleave)&&g.on("dragleave",y.ondragleave),B.func(y.ondropmove)&&g.on("dropmove",y.ondropmove),/^(pointer|center)$/.test(y.overlap)?g.options.drop.overlap=y.overlap:B.number(y.overlap)&&(g.options.drop.overlap=Math.max(Math.min(1,y.overlap),0)),"accept"in y&&(g.options.drop.accept=y.accept),"checker"in y&&(g.options.drop.checker=y.checker),g}return B.bool(y)?(g.options.drop.enabled=y,g):g.options.drop}(this,f)},r.prototype.dropCheck=function(f,g,y,T,$,N){return function(te,we,$e,Pe,He,at,et){var dt=!1;if(!(et=et||te.getRect(at)))return!!te.options.drop.checker&&te.options.drop.checker(we,$e,dt,te,at,Pe,He);var bt=te.options.drop.overlap;if(bt==="pointer"){var It=_e(Pe,He,"drag"),vt=ie(we);vt.x+=It.x,vt.y+=It.y;var xt=vt.x>et.left&&vt.x<et.right,nn=vt.y>et.top&&vt.y<et.bottom;dt=xt&&nn}var jt=Pe.getRect(He);if(jt&&bt==="center"){var pn=jt.left+jt.width/2,En=jt.top+jt.height/2;dt=pn>=et.left&&pn<=et.right&&En>=et.top&&En<=et.bottom}return jt&&B.number(bt)&&(dt=Math.max(0,Math.min(et.right,jt.right)-Math.max(et.left,jt.left))*Math.max(0,Math.min(et.bottom,jt.bottom)-Math.max(et.top,jt.top))/(jt.width*jt.height)>=bt),te.options.drop.checker&&(dt=te.options.drop.checker(we,$e,dt,te,at,Pe,He)),dt}(this,f,g,y,T,$,N)},o.dynamicDrop=function(f){return B.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},Q(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=ot.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Ae(t,o.element),u.events=be(o,0,r),u.events.activate&&(O(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":xe,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;Be(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;xe(n,t),Be(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:Ae,getDrop:Ke,getDropEvents:be,fireDropEvents:Be,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},We=ot;function Y(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function($){return $.pointer}),f=r==="start",g=r==="end",y=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=he(u,y),o.box=de(u),o.scale=1,o.ds=0,o.angle=J(u,y),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(g||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=he(u,y),o.box=de(u),o.scale=o.distance/t.gesture.startDistance,o.angle=J(u,y),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,B.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var ce={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return B.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):B.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=ce,t.methodDict.gesture="gesturable",r.actions.gesture=ce.defaults},listeners:{"interactions:action-start":Y,"interactions:action-move":Y,"interactions:action-end":Y,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},fe=ce;function ze(n,t,o,r,u,f,g){if(!t)return!1;if(t===!0){var y=B.number(f.width)?f.width:f.right-f.left,T=B.number(f.height)?f.height:f.bottom-f.top;if(g=Math.min(g,Math.abs((n==="left"||n==="right"?y:T)/2)),y<0&&(n==="left"?n="right":n==="right"&&(n="left")),T<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var $=y>=0?f.left:f.right;return o.x<$+g}if(n==="top"){var N=T>=0?f.top:f.bottom;return o.y<N+g}if(n==="right")return o.x>(y>=0?f.right:f.left)-g;if(n==="bottom")return o.y>(T>=0?f.bottom:f.top)-g}return!!B.element(r)&&(B.element(t)?t===r:se(r,t,u))}function it(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var j,Ge,qe={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;qe.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),qe.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(g,y,T){return B.object(y)?(g.options.resize.enabled=y.enabled!==!1,g.setPerAction("resize",y),g.setOnEvents("resize",y),B.string(y.axis)&&/^x$|^y$|^xy$/.test(y.axis)?g.options.resize.axis=y.axis:y.axis===null&&(g.options.resize.axis=T.defaults.actions.resize.axis),B.bool(y.preserveAspectRatio)?g.options.resize.preserveAspectRatio=y.preserveAspectRatio:B.bool(y.square)&&(g.options.resize.square=y.square),g):B.bool(y)?(g.options.resize.enabled=y,g):g.options.resize}(this,f,n)},t.map.resize=qe,t.methodDict.resize="resizable",u.actions.resize=qe.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:Q({},f),corrected:Q({},f),previous:Q({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),it(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,g=f==="reposition"||f==="negate",y=r.rect,T=r._rects,$=T.start,N=T.corrected,te=T.delta,we=T.previous;if(Q(we,N),g){if(Q(N,y),f==="reposition"){if(N.top>N.bottom){var $e=N.top;N.top=N.bottom,N.bottom=$e}if(N.left>N.right){var Pe=N.left;N.left=N.right,N.right=Pe}}}else N.top=Math.min(y.top,$.bottom),N.bottom=Math.max(y.bottom,$.top),N.left=Math.min(y.left,$.right),N.right=Math.max(y.right,$.left);for(var He in N.width=N.right-N.left,N.height=N.bottom-N.top,N)te[He]=N[He]-we[He];u.edges=r.prepared.edges,u.rect=N,u.deltaRect=te}})(n),it(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var g=Q({},t.coords.cur.page),y=o.options.resize;if(y&&y.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&y.mouseButtons)!=0)){if(B.object(y.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var $ in T)T[$]=ze($,y.edges[$],g,t._latestPointer.eventTarget,r,u,y.margin||qe.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(n.action={name:"resize",edges:T})}else{var N=y.axis!=="y"&&g.x>u.right-qe.defaultMargin,te=y.axis!=="x"&&g.y>u.bottom-qe.defaultMargin;(N||te)&&(n.action={name:"resize",axes:(N?"x":"")+(te?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=qe.cursors,f=null;if(o)f=u[r+o];else if(t){for(var g="",y=0,T=["top","bottom","left","right"];y<T.length;y++){var $=T[y];t[$]&&(g+=$)}f=u[g]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},pt=qe,gt={id:"actions",install:function(n){n.usePlugin(fe),n.usePlugin(pt),n.usePlugin(Ve),n.usePlugin(We)}},ft=0,st={request:function(n){return j(n)},cancel:function(n){return Ge(n)},init:function(n){if(j=n.requestAnimationFrame,Ge=n.cancelAnimationFrame,!j)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];j=n["".concat(r,"RequestAnimationFrame")],Ge=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}j=j&&j.bind(n),Ge=Ge&&Ge.bind(n),j||(j=function(u){var f=Date.now(),g=Math.max(0,16-(f-ft)),y=n.setTimeout(function(){u(f+g)},g);return ft=f+g,y},Ge=function(u){return clearTimeout(u)})}},ke={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(n){ke.isScrolling=!0,st.cancel(ke.i),n.autoScroll=ke,ke.interaction=n,ke.prevTime=ke.now(),ke.i=st.request(ke.scroll)},stop:function(){ke.isScrolling=!1,ke.interaction&&(ke.interaction.autoScroll=null),st.cancel(ke.i)},scroll:function(){var n=ke.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Je(u.container,t,o),g=ke.now(),y=(g-ke.prevTime)/1e3,T=u.speed*y;if(T>=1){var $={x:ke.x*T,y:ke.y*T};if($.x||$.y){var N=nt(f);B.window(f)?f.scrollBy($.x,$.y):f&&(f.scrollLeft+=$.x,f.scrollTop+=$.y);var te=nt(f),we={x:te.x-N.x,y:te.y-N.y};(we.x||we.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:we,interaction:n,container:f})}ke.prevTime=g}ke.isScrolling&&(st.cancel(ke.i),ke.i=st.request(ke.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&ke.check(t.interactable,t.prepared.name))if(t.simulation)ke.x=ke.y=0;else{var r,u,f,g,y=t.interactable,T=t.element,$=t.prepared.name,N=y.options[$].autoScroll,te=Je(N.container,y,T);if(B.window(te))g=o.clientX<ke.margin,r=o.clientY<ke.margin,u=o.clientX>te.innerWidth-ke.margin,f=o.clientY>te.innerHeight-ke.margin;else{var we=Fe(te);g=o.clientX<we.left+ke.margin,r=o.clientY<we.top+ke.margin,u=o.clientX>we.right-ke.margin,f=o.clientY>we.bottom-ke.margin}ke.x=u?1:g?-1:0,ke.y=f?1:r?-1:0,ke.isScrolling||(ke.margin=N.margin,ke.speed=N.speed,ke.start(t))}}};function Je(n,t,o){return(B.string(n)?Ye(n,t,o):n)||R(o)}function nt(n){return B.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var ut={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=ke,ke.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=ke.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,ke.stop(),ke.interaction&&(ke.interaction=null)},"interactions:stop":ke.stop,"interactions:action-move":function(n){return ke.onInteractionMove(n)}}},Dt=ut;function Ct(n,t){var o=!1;return function(){return o||(pe.console.warn(t),o=!0),n.apply(this,arguments)}}function yt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function Et(n){return B.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Vt(n){return B.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Mt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var g=function(y,T,$,N,te){var we=y.getRect(N),$e=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Pe={action:null,interactable:y,interaction:$,element:N,rect:we,buttons:$e};return te.fire("auto-start:check",Pe),Pe.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,g,this,f,u):g},t.prototype.ignoreFrom=Ct(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Ct(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Vt,t.prototype.styleCursor=Et}};function Nt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&Wt(t,o,n,u)?n:null}function Tt(n,t,o,r,u,f,g){for(var y=0,T=r.length;y<T;y++){var $=r[y],N=u[y],te=$.getAction(t,o,n,N);if(te){var we=Nt(te,$,N,f,g);if(we)return{action:we,interactable:$,element:N}}}return{action:null,interactable:null,element:null}}function Ht(n,t,o,r,u){var f=[],g=[],y=r;function T(N){f.push(N),g.push(y)}for(;B.element(y);){f=[],g=[],u.interactables.forEachMatch(y,T);var $=Tt(n,t,o,f,g,r,u);if($.action&&!$.interactable.options[$.action.name].manualStart)return $;y=lt(y)}return{action:null,interactable:null,element:null}}function on(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,yt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,wn(n,o),o.fire("autoStart:prepared",{interaction:n})}function Wt(n,t,o,r){var u=n.options,f=u[o.name].max,g=u[o.name].maxPerElement,y=r.autoStart.maxInteractions,T=0,$=0,N=0;if(!(f&&g&&y))return!1;for(var te=0,we=r.interactions.list;te<we.length;te++){var $e=we[te],Pe=$e.prepared.name;if($e.interacting()&&(++T>=y||$e.interactable===n&&(($+=Pe===o.name?1:0)>=f||$e.element===t&&(N++,Pe===o.name&&N>=g))))return!1}return y>0}function xn(n,t){return B.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function hn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function wn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var g=o.options[u.name].cursorChecker;f=B.func(g)?g(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}hn(n.element,f||"",t)}else t.autoStart.cursorElement&&hn(t.autoStart.cursorElement,"",t)}var Sn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Mt),o.base.actionChecker=null,o.base.styleCursor=!0,Q(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return xn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Wt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||on(o,Ht(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,g=o.event,y=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||on(u,Ht(u,f,g,y,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,g=u.prepared.name;g&&f&&(f.options[g].manualStart||!Wt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),wn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&hn(o.element,"",t)}},maxInteractions:xn,withinInteractionLimit:Wt,validateAction:Nt},vn=Sn,Tn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var g=Math.abs(u),y=Math.abs(f),T=o.interactable.options.drag,$=T.startAxis,N=g>y?"x":g<y?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&$!=="xy"&&$!==N){o.prepared.name=null;for(var te=r,we=function(Pe){if(Pe!==o.interactable){var He=o.interactable.options.drag;if(!He.manualStart&&Pe.testIgnoreAllow(He,te,r)){var at=Pe.getAction(o.downPointer,o.downEvent,o,te);if(at&&at.name==="drag"&&function(et,dt){if(!dt)return!1;var bt=dt.options.drag.startAxis;return et==="xy"||bt==="xy"||bt===et}(N,Pe)&&vn.validateAction(at,Pe,te,r,t))return Pe}}};B.element(te);){var $e=t.interactables.forEachMatch(te,we);if($e){o.prepared.name="drag",o.interactable=$e,o.element=te;break}te=lt(te)}}}}}};function gn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var mt={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(vn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=gn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;gn(t)>0&&(t.prepared.name=null)}},getHoldDuration:gn},Yt=mt,ht={id:"auto-start",install:function(n){n.usePlugin(vn),n.usePlugin(Yt),n.usePlugin(Tn)}},zn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):B.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function wt(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var cn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=zn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var g=r.options.preventDefault;if(g!=="never")if(g!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var y=R(f.target).document,T=u.getDocOptions(y);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||B.element(f.target)&&Ne(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||me(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=wt,n},{})};function mn(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function Xt(n){var t={};for(var o in n){var r=n[o];B.plainObject(r)?t[o]=Xt(r):B.array(r)?t[o]=ge(r):t[o]=r}return t}var yn=function(){function n(t){d(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=Jt(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,g=this.interaction,y=function($){var N=$.interactable.options[$.prepared.name],te=N.modifiers;return te&&te.length?te:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(we){var $e=N[we];return $e&&$e.enabled&&{options:$e,methods:$e._methods}}).filter(function(we){return!!we})}(g);this.prepareStates(y),this.startEdges=Q({},g.edges),this.edges=Q({},this.startEdges),this.startOffset=(r=g.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=Jt(),this.startAll(T),this.result=this.setAll(T)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,g=t.edges;t.coords=Q({},t.pageCoords),t.rect=Q({},f),t.edges=Q({},g);for(var y=u?this.states.slice(u):this.states,T=Jt(t.coords,t.rect),$=0;$<y.length;$++){var N,te=y[$],we=te.options,$e=Q({},t.coords),Pe=null;(N=te.methods)!=null&&N.set&&this.shouldDo(we,r,o)&&(t.state=te,Pe=te.methods.set(t),re(t.edges,t.rect,{x:t.coords.x-$e.x,y:t.coords.y-$e.y})),T.eventProps.push(Pe)}Q(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-f.left,T.rectDelta.right=t.rect.right-f.right,T.rectDelta.top=t.rect.top-f.top,T.rectDelta.bottom=t.rect.bottom-f.bottom;var He=this.result.coords,at=this.result.rect;if(He&&at){var et=T.rect.left!==at.left||T.rect.right!==at.right||T.rect.top!==at.top||T.rect.bottom!==at.bottom;T.changed=et||He.x!==T.coords.x||He.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,g=this.result,y=this.startDelta,T=g.delta;r==="start"&&Q(this.startDelta,g.delta);for(var $=0,N=[[f,y],[u,T]];$<N.length;$++){var te=N[$],we=te[0],$e=te[1];we.page.x+=$e.x,we.page.y+=$e.y,we.client.x+=$e.x,we.client.y+=$e.y}var Pe=this.result.rectDelta,He=t.rect||o.rect;He.left+=Pe.left,He.right+=Pe.right,He.top+=Pe.top,He.bottom+=Pe.bottom,He.width=He.right-He.left,He.height=He.bottom-He.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,g=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=g,!g.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var y=o.coords.cur.page,T={x:t.modifiedCoords.x-y.x,y:t.modifiedCoords.y-y.y};g.coords.x+=T.x,g.coords.y+=T.y,g.delta.x+=T.x,g.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,g=0;g<u.length;g++){var y=u[g];t.state=y;var T=y.options,$=y.methods,N=$.beforeEnd&&$.beforeEnd(t);if(N)return this.endResult=N,!1;f=f||!f&&this.shouldDo(T,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=Q({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var g=f[u];r.state=g,g.methods.stop&&g.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,g=r.name;this.states.push({options:u,methods:f,index:o,name:g})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var g=f.startDelta,y=f.result,T=y.delta,$=y.rectDelta,N=0,te=[[r.start,g],[r.cur,T]];N<te.length;N++){var we=te[N],$e=we[0],Pe=we[1];$e.page.x-=Pe.x,$e.page.y-=Pe.y,$e.client.x-=Pe.x,$e.client.y-=Pe.y}u.left-=$.left,u.right-=$.right,u.top-=$.top,u.bottom-=$.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return Xt(o)}),this.result=Jt(Q({},t.result.coords),Q({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function Jt(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ln(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var g=f||{};for(var y in g.enabled=g.enabled!==!1,o)y in g||(g[y]=o[y]);var T={options:g,methods:r,name:t,enable:function(){return g.enabled=!0,T},disable:function(){return g.enabled=!1,T}};return T};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function Qt(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Ea={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new yn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":Qt,"interactions:action-move":Qt,"interactions:action-end":Qt,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},la=Ea,ra={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Jn=function(n){C(o,n);var t=z(o);function o(r,u,f,g,y,T,$){var N;d(this,o),(N=t.call(this,r)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,y=y||r.element;var te=r.interactable,we=(te&&te.options||ra).deltaSource,$e=_e(te,y,f),Pe=g==="start",He=g==="end",at=Pe?P(N):r.prevEvent,et=Pe?r.coords.start:He?{page:at.page,client:at.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return N.page=Q({},et.page),N.client=Q({},et.client),N.rect=Q({},r.rect),N.timeStamp=et.timeStamp,He||(N.page.x-=$e.x,N.page.y-=$e.y,N.client.x-=$e.x,N.client.y-=$e.y),N.ctrlKey=u.ctrlKey,N.altKey=u.altKey,N.shiftKey=u.shiftKey,N.metaKey=u.metaKey,N.button=u.button,N.buttons=u.buttons,N.target=y,N.currentTarget=y,N.preEnd=T,N.type=$||f+(g||""),N.interactable=te,N.t0=Pe?r.pointers[r.pointers.length-1].downTime:at.t0,N.x0=r.coords.start.page.x-$e.x,N.y0=r.coords.start.page.y-$e.y,N.clientX0=r.coords.start.client.x-$e.x,N.clientY0=r.coords.start.client.y-$e.y,N.delta=Pe||He?{x:0,y:0}:{x:N[we].x-at[we].x,y:N[we].y-at[we].y},N.dt=r.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=Q({},r.coords.velocity[we]),N.speed=Ze(N.velocity.x,N.velocity.y),N.swipe=He||g==="inertiastart"?N.getSwipe():null,N}return v(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,g=202.5<=u&&u<337.5;return{up:g,down:!g&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(Oe);Object.defineProperties(Jn.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var _a=v(function n(t,o,r,u,f){d(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=r,this.downTime=u,this.downTarget=f}),Sa=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),ia=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Ta=0,Ia=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Ct(function(N){this.move(N)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ta++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var g=function(N){Object.defineProperty(o._proxy,N,{get:function(){return f[N]}})};for(var y in Sa)g(y);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return f[N].apply(f,arguments)}})};for(var $ in ia)T($);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(yt(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?Q({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,g=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ze(u,f)>this.pointerMoveTolerance);var y,T,$,N=this.getPointerIndex(t),te={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:g,interaction:this};g||(y=this.coords.velocity,T=this.coords.delta,$=Math.max(T.timeStamp/1e3,.001),y.page.x=T.page.x/$,y.page.y=T.page.y/$,y.client.x=T.client.x/$,y.client.y=T.client.y/$,y.timeStamp=$),this._scopeFire("interactions:move",te),g||this.simulation||(this.interacting()&&(te.type=null,this.move(te)),this.pointerWasMoved&&m(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||L(this.coords.delta),(t=Q({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var g=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:g,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=q(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:F(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,g,y,T=q(t),$=this.getPointerIndex(t),N=this.pointers[$];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new _a(T,t,o,null,null),$=this.pointers.length,this.pointers.push(N)),K(this.coords.cur,this.pointers.map(function(te){return te.pointer}),this._now()),f=this.coords.delta,g=this.coords.prev,y=this.coords.cur,f.page.x=y.page.x-g.page.x,f.page.y=y.page.y-g.page.y,f.client.x=y.client.x-g.client.x,f.client.y=y.client.y-g.client.y,f.timeStamp=y.timeStamp-g.timeStamp,u&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=r,w(this.downPointer,t),this.interacting()||(m(this.coords.start,this.coords.cur),m(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:N,pointerIndex:$,interaction:this}),$}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new Jn(this,t,this.prepared.name,o,this.element,r,u)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,r=t.phase,u=t.preEnd,f=t.type,g=this.rect;if(g&&r==="move"&&(re(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var y=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=y),this._fireEvent(y),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function sa(n){ca(n.interaction)}function ca(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Fn(n.coords.cur,t),Fn(n.coords.delta,t),re(n.edges,n.rect,t),t.x=0,t.y=0,!0}function Ba(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Fn(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}ia.offsetBy="";var Rt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=Ba},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(Fn(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":sa,"interactions:before-action-move":sa,"interactions:before-action-end":function(n){var t=n.interaction;if(ca(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},Ut=Rt,un=function(){function n(t){d(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return v(n,[{key:"start",value:function(t){var o=this.interaction,r=kt(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=Ze(u.x,u.y),g=this.modification||(this.modification=new yn(o));if(g.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=g.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,r=kt(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var g=this.modification,y=this.modifierArg;y.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(y),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=st.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,g,y,T=this,$=this.interaction,N=kt($).resistance,te=($._now()-this.t0)/1e3;if(te<this.te){var we,$e=1-(Math.exp(-N*te)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,g=this.modifiedOffset.y,we={x:$t(y=$e,t,r,f),y:$t(y,o,u,g)}):we={x:this.targetOffset.x*$e,y:this.targetOffset.y*$e};var Pe={x:we.x-this.currentOffset.x,y:we.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,$.offsetBy(Pe),$.move(),this.onNextFrame(function(){return T.inertiaTick()})}else $.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=kt(o).smoothEndDuration;if(r<u){var f={x:Kt(r,0,this.targetOffset.x,u),y:Kt(r,0,this.targetOffset.y,u)},g={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=g.x,this.currentOffset.y+=g.y,o.offsetBy(g),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),m(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,st.cancel(this.timeout)}}]),n}();function kt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ot={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(Ut),n.usePlugin(la),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new un(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;B.element(u);){if(u===t.element){r.resume(n);break}u=lt(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":Qt,"interactions:action-inertiastart":Qt,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function $t(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function Kt(n,t,o,r){return-o*(n/=r)*(n-2)+t}var Lt=Ot;function rn(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var sn=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=Q({},t||{})}return v(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&rn(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&rn(t,o)}},{key:"on",value:function(t,o){var r=ye(t,o);for(t in r)this.types[t]=Se(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=ye(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,g=r[t];f<g.length;f++){var y=g[f],T=u.indexOf(y);T!==-1&&u.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Ln=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,w(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Dn(n){return B.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function $n(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Aa={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:g,remove:y,addDelegate:function(N,te,we,$e,Pe){var He=Dn(Pe);if(!r[we]){r[we]=[];for(var at=0;at<u.length;at++){var et=u[at];g(et,we,T),g(et,we,$,!0)}}var dt=r[we],bt=G(dt,function(It){return It.selector===N&&It.context===te});bt||(bt={selector:N,context:te,listeners:[]},dt.push(bt)),bt.listeners.push({func:$e,options:He})},removeDelegate:function(N,te,we,$e,Pe){var He,at=Dn(Pe),et=r[we],dt=!1;if(et)for(He=et.length-1;He>=0;He--){var bt=et[He];if(bt.selector===N&&bt.context===te){for(var It=bt.listeners,vt=It.length-1;vt>=0;vt--){var xt=It[vt];if(xt.func===$e&&$n(xt.options,at)){It.splice(vt,1),It.length||(et.splice(He,1),y(te,we,T),y(te,we,$,!0)),dt=!0;break}}if(dt)break}}},delegateListener:T,delegateUseCapture:$,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function g(N,te,we,$e){if(N.addEventListener){var Pe=Dn($e),He=G(o,function(at){return at.eventTarget===N});He||(He={eventTarget:N,events:{}},o.push(He)),He.events[te]||(He.events[te]=[]),G(He.events[te],function(at){return at.func===we&&$n(at.options,Pe)})||(N.addEventListener(te,we,f.supportsOptions?Pe:Pe.capture),He.events[te].push({func:we,options:Pe}))}}function y(N,te,we,$e){if(N.addEventListener&&N.removeEventListener){var Pe=F(o,function(nn){return nn.eventTarget===N}),He=o[Pe];if(He&&He.events)if(te!=="all"){var at=!1,et=He.events[te];if(et){if(we==="all"){for(var dt=et.length-1;dt>=0;dt--){var bt=et[dt];y(N,te,bt.func,bt.options)}return}for(var It=Dn($e),vt=0;vt<et.length;vt++){var xt=et[vt];if(xt.func===we&&$n(xt.options,It)){N.removeEventListener(te,we,f.supportsOptions?It:It.capture),et.splice(vt,1),et.length===0&&(delete He.events[te],at=!0);break}}}at&&!Object.keys(He.events).length&&o.splice(Pe,1)}else for(te in He.events)He.events.hasOwnProperty(te)&&y(N,te,"all")}}function T(N,te){for(var we=Dn(te),$e=new Ln(N),Pe=r[N.type],He=W(N)[0],at=He;B.element(at);){for(var et=0;et<Pe.length;et++){var dt=Pe[et],bt=dt.selector,It=dt.context;if(Ne(at,bt)&&me(It,He)&&me(It,at)){var vt=dt.listeners;$e.currentTarget=at;for(var xt=0;xt<vt.length;xt++){var nn=vt[xt];$n(nn.options,we)&&nn.func($e)}}}at=lt(at)}}function $(N){return T(N,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},Zn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=Zn.methodOrder;t<o.length;t++){var r=o[t],u=Zn[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,g=u.interactions.list;f<g.length;f++){var y=g[f],T=r;if(y.simulation&&y.simulation.allowResume&&y.pointerType===t)for(;T;){if(T===y.element)return y;T=lt(T)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var g=0,y=f.interactions.list;g<y.length;g++){var T=y[g];if(T.pointerType===r){if(T.simulation&&!ua(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var $=0,N=f.interactions.list;$<N.length;$++){var te=N[$];if(!(te.pointerType!==r||/down/i.test(u)&&te.simulation))return te}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ua(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ua(n,t){return n.pointers.some(function(o){return o.id===t})}var Na=Zn,Pn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Cn(n,t){return function(o){var r=t.interactions.list,u=ve(o),f=W(o),g=f[0],y=f[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var $=0,N=o.changedTouches;$<N.length;$++){var te=N[$],we={pointer:te,pointerId:q(te),pointerType:u,eventType:o.type,eventTarget:g,curEventTarget:y,scope:t},$e=jn(we);T.push([we.pointer,we.eventTarget,we.curEventTarget,$e])}}else{var Pe=!1;if(!ae.supportsPointerEvent&&/mouse/.test(o.type)){for(var He=0;He<r.length&&!Pe;He++)Pe=r[He].pointerType!=="mouse"&&r[He].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var at={pointer:o,pointerId:q(o),pointerType:u,eventType:o.type,curEventTarget:y,eventTarget:g,scope:t},et=jn(at);T.push([at.pointer,at.eventTarget,at.curEventTarget,et])}}for(var dt=0;dt<T.length;dt++){var bt=T[dt],It=bt[0],vt=bt[1],xt=bt[2];bt[3][n](It,o,vt,xt)}}}function jn(n){var t=n.pointerType,o=n.scope,r={interaction:Na.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function Un(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,g=r.events,y=g[t];for(var T in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),g.delegatedEvents)y(o,T,g.delegateListener),y(o,T,g.delegateUseCapture,!0);for(var $=u&&u.events,N=0;N<f.length;N++){var te=f[N];y(o,te.type,te.listener,$)}}var bn={id:"core/interactions",install:function(n){for(var t={},o=0;o<Pn.length;o++){var r=Pn[o];t[r]=Cn(r,n)}var u,f=ae.pEventTypes;function g(){for(var y=0,T=n.interactions.list;y<T.length;y++){var $=T[y];if($.pointerIsDown&&$.pointerType==="touch"&&!$._interacting)for(var N=function(){var $e=we[te];n.documents.some(function(Pe){return me(Pe.doc,$e.downTarget)})||$.removePointer($e.pointer,$e.event)},te=0,we=$.pointers;te<we.length;te++)N()}}(u=A.PointerEvent?[{type:f.down,listener:g},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:g},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(y){for(var T=0,$=n.interactions.list;T<$.length;T++)$[T].documentBlur(y)}}),n.prevTouchTime=0,n.Interaction=function(y){C($,y);var T=z($);function $(){return d(this,$),T.apply(this,arguments)}return v($,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(N){n.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return n.now()}}]),$}(Ia),n.interactions={list:[],new:function(y){y.scopeFire=function($,N){return n.fire($,N)};var T=new n.Interaction(y);return n.interactions.list.push(T),T},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(cn)},listeners:{"scope:add-document":function(n){return Un(n,"add")},"scope:remove-document":function(n){return Un(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:Un,doOnInteractions:Cn,methodNames:Pn},Va=bn,en=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(en||{}),rr=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new sn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||r,this._win=R(rt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return B.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),B.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),B.func(o.onend)&&this.on("".concat(t,"end"),o.onend),B.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,g=(u=this._actions.map[t])==null?void 0:u.filterEventType,y=function(T){return(g==null||g(T))&&mn(T,f._actions)};(B.array(o)||B.object(o))&&this._onOff(en.Off,t,o,void 0,y),(B.array(r)||B.object(r))&&this._onOff(en.On,t,r,void 0,y)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,g=this.options[t],y=o[f];f==="listeners"&&this.updatePerActionListeners(t,g.listeners,y),B.array(y)?g[f]=ge(y):B.plainObject(y)?(g[f]=Q(g[f]||{},Xt(y)),B.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(g[f].enabled=y.enabled!==!1)):B.bool(y)&&B.object(r.perAction[f])?g[f].enabled=y:g[f]=y}}},{key:"getRect",value:function(t){return t=t||(B.element(this.target)?this.target:null),B.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ce(t)}},{key:"rectChecker",value:function(t){var o=this;return B.func(t)?(this.getRect=function(r){var u=Q({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(rt(o)||B.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return B.string(t)?Array.from(this._context.querySelectorAll(t)):B.func(t)&&t.getAllElements?t.getAllElements():B.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||me(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!B.element(r)&&(B.string(t)?se(r,t,o):!!B.element(t)&&me(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!B.element(r))&&(B.string(t)?se(r,t,o):!!B.element(t)&&me(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){B.object(o)&&!B.array(o)&&(u=r,r=null);var g=ye(o,r,f);for(var y in g){y==="wheel"&&(y=ae.wheelEvent);for(var T=0,$=g[y];T<$.length;T++){var N=$[T];mn(y,this._actions)?this.events[t===en.On?"on":"off"](y,N):B.string(this.target)?this._scopeEvents[t===en.On?"addDelegate":"removeDelegate"](this.target,this._context,y,N,u):this._scopeEvents[t===en.On?"add":"remove"](this.target,y,N,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(en.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(en.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in B.object(t)||(t={}),this.options=Xt(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,Q(Q({},o.perAction),o.actions[u])),this[f](t[u])}for(var g in t)g!=="getRect"?B.func(this[g])&&this[g](t[g]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(B.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,g=u.context,y=u.listeners;f===this.target&&g===this._context&&o.splice(r,1);for(var T=y.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,y[T][0],y[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),ir=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,g=B.string(f)?o.selectorMap[f]:f[o.scope.id],y=F(g,function(T){return T===u});g.splice(y,1)}})}return v(n,[{key:"new",value:function(t,o){o=Q(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),B.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=B.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return G(f,function(g){return g._context===r&&(u||g.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],g=void 0;if((B.string(f.target)?B.element(t)&&Ne(t,f.target):t===f.target)&&f.inContext(t)&&(g=o(f)),g!==void 0)return g}}}]),n}(),sr=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ae,this.defaults=Xt(ra),this.Eventable=sn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(g,y){var T=r.interactables.getExisting(g,y);return T||((T=r.interactables.new(g,y)).events.global=f.globalEvents),T};return u.getPointerAverage=ee,u.getTouchBBox=de,u.getTouchDistance=he,u.getTouchAngle=J,u.getElementRect=Ce,u.getElementClientRect=Fe,u.matchesSelector=Ne,u.closest=je,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,g){return this.scope.usePlugin(f,g),this},u.isSet=function(f,g){return!!this.scope.interactables.get(f,g&&g.context)},u.on=Ct(function(f,g,y){if(B.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),B.array(f)){for(var T=0,$=f;T<$.length;T++){var N=$[T];this.on(N,g,y)}return this}if(B.object(f)){for(var te in f)this.on(te,f[te],g);return this}return mn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(g):this.globalEvents[f]=[g]:this.scope.events.add(this.scope.document,f,g,{options:y}),this},"The interact.on() method is being deprecated"),u.off=Ct(function(f,g,y){if(B.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),B.array(f)){for(var T=0,$=f;T<$.length;T++){var N=$[T];this.off(N,g,y)}return this}if(B.object(f)){for(var te in f)this.off(te,f[te],g);return this}var we;return mn(f,this.scope.actions)?f in this.globalEvents&&(we=this.globalEvents[f].indexOf(g))!==-1&&this.globalEvents[f].splice(we,1):this.scope.events.remove(this.scope.document,f,g,y),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ae.supportsTouch},u.supportsPointerEvent=function(){return ae.supportsPointerEvent},u.stop=function(){for(var f=0,g=this.scope.interactions.list;f<g.length;f++)g[f].stop();return this},u.pointerMoveTolerance=function(f){return B.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,g){this.scope.addDocument(f,g)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Jn,this.Interactable=void 0,this.interactables=new ir(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){C(f,r);var u=z(f);function f(){return d(this,f),u.apply(this,arguments)}return v(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(g){return H(_(f.prototype),"set",this).call(this,g),o.fire("interactable:set",{options:g,interactable:this}),this}},{key:"unset",value:function(){H(_(f.prototype),"unset",this).call(this);var g=o.interactables.list.indexOf(this);g<0||(o.interactables.list.splice(g,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(rr)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,B.window(r)&&D(r),A.init(r),ae.init(r),st.init(r),o.window=r,o.document=r.document,o.usePlugin(Va),o.usePlugin(Aa),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var r=0,u=this.listenerMaps.length,f=t.before.reduce(function(y,T){return y[T]=!0,y[Eo(T)]=!0,y},{});r<u;r++){var g=this.listenerMaps[r].id;if(g&&(f[g]||f[Eo(g)]))break}this.listenerMaps.splice(r,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var r=R(t);o=o?Q({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=R(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function Eo(n){return n&&n.replace(/\/.*$/,"")}var _o=new sr,tn=_o.interactStatic,cr=typeof globalThis<"u"?globalThis:window;_o.init(cr);var ur=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,g=n.limits,y=g===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:g,T=n.offset,$=T===void 0?{x:0,y:0}:T,N={range:f,grid:n,x:null,y:null},te=0;te<t.length;te++){var we=t[te],$e=we[0],Pe=we[1],He=Math.round((r-$.x)/n[$e]),at=Math.round((u-$.y)/n[Pe]);N[$e]=Math.max(y.left,Math.min(y.right,He*n[$e]+$.x)),N[Pe]=Math.max(y.top,Math.min(y.bottom,at*n[Pe]+$.y))}return N};return o.grid=n,o.coordFields=t,o}}),pr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=Q(t.snappers||{},ur),t.createSnapGrid=t.snappers.grid}},dr=pr,fr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,g=f.ratio,y=f.enabled,T=t.options,$=T.equalDelta,N=T.modifiers;g==="preserve"&&(g=o.width/o.height),t.startCoords=Q({},u),t.startRect=Q({},o),t.ratio=g,t.equalDelta=$;var te=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var we=(te.left?1:-1)*(te.top?1:-1);t.edgeSign={x:we,y:we}}else t.edgeSign={x:te.left?-1:1,y:te.top?-1:1};if(y!==!1&&Q(r,te),N!=null&&N.length){var $e=new yn(n.interaction);$e.copyFrom(n.interaction.modification),$e.prepareStates(N),t.subModification=$e,$e.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=Q({},r),g=t.equalDelta?hr:vr;if(Q(n.edges,u),g(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var y=Q({},o);re(u,y,{x:r.x-f.x,y:r.y-f.y});var T=t.subModification.setAll(l(l({},n),{},{rect:y,edges:u,pageCoords:r,prevCoords:r,prevRect:y})),$=T.delta;return T.changed&&(g(t,Math.abs($.x)>Math.abs($.y),T.coords,T.rect),Q(r,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function hr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function vr(n,t,o,r){var u=n.startRect,f=n.startCoords,g=n.ratio,y=n.edgeSign;if(t){var T=r.width/g;o.y=f.y+(T-u.height)*y.y}else{var $=r.height*g;o.x=f.x+($-u.width)*y.x}}var gr=ln(fr,"aspectRatio"),So=function(){};So._defaults={};var Oa=So;function Kn(n,t,o){return B.func(n)?ct(n,t.interactable,t.element,[o.x,o.y,t]):ct(n,t.interactable,t.element)}var Ma={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,g=r.options,y=g.elementRect,T=Q({left:0,top:0,right:0,bottom:0},g.offset||{});if(t&&y){var $=Kn(g.restriction,u,f);if($){var N=$.right-$.left-t.width,te=$.bottom-$.top-t.height;N<0&&(T.left+=N,T.right+=N),te<0&&(T.top+=te,T.bottom+=te)}T.left+=o.left-t.width*y.left,T.top+=o.top-t.height*y.top,T.right+=o.right-t.width*(1-y.right),T.bottom+=o.bottom-t.height*(1-y.bottom)}r.offset=T},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,g=Kn(u.restriction,o,t);if(g){var y=function(T){return!T||"left"in T&&"top"in T||((T=Q({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(g);t.x=Math.max(Math.min(y.right-f.right,t.x),y.left+f.left),t.y=Math.max(Math.min(y.bottom-f.bottom,t.y),y.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},mr=ln(Ma,"restrict"),To={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Io={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Bo(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var pa={noInner:To,noOuter:Io,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Qe(Kn(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,g=u.options;if(o){var y=Q({},t),T=Kn(g.inner,r,y)||{},$=Kn(g.outer,r,y)||{};Bo(T,To),Bo($,Io),o.top?t.y=Math.min(Math.max($.top+f.top,y.y),T.top+f.top):o.bottom&&(t.y=Math.max(Math.min($.bottom+f.bottom,y.y),T.bottom+f.bottom)),o.left?t.x=Math.min(Math.max($.left+f.left,y.x),T.left+f.left):o.right&&(t.x=Math.max(Math.min($.right+f.right,y.x),T.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yr=ln(pa,"restrictEdges"),br=Q({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),kr=ln({start:Ma.start,set:Ma.set,defaults:br},"restrictRect"),xr={width:-1/0,height:-1/0},wr={width:1/0,height:1/0},Dr=ln({start:function(n){return pa.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var g=ne(Kn(f.min,t,n.coords))||xr,y=ne(Kn(f.max,t,n.coords))||wr;o.options={endOnly:f.endOnly,inner:Q({},pa.noInner),outer:Q({},pa.noOuter)},u.top?(o.options.inner.top=r.bottom-g.height,o.options.outer.top=r.bottom-y.height):u.bottom&&(o.options.inner.bottom=r.top+g.height,o.options.outer.bottom=r.top+y.height),u.left?(o.options.inner.left=r.right-g.width,o.options.outer.left=r.right-y.width):u.right&&(o.options.inner.right=r.left+g.width,o.options.outer.right=r.left+y.width),pa.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),to={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,g=n.state,y=n.startOffset,T=g.options,$=T.offsetWithOrigin?function(we){var $e=we.interaction.element,Pe=Qe(ct(we.state.options.origin,null,null,[$e])),He=Pe||_e(we.interactable,$e,we.interaction.prepared.name);return He}(n):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=ct(T.offset,r,u,[o]);(t=Qe(N)||{x:0,y:0}).x+=$.x,t.y+=$.y}var te=T.relativePoints;g.offsets=f&&te&&te.length?te.map(function(we,$e){return{index:$e,relativePoint:we,x:y.left-f.width*we.x+t.x,y:y.top-f.height*we.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,g=_e(t.interactable,t.element,t.prepared.name),y=Q({},o),T=[];u.offsetWithOrigin||(y.x-=g.x,y.y-=g.y);for(var $=0,N=f;$<N.length;$++)for(var te=N[$],we=y.x-te.x,$e=y.y-te.y,Pe=0,He=u.targets.length;Pe<He;Pe++){var at=u.targets[Pe],et=void 0;(et=B.func(at)?at(we,$e,t._proxy,te,Pe):at)&&T.push({x:(B.number(et.x)?et.x:we)+te.x,y:(B.number(et.y)?et.y:$e)+te.y,range:B.number(et.range)?et.range:u.range,source:at,index:Pe,offset:te})}for(var dt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},bt=0;bt<T.length;bt++){var It=T[bt],vt=It.range,xt=It.x-y.x,nn=It.y-y.y,jt=Ze(xt,nn),pn=jt<=vt;vt===1/0&&dt.inRange&&dt.range!==1/0&&(pn=!1),dt.target&&!(pn?dt.inRange&&vt!==1/0?jt/vt<dt.distance/dt.range:vt===1/0&&dt.range!==1/0||jt<dt.distance:!dt.inRange&&jt<dt.distance)||(dt.target=It,dt.distance=jt,dt.range=vt,dt.inRange=pn,dt.delta.x=xt,dt.delta.y=nn)}return dt.inRange&&(o.x=dt.target.x,o.y=dt.target.y),r.closest=dt,dt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cr=ln(to,"snap"),za={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],to.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,g={x:r.x-f[0].x,y:r.y-f[0].y};o.options=Q({},u),o.options.targets=[];for(var y=0,T=u.targets||[];y<T.length;y++){var $=T[y],N=void 0;if(N=B.func($)?$(g.x,g.y,t):$){for(var te=0,we=o.targetFields;te<we.length;te++){var $e=we[te],Pe=$e[0],He=$e[1];if(Pe in N||He in N){N.x=N[Pe],N.y=N[He];break}}o.options.targets.push(N)}}var at=to.set(n);return o.options=u,at},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Er=ln(za,"snapSize"),no={aspectRatio:gr,restrictEdges:yr,restrict:mr,restrictRect:kr,restrictSize:Dr,snapEdges:ln({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],za.start(n)):null},set:za.set,defaults:Q(Xt(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cr,snapSize:Er,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},_r={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(la),n.usePlugin(dr),t.modifiers=no,no){var r=no[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Sr=_r,Ao=function(n){C(o,n);var t=z(o);function o(r,u,f,g,y,T){var $;if(d(this,o),w(P($=t.call(this,y)),f),f!==u&&w(P($),u),$.timeStamp=T,$.originalEvent=f,$.type=r,$.pointerId=q(u),$.pointerType=ve(u),$.target=g,$.currentTarget=null,r==="tap"){var N=y.getPointerIndex(u);$.dt=$.timeStamp-y.pointers[N].downTime;var te=$.timeStamp-y.tapTime;$.double=!!y.prevTap&&y.prevTap.type!=="doubletap"&&y.prevTap.target===$.target&&te<500}else r==="doubletap"&&($.dt=u.timeStamp-y.tapTime,$.double=!0);return $}return v(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(Oe),da={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=da,n.defaults.actions.pointerEvents=da.defaults,Q(n.actions.phaselessTypes,da.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&ao(n),Rn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,g=o.event,y=o.eventTarget,T=o.pointerIndex,$=u.pointers[T].hold,N=Le(y),te={interaction:u,pointer:f,event:g,eventTarget:y,type:"hold",targets:[],path:N,node:null},we=0;we<N.length;we++){var $e=N[we];te.node=$e,r.fire("pointerEvents:collect-targets",te)}if(te.targets.length){for(var Pe=1/0,He=0,at=te.targets;He<at.length;He++){var et=at[He].eventable.options.holdDuration;et<Pe&&(Pe=et)}$.duration=Pe,$.timeout=setTimeout(function(){Rn({interaction:u,eventTarget:y,pointer:f,event:g,type:"hold"},r)},Pe)}})(n,t),Rn(n,t)},"interactions:up":function(n,t){ao(n),Rn(n,t),function(o,r){var u=o.interaction,f=o.pointer,g=o.event,y=o.eventTarget;u.pointerWasMoved||Rn({interaction:u,eventTarget:y,pointer:f,event:g,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){ao(n),Rn(n,t)}},PointerEvent:Ao,fire:Rn,collectEventTargets:No,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Rn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,g=n.type,y=n.targets,T=y===void 0?No(n,t):y,$=new Ao(g,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:$});for(var N={interaction:o,pointer:r,event:u,eventTarget:f,targets:T,type:g,pointerEvent:$},te=0;te<T.length;te++){var we=T[te];for(var $e in we.props||{})$[$e]=we.props[$e];var Pe=_e(we.eventable,we.node);if($._subtractOrigin(Pe),$.eventable=we.eventable,$.currentTarget=we.node,we.eventable.fire($),$._addOrigin(Pe),$.immediatePropagationStopped||$.propagationStopped&&te+1<T.length&&T[te+1].node!==$.currentTarget)break}if(t.fire("pointerEvents:fired",N),g==="tap"){var He=$.double?Rn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):$;o.prevTap=He,o.tapTime=He.timeStamp}return $}function No(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,g=n.type,y=o.getPointerIndex(r),T=o.pointers[y];if(g==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==f))return[];for(var $=Le(f),N={interaction:o,pointer:r,event:u,eventTarget:f,type:g,path:$,targets:[],node:null},te=0;te<$.length;te++){var we=$[te];N.node=we,t.fire("pointerEvents:collect-targets",N)}return g==="hold"&&(N.targets=N.targets.filter(function($e){var Pe,He;return $e.eventable.options.holdDuration===((Pe=o.pointers[y])==null||(He=Pe.hold)==null?void 0:He.duration)})),N.targets}function ao(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Tr=Object.freeze({__proto__:null,default:da});function Ir(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Br={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(da);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Ir,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var g=f[0].eventable.options.holdRepeatInterval;g<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},g))}}})},Ar=Br,Nr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return Q(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(g){var y=g.events,T=y.options;y.types[u]&&y.types[u].length&&g.testIgnoreAllow(T,r,f)&&o.push({node:r,eventable:y,props:{interactable:g}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;Q(o.events.options,t.pointerEvents.defaults),Q(o.events.options,r.pointerEvents||{})}}},Vr=Nr,Or={id:"pointer-events",install:function(n){n.usePlugin(Tr),n.usePlugin(Ar),n.usePlugin(Vr)}},Mr=Or,zr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var g=r.getAllElements(),y=f.window.Promise,T=y?[]:null,$=function(){var te=g[N],we=r.getRect(te);if(!we)return 1;var $e,Pe=G(f.interactions.list,function(et){return et.interacting()&&et.interactable===r&&et.element===te&&et.prepared.name===u.name});if(Pe)Pe.move(),T&&($e=Pe._reflowPromise||new y(function(et){Pe._reflowResolve=et}));else{var He=ne(we),at=function(et){return{coords:et,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:He.x,y:He.y},client:{x:He.x,y:He.y},timeStamp:f.now()});$e=function(et,dt,bt,It,vt){var xt=et.interactions.new({pointerType:"reflow"}),nn={interaction:xt,event:vt,pointer:vt,eventTarget:bt,phase:"reflow"};xt.interactable=dt,xt.element=bt,xt.prevEvent=vt,xt.updatePointer(vt,vt,bt,!0),L(xt.coords.delta),yt(xt.prepared,It),xt._doPhase(nn);var jt=et.window,pn=jt.Promise,En=pn?new pn(function(An){xt._reflowResolve=An}):void 0;return xt._reflowPromise=En,xt.start(It,dt,bt),xt._interacting?(xt.move(nn),xt.end(vt)):(xt.stop(),xt._reflowResolve()),xt.removePointer(vt,vt),En}(f,r,te,u,at)}T&&T.push($e)},N=0;N<g.length&&!$();N++);return T&&y.all(T).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Pr=zr;if(tn.use(cn),tn.use(Ut),tn.use(Mr),tn.use(Lt),tn.use(Sr),tn.use(ht),tn.use(gt),tn.use(Dt),tn.use(Pr),tn.default=tn,c(a)==="object"&&a)try{a.exports=tn}catch{}return tn.default=tn,tn})}(ga,ga.exports)),ga.exports}var fd=dd();const nl=ta.getDefaultExportFromCjs(fd),Ja=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:i,emit:s}){const l=a,c=s,d=e.inject(jl),b=e.inject(Ul);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),h=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let C=!1,_=!1,I=NaN,P=NaN,z=NaN,H=NaN,Ee=-1,Z=-1,U=-1,pe=-1,D=l.x,R=l.y,k=l.w,V=l.h;const B=e.ref(),ue=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:B,calcXY:ct});function Re(E){ye(E)}function tt(){Xe()}function Ve(E){dn(l.isDraggable)&&(h.draggable=E)}function Ue(E){dn(l.isResizable)&&(h.resizable=E)}function De(E){dn(l.isBounded)&&(h.bounded=E)}function A(E){h.transformScale=E}function le(E){h.rowHeight=E}function ae(E){h.maxRows=E}function me(){h.rtl=el()==="rtl",Xe()}function je(E){h.cols=Math.floor(E)}d.increaseItem(ue),e.onBeforeMount(()=>{h.rtl=el()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Gl(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,dn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,dn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,dn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{D=l.x,R=l.y,V=l.h,k=l.w,an(Ce)}),b.on("updateWidth",Re),b.on("compact",tt),b.on("setDraggable",Ve),b.on("setResizable",Ue),b.on("setBounded",De),b.on("setTransformScale",A),b.on("setRowHeight",le),b.on("setMaxRows",ae),b.on("directionchange",me),b.on("setColNum",je)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Re),b.off("compact",tt),b.off("setDraggable",Ve),b.off("setResizable",Ue),b.off("setBounded",De),b.off("setTransformScale",A),b.off("setRowHeight",le),b.off("setMaxRows",ae),b.off("directionchange",me),b.off("setColNum",je),v.value&&(v.value.unset(),v.value=null),d.decreaseItem(ue)}),i({state:h,wrapper:B});const lt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Ne=e.computed(()=>h.resizable&&!l.static),S=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),Ie=e.computed(()=>(h.draggable||h.resizable)&&!l.static),se=od("item"),Me=e.computed(()=>({[se.b()]:!0,[se.bm("resizable")]:Ne.value,[se.bm("static")]:l.static,[se.bm("resizing")]:h.isResizing,[se.bm("dragging")]:h.isDragging,[se.bm("transform")]:h.useCssTransforms,[se.bm("rtl")]:S.value,[se.bm("no-touch")]:lt&&Ie.value})),Fe=e.computed(()=>[se.be("resizer"),S.value&&se.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,E=>{h.draggable=E}),e.watch(()=>l.static,()=>{an(w),an(L)}),e.watch(()=>h.draggable,()=>{an(w)}),e.watch(()=>l.isResizable,E=>{h.resizable=E}),e.watch(()=>l.isBounded,E=>{h.bounded=E}),e.watch(()=>h.resizable,()=>{an(L)}),e.watch(()=>h.rowHeight,()=>{an(Ce),an(Le)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{an(L),an(Ce),an(Le)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{an(L)}),e.watch(S,()=>{an(L),an(Ce)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const E=d.margin;!E||E[0]===h.margin[0]&&E[1]===h.margin[1]||(h.margin=E.map(Number),an(Ce),an(Le))});function Ce(){l.x+l.w>h.cols?(D=0,k=l.w>h.cols?h.cols:l.w):(D=l.x,k=l.w);const E=Ye(D,R,k,V);h.isDragging&&(E.top=h.dragging.top,S.value?E.right=h.dragging.left:E.left=h.dragging.left),h.isResizing&&(E.width=h.resizing.width,E.height=h.resizing.height);let M;h.useCssTransforms?S.value?M=ed(E.top,E.right,E.width,E.height):M=Qp(E.top,E.left,E.width,E.height):S.value?M=nd(E.top,E.right,E.width,E.height):M=td(E.top,E.left,E.width,E.height),h.style=M}function Le(){const E={};for(const M of["width","height"]){const ie=h.style[M].match(/^(\d+)px$/);if(!ie)return;E[M]=ie[1]}c("container-resized",l.i,l.h,l.w,E.height,E.width)}function rt(E){if(l.static)return;const M=E.type;if(M==="resizestart"&&h.isResizing||M!=="resizestart"&&!h.isResizing)return;const ie=Zo(E);if(dn(ie))return;const{x:q,y:K}=ie,oe={width:0,height:0};let ee;switch(M){case"resizestart":{L(),Ee=k,Z=V,ee=Ye(D,R,k,V),oe.width=ee.width,oe.height=ee.height,h.resizing=oe,h.isResizing=!0;break}case"resizemove":{!E.edges.right&&!E.edges.left&&(z=q),!E.edges.top&&!E.edges.bottom&&(H=K);const de=Qo(z,H,q,K);S.value?oe.width=h.resizing.width-de.deltaX/h.transformScale:oe.width=h.resizing.width+de.deltaX/h.transformScale,oe.height=h.resizing.height+de.deltaY/h.transformScale,h.resizing=oe;break}case"resizeend":{ee=Ye(D,R,k,V),oe.width=ee.width,oe.height=ee.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}ee=_e(oe.height,oe.width),ee.w<l.minW&&(ee.w=l.minW),ee.w>l.maxW&&(ee.w=l.maxW),ee.h<l.minH&&(ee.h=l.minH),ee.h>l.maxH&&(ee.h=l.maxH),ee.h<1&&(ee.h=1),ee.w<1&&(ee.w=1),z=q,H=K,(k!==ee.w||V!==ee.h)&&c("resize",l.i,ee.h,ee.w,oe.height,oe.width),E.type==="resizeend"&&(Ee!==k||Z!==V)&&c("resized",l.i,ee.h,ee.w,oe.height,oe.width),b.emit("resizeEvent",E.type,l.i,D,R,ee.h,ee.w)}function Q(E){if(l.static||h.isResizing)return;const M=E.type;if(M==="dragstart"&&h.isDragging||M!=="dragstart"&&!h.isDragging)return;const ie=Zo(E);if(dn(ie))return;const{x:q,y:K}=ie,oe=E.target;if(!oe.offsetParent)return;const ee={top:0,left:0};switch(M){case"dragstart":{U=D,pe=R;const he=oe.offsetParent.getBoundingClientRect(),J=oe.getBoundingClientRect(),ve=J.left/h.transformScale,W=he.left/h.transformScale,Oe=J.right/h.transformScale,Se=he.right/h.transformScale,ge=J.top/h.transformScale,F=he.top/h.transformScale;S.value?ee.left=(Oe-Se)*-1:ee.left=ve-W,ee.top=ge-F,h.dragging=ee,h.isDragging=!0;break}case"dragmove":{const he=Qo(I,P,q,K);if(S.value?ee.left=h.dragging.left-he.deltaX/h.transformScale:ee.left=h.dragging.left+he.deltaX/h.transformScale,ee.top=h.dragging.top+he.deltaY/h.transformScale,h.bounded){const J=oe.offsetParent.clientHeight-ne(l.h,h.rowHeight,h.margin[1]);ee.top=re(ee.top,0,J);const ve=Qe(),W=h.containerWidth-ne(l.w,ve,h.margin[0]);ee.left=re(ee.left,0,W)}h.dragging=ee;break}case"dragend":{const he=oe.offsetParent.getBoundingClientRect(),J=oe.getBoundingClientRect(),ve=J.left/h.transformScale,W=he.left/h.transformScale,Oe=J.right/h.transformScale,Se=he.right/h.transformScale,ge=J.top/h.transformScale,F=he.top/h.transformScale;S.value?ee.left=(Oe-Se)*-1:ee.left=ve-W,ee.top=ge-F,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let de;S.value,de=ct(ee.top,ee.left),I=q,P=K,(D!==de.x||R!==de.y)&&c("move",l.i,de.x,de.y),E.type==="dragend"&&(U!==D||pe!==R)&&c("moved",l.i,de.x,de.y),b.emit("dragEvent",E.type,l.i,de.x,de.y,V,k)}function Ye(E,M,ie,q){const K=Qe();let oe;return S.value?oe={right:Math.round(K*E+(E+1)*h.margin[0]),top:Math.round(h.rowHeight*M+(M+1)*h.margin[1]),width:ie===1/0?ie:Math.round(K*ie+Math.max(0,ie-1)*h.margin[0]),height:q===1/0?q:Math.round(h.rowHeight*q+Math.max(0,q-1)*h.margin[1])}:oe={left:Math.round(K*E+(E+1)*h.margin[0]),top:Math.round(h.rowHeight*M+(M+1)*h.margin[1]),width:ie===1/0?ie:Math.round(K*ie+Math.max(0,ie-1)*h.margin[0]),height:q===1/0?q:Math.round(h.rowHeight*q+Math.max(0,q-1)*h.margin[1])},oe}function ct(E,M){const ie=Qe();let q=Math.round((M-h.margin[0])/(ie+h.margin[0])),K=Math.round((E-h.margin[1])/(h.rowHeight+h.margin[1]));return q=Math.max(Math.min(q,h.cols-k),0),K=Math.max(Math.min(K,h.maxRows-V),0),{x:q,y:K}}function Qe(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ne(E,M,ie){return Number.isFinite(E)?Math.round(M*E+Math.max(0,E-1)*ie):E}function re(E,M,ie){return Math.max(Math.min(E,ie),M)}function _e(E,M,ie=!1){const q=Qe();let K=Math.round((M+h.margin[0])/(q+h.margin[0])),oe=0;return ie?oe=Math.ceil((E+h.margin[1])/(h.rowHeight+h.margin[1])):oe=Math.round((E+h.margin[1])/(h.rowHeight+h.margin[1])),K=Math.max(Math.min(K,h.cols-D),0),oe=Math.max(Math.min(oe,h.maxRows-R),0),{w:K,h:oe}}function ye(E,M){h.containerWidth=E}function Xe(){Ce()}function Ze(){!v.value&&B.value&&(v.value=nl(B.value),h.useStyleCursor||v.value.styleCursor(!1))}const x=Xo(Q);function w(){if(Ze(),!!v.value)if(h.draggable&&!l.static){const E={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};v.value.draggable(E),C||(C=!0,v.value.on("dragstart dragmove dragend",M=>{M.type==="dragmove"?x(M):Q(M)}))}else v.value.draggable({enabled:!1})}const m=Xo(rt);function L(){if(Ze(),!!v.value)if(h.resizable&&!l.static){const E=Ye(0,0,l.maxW,l.maxH),M=Ye(0,0,l.minW,l.minH),ie={edges:{left:S.value?`.${Fe.value[0]}`:!1,right:S.value?!1:`.${Fe.value[0]}`,bottom:`.${Fe.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:M.height*h.transformScale,width:M.width*h.transformScale},max:{height:E.height*h.transformScale,width:E.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(ie.modifiers=[nl.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(ie),_||(_=!0,v.value.on("resizestart resizemove resizeend",q=>{q.type==="resizemove"?m(q):rt(q)}))}else v.value.resizable({enabled:!1})}return(E,M)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:B,class:e.normalizeClass(Me.value),style:e.normalizeStyle(h.style)},[e.renderSlot(E.$slots,"default"),Ne.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Fe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),Yn=typeof window<"u";var al;Yn&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ol(a){return a!=null}function ll(){}const hd=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(hd)));const vd=Yn&&("ontouchstart"in window||md()>0),gd=vd?"pointerdown":"click";function md(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function yd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...b}=i;if(!ol(l)||l==="")return!1;let v;return ol(s)?v=new s(l,{bubbles:c,cancelable:d}):(v=document.createEvent("HTMLEvents"),v.initEvent(l,c,d)),Object.assign(v,b),a.dispatchEvent(v)}const bd="clickoutside",kd=new Set;Yn&&document.addEventListener(gd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();kd.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&yd(l,{type:bd})})},!0);const xd=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Wa;if(Yn){for(const a of xd)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const wd=new Set,Dd=new WeakMap;if(Yn&&Wa){const a=Wa[2],i=Wa[4];document.addEventListener(i,()=>{if(wd.forEach(s=>{s.value=!1}),document[a]){const s=Dd.get(document[a]);s&&(s.value=!0)}},!1)}const Yl=new Map;Yl.set("x",0);Yl.set("y",0);var qn=[],Cd=function(){return qn.some(function(a){return a.activeTargets.length>0})},Ed=function(){return qn.some(function(a){return a.skippedTargets.length>0})},rl="ResizeObserver loop completed with undelivered notifications.",_d=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:rl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=rl),window.dispatchEvent(a)},Da;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Da||(Da={}));var Gn=function(a){return Object.freeze(a)},Sd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,Gn(this)}return a}(),Jl=function(){function a(i,s,l,c){return this.x=i,this.y=s,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Gn(this)}return a.prototype.toJSON=function(){var i=this,s=i.x,l=i.y,c=i.top,d=i.right,b=i.bottom,v=i.left,h=i.width,C=i.height;return{x:s,y:l,top:c,right:d,bottom:b,left:v,width:h,height:C}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),Co=function(a){return a instanceof SVGElement&&"getBBox"in a},Zl=function(a){if(Co(a)){var i=a.getBBox(),s=i.width,l=i.height;return!s&&!l}var c=a,d=c.offsetWidth,b=c.offsetHeight;return!(d||b||a.getClientRects().length)},il=function(a){var i;if(a instanceof Element)return!0;var s=(i=a==null?void 0:a.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&a instanceof s.Element)},Td=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ka=typeof window<"u"?window:{},La=new WeakMap,sl=/auto|scroll/,Id=/^tb|vertical/,Bd=/msie|trident/i.test(ka.navigator&&ka.navigator.userAgent),In=function(a){return parseFloat(a||"0")},aa=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Sd((s?i:a)||0,(s?a:i)||0)},cl=Gn({devicePixelContentBoxSize:aa(),borderBoxSize:aa(),contentBoxSize:aa(),contentRect:new Jl(0,0,0,0)}),Ql=function(a,i){if(i===void 0&&(i=!1),La.has(a)&&!i)return La.get(a);if(Zl(a))return La.set(a,cl),cl;var s=getComputedStyle(a),l=Co(a)&&a.ownerSVGElement&&a.getBBox(),c=!Bd&&s.boxSizing==="border-box",d=Id.test(s.writingMode||""),b=!l&&sl.test(s.overflowY||""),v=!l&&sl.test(s.overflowX||""),h=l?0:In(s.paddingTop),C=l?0:In(s.paddingRight),_=l?0:In(s.paddingBottom),I=l?0:In(s.paddingLeft),P=l?0:In(s.borderTopWidth),z=l?0:In(s.borderRightWidth),H=l?0:In(s.borderBottomWidth),Ee=l?0:In(s.borderLeftWidth),Z=I+C,U=h+_,pe=Ee+z,D=P+H,R=v?a.offsetHeight-D-a.clientHeight:0,k=b?a.offsetWidth-pe-a.clientWidth:0,V=c?Z+pe:0,B=c?U+D:0,ue=l?l.width:In(s.width)-V-k,Re=l?l.height:In(s.height)-B-R,tt=ue+Z+k+pe,Ve=Re+U+R+D,Ue=Gn({devicePixelContentBoxSize:aa(Math.round(ue*devicePixelRatio),Math.round(Re*devicePixelRatio),d),borderBoxSize:aa(tt,Ve,d),contentBoxSize:aa(ue,Re,d),contentRect:new Jl(I,h,ue,Re)});return La.set(a,Ue),Ue},er=function(a,i,s){var l=Ql(a,s),c=l.borderBoxSize,d=l.contentBoxSize,b=l.devicePixelContentBoxSize;switch(i){case Da.DEVICE_PIXEL_CONTENT_BOX:return b;case Da.BORDER_BOX:return c;default:return d}},Ad=function(){function a(i){var s=Ql(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=Gn([s.borderBoxSize]),this.contentBoxSize=Gn([s.contentBoxSize]),this.devicePixelContentBoxSize=Gn([s.devicePixelContentBoxSize])}return a}(),tr=function(a){if(Zl(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Nd=function(){var a=1/0,i=[];qn.forEach(function(d){if(d.activeTargets.length!==0){var b=[];d.activeTargets.forEach(function(v){var h=new Ad(v.target),C=tr(v.target);b.push(h),v.lastReportedSize=er(v.target,v.observedBox),C<a&&(a=C)}),i.push(function(){d.callback.call(d.observer,b,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var s=0,l=i;s<l.length;s++){var c=l[s];c()}return a},ul=function(a){qn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tr(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Vd=function(){var a=0;for(ul(a);Cd();)a=Nd(),ul(a);return Ed()&&_d(),a>0},ro,nr=[],Od=function(){return nr.splice(0).forEach(function(a){return a()})},Md=function(a){if(!ro){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Od()}).observe(s,l),ro=function(){s.textContent="".concat(i?i--:i++)}}nr.push(a),ro()},zd=function(a){Md(function(){requestAnimationFrame(a)})},Ha=0,Pd=function(){return!!Ha},Rd=250,Fd={attributes:!0,characterData:!0,childList:!0,subtree:!0},pl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(a){return a===void 0&&(a=0),Date.now()+a},io=!1,Ld=function(){function a(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return a.prototype.run=function(i){var s=this;if(i===void 0&&(i=Rd),!io){io=!0;var l=dl(i);zd(function(){var c=!1;try{c=Vd()}finally{if(io=!1,i=l-dl(),!Pd())return;c?s.run(1e3):i>0?s.run(i):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Fd)};document.body?s():ka.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),pl.forEach(function(s){return ka.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),pl.forEach(function(s){return ka.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),ho=new Ld,fl=function(a){!Ha&&a>0&&ho.start(),Ha+=a,!Ha&&ho.stop()},$d=function(a){return!Co(a)&&!Td(a)&&getComputedStyle(a).display==="inline"},jd=function(){function a(i,s){this.target=i,this.observedBox=s||Da.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var i=er(this.target,this.observedBox,!0);return $d(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Ud=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),$a=new WeakMap,hl=function(a,i){for(var s=0;s<a.length;s+=1)if(a[s].target===i)return s;return-1},ja=function(){function a(){}return a.connect=function(i,s){var l=new Ud(i,s);$a.set(i,l)},a.observe=function(i,s,l){var c=$a.get(i),d=c.observationTargets.length===0;hl(c.observationTargets,s)<0&&(d&&qn.push(c),c.observationTargets.push(new jd(s,l&&l.box)),fl(1),ho.schedule())},a.unobserve=function(i,s){var l=$a.get(i),c=hl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&qn.splice(qn.indexOf(l),1),l.observationTargets.splice(c,1),fl(-1))},a.disconnect=function(i){var s=this,l=$a.get(i);l.observationTargets.slice().forEach(function(c){return s.unobserve(i,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Kd=function(){function a(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ja.connect(this,i)}return a.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!il(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.observe(this,i,s)},a.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!il(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.unobserve(this,i)},a.prototype.disconnect=function(){ja.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Za=new WeakMap;function Wd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=Za.get(c.target);if(typeof d=="function"){const{inlineSize:b,blockSize:v}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:h,offsetHeight:C}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:C,width:b??h,height:v??C}))}}}const ar=new(Yn&&window.ResizeObserver||Kd)(Wd);function vl(a,i){Za.set(a,i),ar.observe(a)}function gl(a){Za.has(a)&&(ar.unobserve(a),Za.delete(a))}function Hd(a={}){let i=ll;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(vl(c,a.onResize),i=()=>{gl(c),i=ll})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:vl,unobserveResize:gl,unobserve:l}}const qd=e.ref(!1);e.computed(()=>qd.value);const ml="__theme_style__",so="__theme_observer__",yl=e.reactive(new Map),bl=new Map;e.watch(yl,()=>{if(!Yn)return;bl.clear();const a=document.head.querySelector(`#${ml}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${so} { width: 1px }`,l=1;for(const[c,[d,b]]of yl.entries())s+=` html.${d} .${so}, .${b} .${so} { width: ${++l}px }`,bl.set(l,c);i.textContent=s,i.id=ml,document.head.appendChild(i)});const or=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:i,emit:s}){const l=a,c=s,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,v=e.ref(l.layout),h=e.ref(),{observeResize:C,unobserveResize:_}=Hd(),I=Hp();I.on("resizeEvent",P),I.on("dragEvent",z),e.onBeforeMount(()=>{c("layout-before-mount",v.value)}),e.onMounted(()=>{c("layout-mounted",v.value),e.nextTick(()=>{ad(v.value),d.originalLayout=v.value,e.nextTick(()=>{Re(),h.value&&C(h.value,qp(D,16)),Qn(v.value,l.verticalCompact),c("layout-updated",v.value),pe(),D()})})}),e.onBeforeUnmount(()=>{I.clearAll(),h.value&&_(h.value)});function P(Ve,Ue,De,A,le,ae){B(Ve,Ue,De,A,le,ae)}function z(Ve,Ue,De,A,le,ae){V(Ve,Ue,De,A,le,ae)}e.watch(()=>d.width,(Ve,Ue)=>{e.nextTick(()=>{I.emit("updateWidth",Ve),Ue===-1&&e.nextTick(()=>{c("layout-ready",v.value)}),pe()})}),e.watch(()=>[l.layout,l.layout.length],()=>{v.value=l.layout,U()}),e.watch(()=>l.colNum,Ve=>{I.emit("setColNum",Ve)}),e.watch(()=>l.rowHeight,Ve=>{I.emit("setRowHeight",Ve)}),e.watch(()=>l.isDraggable,Ve=>{I.emit("setDraggable",Ve)}),e.watch(()=>l.isResizable,Ve=>{I.emit("setResizable",Ve)}),e.watch(()=>l.isBounded,Ve=>{I.emit("setBounded",Ve)}),e.watch(()=>l.transformScale,Ve=>{I.emit("setTransformScale",Ve)}),e.watch(()=>l.responsive,Ve=>{Ve||(c("update:layout",d.originalLayout),I.emit("setColNum",l.colNum)),D()}),e.watch(()=>l.maxRows,Ve=>{I.emit("setMaxRows",Ve)}),e.watch([()=>l.margin,()=>l.margin[1]],pe),e.provide(jl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:H,decreaseItem:Ee})),e.provide(Ul,I),i({state:d,getItem:Z,resizeEvent:B,dragEvent:V,layoutUpdate:U});function H(Ve){b.set(Ve.i,Ve)}function Ee(Ve){b.delete(Ve.i)}function Z(Ve){return b.get(Ve)}function U(){if(!dn(v.value)&&!dn(d.originalLayout)){if(v.value.length!==d.originalLayout.length){const Ve=tt(v.value,d.originalLayout);if(Ve.length>0)if(v.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Ve);else{const Ue=new Set(Ve.map(De=>De.i));d.originalLayout=d.originalLayout.filter(De=>!Ue.has(De.i))}d.lastLayoutLength=v.value.length,Re()}Qn(v.value,l.verticalCompact),I.emit("updateWidth",d.width),pe(),c("layout-updated",v.value)}}function pe(){d.mergedStyle={height:R()}}function D(){h.value&&(d.width=h.value.offsetWidth),I.emit("resizeEvent")}function R(){if(!l.autoSize)return;const Ve=parseFloat(l.margin[1]);return Xp(v.value)*(l.rowHeight+Ve)+Ve+"px"}let k;function V(Ve,Ue,De,A,le,ae){let me=Yo(v.value,Ue);dn(me)&&(me={h:0,w:0,x:0,y:0,i:""}),Ve==="dragstart"&&!l.verticalCompact&&(k=v.value.reduce((je,{i:lt,x:Ne,y:S})=>({...je,[lt]:{x:Ne,y:S}}),{})),Ve==="dragmove"||Ve==="dragstart"?(d.placeholder.i=Ue,d.placeholder.x=me.x,d.placeholder.y=me.y,d.placeholder.w=ae,d.placeholder.h=le,e.nextTick(()=>{d.isDragging=!0}),I.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),v.value=fo(v.value,me,De,A,!0,l.preventCollision),l.restoreOnDrag?(me.static=!0,Qn(v.value,l.verticalCompact,k),me.static=!1):Qn(v.value,l.verticalCompact),I.emit("compact"),pe(),Ve==="dragend"&&(k=void 0,c("layout-updated",v.value))}function B(Ve,Ue,De,A,le,ae){let me=Yo(v.value,Ue);dn(me)&&(me={h:0,w:0,x:0,y:0,i:""});let je;if(l.preventCollision){const lt=Wl(v.value,{...me,w:ae,h:le}).filter(Ne=>Ne.i!==me.i);if(je=lt.length>0,je){let Ne=1/0,S=1/0;lt.forEach(Ie=>{Ie.x>me.x&&(Ne=Math.min(Ne,Ie.x)),Ie.y>me.y&&(S=Math.min(S,Ie.y))}),Number.isFinite(Ne)&&(me.w=Ne-me.x),Number.isFinite(S)&&(me.h=S-me.y)}}je||(me.w=ae,me.h=le),Ve==="resizestart"||Ve==="resizemove"?(d.placeholder.i=Ue,d.placeholder.x=De,d.placeholder.y=A,d.placeholder.w=me.w,d.placeholder.h=me.h,e.nextTick(()=>{d.isDragging=!0}),I.emit("updateWidth",d.width)):Ve&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&ue(),Qn(v.value,l.verticalCompact),I.emit("compact"),pe(),Ve==="resizeend"&&c("layout-updated",v.value)}function ue(){const Ve=id(l.breakpoints,d.width);if(Ve===d.lastBreakpoint)return;const Ue=Gl(Ve,l.cols);!dn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=po(v.value));const De=sd(d.originalLayout,d.layouts,l.breakpoints,Ve,d.lastBreakpoint,Ue,l.verticalCompact);d.layouts[Ve]=De,d.lastBreakpoint!==Ve&&c("breakpoint-changed",Ve,De),v.value=De,c("update:layout",De),d.lastBreakpoint=Ve,I.emit("setColNum",Ue)}function Re(){d.layouts=Object.assign({},l.responsiveLayouts)}function tt(Ve,Ue){const De=new Set(Ue.map(me=>me.i)),A=new Set(Ve.map(me=>me.i)),le=Ve.filter(me=>!De.has(me.i)),ae=Ue.filter(me=>!A.has(me.i));return le.concat(ae)}return(Ve,Ue)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Ve.$slots.default?e.renderSlot(Ve.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,De=>(e.openBlock(),e.createBlock(Ja,e.mergeProps({key:De.i,ref_for:!0},De),{default:e.withCtx(()=>[e.renderSlot(Ve.$slots,"item",{item:De})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Ja,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Gd={key:0,class:"item-view-group"},Xd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=Te.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,b=e.computed(()=>d==null?void 0:d.children),v=e.computed(()=>{var I,P,z,H;return((I=d==null?void 0:d.children)==null?void 0:I.length)>0&&((P=d==null?void 0:d.children)!=null&&P.every(Ee=>Ee==null?void 0:Ee.layout))?(H=(z=d==null?void 0:d.children)==null?void 0:z[0])==null?void 0:H.layout:"vertical"}),h=e.ref((d==null?void 0:d.level)+1),C=I=>{c("rowClick",I)},_=(I,P)=>{c("routeUrl",I,P)};return(I,P)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(or),{layout:b.value,"onUpdate:layout":P[0]||(P[0]=z=>b.value=z),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(z,H)=>(e.openBlock(),e.createBlock(e.unref(Ja),{key:z.i,x:z.x,y:z.y,"min-h":z.minH,"max-h":z.maxH,"min-w":z.minW,w:z.w,h:z.h,i:z.i},{default:e.withCtx(()=>{var Ee,Z,U,pe,D,R,k,V,B,ue,Re,tt,Ve;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:H===((Ee=d==null?void 0:d.children)==null?void 0:Ee.length)-1?"0px":"24px"})},[((U=(Z=z==null?void 0:z.component)==null?void 0:Z.comp)==null?void 0:U.toUpperCase())!=="TABLE"&&((pe=z==null?void 0:z.component)!=null&&pe.name)?(e.openBlock(),e.createElementBlock("div",Gd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(h.value.toString())>1?"0px":"8px",fontWeight:600-(h.value-1)*100>=400?600-(h.value-1)*100:400,fontSize:17-h.value>=14?17-h.value+"px":"14px"})},e.toDisplayString((D=z==null?void 0:z.component)==null?void 0:D.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(yo)((R=z==null?void 0:z.component)==null?void 0:R.comp)),{pageLayout:v.value,config:{showIndex:(k=e.unref(_t)[H])==null?void 0:k.showIndex,allowMove:(V=e.unref(_t)[H])==null?void 0:V.allowMove,viewport:(B=e.unref(_t)[H])==null?void 0:B.viewport},compName:z==null?void 0:z.component.name,compNames:e.unref(wo),itemData:(ue=z==null?void 0:z.component)==null?void 0:ue.compData,childItemData:(Re=z==null?void 0:z.component)==null?void 0:Re.itemChildData,key:e.unref(xa),cacheNewData:e.unref(Ya),onChange:e.unref(bo),index:(z==null?void 0:z.id)??H,onContentChange:e.unref(ko),onPageChange:e.unref(xo),parentTableId:(tt=z==null?void 0:z.component)==null?void 0:tt.tableId,allMapContents:e.unref(mo),children:(Ve=z==null?void 0:z.component)==null?void 0:Ve.children,level:h.value,onRowClick:C,onRouteUrl:_,onClickTrigger:e.unref(Ml),onClickMainKey:e.unref(zl)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])]))}}),Yd=Pt._export_sfc(Xd,[["__scopeId","data-v-6e5a155a"]]),lr=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),Jd={TABLE:ea.ssTable,FORM:Po,TABLEOPERATE:os,TABLESTYLE:ks,TABLEEXTEND:ws,TABLEINTERACTION:Es,FORMOPERATE:Ro,FOLD:tc,CALCULATOR:ic,METHODBUTTON:Dc,AVATARUPLOAD:Mo.ssAvatar,SIGNATURE:Mo.ssSignature,FORMTOP:Po,STEP:Mc,STEPOPERATE:Hs,TIMELINE:$c,TIMELINEOPERATE:Zs,FORMTOPOPERATE:Ro,SIGNATUREOPERATE:Nc,AVATARUPLOADOPERATE:_c,TABS:Kc,TABSOPERATE:Iu,CHART:Uu,CHARTOPERATE:ep,LAYOUT:Op,LAYOUTOPERATE:Up,PARENTITEM:Yd};function oa(a){return Jd[a==null?void 0:a.toUpperCase()]||null}exports.De=or;exports.activeStepInfo=na;exports.affixItems=gp;exports.allMapContents=mo;exports.cacheNewData=Ya;exports.checkForTableContents=hc;exports.checkIsShowGroup=sc;exports.checkIsShowGroupForm=cc;exports.checkIsShowTable=dc;exports.clickMainKey=zl;exports.clickSavePage=vp;exports.clickStep=Rl;exports.clickTrigger=Ml;exports.compId=xa;exports.compNames=wo;exports.compShow=Xa;exports.contentTransArray=ha;exports.contentTransArrayToAll=ma;exports.contentTransArrayToAllNoExtra=uo;exports.debounce=vo;exports.existLayouts=Ep;exports.formToExtraContent=fc;exports.generateLayouts=gs;exports.getComponent=oa;exports.getComponents=yo;exports.getExtraContents=gc;exports.getSliceContLength=Ip;exports.gridRowHeight=ps;exports.isStepLayout=Do;exports.isUndefined=wl;exports.newContentTransArrayToAllNoExtra=pc;exports.onBack=fp;exports.onChange=bo;exports.onClick=hp;exports.onContentChange=ko;exports.onExtendTaskEnd=Cp;exports.onPageBack=_p;exports.onPageChange=xo;exports.onSaveBack=Bl;exports.onSelectFixContent=dp;exports.renderShowItems=Nl;exports.showItems=_t;exports.sliceTableLength=Vl;exports.slotContent=lr;exports.st=Ja;exports.stepItems=Bp;exports.toNumber=co;exports.toolBar=On;exports.verifyButton=Sp;
|