ss-component-new 1.2.210 → 1.2.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/{MTLLoader-CMQuFz2U.js → MTLLoader-67H7fk80.js} +1 -1
  2. package/dist/{MTLLoader-Dn7qvdQE.cjs → MTLLoader-CL8XSHGp.cjs} +1 -1
  3. package/dist/{OrbitControls-BwOP9BCH.js → OrbitControls-C6M2yrLB.js} +1 -1
  4. package/dist/{OrbitControls-CKmqHTFG.cjs → OrbitControls-CnIsW8aw.cjs} +1 -1
  5. package/dist/{URDFLoader-LcNMUu2Q.cjs → URDFLoader-BX5IuzJ8.cjs} +1 -1
  6. package/dist/{URDFLoader-B4mwog0r.js → URDFLoader-DoVjA77Z.js} +2 -2
  7. package/dist/{animationData-CF8iySCX.js → animationData-BjKOHbzr.js} +1 -1
  8. package/dist/{animationData-CttWJgEw.cjs → animationData-DwRMSEcR.cjs} +1 -1
  9. package/dist/{array-D7pDQ0ai.cjs → array-CJjaF-30.cjs} +1 -1
  10. package/dist/{array-BjZvjLNf.js → array-Cmui25df.js} +1 -1
  11. package/dist/{iconfont-DLz03Pua.js → iconfont-C6xrTLDV.js} +2 -2
  12. package/dist/{iconfont-v_9e6_Wr.cjs → iconfont-alw7deIH.cjs} +1 -1
  13. package/dist/{index-D2BxLiKo.cjs → index-0ZaO0N8Y.cjs} +1 -1
  14. package/dist/{index-DXOFx4Js.js → index-3e98Utf1.js} +2 -2
  15. package/dist/{index-D5o0yFsY.js → index-B16xvnZZ.js} +1 -1
  16. package/dist/{index-BQcDZ9zY.cjs → index-B6eyscWd.cjs} +1 -1
  17. package/dist/{index-9ygxLpV4.cjs → index-BA5lzuZs.cjs} +1 -1
  18. package/dist/{index-CzgAT9P9.js → index-BJ607Cgr.js} +2 -2
  19. package/dist/{index-D9VJiqIr.js → index-BJ6EviJu.js} +1 -1
  20. package/dist/{index-CTXsrOke.js → index-BWYzx9On.js} +1 -1
  21. package/dist/{index-CTVosZpD.cjs → index-BXqsy0Nl.cjs} +1 -1
  22. package/dist/{index-P7IneBeG.js → index-BZWgeRjN.js} +3 -3
  23. package/dist/{index-dVe4jXXP.cjs → index-BiZxAQWz.cjs} +1 -1
  24. package/dist/index-BlzC7uD8.js +3577 -0
  25. package/dist/{index-rat8ooKP.cjs → index-BmVUsjsm.cjs} +1 -1
  26. package/dist/{index-C5mK6G4B.js → index-C251JILB.js} +8 -8
  27. package/dist/{index-CfvIJnQ4.js → index-CAi-JNl0.js} +1 -1
  28. package/dist/{index-Ccucb-4Z.cjs → index-CN4uUlDb.cjs} +1 -1
  29. package/dist/{index-C_IeP5sH.js → index-CqyCNXc9.js} +1 -1
  30. package/dist/{index-CZpCcMJo.cjs → index-Ct9aTte1.cjs} +1 -1
  31. package/dist/{index-C5rlnhuB.cjs → index-Ct_sBp18.cjs} +1 -1
  32. package/dist/index-CvD54iz8.cjs +1 -0
  33. package/dist/{index-DUWL4jpR.js → index-CwI3-CUs.js} +1 -1
  34. package/dist/{index-NSTwCJrr.cjs → index-D-nlJ3o0.cjs} +1 -1
  35. package/dist/{index-C6epDMmF.cjs → index-D737Q5uV.cjs} +1 -1
  36. package/dist/{index-DqpK4iid.js → index-D9R32sv-.js} +4 -4
  37. package/dist/index-DA6AZg6p.cjs +1 -0
  38. package/dist/{index-np8quoQc.cjs → index-DAkcroe-.cjs} +1 -1
  39. package/dist/{index-4xWViEpw.js → index-DBP65bJO.js} +1 -1
  40. package/dist/{index-Co21kVZ9.cjs → index-DEFMo4Ss.cjs} +1 -1
  41. package/dist/{index-BOo0k-6s.cjs → index-DHbfeZj9.cjs} +2 -2
  42. package/dist/{index-FamU_pWj.js → index-DOvORsix.js} +1 -1
  43. package/dist/{index-2kxli95n.cjs → index-DTCncP0c.cjs} +1 -1
  44. package/dist/{index-BFmB_GNc.js → index-DcxH1zsA.js} +1 -1
  45. package/dist/{index-O1tZfdsI.js → index-DgqJP4cy.js} +16 -16
  46. package/dist/{index-ywaZJRUe.js → index-DjhgSTgp.js} +1 -1
  47. package/dist/{index-Gx0qq15p.js → index-DlWLHCf4.js} +1 -1
  48. package/dist/{index-B3ES4Imr.cjs → index-DuLX_CSd.cjs} +1 -1
  49. package/dist/{index-DtC6p78s.cjs → index-Dymvy1ct.cjs} +1 -1
  50. package/dist/index-RlPP0mDo.js +12475 -0
  51. package/dist/{index-Dgk4f0E3.js → index-VDplKeDq.js} +4 -4
  52. package/dist/{index-CRPwb5Di.cjs → index-XIKgdyQI.cjs} +1 -1
  53. package/dist/{index-BV2AdsW7.js → index-bAoJwc65.js} +7 -7
  54. package/dist/{index-CZmf9W1N.cjs → index-d8S_KBKB.cjs} +1 -1
  55. package/dist/{index-BqLlm8pl.cjs → index-kFQ6-6dk.cjs} +1 -1
  56. package/dist/{index-BM6eQMuj.js → index-li-CtQ8f.js} +3 -3
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B1f3iFI0.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BvTCBcSN.js} +8 -8
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CLOMtzqw.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CMQ255im.cjs} +2 -2
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CgpQQnQo.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bz8QgjF-.js} +26750 -26754
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BbQEEyFK.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLa0ds0U.cjs} +265 -265
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-yEFItRs3.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-2KtqLt8T.js} +4 -4
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-C5U5tv8m.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BQTgA0X7.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_1_lang-Qda9sMCN.js → index.vue_vue_type_style_index_1_lang-B3X_PfQc.js} +4 -4
  64. package/dist/{index.vue_vue_type_style_index_1_lang-D3s2wGtB.cjs → index.vue_vue_type_style_index_1_lang-YbKSvTqR.cjs} +2 -2
  65. package/dist/{main-B4kLVLRo.js → main-Cor_kytv.js} +3 -3
  66. package/dist/{main-ZKhN5hVB.cjs → main-DDz9fSdf.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +2 -2
  69. package/dist/ss-component.js +9 -9
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +10 -10
  72. package/dist/{threeModel-C6-ohRly.cjs → threeModel-2290Sh5Q.cjs} +1 -1
  73. package/dist/{threeModel-CCD_TCIt.js → threeModel-ml0tLJ6d.js} +4 -4
  74. package/dist/{threePreview--ajzp9ef.js → threePreview-2xz8Hw38.js} +3 -3
  75. package/dist/{threePreview-C_GqKG7E.cjs → threePreview-C3CVwE-Y.cjs} +1 -1
  76. package/dist/{threeSceneView-BuDjh1PW.cjs → threeSceneView-B4nKIou-.cjs} +1 -1
  77. package/dist/{threeSceneView-2SkyZMLQ.js → threeSceneView-DDpsp26F.js} +8 -8
  78. package/dist/{threeSceneViewForCPMPIP-BAHntlai.js → threeSceneViewForCPMPIP-9PDSLEqZ.js} +7 -7
  79. package/dist/{threeSceneViewForCPMPIP-PKZiN1Hi.cjs → threeSceneViewForCPMPIP-yuW3lgix.cjs} +1 -1
  80. package/dist/{threeTrackPathView-DQXfAyfj.js → threeTrackPathView-BH4W5aAJ.js} +3 -3
  81. package/dist/{threeTrackPathView-CaZJjtlj.cjs → threeTrackPathView-_RjI4stL.cjs} +1 -1
  82. package/dist/{threeViewerHost-BnEGRoC_.js → threeViewerHost-CdKrfyfa.js} +2 -2
  83. package/dist/{threeViewerHost-wJDeMzT0.cjs → threeViewerHost-Di0GKXwU.cjs} +1 -1
  84. package/dist/{urdfTree-CY-l53qd.js → urdfTree-DkFmyNMl.js} +1 -1
  85. package/dist/{urdfTree-Bvjb6fr9.cjs → urdfTree-MhNihTDQ.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-WyflfVY-.js → workpieceTreePanel-BFPFWqV3.js} +4 -4
  87. package/dist/{workpieceTreePanel-Y4Qc_oSv.cjs → workpieceTreePanel-BeRnxO8B.cjs} +1 -1
  88. package/package.json +1 -1
  89. package/dist/index-CaHvkH1f.js +0 -3385
  90. package/dist/index-Cbbw4bt5.cjs +0 -1
  91. package/dist/index-DDJsccuu.cjs +0 -1
  92. package/dist/index-DZYnK5D6.js +0 -12425
  93. package/dist/obj/model.mtl +0 -42
  94. package/dist/obj/model.obj +0 -26110
  95. package/public/obj/model.mtl +0 -42
  96. package/public/obj/model.obj +0 -26110
@@ -0,0 +1 @@
1
+ "use strict";const bn=require("./index-DA6AZg6p.cjs"),e=require("vue"),v=require("./index-DOItJqcJ.cjs"),St=require("./index-DHbfeZj9.cjs"),Ee=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLa0ds0U.cjs"),Xt=require("./index-BA5lzuZs.cjs"),Io=require("./threeViewerHost-Di0GKXwU.cjs"),$t=require("./index-CXC0u8pm.cjs"),zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Do5yyRUw.cjs"),No=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ao=require("./index-D737Q5uV.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-DTCncP0c.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),yn=require("./index-9hspBVrQ.cjs"),xn=require("./index-DaRuwvRP.cjs");var $l=/\s/;function Kl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var jl=/^\s+/;function Ul(n){return n&&n.slice(0,Kl(n)+1).replace(jl,"")}var Vo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function Oo(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Vo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Vo:+n}var ro=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,b,g,f,x=0,_=!1,V=!1,R=!0;if(typeof n!="function")throw new TypeError(Xl);i=Oo(i)||0,v.isObject(s)&&(_=!!s.leading,V="maxWait"in s,u=V?Yl(Oo(s.maxWait)||0,i):u,R="trailing"in s?!!s.trailing:R);function J(B){var E=r,ge=d;return r=d=void 0,x=B,b=n.apply(ge,E),b}function O(B){return x=B,g=setTimeout(K,i),_?J(B):b}function ke(B){var E=B-f,ge=B-x,Je=i-E;return V?Jl(Je,u-ge):Je}function X(B){var E=B-f,ge=B-x;return f===void 0||E>=i||E<0||V&&ge>=u}function K(){var B=ro();if(X(B))return le(B);g=setTimeout(K,ke(B))}function le(B){return g=void 0,R&&r?J(B):(r=d=void 0,b)}function D(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?b:le(ro())}function y(){var B=ro(),E=X(B);if(r=arguments,d=this,f=B,E){if(g===void 0)return O(f);if(V)return clearTimeout(g),g=setTimeout(K,i),J(f)}return g===void 0&&(g=setTimeout(K,i)),b}return y.cancel=D,y.flush=$,y}var Zl="[object Boolean]";function mr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function yr(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__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(n,{emit:i}){const s=()=>{b.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var z;const S=(z=nt.value)==null?void 0:z.split("/");return(S==null?void 0:S.some(ue=>(ue==null?void 0:ue.includes("updateLoading"))||(ue==null?void 0:ue.includes("loading"))))?!1:He.value==="view"});const d=i,u=e.ref([]),b=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=Io.useThreeSystem(),_=e.ref(),V=e.ref(!1),R=e.ref(!1),J=e.ref([]),O=e.ref(),ke=e.ref(!1),X=e.ref([]),K=bn.useFormToTableComp(v.pinia),le=bn.useFormComp(v.pinia),D=e.ref(!1),$=e.ref(),y=v.useLoginState(v.pinia),{loginUserInfo:B}=v.storeToRefs(y),E=e.ref(),ge=e.ref(!0),Je=$t.useModelComp(v.pinia),{tableViewContents:st,itemData:Me,isEdit:He,routeToChildPath:De,lockingPage:A}=v.storeToRefs(Je),ee=e.ref(null),se=e.ref(!1),fe=e.ref(!1),Ze=$t.useMenuState(),{activeMenuPath:nt}=v.storeToRefs(Ze),Q=Ee.useOriginalState(v.pinia),{originalPath:L}=v.storeToRefs(Q),ye=e.ref([]),xe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),$e=async S=>{fe.value=S,await pe("disabled",null,S,!0)},Fe=async S=>{await pe("operable",null,S,!0)};e.watch(()=>nt.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const tt=()=>{e.nextTick(()=>{Y()})},Xe=S=>{var q;u.value=(q=u.value)==null?void 0:q.map(z=>({...z,isFormColHidden:!(S!=null&&S.includes(z.label))}))};e.onUnmounted(()=>{ee.value=null});const ve=S=>{d("clickTrigger",S)},F=async S=>{var q,z,ue,H,P,Se;if(S===""){let ne="";(q=u.value)==null||q.forEach(be=>{be!=null&&be.isMain&&(ne=be==null?void 0:be.value)});let G=await Ee.getItemData(De.value,sessionStorage.getItem("systemKey"),"");ne=((Se=(P=(H=(ue=(z=G==null?void 0:G[0])==null?void 0:z.compData)==null?void 0:ue.find(be=>(be==null?void 0:be.key)==="mainRouters"))==null?void 0:H.contents)==null?void 0:P[0])==null?void 0:Se.routerContent)+L.value+ne;let ce=await Ee.getItemData(ne,sessionStorage.getItem("systemKey"),"");ke.value=!0,X.value=ce==null?void 0:ce.filter(be=>(be==null?void 0:be.comp)!=="methodButton"),d("routeUrl",X.value)}},Y=()=>{var q;const S=(q=ee.value)==null?void 0:q.$el;S&&Ee.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{const{oldIndex:ue,newIndex:H}=z;if(ue===H)return;const P=u.value.splice(ue,1)[0];u.value.splice(H,0,P)}})},pe=async(S,q,z,ue=!1)=>{var H,P,Se,ne,G,ae,ce,be;try{Je.setRefreshCurStructure(!1);const _e=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((H=_e==null?void 0:_e.data)==null?void 0:H.code)===200){let Te=(G=(ne=(Se=(P=_e==null?void 0:_e.data)==null?void 0:P.result)==null?void 0:Se[0])==null?void 0:ne.value)==null?void 0:G.pageData;ue?Te={...Te,compData:(ce=Te==null?void 0:Te.compData)==null?void 0:ce.map(Ve=>{var me;return(Ve==null?void 0:Ve.key)==="formContent"?{...Ve,contents:(me=Ve==null?void 0:Ve.contents)==null?void 0:me.map(je=>({...je,[S]:z}))}:Ve})}:Te={...Te,compData:(ae=Te==null?void 0:Te.compData)==null?void 0:ae.map(Ve=>{var me;return(Ve==null?void 0:Ve.key)==="formContent"?{...Ve,contents:(me=Ve==null?void 0:Ve.contents)==null?void 0:me.map(je=>(je==null?void 0:je.prop)===(q==null?void 0:q.prop)?{...je,[S]:z}:je)}:Ve})};const U=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Te}});((be=U==null?void 0:U.data)==null?void 0:be.code)===200?(v.ElMessage.success("编辑成功"),Je.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},de=async(S,q)=>{await pe("label",q,S)},Z=async(S,q)=>{S&&await pe("type",q,S)},oe=async(S,q,z)=>{await pe(q,z,S,!1)},te=(S,q)=>{E.value===q?ge.value=!1:ge.value=!0,E.value=q==null?void 0:q.changeProp},ie=async S=>{var z,ue,H,P,Se,ne,G,ae,ce,be,_e,Te,U,Ve,me;let q=[];if((z=S==null?void 0:S.toString())!=null&&z.includes(".urdf")){if(S.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,b.value=!0;return}if((ue=S==null?void 0:S.toString())!=null&&ue.includes(".stl")||(H=S==null?void 0:S.toString())!=null&&H.includes(".STL")||(P=S==null?void 0:S.toString())!=null&&P.includes(".obj")||(Se=S==null?void 0:S.toString())!=null&&Se.includes(".mtl")){const it=((ne=S==null?void 0:S.toString())==null?void 0:ne.split(",")).map(Ge=>({url:Ge,extension:x(Ge)}));f.value=it,g.value=!1,b.value=!0;return}if((G=S==null?void 0:S.toString())!=null&&G.includes(".stl")||(ae=S==null?void 0:S.toString())!=null&&ae.includes(".STL")||(ce=S==null?void 0:S.toString())!=null&&ce.includes(".obj")||(be=S==null?void 0:S.toString())!=null&&be.includes(".mtl")){let je,it=[],Ge={};if(Array.isArray(S)?je=S:je=S==null?void 0:S.split(","),je==null||je.forEach(rt=>{rt.includes(".mtl")?it.push(rt):Ge.blob=Ge.blob?Ge.blob+","+rt:rt}),(it==null?void 0:it.length)>0&&(Ge.mtlBlobs=it),(Te=(_e=Object.values(Ge))==null?void 0:_e[0])!=null&&Te.includes("http:"))q.push(Ge);else{const rt=new Blob([Ge.blob],{type:"application/octet-stream;charset=UTF-8"});let Pe=URL.createObjectURL(rt),Qe="";(U=S==null?void 0:S.split("/"))==null||U.forEach((Ue,ze)=>{var Ce;ze===((Ce=S==null?void 0:S.split("/"))==null?void 0:Ce.length)-1&&(Qe=Ue)}),(Ve=Ge.blob)!=null&&Ve.includes(".stl")&&(Qe=(Qe==null?void 0:Qe.replaceAll(">",""))+".urdf"),O.value=[{name:Qe,blobUrl:Pe}],R.value=!0}}else{const je=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),it=await v.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{je.close()}),Ge=new Blob([it.data],{type:"application/octet-stream;charset=UTF-8"});let rt=URL.createObjectURL(Ge),Pe="";(me=S==null?void 0:S.split("/"))==null||me.forEach((Qe,Ue)=>{var ze;Ue===((ze=S==null?void 0:S.split("/"))==null?void 0:ze.length)-1&&(Pe=Qe)}),O.value=[{name:Pe,blobUrl:rt}],R.value=!0}(q==null?void 0:q.length)>0&&le.setBlobUrls(q)},Re=()=>{R.value=!1},ot=S=>{var P,Se,ne,G;const q=(Se=(P=v.cloneDeep(r.itemData))==null?void 0:P.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:Se.contents,z=v.cloneDeep(S.content);let ue={};z&&((ne=Object.values(z))==null?void 0:ne.length)>0&&((G=Object.values(z))==null||G.forEach((ae,ce)=>{ue[q[ce].key]=ae}));const H={content:ue,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",H)},h=e.computed(()=>"http://222.92.178.198:62001"),C=async S=>{var _e,Te,U,Ve,me,je,it,Ge,rt,Pe,Qe,Ue,ze,Ce,Ne,ut;if(!S)return;(Te=(_e=r==null?void 0:r.itemData)==null?void 0:_e.find(he=>(he==null?void 0:he.key)==="parentFormPath"))==null||Te.contents;let q=st.value;(q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(he=>{var Be,Ke,M,Ae;let Ie=(Be=he==null?void 0:he.key)==null?void 0:Be.split("/");return(r==null?void 0:r.compName)===(Ie==null?void 0:Ie[0])&&(Ke=u.value)!=null&&Ke.find(at=>(at==null?void 0:at.prop)===(Ie==null?void 0:Ie[1]))&&(he.value=(Ae=(M=u.value)==null?void 0:M.find(at=>(at==null?void 0:at.prop)===(Ie==null?void 0:Ie[1])))==null?void 0:Ae.value),he}),Je.setTableViewContents(q));const z=v.cloneDeep(r.itemData);let ue=z==null?void 0:z.map(he=>{var Ie;return(he==null?void 0:he.key)==="formContent"&&((Ie=he.contents)==null||Ie.map((Be,Ke)=>{var M,Ae,at,Le,Ye,Oe,ft,pt,ct,gt,bt,Nt,Pt,Vt,_t,Ft,xt,Ht,Yt;return Be.type=(Ae=(M=u.value)==null?void 0:M.find(Ot=>(Ot==null?void 0:Ot.prop)===(Be==null?void 0:Be.prop)))==null?void 0:Ae.type,Be.options=Be!=null&&Be.options?Be.options:((Ye=(Le=(at=Be==null?void 0:Be.key)==null?void 0:at.split("$"))==null?void 0:Le[1])==null?void 0:Ye.length)>0?(ct=(pt=bn.formGetOptions((ft=(Oe=Be==null?void 0:Be.key)==null?void 0:Oe.split("$"))==null?void 0:ft[1]))==null?void 0:pt.split(","))==null?void 0:ct.map(Ot=>({label:Ot,value:Ot})):[],(gt=Be==null?void 0:Be.key)!=null&&gt.includes("$")&&(Be.key=(Nt=(bt=Be==null?void 0:Be.key)==null?void 0:bt.split("$"))==null?void 0:Nt[0]),Be.signature=(Vt=(Pt=u.value)==null?void 0:Pt.find(Ot=>(Ot==null?void 0:Ot.prop)===(Be==null?void 0:Be.prop)))==null?void 0:Vt.signature,Be.isLoginUser=(Ft=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(Be==null?void 0:Be.prop)))==null?void 0:Ft.isLoginUser,Be.value=(xt=Object.values(S))==null?void 0:xt[Ke],Be.isFormColHidden=(Yt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(Be==null?void 0:Be.prop)))==null?void 0:Yt.isFormColHidden,Be})),he}),H=u.value,P=(Ve=(U=v.cloneDeep(ue))==null?void 0:U.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:Ve.contents;if(H=H==null?void 0:H.map(he=>{var Ie;return he.value=(Ie=P==null?void 0:P.find((Be,Ke)=>((Be==null?void 0:Be.id)??Ke)===(he==null?void 0:he.id)))==null?void 0:Ie.value,he}),!ge.value){d("contentChange",{contents:ue,index:r.index});return}let Se="",ne=(it=(je=(me=v.cloneDeep(ue))==null?void 0:me.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:je.contents)==null?void 0:it.find((he,Ie)=>{var Be,Ke,M;return(he==null?void 0:he.label)===E.value||Ie.toString()===((M=(Ke=(Be=E.value)==null?void 0:Be.split("t"))==null?void 0:Ke[1])==null?void 0:M.toString())}),G=(Ge=ne==null?void 0:ne.optionUrl)==null?void 0:Ge.menuSelect,ae=!0;if((Qe=(Pe=(rt=v.cloneDeep(ue))==null?void 0:rt.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:Pe.contents)==null||Qe.forEach(he=>{var Ie,Be,Ke,M,Ae,at;ae&&((Ke=(Be=(Ie=he==null?void 0:he.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:Be[1])!=null&&Ke.includes("["))&&(Se=(Ae=(M=he==null?void 0:he.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Ae[1],JSON.stringify(G)===JSON.stringify((at=he==null?void 0:he.optionUrl)==null?void 0:at.menuSelect)&&(ae=!1))}),(Ue=ne==null?void 0:ne.optionUrl)!=null&&Ue.menuSelect&&ge.value){let he=await bn.getSelectRow(ne),Ie,Be=(ze=ne==null?void 0:ne.optionUrl)==null?void 0:ze.menuSelect;if(he==null||he.forEach(Ke=>{var M,Ae,at,Le,Ye,Oe,ft,pt,ct,gt;Se===((Ae=(M=ne==null?void 0:ne.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Ae[1])&&((Ye=(Le=(at=ne==null?void 0:ne.optionUrl)==null?void 0:at.groupSelect)==null?void 0:Le[1])!=null&&Ye.includes("["))&&((gt=v.cloneDeep(Ke))==null?void 0:gt[(ct=(pt=(ft=(Oe=ne==null?void 0:ne.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:ft[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(ne==null?void 0:ne.value)&&(Ie=Ke)}),Ie){let Ke=v.cloneDeep(H);Ke=Ke==null?void 0:Ke.map(Ae=>{var at,Le,Ye,Oe,ft,pt,ct,gt,bt,Nt,Pt;return(Ie!=null&&Ie[Ae==null?void 0:Ae.label]||Ie!=null&&Ie[(Oe=(Ye=(Le=(at=Ae==null?void 0:Ae.optionUrl)==null?void 0:at.groupSelect)==null?void 0:Le[1])==null?void 0:Ye.replaceAll("[",""))==null?void 0:Oe.replaceAll("]","")])&&((ct=(pt=(ft=Ae==null?void 0:Ae.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:pt[1])!=null&&ct.includes("["))&&Be!=null&&Be.every(Vt=>{var _t,Ft;return(Ft=(_t=Ae==null?void 0:Ae.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Ft.includes(Vt)})&&(Ae.value=(Ie==null?void 0:Ie[Ae==null?void 0:Ae.label])||(Ie==null?void 0:Ie[(Pt=(Nt=(bt=(gt=Ae==null?void 0:Ae.optionUrl)==null?void 0:gt.groupSelect)==null?void 0:bt[1])==null?void 0:Nt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")]),Array.isArray(Ae.value)&&Ae.value.every(Vt=>(Vt==null?void 0:Vt.url)&&(Vt==null?void 0:Vt.name))&&(Ae.type="Upload")),Ae}),Ke=Ke==null?void 0:Ke.map(Ae=>{var at,Le,Ye;return(at=Ae==null?void 0:Ae.optionUrl)!=null&&at.oldMenuSelect&&(Ae.optionUrl.menuSelect=(Ye=(Le=v.cloneDeep(Ae))==null?void 0:Le.optionUrl)==null?void 0:Ye.oldMenuSelect),Ae}),u.value=v.cloneDeep(Ke);let M=v.cloneDeep(Ke);M=M==null?void 0:M.map(Ae=>{var at,Le,Ye,Oe,ft,pt;return(Le=(at=Ae==null?void 0:Ae.optionUrl)==null?void 0:at.menuSelect)!=null&&Le.some(ct=>ct==null?void 0:ct.includes("["))&&(Ae.optionUrl.oldMenuSelect=(Oe=(Ye=v.cloneDeep(Ae))==null?void 0:Ye.optionUrl)==null?void 0:Oe.menuSelect,Ae.optionUrl.menuSelect=(pt=(ft=Ae==null?void 0:Ae.optionUrl)==null?void 0:ft.menuSelect)==null?void 0:pt.map(ct=>{var gt,bt,Nt,Pt;if(ct!=null&&ct.includes("[")){let Vt=(bt=(gt=ct==null?void 0:ct.replaceAll("[","").replaceAll("]",""))==null?void 0:gt.split(":"))==null?void 0:bt[1];ct=(Pt=(Nt=v.cloneDeep(Ke))==null?void 0:Nt.find(_t=>(_t==null?void 0:_t.label)===Vt))==null?void 0:Pt.value}return ct})),Ae}),u.value=M}else u.value=H;ue=ue==null?void 0:ue.map(Ke=>{var M;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(M=Ke.contents)==null?void 0:M.map(Ae=>{var at,Le,Ye,Oe;return Ae.value=((Le=(at=u.value)==null?void 0:at.find(ft=>(ft==null?void 0:ft.label)===(Ae==null?void 0:Ae.key)))==null?void 0:Le.value)??(Ae==null?void 0:Ae.value),Ae.type=((Oe=(Ye=u.value)==null?void 0:Ye.find(ft=>(ft==null?void 0:ft.prop)===(Ae==null?void 0:Ae.key)))==null?void 0:Oe.type)??(Ae==null?void 0:Ae.type),Ae})),Ke})}ge.value=!1,d("contentChange",{contents:ue,index:r.index});let ce=[],be=[];if((Ne=v.cloneDeep((Ce=ue==null?void 0:ue.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:Ce.contents))==null||Ne.forEach(he=>{var Ie;Array.isArray(he==null?void 0:he.value)&&((Ie=he==null?void 0:he.value)!=null&&Ie.find(Be=>{var Ke;return(Ke=Be==null?void 0:Be.url)==null?void 0:Ke.includes(".obj")}))&&(be=he==null?void 0:he.value)}),(be==null?void 0:be.length)>0){const he=(ut=v.cloneDeep(be))==null?void 0:ut.filter(Ie=>{var Be;return(Be=Ie==null?void 0:Ie.url)==null?void 0:Be.includes(".obj")});he==null||he.forEach(Ie=>{var Ke,M,Ae,at;const Be=(Ke=be==null?void 0:be.filter(Le=>{var Ye;return(Le==null?void 0:Le.name)===(Ie==null?void 0:Ie.name)&&((Ye=Le==null?void 0:Le.url)==null?void 0:Ye.includes(".mtl"))}))==null?void 0:Ke.map(Le=>Le==null?void 0:Le.url);ce.push({objUrl:Ie==null?void 0:Ie.url,mtlUrls:((M=be==null?void 0:be.filter(Le=>{var Ye;return(Le==null?void 0:Le.name)===(Ie==null?void 0:Ie.name)&&((Ye=Le==null?void 0:Le.url)==null?void 0:Ye.includes(".mtl"))}))==null?void 0:M.length)===1?(at=(Ae=be==null?void 0:be.filter(Le=>{var Ye;return(Le==null?void 0:Le.name)===(Ie==null?void 0:Ie.name)&&((Ye=Le==null?void 0:Le.url)==null?void 0:Ye.includes(".mtl"))}))==null?void 0:Ae[0])==null?void 0:at.url:Be})}),le.setObjUrl(ce)}},I=S=>{if(!S)return;const q=[];let z="";for(let ue of S)(ue.includes("[")||z.includes("["))&&(z+=ue.trim(),v.cloneDeep(z).split("【").length-1===v.cloneDeep(z).split("】").length-1&&v.cloneDeep(z).split("[").length-1===v.cloneDeep(z).split("]").length-1&&(q.push(z.replace(/\/\*[\s\S]*?\*\//g,"")),z=""));return q},W=(S,q,z)=>{let ue="";const H=q==null?void 0:q.map(P=>{var Se;return(Se=P==null?void 0:P.value)==null?void 0:Se.pageData});return H==null||H.forEach(P=>{var Se;(P==null?void 0:P.name)===(S==null?void 0:S[0])&&((Se=P==null?void 0:P.compData)==null||Se.forEach(ne=>{var G;(ne==null?void 0:ne.key)==="formContent"&&((G=ne==null?void 0:ne.contents)==null||G.forEach(ae=>{var ce;(ae==null?void 0:ae.prop)===(S==null?void 0:S[1])&&(ue=(ae==null?void 0:ae.value)===""?Ee.judgeContents((ce=v.cloneDeep(ae))==null?void 0:ce.optionUrl,z):ae==null?void 0:ae.value)}))}))}),ue},w=(S,q,z,ue)=>{var ne,G;let H="",P="";(ne=v.cloneDeep(q))==null||ne.forEach((ae,ce)=>{ae!=null&&ae.includes("[")?P=P+L.value+S[ce]:P=P===""?P+ae:P+"/"+ae});let Se=(G=ue[P])==null?void 0:G.map(ae=>{var ce;return(ce=ae==null?void 0:ae.value)==null?void 0:ce.pageData});return Se==null||Se.forEach(ae=>{var ce;(ae==null?void 0:ae.name)===(z==null?void 0:z[0])&&((ce=ae==null?void 0:ae.compData)==null||ce.forEach(be=>{var _e;(be==null?void 0:be.key)==="formContent"&&((_e=be==null?void 0:be.contents)==null||_e.forEach(Te=>{(Te==null?void 0:Te.prop)===(z==null?void 0:z[1])&&(H=Te==null?void 0:Te.value)}))}))}),H};return e.watch(()=>r.itemData,async()=>{var Se,ne,G,ae,ce,be,_e,Te,U,Ve,me,je,it,Ge,rt,Pe,Qe,Ue,ze;const S=(Se=r.itemData)==null?void 0:Se.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"),q=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(Ce=>(Ce==null?void 0:Ce.key)==="formButton"),z=(G=v.cloneDeep(r.itemData))==null?void 0:G.find(Ce=>(Ce==null?void 0:Ce.key)==="formFlex"),ue=(ae=v.cloneDeep(r.itemData))==null?void 0:ae.find(Ce=>(Ce==null?void 0:Ce.key)==="formWrap"),H=(ce=v.cloneDeep(r.itemData))==null?void 0:ce.find(Ce=>(Ce==null?void 0:Ce.key)==="enableWrap");if((ue==null?void 0:ue.contents)==="纵向"?V.value=!1:V.value=!0,D.value=(H==null?void 0:H.contents)===void 0?!1:H==null?void 0:H.contents,$.value=typeof(z==null?void 0:z.contents)!="boolean"?!(!(z!=null&&z.contents)===""||((be=z==null?void 0:z.contents)==null?void 0:be.toUpperCase())==="VERTICAL"):z==null?void 0:z.contents,((_e=S==null?void 0:S.contents)==null?void 0:_e.length)>0&&Array.isArray(S==null?void 0:S.contents)){let Ce=r.allMapContents;const Ne=(U=(Te=v.cloneDeep(S))==null?void 0:Te.contents)==null?void 0:U.map((M,Ae)=>{var Vt,_t,Ft,xt,Ht,Yt,Ot,Va,wa,Oa,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Ma,ba,fa,_a,ka,na,ga,Xa;let at=(M==null?void 0:M.label)??(M==null?void 0:M.key)??"",Le=(M==null?void 0:M.type)??"",Ye=(M==null?void 0:M.options)??[];if((Vt=M==null?void 0:M.key)!=null&&Vt.includes("$")&&(at=(_t=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:_t[0],((xt=(Ft=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Ft[1])==null?void 0:xt.length)>0)){const[wt,Zt]=(Yt=(Ht=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Ht[1])==null?void 0:Yt.split(/[()]/);Le=((Ot=Ee.FormType.find(yt=>(yt==null?void 0:yt.key)===wt))==null?void 0:Ot.value)??"",((Va=Zt==null?void 0:Zt.split(","))==null?void 0:Va.length)>0&&(Ye=(wa=Zt==null?void 0:Zt.split(","))==null?void 0:wa.map(yt=>({label:yt,value:yt})))}let Oe=[];M!=null&&M.contents&&!Array.isArray(M==null?void 0:M.contents)&&(Oe=(Ka=(Oa=M==null?void 0:M.contents)==null?void 0:Oa.split(","))==null?void 0:Ka.map(wt=>({label:wt,value:wt}))),((Da=M==null?void 0:M.optionUrl)==null?void 0:Da.selectRelateType)==="自定义绑定"&&(Oe=(Ca=(ja=M==null?void 0:M.optionUrl)==null?void 0:ja.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let ft=!1,pt=(M==null?void 0:M.isFormColHidden)??!1,ct=Ee.judgeContents((Ua=v.cloneDeep(M))==null?void 0:Ua.optionUrl,Ce),gt=ct!==void 0&&ct!==""?ct:M!=null&&M.originalContent&&(M==null?void 0:M.originalContent)!==""?M.originalContent:M!=null&&M.value?M.value:(Ye==null?void 0:Ye.length)>0?(Wa=Ye==null?void 0:Ye[0])==null?void 0:Wa.value:(M==null?void 0:M.value)??"",bt=!1,Nt=ct!==void 0||Le===""?"Input":Le;if((Array.isArray(ct)&&(ct!=null&&ct.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(gt)&&(gt!=null&&gt.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Nt="upload"),typeof gt=="string"&&(gt!=null&&gt.includes("loginUser"))&&!(gt!=null&&gt.includes("loginUserSign"))||M!=null&&M.isLoginUser)ft=!0,gt=((Ha=B.value)==null?void 0:Ha.姓名)||((qa=B.value)==null?void 0:qa.account)||((Ga=B.value)==null?void 0:Ga.账号)||((Ma=B.value)==null?void 0:Ma.userName);else if(typeof gt=="string"&&(gt!=null&&gt.includes("loginUserSign"))||M!=null&&M.signature||M!=null&&M.isShow)if(bt=!0,(M==null?void 0:M.isShow)==="originalSignature")Nt="image",gt=h.value+"/"+((ba=B.value)==null?void 0:ba.signature);else{let wt=[...new Set(I(M.isShow))].map(Mt=>{var Ea,oa,ma,Qt;return{key:(Qt=(ma=(oa=(Ea=Mt==null?void 0:Mt.split("["))==null?void 0:Ea[1])==null?void 0:oa.split("]"))==null?void 0:ma[0])==null?void 0:Qt.split(":"),value:""}});(fa=Me.value)==null||fa.forEach(Mt=>{wt==null||wt.forEach((ca,Ea)=>{var ma;let oa=ca==null?void 0:ca.key;(Mt==null?void 0:Mt.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((ma=Mt==null?void 0:Mt.compData)==null||ma.forEach(Qt=>{var La;(Qt==null?void 0:Qt.key)==="formContent"&&((La=Qt==null?void 0:Qt.contents)==null||La.forEach(Tt=>{(Tt==null?void 0:Tt.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(wt[Ea].value=Tt==null?void 0:Tt.value)}))}))})});let Zt=wt==null?void 0:wt.map(Mt=>{var ca;return Mt.key="["+((ca=Mt.key)==null?void 0:ca.join(":"))+"]",Mt}),yt=M==null?void 0:M.isShow;Zt==null||Zt.forEach(Mt=>{Mt!=null&&Mt.value?yt=yt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):yt=yt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((_a=yt==null?void 0:yt.split("==="))==null?void 0:_a[0])+"==='"+((ka=yt==null?void 0:yt.split("==="))==null?void 0:ka[1])+"'":yt=((na=yt==null?void 0:yt.split("="))==null?void 0:na[0])+"='"+((ga=yt==null?void 0:yt.split("="))==null?void 0:ga[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(pt=!1,Nt="image",gt=h.value+"/"+((Xa=B.value)==null?void 0:Xa.signature)):gt=""}return Array.isArray(gt)&&gt.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(M.type="Upload"),M!=null&&M.isMainUrl&&(Nt="Url"),{label:at??"",name:"t"+Ae,prop:v.cloneDeep(M==null?void 0:M.key),type:Nt,value:M!=null&&M.isNewDate&&gt===""?new Date:gt,id:(M==null?void 0:M.id)??Ae,contents:(Oe==null?void 0:Oe.length)>0?Oe:Ye??[],width:(M==null?void 0:M.width)??1,isLoginUser:ft,config:M==null?void 0:M.config,optionUrl:(M==null?void 0:M.optionUrl)??M,isFormColHidden:pt,signature:bt,isMain:M==null?void 0:M.isMain,isMainUrl:M==null?void 0:M.isMainUrl,operable:(M==null?void 0:M.operable)??!1,disabled:(M==null?void 0:M.disabled)??!1}}),ut=Ne==null?void 0:Ne.map(M=>M==null?void 0:M.value);let he="";ut==null||ut.forEach(M=>{M!==""&&M!==void 0&&(he=he===""?M:he+"/"+M)}),K.setSelectArray(ut),K.setSelectString(he);let Ie=(Ve=v.cloneDeep(Ne))==null?void 0:Ve.map(M=>(M!=null&&M.value&&Ee.IsJson(M==null?void 0:M.value)&&Array.isArray(JSON.parse(M==null?void 0:M.value))&&(M.value=JSON.parse(M.value)),M));Ie=Ie==null?void 0:Ie.map(M=>{var Ae,at,Le,Ye,Oe,ft,pt,ct;if((at=(Ae=M==null?void 0:M.optionUrl)==null?void 0:Ae.menuSelect)!=null&&at.some(gt=>gt==null?void 0:gt.includes("["))){let gt="";M.optionUrl.oldMenuSelect=(Ye=(Le=v.cloneDeep(M))==null?void 0:Le.optionUrl)==null?void 0:Ye.menuSelect,M.optionUrl.menuSelect=(ft=(Oe=M==null?void 0:M.optionUrl)==null?void 0:Oe.menuSelect)==null?void 0:ft.map(bt=>{var Nt,Pt,Vt,_t,Ft,xt;if(bt!=null&&bt.includes("[")){let Ht=(Pt=(Nt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Nt.split(":"))==null?void 0:Pt[1];gt=W((Vt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:Vt.split(":"),Ce==null?void 0:Ce[nt.value],Ce),bt=((Ft=(_t=v.cloneDeep(Ie))==null?void 0:_t.find(Yt=>(Yt==null?void 0:Yt.label)===Ht))==null?void 0:Ft.value)||W((xt=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:xt.split(":"),Ce==null?void 0:Ce[nt.value],Ce)}return bt}),gt!==""&&M.value===""&&(M.value=w(M.optionUrl.menuSelect,M.optionUrl.oldMenuSelect,(pt=M==null?void 0:M.optionUrl)==null?void 0:pt.groupSelect,Ce),Array.isArray(M.value)&&((ct=M.value)!=null&&ct.every(bt=>bt==null?void 0:bt.url))&&(M.type="UPLOAD"))}return M}),u.value=Ie,fe.value=((me=u.value)==null?void 0:me.every(M=>M==null?void 0:M.disabled))||A.value===nt.value,se.value=(je=u.value)==null?void 0:je.every(M=>M==null?void 0:M.operable),ye.value=(it=u.value)==null?void 0:it.map(M=>M==null?void 0:M.label);let Be=[],Ke=[];if((Ge=v.cloneDeep(u.value))==null||Ge.forEach(M=>{var Ae;Array.isArray(M==null?void 0:M.value)&&((Ae=M==null?void 0:M.value)!=null&&Ae.find(at=>{var Le;return(Le=at==null?void 0:at.url)==null?void 0:Le.includes(".obj")}))&&(Ke=M==null?void 0:M.value)}),(Ke==null?void 0:Ke.length)>0){const M=(rt=v.cloneDeep(Ke))==null?void 0:rt.filter(Ae=>{var at;return(at=Ae==null?void 0:Ae.url)==null?void 0:at.includes(".obj")});M==null||M.forEach(Ae=>{var Le,Ye,Oe,ft;const at=(Le=Ke==null?void 0:Ke.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(Ae==null?void 0:Ae.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Le.map(pt=>pt==null?void 0:pt.url);Be.push({objUrl:Ae==null?void 0:Ae.url,mtlUrls:((Ye=Ke==null?void 0:Ke.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(Ae==null?void 0:Ae.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Ye.length)===1?(ft=(Oe=Ke==null?void 0:Ke.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(Ae==null?void 0:Ae.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Oe[0])==null?void 0:ft.url:at})}),le.setObjUrl(Be)}(Pe=v.cloneDeep(u.value))==null||Pe.forEach(M=>{var Ae,at,Le,Ye,Oe,ft,pt,ct,gt,bt,Nt,Pt,Vt;if((at=(Ae=M==null?void 0:M.value)==null?void 0:Ae.toString())!=null&&at.includes(".stl")||(Ye=(Le=M==null?void 0:M.value)==null?void 0:Le.toString())!=null&&Ye.includes(".STL")||(ft=(Oe=M==null?void 0:M.value)==null?void 0:Oe.toString())!=null&&ft.includes(".obj")||(ct=(pt=M==null?void 0:M.value)==null?void 0:pt.toString())!=null&&ct.includes(".mtl")||(bt=(gt=M==null?void 0:M.value)==null?void 0:gt.toString())!=null&&bt.includes(".urdf")){let _t={},Ft=[],xt;Array.isArray(M==null?void 0:M.value)?xt=M==null?void 0:M.value:xt=(Nt=M==null?void 0:M.value)==null?void 0:Nt.split(","),xt==null||xt.forEach(Ht=>{Ht.includes(".mtl")?Ft.push(Ht):_t.blob=_t.blob==="undefined"?Ht:_t.blob+","+Ht}),(Ft==null?void 0:Ft.length)>0&&(_t.mtlBlobs=Ft),(Vt=(Pt=Object.values(_t))==null?void 0:Pt[0])!=null&&Vt.includes("http:")}})}else u.value=[];let P=st.value;if((P==null?void 0:P.length)>0&&(P=P==null?void 0:P.map(Ce=>{var ut,he,Ie,Be;let Ne=(ut=Ce==null?void 0:Ce.key)==null?void 0:ut.split("/");return(r==null?void 0:r.compName)===(Ne==null?void 0:Ne[0])&&(he=u.value)!=null&&he.find(Ke=>(Ke==null?void 0:Ke.prop)===(Ne==null?void 0:Ne[1]))&&(Ce.value=(Be=(Ie=u.value)==null?void 0:Ie.find(Ke=>(Ke==null?void 0:Ke.prop)===(Ne==null?void 0:Ne[1])))==null?void 0:Be.value),Ce}),Je.setTableViewContents(P)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let Ce={};(Qe=v.cloneDeep(u).value)==null||Qe.forEach(Ne=>{(Ne==null?void 0:Ne.isMain)===!0&&(Ce[(Ne==null?void 0:Ne.prop)??(Ne==null?void 0:Ne.name)]=[{required:!0,message:`${(Ne==null?void 0:Ne.prop)||(Ne==null?void 0:Ne.name)}不能为空`}])}),_.value=Ce}if(((Ue=q==null?void 0:q.contents)==null?void 0:Ue.length)>0){const Ce=[];(ze=q==null?void 0:q.contents)==null||ze.forEach((Ne,ut)=>{(Ne==null?void 0:Ne.label)!==""&&Ce.push({label:(Ne==null?void 0:Ne.label)??"",id:(Ne==null?void 0:Ne.id)??ut,type:(Ne==null?void 0:Ne.type)??"",background:Ne==null?void 0:Ne.background})}),J.value=Ce}else J.value=[]},{deep:!0,immediate:!0}),e.watch(()=>A.value,S=>{fe.value=S===nt.value},{immediate:!0}),(S,q)=>{const z=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-switch"),H=e.resolveComponent("el-checkbox"),P=e.resolveComponent("el-popover"),Se=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(St.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:J.value,isRowFlex:!1,isEnableWrap:D.value,onOnButtonClick:ot,onChange:C,formDisabled:fe.value,formLabelsOperable:se.value,isButtonRow:V.value,onPreview:ie,onBlurChange:te,onHandleColEditChange:de,onHandleColTypeChange:Z,onRouteUrl:F,onClickTrigger:ve},{operateCol:e.withCtx(({renderColumns:ne,formDisabled:G,formLabelsOperable:ae})=>[e.createVNode(P,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:tt},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[q[1]||(q[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ue,{"model-value":G,"active-text":"禁用","inactive-text":"",onChange:$e,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ue,{"model-value":ae,"active-text":"编辑所有标签","inactive-text":"",onChange:Fe},null,8,["model-value"]),q[2]||(q[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Se,{modelValue:ye.value,"onUpdate:modelValue":q[0]||(q[0]=ce=>ye.value=ce),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ee,onChange:Xe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne,ce=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ce.label},[e.createVNode(H,{value:ce.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ce.label),1)]),_:2},1032,["value"]),e.createVNode(P,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var be;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((be=Object.keys(ce))==null?void 0:be.filter(_e=>{var Te;return(Te=xe.value)==null?void 0:Te.find(U=>(U==null?void 0:U.value)===_e)}),_e=>{var Te,U;return e.openBlock(),e.createElementBlock("div",{key:_e},[e.createVNode(St._sfc_main$1,{value:ce==null?void 0:ce[_e],"active-text":(U=(Te=xe.value)==null?void 0:Te.find(Ve=>(Ve==null?void 0:Ve.value)===_e))==null?void 0:U.label,inactiveText:"",onChange:Ve=>oe(Ve,_e,ce)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(z,{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"]),R.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:O.value,onDestroy:Re},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Io.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=zt._export_sfc(oi,[["__scopeId","data-v-e237c271"]]),Kn=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},kr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=kr(r==null?void 0:r.children,i),r)),n)},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},Bt=[{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"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],Ia=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Ee.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),V=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(B=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:D[B.key],id:g.value,contents:B==null?void 0:B.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},R=D=>{r("fixChange",v.cloneDeep(D))},J=D=>{r("deleteChange",v.cloneDeep(D))},O=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},ke=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},X=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(B=>{const E=Bt==null?void 0:Bt.find(ge=>(ge==null?void 0:ge.label)===(B==null?void 0:B.label));E?D[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),D.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const ge=Bt==null?void 0:Bt.find(Je=>(Je==null?void 0:Je.label)===(E==null?void 0:E.label));ge?D[ge.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},K=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},le=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(B,E)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(B.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>O(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>V(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>le(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(Cr,{tableChildContents:B==null?void 0:B.children,onDeleteChange:J,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:X},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=zt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Ee.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b),f=e.ref(""),x=e.ref([]),_=e.ref([]),V=D=>{r("fixChange",v.cloneDeep(D))},R=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(B=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:D[B.key],id:g.value,contents:B==null?void 0:B.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},J=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},O=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},ke=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(B=>{const E=Bt==null?void 0:Bt.find(ge=>(ge==null?void 0:ge.label)===(B==null?void 0:B.label));E?D[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),D.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const ge=Bt==null?void 0:Bt.find(Je=>(Je==null?void 0:Je.label)===(E==null?void 0:E.label));ge?D[ge.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},X=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},K=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=D=>{r("deleteChange",D)};return(D,$)=>{const y=e.resolveComponent("svg-icon"),B=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,ge)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(E.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Je=>J(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Je=>R(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Je=>K(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:le,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:O},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(B,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(B,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Cr=zt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},Li={class:"fix-content"},zi={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),V=e.ref([]),R=e.ref(""),J=e.ref(""),O=e.ref([]),ke=e.ref([]),X=e.ref([]),K=e.ref([]),le=e.ref(!1),D=e.ref([]),$=e.ref([]),y=e.ref(0),B=e.ref([]),E=e.ref([]),ge=e.ref([]),Je=()=>{le.value=!0;let h=[];Ta==null||Ta.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:C==null?void 0:C.options})}),D.value=h,$.value=h},st=()=>{var C,I,W;b.value=!0;let h=[];(W=(I=(C=Ee.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:I.value)==null||W.forEach(w=>{y.value++,h.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?void 0:w.label)==="类型"?"Input":"",id:y.value,contents:w==null?void 0:w.options})}),B.value=h,E.value=h},Me=h=>{h||(B.value=E.value)},He=async h=>{var C,I,W,w,S,q,z,ue,H,P,Se,ne;if((h==null?void 0:h.类型)!==((I=(C=E.value)==null?void 0:C.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:I.value)){let G=[],ae=await((S=(w=(W=Ee.FormContent)==null?void 0:W.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(ue=Ee.FormContent)==null?void 0:ue.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:H.value)==null?void 0:P.value):(z=(q=Ee.FormContent)==null?void 0:q.find(ce=>(ce==null?void 0:ce.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:z.value;if(ae==null||ae.forEach(ce=>{y.value++,G.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:ce!=null&&ce.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[ce.label])??"",id:y.value,contents:ce==null?void 0:ce.options,prop:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label)})}),h!=null&&h.菜单选项&&((Se=h==null?void 0:h.菜单选项)==null?void 0:Se.length)>0){const ce=await Ee.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(be=>((be==null?void 0:be.name)==="组信息选项"&&(be.contents=ce),be))}E.value=await Ee.selectToBase(v.cloneDeep(G)),B.value=await Ee.selectToBase(v.cloneDeep(G))}else{let G=v.cloneDeep(B.value);if(G=G==null?void 0:G.map(ae=>(ae.value=h==null?void 0:h[ae.name],ae)),h!=null&&h.菜单选项&&((ne=h==null?void 0:h.菜单选项)==null?void 0:ne.length)>0){const ae=await Ee.menuToContentType(h==null?void 0:h.菜单选项);G=G==null?void 0:G.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=ae),ce))}G=Ee.formToOptionsContents(G),E.value=await Ee.selectToBase(v.cloneDeep(G))}},De=async h=>{await He(h),B.value=E.value},A=(h,C)=>{if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.selectRelateType)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.menuSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.groupSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(C==null?void 0:C.value)||C[h.key];if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=C[h.key];return mr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&C[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!C[h.key]?!1:C[h.key]},ee=async h=>{var W,w,S,q,z,ue,H,P,Se;b.value=!0;let C=[];const I=await((S=(w=(W=Ee.FormContent)==null?void 0:W.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(ue=Ee.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:H.value)==null?void 0:P.value):(z=(q=Ee.FormContent)==null?void 0:q.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:z.value;if(I==null||I.forEach(ne=>{y.value++,C.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:(ne==null?void 0:ne.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):A(ne,h),id:y.value,contents:ne==null?void 0:ne.options})}),h!=null&&h.menuSelect&&((Se=h==null?void 0:h.menuSelect)==null?void 0:Se.length)>0){const ne=await Ee.menuToContentType(h==null?void 0:h.menuSelect);C=C==null?void 0:C.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ne),G))}R.value=h==null?void 0:h.id,B.value=await Ee.selectToBase(Ee.formToOptionsContents(C)),E.value=await Ee.selectToBase(Ee.formToOptionsContents(C))},se=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ge.value=(C=v.cloneDeep(ge.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=ge.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},fe=()=>{b.value=!1,B.value=[],R.value=""},Ze=async()=>{var W,w,S,q,z,ue,H,P,Se,ne;B.value=E.value;let h={};R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value);let C=await((S=(w=(W=Ee.FormContent)==null?void 0:W.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=B.value)==null?void 0:ae.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((z=(q=Ee.FormContent)==null?void 0:q.find(G=>{var ae,ce;return(G==null?void 0:G.key)===(((ce=(ae=B.value)==null?void 0:ae.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:z.value);if((ue=B.value)==null||ue.forEach(G=>{const ae=C==null?void 0:C.find(ce=>(ce==null?void 0:ce.label)===(G==null?void 0:G.label));ae&&(h[ae.key]=G.value)}),h.name=h.label,(H=ge.value)!=null&&H.find(G=>G.id===h.id))ge.value=(P=ge.value)==null?void 0:P.map(G=>(G.id===h.id&&(G=h),G));else{let G=v.cloneDeep(ge.value);ge.value||(ge.value=[]),G.push(h),ge.value=G}ge.value=ge.value.map(({id:G,...ae})=>ae),b.value=!1,R.value="";let I=v.cloneDeep(s.originalItemContents);(Se=v.cloneDeep(s.originalItemContents))!=null&&Se.find(G=>(G==null?void 0:G.key)==="tableToForm")?I=(ne=v.cloneDeep(s.originalItemContents))==null?void 0:ne.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=ge.value),G)):I.push({key:"tableToForm",contents:ge.value}),r("change",I)},nt=h=>{le.value=!0;let C=[];Ta==null||Ta.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,D.value=C,$.value=C};e.watch(()=>_.value,()=>{var C,I;let h=v.cloneDeep(s.originalItemContents);(C=v.cloneDeep(s.originalItemContents))!=null&&C.find(W=>(W==null?void 0:W.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="page"&&(W.contents=_.value),W)):h.push({key:"page",contents:_.value}),r("change",h)},{deep:!0});const Q=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ke.value=(C=v.cloneDeep(ke.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="extraButton"&&(W.contents=ke.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>{var I,W,w,S,q;D.value=$.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(z=>{const ue=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(z==null?void 0:z.label));ue?h[ue.key]=z.value:z!=null&&z.children&&z.children.length>0&&(h.children=z.children)}),(W=ke.value)!=null&&W.find(z=>z.id===h.id))ke.value=(w=ke.value)==null?void 0:w.map(z=>(z.id===h.id&&(z=h),z));else{let z=v.cloneDeep(ke.value)??[];z.push(h),ke.value=z}le.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="extraButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="extraButton"&&(z.contents=ke.value),z)):C.push({key:"extraButton",contents:ke.value}),r("change",C)},ye=h=>{let C=v.cloneDeep($.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),$.value=C},xe=()=>{le.value=!1,D.value=[],R.value=""},$e=h=>{f.value=!0;let C=[];Ia==null||Ia.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,X.value=C,K.value=C},Fe=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;O.value=(C=v.cloneDeep(O.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="rowButton"&&(W.contents=O.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},tt=()=>{u.value=!0;let h=[];Bt==null||Bt.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),x.value=h,V.value=h},Xe=()=>{f.value=!0;let h=[];Ia==null||Ia.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),X.value=h,K.value=h},ve=h=>{let C=v.cloneDeep(K.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=C},F=()=>{var I,W,w,S,q;X.value=K.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=X.value)==null||I.forEach(z=>{const ue=Ia==null?void 0:Ia.find(H=>(H==null?void 0:H.label)===(z==null?void 0:z.label));ue?h[ue.key]=z.value:z!=null&&z.children&&z.children.length>0&&(h.children=z.children)}),(W=O.value)!=null&&W.find(z=>z.id===h.id))O.value=(w=O.value)==null?void 0:w.map(z=>(z.id===h.id&&(z=h),z));else{let z=v.cloneDeep(O.value);z.push(h),O.value=z}f.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(z=>(z==null?void 0:z.key)==="rowButton")?C=(q=v.cloneDeep(s.originalItemContents))==null?void 0:q.map(z=>((z==null?void 0:z.key)==="rowButton"&&(z.contents=O.value),z)):C.push({key:"rowButton",contents:O.value}),r("change",C)},Y=()=>{f.value=!1,R.value="",K.value=[],X.value=[]},pe=h=>{u.value=!0;let C=[];Bt==null||Bt.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),x.value=C,J.value=h==null?void 0:h.id,V.value=C},de=h=>{var C;g.value=kr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(C=v.cloneDeep(s.originalItemContents))==null?void 0:C.map(I=>{var W;return(I==null?void 0:I.key)==="header"&&(I.contents=(W=g.value)!=null&&W.some(w=>w==null?void 0:w.children)?[g.value]:g.value),I}))},Z=h=>{var I,W,w;h.type==="fix"?h.id!==""?g.value=wr(g.value,h):g.value=xr(g.value,h==null?void 0:h.contents):g.value=Dr(g.value,h),g.value=(I=g.value)!=null&&I.some(S=>S==null?void 0:S.children)?[g.value]:g.value,R.value="";let C=v.cloneDeep(s.originalItemContents);(W=v.cloneDeep(s.originalItemContents))!=null&&W.find(S=>(S==null?void 0:S.key)==="header")?C=(w=v.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):C.push({key:"header",contents:g.value}),r("change",C)},oe=h=>{var I;u.value=!0;let C=[];Bt==null||Bt.forEach(W=>{y.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:h[W.key],id:y.value,contents:W==null?void 0:W.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&C.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,J.value="",x.value=C,V.value=C},te=h=>{let C=v.cloneDeep(V.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),V.value=C},ie=()=>{u.value=!1,R.value="",J.value="",V.value=[]},Re=()=>{var I,W,w,S,q,z;x.value=V.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=x.value)==null||I.forEach(ue=>{const H=Bt==null?void 0:Bt.find(P=>(P==null?void 0:P.label)===(ue==null?void 0:ue.label));H?h[H.key]=ue.value:ue!=null&&ue.children&&ue.children.length>0&&(h.children=ue.children)}),(W=g.value)!=null&&W.find(ue=>ue.id===h.id))g.value=(w=g.value)==null?void 0:w.map(ue=>(ue.id===h.id&&(ue=h),ue));else{let ue=v.cloneDeep(g.value)??[];J.value===""?ue.push(h):ue=ue==null?void 0:ue.map(H=>(H.id===J.value&&(H.children||(H.children=[]),H.children.push(h)),H)),g.value=ue}g.value=(S=g.value)!=null&&S.some(ue=>ue==null?void 0:ue.children)?[g.value]:g.value,u.value=!1,R.value="",J.value="";let C=v.cloneDeep(s.originalItemContents);(q=v.cloneDeep(s.originalItemContents))!=null&&q.find(ue=>(ue==null?void 0:ue.key)==="header")?C=(z=v.cloneDeep(s.originalItemContents))==null?void 0:z.map(ue=>((ue==null?void 0:ue.key)==="header"&&(ue.contents=g.value),ue)):C.push({key:"header",contents:g.value}),r("change",C)},ot=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;g.value=(C=v.cloneDeep(g.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>{var w;return(W==null?void 0:W.key)==="header"&&(W.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),W})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,C,I,W,w,S,q,z,ue,H,P,Se,ne,G,ae,ce,be,_e,Te;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(C=(h=d.value)==null?void 0:h.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:C.contents,O.value=(W=(I=d.value)==null?void 0:I.find(U=>(U==null?void 0:U.key)==="rowButton"))==null?void 0:W.contents,ke.value=(S=(w=d.value)==null?void 0:w.find(U=>(U==null?void 0:U.key)==="extraButton"))==null?void 0:S.contents,_.value=(z=(q=d.value)==null?void 0:q.find(U=>(U==null?void 0:U.key)==="page"))!=null&&z.contents?!!((H=(ue=d.value)==null?void 0:ue.find(U=>(U==null?void 0:U.key)==="page"))!=null&&H.contents):!1,ge.value=(Se=(P=d.value)==null?void 0:P.find(U=>(U==null?void 0:U.key)==="tableToForm"))==null?void 0:Se.contents,g.value=(ne=g.value)==null?void 0:ne.map((U,Ve)=>(Array.isArray(U)?U=ri(U):U={label:(U==null?void 0:U.label)??"",prop:(U==null?void 0:U.label)==="操作"?"operate":U==null?void 0:U.prop,width:U!=null&&U.width?parseInt(U.width):"",fixed:(U==null?void 0:U.fixed)??void 0,sortable:(U==null?void 0:U.sortable)??!1,align:(U==null?void 0:U.align)??"left",showOverflowTooltip:(U==null?void 0:U.showOverflowTooltip)??!0,isNotDrag:(U==null?void 0:U.isNotDrag)??!1,isEditCol:(U==null?void 0:U.isEditCol)??!1,isOperate:(U==null?void 0:U.isOperate)??!1,id:(U==null?void 0:U.id)??Ve,formMenuSelect:(U==null?void 0:U.formMenuSelect)??void 0,groupSelect:(U==null?void 0:U.groupSelect)??void 0},U)),g.value=(G=g.value)!=null&&G.every(U=>Array.isArray(U))?(ae=g.value)==null?void 0:ae[0]:g.value,O.value=(ce=O.value)==null?void 0:ce.map((U,Ve)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",textColor:(U==null?void 0:U.textColor)??"#000000",id:(U==null?void 0:U.id)??Ve}),ke.value=(be=ke.value)==null?void 0:be.map((U,Ve)=>U={label:(U==null?void 0:U.label)??"",type:(U==null?void 0:U.type)??"",background:(U==null?void 0:U.background)??"var(--ssComponent-primary-color)",id:(U==null?void 0:U.id)??Ve}),ge.value)ge.value=(Te=ge.value)==null?void 0:Te.map(U=>{y.value++;let Ve=U;return Ve.id=y.value,Ve});else{let U=[];const Ve=(_e=Ee.getColumnChild(v.cloneDeep(g.value)))==null?void 0:_e.filter(me=>(me==null?void 0:me.prop)!=="operate");Ve==null||Ve.forEach(me=>{var je;y.value++,U.push({label:me==null?void 0:me.label,name:(me==null?void 0:me.prop)||(me==null?void 0:me.label),type:me!=null&&me.groupSelect?"Select":"Input",value:"",id:y.value,contents:me==null?void 0:me.options,menuSelect:me==null?void 0:me.formMenuSelect,groupSelect:(je=me==null?void 0:me.groupSelect)==null?void 0:je.split(":"),selectRelateType:"关联绑定列"})}),ge.value=U}},{deep:!0,immediate:!0}),(h,C)=>{const I=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(W,{class:"icon-content",onClick:tt,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>pe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>oe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>ot(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(Cr,{tableChildContents:w==null?void 0:w.children,onDeleteChange:de,onFixChange:Z},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Li,[e.createElementVNode("div",zi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>$e(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Fe(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Je},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ji,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>nt(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>Q(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:st},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>ee(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>se(w)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(St._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:u.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(W,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(W,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:X.value,key:X.value,isEnableWrap:!0,onChange:ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(W,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(W,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:le.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ye},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(W,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(W,{class:"ok-button button",onClick:L,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:He,onChangeVisible:Me,onBlurChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(W,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(W,{class:"ok-button button",onClick:Ze,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=zt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=$t.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=$t.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,b,g,f,x,_,V,R,J,O,ke,X,K,le,D;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:g.y)||i,w:((x=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:x.w)||ds.value,h:((V=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:V.h)||s,minW:((J=(R=n==null?void 0:n.value)==null?void 0:R.tableData)==null?void 0:J.minW)||ps.value,minH:((ke=(O=n==null?void 0:n.value)==null?void 0:O.tableData)==null?void 0:ke.minH)||vs.value,maxH:((K=(X=n==null?void 0:n.value)==null?void 0:X.tableData)==null?void 0:K.maxH)||hs.value,i:((D=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:D.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,b,g,f,x,_;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((_=(x=(f=n==null?void 0:n.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},_r=(n,i,s)=>{var b,g;const r=(g=(b=ss.value)==null?void 0:b[us.value])==null?void 0:g.filter(f=>{var x;return((x=f==null?void 0:f.key)==null?void 0:x.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var x,_,V;return((V=(_=(x=f==null?void 0:f.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:V.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>_r(f,x))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},bs=n=>({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}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var _;const f=bs(s==null?void 0:s.optionItems),x=g?(_=f[g==null?void 0:g.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];d.value=x==null?void 0:x.map(V=>{for(const[R,J]of Object.entries((s==null?void 0:s.comp)||{}))if((V==null?void 0:V.prop)===R)return{...V,value:J};return V})},{immediate:!0});const u=g=>St.getComponent(g),b=g=>{var f,x;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(_=>{var V;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(V=_==null?void 0:_.options)==null?void 0:V.map(R=>({...R,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):d.value=(x=d.value)==null?void 0:x.map(_=>{var V;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(V=_==null?void 0:_.options)==null?void 0:V.map(R=>({...R,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:V==null?void 0:V.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V==null?void 0:V.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(V.type)),{modelValue:V.value,"onUpdate:modelValue":R=>V.value=R,content:V==null?void 0:V.options,optionUrl:V==null?void 0:V.optionUrl,disabled:V==null?void 0:V.disabled,activeText:V==null?void 0:V.activeText,inactiveText:V==null?void 0:V.inactiveText,onChange:R=>b(V)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=zt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=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(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=K=>K==null?void 0:K.reduce((le,D)=>(le[D==null?void 0:D.prop]=D==null?void 0:D.rule,le),{}),g=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),x=e.ref(""),_=(K,le,D)=>{var B;let $=[];(s==null?void 0:s.activeTabName)==="任务配置"?($=[{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:K},{label:"按钮名称",value:"按钮名称",children:le}]},{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:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&($=[{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:(B=s==null?void 0:s.relatedData)==null?void 0:B.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return D&&(D==null?void 0:D.length)>0?y=[...$,...V(K,le,D)]:y=$,y},V=(K,le,D)=>{const $=[{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?$==null?void 0:$.filter(y=>D==null?void 0:D.includes(y==null?void 0:y.prop)):$},R=(K,le)=>{var E,ge,Je,st,Me,He,De,A,ee;const D=((Me=(st=(Je=(ge=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:ge.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Je.contents)==null?void 0:st.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:Me.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],$=/button/i,y=((ee=(A=(De=(He=s==null?void 0:s.comp)==null?void 0:He.compData)==null?void 0:De.filter(se=>$.test(se==null?void 0:se.key)))==null?void 0:A.flatMap(se=>se==null?void 0:se.contents))==null?void 0:ee.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],B=_(D,y,K);f.value=le?ks(B,le):B,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const J=K=>{const le=K==null?void 0:K[x.value];if(x.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const D=le==null?void 0:le.join("/");R(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,K)}},O=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},ke=(K,le)=>{x.value=le==null?void 0:le.changeProp,J(K)},X=K=>{r("onButtonClick",K)};return(K,le)=>(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:O,onBlurChange:ke,onOnButtonClick:X},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=zt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=zt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},Ls={class:"fix-content"},zs={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},Ks={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),b=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),V=e.ref(!1),R=e.ref(0),J=e.ref([]),O=e.ref([]),ke=(A,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="selectRelateType"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.selectRelateType)||ee[A.key]}if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="menuSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.menuSelect)||ee[A.key]}if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="groupSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.groupSelect)||ee[A.key]}if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[A.key];if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="multiple"){const se=ee[A.key];return mr(se)?se:A.default}return(A==null?void 0:A.label)==="类型"&&ee[A.key]===""?"Input":(A==null?void 0:A.key)==="isFormColHidden"&&!ee[A.key]?!1:ee[A.key]},X=async A=>{var fe,Ze,nt,Q,L,ye;d.value=!0;let ee=[];const se=await((nt=(Ze=(fe=Ee.FormContent)==null?void 0:fe.find(xe=>(xe==null?void 0:xe.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:Ze.value)==null?void 0:nt.value)??((L=(Q=Ee.FormContent)==null?void 0:Q.find(xe=>(xe==null?void 0:xe.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:L.value);if(se==null||se.forEach(xe=>{R.value++,ee.push({label:xe==null?void 0:xe.label,name:xe==null?void 0:xe.label,type:xe.type,prop:xe==null?void 0:xe.prop,value:ke(xe,A),id:R.value,contents:xe==null?void 0:xe.options,width:(A==null?void 0:A.width)??1})}),A!=null&&A.menuSelect&&((ye=A==null?void 0:A.menuSelect)==null?void 0:ye.length)>0){const xe=await Ee.menuToContentType(A==null?void 0:A.menuSelect);ee=ee==null?void 0:ee.map($e=>(($e==null?void 0:$e.name)==="组信息选项"&&($e.contents=xe),$e))}_.value=A==null?void 0:A.id,u.value=await Ee.selectToBase(Ee.formToOptionsContents(ee)),b.value=await Ee.selectToBase(Ee.formToOptionsContents(ee))},K=A=>{var se;g.value=!0;let ee=[];(se=Ee.FormButton)==null||se.forEach(fe=>{R.value++,ee.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:(fe==null?void 0:fe.label)==="类型"&&A[fe.key]===""?"normal":A[fe.key],id:R.value,contents:fe==null?void 0:fe.options})}),J.value=ee,O.value=ee,_.value=A==null?void 0:A.id};e.watch(()=>V.value,()=>{var ee,se;let A=v.cloneDeep(s.originalItemContents);(ee=v.cloneDeep(s.originalItemContents))!=null&&ee.find(fe=>(fe==null?void 0:fe.key)==="enableWrap")?A=(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="enableWrap"&&(fe.contents=!V.value),fe)):A.push({key:"enableWrap",contents:!V.value}),r("change",A)},{deep:!0});const le=()=>{var se,fe,Ze,nt,Q;J.value=O.value;let A={};if(_.value!==""?A.id=_.value:(R.value++,A.id="id"+R.value),(se=J.value)==null||se.forEach(L=>{var xe;const ye=(xe=Ee.FormButton)==null?void 0:xe.find($e=>($e==null?void 0:$e.label)===(L==null?void 0:L.label));ye&&(A[ye.key]=L.value)}),(fe=f.value)!=null&&fe.find(L=>L.id===A.id))f.value=(Ze=f.value)==null?void 0:Ze.map(L=>(L.id===A.id&&(L=A),L));else{let L=v.cloneDeep(f.value);f.value||(f.value=[]),L.push(A),f.value=L}g.value=!1,_.value="";let ee=v.cloneDeep(s.originalItemContents);(nt=v.cloneDeep(s.originalItemContents))!=null&&nt.find(L=>(L==null?void 0:L.key)==="formButton")?ee=(Q=v.cloneDeep(s.originalItemContents))==null?void 0:Q.map(L=>((L==null?void 0:L.key)==="formButton"&&(L.contents=f.value),L)):ee.push({key:"formButton",contents:f.value}),r("change",ee)},D=A=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;x.value=(ee=v.cloneDeep(x.value))==null?void 0:ee.filter(fe=>(fe==null?void 0:fe.id)!==(A==null?void 0:A.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="formContent"&&(fe.contents=x.value),fe))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=A=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;f.value=(ee=v.cloneDeep(f.value))==null?void 0:ee.filter(fe=>(fe==null?void 0:fe.id)!==(A==null?void 0:A.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(fe=>((fe==null?void 0:fe.key)==="formButton"&&(fe.contents=f.value),fe))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ee;g.value=!0;let A=[];(ee=Ee.FormButton)==null||ee.forEach(se=>{R.value++,A.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"?"normal":"",id:R.value,contents:se==null?void 0:se.options})}),J.value=A,O.value=A},B=()=>{var ee,se,fe;d.value=!0;let A=[];(fe=(se=(ee=Ee.FormContent)==null?void 0:ee.find(Ze=>(Ze==null?void 0:Ze.key)==="Input"))==null?void 0:se.value)==null||fe.forEach(Ze=>{R.value++,A.push({label:Ze==null?void 0:Ze.label,name:Ze==null?void 0:Ze.label,type:Ze.type,value:(Ze==null?void 0:Ze.label)==="类型"?"Input":"",id:R.value,contents:Ze==null?void 0:Ze.options})}),u.value=A,b.value=A},E=A=>{let ee=v.cloneDeep(O.value);ee=ee==null?void 0:ee.map(se=>(se.value=A==null?void 0:A[se.name],se)),O.value=ee},ge=A=>{const ee=A.find(Ze=>(Ze==null?void 0:Ze.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const se=A.find(Ze=>(Ze==null?void 0:Ze.name)==="多选"),fe=A.find(Ze=>(Ze==null?void 0:Ze.name)==="初始值");se!=null&&se.value&&Bo.isString(fe.value)&&(fe.value=[fe.value]),!(se!=null&&se.value)&&!Bo.isString(fe.value)&&(fe.value="")},Je=async A=>{var ee,se,fe,Ze,nt,Q,L,ye,xe,$e,Fe,tt;if((A==null?void 0:A.类型)!==((se=(ee=b.value)==null?void 0:ee.find(Xe=>(Xe==null?void 0:Xe.label)==="类型"))==null?void 0:se.value)){let Xe=[];const ve=await((nt=(Ze=(fe=Ee.FormContent)==null?void 0:fe.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:Ze.value)==null?void 0:nt.value)?await(($e=(xe=(ye=Ee.FormContent)==null?void 0:ye.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:xe.value)==null?void 0:$e.value):(L=(Q=Ee.FormContent)==null?void 0:Q.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:L.value;if(ve==null||ve.forEach(F=>{var pe,de;R.value++;const Y=yr(F==null?void 0:F.default)?(A==null?void 0:A[F.label])??F.value??"":F==null?void 0:F.default;Xe.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:Y,prop:F==null?void 0:F.prop,id:R.value,contents:F==null?void 0:F.options,width:((de=(pe=b.value)==null?void 0:pe[0])==null?void 0:de.width)??1})}),A!=null&&A.菜单选项&&((Fe=A==null?void 0:A.菜单选项)==null?void 0:Fe.length)>0){const F=await Ee.menuToContentType(A==null?void 0:A.菜单选项);Xe=Xe==null?void 0:Xe.map(Y=>((Y==null?void 0:Y.name)==="组信息选项"&&(Y.contents=F),Y))}ge(Xe),b.value=await Ee.selectToBase(v.cloneDeep(Xe)),u.value=await Ee.selectToBase(v.cloneDeep(Xe))}else{let Xe=v.cloneDeep(b.value);if(Xe=Xe==null?void 0:Xe.map(ve=>(ve.value=A==null?void 0:A[ve.name],ve)),A!=null&&A.菜单选项&&((tt=A==null?void 0:A.菜单选项)==null?void 0:tt.length)>0){const ve=await Ee.menuToContentType(A==null?void 0:A.菜单选项);Xe=Xe==null?void 0:Xe.map(F=>((F==null?void 0:F.name)==="组信息选项"&&(F.contents=ve),F))}Xe=Ee.formToOptionsContents(Xe),ge(Xe),b.value=await Ee.selectToBase(v.cloneDeep(Xe))}},st=A=>{A||(u.value=b.value)},Me=async A=>{await Je(A),u.value=b.value},He=vo(async()=>{var fe,Ze,nt,Q,L,ye,xe,$e,Fe,tt,Xe,ve;u.value=b.value;let A={};A.width=((Ze=(fe=u.value)==null?void 0:fe[0])==null?void 0:Ze.width)??1,_.value!==""?A.id=_.value:(R.value++,A.id="id"+R.value);let ee=await((L=(Q=(nt=Ee.FormContent)==null?void 0:nt.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Q.value)==null?void 0:L.value)??((xe=(ye=Ee.FormContent)==null?void 0:ye.find(F=>{var Y,pe;return(F==null?void 0:F.key)===(((pe=(Y=u.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:xe.value);if(($e=u.value)==null||$e.forEach(F=>{const Y=ee==null?void 0:ee.find(pe=>(pe==null?void 0:pe.label)===(F==null?void 0:F.label));Y&&(A[Y.key]=F.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=x.value)!=null&&Fe.find(F=>F.id===A.id))x.value=(tt=x.value)==null?void 0:tt.map(F=>(F.id===A.id&&(F=A),F));else{let F=v.cloneDeep(x.value);F.push(A),x.value=F}x.value=x.value.map(({id:F,...Y})=>Y),d.value=!1,_.value="";let se=v.cloneDeep(s.originalItemContents);(Xe=v.cloneDeep(s.originalItemContents))!=null&&Xe.find(F=>(F==null?void 0:F.key)==="formContent")?se=(ve=v.cloneDeep(s.originalItemContents))==null?void 0:ve.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=x.value),F)):se.push({key:"formContent",contents:x.value}),r("change",se)},300),De=()=>{d.value=!1,g.value=!1,_.value="",b.value=[],O.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ee,se,fe,Ze,nt,Q;if(!s.originalItemContents||s.originalItemContents.length===0)return;const A=v.cloneDeep(s.originalItemContents);x.value=((ee=A==null?void 0:A.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:ee.contents)??[],f.value=((se=A==null?void 0:A.find(L=>(L==null?void 0:L.key)==="formButton"))==null?void 0:se.contents)??[],V.value=(fe=A==null?void 0:A.find(L=>(L==null?void 0:L.key)==="enableWrap"))!=null&&fe.contents?!((Ze=A==null?void 0:A.find(L=>(L==null?void 0:L.key)==="enableWrap"))!=null&&Ze.contents):!0,x.value=(nt=v.cloneDeep(x.value))==null?void 0:nt.map((L,ye)=>{var $e;let xe=L;return xe.id=(L==null?void 0:L.id)??ye,L!=null&&L.label||(L.label=(L==null?void 0:L.key)??(L==null?void 0:L.label)??""),L!=null&&L.type||(L.type=(L==null?void 0:L.type)??""),L.contents=(($e=L==null?void 0:L.options)==null?void 0:$e.length)===0?(L==null?void 0:L.contents)??"":L==null?void 0:L.options,xe}),x.value=Ee.formToOptionsContents(x.value),f.value=(Q=f.value)==null?void 0:Q.map((L,ye)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",background:(L==null?void 0:L.background)??"var(--ssComponent-primary-color)",id:ye})},{deep:!0,immediate:!0}),(A,ee)=>{const se=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:B},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Ze,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Ze.label),1),e.createElementVNode("div",Vs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>X(Ze)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>D(Ze)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ze,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",Ls,[e.createElementVNode("div",null,e.toDisplayString(Ze.label),1),e.createElementVNode("div",zs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>K(Ze)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>$(Ze)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(St._sfc_main$1,{modelValue:V.value,"onUpdate:modelValue":ee[0]||(ee[0]=Ze=>V.value=Ze)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Je,onChangeVisible:st,onBlurChange:Me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(fe,{onClick:De,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(fe,{class:"ok-button button",onClick:e.unref(He),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:E},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:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Lo=zt._export_sfc(Ks,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=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}]),u=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"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),x=e.ref({}),_=e.ref([]),V=X=>{var K;x.value=X,r("change",(K=O())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=u.value)==null||le.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(D=u.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(K,1),f.value="delete";break}},J=X=>{var K,le,D;if((X==null?void 0:X.buttonName)==="确认"){const $=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((K=_.value)==null?void 0:K.length)+1});break;case"update":_.value=(le=_.value)==null?void 0:le.map(y=>y.index===($==null?void 0:$.index)?{...y,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:y);break}r("change",(D=O())==null?void 0:D.compData),g.visible=!1}else g.visible=!1},O=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),ke=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="stepConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:d.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:ke,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=zt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),b=e.ref([]),g=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}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),V=X=>{var K;u.value=X,r("change",(K=O())==null?void 0:K.compData)},R=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":b.value.splice(K,1),d.value="delete";break}},J=X=>{var K,le,D,$;if((X==null?void 0:X.buttonName)==="确认"){const y=v.cloneDeep(X==null?void 0:X.content);switch(Object.keys(y).forEach(B=>{y[B]===""&&delete y[B]}),d.value){case"create":(le=b.value)==null||le.push({...y,index:((K=b.value)==null?void 0:K.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(B=>B.index===(y==null?void 0:y.index)?{...B,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:B);break}r("change",($=O())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},O=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),ke=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(u.value=((K=X==null?void 0:X.find(D=>D.key==="timeLineConfig"))==null?void 0:K.contents)??{},b.value=((le=X==null?void 0:X.find(D=>D.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:g.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ke,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=zt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=zt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const D=v.cloneDeep(s.itemData);d.value=($=v.cloneDeep(D))==null?void 0:$.map(y=>{var B;if(y.key==="extra"){let E=[];(B=y.value)==null||B.forEach(ge=>{var Je;E.push((Je=Object.values(ge))==null?void 0:Je[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const V=(D,$,y,B)=>{var ge;let E={};((ge=D==null?void 0:D[0])==null?void 0:ge.contents)==="详情"&&(g.value=!0,E[$]=D,u.value=D==null?void 0:D.filter(Je=>(Je==null?void 0:Je.key)!=="tableContentName"),f.value=E,x.value=y,_.value=B.id)},R=D=>{var Je,st,Me,He;const $=(st=(Je=Object.values(v.cloneDeep(f.value)))==null?void 0:Je[0])==null?void 0:st.filter(De=>(De==null?void 0:De.key)==="tableContentName"),y=(He=(Me=Object.values(v.cloneDeep(f.value)))==null?void 0:Me[0])==null?void 0:He.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),B=y==null?void 0:y.map((De,A)=>{var ee;return A===D.index&&(De==null?void 0:De.comp)==="Table"&&(De.compData=(ee=De.compData)==null?void 0:ee.map(se=>{var fe,Ze;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Ze=(fe=D.content)==null?void 0:fe.map(nt=>{let Q={};for(let L in nt)L!=="id"&&(Q[L]=nt[L]);return Q}))==null?void 0:Ze.map(nt=>Object.values(nt))),se})),De});B.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ge={};for(let De in E)ge[De]=B;f.value=ge},J=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},O=D=>{var Je,st,Me,He;const $=(st=(Je=Object.values(v.cloneDeep(f.value)))==null?void 0:Je[0])==null?void 0:st.filter(De=>(De==null?void 0:De.key)==="tableContentName"),y=(He=(Me=Object.values(v.cloneDeep(f.value)))==null?void 0:Me[0])==null?void 0:He.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),B=y==null?void 0:y.map((De,A)=>(A===D.index&&(De.compData=D.contents),De));B.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ge={};for(let De in E)ge[De]=B;f.value=ge},ke=()=>{var $,y;let D={};for(let B in x.value)B===(($=Object.keys(f.value))==null?void 0:$[0])?D[B]=(y=Object.values(f.value))==null?void 0:y[0]:D[B]=x.value[B];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},X=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},K=D=>{b("change",D,"methodData")},le=D=>on(D);return(D,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(B==null?void 0:B.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,key:E,index:(B==null?void 0:B.id)??E,onContentClick:V,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:X},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,onChange:R,childItemData:B==null?void 0:B.itemChildData,key:E,onContentChange:O,index:(B==null?void 0:B.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:J,id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=zt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Ee.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),g=Ee.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),x=$t.useModelComp(v.pinia),_=e.ref(!1),V=$t.useMenuState(v.pinia),R=v.useLoginState(v.pinia),{itemData:J,isEdit:O,routeToChildPath:ke,tableViewContents:X,lockingPage:K,payloadTypes:le}=v.storeToRefs(x),{activeMenuPath:D,platform:$,childMenu:y}=v.storeToRefs(V),{loginUserInfo:B}=v.storeToRefs(R),E=e.ref(!1),ge=async()=>{var Q,L;(Q=i.value)!=null&&Q.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")&&await se((L=i.value)==null?void 0:L.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")),await Ee.onSaveBack()};e.watch(()=>J.value,async()=>{O.value==="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Je=()=>{u.value=!1,b.value=void 0},st=Q=>Q.map(L=>{const ye={};for(const xe in L){const $e=L[xe];if(xe.includes(f.value)){const Fe=xe.split(f.value);let tt=ye;Fe.forEach((Xe,ve)=>{ve===Fe.length-1?tt[Xe]=$e:(tt[Xe]||(tt[Xe]={}),tt=tt[Xe])})}else ye[xe]=$e}return ye}),Me=async(Q,L,ye=[])=>{var $e,Fe,tt,Xe,ve,F,Y,pe,de,Z,oe,te,ie,Re,ot;let xe=($e=v.cloneDeep(L))==null?void 0:$e.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(Q!=null&&Q.includes("[")){let h=(F=(ve=(Xe=(tt=(Fe=v.cloneDeep(Q))==null?void 0:Fe.split("["))==null?void 0:tt[1])==null?void 0:Xe.split("]"))==null?void 0:ve[0])==null?void 0:F.split(":"),C="";if(h!=null&&h[0]){let I=(Y=xe==null?void 0:xe.find(W=>(W==null?void 0:W.name)===(h==null?void 0:h[0])))==null?void 0:Y.compData;if(!I){let W=(pe=Q==null?void 0:Q.split("["))==null?void 0:pe[0],w=await Ee.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",ye);I=(de=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(h==null?void 0:h[0])))==null?void 0:de.compData}I==null||I.forEach(W=>{var w,S,q,z,ue,H;if((W==null?void 0:W.key)==="formContent")(w=W==null?void 0:W.contents)==null||w.forEach(P=>{var Se;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?C=P==null?void 0:P.value:C=(Se=P==null?void 0:P.value)==null?void 0:Se.toString())});else if((W==null?void 0:W.key)==="tableContents"){let P=[],Se=(S=I==null?void 0:I.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:S.contents,ne=(h==null?void 0:h[1])??"";if(Se!=null&&Se.every(G=>Array.isArray(G))){let G=Ee.getColumnChild((ue=Se==null?void 0:Se[0])==null?void 0:ue.filter(ae=>(ae==null?void 0:ae.label)!=="操作"));(H=W.contents)==null||H.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(be=>!(be!=null&&be.id)),G==null||G.forEach((be,_e)=>{let Te=ae[_e];typeof ae[_e]=="number"&&(Te=ae[_e].toString()),(ne===""||ne===be.prop)&&(ce[be.prop]=Te)}),P.push(ce)}),P=st(P)}else{let G=(q=Se==null?void 0:Se.map(ae=>ae==null?void 0:ae.label))==null?void 0:q.filter(ae=>ae!=="操作");(z=W.contents)==null||z.forEach(ae=>{let ce={};ae=ae==null?void 0:ae.filter(be=>!(be!=null&&be.id)),G==null||G.forEach((be,_e)=>{let Te=ae[_e];typeof ae[_e]=="number"&&(Te=ae[_e].toString()),(ne===""||ne===be)&&(ce[be]=Te)}),P.push(ce)})}C=P}})}return C}else if(Q!=null&&Q.includes("/")){let h={};return(Z=v.cloneDeep(xe))==null||Z.forEach((C,I)=>{var W,w,S,q,z,ue,H,P,Se,ne,G,ae,ce,be,_e,Te,U,Ve,me;if((C==null?void 0:C.comp)==="Table"){let je=Array.isArray((S=(w=(W=C==null?void 0:C.compData)==null?void 0:W.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(H=(ue=(z=(q=C==null?void 0:C.compData)==null?void 0:q.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:z.contents)==null?void 0:ue[0])==null?void 0:H.some(Pe=>Pe==null?void 0:Pe.children):[],it=(ne=(Se=(P=C==null?void 0:C.compData)==null?void 0:P.find(Pe=>(Pe==null?void 0:Pe.key)==="tableContents"))==null?void 0:Se.contents)==null?void 0:ne.map(Pe=>(Pe!=null&&Pe.find(Qe=>Qe==null?void 0:Qe.id)&&(Pe=Pe.slice(1)),Pe)),Ge=(_e=(be=(ce=(ae=(G=C==null?void 0:C.compData)==null?void 0:G.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:ae.contents)==null?void 0:ce[0])==null?void 0:be[0])==null?void 0:_e.label,rt=(U=(Te=C==null?void 0:C.compData)==null?void 0:Te.find(Pe=>(Pe==null?void 0:Pe.key)==="header"))==null?void 0:U.contents;if(je)(je==null?void 0:je.length)===0?h[C.name]=h!=null&&h[C.name]?h[C.name]:Ee.tableToForm(it,rt):h[Ge]=Ee.tableToForm(it,rt);else{const Pe=[];rt=rt.slice(1,rt.length-1),rt==null||rt.forEach((Qe,Ue)=>{it==null||it.forEach(ze=>{Pe.push({key:Qe.label+ze[0],value:ze[Ue+1]})})}),h["form"+I]=Pe}}else{const je=(me=(Ve=C.compData)==null?void 0:Ve.find(Ge=>(Ge==null?void 0:Ge.key)==="formContent"))==null?void 0:me.contents;h!=null&&h.form||(h.form=[]);const it=[];je==null||je.forEach(Ge=>{Ge.key!==""&&(Ge={key:(Ge==null?void 0:Ge.key)??(Ge==null?void 0:Ge.label),value:Ge==null?void 0:Ge.value},it.push(Ge))}),h.form=[...it,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(Q==="createInsofDataApi"){let h=(oe=v.cloneDeep(L))==null?void 0:oe[0];return h={comp:(te=v.cloneDeep(h))==null?void 0:te.comp,compData:(ie=v.cloneDeep(h))==null?void 0:ie.compData,name:(Re=v.cloneDeep(h))==null?void 0:Re.name,isShow:(ot=v.cloneDeep(h))==null?void 0:ot.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:h}}}return Q}},He=async(Q,L,ye)=>{var Fe,tt,Xe;let xe=await Ee.getItemData(L,sessionStorage.getItem("systemKey"),""),$e=xe==null?void 0:xe.find(ve=>(ve==null?void 0:ve.name)===(ye==null?void 0:ye[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let ve={};for(let te in v.cloneDeep(Q))v.cloneDeep(Q)[te]!=="loginUser"?ve[te]=v.cloneDeep(Q)[te]:ve[te]=((Fe=B.value)==null?void 0:Fe.account)||((tt=B.value)==null?void 0:tt.账号);let F=[],Y=ve;Array.isArray(Q)||(Y=[ve]),Y==null||Y.forEach(te=>{F.push({[te[ye[1]]]:te})});let pe=[],de=F==null?void 0:F.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]});xe==null||xe.forEach(te=>{var ie;(te==null?void 0:te.name)===(ye==null?void 0:ye[0])&&((ie=te==null?void 0:te.compData)==null||ie.forEach(Re=>{var ot;(Re==null?void 0:Re.key)==="tableContents"&&((ot=Re==null?void 0:Re.contents)==null||ot.forEach(h=>{h!=null&&h.some(C=>de.includes(C))&&pe.push({[h.find(C=>C.id).id]:h.find(C=>de.includes(C))})}))}))});let Z=pe==null?void 0:pe.map(te=>{var ie;return(ie=Object.keys(te))==null?void 0:ie[0]}),oe=[];if(Z==null||Z.forEach(te=>{var ot;let ie=(ot=pe==null?void 0:pe.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0].toString())===te.toString()}))==null?void 0:ot[te],Re=F==null?void 0:F.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0])===ie});oe.push({id:parseInt(te),value:{tableData:Re[ie]}})}),(oe==null?void 0:oe.length)>0)return oe}else if(($e==null?void 0:$e.comp)==="Form"){let ve=v.cloneDeep($e);ve.compData=(Xe=ve.compData)==null?void 0:Xe.map(pe=>{var de;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(de=pe.contents)==null?void 0:de.map(Z=>((Z==null?void 0:Z.key)===(ye==null?void 0:ye[1])&&(Z.value=(Q==null?void 0:Q[Z==null?void 0:Z.prop])||Q),Z))),pe});let F={};for(let pe in ve)pe!=="id"&&(F[pe]=ve[pe]);let Y=[];if(Y.push({id:$e==null?void 0:$e.id,keyType:ye==null?void 0:ye[1],value:{pageData:F}}),(Y==null?void 0:Y.length)>0)return Y}}},De=async(Q,L,ye)=>{var Fe,tt,Xe,ve,F,Y,pe,de,Z,oe;let xe=await Ee.getItemData(L,sessionStorage.getItem("systemKey"),""),$e=xe==null?void 0:xe.find(te=>(te==null?void 0:te.name)===(ye==null?void 0:ye[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let te={};for(let ie in v.cloneDeep(Q))v.cloneDeep(Q)[ie]!=="loginUser"?te[ie]=v.cloneDeep(Q)[ie]:te[ie]=((Fe=B.value)==null?void 0:Fe.account)||((tt=B.value)==null?void 0:tt.账号);await v.createInsofDataApi({key:{type:"data",pageKey:L,tableId:$e==null?void 0:$e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:te}})}else if(($e==null?void 0:$e.comp)==="Form"){let te=v.cloneDeep($e),ie=Object.keys(Q),Re="";(ve=(Xe=v.cloneDeep(te))==null?void 0:Xe.compData)==null||ve.forEach(w=>{var S,q;(w==null?void 0:w.key)==="formContent"&&((q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null||q.forEach(z=>{var ue;ie.includes(z==null?void 0:z.key)&&(z==null?void 0:z.value)===((ue=B.value)==null?void 0:ue.姓名)&&(Re=z==null?void 0:z.key)}))});let ot=[];(F=Object.values(Q[Re]))==null||F.forEach(w=>{w!=null&&w.includes("(")&&ot.push(w)}),ot=[...new Set(ot)];const h=ot==null?void 0:ot.map(async w=>{var H,P,Se,ne,G,ae,ce,be,_e,Te,U,Ve;let S="";(ae=(G=(ne=(Se=(P=(H=v.cloneDeep(w))==null?void 0:H.split("("))==null?void 0:P[1])==null?void 0:Se.split(")"))==null?void 0:ne[0])==null?void 0:G.split(":"))==null||ae.forEach(me=>{S=S===""?S+me.replaceAll("'",""):S+"/"+me.replaceAll("'","")});let q=[];(Ve=(U=(Te=(_e=(be=(ce=v.cloneDeep(w))==null?void 0:ce.split("<"))==null?void 0:be[1])==null?void 0:_e.split(">"))==null?void 0:Te[0])==null?void 0:U.split(":"))==null||Ve.forEach(me=>{q.push(me.replaceAll("'",""))});const z=await Ee.getItemData(S,sessionStorage.getItem("systemKey"),"");let ue="";return z==null||z.forEach(me=>{var je;me.name===(q==null?void 0:q[0])&&((je=me==null?void 0:me.compData)==null||je.forEach(it=>{var Ge;(it==null?void 0:it.key)==="formContent"&&((Ge=it.contents)==null||Ge.forEach(rt=>{(rt==null?void 0:rt.key)===(q==null?void 0:q[1])&&(ue=rt==null?void 0:rt.value)}))}))}),{[w]:ue}}),C=await Promise.all(h);te.compData=(pe=(Y=v.cloneDeep(te))==null?void 0:Y.compData)==null?void 0:pe.map(w=>{var S,q;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(q=(S=v.cloneDeep(w))==null?void 0:S.contents)==null?void 0:q.map(z=>{var ue,H,P,Se;return(ue=Q[Re])!=null&&ue[z==null?void 0:z.key]&&(Q[Re][z==null?void 0:z.key].includes("(")?z.value=(H=C==null?void 0:C.find(ne=>{var G;return((G=Object.keys(ne))==null?void 0:G[0])===Q[Re][z==null?void 0:z.key]}))==null?void 0:H[Q[Re][z==null?void 0:z.key]]:z.value=(Se=(P=v.cloneDeep(Q))==null?void 0:P[Re])==null?void 0:Se[z==null?void 0:z.key]),z})),w});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:L,systemKey:sessionStorage.getItem("systemKey")}});let W="";((de=I==null?void 0:I.data)==null?void 0:de.type)==="success"&&((oe=(Z=I==null?void 0:I.data)==null?void 0:Z.result)==null||oe.forEach(w=>{var S,q;((q=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:q.name)===(ye==null?void 0:ye[0])&&(W=w.id)}),await v.updateInsofDataApi({id:W,value:{pageData:te}}))}}},A=(Q,L="",ye={})=>{for(const[xe,$e]of Object.entries(Q)){const Fe=L?`${L}.${xe}`:xe;$e!==null&&typeof $e=="object"&&!Array.isArray($e)&&Object.prototype.toString.call($e)!=="[object Date]"?A($e,Fe,ye):ye[Fe]=$e}return ye},ee=async(Q,L,ye,xe)=>{var tt,Xe,ve,F,Y,pe,de,Z,oe,te,ie,Re,ot,h,C,I,W,w,S,q,z,ue,H,P,Se;let $e=await Ee.getItemData(L,sessionStorage.getItem("systemKey"),""),Fe=$e==null?void 0:$e.find(ne=>(ne==null?void 0:ne.name)===(ye==null?void 0:ye[0]));if(Fe){if(!(ye!=null&&ye[1])&&(Fe==null?void 0:Fe.comp)==="Table"){let ne={},G=[],ae=(Xe=(tt=Fe==null?void 0:Fe.compData)==null?void 0:tt.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:Xe.contents;ae!=null&&ae.every(_e=>Array.isArray(_e))?G=(F=Ee.getColumnChild((ve=ae==null?void 0:ae[0])==null?void 0:ve.filter(_e=>(_e==null?void 0:_e.label)!=="操作")))==null?void 0:F.map(_e=>_e==null?void 0:_e.prop):G=ae==null?void 0:ae.map(_e=>_e==null?void 0:_e.label);for(let _e in v.cloneDeep(Q))if(v.cloneDeep(Q)[_e]!=="loginUser"){let Te=A(v.cloneDeep(Q)[_e]),U={};for(let Ve in Te)if(G!=null&&G.find(me=>me===Ve))U[Ve]=Te[Ve];else if(G!=null&&G.find(me=>(me==null?void 0:me.toUpperCase())===(Ve==null?void 0:Ve.toUpperCase()))){let me=G==null?void 0:G.find(je=>(je==null?void 0:je.toUpperCase())===(Ve==null?void 0:Ve.toUpperCase()));U[me]=Te[Ve]}ne[_e]=U}else ne[_e]=((Y=B.value)==null?void 0:Y.account)||((pe=B.value)==null?void 0:pe.账号);let ce=await v.getInsofDataApi({keyLikes:{tableId:Fe==null?void 0:Fe.id}});if(((Z=(de=ce==null?void 0:ce.data)==null?void 0:de.result)==null?void 0:Z.length)>0){let _e=(te=(oe=ce==null?void 0:ce.data)==null?void 0:oe.result)==null?void 0:te.map(Te=>Te==null?void 0:Te.id);(_e==null?void 0:_e.length)>0&&await v.batchDeleteInsofDataApi({ids:_e})}let be=[];if((ie=Fe==null?void 0:Fe.compData)!=null&&ie.find(_e=>(_e==null?void 0:_e.key)==="pageColumn")&&((h=(ot=(Re=Fe==null?void 0:Fe.compData)==null?void 0:Re.find(_e=>(_e==null?void 0:_e.key)==="pageColumn"))==null?void 0:ot.contents)!=null&&h.includes("["))){const _e=await v.getInsofDataApi({id:Fe==null?void 0:Fe.tableId});let Te=((w=(W=(I=(C=_e==null?void 0:_e.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:W.key)==null?void 0:w.pageKey)??"";(S=Object.values(ne))==null||S.forEach(U=>{be.push({key:{type:"data",pageKey:Te,tableId:Fe==null?void 0:Fe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:U}})})}else(q=Object.values(ne))==null||q.forEach(_e=>{be.push({key:{type:"data",pageKey:L,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_e}})});(be==null?void 0:be.length)>0&&await v.batchAddInsofDataApi({dataList:be})}else if(!(ye!=null&&ye[1])&&(Fe==null?void 0:Fe.comp)==="Form"){let ne=v.cloneDeep(Fe);ne.compData=(ue=(z=v.cloneDeep(ne))==null?void 0:z.compData)==null?void 0:ue.map(ce=>{var be,_e;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(_e=(be=v.cloneDeep(ce))==null?void 0:be.contents)==null?void 0:_e.map(Te=>{var U,Ve;return(U=v.cloneDeep(Q))!=null&&U[Te==null?void 0:Te.key]&&(Te.value=(Ve=v.cloneDeep(Q))==null?void 0:Ve[Te==null?void 0:Te.key]),Te})),ce});const G=await v.getInsofDataApi({key:{type:"structure",pageKey:L,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((H=G==null?void 0:G.data)==null?void 0:H.type)==="success"&&((Se=(P=G==null?void 0:G.data)==null?void 0:P.result)==null||Se.forEach(ce=>{var be,_e;((_e=(be=ce==null?void 0:ce.value)==null?void 0:be.pageData)==null?void 0:_e.name)===(ye==null?void 0:ye[0])&&(ae=ce.id)}),await v.updateInsofDataApi({id:ae,value:{pageData:ne}}))}}},se=async Q=>{var L,ye,xe,$e,Fe,tt,Xe,ve,F,Y,pe,de,Z,oe,te,ie;V.setImportLoading(!0);try{if(Q.api){let Re=new WeakMap;(ye=(L=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:L.filter(H=>{var P,Se;return((P=H==null?void 0:H.key)==null?void 0:P.pageKey)!=="menu"&&((Se=H==null?void 0:H.key)==null?void 0:Se.pageKey)!=="secret"}))==null||ye.forEach(H=>{Re[H.key.pageKey]?Re[H.key.pageKey]=[...Re[H.key.pageKey],H]:Re[H.key.pageKey]=[H]});let h=await Ee.getItemData((y==null?void 0:y.value)===""?D.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re),C="";if(h=h==null?void 0:h.map(H=>{var P,Se,ne,G,ae,ce,be,_e,Te,U,Ve,me;if((H==null?void 0:H.comp)==="Form")H.compData=(P=H.compData)==null?void 0:P.map(je=>{var it;return(je==null?void 0:je.key)==="formContent"&&(je.contents=(it=je.contents)==null?void 0:it.map(Ge=>{var rt;if((Ge==null?void 0:Ge.value)===""&&(Ge==null?void 0:Ge.type)==="Select"){let Pe=Ee.judgeContents((rt=v.cloneDeep(Ge))==null?void 0:rt.optionUrl,Re);Ge.value=Ge.value||Pe}return Ge})),je});else if((H==null?void 0:H.comp)==="Table"&&(Se=H.compData)!=null&&Se.find(je=>(je==null?void 0:je.key)==="pageColumn")){let je=(G=(ne=H.compData)==null?void 0:ne.find(Pe=>(Pe==null?void 0:Pe.key)==="pageColumn"))==null?void 0:G.contents,it=((ce=(ae=H.compData)==null?void 0:ae.find(Pe=>(Pe==null?void 0:Pe.key)==="pageGroup"))==null?void 0:ce.contents)??"",Ge=(Te=(_e=(be=je==null?void 0:je.split("["))==null?void 0:be[1])==null?void 0:_e.split("]"))==null?void 0:Te[0];C=((U=je==null?void 0:je.split("["))==null?void 0:U[0])+((me=(Ve=X.value)==null?void 0:Ve.find(Pe=>(Pe==null?void 0:Pe.key)===Ge))==null?void 0:me.value)}return H}),!(C===""||C==="")){const H=await Ee.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Re);h=h==null?void 0:h.map(P=>{var Se,ne,G,ae,ce,be,_e,Te,U,Ve,me,je,it;if((P==null?void 0:P.comp)==="Table"&&(Se=P.compData)!=null&&Se.find(Ge=>(Ge==null?void 0:Ge.key)==="pageColumn")){let Ge=(G=(ne=P.compData)==null?void 0:ne.find(ze=>(ze==null?void 0:ze.key)==="pageColumn"))==null?void 0:G.contents,rt=((ce=(ae=P.compData)==null?void 0:ae.find(ze=>(ze==null?void 0:ze.key)==="pageGroup"))==null?void 0:ce.contents)??"",Pe=(Te=(_e=(be=Ge==null?void 0:Ge.split("["))==null?void 0:be[1])==null?void 0:_e.split("]"))==null?void 0:Te[0],Qe=((U=Ge==null?void 0:Ge.split("["))==null?void 0:U[0])+((me=(Ve=X.value)==null?void 0:Ve.find(ze=>(ze==null?void 0:ze.key)===Pe))==null?void 0:me.value),Ue=(je=H==null?void 0:H.find(ze=>(ze==null?void 0:ze.name)===(rt===""?d==null?void 0:d.compName:rt)))==null?void 0:je.compData;P.compData=(it=P.compData)==null?void 0:it.map(ze=>{var Ce;return(ze==null?void 0:ze.key)==="tableContents"&&(ze.contents=(Ce=Ue==null?void 0:Ue.find(Ne=>(Ne==null?void 0:Ne.key)==="tableContents"))==null?void 0:Ce.contents),ze})}return P})}let I={};if((($e=(xe=Q==null?void 0:Q.extraValues)==null?void 0:xe.input)==null?void 0:$e.length)>0){const H=(tt=(Fe=Q==null?void 0:Q.extraValues)==null?void 0:Fe.input)==null?void 0:tt.map(async P=>{var Se;fe!=null&&fe.find(ne=>ne===P)?I=await Me(P,h):I[Object.keys(P)[0]]=await Me((Se=Object.values(P))==null?void 0:Se[0],h,Re)});await Promise.all(H)}else I=await Me("/",h);let W=!1;(ve=(Xe=Q==null?void 0:Q.extraValues)==null?void 0:Xe.output)==null||ve.forEach(H=>{var P,Se;(Se=(P=Object.values(H))==null?void 0:P[0])!=null&&Se.includes(".doc")&&(W=!0)});let w;if(W){const H=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await v.axios.post(Q.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else w=await v.axios.post(Q.api,I,{headers:{"Content-Type":"application/json"}});let S=(de=(pe=(Y=(F=v.cloneDeep(Q))==null?void 0:F.extraValues)==null?void 0:Y.output)==null?void 0:pe.map(H=>{var P,Se,ne,G,ae,ce,be,_e,Te,U,Ve,me,je,it,Ge,rt;if(!((Se=(P=Object.values(H))==null?void 0:P[0])!=null&&Se.includes(".doc"))){let Pe=(U=(Te=(_e=(G=v.cloneDeep((ne=Object.values(H))==null?void 0:ne[0]))==null?void 0:G.split("["))==null?void 0:_e[((be=(ce=v.cloneDeep((ae=Object.values(H))==null?void 0:ae[0]))==null?void 0:ce.split("["))==null?void 0:be.length)-1])==null?void 0:Te.split("]"))==null?void 0:U[0],Qe=Pe==null?void 0:Pe.split(":"),Ue=(je=v.cloneDeep((Ve=Object.values(H))==null?void 0:Ve[0]))==null?void 0:je.substring(0,v.cloneDeep((me=Object.values(H))==null?void 0:me[0]).lastIndexOf("["));if(Ue=(Ge=v.cloneDeep(Ue))==null?void 0:Ge.slice(0,((it=v.cloneDeep(Ue))==null?void 0:it.length)-1),Ue!=null&&Ue.includes("[")){let ze="";if((rt=Ee.contentTransArrayToAll(Ue,"/"))==null||rt.forEach(Ce=>{var Ne,ut,he,Ie,Be,Ke,M;if(!(Ce!=null&&Ce.includes("[")))ze=ze===""?ze+Ce.replaceAll("/",""):ze+"/"+Ce.replaceAll("/","");else{let Ae=v.cloneDeep(Ce).slice(1,((Ne=v.cloneDeep(Ce))==null?void 0:Ne.length)-1),at=(Ke=(Be=(Ie=(he=(ut=v.cloneDeep(Ae))==null?void 0:ut.split("["))==null?void 0:he[1])==null?void 0:Ie.split("]"))==null?void 0:Be[0])==null?void 0:Ke.split(":"),Le="",Ye=(M=h==null?void 0:h.find(Oe=>(Oe==null?void 0:Oe.name)===(at==null?void 0:at[0])))==null?void 0:M.compData;Ye==null||Ye.forEach(Oe=>{var ft;(Oe==null?void 0:Oe.key)==="formContent"&&((ft=Oe==null?void 0:Oe.contents)==null||ft.forEach(pt=>{(pt==null?void 0:pt.key)===(at==null?void 0:at[1])&&(Le=pt==null?void 0:pt.value)}))}),ze=ze===""?ze+Le.replaceAll("/",""):ze+"/"+Le.replaceAll("/","")}}),Ue=ze,Ue[(Ue==null?void 0:Ue.length)-1]!=="/")return Ue}}}))==null?void 0:de.filter(H=>H);S=[...new Set(v.cloneDeep(S))];let q=S==null?void 0:S.map(async H=>{let P=await Ee.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Re);if((P==null?void 0:P.length)===0)return await Ee.getParentContents(H)});await Promise.all(q);let z=[],ue=(te=(oe=(Z=v.cloneDeep(Q))==null?void 0:Z.extraValues)==null?void 0:oe.output)==null?void 0:te.map(async H=>{var _e,Te,U,Ve,me,je,it,Ge,rt,Pe,Qe,Ue,ze,Ce,Ne,ut,he,Ie,Be,Ke,M,Ae,at,Le,Ye,Oe,ft,pt,ct,gt,bt,Nt,Pt,Vt,_t,Ft,xt,Ht,Yt,Ot,Va,wa,Oa,Ka,Da,ja,Ca,Ua,Wa,Ha,qa,Ga,Ma,ba,fa,_a,ka,na,ga,Xa,wt,Zt,yt,fn,Mt,ca,Ea,oa,ma,Qt;if((Te=(_e=Object.values(H))==null?void 0:_e[0])!=null&&Te.includes(".doc")){var P=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Se=w.headers["content-disposition"],ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=ne.exec(Se),ae=G==null?void 0:G[1],ce=document.createElement("a"),be=window.URL.createObjectURL(P);b.value=[{name:ae,blobUrl:be}],u.value=!0}else{let La=(Pe=(rt=(Ge=(Ve=v.cloneDeep((U=Object.values(H))==null?void 0:U[0]))==null?void 0:Ve.split("["))==null?void 0:Ge[((it=(je=v.cloneDeep((me=Object.values(H))==null?void 0:me[0]))==null?void 0:je.split("["))==null?void 0:it.length)-1])==null?void 0:rt.split("]"))==null?void 0:Pe[0],Tt=La==null?void 0:La.split(":"),qt=(ze=v.cloneDeep((Qe=Object.values(H))==null?void 0:Qe[0]))==null?void 0:ze.substring(0,v.cloneDeep((Ue=Object.values(H))==null?void 0:Ue[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(Ne=v.cloneDeep(qt))==null?void 0:Ne.slice(0,((Ce=v.cloneDeep(qt))==null?void 0:Ce.length)-1):qt===""&&(qt=D.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(ut=Ee.contentTransArrayToAll(qt,"/"))==null||ut.forEach((At,Ut)=>{var Wt,Rt,ua,la,za,Ya,Fa,Ja,Sn,rn,vn;if(!(At!=null&&At.includes("[")))Et=Et===""?Et+At.replaceAll("/",""):Et+"/"+At.replaceAll("/","");else{let ln="",va="";(Wt=v.cloneDeep(At))!=null&&Wt.includes("]")?(ln=v.cloneDeep(At).slice(1,((Rt=v.cloneDeep(At))==null?void 0:Rt.length)-1),va=(Fa=(Ya=(za=(la=(ua=v.cloneDeep(ln))==null?void 0:ua.split("["))==null?void 0:la[1])==null?void 0:za.split("]"))==null?void 0:Ya[0])==null?void 0:Fa.split(":")):(ln=v.cloneDeep(At).slice(1,(Ja=v.cloneDeep(At))==null?void 0:Ja.length),va=(Sn=v.cloneDeep(ln))==null?void 0:Sn.split("/"));let Za="",sn=(rn=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(va==null?void 0:va[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ia=>{var Tn;(ia==null?void 0:ia.key)==="formContent"&&((Tn=ia==null?void 0:ia.contents)==null||Tn.forEach(Ra=>{(Ra==null?void 0:Ra.key)===(va==null?void 0:va[1])&&(Za=Ra==null?void 0:Ra.value)}))}),((vn=Ee.contentTransArrayToAll(qt,"/"))==null?void 0:vn.length)-1!==Ut?Et=Et===""?Et+Za.replaceAll("/",""):Et+"/"+Za.replaceAll("/",""):Et=Et+r.value+Za.replaceAll("/","")}}),(he=D.value)!=null&&he.includes(Et)?qt=D.value:qt=Et}let ra=v.cloneDeep((Ie=Object.keys(H))==null?void 0:Ie[0]);if(((Be=w==null?void 0:w.data)==null?void 0:Be.statusCode)===200||((Ke=w==null?void 0:w.data)==null?void 0:Ke.code)===200){if(((Ae=(M=w==null?void 0:w.data)==null?void 0:M.data)!=null&&Ae[ra]||(Le=(at=w==null?void 0:w.data)==null?void 0:at.result)!=null&&Le[ra])&&(Tt==null?void 0:Tt.length)===1)return await ee(((Oe=(Ye=w==null?void 0:w.data)==null?void 0:Ye.data)==null?void 0:Oe[ra])||((pt=(ft=w==null?void 0:w.data)==null?void 0:ft.result)==null?void 0:pt[ra]),v.cloneDeep(qt),Tt,C);if((gt=(ct=w==null?void 0:w.data)==null?void 0:ct.data)!=null&&gt[ra]||(Nt=(bt=w==null?void 0:w.data)==null?void 0:bt.result)!=null&&Nt[ra]){let Et=await He(((Vt=(Pt=w==null?void 0:w.data)==null?void 0:Pt.data)==null?void 0:Vt[ra])||((Ft=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Ft[ra]),v.cloneDeep(qt),Tt);return Et&&(z=[...z,...Et]),Et}else{if(!((xt=w==null?void 0:w.data)!=null&&xt.data)){let Et=await Ee.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(Tt==null?void 0:Tt[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Rt=>{var ua;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(ua=Rt.contents)==null?void 0:ua.map(la=>{var za,Ya;return(la==null?void 0:la.key)===(Tt==null?void 0:Tt[1])&&(la.value=(Ya=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Ya[ra==null?void 0:ra.replaceAll(":","")]),la})),Rt})),Ut});let At=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Rt in Ut)Rt!=="id"&&(Wt[Rt]=Ut[Rt]);At.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(At==null?void 0:At.length)>0&&await v.batchUpdateInsofDataApi({dataList:At});return}if((Tt==null?void 0:Tt.length)===1){const Et=(Va=(Ot=(Yt=w==null?void 0:w.data)==null?void 0:Yt.data)==null?void 0:Ot.path)==null?void 0:Va.path;let At="";(ja=(Da=(Ka=(Oa=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:Oa.split(")"))==null?void 0:Ka[0])==null?void 0:Da.split(":"))==null||ja.forEach(Rt=>{var ua,la;At=At===""?At+((ua=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:ua.trim()):At+"/"+((la=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:la.trim())});let Ut=[(qa=(Ha=(Wa=(Ua=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ua.split(">"))==null?void 0:Wa[0])==null?void 0:Ha.replaceAll("'",""))==null?void 0:qa.trim()],Wt;return(ba=(Ma=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:Ma.data)!=null&&ba[Tt==null?void 0:Tt[0]]?Wt=await ee((ka=(_a=(fa=w==null?void 0:w.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ka[Tt==null?void 0:Tt[0]],At,Tt,C):Wt=await De((ga=(na=w==null?void 0:w.data)==null?void 0:na.data)==null?void 0:ga.data,At,Ut,Re),Wt}else{const Et=(Zt=(wt=(Xa=w==null?void 0:w.data)==null?void 0:Xa.data)==null?void 0:wt.path)==null?void 0:Zt.path;let At="";return(Ea=(ca=(Mt=(fn=(yt=Et==null?void 0:Et.split("("))==null?void 0:yt[1])==null?void 0:fn.split(")"))==null?void 0:Mt[0])==null?void 0:ca.split(":"))==null||Ea.forEach(Wt=>{var Rt,ua;At=At===""?At+((Rt=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Rt.trim()):At+"/"+((ua=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ua.trim())}),await He((Qt=(ma=(oa=w==null?void 0:w.data)==null?void 0:oa.data)==null?void 0:ma.data)==null?void 0:Qt[Tt==null?void 0:Tt[0]],At,Tt)}}}}});if(await Promise.all(ue),(z==null?void 0:z.length)>0){let H=[];z==null||z.forEach(ne=>{H!=null&&H.find(G=>{var ae,ce,be,_e;return((ce=(ae=G==null?void 0:G.value)==null?void 0:ae.pageData)==null?void 0:ce.name)===((_e=(be=ne==null?void 0:ne.value)==null?void 0:be.pageData)==null?void 0:_e.name)})||H.push(ne)});let P=[];H==null||H.forEach(ne=>{var ce,be,_e,Te;let G=v.cloneDeep(ne);G.value.pageData.compData=(ce=G.value.pageData.compData)==null?void 0:ce.map(U=>{var Ve;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(Ve=U.contents)==null?void 0:Ve.map(me=>{var it,Ge,rt,Pe;let je=(it=v.cloneDeep(z))==null?void 0:it.find(Qe=>(Qe==null?void 0:Qe.keyType)===(me==null?void 0:me.key));if(je){let Qe=(Pe=(rt=(Ge=je.value.pageData.compData)==null?void 0:Ge.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:rt.contents)==null?void 0:Pe.find(Ue=>(Ue==null?void 0:Ue.key)===(me==null?void 0:me.key));me.value=Qe==null?void 0:Qe.value}return me})),U}),P.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let ae=[];(Te=(_e=(be=G==null?void 0:G.value)==null?void 0:be.pageData)==null?void 0:_e.compData)==null||Te.forEach(U=>{var Ve;(U==null?void 0:U.key)==="formContent"&&((Ve=U==null?void 0:U.contents)==null||Ve.forEach(me=>{var je,it,Ge,rt,Pe,Qe;if((it=(je=me==null?void 0:me.optionUrl)==null?void 0:je.menuSelect)!=null&&it.find(Ue=>Ue==null?void 0:Ue.includes("[")))if(ae!=null&&ae.find(Ue=>{var ze,Ce,Ne;return((ze=Ue==null?void 0:Ue.key)==null?void 0:ze.join(","))===((Ne=(Ce=me==null?void 0:me.optionUrl)==null?void 0:Ce.menuSelect)==null?void 0:Ne.join(","))})){let Ue=(Ge=ae==null?void 0:ae.find(ze=>{var Ce,Ne,ut;return((Ce=ze==null?void 0:ze.key)==null?void 0:Ce.join(","))===((ut=(Ne=me==null?void 0:me.optionUrl)==null?void 0:Ne.menuSelect)==null?void 0:ut.join(","))}))==null?void 0:Ge.value;Ue.push({key:me==null?void 0:me.prop,groups:(rt=me==null?void 0:me.optionUrl)==null?void 0:rt.groupSelect,value:me==null?void 0:me.value}),ae=ae==null?void 0:ae.map(ze=>{var Ce,Ne,ut;return((Ce=ze==null?void 0:ze.key)==null?void 0:Ce.join(","))===((ut=(Ne=me==null?void 0:me.optionUrl)==null?void 0:Ne.menuSelect)==null?void 0:ut.join(","))&&(ze.value=Ue),ze})}else ae.push({key:(Pe=me==null?void 0:me.optionUrl)==null?void 0:Pe.menuSelect,value:[{key:me==null?void 0:me.prop,groups:(Qe=me==null?void 0:me.optionUrl)==null?void 0:Qe.groupSelect,value:me==null?void 0:me.value}]})}))}),(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(U=>{var me;let Ve="";return(me=U==null?void 0:U.key)==null||me.forEach(je=>{var it;if(!(je!=null&&je.includes("[")))Ve=Ve===""?Ve+je:Ve+"/"+je;else{let Ge="",rt=(it=je==null?void 0:je.replaceAll("[","").replaceAll("]",""))==null?void 0:it.split(":");h==null||h.forEach(Pe=>{var Qe;(Pe==null?void 0:Pe.name)===(rt==null?void 0:rt[0])&&((Qe=Pe==null?void 0:Pe.compData)==null||Qe.forEach(Ue=>{var ze;(Ue==null?void 0:Ue.key)==="formContent"&&((ze=Ue==null?void 0:Ue.contents)==null||ze.forEach(Ce=>{(Ce==null?void 0:Ce.prop)===(rt==null?void 0:rt[1])&&(Ge=Ce==null?void 0:Ce.value)}))}))}),Ve=Ve+r.value+Ge}}),U.key=Ve,U})),ae==null||ae.forEach(U=>{var it,Ge,rt;let Ve=(it=Re[U.key])==null?void 0:it.find(Pe=>{var Qe,Ue,ze,Ce,Ne,ut,he;return((Ue=(Qe=Pe==null?void 0:Pe.value)==null?void 0:Qe.pageData)==null?void 0:Ue.name)===((Ne=(Ce=(ze=U==null?void 0:U.value)==null?void 0:ze[0])==null?void 0:Ce.groups)==null?void 0:Ne[0])&&((he=(ut=Pe==null?void 0:Pe.value)==null?void 0:ut.pageData)==null?void 0:he.name)!==void 0}),me=Ve==null?void 0:Ve.id,je=(Ge=Ve==null?void 0:Ve.value)==null?void 0:Ge.pageData;je.compData=(rt=je.compData)==null?void 0:rt.map(Pe=>{var Qe;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(Qe=Pe.contents)==null?void 0:Qe.map(Ue=>{var Ce;let ze=(Ce=U.value)==null?void 0:Ce.find(Ne=>(Ne==null?void 0:Ne.key)===(Ue==null?void 0:Ue.prop));return ze&&(Ue.value=ze.value),Ue})),Pe}),P.push({id:me,value:{pageData:je}})})});let Se=(ie=v.cloneDeep(z))==null?void 0:ie[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}x.setFreshContent(!0)}V.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),V.setImportLoading(!1)}E.value=!0},fe=["createInsofDataApi"],Ze=vo(async Q=>{se(Q)},100),nt=async Q=>{var Xe,ve,F,Y,pe;const L=v.cloneDeep(Q);let ye,xe=new WeakMap,$e=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(ve=(Xe=$e.data.result)==null?void 0:Xe.filter(de=>{var Z,oe;return((Z=de==null?void 0:de.key)==null?void 0:Z.pageKey)!=="menu"&&((oe=de==null?void 0:de.key)==null?void 0:oe.pageKey)!=="secret"}))==null||ve.forEach(de=>{xe[de.key.pageKey]?xe[de.key.pageKey]=[...xe[de.key.pageKey],de]:xe[de.key.pageKey]=[de]}),Q!=null&&Q[0].path&&(ye=await(L==null?void 0:L.map(async(de,Z)=>{var I,W,w,S,q,z,ue,H,P,Se,ne,G,ae,ce,be,_e;const te=(I=xe[de==null?void 0:de.path])==null?void 0:I.filter(Te=>{var U;return((U=Te==null?void 0:Te.key)==null?void 0:U.type)==="data"});let ie="";const Re=await Ee.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);te==null||te.forEach(Te=>{var U,Ve,me,je,it;((Ve=(U=Te==null?void 0:Te.value)==null?void 0:U.tableData)==null?void 0:Ve.算法名称)===((me=L==null?void 0:L[Z])==null?void 0:me.method)&&(ie=(it=(je=Te==null?void 0:Te.value)==null?void 0:je.tableData)==null?void 0:it.算法体)});const ot=await Ee.getItemData(de==null?void 0:de.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);let h="",C=(q=(S=(w=(W=ot==null?void 0:ot[0])==null?void 0:W.compData)==null?void 0:w.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:S.contents)==null?void 0:q.findIndex(Te=>(Te==null?void 0:Te.prop)==="算法体");return(ue=(z=ot==null?void 0:ot[0])==null?void 0:z.compData)==null||ue.forEach(Te=>{var U;(Te==null?void 0:Te.key)==="tableContents"&&((U=Te==null?void 0:Te.contents)==null||U.forEach(Ve=>{Ve!=null&&Ve.find(me=>me===(de==null?void 0:de.method))&&(h=Ve[C])}))}),{buttonName:((H=L==null?void 0:L[Z])==null?void 0:H.method)||((ne=(Se=(P=te==null?void 0:te[0])==null?void 0:P.value)==null?void 0:Se.tableData)==null?void 0:ne.算法名称),api:(ie===""?(ce=(ae=(G=te==null?void 0:te[0])==null?void 0:G.value)==null?void 0:ae.tableData)==null?void 0:ce.算法体:ie)||h,content:Re==null?void 0:Re.filter(Te=>Te.comp!=="methodButton"),extraContent:(be=v.cloneDeep(de.value))==null?void 0:be.slice(1),methodName:(de==null?void 0:de.path)??"",extraValues:(_e=L==null?void 0:L[Z])==null?void 0:_e.data}})));const Fe=L==null?void 0:L.map(async de=>{var ot,h,C,I,W,w;const Z=(ot=$e.data.result)==null?void 0:ot.filter(S=>{var q,z,ue;return((q=S==null?void 0:S.key)==null?void 0:q.parentTable)===""&&((z=S==null?void 0:S.key)==null?void 0:z.type)==="method"&&((ue=S==null?void 0:S.key)==null?void 0:ue.methodName)===S.method}),oe=Z==null?void 0:Z[0],te=(h=$e.data.result)==null?void 0:h.filter(S=>{var q,z;return((q=S==null?void 0:S.key)==null?void 0:q.type)==="methodData"&&((z=S==null?void 0:S.key)==null?void 0:z.tableId)===(oe==null?void 0:oe.id)}),ie=await Ee.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe),Re=te==null?void 0:te[0];return{buttonName:(C=oe==null?void 0:oe.key)==null?void 0:C.methodKey,api:(W=(I=Re==null?void 0:Re.value)==null?void 0:I.tableData)==null?void 0:W[0],content:ie==null?void 0:ie.filter(S=>S.comp!=="methodButton"),extraContent:(w=v.cloneDeep(de.value))==null?void 0:w.slice(1),methodName:(de==null?void 0:de.method)??""}}),tt=(F=Q==null?void 0:Q[0])!=null&&F.path&&((Y=Q==null?void 0:Q[0])==null?void 0:Y.path)!==""?await Promise.all(ye):await Promise.all(Fe);i.value=tt==null?void 0:tt.filter(de=>de==null?void 0:de.extraContent),(pe=i.value)==null||pe.forEach(de=>{var Z;de.api===""&&((Z=de.content)==null||Z.forEach(oe=>{var te;oe.comp=="Table"&&x.setExtraContents(Ee.methodTableToContent(oe.compData,(te=de.extraContent)==null?void 0:te[0]))}))})};return e.watch(()=>d.itemData,async()=>{O.value=="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(Q,L)=>{var ye,xe,$e;return e.unref(O)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ye=i.value)==null?void 0:ye.filter(Fe=>(Fe==null?void 0:Fe.buttonName)!=="保存"),Fe=>{var tt;return e.openBlock(),e.createElementBlock("div",null,[Fe.api!==""?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,disabled:e.unref(K)===e.unref(D)&&!((tt=Fe==null?void 0:Fe.buttonName)!=null&&tt.includes("预览")),class:"calculator-content",modelValue:Fe.buttonName,onClickTrigger:Xe=>e.unref(Ze)(Fe),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&(($e=e.unref(D))==null?void 0:$e[((xe=e.unref(D))==null?void 0:xe.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ge,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Je},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=zt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=zt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=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}]),f=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:""}]),x=e.ref({}),_=e.ref([]),V=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),R=X=>{var K;x.value=v.cloneDeep(X),r("change",(K=V())==null?void 0:K.compData)},J=X=>{var K,le;if((X==null?void 0:X.buttonName)==="确认"){const D=v.cloneDeep(X==null?void 0:X.content);switch(u.value){case"create":_.value.push({...D,index:((K=_.value)==null?void 0:K.length)+1});break}r("change",(le=V())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},O=(X,K)=>{var le,D;switch(X){case"create":(le=f.value)==null||le.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(K,1),u.value="delete";break}},ke=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,X=>{var K,le;X&&(x.value=((K=X==null?void 0:X.find(D=>D.key==="signConfig"))==null?void 0:K.contents)??{},_.value=((le=X==null?void 0:X.find(D=>D.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(X,K)=>{const le=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>O("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>O("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(St.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ke,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:J},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=zt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var V,R;return(V=s==null?void 0:s.stepConfig)!=null&&V.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),b=(V,R)=>{d.value=R,r("clickStep",V,R)},g=V=>St.getComponent(V),f=()=>{var R;const V=(R=s==null?void 0:s.stepList)==null?void 0:R.find((J,O)=>O+1===u.value);return console.log("findStep",V),V?V==null?void 0:V.children:[]},x=V=>{r("clickTrigger",V)},_=V=>{r("changeTrigger",V)};return(V,R)=>{var ke,X,K,le,D;const J=e.resolveComponent("el-step"),O=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(O,{direction:(ke=n.stepConfig)==null?void 0:ke.direction,active:u.value,"finish-status":"success",simple:(X=n.stepConfig)==null?void 0:X.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,($,y)=>(e.openBlock(),e.createBlock(J,{key:y,class:"step-item",onClick:B=>b($,y+1)},{title:e.withCtx(()=>[e.renderSlot(V.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(V.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(le=n.stepConfig)!=null&&le.allowTrigger&&((D=n.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),($,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":B=>$.value=B,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(V.$slots,(B,E)=>({name:E,fn:e.withCtx(ge=>[e.renderSlot(V.$slots,E,e.mergeProps({ref_for:!0},ge||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=zt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),b=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,x;u.value=(f=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:f.contents,d.value=(x=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(g,f)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=zt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(b),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=zt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(St.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=zt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Oc={class:"type-select"},Mc=["onClick"],Lc={class:"list-icon"},zc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:x=>r(g)},[e.createElementVNode("div",Lc,[e.createVNode(b,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=zt._export_sfc(zc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},Kc={class:"collapse-title-item"},jc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),g=J=>{var ke;let O=(ke=v.cloneDeep(b.value))==null?void 0:ke.map((X,K)=>(J===K&&(X.content=!0),X));b.value=O},f=J=>{var ke;let O=(ke=v.cloneDeep(b.value))==null?void 0:ke.map((X,K)=>(J===K&&(X.content=!1),X));b.value=O,d.value=v.cloneDeep(s.value)},x=(J,O)=>{var le;let ke=(le=v.cloneDeep(b.value))==null?void 0:le.map((D,$)=>(J===$&&(D.content=!1),D));b.value=ke;const X=v.cloneDeep(s.value),K=X==null?void 0:X.filter((D,$)=>($===J&&(D.name=O),D));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var J,O,ke;!s.value||((J=s.value)==null?void 0:J.length)===0?d.value=[]:d.value=(O=v.cloneDeep(s.value))==null?void 0:O.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),u.value=d.value,b.value=(ke=v.cloneDeep(u.value))==null?void 0:ke.map((X,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const _=J=>on(J),V=(J,O,ke)=>{var K,le;if(!J)return;let X=v.cloneDeep(s.value);X=(K=X==null?void 0:X.map((D,$)=>($===ke&&(D.compData=J),D)))==null?void 0:K.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(le=v.cloneDeep(X))==null?void 0:le.map((D,$)=>({id:$,content:!1})),i.setOriginalData(X),i.setItemData(X)},R=J=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const O=v.cloneDeep(s.value),ke=O==null?void 0:O.filter((X,K)=>K!==J);i.setOriginalData(ke),i.setItemData(ke),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(J,O)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[O[1]||(O[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:X,index:K})=>{var le,D,$,y,B,E,ge,Je,st,Me;return[e.createElementVNode("div",$c,[e.createElementVNode("div",Kc,[(D=(le=b.value)==null?void 0:le.find(He=>He.id===K))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:X.name&&X.name!==""?"8px":"0px"})},e.toDisplayString(X.name),5)),(y=($=b.value)==null?void 0:$.find(He=>He.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(St._sfc_main$2,{modelValue:X.name,"onUpdate:modelValue":He=>X.name=He,onClick:O[0]||(O[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(B=b.value)==null?void 0:B.find(He=>He.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(He=>g(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Je=(ge=b.value)==null?void 0:ge.find(He=>He.id===K))!=null&&Je.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(He=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers(He=>x(K,X.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Me=(st=b.value)==null?void 0:st.find(He=>He.id===K))!=null&&Me.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(He=>R(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:X,index:K})=>{var le,D;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(_(X.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(X.comp+"Operate")),{itemContents:X==null?void 0:X.compData,originalItemContents:(D=(le=u.value)==null?void 0:le.find(($,y)=>y===K))==null?void 0:D.compData,onChange:$=>V($,X,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=zt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,b)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=zt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),V=e.ref(new WeakMap),R=e.ref(null),J=Qn(v.pinia),{itemData:O}=v.storeToRefs(J),ke=()=>{b.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},X=Q=>{b.value="修改标签页",g.value.title=d.value[Q].title,f.value=Q,u.value=!0},K=Q=>{const L=$(Q);V.value.delete(L),d.value.splice(Q,1),nt()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const Q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:D()};d.value.push(Q)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,nt()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=Q=>{const L=d.value[Q];return L.id||(L.id=D()),L.id},y=Q=>{var xe;_.value=Q;const L=$(Q);R.value=v.cloneDeep(O.value);let ye=V.value.get(L);!ye&&((xe=d.value[Q].children)==null?void 0:xe.length)>0&&(ye=Je(d.value[Q].children)),ye?J.setItemData(v.cloneDeep(ye)):J.setItemData([]),x.value=!0},B=e.computed(()=>{const Q=$t.useModelComp(v.pinia),L=v.storeToRefs(Q).itemData.value;return console.log("可用组件数据",L),!L||!Array.isArray(L)?[]:L.filter(ye=>{var xe;if(ye.comp==="Tabs"&&_.value>=0){const $e=$(_.value);if((xe=ye.compData)==null?void 0:xe.some(tt=>{var Xe;return tt.key==="stepList"&&((Xe=tt.contents)==null?void 0:Xe.some(ve=>ve.id===$e))}))return!1}return!0})}),E=Q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Q]||Q,ge=Q=>{var L;try{const ye=v.cloneDeep(Q);ye.id=Date.now()+Math.random(),ye.comp==="Tabs"&&((L=ye.compData)==null||L.forEach($e=>{$e.key==="stepList"&&$e.contents&&$e.contents.forEach(Fe=>{Fe.id=D()})}));const xe=v.cloneDeep(O.value);xe.push(ye),J.setItemData(xe)}catch(ye){console.error("添加组件失败:",ye)}},Je=Q=>Q.map(L=>{var ye;switch(L.type){case"form":return{comp:"Form",name:L.value||"表单",compData:st(L.content)};case"table":return{comp:"Table",name:L.value||"表格",compData:Me(L.content)};default:return{comp:"Unknown",name:L.value||"",compData:((ye=L.content)==null?void 0:ye.originalData)||[]}}}),st=Q=>{if(!Q)return[];const L=[];return Q.rowContents&&L.push({key:"formContent",contents:Q.rowContents}),Q.buttonValue&&L.push({key:"formButton",contents:Q.buttonValue}),typeof Q.isEnableWrap<"u"&&L.push({key:"enableWrap",contents:Q.isEnableWrap}),L},Me=Q=>[],He=()=>{if(_.value>=0&&_.value<d.value.length){const Q=$(_.value);V.value.set(Q,v.cloneDeep(O.value)),d.value[_.value].children=ee(O.value),console.log("保存后的数据",ee(O.value))}x.value=!1,_.value=-1,R.value=null,nt()},De=()=>{R.value&&J.setItemData(v.cloneDeep(R.value)),x.value=!1,_.value=-1,R.value=null},A=()=>{x.value&&De()},ee=Q=>{if(!Array.isArray(Q))throw new Error("sourceData must be an array");return Q.map((L,ye)=>{if(!L||typeof L!="object")return L;const{comp:xe,name:$e,compData:Fe}=L;switch(xe){case"Form":return{type:"form",content:se(Fe||[]),value:"表单"};case"Table":return{type:"table",content:fe(Fe||[]),value:"表格"};default:return{type:"xxx",content:Ze(Fe||[]),value:""}}})},se=Q=>{const L={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ye={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Q.forEach((xe,$e)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${$e}:`,xe);return}const{key:Fe,contents:tt}=xe,Xe=ye[Fe];if(!Xe){console.warn(`Unknown Form config key: ${Fe}`);return}Fe==="enableWrap"?L[Xe]=!!tt:L[Xe]=Array.isArray(tt)?tt:[]}),L},fe=Q=>{const L={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ye={header:"columns",tableContents:"tableData"};return Q.forEach((xe,$e)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${$e}:`,xe);return}const{key:Fe,contents:tt}=xe,Xe=ye[Fe];if(!Xe){console.warn(`Unknown Table config key: ${Fe}`);return}L[Xe]=Array.isArray(tt)?tt:[]}),L},Ze=Q=>(console.log("Default conversion logic - to be implemented"),{originalData:Q,processed:!1,componentType:"unknown"}),nt=()=>{const Q=[{key:"stepList",contents:d.value}];r("change",Q)};return e.watch(()=>s.itemContents,Q=>{if(Q&&Q.length>0){const L=Q.find(ye=>ye.key==="stepList");L&&L.contents&&(d.value=L.contents.map(ye=>({title:ye.title||"",value:ye.value||ye.title||"",label:ye.label||ye.title||"",children:ye.children||[],id:ye.id||D()})))}},{immediate:!0,deep:!0}),(Q,L)=>{const ye=e.resolveComponent("svg-icon"),xe=e.resolveComponent("el-input"),$e=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[L[6]||(L[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(ye,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),L[5]||(L[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(tt,Xe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Xe},[e.createElementVNode("span",nu,e.toDisplayString(tt.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:ve=>X(Xe)},"修改标题",8,ru),e.createElementVNode("button",{onClick:ve=>y(Xe)},"布局调整",8,lu),e.createElementVNode("button",{onClick:ve=>K(Xe)},"删除",8,iu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":L[2]||(L[2]=tt=>u.value=tt),title:b.value,onBeforeDestroy:L[3]||(L[3]=tt=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:L[1]||(L[1]=tt=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Fe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode($e,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(xe,{modelValue:g.value.title,"onUpdate:modelValue":L[0]||(L[0]=tt=>g.value.title=tt),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":L[4]||(L[4]=tt=>x.value=tt),title:"布局调整",fullScreen:"",onBeforeDestroy:A},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:De},"取消"),e.createElementVNode("button",{onClick:He},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[L[8]||(L[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,tt=>(e.openBlock(),e.createElementBlock("div",{key:tt.id,class:"component-item",onClick:Xe=>ge(tt)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(E(tt.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(tt.name),1)]),L[7]||(L[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Q.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=zt._export_sfc(mu,[["__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 ku(n){return{type:"line",...n}}function xu(){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 wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Na={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},zo=$t.useMenuState(v.pinia),Er=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=i||{},g=n==null?void 0:n.find(V=>{const{name:R}=V;return R===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(V=>{const{key:R}=V;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(V=>{const R=V==null?void 0:V[0];let J=!1;v.isObject(R)&&(R!=null&&R.id)&&(J=!0);let O=u,ke=b;J&&(O=O+1,ke=ke+1);const X=V==null?void 0:V[O],K=V==null?void 0:V[ke];s.push(X),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(b&&zo.activeMenuPath&&(g=await Ee.getItemData(`${zo.activeMenuPath}`,f,"")),!b){const x=i==null?void 0:i.join("/");g=await Ee.getItemData(`${x}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),g=await Ee.getItemData(u,b,"");return Er(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:V}=i||{};return g&&f&&St.isNumber(x)&&St.isNumber(_)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:V}):St.isNumber(u)&&St.isNumber(b)?await Eu({menu:r,group:d,nameCol:u,valueCol:b}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const V=g({data:_});return f.series.push(V),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const V=g({data:_});return f.series.push(V),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;const V=[];for(let J=0;J<x.length;J++){const O=x[J],ke=_[J];V.push({name:O,value:ke})}const R=g({data:V});return f.series.push(R),f},Bu=async(n=[])=>{var b,g,f;const i=((b=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((g=n==null?void 0:n.find(x=>x.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(x=>x.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=zt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},Lu={class:"form-content"},zu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},Ku=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=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:""}],g=e.ref({}),f=()=>{var Z;u.value=b(),(Z=u.value)==null||Z.forEach(oe=>{var ie;const te=oe==null?void 0:oe.prop;oe.value=(ie=g==null?void 0:g.value)==null?void 0:ie[te]}),d.visible=!0},x=Z=>{g.value=Z},_=()=>{var Z;d.visible=!1,r("change",(Z=pe())==null?void 0:Z.compData)},V=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=e.ref([]),J=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],O=e.ref({}),ke=()=>{const Z=R.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=O.value)==null?void 0:Re[ie]}),oe},X=Z=>{var te;O.value=Z;const oe=ke();R.value=oe,r("change",(te=pe())==null?void 0:te.compData)},K=async()=>{const Z=await Ee.getMenusContent(),oe=ke();oe==null||oe.forEach(te=>{(te==null?void 0:te.prop)==="menu"&&(te.contents=Z)}),R.value=oe,V.visible=!0,await tt(O.value.menu),await F(O.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),$=()=>[{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:[]}],y=e.ref({}),B=()=>{const Z=D.value,oe=v.cloneDeep(Z);return oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=y.value)==null?void 0:Re[ie]}),oe},E=Z=>{var te;y.value=Z;const oe=B();D.value=oe,r("change",(te=pe())==null?void 0:te.compData)},ge=async()=>{await A();const Z=v.cloneDeep(Je.value),oe=B();oe==null||oe.forEach(te=>{var Re;const ie=te==null?void 0:te.prop;te.value=(Re=y==null?void 0:y.value)==null?void 0:Re[ie],ie==="mainKey"&&(te.contents=Z)}),D.value=oe,le.visible=!0},Je=e.ref([]),st=e.ref([]),Me=e.ref({}),He=e.ref({}),De=()=>{const{compData:Z}=xe.value||{},oe=Z==null?void 0:Z.find(I=>{const{key:W}=I;return W==="header"}),te=(oe==null?void 0:oe.contents)||[],ie=te==null?void 0:te.filter((I,W)=>{const{label:w}=I;return w!=="操作"}),Re=ie==null?void 0:ie.findIndex((I,W)=>{const{isMainKey:w}=I;return w});if(Re<0)return[];const ot=Z==null?void 0:Z.find(I=>{const{key:W}=I;return W==="tableContents"}),h=(ot==null?void 0:ot.contents)||[];return h==null?void 0:h.map(I=>{const W=I==null?void 0:I[0];let w=Re;v.isObject(W)&&(W!=null&&W.id)&&(w=w+1);const S=I==null?void 0:I[w];return{label:S,value:S}})},A=async()=>{const Z=await De();Je.value=Z},ee=async Z=>{const oe=sessionStorage.getItem("systemKey");return await Ee.getItemData(Z,oe,"")},se=async Z=>{const oe=Z;st.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return Me.value[ie]=te,{label:ie,value:ie}})},fe=Z=>{const{comp:oe,compData:te}=He.value||{};if(oe==="Table"){let ie=B();ie=ie.filter(Re=>{const{prop:ot}=Re;return ot!=="formItems"}),Xe(ie,te),D.value=ie}},Ze=async()=>{var te,ie;const Z=(te=y==null?void 0:y.value)==null?void 0:te.mainKey,oe=(ie=O==null?void 0:O.value)==null?void 0:ie.menu;if(Z){const ot=`${oe==null?void 0:oe.join("/")}^${Z}`,h=await ee(ot);await se(h);const C=B();C==null||C.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=st.value)}),D.value=C}};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.mainKey},async(Z,oe)=>{Z!=oe&&Z&&await Ze()});const nt=async Z=>{const oe=Me.value[Z];He.value=oe,await fe()};e.watch(()=>{var Z;return(Z=y==null?void 0:y.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&Z&&nt(Z)});const Q=async()=>{var oe;await Ze();const Z=(oe=y.value)==null?void 0:oe.group;await nt(Z)},L=e.ref([]),ye=e.ref({}),xe=e.ref({}),$e=async Z=>{const oe=Z==null?void 0:Z.join("/"),te=sessionStorage.getItem("systemKey");return await Ee.getItemData(oe,te,"")},Fe=async Z=>{const oe=await $e(Z);L.value=oe==null?void 0:oe.map(te=>{const{name:ie}=te;return ye.value[ie]=te,{label:ie,value:ie}})},tt=async(Z,oe)=>{await Fe(Z);const te=ke();te==null||te.forEach(ie=>{(ie==null?void 0:ie.prop)==="group"&&(ie.contents=L.value)}),R.value=te};e.watch(()=>{var Z;return(Z=O==null?void 0:O.value)==null?void 0:Z.menu},async(Z,oe)=>{const te=Z==null?void 0:Z.join("/"),ie=oe==null?void 0:oe.join("/");te!=ie&&await tt(Z)});const Xe=(Z,oe)=>{const te=oe==null?void 0:oe.find(h=>{const{key:C}=h;return C==="header"}),ie=(te==null?void 0:te.contents)||[],Re=ie==null?void 0:ie.filter((h,C)=>{const{label:I}=h;return I!=="操作"}),ot=Re==null?void 0:Re.map((h,C)=>{const{label:I}=h;return{label:I,value:C}});Z==null||Z.forEach(h=>{const C=h==null?void 0:h.prop;(C==="nameCol"||C==="valueCol")&&(h.contents=ot)})},ve=Z=>{const{comp:oe,compData:te}=xe.value||{};if(oe==="Table"){O.value.formItems=[];let ie=ke();ie=ie.filter(Re=>{const{prop:ot}=Re;return ot!=="formItems"}),Xe(ie,te),R.value=ie}},F=async Z=>{const oe=ye.value[Z];xe.value=oe,await ve()};e.watch(()=>{var Z;return(Z=O==null?void 0:O.value)==null?void 0:Z.group},async(Z,oe)=>{Z!=oe&&F(Z)});const Y=async()=>{var te,ie;const Z=(te=O.value)==null?void 0:te.menu;await tt(Z);const oe=(ie=O.value)==null?void 0:ie.group;await F(oe)},pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:O.value},{key:"chartDetailConfig",contents:y.value}]}),de=()=>{d.visible=!1,V.visible=!1,le.visible=!1};return e.onMounted(async()=>{var oe,te,ie;R.value=J(),D.value=$();const Z=s==null?void 0:s.itemContents;g.value=((oe=Z==null?void 0:Z.find(Re=>Re.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},O.value=((te=Z==null?void 0:Z.find(Re=>Re.key==="chartDataConfig"))==null?void 0:te.contents)??{},await Y(),y.value=((ie=Z==null?void 0:Z.find(Re=>Re.key==="chartDetailConfig"))==null?void 0:ie.contents)??{},await Q()}),(Z,oe)=>{const te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[0]||(oe[0]=ie=>f())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[1]||(oe[1]=ie=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(te,{id:"themeButton",onClick:oe[2]||(oe[2]=ie=>ge())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:de,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Lu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(te,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:V.visible,title:V.title,onBeforeDestroy:de,width:V.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:de,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(te,{class:"cancel-button button",onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(te,{class:"ok-button button",onClick:de,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=zt._export_sfc(Ku,[["__scopeId","data-v-fe119645"]]);var Fn={exports:{}},Uu=Fn.exports,Fo;function Wu(){return Fo||(Fo=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(x,_){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(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function r(x,_,V){var R=new XMLHttpRequest;R.open("GET",x),R.responseType="blob",R.onload=function(){f(R.response,_,V)},R.onerror=function(){console.error("could not download file")},R.send()}function d(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function u(x){try{x.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),x.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ee.commonjsGlobal=="object"&&Ee.commonjsGlobal.global===Ee.commonjsGlobal?Ee.commonjsGlobal:void 0,g=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,V){var R=b.URL||b.webkitURL,J=document.createElement("a");_=_||x.name||"download",J.download=_,J.rel="noopener",typeof x=="string"?(J.href=x,J.origin===location.origin?u(J):d(J.href)?r(x,_,V):u(J,J.target="_blank")):(J.href=R.createObjectURL(x),setTimeout(function(){R.revokeObjectURL(J.href)},4e4),setTimeout(function(){u(J)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,V){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(s(x,V),_);else if(d(x))r(x,_,V);else{var R=document.createElement("a");R.href=x,R.target="_blank",setTimeout(function(){u(R)})}}:function(x,_,V,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,V);var J=x.type==="application/octet-stream",O=/constructor/i.test(b.HTMLElement)||b.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||J&&O||g)&&typeof FileReader<"u"){var X=new FileReader;X.onloadend=function(){var D=X.result;D=ke?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=D:location=D,R=null},X.readAsDataURL(x)}else{var K=b.URL||b.webkitURL,le=K.createObjectURL(x);R?R.location=le:location.href=le,R=null,setTimeout(function(){K.revokeObjectURL(le)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(Fn)),Fn.exports}Wu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DHbfeZj9.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Sr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Tr=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),b=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=Tr(b,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},eo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let b=v.cloneDeep(i),g=u==null?void 0:u.filter(V=>V!==(b==null?void 0:b[r])),f=r+1,x=eo(g,b,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(V=>{_.push(V)}),u=_}return u})),d},go=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=b==null?void 0:b.filter(R=>R!==(g==null?void 0:g[d])),x=d+1,_=go(f,g,s,r,x),V=[];V.push(b==null?void 0:b[0]),_==null||_.forEach(R=>{V.push(R)}),b=V}return b})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Xt.ssDialog,ssInput:St._sfc_main$2},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=$t.useMenuState(),b=$t.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),x=e.ref(0),_=Pl.useRouter(),V=e.ref(),{asideMenus:R,menuTriggerType:J,platform:O}=v.storeToRefs(u),{fixMenuStatus:ke}=v.storeToRefs(b),X=e.computed(()=>r==null?void 0:r.mode),K=ve=>ve==null?void 0:ve.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),le=e.computed(()=>{let ve=[...R.value];if((ve==null?void 0:ve.length)===0)return _.push("/"),[];const F=Je(ve,E.value);return F.isFlag||(ve=F==null?void 0:F.data),ve=ve==null?void 0:ve.map(Y=>{var pe,de;return!(Y!=null&&Y.children)||((pe=Y==null?void 0:Y.children)==null?void 0:pe.length)===0?Y.config=d.value:Y!=null&&Y.children&&((de=Y==null?void 0:Y.children)==null?void 0:de.length)>0&&(Y.children=K(Y.children)),Y}),ve}),D=async(ve,F)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(ve==null?void 0:ve.path),u.setActiveAsideMenu(ve),ve.isRouter?_.push(ve.path):_.push("/"),s("node-click",ve,F)},$=async ve=>{const F=v.findNodeByPropInTree(le.value,"path",ve);u.setActiveAsideMenu(F),b.setRouteToChildPath(""),ke.value?b.setFixMenuStatus(!1):J.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(ve):(u.setMenuTriggerType("click"),u.setActiveMenuPath(ve)),ve!=null&&ve.startsWith("/")?_.push(ve):_.push("/"),x.value++},y=ve=>{u.setActiveMenuPath(ve)},B=ve=>{const F=document.documentElement;ve==null||ve.forEach(Y=>{F.style.setProperty(Y.name,Y.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const ve=sessionStorage.getItem("authority");return ve?JSON.parse(ve):[]});e.watch(()=>O.value,ve=>{ve==="browser"?B(yn.browserVerticalMenuClasses):ve==="client"?(B(yn.clientHorizontalMenuClasses),B(yn.clientVerticalMenuClasses)):ve==="three"&&(B(yn.threeHorizontalMenuClasses),B(yn.threeVerticalMenuClasses))},{immediate:!0});const ge=(ve,F)=>{function Y(pe){pe==null||pe.forEach(de=>{var oe,te;const Z=(oe=de==null?void 0:de.path)!=null&&oe.startsWith("/")?(te=de==null?void 0:de.path)==null?void 0:te.substring(1):de==null?void 0:de.path;de.show=F==null?void 0:F.some(ie=>ie==null?void 0:ie.includes(Z)),de.children&&Y(de.children)})}return Y(ve),ve},Je=(ve,F)=>{if(Array.isArray(F)){const Y=Array.from(new Set(F==null?void 0:F.map(pe=>pe.substring(0,pe.lastIndexOf("/")))));return{data:ge(ve,Y),isFlag:!1}}else return{isFlag:(F==null?void 0:F.toUpperCase())==="SUPERADMIN"}},st=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Me=ve=>on(ve),He=e.ref({}),De=e.ref([]),A=e.ref({}),ee=e.ref({}),se=ve=>{switch(ve){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},fe=e.ref({}),Ze=ve=>{u.setCacheInputMenu({type:st.type,data:ve}),u.setIsRefreshMenus(!0)},nt=async(ve,F,Y)=>{var pe,de,Z,oe,te,ie,Re,ot,h,C,I,W,w,S,q,z,ue,H,P,Se,ne,G,ae,ce,be,_e,Te,U,Ve,me,je,it,Ge,rt,Pe,Qe,Ue,ze,Ce,Ne,ut,he;if(F==="create"){let Ie=(Y==null?void 0:Y.title)+"(1)",Be=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ke=(de=(pe=Be==null?void 0:Be.data)==null?void 0:pe.result)==null?void 0:de[0],M=(Z=Ke==null?void 0:Ke.value)==null?void 0:Z.pageData;M.compData=(oe=M.compData)==null?void 0:oe.map(Le=>{var Ye;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=eo(Le.contents,(Ye=Y==null?void 0:Y.path)==null?void 0:Ye.split("/"),Ie)),Le}),await v.updateInsofDataApi({id:Ke==null?void 0:Ke.id,value:{pageData:M}});let Ae=(ie=(te=Y==null?void 0:Y.path)==null?void 0:te.split("/"))==null?void 0:ie.filter((Le,Ye)=>{var Oe,ft;return Ye!==((ft=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:ft.length)-1}),at=await Ee.getItemData((h=(ot=(Re=Y==null?void 0:Y.path)==null?void 0:Re.split("/"))==null?void 0:ot.filter((Le,Ye)=>{var Oe,ft;return Ye!==((ft=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:ft.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(Ae.push(Ie),Ae=Ae==null?void 0:Ae.join("/"),(at==null?void 0:at.length)>0){let Le=at==null?void 0:at[0],Ye=(I=(C=Le==null?void 0:Le.compData)==null?void 0:C.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:I.contents;if(((W=Ye==null?void 0:Ye[0])==null?void 0:W.directiveLabel)==="#isMain"){let Oe=(w=Ye==null?void 0:Ye[0])==null?void 0:w.prop,ft=(q=(S=Le==null?void 0:Le.compData)==null?void 0:S.find(ct=>(ct==null?void 0:ct.key)==="tableContents"))==null?void 0:q.contents,pt;ft==null||ft.forEach(ct=>{var gt,bt;if(ct.length===1)((gt=ct==null?void 0:ct[0])==null?void 0:gt[Oe])===(Y==null?void 0:Y.title)&&(pt=ct==null?void 0:ct[0],pt[Oe]=Ie);else{let Nt=(bt=Ye==null?void 0:Ye.filter(_t=>_t!=="操作"))==null?void 0:bt.map(_t=>_t==null?void 0:_t.prop),Pt=ct==null?void 0:ct.filter(_t=>!(_t!=null&&_t.id)),Vt=Ee.getValueToObjectValue(Pt,Nt);Vt[Oe]=Ie,pt=Vt}}),await v.createInsofDataApi({key:{type:"data",pageKey:(H=(ue=(z=Y==null?void 0:Y.path)==null?void 0:z.split("/"))==null?void 0:ue.filter((ct,gt)=>{var bt,Nt;return gt!==((Nt=(bt=Y==null?void 0:Y.path)==null?void 0:bt.split("/"))==null?void 0:Nt.length)-1}))==null?void 0:H.join("/"),tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Se=f.value)==null?void 0:Se.dept)||((ne=f.value)==null?void 0:ne.部门名称)},value:{tableData:pt}})}}await Ee.newLoadingConstruct(Y==null?void 0:Y.path,Ae),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((ce=(ae=(G=Y==null?void 0:Y.path)==null?void 0:G.split("/"))==null?void 0:ae.filter((Le,Ye)=>{var Oe,ft;return Ye!==((ft=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:ft.length)-1}))==null?void 0:ce.join("/")),u.setActiveTopMenuPath((_e=(be=Y==null?void 0:Y.path)==null?void 0:be.split("/"))==null?void 0:_e[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(F==="update")V.value=Y;else if(F==="delete"){let Ie=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Y==null?void 0:Y.path}}),Be=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ke=(U=(Te=Be==null?void 0:Be.data)==null?void 0:Te.result)==null?void 0:U[0],M=(Ve=Ke==null?void 0:Ke.value)==null?void 0:Ve.pageData;if(M.compData=(me=M.compData)==null?void 0:me.map(Le=>{var Ye;return(Le==null?void 0:Le.key)==="menuContents"&&(Le.contents=Tr(Le.contents,(Ye=Y==null?void 0:Y.path)==null?void 0:Ye.split("/"))),Le}),await v.updateInsofDataApi({id:Ke==null?void 0:Ke.id,value:{pageData:M}}),((it=(je=Ie==null?void 0:Ie.data)==null?void 0:je.result)==null?void 0:it.length)>0){let Le=(rt=(Ge=Ie==null?void 0:Ie.data)==null?void 0:Ge.result)==null?void 0:rt.map(Ye=>Ye==null?void 0:Ye.id);(Le==null?void 0:Le.length)>0&&await v.batchDeleteInsofDataApi({ids:Le})}let Ae=await Ee.getItemData((Ue=(Qe=(Pe=Y==null?void 0:Y.path)==null?void 0:Pe.split("/"))==null?void 0:Qe.filter((Le,Ye)=>{var Oe,ft;return Ye!==((ft=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:ft.length)-1}))==null?void 0:Ue.join("/"),sessionStorage.getItem("systemKey"),""),at=[];(Ae==null?void 0:Ae.length)>0&&(Ae==null||Ae.forEach(Le=>{var Oe,ft,pt,ct,gt,bt,Nt,Pt,Vt,_t,Ft;let Ye=(ct=(pt=(ft=(Oe=Le==null?void 0:Le.compData)==null?void 0:Oe.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:ft.contents)==null?void 0:pt[0])==null?void 0:ct.prop;((Pt=(Nt=(bt=(gt=Le==null?void 0:Le.compData)==null?void 0:gt.find(xt=>(xt==null?void 0:xt.key)==="header"))==null?void 0:bt.contents)==null?void 0:Nt[0])==null?void 0:Pt.directiveLabel)==="#isMain"&&((Ft=(_t=(Vt=Le==null?void 0:Le.compData)==null?void 0:Vt.find(xt=>(xt==null?void 0:xt.key)==="tableContents"))==null?void 0:_t.contents)==null||Ft.forEach(xt=>{var Ht,Yt,Ot;(xt==null?void 0:xt.length)>1?(xt==null?void 0:xt[1])===(Y==null?void 0:Y.title)&&at.push((Ht=xt==null?void 0:xt[0])==null?void 0:Ht.id):((Yt=xt==null?void 0:xt[0])==null?void 0:Yt[Ye])===(Y==null?void 0:Y.title)&&at.push((Ot=xt==null?void 0:xt[0])==null?void 0:Ot.id)}))})),(at==null?void 0:at.length)>0&&await v.batchDeleteInsofDataApi({ids:at}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((Ne=(Ce=(ze=Y==null?void 0:Y.path)==null?void 0:ze.split("/"))==null?void 0:Ce.filter((Le,Ye)=>{var Oe,ft;return Ye!==((ft=(Oe=Y==null?void 0:Y.path)==null?void 0:Oe.split("/"))==null?void 0:ft.length)-1}))==null?void 0:Ne.join("/")),u.setActiveTopMenuPath((he=(ut=Y==null?void 0:Y.path)==null?void 0:ut.split("/"))==null?void 0:he[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},Q=async(ve,F)=>{var ot,h,C,I,W,w,S,q,z,ue,H,P,Se,ne,G,ae,ce,be,_e,Te,U,Ve,me,je,it,Ge,rt,Pe,Qe,Ue,ze;let Y=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),pe=(h=(ot=Y==null?void 0:Y.data)==null?void 0:ot.result)==null?void 0:h[0],de=(C=pe==null?void 0:pe.value)==null?void 0:C.pageData;de.compData=(I=de.compData)==null?void 0:I.map(Ce=>{var Ne,ut;return(Ce==null?void 0:Ce.key)==="menuContents"&&(Ce.contents=go(Ce.contents,(Ne=F==null?void 0:F.path)==null?void 0:Ne.split("/"),F==null?void 0:F.title,(ut=ve==null?void 0:ve.target)==null?void 0:ut.value)),Ce}),pe!=null&&pe.id&&await v.updateInsofDataApi({id:pe==null?void 0:pe.id,value:{pageData:de}});let Z=(w=(W=F==null?void 0:F.path)==null?void 0:W.split("/"))==null?void 0:w.filter((Ce,Ne)=>{var ut,he;return Ne!==((he=(ut=F==null?void 0:F.path)==null?void 0:ut.split("/"))==null?void 0:he.length)-1}),oe=Z==null?void 0:Z.join("/");Z.push((S=ve==null?void 0:ve.target)==null?void 0:S.value),Z=Z==null?void 0:Z.join("/");let te=await Ee.getItemData(oe,sessionStorage.getItem("systemKey"),"");if(((P=(H=(ue=(z=(q=te==null?void 0:te[0])==null?void 0:q.compData)==null?void 0:z.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:ue.contents)==null?void 0:H[0])==null?void 0:P.directiveLabel)==="#isMain"){let Ce=(ce=(ae=(G=(ne=(Se=te==null?void 0:te[0])==null?void 0:Se.compData)==null?void 0:ne.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:G.contents)==null?void 0:ae[0])==null?void 0:ce.prop,Ne=(Te=(_e=(be=te==null?void 0:te[0])==null?void 0:be.compData)==null?void 0:_e.find(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"))==null?void 0:Te.contents,ut=(je=(me=(Ve=(U=te==null?void 0:te[0])==null?void 0:U.compData)==null?void 0:Ve.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:me.contents)==null?void 0:je.map(Ie=>Ie==null?void 0:Ie.prop),he;if(Ne==null||Ne.forEach(Ie=>{var Ke;let Be=Ee.getValueToObjectValue(Ie,ut);(Be==null?void 0:Be[Ce])===F.title&&(he=Be,he[Ce]=(Ke=ve==null?void 0:ve.target)==null?void 0:Ke.value)}),he){let Ie={};for(let Ke in he)Ke!=="id"&&(Ie[Ke]=he==null?void 0:he[Ke]);let Be=[{id:he==null?void 0:he.id,value:{tableData:Ie}}];await v.batchUpdateInsofDataApi({dataList:Be})}}let ie=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:F==null?void 0:F.path}}),Re=(Ge=(it=ie==null?void 0:ie.data)==null?void 0:it.result)==null?void 0:Ge.map(Ce=>({id:Ce==null?void 0:Ce.id,key:Ce==null?void 0:Ce.key}));Re=Re==null?void 0:Re.map(Ce=>(Ce.key.pageKey=Z,Ce)),(Re==null?void 0:Re.length)>0&&await v.batchUpdateInsofDataApi({dataList:Re}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((Qe=(Pe=(rt=F==null?void 0:F.path)==null?void 0:rt.split("/"))==null?void 0:Pe.filter((Ce,Ne)=>{var ut,he;return Ne!==((he=(ut=F==null?void 0:F.path)==null?void 0:ut.split("/"))==null?void 0:he.length)-1}))==null?void 0:Qe.join("/")),u.setActiveTopMenuPath((ze=(Ue=F==null?void 0:F.path)==null?void 0:Ue.split("/"))==null?void 0:ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),V.value=void 0},L=async(ve,F)=>{st.type=se(F==null?void 0:F.operateType),await nt(F,st.type,ve),ee.value=ve,fe.value=F},ye=()=>{st.show=!1},xe=ve=>ve==null?void 0:ve.filter(F=>F.allowInherit),$e=()=>{var Y,pe,de,Z,oe;let ve;st.type==="create"&&(ve=((Y=ee.value)==null?void 0:Y.path)+"/"+A.value[(pe=A.value)==null?void 0:pe.prop]),st.type==="update"&&(ve=(de=ee.value)==null?void 0:de.path);const F={...ee.value,config:xe((Z=ee.value)==null?void 0:Z.config),children:[],childMenus:[],title:A.value[(oe=A.value)==null?void 0:oe.prop],path:ve};console.log("clickSubmitForm",fe.value,ee.value,F),Ze(F),st.show=!1},Fe=ve=>{var Y,pe;const F=(Y=ve==null?void 0:ve.contents)==null?void 0:Y.find(de=>de.key==="formContent");F&&(A.value=(pe=F==null?void 0:F.contents)==null?void 0:pe.reduce((de,Z)=>(de[Z.key]=Z.value,de.prop=Z.key,de),{}))},tt=e.ref(!1);return{isCollapse:tt,handleMenuCollapse:()=>{tt.value=!tt.value},handleCompChange:Fe,dialogForm:He,dialogRenderComps:De,getComponents:Me,clickSubmitForm:$e,dialogInfo:st,beforeDialogDestroy:ye,clickMenuIcon:L,mode:X,renderMenuList:le,clickMenu:D,openMenu:$,closeMenu:y,changeMenuStyle:B,fixElement:V,onBlur:Q}}}}e.defineComponent(Ir());const Aa=v.useLoginState(),{loginUserInfo:Vn}=v.storeToRefs(Aa),Lt=$t.useModelComp(v.pinia),Rn=e.ref(!1),{itemData:Hu,itemGridData:en,curStructureCompIds:Ro,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:Po,routeToChildPath:Xu,payloadTypes:mo,pageMapState:Un,itemExtendData:On}=v.storeToRefs(Lt),jt=$t.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:ht,platform:jp,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(jt),ha=Ee.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Gt}=v.storeToRefs(ha),ed=Ee.useOriginalState(v.pinia),{originalPath:to}=v.storeToRefs(ed),Jt=e.ref(),$o=$t.useAuthorityState(v.pinia),Wn=e.ref(!0),pn=e.ref(0),Hn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=ht.value)!=null&&i.startsWith("/")?(s=ht.value)==null?void 0:s.substring(1):ht.value;return(n==null?void 0:n.includes(to.value))||await ud(n)}),td=()=>{Lt.setItemGridData([]),Lt.setIsEdit("edit"),Lt.setSubmitCurStructure(ht.value!=="/平台管理/菜单管理")},ad=()=>{Lt.setIsEdit("view"),Lt.setRefreshCurStructure(!0)},nd=async n=>{var b,g,f;let i=Qu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(b=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:b.map(x=>x==null?void 0:x.value),d=r==null?void 0:r[0],u=(f=(g=i==null?void 0:i.filter((x,_)=>!(x!=null&&x.condition)&&_<=s))==null?void 0:g.map(x=>x.value))==null?void 0:f.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)!=="child"),ha.setSelectTitle(i),ha.setChooseTitle([])),jt.setActiveMenuPath(d)},lo=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},b=v.batchDeleteInsofDataApi);const g=await b(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},Ko=async(n,i,s,r)=>{var d,u,b,g,f,x,_,V,R,J,O;try{const ke=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),X=(g=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),le=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let D;s?D=(V=(_=(x=Un.value)==null?void 0:x[ht.value])==null?void 0:_.filter(y=>{var B,E,ge;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i&&((ge=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:ge.target)===r}))==null?void 0:V.map(y=>y==null?void 0:y.id):D=(O=(J=(R=Un.value)==null?void 0:R[ht.value])==null?void 0:J.filter(y=>{var B;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i}))==null?void 0:O.map(y=>y==null?void 0:y.id);const $=D==null?void 0:D.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(ke==null?void 0:ke.length)>0&&await v.batchAddInsofDataApi({dataList:ke}),(X==null?void 0:X.length)>0&&await v.batchUpdateInsofDataApi({dataList:X}),($==null?void 0:$.length)>0&&await v.batchDeleteInsofDataApi({ids:$})}catch(ke){throw new Error(ke)}},od=async n=>{var x,_,V,R,J,O,ke,X,K,le;jt.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return jt.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),r=s.filter(D=>{var $;return!(($=Ro.value)!=null&&$.includes(D))}),d=(x=Ro.value)==null?void 0:x.filter(D=>!s.includes(D)),u=[...r,...d].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),g=i==null?void 0:i.filter(D=>D.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(lo(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(lo(b,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(lo(g,"update",n)),en.value&&((_=en.value)!=null&&_.isDelete&&((R=(V=en.value)==null?void 0:V.results)==null?void 0:R.length)>0&&((O=(J=en.value)==null?void 0:J.results)!=null&&O.every(D=>typeof D=="number"))?await v.batchDeleteInsofDataApi({ids:(ke=en.value)==null?void 0:ke.results}):(console.log("itemGridData.value",en.value),f.push(await Ko(en.value,"gridLayout")))),On.value)for(const D in On.value)f.push(await Ko((X=On.value)==null?void 0:X[D],"extend",{target:D,compId:(le=(K=On.value)==null?void 0:K[D])==null?void 0:le.compId},D));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),Lt.setRefreshCurStructure(!0)}).catch(D=>{v.ElMessage.success(D)}),jt.setContentLoading(!1)},qn=n=>on(n),vt=e.ref([]),rd=e.computed(()=>{var n;return(n=vt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=vt.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),ld=async n=>{var r,d,u,b,g,f;let i=v.cloneDeep(ht).value;i=i+to.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const x=(g=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:g.map(V=>V==null?void 0:V.id),_=await v.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await Aa.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),Lt.setTableLoading(!1)}},jo=async n=>{var i,s;try{let r=v.cloneDeep(ht).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+to.value+((g=Object.values(b==null?void 0:b.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var g;return((g=b==null?void 0:b.data)==null?void 0:g.code)===200}))){const b=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var x;return(x=f==null?void 0:f.data)==null?void 0:x.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:b});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await Aa.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{Lt.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:ht.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),wn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,b,g,f,x,_,V,R,J,O,ke,X,K,le,D,$,y,B,E,ge,Je,st,Me,He,De,A,ee,se,fe,Ze,nt,Q,L,ye,xe,$e,Fe,tt,Xe,ve,F,Y,pe,de,Z,oe,te,ie,Re,ot,h,C,I,W,w,S,q,z,ue,H,P,Se,ne,G,ae,ce,be,_e,Te,U,Ve,me,je,it,Ge,rt,Pe;wn.value=null;let r=ht.value;if((d=Jt.value)!=null&&d.compData&&((u=Jt.value)==null?void 0:u.compData)!==ht.value&&(r=r+"/"+((g=(b=Gt.value)==null?void 0:b[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await jo(n):await Ee.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),await Aa.setLogRecordAsync({type:"删除",data:n},ht.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((_=n==null?void 0:n.selectItems)!=null&&_.every(Qe=>typeof(Qe==null?void 0:Qe.id)=="string")){const Qe=(V=n==null?void 0:n.selectItems)==null?void 0:V.map(Ue=>({content:n==null?void 0:n.content,singleContent:Ue,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await jo(Qe)}else{const Qe=(R=n==null?void 0:n.selectItems)==null?void 0:R.map(Ue=>Ue==null?void 0:Ue.id);await v.batchDeleteInsofDataApi({ids:Qe}),await Aa.setLogRecordAsync({type:"删除",data:Qe},ht.value)}else if((n==null?void 0:n.buttonName)==="OCR批量新增"){if(Array.isArray(n==null?void 0:n.ocrRows)&&((J=n==null?void 0:n.ocrRows)==null?void 0:J.length)>0){Lt.setTableLoading(n==null?void 0:n.index);const Qe=sessionStorage.getItem("systemKey"),Ue=[],ze=[];let Ce=r,Ne=n==null?void 0:n.index;if(n!=null&&n.parentTableId&&(n==null?void 0:n.parentTableId)!==0){const ut=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId}),he=(ke=(O=ut==null?void 0:ut.data)==null?void 0:O.result)==null?void 0:ke[0];(X=he==null?void 0:he.key)!=null&&X.pageKey&&(Ce=he.key.pageKey),Ne=n==null?void 0:n.parentTableId}for(const ut of n.ocrRows){const he={};for(const Be in ut)Be!=="id"&&Be!=="index"&&!(typeof Be=="string"&&Be.startsWith("_"))&&(he[Be]=ut[Be]);const Ie=await Ee.addTableContents(i,Ce,Ne,Qe,Object.values(he),n==null?void 0:n.column,{...n,singleContent:ut,parentTableId:n==null?void 0:n.parentTableId},{param:s});Ue.push({resId:Ie,compId:n==null?void 0:n.index,data:ut}),ze.push(Ie)}wn.value=Ue;try{sessionStorage.setItem("ocr_last_saved_ids",JSON.stringify(ze)),sessionStorage.setItem("ocr_last_saved_table",JSON.stringify({pageKey:Ce,tableId:Ne,parentTableId:n==null?void 0:n.parentTableId}))}catch{}v.ElMessage.success(`成功保存 ${n.ocrRows.length} 条OCR识别数据`),await Aa.setLogRecordAsync({type:"新增",data:n==null?void 0:n.ocrRows},ht.value)}Lt.setCacheUpdatingData(null),Lt.setTableLoading(!1),Lt.setRefreshCurStructure(!0);return}else if((n==null?void 0:n.buttonName)==="新增"){let Qe={};for(let ze in n==null?void 0:n.singleContent)ze!=="id"&&ze!=="index"&&(Qe[ze]=n==null?void 0:n.singleContent[ze]);const Ue=await Ee.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(Qe),n==null?void 0:n.column,n,{param:s});if(wn.value={resId:Ue,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((le=(K=n==null?void 0:n.column)==null?void 0:K[0])==null?void 0:le.directiveLabel)==="#isMain"&&(($=(D=n==null?void 0:n.column)==null?void 0:D[0])==null?void 0:$.directiveColor)!==!0){let ze=(E=n==null?void 0:n.singleContent)==null?void 0:E[(B=(y=n==null?void 0:n.column)==null?void 0:y[0])==null?void 0:B.prop],Ce=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ne=ht.value+"/"+(ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-3)),ut=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Ne}}),he=(Je=(ge=Ce==null?void 0:Ce.data)==null?void 0:ge.result)==null?void 0:Je[0],Ie=(st=he==null?void 0:he.value)==null?void 0:st.pageData;if(Ie.compData=(Me=Ie.compData)==null?void 0:Me.map(Be=>((Be==null?void 0:Be.key)==="menuContents"&&(Be.contents=eo(Be.contents,Ne==null?void 0:Ne.split("/"),ze)),Be)),await v.updateInsofDataApi({id:he==null?void 0:he.id,value:{pageData:Ie}}),((De=(He=ut==null?void 0:ut.data)==null?void 0:He.result)==null?void 0:De.length)>0)await Ee.newLoadingConstruct(Ne,ht.value+"/"+ze);else{let Be=await v.getInsofDataApi({key:{pageKey:ht.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((ee=(A=Be==null?void 0:Be.data)==null?void 0:A.result)==null?void 0:ee.length)>=1?await Ee.newLoadingCutFirstConstruct(ht.value+"/",ht.value+"/"+ze):await Ee.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+ze)}jt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),jt.setIsRefreshMenus(!1),jt.setIsRefreshMenus(!0),jt.setActiveMenuPath((fe=(se=Ne==null?void 0:Ne.split("/"))==null?void 0:se.filter((Be,Ke)=>{var M;return Ke!==((M=Ne==null?void 0:Ne.split("/"))==null?void 0:M.length)-1}))==null?void 0:fe.join("/"))}Lt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((nt=(Ze=n==null?void 0:n.column)==null?void 0:Ze[0])==null?void 0:nt.directiveLabel)==="#isMain"&&((L=(Q=n==null?void 0:n.column)==null?void 0:Q[0])==null?void 0:L.directiveColor)!==!0){let Qe=($e=n==null?void 0:n.singleContent)==null?void 0:$e[(xe=(ye=n==null?void 0:n.column)==null?void 0:ye[0])==null?void 0:xe.prop];if(St.isNumber((Fe=n==null?void 0:n.singleContent)==null?void 0:Fe.id)){let Ue=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ze=await v.getInsofDataApi({id:(tt=n==null?void 0:n.singleContent)==null?void 0:tt.id}),Ce=(Z=(Y=(F=(ve=(Xe=ze==null?void 0:ze.data)==null?void 0:Xe.result)==null?void 0:ve[0])==null?void 0:F.value)==null?void 0:Y.tableData)==null?void 0:Z[(de=(pe=n==null?void 0:n.column)==null?void 0:pe[0])==null?void 0:de.prop],Ne=ht.value+"/"+Ce,ut=(te=(oe=Ue==null?void 0:Ue.data)==null?void 0:oe.result)==null?void 0:te[0],he=(ie=ut==null?void 0:ut.value)==null?void 0:ie.pageData;he.compData=(Re=he.compData)==null?void 0:Re.map(Ie=>((Ie==null?void 0:Ie.key)==="menuContents"&&(Ie.contents=go(Ie.contents,Ne==null?void 0:Ne.split("/"),Ce,Qe)),Ie)),await v.updateInsofDataApi({id:ut==null?void 0:ut.id,value:{pageData:he}}),jt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),jt.setIsRefreshMenus(!1),jt.setIsRefreshMenus(!0),jt.setActiveMenuPath((h=(ot=Ne==null?void 0:Ne.split("/"))==null?void 0:ot.filter((Ie,Be)=>{var Ke;return Be!==((Ke=Ne==null?void 0:Ne.split("/"))==null?void 0:Ke.length)-1}))==null?void 0:h.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let Qe=[],Ue=[],ze=((I=(C=n==null?void 0:n.content)==null?void 0:C[0])==null?void 0:I.id)??"",Ce=s==null?void 0:s.url,Ne="",ut="";if((n==null?void 0:n.parentTableId)!==void 0&&(n==null?void 0:n.parentTableId)!==null&&(n==null?void 0:n.parentTableId)!==0){const he=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId});Ne=((q=(S=(w=(W=he==null?void 0:he.data)==null?void 0:W.result)==null?void 0:w[0])==null?void 0:S.key)==null?void 0:q.tableId)??(n==null?void 0:n.parentTableId),ut=((P=(H=(ue=(z=he==null?void 0:he.data)==null?void 0:z.result)==null?void 0:ue[0])==null?void 0:H.key)==null?void 0:P.pageKey)??""}else if(ze!==""&&((Se=n==null?void 0:n.content)==null?void 0:Se.length)>1&&typeof((G=(ne=n==null?void 0:n.content)==null?void 0:ne[0])==null?void 0:G.id)!="string"){const he=await v.getInsofDataApi({id:ze});Ne=((_e=(be=(ce=(ae=he==null?void 0:he.data)==null?void 0:ae.result)==null?void 0:ce[0])==null?void 0:be.key)==null?void 0:_e.tableId)??"",ut=((me=(Ve=(U=(Te=he==null?void 0:he.data)==null?void 0:Te.result)==null?void 0:U[0])==null?void 0:Ve.key)==null?void 0:me.pageKey)??""}(je=n==null?void 0:n.singleContent)==null||je.forEach(he=>{let Ie={};for(let Be in he)Be!=="id"&&Be!=="index"&&(Ie[Be]=he[Be]);typeof(he==null?void 0:he.id)=="number"?Qe.push({id:he==null?void 0:he.id,value:{tableData:Ie}}):Ue.push({key:{type:i,pageKey:Ce||ut||ht.value,tableId:Ne||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ie}})}),(Ue==null?void 0:Ue.length)>0&&await v.batchAddInsofDataApi({dataList:Ue}),(Qe==null?void 0:Qe.length)>0&&await v.batchUpdateInsofDataApi({dataList:Qe})}else{let Qe={},Ue=(it=n==null?void 0:n.singleContent)==null?void 0:it.id;for(let ze in n==null?void 0:n.singleContent)ze!=="id"&&ze!=="index"&&(Qe[ze]=n==null?void 0:n.singleContent[ze]);await Ee.fixTableContents(i,r,n==null?void 0:n.index,Ue,sessionStorage.getItem("systemKey"),Object.values(Qe),n==null?void 0:n.column,n)}Lt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);Lt.setTableLoading(!1),(Ge=n==null?void 0:n.column)!=null&&Ge.some(Qe=>Qe==null?void 0:Qe.isMainKey),vt.value=await Ee.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),vt.value=(rt=vt.value)==null?void 0:rt.filter(Qe=>{var Ue;return((Ue=Qe==null?void 0:Qe.compData)==null?void 0:Ue.length)>0}),vt.value=(Pe=vt.value)==null?void 0:Pe.filter(Qe=>(Qe==null?void 0:Qe.comp)!==""),vt.value=Ee.getDeepDiffItems(vt.value),bo.value&&(n==null?void 0:n.buttonName)!=="删除"&&Lt.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,b;if(Rn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await sd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Ee.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(jt.setActiveMenuPath(null),jt.setActiveMenuPath(i))},Yn=async n=>{vt.value=Ee.getDeepDiffItems(n),Lt.setItemData(vt.value),Lt.setOriginalData(vt.value)},cd=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},ud=async n=>{var u,b,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((V,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-2>R&&(i=i===""?i+V:i+"/"+V)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((V,R)=>{var J;((J=n==null?void 0:n.split("/"))==null?void 0:J.length)-1>R&&(s=s===""?s+V:s+"/"+V)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((_=(x=d==null?void 0:d.data)==null?void 0:x.result)==null?void 0:_.length)>0},dd=e.ref(),Ba=e.ref(null),pd=n=>{var x,_,V,R,J,O,ke,X,K,le,D,$,y,B,E,ge,Je,st,Me,He;const i=(_=(x=Un.value)==null?void 0:x[n])==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 Ba.value=null;dd.value=i;const s=(R=(V=i==null?void 0:i.find(De=>{var A,ee,se;return(se=(ee=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:V.value)==null?void 0:R.tableData;if(!s)return Ba.value=null;const r=(ke=(O=(J=i==null?void 0:i.find(De=>{var A,ee,se;return(se=(ee=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:J.key)==null?void 0:O.relatedInfo)==null?void 0:ke.compId,d=(X=vt.value)==null?void 0:X.find(De=>(De==null?void 0:De.id)===r);if(!d)return Ba.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],b=(y=($=(D=d==null?void 0:d.compData)==null?void 0:D.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(De=>(De==null?void 0:De.prop)===u),g=(Je=(ge=(E=(B=d==null?void 0:d.compData)==null?void 0:B.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:E.contents)==null?void 0:ge.find(De=>De==null?void 0:De.isMainKey))==null?void 0:Je.prop,f=(He=(Me=(st=d==null?void 0:d.compData)==null?void 0:st.find(De=>(De==null?void 0:De.key)==="tableContents"))==null?void 0:Me.contents)==null?void 0:He[b];Ba.value={prop:u,value:f,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:g},console.log("getPageExtendData:",s,i)},fd=()=>{var n,i;console.log("倒计时结束时"),$t.ElMessageBox.alert(`超时未提交,【${(i=(n=ht.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=ht.value)!=null&&n.includes(to.value)))return;const d=(i=vt.value)==null?void 0:i.find(f=>{var x;return((x=f==null?void 0:f.comp)==null?void 0:x.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},b=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=b==null?void 0:b.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Lt.setLockingPage(ht.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},yo=e.ref([]),vd=e.computed(()=>{var n,i;return(i=(n=Un.value)==null?void 0:n[ht.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{ha.setSelectTitle([]),ha.setChooseTitle([])},{deep:!0});e.watch(()=>[Gt.value],async()=>{var r,d,u,b,g,f,x,_,V,R,J,O,ke,X,K,le,D,$,y,B,E,ge,Je,st,Me,He,De,A,ee,se,fe,Ze,nt,Q,L,ye,xe,$e,Fe,tt,Xe,ve,F,Y;if(((r=Jt.value)==null?void 0:r.compData)===ht.value||((d=Gt.value)==null?void 0:d.length)===0)return;jt.setContentLoading(!0);let n=new WeakMap;if((b=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:u.filter(pe=>{var de,Z;return((de=pe==null?void 0:pe.key)==null?void 0:de.pageKey)!=="menu"&&((Z=pe==null?void 0:pe.key)==null?void 0:Z.pageKey)!=="secret"}))==null||b.forEach(pe=>{n[pe.key.pageKey]?n[pe.key.pageKey]=[...n[pe.key.pageKey],pe]:n[pe.key.pageKey]=[pe]}),vt.value=await Ee.getItemData(ht.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=vt.value)!=null&&g.find(pe=>(pe==null?void 0:pe.comp)==="")),Jt.value=(f=vt.value)==null?void 0:f.find(pe=>(pe==null?void 0:pe.comp)===""),((x=Jt.value)==null?void 0:x.compData)===ht.value){let pe=(_=ht.value)==null?void 0:_.split("/").map(de=>({value:de.trim()}));pe=[...pe,...Gt.value??[]]}else{let pe=(R=(V=Jt.value)==null?void 0:V.compData)==null?void 0:R.split("/").map(de=>({value:de.trim(),condition:"parent"}));if(!(!pe||(pe==null?void 0:pe.length)===0)){let de=await Ee.getItemData((J=Jt.value)==null?void 0:J.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);de=de==null?void 0:de.filter(ie=>{var Re,ot,h;return Array.isArray(ie==null?void 0:ie.compData)&&((h=(ot=(Re=ie==null?void 0:ie.compData)==null?void 0:Re.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:ot.contents)==null?void 0:h.find(C=>(C==null?void 0:C.directiveLabel)==="#isMain"))});let Z=(le=(K=(X=(ke=(O=de==null?void 0:de[0])==null?void 0:O.compData)==null?void 0:ke.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:X.contents)==null?void 0:K.find(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"))==null?void 0:le.prop,oe=(B=(y=($=(D=de==null?void 0:de[0])==null?void 0:D.compData)==null?void 0:$.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:y.contents)==null?void 0:B.findIndex(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain"),te=(st=(Je=(ge=(E=de==null?void 0:de[0])==null?void 0:E.compData)==null?void 0:ge.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:Je.contents)==null?void 0:st.map(ie=>{var Re;return(ie==null?void 0:ie.length)>1?ie==null?void 0:ie[oe+1]:(Re=ie==null?void 0:ie[0])==null?void 0:Re[Z]});if(te=te==null?void 0:te.map(ie=>({label:ie,value:ie})),(Me=Gt.value)==null||Me.length,((De=(He=Gt.value)==null?void 0:He[0])==null?void 0:De.value)!==""){let ie=await Ee.getItemData(ht.value+"/"+((ee=(A=Gt.value)==null?void 0:A[0])==null?void 0:ee.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value);ie||(await Ee.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+((fe=(se=Gt.value)==null?void 0:se[0])==null?void 0:fe.value)),ie=await Ee.getItemData(ht.value+"/"+((nt=(Ze=Gt.value)==null?void 0:Ze[0])==null?void 0:nt.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),vt.value=ie}}(pe==null?void 0:pe.length)>0&&((L=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:L.value)===""&&(vt.value=[])}vt.value=(ye=vt.value)==null?void 0:ye.filter(pe=>(pe==null?void 0:pe.comp)!=="");let s="";if(!vt.value){let pe=(Fe=($e=(xe=ht.value)==null?void 0:xe.split("/"))==null?void 0:$e.filter((de,Z)=>{var oe,te;return Z!==((te=(oe=ht.value)==null?void 0:oe.split("/"))==null?void 0:te.length)-1}))==null?void 0:Fe.join("/");vt.value=await Ee.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(F=(tt=ht.value)==null?void 0:tt.split("/"))==null?void 0:F[((ve=(Xe=ht.value)==null?void 0:Xe.split("/"))==null?void 0:ve.length)-1]}await Aa.setLogRecordAsync({type:"查询",data:vt.value},ht.value),s!==""&&(vt.value=(Y=vt.value)==null?void 0:Y.map(pe=>{var de;return pe!=null&&pe.isShow&&(pe.compData=(de=pe==null?void 0:pe.compData)==null?void 0:de.map(Z=>{var oe,te,ie,Re,ot;if((Z==null?void 0:Z.key)==="tableContents"){let h=[],C="";C=(Re=(ie=(te=(oe=pe==null?void 0:pe.compData)==null?void 0:oe.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:te.contents)==null?void 0:ie[0])==null?void 0:Re.prop,h=(ot=Z.contents)==null?void 0:ot.filter(I=>(I==null?void 0:I[C])===s||(I==null?void 0:I[1])===s),Z.contents=h}return Z})),pe})),vt.value=Ee.getDeepDiffItems(vt.value),jt.setContentLoading(!1)},{deep:!0});const hd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(b=>{var g,f,x;if((b==null?void 0:b.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(b==null?void 0:b.childMenus)&&((g=b==null?void 0:b.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(b==null?void 0:b.childMenus,_):s=(x=(f=b==null?void 0:b.childMenus)==null?void 0:f[0])==null?void 0:x.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[ht.value,Gu.value],async n=>{var u,b,g,f,x,_,V,R,J,O,ke,X,K,le,D,$,y,B,E,ge,Je,st,Me,He,De,A,ee,se,fe,Ze,nt,Q,L,ye,xe,$e,Fe,tt,Xe,ve,F,Y,pe,de,Z,oe,te,ie,Re,ot;if(!ht.value)return;Lt.setLockingPage(""),vt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Wn.value=!1,Rn.value=!0;const s=(b=n==null?void 0:n[0])!=null&&b.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((x=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:f.filter(h=>{var C,I;return((C=h==null?void 0:h.key)==null?void 0:C.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||x.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Hn.value=r,s){jt.setContentLoading(!0),sessionStorage.setItem("pageKey",ht.value),ha.setSelectTitle([]),vt.value=await Ee.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((_=vt.value)!=null&&_.find(I=>(I==null?void 0:I.comp)==="")),Jt.value=(V=vt.value)==null?void 0:V.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((R=Jt.value)!=null&&R.compData)){let I=hd(Zu.value,(J=ht.value)==null?void 0:J.split("/")),W=await Ee.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);W!=null&&W.find(w=>(w==null?void 0:w.comp)==="")?h=(ke=(O=W==null?void 0:W.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:O.compData)==null?void 0:ke.split("/").map(w=>({value:w.trim(),condition:"parent"})):ha.setChooseTitle([])}if(((X=Jt.value)==null?void 0:X.compData)===ht.value){let I=(K=ht.value)==null?void 0:K.split("/").map(W=>({value:W.trim()}));I=[...I,...Gt.value??[]],ha.setSelectTitle(I)}else{let I=[],W=(D=(le=Jt.value)==null?void 0:le.compData)==null?void 0:D.split("/").map(q=>({value:q.trim(),condition:"parent"}));if(!W||(W==null?void 0:W.length)===0)W=h,(W==null?void 0:W.length)===0&&(Jt.value={compData:ht.value});else{let q=await Ee.getItemData(($=Jt.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);q=q==null?void 0:q.filter(P=>{var Se,ne,G;return Array.isArray(P==null?void 0:P.compData)&&((G=(ne=(Se=P==null?void 0:P.compData)==null?void 0:Se.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:ne.contents)==null?void 0:G.find(ae=>(ae==null?void 0:ae.directiveLabel)==="#isMain"))});let z=(Je=(ge=(E=(B=(y=q==null?void 0:q[0])==null?void 0:y.compData)==null?void 0:B.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:ge.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Je.prop,ue=(De=(He=(Me=(st=q==null?void 0:q[0])==null?void 0:st.compData)==null?void 0:Me.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:He.contents)==null?void 0:De.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),H=(fe=(se=(ee=(A=q==null?void 0:q[0])==null?void 0:A.compData)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:fe.map(P=>{var Se;return(P==null?void 0:P.length)>1?P==null?void 0:P[ue+1]:(Se=P==null?void 0:P[0])==null?void 0:Se[z]});if(H=H==null?void 0:H.map(P=>({label:P,value:P})),((Ze=Gt.value)==null?void 0:Ze.length)===0&&ha.setChooseTitle([{value:"",condition:"child",options:H,parentContent:(nt=Jt.value)==null?void 0:nt.compData}]),((L=(Q=Gt.value)==null?void 0:Q[0])==null?void 0:L.value)!==""){let P=await Ee.getItemData(ht.value+"/"+((xe=(ye=Gt.value)==null?void 0:ye[0])==null?void 0:xe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Ee.newLoadingCutFirstConstruct(ht.value,ht.value+"/"+((Fe=($e=Gt.value)==null?void 0:$e[0])==null?void 0:Fe.value)),P=await Ee.getItemData(ht.value+"/"+((Xe=(tt=Gt.value)==null?void 0:tt[0])==null?void 0:Xe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),vt.value=P}}(W==null?void 0:W.length)>0&&((F=(ve=Gt.value)==null?void 0:ve[0])==null?void 0:F.value)===""&&(vt.value=[]),I=[...I,...W??[]],I=[...I,...Gt.value??[]];let w=(Y=ht.value)==null?void 0:Y.split("/").map(q=>({value:q.trim()})),S=w==null?void 0:w.filter(q=>!(I!=null&&I.find(z=>(z==null?void 0:z.value)===(q==null?void 0:q.value))));I=[...I,...S??[]],ha.setSelectTitle(I)}vt.value=(pe=vt.value)==null?void 0:pe.filter(I=>(I==null?void 0:I.comp)!=="");let C="";if(!vt.value){let I=(Z=(de=s==null?void 0:s.split("/"))==null?void 0:de.filter((W,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:Z.join("/");vt.value=await Ee.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),C=(te=s==null?void 0:s.split("/"))==null?void 0:te[((oe=s==null?void 0:s.split("/"))==null?void 0:oe.length)-1]}await Aa.setLogRecordAsync({type:"查询",data:vt.value},ht.value),C!==""&&(vt.value=(ie=vt.value)==null?void 0:ie.map(I=>{var W;return I!=null&&I.isShow&&(I.compData=(W=I==null?void 0:I.compData)==null?void 0:W.map(w=>{var S,q,z,ue,H;if((w==null?void 0:w.key)==="tableContents"){let P=[],Se="";Se=(ue=(z=(q=(S=I==null?void 0:I.compData)==null?void 0:S.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:q.contents)==null?void 0:z[0])==null?void 0:ue.prop,P=(H=w.contents)==null?void 0:H.filter(ne=>(ne==null?void 0:ne[Se])===C||(ne==null?void 0:ne[1])===C),w.contents=P}return w})),I})),vt.value=Ee.getDeepDiffItems(vt.value),await cd(vt.value),Or(),pd(s),yo.value=(Re=vt.value)==null?void 0:Re.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),Lt.setExtraContents([]),ha.setSelectIndex(""),ha.setSelectMenu(""),Lt.setItemData(vt.value),Lt.setOriginalData(vt.value),Lt.setCurStructureCompIds((ot=vt.value)==null?void 0:ot.map(I=>I==null?void 0:I.id)),Lt.setRefreshCurStructure(!1),jt.setChildMenu(""),jt.setContentLoading(!1),Lt.setTableLoading(!1),Rn.value=!1}else vt.value=[],Rn.value=!1;e.nextTick(()=>{pn.value=pn.value++,Wn.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,b,g,f,x,_,V,R,J,O;if(Po.value){let ke=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:n.filter(y=>{var B,E;return((B=y==null?void 0:y.key)==null?void 0:B.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{ke[y.key.pageKey]?ke[y.key.pageKey]=[...ke[y.key.pageKey],y]:ke[y.key.pageKey]=[y]});let K=ht.value;(s=Jt.value)!=null&&s.compData&&((r=Jt.value)==null?void 0:r.compData)!==ht.value&&(K=K+"/"+((u=(d=Gt.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(b=ht.value)==null?void 0:b[0])!=null&&g.startsWith("/")?(x=(f=ht.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=ht.value)==null?void 0:_[0];let D=await Ee.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),$="";if(!vt.value){let y=(R=(V=le==null?void 0:le.split("/"))==null?void 0:V.filter((B,E)=>{var ge;return E!==((ge=le==null?void 0:le.split("/"))==null?void 0:ge.length)-1}))==null?void 0:R.join("/");D=await Ee.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,ke),$=(O=le==null?void 0:le.split("/"))==null?void 0:O[((J=le==null?void 0:le.split("/"))==null?void 0:J.length)-1]}$!==""&&(D=D==null?void 0:D.map(y=>{var B;return y!=null&&y.isShow&&(y.compData=(B=y==null?void 0:y.compData)==null?void 0:B.map(E=>{var ge,Je,st,Me,He;if((E==null?void 0:E.key)==="tableContents"){let De=[],A="";A=(Me=(st=(Je=(ge=y==null?void 0:y.compData)==null?void 0:ge.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Je.contents)==null?void 0:st[0])==null?void 0:Me.prop,De=(He=E.contents)==null?void 0:He.filter(ee=>(ee==null?void 0:ee[A])===$||(ee==null?void 0:ee[1])===$),E.contents=De}return E})),y})),D=D==null?void 0:D.filter(y=>(y==null?void 0:y.comp)!==""),vt.value=Ee.getDeepDiffItems(D),Lt.setFreshContent(!1),Or()}},{deep:!0});const gd=async()=>{var d,u,b,g,f,x,_,V;jt.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=Vn.value)==null?void 0:d.account)||((u=Vn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=Vn.value)==null?void 0:b.account)||((g=Vn.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(x=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:x.map(R=>R==null?void 0:R.id);const r=(V=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:V.map(R=>R==null?void 0:R.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(R=>R!==null&&R))&&(await v.batchDeleteInsofDataApi({ids:s}),await Aa.setLogRecordAsync({type:"删除",data:s},ht.value)),jt.setActiveMenuPath(Xu.value),vt.value=null,Lt.setRouteToChildPath(""),jt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&jt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Lr=n=>{var i;Ba.value&&(Ba.value={...Ba.value,mainKeyPropValue:n==null?void 0:n[(i=Ba.value)==null?void 0:i.mainKeyProp]})},bd=n=>{Vr.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=vt.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:xd(i,s)}))}),zr=(n,i)=>{var f,x,_,V,R;const s=i?n:n-2,r=(f=vt.value)==null?void 0:f[s],d=(_=(x=r==null?void 0:r.compData)==null?void 0:x.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:_.contents,u=d==null?void 0:d.findIndex(J=>(J==null?void 0:J.isMainKey)&&(J==null?void 0:J.label)!=="操作"),b=u===-1?0:u,g=(R=(V=r==null?void 0:r.compData)==null?void 0:V.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(J=>J==null?void 0:J[b+1]),length:(g==null?void 0:g.length)||0}},xd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=zr(i,!0);un.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,b;const i=n+1;if(i>1&&((d=(r=(s=vt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=zr(i);g?(un.index=i,un.comp=(u=vt.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(b=vt.value)==null?void 0:b[n]},bo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>bo.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(V=>{const{key:R}=V;return R==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(V=>{const{key:R}=V;return R==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=v.cloneDeep(b.value)||[];const _=x.length;let V=0;const R=[];if(x=x.map(J=>{const O=J.span;return O?(J.span=Number(O),V=V+J.span):R.push(J),J}),V<24){const J=Math.floor((24-V)/_);R.forEach(O=>{O.span=J})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var J;const V=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(R,{style:e.normalizeStyle({height:(J=u.value)==null?void 0:J.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(O,ke)=>(e.openBlock(),e.createBlock(V,{span:O==null?void 0:O.span},{default:e.withCtx(()=>{var X;return[e.unref(Wn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(O.comp)),{key:e.unref(pn),compName:O.name,index:(O==null?void 0:O.id)??ke,height:(X=u.value)==null?void 0:X.height,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cd=zt._export_sfc(Dd,[["__scopeId","data-v-ab9a36ed"]]),_d={class:"layout-operate"},Ed={class:"layout-module"},Sd={class:"collapse-title-item"},Td={class:"collapse-title"},Id={class:"icon-content"},Bd=["onClick"],Nd={class:"comp-child"},Ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{ke()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",$(),!0)},x=e.ref([]),_=e.ref([]),V=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),J=e.computed(()=>{const y=R==null?void 0:R.value,B=y==null?void 0:y.find(E=>{const{key:ge}=E;return ge==="baseConfig"});return B==null?void 0:B.contents}),O=e.computed(()=>{const y=R==null?void 0:R.value,B=y==null?void 0:y.find(E=>{const{key:ge}=E;return ge==="children"});return B==null?void 0:B.contents}),ke=()=>{var y;d.value=R.value||{},x.value=(O==null?void 0:O.value)||[],b.value=g(),b.value=(y=b.value)==null?void 0:y.map(B=>{var ge;const{prop:E}=B;return B.value=(ge=J.value)==null?void 0:ge[E],B})};e.watch(()=>{var y;return(y=O==null?void 0:O.value)==null?void 0:y.length},()=>{var y;x.value=(O==null?void 0:O.value)||[],_.value=(y=O.value)==null?void 0:y.map(B=>V(B))},{immediate:!0});const X=(y,B)=>{const E=v.cloneDeep(O==null?void 0:O.value);E[B].span=y.span,x.value=E,r("change",$(),!0)},K=y=>on(y),le=(y,B,E)=>{if(!y)return;const ge=v.cloneDeep(O==null?void 0:O.value);ge[E]&&(ge[E].compData=y,x.value=ge,r("change",$(),!0))},D=y=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let B=v.cloneDeep(O==null?void 0:O.value);B=B==null?void 0:B.filter((E,ge)=>y!==ge),x.value=B,r("change",$(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,B)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[B[1]||(B[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(St.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:B[0]||(B[0]=ge=>f(ge))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:O.value},{title:e.withCtx(({item:ge,index:Je})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(ge.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(st=>D(Je),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:ge,index:Je})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:_.value[Je],key:Je,isEnableWrap:!0,onChange:st=>X(st,Je)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(ge.comp+"Operate")),{itemContents:ge==null?void 0:ge.compData,originalItemContents:ge.compData,onChange:st=>le(st,ge,Je)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vd=zt._export_sfc(Ad,[["__scopeId","data-v-ba05456e"]]),Od=typeof window<"u";var Uo;Od&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function Rr(){}const Md=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(Md)));function Ld(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Wo(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const b=Date.now(),g=b-r;clearTimeout(d),g>=i?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function zd(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const Dn=new Set,$r=new WeakMap;function Fd(){Dn.forEach(n=>{n(...$r.get(n))}),Dn.clear()}function aa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!Dn.has(n)&&(Dn.add(n),Dn.size===1&&Promise.resolve().then(Fd))}const Kr=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function Rd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=Pd(n[s]);return i}function Pd(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function cn(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let b=0,g=d.length;b<g;b++){let f=d[b];f.static||(f=$d(r,f,i,s),r.push(f)),u[n.findIndex(x=>x.i===f.i)]=f,f.moved=!1}return u}function $d(n,i,s,r){if(s)for(;i.y>0&&!Cn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Cn(n,i);)i.y--}let d;for(;d=Cn(n,i);)i.y=d.y+d.h;return i}function Kd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Cn(s,u);)u.y++}return n}function Ho(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Cn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const b=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let x=qr(n);f&&(x=x.reverse());const _=Wr(x,i);if(u&&_.length)return i.x=b,i.y=g,i.moved=!1,n;for(let V=0,R=_.length;V<R;V++){const J=_[V];J.moved||i.y>J.y&&i.y-J.y>J.h/4||(J.static?n=qo(n,J,i,d):n=qo(n,i,J,d))}return n}function qo(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Cn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function jd(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Ud(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).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 qd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let g=0;g<s.length;g++)if(typeof b[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Gd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Go(n){return Xd(n)}function Xd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Xo(n,i,s,r){return Yd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Yd(n){return typeof n=="number"&&!Number.isNaN(n)}function Jd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];i>n[b]&&(r=b)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Zd(n,i,s,r,d,u,b){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),x=f.slice(f.indexOf(r));for(let _=0,V=x.length;_<V;_++){const R=x[_];if(i[R]){g=i[R];break}}return g=uo(g||[]),cn(Kd(g,{cols:u}),b)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let Qd="auto";function ep(){return typeof document<"u"}function Yo(){return ep()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Qd}var kn={exports:{}},tp=kn.exports,Jo;function ap(){return Jo||(Jo=1,function(n,i){(function(s,r){n.exports=r()})(tp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=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},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,ke(l.key),l)}}function g(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=ke(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function x(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&V(a,t)}function _(a){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(a)}function V(a,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},V(a,t)}function R(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function J(a){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,l=_(a);if(t){var c=_(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function O(){return O=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=_(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},O.apply(this,arguments)}function ke(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var X=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,le=void 0;function D(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),le=a}function $(a){return X(a)?a:(a.ownerDocument||a).defaultView||le.window}typeof window<"u"&&window&&D(window);var y=function(a){return!!a&&d(a)==="object"},B=function(a){return typeof a=="function"},E={window:function(a){return a===le||X(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:B,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=$(a)||le;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&B(a.splice)}};function ge(a){var t=a.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 Je(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var st={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=st.draggable,t.map.drag=st,t.methodDict.drag="draggable",l.actions.drag=st.defaults},listeners:{"interactions:before-action-move":ge,"interactions:action-resume":ge,"interactions:action-move":Je,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return E.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):E.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ge,move:Je,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Me=st,He={init:function(a){var t=a;He.document=t.document,He.DocumentFragment=t.DocumentFragment||De,He.SVGElement=t.SVGElement||De,He.SVGSVGElement=t.SVGSVGElement||De,He.SVGElementInstance=t.SVGElementInstance||De,He.Element=t.Element||De,He.HTMLElement=t.HTMLElement||He.Element,He.Event=t.Event,He.Touch=t.Touch||De,He.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=He,ee={init:function(a){var t=A.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&A.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!A.PointerEvent,ee.isIOS=/iP(hone|od|ad)/.test(o.platform),ee.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ee.isIe9=/MSIE 9/.test(o.userAgent),ee.isOperaMobile=o.appName==="Opera"&&ee.supportsTouch&&/Presto/.test(o.userAgent),ee.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ee.pEventTypes=ee.supportsPointerEvent?A.PointerEvent===a.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,ee.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},se=ee;function fe(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ze(a,t){for(;E.element(a);){if(Q(a,t))return a;a=nt(a)}return null}function nt(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function Q(a,t){return le!==K&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var L=function(a){return a.parentNode||a.host};function ye(a,t){for(var o,l=[],c=a;(o=L(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function xe(a,t,o){for(;E.element(a);){if(Q(a,t))return!0;if((a=nt(a))===o)return Q(a,t)}return!1}function $e(a){return a.correspondingUseElement||a}function Fe(a){var t=a instanceof A.SVGElement?a.getBoundingClientRect():a.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 tt(a){var t,o=Fe(a);if(!se.isIOS7&&o){var l={x:(t=(t=$(a))||le).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function Xe(a){for(var t=[];a;)t.push(a),a=nt(a);return t}function ve(a){return!!E.string(a)&&(A.document.querySelector(a),!0)}function F(a,t){for(var o in t)a[o]=t[o];return a}function Y(a,t,o){return a==="parent"?nt(o):a==="self"?t.getRect(o):Ze(o,a)}function pe(a,t,o,l){var c=a;return E.string(c)?c=Y(c,t,o):E.func(c)&&(c=c.apply(void 0,l)),E.element(c)&&(c=tt(c)),c}function de(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function Z(a){return!a||"x"in a&&"y"in a||((a=F({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function oe(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function te(a,t,o){var l=o&&a.options[o];return de(pe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function ie(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Re(a)),E.array(a))return a.forEach(function(T){return ie(T,t,o,l)}),l;if(E.object(a)&&(t=a,a=""),E.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(E.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];ie(a,m,o,l)}else if(E.object(t))for(var k in t)ie(Re(k).map(function(T){return"".concat(a).concat(T)}),t[k],o,l);return l}function Re(a){return a.trim().split(/ +/)}var ot=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function W(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function w(a){return a instanceof A.Event||a instanceof A.Touch}function S(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function q(a,t){return t=t||{x:0,y:0},se.isOperaMobile&&w(a)?(S("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):S("page",a,t),t}function z(a){return E.number(a.pointerId)?a.pointerId:a.identifier}function ue(a,t,o){var l=t.length>1?P(t):t[0];q(l,a.page),function(c,p){p=p||{},se.isOperaMobile&&w(c)?S("screen",c,p):S("client",c,p)}(l,a.client),a.timeStamp=o}function H(a){var t=[];return E.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Se(a){if(!a.length)return null;var t=H(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function ne(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return ot(p,m)}function G(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ae(a){return E.string(a.pointerType)?a.pointerType:E.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof A.Touch?"touch":"mouse"}function ce(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[$e(t?t[0]:a.target),$e(a.currentTarget)]}var be=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(be.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var _e=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},Te=function(a){return _e([],a)},U=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ve=function(a,t){return a[U(a,t)]},me=function(a){x(o,a);var t=J(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=p==="dragleave"?l.prev:l.cur,T=k.element,j=k.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=j,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=U(p,function(T){var j=T.dropzone,N=T.element;return j===l.dropzone&&N===l.target});c.activeDrops.splice(m,1);var k=new o(c,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(be);function je(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function it(a,t){for(var o=function(p,m){for(var k=[],T=0,j=p.interactables.list;T<j.length;T++){var N=j[T];if(N.options.drop.enabled){var re=N.options.drop.accept;if(!(E.element(re)&&re!==m||E.string(re)&&!Q(m,re)||E.func(re)&&!re({dropzone:N,draggableElement:m})))for(var we=0,qe=N.getAllElements();we<qe.length;we++){var We=qe[we];We!==m&&k.push({dropzone:N,element:We,rect:N.getRect(We)})}}}return k}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function Ge(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],k=0,T=l.activeDrops;k<T.length;k++){var j=T[k],N=j.dropzone,re=j.element,we=j.rect,qe=N.dropCheck(t,o,c,p,re,we);m.push(qe?re:null)}var We=function(et){for(var dt,lt,mt,Dt=[],It=0;It<et.length;It++){var kt=et[It],Ct=et[dt];if(kt&&It!==dt)if(Ct){var ta=L(kt),Kt=L(Ct);if(ta!==kt.ownerDocument)if(Kt!==kt.ownerDocument)if(ta!==Kt){Dt=Dt.length?Dt:ye(Ct);var da=void 0;if(Ct instanceof A.HTMLElement&&kt instanceof A.SVGElement&&!(kt instanceof A.SVGSVGElement)){if(kt===Kt)continue;da=kt.ownerSVGElement}else da=kt;for(var ya=ye(da,Ct.ownerDocument),Sa=0;ya[Sa]&&ya[Sa]===Dt[Sa];)Sa++;var An=[ya[Sa-1],ya[Sa],Dt[Sa]];if(An[0])for(var mn=An[0].lastChild;mn;){if(mn===An[1]){dt=It,Dt=ya;break}if(mn===An[2])break;mn=mn.previousSibling}}else mt=Ct,(parseInt($(lt=kt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt($(mt).getComputedStyle(mt).zIndex,10)||0)&&(dt=It);else dt=It}else dt=It}return dt}(m);return l.activeDrops[We]||null}function rt(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new me(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new me(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new me(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new me(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new me(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new me(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Pe(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&je(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function Qe(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=it(t,o.element));var m=l,k=Ge(o,m,c);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=rt(o,0,m)}}var Ue={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(Me),l.prototype.dropzone=function(p){return function(m,k){if(E.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var T=ie(k.listeners),j=Object.keys(T).reduce(function(re,we){return re[/^(enter|leave)/.test(we)?"drag".concat(we):/^(activate|deactivate|move)/.test(we)?"drop".concat(we):we]=T[we],re},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(j),m.options.drop.listeners=j}return E.func(k.ondrop)&&m.on("drop",k.ondrop),E.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),E.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),E.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),E.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),E.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:E.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return E.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,k,T,j,N){return function(re,we,qe,We,et,dt,lt){var mt=!1;if(!(lt=lt||re.getRect(dt)))return!!re.options.drop.checker&&re.options.drop.checker(we,qe,mt,re,dt,We,et);var Dt=re.options.drop.overlap;if(Dt==="pointer"){var It=te(We,et,"drag"),kt=q(we);kt.x+=It.x,kt.y+=It.y;var Ct=kt.x>lt.left&&kt.x<lt.right,ta=kt.y>lt.top&&kt.y<lt.bottom;mt=Ct&&ta}var Kt=We.getRect(et);if(Kt&&Dt==="center"){var da=Kt.left+Kt.width/2,ya=Kt.top+Kt.height/2;mt=da>=lt.left&&da<=lt.right&&ya>=lt.top&&ya<=lt.bottom}return Kt&&E.number(Dt)&&(mt=Math.max(0,Math.min(lt.right,Kt.right)-Math.max(lt.left,Kt.left))*Math.max(0,Math.min(lt.bottom,Kt.bottom)-Math.max(lt.top,Kt.top))/(Kt.width*Kt.height)>=Dt),re.options.drop.checker&&(mt=re.options.drop.checker(we,qe,mt,re,dt,We,et)),mt}(this,p,m,k,T,j,N)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},F(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=Ue.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.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(a,t){var o=a.interaction,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=it(t,o.element),c.events=rt(o,0,l),c.events.activate&&(je(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":Qe,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Pe(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;Qe(a,t),Pe(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.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:it,getDrop:Ge,getDropEvents:rt,fireDropEvents:Pe,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ze=Ue;function Ce(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(j){return j.pointer}),p=l==="start",m=l==="end",k=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ne(c,k),o.box=Se(c),o.scale=1,o.ds=0,o.angle=G(c,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||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=ne(c,k),o.box=Se(c),o.scale=o.distance/t.gesture.startDistance,o.angle=G(c,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,E.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Ne={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return E.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):E.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=Ne,t.methodDict.gesture="gesturable",l.actions.gesture=Ne.defaults},listeners:{"interactions:action-start":Ce,"interactions:action-move":Ce,"interactions:action-end":Ce,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},ut=Ne;function he(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var k=E.number(p.width)?p.width:p.right-p.left,T=E.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:T)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var j=k>=0?p.left:p.right;return o.x<j+m}if(a==="top"){var N=T>=0?p.top:p.bottom;return o.y<N+m}if(a==="right")return o.x>(k>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!E.element(l)&&(E.element(t)?t===l:xe(l,t,c))}function Ie(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var Be,Ke,M={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;M.cursors=function(p){return p.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),M.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,k,T){return E.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),E.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:E.bool(k.square)&&(m.options.resize.square=k.square),m):E.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,p,a)},t.map.resize=M,t.methodDict.resize="resizable",c.actions.resize=M.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:F({},p),corrected:F({},p),previous:F({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),Ie(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",k=l.rect,T=l._rects,j=T.start,N=T.corrected,re=T.delta,we=T.previous;if(F(we,N),m){if(F(N,k),p==="reposition"){if(N.top>N.bottom){var qe=N.top;N.top=N.bottom,N.bottom=qe}if(N.left>N.right){var We=N.left;N.left=N.right,N.right=We}}}else N.top=Math.min(k.top,j.bottom),N.bottom=Math.max(k.bottom,j.top),N.left=Math.min(k.left,j.right),N.right=Math.max(k.right,j.left);for(var et in N.width=N.right-N.left,N.height=N.bottom-N.top,N)re[et]=N[et]-we[et];c.edges=l.prepared.edges,c.rect=N,c.deltaRect=re}})(a),Ie(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=F({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(E.object(k.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var j in T)T[j]=he(j,k.edges[j],m,t._latestPointer.eventTarget,l,c,k.margin||M.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var N=k.axis!=="y"&&m.x>c.right-M.defaultMargin,re=k.axis!=="x"&&m.y>c.bottom-M.defaultMargin;(N||re)&&(a.action={name:"resize",axes:(N?"x":"")+(re?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=M.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",k=0,T=["top","bottom","left","right"];k<T.length;k++){var j=T[k];t[j]&&(m+=j)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Ae=M,at={id:"actions",install:function(a){a.usePlugin(ut),a.usePlugin(Ae),a.usePlugin(Me),a.usePlugin(ze)}},Le=0,Ye={request:function(a){return Be(a)},cancel:function(a){return Ke(a)},init:function(a){if(Be=a.requestAnimationFrame,Ke=a.cancelAnimationFrame,!Be)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];Be=a["".concat(l,"RequestAnimationFrame")],Ke=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}Be=Be&&Be.bind(a),Ke=Ke&&Ke.bind(a),Be||(Be=function(c){var p=Date.now(),m=Math.max(0,16-(p-Le)),k=a.setTimeout(function(){c(p+m)},m);return Le=p+m,k},Ke=function(c){return clearTimeout(c)})}},Oe={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(a){Oe.isScrolling=!0,Ye.cancel(Oe.i),a.autoScroll=Oe,Oe.interaction=a,Oe.prevTime=Oe.now(),Oe.i=Ye.request(Oe.scroll)},stop:function(){Oe.isScrolling=!1,Oe.interaction&&(Oe.interaction.autoScroll=null),Ye.cancel(Oe.i)},scroll:function(){var a=Oe.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=ft(c.container,t,o),m=Oe.now(),k=(m-Oe.prevTime)/1e3,T=c.speed*k;if(T>=1){var j={x:Oe.x*T,y:Oe.y*T};if(j.x||j.y){var N=pt(p);E.window(p)?p.scrollBy(j.x,j.y):p&&(p.scrollLeft+=j.x,p.scrollTop+=j.y);var re=pt(p),we={x:re.x-N.x,y:re.y-N.y};(we.x||we.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:we,interaction:a,container:p})}Oe.prevTime=m}Oe.isScrolling&&(Ye.cancel(Oe.i),Oe.i=Ye.request(Oe.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&Oe.check(t.interactable,t.prepared.name))if(t.simulation)Oe.x=Oe.y=0;else{var l,c,p,m,k=t.interactable,T=t.element,j=t.prepared.name,N=k.options[j].autoScroll,re=ft(N.container,k,T);if(E.window(re))m=o.clientX<Oe.margin,l=o.clientY<Oe.margin,c=o.clientX>re.innerWidth-Oe.margin,p=o.clientY>re.innerHeight-Oe.margin;else{var we=Fe(re);m=o.clientX<we.left+Oe.margin,l=o.clientY<we.top+Oe.margin,c=o.clientX>we.right-Oe.margin,p=o.clientY>we.bottom-Oe.margin}Oe.x=c?1:m?-1:0,Oe.y=p?1:l?-1:0,Oe.isScrolling||(Oe.margin=N.margin,Oe.speed=N.speed,Oe.start(t))}}};function ft(a,t,o){return(E.string(a)?Y(a,t,o):a)||$(o)}function pt(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var ct={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Oe,Oe.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Oe.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Oe.stop(),Oe.interaction&&(Oe.interaction=null)},"interactions:stop":Oe.stop,"interactions:action-move":function(a){return Oe.onInteractionMove(a)}}},gt=ct;function bt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function Nt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Pt(a){return E.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Vt(a){return E.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var _t={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(k,T,j,N,re){var we=k.getRect(N),qe=T.buttons||{0:1,1:4,3:8,4:16}[T.button],We={action:null,interactable:k,interaction:j,element:N,rect:we,buttons:qe};return re.fire("auto-start:check",We),We.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=bt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=bt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Vt,t.prototype.styleCursor=Pt}};function Ft(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Ot(t,o,a,c)?a:null}function xt(a,t,o,l,c,p,m){for(var k=0,T=l.length;k<T;k++){var j=l[k],N=c[k],re=j.getAction(t,o,a,N);if(re){var we=Ft(re,j,N,p,m);if(we)return{action:we,interactable:j,element:N}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],k=l;function T(N){p.push(N),m.push(k)}for(;E.element(k);){p=[],m=[],c.interactables.forEachMatch(k,T);var j=xt(a,t,o,p,m,l,c);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;k=nt(k)}return{action:null,interactable:null,element:null}}function Yt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Nt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Oa(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,k=l.autoStart.maxInteractions,T=0,j=0,N=0;if(!(p&&m&&k))return!1;for(var re=0,we=l.interactions.list;re<we.length;re++){var qe=we[re],We=qe.prepared.name;if(qe.interacting()&&(++T>=k||qe.interactable===a&&((j+=We===o.name?1:0)>=p||qe.element===t&&(N++,We===o.name&&N>=m))))return!1}return k>0}function Va(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function wa(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Oa(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=E.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}wa(a.element,p||"",t)}else t.autoStart.cursorElement&&wa(t.autoStart.cursorElement,"",t)}var Ka={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(_t),o.base.actionChecker=null,o.base.styleCursor=!0,F(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Va(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Yt(o,Ht(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Yt(c,Ht(c,p,m,k,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Ot(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Oa(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&wa(o.element,"",t)}},maxInteractions:Va,withinInteractionLimit:Ot,validateAction:Ft},Da=Ka,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),k=Math.abs(p),T=o.interactable.options.drag,j=T.startAxis,N=m>k?"x":m<k?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&j!=="xy"&&j!==N){o.prepared.name=null;for(var re=l,we=function(We){if(We!==o.interactable){var et=o.interactable.options.drag;if(!et.manualStart&&We.testIgnoreAllow(et,re,l)){var dt=We.getAction(o.downPointer,o.downEvent,o,re);if(dt&&dt.name==="drag"&&function(lt,mt){if(!mt)return!1;var Dt=mt.options.drag.startAxis;return lt==="xy"||Dt==="xy"||Dt===lt}(N,We)&&Da.validateAction(dt,We,re,l,t))return We}}};E.element(re);){var qe=t.interactables.forEachMatch(re,we);if(qe){o.prepared.name="drag",o.interactable=qe,o.element=re;break}re=nt(re)}}}}}};function Ca(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(Da),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=Ca(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;Ca(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ca},Wa=Ua,Ha={id:"auto-start",install:function(a){a.usePlugin(Da),a.usePlugin(Wa),a.usePlugin(ja)}},qa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):E.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ga(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Ma={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=qa,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=$(p.target).document,T=c.getDocOptions(k);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&Q(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||fe(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ga,a},{})};function ba(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function fa(a){var t={};for(var o in a){var l=a[o];E.plainObject(l)?t[o]=fa(l):E.array(l)?t[o]=Te(l):t[o]=l}return t}var _a=function(){function a(t){u(this,a),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=ka(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,k=function(j){var N=j.interactable.options[j.prepared.name],re=N.modifiers;return re&&re.length?re:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(we){var qe=N[we];return qe&&qe.enabled&&{options:qe,methods:qe._methods}}).filter(function(we){return!!we})}(m);this.prepareStates(k),this.startEdges=F({},m.edges),this.edges=F({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ka(),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,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=F({},t.pageCoords),t.rect=F({},p),t.edges=F({},m);for(var k=c?this.states.slice(c):this.states,T=ka(t.coords,t.rect),j=0;j<k.length;j++){var N,re=k[j],we=re.options,qe=F({},t.coords),We=null;(N=re.methods)!=null&&N.set&&this.shouldDo(we,l,o)&&(t.state=re,We=re.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-qe.x,y:t.coords.y-qe.y})),T.eventProps.push(We)}F(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-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var et=this.result.coords,dt=this.result.rect;if(et&&dt){var lt=T.rect.left!==dt.left||T.rect.right!==dt.right||T.rect.top!==dt.top||T.rect.bottom!==dt.bottom;T.changed=lt||et.x!==T.coords.x||et.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,k=this.startDelta,T=m.delta;l==="start"&&F(this.startDelta,m.delta);for(var j=0,N=[[p,k],[c,T]];j<N.length;j++){var re=N[j],we=re[0],qe=re[1];we.page.x+=qe.x,we.page.y+=qe.y,we.client.x+=qe.x,we.client.y+=qe.y}var We=this.result.rectDelta,et=t.rect||o.rect;et.left+=We.left,et.right+=We.right,et.top+=We.top,et.bottom+=We.bottom,et.width=et.right-et.left,et.height=et.bottom-et.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,T={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var k=c[m];t.state=k;var T=k.options,j=k.methods,N=j.beforeEnd&&j.beforeEnd(t);if(N)return this.endResult=N,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=F({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,k=p.result,T=k.delta,j=k.rectDelta,N=0,re=[[l.start,m],[l.cur,T]];N<re.length;N++){var we=re[N],qe=we[0],We=we[1];qe.page.x-=We.x,qe.page.y-=We.y,qe.client.x-=We.x,qe.client.y-=We.y}c.left-=j.left,c.right-=j.right,c.top-=j.top,c.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="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 fa(o)}),this.result=ka(F({},t.result.coords),F({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ka(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var k in m.enabled=m.enabled!==!1,o)k in m||(m[k]=o[k]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function ga(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":ga,"interactions:action-move":ga,"interactions:action-end":ga,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},wt=Xa,Zt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},yt=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T,j){var N;u(this,o),(N=t.call(this,l)).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,k=k||l.element;var re=l.interactable,we=(re&&re.options||Zt).deltaSource,qe=te(re,k,p),We=m==="start",et=m==="end",dt=We?R(N):l.prevEvent,lt=We?l.coords.start:et?{page:dt.page,client:dt.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return N.page=F({},lt.page),N.client=F({},lt.client),N.rect=F({},l.rect),N.timeStamp=lt.timeStamp,et||(N.page.x-=qe.x,N.page.y-=qe.y,N.client.x-=qe.x,N.client.y-=qe.y),N.ctrlKey=c.ctrlKey,N.altKey=c.altKey,N.shiftKey=c.shiftKey,N.metaKey=c.metaKey,N.button=c.button,N.buttons=c.buttons,N.target=k,N.currentTarget=k,N.preEnd=T,N.type=j||p+(m||""),N.interactable=re,N.t0=We?l.pointers[l.pointers.length-1].downTime:dt.t0,N.x0=l.coords.start.page.x-qe.x,N.y0=l.coords.start.page.y-qe.y,N.clientX0=l.coords.start.client.x-qe.x,N.clientY0=l.coords.start.client.y-qe.y,N.delta=We||et?{x:0,y:0}:{x:N[we].x-dt[we].x,y:N[we].y-dt[we].y},N.dt=l.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=F({},l.coords.velocity[we]),N.speed=ot(N.velocity.x,N.velocity.y),N.swipe=et||m==="inertiastart"?N.getSwipe():null,N}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(be);Object.defineProperties(yt.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var fn=g(function a(t,o,l,c,p){u(this,a),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=l,this.downTime=c,this.downTarget=p}),Mt=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ca=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ea=0,oa=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),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=bt(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=Ea++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return p[N]}})};for(var k in Mt)m(k);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return p[N].apply(p,arguments)}})};for(var j in ca)T(j);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Nt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?F({},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,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=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&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ot(c,p)>this.pointerMoveTolerance);var k,T,j,N=this.getPointerIndex(t),re={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(k=this.coords.velocity,T=this.coords.delta,j=Math.max(T.timeStamp/1e3,.001),k.page.x=T.page.x/j,k.page.y=T.page.y/j,k.client.x=T.client.x/j,k.client.y=T.client.y/j,k.timeStamp=j),this._scopeFire("interactions:move",re),m||this.simulation||(this.interacting()&&(re.type=null,this.move(re)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||W(this.coords.delta),(t=F({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,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,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=z(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:U(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,k,T=z(t),j=this.getPointerIndex(t),N=this.pointers[j];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new fn(T,t,o,null,null),j=this.pointers.length,this.pointers.push(N)),ue(this.coords.cur,this.pointers.map(function(re){return re.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-m.page.x,p.page.y=k.page.y-m.page.y,p.client.x=k.client.x-m.client.x,p.client.y=k.client.y-m.client.y,p.timeStamp=k.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=l,C(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:N,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new yt(this,t,this.prepared.name,o,this.element,l,c)}},{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,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(oe(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ma(a){Qt(a.interaction)}function Qt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Tt(a.coords.cur,t),Tt(a.coords.delta,t),oe(a.edges,a.rect,t),t.x=0,t.y=0,!0}function La(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Tt(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}ca.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=La},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(Tt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":ma,"interactions:before-action-move":ma,"interactions:before-action-end":function(a){var t=a.interaction;if(Qt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ra=qt,Et=function(){function a(t){u(this,a),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 g(a,[{key:"start",value:function(t){var o=this.interaction,l=At(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=ot(c.x,c.y),m=this.modification||(this.modification=new _a(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.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,l=At(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.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=Ye.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,k,T=this,j=this.interaction,N=At(j).resistance,re=(j._now()-this.t0)/1e3;if(re<this.te){var we,qe=1-(Math.exp(-N*re)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,we={x:Wt(k=qe,t,l,p),y:Wt(k,o,c,m)}):we={x:this.targetOffset.x*qe,y:this.targetOffset.y*qe};var We={x:we.x-this.currentOffset.x,y:we.y-this.currentOffset.y};this.currentOffset.x+=We.x,this.currentOffset.y+=We.y,j.offsetBy(We),j.move(),this.onNextFrame(function(){return T.inertiaTick()})}else j.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,l=o._now()-this.t0,c=At(o).smoothEndDuration;if(l<c){var p={x:Rt(l,0,this.targetOffset.x,c),y:Rt(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),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,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.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,Ye.cancel(this.timeout)}}]),a}();function At(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(wt),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;E.element(c);){if(c===t.element){l.resume(a);break}c=nt(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ga,"interactions:action-inertiastart":ga,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Wt(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Rt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ua=Ut;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var za=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=F({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=ie(t,o);for(t in l)this.types[t]=_e(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=ie(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var k=m[p],T=c.indexOf(k);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ya=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Fa(a){return E.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ja(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var Sn={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:k,addDelegate:function(N,re,we,qe,We){var et=Fa(We);if(!l[we]){l[we]=[];for(var dt=0;dt<c.length;dt++){var lt=c[dt];m(lt,we,T),m(lt,we,j,!0)}}var mt=l[we],Dt=Ve(mt,function(It){return It.selector===N&&It.context===re});Dt||(Dt={selector:N,context:re,listeners:[]},mt.push(Dt)),Dt.listeners.push({func:qe,options:et})},removeDelegate:function(N,re,we,qe,We){var et,dt=Fa(We),lt=l[we],mt=!1;if(lt)for(et=lt.length-1;et>=0;et--){var Dt=lt[et];if(Dt.selector===N&&Dt.context===re){for(var It=Dt.listeners,kt=It.length-1;kt>=0;kt--){var Ct=It[kt];if(Ct.func===qe&&Ja(Ct.options,dt)){It.splice(kt,1),It.length||(lt.splice(et,1),k(re,we,T),k(re,we,j,!0)),mt=!0;break}}if(mt)break}}},delegateListener:T,delegateUseCapture:j,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,re,we,qe){if(N.addEventListener){var We=Fa(qe),et=Ve(o,function(dt){return dt.eventTarget===N});et||(et={eventTarget:N,events:{}},o.push(et)),et.events[re]||(et.events[re]=[]),Ve(et.events[re],function(dt){return dt.func===we&&Ja(dt.options,We)})||(N.addEventListener(re,we,p.supportsOptions?We:We.capture),et.events[re].push({func:we,options:We}))}}function k(N,re,we,qe){if(N.addEventListener&&N.removeEventListener){var We=U(o,function(ta){return ta.eventTarget===N}),et=o[We];if(et&&et.events)if(re!=="all"){var dt=!1,lt=et.events[re];if(lt){if(we==="all"){for(var mt=lt.length-1;mt>=0;mt--){var Dt=lt[mt];k(N,re,Dt.func,Dt.options)}return}for(var It=Fa(qe),kt=0;kt<lt.length;kt++){var Ct=lt[kt];if(Ct.func===we&&Ja(Ct.options,It)){N.removeEventListener(re,we,p.supportsOptions?It:It.capture),lt.splice(kt,1),lt.length===0&&(delete et.events[re],dt=!0);break}}}dt&&!Object.keys(et.events).length&&o.splice(We,1)}else for(re in et.events)et.events.hasOwnProperty(re)&&k(N,re,"all")}}function T(N,re){for(var we=Fa(re),qe=new Ya(N),We=l[N.type],et=ce(N)[0],dt=et;E.element(dt);){for(var lt=0;lt<We.length;lt++){var mt=We[lt],Dt=mt.selector,It=mt.context;if(Q(dt,Dt)&&fe(It,et)&&fe(It,dt)){var kt=mt.listeners;qe.currentTarget=dt;for(var Ct=0;Ct<kt.length;Ct++){var ta=kt[Ct];Ja(ta.options,we)&&ta.func(qe)}}}dt=nt(dt)}}function j(N){return T(N,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=rn.methodOrder;t<o.length;t++){var l=o[t],c=rn[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var k=m[p],T=l;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;T;){if(T===k.element)return k;T=nt(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,k=p.interactions.list;m<k.length;m++){var T=k[m];if(T.pointerType===l){if(T.simulation&&!vn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var j=0,N=p.interactions.list;j<N.length;j++){var re=N[j];if(!(re.pointerType!==l||/down/i.test(c)&&re.simulation))return re}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(vn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function vn(a,t){return a.pointers.some(function(o){return o.id===t})}var ln=rn,va=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(o){var l=t.interactions.list,c=ae(o),p=ce(o),m=p[0],k=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,N=o.changedTouches;j<N.length;j++){var re=N[j],we={pointer:re,pointerId:z(re),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:k,scope:t},qe=sn(we);T.push([we.pointer,we.eventTarget,we.curEventTarget,qe])}}else{var We=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var et=0;et<l.length&&!We;et++)We=l[et].pointerType!=="mouse"&&l[et].pointerIsDown;We=We||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!We){var dt={pointer:o,pointerId:z(o),pointerType:c,eventType:o.type,curEventTarget:k,eventTarget:m,scope:t},lt=sn(dt);T.push([dt.pointer,dt.eventTarget,dt.curEventTarget,lt])}}for(var mt=0;mt<T.length;mt++){var Dt=T[mt],It=Dt[0],kt=Dt[1],Ct=Dt[2];Dt[3][a](It,o,kt,Ct)}}}function sn(a){var t=a.pointerType,o=a.scope,l={interaction:ln.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,k=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)k(o,T,m.delegateListener),k(o,T,m.delegateUseCapture,!0);for(var j=c&&c.events,N=0;N<p.length;N++){var re=p[N];k(o,re.type,re.listener,j)}}var Tn={id:"core/interactions",install:function(a){for(var t={},o=0;o<va.length;o++){var l=va[o];t[l]=Za(l,a)}var c,p=se.pEventTypes;function m(){for(var k=0,T=a.interactions.list;k<T.length;k++){var j=T[k];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var N=function(){var qe=we[re];a.documents.some(function(We){return fe(We.doc,qe.downTarget)})||j.removePointer(qe.pointer,qe.event)},re=0,we=j.pointers;re<we.length;re++)N()}}(c=A.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{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(k){for(var T=0,j=a.interactions.list;T<j.length;T++)j[T].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){x(j,k);var T=J(j);function j(){return u(this,j),T.apply(this,arguments)}return g(j,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(N){a.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return a.now()}}]),j}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(j,N){return a.fire(j,N)};var T=new a.Interaction(k);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Ma)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Za,methodNames:va},Ra=Tn,Pa=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Pa||{}),ll=function(){function a(t,o,l,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new za,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||l,this._win=$(ve(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return E.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),E.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),E.func(o.onend)&&this.on("".concat(t,"end"),o.onend),E.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,k=function(T){return(m==null||m(T))&&ba(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Pa.Off,t,o,void 0,k),(E.array(l)||E.object(l))&&this._onOff(Pa.On,t,l,void 0,k)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),E.array(k)?m[p]=Te(k):E.plainObject(k)?(m[p]=F(m[p]||{},fa(k)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=k.enabled!==!1)):E.bool(k)&&E.object(l.perAction[p])?m[p].enabled=k:m[p]=k}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),tt(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=F({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(ve(o)||E.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][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 E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||fe(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!E.element(l)&&(E.string(t)?xe(l,t,o):!!E.element(t)&&fe(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?xe(l,t,o):!!E.element(t)&&fe(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){E.object(o)&&!E.array(o)&&(c=l,l=null);var m=ie(o,l,p);for(var k in m){k==="wheel"&&(k=se.wheelEvent);for(var T=0,j=m[k];T<j.length;T++){var N=j[T];ba(k,this._actions)?this.events[t===Pa.On?"on":"off"](k,N):E.string(this.target)?this._scopeEvents[t===Pa.On?"addDelegate":"removeDelegate"](this.target,this._context,k,N,c):this._scopeEvents[t===Pa.On?"add":"remove"](this.target,k,N,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Pa.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Pa.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,F(F({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?E.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,k=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=k.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[T][0],k[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=E.string(p)?o.selectorMap[p]:p[o.scope.id],k=U(m,function(T){return T===c});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,o){o=F(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=E.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Ve(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((E.string(p.target)?E.element(t)&&Q(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=fa(Zt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,k){var T=l.interactables.getExisting(m,k);return T||((T=l.interactables.new(m,k)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Se,c.getTouchDistance=ne,c.getTouchAngle=G,c.getElementRect=tt,c.getElementClientRect=Fe,c.matchesSelector=Q,c.closest=Ze,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var N=j[T];this.on(N,m,k)}return this}if(E.object(p)){for(var re in p)this.on(re,p[re],m);return this}return ba(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:k}),this},"The interact.on() method is being deprecated"),c.off=bt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,j=p;T<j.length;T++){var N=j[T];this.off(N,m,k)}return this}if(E.object(p)){for(var re in p)this.off(re,p[re],m);return this}var we;return ba(p,this.scope.actions)?p in this.globalEvents&&(we=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(we,1):this.scope.events.remove(this.scope.document,p,m,k),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return se.supportsTouch},c.supportsPointerEvent=function(){return se.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return E.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=yt,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){x(p,l);var c=J(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return O(_(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){O(_(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,E.window(l)&&D(l),A.init(l),se.init(l),Ye.init(l),o.window=l,o.document=l.document,o.usePlugin(Ra),o.usePlugin(Sn),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 l=0,c=this.listenerMaps.length,p=t.before.reduce(function(k,T){return k[T]=!0,k[xo(T)]=!0,k},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[xo(m)]))break}this.listenerMaps.splice(l,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 l=$(t);o=o?F({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=$(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{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()}}]),a}();function xo(a){return a&&a.replace(/\/.*$/,"")}var wo=new sl,ea=wo.interactStatic,cl=typeof globalThis<"u"?globalThis:window;wo.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,j=T===void 0?{x:0,y:0}:T,N={range:p,grid:a,x:null,y:null},re=0;re<t.length;re++){var we=t[re],qe=we[0],We=we[1],et=Math.round((l-j.x)/a[qe]),dt=Math.round((c-j.y)/a[We]);N[qe]=Math.max(k.left,Math.min(k.right,et*a[qe]+j.x)),N[We]=Math.max(k.top,Math.min(k.bottom,dt*a[We]+j.y))}return N};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=F(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,k=p.enabled,T=t.options,j=T.equalDelta,N=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=F({},c),t.startRect=F({},o),t.ratio=m,t.equalDelta=j;var re=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var we=(re.left?1:-1)*(re.top?1:-1);t.edgeSign={x:we,y:we}}else t.edgeSign={x:re.left?-1:1,y:re.top?-1:1};if(k!==!1&&F(l,re),N!=null&&N.length){var qe=new _a(a.interaction);qe.copyFrom(a.interaction.modification),qe.prepareStates(N),t.subModification=qe,qe.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=F({},l),m=t.equalDelta?vl:hl;if(F(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var k=F({},o);oe(c,k,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:k,edges:c,pageCoords:l,prevCoords:l,prevRect:k})),j=T.delta;return T.changed&&(m(t,Math.abs(j.x)>Math.abs(j.y),T.coords,T.rect),F(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*k.y}else{var j=l.height*m;o.x=p.x+(j-c.width)*k.x}}var gl=na(fl,"aspectRatio"),Do=function(){};Do._defaults={};var In=Do;function Qa(a,t,o){return E.func(a)?pe(a,t.interactable,t.element,[o.x,o.y,t]):pe(a,t.interactable,t.element)}var Bn={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,k=m.elementRect,T=F({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var j=Qa(m.restriction,c,p);if(j){var N=j.right-j.left-t.width,re=j.bottom-j.top-t.height;N<0&&(T.left+=N,T.right+=N),re<0&&(T.top+=re,T.bottom+=re)}T.left+=o.left-t.width*k.left,T.top+=o.top-t.height*k.top,T.right+=o.right-t.width*(1-k.right),T.bottom+=o.bottom-t.height*(1-k.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Qa(c.restriction,o,t);if(m){var k=function(T){return!T||"left"in T&&"top"in T||((T=F({},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}(m);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=na(Bn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var hn={noInner:Co,noOuter:_o,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=de(Qa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var k=F({},t),T=Qa(m.inner,l,k)||{},j=Qa(m.outer,l,k)||{};Eo(T,Co),Eo(j,_o),o.top?t.y=Math.min(Math.max(j.top+p.top,k.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+p.bottom,k.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(j.left+p.left,k.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(j.right+p.right,k.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=na(hn,"restrictEdges"),bl=F({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Bn.defaults),kl=na({start:Bn.start,set:Bn.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=na({start:function(a){return hn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=Z(Qa(p.min,t,a.coords))||xl,k=Z(Qa(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:F({},hn.noInner),outer:F({},hn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-k.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+k.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-k.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+k.width),hn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ao={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,k=a.startOffset,T=m.options,j=T.offsetWithOrigin?function(we){var qe=we.interaction.element,We=de(pe(we.state.options.origin,null,null,[qe])),et=We||te(we.interactable,qe,we.interaction.prepared.name);return et}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=pe(T.offset,l,c,[o]);(t=de(N)||{x:0,y:0}).x+=j.x,t.y+=j.y}var re=T.relativePoints;m.offsets=p&&re&&re.length?re.map(function(we,qe){return{index:qe,relativePoint:we,x:k.left-p.width*we.x+t.x,y:k.top-p.height*we.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=te(t.interactable,t.element,t.prepared.name),k=F({},o),T=[];c.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var j=0,N=p;j<N.length;j++)for(var re=N[j],we=k.x-re.x,qe=k.y-re.y,We=0,et=c.targets.length;We<et;We++){var dt=c.targets[We],lt=void 0;(lt=E.func(dt)?dt(we,qe,t._proxy,re,We):dt)&&T.push({x:(E.number(lt.x)?lt.x:we)+re.x,y:(E.number(lt.y)?lt.y:qe)+re.y,range:E.number(lt.range)?lt.range:c.range,source:dt,index:We,offset:re})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Dt=0;Dt<T.length;Dt++){var It=T[Dt],kt=It.range,Ct=It.x-k.x,ta=It.y-k.y,Kt=ot(Ct,ta),da=Kt<=kt;kt===1/0&&mt.inRange&&mt.range!==1/0&&(da=!1),mt.target&&!(da?mt.inRange&&kt!==1/0?Kt/kt<mt.distance/mt.range:kt===1/0&&mt.range!==1/0||Kt<mt.distance:!mt.inRange&&Kt<mt.distance)||(mt.target=It,mt.distance=Kt,mt.range=kt,mt.inRange=da,mt.delta.x=Ct,mt.delta.y=ta)}return mt.inRange&&(o.x=mt.target.x,o.y=mt.target.y),l.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=na(ao,"snap"),Nn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ao.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=F({},c),o.options.targets=[];for(var k=0,T=c.targets||[];k<T.length;k++){var j=T[k],N=void 0;if(N=E.func(j)?j(m.x,m.y,t):j){for(var re=0,we=o.targetFields;re<we.length;re++){var qe=we[re],We=qe[0],et=qe[1];if(We in N||et in N){N.x=N[We],N.y=N[et];break}}o.options.targets.push(N)}}var dt=ao.set(a);return o.options=c,dt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=na(Nn,"snapSize"),no={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Nn.start(a)):null},set:Nn.set,defaults:F(fa(Nn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:In,avoid:In,transform:In,rubberband:In},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(pl),t.modifiers=no,no){var l=no[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,So=function(a){x(o,a);var t=J(o);function o(l,c,p,m,k,T){var j;if(u(this,o),C(R(j=t.call(this,k)),p),p!==c&&C(R(j),c),j.timeStamp=T,j.originalEvent=p,j.type=l,j.pointerId=z(c),j.pointerType=ae(c),j.target=m,j.currentTarget=null,l==="tap"){var N=k.getPointerIndex(c);j.dt=j.timeStamp-k.pointers[N].downTime;var re=j.timeStamp-k.tapTime;j.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===j.target&&re<500}else l==="doubletap"&&(j.dt=c.timeStamp-k.tapTime,j.double=!0);return j}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(be),gn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=gn,a.defaults.actions.pointerEvents=gn.defaults,F(a.actions.phaselessTypes,gn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&oo(a),$a({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget,T=o.pointerIndex,j=c.pointers[T].hold,N=Xe(k),re={interaction:c,pointer:p,event:m,eventTarget:k,type:"hold",targets:[],path:N,node:null},we=0;we<N.length;we++){var qe=N[we];re.node=qe,l.fire("pointerEvents:collect-targets",re)}if(re.targets.length){for(var We=1/0,et=0,dt=re.targets;et<dt.length;et++){var lt=dt[et].eventable.options.holdDuration;lt<We&&(We=lt)}j.duration=We,j.timeout=setTimeout(function(){$a({interaction:c,eventTarget:k,pointer:p,event:m,type:"hold"},l)},We)}})(a,t),$a(a,t)},"interactions:up":function(a,t){oo(a),$a(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerWasMoved||$a({interaction:c,eventTarget:k,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){oo(a),$a(a,t)}},PointerEvent:So,fire:$a,collectEventTargets:To,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 $a(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=a.targets,T=k===void 0?To(a,t):k,j=new So(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var N={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:j},re=0;re<T.length;re++){var we=T[re];for(var qe in we.props||{})j[qe]=we.props[qe];var We=te(we.eventable,we.node);if(j._subtractOrigin(We),j.eventable=we.eventable,j.currentTarget=we.node,we.eventable.fire(j),j._addOrigin(We),j.immediatePropagationStopped||j.propagationStopped&&re+1<T.length&&T[re+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var et=j.double?$a({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):j;o.prevTap=et,o.tapTime=et.timeStamp}return j}function To(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=o.getPointerIndex(l),T=o.pointers[k];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var j=Xe(p),N={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:j,targets:[],node:null},re=0;re<j.length;re++){var we=j[re];N.node=we,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(qe){var We,et;return qe.eventable.options.holdDuration===((We=o.pointers[k])==null||(et=We.hold)==null?void 0:et.duration)})),N.targets}function oo(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:gn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(gn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Il,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return F(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var k=m.events,T=k.options;k.types[c]&&k.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:k,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,l=a.options;F(o.events.options,t.pointerEvents.defaults),F(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,Ll={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),k=p.window.Promise,T=k?[]:null,j=function(){var re=m[N],we=l.getRect(re);if(!we)return 1;var qe,We=Ve(p.interactions.list,function(lt){return lt.interacting()&&lt.interactable===l&&lt.element===re&&lt.prepared.name===c.name});if(We)We.move(),T&&(qe=We._reflowPromise||new k(function(lt){We._reflowResolve=lt}));else{var et=Z(we),dt=function(lt){return{coords:lt,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:et.x,y:et.y},client:{x:et.x,y:et.y},timeStamp:p.now()});qe=function(lt,mt,Dt,It,kt){var Ct=lt.interactions.new({pointerType:"reflow"}),ta={interaction:Ct,event:kt,pointer:kt,eventTarget:Dt,phase:"reflow"};Ct.interactable=mt,Ct.element=Dt,Ct.prevEvent=kt,Ct.updatePointer(kt,kt,Dt,!0),W(Ct.coords.delta),Nt(Ct.prepared,It),Ct._doPhase(ta);var Kt=lt.window,da=Kt.Promise,ya=da?new da(function(Sa){Ct._reflowResolve=Sa}):void 0;return Ct._reflowPromise=ya,Ct.start(It,mt,Dt),Ct._interacting?(Ct.move(ta),Ct.end(kt)):(Ct.stop(),Ct._reflowResolve()),Ct.removePointer(kt,kt),ya}(p,l,re,c,dt)}T&&T.push(qe)},N=0;N<m.length&&!j();N++);return T&&k.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},zl=Ll;if(ea.use(Ma),ea.use(ra),ea.use(Ml),ea.use(ua),ea.use(Sl),ea.use(Ha),ea.use(at),ea.use(gt),ea.use(zl),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(kn,kn.exports)),kn.exports}var np=ap();const Zo=Ee.getDefaultExportFromCjs(np),Jn=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(n,{expose:i,emit:s}){const r=n,d=s,u=e.inject(Kr),b=e.inject(jr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=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 x=!1,_=!1,V=NaN,R=NaN,J=NaN,O=NaN,ke=-1,X=-1,K=-1,le=-1,D=r.x,$=r.y,y=r.w,B=r.h;const E=e.ref(),ge=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:pe});function Je(w){ie(w)}function st(){Re()}function Me(w){pa(r.isDraggable)&&(f.draggable=w)}function He(w){pa(r.isResizable)&&(f.resizable=w)}function De(w){pa(r.isBounded)&&(f.bounded=w)}function A(w){f.transformScale=w}function ee(w){f.rowHeight=w}function se(w){f.maxRows=w}function fe(){f.rtl=Yo()==="rtl",Re()}function Ze(w){f.cols=Math.floor(w)}u.increaseItem(ge),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,pa(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,pa(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,pa(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{D=r.x,$=r.y,B=r.h,y=r.w,aa(tt)}),b.on("updateWidth",Je),b.on("compact",st),b.on("setDraggable",Me),b.on("setResizable",He),b.on("setBounded",De),b.on("setTransformScale",A),b.on("setRowHeight",ee),b.on("setMaxRows",se),b.on("directionchange",fe),b.on("setColNum",Ze)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Je),b.off("compact",st),b.off("setDraggable",Me),b.off("setResizable",He),b.off("setBounded",De),b.off("setTransformScale",A),b.off("setRowHeight",ee),b.off("setMaxRows",se),b.off("directionchange",fe),b.off("setColNum",Ze),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ge)}),i({state:f,wrapper:E});const nt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Q=e.computed(()=>f.resizable&&!r.static),L=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),ye=e.computed(()=>(f.draggable||f.resizable)&&!r.static),xe=Gd("item"),$e=e.computed(()=>({[xe.b()]:!0,[xe.bm("resizable")]:Q.value,[xe.bm("static")]:r.static,[xe.bm("resizing")]:f.isResizing,[xe.bm("dragging")]:f.isDragging,[xe.bm("transform")]:f.useCssTransforms,[xe.bm("rtl")]:L.value,[xe.bm("no-touch")]:nt&&ye.value})),Fe=e.computed(()=>[xe.be("resizer"),L.value&&xe.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{aa(C),aa(W)}),e.watch(()=>f.draggable,()=>{aa(C)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{aa(W)}),e.watch(()=>f.rowHeight,()=>{aa(tt),aa(Xe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(W),aa(tt),aa(Xe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(W)}),e.watch(L,()=>{aa(W),aa(tt)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const w=u.margin;!w||w[0]===f.margin[0]&&w[1]===f.margin[1]||(f.margin=w.map(Number),aa(tt),aa(Xe))});function tt(){r.x+r.w>f.cols?(D=0,y=r.w>f.cols?f.cols:r.w):(D=r.x,y=r.w);const w=Y(D,$,y,B);f.isDragging&&(w.top=f.dragging.top,L.value?w.right=f.dragging.left:w.left=f.dragging.left),f.isResizing&&(w.width=f.resizing.width,w.height=f.resizing.height);let S;f.useCssTransforms?L.value?S=Ud(w.top,w.right,w.width,w.height):S=jd(w.top,w.left,w.width,w.height):L.value?S=Hd(w.top,w.right,w.width,w.height):S=Wd(w.top,w.left,w.width,w.height),f.style=S}function Xe(){const w={};for(const S of["width","height"]){const q=f.style[S].match(/^(\d+)px$/);if(!q)return;w[S]=q[1]}d("container-resized",r.i,r.h,r.w,w.height,w.width)}function ve(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const q=Go(w);if(pa(q))return;const{x:z,y:ue}=q,H={width:0,height:0};let P;switch(S){case"resizestart":{W(),ke=y,X=B,P=Y(D,$,y,B),H.width=P.width,H.height=P.height,f.resizing=H,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(J=z),!w.edges.top&&!w.edges.bottom&&(O=ue);const Se=Xo(J,O,z,ue);L.value?H.width=f.resizing.width-Se.deltaX/f.transformScale:H.width=f.resizing.width+Se.deltaX/f.transformScale,H.height=f.resizing.height+Se.deltaY/f.transformScale,f.resizing=H;break}case"resizeend":{P=Y(D,$,y,B),H.width=P.width,H.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=te(H.height,H.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),J=z,O=ue,(y!==P.w||B!==P.h)&&d("resize",r.i,P.h,P.w,H.height,H.width),w.type==="resizeend"&&(ke!==y||X!==B)&&d("resized",r.i,P.h,P.w,H.height,H.width),b.emit("resizeEvent",w.type,r.i,D,$,P.h,P.w)}function F(w){if(r.static||f.isResizing)return;const S=w.type;if(S==="dragstart"&&f.isDragging||S!=="dragstart"&&!f.isDragging)return;const q=Go(w);if(pa(q))return;const{x:z,y:ue}=q,H=w.target;if(!H.offsetParent)return;const P={top:0,left:0};switch(S){case"dragstart":{K=D,le=$;const ne=H.offsetParent.getBoundingClientRect(),G=H.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,be=G.right/f.transformScale,_e=ne.right/f.transformScale,Te=G.top/f.transformScale,U=ne.top/f.transformScale;L.value?P.left=(be-_e)*-1:P.left=ae-ce,P.top=Te-U,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const ne=Xo(V,R,z,ue);if(L.value?P.left=f.dragging.left-ne.deltaX/f.transformScale:P.left=f.dragging.left+ne.deltaX/f.transformScale,P.top=f.dragging.top+ne.deltaY/f.transformScale,f.bounded){const G=H.offsetParent.clientHeight-Z(r.h,f.rowHeight,f.margin[1]);P.top=oe(P.top,0,G);const ae=de(),ce=f.containerWidth-Z(r.w,ae,f.margin[0]);P.left=oe(P.left,0,ce)}f.dragging=P;break}case"dragend":{const ne=H.offsetParent.getBoundingClientRect(),G=H.getBoundingClientRect(),ae=G.left/f.transformScale,ce=ne.left/f.transformScale,be=G.right/f.transformScale,_e=ne.right/f.transformScale,Te=G.top/f.transformScale,U=ne.top/f.transformScale;L.value?P.left=(be-_e)*-1:P.left=ae-ce,P.top=Te-U,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Se;L.value,Se=pe(P.top,P.left),V=z,R=ue,(D!==Se.x||$!==Se.y)&&d("move",r.i,Se.x,Se.y),w.type==="dragend"&&(K!==D||le!==$)&&d("moved",r.i,Se.x,Se.y),b.emit("dragEvent",w.type,r.i,Se.x,Se.y,B,y)}function Y(w,S,q,z){const ue=de();let H;return L.value?H={right:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:z===1/0?z:Math.round(f.rowHeight*z+Math.max(0,z-1)*f.margin[1])}:H={left:Math.round(ue*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:q===1/0?q:Math.round(ue*q+Math.max(0,q-1)*f.margin[0]),height:z===1/0?z:Math.round(f.rowHeight*z+Math.max(0,z-1)*f.margin[1])},H}function pe(w,S){const q=de();let z=Math.round((S-f.margin[0])/(q+f.margin[0])),ue=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return z=Math.max(Math.min(z,f.cols-y),0),ue=Math.max(Math.min(ue,f.maxRows-B),0),{x:z,y:ue}}function de(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Z(w,S,q){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*q):w}function oe(w,S,q){return Math.max(Math.min(w,q),S)}function te(w,S,q=!1){const z=de();let ue=Math.round((S+f.margin[0])/(z+f.margin[0])),H=0;return q?H=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):H=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),ue=Math.max(Math.min(ue,f.cols-D),0),H=Math.max(Math.min(H,f.maxRows-$),0),{w:ue,h:H}}function ie(w,S){f.containerWidth=w}function Re(){tt()}function ot(){!g.value&&E.value&&(g.value=Zo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Wo(F);function C(){if(ot(),!!g.value)if(f.draggable&&!r.static){const w={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(w),x||(x=!0,g.value.on("dragstart dragmove dragend",S=>{S.type==="dragmove"?h(S):F(S)}))}else g.value.draggable({enabled:!1})}const I=Wo(ve);function W(){if(ot(),!!g.value)if(f.resizable&&!r.static){const w=Y(0,0,r.maxW,r.maxH),S=Y(0,0,r.minW,r.minH),q={edges:{left:L.value?`.${Fe.value[0]}`:!1,right:L.value?!1:`.${Fe.value[0]}`,bottom:`.${Fe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:S.height*f.transformScale,width:S.width*f.transformScale},max:{height:w.height*f.transformScale,width:w.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(q.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(q),_||(_=!0,g.value.on("resizestart resizemove resizeend",z=>{z.type==="resizemove"?I(z):ve(z)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass($e.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),Q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Fe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),nn=typeof window<"u";var Qo;nn&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function er(n){return n!=null}function tr(){}const op=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(op)));const rp=nn&&("ontouchstart"in window||ip()>0),lp=rp?"pointerdown":"click";function ip(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function sp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=i;if(!er(r)||r==="")return!1;let g;return er(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,b),n.dispatchEvent(g)}const cp="clickoutside",up=new Set;nn&&document.addEventListener(lp,n=>{const i=n.target,s=n.composedPath&&n.composedPath();up.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&sp(r,{type:cp})})},!0);const dp=[["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 Pn;if(nn){for(const n of dp)if(n[1]in document){Pn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Pn){const n=Pn[2],i=Pn[4];document.addEventListener(i,()=>{if(pp.forEach(s=>{s.value=!1}),document[n]){const s=fp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var tn=[],vp=function(){return tn.some(function(n){return n.activeTargets.length>0})},hp=function(){return tn.some(function(n){return n.skippedTargets.length>0})},ar="ResizeObserver loop completed with undelivered notifications.",gp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ar}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ar),window.dispatchEvent(n)},En;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(En||(En={}));var an=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,an(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,an(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,b=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:b,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),ko=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(ko(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},nr=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},yp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},_n=typeof window<"u"?window:{},Mn=new WeakMap,or=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(_n.navigator&&_n.navigator.userAgent),xa=function(n){return parseFloat(n||"0")},dn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new mp((s?i:n)||0,(s?n:i)||0)},rr=an({devicePixelContentBoxSize:dn(),borderBoxSize:dn(),contentBoxSize:dn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),Mn.has(n)&&!i)return Mn.get(n);if(Zr(n))return Mn.set(n,rr),rr;var s=getComputedStyle(n),r=ko(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),b=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:xa(s.paddingTop),x=r?0:xa(s.paddingRight),_=r?0:xa(s.paddingBottom),V=r?0:xa(s.paddingLeft),R=r?0:xa(s.borderTopWidth),J=r?0:xa(s.borderRightWidth),O=r?0:xa(s.borderBottomWidth),ke=r?0:xa(s.borderLeftWidth),X=V+x,K=f+_,le=ke+J,D=R+O,$=g?n.offsetHeight-D-n.clientHeight:0,y=b?n.offsetWidth-le-n.clientWidth:0,B=d?X+le:0,E=d?K+D:0,ge=r?r.width:xa(s.width)-B-y,Je=r?r.height:xa(s.height)-E-$,st=ge+X+y+le,Me=Je+K+$+D,He=an({devicePixelContentBoxSize:dn(Math.round(ge*devicePixelRatio),Math.round(Je*devicePixelRatio),u),borderBoxSize:dn(st,Me,u),contentBoxSize:dn(ge,Je,u),contentRect:new Jr(V,f,ge,Je)});return Mn.set(n,He),He},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(i){case En.DEVICE_PIXEL_CONTENT_BOX:return b;case En.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=an([s.borderBoxSize]),this.contentBoxSize=an([s.contentBoxSize]),this.devicePixelContentBoxSize=an([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},wp=function(){var n=1/0,i=[];tn.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=tl(g.target);b.push(f),g.lastReportedSize=el(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},lr=function(n){tn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Dp=function(){var n=0;for(lr(n);vp();)n=wp(),lr(n);return hp()&&gp(),n>0},io,al=[],Cp=function(){return al.splice(0).forEach(function(n){return n()})},_p=function(n){if(!io){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cp()}).observe(s,r),io=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),io()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},$n=0,Sp=function(){return!!$n},Tp=250,Ip={attributes:!0,characterData:!0,childList:!0,subtree:!0},ir=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sr=function(n){return n===void 0&&(n=0),Date.now()+n},so=!1,Bp=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Tp),!so){so=!0;var r=sr(i);Ep(function(){var d=!1;try{d=Dp()}finally{if(so=!1,i=r-sr(),!Sp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ip)};document.body?s():_n.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ir.forEach(function(s){return _n.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return _n.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,cr=function(n){!$n&&n>0&&fo.start(),$n+=n,!$n&&fo.stop()},Np=function(n){return!ko(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||En.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Np(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Vp=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Ln=new WeakMap,ur=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Vp(i,s);Ln.set(i,r)},n.observe=function(i,s,r){var d=Ln.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&tn.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Ln.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&tn.splice(tn.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Ln.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Op=function(){function n(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.");zn.connect(this,i)}return n.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(!nr(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.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(!nr(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Mp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:x}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:x,width:b??f,height:g??x}))}}}const nl=new(nn&&window.ResizeObserver||Op)(Mp);function dr(n,i){Zn.set(n,i),nl.observe(n)}function pr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function Lp(n={}){let i=tr;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(dr(d,n.onResize),i=()=>{pr(d),i=tr})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:dr,unobserveResize:pr,unobserve:r}}const zp=e.ref(!1);e.computed(()=>zp.value);const fr="__theme_style__",co="__theme_observer__",vr=e.reactive(new Map),hr=new Map;e.watch(vr,()=>{if(!nn)return;hr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${co} { width: 1px }`,r=1;for(const[d,[u,b]]of vr.entries())s+=` html.${u} .${co}, .${b} .${co} { width: ${++r}px }`,hr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const ol=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(n,{expose:i,emit:s}){const r=n,d=s,u=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,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=Lp(),V=Ld();V.on("resizeEvent",R),V.on("dragEvent",J),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{qd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Je(),f.value&&x(f.value,zd(D,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),le(),D()})})}),e.onBeforeUnmount(()=>{V.clearAll(),f.value&&_(f.value)});function R(Me,He,De,A,ee,se){E(Me,He,De,A,ee,se)}function J(Me,He,De,A,ee,se){B(Me,He,De,A,ee,se)}e.watch(()=>u.width,(Me,He)=>{e.nextTick(()=>{V.emit("updateWidth",Me),He===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,Me=>{V.emit("setColNum",Me)}),e.watch(()=>r.rowHeight,Me=>{V.emit("setRowHeight",Me)}),e.watch(()=>r.isDraggable,Me=>{V.emit("setDraggable",Me)}),e.watch(()=>r.isResizable,Me=>{V.emit("setResizable",Me)}),e.watch(()=>r.isBounded,Me=>{V.emit("setBounded",Me)}),e.watch(()=>r.transformScale,Me=>{V.emit("setTransformScale",Me)}),e.watch(()=>r.responsive,Me=>{Me||(d("update:layout",u.originalLayout),V.emit("setColNum",r.colNum)),D()}),e.watch(()=>r.maxRows,Me=>{V.emit("setMaxRows",Me)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide(Kr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:O,decreaseItem:ke})),e.provide(jr,V),i({state:u,getItem:X,resizeEvent:E,dragEvent:B,layoutUpdate:K});function O(Me){b.set(Me.i,Me)}function ke(Me){b.delete(Me.i)}function X(Me){return b.get(Me)}function K(){if(!pa(g.value)&&!pa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Me=st(g.value,u.originalLayout);if(Me.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Me);else{const He=new Set(Me.map(De=>De.i));u.originalLayout=u.originalLayout.filter(De=>!He.has(De.i))}u.lastLayoutLength=g.value.length,Je()}cn(g.value,r.verticalCompact),V.emit("updateWidth",u.width),le(),d("layout-updated",g.value)}}function le(){u.mergedStyle={height:$()}}function D(){f.value&&(u.width=f.value.offsetWidth),V.emit("resizeEvent")}function $(){if(!r.autoSize)return;const Me=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+Me)+Me+"px"}let y;function B(Me,He,De,A,ee,se){let fe=Ho(g.value,He);pa(fe)&&(fe={h:0,w:0,x:0,y:0,i:""}),Me==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Ze,{i:nt,x:Q,y:L})=>({...Ze,[nt]:{x:Q,y:L}}),{})),Me==="dragmove"||Me==="dragstart"?(u.placeholder.i=He,u.placeholder.x=fe.x,u.placeholder.y=fe.y,u.placeholder.w=se,u.placeholder.h=ee,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,fe,De,A,!0,r.preventCollision),r.restoreOnDrag?(fe.static=!0,cn(g.value,r.verticalCompact,y),fe.static=!1):cn(g.value,r.verticalCompact),V.emit("compact"),le(),Me==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(Me,He,De,A,ee,se){let fe=Ho(g.value,He);pa(fe)&&(fe={h:0,w:0,x:0,y:0,i:""});let Ze;if(r.preventCollision){const nt=Wr(g.value,{...fe,w:se,h:ee}).filter(Q=>Q.i!==fe.i);if(Ze=nt.length>0,Ze){let Q=1/0,L=1/0;nt.forEach(ye=>{ye.x>fe.x&&(Q=Math.min(Q,ye.x)),ye.y>fe.y&&(L=Math.min(L,ye.y))}),Number.isFinite(Q)&&(fe.w=Q-fe.x),Number.isFinite(L)&&(fe.h=L-fe.y)}}Ze||(fe.w=se,fe.h=ee),Me==="resizestart"||Me==="resizemove"?(u.placeholder.i=He,u.placeholder.x=De,u.placeholder.y=A,u.placeholder.w=fe.w,u.placeholder.h=fe.h,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):Me&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ge(),cn(g.value,r.verticalCompact),V.emit("compact"),le(),Me==="resizeend"&&d("layout-updated",g.value)}function ge(){const Me=Jd(r.breakpoints,u.width);if(Me===u.lastBreakpoint)return;const He=Gr(Me,r.cols);!pa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const De=Zd(u.originalLayout,u.layouts,r.breakpoints,Me,u.lastBreakpoint,He,r.verticalCompact);u.layouts[Me]=De,u.lastBreakpoint!==Me&&d("breakpoint-changed",Me,De),g.value=De,d("update:layout",De),u.lastBreakpoint=Me,V.emit("setColNum",He)}function Je(){u.layouts=Object.assign({},r.responsiveLayouts)}function st(Me,He){const De=new Set(He.map(fe=>fe.i)),A=new Set(Me.map(fe=>fe.i)),ee=Me.filter(fe=>!De.has(fe.i)),se=He.filter(fe=>!A.has(fe.i));return ee.concat(se)}return(Me,He)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Me.$slots.default?e.renderSlot(Me.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,De=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:De.i,ref_for:!0},De),{default:e.withCtx(()=>[e.renderSlot(Me.$slots,"item",{item:De})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.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(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Fp={key:0,class:"item-view-group"},Rp={key:0,class:"item-view-group"},Pp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=$t.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,b=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,J,O,ke;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((J=u==null?void 0:u.children)!=null&&J.every(X=>X==null?void 0:X.layout))?(ke=(O=u==null?void 0:u.children)==null?void 0:O[0])==null?void 0:ke.layout:"vertical"}),f=e.computed(()=>{var R,J;return((J=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:J.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=R=>{d("rowClick",R)},V=(R,J)=>{d("routeUrl",R,J)};return(R,J)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:b.value,"onUpdate:layout":J[0]||(J[0]=O=>b.value=O),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(O,ke)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var X,K,le,D,$,y,B,E,ge,Je,st,Me,He;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((le=(K=O==null?void 0:O.component)==null?void 0:K.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((D=O==null?void 0:O.component)!=null&&D.name)?(e.openBlock(),e.createElementBlock("div",Fp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(($=O==null?void 0:O.component)==null?void 0:$.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)((y=O==null?void 0:O.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(B=e.unref(vt)[ke])==null?void 0:B.showIndex,allowMove:(E=e.unref(vt)[ke])==null?void 0:E.allowMove,viewport:(ge=e.unref(vt)[ke])==null?void 0:ge.viewport},compName:O==null?void 0:O.component.name,compNames:e.unref(yo),itemData:(Je=O==null?void 0:O.component)==null?void 0:Je.compData,childItemData:(st=O==null?void 0:O.component)==null?void 0:st.itemChildData,key:e.unref(pn),cacheNewData:e.unref(wn),onChange:e.unref(Gn),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(Me=O==null?void 0:O.component)==null?void 0:Me.tableId,allMapContents:e.unref(Hn),children:(He=O==null?void 0:O.component)==null?void 0:He.children,level:x.value,onRowClick:_,onRouteUrl:V,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(Lr)},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"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(O,ke)=>{var X,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(O==null?void 0:O.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((X=u==null?void 0:u.children)==null?void 0:X.length)-1?"0px":"24px"})},[((K=O==null?void 0:O.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&O.name?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(O.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(O.comp)),{compName:O.name,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,key:e.unref(pn),onChange:e.unref(Gn),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:O==null?void 0:O.tableId,allMapContents:e.unref(Hn),children:O==null?void 0:O.children,level:x.value,onRowClick:_,onRouteUrl:V},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$p=zt._export_sfc(Pp,[["__scopeId","data-v-e672653d"]]),rl=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"}]),Kp={TABLE:bn.ssTable,FORM:Mo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:Lo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Ao.ssAvatar,SIGNATURE:Ao.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:Lo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:ju,LAYOUT:Cd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return Kp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Sr;exports.activeStepInfo=un;exports.addSelectMenu=eo;exports.affixItems=rd;exports.allMapContents=Hn;exports.cacheNewData=wn;exports.clickMainKey=Lr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=pn;exports.compNames=yo;exports.compShow=Wn;exports.debounce=vo;exports.existLayouts=vd;exports.generateLayouts=ys;exports.getComponent=on;exports.getComponents=qn;exports.getSliceContLength=bd;exports.gridRowHeight=fs;exports.isStepLayout=bo;exports.isUndefined=yr;exports.onBack=ad;exports.onChange=Gn;exports.onClick=nd;exports.onContentChange=Xn;exports.onExtendTaskEnd=fd;exports.onPageBack=gd;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Jt;exports.setComponent=Ir;exports.showItems=vt;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=kd;exports.toolBar=Ba;exports.verifyButton=md;