ss-component-new 1.3.76 → 1.3.78

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 (117) hide show
  1. package/dist/{MTLLoader-DYLUvPra.js → MTLLoader-Bkr7rTJW.js} +1 -1
  2. package/dist/{MTLLoader-D1uo8mcW.cjs → MTLLoader-ByAfB26z.cjs} +1 -1
  3. package/dist/{OrbitControls-B4mz4dJ8.cjs → OrbitControls-BcfNtf3a.cjs} +1 -1
  4. package/dist/{OrbitControls-Cd9ZVfIV.js → OrbitControls-goGQ9Lfs.js} +1 -1
  5. package/dist/{URDFLoader-BfRhERaC.js → URDFLoader-d1AzVQ5F.js} +2 -2
  6. package/dist/{URDFLoader-BnH2w4x6.cjs → URDFLoader-nyfij85d.cjs} +1 -1
  7. package/dist/{animationData-CjVloDDN.cjs → animationData-Cew-c11l.cjs} +1 -1
  8. package/dist/{animationData-CO_7EKV4.js → animationData-Sok20fOI.js} +2 -2
  9. package/dist/{array-Xb-5MHCa.js → array-BkHYCyls.js} +45 -45
  10. package/dist/{array-DtmeNOPn.cjs → array-CCxIPliQ.cjs} +1 -1
  11. package/dist/{iconfont-CD3omIZU.js → iconfont-CJoblcL2.js} +2 -2
  12. package/dist/{iconfont-CkpU7gNh.cjs → iconfont-DZ9KiHjj.cjs} +1 -1
  13. package/dist/{index-IYg_iR8H.cjs → index-2B1wHje0.cjs} +1 -1
  14. package/dist/{index-C55GyDvp.js → index-5CdDKPk6.js} +2 -2
  15. package/dist/{index-B_kCqo4M.cjs → index-AHbRUQqE.cjs} +1 -1
  16. package/dist/{index-B-A_4_n_.cjs → index-B7cNKrrU.cjs} +1 -1
  17. package/dist/{index-CFCn1Gpd.cjs → index-BAelm3VG.cjs} +1 -1
  18. package/dist/index-BFvOrU__.cjs +19 -0
  19. package/dist/{index-lz-ekKYh.js → index-BHrQS0PO.js} +1 -1
  20. package/dist/{index-wv1wwLNX.cjs → index-BIbLwf-J.cjs} +1 -1
  21. package/dist/{index-BLqnYCsi.js → index-BPmWhs0O.js} +2 -2
  22. package/dist/{index-pWdzgg-b.cjs → index-BQ5LLLCI.cjs} +1 -1
  23. package/dist/{index-BQEvzo4s.cjs → index-BQWGBLrD.cjs} +1 -1
  24. package/dist/{index-DJg5d7ei.cjs → index-BRPLPxlx.cjs} +1 -1
  25. package/dist/{index-CW-lwsDk.cjs → index-BVh3Ylgt.cjs} +1 -1
  26. package/dist/{index-C5WqP8vL.cjs → index-BZqkclA9.cjs} +1 -1
  27. package/dist/{index-BRyE_Lab.cjs → index-BgKqiFcg.cjs} +1 -1
  28. package/dist/{index-BkipVGFw.js → index-Bj7H-CHU.js} +4 -4
  29. package/dist/{index-DtJC43XK.cjs → index-BysdHzB7.cjs} +1 -1
  30. package/dist/{index-CVCJuzlD.cjs → index-C036vLtM.cjs} +1 -1
  31. package/dist/index-C5pQXH0_.cjs +11 -0
  32. package/dist/{index-C-iUVY59.js → index-CGpIY6jB.js} +2074 -2021
  33. package/dist/{index-DxGZaHuy.js → index-CI8pzqx6.js} +6 -6
  34. package/dist/{index-jiFqoYN9.js → index-CIGrCpB_.js} +8 -8
  35. package/dist/{index-j1S7YTh5.cjs → index-CInkQ8cP.cjs} +1 -1
  36. package/dist/index-CM8Na0Nb.js +12905 -0
  37. package/dist/{index-BrLLsp39.js → index-CNLUhFlr.js} +2 -2
  38. package/dist/{index-Dysx8GkS.js → index-CST5bbhY.js} +3 -3
  39. package/dist/{index-mdJtPr2-.js → index-CWY9HxrG.js} +1 -1
  40. package/dist/{index-DYqVJN3W.js → index-ChiYyt8L.js} +2 -2
  41. package/dist/index-CjCqvZ07.cjs +11 -0
  42. package/dist/index-Cuw9DLEb.cjs +1 -0
  43. package/dist/{index-CI_UVQ4Z.js → index-D0aKEqnU.js} +4 -4
  44. package/dist/{index-5dvr_F6Q.cjs → index-D7GkHVm4.cjs} +1 -1
  45. package/dist/{index-DhSdgyHz.cjs → index-D8DcUSsZ.cjs} +1 -1
  46. package/dist/{index-u7JCx5KX.cjs → index-D8k54p_x.cjs} +1 -1
  47. package/dist/{index-COyNONVE.js → index-D9hditHi.js} +11 -7
  48. package/dist/{index-BFtGkyJf.js → index-DBh4mbmL.js} +3881 -3898
  49. package/dist/{index-DcqWejmU.cjs → index-DHdrBDP4.cjs} +1 -1
  50. package/dist/{index-Cfzc5_ZK.js → index-DLGxv8po.js} +4 -4
  51. package/dist/{index-nlfIt66y.cjs → index-DXxZIqBP.cjs} +1 -1
  52. package/dist/{index-X_HnLtRC.js → index-DaWzSNzm.js} +1 -1
  53. package/dist/{index-BLeSUjbB.js → index-DijK6RWK.js} +4 -4
  54. package/dist/{index-BulgFj9c.cjs → index-DilZmA-l.cjs} +1 -1
  55. package/dist/{index-B_uWA5AJ.js → index-Dld88iXe.js} +1 -1
  56. package/dist/{index-CeXyg5Rl.cjs → index-Dlob1bxY.cjs} +1 -1
  57. package/dist/{index-0HSo1RHX.js → index-DmeZpSGM.js} +5 -5
  58. package/dist/{index-CMdeEau9.js → index-DnMPqjrX.js} +4 -4
  59. package/dist/{index-DPjDv9Ws.cjs → index-DsymuEzu.cjs} +13 -13
  60. package/dist/{index-B5i-XCGU.js → index-Dyhg1YNv.js} +1 -1
  61. package/dist/{index-C3gtImRs.js → index-EtZh1qtq.js} +2 -2
  62. package/dist/{index-ChBgkXqb.js → index-G0nsjixB.js} +8 -8
  63. package/dist/{index-BYyFrGfX.js → index-JAXzKk2F.js} +1 -1
  64. package/dist/{index-jkHlUTog.js → index-K1n-pA4G.js} +2545 -2616
  65. package/dist/index-KEXDCkKc.js +8139 -0
  66. package/dist/{index-B-nrai8J.cjs → index-M_FLMoBh.cjs} +1 -1
  67. package/dist/index-TvWbGp-2.cjs +1 -0
  68. package/dist/{index-sHmgudEg.js → index-XSETNP_T.js} +1 -1
  69. package/dist/{index-D03MbrNK.cjs → index-cKFeu5XW.cjs} +1 -1
  70. package/dist/{index-CAD9KqHl.cjs → index-eUZKu-7F.cjs} +1 -1
  71. package/dist/{index-BfOeLrc4.cjs → index-fwa9LBX5.cjs} +1 -1
  72. package/dist/{index-vURW-4ky.js → index-oJEY_fSN.js} +12 -12
  73. package/dist/{index--D0Thf0J.js → index-rCV_Ea-P.js} +1 -1
  74. package/dist/{index-DMfz6Qrm.js → index-t9jd4l9Q.js} +2 -2
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dj8zYuMh.cjs → index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-Ceq-4YAl.cjs} +49 -49
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CU0erI7U.js → index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-DljCMBcU.js} +2076 -2071
  77. package/dist/{index.vue_vue_type_style_index_1_lang-DsZZR0tg.cjs → index.vue_vue_type_style_index_1_lang-D9kYnXoD.cjs} +1 -1
  78. package/dist/{index.vue_vue_type_style_index_1_lang-CCQPqKHr.js → index.vue_vue_type_style_index_1_lang-DDUoM--M.js} +5 -5
  79. package/dist/{isString-DhPkQDQg.cjs → isString-Cdf6R00a.cjs} +1 -1
  80. package/dist/{isString-Bn5VcA2n.js → isString-D4Yi9bDE.js} +1 -1
  81. package/dist/{main-j2YKSWX-.cjs → main-DDI-kRzh.cjs} +3 -3
  82. package/dist/{main-BLk4Mfi1.js → main-DKugsEJQ.js} +4 -4
  83. package/dist/{menuIndex-D332F0dw.cjs → menuIndex-BVHXKOLk.cjs} +1 -1
  84. package/dist/{menuIndex-BJ1CSzli.js → menuIndex-BvSKgV5f.js} +1 -1
  85. package/dist/obj/model.mtl +42 -0
  86. package/dist/obj/model.obj +26110 -0
  87. package/dist/ss-component.cjs +1 -1
  88. package/dist/ss-component.css +2 -2
  89. package/dist/ss-component.js +11 -11
  90. package/dist/ss-component2.cjs +1 -1
  91. package/dist/ss-component2.js +13 -13
  92. package/dist/{threeModel-C3N_ghfY.cjs → threeModel-BC_JZ1RV.cjs} +1 -1
  93. package/dist/{threeModel-v33sxEBl.js → threeModel-BwWSWObs.js} +6 -6
  94. package/dist/{threePreview-DNw547cG.js → threePreview-CfyAicAQ.js} +5 -5
  95. package/dist/{threePreview-Dif-1kRY.cjs → threePreview-mSNaLCWp.cjs} +1 -1
  96. package/dist/{threeSceneView-iXMcW_Z9.cjs → threeSceneView-66dCWgEi.cjs} +1 -1
  97. package/dist/{threeSceneView-BkGy9bnz.js → threeSceneView-Dbr2KLMM.js} +11 -11
  98. package/dist/{threeSceneViewForCPMPIP-Bjimwk9q.cjs → threeSceneViewForCPMPIP-BzMYLFuK.cjs} +1 -1
  99. package/dist/{threeSceneViewForCPMPIP-qP-6IJzE.js → threeSceneViewForCPMPIP-tPswynXd.js} +9 -9
  100. package/dist/{threeTrackPathView-Cqrx2pEK.cjs → threeTrackPathView-C65T-bEd.cjs} +1 -1
  101. package/dist/{threeTrackPathView-wK0hwn3B.js → threeTrackPathView-CZt3mY2y.js} +6 -6
  102. package/dist/{threeViewerHost-B2fHt8c2.js → threeViewerHost-D2qSyCw-.js} +3 -3
  103. package/dist/{threeViewerHost-RuZpxQGN.cjs → threeViewerHost-DtuM2v2G.cjs} +1 -1
  104. package/dist/{urdfTree-i-8eGN0m.js → urdfTree-BCj0sPXo.js} +1 -1
  105. package/dist/{urdfTree-CnVw_qic.cjs → urdfTree-UVAVh9q0.cjs} +1 -1
  106. package/dist/{workpieceTreePanel-auNIy7t8.cjs → workpieceTreePanel-BtxWzOMx.cjs} +1 -1
  107. package/dist/{workpieceTreePanel-Cy1eCrLl.js → workpieceTreePanel-CrpY18jo.js} +4 -4
  108. package/package.json +1 -1
  109. package/public/obj/model.mtl +42 -0
  110. package/public/obj/model.obj +26110 -0
  111. package/dist/index-BGuyjj26.cjs +0 -1
  112. package/dist/index-CLTriF5O.cjs +0 -11
  113. package/dist/index-CSUpvfmH.js +0 -12750
  114. package/dist/index-CcJb2uXu.js +0 -8191
  115. package/dist/index-DbFGGKSI.cjs +0 -1
  116. package/dist/index-Dc6Q0f3F.cjs +0 -11
  117. package/dist/index-HCKkRTvn.cjs +0 -19
@@ -0,0 +1,11 @@
1
+ "use strict";const oa=require("./index-BFvOrU__.cjs"),e=require("vue"),T=require("./index-fwa9LBX5.cjs"),Nt=require("./index-DsymuEzu.cjs"),ct=require("./index-C5pQXH0_.cjs"),Me=require("./index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-Ceq-4YAl.cjs"),Gt=require("./index-eUZKu-7F.cjs"),No=require("./threeViewerHost-DtuM2v2G.cjs");require("./index.vue_vue_type_style_index_1_lang-D9kYnXoD.cjs");const zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-Cdf6R00a.cjs"),Vo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Oo=require("./index-2B1wHje0.cjs"),bl=require("./index-BVaHwt5f.cjs"),Hr=require("./index-CInkQ8cP.cjs"),Ba=require("./index-TvWbGp-2.cjs"),qr=require("./index-BpPyaNFa.cjs"),Xr=require("vue-router"),wn=require("./index-9hspBVrQ.cjs"),Yr=require("./menuIndex-BVHXKOLk.cjs"),ao=require("./index-D8DcUSsZ.cjs");var Gr=/\s/;function Jr(a){for(var r=a.length;r--&&Gr.test(a.charAt(r)););return r}var Zr=/^\s+/;function Qr(a){return a&&a.slice(0,Jr(a)+1).replace(Zr,"")}var Mo=NaN,ei=/^[-+]0x[0-9a-f]+$/i,ti=/^0b[01]+$/i,ai=/^0o[0-7]+$/i,ni=parseInt;function zo(a){if(typeof a=="number")return a;if(ct.isSymbol(a))return Mo;if(ct.isObject(a)){var r=typeof a.valueOf=="function"?a.valueOf():a;a=ct.isObject(r)?r+"":r}if(typeof a!="string")return a===0?a:+a;a=Qr(a);var i=ti.test(a);return i||ai.test(a)?ni(a.slice(2),i?2:8):ei.test(a)?Mo:+a}var no=function(){return ct.root.Date.now()},oi="Expected a function",li=Math.max,ri=Math.min;function kl(a,r,i){var l,s,c,y,f,p,x=0,_=!1,E=!1,N=!0;if(typeof a!="function")throw new TypeError(oi);r=zo(r)||0,ct.isObject(i)&&(_=!!i.leading,E="maxWait"in i,c=E?li(zo(i.maxWait)||0,r):c,N="trailing"in i?!!i.trailing:N);function K(S){var b=l,ie=s;return l=s=void 0,x=S,y=a.apply(ie,b),y}function $(S){return x=S,f=setTimeout(P,r),_?K(S):y}function ee(S){var b=S-p,ie=S-x,Te=r-b;return E?ri(Te,c-ie):Te}function F(S){var b=S-p,ie=S-x;return p===void 0||b>=r||b<0||E&&ie>=c}function P(){var S=no();if(F(S))return R(S);f=setTimeout(P,ee(S))}function R(S){return f=void 0,N&&l?K(S):(l=s=void 0,y)}function m(){f!==void 0&&clearTimeout(f),x=0,l=p=s=f=void 0}function v(){return f===void 0?y:R(no())}function g(){var S=no(),b=F(S);if(l=arguments,s=this,p=S,b){if(f===void 0)return $(p);if(E)return clearTimeout(f),f=setTimeout(P,r),K(p)}return f===void 0&&(f=setTimeout(P,r)),y}return g.cancel=m,g.flush=v,g}var ii="[object Boolean]";function xl(a){return a===!0||a===!1||ct.isObjectLike(a)&&ct.baseGetTag(a)==ii}function si(a){return a===void 0}const ci={class:"statistics-cards-container"},ui={class:"statistics-label"},di={class:"statistics-value"},pi=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("div",ci,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:s},[e.createElementVNode("div",ui,e.toDisplayString(l==null?void 0:l.label),1),e.createElementVNode("div",di,e.toDisplayString((l==null?void 0:l.value)??0),1)]))),128))]))}}),fi=zt._export_sfc(pi,[["__scopeId","data-v-f54ed8af"]]),hi={class:"static-form-card"},vi={key:0,class:"static-form-body"},mi={class:"static-form-label"},gi={class:"static-form-value"},yi={key:1},bi={key:1,class:"static-form-empty"},ki=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},compName:{default:""},title:{default:""}},setup(a){const r=a,i=s=>{switch(s){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},l=e.computed(()=>{var y;const s=(y=r.itemData)==null?void 0:y.find(f=>(f==null?void 0:f.key)==="formContent");return((s==null?void 0:s.contents)||[]).filter(f=>!(f!=null&&f.isFormColHidden)&&(f==null?void 0:f.label)).map(f=>{let p=f==null?void 0:f.value;Array.isArray(p)&&(p=p.map(N=>N==null?"":typeof N=="object"?N.label??N.value??N.name??JSON.stringify(N):String(N)).filter(Boolean).join(",")),p!=null&&typeof p=="object"&&(p=p.label??p.value??p.name??JSON.stringify(p));const x=f.label??"",_=p??"",E=x==="使用状态";return{label:x,value:_,isStatus:E,tagType:E?i(_):""}})});return(s,c)=>{const y=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",hi,[l.value.length?(e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(f,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"static-form-item"},[e.createElementVNode("div",mi,e.toDisplayString(f.label)+": ",1),e.createElementVNode("div",gi,[f.isStatus?(e.openBlock(),e.createBlock(y,{key:0,type:f.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",yi,e.toDisplayString(f.value??"-"),1))])]))),128))])):(e.openBlock(),e.createElementBlock("div",bi," 暂无数据 "))])}}}),wl=zt._export_sfc(ki,[["__scopeId","data-v-d92a85c0"]]),xi={class:"form-content"},wi={title:"选择标签"},Di={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},_i={class:"col-operate-wrap"},Ei={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Ci={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:r}){const i=()=>{y.value=!1,f.value=!1,p.value=[]},l=a;e.computed(()=>{var Y;const j=(Y=O.value)==null?void 0:Y.split("/");return(j==null?void 0:j.some(_e=>(_e==null?void 0:_e.includes("updateLoading"))||(_e==null?void 0:_e.includes("loading"))))?!1:z.value==="view"});const s=r,c=e.ref([]),y=e.ref(!1),f=e.ref(!1),p=e.ref([]),{getFileExtension:x}=No.useThreeSystem(),_=e.ref(),E=e.ref(!1),N=e.ref(!1),K=Me.useUnit(T.pinia),{chooseTitle:$}=T.storeToRefs(K),ee=e.ref([]),F=e.ref(),P=e.ref(!1),R=e.ref([]),m=oa.useFormToTableComp(T.pinia),v=oa.useFormComp(T.pinia),g=e.ref(!1),S=e.ref(),b=T.useLoginState(T.pinia),{loginUserInfo:ie}=T.storeToRefs(b),Te=e.ref(),Ze=e.ref(!0),ke=T.useModelComp(T.pinia),{tableViewContents:Pe,itemData:Ne,isEdit:z,routeToChildPath:re,lockingPage:Q}=T.storeToRefs(ke),de=e.ref(null),ze=e.ref(!1),Qe=e.ref(!1),J=T.useMenuState(),{activeMenuPath:O}=T.storeToRefs(J),W=Me.useOriginalState(T.pinia),{originalPath:ce}=T.storeToRefs(W),xe=e.computed(()=>O.value==="设备管理/试验设备"&&l.compName==="设备概要"),be=e.ref([]),Ke=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),G=async j=>{Qe.value=j,await ae("disabled",null,j,!0)},Z=async j=>{await ae("operable",null,j,!0)};e.watch(()=>O.value,async()=>{c.value=[],p.value=[]},{deep:!0,immediate:!0});const k=()=>{e.nextTick(()=>{se()})},we=j=>{var H;c.value=(H=c.value)==null?void 0:H.map(Y=>({...Y,isFormColHidden:!(j!=null&&j.includes(Y.label))}))};e.onUnmounted(()=>{de.value=null});const Ie=j=>{s("clickTrigger",j)},ue=async j=>{var H,Y,_e,me,q,ve;if(j===""){let le="";(H=c.value)==null||H.forEach(L=>{L!=null&&L.isMain&&(le=L==null?void 0:L.value)});let Ve=await Me.getItemData(re.value,sessionStorage.getItem("systemKey"),"");le=((ve=(q=(me=(_e=(Y=Ve==null?void 0:Ve[0])==null?void 0:Y.compData)==null?void 0:_e.find(L=>(L==null?void 0:L.key)==="mainRouters"))==null?void 0:me.contents)==null?void 0:q[0])==null?void 0:ve.routerContent)+ce.value+le;let Be=await Me.getItemData(le,sessionStorage.getItem("systemKey"),"");P.value=!0,R.value=Be==null?void 0:Be.filter(L=>(L==null?void 0:L.comp)!=="methodButton"),s("routeUrl",R.value)}},se=()=>{var H;const j=(H=de.value)==null?void 0:H.$el;j&&Me.Sortable.create(j,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Y=>{const{oldIndex:_e,newIndex:me}=Y;if(_e===me)return;const q=c.value.splice(_e,1)[0];c.value.splice(me,0,q)}})},ae=async(j,H,Y,_e=!1)=>{try{ke.setRefreshCurStructure(!1)}catch{ct.ElMessage.error("编辑处理失败")}},fe=async(j,H)=>{await ae()},Ce=async(j,H)=>{j&&await ae()},Ge=async(j,H,Y)=>{await ae(H,Y,j,!1)},dt=(j,H)=>{Te.value===H?Ze.value=!1:Ze.value=!0,Te.value=H==null?void 0:H.changeProp},w=async j=>{var Y,_e,me,q,ve,le,Ve,he,Be,L,Oe,ge,We,st,Ye;let H=[];if((Y=j==null?void 0:j.toString())!=null&&Y.includes(".urdf")){if(j.includes(",")){ct.ElMessage.error("当前版本仅允许单个urdf预览!");return}p.value=[{url:j,extension:x(j)}],f.value=!0,y.value=!0;return}if((_e=j==null?void 0:j.toString())!=null&&_e.includes(".stl")||(me=j==null?void 0:j.toString())!=null&&me.includes(".STL")||(q=j==null?void 0:j.toString())!=null&&q.includes(".obj")||(ve=j==null?void 0:j.toString())!=null&&ve.includes(".mtl")){const Ae=((le=j==null?void 0:j.toString())==null?void 0:le.split(",")).map(pt=>({url:pt,extension:x(pt)}));p.value=Ae,f.value=!1,y.value=!0;return}if((Ve=j==null?void 0:j.toString())!=null&&Ve.includes(".stl")||(he=j==null?void 0:j.toString())!=null&&he.includes(".STL")||(Be=j==null?void 0:j.toString())!=null&&Be.includes(".obj")||(L=j==null?void 0:j.toString())!=null&&L.includes(".mtl")){let tt,Ae=[],pt={};if(Array.isArray(j)?tt=j:tt=j==null?void 0:j.split(","),tt==null||tt.forEach(Je=>{Je.includes(".mtl")?Ae.push(Je):pt.blob=pt.blob?pt.blob+","+Je:Je}),(Ae==null?void 0:Ae.length)>0&&(pt.mtlBlobs=Ae),(ge=(Oe=Object.values(pt))==null?void 0:Oe[0])!=null&&ge.includes("http:"))H.push(pt);else{const Je=new Blob([pt.blob],{type:"application/octet-stream;charset=UTF-8"});let $e=URL.createObjectURL(Je),rt="";(We=j==null?void 0:j.split("/"))==null||We.forEach((mt,wt)=>{var He;wt===((He=j==null?void 0:j.split("/"))==null?void 0:He.length)-1&&(rt=mt)}),(st=pt.blob)!=null&&st.includes(".stl")&&(rt=(rt==null?void 0:rt.replaceAll(">",""))+".urdf"),F.value=[{name:rt,blobUrl:$e}],N.value=!0}}else{const tt=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ae=await ct.axios.get(j,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{tt.close()}),pt=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"});let Je=URL.createObjectURL(pt),$e="";(Ye=j==null?void 0:j.split("/"))==null||Ye.forEach((rt,mt)=>{var wt;mt===((wt=j==null?void 0:j.split("/"))==null?void 0:wt.length)-1&&($e=rt)}),F.value=[{name:$e,blobUrl:Je}],N.value=!0}(H==null?void 0:H.length)>0&&v.setBlobUrls(H)},I=()=>{N.value=!1},X=j=>{var q,ve,le,Ve;const H=(ve=(q=T.cloneDeep(l.itemData))==null?void 0:q.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:ve.contents,Y=T.cloneDeep(j.content);let _e={};Y&&((le=Object.values(Y))==null?void 0:le.length)>0&&((Ve=Object.values(Y))==null||Ve.forEach((he,Be)=>{_e[H[Be].key]=he}));const me={content:_e,index:l==null?void 0:l.index,buttonName:j==null?void 0:j.buttonName};s("change",me)},ne=e.computed(()=>"http://222.92.178.198:62001"),B=async j=>{var Oe,ge,We,st,Ye,tt,Ae,pt,Je,$e,rt,mt,wt,He,ot,bt;if(!j)return;(ge=(Oe=l==null?void 0:l.itemData)==null?void 0:Oe.find(Fe=>(Fe==null?void 0:Fe.key)==="parentFormPath"))==null||ge.contents;let H=Pe.value;(H==null?void 0:H.length)>0&&(H=H==null?void 0:H.map(Fe=>{var Xe,Se,V,ye;let Ue=(Xe=Fe==null?void 0:Fe.key)==null?void 0:Xe.split("/");return(l==null?void 0:l.compName)===(Ue==null?void 0:Ue[0])&&(Se=c.value)!=null&&Se.find(De=>(De==null?void 0:De.prop)===(Ue==null?void 0:Ue[1]))&&(Fe.value=(ye=(V=c.value)==null?void 0:V.find(De=>(De==null?void 0:De.prop)===(Ue==null?void 0:Ue[1])))==null?void 0:ye.value),Fe}),ke.setTableViewContents(H));const Y=T.cloneDeep(l.itemData);let _e=Y==null?void 0:Y.map(Fe=>{var Ue;return(Fe==null?void 0:Fe.key)==="formContent"&&((Ue=Fe.contents)==null||Ue.map((Xe,Se)=>{var V,ye,De,at,et,Et,_t,ut,ft,vt,yt,$t,kt,Rt,Pt,Kt,Ht,Jt,ta;return Xe.type=(ye=(V=c.value)==null?void 0:V.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:ye.type,Xe.options=Xe!=null&&Xe.options?Xe.options:((et=(at=(De=Xe==null?void 0:Xe.key)==null?void 0:De.split("$"))==null?void 0:at[1])==null?void 0:et.length)>0?(ft=(ut=oa.formGetOptions((_t=(Et=Xe==null?void 0:Xe.key)==null?void 0:Et.split("$"))==null?void 0:_t[1]))==null?void 0:ut.split(","))==null?void 0:ft.map(jt=>({label:jt,value:jt})):[],(vt=Xe==null?void 0:Xe.key)!=null&&vt.includes("$")&&(Xe.key=($t=(yt=Xe==null?void 0:Xe.key)==null?void 0:yt.split("$"))==null?void 0:$t[0]),Xe.signature=(Rt=(kt=c.value)==null?void 0:kt.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Rt.signature,Xe.isLoginUser=(Kt=(Pt=c.value)==null?void 0:Pt.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Kt.isLoginUser,Xe.value=(Ht=Object.values(j))==null?void 0:Ht[Se],Xe.isFormColHidden=(ta=(Jt=c.value)==null?void 0:Jt.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:ta.isFormColHidden,Xe})),Fe}),me=c.value,q=(st=(We=T.cloneDeep(_e))==null?void 0:We.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:st.contents;if(me=me==null?void 0:me.map(Fe=>{var Ue;return Fe.value=(Ue=q==null?void 0:q.find((Xe,Se)=>((Xe==null?void 0:Xe.id)??Se)===(Fe==null?void 0:Fe.id)))==null?void 0:Ue.value,Fe}),!Ze.value){s("contentChange",{contents:_e,index:l.index});return}let ve="",le=(Ae=(tt=(Ye=T.cloneDeep(_e))==null?void 0:Ye.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ae.find((Fe,Ue)=>{var Xe,Se,V;return(Fe==null?void 0:Fe.label)===Te.value||Ue.toString()===((V=(Se=(Xe=Te.value)==null?void 0:Xe.split("t"))==null?void 0:Se[1])==null?void 0:V.toString())}),Ve=(pt=le==null?void 0:le.optionUrl)==null?void 0:pt.menuSelect,he=!0;if((rt=($e=(Je=T.cloneDeep(_e))==null?void 0:Je.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:$e.contents)==null||rt.forEach(Fe=>{var Ue,Xe,Se,V,ye,De;he&&((Se=(Xe=(Ue=Fe==null?void 0:Fe.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:Xe[1])!=null&&Se.includes("["))&&(ve=(ye=(V=Fe==null?void 0:Fe.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ye[1],JSON.stringify(Ve)===JSON.stringify((De=Fe==null?void 0:Fe.optionUrl)==null?void 0:De.menuSelect)&&(he=!1))}),(mt=le==null?void 0:le.optionUrl)!=null&&mt.menuSelect&&Ze.value){let Fe=await oa.getSelectRow(le),Ue,Xe=(wt=le==null?void 0:le.optionUrl)==null?void 0:wt.menuSelect;if(Fe==null||Fe.forEach(Se=>{var V,ye,De,at,et,Et,_t,ut,ft,vt;ve===((ye=(V=le==null?void 0:le.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ye[1])&&((et=(at=(De=le==null?void 0:le.optionUrl)==null?void 0:De.groupSelect)==null?void 0:at[1])!=null&&et.includes("["))&&((vt=T.cloneDeep(Se))==null?void 0:vt[(ft=(ut=(_t=(Et=le==null?void 0:le.optionUrl)==null?void 0:Et.groupSelect)==null?void 0:_t[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:ft.replaceAll("]","")])===(le==null?void 0:le.value)&&(Ue=Se)}),Ue){let Se=T.cloneDeep(me);Se=Se==null?void 0:Se.map(ye=>{var De,at,et,Et,_t,ut,ft,vt,yt,$t,kt;return(Ue!=null&&Ue[ye==null?void 0:ye.label]||Ue!=null&&Ue[(Et=(et=(at=(De=ye==null?void 0:ye.optionUrl)==null?void 0:De.groupSelect)==null?void 0:at[1])==null?void 0:et.replaceAll("[",""))==null?void 0:Et.replaceAll("]","")])&&((ft=(ut=(_t=ye==null?void 0:ye.optionUrl)==null?void 0:_t.groupSelect)==null?void 0:ut[1])!=null&&ft.includes("["))&&Xe!=null&&Xe.every(Rt=>{var Pt,Kt;return(Kt=(Pt=ye==null?void 0:ye.optionUrl)==null?void 0:Pt.menuSelect)==null?void 0:Kt.includes(Rt)})&&(ye.value=(Ue==null?void 0:Ue[ye==null?void 0:ye.label])||(Ue==null?void 0:Ue[(kt=($t=(yt=(vt=ye==null?void 0:ye.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:yt[1])==null?void 0:$t.replaceAll("[",""))==null?void 0:kt.replaceAll("]","")]),Array.isArray(ye.value)&&ye.value.every(Rt=>(Rt==null?void 0:Rt.url)&&(Rt==null?void 0:Rt.name))&&(ye.type="Upload")),ye}),Se=Se==null?void 0:Se.map(ye=>{var De,at,et;return(De=ye==null?void 0:ye.optionUrl)!=null&&De.oldMenuSelect&&(ye.optionUrl.menuSelect=(et=(at=T.cloneDeep(ye))==null?void 0:at.optionUrl)==null?void 0:et.oldMenuSelect),ye}),c.value=T.cloneDeep(Se);let V=T.cloneDeep(Se);V=V==null?void 0:V.map(ye=>{var De,at,et,Et,_t,ut;return(at=(De=ye==null?void 0:ye.optionUrl)==null?void 0:De.menuSelect)!=null&&at.some(ft=>ft==null?void 0:ft.includes("["))&&(ye.optionUrl.oldMenuSelect=(Et=(et=T.cloneDeep(ye))==null?void 0:et.optionUrl)==null?void 0:Et.menuSelect,ye.optionUrl.menuSelect=(ut=(_t=ye==null?void 0:ye.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:ut.map(ft=>{var vt,yt,$t,kt;if(ft!=null&&ft.includes("[")){let Rt=(yt=(vt=ft==null?void 0:ft.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:yt[1];ft=(kt=($t=T.cloneDeep(Se))==null?void 0:$t.find(Pt=>(Pt==null?void 0:Pt.label)===Rt))==null?void 0:kt.value}return ft})),ye}),c.value=V}else c.value=me;_e=_e==null?void 0:_e.map(Se=>{var V;return(Se==null?void 0:Se.key)==="formContent"&&(Se.contents=(V=Se.contents)==null?void 0:V.map(ye=>{var De,at,et,Et;return ye.value=((at=(De=c.value)==null?void 0:De.find(_t=>(_t==null?void 0:_t.label)===(ye==null?void 0:ye.key)))==null?void 0:at.value)??(ye==null?void 0:ye.value),ye.type=((Et=(et=c.value)==null?void 0:et.find(_t=>(_t==null?void 0:_t.prop)===(ye==null?void 0:ye.key)))==null?void 0:Et.type)??(ye==null?void 0:ye.type),ye})),Se})}Ze.value=!1,s("contentChange",{contents:_e,index:l.index});let Be=[],L=[];if((ot=T.cloneDeep((He=_e==null?void 0:_e.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:He.contents))==null||ot.forEach(Fe=>{var Ue;Array.isArray(Fe==null?void 0:Fe.value)&&((Ue=Fe==null?void 0:Fe.value)!=null&&Ue.find(Xe=>{var Se;return(Se=Xe==null?void 0:Xe.url)==null?void 0:Se.includes(".obj")}))&&(L=Fe==null?void 0:Fe.value)}),(L==null?void 0:L.length)>0){const Fe=(bt=T.cloneDeep(L))==null?void 0:bt.filter(Ue=>{var Xe;return(Xe=Ue==null?void 0:Ue.url)==null?void 0:Xe.includes(".obj")});Fe==null||Fe.forEach(Ue=>{var Se,V,ye,De;const Xe=(Se=L==null?void 0:L.filter(at=>{var et;return(at==null?void 0:at.name)===(Ue==null?void 0:Ue.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Se.map(at=>at==null?void 0:at.url);Be.push({objUrl:Ue==null?void 0:Ue.url,mtlUrls:((V=L==null?void 0:L.filter(at=>{var et;return(at==null?void 0:at.name)===(Ue==null?void 0:Ue.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:V.length)===1?(De=(ye=L==null?void 0:L.filter(at=>{var et;return(at==null?void 0:at.name)===(Ue==null?void 0:Ue.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:ye[0])==null?void 0:De.url:Xe})}),v.setObjUrl(Be)}},pe=j=>{if(!j)return;const H=[];let Y="";for(let _e of j)(_e.includes("[")||Y.includes("["))&&(Y+=_e.trim(),T.cloneDeep(Y).split("【").length-1===T.cloneDeep(Y).split("】").length-1&&T.cloneDeep(Y).split("[").length-1===T.cloneDeep(Y).split("]").length-1&&(H.push(Y.replace(/\/\*[\s\S]*?\*\//g,"")),Y=""));return H},Re=(j,H,Y)=>{let _e="";const me=H==null?void 0:H.map(q=>{var ve;return(ve=q==null?void 0:q.value)==null?void 0:ve.pageData});return me==null||me.forEach(q=>{var ve;(q==null?void 0:q.name)===(j==null?void 0:j[0])&&((ve=q==null?void 0:q.compData)==null||ve.forEach(le=>{var Ve;(le==null?void 0:le.key)==="formContent"&&((Ve=le==null?void 0:le.contents)==null||Ve.forEach(he=>{var Be;(he==null?void 0:he.prop)===(j==null?void 0:j[1])&&(_e=(he==null?void 0:he.value)===""?Me.judgeContents((Be=T.cloneDeep(he))==null?void 0:Be.optionUrl,Y):he==null?void 0:he.value)}))}))}),_e},oe=(j,H,Y,_e)=>{var le,Ve;let me="",q="";(le=T.cloneDeep(H))==null||le.forEach((he,Be)=>{he!=null&&he.includes("[")?q=q+ce.value+j[Be]:q=q===""?q+he:q+"/"+he});let ve=(Ve=_e[q])==null?void 0:Ve.map(he=>{var Be;return(Be=he==null?void 0:he.value)==null?void 0:Be.pageData});return ve==null||ve.forEach(he=>{var Be;(he==null?void 0:he.name)===(Y==null?void 0:Y[0])&&((Be=he==null?void 0:he.compData)==null||Be.forEach(L=>{var Oe;(L==null?void 0:L.key)==="formContent"&&((Oe=L==null?void 0:L.contents)==null||Oe.forEach(ge=>{(ge==null?void 0:ge.prop)===(Y==null?void 0:Y[1])&&(me=ge==null?void 0:ge.value)}))}))}),me};return e.watch(()=>l.itemData,async()=>{var ve,le,Ve,he,Be,L,Oe,ge,We,st,Ye,tt,Ae,pt,Je,$e,rt,mt,wt;const j=(ve=l.itemData)==null?void 0:ve.find(He=>(He==null?void 0:He.key)==="formContent"),H=(le=T.cloneDeep(l.itemData))==null?void 0:le.find(He=>(He==null?void 0:He.key)==="formButton"),Y=(Ve=T.cloneDeep(l.itemData))==null?void 0:Ve.find(He=>(He==null?void 0:He.key)==="formFlex"),_e=(he=T.cloneDeep(l.itemData))==null?void 0:he.find(He=>(He==null?void 0:He.key)==="formWrap"),me=(Be=T.cloneDeep(l.itemData))==null?void 0:Be.find(He=>(He==null?void 0:He.key)==="enableWrap");if((_e==null?void 0:_e.contents)==="纵向"?E.value=!1:E.value=!0,g.value=(me==null?void 0:me.contents)===void 0?!1:me==null?void 0:me.contents,S.value=typeof(Y==null?void 0:Y.contents)!="boolean"?!(!(Y!=null&&Y.contents)===""||((L=Y==null?void 0:Y.contents)==null?void 0:L.toUpperCase())==="VERTICAL"):Y==null?void 0:Y.contents,((Oe=j==null?void 0:j.contents)==null?void 0:Oe.length)>0&&Array.isArray(j==null?void 0:j.contents)){let He=l.allMapContents;const ot=(We=(ge=T.cloneDeep(j))==null?void 0:ge.contents)==null?void 0:We.map((V,ye)=>{var Rt,Pt,Kt,Ht,Jt,ta,jt,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma;let De=(V==null?void 0:V.label)??(V==null?void 0:V.key)??"",at=(V==null?void 0:V.type)??"",et=(V==null?void 0:V.options)??[];if((Rt=V==null?void 0:V.key)!=null&&Rt.includes("$")&&(De=(Pt=T.cloneDeep(V==null?void 0:V.key).split("$"))==null?void 0:Pt[0],((Ht=(Kt=T.cloneDeep(V==null?void 0:V.key).split("$"))==null?void 0:Kt[1])==null?void 0:Ht.length)>0)){const[Ct,aa]=(ta=(Jt=T.cloneDeep(V==null?void 0:V.key).split("$"))==null?void 0:Jt[1])==null?void 0:ta.split(/[()]/);at=((jt=Me.FormType.find(nt=>(nt==null?void 0:nt.key)===Ct))==null?void 0:jt.value)??"",((Fa=aa==null?void 0:aa.split(","))==null?void 0:Fa.length)>0&&(et=(wa=aa==null?void 0:aa.split(","))==null?void 0:wa.map(nt=>({label:nt,value:nt})))}let Et=[];V!=null&&V.contents&&!Array.isArray(V==null?void 0:V.contents)&&(Et=(Da=(ja=V==null?void 0:V.contents)==null?void 0:ja.split(","))==null?void 0:Da.map(Ct=>({label:Ct,value:Ct}))),((Ua=V==null?void 0:V.optionUrl)==null?void 0:Ua.selectRelateType)==="自定义绑定"&&(Et=(Wa=(Ka=V==null?void 0:V.optionUrl)==null?void 0:Ka.defaultSelect)==null?void 0:Wa.map(Ct=>({label:Ct,value:Ct})));let _t=!1,ut=(V==null?void 0:V.isFormColHidden)??!1,ft=Me.judgeContents((Ha=T.cloneDeep(V))==null?void 0:Ha.optionUrl,He),vt=ft!==void 0&&ft!==""?ft:V!=null&&V.originalContent&&(V==null?void 0:V.originalContent)!==""?V.originalContent:V!=null&&V.value?V.value:(et==null?void 0:et.length)>0?(qa=et==null?void 0:et[0])==null?void 0:qa.value:(V==null?void 0:V.value)??"",yt=!1,$t=ft!==void 0||at===""?"Input":at;if((Array.isArray(ft)&&(ft!=null&&ft.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url))))&&($t="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||V!=null&&V.isLoginUser)_t=!0,vt=((Na=ie.value)==null?void 0:Na.姓名)||((ya=ie.value)==null?void 0:ya.account)||((fa=ie.value)==null?void 0:fa.账号)||((_a=ie.value)==null?void 0:_a.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||V!=null&&V.signature||V!=null&&V.isShow)if(yt=!0,(V==null?void 0:V.isShow)==="originalSignature")$t="image",vt=ne.value+"/"+((ba=ie.value)==null?void 0:ba.signature);else{let Ct=[...new Set(pe(V.isShow))].map(St=>{var It,Mt,Lt,At;return{key:(At=(Lt=(Mt=(It=St==null?void 0:St.split("["))==null?void 0:It[1])==null?void 0:Mt.split("]"))==null?void 0:Lt[0])==null?void 0:At.split(":"),value:""}});(ca=Ne.value)==null||ca.forEach(St=>{Ct==null||Ct.forEach((Dt,It)=>{var Lt;let Mt=Dt==null?void 0:Dt.key;(St==null?void 0:St.name)===(Mt==null?void 0:Mt[0].replaceAll("'",""))&&((Lt=St==null?void 0:St.compData)==null||Lt.forEach(At=>{var na;(At==null?void 0:At.key)==="formContent"&&((na=At==null?void 0:At.contents)==null||na.forEach(Yt=>{(Yt==null?void 0:Yt.prop)===(Mt==null?void 0:Mt[1].replaceAll("'",""))&&(Ct[It].value=Yt==null?void 0:Yt.value)}))}))})});let aa=Ct==null?void 0:Ct.map(St=>{var Dt;return St.key="["+((Dt=St.key)==null?void 0:Dt.join(":"))+"]",St}),nt=V==null?void 0:V.isShow;aa==null||aa.forEach(St=>{St!=null&&St.value?nt=nt.replaceAll(St==null?void 0:St.key,"'"+(St==null?void 0:St.value)+"'"):nt=nt.replaceAll(St==null?void 0:St.key,"undefined")}),nt!=null&&nt.includes("(")||(nt!=null&&nt.includes("==")?nt=((ma=nt==null?void 0:nt.split("==="))==null?void 0:ma[0])+"==='"+((Xa=nt==null?void 0:nt.split("==="))==null?void 0:Xa[1])+"'":nt=((Aa=nt==null?void 0:nt.split("="))==null?void 0:Aa[0])+"='"+((Va=nt==null?void 0:nt.split("="))==null?void 0:Va[1])+"'"),nt!=null&&nt.includes("=")&&!(nt!=null&&nt.includes("=="))&&!(nt!=null&&nt.includes("==="))&&(nt=nt==null?void 0:nt.replaceAll("=","==")),new Function(`if (${nt}) { return true } else { return false }`)()?(ut=!1,$t="image",vt=ne.value+"/"+((Ea=ie.value)==null?void 0:Ea.signature)):vt=""}return Array.isArray(vt)&&vt.every(Ct=>(Ct==null?void 0:Ct.url)&&(Ct==null?void 0:Ct.name))&&(V.type="Upload"),V!=null&&V.isMainUrl&&($t="Url"),{label:De??"",name:"t"+ye,prop:T.cloneDeep(V==null?void 0:V.key),type:$t,value:V!=null&&V.isSync?((Ga=(Ya=$.value)==null?void 0:Ya[0])==null?void 0:Ga.value)??((Ma=(Oa=O==null?void 0:O.value)==null?void 0:Oa.split("/"))==null?void 0:Ma[((Za=(Ja=O==null?void 0:O.value)==null?void 0:Ja.split("/"))==null?void 0:Za.length)-1]):V!=null&&V.isNewDate&&vt===""?new Date:vt,id:(V==null?void 0:V.id)??ye,contents:(Et==null?void 0:Et.length)>0?Et:et??[],width:(V==null?void 0:V.width)??1,isLoginUser:_t,config:V==null?void 0:V.config,optionUrl:(V==null?void 0:V.optionUrl)??V,isFormColHidden:ut,signature:yt,isMain:V==null?void 0:V.isMain,isMainUrl:V==null?void 0:V.isMainUrl,operable:(V==null?void 0:V.operable)??!1,disabled:(V==null?void 0:V.disabled)??!1,isSync:V==null?void 0:V.isSync}}),bt=ot==null?void 0:ot.map(V=>V==null?void 0:V.value);let Fe="";bt==null||bt.forEach(V=>{V!==""&&V!==void 0&&(Fe=Fe===""?V:Fe+"/"+V)}),m.setSelectArray(bt),m.setSelectString(Fe);let Ue=(st=T.cloneDeep(ot))==null?void 0:st.map(V=>(V!=null&&V.value&&Me.IsJson(V==null?void 0:V.value)&&Array.isArray(JSON.parse(V==null?void 0:V.value))&&(V.value=JSON.parse(V.value)),V));Ue=Ue==null?void 0:Ue.map(V=>{var ye,De,at,et,Et,_t,ut,ft;if((De=(ye=V==null?void 0:V.optionUrl)==null?void 0:ye.menuSelect)!=null&&De.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";V.optionUrl.oldMenuSelect=(et=(at=T.cloneDeep(V))==null?void 0:at.optionUrl)==null?void 0:et.menuSelect,V.optionUrl.menuSelect=(_t=(Et=V==null?void 0:V.optionUrl)==null?void 0:Et.menuSelect)==null?void 0:_t.map(yt=>{var $t,kt,Rt,Pt,Kt,Ht;if(yt!=null&&yt.includes("[")){let Jt=(kt=($t=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:$t.split(":"))==null?void 0:kt[1];vt=Re((Rt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Rt.split(":"),He==null?void 0:He[O.value],He),yt=((Kt=(Pt=T.cloneDeep(Ue))==null?void 0:Pt.find(ta=>(ta==null?void 0:ta.label)===Jt))==null?void 0:Kt.value)||Re((Ht=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Ht.split(":"),He==null?void 0:He[O.value],He)}return yt}),vt!==""&&V.value===""&&(V.value=oe(V.optionUrl.menuSelect,V.optionUrl.oldMenuSelect,(ut=V==null?void 0:V.optionUrl)==null?void 0:ut.groupSelect,He),Array.isArray(V.value)&&((ft=V.value)!=null&&ft.every(yt=>yt==null?void 0:yt.url))&&(V.type="UPLOAD"))}return V}),c.value=Ue,Qe.value=((Ye=c.value)==null?void 0:Ye.every(V=>V==null?void 0:V.disabled))||Q.value===O.value,ze.value=(tt=c.value)==null?void 0:tt.every(V=>V==null?void 0:V.operable),be.value=(Ae=c.value)==null?void 0:Ae.map(V=>V==null?void 0:V.label);let Xe=[],Se=[];if((pt=T.cloneDeep(c.value))==null||pt.forEach(V=>{var ye;Array.isArray(V==null?void 0:V.value)&&((ye=V==null?void 0:V.value)!=null&&ye.find(De=>{var at;return(at=De==null?void 0:De.url)==null?void 0:at.includes(".obj")}))&&(Se=V==null?void 0:V.value)}),(Se==null?void 0:Se.length)>0){const V=(Je=T.cloneDeep(Se))==null?void 0:Je.filter(ye=>{var De;return(De=ye==null?void 0:ye.url)==null?void 0:De.includes(".obj")});V==null||V.forEach(ye=>{var at,et,Et,_t;const De=(at=Se==null?void 0:Se.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:at.map(ut=>ut==null?void 0:ut.url);Xe.push({objUrl:ye==null?void 0:ye.url,mtlUrls:((et=Se==null?void 0:Se.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:et.length)===1?(_t=(Et=Se==null?void 0:Se.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Et[0])==null?void 0:_t.url:De})}),v.setObjUrl(Xe)}($e=T.cloneDeep(c.value))==null||$e.forEach(V=>{var ye,De,at,et,Et,_t,ut,ft,vt,yt,$t,kt,Rt;if((De=(ye=V==null?void 0:V.value)==null?void 0:ye.toString())!=null&&De.includes(".stl")||(et=(at=V==null?void 0:V.value)==null?void 0:at.toString())!=null&&et.includes(".STL")||(_t=(Et=V==null?void 0:V.value)==null?void 0:Et.toString())!=null&&_t.includes(".obj")||(ft=(ut=V==null?void 0:V.value)==null?void 0:ut.toString())!=null&&ft.includes(".mtl")||(yt=(vt=V==null?void 0:V.value)==null?void 0:vt.toString())!=null&&yt.includes(".urdf")){let Pt={},Kt=[],Ht;Array.isArray(V==null?void 0:V.value)?Ht=V==null?void 0:V.value:Ht=($t=V==null?void 0:V.value)==null?void 0:$t.split(","),Ht==null||Ht.forEach(Jt=>{Jt.includes(".mtl")?Kt.push(Jt):Pt.blob=Pt.blob==="undefined"?Jt:Pt.blob+","+Jt}),(Kt==null?void 0:Kt.length)>0&&(Pt.mtlBlobs=Kt),(Rt=(kt=Object.values(Pt))==null?void 0:kt[0])!=null&&Rt.includes("http:")}})}else c.value=[];let q=Pe.value;if((q==null?void 0:q.length)>0&&(q=q==null?void 0:q.map(He=>{var bt,Fe,Ue,Xe;let ot=(bt=He==null?void 0:He.key)==null?void 0:bt.split("/");return(l==null?void 0:l.compName)===(ot==null?void 0:ot[0])&&(Fe=c.value)!=null&&Fe.find(Se=>(Se==null?void 0:Se.prop)===(ot==null?void 0:ot[1]))&&(He.value=(Xe=(Ue=c.value)==null?void 0:Ue.find(Se=>(Se==null?void 0:Se.prop)===(ot==null?void 0:ot[1])))==null?void 0:Xe.value),He}),ke.setTableViewContents(q)),l!=null&&l.formRules)_.value=l==null?void 0:l.formRules;else{let He={};(rt=T.cloneDeep(c).value)==null||rt.forEach(ot=>{(ot==null?void 0:ot.isMain)===!0&&(He[(ot==null?void 0:ot.prop)??(ot==null?void 0:ot.name)]=[{required:!0,message:`${(ot==null?void 0:ot.prop)||(ot==null?void 0:ot.name)}不能为空`}])}),_.value=He}if(((mt=H==null?void 0:H.contents)==null?void 0:mt.length)>0){const He=[];(wt=H==null?void 0:H.contents)==null||wt.forEach((ot,bt)=>{(ot==null?void 0:ot.label)!==""&&He.push({label:(ot==null?void 0:ot.label)??"",id:(ot==null?void 0:ot.id)??bt,type:(ot==null?void 0:ot.type)??"",background:ot==null?void 0:ot.background})}),ee.value=He}else ee.value=[]},{deep:!0,immediate:!0}),e.watch(()=>Q.value,j=>{Qe.value=j===O.value},{immediate:!0}),(j,H)=>{var le,Ve;const Y=e.resolveComponent("svg-icon"),_e=e.resolveComponent("el-switch"),me=e.resolveComponent("el-checkbox"),q=e.resolveComponent("el-popover"),ve=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",xi,[g.value===!1?(e.openBlock(),e.createBlock(fi,{key:0,items:(Ve=(le=c.value)==null?void 0:le.filter(he=>!(he!=null&&he.isFormColHidden)))==null?void 0:Ve.map(he=>({label:he==null?void 0:he.label,value:he==null?void 0:he.value}))},null,8,["items"])):xe.value?(e.openBlock(),e.createBlock(wl,{key:1,itemData:a.itemData,compName:a.compName},null,8,["itemData","compName"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":g.value})},[e.createVNode(Nt.ssForm,{rowContents:c.value,formRules:_.value,buttonValue:ee.value,isRowFlex:!1,isEnableWrap:g.value,onOnButtonClick:X,onChange:B,formDisabled:Qe.value,formLabelsOperable:ze.value,isButtonRow:E.value,onPreview:w,onBlurChange:dt,onHandleColEditChange:fe,onHandleColTypeChange:Ce,onRouteUrl:ue,onClickTrigger:Ie},{operateCol:e.withCtx(({renderColumns:he,formDisabled:Be,formLabelsOperable:L})=>[e.createVNode(q,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:k},{reference:e.withCtx(()=>[e.createElementVNode("span",wi,[e.createVNode(Y,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Di,[H[1]||(H[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(_e,{"model-value":Be,"active-text":"禁用","inactive-text":"",onChange:G,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(_e,{"model-value":L,"active-text":"编辑所有标签","inactive-text":"",onChange:Z},null,8,["model-value"]),H[2]||(H[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(ve,{modelValue:be.value,"onUpdate:modelValue":H[0]||(H[0]=Oe=>be.value=Oe),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:de,onChange:we},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he,Oe=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Oe.label},[e.createVNode(me,{value:Oe.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Oe.label),1)]),_:2},1032,["value"]),e.createVNode(q,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(Y,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ge;return[e.createElementVNode("div",_i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ge=Object.keys(Oe))==null?void 0:ge.filter(We=>{var st;return(st=Ke.value)==null?void 0:st.find(Ye=>(Ye==null?void 0:Ye.value)===We)}),We=>{var st,Ye;return e.openBlock(),e.createElementBlock("div",{key:We},[e.createVNode(Nt._sfc_main$1,{value:Oe==null?void 0:Oe[We],"active-text":(Ye=(st=Ke.value)==null?void 0:st.find(tt=>(tt==null?void 0:tt.value)===We))==null?void 0:Ye.label,inactiveText:"",onChange:tt=>Ge(tt,We,Oe)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ei,[e.createVNode(Y,{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"])],2)),N.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:3,fileDataList:F.value,onDestroy:I},null,8,["fileDataList"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:4,visible:y.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:p.value,onGetAnimationData:j.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ro=zt._export_sfc(Ci,[["__scopeId","data-v-354b0fba"]]),Hn=e.ref(0),Dl=a=>{var r;return!a||(a==null?void 0:a.length)===0?[]:(r=T.cloneDeep(a))==null?void 0:r.map(l=>(Hn.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??Hn.value,children:Dl(l==null?void 0:l.children)},l))},Si=a=>{var i;return(i=T.cloneDeep(a))==null?void 0:i.map(l=>(Hn.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??Hn.value,children:Dl(l==null?void 0:l.children)},l))},_l=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===r)?(i=T.cloneDeep(a))==null?void 0:i.filter(s=>(s==null?void 0:s.id)!==r):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,r),l)),a)},El=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=T.cloneDeep(a))==null?void 0:i.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s=r),s)):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,r),l)),a)},Cl=(a,r)=>{var i;return a!=null&&a.find(l=>{var s;return(l==null?void 0:l.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)})?(i=T.cloneDeep(a))==null?void 0:i.map(s=>{var c;return(s==null?void 0:s.id)===((c=r==null?void 0:r.contents)==null?void 0:c.id)&&(s=r==null?void 0:r.contents),s}):(a=a==null?void 0:a.map(l=>(l.children=Cl(l==null?void 0:l.children,r),l)),a)},Sl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=T.cloneDeep(a))==null?void 0:i.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(r.contents)),s)):(a=a==null?void 0:a.map(l=>(l.children=Sl(l==null?void 0:l.children,r),l)),a)},Ot=[{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"}],Ti=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Bi=[{label:"新增",value:"add"}],Sa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Bi},{key:"background",label:"按钮背景色",type:"Color"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ti},{key:"textColor",label:"按钮颜色",type:"Color"}],Ii={class:"table-header-child"},Ni={class:"table-header-child-main"},Ai={class:"table-header-child-content"},Vi={class:"table-header-child-content-item"},Oi={class:"fix-button"},Mi={key:0},zi={class:"form-content"},Ri={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,s=e.ref(!1),c=e.ref(""),y=Me.useTableComp(T.pinia),{tableIndex:f}=T.storeToRefs(y);e.ref(0);const p=e.ref(""),x=e.ref([]),_=e.ref([]),E=m=>{var g;s.value=!0;let v=[];Ot==null||Ot.forEach(S=>{let b=T.cloneDeep(f.value)+1;y.setTableIndex(b),v.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:m[S.key],id:f.value,contents:S==null?void 0:S.options})}),m!=null&&m.children&&((g=m==null?void 0:m.children)==null?void 0:g.length)>0&&v.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,x.value=v,_.value=v},N=m=>{l("fixChange",T.cloneDeep(m))},K=m=>{l("deleteChange",T.cloneDeep(m))},$=m=>{s.value=!0;let v=[];Ot==null||Ot.forEach(g=>{let S=T.cloneDeep(f.value)+1;y.setTableIndex(S),v.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:"",id:f.value,contents:g==null?void 0:g.options})}),c.value=m==null?void 0:m.id,x.value=v,_.value=v},ee=m=>{let v=T.cloneDeep(_.value);v=v==null?void 0:v.map(g=>(g.children||(g.value=m==null?void 0:m[g.name]),g)),_.value=v},F=()=>{var v,g;x.value=_.value;let m={};if(p.value!=="")m.id=p.value,(v=x.value)==null||v.forEach(S=>{const b=Ot==null?void 0:Ot.find(ie=>(ie==null?void 0:ie.label)===(S==null?void 0:S.label));b?m[b.key]=S.value:S!=null&&S.children&&S.children.length>0&&(m.children=S.children)}),s.value=!1,l("fixChange",{contents:T.cloneDeep(m),id:c.value,type:"fix"});else{let S=T.cloneDeep(f.value)+1;y.setTableIndex(S),m.id="id"+f.value,(g=x.value)==null||g.forEach(b=>{const ie=Ot==null?void 0:Ot.find(Te=>(Te==null?void 0:Te.label)===(b==null?void 0:b.label));ie?m[ie.key]=b.value:b!=null&&b.children&&b.children.length>0&&(m.children=b.children)}),s.value=!1,l("fixChange",{contents:T.cloneDeep(m),id:c.value,type:"add"})}p.value="",x.value=[],_.value=[]},P=()=>{s.value=!1,p.value="",c.value="",x.value=[],_.value=[]},R=m=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(m,v)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(S,b)=>(e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("div",Ai,[e.createElementVNode("div",Vi,e.toDisplayString(S.label),1),e.createElementVNode("div",Oi,[e.createVNode(g,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>$(S)},null,8,["onClick"]),e.createVNode(g,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>E(S)},null,8,["onClick"]),e.createVNode(g,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ie=>R(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(Tl,{tableChildContents:S==null?void 0:S.children,onDeleteChange:K,onFixChange:N},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:P,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:P,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:F},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Pi=zt._export_sfc(Ri,[["__scopeId","data-v-e0fef72d"]]),$i={class:"table-header-child"},Li={class:"table-header-child-main"},Fi={class:"table-header-child-content"},ji={class:"table-header-child-content-item"},Ui={class:"fix-button"},Ki={key:0},Wi={class:"form-content"},Hi={class:"dialog-footer"},qi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,s=e.ref(!1),c=e.ref(""),y=Me.useTableComp(T.pinia),{tableIndex:f}=T.storeToRefs(y),p=e.ref(""),x=e.ref([]),_=e.ref([]),E=m=>{l("fixChange",T.cloneDeep(m))},N=m=>{var g;s.value=!0;let v=[];Ot==null||Ot.forEach(S=>{let b=T.cloneDeep(f.value)+1;y.setTableIndex(b),v.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:m[S.key],id:f.value,contents:S==null?void 0:S.options})}),m!=null&&m.children&&((g=m==null?void 0:m.children)==null?void 0:g.length)>0&&v.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,x.value=v,_.value=v},K=m=>{s.value=!0;let v=[];Ot==null||Ot.forEach(g=>{let S=T.cloneDeep(f.value)+1;y.setTableIndex(S),v.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:"",id:f.value,contents:g==null?void 0:g.options})}),c.value=m==null?void 0:m.id,x.value=v,_.value=v},$=m=>{let v=T.cloneDeep(_.value);v=v==null?void 0:v.map(g=>(g.children||(g.value=m==null?void 0:m[g.name]),g)),_.value=v},ee=()=>{var v,g;x.value=_.value;let m={};if(p.value!=="")m.id=p.value,(v=x.value)==null||v.forEach(S=>{const b=Ot==null?void 0:Ot.find(ie=>(ie==null?void 0:ie.label)===(S==null?void 0:S.label));b?m[b.key]=S.value:S!=null&&S.children&&S.children.length>0&&(m.children=S.children)}),s.value=!1,l("fixChange",{contents:T.cloneDeep(m),id:c.value,type:"fix"});else{let S=T.cloneDeep(f.value)+1;y.setTableIndex(S),m.id="idChild"+f.value,(g=x.value)==null||g.forEach(b=>{const ie=Ot==null?void 0:Ot.find(Te=>(Te==null?void 0:Te.label)===(b==null?void 0:b.label));ie?m[ie.key]=b.value:b!=null&&b.children&&b.children.length>0&&(m.children=b.children)}),s.value=!1,l("fixChange",{contents:T.cloneDeep(m),id:c.value,type:"add"})}p.value="",x.value=[],_.value=[]},F=()=>{s.value=!1,p.value="",c.value="",x.value=[],_.value=[]},P=m=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=m=>{l("deleteChange",m)};return(m,v)=>{const g=e.resolveComponent("svg-icon"),S=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(b,ie)=>(e.openBlock(),e.createElementBlock("div",Li,[e.createElementVNode("div",Fi,[e.createElementVNode("div",ji,e.toDisplayString(b.label),1),e.createElementVNode("div",Ui,[e.createVNode(g,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Te=>K(b)},null,8,["onClick"]),e.createVNode(g,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Te=>N(b)},null,8,["onClick"]),e.createVNode(g,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Te=>P(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",Ki,[e.createVNode(Pi,{tableChildContents:b==null?void 0:b.children,onDeleteChange:R,onFixChange:E},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:$},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hi,[e.createVNode(S,{onClick:F,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>v[0]||(v[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(S,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>v[1]||(v[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=zt._export_sfc(qi,[["__scopeId","data-v-ebd68fa1"]]),Xi={class:"table-operate-content"},Yi={class:"table-operate-item"},Gi={class:"operate-title"},Ji={class:"operate-content"},Zi={class:"fix-content"},Qi={class:"fix-content-label"},es={class:"fix-button"},ts={key:0},as={class:"operate-title"},ns={class:"operate-content"},os={class:"fix-content"},ls={class:"fix-content-label"},rs={class:"fix-button"},is={class:"operate-title"},ss={class:"operate-content"},cs={class:"fix-content"},us={class:"fix-content-label"},ds={class:"fix-button"},ps={class:"operate-title"},fs={class:"operate-content"},hs={class:"fix-content"},vs={class:"fix-content-label"},ms={class:"fix-button"},gs={class:"operate-content"},ys={style:{display:"flex","justify-content":"space-between"}},bs={class:"form-content"},ks={class:"dialog-footer"},xs={class:"form-content"},ws={class:"dialog-footer"},Ds={class:"form-content"},_s={class:"dialog-footer"},Es={class:"form-content"},Cs={class:"dialog-footer"},Ss={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=e.ref([]),c=e.ref(!1),y=e.ref(!1),f=e.ref([]),p=e.ref(!1),x=e.ref([]),_=e.ref(!1),E=e.ref([]),N=e.ref(""),K=e.ref(""),$=e.ref([]),ee=e.ref([]),F=e.ref([]),P=e.ref([]),R=e.ref(!1),m=e.ref([]),v=e.ref([]),g=e.ref(0),S=e.ref([]),b=e.ref([]),ie=e.ref([]),Te=()=>{R.value=!0;let w=[];Sa==null||Sa.forEach(I=>{g.value++,w.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:(I==null?void 0:I.key)==="background"?"var(--ssComponent-primary-color)":"",id:g.value,contents:I==null?void 0:I.options})}),m.value=w,v.value=w},Ze=()=>{var I,X,ne;y.value=!0;let w=[];(ne=(X=(I=Me.FormContent)==null?void 0:I.find(B=>(B==null?void 0:B.key)==="Input"))==null?void 0:X.value)==null||ne.forEach(B=>{g.value++,w.push({label:B==null?void 0:B.label,name:(B==null?void 0:B.name)||(B==null?void 0:B.label),type:B.type,value:(B==null?void 0:B.label)==="类型"?"Input":"",id:g.value,contents:B==null?void 0:B.options})}),S.value=w,b.value=w},ke=w=>{w||(S.value=b.value)},Pe=async w=>{var I,X,ne,B,pe,Re,oe,j,H,Y,_e,me;if((w==null?void 0:w.类型)!==((X=(I=b.value)==null?void 0:I.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:X.value)){let q=[],ve=await((pe=(B=(ne=Me.FormContent)==null?void 0:ne.find(le=>(le==null?void 0:le.key)===((w==null?void 0:w.类型)===""?"Input":w==null?void 0:w.类型)))==null?void 0:B.value)==null?void 0:pe.value)?await((Y=(H=(j=Me.FormContent)==null?void 0:j.find(le=>(le==null?void 0:le.key)===((w==null?void 0:w.类型)===""?"Input":w==null?void 0:w.类型)))==null?void 0:H.value)==null?void 0:Y.value):(oe=(Re=Me.FormContent)==null?void 0:Re.find(le=>(le==null?void 0:le.key)===((w==null?void 0:w.类型)===""?"Input":w==null?void 0:w.类型)))==null?void 0:oe.value;if(ve==null||ve.forEach(le=>{g.value++,q.push({label:le==null?void 0:le.label,name:(le==null?void 0:le.name)||(le==null?void 0:le.label),type:le.type,value:le!=null&&le.属性名?(w==null?void 0:w.prop)||(w==null?void 0:w.name)||(w==null?void 0:w.label):(w==null?void 0:w[le.label])??"",id:g.value,contents:le==null?void 0:le.options,prop:(le==null?void 0:le.prop)||(le==null?void 0:le.name)||(le==null?void 0:le.label)})}),w!=null&&w.菜单选项&&((_e=w==null?void 0:w.菜单选项)==null?void 0:_e.length)>0){const le=await Me.menuToContentType(w==null?void 0:w.菜单选项);q=q==null?void 0:q.map(Ve=>((Ve==null?void 0:Ve.name)==="组信息选项"&&(Ve.contents=le),Ve))}b.value=await Me.selectToBase(T.cloneDeep(q)),S.value=await Me.selectToBase(T.cloneDeep(q))}else{let q=T.cloneDeep(S.value);if(q=q==null?void 0:q.map(ve=>(ve.value=w==null?void 0:w[ve.name],ve)),w!=null&&w.菜单选项&&((me=w==null?void 0:w.菜单选项)==null?void 0:me.length)>0){const ve=await Me.menuToContentType(w==null?void 0:w.菜单选项);q=q==null?void 0:q.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=ve),le))}q=Me.formToOptionsContents(q),b.value=await Me.selectToBase(T.cloneDeep(q))}},Ne=async w=>{await Pe(w),S.value=b.value},z=(w,I)=>{if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="selectRelateType"){const X=I==null?void 0:I.optionUrl;return(X==null?void 0:X.selectRelateType)||I[w.key]}if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="menuSelect"){const X=I==null?void 0:I.optionUrl;return(X==null?void 0:X.menuSelect)||I[w.key]}if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="groupSelect"){const X=I==null?void 0:I.optionUrl;return(X==null?void 0:X.groupSelect)||I[w.key]}if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="originalContent")return(I==null?void 0:I.value)||I[w.key];if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="multiple"){const X=I[w.key];return xl(X)?X:w.default}return(w==null?void 0:w.label)==="类型"&&I[w.key]===""?"Input":(w==null?void 0:w.key)==="isFormColHidden"&&!I[w.key]?!1:I[w.key]},re=async w=>{var ne,B,pe,Re,oe,j,H,Y,_e;y.value=!0;let I=[];const X=await((pe=(B=(ne=Me.FormContent)==null?void 0:ne.find(me=>(me==null?void 0:me.key)===((w==null?void 0:w.type)===""?"Input":w==null?void 0:w.type)))==null?void 0:B.value)==null?void 0:pe.value)?await((Y=(H=(j=Me.FormContent)==null?void 0:j.find(me=>(me==null?void 0:me.key)===((w==null?void 0:w.type)===""?"Input":w==null?void 0:w.type)))==null?void 0:H.value)==null?void 0:Y.value):(oe=(Re=Me.FormContent)==null?void 0:Re.find(me=>(me==null?void 0:me.key)===((w==null?void 0:w.type)===""?"Input":w==null?void 0:w.type)))==null?void 0:oe.value;if(X==null||X.forEach(me=>{g.value++,I.push({label:me==null?void 0:me.label,name:(me==null?void 0:me.name)||(me==null?void 0:me.label),type:me.type,value:(me==null?void 0:me.label)==="属性名"?(w==null?void 0:w.prop)||(w==null?void 0:w.name)||(w==null?void 0:w.label):z(me,w),id:g.value,contents:me==null?void 0:me.options})}),w!=null&&w.menuSelect&&((_e=w==null?void 0:w.menuSelect)==null?void 0:_e.length)>0){const me=await Me.menuToContentType(w==null?void 0:w.menuSelect);I=I==null?void 0:I.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=me),q))}N.value=w==null?void 0:w.id,S.value=await Me.selectToBase(Me.formToOptionsContents(I)),b.value=await Me.selectToBase(Me.formToOptionsContents(I))},Q=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,X;ie.value=(I=T.cloneDeep(ie.value))==null?void 0:I.filter(ne=>(ne==null?void 0:ne.id)!==(w==null?void 0:w.id)),l("change",(X=T.cloneDeep(i.originalItemContents))==null?void 0:X.map(ne=>((ne==null?void 0:ne.key)==="tableToForm"&&(ne.contents=ie.value),ne))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{y.value=!1,S.value=[],N.value=""},ze=async()=>{var ne,B,pe,Re,oe,j,H,Y,_e,me;S.value=b.value;let w={};N.value!==""?w.id=N.value:(g.value++,w.id="id"+g.value);let I=await((pe=(B=(ne=Me.FormContent)==null?void 0:ne.find(q=>{var ve,le;return(q==null?void 0:q.key)===(((le=(ve=S.value)==null?void 0:ve.find(Ve=>(Ve==null?void 0:Ve.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:B.value)==null?void 0:pe.value)??((oe=(Re=Me.FormContent)==null?void 0:Re.find(q=>{var ve,le;return(q==null?void 0:q.key)===(((le=(ve=S.value)==null?void 0:ve.find(Ve=>(Ve==null?void 0:Ve.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:oe.value);if((j=S.value)==null||j.forEach(q=>{const ve=I==null?void 0:I.find(le=>(le==null?void 0:le.label)===(q==null?void 0:q.label));ve&&(w[ve.key]=q.value)}),w.name=w.label,(H=ie.value)!=null&&H.find(q=>q.id===w.id))ie.value=(Y=ie.value)==null?void 0:Y.map(q=>(q.id===w.id&&(q=w),q));else{let q=T.cloneDeep(ie.value);ie.value||(ie.value=[]),q.push(w),ie.value=q}ie.value=ie.value.map(({id:q,...ve})=>ve),y.value=!1,N.value="";let X=T.cloneDeep(i.originalItemContents);(_e=T.cloneDeep(i.originalItemContents))!=null&&_e.find(q=>(q==null?void 0:q.key)==="tableToForm")?X=(me=T.cloneDeep(i.originalItemContents))==null?void 0:me.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=ie.value),q)):X.push({key:"tableToForm",contents:ie.value}),l("change",X)},Qe=w=>{R.value=!0;let I=[];Sa==null||Sa.forEach(X=>{g.value++,I.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:w[X.key],id:g.value,contents:X==null?void 0:X.options})}),N.value=w==null?void 0:w.id,m.value=I,v.value=I};e.watch(()=>_.value,()=>{var I,X;let w=T.cloneDeep(i.originalItemContents);(I=T.cloneDeep(i.originalItemContents))!=null&&I.find(ne=>(ne==null?void 0:ne.key)==="page")?w=(X=T.cloneDeep(i.originalItemContents))==null?void 0:X.map(ne=>((ne==null?void 0:ne.key)==="page"&&(ne.contents=_.value),ne)):w.push({key:"page",contents:_.value}),l("change",w)},{deep:!0});const J=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,X;ee.value=(I=T.cloneDeep(ee.value))==null?void 0:I.filter(ne=>(ne==null?void 0:ne.id)!==(w==null?void 0:w.id)),l("change",(X=T.cloneDeep(i.originalItemContents))==null?void 0:X.map(ne=>((ne==null?void 0:ne.key)==="extraButton"&&(ne.contents=ee.value),ne))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},O=()=>{var X,ne,B,pe,Re;m.value=v.value;let w={};if(N.value!==""?w.id=N.value:(g.value++,w.id="id"+g.value),(X=m.value)==null||X.forEach(oe=>{const j=Sa==null?void 0:Sa.find(H=>(H==null?void 0:H.label)===(oe==null?void 0:oe.label));j?w[j.key]=oe.value:oe!=null&&oe.children&&oe.children.length>0&&(w.children=oe.children)}),(ne=ee.value)!=null&&ne.find(oe=>oe.id===w.id))ee.value=(B=ee.value)==null?void 0:B.map(oe=>(oe.id===w.id&&(oe=w),oe));else{let oe=T.cloneDeep(ee.value)??[];oe.push(w),ee.value=oe}R.value=!1,N.value="";let I=T.cloneDeep(i.originalItemContents);(pe=T.cloneDeep(i.originalItemContents))!=null&&pe.find(oe=>(oe==null?void 0:oe.key)==="extraButton")?I=(Re=T.cloneDeep(i.originalItemContents))==null?void 0:Re.map(oe=>((oe==null?void 0:oe.key)==="extraButton"&&(oe.contents=ee.value),oe)):I.push({key:"extraButton",contents:ee.value}),l("change",I)},W=w=>{let I=T.cloneDeep(v.value);I=I==null?void 0:I.map(X=>(X.children||(X.value=w==null?void 0:w[X.name]),X)),v.value=I},ce=()=>{R.value=!1,m.value=[],N.value=""},xe=w=>{p.value=!0;let I=[];Ta==null||Ta.forEach(X=>{g.value++,I.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:w[X.key],id:g.value,contents:X==null?void 0:X.options})}),N.value=w==null?void 0:w.id,F.value=I,P.value=I},be=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,X;$.value=(I=T.cloneDeep($.value))==null?void 0:I.filter(ne=>(ne==null?void 0:ne.id)!==(w==null?void 0:w.id)),l("change",(X=T.cloneDeep(i.originalItemContents))==null?void 0:X.map(ne=>((ne==null?void 0:ne.key)==="rowButton"&&(ne.contents=$.value),ne))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ke=()=>{c.value=!0;let w=[];Ot==null||Ot.forEach(I=>{g.value++,w.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:g.value,contents:I==null?void 0:I.options})}),x.value=w,E.value=w},G=()=>{p.value=!0;let w=[];Ta==null||Ta.forEach(I=>{g.value++,w.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:g.value,contents:I==null?void 0:I.options})}),F.value=w,P.value=w},Z=w=>{let I=T.cloneDeep(P.value);I=I==null?void 0:I.map(X=>(X.children||(X.value=w==null?void 0:w[X.name]),X)),P.value=I},k=()=>{var X,ne,B,pe,Re;F.value=P.value;let w={};if(N.value!==""?w.id=N.value:(g.value++,w.id="id"+g.value),(X=F.value)==null||X.forEach(oe=>{const j=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(oe==null?void 0:oe.label));j?w[j.key]=oe.value:oe!=null&&oe.children&&oe.children.length>0&&(w.children=oe.children)}),(ne=$.value)!=null&&ne.find(oe=>oe.id===w.id))$.value=(B=$.value)==null?void 0:B.map(oe=>(oe.id===w.id&&(oe=w),oe));else{let oe=T.cloneDeep($.value);oe.push(w),$.value=oe}p.value=!1,N.value="";let I=T.cloneDeep(i.originalItemContents);(pe=T.cloneDeep(i.originalItemContents))!=null&&pe.find(oe=>(oe==null?void 0:oe.key)==="rowButton")?I=(Re=T.cloneDeep(i.originalItemContents))==null?void 0:Re.map(oe=>((oe==null?void 0:oe.key)==="rowButton"&&(oe.contents=$.value),oe)):I.push({key:"rowButton",contents:$.value}),l("change",I)},we=()=>{p.value=!1,N.value="",P.value=[],F.value=[]},Ie=w=>{c.value=!0;let I=[];Ot==null||Ot.forEach(X=>{g.value++,I.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:g.value,contents:X==null?void 0:X.options})}),x.value=I,K.value=w==null?void 0:w.id,E.value=I},ue=w=>{var I;f.value=_l(T.cloneDeep(f.value),w==null?void 0:w.id),l("change",(I=T.cloneDeep(i.originalItemContents))==null?void 0:I.map(X=>{var ne;return(X==null?void 0:X.key)==="header"&&(X.contents=(ne=f.value)!=null&&ne.some(B=>B==null?void 0:B.children)?[f.value]:f.value),X}))},se=w=>{var X,ne,B;w.type==="fix"?w.id!==""?f.value=Cl(f.value,w):f.value=El(f.value,w==null?void 0:w.contents):f.value=Sl(f.value,w),f.value=(X=f.value)!=null&&X.some(pe=>pe==null?void 0:pe.children)?[f.value]:f.value,N.value="";let I=T.cloneDeep(i.originalItemContents);(ne=T.cloneDeep(i.originalItemContents))!=null&&ne.find(pe=>(pe==null?void 0:pe.key)==="header")?I=(B=T.cloneDeep(i.originalItemContents))==null?void 0:B.map(pe=>((pe==null?void 0:pe.key)==="header"&&(pe.contents=f.value),pe)):I.push({key:"header",contents:f.value}),l("change",I)},ae=w=>{var X;c.value=!0;let I=[];Ot==null||Ot.forEach(ne=>{g.value++,I.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:w[ne.key],id:g.value,contents:ne==null?void 0:ne.options})}),w!=null&&w.children&&((X=w==null?void 0:w.children)==null?void 0:X.length)>0&&I.push({children:w==null?void 0:w.children,isFormColHidden:!0}),N.value=w==null?void 0:w.id,K.value="",x.value=I,E.value=I},fe=w=>{let I=T.cloneDeep(E.value);I=I==null?void 0:I.map(X=>(X.children||(X.value=w==null?void 0:w[X.name]),X)),E.value=I},Ce=()=>{c.value=!1,N.value="",K.value="",E.value=[]},Ge=()=>{var X,ne,B,pe,Re,oe;x.value=E.value;let w={};if(N.value!==""?w.id=N.value:(g.value++,w.id="id"+g.value),(X=x.value)==null||X.forEach(j=>{const H=Ot==null?void 0:Ot.find(Y=>(Y==null?void 0:Y.label)===(j==null?void 0:j.label));H?w[H.key]=j.value:j!=null&&j.children&&j.children.length>0&&(w.children=j.children)}),(ne=f.value)!=null&&ne.find(j=>j.id===w.id))f.value=(B=f.value)==null?void 0:B.map(j=>(j.id===w.id&&(j=w),j));else{let j=T.cloneDeep(f.value)??[];K.value===""?j.push(w):j=j==null?void 0:j.map(H=>(H.id===K.value&&(H.children||(H.children=[]),H.children.push(w)),H)),f.value=j}f.value=(pe=f.value)!=null&&pe.some(j=>j==null?void 0:j.children)?[f.value]:f.value,c.value=!1,N.value="",K.value="";let I=T.cloneDeep(i.originalItemContents);(Re=T.cloneDeep(i.originalItemContents))!=null&&Re.find(j=>(j==null?void 0:j.key)==="header")?I=(oe=T.cloneDeep(i.originalItemContents))==null?void 0:oe.map(j=>((j==null?void 0:j.key)==="header"&&(j.contents=f.value),j)):I.push({key:"header",contents:f.value}),l("change",I)},dt=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,X;f.value=(I=T.cloneDeep(f.value))==null?void 0:I.filter(ne=>(ne==null?void 0:ne.id)!==(w==null?void 0:w.id)),l("change",(X=T.cloneDeep(i.originalItemContents))==null?void 0:X.map(ne=>{var B;return(ne==null?void 0:ne.key)==="header"&&(ne.contents=(B=f.value)!=null&&B.some(pe=>pe==null?void 0:pe.children)?[f.value]:f.value),ne})),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var w,I,X,ne,B,pe,Re,oe,j,H,Y,_e,me,q,ve,le,Ve,he,Be;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(s.value=T.cloneDeep(i.originalItemContents),f.value=(I=(w=s.value)==null?void 0:w.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:I.contents,$.value=(ne=(X=s.value)==null?void 0:X.find(L=>(L==null?void 0:L.key)==="rowButton"))==null?void 0:ne.contents,ee.value=(pe=(B=s.value)==null?void 0:B.find(L=>(L==null?void 0:L.key)==="extraButton"))==null?void 0:pe.contents,_.value=(oe=(Re=s.value)==null?void 0:Re.find(L=>(L==null?void 0:L.key)==="page"))!=null&&oe.contents?!!((H=(j=s.value)==null?void 0:j.find(L=>(L==null?void 0:L.key)==="page"))!=null&&H.contents):!1,ie.value=(_e=(Y=s.value)==null?void 0:Y.find(L=>(L==null?void 0:L.key)==="tableToForm"))==null?void 0:_e.contents,f.value=(me=f.value)==null?void 0:me.map((L,Oe)=>(Array.isArray(L)?L=Si(L):L={label:(L==null?void 0:L.label)??"",prop:(L==null?void 0:L.label)==="操作"?"operate":L==null?void 0:L.prop,width:L!=null&&L.width?parseInt(L.width):"",fixed:(L==null?void 0:L.fixed)??void 0,sortable:(L==null?void 0:L.sortable)??!1,align:(L==null?void 0:L.align)??"left",showOverflowTooltip:(L==null?void 0:L.showOverflowTooltip)??!0,isNotDrag:(L==null?void 0:L.isNotDrag)??!1,isEditCol:(L==null?void 0:L.isEditCol)??!1,isOperate:(L==null?void 0:L.isOperate)??!1,id:(L==null?void 0:L.id)??Oe,formMenuSelect:(L==null?void 0:L.formMenuSelect)??void 0,groupSelect:(L==null?void 0:L.groupSelect)??void 0},L)),f.value=(q=f.value)!=null&&q.every(L=>Array.isArray(L))?(ve=f.value)==null?void 0:ve[0]:f.value,$.value=(le=$.value)==null?void 0:le.map((L,Oe)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",textColor:(L==null?void 0:L.textColor)??"#000000",id:(L==null?void 0:L.id)??Oe}),ee.value=(Ve=ee.value)==null?void 0:Ve.map((L,Oe)=>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:(L==null?void 0:L.id)??Oe}),ie.value)ie.value=(Be=ie.value)==null?void 0:Be.map(L=>{g.value++;let Oe=L;return Oe.id=g.value,Oe});else{let L=[];const Oe=(he=Me.getColumnChild(T.cloneDeep(f.value)))==null?void 0:he.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");Oe==null||Oe.forEach(ge=>{var We;g.value++,L.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label),type:ge!=null&&ge.groupSelect?"Select":"Input",value:"",id:g.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(We=ge==null?void 0:ge.groupSelect)==null?void 0:We.split(":"),selectRelateType:"关联绑定列"})}),ie.value=L}},{deep:!0,immediate:!0}),(w,I)=>{const X=e.resolveComponent("svg-icon"),ne=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Xi,[e.createElementVNode("div",Yi,[e.createElementVNode("div",Gi,[I[2]||(I[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ne,{class:"icon-content",onClick:Ke,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[1]||(I[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(B,pe)=>(e.openBlock(),e.createElementBlock("div",{key:pe},[e.createElementVNode("div",Zi,[e.createElementVNode("div",Qi,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",es,[e.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>Ie(B)},null,8,["onClick"]),e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>ae(B)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>dt(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(Tl,{tableChildContents:B==null?void 0:B.children,onDeleteChange:ue,onFixChange:se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",as,[I[4]||(I[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:G},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[3]||(I[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(B,pe)=>(e.openBlock(),e.createElementBlock("div",{key:pe},[e.createElementVNode("div",os,[e.createElementVNode("div",ls,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",rs,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Re=>xe(B)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>be(B)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",is,[I[6]||(I[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:Te},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[5]||(I[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",ss,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,(B,pe)=>(e.openBlock(),e.createElementBlock("div",{key:pe},[e.createElementVNode("div",cs,[e.createElementVNode("div",us,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",ds,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Re=>Qe(B)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>J(B)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ps,[I[8]||(I[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:Ze},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[7]||(I[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(B,pe)=>(e.openBlock(),e.createElementBlock("div",{key:pe},[e.createElementVNode("div",hs,[e.createElementVNode("div",vs,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",ms,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Re=>re(B)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Re=>Q(B)},null,8,["onClick"])])])]))),128))]),I[10]||(I[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",gs,[e.createElementVNode("div",ys,[I[9]||(I[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":I[0]||(I[0]=B=>_.value=B)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:Ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",bs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:fe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ks,[e.createVNode(ne,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[11]||(I[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ne,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>I[12]||(I[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ws,[e.createVNode(ne,{onClick:we,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[13]||(I[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ne,{class:"ok-button button",onClick:k,id:"themeButton"},{default:e.withCtx(()=>I[14]||(I[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:R.value,onBeforeDestroy:ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ds,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_s,[e.createVNode(ne,{onClick:ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[15]||(I[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ne,{class:"ok-button button",onClick:O,id:"themeButton"},{default:e.withCtx(()=>I[16]||(I[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:y.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Es,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:Pe,onChangeVisible:ke,onBlurChange:Ne},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Cs,[e.createVNode(ne,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[17]||(I[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ne,{class:"ok-button button",onClick:ze,id:"themeButton"},{default:e.withCtx(()=>I[18]||(I[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Ts=zt._export_sfc(Ss,[["__scopeId","data-v-7a6b87b5"]]),Bs=T.useModelComp(T.pinia),{pageMapState:Is}=T.storeToRefs(Bs),Ns=T.useMenuState(T.pinia),{activeMenuPath:As}=T.storeToRefs(Ns),Vs=e.ref(24),Os=e.ref(6),Ms=e.ref(70),zs=e.ref(.18),Rs=e.ref(45),Ps=(a,r,i,l)=>{var s,c,y,f,p,x,_,E,N,K,$,ee,F,P,R,m;return{x:((c=(s=a==null?void 0:a.value)==null?void 0:s.tableData)==null?void 0:c.x)||r%2*12,y:((f=(y=a==null?void 0:a.value)==null?void 0:y.tableData)==null?void 0:f.y)||r,w:((x=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:x.w)||Vs.value,h:((E=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:E.h)||i,minW:((K=(N=a==null?void 0:a.value)==null?void 0:N.tableData)==null?void 0:K.minW)||Os.value,minH:((ee=($=a==null?void 0:a.value)==null?void 0:$.tableData)==null?void 0:ee.minH)||zs.value,maxH:((P=(F=a==null?void 0:a.value)==null?void 0:F.tableData)==null?void 0:P.maxH)||Rs.value,i:((m=(R=a==null?void 0:a.value)==null?void 0:R.tableData)==null?void 0:m.i)||r,id:(a==null?void 0:a.id)||r+"",component:l}},$s=(a,r)=>{var l,s,c,y,f,p,x,_;let i=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((y=(c=(s=a==null?void 0:a.compData)==null?void 0:s.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:y.length)===0)return 2}else((f=a==null?void 0:a.comp)==null?void 0:f.toUpperCase())==="FORM"&&(i=((_=(x=(p=a==null?void 0:a.compData)==null?void 0:p.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return i*2},Bl=(a,r,i)=>{var y,f;const l=(f=(y=Is.value)==null?void 0:y[As.value])==null?void 0:f.filter(p=>{var x;return((x=p==null?void 0:p.key)==null?void 0:x.type)==="gridLayout"}),s=l==null?void 0:l.find(p=>{var x,_,E;return((E=(_=(x=p==null?void 0:p.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:E.id)===a.id}),c=$s(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((p,x)=>Bl(p,x))),{...Ps(s,r,c,a)}},Ls=(a,r)=>{if((a==null?void 0:a.length)===0)return[];const i=T.cloneDeep(a);return Array.isArray(a)?i==null?void 0:i.map((l,s)=>Bl(l,s)):[]},Fs=a=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),js=(a,r)=>a==null?void 0:a.map(i=>{for(const l in r)if(l===(i==null?void 0:i.prop))return{...i,value:r[l]};return i}),Us=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=e.ref([]);e.watch(()=>i.compType,f=>{var _;const p=Fs(i==null?void 0:i.optionItems),x=f?(_=p[f==null?void 0:f.toUpperCase()])==null?void 0:_[i==null?void 0:i.target]:[];s.value=x==null?void 0:x.map(E=>{for(const[N,K]of Object.entries((i==null?void 0:i.comp)||{}))if((E==null?void 0:E.prop)===N)return{...E,value:K};return E})},{immediate:!0});const c=f=>Nt.getComponent(f),y=f=>{var p,x;(f==null?void 0:f.prop)==="layout"&&(f==null?void 0:f.value)==="horizontal"?s.value=(p=s.value)==null?void 0:p.map(_=>{var E;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(E=_==null?void 0:_.options)==null?void 0:E.map(N=>({...N,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):s.value=(x=s.value)==null?void 0:x.map(_=>{var E;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(E=_==null?void 0:_.options)==null?void 0:E.map(N=>({...N,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),l("change",{target:i==null?void 0:i.target,styleConfigs:s.value,prop:f==null?void 0:f.prop})};return(f,p)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,E=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:E==null?void 0:E.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E==null?void 0:E.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(E.type)),{modelValue:E.value,"onUpdate:modelValue":N=>E.value=N,content:E==null?void 0:E.options,optionUrl:E==null?void 0:E.optionUrl,disabled:E==null?void 0:E.disabled,activeText:E==null?void 0:E.activeText,inactiveText:E==null?void 0:E.inactiveText,onChange:N=>y(E)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ks=zt._export_sfc(Us,[["__scopeId","data-v-6c233914"]]),Ws=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:r}){const i=a,l=r,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=e.ref([]),y=P=>P==null?void 0:P.reduce((R,m)=>(R[m==null?void 0:m.prop]=m==null?void 0:m.rule,R),{}),f=e.computed(()=>({formRules:y(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),p=e.ref([]),x=e.ref(""),_=(P,R,m)=>{var S;let v=[];(i==null?void 0:i.activeTabName)==="任务配置"?(v=[{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:P},{label:"按钮名称",value:"按钮名称",children:R}]},{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:"暂停"}]}],c.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(v=[{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:(S=i==null?void 0:i.relatedData)==null?void 0:S.map(b=>({label:b==null?void 0:b.任务名称,value:b==null?void 0:b.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let g;return m&&(m==null?void 0:m.length)>0?g=[...v,...E(P,R,m)]:g=v,g},E=(P,R,m)=>{const v=[{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 m?v==null?void 0:v.filter(g=>m==null?void 0:m.includes(g==null?void 0:g.prop)):v},N=(P,R)=>{var b,ie,Te,Ze,ke,Pe,Ne,z,re;const m=((ke=(Ze=(Te=(ie=(b=i==null?void 0:i.comp)==null?void 0:b.compData)==null?void 0:ie.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:Te.contents)==null?void 0:Ze.filter(Q=>(Q==null?void 0:Q.label)!=="操作"))==null?void 0:ke.map(Q=>({value:Q==null?void 0:Q.prop,label:Q.label})))||[],v=/button/i,g=((re=(z=(Ne=(Pe=i==null?void 0:i.comp)==null?void 0:Pe.compData)==null?void 0:Ne.filter(Q=>v.test(Q==null?void 0:Q.key)))==null?void 0:z.flatMap(Q=>Q==null?void 0:Q.contents))==null?void 0:re.map(Q=>({value:Q==null?void 0:Q.label,label:Q.label})))||[],S=_(m,g,P);p.value=R?js(S,R):S,P&&(P==null?void 0:P.length)>0&&c.value.push(...P==null?void 0:P.map(Q=>({prop:Q,rule:s})))};e.onMounted(()=>{N(null,i==null?void 0:i.extendItem)});const K=P=>{const R=P==null?void 0:P[x.value];if(x.value==="执行任务"){if(!(R!=null&&R.join("/")))return;const m=R==null?void 0:R.join("/");N(m==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:m==="进度设置/进度条"?["进度关键词"]:null,P)}},$=P=>{l("change",{target:i==null?void 0:i.target,extendConfigs:P})},ee=(P,R)=>{x.value=R==null?void 0:R.changeProp,K(P)},F=P=>{l("onButtonClick",P)};return(P,R)=>(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:p.value,key:p.value,isStartJustify:!1,isEnableWrap:!1,formRules:f.value.formRules,buttonValue:f.value.buttonValue,onChange:$,onBlurChange:ee,onOnButtonClick:F},null,8,["rowContents","formRules","buttonValue"]))}}),Hs=zt._export_sfc(Ws,[["__scopeId","data-v-7c660c1f"]]),qs={};function Xs(a,r){return null}const Ys=zt._export_sfc(qs,[["render",Xs]]),Gs={class:"form-operate-content"},Js={class:"form-operate-item"},Zs={class:"operate-title"},Qs={class:"operate-content"},ec={class:"fix-content"},tc={class:"fix-button"},ac={class:"operate-title"},nc={class:"operate-content"},oc={class:"fix-content"},lc={class:"fix-button"},rc={style:{display:"flex","justify-content":"space-between"}},ic={class:"form-content"},sc={class:"dialog-footer"},cc={class:"form-content"},uc={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=e.ref(!1),c=e.ref([]),y=e.ref([]),f=e.ref(!1),p=e.ref([]),x=e.ref([]),_=e.ref(""),E=e.ref(!1),N=e.ref(0),K=e.ref([]),$=e.ref([]),ee=(z,re)=>{if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="selectRelateType"){const Q=re==null?void 0:re.optionUrl;return(Q==null?void 0:Q.selectRelateType)||re[z.key]}if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="menuSelect"){const Q=re==null?void 0:re.optionUrl;return(Q==null?void 0:Q.menuSelect)||re[z.key]}if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="groupSelect"){const Q=re==null?void 0:re.optionUrl;return(Q==null?void 0:Q.groupSelect)||re[z.key]}if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="originalContent")return(re==null?void 0:re.value)||re[z.key];if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="multiple"){const Q=re[z.key];return xl(Q)?Q:z.default}return(z==null?void 0:z.label)==="类型"&&re[z.key]===""?"Input":(z==null?void 0:z.key)==="isFormColHidden"&&!re[z.key]?!1:re[z.key]},F=async z=>{var de,ze,Qe,J,O,W;s.value=!0;let re=[];const Q=await((Qe=(ze=(de=Me.FormContent)==null?void 0:de.find(ce=>(ce==null?void 0:ce.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:ze.value)==null?void 0:Qe.value)??((O=(J=Me.FormContent)==null?void 0:J.find(ce=>(ce==null?void 0:ce.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:O.value);if(Q==null||Q.forEach(ce=>{N.value++,re.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,prop:ce==null?void 0:ce.prop,value:ee(ce,z),id:N.value,contents:ce==null?void 0:ce.options,width:(z==null?void 0:z.width)??1})}),z!=null&&z.menuSelect&&((W=z==null?void 0:z.menuSelect)==null?void 0:W.length)>0){const ce=await Me.menuToContentType(z==null?void 0:z.menuSelect);re=re==null?void 0:re.map(xe=>((xe==null?void 0:xe.name)==="组信息选项"&&(xe.contents=ce),xe))}_.value=z==null?void 0:z.id,c.value=await Me.selectToBase(Me.formToOptionsContents(re)),y.value=await Me.selectToBase(Me.formToOptionsContents(re))},P=z=>{var Q;f.value=!0;let re=[];(Q=Me.FormButton)==null||Q.forEach(de=>{N.value++,re.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&z[de.key]===""?"normal":z[de.key],id:N.value,contents:de==null?void 0:de.options})}),K.value=re,$.value=re,_.value=z==null?void 0:z.id};e.watch(()=>E.value,()=>{var re,Q;let z=T.cloneDeep(i.originalItemContents);(re=T.cloneDeep(i.originalItemContents))!=null&&re.find(de=>(de==null?void 0:de.key)==="enableWrap")?z=(Q=T.cloneDeep(i.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!E.value),de)):z.push({key:"enableWrap",contents:!E.value}),l("change",z)},{deep:!0});const R=()=>{var Q,de,ze,Qe,J;K.value=$.value;let z={};if(_.value!==""?z.id=_.value:(N.value++,z.id="id"+N.value),(Q=K.value)==null||Q.forEach(O=>{var ce;const W=(ce=Me.FormButton)==null?void 0:ce.find(xe=>(xe==null?void 0:xe.label)===(O==null?void 0:O.label));W&&(z[W.key]=O.value)}),(de=p.value)!=null&&de.find(O=>O.id===z.id))p.value=(ze=p.value)==null?void 0:ze.map(O=>(O.id===z.id&&(O=z),O));else{let O=T.cloneDeep(p.value);p.value||(p.value=[]),O.push(z),p.value=O}f.value=!1,_.value="";let re=T.cloneDeep(i.originalItemContents);(Qe=T.cloneDeep(i.originalItemContents))!=null&&Qe.find(O=>(O==null?void 0:O.key)==="formButton")?re=(J=T.cloneDeep(i.originalItemContents))==null?void 0:J.map(O=>((O==null?void 0:O.key)==="formButton"&&(O.contents=p.value),O)):re.push({key:"formButton",contents:p.value}),l("change",re)},m=z=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,Q;x.value=(re=T.cloneDeep(x.value))==null?void 0:re.filter(de=>(de==null?void 0:de.id)!==(z==null?void 0:z.id)),l("change",(Q=T.cloneDeep(i.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=x.value),de))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=z=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,Q;p.value=(re=T.cloneDeep(p.value))==null?void 0:re.filter(de=>(de==null?void 0:de.id)!==(z==null?void 0:z.id)),l("change",(Q=T.cloneDeep(i.originalItemContents))==null?void 0:Q.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=p.value),de))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},g=()=>{var re;f.value=!0;let z=[];(re=Me.FormButton)==null||re.forEach(Q=>{N.value++,z.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:(Q==null?void 0:Q.label)==="类型"?"normal":"",id:N.value,contents:Q==null?void 0:Q.options})}),K.value=z,$.value=z},S=()=>{var re,Q,de;s.value=!0;let z=[];(de=(Q=(re=Me.FormContent)==null?void 0:re.find(ze=>(ze==null?void 0:ze.key)==="Input"))==null?void 0:Q.value)==null||de.forEach(ze=>{N.value++,z.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:N.value,contents:ze==null?void 0:ze.options})}),c.value=z,y.value=z},b=z=>{let re=T.cloneDeep($.value);re=re==null?void 0:re.map(Q=>(Q.value=z==null?void 0:z[Q.name],Q)),$.value=re},ie=z=>{const re=z.find(ze=>(ze==null?void 0:ze.name)==="类型");if((re==null?void 0:re.value)!="Select")return;const Q=z.find(ze=>(ze==null?void 0:ze.name)==="多选"),de=z.find(ze=>(ze==null?void 0:ze.name)==="初始值");Q!=null&&Q.value&&Ao.isString(de.value)&&(de.value=[de.value]),!(Q!=null&&Q.value)&&!Ao.isString(de.value)&&(de.value="")},Te=async z=>{var re,Q,de,ze,Qe,J,O,W,ce,xe,be,Ke;if((z==null?void 0:z.类型)!==((Q=(re=y.value)==null?void 0:re.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:Q.value)){let G=[];const Z=await((Qe=(ze=(de=Me.FormContent)==null?void 0:de.find(k=>(k==null?void 0:k.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:ze.value)==null?void 0:Qe.value)?await((xe=(ce=(W=Me.FormContent)==null?void 0:W.find(k=>(k==null?void 0:k.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:ce.value)==null?void 0:xe.value):(O=(J=Me.FormContent)==null?void 0:J.find(k=>(k==null?void 0:k.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:O.value;if(Z==null||Z.forEach(k=>{var Ie,ue;N.value++;const we=si(k==null?void 0:k.default)?(z==null?void 0:z[k.label])??k.value??"":k==null?void 0:k.default;G.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:we,prop:k==null?void 0:k.prop,id:N.value,contents:k==null?void 0:k.options,width:((ue=(Ie=y.value)==null?void 0:Ie[0])==null?void 0:ue.width)??1})}),z!=null&&z.菜单选项&&((be=z==null?void 0:z.菜单选项)==null?void 0:be.length)>0){const k=await Me.menuToContentType(z==null?void 0:z.菜单选项);G=G==null?void 0:G.map(we=>((we==null?void 0:we.name)==="组信息选项"&&(we.contents=k),we))}ie(G),y.value=await Me.selectToBase(T.cloneDeep(G)),c.value=await Me.selectToBase(T.cloneDeep(G))}else{let G=T.cloneDeep(y.value);if(G=G==null?void 0:G.map(Z=>(Z.value=z==null?void 0:z[Z.name],Z)),z!=null&&z.菜单选项&&((Ke=z==null?void 0:z.菜单选项)==null?void 0:Ke.length)>0){const Z=await Me.menuToContentType(z==null?void 0:z.菜单选项);G=G==null?void 0:G.map(k=>((k==null?void 0:k.name)==="组信息选项"&&(k.contents=Z),k))}G=Me.formToOptionsContents(G),ie(G),y.value=await Me.selectToBase(T.cloneDeep(G))}},Ze=z=>{z||(c.value=y.value)},ke=async z=>{await Te(z),c.value=y.value},Pe=kl(async()=>{var de,ze,Qe,J,O,W,ce,xe,be,Ke,G,Z;c.value=y.value;let z={};z.width=((ze=(de=c.value)==null?void 0:de[0])==null?void 0:ze.width)??1,_.value!==""?z.id=_.value:(N.value++,z.id="id"+N.value);let re=await((O=(J=(Qe=Me.FormContent)==null?void 0:Qe.find(k=>{var we,Ie;return(k==null?void 0:k.key)===(((Ie=(we=c.value)==null?void 0:we.find(ue=>(ue==null?void 0:ue.label)==="类型"))==null?void 0:Ie.value)??"label")}))==null?void 0:J.value)==null?void 0:O.value)??((ce=(W=Me.FormContent)==null?void 0:W.find(k=>{var we,Ie;return(k==null?void 0:k.key)===(((Ie=(we=c.value)==null?void 0:we.find(ue=>(ue==null?void 0:ue.label)==="类型"))==null?void 0:Ie.value)??"label")}))==null?void 0:ce.value);if((xe=c.value)==null||xe.forEach(k=>{const we=re==null?void 0:re.find(Ie=>(Ie==null?void 0:Ie.label)===(k==null?void 0:k.label));we&&(z[we.key]=k.value)}),z.width=z.width?z.width:1,z.key=z==null?void 0:z.label,z.isFormColHidden=z==null?void 0:z.isFormColHidden,(be=x.value)!=null&&be.find(k=>k.id===z.id))x.value=(Ke=x.value)==null?void 0:Ke.map(k=>(k.id===z.id&&(k=z),k));else{let k=T.cloneDeep(x.value);k.push(z),x.value=k}x.value=x.value.map(({id:k,...we})=>we),s.value=!1,_.value="";let Q=T.cloneDeep(i.originalItemContents);(G=T.cloneDeep(i.originalItemContents))!=null&&G.find(k=>(k==null?void 0:k.key)==="formContent")?Q=(Z=T.cloneDeep(i.originalItemContents))==null?void 0:Z.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=x.value),k)):Q.push({key:"formContent",contents:x.value}),l("change",Q)},300),Ne=()=>{s.value=!1,f.value=!1,_.value="",y.value=[],$.value=[]};return e.watch(()=>i.originalItemContents,()=>{var re,Q,de,ze,Qe,J;if(!i.originalItemContents||i.originalItemContents.length===0)return;const z=T.cloneDeep(i.originalItemContents);x.value=((re=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:re.contents)??[],p.value=((Q=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="formButton"))==null?void 0:Q.contents)??[],E.value=(de=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="enableWrap"))!=null&&de.contents?!((ze=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="enableWrap"))!=null&&ze.contents):!0,x.value=(Qe=T.cloneDeep(x.value))==null?void 0:Qe.map((O,W)=>{var xe;let ce=O;return ce.id=(O==null?void 0:O.id)??W,O!=null&&O.label||(O.label=(O==null?void 0:O.key)??(O==null?void 0:O.label)??""),O!=null&&O.type||(O.type=(O==null?void 0:O.type)??""),O.contents=((xe=O==null?void 0:O.options)==null?void 0:xe.length)===0?(O==null?void 0:O.contents)??"":O==null?void 0:O.options,ce}),x.value=Me.formToOptionsContents(x.value),p.value=(J=p.value)==null?void 0:J.map((O,W)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",background:(O==null?void 0:O.background)??"var(--ssComponent-primary-color)",id:W})},{deep:!0,immediate:!0}),(z,re)=>{const Q=e.resolveComponent("svg-icon"),de=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Gs,[e.createElementVNode("div",Js,[e.createElementVNode("div",Zs,[re[2]||(re[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:S},{icon:e.withCtx(()=>[e.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[1]||(re[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(ze,Qe)=>(e.openBlock(),e.createElementBlock("div",{key:Qe},[e.createElementVNode("div",ec,[e.createElementVNode("div",null,e.toDisplayString(ze.label),1),e.createElementVNode("div",tc,[e.createVNode(Q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>F(ze)},null,8,["onClick"]),e.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>m(ze)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ac,[re[4]||(re[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:g},{icon:e.withCtx(()=>[e.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[3]||(re[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(ze,Qe)=>(e.openBlock(),e.createElementBlock("div",{key:Qe},[e.createElementVNode("div",oc,[e.createElementVNode("div",null,e.toDisplayString(ze.label),1),e.createElementVNode("div",lc,[e.createVNode(Q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>P(ze)},null,8,["onClick"]),e.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>v(ze)},null,8,["onClick"])])])]))),128))]),re[6]||(re[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",rc,[re[5]||(re[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":re[0]||(re[0]=ze=>E.value=ze)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:Ne,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ic,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:Te,onChangeVisible:Ze,onBlurChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",sc,[e.createVNode(de,{onClick:Ne,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(de,{class:"ok-button button",onClick:e.unref(Pe),id:"themeButton"},{default:e.withCtx(()=>re[8]||(re[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:f.value,onBeforeDestroy:Ne,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",cc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:K.value,key:K.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ne,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:R},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Po=zt._export_sfc(uc,[["__scopeId","data-v-20850524"]]),dc={class:"step-module content"},pc={class:"module-data"},fc={class:"step-module layout"},hc={class:"form-content"},vc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=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}]),c=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),f=e.reactive({visible:!1,width:"40%",title:"步骤条"}),p=e.ref("create"),x=e.ref({}),_=e.ref([]),E=F=>{var P;x.value=F,l("change",(P=$())==null?void 0:P.compData)},N=(F,P)=>{var R,m;switch(F){case"create":(R=c.value)==null||R.forEach(v=>{v.value=""}),p.value="create",f.visible=!0;break;case"update":(m=c.value)==null||m.forEach(v=>{v.value=P[v==null?void 0:v.prop]}),p.value="update",f.visible=!0;break;case"delete":_.value.splice(P,1),p.value="delete";break}},K=F=>{var P,R,m;if((F==null?void 0:F.buttonName)==="确认"){const v=T.cloneDeep(F==null?void 0:F.content);switch(Object.keys(v).forEach(g=>{v[g]===""&&delete v[g]}),p.value){case"create":_.value.push({...v,index:((P=_.value)==null?void 0:P.length)+1});break;case"update":_.value=(R=_.value)==null?void 0:R.map(g=>g.index===(v==null?void 0:v.index)?{...g,title:v==null?void 0:v.title,description:v==null?void 0:v.description}:g);break}l("change",(m=$())==null?void 0:m.compData),f.visible=!1}else f.visible=!1},$=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),ee=()=>{f.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,F=>{var P,R;F&&(x.value=((P=F==null?void 0:F.find(m=>m.key==="stepConfig"))==null?void 0:P.contents)??{},_.value=((R=F==null?void 0:F.find(m=>m.key==="stepList"))==null?void 0:R.contents)??[])},{immediate:!0}),(F,P)=>{const R=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",dc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=v=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",pc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(v,g)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:g},[e.createElementVNode("span",null,e.toDisplayString(v==null?void 0:v.title),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:S=>N("update",{...v,index:g+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:S=>N("delete",g)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",fc,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:s.value,onChange:E},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:f.visible,title:f.title,onBeforeDestroy:ee,width:f.width},{default:e.withCtx(()=>[e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:K},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),mc=zt._export_sfc(vc,[["__scopeId","data-v-7dbd17f2"]]),gc={class:"step-module content"},yc={class:"module-data"},bc={class:"step-module layout"},kc={class:"form-content"},xc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=e.ref("create"),c=e.ref({}),y=e.ref([]),f=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}]),p=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:"时间线"}),E=F=>{var P;c.value=F,l("change",(P=$())==null?void 0:P.compData)},N=(F,P)=>{var R,m;switch(F){case"create":(R=p.value)==null||R.forEach(v=>{v.value=""}),s.value="create",_.visible=!0;break;case"update":(m=p.value)==null||m.forEach(v=>{v.value=P[v==null?void 0:v.prop]}),s.value="update",_.visible=!0;break;case"delete":y.value.splice(P,1),s.value="delete";break}},K=F=>{var P,R,m,v;if((F==null?void 0:F.buttonName)==="确认"){const g=T.cloneDeep(F==null?void 0:F.content);switch(Object.keys(g).forEach(S=>{g[S]===""&&delete g[S]}),s.value){case"create":(R=y.value)==null||R.push({...g,index:((P=y.value)==null?void 0:P.length)+1});break;case"update":y.value=(m=y.value)==null?void 0:m.map(S=>S.index===(g==null?void 0:g.index)?{...S,content:g==null?void 0:g.content,timestamp:g==null?void 0:g.timestamp}:S);break}l("change",(v=$())==null?void 0:v.compData),_.visible=!1}else _.visible=!1},$=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:y.value},{key:"timeLineConfig",contents:c.value}]}),ee=()=>{_.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,F=>{var P,R;F&&(c.value=((P=F==null?void 0:F.find(m=>m.key==="timeLineConfig"))==null?void 0:P.contents)??{},y.value=((R=F==null?void 0:F.find(m=>m.key==="timeLineList"))==null?void 0:R.contents)??[])},{immediate:!0}),(F,P)=>{const R=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=v=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(v,g)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:g},[e.createElementVNode("span",null,e.toDisplayString(v==null?void 0:v.content),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:S=>N("update",{...v,index:g+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:S=>N("delete",g)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",bc,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:f.value,onChange:E},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ee,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:K},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),wc=zt._export_sfc(xc,[["__scopeId","data-v-39ffc861"]]),Dc={};function _c(a,r){return e.openBlock(),e.createElementBlock("div")}const Ec=zt._export_sfc(Dc,[["render",_c]]),Cc={class:"extra-content"},Sc={key:0},Tc={key:1},Bc={class:"dialog-footer"},Ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:r}){const i=a,l=e.ref(0),s=e.ref(),c=e.ref(),y=r,f=e.ref(!1),p=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[i.itemData],()=>{var v;const m=T.cloneDeep(i.itemData);s.value=(v=T.cloneDeep(m))==null?void 0:v.map(g=>{var S;if(g.key==="extra"){let b=[];(S=g.value)==null||S.forEach(ie=>{var Te;b.push((Te=Object.values(ie))==null?void 0:Te[0])}),g.value=b}return g})},{deep:!0,immediate:!0});const E=(m,v,g,S)=>{var ie;let b={};((ie=m==null?void 0:m[0])==null?void 0:ie.contents)==="详情"&&(f.value=!0,b[v]=m,c.value=m==null?void 0:m.filter(Te=>(Te==null?void 0:Te.key)!=="tableContentName"),p.value=b,x.value=g,_.value=S.id)},N=m=>{var Te,Ze,ke,Pe;const v=(Ze=(Te=Object.values(T.cloneDeep(p.value)))==null?void 0:Te[0])==null?void 0:Ze.filter(Ne=>(Ne==null?void 0:Ne.key)==="tableContentName"),g=(Pe=(ke=Object.values(T.cloneDeep(p.value)))==null?void 0:ke[0])==null?void 0:Pe.filter(Ne=>(Ne==null?void 0:Ne.key)!=="tableContentName"),S=g==null?void 0:g.map((Ne,z)=>{var re;return z===m.index&&(Ne==null?void 0:Ne.comp)==="Table"&&(Ne.compData=(re=Ne.compData)==null?void 0:re.map(Q=>{var de,ze;return(Q==null?void 0:Q.key)==="tableContents"&&(Q.contents=(ze=(de=m.content)==null?void 0:de.map(Qe=>{let J={};for(let O in Qe)O!=="id"&&(J[O]=Qe[O]);return J}))==null?void 0:ze.map(Qe=>Object.values(Qe))),Q})),Ne});S.unshift(v==null?void 0:v[0]);let b=T.cloneDeep(p.value),ie={};for(let Ne in b)ie[Ne]=S;p.value=ie},K=()=>{f.value=!1,p.value={},x.value={},_.value=void 0,l.value++},$=m=>{var Te,Ze,ke,Pe;const v=(Ze=(Te=Object.values(T.cloneDeep(p.value)))==null?void 0:Te[0])==null?void 0:Ze.filter(Ne=>(Ne==null?void 0:Ne.key)==="tableContentName"),g=(Pe=(ke=Object.values(T.cloneDeep(p.value)))==null?void 0:ke[0])==null?void 0:Pe.filter(Ne=>(Ne==null?void 0:Ne.key)!=="tableContentName"),S=g==null?void 0:g.map((Ne,z)=>(z===m.index&&(Ne.compData=m.contents),Ne));S.unshift(v==null?void 0:v[0]);let b=T.cloneDeep(p.value),ie={};for(let Ne in b)ie[Ne]=S;p.value=ie},ee=()=>{var v,g;let m={};for(let S in x.value)S===((v=Object.keys(p.value))==null?void 0:v[0])?m[S]=(g=Object.values(p.value))==null?void 0:g[0]:m[S]=x.value[S];y("change",{buttonName:"编辑",index:_.value,singleContent:m},"methodData"),f.value=!1,p.value={},x.value={},_.value=void 0},F=()=>{f.value=!1,p.value={},x.value={},_.value=void 0},P=m=>{y("change",m,"methodData")},R=m=>un(m);return(m,v)=>{const g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(S,b)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(S==null?void 0:S.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Sc)):(e.openBlock(),e.createElementBlock("div",Tc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(S.comp)),{itemData:S==null?void 0:S.compData,childItemData:S==null?void 0:S.itemChildData,key:b,index:(S==null?void 0:S.id)??b,onContentClick:E,onChange:P},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:f.value,onBeforeDestroy:F},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(S,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(S.comp)),{itemData:S==null?void 0:S.compData,onChange:N,childItemData:S==null?void 0:S.itemChildData,key:b,onContentChange:$,index:(S==null?void 0:S.id)??b,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",Bc,[e.createVNode(g,{class:"cancel-button footer-button",onClick:K,id:"themeBorderButton"},{default:e.withCtx(()=>v[0]||(v[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(g,{class:"confirm-button footer-button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>v[1]||(v[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Nc=zt._export_sfc(Ic,[["__scopeId","data-v-2d9c5ab2"]]),Ac={key:0,class:"method-content"},Vc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const r=e.ref([]),i=Me.useOriginalState(T.pinia),{originalPath:l}=T.storeToRefs(i),s=a,c=e.ref(!1),y=e.ref(),f=Me.useTableComp(T.pinia),{multipleTableConst:p}=T.storeToRefs(f),x=T.useModelComp(T.pinia),_=e.ref(!1),E=T.useMenuState(T.pinia),N=T.useLoginState(T.pinia),{itemData:K,isEdit:$,routeToChildPath:ee,tableViewContents:F,lockingPage:P,payloadTypes:R}=T.storeToRefs(x),{activeMenuPath:m,platform:v,childMenu:g}=T.storeToRefs(E),{loginUserInfo:S}=T.storeToRefs(N),b=e.ref(!1),ie=async()=>{var J,O;(J=r.value)!=null&&J.find(W=>(W==null?void 0:W.buttonName)==="保存")&&await Q((O=r.value)==null?void 0:O.find(W=>(W==null?void 0:W.buttonName)==="保存")),await Me.onSaveBack()};e.watch(()=>K.value,async()=>{$.value==="view"&&!b.value&&await Qe(T.cloneDeep(s.itemData)),b.value=!1},{deep:!0});const Te=()=>{c.value=!1,y.value=void 0},Ze=J=>J.map(O=>{const W={};for(const ce in O){const xe=O[ce];if(ce.includes(p.value)){const be=ce.split(p.value);let Ke=W;be.forEach((G,Z)=>{Z===be.length-1?Ke[G]=xe:(Ke[G]||(Ke[G]={}),Ke=Ke[G])})}else W[ce]=xe}return W}),ke=async(J,O,W=[])=>{var xe,be,Ke,G,Z,k,we,Ie,ue,se,ae,fe,Ce,Ge,dt;let ce=(xe=T.cloneDeep(O))==null?void 0:xe.filter(w=>(w==null?void 0:w.comp)!=="methodButton");if(J!=null&&J.includes("[")){let w=(k=(Z=(G=(Ke=(be=T.cloneDeep(J))==null?void 0:be.split("["))==null?void 0:Ke[1])==null?void 0:G.split("]"))==null?void 0:Z[0])==null?void 0:k.split(":"),I="";if(w!=null&&w[0]){let X=(we=ce==null?void 0:ce.find(ne=>(ne==null?void 0:ne.name)===(w==null?void 0:w[0])))==null?void 0:we.compData;if(!X){let ne=(Ie=J==null?void 0:J.split("["))==null?void 0:Ie[0],B=await Me.getItemData(ne,sessionStorage.getItem("systemKey"),"",!1,"","",W);X=(ue=B==null?void 0:B.find(pe=>(pe==null?void 0:pe.name)===(w==null?void 0:w[0])))==null?void 0:ue.compData}X==null||X.forEach(ne=>{var B,pe,Re,oe,j,H;if((ne==null?void 0:ne.key)==="formContent")(B=ne==null?void 0:ne.contents)==null||B.forEach(Y=>{var _e;(Y==null?void 0:Y.key)===(w==null?void 0:w[1])&&(Array.isArray(Y==null?void 0:Y.value)?I=Y==null?void 0:Y.value:I=(_e=Y==null?void 0:Y.value)==null?void 0:_e.toString())});else if((ne==null?void 0:ne.key)==="tableContents"){let Y=[],_e=(pe=X==null?void 0:X.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:pe.contents,me=(w==null?void 0:w[1])??"";if(_e!=null&&_e.every(q=>Array.isArray(q))){let q=Me.getColumnChild((j=_e==null?void 0:_e[0])==null?void 0:j.filter(ve=>(ve==null?void 0:ve.label)!=="操作"));(H=ne.contents)==null||H.forEach(ve=>{let le={};ve=ve==null?void 0:ve.filter(Ve=>!(Ve!=null&&Ve.id)),q==null||q.forEach((Ve,he)=>{let Be=ve[he];typeof ve[he]=="number"&&(Be=ve[he].toString()),(me===""||me===Ve.prop)&&(le[Ve.prop]=Be)}),Y.push(le)}),Y=Ze(Y)}else{let q=(Re=_e==null?void 0:_e.map(ve=>ve==null?void 0:ve.label))==null?void 0:Re.filter(ve=>ve!=="操作");(oe=ne.contents)==null||oe.forEach(ve=>{let le={};ve=ve==null?void 0:ve.filter(Ve=>!(Ve!=null&&Ve.id)),q==null||q.forEach((Ve,he)=>{let Be=ve[he];typeof ve[he]=="number"&&(Be=ve[he].toString()),(me===""||me===Ve)&&(le[Ve]=Be)}),Y.push(le)})}I=Y}})}return I}else if(J!=null&&J.includes("/")){let w={};return(se=T.cloneDeep(ce))==null||se.forEach((I,X)=>{var ne,B,pe,Re,oe,j,H,Y,_e,me,q,ve,le,Ve,he,Be,L,Oe,ge;if((I==null?void 0:I.comp)==="Table"){let We=Array.isArray((pe=(B=(ne=I==null?void 0:I.compData)==null?void 0:ne.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:B.contents)==null?void 0:pe[0])?(H=(j=(oe=(Re=I==null?void 0:I.compData)==null?void 0:Re.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:oe.contents)==null?void 0:j[0])==null?void 0:H.some(Ae=>Ae==null?void 0:Ae.children):[],st=(me=(_e=(Y=I==null?void 0:I.compData)==null?void 0:Y.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:_e.contents)==null?void 0:me.map(Ae=>(Ae!=null&&Ae.find(pt=>pt==null?void 0:pt.id)&&(Ae=Ae.slice(1)),Ae)),Ye=(he=(Ve=(le=(ve=(q=I==null?void 0:I.compData)==null?void 0:q.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:ve.contents)==null?void 0:le[0])==null?void 0:Ve[0])==null?void 0:he.label,tt=(L=(Be=I==null?void 0:I.compData)==null?void 0:Be.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:L.contents;if(We)(We==null?void 0:We.length)===0?w[I.name]=w!=null&&w[I.name]?w[I.name]:Me.tableToForm(st,tt):w[Ye]=Me.tableToForm(st,tt);else{const Ae=[];tt=tt.slice(1,tt.length-1),tt==null||tt.forEach((pt,Je)=>{st==null||st.forEach($e=>{Ae.push({key:pt.label+$e[0],value:$e[Je+1]})})}),w["form"+X]=Ae}}else{const We=(ge=(Oe=I.compData)==null?void 0:Oe.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"))==null?void 0:ge.contents;w!=null&&w.form||(w.form=[]);const st=[];We==null||We.forEach(Ye=>{Ye.key!==""&&(Ye={key:(Ye==null?void 0:Ye.key)??(Ye==null?void 0:Ye.label),value:Ye==null?void 0:Ye.value},st.push(Ye))}),w.form=[...st,...T.cloneDeep(w==null?void 0:w.form)]}}),w}else{if(J==="createInsofDataApi"){let w=(ae=T.cloneDeep(O))==null?void 0:ae[0];return w={comp:(fe=T.cloneDeep(w))==null?void 0:fe.comp,compData:(Ce=T.cloneDeep(w))==null?void 0:Ce.compData,name:(Ge=T.cloneDeep(w))==null?void 0:Ge.name,isShow:(dt=T.cloneDeep(w))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:m.value},value:{pageData:w}}}return J}},Pe=async(J,O,W)=>{var be,Ke,G;let ce=await Me.getItemData(O,sessionStorage.getItem("systemKey"),""),xe=ce==null?void 0:ce.find(Z=>(Z==null?void 0:Z.name)===(W==null?void 0:W[0]));if(xe){if((xe==null?void 0:xe.comp)==="Table"){let Z={};for(let fe in T.cloneDeep(J))T.cloneDeep(J)[fe]!=="loginUser"?Z[fe]=T.cloneDeep(J)[fe]:Z[fe]=((be=S.value)==null?void 0:be.account)||((Ke=S.value)==null?void 0:Ke.账号);let k=[],we=Z;Array.isArray(J)||(we=[Z]),we==null||we.forEach(fe=>{k.push({[fe[W[1]]]:fe})});let Ie=[],ue=k==null?void 0:k.map(fe=>{var Ce;return(Ce=Object.keys(fe))==null?void 0:Ce[0]});ce==null||ce.forEach(fe=>{var Ce;(fe==null?void 0:fe.name)===(W==null?void 0:W[0])&&((Ce=fe==null?void 0:fe.compData)==null||Ce.forEach(Ge=>{var dt;(Ge==null?void 0:Ge.key)==="tableContents"&&((dt=Ge==null?void 0:Ge.contents)==null||dt.forEach(w=>{w!=null&&w.some(I=>ue.includes(I))&&Ie.push({[w.find(I=>I.id).id]:w.find(I=>ue.includes(I))})}))}))});let se=Ie==null?void 0:Ie.map(fe=>{var Ce;return(Ce=Object.keys(fe))==null?void 0:Ce[0]}),ae=[];if(se==null||se.forEach(fe=>{var dt;let Ce=(dt=Ie==null?void 0:Ie.find(w=>{var I;return((I=Object.keys(w))==null?void 0:I[0].toString())===fe.toString()}))==null?void 0:dt[fe],Ge=k==null?void 0:k.find(w=>{var I;return((I=Object.keys(w))==null?void 0:I[0])===Ce});ae.push({id:parseInt(fe),value:{tableData:Ge[Ce]}})}),(ae==null?void 0:ae.length)>0)return ae}else if((xe==null?void 0:xe.comp)==="Form"){let Z=T.cloneDeep(xe);Z.compData=(G=Z.compData)==null?void 0:G.map(Ie=>{var ue;return(Ie==null?void 0:Ie.key)==="formContent"&&(Ie.contents=(ue=Ie.contents)==null?void 0:ue.map(se=>((se==null?void 0:se.key)===(W==null?void 0:W[1])&&(se.value=(J==null?void 0:J[se==null?void 0:se.prop])||J),se))),Ie});let k={};for(let Ie in Z)Ie!=="id"&&(k[Ie]=Z[Ie]);let we=[];if(we.push({id:xe==null?void 0:xe.id,keyType:W==null?void 0:W[1],value:{pageData:k}}),(we==null?void 0:we.length)>0)return we}}},Ne=async(J,O,W)=>{var be,Ke,G,Z,k,we,Ie,ue,se,ae;let ce=await Me.getItemData(O,sessionStorage.getItem("systemKey"),""),xe=ce==null?void 0:ce.find(fe=>(fe==null?void 0:fe.name)===(W==null?void 0:W[0]));if(xe){if((xe==null?void 0:xe.comp)==="Table"){let fe={};for(let Ce in T.cloneDeep(J))T.cloneDeep(J)[Ce]!=="loginUser"?fe[Ce]=T.cloneDeep(J)[Ce]:fe[Ce]=((be=S.value)==null?void 0:be.account)||((Ke=S.value)==null?void 0:Ke.账号);await ct.createInsofDataApi({key:{type:"data",pageKey:O,tableId:xe==null?void 0:xe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})}else if((xe==null?void 0:xe.comp)==="Form"){let fe=T.cloneDeep(xe),Ce=Object.keys(J),Ge="";(Z=(G=T.cloneDeep(fe))==null?void 0:G.compData)==null||Z.forEach(B=>{var pe,Re;(B==null?void 0:B.key)==="formContent"&&((Re=(pe=T.cloneDeep(B))==null?void 0:pe.contents)==null||Re.forEach(oe=>{var j;Ce.includes(oe==null?void 0:oe.key)&&(oe==null?void 0:oe.value)===((j=S.value)==null?void 0:j.姓名)&&(Ge=oe==null?void 0:oe.key)}))});let dt=[];(k=Object.values(J[Ge]))==null||k.forEach(B=>{B!=null&&B.includes("(")&&dt.push(B)}),dt=[...new Set(dt)];const w=dt==null?void 0:dt.map(async B=>{var H,Y,_e,me,q,ve,le,Ve,he,Be,L,Oe;let pe="";(ve=(q=(me=(_e=(Y=(H=T.cloneDeep(B))==null?void 0:H.split("("))==null?void 0:Y[1])==null?void 0:_e.split(")"))==null?void 0:me[0])==null?void 0:q.split(":"))==null||ve.forEach(ge=>{pe=pe===""?pe+ge.replaceAll("'",""):pe+"/"+ge.replaceAll("'","")});let Re=[];(Oe=(L=(Be=(he=(Ve=(le=T.cloneDeep(B))==null?void 0:le.split("<"))==null?void 0:Ve[1])==null?void 0:he.split(">"))==null?void 0:Be[0])==null?void 0:L.split(":"))==null||Oe.forEach(ge=>{Re.push(ge.replaceAll("'",""))});const oe=await Me.getItemData(pe,sessionStorage.getItem("systemKey"),"");let j="";return oe==null||oe.forEach(ge=>{var We;ge.name===(Re==null?void 0:Re[0])&&((We=ge==null?void 0:ge.compData)==null||We.forEach(st=>{var Ye;(st==null?void 0:st.key)==="formContent"&&((Ye=st.contents)==null||Ye.forEach(tt=>{(tt==null?void 0:tt.key)===(Re==null?void 0:Re[1])&&(j=tt==null?void 0:tt.value)}))}))}),{[B]:j}}),I=await Promise.all(w);fe.compData=(Ie=(we=T.cloneDeep(fe))==null?void 0:we.compData)==null?void 0:Ie.map(B=>{var pe,Re;return(B==null?void 0:B.key)==="formContent"&&(B.contents=(Re=(pe=T.cloneDeep(B))==null?void 0:pe.contents)==null?void 0:Re.map(oe=>{var j,H,Y,_e;return(j=J[Ge])!=null&&j[oe==null?void 0:oe.key]&&(J[Ge][oe==null?void 0:oe.key].includes("(")?oe.value=(H=I==null?void 0:I.find(me=>{var q;return((q=Object.keys(me))==null?void 0:q[0])===J[Ge][oe==null?void 0:oe.key]}))==null?void 0:H[J[Ge][oe==null?void 0:oe.key]]:oe.value=(_e=(Y=T.cloneDeep(J))==null?void 0:Y[Ge])==null?void 0:_e[oe==null?void 0:oe.key]),oe})),B});const X=await ct.getInsofDataApi({key:{type:"structure",pageKey:O,systemKey:sessionStorage.getItem("systemKey")}});let ne="";((ue=X==null?void 0:X.data)==null?void 0:ue.type)==="success"&&((ae=(se=X==null?void 0:X.data)==null?void 0:se.result)==null||ae.forEach(B=>{var pe,Re;((Re=(pe=B==null?void 0:B.value)==null?void 0:pe.pageData)==null?void 0:Re.name)===(W==null?void 0:W[0])&&(ne=B.id)}),await ct.updateInsofDataApi({id:ne,value:{pageData:fe}}))}}},z=(J,O="",W={})=>{for(const[ce,xe]of Object.entries(J)){const be=O?`${O}.${ce}`:ce;xe!==null&&typeof xe=="object"&&!Array.isArray(xe)&&Object.prototype.toString.call(xe)!=="[object Date]"?z(xe,be,W):W[be]=xe}return W},re=async(J,O,W,ce)=>{var Ke,G,Z,k,we,Ie,ue,se,ae,fe,Ce,Ge,dt,w,I,X,ne,B,pe,Re,oe,j,H,Y,_e;let xe=await Me.getItemData(O,sessionStorage.getItem("systemKey"),""),be=xe==null?void 0:xe.find(me=>(me==null?void 0:me.name)===(W==null?void 0:W[0]));if(be){if(!(W!=null&&W[1])&&(be==null?void 0:be.comp)==="Table"){let me={},q=[],ve=(G=(Ke=be==null?void 0:be.compData)==null?void 0:Ke.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:G.contents;ve!=null&&ve.every(he=>Array.isArray(he))?q=(k=Me.getColumnChild((Z=ve==null?void 0:ve[0])==null?void 0:Z.filter(he=>(he==null?void 0:he.label)!=="操作")))==null?void 0:k.map(he=>he==null?void 0:he.prop):q=ve==null?void 0:ve.map(he=>he==null?void 0:he.label);for(let he in T.cloneDeep(J))if(T.cloneDeep(J)[he]!=="loginUser"){let Be=z(T.cloneDeep(J)[he]),L={};for(let Oe in Be)if(q!=null&&q.find(ge=>ge===Oe))L[Oe]=Be[Oe];else if(q!=null&&q.find(ge=>(ge==null?void 0:ge.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()))){let ge=q==null?void 0:q.find(We=>(We==null?void 0:We.toUpperCase())===(Oe==null?void 0:Oe.toUpperCase()));L[ge]=Be[Oe]}me[he]=L}else me[he]=((we=S.value)==null?void 0:we.account)||((Ie=S.value)==null?void 0:Ie.账号);let le=await ct.getInsofDataApi({keyLikes:{tableId:be==null?void 0:be.id}});if(((se=(ue=le==null?void 0:le.data)==null?void 0:ue.result)==null?void 0:se.length)>0){let he=(fe=(ae=le==null?void 0:le.data)==null?void 0:ae.result)==null?void 0:fe.map(Be=>Be==null?void 0:Be.id);(he==null?void 0:he.length)>0&&await ct.batchDeleteInsofDataApi({ids:he})}let Ve=[];if((Ce=be==null?void 0:be.compData)!=null&&Ce.find(he=>(he==null?void 0:he.key)==="pageColumn")&&((w=(dt=(Ge=be==null?void 0:be.compData)==null?void 0:Ge.find(he=>(he==null?void 0:he.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&w.includes("["))){const he=await ct.getInsofDataApi({id:be==null?void 0:be.tableId});let Be=((B=(ne=(X=(I=he==null?void 0:he.data)==null?void 0:I.result)==null?void 0:X[0])==null?void 0:ne.key)==null?void 0:B.pageKey)??"";(pe=Object.values(me))==null||pe.forEach(L=>{Ve.push({key:{type:"data",pageKey:Be,tableId:be==null?void 0:be.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:L}})})}else(Re=Object.values(me))==null||Re.forEach(he=>{Ve.push({key:{type:"data",pageKey:O,tableId:be==null?void 0:be.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:he}})});(Ve==null?void 0:Ve.length)>0&&await ct.batchAddInsofDataApi({dataList:Ve})}else if(!(W!=null&&W[1])&&(be==null?void 0:be.comp)==="Form"){let me=T.cloneDeep(be);me.compData=(j=(oe=T.cloneDeep(me))==null?void 0:oe.compData)==null?void 0:j.map(le=>{var Ve,he;return(le==null?void 0:le.key)==="formContent"&&(le.contents=(he=(Ve=T.cloneDeep(le))==null?void 0:Ve.contents)==null?void 0:he.map(Be=>{var L,Oe;return(L=T.cloneDeep(J))!=null&&L[Be==null?void 0:Be.key]&&(Be.value=(Oe=T.cloneDeep(J))==null?void 0:Oe[Be==null?void 0:Be.key]),Be})),le});const q=await ct.getInsofDataApi({key:{type:"structure",pageKey:O,systemKey:sessionStorage.getItem("systemKey")}});let ve="";((H=q==null?void 0:q.data)==null?void 0:H.type)==="success"&&((_e=(Y=q==null?void 0:q.data)==null?void 0:Y.result)==null||_e.forEach(le=>{var Ve,he;((he=(Ve=le==null?void 0:le.value)==null?void 0:Ve.pageData)==null?void 0:he.name)===(W==null?void 0:W[0])&&(ve=le.id)}),await ct.updateInsofDataApi({id:ve,value:{pageData:me}}))}}},Q=async J=>{var O,W,ce,xe,be,Ke,G,Z,k,we,Ie,ue,se,ae,fe,Ce;E.setImportLoading(!0);try{if(J.api){let Ge=new WeakMap;(W=(O=(await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:R.value})).data.result)==null?void 0:O.filter(H=>{var Y,_e;return((Y=H==null?void 0:H.key)==null?void 0:Y.pageKey)!=="menu"&&((_e=H==null?void 0:H.key)==null?void 0:_e.pageKey)!=="secret"}))==null||W.forEach(H=>{Ge[H.key.pageKey]?Ge[H.key.pageKey]=[...Ge[H.key.pageKey],H]:Ge[H.key.pageKey]=[H]});let w=await Me.getItemData((g==null?void 0:g.value)===""?m.value:g==null?void 0:g.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge),I="";if(w=w==null?void 0:w.map(H=>{var Y,_e,me,q,ve,le,Ve,he,Be,L,Oe,ge;if((H==null?void 0:H.comp)==="Form")H.compData=(Y=H.compData)==null?void 0:Y.map(We=>{var st;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(st=We.contents)==null?void 0:st.map(Ye=>{var tt;if((Ye==null?void 0:Ye.value)===""&&(Ye==null?void 0:Ye.type)==="Select"){let Ae=Me.judgeContents((tt=T.cloneDeep(Ye))==null?void 0:tt.optionUrl,Ge);Ye.value=Ye.value||Ae}return Ye})),We});else if((H==null?void 0:H.comp)==="Table"&&(_e=H.compData)!=null&&_e.find(We=>(We==null?void 0:We.key)==="pageColumn")){let We=(q=(me=H.compData)==null?void 0:me.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn"))==null?void 0:q.contents,st=((le=(ve=H.compData)==null?void 0:ve.find(Ae=>(Ae==null?void 0:Ae.key)==="pageGroup"))==null?void 0:le.contents)??"",Ye=(Be=(he=(Ve=We==null?void 0:We.split("["))==null?void 0:Ve[1])==null?void 0:he.split("]"))==null?void 0:Be[0];I=((L=We==null?void 0:We.split("["))==null?void 0:L[0])+((ge=(Oe=F.value)==null?void 0:Oe.find(Ae=>(Ae==null?void 0:Ae.key)===Ye))==null?void 0:ge.value)}return H}),!(I===""||I==="")){const H=await Me.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);w=w==null?void 0:w.map(Y=>{var _e,me,q,ve,le,Ve,he,Be,L,Oe,ge,We,st;if((Y==null?void 0:Y.comp)==="Table"&&(_e=Y.compData)!=null&&_e.find(Ye=>(Ye==null?void 0:Ye.key)==="pageColumn")){let Ye=(q=(me=Y.compData)==null?void 0:me.find($e=>($e==null?void 0:$e.key)==="pageColumn"))==null?void 0:q.contents,tt=((le=(ve=Y.compData)==null?void 0:ve.find($e=>($e==null?void 0:$e.key)==="pageGroup"))==null?void 0:le.contents)??"",Ae=(Be=(he=(Ve=Ye==null?void 0:Ye.split("["))==null?void 0:Ve[1])==null?void 0:he.split("]"))==null?void 0:Be[0],pt=((L=Ye==null?void 0:Ye.split("["))==null?void 0:L[0])+((ge=(Oe=F.value)==null?void 0:Oe.find($e=>($e==null?void 0:$e.key)===Ae))==null?void 0:ge.value),Je=(We=H==null?void 0:H.find($e=>($e==null?void 0:$e.name)===(tt===""?s==null?void 0:s.compName:tt)))==null?void 0:We.compData;Y.compData=(st=Y.compData)==null?void 0:st.map($e=>{var rt;return($e==null?void 0:$e.key)==="tableContents"&&($e.contents=(rt=Je==null?void 0:Je.find(mt=>(mt==null?void 0:mt.key)==="tableContents"))==null?void 0:rt.contents),$e})}return Y})}let X={};if(((xe=(ce=J==null?void 0:J.extraValues)==null?void 0:ce.input)==null?void 0:xe.length)>0){const H=(Ke=(be=J==null?void 0:J.extraValues)==null?void 0:be.input)==null?void 0:Ke.map(async Y=>{var _e;de!=null&&de.find(me=>me===Y)?X=await ke(Y,w):X[Object.keys(Y)[0]]=await ke((_e=Object.values(Y))==null?void 0:_e[0],w,Ge)});await Promise.all(H)}else X=await ke("/",w);let ne=!1;(Z=(G=J==null?void 0:J.extraValues)==null?void 0:G.output)==null||Z.forEach(H=>{var Y,_e;(_e=(Y=Object.values(H))==null?void 0:Y[0])!=null&&_e.includes(".doc")&&(ne=!0)});let B;if(ne){const H=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});B=await ct.axios.post(J.api,X,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else B=await ct.axios.post(J.api,X,{headers:{"Content-Type":"application/json"}});let pe=(ue=(Ie=(we=(k=T.cloneDeep(J))==null?void 0:k.extraValues)==null?void 0:we.output)==null?void 0:Ie.map(H=>{var Y,_e,me,q,ve,le,Ve,he,Be,L,Oe,ge,We,st,Ye,tt;if(!((_e=(Y=Object.values(H))==null?void 0:Y[0])!=null&&_e.includes(".doc"))){let Ae=(L=(Be=(he=(q=T.cloneDeep((me=Object.values(H))==null?void 0:me[0]))==null?void 0:q.split("["))==null?void 0:he[((Ve=(le=T.cloneDeep((ve=Object.values(H))==null?void 0:ve[0]))==null?void 0:le.split("["))==null?void 0:Ve.length)-1])==null?void 0:Be.split("]"))==null?void 0:L[0],pt=Ae==null?void 0:Ae.split(":"),Je=(We=T.cloneDeep((Oe=Object.values(H))==null?void 0:Oe[0]))==null?void 0:We.substring(0,T.cloneDeep((ge=Object.values(H))==null?void 0:ge[0]).lastIndexOf("["));if(Je=(Ye=T.cloneDeep(Je))==null?void 0:Ye.slice(0,((st=T.cloneDeep(Je))==null?void 0:st.length)-1),Je!=null&&Je.includes("[")){let $e="";if((tt=Me.contentTransArrayToAll(Je,"/"))==null||tt.forEach(rt=>{var mt,wt,He,ot,bt,Fe,Ue;if(!(rt!=null&&rt.includes("[")))$e=$e===""?$e+rt.replaceAll("/",""):$e+"/"+rt.replaceAll("/","");else{let Xe=T.cloneDeep(rt).slice(1,((mt=T.cloneDeep(rt))==null?void 0:mt.length)-1),Se=(Fe=(bt=(ot=(He=(wt=T.cloneDeep(Xe))==null?void 0:wt.split("["))==null?void 0:He[1])==null?void 0:ot.split("]"))==null?void 0:bt[0])==null?void 0:Fe.split(":"),V="",ye=(Ue=w==null?void 0:w.find(De=>(De==null?void 0:De.name)===(Se==null?void 0:Se[0])))==null?void 0:Ue.compData;ye==null||ye.forEach(De=>{var at;(De==null?void 0:De.key)==="formContent"&&((at=De==null?void 0:De.contents)==null||at.forEach(et=>{(et==null?void 0:et.key)===(Se==null?void 0:Se[1])&&(V=et==null?void 0:et.value)}))}),$e=$e===""?$e+V.replaceAll("/",""):$e+"/"+V.replaceAll("/","")}}),Je=$e,Je[(Je==null?void 0:Je.length)-1]!=="/")return Je}}}))==null?void 0:ue.filter(H=>H);pe=[...new Set(T.cloneDeep(pe))];let Re=pe==null?void 0:pe.map(async H=>{let Y=await Me.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);if((Y==null?void 0:Y.length)===0)return await Me.getParentContents(H)});await Promise.all(Re);let oe=[],j=(fe=(ae=(se=T.cloneDeep(J))==null?void 0:se.extraValues)==null?void 0:ae.output)==null?void 0:fe.map(async H=>{var he,Be,L,Oe,ge,We,st,Ye,tt,Ae,pt,Je,$e,rt,mt,wt,He,ot,bt,Fe,Ue,Xe,Se,V,ye,De,at,et,Et,_t,ut,ft,vt,yt,$t,kt,Rt,Pt,Kt,Ht,Jt,ta,jt,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma,Ct;if((Be=(he=Object.values(H))==null?void 0:he[0])!=null&&Be.includes(".doc")){var Y=new Blob([B.data],{type:"application/octet-stream;charset=UTF-8"}),_e=B.headers["content-disposition"],me=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),q=me.exec(_e),ve=q==null?void 0:q[1],le=document.createElement("a"),Ve=window.URL.createObjectURL(Y);y.value=[{name:ve,blobUrl:Ve}],c.value=!0}else{let aa=(Ae=(tt=(Ye=(Oe=T.cloneDeep((L=Object.values(H))==null?void 0:L[0]))==null?void 0:Oe.split("["))==null?void 0:Ye[((st=(We=T.cloneDeep((ge=Object.values(H))==null?void 0:ge[0]))==null?void 0:We.split("["))==null?void 0:st.length)-1])==null?void 0:tt.split("]"))==null?void 0:Ae[0],nt=aa==null?void 0:aa.split(":"),qt=($e=T.cloneDeep((pt=Object.values(H))==null?void 0:pt[0]))==null?void 0:$e.substring(0,T.cloneDeep((Je=Object.values(H))==null?void 0:Je[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(mt=T.cloneDeep(qt))==null?void 0:mt.slice(0,((rt=T.cloneDeep(qt))==null?void 0:rt.length)-1):qt===""&&(qt=m.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Dt="";(wt=Me.contentTransArrayToAll(qt,"/"))==null||wt.forEach((It,Mt)=>{var Lt,At,na,Yt,za,Qa,Ra,en,An,dn,yn;if(!(It!=null&&It.includes("[")))Dt=Dt===""?Dt+It.replaceAll("/",""):Dt+"/"+It.replaceAll("/","");else{let pn="",ha="";(Lt=T.cloneDeep(It))!=null&&Lt.includes("]")?(pn=T.cloneDeep(It).slice(1,((At=T.cloneDeep(It))==null?void 0:At.length)-1),ha=(Ra=(Qa=(za=(Yt=(na=T.cloneDeep(pn))==null?void 0:na.split("["))==null?void 0:Yt[1])==null?void 0:za.split("]"))==null?void 0:Qa[0])==null?void 0:Ra.split(":")):(pn=T.cloneDeep(It).slice(1,(en=T.cloneDeep(It))==null?void 0:en.length),ha=(An=T.cloneDeep(pn))==null?void 0:An.split("/"));let tn="",fn=(dn=w==null?void 0:w.find(ua=>(ua==null?void 0:ua.name)===(ha==null?void 0:ha[0])))==null?void 0:dn.compData;fn==null||fn.forEach(ua=>{var Vn;(ua==null?void 0:ua.key)==="formContent"&&((Vn=ua==null?void 0:ua.contents)==null||Vn.forEach(Pa=>{(Pa==null?void 0:Pa.key)===(ha==null?void 0:ha[1])&&(tn=Pa==null?void 0:Pa.value)}))}),((yn=Me.contentTransArrayToAll(qt,"/"))==null?void 0:yn.length)-1!==Mt?Dt=Dt===""?Dt+tn.replaceAll("/",""):Dt+"/"+tn.replaceAll("/",""):Dt=Dt+l.value+tn.replaceAll("/","")}}),(He=m.value)!=null&&He.includes(Dt)?qt=m.value:qt=Dt}let St=T.cloneDeep((ot=Object.keys(H))==null?void 0:ot[0]);if(((bt=B==null?void 0:B.data)==null?void 0:bt.statusCode)===200||((Fe=B==null?void 0:B.data)==null?void 0:Fe.code)===200){if(((Xe=(Ue=B==null?void 0:B.data)==null?void 0:Ue.data)!=null&&Xe[St]||(V=(Se=B==null?void 0:B.data)==null?void 0:Se.result)!=null&&V[St])&&(nt==null?void 0:nt.length)===1)return await re(((De=(ye=B==null?void 0:B.data)==null?void 0:ye.data)==null?void 0:De[St])||((et=(at=B==null?void 0:B.data)==null?void 0:at.result)==null?void 0:et[St]),T.cloneDeep(qt),nt,I);if((_t=(Et=B==null?void 0:B.data)==null?void 0:Et.data)!=null&&_t[St]||(ft=(ut=B==null?void 0:B.data)==null?void 0:ut.result)!=null&&ft[St]){let Dt=await Pe(((yt=(vt=B==null?void 0:B.data)==null?void 0:vt.data)==null?void 0:yt[St])||((kt=($t=B==null?void 0:B.data)==null?void 0:$t.result)==null?void 0:kt[St]),T.cloneDeep(qt),nt);return Dt&&(oe=[...oe,...Dt]),Dt}else{if(!((Rt=B==null?void 0:B.data)!=null&&Rt.data)){let Dt=await Me.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);Dt=Dt==null?void 0:Dt.map(Mt=>{var Lt;return(Mt==null?void 0:Mt.name)===(nt==null?void 0:nt[0])&&(Mt.compData=(Lt=Mt.compData)==null?void 0:Lt.map(At=>{var na;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(na=At.contents)==null?void 0:na.map(Yt=>{var za,Qa;return(Yt==null?void 0:Yt.key)===(nt==null?void 0:nt[1])&&(Yt.value=(Qa=(za=B==null?void 0:B.data)==null?void 0:za.result)==null?void 0:Qa[St==null?void 0:St.replaceAll(":","")]),Yt})),At})),Mt});let It=[];(Pt=Dt==null?void 0:Dt.filter(Mt=>(Mt==null?void 0:Mt.comp)==="Form"))==null||Pt.forEach(async Mt=>{let Lt={};for(let At in Mt)At!=="id"&&(Lt[At]=Mt[At]);It.push({id:Mt==null?void 0:Mt.id,value:{pageData:Lt}})}),(It==null?void 0:It.length)>0&&await ct.batchUpdateInsofDataApi({dataList:It});return}if((nt==null?void 0:nt.length)===1){const Dt=(Jt=(Ht=(Kt=B==null?void 0:B.data)==null?void 0:Kt.data)==null?void 0:Ht.path)==null?void 0:Jt.path;let It="";(ja=(wa=(Fa=(jt=(ta=Dt==null?void 0:Dt.split("("))==null?void 0:ta[1])==null?void 0:jt.split(")"))==null?void 0:Fa[0])==null?void 0:wa.split(":"))==null||ja.forEach(At=>{var na,Yt;It=It===""?It+((na=At==null?void 0:At.replaceAll("'",""))==null?void 0:na.trim()):It+"/"+((Yt=At==null?void 0:At.replaceAll("'",""))==null?void 0:Yt.trim())});let Mt=[(Ha=(Wa=(Ka=(Ua=(Da=Dt==null?void 0:Dt.split("<"))==null?void 0:Da[1])==null?void 0:Ua.split(">"))==null?void 0:Ka[0])==null?void 0:Wa.replaceAll("'",""))==null?void 0:Ha.trim()],Lt;return(ya=(Na=(qa=B==null?void 0:B.data)==null?void 0:qa.data)==null?void 0:Na.data)!=null&&ya[nt==null?void 0:nt[0]]?Lt=await re((ba=(_a=(fa=B==null?void 0:B.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ba[nt==null?void 0:nt[0]],It,nt,I):Lt=await Ne((ma=(ca=B==null?void 0:B.data)==null?void 0:ca.data)==null?void 0:ma.data,It,Mt,Ge),Lt}else{const Dt=(Va=(Aa=(Xa=B==null?void 0:B.data)==null?void 0:Xa.data)==null?void 0:Aa.path)==null?void 0:Va.path;let It="";return(Ja=(Oa=(Ga=(Ya=(Ea=Dt==null?void 0:Dt.split("("))==null?void 0:Ea[1])==null?void 0:Ya.split(")"))==null?void 0:Ga[0])==null?void 0:Oa.split(":"))==null||Ja.forEach(Lt=>{var At,na;It=It===""?It+((At=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:At.trim()):It+"/"+((na=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:na.trim())}),await Pe((Ct=(Ma=(Za=B==null?void 0:B.data)==null?void 0:Za.data)==null?void 0:Ma.data)==null?void 0:Ct[nt==null?void 0:nt[0]],It,nt)}}}}});if(await Promise.all(j),(oe==null?void 0:oe.length)>0){let H=[];oe==null||oe.forEach(me=>{H!=null&&H.find(q=>{var ve,le,Ve,he;return((le=(ve=q==null?void 0:q.value)==null?void 0:ve.pageData)==null?void 0:le.name)===((he=(Ve=me==null?void 0:me.value)==null?void 0:Ve.pageData)==null?void 0:he.name)})||H.push(me)});let Y=[];H==null||H.forEach(me=>{var le,Ve,he,Be;let q=T.cloneDeep(me);q.value.pageData.compData=(le=q.value.pageData.compData)==null?void 0:le.map(L=>{var Oe;return(L==null?void 0:L.key)==="formContent"&&(L.contents=(Oe=L.contents)==null?void 0:Oe.map(ge=>{var st,Ye,tt,Ae;let We=(st=T.cloneDeep(oe))==null?void 0:st.find(pt=>(pt==null?void 0:pt.keyType)===(ge==null?void 0:ge.key));if(We){let pt=(Ae=(tt=(Ye=We.value.pageData.compData)==null?void 0:Ye.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ae.find(Je=>(Je==null?void 0:Je.key)===(ge==null?void 0:ge.key));ge.value=pt==null?void 0:pt.value}return ge})),L}),Y.push({id:q==null?void 0:q.id,value:q==null?void 0:q.value});let ve=[];(Be=(he=(Ve=q==null?void 0:q.value)==null?void 0:Ve.pageData)==null?void 0:he.compData)==null||Be.forEach(L=>{var Oe;(L==null?void 0:L.key)==="formContent"&&((Oe=L==null?void 0:L.contents)==null||Oe.forEach(ge=>{var We,st,Ye,tt,Ae,pt;if((st=(We=ge==null?void 0:ge.optionUrl)==null?void 0:We.menuSelect)!=null&&st.find(Je=>Je==null?void 0:Je.includes("[")))if(ve!=null&&ve.find(Je=>{var $e,rt,mt;return(($e=Je==null?void 0:Je.key)==null?void 0:$e.join(","))===((mt=(rt=ge==null?void 0:ge.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:mt.join(","))})){let Je=(Ye=ve==null?void 0:ve.find($e=>{var rt,mt,wt;return((rt=$e==null?void 0:$e.key)==null?void 0:rt.join(","))===((wt=(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))}))==null?void 0:Ye.value;Je.push({key:ge==null?void 0:ge.prop,groups:(tt=ge==null?void 0:ge.optionUrl)==null?void 0:tt.groupSelect,value:ge==null?void 0:ge.value}),ve=ve==null?void 0:ve.map($e=>{var rt,mt,wt;return((rt=$e==null?void 0:$e.key)==null?void 0:rt.join(","))===((wt=(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))&&($e.value=Je),$e})}else ve.push({key:(Ae=ge==null?void 0:ge.optionUrl)==null?void 0:Ae.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(pt=ge==null?void 0:ge.optionUrl)==null?void 0:pt.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(ve==null?void 0:ve.length)>0&&(ve=ve==null?void 0:ve.map(L=>{var ge;let Oe="";return(ge=L==null?void 0:L.key)==null||ge.forEach(We=>{var st;if(!(We!=null&&We.includes("[")))Oe=Oe===""?Oe+We:Oe+"/"+We;else{let Ye="",tt=(st=We==null?void 0:We.replaceAll("[","").replaceAll("]",""))==null?void 0:st.split(":");w==null||w.forEach(Ae=>{var pt;(Ae==null?void 0:Ae.name)===(tt==null?void 0:tt[0])&&((pt=Ae==null?void 0:Ae.compData)==null||pt.forEach(Je=>{var $e;(Je==null?void 0:Je.key)==="formContent"&&(($e=Je==null?void 0:Je.contents)==null||$e.forEach(rt=>{(rt==null?void 0:rt.prop)===(tt==null?void 0:tt[1])&&(Ye=rt==null?void 0:rt.value)}))}))}),Oe=Oe+l.value+Ye}}),L.key=Oe,L})),ve==null||ve.forEach(L=>{var st,Ye,tt;let Oe=(st=Ge[L.key])==null?void 0:st.find(Ae=>{var pt,Je,$e,rt,mt,wt,He;return((Je=(pt=Ae==null?void 0:Ae.value)==null?void 0:pt.pageData)==null?void 0:Je.name)===((mt=(rt=($e=L==null?void 0:L.value)==null?void 0:$e[0])==null?void 0:rt.groups)==null?void 0:mt[0])&&((He=(wt=Ae==null?void 0:Ae.value)==null?void 0:wt.pageData)==null?void 0:He.name)!==void 0}),ge=Oe==null?void 0:Oe.id,We=(Ye=Oe==null?void 0:Oe.value)==null?void 0:Ye.pageData;We.compData=(tt=We.compData)==null?void 0:tt.map(Ae=>{var pt;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(pt=Ae.contents)==null?void 0:pt.map(Je=>{var rt;let $e=(rt=L.value)==null?void 0:rt.find(mt=>(mt==null?void 0:mt.key)===(Je==null?void 0:Je.prop));return $e&&(Je.value=$e.value),Je})),Ae}),Y.push({id:ge,value:{pageData:We}})})});let _e=(Ce=T.cloneDeep(oe))==null?void 0:Ce[0];(Y==null?void 0:Y.length)>0&&await ct.batchUpdateInsofDataApi({dataList:Y})}x.setFreshContent(!0)}E.setImportLoading(!1)}catch{ct.ElMessage.error("方法执行错误,请查看方法!"),E.setImportLoading(!1)}b.value=!0},de=["createInsofDataApi"],ze=kl(async J=>{Q(J)},100),Qe=async J=>{var G,Z,k,we,Ie;const O=T.cloneDeep(J);let W,ce=new WeakMap,xe=await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:R.value});(Z=(G=xe.data.result)==null?void 0:G.filter(ue=>{var se,ae;return((se=ue==null?void 0:ue.key)==null?void 0:se.pageKey)!=="menu"&&((ae=ue==null?void 0:ue.key)==null?void 0:ae.pageKey)!=="secret"}))==null||Z.forEach(ue=>{ce[ue.key.pageKey]?ce[ue.key.pageKey]=[...ce[ue.key.pageKey],ue]:ce[ue.key.pageKey]=[ue]}),J!=null&&J[0].path&&(W=await(O==null?void 0:O.map(async(ue,se)=>{var X,ne,B,pe,Re,oe,j,H,Y,_e,me,q,ve,le,Ve,he;const fe=(X=ce[ue==null?void 0:ue.path])==null?void 0:X.filter(Be=>{var L;return((L=Be==null?void 0:Be.key)==null?void 0:L.type)==="data"});let Ce="";const Ge=await Me.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ce);fe==null||fe.forEach(Be=>{var L,Oe,ge,We,st;((Oe=(L=Be==null?void 0:Be.value)==null?void 0:L.tableData)==null?void 0:Oe.算法名称)===((ge=O==null?void 0:O[se])==null?void 0:ge.method)&&(Ce=(st=(We=Be==null?void 0:Be.value)==null?void 0:We.tableData)==null?void 0:st.算法体)});const dt=await Me.getItemData(ue==null?void 0:ue.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ce);let w="",I=(Re=(pe=(B=(ne=dt==null?void 0:dt[0])==null?void 0:ne.compData)==null?void 0:B.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:pe.contents)==null?void 0:Re.findIndex(Be=>(Be==null?void 0:Be.prop)==="算法体");return(j=(oe=dt==null?void 0:dt[0])==null?void 0:oe.compData)==null||j.forEach(Be=>{var L;(Be==null?void 0:Be.key)==="tableContents"&&((L=Be==null?void 0:Be.contents)==null||L.forEach(Oe=>{Oe!=null&&Oe.find(ge=>ge===(ue==null?void 0:ue.method))&&(w=Oe[I])}))}),{buttonName:((H=O==null?void 0:O[se])==null?void 0:H.method)||((me=(_e=(Y=fe==null?void 0:fe[0])==null?void 0:Y.value)==null?void 0:_e.tableData)==null?void 0:me.算法名称),api:(Ce===""?(le=(ve=(q=fe==null?void 0:fe[0])==null?void 0:q.value)==null?void 0:ve.tableData)==null?void 0:le.算法体:Ce)||w,content:Ge==null?void 0:Ge.filter(Be=>Be.comp!=="methodButton"),extraContent:(Ve=T.cloneDeep(ue.value))==null?void 0:Ve.slice(1),methodName:(ue==null?void 0:ue.path)??"",extraValues:(he=O==null?void 0:O[se])==null?void 0:he.data}})));const be=O==null?void 0:O.map(async ue=>{var dt,w,I,X,ne,B;const se=(dt=xe.data.result)==null?void 0:dt.filter(pe=>{var Re,oe,j;return((Re=pe==null?void 0:pe.key)==null?void 0:Re.parentTable)===""&&((oe=pe==null?void 0:pe.key)==null?void 0:oe.type)==="method"&&((j=pe==null?void 0:pe.key)==null?void 0:j.methodName)===pe.method}),ae=se==null?void 0:se[0],fe=(w=xe.data.result)==null?void 0:w.filter(pe=>{var Re,oe;return((Re=pe==null?void 0:pe.key)==null?void 0:Re.type)==="methodData"&&((oe=pe==null?void 0:pe.key)==null?void 0:oe.tableId)===(ae==null?void 0:ae.id)}),Ce=await Me.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ce),Ge=fe==null?void 0:fe[0];return{buttonName:(I=ae==null?void 0:ae.key)==null?void 0:I.methodKey,api:(ne=(X=Ge==null?void 0:Ge.value)==null?void 0:X.tableData)==null?void 0:ne[0],content:Ce==null?void 0:Ce.filter(pe=>pe.comp!=="methodButton"),extraContent:(B=T.cloneDeep(ue.value))==null?void 0:B.slice(1),methodName:(ue==null?void 0:ue.method)??""}}),Ke=(k=J==null?void 0:J[0])!=null&&k.path&&((we=J==null?void 0:J[0])==null?void 0:we.path)!==""?await Promise.all(W):await Promise.all(be);r.value=Ke==null?void 0:Ke.filter(ue=>ue==null?void 0:ue.extraContent),(Ie=r.value)==null||Ie.forEach(ue=>{var se;ue.api===""&&((se=ue.content)==null||se.forEach(ae=>{var fe;ae.comp=="Table"&&x.setExtraContents(Me.methodTableToContent(ae.compData,(fe=ue.extraContent)==null?void 0:fe[0]))}))})};return e.watch(()=>s.itemData,async()=>{$.value=="view"&&!b.value&&await Qe(T.cloneDeep(s.itemData)),b.value=!1},{immediate:!0,deep:!0}),(J,O)=>{var W,ce,xe;return e.unref($)!=="edit"?(e.openBlock(),e.createElementBlock("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((W=r.value)==null?void 0:W.filter(be=>(be==null?void 0:be.buttonName)!=="保存"),be=>{var Ke;return e.openBlock(),e.createElementBlock("div",null,[be.api!==""?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,disabled:e.unref(P)===e.unref(m)&&!((Ke=be==null?void 0:be.buttonName)!=null&&Ke.includes("预览")),class:"calculator-content",modelValue:be.buttonName,onClickTrigger:G=>e.unref(ze)(be),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ee)!==""&&((xe=e.unref(m))==null?void 0:xe[((ce=e.unref(m))==null?void 0:ce.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ie,modelValue:"保存"})):e.createCommentVNode("",!0)]),c.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:Te},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oc=zt._export_sfc(Vc,[["__scopeId","data-v-11fca7e0"]]),Mc={};function zc(a,r){return" 567 "}const Rc=zt._export_sfc(Mc,[["render",zc]]),Pc={class:"module content"},$c={class:"module data"},Lc={class:"module layout"},Fc={class:"form-content"},jc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=e.reactive({visible:!1,width:"40%",title:"签名配置"}),c=e.ref("create"),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),f=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}]),p=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([]),E=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),N=F=>{var P;x.value=T.cloneDeep(F),l("change",(P=E())==null?void 0:P.compData)},K=F=>{var P,R;if((F==null?void 0:F.buttonName)==="确认"){const m=T.cloneDeep(F==null?void 0:F.content);switch(c.value){case"create":_.value.push({...m,index:((P=_.value)==null?void 0:P.length)+1});break}l("change",(R=E())==null?void 0:R.compData),s.visible=!1}else s.visible=!1},$=(F,P)=>{var R,m;switch(F){case"create":(R=p.value)==null||R.forEach(v=>{v.value=""}),c.value="create",s.visible=!0;break;case"update":(m=p.value)==null||m.forEach(v=>{v.value=P[v==null?void 0:v.prop]}),c.value="update",s.visible=!0;break;case"delete":_.value.splice(P,1),c.value="delete";break}},ee=()=>{s.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,F=>{var P,R;F&&(x.value=((P=F==null?void 0:F.find(m=>m.key==="signConfig"))==null?void 0:P.contents)??{},_.value=((R=F==null?void 0:F.find(m=>m.key==="signTypeList"))==null?void 0:R.contents)??[])},{immediate:!0}),(F,P)=>{const R=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Pc,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=v=>$("create"))},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",$c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(v,g)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:g},[e.createElementVNode("span",null,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:S=>$("update",{...v,index:g+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:S=>$("delete",g)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Lc,[e.createVNode(Nt.ssForm,{rowContents:f.value,onChange:N},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:ee,width:s.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:K},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Uc=zt._export_sfc(jc,[["__scopeId","data-v-487e0536"]]),Kc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:r}){const i=a,l=r,s=e.ref(1),c=e.computed(()=>{var E,N;return(E=i==null?void 0:i.stepConfig)!=null&&E.allowTrigger?s.value:(N=i==null?void 0:i.stepConfig)==null?void 0:N.active}),y=(E,N)=>{s.value=N,l("clickStep",E,N)},f=E=>Nt.getComponent(E),p=()=>{var N;const E=(N=i==null?void 0:i.stepList)==null?void 0:N.find((K,$)=>$+1===c.value);return console.log("findStep",E),E?E==null?void 0:E.children:[]},x=E=>{l("clickTrigger",E)},_=E=>{l("changeTrigger",E)};return(E,N)=>{var ee,F,P,R,m;const K=e.resolveComponent("el-step"),$=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode($,{direction:(ee=a.stepConfig)==null?void 0:ee.direction,active:c.value,"finish-status":"success",simple:(F=a.stepConfig)==null?void 0:F.simple,"align-center":((P=a.stepConfig)==null?void 0:P.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(v,g)=>(e.openBlock(),e.createBlock(K,{key:g,class:"step-item",onClick:S=>y(v,g+1)},{title:e.withCtx(()=>[e.renderSlot(E.$slots,"title",{title:v==null?void 0:v.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(E.$slots,"description",{description:v==null?void 0:v.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(R=a.stepConfig)!=null&&R.allowTrigger&&((m=a.stepConfig)!=null&&m.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p(),(v,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(v==null?void 0:v.type)),{modelValue:v.value,"onUpdate:modelValue":S=>v.value=S,onClickTrigger:x,onChangeTrigger:_,content:v==null?void 0:v.content},e.createSlots({_:2},[e.renderList(E.$slots,(S,b)=>({name:b,fn:e.withCtx(ie=>[e.renderSlot(E.$slots,b,e.mergeProps({ref_for:!0},ie||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Wc=zt._export_sfc(Kc,[["__scopeId","data-v-d7c99969"]]),Hc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:r}){const i=a,l=r,s=e.ref({}),c=e.ref([]),y=(f,p)=>{l("clickStep",f,p)};return e.watch(()=>i==null?void 0:i.itemData,f=>{var p,x;c.value=(p=f==null?void 0:f.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:p.contents,s.value=(x=f==null?void 0:f.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(f,p)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Wc,{stepConfig:s.value,stepList:c.value,onClickStep:y},{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"])}}}),qc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(r,i)=>{const l=e.resolveComponent("el-timeline-item"),s=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(c,y)=>(e.openBlock(),e.createBlock(l,{key:y,timestamp:c.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"content",{content:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Xc=zt._export_sfc(qc,[["__scopeId","data-v-4172a886"]]),Yc={class:"line-content"},Gc={class:"line-time"},Jc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const r=a,i=e.ref({}),l=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,s=>{var c,y;l.value=(c=s==null?void 0:s.find(f=>(f==null?void 0:f.key)==="timeLineList"))==null?void 0:c.contents,i.value=(y=s==null?void 0:s.find(f=>(f==null?void 0:f.key)==="timeLineConfig"))==null?void 0:y.contents},{immediate:!0}),(s,c)=>(e.openBlock(),e.createBlock(Xc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:y,timestamp:f})=>[e.createElementVNode("span",Yc,e.toDisplayString(y),1),e.createElementVNode("span",Gc,e.toDisplayString(f),1)]),_:1},8,["activities","timeLineConfig"]))}}),Zc=zt._export_sfc(Jc,[["__scopeId","data-v-b4d9deed"]]),Qc={class:"tabs-content"},eu={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const r=a,i=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,l=>{const s=l.find(c=>(c==null?void 0:c.key)=="stepList");s?i.value=s.contents.map(c=>({value:c.value||c.title,label:c.label||c.title,children:c.children||[]})):i.value=r==null?void 0:r.tabsData},{immediate:!0,deep:!0}),(l,s)=>(e.openBlock(),e.createElementBlock("div",Qc,[e.createVNode(Nt.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},tu=zt._export_sfc(eu,[["__scopeId","data-v-279085ed"]]),Jn=T.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),au={class:"type-select"},nu=["onClick"],ou={class:"list-icon"},lu={__name:"modelSelect",setup(a){const r=Jn(T.pinia),{itemData:i}=T.storeToRefs(r),l=s=>{const c=T.cloneDeep(i.value);c.push({comp:s.comp,name:s.name,compData:[]}),r.setItemData(c)};return(s,c)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(fr),(f,p)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:p},[e.createElementVNode("div",{class:"list-content",onClick:x=>l(f)},[e.createElementVNode("div",ou,[e.createVNode(y,{name:f.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(f.name),1)],8,nu)]))),128))])}}},ru=zt._export_sfc(lu,[["__scopeId","data-v-91799bf8"]]),iu={class:"fill-content"},su={class:"operate-content"},cu={class:"collapse-title-content"},uu={class:"collapse-title-item"},du={key:1},pu=["onClick"],fu={class:"icon-content"},hu={key:0,class:"edit-content"},vu=["onClick"],mu={class:"comp-child"},gu={__name:"modelFill",setup(a){const r=Jn(T.pinia),{itemData:i,originalData:l}=T.storeToRefs(r),s=e.ref([]);e.ref([]);const c=e.ref([]),y=e.ref([]),f=K=>{var ee;let $=(ee=T.cloneDeep(y.value))==null?void 0:ee.map((F,P)=>(K===P&&(F.content=!0),F));y.value=$},p=K=>{var ee;let $=(ee=T.cloneDeep(y.value))==null?void 0:ee.map((F,P)=>(K===P&&(F.content=!1),F));y.value=$,s.value=T.cloneDeep(i.value)},x=(K,$)=>{var R;let ee=(R=T.cloneDeep(y.value))==null?void 0:R.map((m,v)=>(K===v&&(m.content=!1),m));y.value=ee;const F=T.cloneDeep(i.value),P=F==null?void 0:F.filter((m,v)=>(v===K&&(m.name=$),m));r.setOriginalData(P),r.setItemData(P)};e.watch(()=>i.value,()=>{var K,$,ee;!i.value||((K=i.value)==null?void 0:K.length)===0?s.value=[]:s.value=($=T.cloneDeep(i.value))==null?void 0:$.filter(F=>(F==null?void 0:F.comp)!=="methodButton"),c.value=s.value,y.value=(ee=T.cloneDeep(c.value))==null?void 0:ee.map((F,P)=>({id:P,content:!1}))},{deep:!0,immediate:!0});const _=K=>un(K),E=(K,$,ee)=>{var P,R;if(!K)return;let F=T.cloneDeep(i.value);F=(P=F==null?void 0:F.map((m,v)=>(v===ee&&(m.compData=K),m)))==null?void 0:P.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),y.value=(R=T.cloneDeep(F))==null?void 0:R.map((m,v)=>({id:v,content:!1})),r.setOriginalData(F),r.setItemData(F)},N=K=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const $=T.cloneDeep(i.value),ee=$==null?void 0:$.filter((F,P)=>P!==K);r.setOriginalData(ee),r.setItemData(ee),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(K,$)=>{const ee=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",iu,[$[1]||($[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",su,[e.createVNode(bl.default,{class:"collapse-content",collapseContents:s.value},{title:e.withCtx(({item:F,index:P})=>{var R,m,v,g,S,b,ie,Te,Ze,ke;return[e.createElementVNode("div",cu,[e.createElementVNode("div",uu,[(m=(R=y.value)==null?void 0:R.find(Pe=>Pe.id===P))!=null&&m.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:F.name&&F.name!==""?"8px":"0px"})},e.toDisplayString(F.name),5)),(g=(v=y.value)==null?void 0:v.find(Pe=>Pe.id===P))!=null&&g.content?(e.openBlock(),e.createElementBlock("div",du,[e.createVNode(Nt._sfc_main$2,{modelValue:F.name,"onUpdate:modelValue":Pe=>F.name=Pe,onClick:$[0]||($[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(b=(S=y.value)==null?void 0:S.find(Pe=>Pe.id===P))!=null&&b.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Pe=>f(P),["stop"]),class:"icon-content"},[e.createVNode(ee,{name:"Edit",style:{width:"16px",height:"16px"}})],8,pu))]),e.createElementVNode("div",fu,[(Te=(ie=y.value)==null?void 0:ie.find(Pe=>Pe.id===P))!=null&&Te.content?(e.openBlock(),e.createElementBlock("div",hu,[e.createVNode(ee,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Pe=>p(P),["stop"])},null,8,["onClick"]),e.createVNode(ee,{name:"Save",onClick:e.withModifiers(Pe=>x(P,F.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ke=(Ze=y.value)==null?void 0:Ze.find(Pe=>Pe.id===P))!=null&&ke.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Pe=>N(P),["stop"]),class:"icon-content"},[e.createVNode(ee,{name:"Delete",style:{width:"16px",height:"16px"}})],8,vu))])])]}),content:e.withCtx(({item:F,index:P})=>{var R,m;return[e.createElementVNode("div",mu,[e.createTextVNode(e.toDisplayString(_(F.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(F.comp+"Operate")),{itemContents:F==null?void 0:F.compData,originalItemContents:(m=(R=c.value)==null?void 0:R.find((v,g)=>g===P))==null?void 0:m.compData,onChange:v=>E(v,F,P)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},yu=zt._export_sfc(gu,[["__scopeId","data-v-a46a44b9"]]),bu={key:0,class:"show-content"},ku={style:{display:"flex"}},xu={__name:"modelShow",setup(a){const r=Jn(T.pinia),{itemData:i}=T.storeToRefs(r),l=e.ref([]);e.watch(()=>i.value,()=>{var c;!i.value||((c=i.value)==null?void 0:c.length)===0?l.value=[]:l.value=T.cloneDeep(i.value)},{deep:!0,immediate:!0});const s=c=>un(c);return(c,y)=>{var f;return((f=l.value)==null?void 0:f.length)>0?(e.openBlock(),e.createElementBlock("div",bu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(p,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",ku,e.toDisplayString(p.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(p.comp)),{itemData:p==null?void 0:p.compData,childItemData:p==null?void 0:p.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},wu=zt._export_sfc(xu,[["__scopeId","data-v-3f3e863e"]]),Du={class:"tabs-header"},_u={class:"tabs-list"},Eu={class:"tab-name"},Cu={class:"tab-actions"},Su=["onClick"],Tu=["onClick"],Bu=["onClick"],Iu={class:"model-operate"},Nu={class:"model-select",style:{display:"unset"}},Au={class:"existing-components"},Vu={class:"component-list"},Ou=["onClick"],Mu={class:"component-info"},zu={class:"component-type"},Ru={class:"component-name"},Pu={class:"model-fill"},$u={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=e.ref([]),c=e.ref(!1),y=e.ref(""),f=e.ref({title:""}),p=e.ref(-1),x=e.ref(!1),_=e.ref(-1),E=e.ref(new WeakMap),N=e.ref(null),K=Jn(T.pinia),{itemData:$}=T.storeToRefs(K),ee=()=>{y.value="新增标签页",f.value.title="",p.value=-1,c.value=!0},F=J=>{y.value="修改标签页",f.value.title=s.value[J].title,p.value=J,c.value=!0},P=J=>{const O=v(J);E.value.delete(O),s.value.splice(J,1),Qe()},R=()=>{if(f.value.title.trim()){if(p.value===-1){const J={title:f.value.title,value:f.value.title,label:f.value.title,children:[],id:m()};s.value.push(J)}else s.value[p.value].title=f.value.title,s.value[p.value].value=f.value.title,s.value[p.value].label=f.value.title;c.value=!1,Qe()}},m=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,v=J=>{const O=s.value[J];return O.id||(O.id=m()),O.id},g=J=>{var ce;_.value=J;const O=v(J);N.value=T.cloneDeep($.value);let W=E.value.get(O);!W&&((ce=s.value[J].children)==null?void 0:ce.length)>0&&(W=Te(s.value[J].children)),W?K.setItemData(T.cloneDeep(W)):K.setItemData([]),x.value=!0},S=e.computed(()=>{const J=T.useModelComp(T.pinia),O=T.storeToRefs(J).itemData.value;return console.log("可用组件数据",O),!O||!Array.isArray(O)?[]:O.filter(W=>{var ce;if(W.comp==="Tabs"&&_.value>=0){const xe=v(_.value);if((ce=W.compData)==null?void 0:ce.some(Ke=>{var G;return Ke.key==="stepList"&&((G=Ke.contents)==null?void 0:G.some(Z=>Z.id===xe))}))return!1}return!0})}),b=J=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[J]||J,ie=J=>{var O;try{const W=T.cloneDeep(J);W.id=Date.now()+Math.random(),W.comp==="Tabs"&&((O=W.compData)==null||O.forEach(xe=>{xe.key==="stepList"&&xe.contents&&xe.contents.forEach(be=>{be.id=m()})}));const ce=T.cloneDeep($.value);ce.push(W),K.setItemData(ce)}catch(W){console.error("添加组件失败:",W)}},Te=J=>J.map(O=>{var W;switch(O.type){case"form":return{comp:"Form",name:O.value||"表单",compData:Ze(O.content)};case"table":return{comp:"Table",name:O.value||"表格",compData:ke(O.content)};default:return{comp:"Unknown",name:O.value||"",compData:((W=O.content)==null?void 0:W.originalData)||[]}}}),Ze=J=>{if(!J)return[];const O=[];return J.rowContents&&O.push({key:"formContent",contents:J.rowContents}),J.buttonValue&&O.push({key:"formButton",contents:J.buttonValue}),typeof J.isEnableWrap<"u"&&O.push({key:"enableWrap",contents:J.isEnableWrap}),O},ke=J=>[],Pe=()=>{if(_.value>=0&&_.value<s.value.length){const J=v(_.value);E.value.set(J,T.cloneDeep($.value)),s.value[_.value].children=re($.value),console.log("保存后的数据",re($.value))}x.value=!1,_.value=-1,N.value=null,Qe()},Ne=()=>{N.value&&K.setItemData(T.cloneDeep(N.value)),x.value=!1,_.value=-1,N.value=null},z=()=>{x.value&&Ne()},re=J=>{if(!Array.isArray(J))throw new Error("sourceData must be an array");return J.map((O,W)=>{if(!O||typeof O!="object")return O;const{comp:ce,name:xe,compData:be}=O;switch(ce){case"Form":return{type:"form",content:Q(be||[]),value:"表单"};case"Table":return{type:"table",content:de(be||[]),value:"表格"};default:return{type:"xxx",content:ze(be||[]),value:""}}})},Q=J=>{const O={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},W={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return J.forEach((ce,xe)=>{if(!ce||typeof ce!="object"){console.warn(`Invalid config at index ${xe}:`,ce);return}const{key:be,contents:Ke}=ce,G=W[be];if(!G){console.warn(`Unknown Form config key: ${be}`);return}be==="enableWrap"?O[G]=!!Ke:O[G]=Array.isArray(Ke)?Ke:[]}),O},de=J=>{const O={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},W={header:"columns",tableContents:"tableData"};return J.forEach((ce,xe)=>{if(!ce||typeof ce!="object"){console.warn(`Invalid config at index ${xe}:`,ce);return}const{key:be,contents:Ke}=ce,G=W[be];if(!G){console.warn(`Unknown Table config key: ${be}`);return}O[G]=Array.isArray(Ke)?Ke:[]}),O},ze=J=>(console.log("Default conversion logic - to be implemented"),{originalData:J,processed:!1,componentType:"unknown"}),Qe=()=>{const J=[{key:"stepList",contents:s.value}];l("change",J)};return e.watch(()=>i.itemContents,J=>{if(J&&J.length>0){const O=J.find(W=>W.key==="stepList");O&&O.contents&&(s.value=O.contents.map(W=>({title:W.title||"",value:W.value||W.title||"",label:W.label||W.title||"",children:W.children||[],id:W.id||m()})))}},{immediate:!0,deep:!0}),(J,O)=>{const W=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-input"),xe=e.resolveComponent("el-form-item"),be=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Du,[O[6]||(O[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ee},[e.createVNode(W,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),O[5]||(O[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",_u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(Ke,G)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:G},[e.createElementVNode("span",Eu,e.toDisplayString(Ke.title),1),e.createElementVNode("div",Cu,[e.createElementVNode("button",{onClick:Z=>F(G)},"修改标题",8,Su),e.createElementVNode("button",{onClick:Z=>g(G)},"布局调整",8,Tu),e.createElementVNode("button",{onClick:Z=>P(G)},"删除",8,Bu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:c.value,"onUpdate:modelValue":O[2]||(O[2]=Ke=>c.value=Ke),title:y.value,onBeforeDestroy:O[3]||(O[3]=Ke=>c.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:O[1]||(O[1]=Ke=>c.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:R},"确定")]),default:e.withCtx(()=>[e.createVNode(be,{model:f.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(xe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ce,{modelValue:f.value.title,"onUpdate:modelValue":O[0]||(O[0]=Ke=>f.value.title=Ke),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":O[4]||(O[4]=Ke=>x.value=Ke),title:"布局调整",fullScreen:"",onBeforeDestroy:z},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ne},"取消"),e.createElementVNode("button",{onClick:Pe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Iu,[e.createElementVNode("div",Nu,[e.createVNode(ru),e.createElementVNode("div",Au,[O[8]||(O[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,Ke=>(e.openBlock(),e.createElementBlock("div",{key:Ke.id,class:"component-item",onClick:G=>ie(Ke)},[e.createElementVNode("div",Mu,[e.createElementVNode("span",zu,e.toDisplayString(b(Ke.comp)),1),e.createElementVNode("span",Ru,e.toDisplayString(Ke.name),1)]),O[7]||(O[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Ou))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:J.innerWidth},[e.createVNode(wu)])),e.createElementVNode("div",Pu,[e.createVNode(yu)])])]),_:1},8,["modelValue"])])}}},Lu=zt._export_sfc($u,[["__scopeId","data-v-9096ed0d"]]);function Fu(){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 ju(a){return{type:"line",...a}}function Uu(){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 Ku(a){return{type:"bar",barWidth:"60%",...a}}function Wu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Hu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Ia={line:{initBaseoptions:Fu,initSeries:ju},bar:{initBaseoptions:Uu,initSeries:Ku},pie:{initBaseoptions:Wu,initSeries:Hu}},$o=T.useMenuState(T.pinia),Il=(a,r)=>{var _;const i=[],l=[],{group:s,nameCol:c,valueCol:y}=r||{},f=a==null?void 0:a.find(E=>{const{name:N}=E;return N===s});if(!f)return{names:i,values:l};const p=(_=f==null?void 0:f.compData)==null?void 0:_.find(E=>{const{key:N}=E;return N==="tableContents"});return((p==null?void 0:p.contents)||[]).forEach(E=>{const N=E==null?void 0:E[0];let K=!1;ct.isObject(N)&&(N!=null&&N.id)&&(K=!0);let $=c,ee=y;K&&($=$+1,ee=ee+1);const F=E==null?void 0:E[$],P=E==null?void 0:E[ee];i.push(F),l.push(P)}),{names:i,values:l}},qu=async a=>{const{menu:r,mainKey:i,detailGroup:l,detailNameCol:s,detailValueCol:c,isSelfDetail:y}=a||{};let f=null;const p=sessionStorage.getItem("systemKey");if(y&&$o.activeMenuPath&&(f=await Me.getItemData(`${$o.activeMenuPath}`,p,"")),!y){const x=r==null?void 0:r.join("/");f=await Me.getItemData(`${x}^${i}`,p,"")}return Il(f,{group:l,nameCol:s,valueCol:c})},Xu=async a=>{const{menu:r,group:i,nameCol:l,valueCol:s}=a||{},c=r==null?void 0:r.join("/"),y=sessionStorage.getItem("systemKey"),f=await Me.getItemData(c,y,"");return Il(f,{group:i,nameCol:l,valueCol:s})},ko=async(a,r)=>{const i={names:[],values:[]},{menu:l,group:s,nameCol:c,valueCol:y}=a||{};if(!l.length||!s)return i;const{mainKey:f,group:p,nameCol:x,valueCol:_,isSelfDetail:E}=r||{};return f&&p&&Nt.isNumber(x)&&Nt.isNumber(_)?await qu({menu:l,mainKey:f,detailGroup:p,detailNameCol:x,detailValueCol:_,isSelfDetail:E}):Nt.isNumber(c)&&Nt.isNumber(y)?await Xu({menu:l,group:s,nameCol:c,valueCol:y}):i},Yu=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:s}=a||{},c=Ia==null?void 0:Ia[l];if(!c)return;const{initBaseoptions:y,initSeries:f}=c,p=y();p.title.text=s??"";const{names:x,values:_}=await ko(r,i);if(!x||!_)return p;p.xAxis.data=x;const E=f({data:_});return p.series.push(E),p},Gu=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:s}=a||{},c=Ia==null?void 0:Ia[l];if(!c)return;const{initBaseoptions:y,initSeries:f}=c,p=y();p.title.text=s??"";const{names:x,values:_}=await ko(r,i);if(!x||!_)return p;p.xAxis.data=x;const E=f({data:_});return p.series.push(E),p},Ju=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:s}=a||{},c=Ia==null?void 0:Ia[l];if(!c)return;const{initBaseoptions:y,initSeries:f}=c,p=y();p.title.text=s??"";const{names:x,values:_}=await ko(r,i);if(!x||!_)return p;const E=[];for(let K=0;K<x.length;K++){const $=x[K],ee=_[K];E.push({name:$,value:ee})}const N=f({data:E});return p.series.push(N),p},Zu=async(a=[])=>{var y,f,p;const r=((y=a==null?void 0:a.find(x=>x.key==="chartBaseConfig"))==null?void 0:y.contents)??{},i=((f=a==null?void 0:a.find(x=>x.key==="chartDataConfig"))==null?void 0:f.contents)??{},l=((p=a==null?void 0:a.find(x=>x.key==="chartDetailConfig"))==null?void 0:p.contents)??{},{type:s}=r;let c={};return s==="line"&&(c=await Yu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),s==="bar"&&(c=await Gu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),s==="pie"&&(c=await Ju({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),c},Qu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const r=a,i=e.ref({});e.onMounted(async()=>{const s=r==null?void 0:r.itemData;i.value=await Zu(s)});const l=e.computed(()=>(r==null?void 0:r.height)||"300px");return(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Hr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),ed=zt._export_sfc(Qu,[["__scopeId","data-v-d4c081e8"]]),td={class:"chart-module layout"},ad={class:"chart-module content"},nd={class:"chart-module content"},od={class:"form-content"},ld={class:"dialog-footer"},rd={class:"form-content"},id={class:"dialog-footer"},sd={class:"form-content"},cd={class:"dialog-footer"},ud=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,s=e.reactive({visible:!1,width:"840",title:"基础配置"}),c=e.ref([]),y=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],f=e.ref({}),p=()=>{var se;c.value=y(),(se=c.value)==null||se.forEach(ae=>{var Ce;const fe=ae==null?void 0:ae.prop;ae.value=(Ce=f==null?void 0:f.value)==null?void 0:Ce[fe]}),s.visible=!0},x=se=>{f.value=se},_=()=>{var se;s.visible=!1,l("change",(se=Ie())==null?void 0:se.compData)},E=e.reactive({visible:!1,width:"840",title:"数据配置"}),N=e.ref([]),K=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],$=e.ref({}),ee=()=>{const se=N.value,ae=T.cloneDeep(se);return ae==null||ae.forEach(fe=>{var Ge;const Ce=fe==null?void 0:fe.prop;fe.value=(Ge=$.value)==null?void 0:Ge[Ce]}),ae},F=se=>{var fe;$.value=se;const ae=ee();N.value=ae,l("change",(fe=Ie())==null?void 0:fe.compData)},P=async()=>{const se=await Me.getMenusContent(),ae=ee();ae==null||ae.forEach(fe=>{(fe==null?void 0:fe.prop)==="menu"&&(fe.contents=se)}),N.value=ae,E.visible=!0,await Ke($.value.menu),await k($.value.group)},R=e.reactive({visible:!1,width:"840",title:"详情页配置"}),m=e.ref([]),v=()=>[{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:[]}],g=e.ref({}),S=()=>{const se=m.value,ae=T.cloneDeep(se);return ae==null||ae.forEach(fe=>{var Ge;const Ce=fe==null?void 0:fe.prop;fe.value=(Ge=g.value)==null?void 0:Ge[Ce]}),ae},b=se=>{var fe;g.value=se;const ae=S();m.value=ae,l("change",(fe=Ie())==null?void 0:fe.compData)},ie=async()=>{await z();const se=T.cloneDeep(Te.value),ae=S();ae==null||ae.forEach(fe=>{var Ge;const Ce=fe==null?void 0:fe.prop;fe.value=(Ge=g==null?void 0:g.value)==null?void 0:Ge[Ce],Ce==="mainKey"&&(fe.contents=se)}),m.value=ae,R.visible=!0},Te=e.ref([]),Ze=e.ref([]),ke=e.ref({}),Pe=e.ref({}),Ne=()=>{const{compData:se}=ce.value||{},ae=se==null?void 0:se.find(X=>{const{key:ne}=X;return ne==="header"}),fe=(ae==null?void 0:ae.contents)||[],Ce=fe==null?void 0:fe.filter((X,ne)=>{const{label:B}=X;return B!=="操作"}),Ge=Ce==null?void 0:Ce.findIndex((X,ne)=>{const{isMainKey:B}=X;return B});if(Ge<0)return[];const dt=se==null?void 0:se.find(X=>{const{key:ne}=X;return ne==="tableContents"}),w=(dt==null?void 0:dt.contents)||[];return w==null?void 0:w.map(X=>{const ne=X==null?void 0:X[0];let B=Ge;ct.isObject(ne)&&(ne!=null&&ne.id)&&(B=B+1);const pe=X==null?void 0:X[B];return{label:pe,value:pe}})},z=async()=>{const se=await Ne();Te.value=se},re=async se=>{const ae=sessionStorage.getItem("systemKey");return await Me.getItemData(se,ae,"")},Q=async se=>{const ae=se;Ze.value=ae==null?void 0:ae.map(fe=>{const{name:Ce}=fe;return ke.value[Ce]=fe,{label:Ce,value:Ce}})},de=se=>{const{comp:ae,compData:fe}=Pe.value||{};if(ae==="Table"){let Ce=S();Ce=Ce.filter(Ge=>{const{prop:dt}=Ge;return dt!=="formItems"}),G(Ce,fe),m.value=Ce}},ze=async()=>{var fe,Ce;const se=(fe=g==null?void 0:g.value)==null?void 0:fe.mainKey,ae=(Ce=$==null?void 0:$.value)==null?void 0:Ce.menu;if(se){const dt=`${ae==null?void 0:ae.join("/")}^${se}`,w=await re(dt);await Q(w);const I=S();I==null||I.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=Ze.value)}),m.value=I}};e.watch(()=>{var se;return(se=g==null?void 0:g.value)==null?void 0:se.mainKey},async(se,ae)=>{se!=ae&&se&&await ze()});const Qe=async se=>{const ae=ke.value[se];Pe.value=ae,await de()};e.watch(()=>{var se;return(se=g==null?void 0:g.value)==null?void 0:se.group},async(se,ae)=>{se!=ae&&se&&Qe(se)});const J=async()=>{var ae;await ze();const se=(ae=g.value)==null?void 0:ae.group;await Qe(se)},O=e.ref([]),W=e.ref({}),ce=e.ref({}),xe=async se=>{const ae=se==null?void 0:se.join("/"),fe=sessionStorage.getItem("systemKey");return await Me.getItemData(ae,fe,"")},be=async se=>{const ae=await xe(se);O.value=ae==null?void 0:ae.map(fe=>{const{name:Ce}=fe;return W.value[Ce]=fe,{label:Ce,value:Ce}})},Ke=async(se,ae)=>{await be(se);const fe=ee();fe==null||fe.forEach(Ce=>{(Ce==null?void 0:Ce.prop)==="group"&&(Ce.contents=O.value)}),N.value=fe};e.watch(()=>{var se;return(se=$==null?void 0:$.value)==null?void 0:se.menu},async(se,ae)=>{const fe=se==null?void 0:se.join("/"),Ce=ae==null?void 0:ae.join("/");fe!=Ce&&await Ke(se)});const G=(se,ae)=>{const fe=ae==null?void 0:ae.find(w=>{const{key:I}=w;return I==="header"}),Ce=(fe==null?void 0:fe.contents)||[],Ge=Ce==null?void 0:Ce.filter((w,I)=>{const{label:X}=w;return X!=="操作"}),dt=Ge==null?void 0:Ge.map((w,I)=>{const{label:X}=w;return{label:X,value:I}});se==null||se.forEach(w=>{const I=w==null?void 0:w.prop;(I==="nameCol"||I==="valueCol")&&(w.contents=dt)})},Z=se=>{const{comp:ae,compData:fe}=ce.value||{};if(ae==="Table"){$.value.formItems=[];let Ce=ee();Ce=Ce.filter(Ge=>{const{prop:dt}=Ge;return dt!=="formItems"}),G(Ce,fe),N.value=Ce}},k=async se=>{const ae=W.value[se];ce.value=ae,await Z()};e.watch(()=>{var se;return(se=$==null?void 0:$.value)==null?void 0:se.group},async(se,ae)=>{se!=ae&&k(se)});const we=async()=>{var fe,Ce;const se=(fe=$.value)==null?void 0:fe.menu;await Ke(se);const ae=(Ce=$.value)==null?void 0:Ce.group;await k(ae)},Ie=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:f.value},{key:"chartDataConfig",contents:$.value},{key:"chartDetailConfig",contents:g.value}]}),ue=()=>{s.visible=!1,E.visible=!1,R.visible=!1};return e.onMounted(async()=>{var ae,fe,Ce;N.value=K(),m.value=v();const se=i==null?void 0:i.itemContents;f.value=((ae=se==null?void 0:se.find(Ge=>Ge.key==="chartBaseConfig"))==null?void 0:ae.contents)??{},$.value=((fe=se==null?void 0:se.find(Ge=>Ge.key==="chartDataConfig"))==null?void 0:fe.contents)??{},await we(),g.value=((Ce=se==null?void 0:se.find(Ge=>Ge.key==="chartDetailConfig"))==null?void 0:Ce.contents)??{},await J()}),(se,ae)=>{const fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",td,[ae[4]||(ae[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(fe,{id:"themeButton",onClick:ae[0]||(ae[0]=Ce=>p())},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",ad,[ae[6]||(ae[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(fe,{id:"themeButton",onClick:ae[1]||(ae[1]=Ce=>P())},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",nd,[ae[8]||(ae[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(fe,{id:"themeButton",onClick:ae[2]||(ae[2]=Ce=>ie())},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:ue,width:s.width},{default:e.withCtx(()=>[e.createElementVNode("div",od,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ld,[e.createVNode(fe,{class:"cancel-button button",onClick:ue,id:"themeBorderButton"},{default:e.withCtx(()=>ae[9]||(ae[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(fe,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>ae[10]||(ae[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:ue,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",rd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:F},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",id,[e.createVNode(fe,{class:"cancel-button button",onClick:ue,id:"themeBorderButton"},{default:e.withCtx(()=>ae[11]||(ae[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(fe,{class:"ok-button button",onClick:ue,id:"themeButton"},{default:e.withCtx(()=>ae[12]||(ae[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:R.visible,title:R.title,onBeforeDestroy:ue,width:R.width},{default:e.withCtx(()=>[e.createElementVNode("div",sd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",cd,[e.createVNode(fe,{class:"cancel-button button",onClick:ue,id:"themeBorderButton"},{default:e.withCtx(()=>ae[13]||(ae[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(fe,{class:"ok-button button",onClick:ue,id:"themeButton"},{default:e.withCtx(()=>ae[14]||(ae[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),dd=zt._export_sfc(ud,[["__scopeId","data-v-fe119645"]]),pd=(a,r)=>{let i;a.replaceAll(" ",`\r
2
+ `).replaceAll(`
3
+ `,`\r
4
+ `).includes(`\r
5
+ `)?i=a.replaceAll(`
6
+ `,`\r
7
+ `).replaceAll(" ",`\r
8
+ `).split(`\r
9
+ `).filter(c=>c.trim()!==""):i=a.replaceAll(" ",`\r
10
+ `).split(`
11
+ `).filter(c=>c.trim()!==""),i=i==null?void 0:i.map(c=>(c=c==null?void 0:c.replaceAll("\r",""),c));const l=[];let s="";for(const c of i)c.includes("{")||s.includes("{")||c.includes("[")||s.includes("[")||c.includes("【")||s.includes("【")||c.includes("(")||s.includes("(")||c.includes("(")||s.includes("(")||c.includes("/*")||s.includes("/*")?(s+=c.trim(),s.split("{").length-1===s.split("}").length-1&&s.split("【").length-1===s.split("】").length-1&&s.split("[").length-1===s.split("]").length-1&&s.split("(").length-1===s.split(")").length-1&&s.split("(").length-1===s.split(")").length-1&&s.split("/*").length-1===s.split("*/").length-1&&!(r!=null&&r.find(y=>y===s[s.length-1]))?(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""):s!=null&&s.includes("*/")&&(s=s.replace(/\/\*[\s\S]*?\*\//g,""))):r!=null&&r.find(y=>y===c[c.length-1])?s+=c.trim():l.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return l},Ut=(a,r)=>{let i=a;const l=[];let s="",c=0;for(const y of i)c++,y.includes("{")||s.includes("{")||y.includes("[")||s.includes("[")||y.includes("【")||s.includes("【")||y.includes("(")||s.includes("(")||y.includes("(")||s.includes("(")||y.includes("/*")||s.includes("/*")?(s+=y.trim(),s.split("{").length-1===s.split("}").length-1&&s.split("【").length-1===s.split("】").length-1&&s.split("[").length-1===s.split("]").length-1&&s.split("(").length-1===s.split(")").length-1&&s.split("(").length-1===s.split(")").length-1&&s.split("/*").length-1===s.split("*/").length-1&&s[s.length-1]===r?(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""):c===(a==null?void 0:a.length)&&(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s="")):(s+=y.trim(),(s==null?void 0:s[(s==null?void 0:s.length)-1])===r&&(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""));return(s==null?void 0:s.length)!==0&&l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),l},fd=(a,r)=>a===r||a.length===r.length&&a.every((i,l)=>i===r[l]),hd=a=>a.reduce((r,i)=>{var s;const l=(((s=r.at(-1))==null?void 0:s.total)??0)+i;return r.push({key:i,total:l}),r},[]),vd=a=>{for(let r=a.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a},md=a=>{let r=a;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1))};let gt="$R",gd="[Any]";const yd=a=>{var y,f;let r={},i=a==null?void 0:a[0],l=(f=(y=i==null?void 0:i.replace("{",gt))==null?void 0:y.split(gt))==null?void 0:f[0];(l==null?void 0:l[0])==="*"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length)),l=l==null?void 0:l.split(":"),r.group=l;let s=a==null?void 0:a[1],c=s==null?void 0:s.replaceAll(gd,"");return(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),r.filter=c,r},bd=a=>{var x,_,E,N,K,$,ee,F,P;let r=[],i=[],l=a==null?void 0:a.map(R=>{var v;let m=(v=Ut(R,"@"))==null?void 0:v[0];return(m==null?void 0:m[(m==null?void 0:m.length)-1])==="@"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m}),s=Ut(l==null?void 0:l[0],":");i=(x=s==null?void 0:s.filter(R=>!(R!=null&&R.includes("{"))&&!(R!=null&&R.includes("["))))==null?void 0:x.join(""),(i==null?void 0:i[(i==null?void 0:i.length)-1])===":"&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),i=i==null?void 0:i.split(":");let c=s==null?void 0:s.filter(R=>(R==null?void 0:R.includes("{"))||(R==null?void 0:R.includes("["))),y=(E=c==null?void 0:c[0])==null?void 0:E.slice(1,((_=c==null?void 0:c[0])==null?void 0:_.length)-1);y=(N=Ut(y,","))==null?void 0:N.map(R=>((R==null?void 0:R[(R==null?void 0:R.length)-1])===","&&(R=R==null?void 0:R.slice(0,(R==null?void 0:R.length)-1)),R));let f="@"+((ee=($=(K=a==null?void 0:a[0])==null?void 0:K.replace("@",gt))==null?void 0:$.split(gt))==null?void 0:ee[1]);((F=Ut(f,":"))==null?void 0:F.length)>1&&(r=Zn((P=Ut(f,":"))==null?void 0:P[1]),r=[r]);let p=y==null?void 0:y.map((R,m)=>{var Te,Ze,ke,Pe,Ne,z,re,Q,de,ze,Qe,J;let v=(Te=R==null?void 0:R.split("=="))==null?void 0:Te[0],g=(Ze=R==null?void 0:R.split("=="))==null?void 0:Ze[1],S=[],b=[],ie=[];return(g==null?void 0:g[0])==="$"&&(g=g==null?void 0:g.slice(1,g==null?void 0:g.length),S=(Pe=(ke=g==null?void 0:g.split("*"))==null?void 0:ke[0])==null?void 0:Pe.split(":"),b=(ze=(de=(Q=(re=(z=(Ne=g==null?void 0:g.split("*"))==null?void 0:Ne[1])==null?void 0:z.replace("{",gt))==null?void 0:re.split(gt))==null?void 0:Q[0])==null?void 0:de.split(":"))==null?void 0:ze.filter(O=>O!==""),ie=(J=(Qe=g==null?void 0:g.replace("{",gt))==null?void 0:Qe.split(gt))==null?void 0:J[1],ie=ie==null?void 0:ie.replaceAll("}",""),ie=ie==null?void 0:ie.split(":")),{prop:v,label:v,value:"",menuPath:S,groups:b,columns:ie,width:y==null?void 0:y.length}});return{groupName:i,formContents:p,contents:r}},Zn=a=>{var l,s;let r=[],i=a.slice(1,(a==null?void 0:a.length)-1);if((i==null?void 0:i[0])!=="[")(l=Ut(i,","))==null||l.forEach(c=>{(c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c.slice(0,(c==null?void 0:c.length)-1)),r.push(c??"")});else{let c=[];(s=Ut(i,","))==null||s.forEach(y=>{(y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),c.push(Zn(y))}),r=c}return r},ho=(a,r)=>{var E,N,K,$,ee,F,P,R,m,v,g,S,b,ie,Te,Ze,ke,Pe,Ne,z,re,Q,de,ze,Qe,J,O,W,ce,xe,be,Ke,G;let i,l=[],s=[],c=[],y=[],f=[],p=[],x="Input",_;if(a!=null&&a.includes("@Pam")||a!=null&&a.includes("==")||a!=null&&a.includes("="))if(a!=null&&a.includes("@Pam")){i=(N=(E=a==null?void 0:a.replace("@Pam",gt))==null?void 0:E.split(gt))==null?void 0:N[0];let Z=($=(K=a==null?void 0:a.replace("@Pam",gt))==null?void 0:K.split(gt))==null?void 0:$[1];Z=Z==null?void 0:Z.slice(1,(Z==null?void 0:Z.length)-1),Z=(ee=Ut(Z,","))==null?void 0:ee.map(k=>(k="@"+k,k)),_=Z==null?void 0:Z.find(k=>k==null?void 0:k.includes("@IdentName")),_=_?(P=(F=_==null?void 0:_.replace("=",gt))==null?void 0:F.split(gt))==null?void 0:P[1]:i}else{if(i=(R=a==null?void 0:a.split("=="))==null?void 0:R[0],_=(m=a==null?void 0:a.split("=="))==null?void 0:m[0],a!=null&&a.includes("=")&&!(a!=null&&a.includes("==")))i=(v=a==null?void 0:a.split("="))==null?void 0:v[0],_=i,l=(b=(S=(g=a==null?void 0:a.split("="))==null?void 0:g[1])==null?void 0:S.split("/"))==null?void 0:b.map(Z=>({label:Z,value:Z}));else if((Te=(ie=a==null?void 0:a.split("=="))==null?void 0:ie[1])!=null&&Te.includes("||")){let Z=[];(Pe=(ke=(Ze=a==null?void 0:a.split("=="))==null?void 0:Ze[1])==null?void 0:ke.split("||"))==null||Pe.forEach(k=>{var we,Ie,ue;s.push((Ie=(we=k==null?void 0:k.split("@Filter"))==null?void 0:we[0])==null?void 0:Ie.split("/")),Z.push((ue=k==null?void 0:k.split("@Filter"))==null?void 0:ue[1])}),c=Z==null?void 0:Z.map(k=>(k=k==null?void 0:k.slice(1,(k==null?void 0:k.length)-1),k))}else{let Z=(z=a==null?void 0:a.split("=="))==null?void 0:z[((Ne=a==null?void 0:a.split("=="))==null?void 0:Ne.length)-1];if(!(Z!=null&&Z.includes("&"))){let k=(re=Z==null?void 0:Z.replace("*",gt))==null?void 0:re.split(gt),we=(k==null?void 0:k[0])===""?r==null?void 0:r.value:k==null?void 0:k[0];we=we==null?void 0:we.replaceAll("[Any]",""),(we==null?void 0:we[0])==="$"&&(we=(Q=we==null?void 0:we.slice(1,we==null?void 0:we.length))==null?void 0:Q.replaceAll(":","/")),y=we==null?void 0:we.split("/");let Ie=(ze=(de=k==null?void 0:k[1])==null?void 0:de.replace("{",gt))==null?void 0:ze.split(gt),ue=Ie==null?void 0:Ie[0];(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])===":"&&(ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1)),f=ue==null?void 0:ue.split(":"),p=(W=(O=(J=(Qe=Ie==null?void 0:Ie[1])==null?void 0:Qe.replace("}",gt))==null?void 0:J.split(gt))==null?void 0:O[0])==null?void 0:W.split(":");let se=(be=(xe=(ce=Ie==null?void 0:Ie[1])==null?void 0:ce.replace("}",gt))==null?void 0:xe.split(gt))==null?void 0:be[1];se!==""&&md(se)}}x="Select"}else i=a,_=a;return i!=null&&i.includes("@Pam")&&(i=(G=(Ke=a==null?void 0:a.replace("@Pam",gt))==null?void 0:Ke.split(gt))==null?void 0:G[0],_=i),{label:i,prop:_,options:l,allContents:s,filterContents:c,menus:y,groups:f,words:p,align:"center",formType:x}},vo=(a,r)=>{var l,s,c,y,f,p,x,_,E,N,K,$,ee,F,P,R,m;let i=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((y=(c=(s=(l=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:l.replace(":",gt))==null?void 0:s.split(gt))==null?void 0:c[0])!=null&&y.includes(","))){let v=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),g=(f=v==null?void 0:v.replace(":",gt))==null?void 0:f.split(gt);if(((p=Ut(g==null?void 0:g[1],"="))==null?void 0:p.length)===1){let S=g==null?void 0:g[0];i==null||i.push({label:S,prop:S,children:vo((_=g==null?void 0:g[1])==null?void 0:_.slice(1,((x=g==null?void 0:g[1])==null?void 0:x.length)-1),r),align:"center"})}else(P=(F=(ee=($=(K=(N=(E=v==null?void 0:v.replace("{",gt))==null?void 0:E.split(gt))==null?void 0:N[1])==null?void 0:K.replace("}",gt))==null?void 0:$.split(gt))==null?void 0:ee[0])==null?void 0:F.split(","))==null||P.forEach(S=>{i==null||i.push({label:S,prop:S,align:"center"})})}else if((a==null?void 0:a[0])==="{")(R=Ut(a,","))==null||R.forEach(v=>{var g,S,b,ie,Te,Ze,ke,Pe,Ne,z,re;if((v==null?void 0:v[(v==null?void 0:v.length)-1])===","&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),(v==null?void 0:v[0])==="{"){let Q=Ut(v,"="),de=Q==null?void 0:Q[(Q==null?void 0:Q.length)-1],ze=[],Qe=[],J=[],O=(g=de==null?void 0:de.replace("*",gt))==null?void 0:g.split(gt),W=(O==null?void 0:O[0])===""?r==null?void 0:r.value:O==null?void 0:O[0];W=W==null?void 0:W.replaceAll("[Any]",""),(W==null?void 0:W[0])==="$"&&(W=(S=W==null?void 0:W.slice(1,W==null?void 0:W.length))==null?void 0:S.replaceAll(":","/")),ze=W==null?void 0:W.split("/");let ce=(ie=(b=O==null?void 0:O[1])==null?void 0:b.replace("{",gt))==null?void 0:ie.split(gt),xe=ce==null?void 0:ce[0];(xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===":"&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),Qe=xe==null?void 0:xe.split(":"),J=(Pe=(ke=(Ze=(Te=ce==null?void 0:ce[1])==null?void 0:Te.replace("}",gt))==null?void 0:Ze.split(gt))==null?void 0:ke[0])==null?void 0:Pe.split(",");let be=(z=Q==null?void 0:Q[0])==null?void 0:z.slice(1,((Ne=Q==null?void 0:Q[0])==null?void 0:Ne.length)-2);(re=be==null?void 0:be.split(","))==null||re.forEach((Ke,G)=>{var Z;i.push({label:Ke,prop:Ke,align:"center",menus:ze,groups:Qe,words:(Z=J==null?void 0:J[G])==null?void 0:Z.split(":"),formType:(ze==null?void 0:ze.length)>0?"Select":"Input"})})}else i.push({label:v,prop:v,align:"center"})});else{let v=(m=Ut(a,","))==null?void 0:m.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g));v==null||v.forEach(g=>{i.push(ho(g,r))})}return i},kd=(a,r)=>{var y,f,p,x,_;let i=a;if(!a)return;let l="";((y=Ut(a,"}"))==null?void 0:y.length)>1&&(i=(f=Ut(a,"}"))==null?void 0:f[0],l=(p=Ut(a,"}"))==null?void 0:p[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1));let s=[],c=[];return s.push({label:"排序",prop:"sort"}),(x=Ut(i,","))==null||x.forEach(E=>{var N;(E==null?void 0:E[(E==null?void 0:E.length)-1])===","&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1)),(E==null?void 0:E[0])==="{"?(N=vo(E,r))==null||N.forEach(K=>{s.push(K)}):s.push(ho(E,r))}),l!==""&&((l==null?void 0:l[0])=="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),(_=Ut(l,","))==null||_.forEach(E=>{var N;(E==null?void 0:E[(E==null?void 0:E.length)-1])===","&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1)),(E==null?void 0:E[0])==="{"?(N=vo(E,r))==null||N.forEach(K=>{c.push(K)}):c.push(ho(E,r))})),{columns:s,secondColumns:c}},Lo=a=>{var r,i,l;if(a!=null&&a.includes("@Filter"))return a;{let s=(i=(r=a==null?void 0:a.replace("(",gt))==null?void 0:r.split(gt))==null?void 0:i[1];return s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1),s=(l=Ut(s,","))==null?void 0:l.map(c=>((c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),"@"+c)),s=s==null?void 0:s.join(","),a!=null&&a.includes("@Quote")&&(s!=null&&s.includes("@Type")||(s=s===""?s+"@Type:Manual":s+",@Type:Manual"),s!=null&&s.includes("@SonSync")||(s=s===""?s+"@SonSync:No":s+",@SonSync:No"),s!=null&&s.includes("@FatherSync")||(s=s===""?s+"@FatherSync:Yes":s+",@FatherSync:Yes")),s}},xd=(a,r,i="")=>{var K,$,ee,F,P,R,m,v,g,S,b,ie,Te,Ze,ke,Pe,Ne,z,re,Q,de,ze,Qe,J,O;let l=[];if(((K=a==null?void 0:a[0])==null?void 0:K[0])!=="*"&&(($=a==null?void 0:a[0])==null?void 0:$[0])!=="$")return;let s=Ut(a==null?void 0:a[0],":"),c=s==null?void 0:s.filter(W=>!((W==null?void 0:W[0])!=="{"&&(W==null?void 0:W[0])!=="["));l=(ee=s==null?void 0:s.filter(W=>(W==null?void 0:W[0])!=="{"&&(W==null?void 0:W[0])!=="["))==null?void 0:ee.join("");let y="",f="";(l==null?void 0:l[(l==null?void 0:l.length)-1])===":"&&(l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1)),l!=null&&l.includes("(@")&&(l==null?void 0:l[0])==="*"&&(y="(@"+((F=l==null?void 0:l.split("(@"))==null?void 0:F[1]),l=(P=l==null?void 0:l.split("(@"))==null?void 0:P[0]),l!=null&&l.includes("@")&&(l==null?void 0:l[0])==="*"&&(y="@"+((m=(R=l==null?void 0:l.replace("@",gt))==null?void 0:R.split(gt))==null?void 0:m[1]),l=(g=(v=l==null?void 0:l.replace("@",gt))==null?void 0:v.split(gt))==null?void 0:g[0]),(l==null?void 0:l[0])==="*"?(l=l==null?void 0:l.slice(1,l==null?void 0:l.length),l=l==null?void 0:l.split(":")):(f=T.cloneDeep(l)+":",l=[]),f=f+((c==null?void 0:c[0])??""),(f==null?void 0:f[(f==null?void 0:f.length)-1])===":"&&(f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1)),y!==""&&f!==""&&(f=f+y);let p=c==null?void 0:c[1];(f==null?void 0:f[0])==="["&&(p=T.cloneDeep(f)+(p??""),f="");let x=p?Zn(p):[];!(x!=null&&x.every(W=>Array.isArray(W)))&&(x==null?void 0:x.length)>0&&(x=[x]);let _=(S=Ut(f,"@"))!=null&&S[1]?"@"+((b=Ut(f,"@"))==null?void 0:b[1]):"";if(f=(ie=Ut(f,"@"))==null?void 0:ie[0],(f==null?void 0:f[0])==="$"&&(_=T.cloneDeep(f)+(_??""),f=""),i!==""&&(y!==""?_=(i==null?void 0:i[(i==null?void 0:i.length)-1])!==")"?i+y:(i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1))+","+y:_=i),_!==""){(_==null?void 0:_[0])==="$"&&(_=_==null?void 0:_.slice(1,_==null?void 0:_.length)),(_==null?void 0:_[(_==null?void 0:_.length)-1])===":"&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1));let W="";if(_!=null&&_.includes("(@")){W=(Ze=(Te=_==null?void 0:_.replace("(@",gt))==null?void 0:Te.split(gt))==null?void 0:Ze[0];let ce=(Pe=(ke=_==null?void 0:_.replace("(@",gt))==null?void 0:ke.split(gt))==null?void 0:Pe[1];ce="@"+(ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1));let xe=(Ne=Ut(ce,","))==null?void 0:Ne.map(be=>((be==null?void 0:be[(be==null?void 0:be.length)-1])===","&&(be=be==null?void 0:be.slice(0,(be==null?void 0:be.length)-1)),Lo(be)));_=W+"("+(xe==null?void 0:xe.join(","))+")"}else{W=(re=(z=_==null?void 0:_.replace("@",gt))==null?void 0:z.split(gt))==null?void 0:re[0];let ce=(de=(Q=_==null?void 0:_.replace("@",gt))==null?void 0:Q.split(gt))==null?void 0:de[1];if(ce){ce="@"+ce;let xe=(ze=Ut(ce,","))==null?void 0:ze.map(be=>Lo(be));_=W+"("+(xe==null?void 0:xe.join(","))+")"}else _=W}}(f==null?void 0:f[(f==null?void 0:f.length)-1])==="@"&&(f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1));let E=kd(f,r),N=f===""?[]:(E==null?void 0:E.columns)??[];return N!=null&&N.some(W=>{var ce;return Array.isArray(W==null?void 0:W.children)&&((ce=W==null?void 0:W.children)==null?void 0:ce.length)>0})&&(N=[N]),(x==null?void 0:x.length)>0&&(Array.isArray(x==null?void 0:x[0])&&((Qe=x==null?void 0:x[0])!=null&&Qe.every(W=>Array.isArray(W)))?x=x==null?void 0:x.map((W,ce)=>(W=W.map((xe,be)=>(xe.unshift((be+1).toString()),xe)),W)):x=x==null?void 0:x.map((W,ce)=>(W.unshift((ce+1).toString()),W))),E!=null&&E.secondColumns&&((J=E==null?void 0:E.secondColumns)==null?void 0:J.length)>0&&((x==null?void 0:x.length)>0?x=x==null?void 0:x.map((W,ce)=>{var xe,be;return Array.isArray(W==null?void 0:W[0])?W=W==null?void 0:W.map((Ke,G)=>{var Z,k;return Ke.unshift((k=(Z=E==null?void 0:E.secondColumns)==null?void 0:Z[G])==null?void 0:k.prop),Ke}):W.unshift((be=(xe=E==null?void 0:E.secondColumns)==null?void 0:xe[ce])==null?void 0:be.prop),W}):x=(O=E==null?void 0:E.secondColumns)==null?void 0:O.map((W,ce)=>(W=[W==null?void 0:W.label],W.push(ce),W)),N.unshift({label:"",prop:"disabled",sortable:!1})),{groupName:l,tableColumns:N,tableFilter:_,tableContents:x,columns:(E==null?void 0:E.secondColumns)??[]}};let Xt="$R";const mn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1}],wd=a=>{var i;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(i=a==null?void 0:a.contents)==null?void 0:i.map(l=>{var s;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(s=l.contents)==null?void 0:s.slice(0,parseInt(a==null?void 0:a.filter))),l})},Dd=a=>{var r;return(a==null?void 0:a.filter)==="Random"?(r=a==null?void 0:a.contents)==null?void 0:r.map(l=>((l==null?void 0:l.key)==="tableContents"&&(l.contents=vd(l.contents)),l)):((a==null?void 0:a.filter)==="Ordin"&&(a==null?void 0:a.contents).push({key:"enableWrap",contents:!0}),a==null?void 0:a.contents)},_d=a=>{var l,s,c,y;let r=a==null?void 0:a.filter;if(r!=null&&r.includes("*")&&(r="({"+((s=(l=r==null?void 0:r.replace("{",Xt))==null?void 0:l.split(Xt))==null?void 0:s[1])),r=(c=r==null?void 0:r.replaceAll("{",""))==null?void 0:c.replaceAll("}",""),(r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return a==null?void 0:a.contents;let i=Me.calculatorAndToOr(r);if((i==null?void 0:i.length)>0){let f=[];return i==null||i.forEach(x=>{let _={};for(let E in x){let N=E;N!=null&&N.includes("[")||(_[N]=x[E])}f.push(_)}),(y=a==null?void 0:a.contents)==null?void 0:y.map(x=>{var E,N,K;let _=(N=(E=a==null?void 0:a.contents)==null?void 0:E.find($=>($==null?void 0:$.key)==="header"))==null?void 0:N.contents;if(_=(K=Me.getEqualChild(_))==null?void 0:K.filter($=>($==null?void 0:$.label)!=="操作"),(x==null?void 0:x.key)==="tableContents"){let ee=Me.tableToForm(x==null?void 0:x.contents,_);f==null||f.forEach(F=>{var P,R;for(let m in F)!((P=ee==null?void 0:ee[0])!=null&&P.find(v=>{var g;return(v==null?void 0:v.key)===m||((g=v==null?void 0:v.key)==null?void 0:g.includes(m))}))&&!(ee!=null&&ee.find(v=>{var g;return(v==null?void 0:v.key)===m||((g=v==null?void 0:v.key)==null?void 0:g.includes(m))}))||(((R=F[m])==null?void 0:R[0])!=="!"?ee=ee==null?void 0:ee.filter(v=>{var g,S;return((g=v==null?void 0:v.find(b=>{var ie;return(b==null?void 0:b.key)===m||((ie=b==null?void 0:b.key)==null?void 0:ie.includes(m))}))==null?void 0:g.value)===F[m]&&!Array.isArray(F==null?void 0:F[m])||Array.isArray(F==null?void 0:F[m])&&((S=F==null?void 0:F[m])==null?void 0:S.find(b=>{var ie;return((ie=v==null?void 0:v.find(Te=>{var Ze;return(Te==null?void 0:Te.key)===m||((Ze=Te==null?void 0:Te.key)==null?void 0:Ze.includes(m))}))==null?void 0:ie.value)===b}))}):ee=ee==null?void 0:ee.filter(v=>{var g;return((g=v==null?void 0:v.find(S=>{var b;return(S==null?void 0:S.key)===m||((b=S==null?void 0:S.key)==null?void 0:b.includes(m))}))==null?void 0:g.value)!==F[m]}))}),(ee==null?void 0:ee.length)===0?x.contents=[]:x.contents=ee==null?void 0:ee.map(F=>{let P={};return F==null||F.forEach(R=>{P[R==null?void 0:R.key]=R==null?void 0:R.value}),P})}return x})}return a==null?void 0:a.contents},Ed=a=>a==null?void 0:a.contents,Cd=a=>a==null?void 0:a.contents,Sd=a=>a==null?void 0:a.contents,Td=a=>{var i;let r=(a==null?void 0:a.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(i=a==null?void 0:a.contents)==null?void 0:i.map(s=>{var c;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(y=>({label:y,prop:y}))),s}):a==null?void 0:a.contents},Bd=a=>a==null?void 0:a.contents,Id=a=>{var i;let r=(a==null?void 0:a.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(i=a==null?void 0:a.contents)==null?void 0:i.map(s=>{var c;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(y=>({label:y,prop:y}))),s}):a==null?void 0:a.contents},Nd=a=>{var i;let r=(a==null?void 0:a.filter)??"";if((r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""){let l=a==null?void 0:a.contents,s=(i=r==null?void 0:r.split(","))==null?void 0:i.map(c=>({label:c,prop:c}));return l.push({key:"bottomButton",contents:s}),l}return a==null?void 0:a.contents},Ad=a=>{var r,i,l,s;if(((r=a==null?void 0:a.filter)==null?void 0:r[0])!=="[")return(i=a==null?void 0:a.contents)==null?void 0:i.map(y=>{var f;return(y==null?void 0:y.key)==="formContent"&&(y.contents=(f=y.contents)==null?void 0:f.map(p=>(p.width=parseInt(a==null?void 0:a.filter),p))),y});if(((l=a==null?void 0:a.filter)==null?void 0:l[0])==="["){let c=Zn(a==null?void 0:a.filter),y=c==null?void 0:c.map(p=>parseInt(p));return y=hd(y),(s=a==null?void 0:a.contents)==null?void 0:s.map((p,x)=>{var _;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(_=p.contents)==null?void 0:_.map(E=>{var N;return E.width=(N=y==null?void 0:y.find(K=>(K==null?void 0:K.total)>x+1))==null?void 0:N.key,E})),p})}return a==null?void 0:a.contents},Vd=a=>{var r;if((a==null?void 0:a.filter)!==""){let i=a==null?void 0:a.filter;return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split(","),(r=a==null?void 0:a.contents)==null?void 0:r.map(s=>{var c,y,f;return(s==null?void 0:s.key)==="header"&&(Array.isArray((c=s==null?void 0:s.contents)==null?void 0:c[0])?s.contents[0]=(f=s.contents[0])==null?void 0:f.map(p=>(i!=null&&i.find(x=>x===(p==null?void 0:p.prop))&&(p.fixed="left"),p)):s.contents=(y=s.contents)==null?void 0:y.map(p=>(i!=null&&i.find(x=>x===(p==null?void 0:p.prop))&&(p.fixed="left"),p))),s})}return a==null?void 0:a.contents},Od=async a=>{var l,s,c,y,f,p,x,_,E,N,K;const r=Me.useUnit(T.pinia),{chooseTitle:i}=T.storeToRefs(r);if((a==null?void 0:a.filter)==="true"){let $=await sn((s=(l=i==null?void 0:i.value)==null?void 0:l[0])==null?void 0:s.parentContent,!1),ee=(y=(c=i==null?void 0:i.value)==null?void 0:c[0])==null?void 0:y.value;$=(f=$==null?void 0:$[0])==null?void 0:f.compData;let F=(p=$==null?void 0:$.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:p.contents;F=((x=F==null?void 0:F.find(m=>m==null?void 0:m.isMainKey))==null?void 0:x.prop)??((_=F==null?void 0:F[0])==null?void 0:_.prop);let P=(N=(E=$==null?void 0:$.find(m=>(m==null?void 0:m.key)==="tableContents"))==null?void 0:E.contents)==null?void 0:N.find(m=>(m==null?void 0:m[F])===ee);return(K=a==null?void 0:a.contents)==null?void 0:K.map(m=>{var v;return(m==null?void 0:m.key)==="formContent"&&(m.contents=(v=m.contents)==null?void 0:v.map(g=>(g.value=P==null?void 0:P[g==null?void 0:g.prop],g))),m})}return a==null?void 0:a.contents},Nl={onNumSlice:wd,onRandomContents:Dd,onConditionContents:_d,onFatherPaceContents:Ed,onPaceContents:Cd,onMainTagContents:Sd,onButtonContents:Td,onPamButtonContents:Bd,onRowButtonContents:Id,onRelated:Od,onRowNum:Ad,onFixRow:Vd,onBottomButtonContents:Nd},Md=async a=>{var s,c,y,f,p,x,_,E,N,K,$,ee,F,P,R,m,v,g,S;let r="";if(((s=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:s.contents)!==""&&(r=(c=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:c.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(f=(y=r==null?void 0:r.replace("(",Xt))==null?void 0:y.split(Xt))==null?void 0:f[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ut(r,","))==null?void 0:p.map(b=>((b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),b!=null&&b.includes("(")||(b=b==null?void 0:b.replaceAll(":","=")),b)),l=a;for(let b in i){let ie,Te="";(x=i==null?void 0:i[b])!=null&&x.includes("(")?(ie=(N=(E=(_=i==null?void 0:i[b])==null?void 0:_.replace("(",Xt))==null?void 0:E.split(Xt))==null?void 0:N[0],Te="("+((ee=($=(K=i==null?void 0:i[b])==null?void 0:K.replace("(",Xt))==null?void 0:$.split(Xt))==null?void 0:ee[1])):(ie=(R=(P=(F=i==null?void 0:i[b])==null?void 0:F.replace("=",Xt))==null?void 0:P.split(Xt))==null?void 0:R[0],Te=(g=(v=(m=i==null?void 0:i[b])==null?void 0:m.replace("=",Xt))==null?void 0:v.split(Xt))==null?void 0:g[1]);let Ze=(S=mn==null?void 0:mn.find(ke=>(ke==null?void 0:ke.key)===ie))==null?void 0:S.value;if(Ze){const ke=Nl[Ze];l=await ke({contents:l,filter:Te})}}return l},zd=async a=>{var s,c,y,f,p,x,_,E,N,K,$,ee,F,P,R,m,v,g,S;let r="";if(((s=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:s.contents)!==""&&(r=(c=a==null?void 0:a.find(b=>(b==null?void 0:b.key)==="filter"))==null?void 0:c.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(f=(y=r==null?void 0:r.replace("(",Xt))==null?void 0:y.split(Xt))==null?void 0:f[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ut(r,","))==null?void 0:p.map(b=>((b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),b!=null&&b.includes("(")||(b=b==null?void 0:b.replaceAll(":","=")),b)),l=a;for(let b in i){let ie,Te="";(x=i==null?void 0:i[b])!=null&&x.includes("(")?(ie=(N=(E=(_=i==null?void 0:i[b])==null?void 0:_.replace("(",Xt))==null?void 0:E.split(Xt))==null?void 0:N[0],Te="("+((ee=($=(K=i==null?void 0:i[b])==null?void 0:K.replace("(",Xt))==null?void 0:$.split(Xt))==null?void 0:ee[1])):(ie=(R=(P=(F=i==null?void 0:i[b])==null?void 0:F.replace("=",Xt))==null?void 0:P.split(Xt))==null?void 0:R[0],Te=(g=(v=(m=i==null?void 0:i[b])==null?void 0:m.replace("=",Xt))==null?void 0:v.split(Xt))==null?void 0:g[1]);let Ze=(S=mn==null?void 0:mn.find(ke=>(ke==null?void 0:ke.key)===ie))==null?void 0:S.value;if(Ze){const ke=Nl[Ze];l=await ke({contents:l,filter:Te})}}return l};let oo=["新增","导入","导出"],lo=["查看","编辑","复制新增","删除"],ro=["导入","导出"],io=["查看","编辑"];const Fo=async a=>{const r=T.useMenuState(T.pinia);T.storeToRefs(r);let i=[],l=a==null?void 0:a.map(async s=>{var x,_,E,N,K,$,ee,F,P,R,m,v,g,S,b,ie,Te,Ze,ke,Pe,Ne,z,re,Q,de,ze,Qe,J,O,W,ce,xe,be,Ke;let c=(N=(E=(_=(x=s==null?void 0:s.contents)==null?void 0:x.find(G=>{var Z;return(Z=G==null?void 0:G.key)==null?void 0:Z.includes("struct")}))==null?void 0:_.value)==null?void 0:E[0])==null?void 0:N.类型,y=Object.values(s==null?void 0:s.name);y=y==null?void 0:y.reverse();let f=(K=s==null?void 0:s.contents)==null?void 0:K.map(G=>G==null?void 0:G.key),p={comp:c,isShow:s==null?void 0:s.is_show,name:y==null?void 0:y[0],id:s==null?void 0:s.object_id,relatedTables:f};for(let G in y)parseInt(G)>=1&&(p[`name${parseInt(G)-1}`]=y[G]);if(c==="Table"){let G=($=s==null?void 0:s.contents)==null?void 0:$.find(ue=>{var se;return(se=ue==null?void 0:ue.key)==null?void 0:se.includes("content")}),Z=[];G.value=(ee=G==null?void 0:G.value)==null?void 0:ee.sort((ue,se)=>parseInt(ue==null?void 0:ue.id)-parseInt(se==null?void 0:se.id)),Z.push({key:"tableContents",contents:G==null?void 0:G.value});let k=(v=(m=(R=(P=(F=s==null?void 0:s.contents)==null?void 0:F.find(ue=>{var se;return(se=ue==null?void 0:ue.key)==null?void 0:se.includes("struct")}))==null?void 0:P.value)==null?void 0:R[0])==null?void 0:m.结构)==null?void 0:v.contents;Array.isArray(k==null?void 0:k[0])?k[0]=(g=k==null?void 0:k[0])==null?void 0:g.filter(ue=>(ue==null?void 0:ue.prop)!=="sort"):k=k==null?void 0:k.filter(ue=>(ue==null?void 0:ue.prop)!=="sort"),Z.push({key:"header",contents:k}),Z.push({key:"filter",contents:(Ze=(Te=(ie=(b=(S=s==null?void 0:s.contents)==null?void 0:S.find(ue=>{var se;return(se=ue==null?void 0:ue.key)==null?void 0:se.includes("struct")}))==null?void 0:b.value)==null?void 0:ie[0])==null?void 0:Te.引用)==null?void 0:Ze.contents});let we=oo==null?void 0:oo.map(ue=>({label:ue})),Ie=lo==null?void 0:lo.map(ue=>({label:ue}));!Array.isArray(k==null?void 0:k[0])&&((ke=k==null?void 0:k[0])==null?void 0:ke.prop)==="disabled"&&(we=ro==null?void 0:ro.map(ue=>({label:ue})),Ie=io==null?void 0:io.map(ue=>({label:ue}))),Z.push({key:"extraButton",contents:we}),Z.push({key:"rowButton",contents:Ie}),p.compData=await zd(Z)}else if(c==="Form"){let G=[],Z=(z=(Ne=(Pe=s==null?void 0:s.contents)==null?void 0:Pe.find(we=>{var Ie;return(Ie=we==null?void 0:we.key)==null?void 0:Ie.includes("content")}))==null?void 0:Ne.value)==null?void 0:z[0],k=(O=(J=(Qe=(ze=(de=(Q=(re=s==null?void 0:s.contents)==null?void 0:re.find(we=>{var Ie;return(Ie=we==null?void 0:we.key)==null?void 0:Ie.includes("struct")}))==null?void 0:Q.value)==null?void 0:de[0])==null?void 0:ze.结构)==null?void 0:Qe.contents)==null?void 0:J.map(we=>(we.value=Z==null?void 0:Z[we==null?void 0:we.prop],we)))==null?void 0:O.filter(we=>(we==null?void 0:we.prop)!=="sort");G.push({key:"filter",contents:(Ke=(be=(xe=(ce=(W=s==null?void 0:s.contents)==null?void 0:W.find(we=>{var Ie;return(Ie=we==null?void 0:we.key)==null?void 0:Ie.includes("struct")}))==null?void 0:ce.value)==null?void 0:xe[0])==null?void 0:be.引用)==null?void 0:Ke.contents}),G.push({key:"formContent",contents:k}),p.compData=await Md(G)}return p});return i=await Promise.all(l),i},Rd=T.useLoginState(T.pinia),{loginUserInfo:sa}=T.storeToRefs(Rd),Pd=T.useMenuState(T.pinia),{activeMenuPath:jo,currentMenuPath:$d}=T.storeToRefs(Pd),Al=Me.useUnit(T.pinia),{selectTitle:so}=T.storeToRefs(Al),Ld=async(a,r)=>{var y,f,p,x,_,E,N,K,$,ee,F,P,R;let i=jo.value,l="",s=((y=so==null?void 0:so.value)==null?void 0:y.find(m=>(m==null?void 0:m.condition)==="child"&&!(m!=null&&m.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(i=r?i:(f=a==null?void 0:a[0])==null?void 0:f.object_name,l=(p=a==null?void 0:a[0])==null?void 0:p.father_name);let c=[];if(l!==""){let m=l;(m==null?void 0:m[(m==null?void 0:m.length)-1])==="/"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1));let v=await sn(m,!1);v=(x=v==null?void 0:v[0])==null?void 0:x.compData;let g=(_=v==null?void 0:v.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:_.contents;g=((E=g==null?void 0:g.find(b=>b==null?void 0:b.isMainKey))==null?void 0:E.prop)??((N=g==null?void 0:g[0])==null?void 0:N.prop);let S=($=(K=v==null?void 0:v.find(b=>(b==null?void 0:b.key)==="tableContents"))==null?void 0:K.contents)==null?void 0:$.map(b=>({label:b==null?void 0:b[g],value:b==null?void 0:b[g]}));c=(ee=l==null?void 0:l.split("/"))==null?void 0:ee.map(b=>(b===""?s?(s.isShow=!0,b=s):b={value:b,condition:"child",options:S,parentContent:(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"?l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1):l,isShow:!0}:b={condition:"parent",value:b.trim(),isShow:!0},b))}if(i!==""){let m=(F=i==null?void 0:i.split("/"))==null?void 0:F.map(v=>(v={condition:"normal",value:v.trim(),isShow:!0},v));((P=m==null?void 0:m[0])==null?void 0:P.value)===((R=c==null?void 0:c[0])==null?void 0:R.value)&&(m=m==null?void 0:m.filter((v,g)=>g!==0)),c=[...c,...m??[]]}l===""&&s&&((s==null?void 0:s.parentContent)!==jo.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&c.push(s)),Al.setSelectTitle(c)},Fd=async a=>{var s,c;let r=await Ba.getPageDataApi({platId:parseInt((s=sa==null?void 0:sa.value)==null?void 0:s.plat_id),pageName:"menu"}),i=(c=r==null?void 0:r.data)==null?void 0:c.result,l=i==null?void 0:i.filter(y=>(y==null?void 0:y.object_name)===$d.value+"/");return(l==null?void 0:l.length)>0&&(a=a==null?void 0:a.map(y=>{var f;return(y==null?void 0:y.comp)==="Table"&&(y.compData=(f=y==null?void 0:y.compData)==null?void 0:f.map(p=>{var x;return(p==null?void 0:p.key)==="header"&&(p.contents=(x=p.contents)==null?void 0:x.map((_,E)=>(E===0&&(_.isExistChild=!0),_))),p})),y})),a},sn=async(a,r,i={})=>{var y,f,p,x,_,E,N,K,$,ee,F,P;let l=await Ba.getPageDataApi({platId:parseInt((y=sa==null?void 0:sa.value)==null?void 0:y.plat_id),pageName:a}),s=(f=l==null?void 0:l.data)==null?void 0:f.result;if((s==null?void 0:s.length)===0&&(i!=null&&i.originPath)&&(i==null?void 0:i.originPath)!==a){let R=await Ba.getPageDataApi({platId:parseInt((p=sa==null?void 0:sa.value)==null?void 0:p.plat_id),pageName:i==null?void 0:i.originPath});if(((_=(x=R==null?void 0:R.data)==null?void 0:x.result)==null?void 0:_.length)>0){let m=await Fo((E=R==null?void 0:R.data)==null?void 0:E.result);m=m==null?void 0:m.map(S=>{var Te,Ze,ke,Pe,Ne,z,re,Q,de,ze,Qe,J,O,W,ce,xe,be,Ke;let b=[],ie=(Te=Object.keys(S))==null?void 0:Te.filter(G=>G==null?void 0:G.includes("name"));for(let G in S)ie!=null&&ie.find(Z=>Z===G)&&b.push(S==null?void 0:S[G]);if(b=b.reverse(),(S==null?void 0:S.comp)==="Table"){let G=(Pe=(ke=(Ze=S==null?void 0:S.compData)==null?void 0:Ze.find(k=>(k==null?void 0:k.key)==="tableContents"))==null?void 0:ke.contents)==null?void 0:Pe.map(k=>{let we={};for(let Ie in k)Ie!=="id"&&(we[Ie]=k==null?void 0:k[Ie]);return k=Object.values(we),k}),Z=(z=(Ne=S==null?void 0:S.compData)==null?void 0:Ne.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:z.contents;Array.isArray(Z==null?void 0:Z[0])?(Z[0].unshift({label:"排序",prop:"sort"}),(re=Z[0])!=null&&re.find(k=>(k==null?void 0:k.prop)==="disabled")&&(Z[0]=(Q=Z[0])==null?void 0:Q.filter(k=>(k==null?void 0:k.prop)!=="disabled"),Z[0].unshift({label:"",prop:"disabled",sortable:!1}))):(Z.unshift({label:"排序",prop:"sort"}),Z!=null&&Z.find(k=>(k==null?void 0:k.prop)==="disabled")&&(Z=Z==null?void 0:Z.filter(k=>(k==null?void 0:k.prop)!=="disabled"),Z.unshift({label:"",prop:"disabled",sortable:!1}))),S={filter:(ze=(de=S==null?void 0:S.compData)==null?void 0:de.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:ze.contents,key:S==null?void 0:S.comp,name:b,tableColumns:Z,tableContents:G}}else{let G=(O=(J=(Qe=S==null?void 0:S.compData)==null?void 0:Qe.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:J.contents)==null?void 0:O.map(k=>(k==null?void 0:k.value)??"");G=[G];let Z=(xe=(ce=(W=S==null?void 0:S.compData)==null?void 0:W.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:ce.contents)==null?void 0:xe.map(k=>(k.value="",k));S={contents:G,filter:(Ke=(be=S==null?void 0:S.compData)==null?void 0:be.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:Ke.contents,key:S==null?void 0:S.comp,name:b,value:Z}}return S.isShow=!1,S});let v=[{key:"menuPath",contents:[{path:a,fatherPath:($=(K=(N=R==null?void 0:R.data)==null?void 0:N.result)==null?void 0:K[0])==null?void 0:$.father_name,isShow:!1}]},{key:a,contents:m}];await Ba.createPlatFormDataApi({platId:parseInt((ee=sa==null?void 0:sa.value)==null?void 0:ee.plat_id),changeData:v});let g=await Ba.getPageDataApi({platId:parseInt((F=sa==null?void 0:sa.value)==null?void 0:F.plat_id),pageName:a});s=(P=g==null?void 0:g.data)==null?void 0:P.result}}r&&await Ld(s,!!(i!=null&&i.originPath));let c=await Fo(s);return r&&(c=await Fd(c)),c};var jn={exports:{}},jd=jn.exports,Uo;function Ud(){return Uo||(Uo=1,function(a,r){(function(i,l){l()})(jd,function(){function i(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 l(x,_,E){var N=new XMLHttpRequest;N.open("GET",x),N.responseType="blob",N.onload=function(){p(N.response,_,E)},N.onerror=function(){console.error("could not download file")},N.send()}function s(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function c(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 y=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Me.commonjsGlobal=="object"&&Me.commonjsGlobal.global===Me.commonjsGlobal?Me.commonjsGlobal:void 0,f=y.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=y.saveAs||(typeof window!="object"||window!==y?function(){}:"download"in HTMLAnchorElement.prototype&&!f?function(x,_,E){var N=y.URL||y.webkitURL,K=document.createElement("a");_=_||x.name||"download",K.download=_,K.rel="noopener",typeof x=="string"?(K.href=x,K.origin===location.origin?c(K):s(K.href)?l(x,_,E):c(K,K.target="_blank")):(K.href=N.createObjectURL(x),setTimeout(function(){N.revokeObjectURL(K.href)},4e4),setTimeout(function(){c(K)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,E){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(i(x,E),_);else if(s(x))l(x,_,E);else{var N=document.createElement("a");N.href=x,N.target="_blank",setTimeout(function(){c(N)})}}:function(x,_,E,N){if(N=N||open("","_blank"),N&&(N.document.title=N.document.body.innerText="downloading..."),typeof x=="string")return l(x,_,E);var K=x.type==="application/octet-stream",$=/constructor/i.test(y.HTMLElement)||y.safari,ee=/CriOS\/[\d]+/.test(navigator.userAgent);if((ee||K&&$||f)&&typeof FileReader<"u"){var F=new FileReader;F.onloadend=function(){var m=F.result;m=ee?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),N?N.location.href=m:location=m,N=null},F.readAsDataURL(x)}else{var P=y.URL||y.webkitURL,R=P.createObjectURL(x);N?N.location=R:location.href=R,N=null,setTimeout(function(){P.revokeObjectURL(R)},4e4)}});y.saveAs=p.saveAs=p,a.exports=p})}(jn)),jn.exports}Ud();const qn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DsymuEzu.cjs")).then(a=>a.index));qn.install=a=>{a.component("ssMenu",qn)};const Vl={__name:"index",props:{name:String},setup(a){const r=a,i=e.computed(()=>ct.ElIcons[r.name]);return e.onMounted(()=>{}),(l,s)=>{const c=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))]),_:1})}}},Ol=(a,r,i=0)=>{let l=a;return l!=null&&l.every(s=>Array.isArray(s))&&(l!=null&&l.every(s=>Array.isArray(s)&&s.length===1)?l=l==null?void 0:l.filter(s=>(s==null?void 0:s[0])!==(r==null?void 0:r[i])):l=l==null?void 0:l.map(s=>{if(s!=null&&s.find(c=>c===(r==null?void 0:r[i]))&&(r==null?void 0:r.length)!==1){let c=T.cloneDeep(r),y=s==null?void 0:s.filter(_=>_!==(c==null?void 0:c[i])),f=i+1,p=Ol(y,c,f),x=[];x.push(s==null?void 0:s[0]),p==null||p.forEach(_=>{x.push(_)}),s=x}return s})),l},Ml=(a,r,i,l=0)=>{let s=a;return s!=null&&s.every(c=>Array.isArray(c))&&(s!=null&&s.every(c=>Array.isArray(c)&&c.length===1)?s.push([i]):s=s==null?void 0:s.map(c=>{if(c!=null&&c.find(y=>y===(r==null?void 0:r[l]))&&(r==null?void 0:r.length)!==1){let y=T.cloneDeep(r),f=c==null?void 0:c.filter(E=>E!==(y==null?void 0:y[l])),p=l+1,x=Ml(f,y,i,p),_=[];_.push(c==null?void 0:c[0]),x==null||x.forEach(E=>{_.push(E)}),c=_}return c})),s},zl=(a,r,i,l,s=0)=>{let c=a;return c!=null&&c.every(y=>Array.isArray(y))&&(c!=null&&c.every(y=>Array.isArray(y)&&y.length===1)?c=c==null?void 0:c.map(y=>((y==null?void 0:y[0])===i&&(y=[l]),y)):c=c==null?void 0:c.map(y=>{if(y!=null&&y.find(f=>f===(r==null?void 0:r[s]))&&(r==null?void 0:r.length)!==1){let f=T.cloneDeep(r),p=y==null?void 0:y.filter(N=>N!==(f==null?void 0:f[s])),x=s+1,_=zl(p,f,i,l,x),E=[];E.push(y==null?void 0:y[0]),_==null||_.forEach(N=>{E.push(N)}),y=E}return y})),c};function Rl(a="menu"){return{name:a,components:{SvgIcon:qr.SvgIcon,ssMenu:qn,DynamicIcon:Vl,ssDialog:Gt.ssDialog,ssInput:Nt._sfc_main$2},setup(r,{emit:i}){const l=e.defineProps({mode:{type:String,default:"vertical"}}),s=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),c=T.useMenuState(),y=T.useModelComp(T.pinia),f=T.useLoginState(T.pinia),{loginUserInfo:p}=T.storeToRefs(f),x=e.ref(0),_=Xr.useRouter(),E=e.ref(),{asideMenus:N,menuTriggerType:K,platform:$}=T.storeToRefs(c),{fixMenuStatus:ee}=T.storeToRefs(y),F=e.computed(()=>l==null?void 0:l.mode),P=G=>G==null?void 0:G.map(k=>{var we,Ie;return!(k!=null&&k.children)||((we=k==null?void 0:k.children)==null?void 0:we.length)===0?k.config=s.value:k!=null&&k.children&&((Ie=k==null?void 0:k.children)==null?void 0:Ie.length)>0&&(k.children=P(k.children)),k}),R=e.computed(()=>{let G=[...N.value];if((G==null?void 0:G.length)===0)return _.push("/"),[];const Z=ie(G,b.value);return Z.isFlag||(G=Z==null?void 0:Z.data),G=G==null?void 0:G.map(k=>{var we,Ie;return!(k!=null&&k.children)||((we=k==null?void 0:k.children)==null?void 0:we.length)===0?k.config=s.value:k!=null&&k.children&&((Ie=k==null?void 0:k.children)==null?void 0:Ie.length)>0&&(k.children=P(k.children)),k}),G}),m=async(G,Z)=>{y.setRouteToChildPath(""),c.setMenuTriggerType("click"),c.setActiveMenuPath(G==null?void 0:G.path),c.setActiveAsideMenu(G),G.isRouter?_.push(G.path):_.push("/"),i("node-click",G,Z)},v=async G=>{const Z=Yr.findNodeByPropInTree(R.value,"path",G);c.setActiveAsideMenu(Z),y.setRouteToChildPath(""),ee.value?y.setFixMenuStatus(!1):(be.value&&(K.value="open"),K.value==="click"?x.value===1?c.setActiveMenuPath(sessionStorage.getItem("pageKey")):c.setActiveMenuPath(G):be.value||(c.setMenuTriggerType("click"),c.setActiveMenuPath(G))),G!=null&&G.startsWith("/")?_.push(G):_.push("/"),x.value++},g=G=>{be.value||c.setActiveMenuPath(G)},S=G=>{const Z=document.documentElement;G==null||G.forEach(k=>{Z.style.setProperty(k.name,k.value)})};e.onMounted(()=>{x.value=1});const b=e.computed(()=>{const G=sessionStorage.getItem("authority");return G?JSON.parse(G):[]});e.watch(()=>$.value,G=>{G==="browser"?S(wn.browserVerticalMenuClasses):G==="client"?(S(wn.clientHorizontalMenuClasses),S(wn.clientVerticalMenuClasses)):G==="three"&&(S(wn.threeHorizontalMenuClasses),S(wn.threeVerticalMenuClasses))},{immediate:!0});const ie=(G,Z)=>({isFlag:!0}),Te=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Ze=G=>un(G),ke=e.ref({}),Pe=e.ref([]),Ne=e.ref({}),z=e.ref({}),re=G=>{switch(G){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Q=e.ref({}),de=G=>{c.setCacheInputMenu({type:Te.type,data:G}),c.setIsRefreshMenus(!0)},ze=async(G,Z,k)=>{var we,Ie,ue,se,ae,fe,Ce,Ge,dt,w,I,X,ne,B,pe,Re,oe,j,H,Y,_e,me,q,ve,le,Ve,he,Be,L,Oe,ge,We,st,Ye,tt,Ae,pt,Je,$e,rt,mt,wt;if(Z==="create"){let He=(k==null?void 0:k.title)+"(1)",ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),bt=(Ie=(we=ot==null?void 0:ot.data)==null?void 0:we.result)==null?void 0:Ie[0],Fe=(ue=bt==null?void 0:bt.value)==null?void 0:ue.pageData;Fe.compData=(se=Fe.compData)==null?void 0:se.map(Se=>{var V;return(Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=Ml(Se.contents,(V=k==null?void 0:k.path)==null?void 0:V.split("/"),He)),Se}),await ct.updateInsofDataApi({id:bt==null?void 0:bt.id,value:{pageData:Fe}});let Ue=(fe=(ae=k==null?void 0:k.path)==null?void 0:ae.split("/"))==null?void 0:fe.filter((Se,V)=>{var ye,De;return V!==((De=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:De.length)-1}),Xe=await Me.getItemData((dt=(Ge=(Ce=k==null?void 0:k.path)==null?void 0:Ce.split("/"))==null?void 0:Ge.filter((Se,V)=>{var ye,De;return V!==((De=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:De.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Ue.push(He),Ue=Ue==null?void 0:Ue.join("/"),(Xe==null?void 0:Xe.length)>0){let Se=Xe==null?void 0:Xe[0],V=(I=(w=Se==null?void 0:Se.compData)==null?void 0:w.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:I.contents;if(((X=V==null?void 0:V[0])==null?void 0:X.directiveLabel)==="#isMain"){let ye=(ne=V==null?void 0:V[0])==null?void 0:ne.prop,De=(pe=(B=Se==null?void 0:Se.compData)==null?void 0:B.find(et=>(et==null?void 0:et.key)==="tableContents"))==null?void 0:pe.contents,at;De==null||De.forEach(et=>{var Et,_t;if(et.length===1)((Et=et==null?void 0:et[0])==null?void 0:Et[ye])===(k==null?void 0:k.title)&&(at=et==null?void 0:et[0],at[ye]=He);else{let ut=(_t=V==null?void 0:V.filter(yt=>yt!=="操作"))==null?void 0:_t.map(yt=>yt==null?void 0:yt.prop),ft=et==null?void 0:et.filter(yt=>!(yt!=null&&yt.id)),vt=Me.getValueToObjectValue(ft,ut);vt[ye]=He,at=vt}}),await ct.createInsofDataApi({key:{type:"data",pageKey:(j=(oe=(Re=k==null?void 0:k.path)==null?void 0:Re.split("/"))==null?void 0:oe.filter((et,Et)=>{var _t,ut;return Et!==((ut=(_t=k==null?void 0:k.path)==null?void 0:_t.split("/"))==null?void 0:ut.length)-1}))==null?void 0:j.join("/"),tableId:Se==null?void 0:Se.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(H=p.value)==null?void 0:H.id,createUserLayer:((Y=p.value)==null?void 0:Y.dept)||((_e=p.value)==null?void 0:_e.部门名称)},value:{tableData:at}})}}await Me.newLoadingConstruct(k==null?void 0:k.path,Ue),c.setUpdateMenuStatus(!1),await ao.verifyStructureDataToStore(),c.setActiveMenuPath((ve=(q=(me=k==null?void 0:k.path)==null?void 0:me.split("/"))==null?void 0:q.filter((Se,V)=>{var ye,De;return V!==((De=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:De.length)-1}))==null?void 0:ve.join("/")),c.setActiveTopMenuPath((Ve=(le=k==null?void 0:k.path)==null?void 0:le.split("/"))==null?void 0:Ve[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0)}else if(Z==="update")E.value=k;else if(Z==="delete"){let He=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:k==null?void 0:k.path}}),ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),bt=(Be=(he=ot==null?void 0:ot.data)==null?void 0:he.result)==null?void 0:Be[0],Fe=(L=bt==null?void 0:bt.value)==null?void 0:L.pageData;if(Fe.compData=(Oe=Fe.compData)==null?void 0:Oe.map(Se=>{var V;return(Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=Ol(Se.contents,(V=k==null?void 0:k.path)==null?void 0:V.split("/"))),Se}),await ct.updateInsofDataApi({id:bt==null?void 0:bt.id,value:{pageData:Fe}}),((We=(ge=He==null?void 0:He.data)==null?void 0:ge.result)==null?void 0:We.length)>0){let Se=(Ye=(st=He==null?void 0:He.data)==null?void 0:st.result)==null?void 0:Ye.map(V=>V==null?void 0:V.id);(Se==null?void 0:Se.length)>0&&await ct.batchDeleteInsofDataApi({ids:Se})}let Ue=await Me.getItemData((pt=(Ae=(tt=k==null?void 0:k.path)==null?void 0:tt.split("/"))==null?void 0:Ae.filter((Se,V)=>{var ye,De;return V!==((De=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:De.length)-1}))==null?void 0:pt.join("/"),sessionStorage.getItem("systemKey"),""),Xe=[];(Ue==null?void 0:Ue.length)>0&&(Ue==null||Ue.forEach(Se=>{var ye,De,at,et,Et,_t,ut,ft,vt,yt,$t;let V=(et=(at=(De=(ye=Se==null?void 0:Se.compData)==null?void 0:ye.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:De.contents)==null?void 0:at[0])==null?void 0:et.prop;((ft=(ut=(_t=(Et=Se==null?void 0:Se.compData)==null?void 0:Et.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:_t.contents)==null?void 0:ut[0])==null?void 0:ft.directiveLabel)==="#isMain"&&(($t=(yt=(vt=Se==null?void 0:Se.compData)==null?void 0:vt.find(kt=>(kt==null?void 0:kt.key)==="tableContents"))==null?void 0:yt.contents)==null||$t.forEach(kt=>{var Rt,Pt,Kt;(kt==null?void 0:kt.length)>1?(kt==null?void 0:kt[1])===(k==null?void 0:k.title)&&Xe.push((Rt=kt==null?void 0:kt[0])==null?void 0:Rt.id):((Pt=kt==null?void 0:kt[0])==null?void 0:Pt[V])===(k==null?void 0:k.title)&&Xe.push((Kt=kt==null?void 0:kt[0])==null?void 0:Kt.id)}))})),(Xe==null?void 0:Xe.length)>0&&await ct.batchDeleteInsofDataApi({ids:Xe}),c.setUpdateMenuStatus(!1),await ao.verifyStructureDataToStore(),c.setActiveMenuPath((rt=($e=(Je=k==null?void 0:k.path)==null?void 0:Je.split("/"))==null?void 0:$e.filter((Se,V)=>{var ye,De;return V!==((De=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:De.length)-1}))==null?void 0:rt.join("/")),c.setActiveTopMenuPath((wt=(mt=k==null?void 0:k.path)==null?void 0:mt.split("/"))==null?void 0:wt[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0)}},Qe=async(G,Z)=>{var Ge,dt,w,I,X,ne,B,pe,Re,oe,j,H,Y,_e,me,q,ve,le,Ve,he,Be,L,Oe,ge,We,st,Ye,tt,Ae,pt,Je;let k=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),we=(dt=(Ge=k==null?void 0:k.data)==null?void 0:Ge.result)==null?void 0:dt[0],Ie=(w=we==null?void 0:we.value)==null?void 0:w.pageData;Ie.compData=(I=Ie.compData)==null?void 0:I.map($e=>{var rt,mt;return($e==null?void 0:$e.key)==="menuContents"&&($e.contents=zl($e.contents,(rt=Z==null?void 0:Z.path)==null?void 0:rt.split("/"),Z==null?void 0:Z.title,(mt=G==null?void 0:G.target)==null?void 0:mt.value)),$e}),we!=null&&we.id&&await ct.updateInsofDataApi({id:we==null?void 0:we.id,value:{pageData:Ie}});let ue=(ne=(X=Z==null?void 0:Z.path)==null?void 0:X.split("/"))==null?void 0:ne.filter(($e,rt)=>{var mt,wt;return rt!==((wt=(mt=Z==null?void 0:Z.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}),se=ue==null?void 0:ue.join("/");ue.push((B=G==null?void 0:G.target)==null?void 0:B.value),ue=ue==null?void 0:ue.join("/");let ae=await Me.getItemData(se,sessionStorage.getItem("systemKey"),"");if(((H=(j=(oe=(Re=(pe=ae==null?void 0:ae[0])==null?void 0:pe.compData)==null?void 0:Re.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:oe.contents)==null?void 0:j[0])==null?void 0:H.directiveLabel)==="#isMain"){let $e=(ve=(q=(me=(_e=(Y=ae==null?void 0:ae[0])==null?void 0:Y.compData)==null?void 0:_e.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:me.contents)==null?void 0:q[0])==null?void 0:ve.prop,rt=(he=(Ve=(le=ae==null?void 0:ae[0])==null?void 0:le.compData)==null?void 0:Ve.find(He=>(He==null?void 0:He.key)==="tableContents"))==null?void 0:he.contents,mt=(ge=(Oe=(L=(Be=ae==null?void 0:ae[0])==null?void 0:Be.compData)==null?void 0:L.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:Oe.contents)==null?void 0:ge.map(He=>He==null?void 0:He.prop),wt;if(rt==null||rt.forEach(He=>{var bt;let ot=Me.getValueToObjectValue(He,mt);(ot==null?void 0:ot[$e])===Z.title&&(wt=ot,wt[$e]=(bt=G==null?void 0:G.target)==null?void 0:bt.value)}),wt){let He={};for(let bt in wt)bt!=="id"&&(He[bt]=wt==null?void 0:wt[bt]);let ot=[{id:wt==null?void 0:wt.id,value:{tableData:He}}];await ct.batchUpdateInsofDataApi({dataList:ot})}}let fe=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Z==null?void 0:Z.path}}),Ce=(st=(We=fe==null?void 0:fe.data)==null?void 0:We.result)==null?void 0:st.map($e=>({id:$e==null?void 0:$e.id,key:$e==null?void 0:$e.key}));Ce=Ce==null?void 0:Ce.map($e=>($e.key.pageKey=ue,$e)),(Ce==null?void 0:Ce.length)>0&&await ct.batchUpdateInsofDataApi({dataList:Ce}),c.setUpdateMenuStatus(!1),await ao.verifyStructureDataToStore(),c.setActiveMenuPath((Ae=(tt=(Ye=Z==null?void 0:Z.path)==null?void 0:Ye.split("/"))==null?void 0:tt.filter(($e,rt)=>{var mt,wt;return rt!==((wt=(mt=Z==null?void 0:Z.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}))==null?void 0:Ae.join("/")),c.setActiveTopMenuPath((Je=(pt=Z==null?void 0:Z.path)==null?void 0:pt.split("/"))==null?void 0:Je[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0),E.value=void 0},J=async(G,Z)=>{Te.type=re(Z==null?void 0:Z.operateType),await ze(Z,Te.type,G),z.value=G,Q.value=Z},O=()=>{Te.show=!1},W=G=>G==null?void 0:G.filter(Z=>Z.allowInherit),ce=()=>{var k,we,Ie,ue,se;let G;Te.type==="create"&&(G=((k=z.value)==null?void 0:k.path)+"/"+Ne.value[(we=Ne.value)==null?void 0:we.prop]),Te.type==="update"&&(G=(Ie=z.value)==null?void 0:Ie.path);const Z={...z.value,config:W((ue=z.value)==null?void 0:ue.config),children:[],childMenus:[],title:Ne.value[(se=Ne.value)==null?void 0:se.prop],path:G};console.log("clickSubmitForm",Q.value,z.value,Z),de(Z),Te.show=!1},xe=G=>{var k,we;const Z=(k=G==null?void 0:G.contents)==null?void 0:k.find(Ie=>Ie.key==="formContent");Z&&(Ne.value=(we=Z==null?void 0:Z.contents)==null?void 0:we.reduce((Ie,ue)=>(Ie[ue.key]=ue.value,Ie.prop=ue.key,Ie),{}))},be=e.ref(!1);return{isCollapse:be,handleMenuCollapse:()=>{be.value=!be.value},handleCompChange:xe,dialogForm:ke,dialogRenderComps:Pe,getComponents:Ze,clickSubmitForm:ce,dialogInfo:Te,beforeDialogDestroy:O,clickMenuIcon:J,mode:F,renderMenuList:R,clickMenu:m,openMenu:v,closeMenu:g,changeMenuStyle:S,fixElement:E,onBlur:Qe}}}}e.defineComponent(Rl());const Kd=T.useLoginState(),{loginUserInfo:va}=T.storeToRefs(Kd),Zt=T.useModelComp(T.pinia),Wd=e.ref(!1),{itemData:Hd,itemGridData:nn,curStructureCompIds:Ko,isSubmitCurStructure:qd,isRefreshCurStructure:Pf,routeToChildPath:Xd,pageMapState:mo,itemExtendData:Pn}=T.storeToRefs(Zt),Qt=T.useMenuState(T.pinia),{activeTopMenuPath:Yd,activeMenuPath:ea,platform:$f,activeAsideMenu:Lf,buttonTriggerType:Gd,menus:Ff,currentMenuPath:jf}=T.storeToRefs(Qt),xa=Me.useUnit(T.pinia),{selectTitle:xo,chooseTitle:Wo}=T.storeToRefs(xa),Jd=Me.useOriginalState(T.pinia),{originalPath:Uf}=T.storeToRefs(Jd);e.ref();T.useAuthorityState(T.pinia);const Xn=e.ref(!0),on=e.ref(0),Un=e.ref([]);e.ref(!1);const Zd=()=>{Zt.setItemGridData([]),Zt.setIsEdit("edit"),Zt.setSubmitCurStructure(ea.value!=="/平台管理/菜单管理")},Qd=()=>{Zt.setIsEdit("view"),Zt.setRefreshCurStructure(!0)},ep=async a=>{var s;let r=xo.value,i=r==null?void 0:r.findIndex(c=>(c==null?void 0:c.value)===(a==null?void 0:a.value)),l=r==null?void 0:r.filter((c,y)=>y<=i);xa.setSelectTitle(T.cloneDeep(l)),l=(s=l==null?void 0:l.map(c=>c==null?void 0:c.value))==null?void 0:s.join("/"),Qt.setActiveMenuPath(null),Qt.setActiveMenuPath(l)},co=async(a,r,i,l="contentConfig")=>{var s;try{if(!Array.isArray(a))return;let c,y;r==="create"?(c={dataList:a==null?void 0:a.map(p=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i!=null&&i.startsWith("/")?i==null?void 0:i.substring(1):i,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...p,compData:(x=p==null?void 0:p.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},y=ct.batchAddInsofDataApi):r==="update"?(c={dataList:a==null?void 0:a.map(p=>{var x;return{id:p==null?void 0:p.id,value:{pageData:{...p,compData:(x=p==null?void 0:p.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},y=ct.batchUpdateInsofDataApi):r==="delete"&&(c={ids:a},y=ct.batchDeleteInsofDataApi);const f=await y(c);if(((s=f==null?void 0:f.data)==null?void 0:s.code)===200)return f.data.result;throw ct.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{ct.ElMessage.error("保存响应失败")}},Ho=async(a,r,i,l)=>{var s,c,y,f,p,x,_,E,N,K,$;try{const ee=(c=(s=a==null?void 0:a.results)==null?void 0:s.filter(g=>!(g!=null&&g.id)||typeof(g==null?void 0:g.id)=="string"))==null?void 0:c.map(g=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:i},value:{tableData:g}})),F=(f=(y=a==null?void 0:a.results)==null?void 0:y.filter(g=>(g==null?void 0:g.id)&&typeof(g==null?void 0:g.id)=="number"))==null?void 0:f.map(g=>({id:g==null?void 0:g.id,value:{tableData:g}})),P=JSON.parse(T.cloneDeep(JSON.stringify(a))),R=(p=P==null?void 0:P.results)==null?void 0:p.map(g=>g.id);let m;i?m=(E=(_=(x=mo.value)==null?void 0:x[ea.value])==null?void 0:_.filter(g=>{var S,b,ie;return((S=g==null?void 0:g.key)==null?void 0:S.type)===r&&((ie=(b=g==null?void 0:g.key)==null?void 0:b.relatedInfo)==null?void 0:ie.target)===l}))==null?void 0:E.map(g=>g==null?void 0:g.id):m=($=(K=(N=mo.value)==null?void 0:N[ea.value])==null?void 0:K.filter(g=>{var S;return((S=g==null?void 0:g.key)==null?void 0:S.type)===r}))==null?void 0:$.map(g=>g==null?void 0:g.id);const v=m==null?void 0:m.filter(g=>!(R!=null&&R.includes(g))&&typeof g=="number");(ee==null?void 0:ee.length)>0&&await ct.batchAddInsofDataApi({dataList:ee}),(F==null?void 0:F.length)>0&&await ct.batchUpdateInsofDataApi({dataList:F}),(v==null?void 0:v.length)>0&&await ct.batchDeleteInsofDataApi({ids:v})}catch(ee){throw new Error(ee)}},tp=async a=>{var x,_,E,N,K,$,ee,F,P,R;Qt.setContentLoading(!0);const r=JSON.parse(T.cloneDeep(JSON.stringify(Hd.value)));if(!qd.value)return Qt.setCacheStructures({key:Gd.value,data:r}),ct.ElMessage.success("已暂存");const i=r==null?void 0:r.map(m=>m.id),l=i.filter(m=>{var v;return!((v=Ko.value)!=null&&v.includes(m))}),s=(x=Ko.value)==null?void 0:x.filter(m=>!i.includes(m)),c=[...l,...s].filter(m=>typeof m!==null&&typeof m<"u"),y=r==null?void 0:r.filter(m=>!m.id),f=r==null?void 0:r.filter(m=>m.id);let p=[];if(c&&(c==null?void 0:c.length)>0&&p.push(co(c,"delete",a)),y&&(y==null?void 0:y.length)>0&&p.push(co(y,"create",a)),f&&(f==null?void 0:f.length)>0&&p.push(co(f,"update",a)),nn.value&&((_=nn.value)!=null&&_.isDelete&&((N=(E=nn.value)==null?void 0:E.results)==null?void 0:N.length)>0&&(($=(K=nn.value)==null?void 0:K.results)!=null&&$.every(m=>typeof m=="number"))?await ct.batchDeleteInsofDataApi({ids:(ee=nn.value)==null?void 0:ee.results}):(console.log("itemGridData.value",nn.value),p.push(await Ho(nn.value,"gridLayout")))),Pn.value)for(const m in Pn.value)p.push(await Ho((F=Pn.value)==null?void 0:F[m],"extend",{target:m,compId:(R=(P=Pn.value)==null?void 0:P[m])==null?void 0:R.compId},m));await Promise.all(p).then(()=>{ct.ElMessage.success("保存成功"),Zt.setRefreshCurStructure(!0)}).catch(m=>{ct.ElMessage.success(m)}),Qt.setContentLoading(!1)},_n=a=>un(a),Ft=e.ref([]),ap=e.computed(()=>{var a;return(a=Ft.value)==null?void 0:a.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),Pl=e.computed(()=>{var a;return(a=Ft.value)==null?void 0:a.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),$l=e.ref(0),Ll=e.ref(null),En=async(a,r="data",i)=>{var l,s,c,y,f,p,x,_;if((a==null?void 0:a.buttonName)==="新增"){let E=[{tableName:(l=a==null?void 0:a.relatedContents)==null?void 0:l.find(N=>N==null?void 0:N.includes("content")),tableContents:a==null?void 0:a.fixContent}];await Ba.pageBatchAddApi({platId:parseInt((s=va==null?void 0:va.value)==null?void 0:s.plat_id),changeContents:E})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const E=((a==null?void 0:a.ocrRows)||[]).map(K=>{const $={...K};return delete $._isOCRRow,delete $._ocrTableId,$});let N=[{tableName:(c=a==null?void 0:a.relatedContents)==null?void 0:c.find(K=>K==null?void 0:K.includes("content")),tableContents:E}];await Ba.pageBatchAddApi({platId:parseInt((y=va==null?void 0:va.value)==null?void 0:y.plat_id),changeContents:N})}if((a==null?void 0:a.buttonName)==="编辑"){const E=((a==null?void 0:a.fixContent)||[]).map(K=>{const $={...K};return delete $._isOCRRow,delete $._ocrTableId,delete $._isTemp,delete $.tableEditType,delete $.index,$});let N=[{tableName:(f=a==null?void 0:a.relatedContents)==null?void 0:f.find(K=>K==null?void 0:K.includes("content")),tableContents:E}];await Ba.pageBatchUpdateApi({platId:parseInt((p=va==null?void 0:va.value)==null?void 0:p.plat_id),changeContents:N})}if((a==null?void 0:a.buttonName)==="删除"){let E=[{tableName:(x=a==null?void 0:a.relatedContents)==null?void 0:x.find(N=>N==null?void 0:N.includes("content")),tableContents:a==null?void 0:a.fixContent}];await Ba.pageBatchDeleteApi({platId:parseInt((_=va==null?void 0:va.value)==null?void 0:_.plat_id),changeContents:E})}Zt.setRefreshCurStructure(!0)},Cn=async(a,r)=>{},Sn=async a=>{Ft.value=await Me.getDeepDiffItems(a),Zt.setItemData(Ft.value),Zt.setOriginalData(Ft.value)};e.ref();const np=e.ref(null),op=()=>{var a,r;console.log("倒计时结束时"),oa.ElMessageBox.alert(`超时未提交,【${(r=(a=ea.value)==null?void 0:a.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=e.ref([]),lp=e.computed(()=>{var a,r;return(r=(a=mo.value)==null?void 0:a[ea.value])==null?void 0:r.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Yd.value],()=>{xa.setSelectTitle([]),xa.setChooseTitle([])},{deep:!0});e.watch(()=>[Wo.value],async()=>{var r,i,l;let a=(r=Wo.value)==null?void 0:r.filter(s=>(s==null?void 0:s.condition)==="child"&&(s==null?void 0:s.value)!==""&&(s==null?void 0:s.parentContent)!==ea.value);if((a==null?void 0:a.length)>0){Qt.setContentLoading(!0);let s=ea.value+"/"+((i=a==null?void 0:a[0])==null?void 0:i.value),c=!!((l=a==null?void 0:a[0])!=null&&l.parentContent),y=await sn(s,c,{originPath:ea.value});y=y==null?void 0:y.map(f=>(f.isShow=!0,f)),console.log(y,"loadingContents"),Ft.value=await Me.getDeepDiffItems(y),console.log(Ft.value,"showItems.value"),Qt.setContentLoading(!1)}});e.watch(()=>[ea.value],async a=>{var y,f,p;if(!ea.value)return;Qt.setCurrentMenuPath(ea.value),Zt.setLockingPage(""),Ft.value=[];let r=e.getCurrentInstance();(y=r==null?void 0:r.scope)==null||y.stop(),r=null,Xn.value=!1,Qt.setContentLoading(!0),Wd.value=!0;let i=a==null?void 0:a[0],l=i,s=(f=xo.value)==null?void 0:f.filter(x=>(x==null?void 0:x.condition)==="child"&&(x==null?void 0:x.value)!==""&&(x==null?void 0:x.parentContent)!==ea.value&&!(x!=null&&x.relatedContent));(s==null?void 0:s.length)>0&&(i=i+"/"+((p=s==null?void 0:s[0])==null?void 0:p.value));let c=await sn(i,!0,{originPath:l});c=c==null?void 0:c.map(x=>(x.isShow=!0,x)),Ft.value=await Me.getDeepDiffItems(c),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(Ft.value),Zt.setOriginalData(Ft.value),e.nextTick(()=>{on.value=on.value++,Xn.value=!0})},{immediate:!0});const rp=async()=>{Qt.setLinkMenuInfo(null),Qt.setActiveMenuPath(Xd.value),Ft.value=null,Zt.setRouteToChildPath(""),Qt.setChildMenu("")},ip=a=>new RegExp("button","i").test(a),sp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),jl=a=>{if(sp(a)){const r=a==null?void 0:a.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Qt.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},Ul=async a=>{var f,p,x,_,E,N,K,$;Qt.setCurrentMenuPath(ea.value+"/"+a),Qt.setContentLoading(!0),Ft.value=await sn(ea.value+"/"+a,!0,{originPath:ea.value+"/"});let r=await sn(ea.value,!1);Ft.value=(f=Ft.value)==null?void 0:f.map(ee=>(ee.isShow=!0,ee));let i=(p=r==null?void 0:r.filter(ee=>(ee==null?void 0:ee.comp)==="Table"))==null?void 0:p[0],l=(N=(E=(_=(x=i==null?void 0:i.compData)==null?void 0:x.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:_.contents)==null?void 0:E[0])==null?void 0:N.prop,s=($=(K=i==null?void 0:i.compData)==null?void 0:K.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:$.contents;s=s==null?void 0:s.map(ee=>({label:ee==null?void 0:ee[l],value:ee==null?void 0:ee[l]}));let c=xo.value,y={value:a,condition:"child",options:s,relatedContent:ea.value,isShow:!0};c.push(y),xa.setSelectTitle(c),xa.setChooseTitle([y]),Ft.value=await Me.getDeepDiffItems(Ft.value),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(Ft.value),Zt.setOriginalData(Ft.value)},cp=a=>{$l.value=a},vn=e.reactive({index:0,comp:null}),up=e.computed(()=>{var a;return(a=Ft.value)==null?void 0:a.map((r,i)=>({id:r.id,name:r.name,status:dp(r,i)}))}),Kl=(a,r)=>{var p,x,_,E,N;const i=r?a:a-2,l=(p=Ft.value)==null?void 0:p[i],s=(_=(x=l==null?void 0:l.compData)==null?void 0:x.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:_.contents,c=s==null?void 0:s.findIndex(K=>(K==null?void 0:K.isMainKey)&&(K==null?void 0:K.label)!=="操作"),y=c===-1?0:c,f=(N=(E=l==null?void 0:l.compData)==null?void 0:E.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:N.contents;return{valid:f==null?void 0:f.every(K=>K==null?void 0:K[y+1]),length:(f==null?void 0:f.length)||0}},dp=(a,r)=>{var l;let i="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:s,length:c}=Kl(r,!0);vn.index===r?i="process":c===0?i="wait":i=s?"success":"error"}return i},Wl=a=>{var i,l,s,c,y;const r=a+1;if(r>1&&((s=(l=(i=Ft.value)==null?void 0:i[a])==null?void 0:l.comp)==null?void 0:s.toUpperCase())==="TABLE"){const{valid:f}=Kl(r);f?(vn.index=r,vn.comp=(c=Ft.value)==null?void 0:c[a]):ct.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else vn.index=r,vn.comp=(y=Ft.value)==null?void 0:y[a]},Hl=e.computed(()=>{var a,r;return(r=(a=Pl.value)==null?void 0:a[0])==null?void 0:r.isStepLayout});e.watch(()=>Hl.value,a=>{a&&Wl(0)},{immediate:!0});const pp={class:"layout"},fp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:r}){const i=r,l=a;e.onMounted(async()=>{});const s=e.computed(()=>T.cloneDeep(l==null?void 0:l.itemData)||[]),c=e.computed(()=>{var _;const x=(_=s==null?void 0:s.value)==null?void 0:_.find(E=>{const{key:N}=E;return N==="baseConfig"});return x==null?void 0:x.contents}),y=e.computed(()=>{var _;const x=(_=s==null?void 0:s.value)==null?void 0:_.find(E=>{const{key:N}=E;return N==="children"});return x==null?void 0:x.contents}),f=e.computed(()=>{let x=T.cloneDeep(y.value)||[];const _=x.length;let E=0;const N=[];if(x=x.map(K=>{const $=K.span;return $?(K.span=Number($),E=E+K.span):N.push(K),K}),E<24){const K=Math.floor((24-E)/_);N.forEach($=>{$.span=K})}return x}),p=x=>{i("rowClick",x)};return(x,_)=>{var K;const E=e.resolveComponent("el-col"),N=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",pp,[e.createVNode(N,{style:e.normalizeStyle({height:(K=c.value)==null?void 0:K.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,($,ee)=>(e.openBlock(),e.createBlock(E,{span:$==null?void 0:$.span},{default:e.withCtx(()=>{var F;return[e.unref(Xn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)($.comp)),{key:e.unref(on),compName:$.name,index:($==null?void 0:$.id)??ee,height:(F=c.value)==null?void 0:F.height,itemData:$==null?void 0:$.compData,childItemData:$==null?void 0:$.itemChildData,onChange:e.unref(En),onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),onRowClick:p},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),hp=zt._export_sfc(fp,[["__scopeId","data-v-ab9a36ed"]]),vp={class:"layout-operate"},mp={class:"layout-module"},gp={class:"collapse-title-item"},yp={class:"collapse-title"},bp={class:"icon-content"},kp=["onClick"],xp={class:"comp-child"},wp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r;e.onMounted(()=>{ee()});const s=e.ref({}),c=e.ref({}),y=e.ref([]),f=g=>[{label:"高度",prop:"height",type:"input",value:g==null?void 0:g.height}],p=g=>{c.value=g,l("change",v(),!0)},x=e.ref([]),_=e.ref([]),E=g=>[{label:"占比",prop:"span",type:"input",value:g==null?void 0:g.span}],N=e.computed(()=>{const g=i==null?void 0:i.itemContents;return T.cloneDeep(g)}),K=e.computed(()=>{const g=N==null?void 0:N.value,S=g==null?void 0:g.find(b=>{const{key:ie}=b;return ie==="baseConfig"});return S==null?void 0:S.contents}),$=e.computed(()=>{const g=N==null?void 0:N.value,S=g==null?void 0:g.find(b=>{const{key:ie}=b;return ie==="children"});return S==null?void 0:S.contents}),ee=()=>{var g;s.value=N.value||{},x.value=($==null?void 0:$.value)||[],y.value=f(),y.value=(g=y.value)==null?void 0:g.map(S=>{var ie;const{prop:b}=S;return S.value=(ie=K.value)==null?void 0:ie[b],S})};e.watch(()=>{var g;return(g=$==null?void 0:$.value)==null?void 0:g.length},()=>{var g;x.value=($==null?void 0:$.value)||[],_.value=(g=$.value)==null?void 0:g.map(S=>E(S))},{immediate:!0});const F=(g,S)=>{const b=T.cloneDeep($==null?void 0:$.value);b[S].span=g.span,x.value=b,l("change",v(),!0)},P=g=>un(g),R=(g,S,b)=>{if(!g)return;const ie=T.cloneDeep($==null?void 0:$.value);ie[b]&&(ie[b].compData=g,x.value=ie,l("change",v(),!0))},m=g=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let S=T.cloneDeep($==null?void 0:$.value);S=S==null?void 0:S.filter((b,ie)=>g!==ie),x.value=S,l("change",v(),!0),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:x==null?void 0:x.value}]});return(g,S)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",vp,[e.createElementVNode("div",mp,[S[1]||(S[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Nt.ssForm,{rowContents:y.value,isEnableWrap:!0,onChange:S[0]||(S[0]=ie=>p(ie))},null,8,["rowContents"])])]),e.createVNode(bl.default,{class:"collapse-content",collapseContents:$.value},{title:e.withCtx(({item:ie,index:Te})=>[e.createElementVNode("div",gp,[e.createElementVNode("div",yp,e.toDisplayString(ie.name),1),e.createElementVNode("div",bp,[e.createElementVNode("div",{onClick:e.withModifiers(Ze=>m(Te),["stop"]),class:"icon-content"},[e.createVNode(b,{name:"Delete",style:{width:"16px",height:"16px"}})],8,kp)])])]),content:e.withCtx(({item:ie,index:Te})=>[e.createElementVNode("div",xp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:_.value[Te],key:Te,isEnableWrap:!0,onChange:Ze=>F(Ze,Te)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(P(ie.comp+"Operate")),{itemContents:ie==null?void 0:ie.compData,originalItemContents:ie.compData,onChange:Ze=>R(Ze,ie,Te)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Dp=zt._export_sfc(wp,[["__scopeId","data-v-ba05456e"]]),_p=typeof window<"u";var qo;_p&&((qo=window==null?void 0:window.navigator)!=null&&qo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(a){return a==null}function ql(){}const Ep=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(Ep)));function Cp(){const a=new Map;return{on(r,i){const l=a.get(r);l!=null&&l.add(i)||a.set(r,new Set([i]))},off(r,i){const l=a.get(r);l&&l.delete(i)},clear(r){const i=a.get(r);i&&i.clear()},clearAll(){a.clear()},emit(r,...i){const l=a.get(r);l&&l.forEach(s=>{s(...i)})}}}function Xo(a,r=16){if(typeof a!="function")return ql;const i=(...c)=>{a(...c)};if(r<=0)return Xl(i);let l=0,s;return function(...c){const y=Date.now(),f=y-l;clearTimeout(s),f>=r?(l=y,i(...c)):s=setTimeout(()=>{l=Date.now(),i(...c)},Math.max(0,r-f))}}function Sp(a,r=100){if(typeof a!="function")return ql;const i=(...s)=>{a(...s)};if(r<=0)return Xl(i);let l;return function(...s){clearTimeout(l),l=setTimeout(()=>{i(...s)},r)}}function Xl(a){if(typeof a!="function")return a;let r=!1,i,l;return function(...s){return i=s,r||(r=!0,l=Promise.resolve().then(()=>(r=!1,l=void 0,a(...i)))),l}}const Tn=new Set,Yl=new WeakMap;function Tp(){Tn.forEach(a=>{a(...Yl.get(a))}),Tn.clear()}function ia(a,...r){if(typeof a!="function")return a;Yl.set(a,r),!Tn.has(a)&&(Tn.add(a),Tn.size===1&&Promise.resolve().then(Tp))}const Gl=Symbol("LAYOUT_KEY"),Jl=Symbol("EMITTER_KEY");function Bp(a){let r=0,i;for(let l=0,s=a.length;l<s;l++)i=a[l].y+a[l].h,i>r&&(r=i);return r}function go(a){const r=Array(a.length);for(let i=0,l=a.length;i<l;i++)r[i]=Ip(a[i]);return r}function Ip(a){return{...a}}function Zl(a,r){return!(a===r||a.x+a.w<=r.x||a.x>=r.x+r.w||a.y+a.h<=r.y||a.y>=r.y+r.h)}function hn(a,r,i){const l=er(a),s=tr(a),c=Array(a.length);for(let y=0,f=s.length;y<f;y++){let p=s[y];p.static||(p=Np(l,p,r,i),l.push(p)),c[a.findIndex(x=>x.i===p.i)]=p,p.moved=!1}return c}function Np(a,r,i,l){if(i)for(;r.y>0&&!Bn(a,r);)r.y--;else if(l){const c=l[r.i].y;for(;r.y>c&&!Bn(a,r);)r.y--}let s;for(;s=Bn(a,r);)r.y=s.y+s.h;return r}function Ap(a,r){const i=er(a);for(let l=0,s=a.length;l<s;l++){const c=a[l];if(c.x+c.w>r.cols&&(c.x=r.cols-c.w),c.x<0&&(c.x=0,c.w=r.cols),!c.static)i.push(c);else for(;Bn(i,c);)c.y++}return a}function Yo(a,r){for(let i=0,l=a.length;i<l;i++)if(a[i].i===r)return a[i]}function Bn(a,r){for(let i=0,l=a.length;i<l;i++)if(Zl(a[i],r))return a[i]}function Ql(a,r){return a.filter(i=>Zl(i,r))}function er(a){return a.filter(r=>r.static)}function yo(a,r,i,l,s=!1,c=!1){if(r.static)return a;const y=r.x,f=r.y,p=l&&r.y>l;typeof i=="number"&&(r.x=i),typeof l=="number"&&(r.y=l),r.moved=!0;let x=tr(a);p&&(x=x.reverse());const _=Ql(x,r);if(c&&_.length)return r.x=y,r.y=f,r.moved=!1,a;for(let E=0,N=_.length;E<N;E++){const K=_[E];K.moved||r.y>K.y&&r.y-K.y>K.h/4||(K.static?a=Go(a,K,r,s):a=Go(a,r,K,s))}return a}function Go(a,r,i,l){if(l){const s={x:i.x,y:i.y,w:i.w,h:i.h};if(s.y=Math.max(r.y-i.h,0),!Bn(a,s))return yo(a,i,void 0,s.y,!1)}return yo(a,i,void 0,i.y+1,!1)}function Vp(a,r,i,l){const s="translate3d("+r+"px,"+a+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:i+"px",height:l+"px",position:"absolute"}}function Op(a,r,i,l){const s="translate3d("+r*-1+"px,"+a+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:i+"px",height:l+"px",position:"absolute"}}function Mp(a,r,i,l){return{top:a+"px",left:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function zp(a,r,i,l){return{top:a+"px",right:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function tr(a){return Array.from(a).sort(function(r,i){return r.y===i.y&&r.x===i.x?0:r.y>i.y||r.y===i.y&&r.x>i.x?1:-1})}function Rp(a,r){r=r||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(r+" must be an array!");for(let s=0,c=a.length;s<c;s++){const y=a[s];for(let f=0;f<i.length;f++)if(typeof y[i[f]]!="number")throw new Error("VueGridLayout: "+r+"["+s+"]."+i[f]+" must be a number!");if(y.i===void 0||y.i===null)throw new Error("VueGridLayout: "+r+"["+s+"].i cannot be null!");if(typeof y.i!="number"&&typeof y.i!="string")throw new Error("VueGridLayout: "+r+"["+s+"].i must be a string or number!");if(l.indexOf(y.i)>=0)throw new Error("VueGridLayout: "+r+"["+s+"].i must be unique!");if(l.push(y.i),y.static!==void 0&&typeof y.static!="boolean")throw new Error("VueGridLayout: "+r+"["+s+"].static must be a boolean!")}}function Pp(a,r="vgl"){const i=()=>`${r}-${a}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,s)=>`${i()}__${l}--${s}`}}function Jo(a){return $p(a)}function $p(a){var r;const i=((r=a.target)==null?void 0:r.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),s=a.clientX+i.scrollLeft-l.left,c=a.clientY+i.scrollTop-l.top;return{x:s,y:c}}function Zo(a,r,i,l){return Lp(a)?{deltaX:i-a,deltaY:l-r,lastX:a,lastY:r,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function Lp(a){return typeof a=="number"&&!Number.isNaN(a)}function Fp(a,r){const i=nr(a);let l=i[0];for(let s=1,c=i.length;s<c;s++){const y=i[s];r>a[y]&&(l=y)}return l}function ar(a,r){if(!r[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return r[a]}function jp(a,r,i,l,s,c,y){if(r[l])return go(r[l]);let f=a;const p=nr(i),x=p.slice(p.indexOf(l));for(let _=0,E=x.length;_<E;_++){const N=x[_];if(r[N]){f=r[N];break}}return f=go(f||[]),hn(Ap(f,{cols:c}),y)}function nr(a){return Object.keys(a).sort((r,i)=>a[r]-a[i])}let Up="auto";function Kp(){return typeof document<"u"}function Qo(){return Kp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Up}var Dn={exports:{}},Wp=Dn.exports,el;function Hp(){return el||(el=1,function(a,r){(function(i,l){a.exports=l()})(Wp,function(){function i(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);t&&(u=u.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,u)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(u){p(n,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(u){Object.defineProperty(n,u,Object.getOwnPropertyDescriptor(o,u))})}return n}function s(n){return s=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},s(n)}function c(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function y(n,t){for(var o=0;o<t.length;o++){var u=t[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,ee(u.key),u)}}function f(n,t,o){return t&&y(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function p(n,t,o){return(t=ee(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function x(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&E(n,t)}function _(n){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(n)}function E(n,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},E(n,t)}function N(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function K(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,u=_(n);if(t){var d=_(this).constructor;o=Reflect.construct(u,arguments,d)}else o=u.apply(this,arguments);return function(h,D){if(D&&(typeof D=="object"||typeof D=="function"))return D;if(D!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(h)}(this,o)}}function $(){return $=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var u=function(h,D){for(;!Object.prototype.hasOwnProperty.call(h,D)&&(h=_(h))!==null;);return h}(n,t);if(u){var d=Object.getOwnPropertyDescriptor(u,t);return d.get?d.get.call(arguments.length<3?n:o):d.value}},$.apply(this,arguments)}function ee(n){var t=function(o,u){if(typeof o!="object"||o===null)return o;var d=o[Symbol.toPrimitive];if(d!==void 0){var h=d.call(o,u);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var F=function(n){return!(!n||!n.Window)&&n instanceof n.Window},P=void 0,R=void 0;function m(n){P=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),R=n}function v(n){return F(n)?n:(n.ownerDocument||n).defaultView||R.window}typeof window<"u"&&window&&m(window);var g=function(n){return!!n&&s(n)==="object"},S=function(n){return typeof n=="function"},b={window:function(n){return n===R||F(n)},docFrag:function(n){return g(n)&&n.nodeType===11},object:g,func:S,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||s(n)!=="object")return!1;var t=v(n)||R;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return g(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return g(n)&&n.length!==void 0&&S(n.splice)}};function ie(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Te(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var u=o.prepared.axis;if(u==="x"||u==="y"){var d=u==="x"?"y":"x";t.page[d]=o.coords.start.page[d],t.client[d]=o.coords.start.client[d],t.delta[d]=0}}}var Ze={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,u=n.defaults;o.prototype.draggable=Ze.draggable,t.map.drag=Ze,t.methodDict.drag="draggable",u.actions.drag=Ze.defaults},listeners:{"interactions:before-action-move":ie,"interactions:action-resume":ie,"interactions:action-move":Te,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,u=n.buttons,d=o.options.drag;if(d&&d.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(u&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:d.lockAxis==="start"?d.startAxis:d.lockAxis},!1}},draggable:function(n){return b.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):b.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:ie,move:Te,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},ke=Ze,Pe={init:function(n){var t=n;Pe.document=t.document,Pe.DocumentFragment=t.DocumentFragment||Ne,Pe.SVGElement=t.SVGElement||Ne,Pe.SVGSVGElement=t.SVGSVGElement||Ne,Pe.SVGElementInstance=t.SVGElementInstance||Ne,Pe.Element=t.Element||Ne,Pe.HTMLElement=t.HTMLElement||Pe.Element,Pe.Event=t.Event,Pe.Touch=t.Touch||Ne,Pe.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 Ne(){}var z=Pe,re={init:function(n){var t=z.Element,o=n.navigator||{};re.supportsTouch="ontouchstart"in n||b.func(n.DocumentTouch)&&z.document instanceof n.DocumentTouch,re.supportsPointerEvent=o.pointerEnabled!==!1&&!!z.PointerEvent,re.isIOS=/iP(hone|od|ad)/.test(o.platform),re.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),re.isIe9=/MSIE 9/.test(o.userAgent),re.isOperaMobile=o.appName==="Opera"&&re.supportsTouch&&/Presto/.test(o.userAgent),re.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",re.pEventTypes=re.supportsPointerEvent?z.PointerEvent===n.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,re.wheelEvent=z.document&&"onmousewheel"in z.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Q=re;function de(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function ze(n,t){for(;b.element(n);){if(J(n,t))return n;n=Qe(n)}return null}function Qe(n){var t=n.parentNode;if(b.docFrag(t)){for(;(t=t.host)&&b.docFrag(t););return t}return t}function J(n,t){return R!==P&&(t=t.replace(/\/deep\//g," ")),n[Q.prefixedMatchesSelector](t)}var O=function(n){return n.parentNode||n.host};function W(n,t){for(var o,u=[],d=n;(o=O(d))&&d!==t&&o!==d.ownerDocument;)u.unshift(d),d=o;return u}function ce(n,t,o){for(;b.element(n);){if(J(n,t))return!0;if((n=Qe(n))===o)return J(n,t)}return!1}function xe(n){return n.correspondingUseElement||n}function be(n){var t=n instanceof z.SVGElement?n.getBoundingClientRect():n.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Ke(n){var t,o=be(n);if(!Q.isIOS7&&o){var u={x:(t=(t=v(n))||R).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=u.x,o.right+=u.x,o.top+=u.y,o.bottom+=u.y}return o}function G(n){for(var t=[];n;)t.push(n),n=Qe(n);return t}function Z(n){return!!b.string(n)&&(z.document.querySelector(n),!0)}function k(n,t){for(var o in t)n[o]=t[o];return n}function we(n,t,o){return n==="parent"?Qe(o):n==="self"?t.getRect(o):ze(o,n)}function Ie(n,t,o,u){var d=n;return b.string(d)?d=we(d,t,o):b.func(d)&&(d=d.apply(void 0,u)),b.element(d)&&(d=Ke(d)),d}function ue(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function se(n){return!n||"x"in n&&"y"in n||((n=k({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function ae(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function fe(n,t,o){var u=o&&n.options[o];return ue(Ie(u&&u.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Ce(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(A){return!0},u=arguments.length>3?arguments[3]:void 0;if(u=u||{},b.string(n)&&n.search(" ")!==-1&&(n=Ge(n)),b.array(n))return n.forEach(function(A){return Ce(A,t,o,u)}),u;if(b.object(n)&&(t=n,n=""),b.func(t)&&o(n))u[n]=u[n]||[],u[n].push(t);else if(b.array(t))for(var d=0,h=t;d<h.length;d++){var D=h[d];Ce(n,D,o,u)}else if(b.object(t))for(var C in t)Ce(Ge(C).map(function(A){return"".concat(n).concat(A)}),t[C],o,u);return u}function Ge(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},w=["webkit","moz"];function I(n,t){n.__set||(n.__set={});var o=function(d){if(w.some(function(h){return d.indexOf(h)===0}))return 1;typeof n[d]!="function"&&d!=="__set"&&Object.defineProperty(n,d,{get:function(){return d in n.__set?n.__set[d]:n.__set[d]=t[d]},set:function(h){n.__set[d]=h},configurable:!0})};for(var u in t)o(u);return n}function X(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function ne(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function B(n){return n instanceof z.Event||n instanceof z.Touch}function pe(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Re(n,t){return t=t||{x:0,y:0},Q.isOperaMobile&&B(n)?(pe("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):pe("page",n,t),t}function oe(n){return b.number(n.pointerId)?n.pointerId:n.identifier}function j(n,t,o){var u=t.length>1?Y(t):t[0];Re(u,n.page),function(d,h){h=h||{},Q.isOperaMobile&&B(d)?pe("screen",d,h):pe("client",d,h)}(u,n.client),n.timeStamp=o}function H(n){var t=[];return b.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function Y(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var u=n[o];for(var d in t)t[d]+=u[d]}for(var h in t)t[h]/=n.length;return t}function _e(n){if(!n.length)return null;var t=H(n),o=Math.min(t[0].pageX,t[1].pageX),u=Math.min(t[0].pageY,t[1].pageY),d=Math.max(t[0].pageX,t[1].pageX),h=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:u,left:o,top:u,right:d,bottom:h,width:d-o,height:h-u}}function me(n,t){var o=t+"X",u=t+"Y",d=H(n),h=d[0][o]-d[1][o],D=d[0][u]-d[1][u];return dt(h,D)}function q(n,t){var o=t+"X",u=t+"Y",d=H(n),h=d[1][o]-d[0][o],D=d[1][u]-d[0][u];return 180*Math.atan2(D,h)/Math.PI}function ve(n){return b.string(n.pointerType)?n.pointerType:b.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof z.Touch?"touch":"mouse"}function le(n){var t=b.func(n.composedPath)?n.composedPath():n.path;return[xe(t?t[0]:n.target),xe(n.currentTarget)]}var Ve=function(){function n(t){c(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return f(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Ve.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var he=function(n,t){for(var o=0;o<t.length;o++){var u=t[o];n.push(u)}return n},Be=function(n){return he([],n)},L=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},Oe=function(n,t){return n[L(n,t)]},ge=function(n){x(o,n);var t=K(o);function o(u,d,h){var D;c(this,o),(D=t.call(this,d._interaction)).dropzone=void 0,D.dragEvent=void 0,D.relatedTarget=void 0,D.draggable=void 0,D.propagationStopped=!1,D.immediatePropagationStopped=!1;var C=h==="dragleave"?u.prev:u.cur,A=C.element,U=C.dropzone;return D.type=h,D.target=A,D.currentTarget=A,D.dropzone=U,D.dragEvent=d,D.relatedTarget=d.target,D.draggable=d.interactable,D.timeStamp=d.timeStamp,D}return f(o,[{key:"reject",value:function(){var u=this,d=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&d.cur.dropzone===this.dropzone&&d.cur.element===this.target)if(d.prev.dropzone=this.dropzone,d.prev.element=this.target,d.rejected=!0,d.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var h=d.activeDrops,D=L(h,function(A){var U=A.dropzone,M=A.element;return U===u.dropzone&&M===u.target});d.activeDrops.splice(D,1);var C=new o(d,this.dragEvent,"dropdeactivate");C.dropzone=this.dropzone,C.target=this.target,this.dropzone.fire(C)}else this.dropzone.fire(new o(d,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(Ve);function We(n,t){for(var o=0,u=n.slice();o<u.length;o++){var d=u[o],h=d.dropzone,D=d.element;t.dropzone=h,t.target=D,h.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function st(n,t){for(var o=function(h,D){for(var C=[],A=0,U=h.interactables.list;A<U.length;A++){var M=U[A];if(M.options.drop.enabled){var te=M.options.drop.accept;if(!(b.element(te)&&te!==D||b.string(te)&&!J(D,te)||b.func(te)&&!te({dropzone:M,draggableElement:D})))for(var Ee=0,je=M.getAllElements();Ee<je.length;Ee++){var Le=je[Ee];Le!==D&&C.push({dropzone:M,element:Le,rect:M.getRect(Le)})}}}return C}(n,t),u=0;u<o.length;u++){var d=o[u];d.rect=d.dropzone.getRect(d.element)}return o}function Ye(n,t,o){for(var u=n.dropState,d=n.interactable,h=n.element,D=[],C=0,A=u.activeDrops;C<A.length;C++){var U=A[C],M=U.dropzone,te=U.element,Ee=U.rect,je=M.dropCheck(t,o,d,h,te,Ee);D.push(je?te:null)}var Le=function(qe){for(var it,lt,ht,Tt=[],Vt=0;Vt<qe.length;Vt++){var xt=qe[Vt],Bt=qe[it];if(xt&&Vt!==it)if(Bt){var ra=O(xt),Wt=O(Bt);if(ra!==xt.ownerDocument)if(Wt!==xt.ownerDocument)if(ra!==Wt){Tt=Tt.length?Tt:W(Bt);var da=void 0;if(Bt instanceof z.HTMLElement&&xt instanceof z.SVGElement&&!(xt instanceof z.SVGSVGElement)){if(xt===Wt)continue;da=xt.ownerSVGElement}else da=xt;for(var ga=W(da,Bt.ownerDocument),Ca=0;ga[Ca]&&ga[Ca]===Tt[Ca];)Ca++;var Rn=[ga[Ca-1],ga[Ca],Tt[Ca]];if(Rn[0])for(var xn=Rn[0].lastChild;xn;){if(xn===Rn[1]){it=Vt,Tt=ga;break}if(xn===Rn[2])break;xn=xn.previousSibling}}else ht=Bt,(parseInt(v(lt=xt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt(v(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=Vt);else it=Vt}else it=Vt}return it}(D);return u.activeDrops[Le]||null}function tt(n,t,o){var u=n.dropState,d={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(d.activate=new ge(u,o,"dropactivate"),d.activate.target=null,d.activate.dropzone=null),o.type==="dragend"&&(d.deactivate=new ge(u,o,"dropdeactivate"),d.deactivate.target=null,d.deactivate.dropzone=null),u.rejected||(u.cur.element!==u.prev.element&&(u.prev.dropzone&&(d.leave=new ge(u,o,"dragleave"),o.dragLeave=d.leave.target=u.prev.element,o.prevDropzone=d.leave.dropzone=u.prev.dropzone),u.cur.dropzone&&(d.enter=new ge(u,o,"dragenter"),o.dragEnter=u.cur.element,o.dropzone=u.cur.dropzone)),o.type==="dragend"&&u.cur.dropzone&&(d.drop=new ge(u,o,"drop"),o.dropzone=u.cur.dropzone,o.relatedTarget=u.cur.element),o.type==="dragmove"&&u.cur.dropzone&&(d.move=new ge(u,o,"dropmove"),o.dropzone=u.cur.dropzone)),d}function Ae(n,t){var o=n.dropState,u=o.activeDrops,d=o.cur,h=o.prev;t.leave&&h.dropzone.fire(t.leave),t.enter&&d.dropzone.fire(t.enter),t.move&&d.dropzone.fire(t.move),t.drop&&d.dropzone.fire(t.drop),t.deactivate&&We(u,t.deactivate),o.prev.dropzone=d.dropzone,o.prev.element=d.element}function pt(n,t){var o=n.interaction,u=n.iEvent,d=n.event;if(u.type==="dragmove"||u.type==="dragend"){var h=o.dropState;t.dynamicDrop&&(h.activeDrops=st(t,o.element));var D=u,C=Ye(o,D,d);h.rejected=h.rejected&&!!C&&C.dropzone===h.cur.dropzone&&C.element===h.cur.element,h.cur.dropzone=C&&C.dropzone,h.cur.element=C&&C.element,h.events=tt(o,0,D)}}var Je={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,u=n.Interactable,d=n.defaults;n.usePlugin(ke),u.prototype.dropzone=function(h){return function(D,C){if(b.object(C)){if(D.options.drop.enabled=C.enabled!==!1,C.listeners){var A=Ce(C.listeners),U=Object.keys(A).reduce(function(te,Ee){return te[/^(enter|leave)/.test(Ee)?"drag".concat(Ee):/^(activate|deactivate|move)/.test(Ee)?"drop".concat(Ee):Ee]=A[Ee],te},{}),M=D.options.drop.listeners;M&&D.off(M),D.on(U),D.options.drop.listeners=U}return b.func(C.ondrop)&&D.on("drop",C.ondrop),b.func(C.ondropactivate)&&D.on("dropactivate",C.ondropactivate),b.func(C.ondropdeactivate)&&D.on("dropdeactivate",C.ondropdeactivate),b.func(C.ondragenter)&&D.on("dragenter",C.ondragenter),b.func(C.ondragleave)&&D.on("dragleave",C.ondragleave),b.func(C.ondropmove)&&D.on("dropmove",C.ondropmove),/^(pointer|center)$/.test(C.overlap)?D.options.drop.overlap=C.overlap:b.number(C.overlap)&&(D.options.drop.overlap=Math.max(Math.min(1,C.overlap),0)),"accept"in C&&(D.options.drop.accept=C.accept),"checker"in C&&(D.options.drop.checker=C.checker),D}return b.bool(C)?(D.options.drop.enabled=C,D):D.options.drop}(this,h)},u.prototype.dropCheck=function(h,D,C,A,U,M){return function(te,Ee,je,Le,qe,it,lt){var ht=!1;if(!(lt=lt||te.getRect(it)))return!!te.options.drop.checker&&te.options.drop.checker(Ee,je,ht,te,it,Le,qe);var Tt=te.options.drop.overlap;if(Tt==="pointer"){var Vt=fe(Le,qe,"drag"),xt=Re(Ee);xt.x+=Vt.x,xt.y+=Vt.y;var Bt=xt.x>lt.left&&xt.x<lt.right,ra=xt.y>lt.top&&xt.y<lt.bottom;ht=Bt&&ra}var Wt=Le.getRect(qe);if(Wt&&Tt==="center"){var da=Wt.left+Wt.width/2,ga=Wt.top+Wt.height/2;ht=da>=lt.left&&da<=lt.right&&ga>=lt.top&&ga<=lt.bottom}return Wt&&b.number(Tt)&&(ht=Math.max(0,Math.min(lt.right,Wt.right)-Math.max(lt.left,Wt.left))*Math.max(0,Math.min(lt.bottom,Wt.bottom)-Math.max(lt.top,Wt.top))/(Wt.width*Wt.height)>=Tt),te.options.drop.checker&&(ht=te.options.drop.checker(Ee,je,ht,te,it,Le,qe)),ht}(this,h,D,C,A,U,M)},o.dynamicDrop=function(h){return b.bool(h)?(n.dynamicDrop=h,o):n.dynamicDrop},k(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,d.actions.drop=Je.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,u=(n.event,n.iEvent);if(o.prepared.name==="drag"){var d=o.dropState;d.activeDrops=[],d.events={},d.activeDrops=st(t,o.element),d.events=tt(o,0,u),d.events.activate&&(We(d.activeDrops,d.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:u}))}},"interactions:action-move":pt,"interactions:after-action-move":function(n,t){var o=n.interaction,u=n.iEvent;if(o.prepared.name==="drag"){var d=o.dropState;Ae(o,d.events),t.fire("actions/drop:move",{interaction:o,dragEvent:u}),d.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,u=n.iEvent;pt(n,t),Ae(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:u})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:st,getDrop:Ye,getDropEvents:tt,fireDropEvents:Ae,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},$e=Je;function rt(n){var t=n.interaction,o=n.iEvent,u=n.phase;if(t.prepared.name==="gesture"){var d=t.pointers.map(function(U){return U.pointer}),h=u==="start",D=u==="end",C=t.interactable.options.deltaSource;if(o.touches=[d[0],d[1]],h)o.distance=me(d,C),o.box=_e(d),o.scale=1,o.ds=0,o.angle=q(d,C),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(D||t.pointers.length<2){var A=t.prevEvent;o.distance=A.distance,o.box=A.box,o.scale=A.scale,o.ds=0,o.angle=A.angle,o.da=0}else o.distance=me(d,C),o.box=_e(d),o.scale=o.distance/t.gesture.startDistance,o.angle=q(d,C),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,b.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var mt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,u=n.defaults;o.prototype.gesturable=function(d){return b.object(d)?(this.options.gesture.enabled=d.enabled!==!1,this.setPerAction("gesture",d),this.setOnEvents("gesture",d),this):b.bool(d)?(this.options.gesture.enabled=d,this):this.options.gesture},t.map.gesture=mt,t.methodDict.gesture="gesturable",u.actions.gesture=mt.defaults},listeners:{"interactions:action-start":rt,"interactions:action-move":rt,"interactions:action-end":rt,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},wt=mt;function He(n,t,o,u,d,h,D){if(!t)return!1;if(t===!0){var C=b.number(h.width)?h.width:h.right-h.left,A=b.number(h.height)?h.height:h.bottom-h.top;if(D=Math.min(D,Math.abs((n==="left"||n==="right"?C:A)/2)),C<0&&(n==="left"?n="right":n==="right"&&(n="left")),A<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var U=C>=0?h.left:h.right;return o.x<U+D}if(n==="top"){var M=A>=0?h.top:h.bottom;return o.y<M+D}if(n==="right")return o.x>(C>=0?h.right:h.left)-D;if(n==="bottom")return o.y>(A>=0?h.bottom:h.top)-D}return!!b.element(u)&&(b.element(t)?t===u:ce(u,t,d))}function ot(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var u=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?u.delta.x=u.delta.y:u.delta.y=u.delta.x,u.axes="xy"):(u.axes=o.resizeAxes,o.resizeAxes==="x"?u.delta.y=0:o.resizeAxes==="y"&&(u.delta.x=0))}}var bt,Fe,Ue={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,u=n.Interactable,d=n.defaults;Ue.cursors=function(h){return h.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),Ue.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,u.prototype.resizable=function(h){return function(D,C,A){return b.object(C)?(D.options.resize.enabled=C.enabled!==!1,D.setPerAction("resize",C),D.setOnEvents("resize",C),b.string(C.axis)&&/^x$|^y$|^xy$/.test(C.axis)?D.options.resize.axis=C.axis:C.axis===null&&(D.options.resize.axis=A.defaults.actions.resize.axis),b.bool(C.preserveAspectRatio)?D.options.resize.preserveAspectRatio=C.preserveAspectRatio:b.bool(C.square)&&(D.options.resize.square=C.square),D):b.bool(C)?(D.options.resize.enabled=C,D):D.options.resize}(this,h,n)},t.map.resize=Ue,t.methodDict.resize="resizable",d.actions.resize=Ue.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,u=t.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var d=o,h=u.rect;u._rects={start:k({},h),corrected:k({},h),previous:k({},h),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},d.edges=u.prepared.edges,d.rect=u._rects.corrected,d.deltaRect=u._rects.delta}})(n),ot(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,u=t.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var d=o,h=u.interactable.options.resize.invert,D=h==="reposition"||h==="negate",C=u.rect,A=u._rects,U=A.start,M=A.corrected,te=A.delta,Ee=A.previous;if(k(Ee,M),D){if(k(M,C),h==="reposition"){if(M.top>M.bottom){var je=M.top;M.top=M.bottom,M.bottom=je}if(M.left>M.right){var Le=M.left;M.left=M.right,M.right=Le}}}else M.top=Math.min(C.top,U.bottom),M.bottom=Math.max(C.bottom,U.top),M.left=Math.min(C.left,U.right),M.right=Math.max(C.right,U.left);for(var qe in M.width=M.right-M.left,M.height=M.bottom-M.top,M)te[qe]=M[qe]-Ee[qe];d.edges=u.prepared.edges,d.rect=M,d.deltaRect=te}})(n),ot(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var u=t;u.edges=o.prepared.edges,u.rect=o._rects.corrected,u.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,u=n.element,d=n.rect,h=n.buttons;if(d){var D=k({},t.coords.cur.page),C=o.options.resize;if(C&&C.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(h&C.mouseButtons)!=0)){if(b.object(C.edges)){var A={left:!1,right:!1,top:!1,bottom:!1};for(var U in A)A[U]=He(U,C.edges[U],D,t._latestPointer.eventTarget,u,d,C.margin||Ue.defaultMargin);A.left=A.left&&!A.right,A.top=A.top&&!A.bottom,(A.left||A.right||A.top||A.bottom)&&(n.action={name:"resize",edges:A})}else{var M=C.axis!=="y"&&D.x>d.right-Ue.defaultMargin,te=C.axis!=="x"&&D.y>d.bottom-Ue.defaultMargin;(M||te)&&(n.action={name:"resize",axes:(M?"x":"")+(te?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,u=n.name,d=Ue.cursors,h=null;if(o)h=d[u+o];else if(t){for(var D="",C=0,A=["top","bottom","left","right"];C<A.length;C++){var U=A[C];t[U]&&(D+=U)}h=d[D]}return h},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Xe=Ue,Se={id:"actions",install:function(n){n.usePlugin(wt),n.usePlugin(Xe),n.usePlugin(ke),n.usePlugin($e)}},V=0,ye={request:function(n){return bt(n)},cancel:function(n){return Fe(n)},init:function(n){if(bt=n.requestAnimationFrame,Fe=n.cancelAnimationFrame,!bt)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var u=t[o];bt=n["".concat(u,"RequestAnimationFrame")],Fe=n["".concat(u,"CancelAnimationFrame")]||n["".concat(u,"CancelRequestAnimationFrame")]}bt=bt&&bt.bind(n),Fe=Fe&&Fe.bind(n),bt||(bt=function(d){var h=Date.now(),D=Math.max(0,16-(h-V)),C=n.setTimeout(function(){d(h+D)},D);return V=h+D,C},Fe=function(d){return clearTimeout(d)})}},De={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(n){De.isScrolling=!0,ye.cancel(De.i),n.autoScroll=De,De.interaction=n,De.prevTime=De.now(),De.i=ye.request(De.scroll)},stop:function(){De.isScrolling=!1,De.interaction&&(De.interaction.autoScroll=null),ye.cancel(De.i)},scroll:function(){var n=De.interaction,t=n.interactable,o=n.element,u=n.prepared.name,d=t.options[u].autoScroll,h=at(d.container,t,o),D=De.now(),C=(D-De.prevTime)/1e3,A=d.speed*C;if(A>=1){var U={x:De.x*A,y:De.y*A};if(U.x||U.y){var M=et(h);b.window(h)?h.scrollBy(U.x,U.y):h&&(h.scrollLeft+=U.x,h.scrollTop+=U.y);var te=et(h),Ee={x:te.x-M.x,y:te.y-M.y};(Ee.x||Ee.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Ee,interaction:n,container:h})}De.prevTime=D}De.isScrolling&&(ye.cancel(De.i),De.i=ye.request(De.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&De.check(t.interactable,t.prepared.name))if(t.simulation)De.x=De.y=0;else{var u,d,h,D,C=t.interactable,A=t.element,U=t.prepared.name,M=C.options[U].autoScroll,te=at(M.container,C,A);if(b.window(te))D=o.clientX<De.margin,u=o.clientY<De.margin,d=o.clientX>te.innerWidth-De.margin,h=o.clientY>te.innerHeight-De.margin;else{var Ee=be(te);D=o.clientX<Ee.left+De.margin,u=o.clientY<Ee.top+De.margin,d=o.clientX>Ee.right-De.margin,h=o.clientY>Ee.bottom-De.margin}De.x=d?1:D?-1:0,De.y=h?1:u?-1:0,De.isScrolling||(De.margin=M.margin,De.speed=M.speed,De.start(t))}}};function at(n,t,o){return(b.string(n)?we(n,t,o):n)||v(o)}function et(n){return b.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var Et={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=De,De.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=De.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,De.stop(),De.interaction&&(De.interaction=null)},"interactions:stop":De.stop,"interactions:action-move":function(n){return De.onInteractionMove(n)}}},_t=Et;function ut(n,t){var o=!1;return function(){return o||(R.console.warn(t),o=!0),n.apply(this,arguments)}}function ft(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function vt(n){return b.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function yt(n){return b.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var $t={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,u,d,h){var D=function(C,A,U,M,te){var Ee=C.getRect(M),je=A.buttons||{0:1,1:4,3:8,4:16}[A.button],Le={action:null,interactable:C,interaction:U,element:M,rect:Ee,buttons:je};return te.fire("auto-start:check",Le),Le.action}(this,u,d,h,n);return this.options.actionChecker?this.options.actionChecker(o,u,D,this,h,d):D},t.prototype.ignoreFrom=ut(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ut(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=yt,t.prototype.styleCursor=vt}};function kt(n,t,o,u,d){return t.testIgnoreAllow(t.options[n.name],o,u)&&t.options[n.name].enabled&&Ht(t,o,n,d)?n:null}function Rt(n,t,o,u,d,h,D){for(var C=0,A=u.length;C<A;C++){var U=u[C],M=d[C],te=U.getAction(t,o,n,M);if(te){var Ee=kt(te,U,M,h,D);if(Ee)return{action:Ee,interactable:U,element:M}}}return{action:null,interactable:null,element:null}}function Pt(n,t,o,u,d){var h=[],D=[],C=u;function A(M){h.push(M),D.push(C)}for(;b.element(C);){h=[],D=[],d.interactables.forEachMatch(C,A);var U=Rt(n,t,o,h,D,u,d);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;C=Qe(C)}return{action:null,interactable:null,element:null}}function Kt(n,t,o){var u=t.action,d=t.interactable,h=t.element;u=u||{name:null},n.interactable=d,n.element=h,ft(n.prepared,u),n.rect=d&&u.name?d.getRect(h):null,jt(n,o),o.fire("autoStart:prepared",{interaction:n})}function Ht(n,t,o,u){var d=n.options,h=d[o.name].max,D=d[o.name].maxPerElement,C=u.autoStart.maxInteractions,A=0,U=0,M=0;if(!(h&&D&&C))return!1;for(var te=0,Ee=u.interactions.list;te<Ee.length;te++){var je=Ee[te],Le=je.prepared.name;if(je.interacting()&&(++A>=C||je.interactable===n&&((U+=Le===o.name?1:0)>=h||je.element===t&&(M++,Le===o.name&&M>=D))))return!1}return C>0}function Jt(n,t){return b.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function ta(n,t,o){var u=o.autoStart.cursorElement;u&&u!==n&&(u.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function jt(n,t){var o=n.interactable,u=n.element,d=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var h="";if(d.name){var D=o.options[d.name].cursorChecker;h=b.func(D)?D(d,o,u,n._interacting):t.actions.map[d.name].getCursor(d)}ta(n.element,h||"",t)}else t.autoStart.cursorElement&&ta(t.autoStart.cursorElement,"",t)}var Fa={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin($t),o.base.actionChecker=null,o.base.styleCursor=!0,k(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(u){return Jt(u,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Ht,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget;o.interacting()||Kt(o,Pt(o,u,d,h,t),t)},"interactions:move":function(n,t){(function(o,u){var d=o.interaction,h=o.pointer,D=o.event,C=o.eventTarget;d.pointerType!=="mouse"||d.pointerIsDown||d.interacting()||Kt(d,Pt(d,h,D,C,u),u)})(n,t),function(o,u){var d=o.interaction;if(d.pointerIsDown&&!d.interacting()&&d.pointerWasMoved&&d.prepared.name){u.fire("autoStart:before-start",o);var h=d.interactable,D=d.prepared.name;D&&h&&(h.options[D].manualStart||!Ht(h,d.element,d.prepared,u)?d.stop():(d.start(d.prepared,h,d.element),jt(d,u)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,u=o.interactable;u&&u.options.styleCursor&&ta(o.element,"",t)}},maxInteractions:Jt,withinInteractionLimit:Ht,validateAction:kt},wa=Fa,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,u=n.eventTarget,d=n.dx,h=n.dy;if(o.prepared.name==="drag"){var D=Math.abs(d),C=Math.abs(h),A=o.interactable.options.drag,U=A.startAxis,M=D>C?"x":D<C?"y":"xy";if(o.prepared.axis=A.lockAxis==="start"?M[0]:A.lockAxis,M!=="xy"&&U!=="xy"&&U!==M){o.prepared.name=null;for(var te=u,Ee=function(Le){if(Le!==o.interactable){var qe=o.interactable.options.drag;if(!qe.manualStart&&Le.testIgnoreAllow(qe,te,u)){var it=Le.getAction(o.downPointer,o.downEvent,o,te);if(it&&it.name==="drag"&&function(lt,ht){if(!ht)return!1;var Tt=ht.options.drag.startAxis;return lt==="xy"||Tt==="xy"||Tt===lt}(M,Le)&&wa.validateAction(it,Le,te,u,t))return Le}}};b.element(te);){var je=t.interactables.forEachMatch(te,Ee);if(je){o.prepared.name="drag",o.interactable=je,o.element=te;break}te=Qe(te)}}}}}};function Da(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(wa),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=Da(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;Da(t)>0&&(t.prepared.name=null)}},getHoldDuration:Da},Ka=Ua,Wa={id:"auto-start",install:function(n){n.usePlugin(wa),n.usePlugin(Ka),n.usePlugin(ja)}},Ha=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):b.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function qa(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Na={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Ha,t.prototype.checkAndPreventDefault=function(o){return function(u,d,h){var D=u.options.preventDefault;if(D!=="never")if(D!=="always"){if(d.events.supportsPassive&&/^touch(start|move)$/.test(h.type)){var C=v(h.target).document,A=d.getDocOptions(C);if(!A||!A.events||A.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(h.type)||b.element(h.target)&&J(h.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||h.preventDefault()}else h.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var u=0,d=n.interactions.list;u<d.length;u++){var h=d[u];if(h.element&&(h.element===o.target||de(h.element,o.target)))return void h.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=qa,n},{})};function ya(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function fa(n){var t={};for(var o in n){var u=n[o];b.plainObject(u)?t[o]=fa(u):b.array(u)?t[o]=Be(u):t[o]=u}return t}var _a=function(){function n(t){c(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ba(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return f(n,[{key:"start",value:function(t,o){var u,d,h=t.phase,D=this.interaction,C=function(U){var M=U.interactable.options[U.prepared.name],te=M.modifiers;return te&&te.length?te:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ee){var je=M[Ee];return je&&je.enabled&&{options:je,methods:je._methods}}).filter(function(Ee){return!!Ee})}(D);this.prepareStates(C),this.startEdges=k({},D.edges),this.edges=k({},this.startEdges),this.startOffset=(u=D.rect,d=o,u?{left:d.x-u.left,top:d.y-u.top,right:u.right-d.x,bottom:u.bottom-d.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var A=this.fillArg({phase:h,pageCoords:o,preEnd:!1});return this.result=ba(),this.startAll(A),this.result=this.setAll(A)}},{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,u=this.states;o<u.length;o++){var d=u[o];d.methods.start&&(t.state=d,d.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,u=t.preEnd,d=t.skipModifiers,h=t.rect,D=t.edges;t.coords=k({},t.pageCoords),t.rect=k({},h),t.edges=k({},D);for(var C=d?this.states.slice(d):this.states,A=ba(t.coords,t.rect),U=0;U<C.length;U++){var M,te=C[U],Ee=te.options,je=k({},t.coords),Le=null;(M=te.methods)!=null&&M.set&&this.shouldDo(Ee,u,o)&&(t.state=te,Le=te.methods.set(t),ae(t.edges,t.rect,{x:t.coords.x-je.x,y:t.coords.y-je.y})),A.eventProps.push(Le)}k(this.edges,t.edges),A.delta.x=t.coords.x-t.pageCoords.x,A.delta.y=t.coords.y-t.pageCoords.y,A.rectDelta.left=t.rect.left-h.left,A.rectDelta.right=t.rect.right-h.right,A.rectDelta.top=t.rect.top-h.top,A.rectDelta.bottom=t.rect.bottom-h.bottom;var qe=this.result.coords,it=this.result.rect;if(qe&&it){var lt=A.rect.left!==it.left||A.rect.right!==it.right||A.rect.top!==it.top||A.rect.bottom!==it.bottom;A.changed=lt||qe.x!==A.coords.x||qe.y!==A.coords.y}return A}},{key:"applyToInteraction",value:function(t){var o=this.interaction,u=t.phase,d=o.coords.cur,h=o.coords.start,D=this.result,C=this.startDelta,A=D.delta;u==="start"&&k(this.startDelta,D.delta);for(var U=0,M=[[h,C],[d,A]];U<M.length;U++){var te=M[U],Ee=te[0],je=te[1];Ee.page.x+=je.x,Ee.page.y+=je.y,Ee.client.x+=je.x,Ee.client.y+=je.y}var Le=this.result.rectDelta,qe=t.rect||o.rect;qe.left+=Le.left,qe.right+=Le.right,qe.top+=Le.top,qe.bottom+=Le.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,u=t.phase,d=t.preEnd,h=t.skipModifiers,D=this.setAll(this.fillArg({preEnd:d,phase:u,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=D,!D.changed&&(!h||h<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var C=o.coords.cur.page,A={x:t.modifiedCoords.x-C.x,y:t.modifiedCoords.y-C.y};D.coords.x+=A.x,D.coords.y+=A.y,D.delta.x+=A.x,D.delta.y+=A.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,u=t.event,d=this.states;if(d&&d.length){for(var h=!1,D=0;D<d.length;D++){var C=d[D];t.state=C;var A=C.options,U=C.methods,M=U.beforeEnd&&U.beforeEnd(t);if(M)return this.endResult=M,!1;h=h||!h&&this.shouldDo(A,!0,t.phase,!0)}h&&o.move({event:u,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var u=k({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(u);for(var d=0,h=this.states;d<h.length;d++){var D=h[d];u.state=D,D.methods.stop&&D.methods.stop(u)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var u=t[o],d=u.options,h=u.methods,D=u.name;this.states.push({options:d,methods:h,index:o,name:D})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,u=o.coords,d=o.rect,h=o.modification;if(h.result){for(var D=h.startDelta,C=h.result,A=C.delta,U=C.rectDelta,M=0,te=[[u.start,D],[u.cur,A]];M<te.length;M++){var Ee=te[M],je=Ee[0],Le=Ee[1];je.page.x-=Le.x,je.page.y-=Le.y,je.client.x-=Le.x,je.client.y-=Le.y}d.left-=U.left,d.right-=U.right,d.top-=U.top,d.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,u,d){return!(!t||t.enabled===!1||d&&!t.endOnly||t.endOnly&&!o||u==="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=ba(k({},t.result.coords),k({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function ba(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ca(n,t){var o=n.defaults,u={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},d=function(h){var D=h||{};for(var C in D.enabled=D.enabled!==!1,o)C in D||(D[C]=o[C]);var A={options:D,methods:u,name:t,enable:function(){return D.enabled=!0,A},disable:function(){return D.enabled=!1,A}};return A};return t&&typeof t=="string"&&(d._defaults=o,d._methods=u),d}function ma(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,u=o.setAndApply(n);return t.edges=o.edges,u},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,u=o.beforeEnd(n);return t.edges=o.startEdges,u},"interactions:action-start":ma,"interactions:action-move":ma,"interactions:action-end":ma,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},Aa=Xa,Va={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ea=function(n){x(o,n);var t=K(o);function o(u,d,h,D,C,A,U){var M;c(this,o),(M=t.call(this,u)).relatedTarget=null,M.screenX=void 0,M.screenY=void 0,M.button=void 0,M.buttons=void 0,M.ctrlKey=void 0,M.shiftKey=void 0,M.altKey=void 0,M.metaKey=void 0,M.page=void 0,M.client=void 0,M.delta=void 0,M.rect=void 0,M.x0=void 0,M.y0=void 0,M.t0=void 0,M.dt=void 0,M.duration=void 0,M.clientX0=void 0,M.clientY0=void 0,M.velocity=void 0,M.speed=void 0,M.swipe=void 0,M.axes=void 0,M.preEnd=void 0,C=C||u.element;var te=u.interactable,Ee=(te&&te.options||Va).deltaSource,je=fe(te,C,h),Le=D==="start",qe=D==="end",it=Le?N(M):u.prevEvent,lt=Le?u.coords.start:qe?{page:it.page,client:it.client,timeStamp:u.coords.cur.timeStamp}:u.coords.cur;return M.page=k({},lt.page),M.client=k({},lt.client),M.rect=k({},u.rect),M.timeStamp=lt.timeStamp,qe||(M.page.x-=je.x,M.page.y-=je.y,M.client.x-=je.x,M.client.y-=je.y),M.ctrlKey=d.ctrlKey,M.altKey=d.altKey,M.shiftKey=d.shiftKey,M.metaKey=d.metaKey,M.button=d.button,M.buttons=d.buttons,M.target=C,M.currentTarget=C,M.preEnd=A,M.type=U||h+(D||""),M.interactable=te,M.t0=Le?u.pointers[u.pointers.length-1].downTime:it.t0,M.x0=u.coords.start.page.x-je.x,M.y0=u.coords.start.page.y-je.y,M.clientX0=u.coords.start.client.x-je.x,M.clientY0=u.coords.start.client.y-je.y,M.delta=Le||qe?{x:0,y:0}:{x:M[Ee].x-it[Ee].x,y:M[Ee].y-it[Ee].y},M.dt=u.coords.delta.timeStamp,M.duration=M.timeStamp-M.t0,M.velocity=k({},u.coords.velocity[Ee]),M.speed=dt(M.velocity.x,M.velocity.y),M.swipe=qe||D==="inertiastart"?M.getSwipe():null,M}return f(o,[{key:"getSwipe",value:function(){var u=this._interaction;if(u.prevEvent.speed<600||this.timeStamp-u.prevEvent.timeStamp>150)return null;var d=180*Math.atan2(u.prevEvent.velocityY,u.prevEvent.velocityX)/Math.PI;d<0&&(d+=360);var h=112.5<=d&&d<247.5,D=202.5<=d&&d<337.5;return{up:D,down:!D&&22.5<=d&&d<157.5,left:h,right:!h&&(292.5<=d||d<67.5),angle:d,speed:u.prevEvent.speed,velocity:{x:u.prevEvent.velocityX,y:u.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(Ve);Object.defineProperties(Ea.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var Ya=f(function n(t,o,u,d,h){c(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=u,this.downTime=d,this.downTarget=h}),Ga=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Oa=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Ja=0,Za=function(){function n(t){var o=this,u=t.pointerType,d=t.scopeFire;c(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ut(function(M){this.move(M)},"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=Ja++,this._scopeFire=d,this.pointerType=u;var h=this;this._proxy={};var D=function(M){Object.defineProperty(o._proxy,M,{get:function(){return h[M]}})};for(var C in Ga)D(C);var A=function(M){Object.defineProperty(o._proxy,M,{value:function(){return h[M].apply(h,arguments)}})};for(var U in Oa)A(U);this._scopeFire("interactions:new",{interaction:this})}return f(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,u){var d=this.updatePointer(t,o,u,!0),h=this.pointers[d];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:u,pointerIndex:d,pointerInfo:h,type:"down",interaction:this})}},{key:"start",value:function(t,o,u){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=u,this.rect=o.getRect(u),this.edges=this.prepared.edges?k({},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,u){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,u,!1);var d,h,D=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&&(d=this.coords.cur.client.x-this.coords.start.client.x,h=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(d,h)>this.pointerMoveTolerance);var C,A,U,M=this.getPointerIndex(t),te={pointer:t,pointerIndex:M,pointerInfo:this.pointers[M],event:o,type:"move",eventTarget:u,dx:d,dy:h,duplicate:D,interaction:this};D||(C=this.coords.velocity,A=this.coords.delta,U=Math.max(A.timeStamp/1e3,.001),C.page.x=A.page.x/U,C.page.y=A.page.y/U,C.client.x=A.client.x/U,C.client.y=A.client.y/U,C.timeStamp=U),this._scopeFire("interactions:move",te),D||this.simulation||(this.interacting()&&(te.type=null,this.move(te)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||ne(this.coords.delta),(t=k({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,u,d){var h=this.getPointerIndex(t);h===-1&&(h=this.updatePointer(t,o,u,!1));var D=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(D),{pointer:t,pointerIndex:h,pointerInfo:this.pointers[h],event:o,eventTarget:u,type:D,curEventTarget:d,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=oe(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:L(this.pointers,function(u){return u.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,u,d){var h,D,C,A=oe(t),U=this.getPointerIndex(t),M=this.pointers[U];return d=d!==!1&&(d||/(down|start)$/i.test(o.type)),M?M.pointer=t:(M=new Ya(A,t,o,null,null),U=this.pointers.length,this.pointers.push(M)),j(this.coords.cur,this.pointers.map(function(te){return te.pointer}),this._now()),h=this.coords.delta,D=this.coords.prev,C=this.coords.cur,h.page.x=C.page.x-D.page.x,h.page.y=C.page.y-D.page.y,h.client.x=C.client.x-D.client.x,h.client.y=C.client.y-D.client.y,h.timeStamp=C.timeStamp-D.timeStamp,d&&(this.pointerIsDown=!0,M.downTime=this.coords.cur.timeStamp,M.downTarget=u,I(this.downPointer,t),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,u),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:u,down:d,pointerInfo:M,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var u=this.getPointerIndex(t);if(u!==-1){var d=this.pointers[u];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:u,pointerInfo:d,interaction:this}),this.pointers.splice(u,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,u){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=u}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,u,d){return new Ea(this,t,this.prepared.name,o,this.element,u,d)}},{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,u=t.phase,d=t.preEnd,h=t.type,D=this.rect;if(D&&u==="move"&&(ae(this.edges,D,this.coords.delta[this.interactable.options.deltaSource]),D.width=D.right-D.left,D.height=D.bottom-D.top),this._scopeFire("interactions:before-action-".concat(u),t)===!1)return!1;var C=t.iEvent=this._createPreparedEvent(o,u,d,h);return this._scopeFire("interactions:action-".concat(u),t),u==="start"&&(this.prevEvent=C),this._fireEvent(C),this._scopeFire("interactions:after-action-".concat(u),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Ma(n){Ct(n.interaction)}function Ct(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return nt(n.coords.cur,t),nt(n.coords.delta,t),ae(n.edges,n.rect,t),t.x=0,t.y=0,!0}function aa(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function nt(n,t){var o=n.page,u=n.client,d=t.x,h=t.y;o.x+=d,o.y+=h,u.x+=d,u.y+=h}Oa.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=aa},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(nt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Ma,"interactions:before-action-move":Ma,"interactions:before-action-end":function(n){var t=n.interaction;if(Ct(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},St=qt,Dt=function(){function n(t){c(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return f(n,[{key:"start",value:function(t){var o=this.interaction,u=It(o);if(!u||!u.enabled)return!1;var d=o.coords.velocity.client,h=dt(d.x,d.y),D=this.modification||(this.modification=new _a(o));if(D.copyFrom(o.modification),this.t0=o._now(),this.allowResume=u.allowResume,this.v0=h,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=D.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&h>u.minSpeed&&h>u.endSpeed)this.startInertia();else{if(D.result=D.setAll(this.modifierArg),!D.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,u=It(this.interaction),d=u.resistance,h=-Math.log(u.endSpeed/this.v0)/d;this.targetOffset={x:(o.x-h)/d,y:(o.y-h)/d},this.te=h,this.lambda_v0=d/this.v0,this.one_ve_v0=1-u.endSpeed/this.v0;var D=this.modification,C=this.modifierArg;C.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},D.result=D.setAll(C),D.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+D.result.delta.x,y:this.targetOffset.y+D.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,u,d,h,D,C,A=this,U=this.interaction,M=It(U).resistance,te=(U._now()-this.t0)/1e3;if(te<this.te){var Ee,je=1-(Math.exp(-M*te)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,u=this.targetOffset.x,d=this.targetOffset.y,h=this.modifiedOffset.x,D=this.modifiedOffset.y,Ee={x:Lt(C=je,t,u,h),y:Lt(C,o,d,D)}):Ee={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var Le={x:Ee.x-this.currentOffset.x,y:Ee.y-this.currentOffset.y};this.currentOffset.x+=Le.x,this.currentOffset.y+=Le.y,U.offsetBy(Le),U.move(),this.onNextFrame(function(){return A.inertiaTick()})}else U.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,u=o._now()-this.t0,d=It(o).smoothEndDuration;if(u<d){var h={x:At(u,0,this.targetOffset.x,d),y:At(u,0,this.targetOffset.y,d)},D={x:h.x-this.currentOffset.x,y:h.y-this.currentOffset.y};this.currentOffset.x+=D.x,this.currentOffset.y+=D.y,o.offsetBy(D),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,u=t.event,d=t.eventTarget,h=this.interaction;h.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),h.updatePointer(o,u,d,!0),h._doPhase({interaction:h,event:u,phase:"resume"}),X(h.coords.prev,h.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)}}]),n}();function It(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Mt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(St),n.usePlugin(Aa),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Dt(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,u=t.inertia;if(u.active)for(var d=o;b.element(d);){if(d===t.element){u.resume(n);break}d=Qe(d)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":ma,"interactions:action-inertiastart":ma,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function Lt(n,t,o,u){var d=1-n;return d*d*t+2*d*n*o+n*n*u}function At(n,t,o,u){return-o*(n/=u)*(n-2)+t}var na=Mt;function Yt(n,t){for(var o=0;o<t.length;o++){var u=t[o];if(n.immediatePropagationStopped)break;u(n)}}var za=function(){function n(t){c(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=k({},t||{})}return f(n,[{key:"fire",value:function(t){var o,u=this.global;(o=this.types[t.type])&&Yt(t,o),!t.propagationStopped&&u&&(o=u[t.type])&&Yt(t,o)}},{key:"on",value:function(t,o){var u=Ce(t,o);for(t in u)this.types[t]=he(this.types[t]||[],u[t])}},{key:"off",value:function(t,o){var u=Ce(t,o);for(t in u){var d=this.types[t];if(d&&d.length)for(var h=0,D=u[t];h<D.length;h++){var C=D[h],A=d.indexOf(C);A!==-1&&d.splice(A,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Qa=function(){function n(t){c(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,I(this,t)}return f(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Ra(n){return b.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function en(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var An={id:"events",install:function(n){var t,o=[],u={},d=[],h={add:D,remove:C,addDelegate:function(M,te,Ee,je,Le){var qe=Ra(Le);if(!u[Ee]){u[Ee]=[];for(var it=0;it<d.length;it++){var lt=d[it];D(lt,Ee,A),D(lt,Ee,U,!0)}}var ht=u[Ee],Tt=Oe(ht,function(Vt){return Vt.selector===M&&Vt.context===te});Tt||(Tt={selector:M,context:te,listeners:[]},ht.push(Tt)),Tt.listeners.push({func:je,options:qe})},removeDelegate:function(M,te,Ee,je,Le){var qe,it=Ra(Le),lt=u[Ee],ht=!1;if(lt)for(qe=lt.length-1;qe>=0;qe--){var Tt=lt[qe];if(Tt.selector===M&&Tt.context===te){for(var Vt=Tt.listeners,xt=Vt.length-1;xt>=0;xt--){var Bt=Vt[xt];if(Bt.func===je&&en(Bt.options,it)){Vt.splice(xt,1),Vt.length||(lt.splice(qe,1),C(te,Ee,A),C(te,Ee,U,!0)),ht=!0;break}}if(ht)break}}},delegateListener:A,delegateUseCapture:U,delegatedEvents:u,documents:d,targets:o,supportsOptions:!1,supportsPassive:!1};function D(M,te,Ee,je){if(M.addEventListener){var Le=Ra(je),qe=Oe(o,function(it){return it.eventTarget===M});qe||(qe={eventTarget:M,events:{}},o.push(qe)),qe.events[te]||(qe.events[te]=[]),Oe(qe.events[te],function(it){return it.func===Ee&&en(it.options,Le)})||(M.addEventListener(te,Ee,h.supportsOptions?Le:Le.capture),qe.events[te].push({func:Ee,options:Le}))}}function C(M,te,Ee,je){if(M.addEventListener&&M.removeEventListener){var Le=L(o,function(ra){return ra.eventTarget===M}),qe=o[Le];if(qe&&qe.events)if(te!=="all"){var it=!1,lt=qe.events[te];if(lt){if(Ee==="all"){for(var ht=lt.length-1;ht>=0;ht--){var Tt=lt[ht];C(M,te,Tt.func,Tt.options)}return}for(var Vt=Ra(je),xt=0;xt<lt.length;xt++){var Bt=lt[xt];if(Bt.func===Ee&&en(Bt.options,Vt)){M.removeEventListener(te,Ee,h.supportsOptions?Vt:Vt.capture),lt.splice(xt,1),lt.length===0&&(delete qe.events[te],it=!0);break}}}it&&!Object.keys(qe.events).length&&o.splice(Le,1)}else for(te in qe.events)qe.events.hasOwnProperty(te)&&C(M,te,"all")}}function A(M,te){for(var Ee=Ra(te),je=new Qa(M),Le=u[M.type],qe=le(M)[0],it=qe;b.element(it);){for(var lt=0;lt<Le.length;lt++){var ht=Le[lt],Tt=ht.selector,Vt=ht.context;if(J(it,Tt)&&de(Vt,qe)&&de(Vt,it)){var xt=ht.listeners;je.currentTarget=it;for(var Bt=0;Bt<xt.length;Bt++){var ra=xt[Bt];en(ra.options,Ee)&&ra.func(je)}}}it=Qe(it)}}function U(M){return A(M,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return h.supportsOptions=!0},get passive(){return h.supportsPassive=!0}}),n.events=h,h}},dn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=dn.methodOrder;t<o.length;t++){var u=o[t],d=dn[u](n);if(d)return d}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,u=n.eventTarget,d=n.scope;if(!/down|start/i.test(o))return null;for(var h=0,D=d.interactions.list;h<D.length;h++){var C=D[h],A=u;if(C.simulation&&C.simulation.allowResume&&C.pointerType===t)for(;A;){if(A===C.element)return C;A=Qe(A)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,u=n.pointerType,d=n.eventType,h=n.scope;if(u!=="mouse"&&u!=="pen")return null;for(var D=0,C=h.interactions.list;D<C.length;D++){var A=C[D];if(A.pointerType===u){if(A.simulation&&!yn(A,o))continue;if(A.interacting())return A;t||(t=A)}}if(t)return t;for(var U=0,M=h.interactions.list;U<M.length;U++){var te=M[U];if(!(te.pointerType!==u||/down/i.test(d)&&te.simulation))return te}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,u=n.scope.interactions.list;o<u.length;o++){var d=u[o];if(yn(d,t))return d}return null},idle:function(n){for(var t=n.pointerType,o=0,u=n.scope.interactions.list;o<u.length;o++){var d=u[o];if(d.pointers.length===1){var h=d.interactable;if(h&&(!h.options.gesture||!h.options.gesture.enabled))continue}else if(d.pointers.length>=2)continue;if(!d.interacting()&&t===d.pointerType)return d}return null}};function yn(n,t){return n.pointers.some(function(o){return o.id===t})}var pn=dn,ha=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function tn(n,t){return function(o){var u=t.interactions.list,d=ve(o),h=le(o),D=h[0],C=h[1],A=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,M=o.changedTouches;U<M.length;U++){var te=M[U],Ee={pointer:te,pointerId:oe(te),pointerType:d,eventType:o.type,eventTarget:D,curEventTarget:C,scope:t},je=fn(Ee);A.push([Ee.pointer,Ee.eventTarget,Ee.curEventTarget,je])}}else{var Le=!1;if(!Q.supportsPointerEvent&&/mouse/.test(o.type)){for(var qe=0;qe<u.length&&!Le;qe++)Le=u[qe].pointerType!=="mouse"&&u[qe].pointerIsDown;Le=Le||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Le){var it={pointer:o,pointerId:oe(o),pointerType:d,eventType:o.type,curEventTarget:C,eventTarget:D,scope:t},lt=fn(it);A.push([it.pointer,it.eventTarget,it.curEventTarget,lt])}}for(var ht=0;ht<A.length;ht++){var Tt=A[ht],Vt=Tt[0],xt=Tt[1],Bt=Tt[2];Tt[3][n](Vt,o,xt,Bt)}}}function fn(n){var t=n.pointerType,o=n.scope,u={interaction:pn.search(n),searchDetails:n};return o.fire("interactions:find",u),u.interaction||o.interactions.new({pointerType:t})}function ua(n,t){var o=n.doc,u=n.scope,d=n.options,h=u.interactions.docEvents,D=u.events,C=D[t];for(var A in u.browser.isIOS&&!d.events&&(d.events={passive:!1}),D.delegatedEvents)C(o,A,D.delegateListener),C(o,A,D.delegateUseCapture,!0);for(var U=d&&d.events,M=0;M<h.length;M++){var te=h[M];C(o,te.type,te.listener,U)}}var Vn={id:"core/interactions",install:function(n){for(var t={},o=0;o<ha.length;o++){var u=ha[o];t[u]=tn(u,n)}var d,h=Q.pEventTypes;function D(){for(var C=0,A=n.interactions.list;C<A.length;C++){var U=A[C];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var M=function(){var je=Ee[te];n.documents.some(function(Le){return de(Le.doc,je.downTarget)})||U.removePointer(je.pointer,je.event)},te=0,Ee=U.pointers;te<Ee.length;te++)M()}}(d=z.PointerEvent?[{type:h.down,listener:D},{type:h.down,listener:t.pointerDown},{type:h.move,listener:t.pointerMove},{type:h.up,listener:t.pointerUp},{type:h.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:D},{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(C){for(var A=0,U=n.interactions.list;A<U.length;A++)U[A].documentBlur(C)}}),n.prevTouchTime=0,n.Interaction=function(C){x(U,C);var A=K(U);function U(){return c(this,U),A.apply(this,arguments)}return f(U,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(M){n.interactions.pointerMoveTolerance=M}},{key:"_now",value:function(){return n.now()}}]),U}(Za),n.interactions={list:[],new:function(C){C.scopeFire=function(U,M){return n.fire(U,M)};var A=new n.Interaction(C);return n.interactions.list.push(A),A},listeners:t,docEvents:d,pointerMoveTolerance:1},n.usePlugin(Na)},listeners:{"scope:add-document":function(n){return ua(n,"add")},"scope:remove-document":function(n){return ua(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,u=t.interactions.list.length-1;u>=0;u--){var d=t.interactions.list[u];d.interactable===o&&(d.stop(),t.fire("interactions:destroy",{interaction:d}),d.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(u,1))}}},onDocSignal:ua,doOnInteractions:tn,methodNames:ha},Pa=Vn,$a=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}($a||{}),hr=function(){function n(t,o,u,d){c(this,n),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||u,this._win=v(Z(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=d,this.set(o)}return f(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return b.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),b.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),b.func(o.onend)&&this.on("".concat(t,"end"),o.onend),b.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,u){var d,h=this,D=(d=this._actions.map[t])==null?void 0:d.filterEventType,C=function(A){return(D==null||D(A))&&ya(A,h._actions)};(b.array(o)||b.object(o))&&this._onOff($a.Off,t,o,void 0,C),(b.array(u)||b.object(u))&&this._onOff($a.On,t,u,void 0,C)}},{key:"setPerAction",value:function(t,o){var u=this._defaults;for(var d in o){var h=d,D=this.options[t],C=o[h];h==="listeners"&&this.updatePerActionListeners(t,D.listeners,C),b.array(C)?D[h]=Be(C):b.plainObject(C)?(D[h]=k(D[h]||{},fa(C)),b.object(u.perAction[h])&&"enabled"in u.perAction[h]&&(D[h].enabled=C.enabled!==!1)):b.bool(C)&&b.object(u.perAction[h])?D[h].enabled=C:D[h]=C}}},{key:"getRect",value:function(t){return t=t||(b.element(this.target)?this.target:null),b.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ke(t)}},{key:"rectChecker",value:function(t){var o=this;return b.func(t)?(this.getRect=function(u){var d=k({},t.apply(o,u));return"width"in d||(d.width=d.right-d.left,d.height=d.bottom-d.top),d},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(Z(o)||b.object(o)){for(var u in this.options[t]=o,this._actions.map)this.options[u][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return b.string(t)?Array.from(this._context.querySelectorAll(t)):b.func(t)&&t.getAllElements?t.getAllElements():b.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||de(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,u){return!this.testIgnore(t.ignoreFrom,o,u)&&this.testAllow(t.allowFrom,o,u)}},{key:"testAllow",value:function(t,o,u){return!t||!!b.element(u)&&(b.string(t)?ce(u,t,o):!!b.element(t)&&de(t,u))}},{key:"testIgnore",value:function(t,o,u){return!(!t||!b.element(u))&&(b.string(t)?ce(u,t,o):!!b.element(t)&&de(t,u))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,u,d,h){b.object(o)&&!b.array(o)&&(d=u,u=null);var D=Ce(o,u,h);for(var C in D){C==="wheel"&&(C=Q.wheelEvent);for(var A=0,U=D[C];A<U.length;A++){var M=U[A];ya(C,this._actions)?this.events[t===$a.On?"on":"off"](C,M):b.string(this.target)?this._scopeEvents[t===$a.On?"addDelegate":"removeDelegate"](this.target,this._context,C,M,d):this._scopeEvents[t===$a.On?"add":"remove"](this.target,C,M,d)}}return this}},{key:"on",value:function(t,o,u){return this._onOff($a.On,t,o,u)}},{key:"off",value:function(t,o,u){return this._onOff($a.Off,t,o,u)}},{key:"set",value:function(t){var o=this._defaults;for(var u in b.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var d=u,h=this._actions.methodDict[d];this.options[d]={},this.setPerAction(d,k(k({},o.perAction),o.actions[d])),this[h](t[d])}for(var D in t)D!=="getRect"?b.func(this[D])&&this[D](t[D]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(b.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],u=o.length-1;u>=0;u--){var d=o[u],h=d.selector,D=d.context,C=d.listeners;h===this.target&&D===this._context&&o.splice(u,1);for(var A=C.length-1;A>=0;A--)this._scopeEvents.removeDelegate(this.target,this._context,t,C[A][0],C[A][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),vr=function(){function n(t){var o=this;c(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(u){var d=u.interactable,h=d.target,D=b.string(h)?o.selectorMap[h]:h[o.scope.id],C=L(D,function(A){return A===d});D.splice(C,1)}})}return f(n,[{key:"new",value:function(t,o){o=k(o||{},{actions:this.scope.actions});var u=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(u._doc),this.list.push(u),b.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(u)):(u.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(u)),this.scope.fire("interactable:new",{target:t,options:o,interactable:u,win:this.scope._win}),u}},{key:"getExisting",value:function(t,o){var u=o&&o.context||this.scope.document,d=b.string(t),h=d?this.selectorMap[t]:t[this.scope.id];if(h)return Oe(h,function(D){return D._context===u&&(d||D.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var u=0,d=this.list;u<d.length;u++){var h=d[u],D=void 0;if((b.string(h.target)?b.element(t)&&J(t,h.target):t===h.target)&&h.inContext(t)&&(D=o(h)),D!==void 0)return D}}}]),n}(),mr=function(){function n(){var t=this;c(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=Q,this.defaults=fa(Va),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(u){var d=function h(D,C){var A=u.interactables.getExisting(D,C);return A||((A=u.interactables.new(D,C)).events.global=h.globalEvents),A};return d.getPointerAverage=Y,d.getTouchBBox=_e,d.getTouchDistance=me,d.getTouchAngle=q,d.getElementRect=Ke,d.getElementClientRect=be,d.matchesSelector=J,d.closest=ze,d.globalEvents={},d.version="1.10.27",d.scope=u,d.use=function(h,D){return this.scope.usePlugin(h,D),this},d.isSet=function(h,D){return!!this.scope.interactables.get(h,D&&D.context)},d.on=ut(function(h,D,C){if(b.string(h)&&h.search(" ")!==-1&&(h=h.trim().split(/ +/)),b.array(h)){for(var A=0,U=h;A<U.length;A++){var M=U[A];this.on(M,D,C)}return this}if(b.object(h)){for(var te in h)this.on(te,h[te],D);return this}return ya(h,this.scope.actions)?this.globalEvents[h]?this.globalEvents[h].push(D):this.globalEvents[h]=[D]:this.scope.events.add(this.scope.document,h,D,{options:C}),this},"The interact.on() method is being deprecated"),d.off=ut(function(h,D,C){if(b.string(h)&&h.search(" ")!==-1&&(h=h.trim().split(/ +/)),b.array(h)){for(var A=0,U=h;A<U.length;A++){var M=U[A];this.off(M,D,C)}return this}if(b.object(h)){for(var te in h)this.off(te,h[te],D);return this}var Ee;return ya(h,this.scope.actions)?h in this.globalEvents&&(Ee=this.globalEvents[h].indexOf(D))!==-1&&this.globalEvents[h].splice(Ee,1):this.scope.events.remove(this.scope.document,h,D,C),this},"The interact.off() method is being deprecated"),d.debug=function(){return this.scope},d.supportsTouch=function(){return Q.supportsTouch},d.supportsPointerEvent=function(){return Q.supportsPointerEvent},d.stop=function(){for(var h=0,D=this.scope.interactions.list;h<D.length;h++)D[h].stop();return this},d.pointerMoveTolerance=function(h){return b.number(h)?(this.scope.interactions.pointerMoveTolerance=h,this):this.scope.interactions.pointerMoveTolerance},d.addDocument=function(h,D){this.scope.addDocument(h,D)},d.removeDocument=function(h){this.scope.removeDocument(h)},d}(this),this.InteractEvent=Ea,this.Interactable=void 0,this.interactables=new vr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(u){return t.removeDocument(u.target)};var o=this;this.Interactable=function(u){x(h,u);var d=K(h);function h(){return c(this,h),d.apply(this,arguments)}return f(h,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(D){return $(_(h.prototype),"set",this).call(this,D),o.fire("interactable:set",{options:D,interactable:this}),this}},{key:"unset",value:function(){$(_(h.prototype),"unset",this).call(this);var D=o.interactables.list.indexOf(this);D<0||(o.interactables.list.splice(D,1),o.fire("interactable:unset",{interactable:this}))}}]),h}(hr)}return f(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var u=0,d=this.listenerMaps;u<d.length;u++){var h=d[u].map[t];if(h&&h(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,u){return o.isInitialized=!0,b.window(u)&&m(u),z.init(u),Q.init(u),ye.init(u),o.window=u,o.document=u.document,o.usePlugin(Pa),o.usePlugin(An),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 u=0,d=this.listenerMaps.length,h=t.before.reduce(function(C,A){return C[A]=!0,C[Do(A)]=!0,C},{});u<d;u++){var D=this.listenerMaps[u].id;if(D&&(h[D]||h[Do(D)]))break}this.listenerMaps.splice(u,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 u=v(t);o=o?k({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(u,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:u,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),u=v(t),d=this.documents[o].options;this.events.remove(u,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:u,scope:this,options:d})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function Do(n){return n&&n.replace(/\/.*$/,"")}var _o=new mr,la=_o.interactStatic,gr=typeof globalThis<"u"?globalThis:window;_o.init(gr);var yr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(u){var d=u[0],h=u[1];return d in n||h in n}),o=function(u,d){for(var h=n.range,D=n.limits,C=D===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:D,A=n.offset,U=A===void 0?{x:0,y:0}:A,M={range:h,grid:n,x:null,y:null},te=0;te<t.length;te++){var Ee=t[te],je=Ee[0],Le=Ee[1],qe=Math.round((u-U.x)/n[je]),it=Math.round((d-U.y)/n[Le]);M[je]=Math.max(C.left,Math.min(C.right,qe*n[je]+U.x)),M[Le]=Math.max(C.top,Math.min(C.bottom,it*n[Le]+U.y))}return M};return o.grid=n,o.coordFields=t,o}}),br={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=k(t.snappers||{},yr),t.createSnapGrid=t.snappers.grid}},kr=br,xr={start:function(n){var t=n.state,o=n.rect,u=n.edges,d=n.pageCoords,h=t.options,D=h.ratio,C=h.enabled,A=t.options,U=A.equalDelta,M=A.modifiers;D==="preserve"&&(D=o.width/o.height),t.startCoords=k({},d),t.startRect=k({},o),t.ratio=D,t.equalDelta=U;var te=t.linkedEdges={top:u.top||u.left&&!u.bottom,left:u.left||u.top&&!u.right,bottom:u.bottom||u.right&&!u.top,right:u.right||u.bottom&&!u.left};if(t.xIsPrimaryAxis=!(!u.left&&!u.right),t.equalDelta){var Ee=(te.left?1:-1)*(te.top?1:-1);t.edgeSign={x:Ee,y:Ee}}else t.edgeSign={x:te.left?-1:1,y:te.top?-1:1};if(C!==!1&&k(u,te),M!=null&&M.length){var je=new _a(n.interaction);je.copyFrom(n.interaction.modification),je.prepareStates(M),t.subModification=je,je.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,u=n.coords,d=t.linkedEdges,h=k({},u),D=t.equalDelta?wr:Dr;if(k(n.edges,d),D(t,t.xIsPrimaryAxis,u,o),!t.subModification)return null;var C=k({},o);ae(d,C,{x:u.x-h.x,y:u.y-h.y});var A=t.subModification.setAll(l(l({},n),{},{rect:C,edges:d,pageCoords:u,prevCoords:u,prevRect:C})),U=A.delta;return A.changed&&(D(t,Math.abs(U.x)>Math.abs(U.y),A.coords,A.rect),k(u,A.coords)),A.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function wr(n,t,o){var u=n.startCoords,d=n.edgeSign;t?o.y=u.y+(o.x-u.x)*d.y:o.x=u.x+(o.y-u.y)*d.x}function Dr(n,t,o,u){var d=n.startRect,h=n.startCoords,D=n.ratio,C=n.edgeSign;if(t){var A=u.width/D;o.y=h.y+(A-d.height)*C.y}else{var U=u.height*D;o.x=h.x+(U-d.width)*C.x}}var _r=ca(xr,"aspectRatio"),Eo=function(){};Eo._defaults={};var On=Eo;function an(n,t,o){return b.func(n)?Ie(n,t.interactable,t.element,[o.x,o.y,t]):Ie(n,t.interactable,t.element)}var Mn={start:function(n){var t=n.rect,o=n.startOffset,u=n.state,d=n.interaction,h=n.pageCoords,D=u.options,C=D.elementRect,A=k({left:0,top:0,right:0,bottom:0},D.offset||{});if(t&&C){var U=an(D.restriction,d,h);if(U){var M=U.right-U.left-t.width,te=U.bottom-U.top-t.height;M<0&&(A.left+=M,A.right+=M),te<0&&(A.top+=te,A.bottom+=te)}A.left+=o.left-t.width*C.left,A.top+=o.top-t.height*C.top,A.right+=o.right-t.width*(1-C.right),A.bottom+=o.bottom-t.height*(1-C.bottom)}u.offset=A},set:function(n){var t=n.coords,o=n.interaction,u=n.state,d=u.options,h=u.offset,D=an(d.restriction,o,t);if(D){var C=function(A){return!A||"left"in A&&"top"in A||((A=k({},A)).left=A.x||0,A.top=A.y||0,A.right=A.right||A.left+A.width,A.bottom=A.bottom||A.top+A.height),A}(D);t.x=Math.max(Math.min(C.right-h.right,t.x),C.left+h.left),t.y=Math.max(Math.min(C.bottom-h.bottom,t.y),C.top+h.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Er=ca(Mn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},So={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function To(n,t){for(var o=0,u=["top","left","bottom","right"];o<u.length;o++){var d=u[o];d in n||(n[d]=t[d])}return n}var bn={noInner:Co,noOuter:So,start:function(n){var t,o=n.interaction,u=n.startOffset,d=n.state,h=d.options;h&&(t=ue(an(h.offset,o,o.coords.start.page))),t=t||{x:0,y:0},d.offset={top:t.y+u.top,left:t.x+u.left,bottom:t.y-u.bottom,right:t.x-u.right}},set:function(n){var t=n.coords,o=n.edges,u=n.interaction,d=n.state,h=d.offset,D=d.options;if(o){var C=k({},t),A=an(D.inner,u,C)||{},U=an(D.outer,u,C)||{};To(A,Co),To(U,So),o.top?t.y=Math.min(Math.max(U.top+h.top,C.y),A.top+h.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+h.bottom,C.y),A.bottom+h.bottom)),o.left?t.x=Math.min(Math.max(U.left+h.left,C.x),A.left+h.left):o.right&&(t.x=Math.max(Math.min(U.right+h.right,C.x),A.right+h.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Cr=ca(bn,"restrictEdges"),Sr=k({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Mn.defaults),Tr=ca({start:Mn.start,set:Mn.set,defaults:Sr},"restrictRect"),Br={width:-1/0,height:-1/0},Ir={width:1/0,height:1/0},Nr=ca({start:function(n){return bn.start(n)},set:function(n){var t=n.interaction,o=n.state,u=n.rect,d=n.edges,h=o.options;if(d){var D=se(an(h.min,t,n.coords))||Br,C=se(an(h.max,t,n.coords))||Ir;o.options={endOnly:h.endOnly,inner:k({},bn.noInner),outer:k({},bn.noOuter)},d.top?(o.options.inner.top=u.bottom-D.height,o.options.outer.top=u.bottom-C.height):d.bottom&&(o.options.inner.bottom=u.top+D.height,o.options.outer.bottom=u.top+C.height),d.left?(o.options.inner.left=u.right-D.width,o.options.outer.left=u.right-C.width):d.right&&(o.options.inner.right=u.left+D.width,o.options.outer.right=u.left+C.width),bn.set(n),o.options=h}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Qn={start:function(n){var t,o=n.interaction,u=n.interactable,d=n.element,h=n.rect,D=n.state,C=n.startOffset,A=D.options,U=A.offsetWithOrigin?function(Ee){var je=Ee.interaction.element,Le=ue(Ie(Ee.state.options.origin,null,null,[je])),qe=Le||fe(Ee.interactable,je,Ee.interaction.prepared.name);return qe}(n):{x:0,y:0};if(A.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var M=Ie(A.offset,u,d,[o]);(t=ue(M)||{x:0,y:0}).x+=U.x,t.y+=U.y}var te=A.relativePoints;D.offsets=h&&te&&te.length?te.map(function(Ee,je){return{index:je,relativePoint:Ee,x:C.left-h.width*Ee.x+t.x,y:C.top-h.height*Ee.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,u=n.state,d=u.options,h=u.offsets,D=fe(t.interactable,t.element,t.prepared.name),C=k({},o),A=[];d.offsetWithOrigin||(C.x-=D.x,C.y-=D.y);for(var U=0,M=h;U<M.length;U++)for(var te=M[U],Ee=C.x-te.x,je=C.y-te.y,Le=0,qe=d.targets.length;Le<qe;Le++){var it=d.targets[Le],lt=void 0;(lt=b.func(it)?it(Ee,je,t._proxy,te,Le):it)&&A.push({x:(b.number(lt.x)?lt.x:Ee)+te.x,y:(b.number(lt.y)?lt.y:je)+te.y,range:b.number(lt.range)?lt.range:d.range,source:it,index:Le,offset:te})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Tt=0;Tt<A.length;Tt++){var Vt=A[Tt],xt=Vt.range,Bt=Vt.x-C.x,ra=Vt.y-C.y,Wt=dt(Bt,ra),da=Wt<=xt;xt===1/0&&ht.inRange&&ht.range!==1/0&&(da=!1),ht.target&&!(da?ht.inRange&&xt!==1/0?Wt/xt<ht.distance/ht.range:xt===1/0&&ht.range!==1/0||Wt<ht.distance:!ht.inRange&&Wt<ht.distance)||(ht.target=Vt,ht.distance=Wt,ht.range=xt,ht.inRange=da,ht.delta.x=Bt,ht.delta.y=ra)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),u.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ar=ca(Qn,"snap"),zn={start:function(n){var t=n.state,o=n.edges,u=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:u.offset||"self",origin:{x:0,y:0},range:u.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Qn.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,u=n.coords,d=o.options,h=o.offsets,D={x:u.x-h[0].x,y:u.y-h[0].y};o.options=k({},d),o.options.targets=[];for(var C=0,A=d.targets||[];C<A.length;C++){var U=A[C],M=void 0;if(M=b.func(U)?U(D.x,D.y,t):U){for(var te=0,Ee=o.targetFields;te<Ee.length;te++){var je=Ee[te],Le=je[0],qe=je[1];if(Le in M||qe in M){M.x=M[Le],M.y=M[qe];break}}o.options.targets.push(M)}}var it=Qn.set(n);return o.options=d,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Vr=ca(zn,"snapSize"),eo={aspectRatio:_r,restrictEdges:Cr,restrict:Er,restrictRect:Tr,restrictSize:Nr,snapEdges:ca({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],zn.start(n)):null},set:zn.set,defaults:k(fa(zn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ar,snapSize:Vr,spring:On,avoid:On,transform:On,rubberband:On},Or={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Aa),n.usePlugin(kr),t.modifiers=eo,eo){var u=eo[o],d=u._defaults,h=u._methods;d._methods=h,n.defaults.perAction[o]=d}}},Mr=Or,Bo=function(n){x(o,n);var t=K(o);function o(u,d,h,D,C,A){var U;if(c(this,o),I(N(U=t.call(this,C)),h),h!==d&&I(N(U),d),U.timeStamp=A,U.originalEvent=h,U.type=u,U.pointerId=oe(d),U.pointerType=ve(d),U.target=D,U.currentTarget=null,u==="tap"){var M=C.getPointerIndex(d);U.dt=U.timeStamp-C.pointers[M].downTime;var te=U.timeStamp-C.tapTime;U.double=!!C.prevTap&&C.prevTap.type!=="doubletap"&&C.prevTap.target===U.target&&te<500}else u==="doubletap"&&(U.dt=d.timeStamp-C.tapTime,U.double=!0);return U}return f(o,[{key:"_subtractOrigin",value:function(u){var d=u.x,h=u.y;return this.pageX-=d,this.pageY-=h,this.clientX-=d,this.clientY-=h,this}},{key:"_addOrigin",value:function(u){var d=u.x,h=u.y;return this.pageX+=d,this.pageY+=h,this.clientX+=d,this.clientY+=h,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(Ve),kn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=kn,n.defaults.actions.pointerEvents=kn.defaults,k(n.actions.phaselessTypes,kn.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&to(n),La({interaction:o,pointer:u,event:d,eventTarget:h,type:"move"},t))},"interactions:down":function(n,t){(function(o,u){for(var d=o.interaction,h=o.pointer,D=o.event,C=o.eventTarget,A=o.pointerIndex,U=d.pointers[A].hold,M=G(C),te={interaction:d,pointer:h,event:D,eventTarget:C,type:"hold",targets:[],path:M,node:null},Ee=0;Ee<M.length;Ee++){var je=M[Ee];te.node=je,u.fire("pointerEvents:collect-targets",te)}if(te.targets.length){for(var Le=1/0,qe=0,it=te.targets;qe<it.length;qe++){var lt=it[qe].eventable.options.holdDuration;lt<Le&&(Le=lt)}U.duration=Le,U.timeout=setTimeout(function(){La({interaction:d,eventTarget:C,pointer:h,event:D,type:"hold"},u)},Le)}})(n,t),La(n,t)},"interactions:up":function(n,t){to(n),La(n,t),function(o,u){var d=o.interaction,h=o.pointer,D=o.event,C=o.eventTarget;d.pointerWasMoved||La({interaction:d,eventTarget:C,pointer:h,event:D,type:"tap"},u)}(n,t)},"interactions:cancel":function(n,t){to(n),La(n,t)}},PointerEvent:Bo,fire:La,collectEventTargets:Io,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 La(n,t){var o=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget,D=n.type,C=n.targets,A=C===void 0?Io(n,t):C,U=new Bo(D,u,d,h,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var M={interaction:o,pointer:u,event:d,eventTarget:h,targets:A,type:D,pointerEvent:U},te=0;te<A.length;te++){var Ee=A[te];for(var je in Ee.props||{})U[je]=Ee.props[je];var Le=fe(Ee.eventable,Ee.node);if(U._subtractOrigin(Le),U.eventable=Ee.eventable,U.currentTarget=Ee.node,Ee.eventable.fire(U),U._addOrigin(Le),U.immediatePropagationStopped||U.propagationStopped&&te+1<A.length&&A[te+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",M),D==="tap"){var qe=U.double?La({interaction:o,pointer:u,event:d,eventTarget:h,type:"doubletap"},t):U;o.prevTap=qe,o.tapTime=qe.timeStamp}return U}function Io(n,t){var o=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget,D=n.type,C=o.getPointerIndex(u),A=o.pointers[C];if(D==="tap"&&(o.pointerWasMoved||!A||A.downTarget!==h))return[];for(var U=G(h),M={interaction:o,pointer:u,event:d,eventTarget:h,type:D,path:U,targets:[],node:null},te=0;te<U.length;te++){var Ee=U[te];M.node=Ee,t.fire("pointerEvents:collect-targets",M)}return D==="hold"&&(M.targets=M.targets.filter(function(je){var Le,qe;return je.eventable.options.holdDuration===((Le=o.pointers[C])==null||(qe=Le.hold)==null?void 0:qe.duration)})),M.targets}function to(n){var t=n.interaction,o=n.pointerIndex,u=t.pointers[o].hold;u&&u.timeout&&(clearTimeout(u.timeout),u.timeout=null)}var zr=Object.freeze({__proto__:null,default:kn});function Rr(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Pr={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(kn);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Rr,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,u=n.pointerEvent,d=n.eventTarget,h=n.targets;if(u.type==="hold"&&h.length){var D=h[0].eventable.options.holdRepeatInterval;D<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:d,type:"hold",pointer:u,event:u},t)},D))}}})},$r=Pr,Lr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(u){return k(this.events.options,u),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(u,d){var h=o.call(this,u,d);return h===this&&(this.events.options[u]=d),h}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,u=n.node,d=n.type,h=n.eventTarget;t.interactables.forEachMatch(u,function(D){var C=D.events,A=C.options;C.types[d]&&C.types[d].length&&D.testIgnoreAllow(A,u,h)&&o.push({node:u,eventable:C,props:{interactable:D}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,u=n.options;k(o.events.options,t.pointerEvents.defaults),k(o.events.options,u.pointerEvents||{})}}},Fr=Lr,jr={id:"pointer-events",install:function(n){n.usePlugin(zr),n.usePlugin($r),n.usePlugin(Fr)}},Ur=jr,Kr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(u,d,h){for(var D=u.getAllElements(),C=h.window.Promise,A=C?[]:null,U=function(){var te=D[M],Ee=u.getRect(te);if(!Ee)return 1;var je,Le=Oe(h.interactions.list,function(lt){return lt.interacting()&&lt.interactable===u&&lt.element===te&&lt.prepared.name===d.name});if(Le)Le.move(),A&&(je=Le._reflowPromise||new C(function(lt){Le._reflowResolve=lt}));else{var qe=se(Ee),it=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:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:h.now()});je=function(lt,ht,Tt,Vt,xt){var Bt=lt.interactions.new({pointerType:"reflow"}),ra={interaction:Bt,event:xt,pointer:xt,eventTarget:Tt,phase:"reflow"};Bt.interactable=ht,Bt.element=Tt,Bt.prevEvent=xt,Bt.updatePointer(xt,xt,Tt,!0),ne(Bt.coords.delta),ft(Bt.prepared,Vt),Bt._doPhase(ra);var Wt=lt.window,da=Wt.Promise,ga=da?new da(function(Ca){Bt._reflowResolve=Ca}):void 0;return Bt._reflowPromise=ga,Bt.start(Vt,ht,Tt),Bt._interacting?(Bt.move(ra),Bt.end(xt)):(Bt.stop(),Bt._reflowResolve()),Bt.removePointer(xt,xt),ga}(h,u,te,d,it)}A&&A.push(je)},M=0;M<D.length&&!U();M++);return A&&C.all(A).then(function(){return u})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(u,d){u.splice(u.indexOf(d),1)}(t.interactions.list,o))}}},Wr=Kr;if(la.use(Na),la.use(St),la.use(Ur),la.use(na),la.use(Mr),la.use(Wa),la.use(Se),la.use(_t),la.use(Wr),la.default=la,s(a)==="object"&&a)try{a.exports=la}catch{}return la.default=la,la})}(Dn,Dn.exports)),Dn.exports}var qp=Hp();const tl=Me.getDefaultExportFromCjs(qp),Yn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:r,emit:i}){const l=a,s=i,c=e.inject(Gl),y=e.inject(Jl);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const f=e.shallowRef(null),p=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,E=NaN,N=NaN,K=NaN,$=NaN,ee=-1,F=-1,P=-1,R=-1,m=l.x,v=l.y,g=l.w,S=l.h;const b=e.ref(),ie=e.reactive({i:e.toRef(l,"i"),state:p,wrapper:b,calcXY:Ie});function Te(B){Ce(B)}function Ze(){Ge()}function ke(B){pa(l.isDraggable)&&(p.draggable=B)}function Pe(B){pa(l.isResizable)&&(p.resizable=B)}function Ne(B){pa(l.isBounded)&&(p.bounded=B)}function z(B){p.transformScale=B}function re(B){p.rowHeight=B}function Q(B){p.maxRows=B}function de(){p.rtl=Qo()==="rtl",Ge()}function ze(B){p.cols=Math.floor(B)}c.increaseItem(ie),e.onBeforeMount(()=>{p.rtl=Qo()==="rtl"}),e.onMounted(()=>{c.responsive&&c.lastBreakpoint?p.cols=ar(c.lastBreakpoint,c.cols):p.cols=c.colNum,p.rowHeight=c.rowHeight,p.containerWidth=c.width!==null?c.width:100,p.margin=c.margin!==void 0?c.margin.map(Number):[10,10],p.maxRows=c.maxRows,pa(l.isDraggable)?p.draggable=c.isDraggable:p.draggable=l.isDraggable,pa(l.isResizable)?p.resizable=c.isResizable:p.resizable=l.isResizable,pa(l.isBounded)?p.bounded=c.isBounded:p.bounded=l.isBounded,p.transformScale=c.transformScale,p.useCssTransforms=c.useCssTransforms,p.useStyleCursor=c.useStyleCursor,e.watchEffect(()=>{m=l.x,v=l.y,S=l.h,g=l.w,ia(Ke)}),y.on("updateWidth",Te),y.on("compact",Ze),y.on("setDraggable",ke),y.on("setResizable",Pe),y.on("setBounded",Ne),y.on("setTransformScale",z),y.on("setRowHeight",re),y.on("setMaxRows",Q),y.on("directionchange",de),y.on("setColNum",ze)}),e.onBeforeUnmount(()=>{y.off("updateWidth",Te),y.off("compact",Ze),y.off("setDraggable",ke),y.off("setResizable",Pe),y.off("setBounded",Ne),y.off("setTransformScale",z),y.off("setRowHeight",re),y.off("setMaxRows",Q),y.off("directionchange",de),y.off("setColNum",ze),f.value&&(f.value.unset(),f.value=null),c.decreaseItem(ie)}),r({state:p,wrapper:b});const Qe=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,J=e.computed(()=>p.resizable&&!l.static),O=e.computed(()=>c.isMirrored?!p.rtl:p.rtl),W=e.computed(()=>(p.draggable||p.resizable)&&!l.static),ce=Pp("item"),xe=e.computed(()=>({[ce.b()]:!0,[ce.bm("resizable")]:J.value,[ce.bm("static")]:l.static,[ce.bm("resizing")]:p.isResizing,[ce.bm("dragging")]:p.isDragging,[ce.bm("transform")]:p.useCssTransforms,[ce.bm("rtl")]:O.value,[ce.bm("no-touch")]:Qe&&W.value})),be=e.computed(()=>[ce.be("resizer"),O.value&&ce.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,B=>{p.draggable=B}),e.watch(()=>l.static,()=>{ia(I),ia(ne)}),e.watch(()=>p.draggable,()=>{ia(I)}),e.watch(()=>l.isResizable,B=>{p.resizable=B}),e.watch(()=>l.isBounded,B=>{p.bounded=B}),e.watch(()=>p.resizable,()=>{ia(ne)}),e.watch(()=>p.rowHeight,()=>{ia(Ke),ia(G)}),e.watch([()=>p.cols,()=>p.containerWidth],()=>{ia(ne),ia(Ke),ia(G)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{ia(ne)}),e.watch(O,()=>{ia(ne),ia(Ke)}),e.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const B=c.margin;!B||B[0]===p.margin[0]&&B[1]===p.margin[1]||(p.margin=B.map(Number),ia(Ke),ia(G))});function Ke(){l.x+l.w>p.cols?(m=0,g=l.w>p.cols?p.cols:l.w):(m=l.x,g=l.w);const B=we(m,v,g,S);p.isDragging&&(B.top=p.dragging.top,O.value?B.right=p.dragging.left:B.left=p.dragging.left),p.isResizing&&(B.width=p.resizing.width,B.height=p.resizing.height);let pe;p.useCssTransforms?O.value?pe=Op(B.top,B.right,B.width,B.height):pe=Vp(B.top,B.left,B.width,B.height):O.value?pe=zp(B.top,B.right,B.width,B.height):pe=Mp(B.top,B.left,B.width,B.height),p.style=pe}function G(){const B={};for(const pe of["width","height"]){const Re=p.style[pe].match(/^(\d+)px$/);if(!Re)return;B[pe]=Re[1]}s("container-resized",l.i,l.h,l.w,B.height,B.width)}function Z(B){if(l.static)return;const pe=B.type;if(pe==="resizestart"&&p.isResizing||pe!=="resizestart"&&!p.isResizing)return;const Re=Jo(B);if(pa(Re))return;const{x:oe,y:j}=Re,H={width:0,height:0};let Y;switch(pe){case"resizestart":{ne(),ee=g,F=S,Y=we(m,v,g,S),H.width=Y.width,H.height=Y.height,p.resizing=H,p.isResizing=!0;break}case"resizemove":{!B.edges.right&&!B.edges.left&&(K=oe),!B.edges.top&&!B.edges.bottom&&($=j);const _e=Zo(K,$,oe,j);O.value?H.width=p.resizing.width-_e.deltaX/p.transformScale:H.width=p.resizing.width+_e.deltaX/p.transformScale,H.height=p.resizing.height+_e.deltaY/p.transformScale,p.resizing=H;break}case"resizeend":{Y=we(m,v,g,S),H.width=Y.width,H.height=Y.height,p.resizing={width:-1,height:-1},p.isResizing=!1;break}}Y=fe(H.height,H.width),Y.w<l.minW&&(Y.w=l.minW),Y.w>l.maxW&&(Y.w=l.maxW),Y.h<l.minH&&(Y.h=l.minH),Y.h>l.maxH&&(Y.h=l.maxH),Y.h<1&&(Y.h=1),Y.w<1&&(Y.w=1),K=oe,$=j,(g!==Y.w||S!==Y.h)&&s("resize",l.i,Y.h,Y.w,H.height,H.width),B.type==="resizeend"&&(ee!==g||F!==S)&&s("resized",l.i,Y.h,Y.w,H.height,H.width),y.emit("resizeEvent",B.type,l.i,m,v,Y.h,Y.w)}function k(B){if(l.static||p.isResizing)return;const pe=B.type;if(pe==="dragstart"&&p.isDragging||pe!=="dragstart"&&!p.isDragging)return;const Re=Jo(B);if(pa(Re))return;const{x:oe,y:j}=Re,H=B.target;if(!H.offsetParent)return;const Y={top:0,left:0};switch(pe){case"dragstart":{P=m,R=v;const me=H.offsetParent.getBoundingClientRect(),q=H.getBoundingClientRect(),ve=q.left/p.transformScale,le=me.left/p.transformScale,Ve=q.right/p.transformScale,he=me.right/p.transformScale,Be=q.top/p.transformScale,L=me.top/p.transformScale;O.value?Y.left=(Ve-he)*-1:Y.left=ve-le,Y.top=Be-L,p.dragging=Y,p.isDragging=!0;break}case"dragmove":{const me=Zo(E,N,oe,j);if(O.value?Y.left=p.dragging.left-me.deltaX/p.transformScale:Y.left=p.dragging.left+me.deltaX/p.transformScale,Y.top=p.dragging.top+me.deltaY/p.transformScale,p.bounded){const q=H.offsetParent.clientHeight-se(l.h,p.rowHeight,p.margin[1]);Y.top=ae(Y.top,0,q);const ve=ue(),le=p.containerWidth-se(l.w,ve,p.margin[0]);Y.left=ae(Y.left,0,le)}p.dragging=Y;break}case"dragend":{const me=H.offsetParent.getBoundingClientRect(),q=H.getBoundingClientRect(),ve=q.left/p.transformScale,le=me.left/p.transformScale,Ve=q.right/p.transformScale,he=me.right/p.transformScale,Be=q.top/p.transformScale,L=me.top/p.transformScale;O.value?Y.left=(Ve-he)*-1:Y.left=ve-le,Y.top=Be-L,p.dragging={top:-1,left:-1},p.isDragging=!1;break}}let _e;O.value,_e=Ie(Y.top,Y.left),E=oe,N=j,(m!==_e.x||v!==_e.y)&&s("move",l.i,_e.x,_e.y),B.type==="dragend"&&(P!==m||R!==v)&&s("moved",l.i,_e.x,_e.y),y.emit("dragEvent",B.type,l.i,_e.x,_e.y,S,g)}function we(B,pe,Re,oe){const j=ue();let H;return O.value?H={right:Math.round(j*B+(B+1)*p.margin[0]),top:Math.round(p.rowHeight*pe+(pe+1)*p.margin[1]),width:Re===1/0?Re:Math.round(j*Re+Math.max(0,Re-1)*p.margin[0]),height:oe===1/0?oe:Math.round(p.rowHeight*oe+Math.max(0,oe-1)*p.margin[1])}:H={left:Math.round(j*B+(B+1)*p.margin[0]),top:Math.round(p.rowHeight*pe+(pe+1)*p.margin[1]),width:Re===1/0?Re:Math.round(j*Re+Math.max(0,Re-1)*p.margin[0]),height:oe===1/0?oe:Math.round(p.rowHeight*oe+Math.max(0,oe-1)*p.margin[1])},H}function Ie(B,pe){const Re=ue();let oe=Math.round((pe-p.margin[0])/(Re+p.margin[0])),j=Math.round((B-p.margin[1])/(p.rowHeight+p.margin[1]));return oe=Math.max(Math.min(oe,p.cols-g),0),j=Math.max(Math.min(j,p.maxRows-S),0),{x:oe,y:j}}function ue(){return(p.containerWidth-p.margin[0]*(p.cols+1))/p.cols}function se(B,pe,Re){return Number.isFinite(B)?Math.round(pe*B+Math.max(0,B-1)*Re):B}function ae(B,pe,Re){return Math.max(Math.min(B,Re),pe)}function fe(B,pe,Re=!1){const oe=ue();let j=Math.round((pe+p.margin[0])/(oe+p.margin[0])),H=0;return Re?H=Math.ceil((B+p.margin[1])/(p.rowHeight+p.margin[1])):H=Math.round((B+p.margin[1])/(p.rowHeight+p.margin[1])),j=Math.max(Math.min(j,p.cols-m),0),H=Math.max(Math.min(H,p.maxRows-v),0),{w:j,h:H}}function Ce(B,pe){p.containerWidth=B}function Ge(){Ke()}function dt(){!f.value&&b.value&&(f.value=tl(b.value),p.useStyleCursor||f.value.styleCursor(!1))}const w=Xo(k);function I(){if(dt(),!!f.value)if(p.draggable&&!l.static){const B={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};f.value.draggable(B),x||(x=!0,f.value.on("dragstart dragmove dragend",pe=>{pe.type==="dragmove"?w(pe):k(pe)}))}else f.value.draggable({enabled:!1})}const X=Xo(Z);function ne(){if(dt(),!!f.value)if(p.resizable&&!l.static){const B=we(0,0,l.maxW,l.maxH),pe=we(0,0,l.minW,l.minH),Re={edges:{left:O.value?`.${be.value[0]}`:!1,right:O.value?!1:`.${be.value[0]}`,bottom:`.${be.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:pe.height*p.transformScale,width:pe.width*p.transformScale},max:{height:B.height*p.transformScale,width:B.width*p.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Re.modifiers=[tl.modifiers.aspectRatio({ratio:"preserve"})]),f.value.resizable(Re),_||(_=!0,f.value.on("resizestart resizemove resizeend",oe=>{oe.type==="resizemove"?X(oe):Z(oe)}))}else f.value.resizable({enabled:!1})}return(B,pe)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:b,class:e.normalizeClass(xe.value),style:e.normalizeStyle(p.style)},[e.renderSlot(B.$slots,"default"),J.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(be.value)},null,2)):e.createCommentVNode("",!0)],6))}}),cn=typeof window<"u";var al;cn&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nl(a){return a!=null}function ol(){}const Xp=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(Xp)));const Yp=cn&&("ontouchstart"in window||Jp()>0),Gp=Yp?"pointerdown":"click";function Jp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Zp(a,r,i=window.Event){const{type:l,bubbles:s=!1,cancelable:c=!1,...y}=r;if(!nl(l)||l==="")return!1;let f;return nl(i)?f=new i(l,{bubbles:s,cancelable:c}):(f=document.createEvent("HTMLEvents"),f.initEvent(l,s,c)),Object.assign(f,y),a.dispatchEvent(f)}const Qp="clickoutside",ef=new Set;cn&&document.addEventListener(Gp,a=>{const r=a.target,i=a.composedPath&&a.composedPath();ef.forEach(l=>{l!==r&&(i?!i.includes(l):!l.contains(r))&&(!l.__transferElement||l.__transferElement!==r&&!l.__transferElement.contains(r))&&Zp(l,{type:Qp})})},!0);const tf=[["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 Kn;if(cn){for(const a of tf)if(a[1]in document){Kn=a;break}}e.computed(()=>!1);const af=new Set,nf=new WeakMap;if(cn&&Kn){const a=Kn[2],r=Kn[4];document.addEventListener(r,()=>{if(af.forEach(i=>{i.value=!1}),document[a]){const i=nf.get(document[a]);i&&(i.value=!0)}},!1)}const or=new Map;or.set("x",0);or.set("y",0);var ln=[],of=function(){return ln.some(function(a){return a.activeTargets.length>0})},lf=function(){return ln.some(function(a){return a.skippedTargets.length>0})},ll="ResizeObserver loop completed with undelivered notifications.",rf=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:ll}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=ll),window.dispatchEvent(a)},Nn;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Nn||(Nn={}));var rn=function(a){return Object.freeze(a)},sf=function(){function a(r,i){this.inlineSize=r,this.blockSize=i,rn(this)}return a}(),lr=function(){function a(r,i,l,s){return this.x=r,this.y=i,this.width=l,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,rn(this)}return a.prototype.toJSON=function(){var r=this,i=r.x,l=r.y,s=r.top,c=r.right,y=r.bottom,f=r.left,p=r.width,x=r.height;return{x:i,y:l,top:s,right:c,bottom:y,left:f,width:p,height:x}},a.fromRect=function(r){return new a(r.x,r.y,r.width,r.height)},a}(),wo=function(a){return a instanceof SVGElement&&"getBBox"in a},rr=function(a){if(wo(a)){var r=a.getBBox(),i=r.width,l=r.height;return!i&&!l}var s=a,c=s.offsetWidth,y=s.offsetHeight;return!(c||y||a.getClientRects().length)},rl=function(a){var r;if(a instanceof Element)return!0;var i=(r=a==null?void 0:a.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(i&&a instanceof i.Element)},cf=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},In=typeof window<"u"?window:{},$n=new WeakMap,il=/auto|scroll/,uf=/^tb|vertical/,df=/msie|trident/i.test(In.navigator&&In.navigator.userAgent),ka=function(a){return parseFloat(a||"0")},gn=function(a,r,i){return a===void 0&&(a=0),r===void 0&&(r=0),i===void 0&&(i=!1),new sf((i?r:a)||0,(i?a:r)||0)},sl=rn({devicePixelContentBoxSize:gn(),borderBoxSize:gn(),contentBoxSize:gn(),contentRect:new lr(0,0,0,0)}),ir=function(a,r){if(r===void 0&&(r=!1),$n.has(a)&&!r)return $n.get(a);if(rr(a))return $n.set(a,sl),sl;var i=getComputedStyle(a),l=wo(a)&&a.ownerSVGElement&&a.getBBox(),s=!df&&i.boxSizing==="border-box",c=uf.test(i.writingMode||""),y=!l&&il.test(i.overflowY||""),f=!l&&il.test(i.overflowX||""),p=l?0:ka(i.paddingTop),x=l?0:ka(i.paddingRight),_=l?0:ka(i.paddingBottom),E=l?0:ka(i.paddingLeft),N=l?0:ka(i.borderTopWidth),K=l?0:ka(i.borderRightWidth),$=l?0:ka(i.borderBottomWidth),ee=l?0:ka(i.borderLeftWidth),F=E+x,P=p+_,R=ee+K,m=N+$,v=f?a.offsetHeight-m-a.clientHeight:0,g=y?a.offsetWidth-R-a.clientWidth:0,S=s?F+R:0,b=s?P+m:0,ie=l?l.width:ka(i.width)-S-g,Te=l?l.height:ka(i.height)-b-v,Ze=ie+F+g+R,ke=Te+P+v+m,Pe=rn({devicePixelContentBoxSize:gn(Math.round(ie*devicePixelRatio),Math.round(Te*devicePixelRatio),c),borderBoxSize:gn(Ze,ke,c),contentBoxSize:gn(ie,Te,c),contentRect:new lr(E,p,ie,Te)});return $n.set(a,Pe),Pe},sr=function(a,r,i){var l=ir(a,i),s=l.borderBoxSize,c=l.contentBoxSize,y=l.devicePixelContentBoxSize;switch(r){case Nn.DEVICE_PIXEL_CONTENT_BOX:return y;case Nn.BORDER_BOX:return s;default:return c}},pf=function(){function a(r){var i=ir(r);this.target=r,this.contentRect=i.contentRect,this.borderBoxSize=rn([i.borderBoxSize]),this.contentBoxSize=rn([i.contentBoxSize]),this.devicePixelContentBoxSize=rn([i.devicePixelContentBoxSize])}return a}(),cr=function(a){if(rr(a))return 1/0;for(var r=0,i=a.parentNode;i;)r+=1,i=i.parentNode;return r},ff=function(){var a=1/0,r=[];ln.forEach(function(c){if(c.activeTargets.length!==0){var y=[];c.activeTargets.forEach(function(f){var p=new pf(f.target),x=cr(f.target);y.push(p),f.lastReportedSize=sr(f.target,f.observedBox),x<a&&(a=x)}),r.push(function(){c.callback.call(c.observer,y,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var i=0,l=r;i<l.length;i++){var s=l[i];s()}return a},cl=function(a){ln.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(cr(i.target)>a?r.activeTargets.push(i):r.skippedTargets.push(i))})})},hf=function(){var a=0;for(cl(a);of();)a=ff(),cl(a);return lf()&&rf(),a>0},uo,ur=[],vf=function(){return ur.splice(0).forEach(function(a){return a()})},mf=function(a){if(!uo){var r=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return vf()}).observe(i,l),uo=function(){i.textContent="".concat(r?r--:r++)}}ur.push(a),uo()},gf=function(a){mf(function(){requestAnimationFrame(a)})},Wn=0,yf=function(){return!!Wn},bf=250,kf={attributes:!0,characterData:!0,childList:!0,subtree:!0},ul=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(a){return a===void 0&&(a=0),Date.now()+a},po=!1,xf=function(){function a(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return a.prototype.run=function(r){var i=this;if(r===void 0&&(r=bf),!po){po=!0;var l=dl(r);gf(function(){var s=!1;try{s=hf()}finally{if(po=!1,r=l-dl(),!yf())return;s?i.run(1e3):r>0?i.run(r):i.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var r=this,i=function(){return r.observer&&r.observer.observe(document.body,kf)};document.body?i():In.addEventListener("DOMContentLoaded",i)},a.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ul.forEach(function(i){return In.addEventListener(i,r.listener,!0)}))},a.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),ul.forEach(function(i){return In.removeEventListener(i,r.listener,!0)}),this.stopped=!0)},a}(),bo=new xf,pl=function(a){!Wn&&a>0&&bo.start(),Wn+=a,!Wn&&bo.stop()},wf=function(a){return!wo(a)&&!cf(a)&&getComputedStyle(a).display==="inline"},Df=function(){function a(r,i){this.target=r,this.observedBox=i||Nn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var r=sr(this.target,this.observedBox,!0);return wf(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},a}(),_f=function(){function a(r,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=i}return a}(),Ln=new WeakMap,fl=function(a,r){for(var i=0;i<a.length;i+=1)if(a[i].target===r)return i;return-1},Fn=function(){function a(){}return a.connect=function(r,i){var l=new _f(r,i);Ln.set(r,l)},a.observe=function(r,i,l){var s=Ln.get(r),c=s.observationTargets.length===0;fl(s.observationTargets,i)<0&&(c&&ln.push(s),s.observationTargets.push(new Df(i,l&&l.box)),pl(1),bo.schedule())},a.unobserve=function(r,i){var l=Ln.get(r),s=fl(l.observationTargets,i),c=l.observationTargets.length===1;s>=0&&(c&&ln.splice(ln.indexOf(l),1),l.observationTargets.splice(s,1),pl(-1))},a.disconnect=function(r){var i=this,l=Ln.get(r);l.observationTargets.slice().forEach(function(s){return i.unobserve(r,s.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Ef=function(){function a(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Fn.connect(this,r)}return a.prototype.observe=function(r,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Fn.observe(this,r,i)},a.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Fn.unobserve(this,r)},a.prototype.disconnect=function(){Fn.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Gn=new WeakMap;function Cf(a){var r;for(let i=0,l=a.length;i<l;++i){const s=a[i],c=Gn.get(s.target);if(typeof c=="function"){const{inlineSize:y,blockSize:f}=((r=s.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:p,offsetHeight:x}=s.target;c(Object.assign(s,{offsetWidth:p,offsetHeight:x,width:y??p,height:f??x}))}}}const dr=new(cn&&window.ResizeObserver||Ef)(Cf);function hl(a,r){Gn.set(a,r),dr.observe(a)}function vl(a){Gn.has(a)&&(dr.unobserve(a),Gn.delete(a))}function Sf(a={}){let r=ol;const i=e.watch(()=>e.unref(a.target),s=>{r(),!(!s||typeof a.onResize!="function")&&(hl(s,a.onResize),r=()=>{vl(s),r=ol})},{immediate:!0}),l=()=>{i(),r()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:hl,unobserveResize:vl,unobserve:l}}const Tf=e.ref(!1);e.computed(()=>Tf.value);const ml="__theme_style__",fo="__theme_observer__",gl=e.reactive(new Map),yl=new Map;e.watch(gl,()=>{if(!cn)return;yl.clear();const a=document.head.querySelector(`#${ml}`);a&&document.head.removeChild(a);const r=document.createElement("style");let i=`.${fo} { width: 1px }`,l=1;for(const[s,[c,y]]of gl.entries())i+=` html.${c} .${fo}, .${y} .${fo} { width: ${++l}px }`,yl.set(l,s);r.textContent=i,r.id=ml,document.head.appendChild(r)});const pr=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:r,emit:i}){const l=a,s=i,c=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),y=new Map,f=e.ref(l.layout),p=e.ref(),{observeResize:x,unobserveResize:_}=Sf(),E=Cp();E.on("resizeEvent",N),E.on("dragEvent",K),e.onBeforeMount(()=>{s("layout-before-mount",f.value)}),e.onMounted(()=>{s("layout-mounted",f.value),e.nextTick(()=>{Rp(f.value),c.originalLayout=f.value,e.nextTick(()=>{Te(),p.value&&x(p.value,Sp(m,16)),hn(f.value,l.verticalCompact),s("layout-updated",f.value),R(),m()})})}),e.onBeforeUnmount(()=>{E.clearAll(),p.value&&_(p.value)});function N(ke,Pe,Ne,z,re,Q){b(ke,Pe,Ne,z,re,Q)}function K(ke,Pe,Ne,z,re,Q){S(ke,Pe,Ne,z,re,Q)}e.watch(()=>c.width,(ke,Pe)=>{e.nextTick(()=>{E.emit("updateWidth",ke),Pe===-1&&e.nextTick(()=>{s("layout-ready",f.value)}),R()})}),e.watch(()=>[l.layout,l.layout.length],()=>{f.value=l.layout,P()}),e.watch(()=>l.colNum,ke=>{E.emit("setColNum",ke)}),e.watch(()=>l.rowHeight,ke=>{E.emit("setRowHeight",ke)}),e.watch(()=>l.isDraggable,ke=>{E.emit("setDraggable",ke)}),e.watch(()=>l.isResizable,ke=>{E.emit("setResizable",ke)}),e.watch(()=>l.isBounded,ke=>{E.emit("setBounded",ke)}),e.watch(()=>l.transformScale,ke=>{E.emit("setTransformScale",ke)}),e.watch(()=>l.responsive,ke=>{ke||(s("update:layout",c.originalLayout),E.emit("setColNum",l.colNum)),m()}),e.watch(()=>l.maxRows,ke=>{E.emit("setMaxRows",ke)}),e.watch([()=>l.margin,()=>l.margin[1]],R),e.provide(Gl,e.reactive({...e.toRefs(l),...e.toRefs(c),increaseItem:$,decreaseItem:ee})),e.provide(Jl,E),r({state:c,getItem:F,resizeEvent:b,dragEvent:S,layoutUpdate:P});function $(ke){y.set(ke.i,ke)}function ee(ke){y.delete(ke.i)}function F(ke){return y.get(ke)}function P(){if(!pa(f.value)&&!pa(c.originalLayout)){if(f.value.length!==c.originalLayout.length){const ke=Ze(f.value,c.originalLayout);if(ke.length>0)if(f.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(ke);else{const Pe=new Set(ke.map(Ne=>Ne.i));c.originalLayout=c.originalLayout.filter(Ne=>!Pe.has(Ne.i))}c.lastLayoutLength=f.value.length,Te()}hn(f.value,l.verticalCompact),E.emit("updateWidth",c.width),R(),s("layout-updated",f.value)}}function R(){c.mergedStyle={height:v()}}function m(){p.value&&(c.width=p.value.offsetWidth),E.emit("resizeEvent")}function v(){if(!l.autoSize)return;const ke=parseFloat(l.margin[1]);return Bp(f.value)*(l.rowHeight+ke)+ke+"px"}let g;function S(ke,Pe,Ne,z,re,Q){let de=Yo(f.value,Pe);pa(de)&&(de={h:0,w:0,x:0,y:0,i:""}),ke==="dragstart"&&!l.verticalCompact&&(g=f.value.reduce((ze,{i:Qe,x:J,y:O})=>({...ze,[Qe]:{x:J,y:O}}),{})),ke==="dragmove"||ke==="dragstart"?(c.placeholder.i=Pe,c.placeholder.x=de.x,c.placeholder.y=de.y,c.placeholder.w=Q,c.placeholder.h=re,e.nextTick(()=>{c.isDragging=!0}),E.emit("updateWidth",c.width)):e.nextTick(()=>{c.isDragging=!1}),f.value=yo(f.value,de,Ne,z,!0,l.preventCollision),l.restoreOnDrag?(de.static=!0,hn(f.value,l.verticalCompact,g),de.static=!1):hn(f.value,l.verticalCompact),E.emit("compact"),R(),ke==="dragend"&&(g=void 0,s("layout-updated",f.value))}function b(ke,Pe,Ne,z,re,Q){let de=Yo(f.value,Pe);pa(de)&&(de={h:0,w:0,x:0,y:0,i:""});let ze;if(l.preventCollision){const Qe=Ql(f.value,{...de,w:Q,h:re}).filter(J=>J.i!==de.i);if(ze=Qe.length>0,ze){let J=1/0,O=1/0;Qe.forEach(W=>{W.x>de.x&&(J=Math.min(J,W.x)),W.y>de.y&&(O=Math.min(O,W.y))}),Number.isFinite(J)&&(de.w=J-de.x),Number.isFinite(O)&&(de.h=O-de.y)}}ze||(de.w=Q,de.h=re),ke==="resizestart"||ke==="resizemove"?(c.placeholder.i=Pe,c.placeholder.x=Ne,c.placeholder.y=z,c.placeholder.w=de.w,c.placeholder.h=de.h,e.nextTick(()=>{c.isDragging=!0}),E.emit("updateWidth",c.width)):ke&&e.nextTick(()=>{c.isDragging=!1}),l.responsive&&ie(),hn(f.value,l.verticalCompact),E.emit("compact"),R(),ke==="resizeend"&&s("layout-updated",f.value)}function ie(){const ke=Fp(l.breakpoints,c.width);if(ke===c.lastBreakpoint)return;const Pe=ar(ke,l.cols);!pa(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=go(f.value));const Ne=jp(c.originalLayout,c.layouts,l.breakpoints,ke,c.lastBreakpoint,Pe,l.verticalCompact);c.layouts[ke]=Ne,c.lastBreakpoint!==ke&&s("breakpoint-changed",ke,Ne),f.value=Ne,s("update:layout",Ne),c.lastBreakpoint=ke,E.emit("setColNum",Pe)}function Te(){c.layouts=Object.assign({},l.responsiveLayouts)}function Ze(ke,Pe){const Ne=new Set(Pe.map(de=>de.i)),z=new Set(ke.map(de=>de.i)),re=ke.filter(de=>!Ne.has(de.i)),Q=Pe.filter(de=>!z.has(de.i));return re.concat(Q)}return(ke,Pe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:p,class:"vgl-layout",style:e.normalizeStyle(c.mergedStyle)},[ke.$slots.default?e.renderSlot(ke.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(f.value,Ne=>(e.openBlock(),e.createBlock(Yn,e.mergeProps({key:Ne.i,ref_for:!0},Ne),{default:e.withCtx(()=>[e.renderSlot(ke.$slots,"item",{item:Ne})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Yn,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,c.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const Bf=e.defineComponent({__name:"index",props:{modelValue:{type:[String,Number,Boolean]},options:{default:()=>[]},disabled:{type:Boolean,default:!1},size:{default:"default"},align:{default:"left"}},emits:["update:modelValue","change"],setup(a,{emit:r}){const i=a,l=r,s=e.computed({get:()=>i.modelValue,set:f=>l("update:modelValue",f)}),c=e.computed(()=>Array.isArray(i.options)?i.options:[]),y=f=>{l("change",f)};return(f,p)=>{const x=e.resolveComponent("el-radio"),_=e.resolveComponent("el-radio-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ss-radio",{"ss-radio--left":f.align==="left","ss-radio--center":f.align==="center"}])},[e.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=E=>s.value=E),disabled:f.disabled,size:f.size,onChange:y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,E=>(e.openBlock(),e.createBlock(x,{key:String(E.value),label:E.value,disabled:E.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.label),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled","size"])],2)}}}),If=zt._export_sfc(Bf,[["__scopeId","data-v-06ebf670"]]),Nf={key:0,class:"item-view-group"},Af={key:1,class:"measurement-system-container"},Vf={class:"radio-group-container"},Of={key:0,class:"item-view-group"},Mf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:r}){const i=T.useModelComp(T.pinia),{isEdit:l}=T.storeToRefs(i),s=r,c=a,y=e.computed(()=>c==null?void 0:c.children),f=e.computed(()=>{var R,m,v,g;return((R=c==null?void 0:c.children)==null?void 0:R.length)>0&&((m=c==null?void 0:c.children)!=null&&m.every(S=>S==null?void 0:S.layout))?(g=(v=c==null?void 0:c.children)==null?void 0:v[0])==null?void 0:g.layout:"vertical"}),p=e.computed(()=>{var R,m;return((m=(R=c==null?void 0:c.children)==null?void 0:R[0])==null?void 0:m.isGridLayout)||!1}),x=e.ref((c==null?void 0:c.level)+1),_=e.computed(()=>{if(!(c!=null&&c.children)||!Array.isArray(c.children)||c.children.length<2)return!1;const R=c.children.some(v=>(v==null?void 0:v.name)==="测量系统配置表"&&(v==null?void 0:v.comp)==="ParentItem"),m=c.children.some(v=>(v==null?void 0:v.name)==="测量系统传递表"&&(v==null?void 0:v.comp)==="ParentItem");return R&&m}),E=e.ref("测量系统配置表"),N=e.computed(()=>[{label:"测量系统配置表",value:"测量系统配置表"},{label:"测量系统传递表",value:"测量系统传递表"}]),K=e.computed(()=>{if(!_.value||!(c!=null&&c.children))return[];const R=c.children.find(m=>(m==null?void 0:m.name)===E.value);return!R||!R.children?[]:R.children.filter(m=>(m==null?void 0:m.comp)==="Table")}),$=e.computed(()=>K.value.map((R,m)=>({value:String((R==null?void 0:R.id)||(R==null?void 0:R.name)||m),label:R==null?void 0:R.name,tableItem:R}))),ee=R=>{E.value=String(R)};e.watch(()=>c==null?void 0:c.children,()=>{_.value},{deep:!0});const F=R=>{s("rowClick",R)},P=(R,m)=>{s("routeUrl",R,m)};return(R,m)=>p.value?(e.openBlock(),e.createBlock(e.unref(pr),{key:0,layout:y.value,"onUpdate:layout":m[0]||(m[0]=v=>y.value=v),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(v,g)=>(e.openBlock(),e.createBlock(e.unref(Yn),{key:v.i,x:v.x,y:v.y,"min-h":v.minH,"max-h":v.maxH,"min-w":v.minW,w:v.w,h:v.h,i:v.i},{default:e.withCtx(()=>{var S,b,ie,Te,Ze,ke,Pe,Ne,z,re,Q,de,ze;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:g===((S=c==null?void 0:c.children)==null?void 0:S.length)-1?"0px":"24px"})},[((ie=(b=v==null?void 0:v.component)==null?void 0:b.comp)==null?void 0:ie.toUpperCase())!=="TABLE"&&((Te=v==null?void 0:v.component)!=null&&Te.name)?(e.openBlock(),e.createElementBlock("div",Nf,[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((Ze=v==null?void 0:v.component)==null?void 0:Ze.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)((ke=v==null?void 0:v.component)==null?void 0:ke.comp)),{pageLayout:f.value,config:{showIndex:(Pe=e.unref(Ft)[g])==null?void 0:Pe.showIndex,allowMove:(Ne=e.unref(Ft)[g])==null?void 0:Ne.allowMove,viewport:(z=e.unref(Ft)[g])==null?void 0:z.viewport},related:v==null?void 0:v.relatedTables,compName:v==null?void 0:v.component.name,compNames:e.unref(Fl),itemData:(re=v==null?void 0:v.component)==null?void 0:re.compData,childItemData:(Q=v==null?void 0:v.component)==null?void 0:Q.itemChildData,key:e.unref(on),cacheNewData:e.unref(Ll),onChange:e.unref(En),index:(v==null?void 0:v.id)??g,onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),parentTableId:(de=v==null?void 0:v.component)==null?void 0:de.tableId,allMapContents:e.unref(Un),children:(ze=v==null?void 0:v.component)==null?void 0:ze.children,level:x.value,onRowClick:F,onRouteUrl:P,onClickTrigger:e.unref(jl),onClickMainKey:e.unref(Ul)},null,40,["pageLayout","config","related","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"])):_.value?(e.openBlock(),e.createElementBlock("div",Af,[e.createElementVNode("div",Vf,[e.createVNode(If,{modelValue:E.value,"onUpdate:modelValue":m[1]||(m[1]=v=>E.value=v),options:N.value,onChange:ee},null,8,["modelValue","options"])]),$.value.length>0?(e.openBlock(),e.createBlock(Nt.ssTab,{key:0,class:"measurement-tabs",tabsContents:$.value},{pane:e.withCtx(({tab:v,index:g})=>{var S,b,ie,Te,Ze,ke,Pe,Ne;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)((S=v==null?void 0:v.tableItem)==null?void 0:S.comp)),{compName:(b=v==null?void 0:v.tableItem)==null?void 0:b.name,itemData:(ie=v==null?void 0:v.tableItem)==null?void 0:ie.compData,related:(Te=v==null?void 0:v.tableItem)==null?void 0:Te.relatedTables,childItemData:(Ze=v==null?void 0:v.tableItem)==null?void 0:Ze.itemChildData,key:`${e.unref(on)}-${E.value}-${(v==null?void 0:v.value)||g}`,onChange:e.unref(En),index:((ke=v==null?void 0:v.tableItem)==null?void 0:ke.id)??g,onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),parentTableId:(Pe=v==null?void 0:v.tableItem)==null?void 0:Pe.tableId,allMapContents:e.unref(Un),children:(Ne=v==null?void 0:v.tableItem)==null?void 0:Ne.children,level:x.value,onRowClick:F,onRouteUrl:P},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))]}),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c==null?void 0:c.children,(v,g)=>{var S,b;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(v==null?void 0:v.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(g)===((S=c==null?void 0:c.children)==null?void 0:S.length)-1?"0px":"24px"})},[((b=v==null?void 0:v.comp)==null?void 0:b.toUpperCase())!=="TABLE"&&v.name?(e.openBlock(),e.createElementBlock("div",Of,[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(v.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)(v.comp)),{compName:v.name,itemData:v==null?void 0:v.compData,related:v==null?void 0:v.relatedTables,childItemData:v==null?void 0:v.itemChildData,key:e.unref(on),onChange:e.unref(En),index:(v==null?void 0:v.id)??g,onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),parentTableId:v==null?void 0:v.tableId,allMapContents:e.unref(Un),children:v==null?void 0:v.children,level:x.value,onRowClick:F,onRouteUrl:P},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),zf=zt._export_sfc(Mf,[["__scopeId","data-v-cd7bc0cf"]]),fr=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"}]),Rf={TABLE:oa.ssTable,FORM:Ro,STATICFORM:wl,TABLEOPERATE:Ts,TABLESTYLE:Ks,TABLEEXTEND:Hs,TABLEINTERACTION:Ys,FORMOPERATE:Po,FOLD:Ec,CALCULATOR:Nc,METHODBUTTON:Oc,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:Ro,STEP:Hc,STEPOPERATE:mc,TIMELINE:Zc,TIMELINEOPERATE:wc,FORMTOPOPERATE:Po,SIGNATUREOPERATE:Uc,AVATARUPLOADOPERATE:Rc,TABS:tu,TABSOPERATE:Lu,CHART:ed,CHARTOPERATE:dd,LAYOUT:hp,LAYOUTOPERATE:Dp,PARENTITEM:zf};function un(a){return Rf[a==null?void 0:a.toUpperCase()]||null}exports.De=pr;exports._sfc_main=Vl;exports.activeStepInfo=vn;exports.affixItems=ap;exports.allMapContents=Un;exports.analyzeForm=bd;exports.analyzeQuoteForm=yd;exports.analyzeSplitToContent=Ut;exports.analyzeTable=xd;exports.analyzerStringToArray=pd;exports.cacheNewData=Ll;exports.clickMainKey=Ul;exports.clickSavePage=tp;exports.clickStep=Wl;exports.clickTrigger=jl;exports.compId=on;exports.compNames=Fl;exports.compShow=Xn;exports.existLayouts=lp;exports.generateLayouts=Ls;exports.getComponent=un;exports.getComponents=_n;exports.getPageData=sn;exports.getSliceContLength=cp;exports.gridRowHeight=Ms;exports.isStepLayout=Hl;exports.onBack=Qd;exports.onChange=En;exports.onClick=ep;exports.onContentChange=Cn;exports.onExtendTaskEnd=op;exports.onPageBack=rp;exports.onPageChange=Sn;exports.onSelectFixContent=Zd;exports.renderShowItems=Pl;exports.same=fd;exports.setComponent=Rl;exports.showItems=Ft;exports.sliceTableLength=$l;exports.slotContent=fr;exports.ssMenu=qn;exports.st=Yn;exports.stepItems=up;exports.toolBar=np;exports.verifyButton=ip;