ss-component-new 1.2.50 → 1.2.52

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 (105) hide show
  1. package/dist/{MTLLoader-NSZvi7nI.js → MTLLoader-BYwyWMXA.js} +1 -1
  2. package/dist/{MTLLoader-D8ibvSFh.cjs → MTLLoader-CsgziIDh.cjs} +1 -1
  3. package/dist/{OrbitControls-DvH2FOLU.js → OrbitControls-B6u_q54k.js} +1 -1
  4. package/dist/{OrbitControls-BGSGtkMX.cjs → OrbitControls-DIdDv9T6.cjs} +1 -1
  5. package/dist/{animationData-SFjieloL.cjs → animationData-BIplXQmL.cjs} +1 -1
  6. package/dist/{animationData-gK37rTvx.js → animationData-DJTuGNt4.js} +3 -3
  7. package/dist/{array-Bh2Ohvdn.cjs → array-B_zno3kJ.cjs} +1 -1
  8. package/dist/{array-DnsJhOVQ.js → array-ShFlmvJl.js} +2 -2
  9. package/dist/{dataUtil-C-vYfgZA.js → dataUtil-DsoW13ow.js} +1 -1
  10. package/dist/{dataUtil-BlcWKJem.cjs → dataUtil-k3nImvzW.cjs} +1 -1
  11. package/dist/{fileUtil-BmUTXw98.js → fileUtil-C0rsEa9w.js} +1 -1
  12. package/dist/{fileUtil-_H4ZxWjL.cjs → fileUtil-DToE53-r.cjs} +1 -1
  13. package/dist/{iconfont-DrNWNoTl.cjs → iconfont-DmN4e8Ce.cjs} +1 -1
  14. package/dist/{iconfont-Dn_p4Yaj.js → iconfont-JsDfBfXr.js} +2 -2
  15. package/dist/{index-Bwo7MKHa.js → index--ZcfDr9F.js} +5 -5
  16. package/dist/{index-uVTa9bea.cjs → index-0B0fThJx.cjs} +1 -1
  17. package/dist/{index-ke4lJPzD.cjs → index-1-FvChHt.cjs} +1 -1
  18. package/dist/{index-DKzMUkdf.js → index-18QTfsEp.js} +2 -2
  19. package/dist/{index-6ICa5WHj.js → index-7V3ID8IY.js} +8 -8
  20. package/dist/{index-Dy9cQWjY.js → index-99iBBlvh.js} +2 -2
  21. package/dist/{index-D8XR0eSq.js → index-BCrSpeL7.js} +7 -7
  22. package/dist/{index-BFcxduYK.js → index-BG5qCqPp.js} +1 -1
  23. package/dist/{index-BVSEKOtz.cjs → index-BHELpKaX.cjs} +1 -1
  24. package/dist/{index-DzWCBZCp.js → index-BOdwwuQO.js} +1 -1
  25. package/dist/{index-CC7R4NnH.js → index-BgpaOcbG.js} +2 -2
  26. package/dist/{index-DDctdcOX.cjs → index-Bh0aBTEr.cjs} +1 -1
  27. package/dist/{index-C5kHHVhV.js → index-BpDzs5Qp.js} +2 -2
  28. package/dist/{index-DSAyZE1F.js → index-Bqgt0a8Q.js} +56 -56
  29. package/dist/{index-DHLztZCX.js → index-BqrSajLE.js} +4 -4
  30. package/dist/{index-BLC92eE1.cjs → index-BwkXeUvc.cjs} +1 -1
  31. package/dist/index-Bzh9nO8C.cjs +1 -0
  32. package/dist/{index-CrDQNZIq.cjs → index-C0vHOv8e.cjs} +1 -1
  33. package/dist/{index-pIMg1p00.cjs → index-C22jIGA2.cjs} +1 -1
  34. package/dist/{index-DVvQHXSN.js → index-C7aJ_4Dh.js} +1356 -1335
  35. package/dist/{index-C9vRA6zS.js → index-CBNxRIxH.js} +5 -5
  36. package/dist/{index-DoVQFozi.js → index-CDxJySzB.js} +2 -2
  37. package/dist/{index-DG9cQ9bN.cjs → index-CMsfA9oC.cjs} +1 -1
  38. package/dist/{index-DzZNl0xL.cjs → index-CN95C7bI.cjs} +1 -1
  39. package/dist/{index-DOSrpa_J.js → index-CZgNNBKP.js} +2 -2
  40. package/dist/{index-BeiqdLoK.cjs → index-Ciz1ldTE.cjs} +1 -1
  41. package/dist/{index-BV8iacuo.js → index-CkOkdSSe.js} +3 -3
  42. package/dist/{index-DkQAKeVd.js → index-CmasnRur.js} +1 -1
  43. package/dist/{index-Dr2LRDpo.cjs → index-Co2XOJgv.cjs} +1 -1
  44. package/dist/{index-BtHcbxFu.js → index-CxtDrd92.js} +1 -1
  45. package/dist/{index-ZmF9zmqE.cjs → index-D0_mEg_r.cjs} +1 -1
  46. package/dist/{index-Bupls4_H.js → index-D0rIJW9J.js} +2 -2
  47. package/dist/{index-D0-3NKe4.cjs → index-D18n8Gh7.cjs} +1 -1
  48. package/dist/{index-BIHDw5_2.js → index-D1rM2RQL.js} +1 -1
  49. package/dist/{index-DHhIamRP.js → index-D5CqXgTi.js} +3 -3
  50. package/dist/{index-CbChx1NW.js → index-D92iKnQs.js} +11 -11
  51. package/dist/{index-DsLwjz1W.js → index-DBvVR_B5.js} +2 -2
  52. package/dist/{index-Dxu-jGah.cjs → index-DOt0piJO.cjs} +6 -6
  53. package/dist/{index-CtfP1enB.cjs → index-DQP3RvLe.cjs} +1 -1
  54. package/dist/{index-DHPOuQf7.js → index-DdZB840a.js} +1 -1
  55. package/dist/{index-CTzgi0J1.cjs → index-DfFDFX4i.cjs} +1 -1
  56. package/dist/{index-DYX6ncpm.js → index-DiALPqS7.js} +2 -2
  57. package/dist/{index-B25jP2Zm.cjs → index-DoswdgxH.cjs} +1 -1
  58. package/dist/{index-CNqCLcFZ.cjs → index-Du00NIb9.cjs} +1 -1
  59. package/dist/{index-CUW343Sl.js → index-MRL0XMqt.js} +5 -5
  60. package/dist/{index-BDFAZqjQ.js → index-MXp2bNLx.js} +1 -1
  61. package/dist/{index-Dp9MedC2.cjs → index-WIJK_qws.cjs} +1 -1
  62. package/dist/{index-BOPc1V6S.cjs → index-WXe9um0g.cjs} +1 -1
  63. package/dist/{index-Bqcveamx.cjs → index-a8EB89j-.cjs} +1 -1
  64. package/dist/{index-DjFsn89g.cjs → index-bq9OM2yT.cjs} +1 -1
  65. package/dist/{index-BTBM69xL.cjs → index-e_eQNKIk.cjs} +1 -1
  66. package/dist/{index-B61E-7tP.cjs → index-izkyxFId.cjs} +1 -1
  67. package/dist/{index-K4TBpbv0.cjs → index-jTijCUMR.cjs} +1 -1
  68. package/dist/{index-DRny_uYu.cjs → index-m0E6zJTS.cjs} +1 -1
  69. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B6XvNJiY.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B3CmBekG.js} +8 -8
  70. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CoJvGJ_8.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BLc-20yY.cjs} +1 -1
  71. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpCHGWUd.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DTVUIo28.js} +1715 -1720
  72. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtKRQe3d.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-utAQVjQ5.cjs} +55 -55
  73. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DnuFpoz3.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-CD9lO4Eu.js} +5 -5
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-Do98G4Li.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DhFVHzR5.cjs} +1 -1
  75. package/dist/{index.vue_vue_type_style_index_1_lang-yffO0nj8.cjs → index.vue_vue_type_style_index_1_lang-5HPoeKSA.cjs} +1 -1
  76. package/dist/{index.vue_vue_type_style_index_1_lang-B1TyseVF.js → index.vue_vue_type_style_index_1_lang-7v-kiH9J.js} +4 -4
  77. package/dist/{main-C2dyX8S8.cjs → main-0WP5FnvS.cjs} +1 -1
  78. package/dist/{main-vnqtYF1v.js → main-DgEIGAgk.js} +4 -4
  79. package/dist/ss-component.cjs +1 -1
  80. package/dist/ss-component.css +1 -1
  81. package/dist/ss-component.js +10 -10
  82. package/dist/ss-component2.cjs +1 -1
  83. package/dist/ss-component2.js +11 -11
  84. package/dist/{threeModel-cod5YSAI.cjs → threeModel-C6spcC1l.cjs} +1 -1
  85. package/dist/{threeModel-KzAsamub.js → threeModel-D0mUPwl8.js} +4 -4
  86. package/dist/{threePreview-IMGkH039.cjs → threePreview-BUTi-ogv.cjs} +1 -1
  87. package/dist/{threePreview-BKBoF-Pq.js → threePreview-CXzzuNo0.js} +3 -3
  88. package/dist/{threeSceneView-9L6pD08T.js → threeSceneView-Dr9A1GfB.js} +10 -10
  89. package/dist/{threeSceneView-C9hicAWV.cjs → threeSceneView-xw-_1WNq.cjs} +1 -1
  90. package/dist/{threeSceneViewForCPMPIP--6W3Ib3t.cjs → threeSceneViewForCPMPIP-CzF6I-wd.cjs} +1 -1
  91. package/dist/{threeSceneViewForCPMPIP-DcmXR46U.js → threeSceneViewForCPMPIP-Wpe3kcVZ.js} +7 -7
  92. package/dist/{threeTrackPathView-CUphngkb.js → threeTrackPathView-Bb8DL5cH.js} +4 -4
  93. package/dist/{threeTrackPathView-BCaivDl5.cjs → threeTrackPathView-BckryhRE.cjs} +1 -1
  94. package/dist/{threeViewerHost-w1UyRR-l.js → threeViewerHost-DlqqVhOM.js} +3 -3
  95. package/dist/{threeViewerHost-BZ41WsSu.cjs → threeViewerHost-J8qfgEsE.cjs} +1 -1
  96. package/dist/{urdfTree-BuKlTWHs.cjs → urdfTree-BR3f2tCx.cjs} +1 -1
  97. package/dist/{urdfTree-D_M--ddQ.js → urdfTree-BgCufT3-.js} +1 -1
  98. package/dist/{workpieceTreePanel-CCVD39J_.js → workpieceTreePanel-CAJIJEhw.js} +5 -5
  99. package/dist/{workpieceTreePanel-BnK9-WF1.cjs → workpieceTreePanel-Dg3J_nUK.cjs} +1 -1
  100. package/package.json +1 -1
  101. package/dist/index-D8exatl4.cjs +0 -1
  102. package/dist/obj/model.mtl +0 -42
  103. package/dist/obj/model.obj +0 -26110
  104. package/public/obj/model.mtl +0 -42
  105. package/public/obj/model.obj +0 -26110
@@ -1 +1 @@
1
- "use strict";const fa=require("./index-ke4lJPzD.cjs"),e=require("vue"),p=require("./index-CTvzL0b3.cjs"),Nt=require("./index-pIMg1p00.cjs"),Ne=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BtKRQe3d.cjs"),Yt=require("./index-BOPc1V6S.cjs"),Bo=require("./threeViewerHost-BZ41WsSu.cjs"),jt=require("./index-Dxu-jGah.cjs"),Lt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-H67el4HV.cjs"),No=require("./index-CtfP1enB.cjs"),gl=require("./index-BVaHwt5f.cjs"),Vr=require("./index-DDctdcOX.cjs");var Or="[object Boolean]";function ml(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Or}const Mr={class:"form-content"},zr={title:"选择标签"},Rr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Lr={class:"col-operate-wrap"},Pr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Fr={__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:s}){const i=()=>{x.value=!1,m.value=!1,h.value=[]},l=a;e.computed(()=>{var ee;const v=(ee=Ue.value)==null?void 0:ee.split("/");return(v==null?void 0:v.some(R=>(R==null?void 0:R.includes("updateLoading"))||(R==null?void 0:R.includes("loading"))))?!1:Ie.value==="view"});const c=s,d=e.ref([]),x=e.ref(!1),m=e.ref(!1),h=e.ref([]);Bo.useThreeSystem();const D=e.ref(),E=e.ref(!1),T=e.ref(!1),O=e.ref([]),H=e.ref(),V=e.ref(!1),ke=e.ref([]),W=fa.useFormToTableComp(p.pinia),K=fa.useFormComp(p.pinia),G=e.ref(!1),w=e.ref(),z=p.useLoginState(p.pinia),{loginUserInfo:k}=p.storeToRefs(z),A=e.ref(),I=e.ref(!0),se=jt.useModelComp(p.pinia),{tableViewContents:$e,itemData:nt,isEdit:Ie,routeToChildPath:ze,lockingPage:ue}=p.storeToRefs(se),_=e.ref(null),ne=e.ref(!1),te=e.ref(!1),ve=jt.useMenuState(),{activeMenuPath:Ue}=p.storeToRefs(ve),st=Ne.useOriginalState(p.pinia),{originalPath:q}=p.storeToRefs(st),M=e.ref([]),ye=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),xe=async v=>{te.value=v,await tt("disabled",null,v,!0)},Re=async v=>{await tt("operable",null,v,!0)};e.watch(()=>Ue.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Oe=()=>{e.nextTick(()=>{Z()})},Ye=v=>{var F;d.value=(F=d.value)==null?void 0:F.map(ee=>({...ee,isFormColHidden:!(v!=null&&v.includes(ee.label))}))};e.onUnmounted(()=>{_.value=null});const qe=v=>{c("clickTrigger",v)},lt=async v=>{var F,ee,R,pe,L,Y;if(v===""){let ie="";(F=d.value)==null||F.forEach(X=>{X!=null&&X.isMain&&(ie=X==null?void 0:X.value)});let ge=await Ne.getItemData(ze.value,sessionStorage.getItem("systemKey"),"");ie=((Y=(L=(pe=(R=(ee=ge==null?void 0:ge[0])==null?void 0:ee.compData)==null?void 0:R.find(X=>(X==null?void 0:X.key)==="mainRouters"))==null?void 0:pe.contents)==null?void 0:L[0])==null?void 0:Y.routerContent)+q.value+ie;let oe=await Ne.getItemData(ie,sessionStorage.getItem("systemKey"),"");V.value=!0,ke.value=oe==null?void 0:oe.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),c("routeUrl",ke.value)}},Z=()=>{var F;const v=(F=_.value)==null?void 0:F.$el;v&&Ne.Sortable.create(v,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ee=>{const{oldIndex:R,newIndex:pe}=ee;if(R===pe)return;const L=d.value.splice(R,1)[0];d.value.splice(pe,0,L)}})},tt=async(v,F,ee,R=!1)=>{var pe,L,Y,ie,ge,$,oe,X;try{se.setRefreshCurStructure(!1);const _e=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((pe=_e==null?void 0:_e.data)==null?void 0:pe.code)===200){let fe=(ge=(ie=(Y=(L=_e==null?void 0:_e.data)==null?void 0:L.result)==null?void 0:Y[0])==null?void 0:ie.value)==null?void 0:ge.pageData;R?fe={...fe,compData:(oe=fe==null?void 0:fe.compData)==null?void 0:oe.map(P=>{var he;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(he=P==null?void 0:P.contents)==null?void 0:he.map(ae=>({...ae,[v]:ee}))}:P})}:fe={...fe,compData:($=fe==null?void 0:fe.compData)==null?void 0:$.map(P=>{var he;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(he=P==null?void 0:P.contents)==null?void 0:he.map(ae=>(ae==null?void 0:ae.prop)===(F==null?void 0:F.prop)?{...ae,[v]:ee}:ae)}:P})};const Ee=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:fe}});((X=Ee==null?void 0:Ee.data)==null?void 0:X.code)===200?(p.ElMessage.success("编辑成功"),se.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},at=async(v,F)=>{await tt("label",F,v)},Le=async(v,F)=>{v&&await tt("type",F,v)},ce=async(v,F,ee)=>{await tt(F,ee,v,!1)},le=(v,F)=>{A.value===F?I.value=!1:I.value=!0,A.value=F==null?void 0:F.changeProp},re=async v=>{var ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he;let F=[];if((ee=v==null?void 0:v.toString())!=null&&ee.includes(".urdf")){if(v.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[v],m.value=!0,x.value=!0;return}if((R=v==null?void 0:v.toString())!=null&&R.includes(".stl")||(pe=v==null?void 0:v.toString())!=null&&pe.includes(".STL")||(L=v==null?void 0:v.toString())!=null&&L.includes(".obj")||(Y=v==null?void 0:v.toString())!=null&&Y.includes(".mtl")){h.value=(ie=v==null?void 0:v.toString())==null?void 0:ie.split(","),m.value=!1,x.value=!0;return}if((ge=v==null?void 0:v.toString())!=null&&ge.includes(".stl")||($=v==null?void 0:v.toString())!=null&&$.includes(".STL")||(oe=v==null?void 0:v.toString())!=null&&oe.includes(".obj")||(X=v==null?void 0:v.toString())!=null&&X.includes(".mtl")){let ae,Be=[],Je={};if(Array.isArray(v)?ae=v:ae=v==null?void 0:v.split(","),ae==null||ae.forEach(Me=>{Me.includes(".mtl")?Be.push(Me):Je.blob=Je.blob?Je.blob+","+Me:Me}),(Be==null?void 0:Be.length)>0&&(Je.mtlBlobs=Be),(fe=(_e=Object.values(Je))==null?void 0:_e[0])!=null&&fe.includes("http:"))F.push(Je);else{const Me=new Blob([Je.blob],{type:"application/octet-stream;charset=UTF-8"});let Ve=URL.createObjectURL(Me),me="";(Ee=v==null?void 0:v.split("/"))==null||Ee.forEach((ct,Ke)=>{var be;Ke===((be=v==null?void 0:v.split("/"))==null?void 0:be.length)-1&&(me=ct)}),(P=Je.blob)!=null&&P.includes(".stl")&&(me=(me==null?void 0:me.replaceAll(">",""))+".urdf"),H.value=[{name:me,blobUrl:Ve}],T.value=!0}}else{const ae=Ne.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Be=await p.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ae.close()}),Je=new Blob([Be.data],{type:"application/octet-stream;charset=UTF-8"});let Me=URL.createObjectURL(Je),Ve="";(he=v==null?void 0:v.split("/"))==null||he.forEach((me,ct)=>{var Ke;ct===((Ke=v==null?void 0:v.split("/"))==null?void 0:Ke.length)-1&&(Ve=me)}),H.value=[{name:Ve,blobUrl:Me}],T.value=!0}(F==null?void 0:F.length)>0&&K.setBlobUrls(F)},Te=()=>{T.value=!1},Xe=v=>{var L,Y,ie,ge;const F=(Y=(L=p.cloneDeep(l.itemData))==null?void 0:L.find($=>($==null?void 0:$.key)==="formContent"))==null?void 0:Y.contents,ee=p.cloneDeep(v.content);let R={};ee&&((ie=Object.values(ee))==null?void 0:ie.length)>0&&((ge=Object.values(ee))==null||ge.forEach(($,oe)=>{R[F[oe].key]=$}));const pe={content:R,index:l==null?void 0:l.index,buttonName:v==null?void 0:v.buttonName};c("change",pe)},dt=e.computed(()=>"http://222.92.178.198:62001"),g=async v=>{var _e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe;if(!v)return;(fe=(_e=l==null?void 0:l.itemData)==null?void 0:_e.find(de=>(de==null?void 0:de.key)==="parentFormPath"))==null||fe.contents;let F=$e.value;(F==null?void 0:F.length)>0&&(F=F==null?void 0:F.map(de=>{var Fe,We,N,Ce;let Ae=(Fe=de==null?void 0:de.key)==null?void 0:Fe.split("/");return(l==null?void 0:l.compName)===(Ae==null?void 0:Ae[0])&&(We=d.value)!=null&&We.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1]))&&(de.value=(Ce=(N=d.value)==null?void 0:N.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1])))==null?void 0:Ce.value),de}),se.setTableViewContents(F));const ee=p.cloneDeep(l.itemData);let R=ee==null?void 0:ee.map(de=>{var Ae;return(de==null?void 0:de.key)==="formContent"&&((Ae=de.contents)==null||Ae.map((Fe,We)=>{var N,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It,wt,Dt,Ot,Bt,Ut,Pt;return Fe.type=(Ce=(N=d.value)==null?void 0:N.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ce.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ft=(et=(ut=Fe==null?void 0:Fe.key)==null?void 0:ut.split("$"))==null?void 0:et[1])==null?void 0:ft.length)>0?(He=(Ze=fa.formGetOptions((Se=(rt=Fe==null?void 0:Fe.key)==null?void 0:rt.split("$"))==null?void 0:Se[1]))==null?void 0:Ze.split(","))==null?void 0:He.map(Vt=>({label:Vt,value:Vt})):[],(pt=Fe==null?void 0:Fe.key)!=null&&pt.includes("$")&&(Fe.key=(Tt=(vt=Fe==null?void 0:Fe.key)==null?void 0:vt.split("$"))==null?void 0:Tt[0]),Fe.signature=(wt=(It=d.value)==null?void 0:It.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:wt.signature,Fe.isLoginUser=(Ot=(Dt=d.value)==null?void 0:Dt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ot.isLoginUser,Fe.value=(Bt=Object.values(v))==null?void 0:Bt[We],Fe.isFormColHidden=(Pt=(Ut=d.value)==null?void 0:Ut.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Pt.isFormColHidden,Fe})),de}),pe=d.value,L=(P=(Ee=p.cloneDeep(R))==null?void 0:Ee.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:P.contents;if(pe=pe==null?void 0:pe.map(de=>{var Ae;return de.value=(Ae=L==null?void 0:L.find((Fe,We)=>((Fe==null?void 0:Fe.id)??We)===(de==null?void 0:de.id)))==null?void 0:Ae.value,de}),!I.value){c("contentChange",{contents:R,index:l.index});return}let Y="",ie=(Be=(ae=(he=p.cloneDeep(R))==null?void 0:he.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:ae.contents)==null?void 0:Be.find((de,Ae)=>{var Fe,We,N;return(de==null?void 0:de.label)===A.value||Ae.toString()===((N=(We=(Fe=A.value)==null?void 0:Fe.split("t"))==null?void 0:We[1])==null?void 0:N.toString())}),ge=(Je=ie==null?void 0:ie.optionUrl)==null?void 0:Je.menuSelect,$=!0;if((me=(Ve=(Me=p.cloneDeep(R))==null?void 0:Me.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:Ve.contents)==null||me.forEach(de=>{var Ae,Fe,We,N,Ce,ut;$&&((We=(Fe=(Ae=de==null?void 0:de.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:Fe[1])!=null&&We.includes("["))&&(Y=(Ce=(N=de==null?void 0:de.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1],JSON.stringify(ge)===JSON.stringify((ut=de==null?void 0:de.optionUrl)==null?void 0:ut.menuSelect)&&($=!1))}),(ct=ie==null?void 0:ie.optionUrl)!=null&&ct.menuSelect&&I.value){let de=await fa.getSelectRow(ie),Ae,Fe=(Ke=ie==null?void 0:ie.optionUrl)==null?void 0:Ke.menuSelect;if(de==null||de.forEach(We=>{var N,Ce,ut,et,ft,rt,Se,Ze,He,pt;Y===((Ce=(N=ie==null?void 0:ie.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1])&&((ft=(et=(ut=ie==null?void 0:ie.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])!=null&&ft.includes("["))&&((pt=p.cloneDeep(We))==null?void 0:pt[(He=(Ze=(Se=(rt=ie==null?void 0:ie.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Se[1])==null?void 0:Ze.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])===(ie==null?void 0:ie.value)&&(Ae=We)}),Ae){let We=p.cloneDeep(pe);We=We==null?void 0:We.map(Ce=>{var ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It;return(Ae!=null&&Ae[Ce==null?void 0:Ce.label]||Ae!=null&&Ae[(rt=(ft=(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])==null?void 0:ft.replaceAll("[",""))==null?void 0:rt.replaceAll("]","")])&&((He=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Ze[1])!=null&&He.includes("["))&&Fe!=null&&Fe.every(wt=>{var Dt,Ot;return(Ot=(Dt=Ce==null?void 0:Ce.optionUrl)==null?void 0:Dt.menuSelect)==null?void 0:Ot.includes(wt)})&&(Ce.value=(Ae==null?void 0:Ae[Ce==null?void 0:Ce.label])||(Ae==null?void 0:Ae[(It=(Tt=(vt=(pt=Ce==null?void 0:Ce.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:vt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:It.replaceAll("]","")]),Array.isArray(Ce.value)&&Ce.value.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(Ce.type="Upload")),Ce}),We=We==null?void 0:We.map(Ce=>{var ut,et,ft;return(ut=Ce==null?void 0:Ce.optionUrl)!=null&&ut.oldMenuSelect&&(Ce.optionUrl.menuSelect=(ft=(et=p.cloneDeep(Ce))==null?void 0:et.optionUrl)==null?void 0:ft.oldMenuSelect),Ce}),d.value=p.cloneDeep(We);let N=p.cloneDeep(We);N=N==null?void 0:N.map(Ce=>{var ut,et,ft,rt,Se,Ze;return(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.menuSelect)!=null&&et.some(He=>He==null?void 0:He.includes("["))&&(Ce.optionUrl.oldMenuSelect=(rt=(ft=p.cloneDeep(Ce))==null?void 0:ft.optionUrl)==null?void 0:rt.menuSelect,Ce.optionUrl.menuSelect=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.menuSelect)==null?void 0:Ze.map(He=>{var pt,vt,Tt,It;if(He!=null&&He.includes("[")){let wt=(vt=(pt=He==null?void 0:He.replaceAll("[","").replaceAll("]",""))==null?void 0:pt.split(":"))==null?void 0:vt[1];He=(It=(Tt=p.cloneDeep(We))==null?void 0:Tt.find(Dt=>(Dt==null?void 0:Dt.label)===wt))==null?void 0:It.value}return He})),Ce}),d.value=N}else d.value=pe;R=R==null?void 0:R.map(We=>{var N;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(N=We.contents)==null?void 0:N.map(Ce=>{var ut,et,ft,rt;return Ce.value=((et=(ut=d.value)==null?void 0:ut.find(Se=>(Se==null?void 0:Se.label)===(Ce==null?void 0:Ce.key)))==null?void 0:et.value)??(Ce==null?void 0:Ce.value),Ce.type=((rt=(ft=d.value)==null?void 0:ft.find(Se=>(Se==null?void 0:Se.prop)===(Ce==null?void 0:Ce.key)))==null?void 0:rt.type)??(Ce==null?void 0:Ce.type),Ce})),We})}I.value=!1,c("contentChange",{contents:R,index:l.index});let oe=[],X=[];if((De=p.cloneDeep((be=R==null?void 0:R.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:be.contents))==null||De.forEach(de=>{var Ae;Array.isArray(de==null?void 0:de.value)&&((Ae=de==null?void 0:de.value)!=null&&Ae.find(Fe=>{var We;return(We=Fe==null?void 0:Fe.url)==null?void 0:We.includes(".obj")}))&&(X=de==null?void 0:de.value)}),(X==null?void 0:X.length)>0){const de=(Qe=p.cloneDeep(X))==null?void 0:Qe.filter(Ae=>{var Fe;return(Fe=Ae==null?void 0:Ae.url)==null?void 0:Fe.includes(".obj")});de==null||de.forEach(Ae=>{var We,N,Ce,ut;const Fe=(We=X==null?void 0:X.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:We.map(et=>et==null?void 0:et.url);oe.push({objUrl:Ae==null?void 0:Ae.url,mtlUrls:((N=X==null?void 0:X.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:N.length)===1?(ut=(Ce=X==null?void 0:X.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Ce[0])==null?void 0:ut.url:Fe})}),K.setObjUrl(oe)}},C=v=>{if(!v)return;const F=[];let ee="";for(let R of v)(R.includes("[")||ee.includes("["))&&(ee+=R.trim(),p.cloneDeep(ee).split("【").length-1===p.cloneDeep(ee).split("】").length-1&&p.cloneDeep(ee).split("[").length-1===p.cloneDeep(ee).split("]").length-1&&(F.push(ee.replace(/\/\*[\s\S]*?\*\//g,"")),ee=""));return F},U=(v,F,ee)=>{let R="";const pe=F==null?void 0:F.map(L=>{var Y;return(Y=L==null?void 0:L.value)==null?void 0:Y.pageData});return pe==null||pe.forEach(L=>{var Y;(L==null?void 0:L.name)===(v==null?void 0:v[0])&&((Y=L==null?void 0:L.compData)==null||Y.forEach(ie=>{var ge;(ie==null?void 0:ie.key)==="formContent"&&((ge=ie==null?void 0:ie.contents)==null||ge.forEach($=>{var oe;($==null?void 0:$.prop)===(v==null?void 0:v[1])&&(R=($==null?void 0:$.value)===""?Ne.judgeContents((oe=p.cloneDeep($))==null?void 0:oe.optionUrl,ee):$==null?void 0:$.value)}))}))}),R},J=(v,F,ee,R)=>{var ie,ge;let pe="",L="";(ie=p.cloneDeep(F))==null||ie.forEach(($,oe)=>{$!=null&&$.includes("[")?L=L+q.value+v[oe]:L=L===""?L+$:L+"/"+$});let Y=(ge=R[L])==null?void 0:ge.map($=>{var oe;return(oe=$==null?void 0:$.value)==null?void 0:oe.pageData});return Y==null||Y.forEach($=>{var oe;($==null?void 0:$.name)===(ee==null?void 0:ee[0])&&((oe=$==null?void 0:$.compData)==null||oe.forEach(X=>{var _e;(X==null?void 0:X.key)==="formContent"&&((_e=X==null?void 0:X.contents)==null||_e.forEach(fe=>{(fe==null?void 0:fe.prop)===(ee==null?void 0:ee[1])&&(pe=fe==null?void 0:fe.value)}))}))}),pe};return e.watch(()=>l.itemData,async()=>{var Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke;const v=(Y=l.itemData)==null?void 0:Y.find(be=>(be==null?void 0:be.key)==="formContent"),F=(ie=p.cloneDeep(l.itemData))==null?void 0:ie.find(be=>(be==null?void 0:be.key)==="formButton"),ee=(ge=p.cloneDeep(l.itemData))==null?void 0:ge.find(be=>(be==null?void 0:be.key)==="formFlex"),R=($=p.cloneDeep(l.itemData))==null?void 0:$.find(be=>(be==null?void 0:be.key)==="formWrap"),pe=(oe=p.cloneDeep(l.itemData))==null?void 0:oe.find(be=>(be==null?void 0:be.key)==="enableWrap");if((R==null?void 0:R.contents)==="纵向"?E.value=!1:E.value=!0,G.value=(pe==null?void 0:pe.contents)===void 0?!1:pe==null?void 0:pe.contents,w.value=typeof(ee==null?void 0:ee.contents)!="boolean"?!(!(ee!=null&&ee.contents)===""||((X=ee==null?void 0:ee.contents)==null?void 0:X.toUpperCase())==="VERTICAL"):ee==null?void 0:ee.contents,((_e=v==null?void 0:v.contents)==null?void 0:_e.length)>0&&Array.isArray(v==null?void 0:v.contents)){let be=l.allMapContents;const De=(Ee=(fe=p.cloneDeep(v))==null?void 0:fe.contents)==null?void 0:Ee.map((N,Ce)=>{var wt,Dt,Ot,Bt,Ut,Pt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn;let ut=(N==null?void 0:N.label)??(N==null?void 0:N.key)??"",et=(N==null?void 0:N.type)??"",ft=(N==null?void 0:N.options)??[];if((wt=N==null?void 0:N.key)!=null&&wt.includes("$")&&(ut=(Dt=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Dt[0],((Bt=(Ot=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Ot[1])==null?void 0:Bt.length)>0)){const[kt,Jt]=(Pt=(Ut=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Ut[1])==null?void 0:Pt.split(/[()]/);et=((Vt=Ne.FormType.find(gt=>(gt==null?void 0:gt.key)===kt))==null?void 0:Vt.value)??"",((qt=Jt==null?void 0:Jt.split(","))==null?void 0:qt.length)>0&&(ft=(wn=Jt==null?void 0:Jt.split(","))==null?void 0:wn.map(gt=>({label:gt,value:gt})))}let rt=[];N!=null&&N.contents&&!Array.isArray(N==null?void 0:N.contents)&&(rt=(Dn=(fn=N==null?void 0:N.contents)==null?void 0:fn.split(","))==null?void 0:Dn.map(kt=>({label:kt,value:kt}))),((Sn=N==null?void 0:N.optionUrl)==null?void 0:Sn.selectRelateType)==="自定义绑定"&&(rt=(Tn=(hn=N==null?void 0:N.optionUrl)==null?void 0:hn.defaultSelect)==null?void 0:Tn.map(kt=>({label:kt,value:kt})));let Se=!1,Ze=(N==null?void 0:N.isFormColHidden)??!1,He=Ne.judgeContents((vn=p.cloneDeep(N))==null?void 0:vn.optionUrl,be),pt=He!==void 0&&He!==""?He:N!=null&&N.originalContent&&(N==null?void 0:N.originalContent)!==""?N.originalContent:N!=null&&N.value?N.value:(ft==null?void 0:ft.length)>0?(In=ft==null?void 0:ft[0])==null?void 0:In.value:(N==null?void 0:N.value)??"",vt=!1,Tt=He!==void 0||et===""?"Input":et;if((Array.isArray(He)&&(He!=null&&He.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url)))||Array.isArray(pt)&&(pt!=null&&pt.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url))))&&(Tt="upload"),typeof pt=="string"&&(pt!=null&&pt.includes("loginUser"))&&!(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.isLoginUser)Se=!0,pt=((gn=k.value)==null?void 0:gn.姓名)||((Xn=k.value)==null?void 0:Xn.account)||((Yn=k.value)==null?void 0:Yn.账号)||((Jn=k.value)==null?void 0:Jn.userName);else if(typeof pt=="string"&&(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.signature||N!=null&&N.isShow)if(vt=!0,(N==null?void 0:N.isShow)==="originalSignature")Tt="image",pt=dt.value+"/"+((jn=k.value)==null?void 0:jn.signature);else{let kt=[...new Set(C(N.isShow))].map(Mt=>{var Nn,on,Vn,Zt;return{key:(Zt=(Vn=(on=(Nn=Mt==null?void 0:Mt.split("["))==null?void 0:Nn[1])==null?void 0:on.split("]"))==null?void 0:Vn[0])==null?void 0:Zt.split(":"),value:""}});(Bn=nt.value)==null||Bn.forEach(Mt=>{kt==null||kt.forEach((yn,Nn)=>{var Vn;let on=yn==null?void 0:yn.key;(Mt==null?void 0:Mt.name)===(on==null?void 0:on[0].replaceAll("'",""))&&((Vn=Mt==null?void 0:Mt.compData)==null||Vn.forEach(Zt=>{var Kn;(Zt==null?void 0:Zt.key)==="formContent"&&((Kn=Zt==null?void 0:Zt.contents)==null||Kn.forEach(bn=>{(bn==null?void 0:bn.prop)===(on==null?void 0:on[1].replaceAll("'",""))&&(kt[Nn].value=bn==null?void 0:bn.value)}))}))})});let Jt=kt==null?void 0:kt.map(Mt=>{var yn;return Mt.key="["+((yn=Mt.key)==null?void 0:yn.join(":"))+"]",Mt}),gt=N==null?void 0:N.isShow;Jt==null||Jt.forEach(Mt=>{Mt!=null&&Mt.value?gt=gt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):gt=gt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),gt!=null&&gt.includes("(")||(gt!=null&&gt.includes("==")?gt=((mn=gt==null?void 0:gt.split("==="))==null?void 0:mn[0])+"==='"+((zn=gt==null?void 0:gt.split("==="))==null?void 0:zn[1])+"'":gt=((An=gt==null?void 0:gt.split("="))==null?void 0:An[0])+"='"+((an=gt==null?void 0:gt.split("="))==null?void 0:an[1])+"'"),gt!=null&&gt.includes("=")&&!(gt!=null&&gt.includes("=="))&&!(gt!=null&&gt.includes("==="))&&(gt=gt==null?void 0:gt.replaceAll("=","==")),new Function(`if (${gt}) { return true } else { return false }`)()?(Ze=!1,Tt="image",pt=dt.value+"/"+((Cn=k.value)==null?void 0:Cn.signature)):pt=""}return Array.isArray(pt)&&pt.every(kt=>(kt==null?void 0:kt.url)&&(kt==null?void 0:kt.name))&&(N.type="Upload"),N!=null&&N.isMainUrl&&(Tt="Url"),{label:ut??"",name:"t"+Ce,prop:p.cloneDeep(N==null?void 0:N.key),type:Tt,value:N!=null&&N.isNewDate&&pt===""?new Date:pt,id:(N==null?void 0:N.id)??Ce,contents:(rt==null?void 0:rt.length)>0?rt:ft??[],width:(N==null?void 0:N.width)??1,isLoginUser:Se,config:N==null?void 0:N.config,optionUrl:(N==null?void 0:N.optionUrl)??N,isFormColHidden:Ze,signature:vt,isMain:N==null?void 0:N.isMain,isMainUrl:N==null?void 0:N.isMainUrl,operable:(N==null?void 0:N.operable)??!1,disabled:(N==null?void 0:N.disabled)??!1}}),Qe=De==null?void 0:De.map(N=>N==null?void 0:N.value);let de="";Qe==null||Qe.forEach(N=>{N!==""&&N!==void 0&&(de=de===""?N:de+"/"+N)}),W.setSelectArray(Qe),W.setSelectString(de);let Ae=(P=p.cloneDeep(De))==null?void 0:P.map(N=>(N!=null&&N.value&&Ne.IsJson(N==null?void 0:N.value)&&Array.isArray(JSON.parse(N==null?void 0:N.value))&&(N.value=JSON.parse(N.value)),N));Ae=Ae==null?void 0:Ae.map(N=>{var Ce,ut,et,ft,rt,Se,Ze,He;if((ut=(Ce=N==null?void 0:N.optionUrl)==null?void 0:Ce.menuSelect)!=null&&ut.some(pt=>pt==null?void 0:pt.includes("["))){let pt="";N.optionUrl.oldMenuSelect=(ft=(et=p.cloneDeep(N))==null?void 0:et.optionUrl)==null?void 0:ft.menuSelect,N.optionUrl.menuSelect=(Se=(rt=N==null?void 0:N.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:Se.map(vt=>{var Tt,It,wt,Dt,Ot,Bt;if(vt!=null&&vt.includes("[")){let Ut=(It=(Tt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:It[1];pt=U((wt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:wt.split(":"),be==null?void 0:be[Ue.value],be),vt=((Ot=(Dt=p.cloneDeep(Ae))==null?void 0:Dt.find(Pt=>(Pt==null?void 0:Pt.label)===Ut))==null?void 0:Ot.value)||U((Bt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"),be==null?void 0:be[Ue.value],be)}return vt}),pt!==""&&N.value===""&&(N.value=J(N.optionUrl.menuSelect,N.optionUrl.oldMenuSelect,(Ze=N==null?void 0:N.optionUrl)==null?void 0:Ze.groupSelect,be),Array.isArray(N.value)&&((He=N.value)!=null&&He.every(vt=>vt==null?void 0:vt.url))&&(N.type="UPLOAD"))}return N}),d.value=Ae,te.value=((he=d.value)==null?void 0:he.every(N=>N==null?void 0:N.disabled))||ue.value===Ue.value,ne.value=(ae=d.value)==null?void 0:ae.every(N=>N==null?void 0:N.operable),M.value=(Be=d.value)==null?void 0:Be.map(N=>N==null?void 0:N.label);let Fe=[],We=[];if((Je=p.cloneDeep(d.value))==null||Je.forEach(N=>{var Ce;Array.isArray(N==null?void 0:N.value)&&((Ce=N==null?void 0:N.value)!=null&&Ce.find(ut=>{var et;return(et=ut==null?void 0:ut.url)==null?void 0:et.includes(".obj")}))&&(We=N==null?void 0:N.value)}),(We==null?void 0:We.length)>0){const N=(Me=p.cloneDeep(We))==null?void 0:Me.filter(Ce=>{var ut;return(ut=Ce==null?void 0:Ce.url)==null?void 0:ut.includes(".obj")});N==null||N.forEach(Ce=>{var et,ft,rt,Se;const ut=(et=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:et.map(Ze=>Ze==null?void 0:Ze.url);Fe.push({objUrl:Ce==null?void 0:Ce.url,mtlUrls:((ft=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:ft.length)===1?(Se=(rt=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:rt[0])==null?void 0:Se.url:ut})}),K.setObjUrl(Fe)}(Ve=p.cloneDeep(d.value))==null||Ve.forEach(N=>{var Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It,wt;if((ut=(Ce=N==null?void 0:N.value)==null?void 0:Ce.toString())!=null&&ut.includes(".stl")||(ft=(et=N==null?void 0:N.value)==null?void 0:et.toString())!=null&&ft.includes(".STL")||(Se=(rt=N==null?void 0:N.value)==null?void 0:rt.toString())!=null&&Se.includes(".obj")||(He=(Ze=N==null?void 0:N.value)==null?void 0:Ze.toString())!=null&&He.includes(".mtl")||(vt=(pt=N==null?void 0:N.value)==null?void 0:pt.toString())!=null&&vt.includes(".urdf")){let Dt={},Ot=[],Bt;Array.isArray(N==null?void 0:N.value)?Bt=N==null?void 0:N.value:Bt=(Tt=N==null?void 0:N.value)==null?void 0:Tt.split(","),Bt==null||Bt.forEach(Ut=>{Ut.includes(".mtl")?Ot.push(Ut):Dt.blob=Dt.blob==="undefined"?Ut:Dt.blob+","+Ut}),(Ot==null?void 0:Ot.length)>0&&(Dt.mtlBlobs=Ot),(wt=(It=Object.values(Dt))==null?void 0:It[0])!=null&&wt.includes("http:")}})}else d.value=[];let L=$e.value;if((L==null?void 0:L.length)>0&&(L=L==null?void 0:L.map(be=>{var Qe,de,Ae,Fe;let De=(Qe=be==null?void 0:be.key)==null?void 0:Qe.split("/");return(l==null?void 0:l.compName)===(De==null?void 0:De[0])&&(de=d.value)!=null&&de.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1]))&&(be.value=(Fe=(Ae=d.value)==null?void 0:Ae.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1])))==null?void 0:Fe.value),be}),se.setTableViewContents(L)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let be={};(me=p.cloneDeep(d).value)==null||me.forEach(De=>{(De==null?void 0:De.isMain)===!0&&(be[(De==null?void 0:De.prop)??(De==null?void 0:De.name)]=[{required:!0,message:`${(De==null?void 0:De.prop)||(De==null?void 0:De.name)}不能为空`}])}),D.value=be}if(((ct=F==null?void 0:F.contents)==null?void 0:ct.length)>0){const be=[];(Ke=F==null?void 0:F.contents)==null||Ke.forEach((De,Qe)=>{(De==null?void 0:De.label)!==""&&be.push({label:(De==null?void 0:De.label)??"",id:(De==null?void 0:De.id)??Qe,type:(De==null?void 0:De.type)??"",background:De==null?void 0:De.background})}),O.value=be}else O.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ue.value,v=>{te.value=v===Ue.value},{immediate:!0}),(v,F)=>{const ee=e.resolveComponent("svg-icon"),R=e.resolveComponent("el-switch"),pe=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-popover"),Y=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Mr,[e.createVNode(Nt.ssForm,{rowContents:d.value,formRules:D.value,buttonValue:O.value,isRowFlex:!1,isEnableWrap:G.value,onOnButtonClick:Xe,onChange:g,formDisabled:te.value,formLabelsOperable:ne.value,isButtonRow:E.value,onPreview:re,onBlurChange:le,onHandleColEditChange:at,onHandleColTypeChange:Le,onRouteUrl:lt,onClickTrigger:qe},{operateCol:e.withCtx(({renderColumns:ie,formDisabled:ge,formLabelsOperable:$})=>[e.createVNode(L,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Oe},{reference:e.withCtx(()=>[e.createElementVNode("span",zr,[e.createVNode(ee,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Rr,[F[1]||(F[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(R,{"model-value":ge,"active-text":"禁用","inactive-text":"",onChange:xe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(R,{"model-value":$,"active-text":"编辑所有标签","inactive-text":"",onChange:Re},null,8,["model-value"]),F[2]||(F[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Y,{modelValue:M.value,"onUpdate:modelValue":F[0]||(F[0]=oe=>M.value=oe),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:_,onChange:Ye},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie,oe=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:oe.label},[e.createVNode(pe,{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(L,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(ee,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var X;return[e.createElementVNode("div",Lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((X=Object.keys(oe))==null?void 0:X.filter(_e=>{var fe;return(fe=ye.value)==null?void 0:fe.find(Ee=>(Ee==null?void 0:Ee.value)===_e)}),_e=>{var fe,Ee;return e.openBlock(),e.createElementBlock("div",{key:_e},[e.createVNode(Nt._sfc_main$1,{value:oe==null?void 0:oe[_e],"active-text":(Ee=(fe=ye.value)==null?void 0:fe.find(P=>(P==null?void 0:P.value)===_e))==null?void 0:Ee.label,inactiveText:"",onChange:P=>ce(P,_e,oe)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Pr,[e.createVNode(ee,{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"]),T.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:0,fileDataList:H.value,onDestroy:Te},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Yt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{"file-urls":h.value,isThreeScene:m.value,onGetAnimationData:v.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Vo=Lt._export_sfc(Fr,[["__scopeId","data-v-b08c7a6b"]]),qa=e.ref(0),yl=a=>{var s;return!a||(a==null?void 0:a.length)===0?[]:(s=p.cloneDeep(a))==null?void 0:s.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:yl(l==null?void 0:l.children)},l))},$r=a=>{var i;return(i=p.cloneDeep(a))==null?void 0:i.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:yl(l==null?void 0:l.children)},l))},bl=(a,s)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===s)?(i=p.cloneDeep(a))==null?void 0:i.filter(c=>(c==null?void 0:c.id)!==s):(a=a==null?void 0:a.map(l=>(l.children=bl(l==null?void 0:l.children,s),l)),a)},kl=(a,s)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(i=p.cloneDeep(a))==null?void 0:i.map(c=>((c==null?void 0:c.id)===(s==null?void 0:s.id)&&(c=s),c)):(a=a==null?void 0:a.map(l=>(l.children=kl(l==null?void 0:l.children,s),l)),a)},xl=(a,s)=>{var i;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=s==null?void 0:s.contents)==null?void 0:c.id)})?(i=p.cloneDeep(a))==null?void 0:i.map(c=>{var d;return(c==null?void 0:c.id)===((d=s==null?void 0:s.contents)==null?void 0:d.id)&&(c=s==null?void 0:s.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=xl(l==null?void 0:l.children,s),l)),a)},wl=(a,s)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(i=p.cloneDeep(a))==null?void 0:i.map(c=>((c==null?void 0:c.id)===(s==null?void 0:s.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(s.contents)),c)):(a=a==null?void 0:a.map(l=>(l.children=wl(l==null?void 0:l.children,s),l)),a)},St=[{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"}],jr=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Kr=[{label:"新增",value:"add"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Kr},{key:"background",label:"按钮背景色",type:"Color"}],Pn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:jr},{key:"textColor",label:"按钮颜色",type:"Color"}],Ur={class:"table-header-child"},Wr={class:"table-header-child-main"},Hr={class:"table-header-child-content"},qr={class:"table-header-child-content-item"},Gr={class:"fix-button"},Xr={key:0},Yr={class:"form-content"},Jr={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:s}){const i=a,l=s,c=e.ref(!1),d=e.ref(""),x=Ne.useTableComp(p.pinia),{tableIndex:m}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),T=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let I=p.cloneDeep(m.value)+1;x.setTableIndex(I),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:m.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},O=w=>{l("fixChange",p.cloneDeep(w))},H=w=>{l("deleteChange",p.cloneDeep(w))},V=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:m.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},ke=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},W=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const I=St==null?void 0:St.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));I?w[I.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),w.id="id"+m.value,(k=D.value)==null||k.forEach(I=>{const se=St==null?void 0:St.find($e=>($e==null?void 0:$e.label)===(I==null?void 0:I.label));se?w[se.key]=I.value:I!=null&&I.children&&I.children.length>0&&(w.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},K=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},G=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,z)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ur,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(A,I)=>(e.openBlock(),e.createElementBlock("div",Wr,[e.createElementVNode("div",Hr,[e.createElementVNode("div",qr,e.toDisplayString(A.label),1),e.createElementVNode("div",Gr,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>V(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>T(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>G(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",Xr,[e.createVNode(Dl,{tableChildContents:A==null?void 0:A.children,onDeleteChange:H,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yr,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:W},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Qr=Lt._export_sfc(Jr,[["__scopeId","data-v-e0fef72d"]]),Zr={class:"table-header-child"},ei={class:"table-header-child-main"},ti={class:"table-header-child-content"},ni={class:"table-header-child-content-item"},ai={class:"fix-button"},oi={key:0},li={class:"form-content"},ri={class:"dialog-footer"},ii={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:s}){const i=a,l=s,c=e.ref(!1),d=e.ref(""),x=Ne.useTableComp(p.pinia),{tableIndex:m}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),T=w=>{l("fixChange",p.cloneDeep(w))},O=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let I=p.cloneDeep(m.value)+1;x.setTableIndex(I),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:m.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},H=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:m.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},V=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},ke=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const I=St==null?void 0:St.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));I?w[I.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),w.id="idChild"+m.value,(k=D.value)==null||k.forEach(I=>{const se=St==null?void 0:St.find($e=>($e==null?void 0:$e.label)===(I==null?void 0:I.label));se?w[se.key]=I.value:I!=null&&I.children&&I.children.length>0&&(w.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},W=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},K=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},G=w=>{l("deleteChange",w)};return(w,z)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(I,se)=>(e.openBlock(),e.createElementBlock("div",ei,[e.createElementVNode("div",ti,[e.createElementVNode("div",ni,e.toDisplayString(I.label),1),e.createElementVNode("div",ai,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$e=>H(I)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$e=>O(I)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$e=>K(I)},null,8,["onClick"])])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",oi,[e.createVNode(Qr,{tableChildContents:I==null?void 0:I.children,onDeleteChange:G,onFixChange:T},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",li,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:V},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ri,[e.createVNode(A,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Dl=Lt._export_sfc(ii,[["__scopeId","data-v-ebd68fa1"]]),si={class:"table-operate-content"},ci={class:"table-operate-item"},ui={class:"operate-title"},pi={class:"operate-content"},di={class:"fix-content"},fi={class:"fix-content-label"},hi={class:"fix-button"},vi={key:0},gi={class:"operate-title"},mi={class:"operate-content"},yi={class:"fix-content"},bi={class:"fix-content-label"},ki={class:"fix-button"},xi={class:"operate-title"},wi={class:"operate-content"},Di={class:"fix-content"},Ci={class:"fix-content-label"},Ei={class:"fix-button"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={class:"operate-content"},Ni={style:{display:"flex","justify-content":"space-between"}},Vi={class:"form-content"},Oi={class:"dialog-footer"},Mi={class:"form-content"},zi={class:"dialog-footer"},Ri={class:"form-content"},Li={class:"dialog-footer"},Pi={class:"form-content"},Fi={class:"dialog-footer"},$i={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([]),d=e.ref(!1),x=e.ref(!1),m=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),T=e.ref([]),O=e.ref(""),H=e.ref(""),V=e.ref([]),ke=e.ref([]),W=e.ref([]),K=e.ref([]),G=e.ref(!1),w=e.ref([]),z=e.ref([]),k=e.ref(0),A=e.ref([]),I=e.ref([]),se=e.ref([]),$e=()=>{G.value=!0;let g=[];Ln==null||Ln.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:k.value,contents:C==null?void 0:C.options})}),w.value=g,z.value=g},nt=()=>{var C,U,J;x.value=!0;let g=[];(J=(U=(C=Ne.FormContent)==null?void 0:C.find(v=>(v==null?void 0:v.key)==="Input"))==null?void 0:U.value)==null||J.forEach(v=>{k.value++,g.push({label:v==null?void 0:v.label,name:(v==null?void 0:v.name)||(v==null?void 0:v.label),type:v.type,value:(v==null?void 0:v.label)==="类型"?"Input":"",id:k.value,contents:v==null?void 0:v.options})}),A.value=g,I.value=g},Ie=g=>{g||(A.value=I.value)},ze=async g=>{var C,U,J,v,F,ee,R,pe,L,Y,ie,ge;if((g==null?void 0:g.类型)!==((U=(C=I.value)==null?void 0:C.find($=>($==null?void 0:$.label)==="类型"))==null?void 0:U.value)){let $=[],oe=await((F=(v=(J=Ne.FormContent)==null?void 0:J.find(X=>(X==null?void 0:X.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:v.value)==null?void 0:F.value)?await((Y=(L=(pe=Ne.FormContent)==null?void 0:pe.find(X=>(X==null?void 0:X.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:L.value)==null?void 0:Y.value):(R=(ee=Ne.FormContent)==null?void 0:ee.find(X=>(X==null?void 0:X.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:R.value;if(oe==null||oe.forEach(X=>{k.value++,$.push({label:X==null?void 0:X.label,name:(X==null?void 0:X.name)||(X==null?void 0:X.label),type:X.type,value:X!=null&&X.属性名?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):(g==null?void 0:g[X.label])??"",id:k.value,contents:X==null?void 0:X.options,prop:(X==null?void 0:X.prop)||(X==null?void 0:X.name)||(X==null?void 0:X.label)})}),g!=null&&g.菜单选项&&((ie=g==null?void 0:g.菜单选项)==null?void 0:ie.length)>0){const X=await Ne.menuToContentType(g==null?void 0:g.菜单选项);$=$==null?void 0:$.map(_e=>((_e==null?void 0:_e.name)==="组信息选项"&&(_e.contents=X),_e))}I.value=await Ne.selectToBase(p.cloneDeep($)),A.value=await Ne.selectToBase(p.cloneDeep($))}else{let $=p.cloneDeep(A.value);if($=$==null?void 0:$.map(oe=>(oe.value=g==null?void 0:g[oe.name],oe)),g!=null&&g.菜单选项&&((ge=g==null?void 0:g.菜单选项)==null?void 0:ge.length)>0){const oe=await Ne.menuToContentType(g==null?void 0:g.菜单选项);$=$==null?void 0:$.map(X=>((X==null?void 0:X.name)==="组信息选项"&&(X.contents=oe),X))}$=Ne.formToOptionsContents($),I.value=await Ne.selectToBase(p.cloneDeep($))}},ue=async g=>{await ze(g),A.value=I.value},_=(g,C)=>{if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="selectRelateType"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.selectRelateType)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="menuSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.menuSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="groupSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.groupSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="originalContent")return(C==null?void 0:C.value)||C[g.key];if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="multiple"){const U=C[g.key];return ml(U)?U:g.default}return(g==null?void 0:g.label)==="类型"&&C[g.key]===""?"Input":(g==null?void 0:g.key)==="isFormColHidden"&&!C[g.key]?!1:C[g.key]},ne=async g=>{var J,v,F,ee,R,pe,L,Y,ie;x.value=!0;let C=[];const U=await((F=(v=(J=Ne.FormContent)==null?void 0:J.find(ge=>(ge==null?void 0:ge.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:v.value)==null?void 0:F.value)?await((Y=(L=(pe=Ne.FormContent)==null?void 0:pe.find(ge=>(ge==null?void 0:ge.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:L.value)==null?void 0:Y.value):(R=(ee=Ne.FormContent)==null?void 0:ee.find(ge=>(ge==null?void 0:ge.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:R.value;if(U==null||U.forEach(ge=>{k.value++,C.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.name)||(ge==null?void 0:ge.label),type:ge.type,value:(ge==null?void 0:ge.label)==="属性名"?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):_(ge,g),id:k.value,contents:ge==null?void 0:ge.options})}),g!=null&&g.menuSelect&&((ie=g==null?void 0:g.menuSelect)==null?void 0:ie.length)>0){const ge=await Ne.menuToContentType(g==null?void 0:g.menuSelect);C=C==null?void 0:C.map($=>(($==null?void 0:$.name)==="组信息选项"&&($.contents=ge),$))}O.value=g==null?void 0:g.id,A.value=await Ne.selectToBase(Ne.formToOptionsContents(C)),I.value=await Ne.selectToBase(Ne.formToOptionsContents(C))},te=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;se.value=(C=p.cloneDeep(se.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="tableToForm"&&(J.contents=se.value),J))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ve=()=>{x.value=!1,A.value=[],O.value=""},Ue=async()=>{var J,v,F,ee,R,pe,L,Y,ie,ge;A.value=I.value;let g={};O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value);let C=await((F=(v=(J=Ne.FormContent)==null?void 0:J.find($=>{var oe,X;return($==null?void 0:$.key)===(((X=(oe=A.value)==null?void 0:oe.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:X.value)??"label")}))==null?void 0:v.value)==null?void 0:F.value)??((R=(ee=Ne.FormContent)==null?void 0:ee.find($=>{var oe,X;return($==null?void 0:$.key)===(((X=(oe=A.value)==null?void 0:oe.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:X.value)??"label")}))==null?void 0:R.value);if((pe=A.value)==null||pe.forEach($=>{const oe=C==null?void 0:C.find(X=>(X==null?void 0:X.label)===($==null?void 0:$.label));oe&&(g[oe.key]=$.value)}),g.name=g.label,(L=se.value)!=null&&L.find($=>$.id===g.id))se.value=(Y=se.value)==null?void 0:Y.map($=>($.id===g.id&&($=g),$));else{let $=p.cloneDeep(se.value);se.value||(se.value=[]),$.push(g),se.value=$}se.value=se.value.map(({id:$,...oe})=>oe),x.value=!1,O.value="";let U=p.cloneDeep(i.originalItemContents);(ie=p.cloneDeep(i.originalItemContents))!=null&&ie.find($=>($==null?void 0:$.key)==="tableToForm")?U=(ge=p.cloneDeep(i.originalItemContents))==null?void 0:ge.map($=>(($==null?void 0:$.key)==="tableToForm"&&($.contents=se.value),$)):U.push({key:"tableToForm",contents:se.value}),l("change",U)},st=g=>{G.value=!0;let C=[];Ln==null||Ln.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:g[U.key],id:k.value,contents:U==null?void 0:U.options})}),O.value=g==null?void 0:g.id,w.value=C,z.value=C};e.watch(()=>E.value,()=>{var C,U;let g=p.cloneDeep(i.originalItemContents);(C=p.cloneDeep(i.originalItemContents))!=null&&C.find(J=>(J==null?void 0:J.key)==="page")?g=(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="page"&&(J.contents=E.value),J)):g.push({key:"page",contents:E.value}),l("change",g)},{deep:!0});const q=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;ke.value=(C=p.cloneDeep(ke.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="extraButton"&&(J.contents=ke.value),J))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var U,J,v,F,ee;w.value=z.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(U=w.value)==null||U.forEach(R=>{const pe=Ln==null?void 0:Ln.find(L=>(L==null?void 0:L.label)===(R==null?void 0:R.label));pe?g[pe.key]=R.value:R!=null&&R.children&&R.children.length>0&&(g.children=R.children)}),(J=ke.value)!=null&&J.find(R=>R.id===g.id))ke.value=(v=ke.value)==null?void 0:v.map(R=>(R.id===g.id&&(R=g),R));else{let R=p.cloneDeep(ke.value)??[];R.push(g),ke.value=R}G.value=!1,O.value="";let C=p.cloneDeep(i.originalItemContents);(F=p.cloneDeep(i.originalItemContents))!=null&&F.find(R=>(R==null?void 0:R.key)==="extraButton")?C=(ee=p.cloneDeep(i.originalItemContents))==null?void 0:ee.map(R=>((R==null?void 0:R.key)==="extraButton"&&(R.contents=ke.value),R)):C.push({key:"extraButton",contents:ke.value}),l("change",C)},ye=g=>{let C=p.cloneDeep(z.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=g==null?void 0:g[U.name]),U)),z.value=C},xe=()=>{G.value=!1,w.value=[],O.value=""},Re=g=>{h.value=!0;let C=[];Pn==null||Pn.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:g[U.key],id:k.value,contents:U==null?void 0:U.options})}),O.value=g==null?void 0:g.id,W.value=C,K.value=C},Oe=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;V.value=(C=p.cloneDeep(V.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="rowButton"&&(J.contents=V.value),J))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ye=()=>{d.value=!0;let g=[];St==null||St.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),D.value=g,T.value=g},qe=()=>{h.value=!0;let g=[];Pn==null||Pn.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),W.value=g,K.value=g},lt=g=>{let C=p.cloneDeep(K.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=g==null?void 0:g[U.name]),U)),K.value=C},Z=()=>{var U,J,v,F,ee;W.value=K.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(U=W.value)==null||U.forEach(R=>{const pe=Pn==null?void 0:Pn.find(L=>(L==null?void 0:L.label)===(R==null?void 0:R.label));pe?g[pe.key]=R.value:R!=null&&R.children&&R.children.length>0&&(g.children=R.children)}),(J=V.value)!=null&&J.find(R=>R.id===g.id))V.value=(v=V.value)==null?void 0:v.map(R=>(R.id===g.id&&(R=g),R));else{let R=p.cloneDeep(V.value);R.push(g),V.value=R}h.value=!1,O.value="";let C=p.cloneDeep(i.originalItemContents);(F=p.cloneDeep(i.originalItemContents))!=null&&F.find(R=>(R==null?void 0:R.key)==="rowButton")?C=(ee=p.cloneDeep(i.originalItemContents))==null?void 0:ee.map(R=>((R==null?void 0:R.key)==="rowButton"&&(R.contents=V.value),R)):C.push({key:"rowButton",contents:V.value}),l("change",C)},tt=()=>{h.value=!1,O.value="",K.value=[],W.value=[]},at=g=>{d.value=!0;let C=[];St==null||St.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:k.value,contents:U==null?void 0:U.options})}),D.value=C,H.value=g==null?void 0:g.id,T.value=C},Le=g=>{var C;m.value=bl(p.cloneDeep(m.value),g==null?void 0:g.id),l("change",(C=p.cloneDeep(i.originalItemContents))==null?void 0:C.map(U=>{var J;return(U==null?void 0:U.key)==="header"&&(U.contents=(J=m.value)!=null&&J.some(v=>v==null?void 0:v.children)?[m.value]:m.value),U}))},ce=g=>{var U,J,v;g.type==="fix"?g.id!==""?m.value=xl(m.value,g):m.value=kl(m.value,g==null?void 0:g.contents):m.value=wl(m.value,g),m.value=(U=m.value)!=null&&U.some(F=>F==null?void 0:F.children)?[m.value]:m.value,O.value="";let C=p.cloneDeep(i.originalItemContents);(J=p.cloneDeep(i.originalItemContents))!=null&&J.find(F=>(F==null?void 0:F.key)==="header")?C=(v=p.cloneDeep(i.originalItemContents))==null?void 0:v.map(F=>((F==null?void 0:F.key)==="header"&&(F.contents=m.value),F)):C.push({key:"header",contents:m.value}),l("change",C)},le=g=>{var U;d.value=!0;let C=[];St==null||St.forEach(J=>{k.value++,C.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:g[J.key],id:k.value,contents:J==null?void 0:J.options})}),g!=null&&g.children&&((U=g==null?void 0:g.children)==null?void 0:U.length)>0&&C.push({children:g==null?void 0:g.children,isFormColHidden:!0}),O.value=g==null?void 0:g.id,H.value="",D.value=C,T.value=C},re=g=>{let C=p.cloneDeep(T.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=g==null?void 0:g[U.name]),U)),T.value=C},Te=()=>{d.value=!1,O.value="",H.value="",T.value=[]},Xe=()=>{var U,J,v,F,ee,R;D.value=T.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(U=D.value)==null||U.forEach(pe=>{const L=St==null?void 0:St.find(Y=>(Y==null?void 0:Y.label)===(pe==null?void 0:pe.label));L?g[L.key]=pe.value:pe!=null&&pe.children&&pe.children.length>0&&(g.children=pe.children)}),(J=m.value)!=null&&J.find(pe=>pe.id===g.id))m.value=(v=m.value)==null?void 0:v.map(pe=>(pe.id===g.id&&(pe=g),pe));else{let pe=p.cloneDeep(m.value)??[];H.value===""?pe.push(g):pe=pe==null?void 0:pe.map(L=>(L.id===H.value&&(L.children||(L.children=[]),L.children.push(g)),L)),m.value=pe}m.value=(F=m.value)!=null&&F.some(pe=>pe==null?void 0:pe.children)?[m.value]:m.value,d.value=!1,O.value="",H.value="";let C=p.cloneDeep(i.originalItemContents);(ee=p.cloneDeep(i.originalItemContents))!=null&&ee.find(pe=>(pe==null?void 0:pe.key)==="header")?C=(R=p.cloneDeep(i.originalItemContents))==null?void 0:R.map(pe=>((pe==null?void 0:pe.key)==="header"&&(pe.contents=m.value),pe)):C.push({key:"header",contents:m.value}),l("change",C)},dt=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;m.value=(C=p.cloneDeep(m.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>{var v;return(J==null?void 0:J.key)==="header"&&(J.contents=(v=m.value)!=null&&v.some(F=>F==null?void 0:F.children)?[m.value]:m.value),J})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var g,C,U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(c.value=p.cloneDeep(i.originalItemContents),m.value=(C=(g=c.value)==null?void 0:g.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:C.contents,V.value=(J=(U=c.value)==null?void 0:U.find(P=>(P==null?void 0:P.key)==="rowButton"))==null?void 0:J.contents,ke.value=(F=(v=c.value)==null?void 0:v.find(P=>(P==null?void 0:P.key)==="extraButton"))==null?void 0:F.contents,E.value=(R=(ee=c.value)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="page"))!=null&&R.contents?!!((L=(pe=c.value)==null?void 0:pe.find(P=>(P==null?void 0:P.key)==="page"))!=null&&L.contents):!1,se.value=(ie=(Y=c.value)==null?void 0:Y.find(P=>(P==null?void 0:P.key)==="tableToForm"))==null?void 0:ie.contents,m.value=(ge=m.value)==null?void 0:ge.map((P,he)=>(Array.isArray(P)?P=$r(P):P={label:(P==null?void 0:P.label)??"",prop:(P==null?void 0:P.label)==="操作"?"operate":P==null?void 0:P.prop,width:P!=null&&P.width?parseInt(P.width):"",fixed:(P==null?void 0:P.fixed)??void 0,sortable:(P==null?void 0:P.sortable)??!1,align:(P==null?void 0:P.align)??"left",showOverflowTooltip:(P==null?void 0:P.showOverflowTooltip)??!0,isNotDrag:(P==null?void 0:P.isNotDrag)??!1,isEditCol:(P==null?void 0:P.isEditCol)??!1,isOperate:(P==null?void 0:P.isOperate)??!1,id:(P==null?void 0:P.id)??he,formMenuSelect:(P==null?void 0:P.formMenuSelect)??void 0,groupSelect:(P==null?void 0:P.groupSelect)??void 0},P)),m.value=($=m.value)!=null&&$.every(P=>Array.isArray(P))?(oe=m.value)==null?void 0:oe[0]:m.value,V.value=(X=V.value)==null?void 0:X.map((P,he)=>P={label:(P==null?void 0:P.label)??"",type:(P==null?void 0:P.type)??"",textColor:(P==null?void 0:P.textColor)??"#000000",id:(P==null?void 0:P.id)??he}),ke.value=(_e=ke.value)==null?void 0:_e.map((P,he)=>P={label:(P==null?void 0:P.label)??"",type:(P==null?void 0:P.type)??"",background:(P==null?void 0:P.background)??"var(--ssComponent-primary-color)",id:(P==null?void 0:P.id)??he}),se.value)se.value=(Ee=se.value)==null?void 0:Ee.map(P=>{k.value++;let he=P;return he.id=k.value,he});else{let P=[];const he=(fe=Ne.getColumnChild(p.cloneDeep(m.value)))==null?void 0:fe.filter(ae=>(ae==null?void 0:ae.prop)!=="operate");he==null||he.forEach(ae=>{var Be;k.value++,P.push({label:ae==null?void 0:ae.label,name:(ae==null?void 0:ae.prop)||(ae==null?void 0:ae.label),type:ae!=null&&ae.groupSelect?"Select":"Input",value:"",id:k.value,contents:ae==null?void 0:ae.options,menuSelect:ae==null?void 0:ae.formMenuSelect,groupSelect:(Be=ae==null?void 0:ae.groupSelect)==null?void 0:Be.split(":"),selectRelateType:"关联绑定列"})}),se.value=P}},{deep:!0,immediate:!0}),(g,C)=>{const U=e.resolveComponent("svg-icon"),J=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",si,[e.createElementVNode("div",ci,[e.createElementVNode("div",ui,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(J,{class:"icon-content",onClick:Ye,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",di,[e.createElementVNode("div",fi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",hi,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>at(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>le(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>dt(v)},null,8,["onClick"])])]),v!=null&&v.children&&v.children.length>0?(e.openBlock(),e.createElementBlock("div",vi,[e.createVNode(Dl,{tableChildContents:v==null?void 0:v.children,onDeleteChange:Le,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",gi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",yi,[e.createElementVNode("div",bi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",ki,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ee=>Re(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>Oe(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",xi,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:$e},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Di,[e.createElementVNode("div",Ci,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Ei,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ee=>st(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>q(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",_i,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:nt},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Bi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ee=>ne(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>te(v)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Ai,[e.createElementVNode("div",Ni,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=v=>E.value=v)},null,8,["modelValue"])])])]),e.createVNode(Yt.ssDialog,{visible:d.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Oi,[e.createVNode(J,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(J,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:h.value,onBeforeDestroy:tt,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Mi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:W.value,key:W.value,isEnableWrap:!0,onChange:lt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zi,[e.createVNode(J,{onClick:tt,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(J,{class:"ok-button button",onClick:Z,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:G.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ri,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:ye},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Li,[e.createVNode(J,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(J,{class:"ok-button button",onClick:M,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:x.value,onBeforeDestroy:ve,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Pi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:ze,onChangeVisible:Ie,onBlurChange:ue},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fi,[e.createVNode(J,{onClick:ve,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(J,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ji=Lt._export_sfc($i,[["__scopeId","data-v-7a6b87b5"]]),Ki=jt.useModelComp(p.pinia),{pageMapState:Ui}=p.storeToRefs(Ki),Wi=jt.useMenuState(p.pinia),{activeMenuPath:Hi}=p.storeToRefs(Wi),qi=e.ref(24),Gi=e.ref(6),Xi=e.ref(70),Yi=e.ref(.18),Ji=e.ref(45),Qi=(a,s,i,l)=>{var c,d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||s%2*12,y:((m=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:m.y)||s,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||qi.value,h:((T=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:T.h)||i,minW:((H=(O=a==null?void 0:a.value)==null?void 0:O.tableData)==null?void 0:H.minW)||Gi.value,minH:((ke=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:ke.minH)||Yi.value,maxH:((K=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:K.maxH)||Ji.value,i:((w=(G=a==null?void 0:a.value)==null?void 0:G.tableData)==null?void 0:w.i)||s,id:(a==null?void 0:a.id)||s+"",component:l}},Zi=(a,s)=>{var l,c,d,x,m,h,D,E;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(((x=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((m=a==null?void 0:a.comp)==null?void 0:m.toUpperCase())==="FORM"&&(i=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return i*2},Cl=(a,s,i)=>{var x,m;const l=(m=(x=Ui.value)==null?void 0:x[Hi.value])==null?void 0:m.filter(h=>{var D;return((D=h==null?void 0:h.key)==null?void 0:D.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var D,E,T;return((T=(E=(D=h==null?void 0:h.value)==null?void 0:D.tableData)==null?void 0:E.component)==null?void 0:T.id)===a.id}),d=Zi(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Cl(h,D))),{...Qi(c,s,d,a)}},es=(a,s)=>{if((a==null?void 0:a.length)===0)return[];const i=p.cloneDeep(a);return Array.isArray(a)?i==null?void 0:i.map((l,c)=>Cl(l,c)):[]},ts=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}]}]}}),ns=(a,s)=>a==null?void 0:a.map(i=>{for(const l in s)if(l===(i==null?void 0:i.prop))return{...i,value:s[l]};return i}),as=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([]);e.watch(()=>i.compType,m=>{var E;const h=ts(i==null?void 0:i.optionItems),D=m?(E=h[m==null?void 0:m.toUpperCase()])==null?void 0:E[i==null?void 0:i.target]:[];c.value=D==null?void 0:D.map(T=>{for(const[O,H]of Object.entries((i==null?void 0:i.comp)||{}))if((T==null?void 0:T.prop)===O)return{...T,value:H};return T})},{immediate:!0});const d=m=>Nt.getComponent(m),x=m=>{var h,D;(m==null?void 0:m.prop)==="layout"&&(m==null?void 0:m.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var T;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(T=E==null?void 0:E.options)==null?void 0:T.map(O=>({...O,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(D=c.value)==null?void 0:D.map(E=>{var T;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(T=E==null?void 0:E.options)==null?void 0:T.map(O=>({...O,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:i==null?void 0:i.target,styleConfigs:c.value,prop:m==null?void 0:m.prop})};return(m,h)=>{const D=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,T=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:T==null?void 0:T.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T==null?void 0:T.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(T.type)),{modelValue:T.value,"onUpdate:modelValue":O=>T.value=O,content:T==null?void 0:T.options,optionUrl:T==null?void 0:T.optionUrl,disabled:T==null?void 0:T.disabled,activeText:T==null?void 0:T.activeText,inactiveText:T==null?void 0:T.inactiveText,onChange:O=>x(T)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),os=Lt._export_sfc(as,[["__scopeId","data-v-6c233914"]]),ls=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:s}){const i=a,l=s,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),x=K=>K==null?void 0:K.reduce((G,w)=>(G[w==null?void 0:w.prop]=w==null?void 0:w.rule,G),{}),m=e.computed(()=>({formRules:x(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),D=e.ref(""),E=(K,G,w)=>{var A;let z=[];(i==null?void 0:i.activeTabName)==="任务配置"?(z=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:G}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(z=[{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:(A=i==null?void 0:i.relatedData)==null?void 0:A.map(I=>({label:I==null?void 0:I.任务名称,value:I==null?void 0:I.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let k;return w&&(w==null?void 0:w.length)>0?k=[...z,...T(K,G,w)]:k=z,k},T=(K,G,w)=>{const z=[{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 w?z==null?void 0:z.filter(k=>w==null?void 0:w.includes(k==null?void 0:k.prop)):z},O=(K,G)=>{var I,se,$e,nt,Ie,ze,ue,_,ne;const w=((Ie=(nt=($e=(se=(I=i==null?void 0:i.comp)==null?void 0:I.compData)==null?void 0:se.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:$e.contents)==null?void 0:nt.filter(te=>(te==null?void 0:te.label)!=="操作"))==null?void 0:Ie.map(te=>({value:te==null?void 0:te.prop,label:te.label})))||[],z=/button/i,k=((ne=(_=(ue=(ze=i==null?void 0:i.comp)==null?void 0:ze.compData)==null?void 0:ue.filter(te=>z.test(te==null?void 0:te.key)))==null?void 0:_.flatMap(te=>te==null?void 0:te.contents))==null?void 0:ne.map(te=>({value:te==null?void 0:te.label,label:te.label})))||[],A=E(w,k,K);h.value=G?ns(A,G):A,K&&(K==null?void 0:K.length)>0&&d.value.push(...K==null?void 0:K.map(te=>({prop:te,rule:c})))};e.onMounted(()=>{O(null,i==null?void 0:i.extendItem)});const H=K=>{const G=K==null?void 0:K[D.value];if(D.value==="执行任务"){if(!(G!=null&&G.join("/")))return;const w=G==null?void 0:G.join("/");O(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,K)}},V=K=>{l("change",{target:i==null?void 0:i.target,extendConfigs:K})},ke=(K,G)=>{D.value=G==null?void 0:G.changeProp,H(K)},W=K=>{l("onButtonClick",K)};return(K,G)=>(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:m.value.formRules,buttonValue:m.value.buttonValue,onChange:V,onBlurChange:ke,onOnButtonClick:W},null,8,["rowContents","formRules","buttonValue"]))}}),rs=Lt._export_sfc(ls,[["__scopeId","data-v-7c660c1f"]]),is={};function ss(a,s){return null}const cs=Lt._export_sfc(is,[["render",ss]]),us={class:"form-operate-content"},ps={class:"form-operate-item"},ds={class:"operate-title"},fs={class:"operate-content"},hs={class:"fix-content"},vs={class:"fix-button"},gs={class:"operate-title"},ms={class:"operate-content"},ys={class:"fix-content"},bs={class:"fix-button"},ks={style:{display:"flex","justify-content":"space-between"}},xs={class:"form-content"},ws={class:"dialog-footer"},Ds={class:"form-content"},Cs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref(!1),d=e.ref([]),x=e.ref([]),m=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),T=e.ref(!1),O=e.ref(0),H=e.ref([]),V=e.ref([]),ke=(_,ne)=>{if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="selectRelateType"){const te=ne==null?void 0:ne.optionUrl;return(te==null?void 0:te.selectRelateType)||ne[_.key]}if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="menuSelect"){const te=ne==null?void 0:ne.optionUrl;return(te==null?void 0:te.menuSelect)||ne[_.key]}if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="groupSelect"){const te=ne==null?void 0:ne.optionUrl;return(te==null?void 0:te.groupSelect)||ne[_.key]}if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="originalContent")return(ne==null?void 0:ne.value)||ne[_.key];if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="multiple"){const te=ne[_.key];return ml(te)?te:_.default}return(_==null?void 0:_.label)==="类型"&&ne[_.key]===""?"Input":(_==null?void 0:_.key)==="isFormColHidden"&&!ne[_.key]?!1:ne[_.key]},W=async _=>{var ve,Ue,st,q,M,ye;c.value=!0;let ne=[];const te=await((st=(Ue=(ve=Ne.FormContent)==null?void 0:ve.find(xe=>(xe==null?void 0:xe.key)===((_==null?void 0:_.type)===""?"Input":_==null?void 0:_.type)))==null?void 0:Ue.value)==null?void 0:st.value)??((M=(q=Ne.FormContent)==null?void 0:q.find(xe=>(xe==null?void 0:xe.key)===((_==null?void 0:_.type)===""?"Input":_==null?void 0:_.type)))==null?void 0:M.value);if(te==null||te.forEach(xe=>{O.value++,ne.push({label:xe==null?void 0:xe.label,name:xe==null?void 0:xe.label,type:xe.type,prop:xe==null?void 0:xe.prop,value:ke(xe,_),id:O.value,contents:xe==null?void 0:xe.options,width:(_==null?void 0:_.width)??1})}),_!=null&&_.menuSelect&&((ye=_==null?void 0:_.menuSelect)==null?void 0:ye.length)>0){const xe=await Ne.menuToContentType(_==null?void 0:_.menuSelect);ne=ne==null?void 0:ne.map(Re=>((Re==null?void 0:Re.name)==="组信息选项"&&(Re.contents=xe),Re))}E.value=_==null?void 0:_.id,d.value=await Ne.selectToBase(Ne.formToOptionsContents(ne)),x.value=await Ne.selectToBase(Ne.formToOptionsContents(ne))},K=_=>{var te;m.value=!0;let ne=[];(te=Ne.FormButton)==null||te.forEach(ve=>{O.value++,ne.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:(ve==null?void 0:ve.label)==="类型"&&_[ve.key]===""?"normal":_[ve.key],id:O.value,contents:ve==null?void 0:ve.options})}),H.value=ne,V.value=ne,E.value=_==null?void 0:_.id};e.watch(()=>T.value,()=>{var ne,te;let _=p.cloneDeep(i.originalItemContents);(ne=p.cloneDeep(i.originalItemContents))!=null&&ne.find(ve=>(ve==null?void 0:ve.key)==="enableWrap")?_=(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(ve=>((ve==null?void 0:ve.key)==="enableWrap"&&(ve.contents=!T.value),ve)):_.push({key:"enableWrap",contents:!T.value}),l("change",_)},{deep:!0});const G=()=>{var te,ve,Ue,st,q;H.value=V.value;let _={};if(E.value!==""?_.id=E.value:(O.value++,_.id="id"+O.value),(te=H.value)==null||te.forEach(M=>{var xe;const ye=(xe=Ne.FormButton)==null?void 0:xe.find(Re=>(Re==null?void 0:Re.label)===(M==null?void 0:M.label));ye&&(_[ye.key]=M.value)}),(ve=h.value)!=null&&ve.find(M=>M.id===_.id))h.value=(Ue=h.value)==null?void 0:Ue.map(M=>(M.id===_.id&&(M=_),M));else{let M=p.cloneDeep(h.value);h.value||(h.value=[]),M.push(_),h.value=M}m.value=!1,E.value="";let ne=p.cloneDeep(i.originalItemContents);(st=p.cloneDeep(i.originalItemContents))!=null&&st.find(M=>(M==null?void 0:M.key)==="formButton")?ne=(q=p.cloneDeep(i.originalItemContents))==null?void 0:q.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=h.value),M)):ne.push({key:"formButton",contents:h.value}),l("change",ne)},w=_=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,te;D.value=(ne=p.cloneDeep(D.value))==null?void 0:ne.filter(ve=>(ve==null?void 0:ve.id)!==(_==null?void 0:_.id)),l("change",(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(ve=>((ve==null?void 0:ve.key)==="formContent"&&(ve.contents=D.value),ve))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=_=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,te;h.value=(ne=p.cloneDeep(h.value))==null?void 0:ne.filter(ve=>(ve==null?void 0:ve.id)!==(_==null?void 0:_.id)),l("change",(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(ve=>((ve==null?void 0:ve.key)==="formButton"&&(ve.contents=h.value),ve))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var ne;m.value=!0;let _=[];(ne=Ne.FormButton)==null||ne.forEach(te=>{O.value++,_.push({label:te==null?void 0:te.label,name:te==null?void 0:te.label,type:te.type,value:(te==null?void 0:te.label)==="类型"?"normal":"",id:O.value,contents:te==null?void 0:te.options})}),H.value=_,V.value=_},A=()=>{var ne,te,ve;c.value=!0;let _=[];(ve=(te=(ne=Ne.FormContent)==null?void 0:ne.find(Ue=>(Ue==null?void 0:Ue.key)==="Input"))==null?void 0:te.value)==null||ve.forEach(Ue=>{O.value++,_.push({label:Ue==null?void 0:Ue.label,name:Ue==null?void 0:Ue.label,type:Ue.type,value:(Ue==null?void 0:Ue.label)==="类型"?"Input":"",id:O.value,contents:Ue==null?void 0:Ue.options})}),d.value=_,x.value=_},I=_=>{let ne=p.cloneDeep(V.value);ne=ne==null?void 0:ne.map(te=>(te.value=_==null?void 0:_[te.name],te)),V.value=ne},se=_=>{const ne=_.find(Ue=>(Ue==null?void 0:Ue.name)==="类型");if((ne==null?void 0:ne.value)!="Select")return;const te=_.find(Ue=>(Ue==null?void 0:Ue.name)==="多选"),ve=_.find(Ue=>(Ue==null?void 0:Ue.name)==="初始值");te!=null&&te.value&&Ao.isString(ve.value)&&(ve.value=[ve.value]),!(te!=null&&te.value)&&!Ao.isString(ve.value)&&(ve.value="")},$e=async _=>{var ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye;if((_==null?void 0:_.类型)!==((te=(ne=x.value)==null?void 0:ne.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:te.value)){let qe=[];const lt=await((st=(Ue=(ve=Ne.FormContent)==null?void 0:ve.find(Z=>(Z==null?void 0:Z.key)===((_==null?void 0:_.类型)===""?"Input":_==null?void 0:_.类型)))==null?void 0:Ue.value)==null?void 0:st.value)?await((Re=(xe=(ye=Ne.FormContent)==null?void 0:ye.find(Z=>(Z==null?void 0:Z.key)===((_==null?void 0:_.类型)===""?"Input":_==null?void 0:_.类型)))==null?void 0:xe.value)==null?void 0:Re.value):(M=(q=Ne.FormContent)==null?void 0:q.find(Z=>(Z==null?void 0:Z.key)===((_==null?void 0:_.类型)===""?"Input":_==null?void 0:_.类型)))==null?void 0:M.value;if(lt==null||lt.forEach(Z=>{var at,Le;O.value++;const tt=Ne.isUndefined(Z==null?void 0:Z.default)?(_==null?void 0:_[Z.label])??Z.value??"":Z==null?void 0:Z.default;qe.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:tt,prop:Z==null?void 0:Z.prop,id:O.value,contents:Z==null?void 0:Z.options,width:((Le=(at=x.value)==null?void 0:at[0])==null?void 0:Le.width)??1})}),_!=null&&_.菜单选项&&((Oe=_==null?void 0:_.菜单选项)==null?void 0:Oe.length)>0){const Z=await Ne.menuToContentType(_==null?void 0:_.菜单选项);qe=qe==null?void 0:qe.map(tt=>((tt==null?void 0:tt.name)==="组信息选项"&&(tt.contents=Z),tt))}se(qe),x.value=await Ne.selectToBase(p.cloneDeep(qe)),d.value=await Ne.selectToBase(p.cloneDeep(qe))}else{let qe=p.cloneDeep(x.value);if(qe=qe==null?void 0:qe.map(lt=>(lt.value=_==null?void 0:_[lt.name],lt)),_!=null&&_.菜单选项&&((Ye=_==null?void 0:_.菜单选项)==null?void 0:Ye.length)>0){const lt=await Ne.menuToContentType(_==null?void 0:_.菜单选项);qe=qe==null?void 0:qe.map(Z=>((Z==null?void 0:Z.name)==="组信息选项"&&(Z.contents=lt),Z))}qe=Ne.formToOptionsContents(qe),se(qe),x.value=await Ne.selectToBase(p.cloneDeep(qe))}},nt=_=>{_||(d.value=x.value)},Ie=async _=>{await $e(_),d.value=x.value},ze=Ne.debounce(async()=>{var ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt;d.value=x.value;let _={};_.width=((Ue=(ve=d.value)==null?void 0:ve[0])==null?void 0:Ue.width)??1,E.value!==""?_.id=E.value:(O.value++,_.id="id"+O.value);let ne=await((M=(q=(st=Ne.FormContent)==null?void 0:st.find(Z=>{var tt,at;return(Z==null?void 0:Z.key)===(((at=(tt=d.value)==null?void 0:tt.find(Le=>(Le==null?void 0:Le.label)==="类型"))==null?void 0:at.value)??"label")}))==null?void 0:q.value)==null?void 0:M.value)??((xe=(ye=Ne.FormContent)==null?void 0:ye.find(Z=>{var tt,at;return(Z==null?void 0:Z.key)===(((at=(tt=d.value)==null?void 0:tt.find(Le=>(Le==null?void 0:Le.label)==="类型"))==null?void 0:at.value)??"label")}))==null?void 0:xe.value);if((Re=d.value)==null||Re.forEach(Z=>{const tt=ne==null?void 0:ne.find(at=>(at==null?void 0:at.label)===(Z==null?void 0:Z.label));tt&&(_[tt.key]=Z.value)}),_.width=_.width?_.width:1,_.key=_==null?void 0:_.label,_.isFormColHidden=_==null?void 0:_.isFormColHidden,(Oe=D.value)!=null&&Oe.find(Z=>Z.id===_.id))D.value=(Ye=D.value)==null?void 0:Ye.map(Z=>(Z.id===_.id&&(Z=_),Z));else{let Z=p.cloneDeep(D.value);Z.push(_),D.value=Z}D.value=D.value.map(({id:Z,...tt})=>tt),c.value=!1,E.value="";let te=p.cloneDeep(i.originalItemContents);(qe=p.cloneDeep(i.originalItemContents))!=null&&qe.find(Z=>(Z==null?void 0:Z.key)==="formContent")?te=(lt=p.cloneDeep(i.originalItemContents))==null?void 0:lt.map(Z=>((Z==null?void 0:Z.key)==="formContent"&&(Z.contents=D.value),Z)):te.push({key:"formContent",contents:D.value}),l("change",te)},300),ue=()=>{c.value=!1,m.value=!1,E.value="",x.value=[],V.value=[]};return e.watch(()=>i.originalItemContents,()=>{var ne,te,ve,Ue,st,q;if(!i.originalItemContents||i.originalItemContents.length===0)return;const _=p.cloneDeep(i.originalItemContents);D.value=((ne=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:ne.contents)??[],h.value=((te=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:te.contents)??[],T.value=(ve=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&ve.contents?!((Ue=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ue.contents):!0,D.value=(st=p.cloneDeep(D.value))==null?void 0:st.map((M,ye)=>{var Re;let xe=M;return xe.id=(M==null?void 0:M.id)??ye,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((Re=M==null?void 0:M.options)==null?void 0:Re.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,xe}),D.value=Ne.formToOptionsContents(D.value),h.value=(q=h.value)==null?void 0:q.map((M,ye)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:ye})},{deep:!0,immediate:!0}),(_,ne)=>{const te=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",us,[e.createElementVNode("div",ps,[e.createElementVNode("div",ds,[ne[2]||(ne[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[1]||(ne[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",hs,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",vs,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>W(Ue)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>w(Ue)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",gs,[ne[4]||(ne[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[3]||(ne[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",ys,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",bs,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>K(Ue)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>z(Ue)},null,8,["onClick"])])])]))),128))]),ne[6]||(ne[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",ks,[ne[5]||(ne[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:T.value,"onUpdate:modelValue":ne[0]||(ne[0]=Ue=>T.value=Ue)},null,8,["modelValue"])])]),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:$e,onChangeVisible:nt,onBlurChange:Ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ws,[e.createVNode(ve,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ve,{class:"ok-button button",onClick:e.unref(ze),id:"themeButton"},{default:e.withCtx(()=>ne[8]||(ne[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:m.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ds,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:ue,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:G},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Oo=Lt._export_sfc(Cs,[["__scopeId","data-v-20850524"]]),Es={class:"step-module content"},_s={class:"module-data"},Ss={class:"step-module layout"},Ts={class:"form-content"},Is=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),m=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),T=W=>{var K;D.value=W,l("change",(K=V())==null?void 0:K.compData)},O=(W,K)=>{var G,w;switch(W){case"create":(G=d.value)==null||G.forEach(z=>{z.value=""}),h.value="create",m.visible=!0;break;case"update":(w=d.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),h.value="update",m.visible=!0;break;case"delete":E.value.splice(K,1),h.value="delete";break}},H=W=>{var K,G,w;if((W==null?void 0:W.buttonName)==="确认"){const z=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(z).forEach(k=>{z[k]===""&&delete z[k]}),h.value){case"create":E.value.push({...z,index:((K=E.value)==null?void 0:K.length)+1});break;case"update":E.value=(G=E.value)==null?void 0:G.map(k=>k.index===(z==null?void 0:z.index)?{...k,title:z==null?void 0:z.title,description:z==null?void 0:z.description}:k);break}l("change",(w=V())==null?void 0:w.compData),m.visible=!1}else m.visible=!1},V=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),ke=()=>{m.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,W=>{var K,G;W&&(D.value=((K=W==null?void 0:W.find(w=>w.key==="stepConfig"))==null?void 0:K.contents)??{},E.value=((G=W==null?void 0:W.find(w=>w.key==="stepList"))==null?void 0:G.contents)??[])},{immediate:!0}),(W,K)=>{const G=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Es,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>O("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ss,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:c.value,onChange:T},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:m.visible,title:m.title,onBeforeDestroy:ke,width:m.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ts,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Bs=Lt._export_sfc(Is,[["__scopeId","data-v-7dbd17f2"]]),As={class:"step-module content"},Ns={class:"module-data"},Vs={class:"step-module layout"},Os={class:"form-content"},Ms=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref("create"),d=e.ref({}),x=e.ref([]),m=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),T=W=>{var K;d.value=W,l("change",(K=V())==null?void 0:K.compData)},O=(W,K)=>{var G,w;switch(W){case"create":(G=h.value)==null||G.forEach(z=>{z.value=""}),c.value="create",E.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(K,1),c.value="delete";break}},H=W=>{var K,G,w,z;if((W==null?void 0:W.buttonName)==="确认"){const k=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(G=x.value)==null||G.push({...k,index:((K=x.value)==null?void 0:K.length)+1});break;case"update":x.value=(w=x.value)==null?void 0:w.map(A=>A.index===(k==null?void 0:k.index)?{...A,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:A);break}l("change",(z=V())==null?void 0:z.compData),E.visible=!1}else E.visible=!1},V=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),ke=()=>{E.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,W=>{var K,G;W&&(d.value=((K=W==null?void 0:W.find(w=>w.key==="timeLineConfig"))==null?void 0:K.contents)??{},x.value=((G=W==null?void 0:W.find(w=>w.key==="timeLineList"))==null?void 0:G.contents)??[])},{immediate:!0}),(W,K)=>{const G=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",As,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>O("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Vs,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:m.value,onChange:T},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:ke,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),zs=Lt._export_sfc(Ms,[["__scopeId","data-v-39ffc861"]]),Rs={};function Ls(a,s){return e.openBlock(),e.createElementBlock("div")}const Ps=Lt._export_sfc(Rs,[["render",Ls]]),Fs={class:"extra-content"},$s={key:0},js={key:1},Ks={class:"dialog-footer"},Us={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:s}){const i=a,l=e.ref(0),c=e.ref(),d=e.ref(),x=s,m=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[i.itemData],()=>{var z;const w=p.cloneDeep(i.itemData);c.value=(z=p.cloneDeep(w))==null?void 0:z.map(k=>{var A;if(k.key==="extra"){let I=[];(A=k.value)==null||A.forEach(se=>{var $e;I.push(($e=Object.values(se))==null?void 0:$e[0])}),k.value=I}return k})},{deep:!0,immediate:!0});const T=(w,z,k,A)=>{var se;let I={};((se=w==null?void 0:w[0])==null?void 0:se.contents)==="详情"&&(m.value=!0,I[z]=w,d.value=w==null?void 0:w.filter($e=>($e==null?void 0:$e.key)!=="tableContentName"),h.value=I,D.value=k,E.value=A.id)},O=w=>{var $e,nt,Ie,ze;const z=(nt=($e=Object.values(p.cloneDeep(h.value)))==null?void 0:$e[0])==null?void 0:nt.filter(ue=>(ue==null?void 0:ue.key)==="tableContentName"),k=(ze=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:ze.filter(ue=>(ue==null?void 0:ue.key)!=="tableContentName"),A=k==null?void 0:k.map((ue,_)=>{var ne;return _===w.index&&(ue==null?void 0:ue.comp)==="Table"&&(ue.compData=(ne=ue.compData)==null?void 0:ne.map(te=>{var ve,Ue;return(te==null?void 0:te.key)==="tableContents"&&(te.contents=(Ue=(ve=w.content)==null?void 0:ve.map(st=>{let q={};for(let M in st)M!=="id"&&(q[M]=st[M]);return q}))==null?void 0:Ue.map(st=>Object.values(st))),te})),ue});A.unshift(z==null?void 0:z[0]);let I=p.cloneDeep(h.value),se={};for(let ue in I)se[ue]=A;h.value=se},H=()=>{m.value=!1,h.value={},D.value={},E.value=void 0,l.value++},V=w=>{var $e,nt,Ie,ze;const z=(nt=($e=Object.values(p.cloneDeep(h.value)))==null?void 0:$e[0])==null?void 0:nt.filter(ue=>(ue==null?void 0:ue.key)==="tableContentName"),k=(ze=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:ze.filter(ue=>(ue==null?void 0:ue.key)!=="tableContentName"),A=k==null?void 0:k.map((ue,_)=>(_===w.index&&(ue.compData=w.contents),ue));A.unshift(z==null?void 0:z[0]);let I=p.cloneDeep(h.value),se={};for(let ue in I)se[ue]=A;h.value=se},ke=()=>{var z,k;let w={};for(let A in D.value)A===((z=Object.keys(h.value))==null?void 0:z[0])?w[A]=(k=Object.values(h.value))==null?void 0:k[0]:w[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:w},"methodData"),m.value=!1,h.value={},D.value={},E.value=void 0},W=()=>{m.value=!1,h.value={},D.value={},E.value=void 0},K=w=>{x("change",w,"methodData")},G=w=>ya(w);return(w,z)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,I)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(A==null?void 0:A.key)==="extra"?(e.openBlock(),e.createElementBlock("div",$s)):(e.openBlock(),e.createElementBlock("div",js,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(A.comp)),{itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,key:I,index:(A==null?void 0:A.id)??I,onContentClick:T,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Yt.ssDialog,{visible:m.value,onBeforeDestroy:W},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(A,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(A.comp)),{itemData:A==null?void 0:A.compData,onChange:O,childItemData:A==null?void 0:A.itemChildData,key:I,onContentChange:V,index:(A==null?void 0:A.id)??I,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",Ks,[e.createVNode(k,{class:"cancel-button footer-button",onClick:H,id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Ws=Lt._export_sfc(Us,[["__scopeId","data-v-2d9c5ab2"]]);let Et="$R";const Hs=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),qs=a=>{var i,l;let s=a.trim();if((s==null?void 0:s[0])!=="["&&(s==null?void 0:s[0])!=="{"){let c=(l=(i=s==null?void 0:s.replace(":",Et))==null?void 0:i.split(Et))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},Gs=a=>{var i;let s=a.trim();return(s==null?void 0:s[0])!=="["&&(s==null?void 0:s[0])!=="{"&&((i=Ga(s,","))==null?void 0:i.length)===1},Xs=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),Ys=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),Js=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),Da=a=>{let s=a;const i=[];let l="";for(const c of s)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(i.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):i.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return i},_a=(a,s)=>{let i=a;const l=[];let c="",d=0;for(const x of i)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===s?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===s&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},Qs=(a,s)=>{let i=a;const l=[];let c="",d=0;for(const x of i)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===s)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===s||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Mo=(a,s)=>{let i=0;for(let l=0;l<a.length;l++)a[l]===s&&i++;return i%2===0},Ga=(a,s)=>{let i=a;const l=[];let c="",d=0;for(const x of i)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===s&&Mo(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===s&&Mo(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Zs=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),ec=a=>{var s,i,l,c,d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze,ue,_,ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct;if(Js(a)){let Ke={},be=(l=(i=(s=a==null?void 0:a.replace(":",Et))==null?void 0:s.split(Et))==null?void 0:i[0])==null?void 0:l.replaceAll("'",""),De="",Qe="",de=(d=(c=a==null?void 0:a.replace(":",Et))==null?void 0:c.split(Et))==null?void 0:d[1];if((de==null?void 0:de[0])==="("&&(Qe=(h=(m=(x=de==null?void 0:de.split("("))==null?void 0:x[1])==null?void 0:m.split(")"))==null?void 0:h[0],de=(E=(D=de==null?void 0:de.replace(")",Et))==null?void 0:D.split(Et))==null?void 0:E[1]),((T=Ga(de,"/"))==null?void 0:T.length)>1)De=(O=Ga(de,"/"))==null?void 0:O.map(Ae=>Ae==null?void 0:Ae.replaceAll("/","").replaceAll("'",""));else if(de.includes("{")||de.includes("("))if(de.includes("{")?De=De+((G=(K=(W=(ke=(V=(H=de==null?void 0:de.split("{"))==null?void 0:H[1])==null?void 0:V.split("}"))==null?void 0:ke[0])==null?void 0:W.replaceAll(":","/").replaceAll("'",""))==null?void 0:K.replaceAll("[","(["))==null?void 0:G.replaceAll("]","])"))+"[":De=De+((se=(I=(A=(k=(z=(w=de==null?void 0:de.split("("))==null?void 0:w[1])==null?void 0:z.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:I.replaceAll("[","(["))==null?void 0:se.replaceAll("]","])"))+"[",!(($e=de==null?void 0:de.split(")"))!=null&&$e[1]))De=De+((ze=(Ie=(nt=de==null?void 0:de.split("["))==null?void 0:nt[1])==null?void 0:Ie.split("]"))==null?void 0:ze[0])+"]";else{const Ae=(te=(ne=(_=(ue=de==null?void 0:de.split(")"))==null?void 0:ue[1])==null?void 0:_.replace("[",Et))==null?void 0:ne.split(Et))==null?void 0:te[1];if(de!=null&&de.includes("?"))De=((ve=de==null?void 0:de.split("?"))==null?void 0:ve[1])+"&&"+((st=(Ue=de==null?void 0:de.split("?"))==null?void 0:Ue[0])==null?void 0:st.replaceAll("#","==="));else if(Ae){const Fe=Ae.lastIndexOf("]"),We=Ae.substring(0,Fe)+Et+Ae.substring(Fe+1);De=De+((q=We==null?void 0:We.split(Et))==null?void 0:q[0])+"]"}else De=(xe=(ye=(M=a==null?void 0:a.replace(":",Et))==null?void 0:M.split(Et))==null?void 0:ye[1])==null?void 0:xe.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))De=(Ye=(Oe=(Re=a==null?void 0:a.replace(":",Et))==null?void 0:Re.split(Et))==null?void 0:Oe[1])==null?void 0:Ye.replaceAll("'","");else{let Ae=(Z=(lt=(qe=a==null?void 0:a.replace(":",Et))==null?void 0:qe.split(Et))==null?void 0:lt[1])==null?void 0:Z.replaceAll("'","");De=((Le=(at=(tt=Ae==null?void 0:Ae.split("?"))==null?void 0:tt[1])==null?void 0:at.split(":"))==null?void 0:Le[0])+"&&"+((ce=Ae==null?void 0:Ae.split("?"))==null?void 0:ce[0])}return Ke[be]=Qe!==""?Qe+"$##"+De:De,{groupName:"",formContents:[[Ke]]}}else{let Ke={},be="",De="";if(a.includes("#")){be=(re=(le=a==null?void 0:a.split("#"))==null?void 0:le[0])==null?void 0:re.replaceAll("'","");let Qe=(Xe=(Te=a==null?void 0:a.split("#"))==null?void 0:Te[1])==null?void 0:Xe.replaceAll("'","");Qe!=null&&Qe.includes("{")?De=De+((U=(C=(g=(dt=Qe==null?void 0:Qe.split("{"))==null?void 0:dt[1])==null?void 0:g.split("}"))==null?void 0:C[0])==null?void 0:U.replaceAll(":","/").replaceAll("'",""))+"[":De=De+((ee=(F=(v=(J=Qe==null?void 0:Qe.split("("))==null?void 0:J[1])==null?void 0:v.split(")"))==null?void 0:F[0])==null?void 0:ee.replaceAll(":","/").replaceAll("'",""))+"[",De=De+((ge=(pe=(R=Qe==null?void 0:Qe.replace("[",Et))==null?void 0:R.split(Et))==null?void 0:pe[1])==null?void 0:ge.slice(0,((ie=(Y=(L=Qe==null?void 0:Qe.replace("[",Et))==null?void 0:L.split(Et))==null?void 0:Y[1])==null?void 0:ie.length)-1))}else{let Qe=(X=(oe=($=a==null?void 0:a.split("]"))==null?void 0:$[0])==null?void 0:oe.split("["))==null?void 0:X[1];if((_e=Qe==null?void 0:Qe.split(":"))==null||_e.forEach((de,Ae)=>{var Fe;((Fe=Qe==null?void 0:Qe.split(":"))==null?void 0:Fe.length)-1===Ae&&(be=de==null?void 0:de.replaceAll("'",""))}),!(a!=null&&a.includes("[")))De=((he=(P=(Ee=(fe=a==null?void 0:a.split("]"))==null?void 0:fe[1])==null?void 0:Ee.replace(":",Et).split(Et))==null?void 0:P[1])==null?void 0:he.replaceAll("'",""))??"";else{let de=(me=(Ve=(Me=(Je=(Be=(ae=p.cloneDeep(a))==null?void 0:ae.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll("{","").replaceAll("}",""))==null?void 0:me.replaceAll("'","").replaceAll(":","/"),Ae="";(ct=Qe==null?void 0:Qe.split(":"))==null||ct.forEach(Fe=>{Ae=Ae===""?Ae+(Fe==null?void 0:Fe.replaceAll("'","")):Ae+":"+(Fe==null?void 0:Fe.replaceAll("'",""))}),De=de+"["+Ae+"]"}}return Ke[be]=De,{groupName:"",formContents:[[Ke]]}}},tc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),nc=(a,s)=>{let i=a.length;for(;i--;)if(a[i]===")")return a.substring(0,i)+s+a.substring(i+1);return a},ac=a=>{var d,x,m,h,D;let s=a.slice(1,a.length-1),i;(s==null?void 0:s[0])==="["?i=(x=(d=Da(p.cloneDeep(s)))==null?void 0:d.filter(E=>E!==","))==null?void 0:x.map(E=>E==null?void 0:E.slice(1,E.length-1)):(s="["+p.cloneDeep(s)+"]",i=(h=(m=Da(p.cloneDeep(s)))==null?void 0:m.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),i=(D=p.cloneDeep(i))==null?void 0:D.map(E=>{var T,O;return E=(O=(T=E.replace(")",Et))==null?void 0:T.split(Et))==null?void 0:O[1],E});let l=[],c=[];return i==null||i.forEach(E=>{var H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze,ue,_,ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F;let T=(V=(H=p.cloneDeep(E))==null?void 0:H.slice(1,p.cloneDeep(E).length-1))==null?void 0:V.replace(":",Et).split(Et);if(((W=(ke=p.cloneDeep(T))==null?void 0:ke[0])==null?void 0:W.replaceAll("'",""))==="输入"){if(!((G=(K=p.cloneDeep(T))==null?void 0:K[1])!=null&&G.includes("["))&&!((z=(w=p.cloneDeep(T))==null?void 0:w[1])!=null&&z.includes("("))){Ne.IsJson((k=p.cloneDeep(T))==null?void 0:k[1].replaceAll("'",'"'))&&c.push(JSON.parse((A=p.cloneDeep(T))==null?void 0:A[1].replaceAll("'",'"')));return}if(((se=(I=p.cloneDeep(T))==null?void 0:I[1])==null?void 0:se[0])==="["){let ee=(ze=($e=p.cloneDeep(T))==null?void 0:$e[1])==null?void 0:ze.slice(1,((Ie=(nt=p.cloneDeep(T))==null?void 0:nt[1])==null?void 0:Ie.length)-1);(_=(ue=Da(ee))==null?void 0:ue.filter(R=>R!==","))==null||_.forEach(R=>{var ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe,de,Ae;let pe={},L=(oe=($=p.cloneDeep(R))==null?void 0:$.slice(1,((ge=p.cloneDeep(R))==null?void 0:ge.length)-1))==null?void 0:oe.replace(":",Et).split(Et),Y=(X=L==null?void 0:L[0])==null?void 0:X.replaceAll("'",""),ie;(_e=L==null?void 0:L[1])!=null&&_e.includes("(")?(ie=(Ve=(Me=(Je=(Be=(ae=(he=(P=(Ee=p.cloneDeep(L))==null?void 0:Ee[1])==null?void 0:P.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:ae.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll(":","/").replaceAll("'",""),(ct=(me=p.cloneDeep(L))==null?void 0:me[1])!=null&&ct.includes("[")&&(ie=p.cloneDeep(ie)+"["+((Ae=(de=(Qe=(De=(be=(Ke=p.cloneDeep(L))==null?void 0:Ke[1])==null?void 0:be.split("["))==null?void 0:De[1])==null?void 0:Qe.split("]"))==null?void 0:de[0])==null?void 0:Ae.replaceAll("'",""))+"]")):ie=(fe=L==null?void 0:L[1])==null?void 0:fe.replaceAll("'",""),pe[Y]=ie,c.push(pe)})}}else{if(!((te=(ne=p.cloneDeep(T))==null?void 0:ne[1])!=null&&te.includes("["))&&!((Ue=(ve=p.cloneDeep(T))==null?void 0:ve[1])!=null&&Ue.includes("("))){Ne.IsJson((st=p.cloneDeep(T))==null?void 0:st[1].replaceAll("'",'"'))&&l.push(JSON.parse((q=p.cloneDeep(T))==null?void 0:q[1].replaceAll("'",'"')));return}if(((ye=(M=p.cloneDeep(T))==null?void 0:M[1])==null?void 0:ye[0])==="["){let ee=(Ye=(xe=p.cloneDeep(T))==null?void 0:xe[1])==null?void 0:Ye.slice(1,((Oe=(Re=p.cloneDeep(T))==null?void 0:Re[1])==null?void 0:Oe.length)-1);(lt=(qe=Da(ee))==null?void 0:qe.filter(R=>R!==","))==null||lt.forEach(R=>{var ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt;let pe={},L=(oe=($=p.cloneDeep(R))==null?void 0:$.slice(1,((ge=p.cloneDeep(R))==null?void 0:ge.length)-1))==null?void 0:oe.replace(":",Et).split(Et),Y=(X=L==null?void 0:L[0])==null?void 0:X.replaceAll("'",""),ie;if(!((_e=L==null?void 0:L[1])!=null&&_e.includes("(")))ie=(fe=L==null?void 0:L[1])==null?void 0:fe.replaceAll("'","");else if(ie=(Je=(Be=(ae=(he=(P=(Ee=p.cloneDeep(L))==null?void 0:Ee[1])==null?void 0:P.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:ae.replace("(",Et))==null?void 0:Be.split(Et))==null?void 0:Je[1],ie=(Ve=(Me=nc(p.cloneDeep(ie),Et))==null?void 0:Me.split(Et))==null?void 0:Ve[0],!(ie!=null&&ie.includes("(")))ie=(me=p.cloneDeep(ie))==null?void 0:me.replaceAll(":","/").replaceAll("'",""),(Ke=(ct=p.cloneDeep(L))==null?void 0:ct[1])!=null&&Ke.includes("[")&&(ie=p.cloneDeep(ie)+"["+((Ce=(N=(We=(Fe=(De=(be=p.cloneDeep(L))==null?void 0:be[1])==null?void 0:De.split("["))==null?void 0:Fe[((Ae=(de=(Qe=p.cloneDeep(L))==null?void 0:Qe[1])==null?void 0:de.split("["))==null?void 0:Ae.length)-1])==null?void 0:We.split("]"))==null?void 0:N[0])==null?void 0:Ce.replaceAll("'",""))+"]");else{let It="";(ut=_a(ie,":"))==null||ut.forEach(wt=>{var Dt,Ot,Bt,Ut,Pt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In;if(!(wt!=null&&wt.includes("(")))It=It===""?It+((Dt=wt==null?void 0:wt.replaceAll(":",""))==null?void 0:Dt.replaceAll("'","")):It+"/"+((Ot=wt==null?void 0:wt.replaceAll(":",""))==null?void 0:Ot.replaceAll("'",""));else{let gn=(Dn=(fn=(wn=(qt=(Vt=(Pt=(Ut=(Bt=p.cloneDeep(wt))==null?void 0:Bt.replaceAll("{",""))==null?void 0:Ut.replaceAll("}",""))==null?void 0:Pt.replace("(",Et))==null?void 0:Vt.split(Et))==null?void 0:qt[1])==null?void 0:wn.split(")"))==null?void 0:fn[0])==null?void 0:Dn.replaceAll(":","/").replaceAll("'","");gn=gn+"["+((In=(vn=(Tn=(hn=(Sn=p.cloneDeep(wt))==null?void 0:Sn.split("["))==null?void 0:hn[1])==null?void 0:Tn.split("]"))==null?void 0:vn[0])==null?void 0:In.replaceAll("'",""))+"]",It=It===""?It+"["+gn+"]":It+"/["+gn+"]"}}),ie=It+"["+((Tt=(vt=(pt=(He=(ft=(et=p.cloneDeep(L))==null?void 0:et[1])==null?void 0:ft.split("["))==null?void 0:He[((Ze=(Se=(rt=p.cloneDeep(L))==null?void 0:rt[1])==null?void 0:Se.split("["))==null?void 0:Ze.length)-1])==null?void 0:pt.split("]"))==null?void 0:vt[0])==null?void 0:Tt.replaceAll("'",""))+"]"}pe[Y]=ie,l.push(pe)})}else{let ee=(Le=(Z=p.cloneDeep(T))==null?void 0:Z[1])==null?void 0:Le.slice(1,((at=(tt=p.cloneDeep(T))==null?void 0:tt[1])==null?void 0:at.length)-1),R={},pe=(U=(C=(re=(le=(ce=p.cloneDeep(ee))==null?void 0:ce.split("]"))==null?void 0:le[0])==null?void 0:re.split(":"))==null?void 0:C[((g=(dt=(Xe=(Te=p.cloneDeep(ee))==null?void 0:Te.split("]"))==null?void 0:Xe[0])==null?void 0:dt.split(":"))==null?void 0:g.length)-1])==null?void 0:U.replaceAll("'",""),L=((F=(v=(J=p.cloneDeep(ee))==null?void 0:J.split("]"))==null?void 0:v[0])==null?void 0:F.replaceAll("'",""))+"]";R[pe]=L,l.push(R)}}}),{output:l,input:c}},oc=jt.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(oc),Mn=jt.useMenuState(p.pinia),{activeMenuPath:aa}=p.storeToRefs(Mn),Ca=p.useLoginState(),{loginUserInfo:Xt}=p.storeToRefs(Ca),lc=Ne.useOriginalState(p.pinia),{originalPath:rc}=p.storeToRefs(lc),Qt=rc.value,ic=a=>{const s=/^name(\d+)$/,i=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const m=x.match(s);m&&d.push({idx:Number(m[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,m)=>x.idx-m.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],m=[];c.forEach(T=>{var O;return(((O=T.names)==null?void 0:O.length)>d?x:m).push(T)});const h=m.map(T=>T.item),D=new Map;for(const T of x){const O=T.names[T.names.length-d-1].value;D.has(O)||D.set(O,[]),D.get(O).push(T)}return[...Array.from(D.entries()).map(([T,O])=>{var H;return O[0].names.length===1&&((H=O[0].names[0])==null?void 0:H.idx)===-1?O[0].item:{name:T,isShow:!0,comp:"ParentItem",children:l(O,d+1)}}),...h]}if(i)return l(i,0)},Aa=a=>a!=null&&a.every(s=>{var i,l;return((l=(i=Object.keys(s))==null?void 0:i.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:ic(a),El=async()=>{var d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze,ue,_,ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e;Mn.setImportLoading(!0);let a="";const s=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((x=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:x.length)>0){let fe=(H=(O=(T=(E=(D=(h=(m=s==null?void 0:s.data)==null?void 0:m.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:T.compData)==null?void 0:O.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:H.contents;a=(ke=(V=p.cloneDeep(fe))==null?void 0:V[0])==null?void 0:ke.label}let i=aa.value;(G=aa.value)!=null&&G.includes(`updateLoading${((W=Xt.value)==null?void 0:W.account)||((K=Xt.value)==null?void 0:K.账号)}`)?i=p.cloneDeep(aa).value:(k=aa.value)!=null&&k.includes(`loading${((w=Xt.value)==null?void 0:w.account)||((z=Xt.value)==null?void 0:z.账号)}`)&&(i=p.cloneDeep(_n).value+Qt+`loading${((A=Xt.value)==null?void 0:A.account)||((I=Xt.value)==null?void 0:I.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if((($e=(se=l==null?void 0:l.data)==null?void 0:se.result)==null?void 0:$e.length)>0){let fe="",Ee=[];(Ie=(nt=l==null?void 0:l.data)==null?void 0:nt.result)==null||Ie.forEach(he=>{var ae,Be,Je,Me,Ve;((Be=(ae=he==null?void 0:he.value)==null?void 0:ae.pageData)==null?void 0:Be.comp)==="Form"&&((Ve=(Me=(Je=he==null?void 0:he.value)==null?void 0:Je.pageData)==null?void 0:Me.compData)==null||Ve.forEach(me=>{(me==null?void 0:me.key)==="formContent"&&(Ee=[...Ee,...me==null?void 0:me.contents])}))});let P=Ee==null?void 0:Ee.find(he=>(he==null?void 0:he.isMain)===!0);if(P?(fe=P==null?void 0:P.value,a=P==null?void 0:P.key):fe=(q=(st=(Ue=(ve=(te=(ne=(_=(ue=(ze=l==null?void 0:l.data)==null?void 0:ze.result)==null?void 0:ue[0])==null?void 0:_.value)==null?void 0:ne.pageData)==null?void 0:te.compData)==null?void 0:ve.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:st.find(he=>{var ae,Be;return(he==null?void 0:he.key)===a||((Be=(ae=he==null?void 0:he.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:Be[1])===a}))==null?void 0:q.value,(xe=aa.value)!=null&&xe.includes(`updateLoading${((M=Xt.value)==null?void 0:M.account)||((ye=Xt.value)==null?void 0:ye.账号)}`)){let he=[],ae=[];const Be=await p.getInsofDataApi({key:{pageKey:(le=aa.value.split(Qt+`updateLoading${((Le=Xt.value)==null?void 0:Le.account)||((ce=Xt.value)==null?void 0:ce.账号)}`))==null?void 0:le[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Te=(re=Be==null?void 0:Be.data)==null?void 0:re.result)==null?void 0:Te.length)>0){let Je=(Xe=l==null?void 0:l.data)==null?void 0:Xe.result,Me=(dt=p.cloneDeep(Je))==null?void 0:dt.map(async Ve=>{var me,ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut,et;if(((me=Ve==null?void 0:Ve.key)==null?void 0:me.type)==="structure"){let ft=(De=(be=(Ke=(ct=Ve==null?void 0:Ve.value)==null?void 0:ct.pageData)==null?void 0:Ke.compData)==null?void 0:be.find(rt=>(rt==null?void 0:rt.key)==="parentFormPath"))==null?void 0:De.contents;if(ft){let rt=await Ne.getItemData(ft,sessionStorage.getItem("systemKey"),""),Se=(Fe=(Ae=(de=(Qe=Ve==null?void 0:Ve.value)==null?void 0:Qe.pageData)==null?void 0:de.compData)==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:Fe.contents,Ze=rt==null?void 0:rt.filter(He=>(He==null?void 0:He.comp)==="Form");Ze==null||Ze.forEach(He=>{var pt;(pt=He==null?void 0:He.compData)==null||pt.forEach(vt=>{var Tt,It;if((vt==null?void 0:vt.key)==="formContent"&&((Tt=vt==null?void 0:vt.contents)==null?void 0:Tt.some(Dt=>Se==null?void 0:Se.find(Ot=>(Ot==null?void 0:Ot.prop)===(Dt==null?void 0:Dt.prop))))){let Dt=He;Dt.compData=(It=Dt.compData)==null?void 0:It.map(Bt=>{var Ut;return(Bt==null?void 0:Bt.key)==="formContent"&&(Bt.contents=(Ut=Bt.contents)==null?void 0:Ut.map(Pt=>{var Vt;return Se!=null&&Se.find(qt=>(qt==null?void 0:qt.prop)===(Pt==null?void 0:Pt.prop))&&(Pt.value=(Vt=Se==null?void 0:Se.find(qt=>(qt==null?void 0:qt.prop)===(Pt==null?void 0:Pt.prop)))==null?void 0:Vt.value),Pt})),Bt});let Ot={};for(let Bt in Dt)Bt!=="id"&&(Ot[Bt]=Dt[Bt]);c.push({id:He==null?void 0:He.id,value:{pageData:Ot}})}})})}else if((N=(We=Be==null?void 0:Be.data)==null?void 0:We.result)!=null&&N.find(rt=>{var Se,Ze,He,pt;return((Ze=(Se=rt==null?void 0:rt.value)==null?void 0:Se.pageData)==null?void 0:Ze.name)===((pt=(He=Ve==null?void 0:Ve.value)==null?void 0:He.pageData)==null?void 0:pt.name)})){let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(_n).value+Qt+fe,c.push({id:(et=(ut=(Ce=Be==null?void 0:Be.data)==null?void 0:Ce.result)==null?void 0:ut.find(Se=>{var Ze,He,pt,vt;return((He=(Ze=Se==null?void 0:Se.value)==null?void 0:Ze.pageData)==null?void 0:He.name)===((vt=(pt=Ve==null?void 0:Ve.value)==null?void 0:pt.pageData)==null?void 0:vt.name)}))==null?void 0:et.id,key:rt,value:Ve==null?void 0:Ve.value})}else{let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(_n).value+Qt+fe,he.push({key:rt,value:Ve==null?void 0:Ve.value})}}});await Promise.all(Me),(C=(g=l==null?void 0:l.data)==null?void 0:g.result)==null||C.forEach(Ve=>{var ct,Ke,be;let me=(ct=p.cloneDeep(Ve))==null?void 0:ct.key;me.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((Ke=Xt.value)==null?void 0:Ke.account)||((be=Xt.value)==null?void 0:be.账号)}`,Mn.setChildMenu(me.pageKey),c.push({id:Ve==null?void 0:Ve.id,key:me})})}if(fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(U=c==null?void 0:c[0])!=null&&U.key&&await Ca.setLogRecordAsync({type:"保存",data:c},(J=c==null?void 0:c[0])==null?void 0:J.key),(he==null?void 0:he.length)>0&&(await p.batchAddInsofDataApi({dataList:he}),(v=he==null?void 0:he[0])!=null&&v.key&&await Ca.setLogRecordAsync({type:"保存",data:he},(F=he==null?void 0:he[0])==null?void 0:F.key));const Je=await p.getInsofDataApi({key:{pageKey:(pe=aa.value.split(Qt+`updateLoading${((ee=Xt.value)==null?void 0:ee.account)||((R=Xt.value)==null?void 0:R.账号)}`))==null?void 0:pe[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Y=(L=Je==null?void 0:Je.data)==null?void 0:L.result)==null?void 0:Y.length)>0){let Me=[],Ve=(ie=l==null?void 0:l.data)==null?void 0:ie.result;(ge=p.cloneDeep(Ve))==null||ge.forEach(me=>{var ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut;if(((ct=me==null?void 0:me.key)==null?void 0:ct.type)!=="structure"){let et=(De=(be=(Ke=Je==null?void 0:Je.data)==null?void 0:Ke.result)==null?void 0:be.filter(Ze=>{var He;return((He=Ze==null?void 0:Ze.key)==null?void 0:He.type)==="data"}))==null?void 0:De.map(Ze=>Ze==null?void 0:Ze.id);Me=[...Me,...et];let ft=(Fe=(Ae=(de=(Qe=p.cloneDeep(Ve))==null?void 0:Qe.find(Ze=>{var He;return((He=me==null?void 0:me.key)==null?void 0:He.tableId)===(Ze==null?void 0:Ze.id)}))==null?void 0:de.value)==null?void 0:Ae.pageData)==null?void 0:Fe.name,rt=(Ce=(N=(We=Je==null?void 0:Je.data)==null?void 0:We.result)==null?void 0:N.find(Ze=>{var He,pt;return((pt=(He=Ze==null?void 0:Ze.value)==null?void 0:He.pageData)==null?void 0:pt.name)===ft}))==null?void 0:Ce.id,Se=(ut=p.cloneDeep(me))==null?void 0:ut.key;Se.tableId=rt,Se.pageKey=p.cloneDeep(_n).value+Qt+fe,ae.push({key:Se,value:me==null?void 0:me.value})}}),(Me==null?void 0:Me.length)>0&&(Me=[...new Set(Me)],await p.batchDeleteInsofDataApi({ids:Me})),(oe=($=l==null?void 0:l.data)==null?void 0:$.result)==null||oe.forEach(me=>{var Ke,be,De;let ct=(Ke=p.cloneDeep(me))==null?void 0:Ke.key;ct.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((be=Xt.value)==null?void 0:be.account)||((De=Xt.value)==null?void 0:De.账号)}`,Mn.setChildMenu(ct.pageKey),c.push({id:me==null?void 0:me.id,key:ct})})}(ae==null?void 0:ae.length)>0&&(await p.batchAddInsofDataApi({dataList:ae}),(X=he==null?void 0:he[0])!=null&&X.key&&await Ca.setLogRecordAsync({type:"保存",data:ae},(_e=ae==null?void 0:ae[0])==null?void 0:_e.key)),p.ElMessage.success("保存成功")}}else{if((Oe=(Re=l==null?void 0:l.data)==null?void 0:Re.result)==null||Oe.forEach(he=>{var Be;let ae=(Be=p.cloneDeep(he))==null?void 0:Be.key;ae.pageKey=p.cloneDeep(_n).value+Qt+fe,Mn.setChildMenu(ae.pageKey),c.push({id:he==null?void 0:he.id,key:ae})}),fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1),Mn.setChildMenu("");return}(Ye=c==null?void 0:c[0])!=null&&Ye.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await Ca.setLogRecordAsync({type:"保存",data:c},(qe=c==null?void 0:c[0])==null?void 0:qe.key)),await Ne.loadingConstruct(p.cloneDeep(_n).value+Qt+fe,p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((lt=Xt.value)==null?void 0:lt.account)||((Z=Xt.value)==null?void 0:Z.账号)}`),Mn.setActiveMenuPath(p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((tt=Xt.value)==null?void 0:tt.account)||((at=Xt.value)==null?void 0:at.账号)}`),p.ElMessage.success("保存成功")}}Mn.setImportLoading(!1)},sc={key:0,class:"method-content"},cc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const s=e.ref([]),i=Ne.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(i),c=a,d=e.ref(!1),x=e.ref(),m=Ne.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(m),D=jt.useModelComp(p.pinia),E=e.ref(!1),T=jt.useMenuState(p.pinia),O=p.useLoginState(p.pinia),{itemData:H,isEdit:V,routeToChildPath:ke,tableViewContents:W,lockingPage:K,payloadTypes:G}=p.storeToRefs(D),{activeMenuPath:w,platform:z,childMenu:k}=p.storeToRefs(T),{loginUserInfo:A}=p.storeToRefs(O),I=e.ref(!1),se=async()=>{var q,M;(q=s.value)!=null&&q.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")&&await te((M=s.value)==null?void 0:M.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")),await El()};e.watch(()=>H.value,async()=>{V.value==="view"&&!I.value&&await st(p.cloneDeep(c.itemData)),I.value=!1},{deep:!0});const $e=()=>{d.value=!1,x.value=void 0},nt=q=>q.map(M=>{const ye={};for(const xe in M){const Re=M[xe];if(xe.includes(h.value)){const Oe=xe.split(h.value);let Ye=ye;Oe.forEach((qe,lt)=>{lt===Oe.length-1?Ye[qe]=Re:(Ye[qe]||(Ye[qe]={}),Ye=Ye[qe])})}else ye[xe]=Re}return ye}),Ie=async(q,M,ye=[])=>{var Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt;let xe=(Re=p.cloneDeep(M))==null?void 0:Re.filter(g=>(g==null?void 0:g.comp)!=="methodButton");if(q!=null&&q.includes("[")){let g=(Z=(lt=(qe=(Ye=(Oe=p.cloneDeep(q))==null?void 0:Oe.split("["))==null?void 0:Ye[1])==null?void 0:qe.split("]"))==null?void 0:lt[0])==null?void 0:Z.split(":"),C="";if(g!=null&&g[0]){let U=(tt=xe==null?void 0:xe.find(J=>(J==null?void 0:J.name)===(g==null?void 0:g[0])))==null?void 0:tt.compData;if(!U){let J=(at=q==null?void 0:q.split("["))==null?void 0:at[0],v=await Ne.getItemData(J,sessionStorage.getItem("systemKey"),"",!1,"","",ye);U=(Le=v==null?void 0:v.find(F=>(F==null?void 0:F.name)===(g==null?void 0:g[0])))==null?void 0:Le.compData}U==null||U.forEach(J=>{var v,F,ee,R,pe,L;if((J==null?void 0:J.key)==="formContent")(v=J==null?void 0:J.contents)==null||v.forEach(Y=>{var ie;(Y==null?void 0:Y.key)===(g==null?void 0:g[1])&&(Array.isArray(Y==null?void 0:Y.value)?C=Y==null?void 0:Y.value:C=(ie=Y==null?void 0:Y.value)==null?void 0:ie.toString())});else if((J==null?void 0:J.key)==="tableContents"){let Y=[],ie=(F=U==null?void 0:U.find($=>($==null?void 0:$.key)==="header"))==null?void 0:F.contents,ge=(g==null?void 0:g[1])??"";if(ie!=null&&ie.every($=>Array.isArray($))){let $=Ne.getColumnChild((pe=ie==null?void 0:ie[0])==null?void 0:pe.filter(oe=>(oe==null?void 0:oe.label)!=="操作"));(L=J.contents)==null||L.forEach(oe=>{let X={};oe=oe==null?void 0:oe.filter(_e=>!(_e!=null&&_e.id)),$==null||$.forEach((_e,fe)=>{let Ee=oe[fe];typeof oe[fe]=="number"&&(Ee=oe[fe].toString()),(ge===""||ge===_e.prop)&&(X[_e.prop]=Ee)}),Y.push(X)}),Y=nt(Y)}else{let $=(ee=ie==null?void 0:ie.map(oe=>oe==null?void 0:oe.label))==null?void 0:ee.filter(oe=>oe!=="操作");(R=J.contents)==null||R.forEach(oe=>{let X={};oe=oe==null?void 0:oe.filter(_e=>!(_e!=null&&_e.id)),$==null||$.forEach((_e,fe)=>{let Ee=oe[fe];typeof oe[fe]=="number"&&(Ee=oe[fe].toString()),(ge===""||ge===_e)&&(X[_e]=Ee)}),Y.push(X)})}C=Y}})}return C}else if(q!=null&&q.includes("/")){let g={};return(ce=p.cloneDeep(xe))==null||ce.forEach((C,U)=>{var J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae;if((C==null?void 0:C.comp)==="Table"){let Be=Array.isArray((F=(v=(J=C==null?void 0:C.compData)==null?void 0:J.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:v.contents)==null?void 0:F[0])?(L=(pe=(R=(ee=C==null?void 0:C.compData)==null?void 0:ee.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:R.contents)==null?void 0:pe[0])==null?void 0:L.some(me=>me==null?void 0:me.children):[],Je=(ge=(ie=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(me=>(me==null?void 0:me.key)==="tableContents"))==null?void 0:ie.contents)==null?void 0:ge.map(me=>(me!=null&&me.find(ct=>ct==null?void 0:ct.id)&&(me=me.slice(1)),me)),Me=(fe=(_e=(X=(oe=($=C==null?void 0:C.compData)==null?void 0:$.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:oe.contents)==null?void 0:X[0])==null?void 0:_e[0])==null?void 0:fe.label,Ve=(P=(Ee=C==null?void 0:C.compData)==null?void 0:Ee.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:P.contents;if(Be)(Be==null?void 0:Be.length)===0?g[C.name]=g!=null&&g[C.name]?g[C.name]:Ne.tableToForm(Je,Ve):g[Me]=Ne.tableToForm(Je,Ve);else{const me=[];Ve=Ve.slice(1,Ve.length-1),Ve==null||Ve.forEach((ct,Ke)=>{Je==null||Je.forEach(be=>{me.push({key:ct.label+be[0],value:be[Ke+1]})})}),g["form"+U]=me}}else{const Be=(ae=(he=C.compData)==null?void 0:he.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:ae.contents;g!=null&&g.form||(g.form=[]);const Je=[];Be==null||Be.forEach(Me=>{Me.key!==""&&(Me={key:(Me==null?void 0:Me.key)??(Me==null?void 0:Me.label),value:Me==null?void 0:Me.value},Je.push(Me))}),g.form=[...Je,...p.cloneDeep(g==null?void 0:g.form)]}}),g}else{if(q==="createInsofDataApi"){let g=(le=p.cloneDeep(M))==null?void 0:le[0];return g={comp:(re=p.cloneDeep(g))==null?void 0:re.comp,compData:(Te=p.cloneDeep(g))==null?void 0:Te.compData,name:(Xe=p.cloneDeep(g))==null?void 0:Xe.name,isShow:(dt=p.cloneDeep(g))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:g}}}return q}},ze=async(q,M,ye)=>{var Oe,Ye,qe;let xe=await Ne.getItemData(M,sessionStorage.getItem("systemKey"),""),Re=xe==null?void 0:xe.find(lt=>(lt==null?void 0:lt.name)===(ye==null?void 0:ye[0]));if(Re){if((Re==null?void 0:Re.comp)==="Table"){let lt={};for(let re in p.cloneDeep(q))p.cloneDeep(q)[re]!=="loginUser"?lt[re]=p.cloneDeep(q)[re]:lt[re]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);let Z=[],tt=lt;Array.isArray(q)||(tt=[lt]),tt==null||tt.forEach(re=>{Z.push({[re[ye[1]]]:re})});let at=[],Le=Z==null?void 0:Z.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]});xe==null||xe.forEach(re=>{var Te;(re==null?void 0:re.name)===(ye==null?void 0:ye[0])&&((Te=re==null?void 0:re.compData)==null||Te.forEach(Xe=>{var dt;(Xe==null?void 0:Xe.key)==="tableContents"&&((dt=Xe==null?void 0:Xe.contents)==null||dt.forEach(g=>{g!=null&&g.some(C=>Le.includes(C))&&at.push({[g.find(C=>C.id).id]:g.find(C=>Le.includes(C))})}))}))});let ce=at==null?void 0:at.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]}),le=[];if(ce==null||ce.forEach(re=>{var dt;let Te=(dt=at==null?void 0:at.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0].toString())===re.toString()}))==null?void 0:dt[re],Xe=Z==null?void 0:Z.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0])===Te});le.push({id:parseInt(re),value:{tableData:Xe[Te]}})}),(le==null?void 0:le.length)>0)return le}else if((Re==null?void 0:Re.comp)==="Form"){let lt=p.cloneDeep(Re);lt.compData=(qe=lt.compData)==null?void 0:qe.map(at=>{var Le;return(at==null?void 0:at.key)==="formContent"&&(at.contents=(Le=at.contents)==null?void 0:Le.map(ce=>((ce==null?void 0:ce.key)===(ye==null?void 0:ye[1])&&(ce.value=(q==null?void 0:q[ce==null?void 0:ce.prop])||q),ce))),at});let Z={};for(let at in lt)at!=="id"&&(Z[at]=lt[at]);let tt=[];if(tt.push({id:Re==null?void 0:Re.id,keyType:ye==null?void 0:ye[1],value:{pageData:Z}}),(tt==null?void 0:tt.length)>0)return tt}}},ue=async(q,M,ye)=>{var Oe,Ye,qe,lt,Z,tt,at,Le,ce,le;let xe=await Ne.getItemData(M,sessionStorage.getItem("systemKey"),""),Re=xe==null?void 0:xe.find(re=>(re==null?void 0:re.name)===(ye==null?void 0:ye[0]));if(Re){if((Re==null?void 0:Re.comp)==="Table"){let re={};for(let Te in p.cloneDeep(q))p.cloneDeep(q)[Te]!=="loginUser"?re[Te]=p.cloneDeep(q)[Te]:re[Te]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);await p.createInsofDataApi({key:{type:"data",pageKey:M,tableId:Re==null?void 0:Re.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})}else if((Re==null?void 0:Re.comp)==="Form"){let re=p.cloneDeep(Re),Te=Object.keys(q),Xe="";(lt=(qe=p.cloneDeep(re))==null?void 0:qe.compData)==null||lt.forEach(v=>{var F,ee;(v==null?void 0:v.key)==="formContent"&&((ee=(F=p.cloneDeep(v))==null?void 0:F.contents)==null||ee.forEach(R=>{var pe;Te.includes(R==null?void 0:R.key)&&(R==null?void 0:R.value)===((pe=A.value)==null?void 0:pe.姓名)&&(Xe=R==null?void 0:R.key)}))});let dt=[];(Z=Object.values(q[Xe]))==null||Z.forEach(v=>{v!=null&&v.includes("(")&&dt.push(v)}),dt=[...new Set(dt)];const g=dt==null?void 0:dt.map(async v=>{var L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he;let F="";(oe=($=(ge=(ie=(Y=(L=p.cloneDeep(v))==null?void 0:L.split("("))==null?void 0:Y[1])==null?void 0:ie.split(")"))==null?void 0:ge[0])==null?void 0:$.split(":"))==null||oe.forEach(ae=>{F=F===""?F+ae.replaceAll("'",""):F+"/"+ae.replaceAll("'","")});let ee=[];(he=(P=(Ee=(fe=(_e=(X=p.cloneDeep(v))==null?void 0:X.split("<"))==null?void 0:_e[1])==null?void 0:fe.split(">"))==null?void 0:Ee[0])==null?void 0:P.split(":"))==null||he.forEach(ae=>{ee.push(ae.replaceAll("'",""))});const R=await Ne.getItemData(F,sessionStorage.getItem("systemKey"),"");let pe="";return R==null||R.forEach(ae=>{var Be;ae.name===(ee==null?void 0:ee[0])&&((Be=ae==null?void 0:ae.compData)==null||Be.forEach(Je=>{var Me;(Je==null?void 0:Je.key)==="formContent"&&((Me=Je.contents)==null||Me.forEach(Ve=>{(Ve==null?void 0:Ve.key)===(ee==null?void 0:ee[1])&&(pe=Ve==null?void 0:Ve.value)}))}))}),{[v]:pe}}),C=await Promise.all(g);re.compData=(at=(tt=p.cloneDeep(re))==null?void 0:tt.compData)==null?void 0:at.map(v=>{var F,ee;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(ee=(F=p.cloneDeep(v))==null?void 0:F.contents)==null?void 0:ee.map(R=>{var pe,L,Y,ie;return(pe=q[Xe])!=null&&pe[R==null?void 0:R.key]&&(q[Xe][R==null?void 0:R.key].includes("(")?R.value=(L=C==null?void 0:C.find(ge=>{var $;return(($=Object.keys(ge))==null?void 0:$[0])===q[Xe][R==null?void 0:R.key]}))==null?void 0:L[q[Xe][R==null?void 0:R.key]]:R.value=(ie=(Y=p.cloneDeep(q))==null?void 0:Y[Xe])==null?void 0:ie[R==null?void 0:R.key]),R})),v});const U=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let J="";((Le=U==null?void 0:U.data)==null?void 0:Le.type)==="success"&&((le=(ce=U==null?void 0:U.data)==null?void 0:ce.result)==null||le.forEach(v=>{var F,ee;((ee=(F=v==null?void 0:v.value)==null?void 0:F.pageData)==null?void 0:ee.name)===(ye==null?void 0:ye[0])&&(J=v.id)}),await p.updateInsofDataApi({id:J,value:{pageData:re}}))}}},_=(q,M="",ye={})=>{for(const[xe,Re]of Object.entries(q)){const Oe=M?`${M}.${xe}`:xe;Re!==null&&typeof Re=="object"&&!Array.isArray(Re)&&Object.prototype.toString.call(Re)!=="[object Date]"?_(Re,Oe,ye):ye[Oe]=Re}return ye},ne=async(q,M,ye,xe)=>{var Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F,ee,R,pe,L,Y,ie;let Re=await Ne.getItemData(M,sessionStorage.getItem("systemKey"),""),Oe=Re==null?void 0:Re.find(ge=>(ge==null?void 0:ge.name)===(ye==null?void 0:ye[0]));if(Oe){if(!(ye!=null&&ye[1])&&(Oe==null?void 0:Oe.comp)==="Table"){let ge={},$=[],oe=(qe=(Ye=Oe==null?void 0:Oe.compData)==null?void 0:Ye.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:qe.contents;oe!=null&&oe.every(fe=>Array.isArray(fe))?$=(Z=Ne.getColumnChild((lt=oe==null?void 0:oe[0])==null?void 0:lt.filter(fe=>(fe==null?void 0:fe.label)!=="操作")))==null?void 0:Z.map(fe=>fe==null?void 0:fe.prop):$=oe==null?void 0:oe.map(fe=>fe==null?void 0:fe.label);for(let fe in p.cloneDeep(q))if(p.cloneDeep(q)[fe]!=="loginUser"){let Ee=_(p.cloneDeep(q)[fe]),P={};for(let he in Ee)if($!=null&&$.find(ae=>ae===he))P[he]=Ee[he];else if($!=null&&$.find(ae=>(ae==null?void 0:ae.toUpperCase())===(he==null?void 0:he.toUpperCase()))){let ae=$==null?void 0:$.find(Be=>(Be==null?void 0:Be.toUpperCase())===(he==null?void 0:he.toUpperCase()));P[ae]=Ee[he]}ge[fe]=P}else ge[fe]=((tt=A.value)==null?void 0:tt.account)||((at=A.value)==null?void 0:at.账号);let X=await p.getInsofDataApi({keyLikes:{tableId:Oe==null?void 0:Oe.id}});if(((ce=(Le=X==null?void 0:X.data)==null?void 0:Le.result)==null?void 0:ce.length)>0){let fe=(re=(le=X==null?void 0:X.data)==null?void 0:le.result)==null?void 0:re.map(Ee=>Ee==null?void 0:Ee.id);(fe==null?void 0:fe.length)>0&&await p.batchDeleteInsofDataApi({ids:fe})}let _e=[];if((Te=Oe==null?void 0:Oe.compData)!=null&&Te.find(fe=>(fe==null?void 0:fe.key)==="pageColumn")&&((g=(dt=(Xe=Oe==null?void 0:Oe.compData)==null?void 0:Xe.find(fe=>(fe==null?void 0:fe.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&g.includes("["))){const fe=await p.getInsofDataApi({id:Oe==null?void 0:Oe.tableId});let Ee=((v=(J=(U=(C=fe==null?void 0:fe.data)==null?void 0:C.result)==null?void 0:U[0])==null?void 0:J.key)==null?void 0:v.pageKey)??"";(F=Object.values(ge))==null||F.forEach(P=>{_e.push({key:{type:"data",pageKey:Ee,tableId:Oe==null?void 0:Oe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:P}})})}else(ee=Object.values(ge))==null||ee.forEach(fe=>{_e.push({key:{type:"data",pageKey:M,tableId:Oe==null?void 0:Oe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})});(_e==null?void 0:_e.length)>0&&await p.batchAddInsofDataApi({dataList:_e})}else if(!(ye!=null&&ye[1])&&(Oe==null?void 0:Oe.comp)==="Form"){let ge=p.cloneDeep(Oe);ge.compData=(pe=(R=p.cloneDeep(ge))==null?void 0:R.compData)==null?void 0:pe.map(X=>{var _e,fe;return(X==null?void 0:X.key)==="formContent"&&(X.contents=(fe=(_e=p.cloneDeep(X))==null?void 0:_e.contents)==null?void 0:fe.map(Ee=>{var P,he;return(P=p.cloneDeep(q))!=null&&P[Ee==null?void 0:Ee.key]&&(Ee.value=(he=p.cloneDeep(q))==null?void 0:he[Ee==null?void 0:Ee.key]),Ee})),X});const $=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let oe="";((L=$==null?void 0:$.data)==null?void 0:L.type)==="success"&&((ie=(Y=$==null?void 0:$.data)==null?void 0:Y.result)==null||ie.forEach(X=>{var _e,fe;((fe=(_e=X==null?void 0:X.value)==null?void 0:_e.pageData)==null?void 0:fe.name)===(ye==null?void 0:ye[0])&&(oe=X.id)}),await p.updateInsofDataApi({id:oe,value:{pageData:ge}}))}}},te=async q=>{var M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te;T.setImportLoading(!0);try{if(q.api){let Xe=new WeakMap;(ye=(M=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value})).data.result)==null?void 0:M.filter(L=>{var Y,ie;return((Y=L==null?void 0:L.key)==null?void 0:Y.pageKey)!=="menu"&&((ie=L==null?void 0:L.key)==null?void 0:ie.pageKey)!=="secret"}))==null||ye.forEach(L=>{Xe[L.key.pageKey]?Xe[L.key.pageKey]=[...Xe[L.key.pageKey],L]:Xe[L.key.pageKey]=[L]});let g=await Ne.getItemData((k==null?void 0:k.value)===""?w.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe),C="";if(g=g==null?void 0:g.map(L=>{var Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae;if((L==null?void 0:L.comp)==="Form")L.compData=(Y=L.compData)==null?void 0:Y.map(Be=>{var Je;return(Be==null?void 0:Be.key)==="formContent"&&(Be.contents=(Je=Be.contents)==null?void 0:Je.map(Me=>{var Ve;if((Me==null?void 0:Me.value)===""&&(Me==null?void 0:Me.type)==="Select"){let me=Ne.judgeContents((Ve=p.cloneDeep(Me))==null?void 0:Ve.optionUrl,Xe);Me.value=Me.value||me}return Me})),Be});else if((L==null?void 0:L.comp)==="Table"&&(ie=L.compData)!=null&&ie.find(Be=>(Be==null?void 0:Be.key)==="pageColumn")){let Be=($=(ge=L.compData)==null?void 0:ge.find(me=>(me==null?void 0:me.key)==="pageColumn"))==null?void 0:$.contents,Je=((X=(oe=L.compData)==null?void 0:oe.find(me=>(me==null?void 0:me.key)==="pageGroup"))==null?void 0:X.contents)??"",Me=(Ee=(fe=(_e=Be==null?void 0:Be.split("["))==null?void 0:_e[1])==null?void 0:fe.split("]"))==null?void 0:Ee[0];C=((P=Be==null?void 0:Be.split("["))==null?void 0:P[0])+((ae=(he=W.value)==null?void 0:he.find(me=>(me==null?void 0:me.key)===Me))==null?void 0:ae.value)}return L}),!(C===""||C==="")){const L=await Ne.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);g=g==null?void 0:g.map(Y=>{var ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je;if((Y==null?void 0:Y.comp)==="Table"&&(ie=Y.compData)!=null&&ie.find(Me=>(Me==null?void 0:Me.key)==="pageColumn")){let Me=($=(ge=Y.compData)==null?void 0:ge.find(be=>(be==null?void 0:be.key)==="pageColumn"))==null?void 0:$.contents,Ve=((X=(oe=Y.compData)==null?void 0:oe.find(be=>(be==null?void 0:be.key)==="pageGroup"))==null?void 0:X.contents)??"",me=(Ee=(fe=(_e=Me==null?void 0:Me.split("["))==null?void 0:_e[1])==null?void 0:fe.split("]"))==null?void 0:Ee[0],ct=((P=Me==null?void 0:Me.split("["))==null?void 0:P[0])+((ae=(he=W.value)==null?void 0:he.find(be=>(be==null?void 0:be.key)===me))==null?void 0:ae.value),Ke=(Be=L==null?void 0:L.find(be=>(be==null?void 0:be.name)===(Ve===""?c==null?void 0:c.compName:Ve)))==null?void 0:Be.compData;Y.compData=(Je=Y.compData)==null?void 0:Je.map(be=>{var De;return(be==null?void 0:be.key)==="tableContents"&&(be.contents=(De=Ke==null?void 0:Ke.find(Qe=>(Qe==null?void 0:Qe.key)==="tableContents"))==null?void 0:De.contents),be})}return Y})}let U={};if(((Re=(xe=q==null?void 0:q.extraValues)==null?void 0:xe.input)==null?void 0:Re.length)>0){const L=(Ye=(Oe=q==null?void 0:q.extraValues)==null?void 0:Oe.input)==null?void 0:Ye.map(async Y=>{var ie;ve!=null&&ve.find(ge=>ge===Y)?U=await Ie(Y,g):U[Object.keys(Y)[0]]=await Ie((ie=Object.values(Y))==null?void 0:ie[0],g,Xe)});await Promise.all(L)}else U=await Ie("/",g);let J=!1;(lt=(qe=q==null?void 0:q.extraValues)==null?void 0:qe.output)==null||lt.forEach(L=>{var Y,ie;(ie=(Y=Object.values(L))==null?void 0:Y[0])!=null&&ie.includes(".doc")&&(J=!0)});let v;if(J){const L=Ne.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});v=await p.axios.post(q.api,U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{L.close()})}else v=await p.axios.post(q.api,U,{headers:{"Content-Type":"application/json"}});let F=(Le=(at=(tt=(Z=p.cloneDeep(q))==null?void 0:Z.extraValues)==null?void 0:tt.output)==null?void 0:at.map(L=>{var Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve;if(!((ie=(Y=Object.values(L))==null?void 0:Y[0])!=null&&ie.includes(".doc"))){let me=(P=(Ee=(fe=($=p.cloneDeep((ge=Object.values(L))==null?void 0:ge[0]))==null?void 0:$.split("["))==null?void 0:fe[((_e=(X=p.cloneDeep((oe=Object.values(L))==null?void 0:oe[0]))==null?void 0:X.split("["))==null?void 0:_e.length)-1])==null?void 0:Ee.split("]"))==null?void 0:P[0],ct=me==null?void 0:me.split(":"),Ke=(Be=p.cloneDeep((he=Object.values(L))==null?void 0:he[0]))==null?void 0:Be.substring(0,p.cloneDeep((ae=Object.values(L))==null?void 0:ae[0]).lastIndexOf("["));if(Ke=(Me=p.cloneDeep(Ke))==null?void 0:Me.slice(0,((Je=p.cloneDeep(Ke))==null?void 0:Je.length)-1),Ke!=null&&Ke.includes("[")){let be="";if((Ve=_a(Ke,"/"))==null||Ve.forEach(De=>{var Qe,de,Ae,Fe,We,N,Ce;if(!(De!=null&&De.includes("[")))be=be===""?be+De.replaceAll("/",""):be+"/"+De.replaceAll("/","");else{let ut=p.cloneDeep(De).slice(1,((Qe=p.cloneDeep(De))==null?void 0:Qe.length)-1),et=(N=(We=(Fe=(Ae=(de=p.cloneDeep(ut))==null?void 0:de.split("["))==null?void 0:Ae[1])==null?void 0:Fe.split("]"))==null?void 0:We[0])==null?void 0:N.split(":"),ft="",rt=(Ce=g==null?void 0:g.find(Se=>(Se==null?void 0:Se.name)===(et==null?void 0:et[0])))==null?void 0:Ce.compData;rt==null||rt.forEach(Se=>{var Ze;(Se==null?void 0:Se.key)==="formContent"&&((Ze=Se==null?void 0:Se.contents)==null||Ze.forEach(He=>{(He==null?void 0:He.key)===(et==null?void 0:et[1])&&(ft=He==null?void 0:He.value)}))}),be=be===""?be+ft.replaceAll("/",""):be+"/"+ft.replaceAll("/","")}}),Ke=be,Ke[(Ke==null?void 0:Ke.length)-1]!=="/")return Ke}}}))==null?void 0:Le.filter(L=>L);F=[...new Set(p.cloneDeep(F))];let ee=F==null?void 0:F.map(async L=>{let Y=await Ne.getItemData(L,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);if((Y==null?void 0:Y.length)===0)return await Ne.getParentContents(L)});await Promise.all(ee);let R=[],pe=(re=(le=(ce=p.cloneDeep(q))==null?void 0:ce.extraValues)==null?void 0:le.output)==null?void 0:re.map(async L=>{var fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It,wt,Dt,Ot,Bt,Ut,Pt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn,kt,Jt,gt,Qn,Mt,yn,Nn,on,Vn,Zt,Kn;if((Ee=(fe=Object.values(L))==null?void 0:fe[0])!=null&&Ee.includes(".doc")){var Y=new Blob([v.data],{type:"application/octet-stream;charset=UTF-8"}),ie=v.headers["content-disposition"],ge=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),$=ge.exec(ie),oe=$==null?void 0:$[1],X=document.createElement("a"),_e=window.URL.createObjectURL(Y);x.value=[{name:oe,blobUrl:_e}],d.value=!0}else{let bn=(me=(Ve=(Me=(he=p.cloneDeep((P=Object.values(L))==null?void 0:P[0]))==null?void 0:he.split("["))==null?void 0:Me[((Je=(Be=p.cloneDeep((ae=Object.values(L))==null?void 0:ae[0]))==null?void 0:Be.split("["))==null?void 0:Je.length)-1])==null?void 0:Ve.split("]"))==null?void 0:me[0],zt=bn==null?void 0:bn.split(":"),Gt=(be=p.cloneDeep((ct=Object.values(L))==null?void 0:ct[0]))==null?void 0:be.substring(0,p.cloneDeep((Ke=Object.values(L))==null?void 0:Ke[0]).lastIndexOf("["));if(Gt!=null&&Gt.includes("[")?Gt=(Qe=p.cloneDeep(Gt))==null?void 0:Qe.slice(0,((De=p.cloneDeep(Gt))==null?void 0:De.length)-1):Gt===""&&(Gt=w.value),Gt=Gt.replaceAll("<","[").replaceAll(">","]"),Gt!=null&&Gt.includes("[")){let Ct="";(de=_a(Gt,"/"))==null||de.forEach((At,Wt)=>{var Ht,$t,cn,rn,Un,Zn,Wn,ea,Na,ca,ba;if(!(At!=null&&At.includes("[")))Ct=Ct===""?Ct+At.replaceAll("/",""):Ct+"/"+At.replaceAll("/","");else{let ua="",kn="";(Ht=p.cloneDeep(At))!=null&&Ht.includes("]")?(ua=p.cloneDeep(At).slice(1,(($t=p.cloneDeep(At))==null?void 0:$t.length)-1),kn=(Wn=(Zn=(Un=(rn=(cn=p.cloneDeep(ua))==null?void 0:cn.split("["))==null?void 0:rn[1])==null?void 0:Un.split("]"))==null?void 0:Zn[0])==null?void 0:Wn.split(":")):(ua=p.cloneDeep(At).slice(1,(ea=p.cloneDeep(At))==null?void 0:ea.length),kn=(Na=p.cloneDeep(ua))==null?void 0:Na.split("/"));let ta="",pa=(ca=g==null?void 0:g.find(sn=>(sn==null?void 0:sn.name)===(kn==null?void 0:kn[0])))==null?void 0:ca.compData;pa==null||pa.forEach(sn=>{var Va;(sn==null?void 0:sn.key)==="formContent"&&((Va=sn==null?void 0:sn.contents)==null||Va.forEach(Hn=>{(Hn==null?void 0:Hn.key)===(kn==null?void 0:kn[1])&&(ta=Hn==null?void 0:Hn.value)}))}),((ba=_a(Gt,"/"))==null?void 0:ba.length)-1!==Wt?Ct=Ct===""?Ct+ta.replaceAll("/",""):Ct+"/"+ta.replaceAll("/",""):Ct=Ct+l.value+ta.replaceAll("/","")}}),(Ae=w.value)!=null&&Ae.includes(Ct)?Gt=w.value:Gt=Ct}let ln=p.cloneDeep((Fe=Object.keys(L))==null?void 0:Fe[0]);if(((We=v==null?void 0:v.data)==null?void 0:We.statusCode)===200||((N=v==null?void 0:v.data)==null?void 0:N.code)===200){if(((ut=(Ce=v==null?void 0:v.data)==null?void 0:Ce.data)!=null&&ut[ln]||(ft=(et=v==null?void 0:v.data)==null?void 0:et.result)!=null&&ft[ln])&&(zt==null?void 0:zt.length)===1)return await ne(((Se=(rt=v==null?void 0:v.data)==null?void 0:rt.data)==null?void 0:Se[ln])||((He=(Ze=v==null?void 0:v.data)==null?void 0:Ze.result)==null?void 0:He[ln]),p.cloneDeep(Gt),zt,C);if((vt=(pt=v==null?void 0:v.data)==null?void 0:pt.data)!=null&&vt[ln]||(It=(Tt=v==null?void 0:v.data)==null?void 0:Tt.result)!=null&&It[ln]){let Ct=await ze(((Dt=(wt=v==null?void 0:v.data)==null?void 0:wt.data)==null?void 0:Dt[ln])||((Bt=(Ot=v==null?void 0:v.data)==null?void 0:Ot.result)==null?void 0:Bt[ln]),p.cloneDeep(Gt),zt);return Ct&&(R=[...R,...Ct]),Ct}else{if(!((Ut=v==null?void 0:v.data)!=null&&Ut.data)){let Ct=await Ne.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);Ct=Ct==null?void 0:Ct.map(Wt=>{var Ht;return(Wt==null?void 0:Wt.name)===(zt==null?void 0:zt[0])&&(Wt.compData=(Ht=Wt.compData)==null?void 0:Ht.map($t=>{var cn;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(cn=$t.contents)==null?void 0:cn.map(rn=>{var Un,Zn;return(rn==null?void 0:rn.key)===(zt==null?void 0:zt[1])&&(rn.value=(Zn=(Un=v==null?void 0:v.data)==null?void 0:Un.result)==null?void 0:Zn[ln==null?void 0:ln.replaceAll(":","")]),rn})),$t})),Wt});let At=[];(Pt=Ct==null?void 0:Ct.filter(Wt=>(Wt==null?void 0:Wt.comp)==="Form"))==null||Pt.forEach(async Wt=>{let Ht={};for(let $t in Wt)$t!=="id"&&(Ht[$t]=Wt[$t]);At.push({id:Wt==null?void 0:Wt.id,value:{pageData:Ht}})}),(At==null?void 0:At.length)>0&&await p.batchUpdateInsofDataApi({dataList:At});return}if((zt==null?void 0:zt.length)===1){const Ct=(wn=(qt=(Vt=v==null?void 0:v.data)==null?void 0:Vt.data)==null?void 0:qt.path)==null?void 0:wn.path;let At="";(Tn=(hn=(Sn=(Dn=(fn=Ct==null?void 0:Ct.split("("))==null?void 0:fn[1])==null?void 0:Dn.split(")"))==null?void 0:Sn[0])==null?void 0:hn.split(":"))==null||Tn.forEach($t=>{var cn,rn;At=At===""?At+((cn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:cn.trim()):At+"/"+((rn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:rn.trim())});let Wt=[(Yn=(Xn=(gn=(In=(vn=Ct==null?void 0:Ct.split("<"))==null?void 0:vn[1])==null?void 0:In.split(">"))==null?void 0:gn[0])==null?void 0:Xn.replaceAll("'",""))==null?void 0:Yn.trim()],Ht;return(Bn=(jn=(Jn=v==null?void 0:v.data)==null?void 0:Jn.data)==null?void 0:jn.data)!=null&&Bn[zt==null?void 0:zt[0]]?Ht=await ne((An=(zn=(mn=v==null?void 0:v.data)==null?void 0:mn.data)==null?void 0:zn.data)==null?void 0:An[zt==null?void 0:zt[0]],At,zt,C):Ht=await ue((Cn=(an=v==null?void 0:v.data)==null?void 0:an.data)==null?void 0:Cn.data,At,Wt,Xe),Ht}else{const Ct=(gt=(Jt=(kt=v==null?void 0:v.data)==null?void 0:kt.data)==null?void 0:Jt.path)==null?void 0:gt.path;let At="";return(on=(Nn=(yn=(Mt=(Qn=Ct==null?void 0:Ct.split("("))==null?void 0:Qn[1])==null?void 0:Mt.split(")"))==null?void 0:yn[0])==null?void 0:Nn.split(":"))==null||on.forEach(Ht=>{var $t,cn;At=At===""?At+(($t=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:$t.trim()):At+"/"+((cn=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:cn.trim())}),await ze((Kn=(Zt=(Vn=v==null?void 0:v.data)==null?void 0:Vn.data)==null?void 0:Zt.data)==null?void 0:Kn[zt==null?void 0:zt[0]],At,zt)}}}}});if(await Promise.all(pe),(R==null?void 0:R.length)>0){let L=[];R==null||R.forEach(ge=>{L!=null&&L.find($=>{var oe,X,_e,fe;return((X=(oe=$==null?void 0:$.value)==null?void 0:oe.pageData)==null?void 0:X.name)===((fe=(_e=ge==null?void 0:ge.value)==null?void 0:_e.pageData)==null?void 0:fe.name)})||L.push(ge)});let Y=[];L==null||L.forEach(ge=>{var X,_e,fe,Ee;let $=p.cloneDeep(ge);$.value.pageData.compData=(X=$.value.pageData.compData)==null?void 0:X.map(P=>{var he;return(P==null?void 0:P.key)==="formContent"&&(P.contents=(he=P.contents)==null?void 0:he.map(ae=>{var Je,Me,Ve,me;let Be=(Je=p.cloneDeep(R))==null?void 0:Je.find(ct=>(ct==null?void 0:ct.keyType)===(ae==null?void 0:ae.key));if(Be){let ct=(me=(Ve=(Me=Be.value.pageData.compData)==null?void 0:Me.find(Ke=>(Ke==null?void 0:Ke.key)==="formContent"))==null?void 0:Ve.contents)==null?void 0:me.find(Ke=>(Ke==null?void 0:Ke.key)===(ae==null?void 0:ae.key));ae.value=ct==null?void 0:ct.value}return ae})),P}),Y.push({id:$==null?void 0:$.id,value:$==null?void 0:$.value});let oe=[];(Ee=(fe=(_e=$==null?void 0:$.value)==null?void 0:_e.pageData)==null?void 0:fe.compData)==null||Ee.forEach(P=>{var he;(P==null?void 0:P.key)==="formContent"&&((he=P==null?void 0:P.contents)==null||he.forEach(ae=>{var Be,Je,Me,Ve,me,ct;if((Je=(Be=ae==null?void 0:ae.optionUrl)==null?void 0:Be.menuSelect)!=null&&Je.find(Ke=>Ke==null?void 0:Ke.includes("[")))if(oe!=null&&oe.find(Ke=>{var be,De,Qe;return((be=Ke==null?void 0:Ke.key)==null?void 0:be.join(","))===((Qe=(De=ae==null?void 0:ae.optionUrl)==null?void 0:De.menuSelect)==null?void 0:Qe.join(","))})){let Ke=(Me=oe==null?void 0:oe.find(be=>{var De,Qe,de;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((de=(Qe=ae==null?void 0:ae.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:de.join(","))}))==null?void 0:Me.value;Ke.push({key:ae==null?void 0:ae.prop,groups:(Ve=ae==null?void 0:ae.optionUrl)==null?void 0:Ve.groupSelect,value:ae==null?void 0:ae.value}),oe=oe==null?void 0:oe.map(be=>{var De,Qe,de;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((de=(Qe=ae==null?void 0:ae.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:de.join(","))&&(be.value=Ke),be})}else oe.push({key:(me=ae==null?void 0:ae.optionUrl)==null?void 0:me.menuSelect,value:[{key:ae==null?void 0:ae.prop,groups:(ct=ae==null?void 0:ae.optionUrl)==null?void 0:ct.groupSelect,value:ae==null?void 0:ae.value}]})}))}),(oe==null?void 0:oe.length)>0&&(oe=oe==null?void 0:oe.map(P=>{var ae;let he="";return(ae=P==null?void 0:P.key)==null||ae.forEach(Be=>{var Je;if(!(Be!=null&&Be.includes("[")))he=he===""?he+Be:he+"/"+Be;else{let Me="",Ve=(Je=Be==null?void 0:Be.replaceAll("[","").replaceAll("]",""))==null?void 0:Je.split(":");g==null||g.forEach(me=>{var ct;(me==null?void 0:me.name)===(Ve==null?void 0:Ve[0])&&((ct=me==null?void 0:me.compData)==null||ct.forEach(Ke=>{var be;(Ke==null?void 0:Ke.key)==="formContent"&&((be=Ke==null?void 0:Ke.contents)==null||be.forEach(De=>{(De==null?void 0:De.prop)===(Ve==null?void 0:Ve[1])&&(Me=De==null?void 0:De.value)}))}))}),he=he+l.value+Me}}),P.key=he,P})),oe==null||oe.forEach(P=>{var Je,Me,Ve;let he=(Je=Xe[P.key])==null?void 0:Je.find(me=>{var ct,Ke,be,De,Qe,de,Ae;return((Ke=(ct=me==null?void 0:me.value)==null?void 0:ct.pageData)==null?void 0:Ke.name)===((Qe=(De=(be=P==null?void 0:P.value)==null?void 0:be[0])==null?void 0:De.groups)==null?void 0:Qe[0])&&((Ae=(de=me==null?void 0:me.value)==null?void 0:de.pageData)==null?void 0:Ae.name)!==void 0}),ae=he==null?void 0:he.id,Be=(Me=he==null?void 0:he.value)==null?void 0:Me.pageData;Be.compData=(Ve=Be.compData)==null?void 0:Ve.map(me=>{var ct;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(ct=me.contents)==null?void 0:ct.map(Ke=>{var De;let be=(De=P.value)==null?void 0:De.find(Qe=>(Qe==null?void 0:Qe.key)===(Ke==null?void 0:Ke.prop));return be&&(Ke.value=be.value),Ke})),me}),Y.push({id:ae,value:{pageData:Be}})})});let ie=(Te=p.cloneDeep(R))==null?void 0:Te[0];(Y==null?void 0:Y.length)>0&&await p.batchUpdateInsofDataApi({dataList:Y})}D.setFreshContent(!0)}T.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),T.setImportLoading(!1)}I.value=!0},ve=["createInsofDataApi"],Ue=Ne.debounce(async q=>{te(q)},100),st=async q=>{var qe,lt,Z,tt,at;const M=p.cloneDeep(q);let ye,xe=new WeakMap,Re=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value});(lt=(qe=Re.data.result)==null?void 0:qe.filter(Le=>{var ce,le;return((ce=Le==null?void 0:Le.key)==null?void 0:ce.pageKey)!=="menu"&&((le=Le==null?void 0:Le.key)==null?void 0:le.pageKey)!=="secret"}))==null||lt.forEach(Le=>{xe[Le.key.pageKey]?xe[Le.key.pageKey]=[...xe[Le.key.pageKey],Le]:xe[Le.key.pageKey]=[Le]}),q!=null&&q[0].path&&(ye=await(M==null?void 0:M.map(async(Le,ce)=>{var U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe;const re=(U=xe[Le==null?void 0:Le.path])==null?void 0:U.filter(Ee=>{var P;return((P=Ee==null?void 0:Ee.key)==null?void 0:P.type)==="data"});let Te="";const Xe=await Ne.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);re==null||re.forEach(Ee=>{var P,he,ae,Be,Je;((he=(P=Ee==null?void 0:Ee.value)==null?void 0:P.tableData)==null?void 0:he.算法名称)===((ae=M==null?void 0:M[ce])==null?void 0:ae.method)&&(Te=(Je=(Be=Ee==null?void 0:Ee.value)==null?void 0:Be.tableData)==null?void 0:Je.算法体)});const dt=await Ne.getItemData(Le==null?void 0:Le.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);let g="",C=(ee=(F=(v=(J=dt==null?void 0:dt[0])==null?void 0:J.compData)==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:F.contents)==null?void 0:ee.findIndex(Ee=>(Ee==null?void 0:Ee.prop)==="算法体");return(pe=(R=dt==null?void 0:dt[0])==null?void 0:R.compData)==null||pe.forEach(Ee=>{var P;(Ee==null?void 0:Ee.key)==="tableContents"&&((P=Ee==null?void 0:Ee.contents)==null||P.forEach(he=>{he!=null&&he.find(ae=>ae===(Le==null?void 0:Le.method))&&(g=he[C])}))}),{buttonName:((L=M==null?void 0:M[ce])==null?void 0:L.method)||((ge=(ie=(Y=re==null?void 0:re[0])==null?void 0:Y.value)==null?void 0:ie.tableData)==null?void 0:ge.算法名称),api:(Te===""?(X=(oe=($=re==null?void 0:re[0])==null?void 0:$.value)==null?void 0:oe.tableData)==null?void 0:X.算法体:Te)||g,content:Xe==null?void 0:Xe.filter(Ee=>Ee.comp!=="methodButton"),extraContent:(_e=p.cloneDeep(Le.value))==null?void 0:_e.slice(1),methodName:(Le==null?void 0:Le.path)??"",extraValues:(fe=M==null?void 0:M[ce])==null?void 0:fe.data}})));const Oe=M==null?void 0:M.map(async Le=>{var dt,g,C,U,J,v;const ce=(dt=Re.data.result)==null?void 0:dt.filter(F=>{var ee,R,pe;return((ee=F==null?void 0:F.key)==null?void 0:ee.parentTable)===""&&((R=F==null?void 0:F.key)==null?void 0:R.type)==="method"&&((pe=F==null?void 0:F.key)==null?void 0:pe.methodName)===F.method}),le=ce==null?void 0:ce[0],re=(g=Re.data.result)==null?void 0:g.filter(F=>{var ee,R;return((ee=F==null?void 0:F.key)==null?void 0:ee.type)==="methodData"&&((R=F==null?void 0:F.key)==null?void 0:R.tableId)===(le==null?void 0:le.id)}),Te=await Ne.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe),Xe=re==null?void 0:re[0];return{buttonName:(C=le==null?void 0:le.key)==null?void 0:C.methodKey,api:(J=(U=Xe==null?void 0:Xe.value)==null?void 0:U.tableData)==null?void 0:J[0],content:Te==null?void 0:Te.filter(F=>F.comp!=="methodButton"),extraContent:(v=p.cloneDeep(Le.value))==null?void 0:v.slice(1),methodName:(Le==null?void 0:Le.method)??""}}),Ye=(Z=q==null?void 0:q[0])!=null&&Z.path&&((tt=q==null?void 0:q[0])==null?void 0:tt.path)!==""?await Promise.all(ye):await Promise.all(Oe);s.value=Ye==null?void 0:Ye.filter(Le=>Le==null?void 0:Le.extraContent),(at=s.value)==null||at.forEach(Le=>{var ce;Le.api===""&&((ce=Le.content)==null||ce.forEach(le=>{var re;le.comp=="Table"&&D.setExtraContents(Ne.methodTableToContent(le.compData,(re=Le.extraContent)==null?void 0:re[0]))}))})};return e.watch(()=>c.itemData,async()=>{V.value=="view"&&!I.value&&await st(p.cloneDeep(c.itemData)),I.value=!1},{immediate:!0,deep:!0}),(q,M)=>{var ye,xe,Re;return e.unref(V)!=="edit"?(e.openBlock(),e.createElementBlock("div",sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ye=s.value)==null?void 0:ye.filter(Oe=>(Oe==null?void 0:Oe.buttonName)!=="保存"),Oe=>{var Ye;return e.openBlock(),e.createElementBlock("div",null,[Oe.api!==""?(e.openBlock(),e.createBlock(e.unref(Ne._sfc_main),{key:0,disabled:e.unref(K)===e.unref(w)&&!((Ye=Oe==null?void 0:Oe.buttonName)!=null&&Ye.includes("预览")),class:"calculator-content",modelValue:Oe.buttonName,onClickTrigger:qe=>e.unref(Ue)(Oe),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&((Re=e.unref(w))==null?void 0:Re[((xe=e.unref(w))==null?void 0:xe.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Ne._sfc_main),{key:0,class:"calculator-content",onClickTrigger:se,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:$e},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},uc=Lt._export_sfc(cc,[["__scopeId","data-v-11fca7e0"]]),pc={};function dc(a,s){return" 567 "}const fc=Lt._export_sfc(pc,[["render",dc]]),hc={class:"module content"},vc={class:"module data"},gc={class:"module layout"},mc={class:"form-content"},yc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),m=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),h=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),D=e.ref({}),E=e.ref([]),T=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:D.value}]}),O=W=>{var K;D.value=p.cloneDeep(W),l("change",(K=T())==null?void 0:K.compData)},H=W=>{var K,G;if((W==null?void 0:W.buttonName)==="确认"){const w=p.cloneDeep(W==null?void 0:W.content);switch(d.value){case"create":E.value.push({...w,index:((K=E.value)==null?void 0:K.length)+1});break}l("change",(G=T())==null?void 0:G.compData),c.visible=!1}else c.visible=!1},V=(W,K)=>{var G,w;switch(W){case"create":(G=h.value)==null||G.forEach(z=>{z.value=""}),d.value="create",c.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(K,1),d.value="delete";break}},ke=()=>{c.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,W=>{var K,G;W&&(D.value=((K=W==null?void 0:W.find(w=>w.key==="signConfig"))==null?void 0:K.contents)??{},E.value=((G=W==null?void 0:W.find(w=>w.key==="signTypeList"))==null?void 0:G.contents)??[])},{immediate:!0}),(W,K)=>{const G=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",hc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",gc,[e.createVNode(Nt.ssForm,{rowContents:m.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ke,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",mc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),bc=Lt._export_sfc(yc,[["__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:s}){const i=a,l=s,c=e.ref(1),d=e.computed(()=>{var T,O;return(T=i==null?void 0:i.stepConfig)!=null&&T.allowTrigger?c.value:(O=i==null?void 0:i.stepConfig)==null?void 0:O.active}),x=(T,O)=>{c.value=O,l("clickStep",T,O)},m=T=>Nt.getComponent(T),h=()=>{var O;const T=(O=i==null?void 0:i.stepList)==null?void 0:O.find((H,V)=>V+1===d.value);return console.log("findStep",T),T?T==null?void 0:T.children:[]},D=T=>{l("clickTrigger",T)},E=T=>{l("changeTrigger",T)};return(T,O)=>{var ke,W,K,G,w;const H=e.resolveComponent("el-step"),V=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{direction:(ke=a.stepConfig)==null?void 0:ke.direction,active:d.value,"finish-status":"success",simple:(W=a.stepConfig)==null?void 0:W.simple,"align-center":((K=a.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(z,k)=>(e.openBlock(),e.createBlock(H,{key:k,class:"step-item",onClick:A=>x(z,k+1)},{title:e.withCtx(()=>[e.renderSlot(T.$slots,"title",{title:z==null?void 0:z.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(T.$slots,"description",{description:z==null?void 0:z.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(G=a.stepConfig)!=null&&G.allowTrigger&&((w=a.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(z,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m(z==null?void 0:z.type)),{modelValue:z.value,"onUpdate:modelValue":A=>z.value=A,onClickTrigger:D,onChangeTrigger:E,content:z==null?void 0:z.content},e.createSlots({_:2},[e.renderList(T.$slots,(A,I)=>({name:I,fn:e.withCtx(se=>[e.renderSlot(T.$slots,I,e.mergeProps({ref_for:!0},se||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),xc=Lt._export_sfc(kc,[["__scopeId","data-v-d7c99969"]]),wc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:s}){const i=a,l=s,c=e.ref({}),d=e.ref([]),x=(m,h)=>{l("clickStep",m,h)};return e.watch(()=>i==null?void 0:i.itemData,m=>{var h,D;d.value=(h=m==null?void 0:m.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=m==null?void 0:m.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(m,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(xc,{stepConfig:c.value,stepList:d.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),Dc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(s,i)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,x)=>(e.openBlock(),e.createBlock(l,{key:x,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Cc=Lt._export_sfc(Dc,[["__scopeId","data-v-4172a886"]]),Ec={class:"line-content"},_c={class:"line-time"},Sc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const s=a,i=e.ref({}),l=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,c=>{var d,x;l.value=(d=c==null?void 0:c.find(m=>(m==null?void 0:m.key)==="timeLineList"))==null?void 0:d.contents,i.value=(x=c==null?void 0:c.find(m=>(m==null?void 0:m.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(Cc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:x,timestamp:m})=>[e.createElementVNode("span",Ec,e.toDisplayString(x),1),e.createElementVNode("span",_c,e.toDisplayString(m),1)]),_:1},8,["activities","timeLineConfig"]))}}),Tc=Lt._export_sfc(Sc,[["__scopeId","data-v-b4d9deed"]]),Ic={class:"tabs-content"},Bc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const s=a,i=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?i.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):i.value=s==null?void 0:s.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Ic,[e.createVNode(Nt.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},Ac=Lt._export_sfc(Bc,[["__scopeId","data-v-40865f68"]]),lo=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Nc={class:"type-select"},Vc=["onClick"],Oc={class:"list-icon"},Mc={__name:"modelSelect",setup(a){const s=lo(p.pinia),{itemData:i}=p.storeToRefs(s),l=c=>{const d=p.cloneDeep(i.value);d.push({comp:c.comp,name:c.name,compData:[]}),s.setItemData(d)};return(c,d)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(er),(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(m)},[e.createElementVNode("div",Oc,[e.createVNode(x,{name:m.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(m.name),1)],8,Vc)]))),128))])}}},zc=Lt._export_sfc(Mc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Lc={class:"operate-content"},Pc={class:"collapse-title-content"},Fc={class:"collapse-title-item"},$c={key:1},jc=["onClick"],Kc={class:"icon-content"},Uc={key:0,class:"edit-content"},Wc=["onClick"],Hc={class:"comp-child"},qc={__name:"modelFill",setup(a){const s=lo(p.pinia),{itemData:i,originalData:l}=p.storeToRefs(s),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),m=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,K)=>(H===K&&(W.content=!0),W));x.value=V},h=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,K)=>(H===K&&(W.content=!1),W));x.value=V,c.value=p.cloneDeep(i.value)},D=(H,V)=>{var G;let ke=(G=p.cloneDeep(x.value))==null?void 0:G.map((w,z)=>(H===z&&(w.content=!1),w));x.value=ke;const W=p.cloneDeep(i.value),K=W==null?void 0:W.filter((w,z)=>(z===H&&(w.name=V),w));s.setOriginalData(K),s.setItemData(K)};e.watch(()=>i.value,()=>{var H,V,ke;!i.value||((H=i.value)==null?void 0:H.length)===0?c.value=[]:c.value=(V=p.cloneDeep(i.value))==null?void 0:V.filter(W=>(W==null?void 0:W.comp)!=="methodButton"),d.value=c.value,x.value=(ke=p.cloneDeep(d.value))==null?void 0:ke.map((W,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const E=H=>ya(H),T=(H,V,ke)=>{var K,G;if(!H)return;let W=p.cloneDeep(i.value);W=(K=W==null?void 0:W.map((w,z)=>(z===ke&&(w.compData=H),w)))==null?void 0:K.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),x.value=(G=p.cloneDeep(W))==null?void 0:G.map((w,z)=>({id:z,content:!1})),s.setOriginalData(W),s.setItemData(W)},O=H=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const V=p.cloneDeep(i.value),ke=V==null?void 0:V.filter((W,K)=>K!==H);s.setOriginalData(ke),s.setItemData(ke),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(H,V)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[V[1]||(V[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Lc,[e.createVNode(gl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:W,index:K})=>{var G,w,z,k,A,I,se,$e,nt,Ie;return[e.createElementVNode("div",Pc,[e.createElementVNode("div",Fc,[(w=(G=x.value)==null?void 0:G.find(ze=>ze.id===K))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:W.name&&W.name!==""?"8px":"0px"})},e.toDisplayString(W.name),5)),(k=(z=x.value)==null?void 0:z.find(ze=>ze.id===K))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",$c,[e.createVNode(Nt._sfc_main$2,{modelValue:W.name,"onUpdate:modelValue":ze=>W.name=ze,onClick:V[0]||(V[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(I=(A=x.value)==null?void 0:A.find(ze=>ze.id===K))!=null&&I.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(ze=>m(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,jc))]),e.createElementVNode("div",Kc,[($e=(se=x.value)==null?void 0:se.find(ze=>ze.id===K))!=null&&$e.content?(e.openBlock(),e.createElementBlock("div",Uc,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(ze=>h(K),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers(ze=>D(K,W.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ie=(nt=x.value)==null?void 0:nt.find(ze=>ze.id===K))!=null&&Ie.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(ze=>O(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Wc))])])]}),content:e.withCtx(({item:W,index:K})=>{var G,w;return[e.createElementVNode("div",Hc,[e.createTextVNode(e.toDisplayString(E(W.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(W.comp+"Operate")),{itemContents:W==null?void 0:W.compData,originalItemContents:(w=(G=d.value)==null?void 0:G.find((z,k)=>k===K))==null?void 0:w.compData,onChange:z=>T(z,W,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Gc=Lt._export_sfc(qc,[["__scopeId","data-v-a46a44b9"]]),Xc={key:0,class:"show-content"},Yc={style:{display:"flex"}},Jc={__name:"modelShow",setup(a){const s=lo(p.pinia),{itemData:i}=p.storeToRefs(s),l=e.ref([]);e.watch(()=>i.value,()=>{var d;!i.value||((d=i.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(i.value)},{deep:!0,immediate:!0});const c=d=>ya(d);return(d,x)=>{var m;return((m=l.value)==null?void 0:m.length)>0?(e.openBlock(),e.createElementBlock("div",Xc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",Yc,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},Qc=Lt._export_sfc(Jc,[["__scopeId","data-v-3f3e863e"]]),Zc={class:"tabs-header"},eu={class:"tabs-list"},tu={class:"tab-name"},nu={class:"tab-actions"},au=["onClick"],ou=["onClick"],lu=["onClick"],ru={class:"model-operate"},iu={class:"model-select",style:{display:"unset"}},su={class:"existing-components"},cu={class:"component-list"},uu=["onClick"],pu={class:"component-info"},du={class:"component-type"},fu={class:"component-name"},hu={class:"model-fill"},vu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([]),d=e.ref(!1),x=e.ref(""),m=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),T=e.ref(new WeakMap),O=e.ref(null),H=lo(p.pinia),{itemData:V}=p.storeToRefs(H),ke=()=>{x.value="新增标签页",m.value.title="",h.value=-1,d.value=!0},W=q=>{x.value="修改标签页",m.value.title=c.value[q].title,h.value=q,d.value=!0},K=q=>{const M=z(q);T.value.delete(M),c.value.splice(q,1),st()},G=()=>{if(m.value.title.trim()){if(h.value===-1){const q={title:m.value.title,value:m.value.title,label:m.value.title,children:[],id:w()};c.value.push(q)}else c.value[h.value].title=m.value.title,c.value[h.value].value=m.value.title,c.value[h.value].label=m.value.title;d.value=!1,st()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,z=q=>{const M=c.value[q];return M.id||(M.id=w()),M.id},k=q=>{var xe;E.value=q;const M=z(q);O.value=p.cloneDeep(V.value);let ye=T.value.get(M);!ye&&((xe=c.value[q].children)==null?void 0:xe.length)>0&&(ye=$e(c.value[q].children)),ye?H.setItemData(p.cloneDeep(ye)):H.setItemData([]),D.value=!0},A=e.computed(()=>{const q=jt.useModelComp(p.pinia),M=p.storeToRefs(q).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(ye=>{var xe;if(ye.comp==="Tabs"&&E.value>=0){const Re=z(E.value);if((xe=ye.compData)==null?void 0:xe.some(Ye=>{var qe;return Ye.key==="stepList"&&((qe=Ye.contents)==null?void 0:qe.some(lt=>lt.id===Re))}))return!1}return!0})}),I=q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[q]||q,se=q=>{var M;try{const ye=p.cloneDeep(q);ye.id=Date.now()+Math.random(),ye.comp==="Tabs"&&((M=ye.compData)==null||M.forEach(Re=>{Re.key==="stepList"&&Re.contents&&Re.contents.forEach(Oe=>{Oe.id=w()})}));const xe=p.cloneDeep(V.value);xe.push(ye),H.setItemData(xe)}catch(ye){console.error("添加组件失败:",ye)}},$e=q=>q.map(M=>{var ye;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:nt(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Ie(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((ye=M.content)==null?void 0:ye.originalData)||[]}}}),nt=q=>{if(!q)return[];const M=[];return q.rowContents&&M.push({key:"formContent",contents:q.rowContents}),q.buttonValue&&M.push({key:"formButton",contents:q.buttonValue}),typeof q.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:q.isEnableWrap}),M},Ie=q=>[],ze=()=>{if(E.value>=0&&E.value<c.value.length){const q=z(E.value);T.value.set(q,p.cloneDeep(V.value)),c.value[E.value].children=ne(V.value),console.log("保存后的数据",ne(V.value))}D.value=!1,E.value=-1,O.value=null,st()},ue=()=>{O.value&&H.setItemData(p.cloneDeep(O.value)),D.value=!1,E.value=-1,O.value=null},_=()=>{D.value&&ue()},ne=q=>{if(!Array.isArray(q))throw new Error("sourceData must be an array");return q.map((M,ye)=>{if(!M||typeof M!="object")return M;const{comp:xe,name:Re,compData:Oe}=M;switch(xe){case"Form":return{type:"form",content:te(Oe||[]),value:"表单"};case"Table":return{type:"table",content:ve(Oe||[]),value:"表格"};default:return{type:"xxx",content:Ue(Oe||[]),value:""}}})},te=q=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ye={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return q.forEach((xe,Re)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Re}:`,xe);return}const{key:Oe,contents:Ye}=xe,qe=ye[Oe];if(!qe){console.warn(`Unknown Form config key: ${Oe}`);return}Oe==="enableWrap"?M[qe]=!!Ye:M[qe]=Array.isArray(Ye)?Ye:[]}),M},ve=q=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ye={header:"columns",tableContents:"tableData"};return q.forEach((xe,Re)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Re}:`,xe);return}const{key:Oe,contents:Ye}=xe,qe=ye[Oe];if(!qe){console.warn(`Unknown Table config key: ${Oe}`);return}M[qe]=Array.isArray(Ye)?Ye:[]}),M},Ue=q=>(console.log("Default conversion logic - to be implemented"),{originalData:q,processed:!1,componentType:"unknown"}),st=()=>{const q=[{key:"stepList",contents:c.value}];l("change",q)};return e.watch(()=>i.itemContents,q=>{if(q&&q.length>0){const M=q.find(ye=>ye.key==="stepList");M&&M.contents&&(c.value=M.contents.map(ye=>({title:ye.title||"",value:ye.value||ye.title||"",label:ye.label||ye.title||"",children:ye.children||[],id:ye.id||w()})))}},{immediate:!0,deep:!0}),(q,M)=>{const ye=e.resolveComponent("svg-icon"),xe=e.resolveComponent("el-input"),Re=e.resolveComponent("el-form-item"),Oe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Zc,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(ye,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ye,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",tu,e.toDisplayString(Ye.title),1),e.createElementVNode("div",nu,[e.createElementVNode("button",{onClick:lt=>W(qe)},"修改标题",8,au),e.createElementVNode("button",{onClick:lt=>k(qe)},"布局调整",8,ou),e.createElementVNode("button",{onClick:lt=>K(qe)},"删除",8,lu)])]))),128))]),e.createVNode(Yt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":M[2]||(M[2]=Ye=>d.value=Ye),title:x.value,onBeforeDestroy:M[3]||(M[3]=Ye=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=Ye=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:G},"确定")]),default:e.withCtx(()=>[e.createVNode(Oe,{model:m.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Re,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(xe,{modelValue:m.value.title,"onUpdate:modelValue":M[0]||(M[0]=Ye=>m.value.title=Ye),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Yt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=Ye=>D.value=Ye),title:"布局调整",fullScreen:"",onBeforeDestroy:_},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:ue},"取消"),e.createElementVNode("button",{onClick:ze},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",ru,[e.createElementVNode("div",iu,[e.createVNode(zc),e.createElementVNode("div",su,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",cu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Ye=>(e.openBlock(),e.createElementBlock("div",{key:Ye.id,class:"component-item",onClick:qe=>se(Ye)},[e.createElementVNode("div",pu,[e.createElementVNode("span",du,e.toDisplayString(I(Ye.comp)),1),e.createElementVNode("span",fu,e.toDisplayString(Ye.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,uu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:q.innerWidth},[e.createVNode(Qc)])),e.createElementVNode("div",hu,[e.createVNode(Gc)])])]),_:1},8,["modelValue"])])}}},gu=Lt._export_sfc(vu,[["__scopeId","data-v-9096ed0d"]]);function mu(){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 yu(a){return{type:"line",...a}}function bu(){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 xu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function wu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const $n={line:{initBaseoptions:mu,initSeries:yu},bar:{initBaseoptions:bu,initSeries:ku},pie:{initBaseoptions:xu,initSeries:wu}},zo=jt.useMenuState(p.pinia),_l=(a,s)=>{var E;const i=[],l=[],{group:c,nameCol:d,valueCol:x}=s||{},m=a==null?void 0:a.find(T=>{const{name:O}=T;return O===c});if(!m)return{names:i,values:l};const h=(E=m==null?void 0:m.compData)==null?void 0:E.find(T=>{const{key:O}=T;return O==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(T=>{const O=T==null?void 0:T[0];let H=!1;p.isObject(O)&&(O!=null&&O.id)&&(H=!0);let V=d,ke=x;H&&(V=V+1,ke=ke+1);const W=T==null?void 0:T[V],K=T==null?void 0:T[ke];i.push(W),l.push(K)}),{names:i,values:l}},Du=async a=>{const{menu:s,mainKey:i,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let m=null;const h=sessionStorage.getItem("systemKey");if(x&&zo.activeMenuPath&&(m=await Ne.getItemData(`${zo.activeMenuPath}`,h,"")),!x){const D=s==null?void 0:s.join("/");m=await Ne.getItemData(`${D}^${i}`,h,"")}return _l(m,{group:l,nameCol:c,valueCol:d})},Cu=async a=>{const{menu:s,group:i,nameCol:l,valueCol:c}=a||{},d=s==null?void 0:s.join("/"),x=sessionStorage.getItem("systemKey"),m=await Ne.getItemData(d,x,"");return _l(m,{group:i,nameCol:l,valueCol:c})},yo=async(a,s)=>{const i={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return i;const{mainKey:m,group:h,nameCol:D,valueCol:E,isSelfDetail:T}=s||{};return m&&h&&Nt.isNumber(D)&&Nt.isNumber(E)?await Du({menu:l,mainKey:m,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:T}):Nt.isNumber(d)&&Nt.isNumber(x)?await Cu({menu:l,group:c,nameCol:d,valueCol:x}):i},Eu=async({chartBaseConfig:a,chartDataConfig:s,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:m}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await yo(s,i);if(!D||!E)return h;h.xAxis.data=D;const T=m({data:E});return h.series.push(T),h},_u=async({chartBaseConfig:a,chartDataConfig:s,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:m}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await yo(s,i);if(!D||!E)return h;h.xAxis.data=D;const T=m({data:E});return h.series.push(T),h},Su=async({chartBaseConfig:a,chartDataConfig:s,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:m}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await yo(s,i);if(!D||!E)return h;const T=[];for(let H=0;H<D.length;H++){const V=D[H],ke=E[H];T.push({name:V,value:ke})}const O=m({data:T});return h.series.push(O),h},Tu=async(a=[])=>{var x,m,h;const s=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},i=((m=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:m.contents)??{},l=((h=a==null?void 0:a.find(D=>D.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=s;let d={};return c==="line"&&(d=await Eu({chartBaseConfig:s,chartDataConfig:i,chartDetailConfig:l})),c==="bar"&&(d=await _u({chartBaseConfig:s,chartDataConfig:i,chartDetailConfig:l})),c==="pie"&&(d=await Su({chartBaseConfig:s,chartDataConfig:i,chartDetailConfig:l})),d},Iu=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 s=a,i=e.ref({});e.onMounted(async()=>{const c=s==null?void 0:s.itemData;i.value=await Tu(c)});const l=e.computed(()=>(s==null?void 0:s.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Vr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),Bu=Lt._export_sfc(Iu,[["__scopeId","data-v-d4c081e8"]]),Au={class:"chart-module layout"},Nu={class:"chart-module content"},Vu={class:"chart-module content"},Ou={class:"form-content"},Mu={class:"dialog-footer"},zu={class:"form-content"},Ru={class:"dialog-footer"},Lu={class:"form-content"},Pu={class:"dialog-footer"},Fu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),x=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],m=e.ref({}),h=()=>{var ce;d.value=x(),(ce=d.value)==null||ce.forEach(le=>{var Te;const re=le==null?void 0:le.prop;le.value=(Te=m==null?void 0:m.value)==null?void 0:Te[re]}),c.visible=!0},D=ce=>{m.value=ce},E=()=>{var ce;c.visible=!1,l("change",(ce=at())==null?void 0:ce.compData)},T=e.reactive({visible:!1,width:"840",title:"数据配置"}),O=e.ref([]),H=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],V=e.ref({}),ke=()=>{const ce=O.value,le=p.cloneDeep(ce);return le==null||le.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=V.value)==null?void 0:Xe[Te]}),le},W=ce=>{var re;V.value=ce;const le=ke();O.value=le,l("change",(re=at())==null?void 0:re.compData)},K=async()=>{const ce=await Ne.getMenusContent(),le=ke();le==null||le.forEach(re=>{(re==null?void 0:re.prop)==="menu"&&(re.contents=ce)}),O.value=le,T.visible=!0,await Ye(V.value.menu),await Z(V.value.group)},G=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),z=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),A=()=>{const ce=w.value,le=p.cloneDeep(ce);return le==null||le.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k.value)==null?void 0:Xe[Te]}),le},I=ce=>{var re;k.value=ce;const le=A();w.value=le,l("change",(re=at())==null?void 0:re.compData)},se=async()=>{await _();const ce=p.cloneDeep($e.value),le=A();le==null||le.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k==null?void 0:k.value)==null?void 0:Xe[Te],Te==="mainKey"&&(re.contents=ce)}),w.value=le,G.visible=!0},$e=e.ref([]),nt=e.ref([]),Ie=e.ref({}),ze=e.ref({}),ue=()=>{const{compData:ce}=xe.value||{},le=ce==null?void 0:ce.find(U=>{const{key:J}=U;return J==="header"}),re=(le==null?void 0:le.contents)||[],Te=re==null?void 0:re.filter((U,J)=>{const{label:v}=U;return v!=="操作"}),Xe=Te==null?void 0:Te.findIndex((U,J)=>{const{isMainKey:v}=U;return v});if(Xe<0)return[];const dt=ce==null?void 0:ce.find(U=>{const{key:J}=U;return J==="tableContents"}),g=(dt==null?void 0:dt.contents)||[];return g==null?void 0:g.map(U=>{const J=U==null?void 0:U[0];let v=Xe;p.isObject(J)&&(J!=null&&J.id)&&(v=v+1);const F=U==null?void 0:U[v];return{label:F,value:F}})},_=async()=>{const ce=await ue();$e.value=ce},ne=async ce=>{const le=sessionStorage.getItem("systemKey");return await Ne.getItemData(ce,le,"")},te=async ce=>{const le=ce;nt.value=le==null?void 0:le.map(re=>{const{name:Te}=re;return Ie.value[Te]=re,{label:Te,value:Te}})},ve=ce=>{const{comp:le,compData:re}=ze.value||{};if(le==="Table"){let Te=A();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),w.value=Te}},Ue=async()=>{var re,Te;const ce=(re=k==null?void 0:k.value)==null?void 0:re.mainKey,le=(Te=V==null?void 0:V.value)==null?void 0:Te.menu;if(ce){const dt=`${le==null?void 0:le.join("/")}^${ce}`,g=await ne(dt);await te(g);const C=A();C==null||C.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=nt.value)}),w.value=C}};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.mainKey},async(ce,le)=>{ce!=le&&ce&&await Ue()});const st=async ce=>{const le=Ie.value[ce];ze.value=le,await ve()};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.group},async(ce,le)=>{ce!=le&&ce&&st(ce)});const q=async()=>{var le;await Ue();const ce=(le=k.value)==null?void 0:le.group;await st(ce)},M=e.ref([]),ye=e.ref({}),xe=e.ref({}),Re=async ce=>{const le=ce==null?void 0:ce.join("/"),re=sessionStorage.getItem("systemKey");return await Ne.getItemData(le,re,"")},Oe=async ce=>{const le=await Re(ce);M.value=le==null?void 0:le.map(re=>{const{name:Te}=re;return ye.value[Te]=re,{label:Te,value:Te}})},Ye=async(ce,le)=>{await Oe(ce);const re=ke();re==null||re.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=M.value)}),O.value=re};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.menu},async(ce,le)=>{const re=ce==null?void 0:ce.join("/"),Te=le==null?void 0:le.join("/");re!=Te&&await Ye(ce)});const qe=(ce,le)=>{const re=le==null?void 0:le.find(g=>{const{key:C}=g;return C==="header"}),Te=(re==null?void 0:re.contents)||[],Xe=Te==null?void 0:Te.filter((g,C)=>{const{label:U}=g;return U!=="操作"}),dt=Xe==null?void 0:Xe.map((g,C)=>{const{label:U}=g;return{label:U,value:C}});ce==null||ce.forEach(g=>{const C=g==null?void 0:g.prop;(C==="nameCol"||C==="valueCol")&&(g.contents=dt)})},lt=ce=>{const{comp:le,compData:re}=xe.value||{};if(le==="Table"){V.value.formItems=[];let Te=ke();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),O.value=Te}},Z=async ce=>{const le=ye.value[ce];xe.value=le,await lt()};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.group},async(ce,le)=>{ce!=le&&Z(ce)});const tt=async()=>{var re,Te;const ce=(re=V.value)==null?void 0:re.menu;await Ye(ce);const le=(Te=V.value)==null?void 0:Te.group;await Z(le)},at=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:m.value},{key:"chartDataConfig",contents:V.value},{key:"chartDetailConfig",contents:k.value}]}),Le=()=>{c.visible=!1,T.visible=!1,G.visible=!1};return e.onMounted(async()=>{var le,re,Te;O.value=H(),w.value=z();const ce=i==null?void 0:i.itemContents;m.value=((le=ce==null?void 0:ce.find(Xe=>Xe.key==="chartBaseConfig"))==null?void 0:le.contents)??{},V.value=((re=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDataConfig"))==null?void 0:re.contents)??{},await tt(),k.value=((Te=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await q()}),(ce,le)=>{const re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Au,[le[4]||(le[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(re,{id:"themeButton",onClick:le[0]||(le[0]=Te=>h())},{default:e.withCtx(()=>le[3]||(le[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Nu,[le[6]||(le[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:le[1]||(le[1]=Te=>K())},{default:e.withCtx(()=>le[5]||(le[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Vu,[le[8]||(le[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:le[2]||(le[2]=Te=>se())},{default:e.withCtx(()=>le[7]||(le[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Le,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ou,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Mu,[e.createVNode(re,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>le[9]||(le[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(re,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>le[10]||(le[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:T.visible,title:T.title,onBeforeDestroy:Le,width:T.width},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(re,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>le[11]||(le[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(re,{class:"ok-button button",onClick:Le,id:"themeButton"},{default:e.withCtx(()=>le[12]||(le[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:G.visible,title:G.title,onBeforeDestroy:Le,width:G.width},{default:e.withCtx(()=>[e.createElementVNode("div",Lu,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Pu,[e.createVNode(re,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>le[13]||(le[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(re,{class:"ok-button button",onClick:Le,id:"themeButton"},{default:e.withCtx(()=>le[14]||(le[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),$u=Lt._export_sfc(Fu,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},ju=Ka.exports,Ro;function Ku(){return Ro||(Ro=1,function(a,s){(function(i,l){l()})(ju,function(){function i(D,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function l(D,E,T){var O=new XMLHttpRequest;O.open("GET",D),O.responseType="blob",O.onload=function(){h(O.response,E,T)},O.onerror=function(){console.error("could not download file")},O.send()}function c(D){var E=new XMLHttpRequest;E.open("HEAD",D,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(E)}}var x=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ne.commonjsGlobal=="object"&&Ne.commonjsGlobal.global===Ne.commonjsGlobal?Ne.commonjsGlobal:void 0,m=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(D,E,T){var O=x.URL||x.webkitURL,H=document.createElement("a");E=E||D.name||"download",H.download=E,H.rel="noopener",typeof D=="string"?(H.href=D,H.origin===location.origin?d(H):c(H.href)?l(D,E,T):d(H,H.target="_blank")):(H.href=O.createObjectURL(D),setTimeout(function(){O.revokeObjectURL(H.href)},4e4),setTimeout(function(){d(H)},0))}:"msSaveOrOpenBlob"in navigator?function(D,E,T){if(E=E||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(i(D,T),E);else if(c(D))l(D,E,T);else{var O=document.createElement("a");O.href=D,O.target="_blank",setTimeout(function(){d(O)})}}:function(D,E,T,O){if(O=O||open("","_blank"),O&&(O.document.title=O.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,T);var H=D.type==="application/octet-stream",V=/constructor/i.test(x.HTMLElement)||x.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||H&&V||m)&&typeof FileReader<"u"){var W=new FileReader;W.onloadend=function(){var w=W.result;w=ke?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),O?O.location.href=w:location=w,O=null},W.readAsDataURL(D)}else{var K=x.URL||x.webkitURL,G=K.createObjectURL(D);O?O.location=G:location.href=G,O=null,setTimeout(function(){K.revokeObjectURL(G)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}Ku();const ia=p.useLoginState(),{loginUserInfo:La}=p.storeToRefs(ia),Ft=jt.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:Uu,itemGridData:oa,curStructureCompIds:Lo,isSubmitCurStructure:Wu,isRefreshCurStructure:Hu,freshContent:Po,routeToChildPath:qu,payloadTypes:Gu,pageMapState:Xa,itemExtendData:Pa}=p.storeToRefs(Ft),dn=jt.useMenuState(p.pinia),{activeTopMenuPath:Xu,activeMenuPath:Rt,platform:Fd,activeAsideMenu:Yu,buttonTriggerType:Ju}=p.storeToRefs(dn),xn=fa.useUnit(p.pinia),{selectTitle:Fo}=p.storeToRefs(xn),Qu=Ne.useOriginalState(p.pinia),{originalPath:ro}=p.storeToRefs(Qu),$o=jt.useAuthorityState(p.pinia),Ya=e.ref(!0),ga=e.ref(0),Ja=e.ref([]),ma=e.computed(async()=>{var s,i;const a=(s=Rt.value)!=null&&s.startsWith("/")?(i=Rt.value)==null?void 0:i.substring(1):Rt.value;return(a==null?void 0:a.includes(ro.value))||await sp(a)}),Zu=()=>{Ft.setItemGridData([]),Ft.setIsEdit("edit"),Ft.setSubmitCurStructure(Rt.value!=="/平台管理/菜单管理")},ep=()=>{Ft.setIsEdit("view"),Ft.setRefreshCurStructure(!0)},tp=async a=>{var s;if((a==null?void 0:a.key)==="main"||Fo.value.length===1)bt.value=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value),xn.setSelectIndex(""),xn.setSelectMenu(""),xn.setSelectTitle([]);else{const i=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);bt.value=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),l,!1,[],await ma.value);let c=-1;(s=Fo.value)==null||s.forEach((d,x)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=x),(c===-1||c>=x)&&i.push(d)}),xn.setSelectTitle(i),l!==""?xn.setSelectMenu(a==null?void 0:a.key):(xn.setSelectIndex(""),xn.setSelectMenu(""))}bt.value=Aa(bt.value),Ft.setItemData(bt.value),Ft.setOriginalData(bt.value)},uo=async(a,s,i,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,x;s==="create"?(d={dataList:a==null?void 0:a.map(h=>{var D;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:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchAddInsofDataApi):s==="update"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchUpdateInsofDataApi):s==="delete"&&(d={ids:a},x=p.batchDeleteInsofDataApi);const m=await x(d);if(((c=m==null?void 0:m.data)==null?void 0:c.code)===200)return m.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},jo=async(a,s,i,l)=>{var c,d,x,m,h,D,E,T,O,H,V;try{const ke=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:d.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:s,relatedInfo:i},value:{tableData:k}})),W=(m=(x=a==null?void 0:a.results)==null?void 0:x.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:m.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),K=JSON.parse(p.cloneDeep(JSON.stringify(a))),G=(h=K==null?void 0:K.results)==null?void 0:h.map(k=>k.id);let w;i?w=(T=(E=(D=Xa.value)==null?void 0:D[Rt.value])==null?void 0:E.filter(k=>{var A,I,se;return((A=k==null?void 0:k.key)==null?void 0:A.type)===s&&((se=(I=k==null?void 0:k.key)==null?void 0:I.relatedInfo)==null?void 0:se.target)===l}))==null?void 0:T.map(k=>k==null?void 0:k.id):w=(V=(H=(O=Xa.value)==null?void 0:O[Rt.value])==null?void 0:H.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===s}))==null?void 0:V.map(k=>k==null?void 0:k.id);const z=w==null?void 0:w.filter(k=>!(G!=null&&G.includes(k))&&typeof k=="number");(ke==null?void 0:ke.length)>0&&await p.batchAddInsofDataApi({dataList:ke}),(W==null?void 0:W.length)>0&&await p.batchUpdateInsofDataApi({dataList:W}),(z==null?void 0:z.length)>0&&await p.batchDeleteInsofDataApi({ids:z})}catch(ke){throw new Error(ke)}},np=async a=>{var D,E,T,O,H,V,ke,W,K,G;dn.setContentLoading(!0);const s=JSON.parse(p.cloneDeep(JSON.stringify(Uu.value)));if(!Wu.value)return dn.setCacheStructures({key:Ju.value,data:s}),p.ElMessage.success("已暂存");const i=s==null?void 0:s.map(w=>w.id),l=i.filter(w=>{var z;return!((z=Lo.value)!=null&&z.includes(w))}),c=(D=Lo.value)==null?void 0:D.filter(w=>!i.includes(w)),d=[...l,...c].filter(w=>typeof w!==null&&typeof w<"u"),x=s==null?void 0:s.filter(w=>!w.id),m=s==null?void 0:s.filter(w=>w.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(uo(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(uo(x,"create",a)),m&&(m==null?void 0:m.length)>0&&h.push(uo(m,"update",a)),oa.value&&((E=oa.value)!=null&&E.isDelete&&((O=(T=oa.value)==null?void 0:T.results)==null?void 0:O.length)>0&&((V=(H=oa.value)==null?void 0:H.results)!=null&&V.every(w=>typeof w=="number"))?await p.batchDeleteInsofDataApi({ids:(ke=oa.value)==null?void 0:ke.results}):(console.log("itemGridData.value",oa.value),h.push(await jo(oa.value,"gridLayout")))),Pa.value)for(const w in Pa.value)h.push(await jo((W=Pa.value)==null?void 0:W[w],"extend",{target:w,compId:(G=(K=Pa.value)==null?void 0:K[w])==null?void 0:G.compId},w));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Ft.setRefreshCurStructure(!0)}).catch(w=>{p.ElMessage.success(w)}),dn.setContentLoading(!1)},Qa=a=>ya(a),bt=e.ref([]),ap=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(s=>(s==null?void 0:s.affix)&&(s==null?void 0:s.affix)!=="default")}),Sl=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(s=>!(s!=null&&s.affix)||(s==null?void 0:s.affix)==="default")}),op=async a=>{var l,c,d,x,m,h;let s=p.cloneDeep(Rt).value;s=s+ro.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const i=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s}});if(((d=(c=i==null?void 0:i.data)==null?void 0:c.result)==null?void 0:d.length)>0){const D=(m=(x=i==null?void 0:i.data)==null?void 0:x.result)==null?void 0:m.map(T=>T==null?void 0:T.id),E=await p.batchDeleteInsofDataApi({ids:D});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},s)):p.ElMessage.error("删除响应失败"),Ft.setTableLoading(!1)}},Ko=async a=>{var s,i;try{let l=p.cloneDeep(Rt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var m;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+ro.value+((m=Object.values(x==null?void 0:x.singleContent))==null?void 0:m[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var m;return((m=x==null?void 0:x.data)==null?void 0:m.code)===200}))){const x=Array.from(new Set((s=d==null?void 0:d.flatMap(h=>{var D;return(D=h==null?void 0:h.data)==null?void 0:D.result}))==null?void 0:s.map(h=>h==null?void 0:h.id))),m=await p.batchDeleteInsofDataApi({ids:x});((i=m==null?void 0:m.data)==null?void 0:i.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await op(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Ft.setTableLoading(!1)}},lp=async a=>{var s,i;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Rt.value,tableId:(s=a==null?void 0:a.to)==null?void 0:s.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((i=a==null?void 0:a.data)!=null&&i.id))return;const x=await Promise.all([d]);(x==null?void 0:x.every(h=>{var D;return((D=h==null?void 0:h.data)==null?void 0:D.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Tl=e.ref(0),Za=e.ref(null),eo=async(a,s="data",i)=>{var l,c,d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I;if(Za.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await Ko(a):await Ne.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await ia.setLogRecordAsync({type:"删除",data:a},Rt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(se=>typeof(se==null?void 0:se.id)=="string")){const se=(x=a==null?void 0:a.selectItems)==null?void 0:x.map($e=>({content:a==null?void 0:a.content,singleContent:$e,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await Ko(se)}else{const se=(m=a==null?void 0:a.selectItems)==null?void 0:m.map($e=>$e==null?void 0:$e.id);await p.batchDeleteInsofDataApi({ids:se}),await ia.setLogRecordAsync({type:"删除",data:se},Rt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let se={};for(let nt in a==null?void 0:a.singleContent)nt!=="id"&&nt!=="index"&&(se[nt]=a==null?void 0:a.singleContent[nt]);const $e=await Ne.addTableContents(s,Rt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a,{param:i});Za.value={resId:$e,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Ft.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let se=[],$e=[],nt=((D=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:D.id)??"",Ie=i==null?void 0:i.url,ze="",ue="";if(nt!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((O=(T=a==null?void 0:a.content)==null?void 0:T[0])==null?void 0:O.id)!="string"){const _=await p.getInsofDataApi({id:nt});ze=((W=(ke=(V=(H=_==null?void 0:_.data)==null?void 0:H.result)==null?void 0:V[0])==null?void 0:ke.key)==null?void 0:W.tableId)??"",ue=((z=(w=(G=(K=_==null?void 0:_.data)==null?void 0:K.result)==null?void 0:G[0])==null?void 0:w.key)==null?void 0:z.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(_=>{let ne={};for(let te in _)te!=="id"&&te!=="index"&&(ne[te]=_[te]);typeof(_==null?void 0:_.id)=="number"?se.push({id:_==null?void 0:_.id,value:{tableData:ne}}):$e.push({key:{type:s,pageKey:Ie||ue||Rt.value,tableId:ze||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ne}})}),($e==null?void 0:$e.length)>0&&await p.batchAddInsofDataApi({dataList:$e}),(se==null?void 0:se.length)>0&&await p.batchUpdateInsofDataApi({dataList:se})}else{let se={},$e=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let nt in a==null?void 0:a.singleContent)nt!=="id"&&nt!=="index"&&(se[nt]=a==null?void 0:a.singleContent[nt]);await Ne.fixTableContents(s,Rt.value,a==null?void 0:a.index,$e,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a)}Ft.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await lp(a==null?void 0:a.value);Ft.setTableLoading(!1),(I=a==null?void 0:a.column)!=null&&I.some(se=>se==null?void 0:se.isMainKey)||(bt.value=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value)),bt.value=Aa(bt.value),ko.value&&(a==null?void 0:a.buttonName)!=="删除"&&Ft.setRefreshCurStructure(!0)},rp=async a=>{var i,l,c;const s=await p.getInsofDataApi({id:a});return(c=(l=(i=s==null?void 0:s.data)==null?void 0:i.result)==null?void 0:l[0])==null?void 0:c.value},to=async(a,s)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const i=await rp(a==null?void 0:a.index),l=(c=i==null?void 0:i.pageData)==null?void 0:c.name;await Ne.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(m=>m.contents),name:l,isShow:(x=i==null?void 0:i.pageData)==null?void 0:x.isShow}),s&&(dn.setActiveMenuPath(null),dn.setActiveMenuPath(s))},no=a=>{bt.value=Aa(a),Ft.setItemData(bt.value),Ft.setOriginalData(bt.value)},ip=async a=>{var s;await e.nextTick(),(s=Yu.value)!=null&&s.isRouter?$o.setRouterPageStructure(a):$o.setRouterPageStructure([])},sp=async a=>{var d,x,m,h,D,E;let s="",i="";(d=a==null?void 0:a.split("/"))==null||d.forEach((T,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-2>O&&(s=s===""?s+T:s+"/"+T)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((T,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-1>O&&(i=i===""?i+T:i+"/"+T)}),s=s+"/",i=i+"/";let l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}});return((h=(m=l==null?void 0:l.data)==null?void 0:m.result)==null?void 0:h.length)>0||((E=(D=c==null?void 0:c.data)==null?void 0:D.result)==null?void 0:E.length)>0},cp=e.ref(),Fn=e.ref(null),up=a=>{var D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze;const s=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(ue=>{var _;return((_=ue==null?void 0:ue.key)==null?void 0:_.type)==="extend"});if((s==null?void 0:s.length)===0)return Fn.value=null;cp.value=s;const i=(O=(T=s==null?void 0:s.find(ue=>{var _,ne,te;return(te=(ne=(_=ue==null?void 0:ue.value)==null?void 0:_.tableData)==null?void 0:ne.执行任务)==null?void 0:te.includes("计时")}))==null?void 0:T.value)==null?void 0:O.tableData;if(!i)return Fn.value=null;const l=(ke=(V=(H=s==null?void 0:s.find(ue=>{var _,ne,te;return(te=(ne=(_=ue==null?void 0:ue.value)==null?void 0:_.tableData)==null?void 0:ne.执行任务)==null?void 0:te.includes("计时")}))==null?void 0:H.key)==null?void 0:V.relatedInfo)==null?void 0:ke.compId,c=(W=bt.value)==null?void 0:W.find(ue=>(ue==null?void 0:ue.id)===l);if(!c)return Fn.value=null;const d=(G=i==null?void 0:i.任务关键词)==null?void 0:G[((K=i==null?void 0:i.任务关键词)==null?void 0:K.length)-1],x=(k=(z=(w=c==null?void 0:c.compData)==null?void 0:w.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:z.contents)==null?void 0:k.findIndex(ue=>(ue==null?void 0:ue.prop)===d),m=($e=(se=(I=(A=c==null?void 0:c.compData)==null?void 0:A.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:I.contents)==null?void 0:se.find(ue=>ue==null?void 0:ue.isMainKey))==null?void 0:$e.prop,h=(ze=(Ie=(nt=c==null?void 0:c.compData)==null?void 0:nt.find(ue=>(ue==null?void 0:ue.key)==="tableContents"))==null?void 0:Ie.contents)==null?void 0:ze[x];Fn.value={prop:d,value:h,title:i==null?void 0:i.任务名称,task:i==null?void 0:i.执行任务,action:i==null?void 0:i.执行动作,runIn:i==null?void 0:i.执行交互,mainKeyProp:m},console.log("getPageExtendData:",i,s)},pp=()=>{var a,s;console.log("倒计时结束时"),jt.ElMessageBox.alert(`超时未提交,【${(s=(a=Rt.value)==null?void 0:a.split("/"))==null?void 0:s[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Il=()=>{var a,s,i,l;try{if(Xu.value!=="报告中心"||!((a=Rt.value)!=null&&a.includes(ro.value)))return;const c=(s=bt.value)==null?void 0:s.find(h=>{var D;return((D=h==null?void 0:h.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},x=(l=(i=c==null?void 0:c.compData)==null?void 0:i.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,m=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));m!=null&&m.value&&(m==null?void 0:m.value)!==(d==null?void 0:d.value)&&Ft.setLockingPage(Rt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},bo=e.ref([]),dp=e.computed(()=>{var a,s;return(s=(a=Xa.value)==null?void 0:a[Rt.value])==null?void 0:s.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Rt.value,Hu.value],async a=>{var d,x,m,h,D,E,T,O,H,V,ke,W,K;if(!Rt.value)return;Ft.setLockingPage(""),bt.value=[];let s=e.getCurrentInstance();(d=s==null?void 0:s.scope)==null||d.stop(),s=null,Ya.value=!1,Ua.value=!0;const i=(x=a==null?void 0:a[0])!=null&&x.startsWith("/")?(m=a==null?void 0:a[0])==null?void 0:m.substring(1):a==null?void 0:a[0];let l=new WeakMap;if((D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:Gu.value})).data.result)==null?void 0:h.filter(G=>{var w,z;return((w=G==null?void 0:G.key)==null?void 0:w.pageKey)!=="menu"&&((z=G==null?void 0:G.key)==null?void 0:z.pageKey)!=="secret"}))==null||D.forEach(G=>{l[G.key.pageKey]?l[G.key.pageKey]=[...l[G.key.pageKey],G]:l[G.key.pageKey]=[G]}),Ja.value=l,i){if(dn.setContentLoading(!0),sessionStorage.setItem("pageKey",Rt.value),bt.value=await Ne.getItemData(i,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value,l),!bt.value){let G=(T=(E=i==null?void 0:i.split("/"))==null?void 0:E.filter((z,k)=>{var A;return k!==((A=i==null?void 0:i.split("/"))==null?void 0:A.length)-1}))==null?void 0:T.join("/");bt.value=await Ne.getItemData(G,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value,l);let w=(H=i==null?void 0:i.split("/"))==null?void 0:H[((O=i==null?void 0:i.split("/"))==null?void 0:O.length)-1];bt.value=(V=bt.value)==null?void 0:V.map(z=>{var k;return z.compData=(k=z==null?void 0:z.compData)==null?void 0:k.map(A=>{var I,se,$e,nt,Ie;if((A==null?void 0:A.key)==="tableContents"){let ze=[];(I=A.contents)!=null&&I.every(ue=>Array.isArray(ue)&&(ue==null?void 0:ue.find(_=>_==null?void 0:_.id)))?ze=(se=A.contents)==null?void 0:se.filter(ue=>(ue==null?void 0:ue[1])===w):($e=A.contents)!=null&&$e.every(ue=>Array.isArray(ue)&&!(ue!=null&&ue.find(_=>_==null?void 0:_.id)))?ze=(nt=A.contents)==null?void 0:nt.filter(ue=>(ue==null?void 0:ue[0])===w):ze=(Ie=A.contents)==null?void 0:Ie.filter(ue=>{var _;return(ue==null?void 0:ue[((_=Object.keys(ue))==null?void 0:_[1])??""])===w}),A.contents=ze}return A}),z})}await ia.setLogRecordAsync({type:"查询",data:bt.value},Rt.value),bt.value=Aa(bt.value),await ip(bt.value),Il(),up(i),bo.value=(ke=bt.value)==null?void 0:ke.map(G=>({label:G==null?void 0:G.name,value:G==null?void 0:G.id})),Ft.setExtraContents([]),xn.setSelectTitle([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Ft.setItemData(bt.value),Ft.setOriginalData(bt.value),Ft.setCurStructureCompIds((W=bt.value)==null?void 0:W.map(G=>G==null?void 0:G.id)),Ft.setRefreshCurStructure(!1),xn.setSelectTitle((K=Rt.value)==null?void 0:K.split("/").map(G=>({value:G.trim()}))),dn.setChildMenu(""),dn.setContentLoading(!1),Ft.setTableLoading(!1),Ua.value=!1}else bt.value=[],Ua.value=!1;e.nextTick(()=>{ga.value=ga.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{if(Po.value){let a=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value);bt.value=Aa(a),Ft.setFreshContent(!1),Il()}},{deep:!0});const fp=async()=>{var c,d,x,m,h,D,E,T;dn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=La.value)==null?void 0:c.account)||((d=La.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),s=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=La.value)==null?void 0:x.account)||((m=La.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let i=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(O=>O==null?void 0:O.id);const l=(T=(E=s==null?void 0:s.data)==null?void 0:E.result)==null?void 0:T.map(O=>O==null?void 0:O.id);i=[...p.cloneDeep(i),...l],(i==null?void 0:i.length)>0&&(i!=null&&i.every(O=>O!==null&&O))&&(await p.batchDeleteInsofDataApi({ids:i}),await ia.setLogRecordAsync({type:"删除",data:i},Rt.value)),dn.setActiveMenuPath(qu.value),bt.value=null,Ft.setRouteToChildPath(""),dn.setChildMenu("")},hp=a=>new RegExp("button","i").test(a),vp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Bl=a=>{if(vp(a)){const s=a==null?void 0:a.split("^");(s==null?void 0:s.length)>0&&(s!=null&&s[0])&&dn.setLinkMenuInfo({path:s==null?void 0:s[0],data:s==null?void 0:s[1]})}},Al=a=>{var s;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(s=Fn.value)==null?void 0:s.mainKeyProp]})},gp=a=>{Tl.value=a},ha=e.reactive({index:0,comp:null}),mp=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.map((s,i)=>({id:s.id,name:s.name,status:yp(s,i)}))}),Nl=(a,s)=>{var h,D,E,T,O;const i=s?a:a-2,l=(h=bt.value)==null?void 0:h[i],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(H=>(H==null?void 0:H.isMainKey)&&(H==null?void 0:H.label)!=="操作"),x=d===-1?0:d,m=(O=(T=l==null?void 0:l.compData)==null?void 0:T.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:O.contents;return{valid:m==null?void 0:m.every(H=>H==null?void 0:H[x+1]),length:(m==null?void 0:m.length)||0}},yp=(a,s)=>{var l;let i="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Nl(s,!0);ha.index===s?i="process":d===0?i="wait":i=c?"success":"error"}return i},Vl=a=>{var i,l,c,d,x;const s=a+1;if(s>1&&((c=(l=(i=bt.value)==null?void 0:i[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:m}=Nl(s);m?(ha.index=s,ha.comp=(d=bt.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ha.index=s,ha.comp=(x=bt.value)==null?void 0:x[a]},ko=e.computed(()=>{var a,s;return(s=(a=Sl.value)==null?void 0:a[0])==null?void 0:s.isStepLayout});e.watch(()=>ko.value,a=>{a&&Vl(0)},{immediate:!0});const bp={class:"layout"},kp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:s}){const i=s,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(T=>{const{key:O}=T;return O==="baseConfig"});return D==null?void 0:D.contents}),x=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(T=>{const{key:O}=T;return O==="children"});return D==null?void 0:D.contents}),m=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let T=0;const O=[];if(D=D.map(H=>{const V=H.span;return V?(H.span=Number(V),T=T+H.span):O.push(H),H}),T<24){const H=Math.floor((24-T)/E);O.forEach(V=>{V.span=H})}return D}),h=D=>{i("rowClick",D)};return(D,E)=>{var H;const T=e.resolveComponent("el-col"),O=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",bp,[e.createVNode(O,{style:e.normalizeStyle({height:(H=d.value)==null?void 0:H.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(V,ke)=>(e.openBlock(),e.createBlock(T,{span:V==null?void 0:V.span},{default:e.withCtx(()=>{var W;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{key:e.unref(ga),compName:V.name,index:(V==null?void 0:V.id)??ke,height:(W=d.value)==null?void 0:W.height,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,onChange:e.unref(eo),onContentChange:e.unref(to),onPageChange:e.unref(no),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),xp=Lt._export_sfc(kp,[["__scopeId","data-v-ab9a36ed"]]),wp={class:"layout-operate"},Dp={class:"layout-module"},Cp={class:"collapse-title-item"},Ep={class:"collapse-title"},_p={class:"icon-content"},Sp=["onClick"],Tp={class:"comp-child"},Ip=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s;e.onMounted(()=>{ke()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),m=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",z(),!0)},D=e.ref([]),E=e.ref([]),T=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],O=e.computed(()=>{const k=i==null?void 0:i.itemContents;return p.cloneDeep(k)}),H=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(I=>{const{key:se}=I;return se==="baseConfig"});return A==null?void 0:A.contents}),V=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(I=>{const{key:se}=I;return se==="children"});return A==null?void 0:A.contents}),ke=()=>{var k;c.value=O.value||{},D.value=(V==null?void 0:V.value)||[],x.value=m(),x.value=(k=x.value)==null?void 0:k.map(A=>{var se;const{prop:I}=A;return A.value=(se=H.value)==null?void 0:se[I],A})};e.watch(()=>{var k;return(k=V==null?void 0:V.value)==null?void 0:k.length},()=>{var k;D.value=(V==null?void 0:V.value)||[],E.value=(k=V.value)==null?void 0:k.map(A=>T(A))},{immediate:!0});const W=(k,A)=>{const I=p.cloneDeep(V==null?void 0:V.value);I[A].span=k.span,D.value=I,l("change",z(),!0)},K=k=>ya(k),G=(k,A,I)=>{if(!k)return;const se=p.cloneDeep(V==null?void 0:V.value);se[I]&&(se[I].compData=k,D.value=se,l("change",z(),!0))},w=k=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(V==null?void 0:V.value);A=A==null?void 0:A.filter((I,se)=>k!==se),D.value=A,l("change",z(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:D==null?void 0:D.value}]});return(k,A)=>{const I=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",wp,[e.createElementVNode("div",Dp,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Nt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=se=>h(se))},null,8,["rowContents"])])]),e.createVNode(gl.default,{class:"collapse-content",collapseContents:V.value},{title:e.withCtx(({item:se,index:$e})=>[e.createElementVNode("div",Cp,[e.createElementVNode("div",Ep,e.toDisplayString(se.name),1),e.createElementVNode("div",_p,[e.createElementVNode("div",{onClick:e.withModifiers(nt=>w($e),["stop"]),class:"icon-content"},[e.createVNode(I,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Sp)])])]),content:e.withCtx(({item:se,index:$e})=>[e.createElementVNode("div",Tp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:E.value[$e],key:$e,isEnableWrap:!0,onChange:nt=>W(nt,$e)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(se.comp+"Operate")),{itemContents:se==null?void 0:se.compData,originalItemContents:se.compData,onChange:nt=>G(nt,se,$e)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Bp=Lt._export_sfc(Ip,[["__scopeId","data-v-ba05456e"]]),Ap=typeof window<"u";var Uo;Ap&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pn(a){return a==null}function Ol(){}const Np=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(Np)));function Vp(){const a=new Map;return{on(s,i){const l=a.get(s);l!=null&&l.add(i)||a.set(s,new Set([i]))},off(s,i){const l=a.get(s);l&&l.delete(i)},clear(s){const i=a.get(s);i&&i.clear()},clearAll(){a.clear()},emit(s,...i){const l=a.get(s);l&&l.forEach(c=>{c(...i)})}}}function Wo(a,s=16){if(typeof a!="function")return Ol;const i=(...d)=>{a(...d)};if(s<=0)return Ml(i);let l=0,c;return function(...d){const x=Date.now(),m=x-l;clearTimeout(c),m>=s?(l=x,i(...d)):c=setTimeout(()=>{l=Date.now(),i(...d)},Math.max(0,s-m))}}function Op(a,s=100){if(typeof a!="function")return Ol;const i=(...c)=>{a(...c)};if(s<=0)return Ml(i);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{i(...c)},s)}}function Ml(a){if(typeof a!="function")return a;let s=!1,i,l;return function(...c){return i=c,s||(s=!0,l=Promise.resolve().then(()=>(s=!1,l=void 0,a(...i)))),l}}const Sa=new Set,zl=new WeakMap;function Mp(){Sa.forEach(a=>{a(...zl.get(a))}),Sa.clear()}function nn(a,...s){if(typeof a!="function")return a;zl.set(a,s),!Sa.has(a)&&(Sa.add(a),Sa.size===1&&Promise.resolve().then(Mp))}const Rl=Symbol("LAYOUT_KEY"),Ll=Symbol("EMITTER_KEY");function zp(a){let s=0,i;for(let l=0,c=a.length;l<c;l++)i=a[l].y+a[l].h,i>s&&(s=i);return s}function vo(a){const s=Array(a.length);for(let i=0,l=a.length;i<l;i++)s[i]=Rp(a[i]);return s}function Rp(a){return{...a}}function Pl(a,s){return!(a===s||a.x+a.w<=s.x||a.x>=s.x+s.w||a.y+a.h<=s.y||a.y>=s.y+s.h)}function da(a,s,i){const l=$l(a),c=jl(a),d=Array(a.length);for(let x=0,m=c.length;x<m;x++){let h=c[x];h.static||(h=Lp(l,h,s,i),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function Lp(a,s,i,l){if(i)for(;s.y>0&&!Ta(a,s);)s.y--;else if(l){const d=l[s.i].y;for(;s.y>d&&!Ta(a,s);)s.y--}let c;for(;c=Ta(a,s);)s.y=c.y+c.h;return s}function Pp(a,s){const i=$l(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>s.cols&&(d.x=s.cols-d.w),d.x<0&&(d.x=0,d.w=s.cols),!d.static)i.push(d);else for(;Ta(i,d);)d.y++}return a}function Ho(a,s){for(let i=0,l=a.length;i<l;i++)if(a[i].i===s)return a[i]}function Ta(a,s){for(let i=0,l=a.length;i<l;i++)if(Pl(a[i],s))return a[i]}function Fl(a,s){return a.filter(i=>Pl(i,s))}function $l(a){return a.filter(s=>s.static)}function go(a,s,i,l,c=!1,d=!1){if(s.static)return a;const x=s.x,m=s.y,h=l&&s.y>l;typeof i=="number"&&(s.x=i),typeof l=="number"&&(s.y=l),s.moved=!0;let D=jl(a);h&&(D=D.reverse());const E=Fl(D,s);if(d&&E.length)return s.x=x,s.y=m,s.moved=!1,a;for(let T=0,O=E.length;T<O;T++){const H=E[T];H.moved||s.y>H.y&&s.y-H.y>H.h/4||(H.static?a=qo(a,H,s,c):a=qo(a,s,H,c))}return a}function qo(a,s,i,l){if(l){const c={x:i.x,y:i.y,w:i.w,h:i.h};if(c.y=Math.max(s.y-i.h,0),!Ta(a,c))return go(a,i,void 0,c.y,!1)}return go(a,i,void 0,i.y+1,!1)}function Fp(a,s,i,l){const c="translate3d("+s+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:i+"px",height:l+"px",position:"absolute"}}function $p(a,s,i,l){const c="translate3d("+s*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:i+"px",height:l+"px",position:"absolute"}}function jp(a,s,i,l){return{top:a+"px",left:s+"px",width:i+"px",height:l+"px",position:"absolute"}}function Kp(a,s,i,l){return{top:a+"px",right:s+"px",width:i+"px",height:l+"px",position:"absolute"}}function jl(a){return Array.from(a).sort(function(s,i){return s.y===i.y&&s.x===i.x?0:s.y>i.y||s.y===i.y&&s.x>i.x?1:-1})}function Up(a,s){s=s||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(s+" must be an array!");for(let c=0,d=a.length;c<d;c++){const x=a[c];for(let m=0;m<i.length;m++)if(typeof x[i[m]]!="number")throw new Error("VueGridLayout: "+s+"["+c+"]."+i[m]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+s+"["+c+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+s+"["+c+"].i must be a string or number!");if(l.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+s+"["+c+"].i must be unique!");if(l.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+s+"["+c+"].static must be a boolean!")}}function Wp(a,s="vgl"){const i=()=>`${s}-${a}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,c)=>`${i()}__${l}--${c}`}}function Go(a){return Hp(a)}function Hp(a){var s;const i=((s=a.target)==null?void 0:s.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),c=a.clientX+i.scrollLeft-l.left,d=a.clientY+i.scrollTop-l.top;return{x:c,y:d}}function Xo(a,s,i,l){return qp(a)?{deltaX:i-a,deltaY:l-s,lastX:a,lastY:s,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function qp(a){return typeof a=="number"&&!Number.isNaN(a)}function Gp(a,s){const i=Ul(a);let l=i[0];for(let c=1,d=i.length;c<d;c++){const x=i[c];s>a[x]&&(l=x)}return l}function Kl(a,s){if(!s[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return s[a]}function Xp(a,s,i,l,c,d,x){if(s[l])return vo(s[l]);let m=a;const h=Ul(i),D=h.slice(h.indexOf(l));for(let E=0,T=D.length;E<T;E++){const O=D[E];if(s[O]){m=s[O];break}}return m=vo(m||[]),da(Pp(m,{cols:d}),x)}function Ul(a){return Object.keys(a).sort((s,i)=>a[s]-a[i])}let Yp="auto";function Jp(){return typeof document<"u"}function Yo(){return Jp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Yp}var Ea={exports:{}},Qp=Ea.exports,Jo;function Zp(){return Jo||(Jo=1,function(a,s){(function(i,l){a.exports=l()})(Qp,function(){function i(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function x(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ke(r.key),r)}}function m(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=ke(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function D(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&&T(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function T(n,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},T(n,t)}function O(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function H(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,y){if(y&&(typeof y=="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(f)}(this,o)}}function V(){return V=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,y){for(;!Object.prototype.hasOwnProperty.call(f,y)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},V.apply(this,arguments)}function ke(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var W=function(n){return!(!n||!n.Window)&&n instanceof n.Window},K=void 0,G=void 0;function w(n){K=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),G=n}function z(n){return W(n)?n:(n.ownerDocument||n).defaultView||G.window}typeof window<"u"&&window&&w(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},I={window:function(n){return n===G||W(n)},docFrag:function(n){return k(n)&&n.nodeType===11},object:k,func:A,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=z(n)||G;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return k(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return k(n)&&n.length!==void 0&&A(n.splice)}};function se(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 $e(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var nt={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=nt.draggable,t.map.drag=nt,t.methodDict.drag="draggable",r.actions.drag=nt.defaults},listeners:{"interactions:before-action-move":se,"interactions:action-resume":se,"interactions:action-move":$e,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return I.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):I.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:se,move:$e,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ie=nt,ze={init:function(n){var t=n;ze.document=t.document,ze.DocumentFragment=t.DocumentFragment||ue,ze.SVGElement=t.SVGElement||ue,ze.SVGSVGElement=t.SVGSVGElement||ue,ze.SVGElementInstance=t.SVGElementInstance||ue,ze.Element=t.Element||ue,ze.HTMLElement=t.HTMLElement||ze.Element,ze.Event=t.Event,ze.Touch=t.Touch||ue,ze.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 ue(){}var _=ze,ne={init:function(n){var t=_.Element,o=n.navigator||{};ne.supportsTouch="ontouchstart"in n||I.func(n.DocumentTouch)&&_.document instanceof n.DocumentTouch,ne.supportsPointerEvent=o.pointerEnabled!==!1&&!!_.PointerEvent,ne.isIOS=/iP(hone|od|ad)/.test(o.platform),ne.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ne.isIe9=/MSIE 9/.test(o.userAgent),ne.isOperaMobile=o.appName==="Opera"&&ne.supportsTouch&&/Presto/.test(o.userAgent),ne.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ne.pEventTypes=ne.supportsPointerEvent?_.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,ne.wheelEvent=_.document&&"onmousewheel"in _.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},te=ne;function ve(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ue(n,t){for(;I.element(n);){if(q(n,t))return n;n=st(n)}return null}function st(n){var t=n.parentNode;if(I.docFrag(t)){for(;(t=t.host)&&I.docFrag(t););return t}return t}function q(n,t){return G!==K&&(t=t.replace(/\/deep\//g," ")),n[te.prefixedMatchesSelector](t)}var M=function(n){return n.parentNode||n.host};function ye(n,t){for(var o,r=[],u=n;(o=M(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function xe(n,t,o){for(;I.element(n);){if(q(n,t))return!0;if((n=st(n))===o)return q(n,t)}return!1}function Re(n){return n.correspondingUseElement||n}function Oe(n){var t=n instanceof _.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 Ye(n){var t,o=Oe(n);if(!te.isIOS7&&o){var r={x:(t=(t=z(n))||G).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function qe(n){for(var t=[];n;)t.push(n),n=st(n);return t}function lt(n){return!!I.string(n)&&(_.document.querySelector(n),!0)}function Z(n,t){for(var o in t)n[o]=t[o];return n}function tt(n,t,o){return n==="parent"?st(o):n==="self"?t.getRect(o):Ue(o,n)}function at(n,t,o,r){var u=n;return I.string(u)?u=tt(u,t,o):I.func(u)&&(u=u.apply(void 0,r)),I.element(u)&&(u=Ye(u)),u}function Le(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=Z({},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 le(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 re(n,t,o){var r=o&&n.options[o];return Le(at(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Te(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(S){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},I.string(n)&&n.search(" ")!==-1&&(n=Xe(n)),I.array(n))return n.forEach(function(S){return Te(S,t,o,r)}),r;if(I.object(n)&&(t=n,n=""),I.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(I.array(t))for(var u=0,f=t;u<f.length;u++){var y=f[u];Te(n,y,o,r)}else if(I.object(t))for(var b in t)Te(Xe(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Xe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},g=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(g.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function U(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 J(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function v(n){return n instanceof _.Event||n instanceof _.Touch}function F(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function ee(n,t){return t=t||{x:0,y:0},te.isOperaMobile&&v(n)?(F("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):F("page",n,t),t}function R(n){return I.number(n.pointerId)?n.pointerId:n.identifier}function pe(n,t,o){var r=t.length>1?Y(t):t[0];ee(r,n.page),function(u,f){f=f||{},te.isOperaMobile&&v(u)?F("screen",u,f):F("client",u,f)}(r,n.client),n.timeStamp=o}function L(n){var t=[];return I.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 r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function ie(n){if(!n.length)return null;var t=L(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function ge(n,t){var o=t+"X",r=t+"Y",u=L(n),f=u[0][o]-u[1][o],y=u[0][r]-u[1][r];return dt(f,y)}function $(n,t){var o=t+"X",r=t+"Y",u=L(n),f=u[1][o]-u[0][o],y=u[1][r]-u[0][r];return 180*Math.atan2(y,f)/Math.PI}function oe(n){return I.string(n.pointerType)?n.pointerType:I.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof _.Touch?"touch":"mouse"}function X(n){var t=I.func(n.composedPath)?n.composedPath():n.path;return[Re(t?t[0]:n.target),Re(n.currentTarget)]}var _e=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return m(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(_e.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var fe=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ee=function(n){return fe([],n)},P=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},he=function(n,t){return n[P(n,t)]},ae=function(n){D(o,n);var t=H(o);function o(r,u,f){var y;d(this,o),(y=t.call(this,u._interaction)).dropzone=void 0,y.dragEvent=void 0,y.relatedTarget=void 0,y.draggable=void 0,y.propagationStopped=!1,y.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,j=b.dropzone;return y.type=f,y.target=S,y.currentTarget=S,y.dropzone=j,y.dragEvent=u,y.relatedTarget=u.target,y.draggable=u.interactable,y.timeStamp=u.timeStamp,y}return m(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,y=P(f,function(S){var j=S.dropzone,B=S.element;return j===r.dropzone&&B===r.target});u.activeDrops.splice(y,1);var b=new o(u,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(_e);function Be(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,y=u.element;t.dropzone=f,t.target=y,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Je(n,t){for(var o=function(f,y){for(var b=[],S=0,j=f.interactables.list;S<j.length;S++){var B=j[S];if(B.options.drop.enabled){var Q=B.options.drop.accept;if(!(I.element(Q)&&Q!==y||I.string(Q)&&!q(y,Q)||I.func(Q)&&!Q({dropzone:B,draggableElement:y})))for(var we=0,je=B.getAllElements();we<je.length;we++){var Pe=je[we];Pe!==y&&b.push({dropzone:B,element:Pe,rect:B.getRect(Pe)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Me(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,y=[],b=0,S=r.activeDrops;b<S.length;b++){var j=S[b],B=j.dropzone,Q=j.element,we=j.rect,je=B.dropCheck(t,o,u,f,Q,we);y.push(je?Q:null)}var Pe=function(Ge){for(var it,ot,ht,yt=[],_t=0;_t<Ge.length;_t++){var mt=Ge[_t],xt=Ge[it];if(mt&&_t!==it)if(xt){var tn=M(mt),Kt=M(xt);if(tn!==mt.ownerDocument)if(Kt!==mt.ownerDocument)if(tn!==Kt){yt=yt.length?yt:ye(xt);var un=void 0;if(xt instanceof _.HTMLElement&&mt instanceof _.SVGElement&&!(mt instanceof _.SVGSVGElement)){if(mt===Kt)continue;un=mt.ownerSVGElement}else un=mt;for(var En=ye(un,xt.ownerDocument),Rn=0;En[Rn]&&En[Rn]===yt[Rn];)Rn++;var Ra=[En[Rn-1],En[Rn],yt[Rn]];if(Ra[0])for(var wa=Ra[0].lastChild;wa;){if(wa===Ra[1]){it=_t,yt=En;break}if(wa===Ra[2])break;wa=wa.previousSibling}}else ht=xt,(parseInt(z(ot=mt).getComputedStyle(ot).zIndex,10)||0)>=(parseInt(z(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=_t);else it=_t}else it=_t}return it}(y);return r.activeDrops[Pe]||null}function Ve(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ae(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ae(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new ae(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new ae(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ae(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ae(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function me(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&Be(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function ct(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Je(t,o.element));var y=r,b=Me(o,y,u);f.rejected=f.rejected&&!!b&&b.dropzone===f.cur.dropzone&&b.element===f.cur.element,f.cur.dropzone=b&&b.dropzone,f.cur.element=b&&b.element,f.events=Ve(o,0,y)}}var Ke={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Ie),r.prototype.dropzone=function(f){return function(y,b){if(I.object(b)){if(y.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Te(b.listeners),j=Object.keys(S).reduce(function(Q,we){return Q[/^(enter|leave)/.test(we)?"drag".concat(we):/^(activate|deactivate|move)/.test(we)?"drop".concat(we):we]=S[we],Q},{}),B=y.options.drop.listeners;B&&y.off(B),y.on(j),y.options.drop.listeners=j}return I.func(b.ondrop)&&y.on("drop",b.ondrop),I.func(b.ondropactivate)&&y.on("dropactivate",b.ondropactivate),I.func(b.ondropdeactivate)&&y.on("dropdeactivate",b.ondropdeactivate),I.func(b.ondragenter)&&y.on("dragenter",b.ondragenter),I.func(b.ondragleave)&&y.on("dragleave",b.ondragleave),I.func(b.ondropmove)&&y.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?y.options.drop.overlap=b.overlap:I.number(b.overlap)&&(y.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(y.options.drop.accept=b.accept),"checker"in b&&(y.options.drop.checker=b.checker),y}return I.bool(b)?(y.options.drop.enabled=b,y):y.options.drop}(this,f)},r.prototype.dropCheck=function(f,y,b,S,j,B){return function(Q,we,je,Pe,Ge,it,ot){var ht=!1;if(!(ot=ot||Q.getRect(it)))return!!Q.options.drop.checker&&Q.options.drop.checker(we,je,ht,Q,it,Pe,Ge);var yt=Q.options.drop.overlap;if(yt==="pointer"){var _t=re(Pe,Ge,"drag"),mt=ee(we);mt.x+=_t.x,mt.y+=_t.y;var xt=mt.x>ot.left&&mt.x<ot.right,tn=mt.y>ot.top&&mt.y<ot.bottom;ht=xt&&tn}var Kt=Pe.getRect(Ge);if(Kt&&yt==="center"){var un=Kt.left+Kt.width/2,En=Kt.top+Kt.height/2;ht=un>=ot.left&&un<=ot.right&&En>=ot.top&&En<=ot.bottom}return Kt&&I.number(yt)&&(ht=Math.max(0,Math.min(ot.right,Kt.right)-Math.max(ot.left,Kt.left))*Math.max(0,Math.min(ot.bottom,Kt.bottom)-Math.max(ot.top,Kt.top))/(Kt.width*Kt.height)>=yt),Q.options.drop.checker&&(ht=Q.options.drop.checker(we,je,ht,Q,it,Pe,Ge)),ht}(this,f,y,b,S,j,B)},o.dynamicDrop=function(f){return I.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},Z(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ke.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Je(t,o.element),u.events=Ve(o,0,r),u.events.activate&&(Be(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":ct,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;me(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;ct(n,t),me(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:Je,getDrop:Me,getDropEvents:Ve,fireDropEvents:me,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},be=Ke;function De(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(j){return j.pointer}),f=r==="start",y=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ge(u,b),o.box=ie(u),o.scale=1,o.ds=0,o.angle=$(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(y||t.pointers.length<2){var S=t.prevEvent;o.distance=S.distance,o.box=S.box,o.scale=S.scale,o.ds=0,o.angle=S.angle,o.da=0}else o.distance=ge(u,b),o.box=ie(u),o.scale=o.distance/t.gesture.startDistance,o.angle=$(u,b),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,I.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Qe={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return I.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):I.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=Qe,t.methodDict.gesture="gesturable",r.actions.gesture=Qe.defaults},listeners:{"interactions:action-start":De,"interactions:action-move":De,"interactions:action-end":De,"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}},de=Qe;function Ae(n,t,o,r,u,f,y){if(!t)return!1;if(t===!0){var b=I.number(f.width)?f.width:f.right-f.left,S=I.number(f.height)?f.height:f.bottom-f.top;if(y=Math.min(y,Math.abs((n==="left"||n==="right"?b:S)/2)),b<0&&(n==="left"?n="right":n==="right"&&(n="left")),S<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var j=b>=0?f.left:f.right;return o.x<j+y}if(n==="top"){var B=S>=0?f.top:f.bottom;return o.y<B+y}if(n==="right")return o.x>(b>=0?f.right:f.left)-y;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-y}return!!I.element(r)&&(I.element(t)?t===r:xe(r,t,u))}function Fe(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var We,N,Ce={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ce.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ce.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(y,b,S){return I.object(b)?(y.options.resize.enabled=b.enabled!==!1,y.setPerAction("resize",b),y.setOnEvents("resize",b),I.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?y.options.resize.axis=b.axis:b.axis===null&&(y.options.resize.axis=S.defaults.actions.resize.axis),I.bool(b.preserveAspectRatio)?y.options.resize.preserveAspectRatio=b.preserveAspectRatio:I.bool(b.square)&&(y.options.resize.square=b.square),y):I.bool(b)?(y.options.resize.enabled=b,y):y.options.resize}(this,f,n)},t.map.resize=Ce,t.methodDict.resize="resizable",u.actions.resize=Ce.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:Z({},f),corrected:Z({},f),previous:Z({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),Fe(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,y=f==="reposition"||f==="negate",b=r.rect,S=r._rects,j=S.start,B=S.corrected,Q=S.delta,we=S.previous;if(Z(we,B),y){if(Z(B,b),f==="reposition"){if(B.top>B.bottom){var je=B.top;B.top=B.bottom,B.bottom=je}if(B.left>B.right){var Pe=B.left;B.left=B.right,B.right=Pe}}}else B.top=Math.min(b.top,j.bottom),B.bottom=Math.max(b.bottom,j.top),B.left=Math.min(b.left,j.right),B.right=Math.max(b.right,j.left);for(var Ge in B.width=B.right-B.left,B.height=B.bottom-B.top,B)Q[Ge]=B[Ge]-we[Ge];u.edges=r.prepared.edges,u.rect=B,u.deltaRect=Q}})(n),Fe(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var y=Z({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&b.mouseButtons)!=0)){if(I.object(b.edges)){var S={left:!1,right:!1,top:!1,bottom:!1};for(var j in S)S[j]=Ae(j,b.edges[j],y,t._latestPointer.eventTarget,r,u,b.margin||Ce.defaultMargin);S.left=S.left&&!S.right,S.top=S.top&&!S.bottom,(S.left||S.right||S.top||S.bottom)&&(n.action={name:"resize",edges:S})}else{var B=b.axis!=="y"&&y.x>u.right-Ce.defaultMargin,Q=b.axis!=="x"&&y.y>u.bottom-Ce.defaultMargin;(B||Q)&&(n.action={name:"resize",axes:(B?"x":"")+(Q?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=Ce.cursors,f=null;if(o)f=u[r+o];else if(t){for(var y="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var j=S[b];t[j]&&(y+=j)}f=u[y]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},ut=Ce,et={id:"actions",install:function(n){n.usePlugin(de),n.usePlugin(ut),n.usePlugin(Ie),n.usePlugin(be)}},ft=0,rt={request:function(n){return We(n)},cancel:function(n){return N(n)},init:function(n){if(We=n.requestAnimationFrame,N=n.cancelAnimationFrame,!We)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];We=n["".concat(r,"RequestAnimationFrame")],N=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}We=We&&We.bind(n),N=N&&N.bind(n),We||(We=function(u){var f=Date.now(),y=Math.max(0,16-(f-ft)),b=n.setTimeout(function(){u(f+y)},y);return ft=f+y,b},N=function(u){return clearTimeout(u)})}},Se={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){Se.isScrolling=!0,rt.cancel(Se.i),n.autoScroll=Se,Se.interaction=n,Se.prevTime=Se.now(),Se.i=rt.request(Se.scroll)},stop:function(){Se.isScrolling=!1,Se.interaction&&(Se.interaction.autoScroll=null),rt.cancel(Se.i)},scroll:function(){var n=Se.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Ze(u.container,t,o),y=Se.now(),b=(y-Se.prevTime)/1e3,S=u.speed*b;if(S>=1){var j={x:Se.x*S,y:Se.y*S};if(j.x||j.y){var B=He(f);I.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var Q=He(f),we={x:Q.x-B.x,y:Q.y-B.y};(we.x||we.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:we,interaction:n,container:f})}Se.prevTime=y}Se.isScrolling&&(rt.cancel(Se.i),Se.i=rt.request(Se.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()&&Se.check(t.interactable,t.prepared.name))if(t.simulation)Se.x=Se.y=0;else{var r,u,f,y,b=t.interactable,S=t.element,j=t.prepared.name,B=b.options[j].autoScroll,Q=Ze(B.container,b,S);if(I.window(Q))y=o.clientX<Se.margin,r=o.clientY<Se.margin,u=o.clientX>Q.innerWidth-Se.margin,f=o.clientY>Q.innerHeight-Se.margin;else{var we=Oe(Q);y=o.clientX<we.left+Se.margin,r=o.clientY<we.top+Se.margin,u=o.clientX>we.right-Se.margin,f=o.clientY>we.bottom-Se.margin}Se.x=u?1:y?-1:0,Se.y=f?1:r?-1:0,Se.isScrolling||(Se.margin=B.margin,Se.speed=B.speed,Se.start(t))}}};function Ze(n,t,o){return(I.string(n)?tt(n,t,o):n)||z(o)}function He(n){return I.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var pt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Se,Se.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Se.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Se.stop(),Se.interaction&&(Se.interaction=null)},"interactions:stop":Se.stop,"interactions:action-move":function(n){return Se.onInteractionMove(n)}}},vt=pt;function Tt(n,t){var o=!1;return function(){return o||(G.console.warn(t),o=!0),n.apply(this,arguments)}}function It(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function wt(n){return I.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Dt(n){return I.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ot={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var y=function(b,S,j,B,Q){var we=b.getRect(B),je=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Pe={action:null,interactable:b,interaction:j,element:B,rect:we,buttons:je};return Q.fire("auto-start:check",Pe),Pe.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,y,this,f,u):y},t.prototype.ignoreFrom=Tt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Tt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Dt,t.prototype.styleCursor=wt}};function Bt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&qt(t,o,n,u)?n:null}function Ut(n,t,o,r,u,f,y){for(var b=0,S=r.length;b<S;b++){var j=r[b],B=u[b],Q=j.getAction(t,o,n,B);if(Q){var we=Bt(Q,j,B,f,y);if(we)return{action:we,interactable:j,element:B}}}return{action:null,interactable:null,element:null}}function Pt(n,t,o,r,u){var f=[],y=[],b=r;function S(B){f.push(B),y.push(b)}for(;I.element(b);){f=[],y=[],u.interactables.forEachMatch(b,S);var j=Ut(n,t,o,f,y,r,u);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;b=st(b)}return{action:null,interactable:null,element:null}}function Vt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,It(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,Dn(n,o),o.fire("autoStart:prepared",{interaction:n})}function qt(n,t,o,r){var u=n.options,f=u[o.name].max,y=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,j=0,B=0;if(!(f&&y&&b))return!1;for(var Q=0,we=r.interactions.list;Q<we.length;Q++){var je=we[Q],Pe=je.prepared.name;if(je.interacting()&&(++S>=b||je.interactable===n&&((j+=Pe===o.name?1:0)>=f||je.element===t&&(B++,Pe===o.name&&B>=y))))return!1}return b>0}function wn(n,t){return I.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function fn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function Dn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var y=o.options[u.name].cursorChecker;f=I.func(y)?y(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}fn(n.element,f||"",t)}else t.autoStart.cursorElement&&fn(t.autoStart.cursorElement,"",t)}var Sn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ot),o.base.actionChecker=null,o.base.styleCursor=!0,Z(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return wn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Vt(o,Pt(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Vt(u,Pt(u,f,y,b,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,y=u.prepared.name;y&&f&&(f.options[y].manualStart||!qt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),Dn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&fn(o.element,"",t)}},maxInteractions:wn,withinInteractionLimit:qt,validateAction:Bt},hn=Sn,Tn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var y=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,j=S.startAxis,B=y>b?"x":y<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?B[0]:S.lockAxis,B!=="xy"&&j!=="xy"&&j!==B){o.prepared.name=null;for(var Q=r,we=function(Pe){if(Pe!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&Pe.testIgnoreAllow(Ge,Q,r)){var it=Pe.getAction(o.downPointer,o.downEvent,o,Q);if(it&&it.name==="drag"&&function(ot,ht){if(!ht)return!1;var yt=ht.options.drag.startAxis;return ot==="xy"||yt==="xy"||yt===ot}(B,Pe)&&hn.validateAction(it,Pe,Q,r,t))return Pe}}};I.element(Q);){var je=t.interactables.forEachMatch(Q,we);if(je){o.prepared.name="drag",o.interactable=je,o.element=Q;break}Q=st(Q)}}}}}};function vn(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 In={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(hn),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=vn(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;vn(t)>0&&(t.prepared.name=null)}},getHoldDuration:vn},gn=In,Xn={id:"auto-start",install:function(n){n.usePlugin(hn),n.usePlugin(gn),n.usePlugin(Tn)}},Yn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):I.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Jn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var jn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Yn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var y=r.options.preventDefault;if(y!=="never")if(y!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=z(f.target).document,S=u.getDocOptions(b);if(!S||!S.events||S.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||I.element(f.target)&&q(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||ve(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Jn,n},{})};function Bn(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 mn(n){var t={};for(var o in n){var r=n[o];I.plainObject(r)?t[o]=mn(r):I.array(r)?t[o]=Ee(r):t[o]=r}return t}var zn=function(){function n(t){d(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=An(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return m(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,y=this.interaction,b=function(j){var B=j.interactable.options[j.prepared.name],Q=B.modifiers;return Q&&Q.length?Q:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(we){var je=B[we];return je&&je.enabled&&{options:je,methods:je._methods}}).filter(function(we){return!!we})}(y);this.prepareStates(b),this.startEdges=Z({},y.edges),this.edges=Z({},this.startEdges),this.startOffset=(r=y.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var S=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=An(),this.startAll(S),this.result=this.setAll(S)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,y=t.edges;t.coords=Z({},t.pageCoords),t.rect=Z({},f),t.edges=Z({},y);for(var b=u?this.states.slice(u):this.states,S=An(t.coords,t.rect),j=0;j<b.length;j++){var B,Q=b[j],we=Q.options,je=Z({},t.coords),Pe=null;(B=Q.methods)!=null&&B.set&&this.shouldDo(we,r,o)&&(t.state=Q,Pe=Q.methods.set(t),le(t.edges,t.rect,{x:t.coords.x-je.x,y:t.coords.y-je.y})),S.eventProps.push(Pe)}Z(this.edges,t.edges),S.delta.x=t.coords.x-t.pageCoords.x,S.delta.y=t.coords.y-t.pageCoords.y,S.rectDelta.left=t.rect.left-f.left,S.rectDelta.right=t.rect.right-f.right,S.rectDelta.top=t.rect.top-f.top,S.rectDelta.bottom=t.rect.bottom-f.bottom;var Ge=this.result.coords,it=this.result.rect;if(Ge&&it){var ot=S.rect.left!==it.left||S.rect.right!==it.right||S.rect.top!==it.top||S.rect.bottom!==it.bottom;S.changed=ot||Ge.x!==S.coords.x||Ge.y!==S.coords.y}return S}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,y=this.result,b=this.startDelta,S=y.delta;r==="start"&&Z(this.startDelta,y.delta);for(var j=0,B=[[f,b],[u,S]];j<B.length;j++){var Q=B[j],we=Q[0],je=Q[1];we.page.x+=je.x,we.page.y+=je.y,we.client.x+=je.x,we.client.y+=je.y}var Pe=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=Pe.left,Ge.right+=Pe.right,Ge.top+=Pe.top,Ge.bottom+=Pe.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,y=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=y,!y.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,S={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};y.coords.x+=S.x,y.coords.y+=S.y,y.delta.x+=S.x,y.delta.y+=S.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,y=0;y<u.length;y++){var b=u[y];t.state=b;var S=b.options,j=b.methods,B=j.beforeEnd&&j.beforeEnd(t);if(B)return this.endResult=B,!1;f=f||!f&&this.shouldDo(S,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=Z({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var y=f[u];r.state=y,y.methods.stop&&y.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,y=r.name;this.states.push({options:u,methods:f,index:o,name:y})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var y=f.startDelta,b=f.result,S=b.delta,j=b.rectDelta,B=0,Q=[[r.start,y],[r.cur,S]];B<Q.length;B++){var we=Q[B],je=we[0],Pe=we[1];je.page.x-=Pe.x,je.page.y-=Pe.y,je.client.x-=Pe.x,je.client.y-=Pe.y}u.left-=j.left,u.right-=j.right,u.top-=j.top,u.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return mn(o)}),this.result=An(Z({},t.result.coords),Z({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function An(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 an(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var y=f||{};for(var b in y.enabled=y.enabled!==!1,o)b in y||(y[b]=o[b]);var S={options:y,methods:r,name:t,enable:function(){return y.enabled=!0,S},disable:function(){return y.enabled=!1,S}};return S};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function Cn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var kt={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new zn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":Cn,"interactions:action-move":Cn,"interactions:action-end":Cn,"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)}}},Jt=kt,gt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Qn=function(n){D(o,n);var t=H(o);function o(r,u,f,y,b,S,j){var B;d(this,o),(B=t.call(this,r)).relatedTarget=null,B.screenX=void 0,B.screenY=void 0,B.button=void 0,B.buttons=void 0,B.ctrlKey=void 0,B.shiftKey=void 0,B.altKey=void 0,B.metaKey=void 0,B.page=void 0,B.client=void 0,B.delta=void 0,B.rect=void 0,B.x0=void 0,B.y0=void 0,B.t0=void 0,B.dt=void 0,B.duration=void 0,B.clientX0=void 0,B.clientY0=void 0,B.velocity=void 0,B.speed=void 0,B.swipe=void 0,B.axes=void 0,B.preEnd=void 0,b=b||r.element;var Q=r.interactable,we=(Q&&Q.options||gt).deltaSource,je=re(Q,b,f),Pe=y==="start",Ge=y==="end",it=Pe?O(B):r.prevEvent,ot=Pe?r.coords.start:Ge?{page:it.page,client:it.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return B.page=Z({},ot.page),B.client=Z({},ot.client),B.rect=Z({},r.rect),B.timeStamp=ot.timeStamp,Ge||(B.page.x-=je.x,B.page.y-=je.y,B.client.x-=je.x,B.client.y-=je.y),B.ctrlKey=u.ctrlKey,B.altKey=u.altKey,B.shiftKey=u.shiftKey,B.metaKey=u.metaKey,B.button=u.button,B.buttons=u.buttons,B.target=b,B.currentTarget=b,B.preEnd=S,B.type=j||f+(y||""),B.interactable=Q,B.t0=Pe?r.pointers[r.pointers.length-1].downTime:it.t0,B.x0=r.coords.start.page.x-je.x,B.y0=r.coords.start.page.y-je.y,B.clientX0=r.coords.start.client.x-je.x,B.clientY0=r.coords.start.client.y-je.y,B.delta=Pe||Ge?{x:0,y:0}:{x:B[we].x-it[we].x,y:B[we].y-it[we].y},B.dt=r.coords.delta.timeStamp,B.duration=B.timeStamp-B.t0,B.velocity=Z({},r.coords.velocity[we]),B.speed=dt(B.velocity.x,B.velocity.y),B.swipe=Ge||y==="inertiastart"?B.getSwipe():null,B}return m(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,y=202.5<=u&&u<337.5;return{up:y,down:!y&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(_e);Object.defineProperties(Qn.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 Mt=m(function n(t,o,r,u,f){d(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=r,this.downTime=u,this.downTarget=f}),yn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Nn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),on=0,Vn=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Tt(function(B){this.move(B)},"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=on++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var y=function(B){Object.defineProperty(o._proxy,B,{get:function(){return f[B]}})};for(var b in yn)y(b);var S=function(B){Object.defineProperty(o._proxy,B,{value:function(){return f[B].apply(f,arguments)}})};for(var j in Nn)S(j);this._scopeFire("interactions:new",{interaction:this})}return m(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(It(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?Z({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,y=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(u,f)>this.pointerMoveTolerance);var b,S,j,B=this.getPointerIndex(t),Q={pointer:t,pointerIndex:B,pointerInfo:this.pointers[B],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:y,interaction:this};y||(b=this.coords.velocity,S=this.coords.delta,j=Math.max(S.timeStamp/1e3,.001),b.page.x=S.page.x/j,b.page.y=S.page.y/j,b.client.x=S.client.x/j,b.client.y=S.client.y/j,b.timeStamp=j),this._scopeFire("interactions:move",Q),y||this.simulation||(this.interacting()&&(Q.type=null,this.move(Q)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||J(this.coords.delta),(t=Z({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var y=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(y),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:y,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=R(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:P(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,y,b,S=R(t),j=this.getPointerIndex(t),B=this.pointers[j];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),B?B.pointer=t:(B=new Mt(S,t,o,null,null),j=this.pointers.length,this.pointers.push(B)),pe(this.coords.cur,this.pointers.map(function(Q){return Q.pointer}),this._now()),f=this.coords.delta,y=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-y.page.x,f.page.y=b.page.y-y.page.y,f.client.x=b.client.x-y.client.x,f.client.y=b.client.y-y.client.y,f.timeStamp=b.timeStamp-y.timeStamp,u&&(this.pointerIsDown=!0,B.downTime=this.coords.cur.timeStamp,B.downTarget=r,C(this.downPointer,t),this.interacting()||(U(this.coords.start,this.coords.cur),U(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:B,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new Qn(this,t,this.prepared.name,o,this.element,r,u)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,r=t.phase,u=t.preEnd,f=t.type,y=this.rect;if(y&&r==="move"&&(le(this.edges,y,this.coords.delta[this.interactable.options.deltaSource]),y.width=y.right-y.left,y.height=y.bottom-y.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Zt(n){Kn(n.interaction)}function Kn(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return zt(n.coords.cur,t),zt(n.coords.delta,t),le(n.edges,n.rect,t),t.x=0,t.y=0,!0}function bn(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 zt(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}Nn.offsetBy="";var Gt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=bn},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&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Zt,"interactions:before-action-move":Zt,"interactions:before-action-end":function(n){var t=n.interaction;if(Kn(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}}},ln=Gt,Ct=function(){function n(t){d(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return m(n,[{key:"start",value:function(t){var o=this.interaction,r=At(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=dt(u.x,u.y),y=this.modification||(this.modification=new zn(o));if(y.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(y.result=y.setAll(this.modifierArg),!y.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,r=At(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var y=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},y.result=y.setAll(b),y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+y.result.delta.x,y:this.targetOffset.y+y.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=rt.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,y,b,S=this,j=this.interaction,B=At(j).resistance,Q=(j._now()-this.t0)/1e3;if(Q<this.te){var we,je=1-(Math.exp(-B*Q)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,y=this.modifiedOffset.y,we={x:Ht(b=je,t,r,f),y:Ht(b,o,u,y)}):we={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var Pe={x:we.x-this.currentOffset.x,y:we.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,j.offsetBy(Pe),j.move(),this.onNextFrame(function(){return S.inertiaTick()})}else j.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=At(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},y={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=y.x,this.currentOffset.y+=y.y,o.offsetBy(y),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),U(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rt.cancel(this.timeout)}}]),n}();function At(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Wt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(ln),n.usePlugin(Jt),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 Ct(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;I.element(u);){if(u===t.element){r.resume(n);break}u=st(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":Cn,"interactions:action-inertiastart":Cn,"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 Ht(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function $t(n,t,o,r){return-o*(n/=r)*(n-2)+t}var cn=Wt;function rn(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var Un=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=Z({},t||{})}return m(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&rn(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&rn(t,o)}},{key:"on",value:function(t,o){var r=Te(t,o);for(t in r)this.types[t]=fe(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Te(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,y=r[t];f<y.length;f++){var b=y[f],S=u.indexOf(b);S!==-1&&u.splice(S,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Zn=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return m(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Wn(n){return I.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function ea(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Na={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:y,remove:b,addDelegate:function(B,Q,we,je,Pe){var Ge=Wn(Pe);if(!r[we]){r[we]=[];for(var it=0;it<u.length;it++){var ot=u[it];y(ot,we,S),y(ot,we,j,!0)}}var ht=r[we],yt=he(ht,function(_t){return _t.selector===B&&_t.context===Q});yt||(yt={selector:B,context:Q,listeners:[]},ht.push(yt)),yt.listeners.push({func:je,options:Ge})},removeDelegate:function(B,Q,we,je,Pe){var Ge,it=Wn(Pe),ot=r[we],ht=!1;if(ot)for(Ge=ot.length-1;Ge>=0;Ge--){var yt=ot[Ge];if(yt.selector===B&&yt.context===Q){for(var _t=yt.listeners,mt=_t.length-1;mt>=0;mt--){var xt=_t[mt];if(xt.func===je&&ea(xt.options,it)){_t.splice(mt,1),_t.length||(ot.splice(Ge,1),b(Q,we,S),b(Q,we,j,!0)),ht=!0;break}}if(ht)break}}},delegateListener:S,delegateUseCapture:j,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function y(B,Q,we,je){if(B.addEventListener){var Pe=Wn(je),Ge=he(o,function(it){return it.eventTarget===B});Ge||(Ge={eventTarget:B,events:{}},o.push(Ge)),Ge.events[Q]||(Ge.events[Q]=[]),he(Ge.events[Q],function(it){return it.func===we&&ea(it.options,Pe)})||(B.addEventListener(Q,we,f.supportsOptions?Pe:Pe.capture),Ge.events[Q].push({func:we,options:Pe}))}}function b(B,Q,we,je){if(B.addEventListener&&B.removeEventListener){var Pe=P(o,function(tn){return tn.eventTarget===B}),Ge=o[Pe];if(Ge&&Ge.events)if(Q!=="all"){var it=!1,ot=Ge.events[Q];if(ot){if(we==="all"){for(var ht=ot.length-1;ht>=0;ht--){var yt=ot[ht];b(B,Q,yt.func,yt.options)}return}for(var _t=Wn(je),mt=0;mt<ot.length;mt++){var xt=ot[mt];if(xt.func===we&&ea(xt.options,_t)){B.removeEventListener(Q,we,f.supportsOptions?_t:_t.capture),ot.splice(mt,1),ot.length===0&&(delete Ge.events[Q],it=!0);break}}}it&&!Object.keys(Ge.events).length&&o.splice(Pe,1)}else for(Q in Ge.events)Ge.events.hasOwnProperty(Q)&&b(B,Q,"all")}}function S(B,Q){for(var we=Wn(Q),je=new Zn(B),Pe=r[B.type],Ge=X(B)[0],it=Ge;I.element(it);){for(var ot=0;ot<Pe.length;ot++){var ht=Pe[ot],yt=ht.selector,_t=ht.context;if(q(it,yt)&&ve(_t,Ge)&&ve(_t,it)){var mt=ht.listeners;je.currentTarget=it;for(var xt=0;xt<mt.length;xt++){var tn=mt[xt];ea(tn.options,we)&&tn.func(je)}}}it=st(it)}}function j(B){return S(B,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},ca={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=ca.methodOrder;t<o.length;t++){var r=o[t],u=ca[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,y=u.interactions.list;f<y.length;f++){var b=y[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=st(S)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var y=0,b=f.interactions.list;y<b.length;y++){var S=b[y];if(S.pointerType===r){if(S.simulation&&!ba(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var j=0,B=f.interactions.list;j<B.length;j++){var Q=B[j];if(!(Q.pointerType!==r||/down/i.test(u)&&Q.simulation))return Q}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ba(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ba(n,t){return n.pointers.some(function(o){return o.id===t})}var ua=ca,kn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ta(n,t){return function(o){var r=t.interactions.list,u=oe(o),f=X(o),y=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,B=o.changedTouches;j<B.length;j++){var Q=B[j],we={pointer:Q,pointerId:R(Q),pointerType:u,eventType:o.type,eventTarget:y,curEventTarget:b,scope:t},je=pa(we);S.push([we.pointer,we.eventTarget,we.curEventTarget,je])}}else{var Pe=!1;if(!te.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<r.length&&!Pe;Ge++)Pe=r[Ge].pointerType!=="mouse"&&r[Ge].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var it={pointer:o,pointerId:R(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:y,scope:t},ot=pa(it);S.push([it.pointer,it.eventTarget,it.curEventTarget,ot])}}for(var ht=0;ht<S.length;ht++){var yt=S[ht],_t=yt[0],mt=yt[1],xt=yt[2];yt[3][n](_t,o,mt,xt)}}}function pa(n){var t=n.pointerType,o=n.scope,r={interaction:ua.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function sn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,y=r.events,b=y[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),y.delegatedEvents)b(o,S,y.delegateListener),b(o,S,y.delegateUseCapture,!0);for(var j=u&&u.events,B=0;B<f.length;B++){var Q=f[B];b(o,Q.type,Q.listener,j)}}var Va={id:"core/interactions",install:function(n){for(var t={},o=0;o<kn.length;o++){var r=kn[o];t[r]=ta(r,n)}var u,f=te.pEventTypes;function y(){for(var b=0,S=n.interactions.list;b<S.length;b++){var j=S[b];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var B=function(){var je=we[Q];n.documents.some(function(Pe){return ve(Pe.doc,je.downTarget)})||j.removePointer(je.pointer,je.event)},Q=0,we=j.pointers;Q<we.length;Q++)B()}}(u=_.PointerEvent?[{type:f.down,listener:y},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:y},{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(b){for(var S=0,j=n.interactions.list;S<j.length;S++)j[S].documentBlur(b)}}),n.prevTouchTime=0,n.Interaction=function(b){D(j,b);var S=H(j);function j(){return d(this,j),S.apply(this,arguments)}return m(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(B){n.interactions.pointerMoveTolerance=B}},{key:"_now",value:function(){return n.now()}}]),j}(Vn),n.interactions={list:[],new:function(b){b.scopeFire=function(j,B){return n.fire(j,B)};var S=new n.Interaction(b);return n.interactions.list.push(S),S},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(jn)},listeners:{"scope:add-document":function(n){return sn(n,"add")},"scope:remove-document":function(n){return sn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:sn,doOnInteractions:ta,methodNames:kn},Hn=Va,qn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(qn||{}),tr=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Un,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||r,this._win=z(lt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return m(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return I.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),I.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),I.func(o.onend)&&this.on("".concat(t,"end"),o.onend),I.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,y=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(y==null||y(S))&&Bn(S,f._actions)};(I.array(o)||I.object(o))&&this._onOff(qn.Off,t,o,void 0,b),(I.array(r)||I.object(r))&&this._onOff(qn.On,t,r,void 0,b)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,y=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,y.listeners,b),I.array(b)?y[f]=Ee(b):I.plainObject(b)?(y[f]=Z(y[f]||{},mn(b)),I.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(y[f].enabled=b.enabled!==!1)):I.bool(b)&&I.object(r.perAction[f])?y[f].enabled=b:y[f]=b}}},{key:"getRect",value:function(t){return t=t||(I.element(this.target)?this.target:null),I.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ye(t)}},{key:"rectChecker",value:function(t){var o=this;return I.func(t)?(this.getRect=function(r){var u=Z({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(lt(o)||I.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return I.string(t)?Array.from(this._context.querySelectorAll(t)):I.func(t)&&t.getAllElements?t.getAllElements():I.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ve(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!I.element(r)&&(I.string(t)?xe(r,t,o):!!I.element(t)&&ve(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!I.element(r))&&(I.string(t)?xe(r,t,o):!!I.element(t)&&ve(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){I.object(o)&&!I.array(o)&&(u=r,r=null);var y=Te(o,r,f);for(var b in y){b==="wheel"&&(b=te.wheelEvent);for(var S=0,j=y[b];S<j.length;S++){var B=j[S];Bn(b,this._actions)?this.events[t===qn.On?"on":"off"](b,B):I.string(this.target)?this._scopeEvents[t===qn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,B,u):this._scopeEvents[t===qn.On?"add":"remove"](this.target,b,B,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(qn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(qn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in I.object(t)||(t={}),this.options=mn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,Z(Z({},o.perAction),o.actions[u])),this[f](t[u])}for(var y in t)y!=="getRect"?I.func(this[y])&&this[y](t[y]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(I.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,y=u.context,b=u.listeners;f===this.target&&y===this._context&&o.splice(r,1);for(var S=b.length-1;S>=0;S--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[S][0],b[S][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),nr=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,y=I.string(f)?o.selectorMap[f]:f[o.scope.id],b=P(y,function(S){return S===u});y.splice(b,1)}})}return m(n,[{key:"new",value:function(t,o){o=Z(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),I.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=I.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return he(f,function(y){return y._context===r&&(u||y.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],y=void 0;if((I.string(f.target)?I.element(t)&&q(t,f.target):t===f.target)&&f.inContext(t)&&(y=o(f)),y!==void 0)return y}}}]),n}(),ar=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=te,this.defaults=mn(gt),this.Eventable=Un,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(y,b){var S=r.interactables.getExisting(y,b);return S||((S=r.interactables.new(y,b)).events.global=f.globalEvents),S};return u.getPointerAverage=Y,u.getTouchBBox=ie,u.getTouchDistance=ge,u.getTouchAngle=$,u.getElementRect=Ye,u.getElementClientRect=Oe,u.matchesSelector=q,u.closest=Ue,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,y){return this.scope.usePlugin(f,y),this},u.isSet=function(f,y){return!!this.scope.interactables.get(f,y&&y.context)},u.on=Tt(function(f,y,b){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var S=0,j=f;S<j.length;S++){var B=j[S];this.on(B,y,b)}return this}if(I.object(f)){for(var Q in f)this.on(Q,f[Q],y);return this}return Bn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(y):this.globalEvents[f]=[y]:this.scope.events.add(this.scope.document,f,y,{options:b}),this},"The interact.on() method is being deprecated"),u.off=Tt(function(f,y,b){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var S=0,j=f;S<j.length;S++){var B=j[S];this.off(B,y,b)}return this}if(I.object(f)){for(var Q in f)this.off(Q,f[Q],y);return this}var we;return Bn(f,this.scope.actions)?f in this.globalEvents&&(we=this.globalEvents[f].indexOf(y))!==-1&&this.globalEvents[f].splice(we,1):this.scope.events.remove(this.scope.document,f,y,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return te.supportsTouch},u.supportsPointerEvent=function(){return te.supportsPointerEvent},u.stop=function(){for(var f=0,y=this.scope.interactions.list;f<y.length;f++)y[f].stop();return this},u.pointerMoveTolerance=function(f){return I.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,y){this.scope.addDocument(f,y)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Qn,this.Interactable=void 0,this.interactables=new nr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){D(f,r);var u=H(f);function f(){return d(this,f),u.apply(this,arguments)}return m(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(y){return V(E(f.prototype),"set",this).call(this,y),o.fire("interactable:set",{options:y,interactable:this}),this}},{key:"unset",value:function(){V(E(f.prototype),"unset",this).call(this);var y=o.interactables.list.indexOf(this);y<0||(o.interactables.list.splice(y,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(tr)}return m(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,I.window(r)&&w(r),_.init(r),te.init(r),rt.init(r),o.window=r,o.document=r.document,o.usePlugin(Hn),o.usePlugin(Na),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var r=0,u=this.listenerMaps.length,f=t.before.reduce(function(b,S){return b[S]=!0,b[wo(S)]=!0,b},{});r<u;r++){var y=this.listenerMaps[r].id;if(y&&(f[y]||f[wo(y)]))break}this.listenerMaps.splice(r,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var r=z(t);o=o?Z({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=z(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function wo(n){return n&&n.replace(/\/.*$/,"")}var Do=new ar,en=Do.interactStatic,or=typeof globalThis<"u"?globalThis:window;Do.init(or);var lr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,y=n.limits,b=y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:y,S=n.offset,j=S===void 0?{x:0,y:0}:S,B={range:f,grid:n,x:null,y:null},Q=0;Q<t.length;Q++){var we=t[Q],je=we[0],Pe=we[1],Ge=Math.round((r-j.x)/n[je]),it=Math.round((u-j.y)/n[Pe]);B[je]=Math.max(b.left,Math.min(b.right,Ge*n[je]+j.x)),B[Pe]=Math.max(b.top,Math.min(b.bottom,it*n[Pe]+j.y))}return B};return o.grid=n,o.coordFields=t,o}}),rr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=Z(t.snappers||{},lr),t.createSnapGrid=t.snappers.grid}},ir=rr,sr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,y=f.ratio,b=f.enabled,S=t.options,j=S.equalDelta,B=S.modifiers;y==="preserve"&&(y=o.width/o.height),t.startCoords=Z({},u),t.startRect=Z({},o),t.ratio=y,t.equalDelta=j;var Q=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var we=(Q.left?1:-1)*(Q.top?1:-1);t.edgeSign={x:we,y:we}}else t.edgeSign={x:Q.left?-1:1,y:Q.top?-1:1};if(b!==!1&&Z(r,Q),B!=null&&B.length){var je=new zn(n.interaction);je.copyFrom(n.interaction.modification),je.prepareStates(B),t.subModification=je,je.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=Z({},r),y=t.equalDelta?cr:ur;if(Z(n.edges,u),y(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=Z({},o);le(u,b,{x:r.x-f.x,y:r.y-f.y});var S=t.subModification.setAll(l(l({},n),{},{rect:b,edges:u,pageCoords:r,prevCoords:r,prevRect:b})),j=S.delta;return S.changed&&(y(t,Math.abs(j.x)>Math.abs(j.y),S.coords,S.rect),Z(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function cr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function ur(n,t,o,r){var u=n.startRect,f=n.startCoords,y=n.ratio,b=n.edgeSign;if(t){var S=r.width/y;o.y=f.y+(S-u.height)*b.y}else{var j=r.height*y;o.x=f.x+(j-u.width)*b.x}}var pr=an(sr,"aspectRatio"),Co=function(){};Co._defaults={};var Oa=Co;function na(n,t,o){return I.func(n)?at(n,t.interactable,t.element,[o.x,o.y,t]):at(n,t.interactable,t.element)}var Ma={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,y=r.options,b=y.elementRect,S=Z({left:0,top:0,right:0,bottom:0},y.offset||{});if(t&&b){var j=na(y.restriction,u,f);if(j){var B=j.right-j.left-t.width,Q=j.bottom-j.top-t.height;B<0&&(S.left+=B,S.right+=B),Q<0&&(S.top+=Q,S.bottom+=Q)}S.left+=o.left-t.width*b.left,S.top+=o.top-t.height*b.top,S.right+=o.right-t.width*(1-b.right),S.bottom+=o.bottom-t.height*(1-b.bottom)}r.offset=S},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,y=na(u.restriction,o,t);if(y){var b=function(S){return!S||"left"in S&&"top"in S||((S=Z({},S)).left=S.x||0,S.top=S.y||0,S.right=S.right||S.left+S.width,S.bottom=S.bottom||S.top+S.height),S}(y);t.x=Math.max(Math.min(b.right-f.right,t.x),b.left+f.left),t.y=Math.max(Math.min(b.bottom-f.bottom,t.y),b.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},dr=an(Ma,"restrict"),Eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function So(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var ka={noInner:Eo,noOuter:_o,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Le(na(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,y=u.options;if(o){var b=Z({},t),S=na(y.inner,r,b)||{},j=na(y.outer,r,b)||{};So(S,Eo),So(j,_o),o.top?t.y=Math.min(Math.max(j.top+f.top,b.y),S.top+f.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+f.bottom,b.y),S.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(j.left+f.left,b.x),S.left+f.left):o.right&&(t.x=Math.max(Math.min(j.right+f.right,b.x),S.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},fr=an(ka,"restrictEdges"),hr=Z({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),vr=an({start:Ma.start,set:Ma.set,defaults:hr},"restrictRect"),gr={width:-1/0,height:-1/0},mr={width:1/0,height:1/0},yr=an({start:function(n){return ka.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var y=ce(na(f.min,t,n.coords))||gr,b=ce(na(f.max,t,n.coords))||mr;o.options={endOnly:f.endOnly,inner:Z({},ka.noInner),outer:Z({},ka.noOuter)},u.top?(o.options.inner.top=r.bottom-y.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+y.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-y.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+y.width,o.options.outer.right=r.left+b.width),ka.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),io={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,y=n.state,b=n.startOffset,S=y.options,j=S.offsetWithOrigin?function(we){var je=we.interaction.element,Pe=Le(at(we.state.options.origin,null,null,[je])),Ge=Pe||re(we.interactable,je,we.interaction.prepared.name);return Ge}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var B=at(S.offset,r,u,[o]);(t=Le(B)||{x:0,y:0}).x+=j.x,t.y+=j.y}var Q=S.relativePoints;y.offsets=f&&Q&&Q.length?Q.map(function(we,je){return{index:je,relativePoint:we,x:b.left-f.width*we.x+t.x,y:b.top-f.height*we.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,y=re(t.interactable,t.element,t.prepared.name),b=Z({},o),S=[];u.offsetWithOrigin||(b.x-=y.x,b.y-=y.y);for(var j=0,B=f;j<B.length;j++)for(var Q=B[j],we=b.x-Q.x,je=b.y-Q.y,Pe=0,Ge=u.targets.length;Pe<Ge;Pe++){var it=u.targets[Pe],ot=void 0;(ot=I.func(it)?it(we,je,t._proxy,Q,Pe):it)&&S.push({x:(I.number(ot.x)?ot.x:we)+Q.x,y:(I.number(ot.y)?ot.y:je)+Q.y,range:I.number(ot.range)?ot.range:u.range,source:it,index:Pe,offset:Q})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},yt=0;yt<S.length;yt++){var _t=S[yt],mt=_t.range,xt=_t.x-b.x,tn=_t.y-b.y,Kt=dt(xt,tn),un=Kt<=mt;mt===1/0&&ht.inRange&&ht.range!==1/0&&(un=!1),ht.target&&!(un?ht.inRange&&mt!==1/0?Kt/mt<ht.distance/ht.range:mt===1/0&&ht.range!==1/0||Kt<ht.distance:!ht.inRange&&Kt<ht.distance)||(ht.target=_t,ht.distance=Kt,ht.range=mt,ht.inRange=un,ht.delta.x=xt,ht.delta.y=tn)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),r.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},br=an(io,"snap"),za={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],io.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,y={x:r.x-f[0].x,y:r.y-f[0].y};o.options=Z({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var j=S[b],B=void 0;if(B=I.func(j)?j(y.x,y.y,t):j){for(var Q=0,we=o.targetFields;Q<we.length;Q++){var je=we[Q],Pe=je[0],Ge=je[1];if(Pe in B||Ge in B){B.x=B[Pe],B.y=B[Ge];break}}o.options.targets.push(B)}}var it=io.set(n);return o.options=u,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},kr=an(za,"snapSize"),so={aspectRatio:pr,restrictEdges:fr,restrict:dr,restrictRect:vr,restrictSize:yr,snapEdges:an({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],za.start(n)):null},set:za.set,defaults:Z(mn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:br,snapSize:kr,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},xr={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Jt),n.usePlugin(ir),t.modifiers=so,so){var r=so[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},wr=xr,To=function(n){D(o,n);var t=H(o);function o(r,u,f,y,b,S){var j;if(d(this,o),C(O(j=t.call(this,b)),f),f!==u&&C(O(j),u),j.timeStamp=S,j.originalEvent=f,j.type=r,j.pointerId=R(u),j.pointerType=oe(u),j.target=y,j.currentTarget=null,r==="tap"){var B=b.getPointerIndex(u);j.dt=j.timeStamp-b.pointers[B].downTime;var Q=j.timeStamp-b.tapTime;j.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===j.target&&Q<500}else r==="doubletap"&&(j.dt=u.timeStamp-b.tapTime,j.double=!0);return j}return m(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(_e),xa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=xa,n.defaults.actions.pointerEvents=xa.defaults,Z(n.actions.phaselessTypes,xa.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&co(n),Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget,S=o.pointerIndex,j=u.pointers[S].hold,B=qe(b),Q={interaction:u,pointer:f,event:y,eventTarget:b,type:"hold",targets:[],path:B,node:null},we=0;we<B.length;we++){var je=B[we];Q.node=je,r.fire("pointerEvents:collect-targets",Q)}if(Q.targets.length){for(var Pe=1/0,Ge=0,it=Q.targets;Ge<it.length;Ge++){var ot=it[Ge].eventable.options.holdDuration;ot<Pe&&(Pe=ot)}j.duration=Pe,j.timeout=setTimeout(function(){Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"hold"},r)},Pe)}})(n,t),Gn(n,t)},"interactions:up":function(n,t){co(n),Gn(n,t),function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerWasMoved||Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){co(n),Gn(n,t)}},PointerEvent:To,fire:Gn,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 Gn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=n.targets,S=b===void 0?Io(n,t):b,j=new To(y,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var B={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:y,pointerEvent:j},Q=0;Q<S.length;Q++){var we=S[Q];for(var je in we.props||{})j[je]=we.props[je];var Pe=re(we.eventable,we.node);if(j._subtractOrigin(Pe),j.eventable=we.eventable,j.currentTarget=we.node,we.eventable.fire(j),j._addOrigin(Pe),j.immediatePropagationStopped||j.propagationStopped&&Q+1<S.length&&S[Q+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",B),y==="tap"){var Ge=j.double?Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):j;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return j}function Io(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(y==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var j=qe(f),B={interaction:o,pointer:r,event:u,eventTarget:f,type:y,path:j,targets:[],node:null},Q=0;Q<j.length;Q++){var we=j[Q];B.node=we,t.fire("pointerEvents:collect-targets",B)}return y==="hold"&&(B.targets=B.targets.filter(function(je){var Pe,Ge;return je.eventable.options.holdDuration===((Pe=o.pointers[b])==null||(Ge=Pe.hold)==null?void 0:Ge.duration)})),B.targets}function co(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Dr=Object.freeze({__proto__:null,default:xa});function Cr(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Er={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(xa);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)]=Cr,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var y=f[0].eventable.options.holdRepeatInterval;y<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},y))}}})},_r=Er,Sr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return Z(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(y){var b=y.events,S=b.options;b.types[u]&&b.types[u].length&&y.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:y}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;Z(o.events.options,t.pointerEvents.defaults),Z(o.events.options,r.pointerEvents||{})}}},Tr=Sr,Ir={id:"pointer-events",install:function(n){n.usePlugin(Dr),n.usePlugin(_r),n.usePlugin(Tr)}},Br=Ir,Ar={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var y=r.getAllElements(),b=f.window.Promise,S=b?[]:null,j=function(){var Q=y[B],we=r.getRect(Q);if(!we)return 1;var je,Pe=he(f.interactions.list,function(ot){return ot.interacting()&&ot.interactable===r&&ot.element===Q&&ot.prepared.name===u.name});if(Pe)Pe.move(),S&&(je=Pe._reflowPromise||new b(function(ot){Pe._reflowResolve=ot}));else{var Ge=ce(we),it=function(ot){return{coords:ot,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:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:f.now()});je=function(ot,ht,yt,_t,mt){var xt=ot.interactions.new({pointerType:"reflow"}),tn={interaction:xt,event:mt,pointer:mt,eventTarget:yt,phase:"reflow"};xt.interactable=ht,xt.element=yt,xt.prevEvent=mt,xt.updatePointer(mt,mt,yt,!0),J(xt.coords.delta),It(xt.prepared,_t),xt._doPhase(tn);var Kt=ot.window,un=Kt.Promise,En=un?new un(function(Rn){xt._reflowResolve=Rn}):void 0;return xt._reflowPromise=En,xt.start(_t,ht,yt),xt._interacting?(xt.move(tn),xt.end(mt)):(xt.stop(),xt._reflowResolve()),xt.removePointer(mt,mt),En}(f,r,Q,u,it)}S&&S.push(je)},B=0;B<y.length&&!j();B++);return S&&b.all(S).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Nr=Ar;if(en.use(jn),en.use(ln),en.use(Br),en.use(cn),en.use(wr),en.use(Xn),en.use(et),en.use(vt),en.use(Nr),en.default=en,c(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Ea,Ea.exports)),Ea.exports}var ed=Zp();const Qo=Ne.getDefaultExportFromCjs(ed),ao=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:s,emit:i}){const l=a,c=i,d=e.inject(Rl),x=e.inject(Ll);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const m=e.shallowRef(null),h=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let D=!1,E=!1,T=NaN,O=NaN,H=NaN,V=NaN,ke=-1,W=-1,K=-1,G=-1,w=l.x,z=l.y,k=l.w,A=l.h;const I=e.ref(),se=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:I,calcXY:at});function $e(v){Te(v)}function nt(){Xe()}function Ie(v){pn(l.isDraggable)&&(h.draggable=v)}function ze(v){pn(l.isResizable)&&(h.resizable=v)}function ue(v){pn(l.isBounded)&&(h.bounded=v)}function _(v){h.transformScale=v}function ne(v){h.rowHeight=v}function te(v){h.maxRows=v}function ve(){h.rtl=Yo()==="rtl",Xe()}function Ue(v){h.cols=Math.floor(v)}d.increaseItem(se),e.onBeforeMount(()=>{h.rtl=Yo()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Kl(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,pn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,pn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,pn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{w=l.x,z=l.y,A=l.h,k=l.w,nn(Ye)}),x.on("updateWidth",$e),x.on("compact",nt),x.on("setDraggable",Ie),x.on("setResizable",ze),x.on("setBounded",ue),x.on("setTransformScale",_),x.on("setRowHeight",ne),x.on("setMaxRows",te),x.on("directionchange",ve),x.on("setColNum",Ue)}),e.onBeforeUnmount(()=>{x.off("updateWidth",$e),x.off("compact",nt),x.off("setDraggable",Ie),x.off("setResizable",ze),x.off("setBounded",ue),x.off("setTransformScale",_),x.off("setRowHeight",ne),x.off("setMaxRows",te),x.off("directionchange",ve),x.off("setColNum",Ue),m.value&&(m.value.unset(),m.value=null),d.decreaseItem(se)}),s({state:h,wrapper:I});const st=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,q=e.computed(()=>h.resizable&&!l.static),M=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),ye=e.computed(()=>(h.draggable||h.resizable)&&!l.static),xe=Wp("item"),Re=e.computed(()=>({[xe.b()]:!0,[xe.bm("resizable")]:q.value,[xe.bm("static")]:l.static,[xe.bm("resizing")]:h.isResizing,[xe.bm("dragging")]:h.isDragging,[xe.bm("transform")]:h.useCssTransforms,[xe.bm("rtl")]:M.value,[xe.bm("no-touch")]:st&&ye.value})),Oe=e.computed(()=>[xe.be("resizer"),M.value&&xe.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,v=>{h.draggable=v}),e.watch(()=>l.static,()=>{nn(C),nn(J)}),e.watch(()=>h.draggable,()=>{nn(C)}),e.watch(()=>l.isResizable,v=>{h.resizable=v}),e.watch(()=>l.isBounded,v=>{h.bounded=v}),e.watch(()=>h.resizable,()=>{nn(J)}),e.watch(()=>h.rowHeight,()=>{nn(Ye),nn(qe)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{nn(J),nn(Ye),nn(qe)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(J)}),e.watch(M,()=>{nn(J),nn(Ye)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const v=d.margin;!v||v[0]===h.margin[0]&&v[1]===h.margin[1]||(h.margin=v.map(Number),nn(Ye),nn(qe))});function Ye(){l.x+l.w>h.cols?(w=0,k=l.w>h.cols?h.cols:l.w):(w=l.x,k=l.w);const v=tt(w,z,k,A);h.isDragging&&(v.top=h.dragging.top,M.value?v.right=h.dragging.left:v.left=h.dragging.left),h.isResizing&&(v.width=h.resizing.width,v.height=h.resizing.height);let F;h.useCssTransforms?M.value?F=$p(v.top,v.right,v.width,v.height):F=Fp(v.top,v.left,v.width,v.height):M.value?F=Kp(v.top,v.right,v.width,v.height):F=jp(v.top,v.left,v.width,v.height),h.style=F}function qe(){const v={};for(const F of["width","height"]){const ee=h.style[F].match(/^(\d+)px$/);if(!ee)return;v[F]=ee[1]}c("container-resized",l.i,l.h,l.w,v.height,v.width)}function lt(v){if(l.static)return;const F=v.type;if(F==="resizestart"&&h.isResizing||F!=="resizestart"&&!h.isResizing)return;const ee=Go(v);if(pn(ee))return;const{x:R,y:pe}=ee,L={width:0,height:0};let Y;switch(F){case"resizestart":{J(),ke=k,W=A,Y=tt(w,z,k,A),L.width=Y.width,L.height=Y.height,h.resizing=L,h.isResizing=!0;break}case"resizemove":{!v.edges.right&&!v.edges.left&&(H=R),!v.edges.top&&!v.edges.bottom&&(V=pe);const ie=Xo(H,V,R,pe);M.value?L.width=h.resizing.width-ie.deltaX/h.transformScale:L.width=h.resizing.width+ie.deltaX/h.transformScale,L.height=h.resizing.height+ie.deltaY/h.transformScale,h.resizing=L;break}case"resizeend":{Y=tt(w,z,k,A),L.width=Y.width,L.height=Y.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}Y=re(L.height,L.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),H=R,V=pe,(k!==Y.w||A!==Y.h)&&c("resize",l.i,Y.h,Y.w,L.height,L.width),v.type==="resizeend"&&(ke!==k||W!==A)&&c("resized",l.i,Y.h,Y.w,L.height,L.width),x.emit("resizeEvent",v.type,l.i,w,z,Y.h,Y.w)}function Z(v){if(l.static||h.isResizing)return;const F=v.type;if(F==="dragstart"&&h.isDragging||F!=="dragstart"&&!h.isDragging)return;const ee=Go(v);if(pn(ee))return;const{x:R,y:pe}=ee,L=v.target;if(!L.offsetParent)return;const Y={top:0,left:0};switch(F){case"dragstart":{K=w,G=z;const ge=L.offsetParent.getBoundingClientRect(),$=L.getBoundingClientRect(),oe=$.left/h.transformScale,X=ge.left/h.transformScale,_e=$.right/h.transformScale,fe=ge.right/h.transformScale,Ee=$.top/h.transformScale,P=ge.top/h.transformScale;M.value?Y.left=(_e-fe)*-1:Y.left=oe-X,Y.top=Ee-P,h.dragging=Y,h.isDragging=!0;break}case"dragmove":{const ge=Xo(T,O,R,pe);if(M.value?Y.left=h.dragging.left-ge.deltaX/h.transformScale:Y.left=h.dragging.left+ge.deltaX/h.transformScale,Y.top=h.dragging.top+ge.deltaY/h.transformScale,h.bounded){const $=L.offsetParent.clientHeight-ce(l.h,h.rowHeight,h.margin[1]);Y.top=le(Y.top,0,$);const oe=Le(),X=h.containerWidth-ce(l.w,oe,h.margin[0]);Y.left=le(Y.left,0,X)}h.dragging=Y;break}case"dragend":{const ge=L.offsetParent.getBoundingClientRect(),$=L.getBoundingClientRect(),oe=$.left/h.transformScale,X=ge.left/h.transformScale,_e=$.right/h.transformScale,fe=ge.right/h.transformScale,Ee=$.top/h.transformScale,P=ge.top/h.transformScale;M.value?Y.left=(_e-fe)*-1:Y.left=oe-X,Y.top=Ee-P,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let ie;M.value,ie=at(Y.top,Y.left),T=R,O=pe,(w!==ie.x||z!==ie.y)&&c("move",l.i,ie.x,ie.y),v.type==="dragend"&&(K!==w||G!==z)&&c("moved",l.i,ie.x,ie.y),x.emit("dragEvent",v.type,l.i,ie.x,ie.y,A,k)}function tt(v,F,ee,R){const pe=Le();let L;return M.value?L={right:Math.round(pe*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:ee===1/0?ee:Math.round(pe*ee+Math.max(0,ee-1)*h.margin[0]),height:R===1/0?R:Math.round(h.rowHeight*R+Math.max(0,R-1)*h.margin[1])}:L={left:Math.round(pe*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:ee===1/0?ee:Math.round(pe*ee+Math.max(0,ee-1)*h.margin[0]),height:R===1/0?R:Math.round(h.rowHeight*R+Math.max(0,R-1)*h.margin[1])},L}function at(v,F){const ee=Le();let R=Math.round((F-h.margin[0])/(ee+h.margin[0])),pe=Math.round((v-h.margin[1])/(h.rowHeight+h.margin[1]));return R=Math.max(Math.min(R,h.cols-k),0),pe=Math.max(Math.min(pe,h.maxRows-A),0),{x:R,y:pe}}function Le(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ce(v,F,ee){return Number.isFinite(v)?Math.round(F*v+Math.max(0,v-1)*ee):v}function le(v,F,ee){return Math.max(Math.min(v,ee),F)}function re(v,F,ee=!1){const R=Le();let pe=Math.round((F+h.margin[0])/(R+h.margin[0])),L=0;return ee?L=Math.ceil((v+h.margin[1])/(h.rowHeight+h.margin[1])):L=Math.round((v+h.margin[1])/(h.rowHeight+h.margin[1])),pe=Math.max(Math.min(pe,h.cols-w),0),L=Math.max(Math.min(L,h.maxRows-z),0),{w:pe,h:L}}function Te(v,F){h.containerWidth=v}function Xe(){Ye()}function dt(){!m.value&&I.value&&(m.value=Qo(I.value),h.useStyleCursor||m.value.styleCursor(!1))}const g=Wo(Z);function C(){if(dt(),!!m.value)if(h.draggable&&!l.static){const v={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};m.value.draggable(v),D||(D=!0,m.value.on("dragstart dragmove dragend",F=>{F.type==="dragmove"?g(F):Z(F)}))}else m.value.draggable({enabled:!1})}const U=Wo(lt);function J(){if(dt(),!!m.value)if(h.resizable&&!l.static){const v=tt(0,0,l.maxW,l.maxH),F=tt(0,0,l.minW,l.minH),ee={edges:{left:M.value?`.${Oe.value[0]}`:!1,right:M.value?!1:`.${Oe.value[0]}`,bottom:`.${Oe.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:F.height*h.transformScale,width:F.width*h.transformScale},max:{height:v.height*h.transformScale,width:v.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(ee.modifiers=[Qo.modifiers.aspectRatio({ratio:"preserve"})]),m.value.resizable(ee),E||(E=!0,m.value.on("resizestart resizemove resizeend",R=>{R.type==="resizemove"?U(R):lt(R)}))}else m.value.resizable({enabled:!1})}return(v,F)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:I,class:e.normalizeClass(Re.value),style:e.normalizeStyle(h.style)},[e.renderSlot(v.$slots,"default"),q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Oe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),sa=typeof window<"u";var Zo;sa&&(Zo=window==null?void 0:window.navigator)!=null&&Zo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function el(a){return a!=null}function tl(){}const td=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(td)));const nd=sa&&("ontouchstart"in window||od()>0),ad=nd?"pointerdown":"click";function od(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function ld(a,s,i=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=s;if(!el(l)||l==="")return!1;let m;return el(i)?m=new i(l,{bubbles:c,cancelable:d}):(m=document.createEvent("HTMLEvents"),m.initEvent(l,c,d)),Object.assign(m,x),a.dispatchEvent(m)}const rd="clickoutside",id=new Set;sa&&document.addEventListener(ad,a=>{const s=a.target,i=a.composedPath&&a.composedPath();id.forEach(l=>{l!==s&&(i?!i.includes(l):!l.contains(s))&&(!l.__transferElement||l.__transferElement!==s&&!l.__transferElement.contains(s))&&ld(l,{type:rd})})},!0);const sd=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Wa;if(sa){for(const a of sd)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const cd=new Set,ud=new WeakMap;if(sa&&Wa){const a=Wa[2],s=Wa[4];document.addEventListener(s,()=>{if(cd.forEach(i=>{i.value=!1}),document[a]){const i=ud.get(document[a]);i&&(i.value=!0)}},!1)}const Wl=new Map;Wl.set("x",0);Wl.set("y",0);var la=[],pd=function(){return la.some(function(a){return a.activeTargets.length>0})},dd=function(){return la.some(function(a){return a.skippedTargets.length>0})},nl="ResizeObserver loop completed with undelivered notifications.",fd=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:nl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=nl),window.dispatchEvent(a)},Ba;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ba||(Ba={}));var ra=function(a){return Object.freeze(a)},hd=function(){function a(s,i){this.inlineSize=s,this.blockSize=i,ra(this)}return a}(),Hl=function(){function a(s,i,l,c){return this.x=s,this.y=i,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ra(this)}return a.prototype.toJSON=function(){var s=this,i=s.x,l=s.y,c=s.top,d=s.right,x=s.bottom,m=s.left,h=s.width,D=s.height;return{x:i,y:l,top:c,right:d,bottom:x,left:m,width:h,height:D}},a.fromRect=function(s){return new a(s.x,s.y,s.width,s.height)},a}(),xo=function(a){return a instanceof SVGElement&&"getBBox"in a},ql=function(a){if(xo(a)){var s=a.getBBox(),i=s.width,l=s.height;return!i&&!l}var c=a,d=c.offsetWidth,x=c.offsetHeight;return!(d||x||a.getClientRects().length)},al=function(a){var s;if(a instanceof Element)return!0;var i=(s=a==null?void 0:a.ownerDocument)===null||s===void 0?void 0:s.defaultView;return!!(i&&a instanceof i.Element)},vd=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},Ia=typeof window<"u"?window:{},Fa=new WeakMap,ol=/auto|scroll/,gd=/^tb|vertical/,md=/msie|trident/i.test(Ia.navigator&&Ia.navigator.userAgent),On=function(a){return parseFloat(a||"0")},va=function(a,s,i){return a===void 0&&(a=0),s===void 0&&(s=0),i===void 0&&(i=!1),new hd((i?s:a)||0,(i?a:s)||0)},ll=ra({devicePixelContentBoxSize:va(),borderBoxSize:va(),contentBoxSize:va(),contentRect:new Hl(0,0,0,0)}),Gl=function(a,s){if(s===void 0&&(s=!1),Fa.has(a)&&!s)return Fa.get(a);if(ql(a))return Fa.set(a,ll),ll;var i=getComputedStyle(a),l=xo(a)&&a.ownerSVGElement&&a.getBBox(),c=!md&&i.boxSizing==="border-box",d=gd.test(i.writingMode||""),x=!l&&ol.test(i.overflowY||""),m=!l&&ol.test(i.overflowX||""),h=l?0:On(i.paddingTop),D=l?0:On(i.paddingRight),E=l?0:On(i.paddingBottom),T=l?0:On(i.paddingLeft),O=l?0:On(i.borderTopWidth),H=l?0:On(i.borderRightWidth),V=l?0:On(i.borderBottomWidth),ke=l?0:On(i.borderLeftWidth),W=T+D,K=h+E,G=ke+H,w=O+V,z=m?a.offsetHeight-w-a.clientHeight:0,k=x?a.offsetWidth-G-a.clientWidth:0,A=c?W+G:0,I=c?K+w:0,se=l?l.width:On(i.width)-A-k,$e=l?l.height:On(i.height)-I-z,nt=se+W+k+G,Ie=$e+K+z+w,ze=ra({devicePixelContentBoxSize:va(Math.round(se*devicePixelRatio),Math.round($e*devicePixelRatio),d),borderBoxSize:va(nt,Ie,d),contentBoxSize:va(se,$e,d),contentRect:new Hl(T,h,se,$e)});return Fa.set(a,ze),ze},Xl=function(a,s,i){var l=Gl(a,i),c=l.borderBoxSize,d=l.contentBoxSize,x=l.devicePixelContentBoxSize;switch(s){case Ba.DEVICE_PIXEL_CONTENT_BOX:return x;case Ba.BORDER_BOX:return c;default:return d}},yd=function(){function a(s){var i=Gl(s);this.target=s,this.contentRect=i.contentRect,this.borderBoxSize=ra([i.borderBoxSize]),this.contentBoxSize=ra([i.contentBoxSize]),this.devicePixelContentBoxSize=ra([i.devicePixelContentBoxSize])}return a}(),Yl=function(a){if(ql(a))return 1/0;for(var s=0,i=a.parentNode;i;)s+=1,i=i.parentNode;return s},bd=function(){var a=1/0,s=[];la.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(m){var h=new yd(m.target),D=Yl(m.target);x.push(h),m.lastReportedSize=Xl(m.target,m.observedBox),D<a&&(a=D)}),s.push(function(){d.callback.call(d.observer,x,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var i=0,l=s;i<l.length;i++){var c=l[i];c()}return a},rl=function(a){la.forEach(function(s){s.activeTargets.splice(0,s.activeTargets.length),s.skippedTargets.splice(0,s.skippedTargets.length),s.observationTargets.forEach(function(i){i.isActive()&&(Yl(i.target)>a?s.activeTargets.push(i):s.skippedTargets.push(i))})})},kd=function(){var a=0;for(rl(a);pd();)a=bd(),rl(a);return dd()&&fd(),a>0},po,Jl=[],xd=function(){return Jl.splice(0).forEach(function(a){return a()})},wd=function(a){if(!po){var s=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return xd()}).observe(i,l),po=function(){i.textContent="".concat(s?s--:s++)}}Jl.push(a),po()},Dd=function(a){wd(function(){requestAnimationFrame(a)})},Ha=0,Cd=function(){return!!Ha},Ed=250,_d={attributes:!0,characterData:!0,childList:!0,subtree:!0},il=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sl=function(a){return a===void 0&&(a=0),Date.now()+a},fo=!1,Sd=function(){function a(){var s=this;this.stopped=!0,this.listener=function(){return s.schedule()}}return a.prototype.run=function(s){var i=this;if(s===void 0&&(s=Ed),!fo){fo=!0;var l=sl(s);Dd(function(){var c=!1;try{c=kd()}finally{if(fo=!1,s=l-sl(),!Cd())return;c?i.run(1e3):s>0?i.run(s):i.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var s=this,i=function(){return s.observer&&s.observer.observe(document.body,_d)};document.body?i():Ia.addEventListener("DOMContentLoaded",i)},a.prototype.start=function(){var s=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),il.forEach(function(i){return Ia.addEventListener(i,s.listener,!0)}))},a.prototype.stop=function(){var s=this;this.stopped||(this.observer&&this.observer.disconnect(),il.forEach(function(i){return Ia.removeEventListener(i,s.listener,!0)}),this.stopped=!0)},a}(),mo=new Sd,cl=function(a){!Ha&&a>0&&mo.start(),Ha+=a,!Ha&&mo.stop()},Td=function(a){return!xo(a)&&!vd(a)&&getComputedStyle(a).display==="inline"},Id=function(){function a(s,i){this.target=s,this.observedBox=i||Ba.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var s=Xl(this.target,this.observedBox,!0);return Td(this.target)&&(this.lastReportedSize=s),this.lastReportedSize.inlineSize!==s.inlineSize||this.lastReportedSize.blockSize!==s.blockSize},a}(),Bd=function(){function a(s,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=s,this.callback=i}return a}(),$a=new WeakMap,ul=function(a,s){for(var i=0;i<a.length;i+=1)if(a[i].target===s)return i;return-1},ja=function(){function a(){}return a.connect=function(s,i){var l=new Bd(s,i);$a.set(s,l)},a.observe=function(s,i,l){var c=$a.get(s),d=c.observationTargets.length===0;ul(c.observationTargets,i)<0&&(d&&la.push(c),c.observationTargets.push(new Id(i,l&&l.box)),cl(1),mo.schedule())},a.unobserve=function(s,i){var l=$a.get(s),c=ul(l.observationTargets,i),d=l.observationTargets.length===1;c>=0&&(d&&la.splice(la.indexOf(l),1),l.observationTargets.splice(c,1),cl(-1))},a.disconnect=function(s){var i=this,l=$a.get(s);l.observationTargets.slice().forEach(function(c){return i.unobserve(s,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Ad=function(){function a(s){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof s!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ja.connect(this,s)}return a.prototype.observe=function(s,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(s))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.observe(this,s,i)},a.prototype.unobserve=function(s){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(s))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.unobserve(this,s)},a.prototype.disconnect=function(){ja.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const oo=new WeakMap;function Nd(a){var s;for(let i=0,l=a.length;i<l;++i){const c=a[i],d=oo.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:m}=((s=c.borderBoxSize)==null?void 0:s[0])??{},{offsetWidth:h,offsetHeight:D}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:D,width:x??h,height:m??D}))}}}const Ql=new(sa&&window.ResizeObserver||Ad)(Nd);function pl(a,s){oo.set(a,s),Ql.observe(a)}function dl(a){oo.has(a)&&(Ql.unobserve(a),oo.delete(a))}function Vd(a={}){let s=tl;const i=e.watch(()=>e.unref(a.target),c=>{s(),!(!c||typeof a.onResize!="function")&&(pl(c,a.onResize),s=()=>{dl(c),s=tl})},{immediate:!0}),l=()=>{i(),s()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:pl,unobserveResize:dl,unobserve:l}}const Od=e.ref(!1);e.computed(()=>Od.value);const fl="__theme_style__",ho="__theme_observer__",hl=e.reactive(new Map),vl=new Map;e.watch(hl,()=>{if(!sa)return;vl.clear();const a=document.head.querySelector(`#${fl}`);a&&document.head.removeChild(a);const s=document.createElement("style");let i=`.${ho} { width: 1px }`,l=1;for(const[c,[d,x]]of hl.entries())i+=` html.${d} .${ho}, .${x} .${ho} { width: ${++l}px }`,vl.set(l,c);s.textContent=i,s.id=fl,document.head.appendChild(s)});const Zl=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:s,emit:i}){const l=a,c=i,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,m=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Vd(),T=Vp();T.on("resizeEvent",O),T.on("dragEvent",H),e.onBeforeMount(()=>{c("layout-before-mount",m.value)}),e.onMounted(()=>{c("layout-mounted",m.value),e.nextTick(()=>{Up(m.value),d.originalLayout=m.value,e.nextTick(()=>{$e(),h.value&&D(h.value,Op(w,16)),da(m.value,l.verticalCompact),c("layout-updated",m.value),G(),w()})})}),e.onBeforeUnmount(()=>{T.clearAll(),h.value&&E(h.value)});function O(Ie,ze,ue,_,ne,te){I(Ie,ze,ue,_,ne,te)}function H(Ie,ze,ue,_,ne,te){A(Ie,ze,ue,_,ne,te)}e.watch(()=>d.width,(Ie,ze)=>{e.nextTick(()=>{T.emit("updateWidth",Ie),ze===-1&&e.nextTick(()=>{c("layout-ready",m.value)}),G()})}),e.watch(()=>[l.layout,l.layout.length],()=>{m.value=l.layout,K()}),e.watch(()=>l.colNum,Ie=>{T.emit("setColNum",Ie)}),e.watch(()=>l.rowHeight,Ie=>{T.emit("setRowHeight",Ie)}),e.watch(()=>l.isDraggable,Ie=>{T.emit("setDraggable",Ie)}),e.watch(()=>l.isResizable,Ie=>{T.emit("setResizable",Ie)}),e.watch(()=>l.isBounded,Ie=>{T.emit("setBounded",Ie)}),e.watch(()=>l.transformScale,Ie=>{T.emit("setTransformScale",Ie)}),e.watch(()=>l.responsive,Ie=>{Ie||(c("update:layout",d.originalLayout),T.emit("setColNum",l.colNum)),w()}),e.watch(()=>l.maxRows,Ie=>{T.emit("setMaxRows",Ie)}),e.watch([()=>l.margin,()=>l.margin[1]],G),e.provide(Rl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:V,decreaseItem:ke})),e.provide(Ll,T),s({state:d,getItem:W,resizeEvent:I,dragEvent:A,layoutUpdate:K});function V(Ie){x.set(Ie.i,Ie)}function ke(Ie){x.delete(Ie.i)}function W(Ie){return x.get(Ie)}function K(){if(!pn(m.value)&&!pn(d.originalLayout)){if(m.value.length!==d.originalLayout.length){const Ie=nt(m.value,d.originalLayout);if(Ie.length>0)if(m.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Ie);else{const ze=new Set(Ie.map(ue=>ue.i));d.originalLayout=d.originalLayout.filter(ue=>!ze.has(ue.i))}d.lastLayoutLength=m.value.length,$e()}da(m.value,l.verticalCompact),T.emit("updateWidth",d.width),G(),c("layout-updated",m.value)}}function G(){d.mergedStyle={height:z()}}function w(){h.value&&(d.width=h.value.offsetWidth),T.emit("resizeEvent")}function z(){if(!l.autoSize)return;const Ie=parseFloat(l.margin[1]);return zp(m.value)*(l.rowHeight+Ie)+Ie+"px"}let k;function A(Ie,ze,ue,_,ne,te){let ve=Ho(m.value,ze);pn(ve)&&(ve={h:0,w:0,x:0,y:0,i:""}),Ie==="dragstart"&&!l.verticalCompact&&(k=m.value.reduce((Ue,{i:st,x:q,y:M})=>({...Ue,[st]:{x:q,y:M}}),{})),Ie==="dragmove"||Ie==="dragstart"?(d.placeholder.i=ze,d.placeholder.x=ve.x,d.placeholder.y=ve.y,d.placeholder.w=te,d.placeholder.h=ne,e.nextTick(()=>{d.isDragging=!0}),T.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),m.value=go(m.value,ve,ue,_,!0,l.preventCollision),l.restoreOnDrag?(ve.static=!0,da(m.value,l.verticalCompact,k),ve.static=!1):da(m.value,l.verticalCompact),T.emit("compact"),G(),Ie==="dragend"&&(k=void 0,c("layout-updated",m.value))}function I(Ie,ze,ue,_,ne,te){let ve=Ho(m.value,ze);pn(ve)&&(ve={h:0,w:0,x:0,y:0,i:""});let Ue;if(l.preventCollision){const st=Fl(m.value,{...ve,w:te,h:ne}).filter(q=>q.i!==ve.i);if(Ue=st.length>0,Ue){let q=1/0,M=1/0;st.forEach(ye=>{ye.x>ve.x&&(q=Math.min(q,ye.x)),ye.y>ve.y&&(M=Math.min(M,ye.y))}),Number.isFinite(q)&&(ve.w=q-ve.x),Number.isFinite(M)&&(ve.h=M-ve.y)}}Ue||(ve.w=te,ve.h=ne),Ie==="resizestart"||Ie==="resizemove"?(d.placeholder.i=ze,d.placeholder.x=ue,d.placeholder.y=_,d.placeholder.w=ve.w,d.placeholder.h=ve.h,e.nextTick(()=>{d.isDragging=!0}),T.emit("updateWidth",d.width)):Ie&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&se(),da(m.value,l.verticalCompact),T.emit("compact"),G(),Ie==="resizeend"&&c("layout-updated",m.value)}function se(){const Ie=Gp(l.breakpoints,d.width);if(Ie===d.lastBreakpoint)return;const ze=Kl(Ie,l.cols);!pn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=vo(m.value));const ue=Xp(d.originalLayout,d.layouts,l.breakpoints,Ie,d.lastBreakpoint,ze,l.verticalCompact);d.layouts[Ie]=ue,d.lastBreakpoint!==Ie&&c("breakpoint-changed",Ie,ue),m.value=ue,c("update:layout",ue),d.lastBreakpoint=Ie,T.emit("setColNum",ze)}function $e(){d.layouts=Object.assign({},l.responsiveLayouts)}function nt(Ie,ze){const ue=new Set(ze.map(ve=>ve.i)),_=new Set(Ie.map(ve=>ve.i)),ne=Ie.filter(ve=>!ue.has(ve.i)),te=ze.filter(ve=>!_.has(ve.i));return ne.concat(te)}return(Ie,ze)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Ie.$slots.default?e.renderSlot(Ie.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(m.value,ue=>(e.openBlock(),e.createBlock(ao,e.mergeProps({key:ue.i,ref_for:!0},ue),{default:e.withCtx(()=>[e.renderSlot(Ie.$slots,"item",{item:ue})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ao,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(s){console.error("vite-plugin-css-injected-by-js",s)}})();const Md={key:0,class:"item-view-group"},zd={key:0,class:"item-view-group"},Rd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:s}){const i=jt.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(i),c=s,d=a,x=e.computed(()=>d==null?void 0:d.children),m=e.computed(()=>{var O,H,V,ke;return((O=d==null?void 0:d.children)==null?void 0:O.length)>0&&((H=d==null?void 0:d.children)!=null&&H.every(W=>W==null?void 0:W.layout))?(ke=(V=d==null?void 0:d.children)==null?void 0:V[0])==null?void 0:ke.layout:"vertical"}),h=e.computed(()=>{var O,H;return((H=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:H.isGridLayout)||!1}),D=e.ref((d==null?void 0:d.level)+1),E=O=>{c("rowClick",O)},T=(O,H)=>{c("routeUrl",O,H)};return(O,H)=>h.value?(e.openBlock(),e.createBlock(e.unref(Zl),{key:0,layout:x.value,"onUpdate:layout":H[0]||(H[0]=V=>x.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(x.value,(V,ke)=>(e.openBlock(),e.createBlock(e.unref(ao),{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 W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((G=(K=V==null?void 0:V.component)==null?void 0:K.comp)==null?void 0:G.toUpperCase())!=="TABLE"&&((w=V==null?void 0:V.component)!=null&&w.name)?(e.openBlock(),e.createElementBlock("div",Md,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((z=V==null?void 0:V.component)==null?void 0:z.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)((k=V==null?void 0:V.component)==null?void 0:k.comp)),{pageLayout:m.value,config:{showIndex:(A=e.unref(bt)[ke])==null?void 0:A.showIndex,allowMove:(I=e.unref(bt)[ke])==null?void 0:I.allowMove,viewport:(se=e.unref(bt)[ke])==null?void 0:se.viewport},compName:V==null?void 0:V.component.name,compNames:e.unref(bo),itemData:($e=V==null?void 0:V.component)==null?void 0:$e.compData,childItemData:(nt=V==null?void 0:V.component)==null?void 0:nt.itemChildData,key:e.unref(ga),cacheNewData:e.unref(Za),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:(Ie=V==null?void 0:V.component)==null?void 0:Ie.tableId,allMapContents:e.unref(Ja),children:(ze=V==null?void 0:V.component)==null?void 0:ze.children,level:D.value,onRowClick:E,onRouteUrl:T,onClickTrigger:e.unref(Bl),onClickMainKey:e.unref(Al)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d==null?void 0:d.children,(V,ke)=>{var W,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((K=V==null?void 0:V.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&V.name?(e.openBlock(),e.createElementBlock("div",zd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"0px":"8px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(V.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:e.unref(ga),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:V==null?void 0:V.tableId,allMapContents:e.unref(Ja),children:V==null?void 0:V.children,level:D.value,onRowClick:E,onRouteUrl:T},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Ld=Lt._export_sfc(Rd,[["__scopeId","data-v-3babf83a"]]),er=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"}]),Pd={TABLE:fa.ssTable,FORM:Vo,TABLEOPERATE:ji,TABLESTYLE:os,TABLEEXTEND:rs,TABLEINTERACTION:cs,FORMOPERATE:Oo,FOLD:Ps,CALCULATOR:Ws,METHODBUTTON:uc,AVATARUPLOAD:No.ssAvatar,SIGNATURE:No.ssSignature,FORMTOP:Vo,STEP:wc,STEPOPERATE:Bs,TIMELINE:Tc,TIMELINEOPERATE:zs,FORMTOPOPERATE:Oo,SIGNATUREOPERATE:bc,AVATARUPLOADOPERATE:fc,TABS:Ac,TABSOPERATE:gu,CHART:Bu,CHARTOPERATE:$u,LAYOUT:xp,LAYOUTOPERATE:Bp,PARENTITEM:Ld};function ya(a){return Pd[a==null?void 0:a.toUpperCase()]||null}exports.De=Zl;exports.activeStepInfo=ha;exports.affixItems=ap;exports.allMapContents=Ja;exports.cacheNewData=Za;exports.checkForTableContents=tc;exports.checkIsQuote=Ys;exports.checkIsShowGroup=Hs;exports.checkIsShowGroupForm=Xs;exports.checkIsShowTable=Zs;exports.checkIsTableCheck=Gs;exports.checkIsUsingGroup=qs;exports.clickMainKey=Al;exports.clickSavePage=np;exports.clickStep=Vl;exports.clickTrigger=Bl;exports.compId=ga;exports.compNames=bo;exports.compShow=Ya;exports.contentTransArray=Da;exports.contentTransArrayToAll=_a;exports.contentTransArrayToAllNoExtra=Ga;exports.existLayouts=dp;exports.formToExtraContent=ec;exports.generateLayouts=es;exports.getComponent=ya;exports.getComponents=Qa;exports.getExtraContents=ac;exports.getSliceContLength=gp;exports.gridRowHeight=Xi;exports.isStepLayout=ko;exports.newContentTransArrayToAllNoExtra=Qs;exports.onBack=ep;exports.onChange=eo;exports.onClick=tp;exports.onContentChange=to;exports.onExtendTaskEnd=pp;exports.onPageBack=fp;exports.onPageChange=no;exports.onSaveBack=El;exports.onSelectFixContent=Zu;exports.renderShowItems=Sl;exports.showItems=bt;exports.sliceTableLength=Tl;exports.slotContent=er;exports.st=ao;exports.stepItems=mp;exports.toolBar=Fn;exports.verifyButton=hp;
1
+ "use strict";const fa=require("./index-1-FvChHt.cjs"),e=require("vue"),p=require("./index-CTvzL0b3.cjs"),Nt=require("./index-C22jIGA2.cjs"),Ne=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-utAQVjQ5.cjs"),Yt=require("./index-WXe9um0g.cjs"),Bo=require("./threeViewerHost-J8qfgEsE.cjs"),jt=require("./index-DOt0piJO.cjs"),Lt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-H67el4HV.cjs"),No=require("./index-DQP3RvLe.cjs"),gl=require("./index-BVaHwt5f.cjs"),Vr=require("./index-Bh0aBTEr.cjs");var Or="[object Boolean]";function ml(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Or}const Mr={class:"form-content"},zr={title:"选择标签"},Rr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Lr={class:"col-operate-wrap"},Pr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Fr={__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:s}){const i=()=>{x.value=!1,m.value=!1,h.value=[]},l=a;e.computed(()=>{var ee;const v=(ee=Ue.value)==null?void 0:ee.split("/");return(v==null?void 0:v.some(R=>(R==null?void 0:R.includes("updateLoading"))||(R==null?void 0:R.includes("loading"))))?!1:Ie.value==="view"});const c=s,d=e.ref([]),x=e.ref(!1),m=e.ref(!1),h=e.ref([]);Bo.useThreeSystem();const D=e.ref(),E=e.ref(!1),T=e.ref(!1),O=e.ref([]),H=e.ref(),V=e.ref(!1),ke=e.ref([]),W=fa.useFormToTableComp(p.pinia),K=fa.useFormComp(p.pinia),G=e.ref(!1),w=e.ref(),z=p.useLoginState(p.pinia),{loginUserInfo:k}=p.storeToRefs(z),A=e.ref(),I=e.ref(!0),se=jt.useModelComp(p.pinia),{tableViewContents:$e,itemData:nt,isEdit:Ie,routeToChildPath:ze,lockingPage:ue}=p.storeToRefs(se),_=e.ref(null),ne=e.ref(!1),te=e.ref(!1),ve=jt.useMenuState(),{activeMenuPath:Ue}=p.storeToRefs(ve),st=Ne.useOriginalState(p.pinia),{originalPath:q}=p.storeToRefs(st),M=e.ref([]),ye=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),xe=async v=>{te.value=v,await tt("disabled",null,v,!0)},Re=async v=>{await tt("operable",null,v,!0)};e.watch(()=>Ue.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const Oe=()=>{e.nextTick(()=>{Z()})},Ye=v=>{var F;d.value=(F=d.value)==null?void 0:F.map(ee=>({...ee,isFormColHidden:!(v!=null&&v.includes(ee.label))}))};e.onUnmounted(()=>{_.value=null});const qe=v=>{c("clickTrigger",v)},lt=async v=>{var F,ee,R,pe,L,Y;if(v===""){let ie="";(F=d.value)==null||F.forEach(X=>{X!=null&&X.isMain&&(ie=X==null?void 0:X.value)});let ge=await Ne.getItemData(ze.value,sessionStorage.getItem("systemKey"),"");ie=((Y=(L=(pe=(R=(ee=ge==null?void 0:ge[0])==null?void 0:ee.compData)==null?void 0:R.find(X=>(X==null?void 0:X.key)==="mainRouters"))==null?void 0:pe.contents)==null?void 0:L[0])==null?void 0:Y.routerContent)+q.value+ie;let oe=await Ne.getItemData(ie,sessionStorage.getItem("systemKey"),"");V.value=!0,ke.value=oe==null?void 0:oe.filter(X=>(X==null?void 0:X.comp)!=="methodButton"),c("routeUrl",ke.value)}},Z=()=>{var F;const v=(F=_.value)==null?void 0:F.$el;v&&Ne.Sortable.create(v,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ee=>{const{oldIndex:R,newIndex:pe}=ee;if(R===pe)return;const L=d.value.splice(R,1)[0];d.value.splice(pe,0,L)}})},tt=async(v,F,ee,R=!1)=>{var pe,L,Y,ie,ge,$,oe,X;try{se.setRefreshCurStructure(!1);const _e=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((pe=_e==null?void 0:_e.data)==null?void 0:pe.code)===200){let fe=(ge=(ie=(Y=(L=_e==null?void 0:_e.data)==null?void 0:L.result)==null?void 0:Y[0])==null?void 0:ie.value)==null?void 0:ge.pageData;R?fe={...fe,compData:(oe=fe==null?void 0:fe.compData)==null?void 0:oe.map(P=>{var he;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(he=P==null?void 0:P.contents)==null?void 0:he.map(ae=>({...ae,[v]:ee}))}:P})}:fe={...fe,compData:($=fe==null?void 0:fe.compData)==null?void 0:$.map(P=>{var he;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(he=P==null?void 0:P.contents)==null?void 0:he.map(ae=>(ae==null?void 0:ae.prop)===(F==null?void 0:F.prop)?{...ae,[v]:ee}:ae)}:P})};const Ee=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:fe}});((X=Ee==null?void 0:Ee.data)==null?void 0:X.code)===200?(p.ElMessage.success("编辑成功"),se.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},at=async(v,F)=>{await tt("label",F,v)},Le=async(v,F)=>{v&&await tt("type",F,v)},ce=async(v,F,ee)=>{await tt(F,ee,v,!1)},le=(v,F)=>{A.value===F?I.value=!1:I.value=!0,A.value=F==null?void 0:F.changeProp},re=async v=>{var ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he;let F=[];if((ee=v==null?void 0:v.toString())!=null&&ee.includes(".urdf")){if(v.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[v],m.value=!0,x.value=!0;return}if((R=v==null?void 0:v.toString())!=null&&R.includes(".stl")||(pe=v==null?void 0:v.toString())!=null&&pe.includes(".STL")||(L=v==null?void 0:v.toString())!=null&&L.includes(".obj")||(Y=v==null?void 0:v.toString())!=null&&Y.includes(".mtl")){h.value=(ie=v==null?void 0:v.toString())==null?void 0:ie.split(","),m.value=!1,x.value=!0;return}if((ge=v==null?void 0:v.toString())!=null&&ge.includes(".stl")||($=v==null?void 0:v.toString())!=null&&$.includes(".STL")||(oe=v==null?void 0:v.toString())!=null&&oe.includes(".obj")||(X=v==null?void 0:v.toString())!=null&&X.includes(".mtl")){let ae,Be=[],Je={};if(Array.isArray(v)?ae=v:ae=v==null?void 0:v.split(","),ae==null||ae.forEach(Me=>{Me.includes(".mtl")?Be.push(Me):Je.blob=Je.blob?Je.blob+","+Me:Me}),(Be==null?void 0:Be.length)>0&&(Je.mtlBlobs=Be),(fe=(_e=Object.values(Je))==null?void 0:_e[0])!=null&&fe.includes("http:"))F.push(Je);else{const Me=new Blob([Je.blob],{type:"application/octet-stream;charset=UTF-8"});let Ve=URL.createObjectURL(Me),me="";(Ee=v==null?void 0:v.split("/"))==null||Ee.forEach((ct,Ke)=>{var be;Ke===((be=v==null?void 0:v.split("/"))==null?void 0:be.length)-1&&(me=ct)}),(P=Je.blob)!=null&&P.includes(".stl")&&(me=(me==null?void 0:me.replaceAll(">",""))+".urdf"),H.value=[{name:me,blobUrl:Ve}],T.value=!0}}else{const ae=Ne.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Be=await p.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ae.close()}),Je=new Blob([Be.data],{type:"application/octet-stream;charset=UTF-8"});let Me=URL.createObjectURL(Je),Ve="";(he=v==null?void 0:v.split("/"))==null||he.forEach((me,ct)=>{var Ke;ct===((Ke=v==null?void 0:v.split("/"))==null?void 0:Ke.length)-1&&(Ve=me)}),H.value=[{name:Ve,blobUrl:Me}],T.value=!0}(F==null?void 0:F.length)>0&&K.setBlobUrls(F)},Te=()=>{T.value=!1},Xe=v=>{var L,Y,ie,ge;const F=(Y=(L=p.cloneDeep(l.itemData))==null?void 0:L.find($=>($==null?void 0:$.key)==="formContent"))==null?void 0:Y.contents,ee=p.cloneDeep(v.content);let R={};ee&&((ie=Object.values(ee))==null?void 0:ie.length)>0&&((ge=Object.values(ee))==null||ge.forEach(($,oe)=>{R[F[oe].key]=$}));const pe={content:R,index:l==null?void 0:l.index,buttonName:v==null?void 0:v.buttonName};c("change",pe)},dt=e.computed(()=>"http://222.92.178.198:62001"),g=async v=>{var _e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe;if(!v)return;(fe=(_e=l==null?void 0:l.itemData)==null?void 0:_e.find(de=>(de==null?void 0:de.key)==="parentFormPath"))==null||fe.contents;let F=$e.value;(F==null?void 0:F.length)>0&&(F=F==null?void 0:F.map(de=>{var Fe,We,N,Ce;let Ae=(Fe=de==null?void 0:de.key)==null?void 0:Fe.split("/");return(l==null?void 0:l.compName)===(Ae==null?void 0:Ae[0])&&(We=d.value)!=null&&We.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1]))&&(de.value=(Ce=(N=d.value)==null?void 0:N.find(ut=>(ut==null?void 0:ut.prop)===(Ae==null?void 0:Ae[1])))==null?void 0:Ce.value),de}),se.setTableViewContents(F));const ee=p.cloneDeep(l.itemData);let R=ee==null?void 0:ee.map(de=>{var Ae;return(de==null?void 0:de.key)==="formContent"&&((Ae=de.contents)==null||Ae.map((Fe,We)=>{var N,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It,wt,Dt,Ot,Bt,Ut,Pt;return Fe.type=(Ce=(N=d.value)==null?void 0:N.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ce.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ft=(et=(ut=Fe==null?void 0:Fe.key)==null?void 0:ut.split("$"))==null?void 0:et[1])==null?void 0:ft.length)>0?(He=(Ze=fa.formGetOptions((Se=(rt=Fe==null?void 0:Fe.key)==null?void 0:rt.split("$"))==null?void 0:Se[1]))==null?void 0:Ze.split(","))==null?void 0:He.map(Vt=>({label:Vt,value:Vt})):[],(pt=Fe==null?void 0:Fe.key)!=null&&pt.includes("$")&&(Fe.key=(Tt=(vt=Fe==null?void 0:Fe.key)==null?void 0:vt.split("$"))==null?void 0:Tt[0]),Fe.signature=(wt=(It=d.value)==null?void 0:It.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:wt.signature,Fe.isLoginUser=(Ot=(Dt=d.value)==null?void 0:Dt.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Ot.isLoginUser,Fe.value=(Bt=Object.values(v))==null?void 0:Bt[We],Fe.isFormColHidden=(Pt=(Ut=d.value)==null?void 0:Ut.find(Vt=>(Vt==null?void 0:Vt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Pt.isFormColHidden,Fe})),de}),pe=d.value,L=(P=(Ee=p.cloneDeep(R))==null?void 0:Ee.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:P.contents;if(pe=pe==null?void 0:pe.map(de=>{var Ae;return de.value=(Ae=L==null?void 0:L.find((Fe,We)=>((Fe==null?void 0:Fe.id)??We)===(de==null?void 0:de.id)))==null?void 0:Ae.value,de}),!I.value){c("contentChange",{contents:R,index:l.index});return}let Y="",ie=(Be=(ae=(he=p.cloneDeep(R))==null?void 0:he.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:ae.contents)==null?void 0:Be.find((de,Ae)=>{var Fe,We,N;return(de==null?void 0:de.label)===A.value||Ae.toString()===((N=(We=(Fe=A.value)==null?void 0:Fe.split("t"))==null?void 0:We[1])==null?void 0:N.toString())}),ge=(Je=ie==null?void 0:ie.optionUrl)==null?void 0:Je.menuSelect,$=!0;if((me=(Ve=(Me=p.cloneDeep(R))==null?void 0:Me.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:Ve.contents)==null||me.forEach(de=>{var Ae,Fe,We,N,Ce,ut;$&&((We=(Fe=(Ae=de==null?void 0:de.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:Fe[1])!=null&&We.includes("["))&&(Y=(Ce=(N=de==null?void 0:de.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1],JSON.stringify(ge)===JSON.stringify((ut=de==null?void 0:de.optionUrl)==null?void 0:ut.menuSelect)&&($=!1))}),(ct=ie==null?void 0:ie.optionUrl)!=null&&ct.menuSelect&&I.value){let de=await fa.getSelectRow(ie),Ae,Fe=(Ke=ie==null?void 0:ie.optionUrl)==null?void 0:Ke.menuSelect;if(de==null||de.forEach(We=>{var N,Ce,ut,et,ft,rt,Se,Ze,He,pt;Y===((Ce=(N=ie==null?void 0:ie.optionUrl)==null?void 0:N.groupSelect)==null?void 0:Ce[1])&&((ft=(et=(ut=ie==null?void 0:ie.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])!=null&&ft.includes("["))&&((pt=p.cloneDeep(We))==null?void 0:pt[(He=(Ze=(Se=(rt=ie==null?void 0:ie.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Se[1])==null?void 0:Ze.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])===(ie==null?void 0:ie.value)&&(Ae=We)}),Ae){let We=p.cloneDeep(pe);We=We==null?void 0:We.map(Ce=>{var ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It;return(Ae!=null&&Ae[Ce==null?void 0:Ce.label]||Ae!=null&&Ae[(rt=(ft=(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.groupSelect)==null?void 0:et[1])==null?void 0:ft.replaceAll("[",""))==null?void 0:rt.replaceAll("]","")])&&((He=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Ze[1])!=null&&He.includes("["))&&Fe!=null&&Fe.every(wt=>{var Dt,Ot;return(Ot=(Dt=Ce==null?void 0:Ce.optionUrl)==null?void 0:Dt.menuSelect)==null?void 0:Ot.includes(wt)})&&(Ce.value=(Ae==null?void 0:Ae[Ce==null?void 0:Ce.label])||(Ae==null?void 0:Ae[(It=(Tt=(vt=(pt=Ce==null?void 0:Ce.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:vt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:It.replaceAll("]","")]),Array.isArray(Ce.value)&&Ce.value.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(Ce.type="Upload")),Ce}),We=We==null?void 0:We.map(Ce=>{var ut,et,ft;return(ut=Ce==null?void 0:Ce.optionUrl)!=null&&ut.oldMenuSelect&&(Ce.optionUrl.menuSelect=(ft=(et=p.cloneDeep(Ce))==null?void 0:et.optionUrl)==null?void 0:ft.oldMenuSelect),Ce}),d.value=p.cloneDeep(We);let N=p.cloneDeep(We);N=N==null?void 0:N.map(Ce=>{var ut,et,ft,rt,Se,Ze;return(et=(ut=Ce==null?void 0:Ce.optionUrl)==null?void 0:ut.menuSelect)!=null&&et.some(He=>He==null?void 0:He.includes("["))&&(Ce.optionUrl.oldMenuSelect=(rt=(ft=p.cloneDeep(Ce))==null?void 0:ft.optionUrl)==null?void 0:rt.menuSelect,Ce.optionUrl.menuSelect=(Ze=(Se=Ce==null?void 0:Ce.optionUrl)==null?void 0:Se.menuSelect)==null?void 0:Ze.map(He=>{var pt,vt,Tt,It;if(He!=null&&He.includes("[")){let wt=(vt=(pt=He==null?void 0:He.replaceAll("[","").replaceAll("]",""))==null?void 0:pt.split(":"))==null?void 0:vt[1];He=(It=(Tt=p.cloneDeep(We))==null?void 0:Tt.find(Dt=>(Dt==null?void 0:Dt.label)===wt))==null?void 0:It.value}return He})),Ce}),d.value=N}else d.value=pe;R=R==null?void 0:R.map(We=>{var N;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(N=We.contents)==null?void 0:N.map(Ce=>{var ut,et,ft,rt;return Ce.value=((et=(ut=d.value)==null?void 0:ut.find(Se=>(Se==null?void 0:Se.label)===(Ce==null?void 0:Ce.key)))==null?void 0:et.value)??(Ce==null?void 0:Ce.value),Ce.type=((rt=(ft=d.value)==null?void 0:ft.find(Se=>(Se==null?void 0:Se.prop)===(Ce==null?void 0:Ce.key)))==null?void 0:rt.type)??(Ce==null?void 0:Ce.type),Ce})),We})}I.value=!1,c("contentChange",{contents:R,index:l.index});let oe=[],X=[];if((De=p.cloneDeep((be=R==null?void 0:R.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:be.contents))==null||De.forEach(de=>{var Ae;Array.isArray(de==null?void 0:de.value)&&((Ae=de==null?void 0:de.value)!=null&&Ae.find(Fe=>{var We;return(We=Fe==null?void 0:Fe.url)==null?void 0:We.includes(".obj")}))&&(X=de==null?void 0:de.value)}),(X==null?void 0:X.length)>0){const de=(Qe=p.cloneDeep(X))==null?void 0:Qe.filter(Ae=>{var Fe;return(Fe=Ae==null?void 0:Ae.url)==null?void 0:Fe.includes(".obj")});de==null||de.forEach(Ae=>{var We,N,Ce,ut;const Fe=(We=X==null?void 0:X.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:We.map(et=>et==null?void 0:et.url);oe.push({objUrl:Ae==null?void 0:Ae.url,mtlUrls:((N=X==null?void 0:X.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:N.length)===1?(ut=(Ce=X==null?void 0:X.filter(et=>{var ft;return(et==null?void 0:et.name)===(Ae==null?void 0:Ae.name)&&((ft=et==null?void 0:et.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Ce[0])==null?void 0:ut.url:Fe})}),K.setObjUrl(oe)}},C=v=>{if(!v)return;const F=[];let ee="";for(let R of v)(R.includes("[")||ee.includes("["))&&(ee+=R.trim(),p.cloneDeep(ee).split("【").length-1===p.cloneDeep(ee).split("】").length-1&&p.cloneDeep(ee).split("[").length-1===p.cloneDeep(ee).split("]").length-1&&(F.push(ee.replace(/\/\*[\s\S]*?\*\//g,"")),ee=""));return F},U=(v,F,ee)=>{let R="";const pe=F==null?void 0:F.map(L=>{var Y;return(Y=L==null?void 0:L.value)==null?void 0:Y.pageData});return pe==null||pe.forEach(L=>{var Y;(L==null?void 0:L.name)===(v==null?void 0:v[0])&&((Y=L==null?void 0:L.compData)==null||Y.forEach(ie=>{var ge;(ie==null?void 0:ie.key)==="formContent"&&((ge=ie==null?void 0:ie.contents)==null||ge.forEach($=>{var oe;($==null?void 0:$.prop)===(v==null?void 0:v[1])&&(R=($==null?void 0:$.value)===""?Ne.judgeContents((oe=p.cloneDeep($))==null?void 0:oe.optionUrl,ee):$==null?void 0:$.value)}))}))}),R},J=(v,F,ee,R)=>{var ie,ge;let pe="",L="";(ie=p.cloneDeep(F))==null||ie.forEach(($,oe)=>{$!=null&&$.includes("[")?L=L+q.value+v[oe]:L=L===""?L+$:L+"/"+$});let Y=(ge=R[L])==null?void 0:ge.map($=>{var oe;return(oe=$==null?void 0:$.value)==null?void 0:oe.pageData});return Y==null||Y.forEach($=>{var oe;($==null?void 0:$.name)===(ee==null?void 0:ee[0])&&((oe=$==null?void 0:$.compData)==null||oe.forEach(X=>{var _e;(X==null?void 0:X.key)==="formContent"&&((_e=X==null?void 0:X.contents)==null||_e.forEach(fe=>{(fe==null?void 0:fe.prop)===(ee==null?void 0:ee[1])&&(pe=fe==null?void 0:fe.value)}))}))}),pe};return e.watch(()=>l.itemData,async()=>{var Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke;const v=(Y=l.itemData)==null?void 0:Y.find(be=>(be==null?void 0:be.key)==="formContent"),F=(ie=p.cloneDeep(l.itemData))==null?void 0:ie.find(be=>(be==null?void 0:be.key)==="formButton"),ee=(ge=p.cloneDeep(l.itemData))==null?void 0:ge.find(be=>(be==null?void 0:be.key)==="formFlex"),R=($=p.cloneDeep(l.itemData))==null?void 0:$.find(be=>(be==null?void 0:be.key)==="formWrap"),pe=(oe=p.cloneDeep(l.itemData))==null?void 0:oe.find(be=>(be==null?void 0:be.key)==="enableWrap");if((R==null?void 0:R.contents)==="纵向"?E.value=!1:E.value=!0,G.value=(pe==null?void 0:pe.contents)===void 0?!1:pe==null?void 0:pe.contents,w.value=typeof(ee==null?void 0:ee.contents)!="boolean"?!(!(ee!=null&&ee.contents)===""||((X=ee==null?void 0:ee.contents)==null?void 0:X.toUpperCase())==="VERTICAL"):ee==null?void 0:ee.contents,((_e=v==null?void 0:v.contents)==null?void 0:_e.length)>0&&Array.isArray(v==null?void 0:v.contents)){let be=l.allMapContents;const De=(Ee=(fe=p.cloneDeep(v))==null?void 0:fe.contents)==null?void 0:Ee.map((N,Ce)=>{var wt,Dt,Ot,Bt,Ut,Pt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn;let ut=(N==null?void 0:N.label)??(N==null?void 0:N.key)??"",et=(N==null?void 0:N.type)??"",ft=(N==null?void 0:N.options)??[];if((wt=N==null?void 0:N.key)!=null&&wt.includes("$")&&(ut=(Dt=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Dt[0],((Bt=(Ot=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Ot[1])==null?void 0:Bt.length)>0)){const[kt,Jt]=(Pt=(Ut=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:Ut[1])==null?void 0:Pt.split(/[()]/);et=((Vt=Ne.FormType.find(gt=>(gt==null?void 0:gt.key)===kt))==null?void 0:Vt.value)??"",((qt=Jt==null?void 0:Jt.split(","))==null?void 0:qt.length)>0&&(ft=(wn=Jt==null?void 0:Jt.split(","))==null?void 0:wn.map(gt=>({label:gt,value:gt})))}let rt=[];N!=null&&N.contents&&!Array.isArray(N==null?void 0:N.contents)&&(rt=(Dn=(fn=N==null?void 0:N.contents)==null?void 0:fn.split(","))==null?void 0:Dn.map(kt=>({label:kt,value:kt}))),((Sn=N==null?void 0:N.optionUrl)==null?void 0:Sn.selectRelateType)==="自定义绑定"&&(rt=(Tn=(hn=N==null?void 0:N.optionUrl)==null?void 0:hn.defaultSelect)==null?void 0:Tn.map(kt=>({label:kt,value:kt})));let Se=!1,Ze=(N==null?void 0:N.isFormColHidden)??!1,He=Ne.judgeContents((vn=p.cloneDeep(N))==null?void 0:vn.optionUrl,be),pt=He!==void 0&&He!==""?He:N!=null&&N.originalContent&&(N==null?void 0:N.originalContent)!==""?N.originalContent:N!=null&&N.value?N.value:(ft==null?void 0:ft.length)>0?(In=ft==null?void 0:ft[0])==null?void 0:In.value:(N==null?void 0:N.value)??"",vt=!1,Tt=He!==void 0||et===""?"Input":et;if((Array.isArray(He)&&(He!=null&&He.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url)))||Array.isArray(pt)&&(pt!=null&&pt.every(kt=>(kt==null?void 0:kt.name)&&(kt==null?void 0:kt.url))))&&(Tt="upload"),typeof pt=="string"&&(pt!=null&&pt.includes("loginUser"))&&!(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.isLoginUser)Se=!0,pt=((gn=k.value)==null?void 0:gn.姓名)||((Xn=k.value)==null?void 0:Xn.account)||((Yn=k.value)==null?void 0:Yn.账号)||((Jn=k.value)==null?void 0:Jn.userName);else if(typeof pt=="string"&&(pt!=null&&pt.includes("loginUserSign"))||N!=null&&N.signature||N!=null&&N.isShow)if(vt=!0,(N==null?void 0:N.isShow)==="originalSignature")Tt="image",pt=dt.value+"/"+((jn=k.value)==null?void 0:jn.signature);else{let kt=[...new Set(C(N.isShow))].map(Mt=>{var Nn,on,Vn,Zt;return{key:(Zt=(Vn=(on=(Nn=Mt==null?void 0:Mt.split("["))==null?void 0:Nn[1])==null?void 0:on.split("]"))==null?void 0:Vn[0])==null?void 0:Zt.split(":"),value:""}});(Bn=nt.value)==null||Bn.forEach(Mt=>{kt==null||kt.forEach((yn,Nn)=>{var Vn;let on=yn==null?void 0:yn.key;(Mt==null?void 0:Mt.name)===(on==null?void 0:on[0].replaceAll("'",""))&&((Vn=Mt==null?void 0:Mt.compData)==null||Vn.forEach(Zt=>{var Kn;(Zt==null?void 0:Zt.key)==="formContent"&&((Kn=Zt==null?void 0:Zt.contents)==null||Kn.forEach(bn=>{(bn==null?void 0:bn.prop)===(on==null?void 0:on[1].replaceAll("'",""))&&(kt[Nn].value=bn==null?void 0:bn.value)}))}))})});let Jt=kt==null?void 0:kt.map(Mt=>{var yn;return Mt.key="["+((yn=Mt.key)==null?void 0:yn.join(":"))+"]",Mt}),gt=N==null?void 0:N.isShow;Jt==null||Jt.forEach(Mt=>{Mt!=null&&Mt.value?gt=gt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):gt=gt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),gt!=null&&gt.includes("(")||(gt!=null&&gt.includes("==")?gt=((mn=gt==null?void 0:gt.split("==="))==null?void 0:mn[0])+"==='"+((zn=gt==null?void 0:gt.split("==="))==null?void 0:zn[1])+"'":gt=((An=gt==null?void 0:gt.split("="))==null?void 0:An[0])+"='"+((an=gt==null?void 0:gt.split("="))==null?void 0:an[1])+"'"),gt!=null&&gt.includes("=")&&!(gt!=null&&gt.includes("=="))&&!(gt!=null&&gt.includes("==="))&&(gt=gt==null?void 0:gt.replaceAll("=","==")),new Function(`if (${gt}) { return true } else { return false }`)()?(Ze=!1,Tt="image",pt=dt.value+"/"+((Cn=k.value)==null?void 0:Cn.signature)):pt=""}return Array.isArray(pt)&&pt.every(kt=>(kt==null?void 0:kt.url)&&(kt==null?void 0:kt.name))&&(N.type="Upload"),N!=null&&N.isMainUrl&&(Tt="Url"),{label:ut??"",name:"t"+Ce,prop:p.cloneDeep(N==null?void 0:N.key),type:Tt,value:N!=null&&N.isNewDate&&pt===""?new Date:pt,id:(N==null?void 0:N.id)??Ce,contents:(rt==null?void 0:rt.length)>0?rt:ft??[],width:(N==null?void 0:N.width)??1,isLoginUser:Se,config:N==null?void 0:N.config,optionUrl:(N==null?void 0:N.optionUrl)??N,isFormColHidden:Ze,signature:vt,isMain:N==null?void 0:N.isMain,isMainUrl:N==null?void 0:N.isMainUrl,operable:(N==null?void 0:N.operable)??!1,disabled:(N==null?void 0:N.disabled)??!1}}),Qe=De==null?void 0:De.map(N=>N==null?void 0:N.value);let de="";Qe==null||Qe.forEach(N=>{N!==""&&N!==void 0&&(de=de===""?N:de+"/"+N)}),W.setSelectArray(Qe),W.setSelectString(de);let Ae=(P=p.cloneDeep(De))==null?void 0:P.map(N=>(N!=null&&N.value&&Ne.IsJson(N==null?void 0:N.value)&&Array.isArray(JSON.parse(N==null?void 0:N.value))&&(N.value=JSON.parse(N.value)),N));Ae=Ae==null?void 0:Ae.map(N=>{var Ce,ut,et,ft,rt,Se,Ze,He;if((ut=(Ce=N==null?void 0:N.optionUrl)==null?void 0:Ce.menuSelect)!=null&&ut.some(pt=>pt==null?void 0:pt.includes("["))){let pt="";N.optionUrl.oldMenuSelect=(ft=(et=p.cloneDeep(N))==null?void 0:et.optionUrl)==null?void 0:ft.menuSelect,N.optionUrl.menuSelect=(Se=(rt=N==null?void 0:N.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:Se.map(vt=>{var Tt,It,wt,Dt,Ot,Bt;if(vt!=null&&vt.includes("[")){let Ut=(It=(Tt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:It[1];pt=U((wt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:wt.split(":"),be==null?void 0:be[Ue.value],be),vt=((Ot=(Dt=p.cloneDeep(Ae))==null?void 0:Dt.find(Pt=>(Pt==null?void 0:Pt.label)===Ut))==null?void 0:Ot.value)||U((Bt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"),be==null?void 0:be[Ue.value],be)}return vt}),pt!==""&&N.value===""&&(N.value=J(N.optionUrl.menuSelect,N.optionUrl.oldMenuSelect,(Ze=N==null?void 0:N.optionUrl)==null?void 0:Ze.groupSelect,be),Array.isArray(N.value)&&((He=N.value)!=null&&He.every(vt=>vt==null?void 0:vt.url))&&(N.type="UPLOAD"))}return N}),d.value=Ae,te.value=((he=d.value)==null?void 0:he.every(N=>N==null?void 0:N.disabled))||ue.value===Ue.value,ne.value=(ae=d.value)==null?void 0:ae.every(N=>N==null?void 0:N.operable),M.value=(Be=d.value)==null?void 0:Be.map(N=>N==null?void 0:N.label);let Fe=[],We=[];if((Je=p.cloneDeep(d.value))==null||Je.forEach(N=>{var Ce;Array.isArray(N==null?void 0:N.value)&&((Ce=N==null?void 0:N.value)!=null&&Ce.find(ut=>{var et;return(et=ut==null?void 0:ut.url)==null?void 0:et.includes(".obj")}))&&(We=N==null?void 0:N.value)}),(We==null?void 0:We.length)>0){const N=(Me=p.cloneDeep(We))==null?void 0:Me.filter(Ce=>{var ut;return(ut=Ce==null?void 0:Ce.url)==null?void 0:ut.includes(".obj")});N==null||N.forEach(Ce=>{var et,ft,rt,Se;const ut=(et=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:et.map(Ze=>Ze==null?void 0:Ze.url);Fe.push({objUrl:Ce==null?void 0:Ce.url,mtlUrls:((ft=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:ft.length)===1?(Se=(rt=We==null?void 0:We.filter(Ze=>{var He;return(Ze==null?void 0:Ze.name)===(Ce==null?void 0:Ce.name)&&((He=Ze==null?void 0:Ze.url)==null?void 0:He.includes(".mtl"))}))==null?void 0:rt[0])==null?void 0:Se.url:ut})}),K.setObjUrl(Fe)}(Ve=p.cloneDeep(d.value))==null||Ve.forEach(N=>{var Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It,wt;if((ut=(Ce=N==null?void 0:N.value)==null?void 0:Ce.toString())!=null&&ut.includes(".stl")||(ft=(et=N==null?void 0:N.value)==null?void 0:et.toString())!=null&&ft.includes(".STL")||(Se=(rt=N==null?void 0:N.value)==null?void 0:rt.toString())!=null&&Se.includes(".obj")||(He=(Ze=N==null?void 0:N.value)==null?void 0:Ze.toString())!=null&&He.includes(".mtl")||(vt=(pt=N==null?void 0:N.value)==null?void 0:pt.toString())!=null&&vt.includes(".urdf")){let Dt={},Ot=[],Bt;Array.isArray(N==null?void 0:N.value)?Bt=N==null?void 0:N.value:Bt=(Tt=N==null?void 0:N.value)==null?void 0:Tt.split(","),Bt==null||Bt.forEach(Ut=>{Ut.includes(".mtl")?Ot.push(Ut):Dt.blob=Dt.blob==="undefined"?Ut:Dt.blob+","+Ut}),(Ot==null?void 0:Ot.length)>0&&(Dt.mtlBlobs=Ot),(wt=(It=Object.values(Dt))==null?void 0:It[0])!=null&&wt.includes("http:")}})}else d.value=[];let L=$e.value;if((L==null?void 0:L.length)>0&&(L=L==null?void 0:L.map(be=>{var Qe,de,Ae,Fe;let De=(Qe=be==null?void 0:be.key)==null?void 0:Qe.split("/");return(l==null?void 0:l.compName)===(De==null?void 0:De[0])&&(de=d.value)!=null&&de.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1]))&&(be.value=(Fe=(Ae=d.value)==null?void 0:Ae.find(We=>(We==null?void 0:We.prop)===(De==null?void 0:De[1])))==null?void 0:Fe.value),be}),se.setTableViewContents(L)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let be={};(me=p.cloneDeep(d).value)==null||me.forEach(De=>{(De==null?void 0:De.isMain)===!0&&(be[(De==null?void 0:De.prop)??(De==null?void 0:De.name)]=[{required:!0,message:`${(De==null?void 0:De.prop)||(De==null?void 0:De.name)}不能为空`}])}),D.value=be}if(((ct=F==null?void 0:F.contents)==null?void 0:ct.length)>0){const be=[];(Ke=F==null?void 0:F.contents)==null||Ke.forEach((De,Qe)=>{(De==null?void 0:De.label)!==""&&be.push({label:(De==null?void 0:De.label)??"",id:(De==null?void 0:De.id)??Qe,type:(De==null?void 0:De.type)??"",background:De==null?void 0:De.background})}),O.value=be}else O.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ue.value,v=>{te.value=v===Ue.value},{immediate:!0}),(v,F)=>{const ee=e.resolveComponent("svg-icon"),R=e.resolveComponent("el-switch"),pe=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-popover"),Y=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Mr,[e.createVNode(Nt.ssForm,{rowContents:d.value,formRules:D.value,buttonValue:O.value,isRowFlex:!1,isEnableWrap:G.value,onOnButtonClick:Xe,onChange:g,formDisabled:te.value,formLabelsOperable:ne.value,isButtonRow:E.value,onPreview:re,onBlurChange:le,onHandleColEditChange:at,onHandleColTypeChange:Le,onRouteUrl:lt,onClickTrigger:qe},{operateCol:e.withCtx(({renderColumns:ie,formDisabled:ge,formLabelsOperable:$})=>[e.createVNode(L,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Oe},{reference:e.withCtx(()=>[e.createElementVNode("span",zr,[e.createVNode(ee,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Rr,[F[1]||(F[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(R,{"model-value":ge,"active-text":"禁用","inactive-text":"",onChange:xe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(R,{"model-value":$,"active-text":"编辑所有标签","inactive-text":"",onChange:Re},null,8,["model-value"]),F[2]||(F[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Y,{modelValue:M.value,"onUpdate:modelValue":F[0]||(F[0]=oe=>M.value=oe),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:_,onChange:Ye},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie,oe=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:oe.label},[e.createVNode(pe,{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(L,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(ee,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var X;return[e.createElementVNode("div",Lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((X=Object.keys(oe))==null?void 0:X.filter(_e=>{var fe;return(fe=ye.value)==null?void 0:fe.find(Ee=>(Ee==null?void 0:Ee.value)===_e)}),_e=>{var fe,Ee;return e.openBlock(),e.createElementBlock("div",{key:_e},[e.createVNode(Nt._sfc_main$1,{value:oe==null?void 0:oe[_e],"active-text":(Ee=(fe=ye.value)==null?void 0:fe.find(P=>(P==null?void 0:P.value)===_e))==null?void 0:Ee.label,inactiveText:"",onChange:P=>ce(P,_e,oe)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Pr,[e.createVNode(ee,{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"]),T.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:0,fileDataList:H.value,onDestroy:Te},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Yt.ssDialog,{key:1,visible:x.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{"file-urls":h.value,isThreeScene:m.value,onGetAnimationData:v.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Vo=Lt._export_sfc(Fr,[["__scopeId","data-v-b08c7a6b"]]),qa=e.ref(0),yl=a=>{var s;return!a||(a==null?void 0:a.length)===0?[]:(s=p.cloneDeep(a))==null?void 0:s.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:yl(l==null?void 0:l.children)},l))},$r=a=>{var i;return(i=p.cloneDeep(a))==null?void 0:i.map(l=>(qa.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??qa.value,children:yl(l==null?void 0:l.children)},l))},bl=(a,s)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===s)?(i=p.cloneDeep(a))==null?void 0:i.filter(c=>(c==null?void 0:c.id)!==s):(a=a==null?void 0:a.map(l=>(l.children=bl(l==null?void 0:l.children,s),l)),a)},kl=(a,s)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(i=p.cloneDeep(a))==null?void 0:i.map(c=>((c==null?void 0:c.id)===(s==null?void 0:s.id)&&(c=s),c)):(a=a==null?void 0:a.map(l=>(l.children=kl(l==null?void 0:l.children,s),l)),a)},xl=(a,s)=>{var i;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=s==null?void 0:s.contents)==null?void 0:c.id)})?(i=p.cloneDeep(a))==null?void 0:i.map(c=>{var d;return(c==null?void 0:c.id)===((d=s==null?void 0:s.contents)==null?void 0:d.id)&&(c=s==null?void 0:s.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=xl(l==null?void 0:l.children,s),l)),a)},wl=(a,s)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(i=p.cloneDeep(a))==null?void 0:i.map(c=>((c==null?void 0:c.id)===(s==null?void 0:s.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(s.contents)),c)):(a=a==null?void 0:a.map(l=>(l.children=wl(l==null?void 0:l.children,s),l)),a)},St=[{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"}],jr=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Kr=[{label:"新增",value:"add"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Kr},{key:"background",label:"按钮背景色",type:"Color"}],Pn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:jr},{key:"textColor",label:"按钮颜色",type:"Color"}],Ur={class:"table-header-child"},Wr={class:"table-header-child-main"},Hr={class:"table-header-child-content"},qr={class:"table-header-child-content-item"},Gr={class:"fix-button"},Xr={key:0},Yr={class:"form-content"},Jr={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:s}){const i=a,l=s,c=e.ref(!1),d=e.ref(""),x=Ne.useTableComp(p.pinia),{tableIndex:m}=p.storeToRefs(x);e.ref(0);const h=e.ref(""),D=e.ref([]),E=e.ref([]),T=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let I=p.cloneDeep(m.value)+1;x.setTableIndex(I),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:m.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},O=w=>{l("fixChange",p.cloneDeep(w))},H=w=>{l("deleteChange",p.cloneDeep(w))},V=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:m.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},ke=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},W=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const I=St==null?void 0:St.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));I?w[I.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),w.id="id"+m.value,(k=D.value)==null||k.forEach(I=>{const se=St==null?void 0:St.find($e=>($e==null?void 0:$e.label)===(I==null?void 0:I.label));se?w[se.key]=I.value:I!=null&&I.children&&I.children.length>0&&(w.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},K=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},G=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,z)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ur,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(A,I)=>(e.openBlock(),e.createElementBlock("div",Wr,[e.createElementVNode("div",Hr,[e.createElementVNode("div",qr,e.toDisplayString(A.label),1),e.createElementVNode("div",Gr,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>V(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>T(A)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:se=>G(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",Xr,[e.createVNode(Dl,{tableChildContents:A==null?void 0:A.children,onDeleteChange:H,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yr,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:W},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Qr=Lt._export_sfc(Jr,[["__scopeId","data-v-e0fef72d"]]),Zr={class:"table-header-child"},ei={class:"table-header-child-main"},ti={class:"table-header-child-content"},ni={class:"table-header-child-content-item"},ai={class:"fix-button"},oi={key:0},li={class:"form-content"},ri={class:"dialog-footer"},ii={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:s}){const i=a,l=s,c=e.ref(!1),d=e.ref(""),x=Ne.useTableComp(p.pinia),{tableIndex:m}=p.storeToRefs(x),h=e.ref(""),D=e.ref([]),E=e.ref([]),T=w=>{l("fixChange",p.cloneDeep(w))},O=w=>{var k;c.value=!0;let z=[];St==null||St.forEach(A=>{let I=p.cloneDeep(m.value)+1;x.setTableIndex(I),z.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:w[A.key],id:m.value,contents:A==null?void 0:A.options})}),w!=null&&w.children&&((k=w==null?void 0:w.children)==null?void 0:k.length)>0&&z.push({children:w==null?void 0:w.children,isFormColHidden:!0}),h.value=w==null?void 0:w.id,D.value=z,E.value=z},H=w=>{c.value=!0;let z=[];St==null||St.forEach(k=>{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),z.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:m.value,contents:k==null?void 0:k.options})}),d.value=w==null?void 0:w.id,D.value=z,E.value=z},V=w=>{let z=p.cloneDeep(E.value);z=z==null?void 0:z.map(k=>(k.children||(k.value=w==null?void 0:w[k.name]),k)),E.value=z},ke=()=>{var z,k;D.value=E.value;let w={};if(h.value!=="")w.id=h.value,(z=D.value)==null||z.forEach(A=>{const I=St==null?void 0:St.find(se=>(se==null?void 0:se.label)===(A==null?void 0:A.label));I?w[I.key]=A.value:A!=null&&A.children&&A.children.length>0&&(w.children=A.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"fix"});else{let A=p.cloneDeep(m.value)+1;x.setTableIndex(A),w.id="idChild"+m.value,(k=D.value)==null||k.forEach(I=>{const se=St==null?void 0:St.find($e=>($e==null?void 0:$e.label)===(I==null?void 0:I.label));se?w[se.key]=I.value:I!=null&&I.children&&I.children.length>0&&(w.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(w),id:d.value,type:"add"})}h.value="",D.value=[],E.value=[]},W=()=>{c.value=!1,h.value="",d.value="",D.value=[],E.value=[]},K=w=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",w),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},G=w=>{l("deleteChange",w)};return(w,z)=>{const k=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(I,se)=>(e.openBlock(),e.createElementBlock("div",ei,[e.createElementVNode("div",ti,[e.createElementVNode("div",ni,e.toDisplayString(I.label),1),e.createElementVNode("div",ai,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$e=>H(I)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$e=>O(I)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$e=>K(I)},null,8,["onClick"])])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",oi,[e.createVNode(Qr,{tableChildContents:I==null?void 0:I.children,onDeleteChange:G,onFixChange:T},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",li,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:V},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ri,[e.createVNode(A,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Dl=Lt._export_sfc(ii,[["__scopeId","data-v-ebd68fa1"]]),si={class:"table-operate-content"},ci={class:"table-operate-item"},ui={class:"operate-title"},pi={class:"operate-content"},di={class:"fix-content"},fi={class:"fix-content-label"},hi={class:"fix-button"},vi={key:0},gi={class:"operate-title"},mi={class:"operate-content"},yi={class:"fix-content"},bi={class:"fix-content-label"},ki={class:"fix-button"},xi={class:"operate-title"},wi={class:"operate-content"},Di={class:"fix-content"},Ci={class:"fix-content-label"},Ei={class:"fix-button"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={class:"operate-content"},Ni={style:{display:"flex","justify-content":"space-between"}},Vi={class:"form-content"},Oi={class:"dialog-footer"},Mi={class:"form-content"},zi={class:"dialog-footer"},Ri={class:"form-content"},Li={class:"dialog-footer"},Pi={class:"form-content"},Fi={class:"dialog-footer"},$i={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([]),d=e.ref(!1),x=e.ref(!1),m=e.ref([]),h=e.ref(!1),D=e.ref([]),E=e.ref(!1),T=e.ref([]),O=e.ref(""),H=e.ref(""),V=e.ref([]),ke=e.ref([]),W=e.ref([]),K=e.ref([]),G=e.ref(!1),w=e.ref([]),z=e.ref([]),k=e.ref(0),A=e.ref([]),I=e.ref([]),se=e.ref([]),$e=()=>{G.value=!0;let g=[];Ln==null||Ln.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:k.value,contents:C==null?void 0:C.options})}),w.value=g,z.value=g},nt=()=>{var C,U,J;x.value=!0;let g=[];(J=(U=(C=Ne.FormContent)==null?void 0:C.find(v=>(v==null?void 0:v.key)==="Input"))==null?void 0:U.value)==null||J.forEach(v=>{k.value++,g.push({label:v==null?void 0:v.label,name:(v==null?void 0:v.name)||(v==null?void 0:v.label),type:v.type,value:(v==null?void 0:v.label)==="类型"?"Input":"",id:k.value,contents:v==null?void 0:v.options})}),A.value=g,I.value=g},Ie=g=>{g||(A.value=I.value)},ze=async g=>{var C,U,J,v,F,ee,R,pe,L,Y,ie,ge;if((g==null?void 0:g.类型)!==((U=(C=I.value)==null?void 0:C.find($=>($==null?void 0:$.label)==="类型"))==null?void 0:U.value)){let $=[],oe=await((F=(v=(J=Ne.FormContent)==null?void 0:J.find(X=>(X==null?void 0:X.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:v.value)==null?void 0:F.value)?await((Y=(L=(pe=Ne.FormContent)==null?void 0:pe.find(X=>(X==null?void 0:X.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:L.value)==null?void 0:Y.value):(R=(ee=Ne.FormContent)==null?void 0:ee.find(X=>(X==null?void 0:X.key)===((g==null?void 0:g.类型)===""?"Input":g==null?void 0:g.类型)))==null?void 0:R.value;if(oe==null||oe.forEach(X=>{k.value++,$.push({label:X==null?void 0:X.label,name:(X==null?void 0:X.name)||(X==null?void 0:X.label),type:X.type,value:X!=null&&X.属性名?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):(g==null?void 0:g[X.label])??"",id:k.value,contents:X==null?void 0:X.options,prop:(X==null?void 0:X.prop)||(X==null?void 0:X.name)||(X==null?void 0:X.label)})}),g!=null&&g.菜单选项&&((ie=g==null?void 0:g.菜单选项)==null?void 0:ie.length)>0){const X=await Ne.menuToContentType(g==null?void 0:g.菜单选项);$=$==null?void 0:$.map(_e=>((_e==null?void 0:_e.name)==="组信息选项"&&(_e.contents=X),_e))}I.value=await Ne.selectToBase(p.cloneDeep($)),A.value=await Ne.selectToBase(p.cloneDeep($))}else{let $=p.cloneDeep(A.value);if($=$==null?void 0:$.map(oe=>(oe.value=g==null?void 0:g[oe.name],oe)),g!=null&&g.菜单选项&&((ge=g==null?void 0:g.菜单选项)==null?void 0:ge.length)>0){const oe=await Ne.menuToContentType(g==null?void 0:g.菜单选项);$=$==null?void 0:$.map(X=>((X==null?void 0:X.name)==="组信息选项"&&(X.contents=oe),X))}$=Ne.formToOptionsContents($),I.value=await Ne.selectToBase(p.cloneDeep($))}},ue=async g=>{await ze(g),A.value=I.value},_=(g,C)=>{if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="selectRelateType"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.selectRelateType)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="menuSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.menuSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="groupSelect"){const U=C==null?void 0:C.optionUrl;return(U==null?void 0:U.groupSelect)||C[g.key]}if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="originalContent")return(C==null?void 0:C.value)||C[g.key];if((C==null?void 0:C.type)=="Select"&&(g==null?void 0:g.key)==="multiple"){const U=C[g.key];return ml(U)?U:g.default}return(g==null?void 0:g.label)==="类型"&&C[g.key]===""?"Input":(g==null?void 0:g.key)==="isFormColHidden"&&!C[g.key]?!1:C[g.key]},ne=async g=>{var J,v,F,ee,R,pe,L,Y,ie;x.value=!0;let C=[];const U=await((F=(v=(J=Ne.FormContent)==null?void 0:J.find(ge=>(ge==null?void 0:ge.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:v.value)==null?void 0:F.value)?await((Y=(L=(pe=Ne.FormContent)==null?void 0:pe.find(ge=>(ge==null?void 0:ge.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:L.value)==null?void 0:Y.value):(R=(ee=Ne.FormContent)==null?void 0:ee.find(ge=>(ge==null?void 0:ge.key)===((g==null?void 0:g.type)===""?"Input":g==null?void 0:g.type)))==null?void 0:R.value;if(U==null||U.forEach(ge=>{k.value++,C.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.name)||(ge==null?void 0:ge.label),type:ge.type,value:(ge==null?void 0:ge.label)==="属性名"?(g==null?void 0:g.prop)||(g==null?void 0:g.name)||(g==null?void 0:g.label):_(ge,g),id:k.value,contents:ge==null?void 0:ge.options})}),g!=null&&g.menuSelect&&((ie=g==null?void 0:g.menuSelect)==null?void 0:ie.length)>0){const ge=await Ne.menuToContentType(g==null?void 0:g.menuSelect);C=C==null?void 0:C.map($=>(($==null?void 0:$.name)==="组信息选项"&&($.contents=ge),$))}O.value=g==null?void 0:g.id,A.value=await Ne.selectToBase(Ne.formToOptionsContents(C)),I.value=await Ne.selectToBase(Ne.formToOptionsContents(C))},te=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;se.value=(C=p.cloneDeep(se.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="tableToForm"&&(J.contents=se.value),J))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ve=()=>{x.value=!1,A.value=[],O.value=""},Ue=async()=>{var J,v,F,ee,R,pe,L,Y,ie,ge;A.value=I.value;let g={};O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value);let C=await((F=(v=(J=Ne.FormContent)==null?void 0:J.find($=>{var oe,X;return($==null?void 0:$.key)===(((X=(oe=A.value)==null?void 0:oe.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:X.value)??"label")}))==null?void 0:v.value)==null?void 0:F.value)??((R=(ee=Ne.FormContent)==null?void 0:ee.find($=>{var oe,X;return($==null?void 0:$.key)===(((X=(oe=A.value)==null?void 0:oe.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:X.value)??"label")}))==null?void 0:R.value);if((pe=A.value)==null||pe.forEach($=>{const oe=C==null?void 0:C.find(X=>(X==null?void 0:X.label)===($==null?void 0:$.label));oe&&(g[oe.key]=$.value)}),g.name=g.label,(L=se.value)!=null&&L.find($=>$.id===g.id))se.value=(Y=se.value)==null?void 0:Y.map($=>($.id===g.id&&($=g),$));else{let $=p.cloneDeep(se.value);se.value||(se.value=[]),$.push(g),se.value=$}se.value=se.value.map(({id:$,...oe})=>oe),x.value=!1,O.value="";let U=p.cloneDeep(i.originalItemContents);(ie=p.cloneDeep(i.originalItemContents))!=null&&ie.find($=>($==null?void 0:$.key)==="tableToForm")?U=(ge=p.cloneDeep(i.originalItemContents))==null?void 0:ge.map($=>(($==null?void 0:$.key)==="tableToForm"&&($.contents=se.value),$)):U.push({key:"tableToForm",contents:se.value}),l("change",U)},st=g=>{G.value=!0;let C=[];Ln==null||Ln.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:g[U.key],id:k.value,contents:U==null?void 0:U.options})}),O.value=g==null?void 0:g.id,w.value=C,z.value=C};e.watch(()=>E.value,()=>{var C,U;let g=p.cloneDeep(i.originalItemContents);(C=p.cloneDeep(i.originalItemContents))!=null&&C.find(J=>(J==null?void 0:J.key)==="page")?g=(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="page"&&(J.contents=E.value),J)):g.push({key:"page",contents:E.value}),l("change",g)},{deep:!0});const q=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;ke.value=(C=p.cloneDeep(ke.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="extraButton"&&(J.contents=ke.value),J))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var U,J,v,F,ee;w.value=z.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(U=w.value)==null||U.forEach(R=>{const pe=Ln==null?void 0:Ln.find(L=>(L==null?void 0:L.label)===(R==null?void 0:R.label));pe?g[pe.key]=R.value:R!=null&&R.children&&R.children.length>0&&(g.children=R.children)}),(J=ke.value)!=null&&J.find(R=>R.id===g.id))ke.value=(v=ke.value)==null?void 0:v.map(R=>(R.id===g.id&&(R=g),R));else{let R=p.cloneDeep(ke.value)??[];R.push(g),ke.value=R}G.value=!1,O.value="";let C=p.cloneDeep(i.originalItemContents);(F=p.cloneDeep(i.originalItemContents))!=null&&F.find(R=>(R==null?void 0:R.key)==="extraButton")?C=(ee=p.cloneDeep(i.originalItemContents))==null?void 0:ee.map(R=>((R==null?void 0:R.key)==="extraButton"&&(R.contents=ke.value),R)):C.push({key:"extraButton",contents:ke.value}),l("change",C)},ye=g=>{let C=p.cloneDeep(z.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=g==null?void 0:g[U.name]),U)),z.value=C},xe=()=>{G.value=!1,w.value=[],O.value=""},Re=g=>{h.value=!0;let C=[];Pn==null||Pn.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:g[U.key],id:k.value,contents:U==null?void 0:U.options})}),O.value=g==null?void 0:g.id,W.value=C,K.value=C},Oe=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;V.value=(C=p.cloneDeep(V.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="rowButton"&&(J.contents=V.value),J))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ye=()=>{d.value=!0;let g=[];St==null||St.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),D.value=g,T.value=g},qe=()=>{h.value=!0;let g=[];Pn==null||Pn.forEach(C=>{k.value++,g.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:k.value,contents:C==null?void 0:C.options})}),W.value=g,K.value=g},lt=g=>{let C=p.cloneDeep(K.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=g==null?void 0:g[U.name]),U)),K.value=C},Z=()=>{var U,J,v,F,ee;W.value=K.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(U=W.value)==null||U.forEach(R=>{const pe=Pn==null?void 0:Pn.find(L=>(L==null?void 0:L.label)===(R==null?void 0:R.label));pe?g[pe.key]=R.value:R!=null&&R.children&&R.children.length>0&&(g.children=R.children)}),(J=V.value)!=null&&J.find(R=>R.id===g.id))V.value=(v=V.value)==null?void 0:v.map(R=>(R.id===g.id&&(R=g),R));else{let R=p.cloneDeep(V.value);R.push(g),V.value=R}h.value=!1,O.value="";let C=p.cloneDeep(i.originalItemContents);(F=p.cloneDeep(i.originalItemContents))!=null&&F.find(R=>(R==null?void 0:R.key)==="rowButton")?C=(ee=p.cloneDeep(i.originalItemContents))==null?void 0:ee.map(R=>((R==null?void 0:R.key)==="rowButton"&&(R.contents=V.value),R)):C.push({key:"rowButton",contents:V.value}),l("change",C)},tt=()=>{h.value=!1,O.value="",K.value=[],W.value=[]},at=g=>{d.value=!0;let C=[];St==null||St.forEach(U=>{k.value++,C.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:k.value,contents:U==null?void 0:U.options})}),D.value=C,H.value=g==null?void 0:g.id,T.value=C},Le=g=>{var C;m.value=bl(p.cloneDeep(m.value),g==null?void 0:g.id),l("change",(C=p.cloneDeep(i.originalItemContents))==null?void 0:C.map(U=>{var J;return(U==null?void 0:U.key)==="header"&&(U.contents=(J=m.value)!=null&&J.some(v=>v==null?void 0:v.children)?[m.value]:m.value),U}))},ce=g=>{var U,J,v;g.type==="fix"?g.id!==""?m.value=xl(m.value,g):m.value=kl(m.value,g==null?void 0:g.contents):m.value=wl(m.value,g),m.value=(U=m.value)!=null&&U.some(F=>F==null?void 0:F.children)?[m.value]:m.value,O.value="";let C=p.cloneDeep(i.originalItemContents);(J=p.cloneDeep(i.originalItemContents))!=null&&J.find(F=>(F==null?void 0:F.key)==="header")?C=(v=p.cloneDeep(i.originalItemContents))==null?void 0:v.map(F=>((F==null?void 0:F.key)==="header"&&(F.contents=m.value),F)):C.push({key:"header",contents:m.value}),l("change",C)},le=g=>{var U;d.value=!0;let C=[];St==null||St.forEach(J=>{k.value++,C.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:g[J.key],id:k.value,contents:J==null?void 0:J.options})}),g!=null&&g.children&&((U=g==null?void 0:g.children)==null?void 0:U.length)>0&&C.push({children:g==null?void 0:g.children,isFormColHidden:!0}),O.value=g==null?void 0:g.id,H.value="",D.value=C,T.value=C},re=g=>{let C=p.cloneDeep(T.value);C=C==null?void 0:C.map(U=>(U.children||(U.value=g==null?void 0:g[U.name]),U)),T.value=C},Te=()=>{d.value=!1,O.value="",H.value="",T.value=[]},Xe=()=>{var U,J,v,F,ee,R;D.value=T.value;let g={};if(O.value!==""?g.id=O.value:(k.value++,g.id="id"+k.value),(U=D.value)==null||U.forEach(pe=>{const L=St==null?void 0:St.find(Y=>(Y==null?void 0:Y.label)===(pe==null?void 0:pe.label));L?g[L.key]=pe.value:pe!=null&&pe.children&&pe.children.length>0&&(g.children=pe.children)}),(J=m.value)!=null&&J.find(pe=>pe.id===g.id))m.value=(v=m.value)==null?void 0:v.map(pe=>(pe.id===g.id&&(pe=g),pe));else{let pe=p.cloneDeep(m.value)??[];H.value===""?pe.push(g):pe=pe==null?void 0:pe.map(L=>(L.id===H.value&&(L.children||(L.children=[]),L.children.push(g)),L)),m.value=pe}m.value=(F=m.value)!=null&&F.some(pe=>pe==null?void 0:pe.children)?[m.value]:m.value,d.value=!1,O.value="",H.value="";let C=p.cloneDeep(i.originalItemContents);(ee=p.cloneDeep(i.originalItemContents))!=null&&ee.find(pe=>(pe==null?void 0:pe.key)==="header")?C=(R=p.cloneDeep(i.originalItemContents))==null?void 0:R.map(pe=>((pe==null?void 0:pe.key)==="header"&&(pe.contents=m.value),pe)):C.push({key:"header",contents:m.value}),l("change",C)},dt=g=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,U;m.value=(C=p.cloneDeep(m.value))==null?void 0:C.filter(J=>(J==null?void 0:J.id)!==(g==null?void 0:g.id)),l("change",(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(J=>{var v;return(J==null?void 0:J.key)==="header"&&(J.contents=(v=m.value)!=null&&v.some(F=>F==null?void 0:F.children)?[m.value]:m.value),J})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var g,C,U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(c.value=p.cloneDeep(i.originalItemContents),m.value=(C=(g=c.value)==null?void 0:g.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:C.contents,V.value=(J=(U=c.value)==null?void 0:U.find(P=>(P==null?void 0:P.key)==="rowButton"))==null?void 0:J.contents,ke.value=(F=(v=c.value)==null?void 0:v.find(P=>(P==null?void 0:P.key)==="extraButton"))==null?void 0:F.contents,E.value=(R=(ee=c.value)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="page"))!=null&&R.contents?!!((L=(pe=c.value)==null?void 0:pe.find(P=>(P==null?void 0:P.key)==="page"))!=null&&L.contents):!1,se.value=(ie=(Y=c.value)==null?void 0:Y.find(P=>(P==null?void 0:P.key)==="tableToForm"))==null?void 0:ie.contents,m.value=(ge=m.value)==null?void 0:ge.map((P,he)=>(Array.isArray(P)?P=$r(P):P={label:(P==null?void 0:P.label)??"",prop:(P==null?void 0:P.label)==="操作"?"operate":P==null?void 0:P.prop,width:P!=null&&P.width?parseInt(P.width):"",fixed:(P==null?void 0:P.fixed)??void 0,sortable:(P==null?void 0:P.sortable)??!1,align:(P==null?void 0:P.align)??"left",showOverflowTooltip:(P==null?void 0:P.showOverflowTooltip)??!0,isNotDrag:(P==null?void 0:P.isNotDrag)??!1,isEditCol:(P==null?void 0:P.isEditCol)??!1,isOperate:(P==null?void 0:P.isOperate)??!1,id:(P==null?void 0:P.id)??he,formMenuSelect:(P==null?void 0:P.formMenuSelect)??void 0,groupSelect:(P==null?void 0:P.groupSelect)??void 0},P)),m.value=($=m.value)!=null&&$.every(P=>Array.isArray(P))?(oe=m.value)==null?void 0:oe[0]:m.value,V.value=(X=V.value)==null?void 0:X.map((P,he)=>P={label:(P==null?void 0:P.label)??"",type:(P==null?void 0:P.type)??"",textColor:(P==null?void 0:P.textColor)??"#000000",id:(P==null?void 0:P.id)??he}),ke.value=(_e=ke.value)==null?void 0:_e.map((P,he)=>P={label:(P==null?void 0:P.label)??"",type:(P==null?void 0:P.type)??"",background:(P==null?void 0:P.background)??"var(--ssComponent-primary-color)",id:(P==null?void 0:P.id)??he}),se.value)se.value=(Ee=se.value)==null?void 0:Ee.map(P=>{k.value++;let he=P;return he.id=k.value,he});else{let P=[];const he=(fe=Ne.getColumnChild(p.cloneDeep(m.value)))==null?void 0:fe.filter(ae=>(ae==null?void 0:ae.prop)!=="operate");he==null||he.forEach(ae=>{var Be;k.value++,P.push({label:ae==null?void 0:ae.label,name:(ae==null?void 0:ae.prop)||(ae==null?void 0:ae.label),type:ae!=null&&ae.groupSelect?"Select":"Input",value:"",id:k.value,contents:ae==null?void 0:ae.options,menuSelect:ae==null?void 0:ae.formMenuSelect,groupSelect:(Be=ae==null?void 0:ae.groupSelect)==null?void 0:Be.split(":"),selectRelateType:"关联绑定列"})}),se.value=P}},{deep:!0,immediate:!0}),(g,C)=>{const U=e.resolveComponent("svg-icon"),J=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",si,[e.createElementVNode("div",ci,[e.createElementVNode("div",ui,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(J,{class:"icon-content",onClick:Ye,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",di,[e.createElementVNode("div",fi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",hi,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>at(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>le(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>dt(v)},null,8,["onClick"])])]),v!=null&&v.children&&v.children.length>0?(e.openBlock(),e.createElementBlock("div",vi,[e.createVNode(Dl,{tableChildContents:v==null?void 0:v.children,onDeleteChange:Le,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",gi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",yi,[e.createElementVNode("div",bi,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",ki,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ee=>Re(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>Oe(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",xi,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:$e},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Di,[e.createElementVNode("div",Ci,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Ei,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ee=>st(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>q(v)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",_i,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:nt},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.value,(v,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",Bi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ee=>ne(v)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>te(v)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Ai,[e.createElementVNode("div",Ni,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":C[0]||(C[0]=v=>E.value=v)},null,8,["modelValue"])])])]),e.createVNode(Yt.ssDialog,{visible:d.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Oi,[e.createVNode(J,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(J,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:h.value,onBeforeDestroy:tt,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Mi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:W.value,key:W.value,isEnableWrap:!0,onChange:lt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zi,[e.createVNode(J,{onClick:tt,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(J,{class:"ok-button button",onClick:Z,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:G.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ri,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:ye},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Li,[e.createVNode(J,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(J,{class:"ok-button button",onClick:M,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:x.value,onBeforeDestroy:ve,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Pi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:ze,onChangeVisible:Ie,onBlurChange:ue},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fi,[e.createVNode(J,{onClick:ve,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(J,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ji=Lt._export_sfc($i,[["__scopeId","data-v-7a6b87b5"]]),Ki=jt.useModelComp(p.pinia),{pageMapState:Ui}=p.storeToRefs(Ki),Wi=jt.useMenuState(p.pinia),{activeMenuPath:Hi}=p.storeToRefs(Wi),qi=e.ref(24),Gi=e.ref(6),Xi=e.ref(70),Yi=e.ref(.18),Ji=e.ref(45),Qi=(a,s,i,l)=>{var c,d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||s%2*12,y:((m=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:m.y)||s,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||qi.value,h:((T=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:T.h)||i,minW:((H=(O=a==null?void 0:a.value)==null?void 0:O.tableData)==null?void 0:H.minW)||Gi.value,minH:((ke=(V=a==null?void 0:a.value)==null?void 0:V.tableData)==null?void 0:ke.minH)||Yi.value,maxH:((K=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:K.maxH)||Ji.value,i:((w=(G=a==null?void 0:a.value)==null?void 0:G.tableData)==null?void 0:w.i)||s,id:(a==null?void 0:a.id)||s+"",component:l}},Zi=(a,s)=>{var l,c,d,x,m,h,D,E;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(((x=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:x.length)===0)return 2}else((m=a==null?void 0:a.comp)==null?void 0:m.toUpperCase())==="FORM"&&(i=((E=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:D.contents)==null?void 0:E.length)/5);return i*2},Cl=(a,s,i)=>{var x,m;const l=(m=(x=Ui.value)==null?void 0:x[Hi.value])==null?void 0:m.filter(h=>{var D;return((D=h==null?void 0:h.key)==null?void 0:D.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var D,E,T;return((T=(E=(D=h==null?void 0:h.value)==null?void 0:D.tableData)==null?void 0:E.component)==null?void 0:T.id)===a.id}),d=Zi(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Cl(h,D))),{...Qi(c,s,d,a)}},es=(a,s)=>{if((a==null?void 0:a.length)===0)return[];const i=p.cloneDeep(a);return Array.isArray(a)?i==null?void 0:i.map((l,c)=>Cl(l,c)):[]},ts=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}]}]}}),ns=(a,s)=>a==null?void 0:a.map(i=>{for(const l in s)if(l===(i==null?void 0:i.prop))return{...i,value:s[l]};return i}),as=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([]);e.watch(()=>i.compType,m=>{var E;const h=ts(i==null?void 0:i.optionItems),D=m?(E=h[m==null?void 0:m.toUpperCase()])==null?void 0:E[i==null?void 0:i.target]:[];c.value=D==null?void 0:D.map(T=>{for(const[O,H]of Object.entries((i==null?void 0:i.comp)||{}))if((T==null?void 0:T.prop)===O)return{...T,value:H};return T})},{immediate:!0});const d=m=>Nt.getComponent(m),x=m=>{var h,D;(m==null?void 0:m.prop)==="layout"&&(m==null?void 0:m.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var T;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(T=E==null?void 0:E.options)==null?void 0:T.map(O=>({...O,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(D=c.value)==null?void 0:D.map(E=>{var T;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(T=E==null?void 0:E.options)==null?void 0:T.map(O=>({...O,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:i==null?void 0:i.target,styleConfigs:c.value,prop:m==null?void 0:m.prop})};return(m,h)=>{const D=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,T=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:T==null?void 0:T.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T==null?void 0:T.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(T.type)),{modelValue:T.value,"onUpdate:modelValue":O=>T.value=O,content:T==null?void 0:T.options,optionUrl:T==null?void 0:T.optionUrl,disabled:T==null?void 0:T.disabled,activeText:T==null?void 0:T.activeText,inactiveText:T==null?void 0:T.inactiveText,onChange:O=>x(T)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),os=Lt._export_sfc(as,[["__scopeId","data-v-6c233914"]]),ls=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:s}){const i=a,l=s,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),x=K=>K==null?void 0:K.reduce((G,w)=>(G[w==null?void 0:w.prop]=w==null?void 0:w.rule,G),{}),m=e.computed(()=>({formRules:x(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),D=e.ref(""),E=(K,G,w)=>{var A;let z=[];(i==null?void 0:i.activeTabName)==="任务配置"?(z=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:G}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(z=[{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:(A=i==null?void 0:i.relatedData)==null?void 0:A.map(I=>({label:I==null?void 0:I.任务名称,value:I==null?void 0:I.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let k;return w&&(w==null?void 0:w.length)>0?k=[...z,...T(K,G,w)]:k=z,k},T=(K,G,w)=>{const z=[{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 w?z==null?void 0:z.filter(k=>w==null?void 0:w.includes(k==null?void 0:k.prop)):z},O=(K,G)=>{var I,se,$e,nt,Ie,ze,ue,_,ne;const w=((Ie=(nt=($e=(se=(I=i==null?void 0:i.comp)==null?void 0:I.compData)==null?void 0:se.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:$e.contents)==null?void 0:nt.filter(te=>(te==null?void 0:te.label)!=="操作"))==null?void 0:Ie.map(te=>({value:te==null?void 0:te.prop,label:te.label})))||[],z=/button/i,k=((ne=(_=(ue=(ze=i==null?void 0:i.comp)==null?void 0:ze.compData)==null?void 0:ue.filter(te=>z.test(te==null?void 0:te.key)))==null?void 0:_.flatMap(te=>te==null?void 0:te.contents))==null?void 0:ne.map(te=>({value:te==null?void 0:te.label,label:te.label})))||[],A=E(w,k,K);h.value=G?ns(A,G):A,K&&(K==null?void 0:K.length)>0&&d.value.push(...K==null?void 0:K.map(te=>({prop:te,rule:c})))};e.onMounted(()=>{O(null,i==null?void 0:i.extendItem)});const H=K=>{const G=K==null?void 0:K[D.value];if(D.value==="执行任务"){if(!(G!=null&&G.join("/")))return;const w=G==null?void 0:G.join("/");O(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,K)}},V=K=>{l("change",{target:i==null?void 0:i.target,extendConfigs:K})},ke=(K,G)=>{D.value=G==null?void 0:G.changeProp,H(K)},W=K=>{l("onButtonClick",K)};return(K,G)=>(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:m.value.formRules,buttonValue:m.value.buttonValue,onChange:V,onBlurChange:ke,onOnButtonClick:W},null,8,["rowContents","formRules","buttonValue"]))}}),rs=Lt._export_sfc(ls,[["__scopeId","data-v-7c660c1f"]]),is={};function ss(a,s){return null}const cs=Lt._export_sfc(is,[["render",ss]]),us={class:"form-operate-content"},ps={class:"form-operate-item"},ds={class:"operate-title"},fs={class:"operate-content"},hs={class:"fix-content"},vs={class:"fix-button"},gs={class:"operate-title"},ms={class:"operate-content"},ys={class:"fix-content"},bs={class:"fix-button"},ks={style:{display:"flex","justify-content":"space-between"}},xs={class:"form-content"},ws={class:"dialog-footer"},Ds={class:"form-content"},Cs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref(!1),d=e.ref([]),x=e.ref([]),m=e.ref(!1),h=e.ref([]),D=e.ref([]),E=e.ref(""),T=e.ref(!1),O=e.ref(0),H=e.ref([]),V=e.ref([]),ke=(_,ne)=>{if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="selectRelateType"){const te=ne==null?void 0:ne.optionUrl;return(te==null?void 0:te.selectRelateType)||ne[_.key]}if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="menuSelect"){const te=ne==null?void 0:ne.optionUrl;return(te==null?void 0:te.menuSelect)||ne[_.key]}if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="groupSelect"){const te=ne==null?void 0:ne.optionUrl;return(te==null?void 0:te.groupSelect)||ne[_.key]}if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="originalContent")return(ne==null?void 0:ne.value)||ne[_.key];if((ne==null?void 0:ne.type)=="Select"&&(_==null?void 0:_.key)==="multiple"){const te=ne[_.key];return ml(te)?te:_.default}return(_==null?void 0:_.label)==="类型"&&ne[_.key]===""?"Input":(_==null?void 0:_.key)==="isFormColHidden"&&!ne[_.key]?!1:ne[_.key]},W=async _=>{var ve,Ue,st,q,M,ye;c.value=!0;let ne=[];const te=await((st=(Ue=(ve=Ne.FormContent)==null?void 0:ve.find(xe=>(xe==null?void 0:xe.key)===((_==null?void 0:_.type)===""?"Input":_==null?void 0:_.type)))==null?void 0:Ue.value)==null?void 0:st.value)??((M=(q=Ne.FormContent)==null?void 0:q.find(xe=>(xe==null?void 0:xe.key)===((_==null?void 0:_.type)===""?"Input":_==null?void 0:_.type)))==null?void 0:M.value);if(te==null||te.forEach(xe=>{O.value++,ne.push({label:xe==null?void 0:xe.label,name:xe==null?void 0:xe.label,type:xe.type,prop:xe==null?void 0:xe.prop,value:ke(xe,_),id:O.value,contents:xe==null?void 0:xe.options,width:(_==null?void 0:_.width)??1})}),_!=null&&_.menuSelect&&((ye=_==null?void 0:_.menuSelect)==null?void 0:ye.length)>0){const xe=await Ne.menuToContentType(_==null?void 0:_.menuSelect);ne=ne==null?void 0:ne.map(Re=>((Re==null?void 0:Re.name)==="组信息选项"&&(Re.contents=xe),Re))}E.value=_==null?void 0:_.id,d.value=await Ne.selectToBase(Ne.formToOptionsContents(ne)),x.value=await Ne.selectToBase(Ne.formToOptionsContents(ne))},K=_=>{var te;m.value=!0;let ne=[];(te=Ne.FormButton)==null||te.forEach(ve=>{O.value++,ne.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:(ve==null?void 0:ve.label)==="类型"&&_[ve.key]===""?"normal":_[ve.key],id:O.value,contents:ve==null?void 0:ve.options})}),H.value=ne,V.value=ne,E.value=_==null?void 0:_.id};e.watch(()=>T.value,()=>{var ne,te;let _=p.cloneDeep(i.originalItemContents);(ne=p.cloneDeep(i.originalItemContents))!=null&&ne.find(ve=>(ve==null?void 0:ve.key)==="enableWrap")?_=(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(ve=>((ve==null?void 0:ve.key)==="enableWrap"&&(ve.contents=!T.value),ve)):_.push({key:"enableWrap",contents:!T.value}),l("change",_)},{deep:!0});const G=()=>{var te,ve,Ue,st,q;H.value=V.value;let _={};if(E.value!==""?_.id=E.value:(O.value++,_.id="id"+O.value),(te=H.value)==null||te.forEach(M=>{var xe;const ye=(xe=Ne.FormButton)==null?void 0:xe.find(Re=>(Re==null?void 0:Re.label)===(M==null?void 0:M.label));ye&&(_[ye.key]=M.value)}),(ve=h.value)!=null&&ve.find(M=>M.id===_.id))h.value=(Ue=h.value)==null?void 0:Ue.map(M=>(M.id===_.id&&(M=_),M));else{let M=p.cloneDeep(h.value);h.value||(h.value=[]),M.push(_),h.value=M}m.value=!1,E.value="";let ne=p.cloneDeep(i.originalItemContents);(st=p.cloneDeep(i.originalItemContents))!=null&&st.find(M=>(M==null?void 0:M.key)==="formButton")?ne=(q=p.cloneDeep(i.originalItemContents))==null?void 0:q.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=h.value),M)):ne.push({key:"formButton",contents:h.value}),l("change",ne)},w=_=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,te;D.value=(ne=p.cloneDeep(D.value))==null?void 0:ne.filter(ve=>(ve==null?void 0:ve.id)!==(_==null?void 0:_.id)),l("change",(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(ve=>((ve==null?void 0:ve.key)==="formContent"&&(ve.contents=D.value),ve))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=_=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,te;h.value=(ne=p.cloneDeep(h.value))==null?void 0:ne.filter(ve=>(ve==null?void 0:ve.id)!==(_==null?void 0:_.id)),l("change",(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(ve=>((ve==null?void 0:ve.key)==="formButton"&&(ve.contents=h.value),ve))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var ne;m.value=!0;let _=[];(ne=Ne.FormButton)==null||ne.forEach(te=>{O.value++,_.push({label:te==null?void 0:te.label,name:te==null?void 0:te.label,type:te.type,value:(te==null?void 0:te.label)==="类型"?"normal":"",id:O.value,contents:te==null?void 0:te.options})}),H.value=_,V.value=_},A=()=>{var ne,te,ve;c.value=!0;let _=[];(ve=(te=(ne=Ne.FormContent)==null?void 0:ne.find(Ue=>(Ue==null?void 0:Ue.key)==="Input"))==null?void 0:te.value)==null||ve.forEach(Ue=>{O.value++,_.push({label:Ue==null?void 0:Ue.label,name:Ue==null?void 0:Ue.label,type:Ue.type,value:(Ue==null?void 0:Ue.label)==="类型"?"Input":"",id:O.value,contents:Ue==null?void 0:Ue.options})}),d.value=_,x.value=_},I=_=>{let ne=p.cloneDeep(V.value);ne=ne==null?void 0:ne.map(te=>(te.value=_==null?void 0:_[te.name],te)),V.value=ne},se=_=>{const ne=_.find(Ue=>(Ue==null?void 0:Ue.name)==="类型");if((ne==null?void 0:ne.value)!="Select")return;const te=_.find(Ue=>(Ue==null?void 0:Ue.name)==="多选"),ve=_.find(Ue=>(Ue==null?void 0:Ue.name)==="初始值");te!=null&&te.value&&Ao.isString(ve.value)&&(ve.value=[ve.value]),!(te!=null&&te.value)&&!Ao.isString(ve.value)&&(ve.value="")},$e=async _=>{var ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye;if((_==null?void 0:_.类型)!==((te=(ne=x.value)==null?void 0:ne.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:te.value)){let qe=[];const lt=await((st=(Ue=(ve=Ne.FormContent)==null?void 0:ve.find(Z=>(Z==null?void 0:Z.key)===((_==null?void 0:_.类型)===""?"Input":_==null?void 0:_.类型)))==null?void 0:Ue.value)==null?void 0:st.value)?await((Re=(xe=(ye=Ne.FormContent)==null?void 0:ye.find(Z=>(Z==null?void 0:Z.key)===((_==null?void 0:_.类型)===""?"Input":_==null?void 0:_.类型)))==null?void 0:xe.value)==null?void 0:Re.value):(M=(q=Ne.FormContent)==null?void 0:q.find(Z=>(Z==null?void 0:Z.key)===((_==null?void 0:_.类型)===""?"Input":_==null?void 0:_.类型)))==null?void 0:M.value;if(lt==null||lt.forEach(Z=>{var at,Le;O.value++;const tt=Ne.isUndefined(Z==null?void 0:Z.default)?(_==null?void 0:_[Z.label])??Z.value??"":Z==null?void 0:Z.default;qe.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:tt,prop:Z==null?void 0:Z.prop,id:O.value,contents:Z==null?void 0:Z.options,width:((Le=(at=x.value)==null?void 0:at[0])==null?void 0:Le.width)??1})}),_!=null&&_.菜单选项&&((Oe=_==null?void 0:_.菜单选项)==null?void 0:Oe.length)>0){const Z=await Ne.menuToContentType(_==null?void 0:_.菜单选项);qe=qe==null?void 0:qe.map(tt=>((tt==null?void 0:tt.name)==="组信息选项"&&(tt.contents=Z),tt))}se(qe),x.value=await Ne.selectToBase(p.cloneDeep(qe)),d.value=await Ne.selectToBase(p.cloneDeep(qe))}else{let qe=p.cloneDeep(x.value);if(qe=qe==null?void 0:qe.map(lt=>(lt.value=_==null?void 0:_[lt.name],lt)),_!=null&&_.菜单选项&&((Ye=_==null?void 0:_.菜单选项)==null?void 0:Ye.length)>0){const lt=await Ne.menuToContentType(_==null?void 0:_.菜单选项);qe=qe==null?void 0:qe.map(Z=>((Z==null?void 0:Z.name)==="组信息选项"&&(Z.contents=lt),Z))}qe=Ne.formToOptionsContents(qe),se(qe),x.value=await Ne.selectToBase(p.cloneDeep(qe))}},nt=_=>{_||(d.value=x.value)},Ie=async _=>{await $e(_),d.value=x.value},ze=Ne.debounce(async()=>{var ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt;d.value=x.value;let _={};_.width=((Ue=(ve=d.value)==null?void 0:ve[0])==null?void 0:Ue.width)??1,E.value!==""?_.id=E.value:(O.value++,_.id="id"+O.value);let ne=await((M=(q=(st=Ne.FormContent)==null?void 0:st.find(Z=>{var tt,at;return(Z==null?void 0:Z.key)===(((at=(tt=d.value)==null?void 0:tt.find(Le=>(Le==null?void 0:Le.label)==="类型"))==null?void 0:at.value)??"label")}))==null?void 0:q.value)==null?void 0:M.value)??((xe=(ye=Ne.FormContent)==null?void 0:ye.find(Z=>{var tt,at;return(Z==null?void 0:Z.key)===(((at=(tt=d.value)==null?void 0:tt.find(Le=>(Le==null?void 0:Le.label)==="类型"))==null?void 0:at.value)??"label")}))==null?void 0:xe.value);if((Re=d.value)==null||Re.forEach(Z=>{const tt=ne==null?void 0:ne.find(at=>(at==null?void 0:at.label)===(Z==null?void 0:Z.label));tt&&(_[tt.key]=Z.value)}),_.width=_.width?_.width:1,_.key=_==null?void 0:_.label,_.isFormColHidden=_==null?void 0:_.isFormColHidden,(Oe=D.value)!=null&&Oe.find(Z=>Z.id===_.id))D.value=(Ye=D.value)==null?void 0:Ye.map(Z=>(Z.id===_.id&&(Z=_),Z));else{let Z=p.cloneDeep(D.value);Z.push(_),D.value=Z}D.value=D.value.map(({id:Z,...tt})=>tt),c.value=!1,E.value="";let te=p.cloneDeep(i.originalItemContents);(qe=p.cloneDeep(i.originalItemContents))!=null&&qe.find(Z=>(Z==null?void 0:Z.key)==="formContent")?te=(lt=p.cloneDeep(i.originalItemContents))==null?void 0:lt.map(Z=>((Z==null?void 0:Z.key)==="formContent"&&(Z.contents=D.value),Z)):te.push({key:"formContent",contents:D.value}),l("change",te)},300),ue=()=>{c.value=!1,m.value=!1,E.value="",x.value=[],V.value=[]};return e.watch(()=>i.originalItemContents,()=>{var ne,te,ve,Ue,st,q;if(!i.originalItemContents||i.originalItemContents.length===0)return;const _=p.cloneDeep(i.originalItemContents);D.value=((ne=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:ne.contents)??[],h.value=((te=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:te.contents)??[],T.value=(ve=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&ve.contents?!((Ue=_==null?void 0:_.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ue.contents):!0,D.value=(st=p.cloneDeep(D.value))==null?void 0:st.map((M,ye)=>{var Re;let xe=M;return xe.id=(M==null?void 0:M.id)??ye,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((Re=M==null?void 0:M.options)==null?void 0:Re.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,xe}),D.value=Ne.formToOptionsContents(D.value),h.value=(q=h.value)==null?void 0:q.map((M,ye)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:ye})},{deep:!0,immediate:!0}),(_,ne)=>{const te=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",us,[e.createElementVNode("div",ps,[e.createElementVNode("div",ds,[ne[2]||(ne[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[1]||(ne[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",hs,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",vs,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>W(Ue)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>w(Ue)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",gs,[ne[4]||(ne[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[3]||(ne[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ue,st)=>(e.openBlock(),e.createElementBlock("div",{key:st},[e.createElementVNode("div",ys,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",bs,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>K(Ue)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>z(Ue)},null,8,["onClick"])])])]))),128))]),ne[6]||(ne[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",ks,[ne[5]||(ne[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:T.value,"onUpdate:modelValue":ne[0]||(ne[0]=Ue=>T.value=Ue)},null,8,["modelValue"])])]),e.createVNode(Yt.ssDialog,{visible:c.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:$e,onChangeVisible:nt,onBlurChange:Ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ws,[e.createVNode(ve,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ve,{class:"ok-button button",onClick:e.unref(ze),id:"themeButton"},{default:e.withCtx(()=>ne[8]||(ne[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Yt.ssDialog,{visible:m.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ds,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:ue,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:G},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Oo=Lt._export_sfc(Cs,[["__scopeId","data-v-20850524"]]),Es={class:"step-module content"},_s={class:"module-data"},Ss={class:"step-module layout"},Ts={class:"form-content"},Is=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),m=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),E=e.ref([]),T=W=>{var K;D.value=W,l("change",(K=V())==null?void 0:K.compData)},O=(W,K)=>{var G,w;switch(W){case"create":(G=d.value)==null||G.forEach(z=>{z.value=""}),h.value="create",m.visible=!0;break;case"update":(w=d.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),h.value="update",m.visible=!0;break;case"delete":E.value.splice(K,1),h.value="delete";break}},H=W=>{var K,G,w;if((W==null?void 0:W.buttonName)==="确认"){const z=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(z).forEach(k=>{z[k]===""&&delete z[k]}),h.value){case"create":E.value.push({...z,index:((K=E.value)==null?void 0:K.length)+1});break;case"update":E.value=(G=E.value)==null?void 0:G.map(k=>k.index===(z==null?void 0:z.index)?{...k,title:z==null?void 0:z.title,description:z==null?void 0:z.description}:k);break}l("change",(w=V())==null?void 0:w.compData),m.visible=!1}else m.visible=!1},V=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:D.value}]}),ke=()=>{m.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,W=>{var K,G;W&&(D.value=((K=W==null?void 0:W.find(w=>w.key==="stepConfig"))==null?void 0:K.contents)??{},E.value=((G=W==null?void 0:W.find(w=>w.key==="stepList"))==null?void 0:G.contents)??[])},{immediate:!0}),(W,K)=>{const G=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Es,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>O("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ss,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:c.value,onChange:T},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:m.visible,title:m.title,onBeforeDestroy:ke,width:m.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ts,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Bs=Lt._export_sfc(Is,[["__scopeId","data-v-7dbd17f2"]]),As={class:"step-module content"},Ns={class:"module-data"},Vs={class:"step-module layout"},Os={class:"form-content"},Ms=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref("create"),d=e.ref({}),x=e.ref([]),m=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),T=W=>{var K;d.value=W,l("change",(K=V())==null?void 0:K.compData)},O=(W,K)=>{var G,w;switch(W){case"create":(G=h.value)==null||G.forEach(z=>{z.value=""}),c.value="create",E.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),c.value="update",E.visible=!0;break;case"delete":x.value.splice(K,1),c.value="delete";break}},H=W=>{var K,G,w,z;if((W==null?void 0:W.buttonName)==="确认"){const k=p.cloneDeep(W==null?void 0:W.content);switch(Object.keys(k).forEach(A=>{k[A]===""&&delete k[A]}),c.value){case"create":(G=x.value)==null||G.push({...k,index:((K=x.value)==null?void 0:K.length)+1});break;case"update":x.value=(w=x.value)==null?void 0:w.map(A=>A.index===(k==null?void 0:k.index)?{...A,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:A);break}l("change",(z=V())==null?void 0:z.compData),E.visible=!1}else E.visible=!1},V=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:d.value}]}),ke=()=>{E.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,W=>{var K,G;W&&(d.value=((K=W==null?void 0:W.find(w=>w.key==="timeLineConfig"))==null?void 0:K.contents)??{},x.value=((G=W==null?void 0:W.find(w=>w.key==="timeLineList"))==null?void 0:G.contents)??[])},{immediate:!0}),(W,K)=>{const G=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",As,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>O("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>O("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Vs,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:m.value,onChange:T},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:ke,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),zs=Lt._export_sfc(Ms,[["__scopeId","data-v-39ffc861"]]),Rs={};function Ls(a,s){return e.openBlock(),e.createElementBlock("div")}const Ps=Lt._export_sfc(Rs,[["render",Ls]]),Fs={class:"extra-content"},$s={key:0},js={key:1},Ks={class:"dialog-footer"},Us={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:s}){const i=a,l=e.ref(0),c=e.ref(),d=e.ref(),x=s,m=e.ref(!1),h=e.ref({}),D=e.ref({}),E=e.ref();e.watch(()=>[i.itemData],()=>{var z;const w=p.cloneDeep(i.itemData);c.value=(z=p.cloneDeep(w))==null?void 0:z.map(k=>{var A;if(k.key==="extra"){let I=[];(A=k.value)==null||A.forEach(se=>{var $e;I.push(($e=Object.values(se))==null?void 0:$e[0])}),k.value=I}return k})},{deep:!0,immediate:!0});const T=(w,z,k,A)=>{var se;let I={};((se=w==null?void 0:w[0])==null?void 0:se.contents)==="详情"&&(m.value=!0,I[z]=w,d.value=w==null?void 0:w.filter($e=>($e==null?void 0:$e.key)!=="tableContentName"),h.value=I,D.value=k,E.value=A.id)},O=w=>{var $e,nt,Ie,ze;const z=(nt=($e=Object.values(p.cloneDeep(h.value)))==null?void 0:$e[0])==null?void 0:nt.filter(ue=>(ue==null?void 0:ue.key)==="tableContentName"),k=(ze=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:ze.filter(ue=>(ue==null?void 0:ue.key)!=="tableContentName"),A=k==null?void 0:k.map((ue,_)=>{var ne;return _===w.index&&(ue==null?void 0:ue.comp)==="Table"&&(ue.compData=(ne=ue.compData)==null?void 0:ne.map(te=>{var ve,Ue;return(te==null?void 0:te.key)==="tableContents"&&(te.contents=(Ue=(ve=w.content)==null?void 0:ve.map(st=>{let q={};for(let M in st)M!=="id"&&(q[M]=st[M]);return q}))==null?void 0:Ue.map(st=>Object.values(st))),te})),ue});A.unshift(z==null?void 0:z[0]);let I=p.cloneDeep(h.value),se={};for(let ue in I)se[ue]=A;h.value=se},H=()=>{m.value=!1,h.value={},D.value={},E.value=void 0,l.value++},V=w=>{var $e,nt,Ie,ze;const z=(nt=($e=Object.values(p.cloneDeep(h.value)))==null?void 0:$e[0])==null?void 0:nt.filter(ue=>(ue==null?void 0:ue.key)==="tableContentName"),k=(ze=(Ie=Object.values(p.cloneDeep(h.value)))==null?void 0:Ie[0])==null?void 0:ze.filter(ue=>(ue==null?void 0:ue.key)!=="tableContentName"),A=k==null?void 0:k.map((ue,_)=>(_===w.index&&(ue.compData=w.contents),ue));A.unshift(z==null?void 0:z[0]);let I=p.cloneDeep(h.value),se={};for(let ue in I)se[ue]=A;h.value=se},ke=()=>{var z,k;let w={};for(let A in D.value)A===((z=Object.keys(h.value))==null?void 0:z[0])?w[A]=(k=Object.values(h.value))==null?void 0:k[0]:w[A]=D.value[A];x("change",{buttonName:"编辑",index:E.value,singleContent:w},"methodData"),m.value=!1,h.value={},D.value={},E.value=void 0},W=()=>{m.value=!1,h.value={},D.value={},E.value=void 0},K=w=>{x("change",w,"methodData")},G=w=>ya(w);return(w,z)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,I)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(A==null?void 0:A.key)==="extra"?(e.openBlock(),e.createElementBlock("div",$s)):(e.openBlock(),e.createElementBlock("div",js,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(A.comp)),{itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,key:I,index:(A==null?void 0:A.id)??I,onContentClick:T,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Yt.ssDialog,{visible:m.value,onBeforeDestroy:W},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(A,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(A.comp)),{itemData:A==null?void 0:A.compData,onChange:O,childItemData:A==null?void 0:A.itemChildData,key:I,onContentChange:V,index:(A==null?void 0:A.id)??I,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",Ks,[e.createVNode(k,{class:"cancel-button footer-button",onClick:H,id:"themeBorderButton"},{default:e.withCtx(()=>z[0]||(z[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>z[1]||(z[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Ws=Lt._export_sfc(Us,[["__scopeId","data-v-2d9c5ab2"]]);let Et="$R";const Hs=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),qs=a=>{var i,l;let s=a.trim();if((s==null?void 0:s[0])!=="["&&(s==null?void 0:s[0])!=="{"){let c=(l=(i=s==null?void 0:s.replace(":",Et))==null?void 0:i.split(Et))==null?void 0:l[1];return!!(c&&(c==null?void 0:c[0])!=="["&&(c==null?void 0:c[0])!=="{")}else return!1},Gs=a=>{var i;let s=a.trim();return(s==null?void 0:s[0])!=="["&&(s==null?void 0:s[0])!=="{"&&((i=Ga(s,","))==null?void 0:i.length)===1},Xs=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),Ys=a=>/\[[^\[\]]*\]=.*$/.exec(p.cloneDeep(a)),Js=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),Da=a=>{let s=a;const i=[];let l="";for(const c of s)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(i.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):i.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return i},_a=(a,s)=>{let i=a;const l=[];let c="",d=0;for(const x of i)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===s?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===s&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},Qs=(a,s)=>{let i=a;const l=[];let c="",d=0;for(const x of i)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===s)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===s||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Mo=(a,s)=>{let i=0;for(let l=0;l<a.length;l++)a[l]===s&&i++;return i%2===0},Ga=(a,s)=>{let i=a;const l=[];let c="",d=0;for(const x of i)d++,x.includes("{")||c.includes("{")||x.includes("[")||c.includes("[")||x.includes("【")||c.includes("【")||x.includes("(")||c.includes("(")||x.includes("(")||c.includes("(")||x.includes("/*")||c.includes("/*")?(c+=x.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===s&&Mo(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=x.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===s&&Mo(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Zs=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),ec=a=>{var s,i,l,c,d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze,ue,_,ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct;if(Js(a)){let Ke={},be=(l=(i=(s=a==null?void 0:a.replace(":",Et))==null?void 0:s.split(Et))==null?void 0:i[0])==null?void 0:l.replaceAll("'",""),De="",Qe="",de=(d=(c=a==null?void 0:a.replace(":",Et))==null?void 0:c.split(Et))==null?void 0:d[1];if((de==null?void 0:de[0])==="("&&(Qe=(h=(m=(x=de==null?void 0:de.split("("))==null?void 0:x[1])==null?void 0:m.split(")"))==null?void 0:h[0],de=(E=(D=de==null?void 0:de.replace(")",Et))==null?void 0:D.split(Et))==null?void 0:E[1]),((T=Ga(de,"/"))==null?void 0:T.length)>1)De=(O=Ga(de,"/"))==null?void 0:O.map(Ae=>Ae==null?void 0:Ae.replaceAll("/","").replaceAll("'",""));else if(de.includes("{")||de.includes("("))if(de.includes("{")?De=De+((G=(K=(W=(ke=(V=(H=de==null?void 0:de.split("{"))==null?void 0:H[1])==null?void 0:V.split("}"))==null?void 0:ke[0])==null?void 0:W.replaceAll(":","/").replaceAll("'",""))==null?void 0:K.replaceAll("[","(["))==null?void 0:G.replaceAll("]","])"))+"[":De=De+((se=(I=(A=(k=(z=(w=de==null?void 0:de.split("("))==null?void 0:w[1])==null?void 0:z.split(")"))==null?void 0:k[0])==null?void 0:A.replaceAll(":","/").replaceAll("'",""))==null?void 0:I.replaceAll("[","(["))==null?void 0:se.replaceAll("]","])"))+"[",!(($e=de==null?void 0:de.split(")"))!=null&&$e[1]))De=De+((ze=(Ie=(nt=de==null?void 0:de.split("["))==null?void 0:nt[1])==null?void 0:Ie.split("]"))==null?void 0:ze[0])+"]";else{const Ae=(te=(ne=(_=(ue=de==null?void 0:de.split(")"))==null?void 0:ue[1])==null?void 0:_.replace("[",Et))==null?void 0:ne.split(Et))==null?void 0:te[1];if(de!=null&&de.includes("?"))De=((ve=de==null?void 0:de.split("?"))==null?void 0:ve[1])+"&&"+((st=(Ue=de==null?void 0:de.split("?"))==null?void 0:Ue[0])==null?void 0:st.replaceAll("#","==="));else if(Ae){const Fe=Ae.lastIndexOf("]"),We=Ae.substring(0,Fe)+Et+Ae.substring(Fe+1);De=De+((q=We==null?void 0:We.split(Et))==null?void 0:q[0])+"]"}else De=(xe=(ye=(M=a==null?void 0:a.replace(":",Et))==null?void 0:M.split(Et))==null?void 0:ye[1])==null?void 0:xe.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))De=(Ye=(Oe=(Re=a==null?void 0:a.replace(":",Et))==null?void 0:Re.split(Et))==null?void 0:Oe[1])==null?void 0:Ye.replaceAll("'","");else{let Ae=(Z=(lt=(qe=a==null?void 0:a.replace(":",Et))==null?void 0:qe.split(Et))==null?void 0:lt[1])==null?void 0:Z.replaceAll("'","");De=((Le=(at=(tt=Ae==null?void 0:Ae.split("?"))==null?void 0:tt[1])==null?void 0:at.split(":"))==null?void 0:Le[0])+"&&"+((ce=Ae==null?void 0:Ae.split("?"))==null?void 0:ce[0])}return Ke[be]=Qe!==""?Qe+"$##"+De:De,{groupName:"",formContents:[[Ke]]}}else{let Ke={},be="",De="";if(a.includes("#")){be=(re=(le=a==null?void 0:a.split("#"))==null?void 0:le[0])==null?void 0:re.replaceAll("'","");let Qe=(Xe=(Te=a==null?void 0:a.split("#"))==null?void 0:Te[1])==null?void 0:Xe.replaceAll("'","");Qe!=null&&Qe.includes("{")?De=De+((U=(C=(g=(dt=Qe==null?void 0:Qe.split("{"))==null?void 0:dt[1])==null?void 0:g.split("}"))==null?void 0:C[0])==null?void 0:U.replaceAll(":","/").replaceAll("'",""))+"[":De=De+((ee=(F=(v=(J=Qe==null?void 0:Qe.split("("))==null?void 0:J[1])==null?void 0:v.split(")"))==null?void 0:F[0])==null?void 0:ee.replaceAll(":","/").replaceAll("'",""))+"[",De=De+((ge=(pe=(R=Qe==null?void 0:Qe.replace("[",Et))==null?void 0:R.split(Et))==null?void 0:pe[1])==null?void 0:ge.slice(0,((ie=(Y=(L=Qe==null?void 0:Qe.replace("[",Et))==null?void 0:L.split(Et))==null?void 0:Y[1])==null?void 0:ie.length)-1))}else{let Qe=(X=(oe=($=a==null?void 0:a.split("]"))==null?void 0:$[0])==null?void 0:oe.split("["))==null?void 0:X[1];if((_e=Qe==null?void 0:Qe.split(":"))==null||_e.forEach((de,Ae)=>{var Fe;((Fe=Qe==null?void 0:Qe.split(":"))==null?void 0:Fe.length)-1===Ae&&(be=de==null?void 0:de.replaceAll("'",""))}),!(a!=null&&a.includes("[")))De=((he=(P=(Ee=(fe=a==null?void 0:a.split("]"))==null?void 0:fe[1])==null?void 0:Ee.replace(":",Et).split(Et))==null?void 0:P[1])==null?void 0:he.replaceAll("'",""))??"";else{let de=(me=(Ve=(Me=(Je=(Be=(ae=p.cloneDeep(a))==null?void 0:ae.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll("{","").replaceAll("}",""))==null?void 0:me.replaceAll("'","").replaceAll(":","/"),Ae="";(ct=Qe==null?void 0:Qe.split(":"))==null||ct.forEach(Fe=>{Ae=Ae===""?Ae+(Fe==null?void 0:Fe.replaceAll("'","")):Ae+":"+(Fe==null?void 0:Fe.replaceAll("'",""))}),De=de+"["+Ae+"]"}}return Ke[be]=De,{groupName:"",formContents:[[Ke]]}}},tc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),nc=(a,s)=>{let i=a.length;for(;i--;)if(a[i]===")")return a.substring(0,i)+s+a.substring(i+1);return a},ac=a=>{var d,x,m,h,D;let s=a.slice(1,a.length-1),i;(s==null?void 0:s[0])==="["?i=(x=(d=Da(p.cloneDeep(s)))==null?void 0:d.filter(E=>E!==","))==null?void 0:x.map(E=>E==null?void 0:E.slice(1,E.length-1)):(s="["+p.cloneDeep(s)+"]",i=(h=(m=Da(p.cloneDeep(s)))==null?void 0:m.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),i=(D=p.cloneDeep(i))==null?void 0:D.map(E=>{var T,O;return E=(O=(T=E.replace(")",Et))==null?void 0:T.split(Et))==null?void 0:O[1],E});let l=[],c=[];return i==null||i.forEach(E=>{var H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze,ue,_,ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F;let T=(V=(H=p.cloneDeep(E))==null?void 0:H.slice(1,p.cloneDeep(E).length-1))==null?void 0:V.replace(":",Et).split(Et);if(((W=(ke=p.cloneDeep(T))==null?void 0:ke[0])==null?void 0:W.replaceAll("'",""))==="输入"){if(!((G=(K=p.cloneDeep(T))==null?void 0:K[1])!=null&&G.includes("["))&&!((z=(w=p.cloneDeep(T))==null?void 0:w[1])!=null&&z.includes("("))){Ne.IsJson((k=p.cloneDeep(T))==null?void 0:k[1].replaceAll("'",'"'))&&c.push(JSON.parse((A=p.cloneDeep(T))==null?void 0:A[1].replaceAll("'",'"')));return}if(((se=(I=p.cloneDeep(T))==null?void 0:I[1])==null?void 0:se[0])==="["){let ee=(ze=($e=p.cloneDeep(T))==null?void 0:$e[1])==null?void 0:ze.slice(1,((Ie=(nt=p.cloneDeep(T))==null?void 0:nt[1])==null?void 0:Ie.length)-1);(_=(ue=Da(ee))==null?void 0:ue.filter(R=>R!==","))==null||_.forEach(R=>{var ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe,de,Ae;let pe={},L=(oe=($=p.cloneDeep(R))==null?void 0:$.slice(1,((ge=p.cloneDeep(R))==null?void 0:ge.length)-1))==null?void 0:oe.replace(":",Et).split(Et),Y=(X=L==null?void 0:L[0])==null?void 0:X.replaceAll("'",""),ie;(_e=L==null?void 0:L[1])!=null&&_e.includes("(")?(ie=(Ve=(Me=(Je=(Be=(ae=(he=(P=(Ee=p.cloneDeep(L))==null?void 0:Ee[1])==null?void 0:P.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:ae.split("("))==null?void 0:Be[1])==null?void 0:Je.split(")"))==null?void 0:Me[0])==null?void 0:Ve.replaceAll(":","/").replaceAll("'",""),(ct=(me=p.cloneDeep(L))==null?void 0:me[1])!=null&&ct.includes("[")&&(ie=p.cloneDeep(ie)+"["+((Ae=(de=(Qe=(De=(be=(Ke=p.cloneDeep(L))==null?void 0:Ke[1])==null?void 0:be.split("["))==null?void 0:De[1])==null?void 0:Qe.split("]"))==null?void 0:de[0])==null?void 0:Ae.replaceAll("'",""))+"]")):ie=(fe=L==null?void 0:L[1])==null?void 0:fe.replaceAll("'",""),pe[Y]=ie,c.push(pe)})}}else{if(!((te=(ne=p.cloneDeep(T))==null?void 0:ne[1])!=null&&te.includes("["))&&!((Ue=(ve=p.cloneDeep(T))==null?void 0:ve[1])!=null&&Ue.includes("("))){Ne.IsJson((st=p.cloneDeep(T))==null?void 0:st[1].replaceAll("'",'"'))&&l.push(JSON.parse((q=p.cloneDeep(T))==null?void 0:q[1].replaceAll("'",'"')));return}if(((ye=(M=p.cloneDeep(T))==null?void 0:M[1])==null?void 0:ye[0])==="["){let ee=(Ye=(xe=p.cloneDeep(T))==null?void 0:xe[1])==null?void 0:Ye.slice(1,((Oe=(Re=p.cloneDeep(T))==null?void 0:Re[1])==null?void 0:Oe.length)-1);(lt=(qe=Da(ee))==null?void 0:qe.filter(R=>R!==","))==null||lt.forEach(R=>{var ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt;let pe={},L=(oe=($=p.cloneDeep(R))==null?void 0:$.slice(1,((ge=p.cloneDeep(R))==null?void 0:ge.length)-1))==null?void 0:oe.replace(":",Et).split(Et),Y=(X=L==null?void 0:L[0])==null?void 0:X.replaceAll("'",""),ie;if(!((_e=L==null?void 0:L[1])!=null&&_e.includes("(")))ie=(fe=L==null?void 0:L[1])==null?void 0:fe.replaceAll("'","");else if(ie=(Je=(Be=(ae=(he=(P=(Ee=p.cloneDeep(L))==null?void 0:Ee[1])==null?void 0:P.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:ae.replace("(",Et))==null?void 0:Be.split(Et))==null?void 0:Je[1],ie=(Ve=(Me=nc(p.cloneDeep(ie),Et))==null?void 0:Me.split(Et))==null?void 0:Ve[0],!(ie!=null&&ie.includes("(")))ie=(me=p.cloneDeep(ie))==null?void 0:me.replaceAll(":","/").replaceAll("'",""),(Ke=(ct=p.cloneDeep(L))==null?void 0:ct[1])!=null&&Ke.includes("[")&&(ie=p.cloneDeep(ie)+"["+((Ce=(N=(We=(Fe=(De=(be=p.cloneDeep(L))==null?void 0:be[1])==null?void 0:De.split("["))==null?void 0:Fe[((Ae=(de=(Qe=p.cloneDeep(L))==null?void 0:Qe[1])==null?void 0:de.split("["))==null?void 0:Ae.length)-1])==null?void 0:We.split("]"))==null?void 0:N[0])==null?void 0:Ce.replaceAll("'",""))+"]");else{let It="";(ut=_a(ie,":"))==null||ut.forEach(wt=>{var Dt,Ot,Bt,Ut,Pt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In;if(!(wt!=null&&wt.includes("(")))It=It===""?It+((Dt=wt==null?void 0:wt.replaceAll(":",""))==null?void 0:Dt.replaceAll("'","")):It+"/"+((Ot=wt==null?void 0:wt.replaceAll(":",""))==null?void 0:Ot.replaceAll("'",""));else{let gn=(Dn=(fn=(wn=(qt=(Vt=(Pt=(Ut=(Bt=p.cloneDeep(wt))==null?void 0:Bt.replaceAll("{",""))==null?void 0:Ut.replaceAll("}",""))==null?void 0:Pt.replace("(",Et))==null?void 0:Vt.split(Et))==null?void 0:qt[1])==null?void 0:wn.split(")"))==null?void 0:fn[0])==null?void 0:Dn.replaceAll(":","/").replaceAll("'","");gn=gn+"["+((In=(vn=(Tn=(hn=(Sn=p.cloneDeep(wt))==null?void 0:Sn.split("["))==null?void 0:hn[1])==null?void 0:Tn.split("]"))==null?void 0:vn[0])==null?void 0:In.replaceAll("'",""))+"]",It=It===""?It+"["+gn+"]":It+"/["+gn+"]"}}),ie=It+"["+((Tt=(vt=(pt=(He=(ft=(et=p.cloneDeep(L))==null?void 0:et[1])==null?void 0:ft.split("["))==null?void 0:He[((Ze=(Se=(rt=p.cloneDeep(L))==null?void 0:rt[1])==null?void 0:Se.split("["))==null?void 0:Ze.length)-1])==null?void 0:pt.split("]"))==null?void 0:vt[0])==null?void 0:Tt.replaceAll("'",""))+"]"}pe[Y]=ie,l.push(pe)})}else{let ee=(Le=(Z=p.cloneDeep(T))==null?void 0:Z[1])==null?void 0:Le.slice(1,((at=(tt=p.cloneDeep(T))==null?void 0:tt[1])==null?void 0:at.length)-1),R={},pe=(U=(C=(re=(le=(ce=p.cloneDeep(ee))==null?void 0:ce.split("]"))==null?void 0:le[0])==null?void 0:re.split(":"))==null?void 0:C[((g=(dt=(Xe=(Te=p.cloneDeep(ee))==null?void 0:Te.split("]"))==null?void 0:Xe[0])==null?void 0:dt.split(":"))==null?void 0:g.length)-1])==null?void 0:U.replaceAll("'",""),L=((F=(v=(J=p.cloneDeep(ee))==null?void 0:J.split("]"))==null?void 0:v[0])==null?void 0:F.replaceAll("'",""))+"]";R[pe]=L,l.push(R)}}}),{output:l,input:c}},oc=jt.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(oc),Mn=jt.useMenuState(p.pinia),{activeMenuPath:aa}=p.storeToRefs(Mn),Ca=p.useLoginState(),{loginUserInfo:Xt}=p.storeToRefs(Ca),lc=Ne.useOriginalState(p.pinia),{originalPath:rc}=p.storeToRefs(lc),Qt=rc.value,ic=a=>{const s=/^name(\d+)$/,i=a==null?void 0:a.map(c=>{const d=[];for(const x in c){const m=x.match(s);m&&d.push({idx:Number(m[1]),value:c[x]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((x,m)=>x.idx-m.idx),{item:c,names:d}});function l(c,d){if(!c)return[];const x=[],m=[];c.forEach(T=>{var O;return(((O=T.names)==null?void 0:O.length)>d?x:m).push(T)});const h=m.map(T=>T.item),D=new Map;for(const T of x){const O=T.names[T.names.length-d-1].value;D.has(O)||D.set(O,[]),D.get(O).push(T)}return[...Array.from(D.entries()).map(([T,O])=>{var H;return O[0].names.length===1&&((H=O[0].names[0])==null?void 0:H.idx)===-1?O[0].item:{name:T,isShow:!0,comp:"ParentItem",children:l(O,d+1)}}),...h]}if(i)return l(i,0)},Aa=a=>a!=null&&a.every(s=>{var i,l;return((l=(i=Object.keys(s))==null?void 0:i.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:ic(a),El=async()=>{var d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze,ue,_,ne,te,ve,Ue,st,q,M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e;Mn.setImportLoading(!0);let a="";const s=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((x=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:x.length)>0){let fe=(H=(O=(T=(E=(D=(h=(m=s==null?void 0:s.data)==null?void 0:m.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:E.pageData)==null?void 0:T.compData)==null?void 0:O.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:H.contents;a=(ke=(V=p.cloneDeep(fe))==null?void 0:V[0])==null?void 0:ke.label}let i=aa.value;(G=aa.value)!=null&&G.includes(`updateLoading${((W=Xt.value)==null?void 0:W.account)||((K=Xt.value)==null?void 0:K.账号)}`)?i=p.cloneDeep(aa).value:(k=aa.value)!=null&&k.includes(`loading${((w=Xt.value)==null?void 0:w.account)||((z=Xt.value)==null?void 0:z.账号)}`)&&(i=p.cloneDeep(_n).value+Qt+`loading${((A=Xt.value)==null?void 0:A.account)||((I=Xt.value)==null?void 0:I.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if((($e=(se=l==null?void 0:l.data)==null?void 0:se.result)==null?void 0:$e.length)>0){let fe="",Ee=[];(Ie=(nt=l==null?void 0:l.data)==null?void 0:nt.result)==null||Ie.forEach(he=>{var ae,Be,Je,Me,Ve;((Be=(ae=he==null?void 0:he.value)==null?void 0:ae.pageData)==null?void 0:Be.comp)==="Form"&&((Ve=(Me=(Je=he==null?void 0:he.value)==null?void 0:Je.pageData)==null?void 0:Me.compData)==null||Ve.forEach(me=>{(me==null?void 0:me.key)==="formContent"&&(Ee=[...Ee,...me==null?void 0:me.contents])}))});let P=Ee==null?void 0:Ee.find(he=>(he==null?void 0:he.isMain)===!0);if(P?(fe=P==null?void 0:P.value,a=P==null?void 0:P.key):fe=(q=(st=(Ue=(ve=(te=(ne=(_=(ue=(ze=l==null?void 0:l.data)==null?void 0:ze.result)==null?void 0:ue[0])==null?void 0:_.value)==null?void 0:ne.pageData)==null?void 0:te.compData)==null?void 0:ve.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:st.find(he=>{var ae,Be;return(he==null?void 0:he.key)===a||((Be=(ae=he==null?void 0:he.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:Be[1])===a}))==null?void 0:q.value,(xe=aa.value)!=null&&xe.includes(`updateLoading${((M=Xt.value)==null?void 0:M.account)||((ye=Xt.value)==null?void 0:ye.账号)}`)){let he=[],ae=[];const Be=await p.getInsofDataApi({key:{pageKey:(le=aa.value.split(Qt+`updateLoading${((Le=Xt.value)==null?void 0:Le.account)||((ce=Xt.value)==null?void 0:ce.账号)}`))==null?void 0:le[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Te=(re=Be==null?void 0:Be.data)==null?void 0:re.result)==null?void 0:Te.length)>0){let Je=(Xe=l==null?void 0:l.data)==null?void 0:Xe.result,Me=(dt=p.cloneDeep(Je))==null?void 0:dt.map(async Ve=>{var me,ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut,et;if(((me=Ve==null?void 0:Ve.key)==null?void 0:me.type)==="structure"){let ft=(De=(be=(Ke=(ct=Ve==null?void 0:Ve.value)==null?void 0:ct.pageData)==null?void 0:Ke.compData)==null?void 0:be.find(rt=>(rt==null?void 0:rt.key)==="parentFormPath"))==null?void 0:De.contents;if(ft){let rt=await Ne.getItemData(ft,sessionStorage.getItem("systemKey"),""),Se=(Fe=(Ae=(de=(Qe=Ve==null?void 0:Ve.value)==null?void 0:Qe.pageData)==null?void 0:de.compData)==null?void 0:Ae.find(He=>(He==null?void 0:He.key)==="formContent"))==null?void 0:Fe.contents,Ze=rt==null?void 0:rt.filter(He=>(He==null?void 0:He.comp)==="Form");Ze==null||Ze.forEach(He=>{var pt;(pt=He==null?void 0:He.compData)==null||pt.forEach(vt=>{var Tt,It;if((vt==null?void 0:vt.key)==="formContent"&&((Tt=vt==null?void 0:vt.contents)==null?void 0:Tt.some(Dt=>Se==null?void 0:Se.find(Ot=>(Ot==null?void 0:Ot.prop)===(Dt==null?void 0:Dt.prop))))){let Dt=He;Dt.compData=(It=Dt.compData)==null?void 0:It.map(Bt=>{var Ut;return(Bt==null?void 0:Bt.key)==="formContent"&&(Bt.contents=(Ut=Bt.contents)==null?void 0:Ut.map(Pt=>{var Vt;return Se!=null&&Se.find(qt=>(qt==null?void 0:qt.prop)===(Pt==null?void 0:Pt.prop))&&(Pt.value=(Vt=Se==null?void 0:Se.find(qt=>(qt==null?void 0:qt.prop)===(Pt==null?void 0:Pt.prop)))==null?void 0:Vt.value),Pt})),Bt});let Ot={};for(let Bt in Dt)Bt!=="id"&&(Ot[Bt]=Dt[Bt]);c.push({id:He==null?void 0:He.id,value:{pageData:Ot}})}})})}else if((N=(We=Be==null?void 0:Be.data)==null?void 0:We.result)!=null&&N.find(rt=>{var Se,Ze,He,pt;return((Ze=(Se=rt==null?void 0:rt.value)==null?void 0:Se.pageData)==null?void 0:Ze.name)===((pt=(He=Ve==null?void 0:Ve.value)==null?void 0:He.pageData)==null?void 0:pt.name)})){let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(_n).value+Qt+fe,c.push({id:(et=(ut=(Ce=Be==null?void 0:Be.data)==null?void 0:Ce.result)==null?void 0:ut.find(Se=>{var Ze,He,pt,vt;return((He=(Ze=Se==null?void 0:Se.value)==null?void 0:Ze.pageData)==null?void 0:He.name)===((vt=(pt=Ve==null?void 0:Ve.value)==null?void 0:pt.pageData)==null?void 0:vt.name)}))==null?void 0:et.id,key:rt,value:Ve==null?void 0:Ve.value})}else{let rt=Ve==null?void 0:Ve.key;rt.pageKey=p.cloneDeep(_n).value+Qt+fe,he.push({key:rt,value:Ve==null?void 0:Ve.value})}}});await Promise.all(Me),(C=(g=l==null?void 0:l.data)==null?void 0:g.result)==null||C.forEach(Ve=>{var ct,Ke,be;let me=(ct=p.cloneDeep(Ve))==null?void 0:ct.key;me.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((Ke=Xt.value)==null?void 0:Ke.account)||((be=Xt.value)==null?void 0:be.账号)}`,Mn.setChildMenu(me.pageKey),c.push({id:Ve==null?void 0:Ve.id,key:me})})}if(fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(U=c==null?void 0:c[0])!=null&&U.key&&await Ca.setLogRecordAsync({type:"保存",data:c},(J=c==null?void 0:c[0])==null?void 0:J.key),(he==null?void 0:he.length)>0&&(await p.batchAddInsofDataApi({dataList:he}),(v=he==null?void 0:he[0])!=null&&v.key&&await Ca.setLogRecordAsync({type:"保存",data:he},(F=he==null?void 0:he[0])==null?void 0:F.key));const Je=await p.getInsofDataApi({key:{pageKey:(pe=aa.value.split(Qt+`updateLoading${((ee=Xt.value)==null?void 0:ee.account)||((R=Xt.value)==null?void 0:R.账号)}`))==null?void 0:pe[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Y=(L=Je==null?void 0:Je.data)==null?void 0:L.result)==null?void 0:Y.length)>0){let Me=[],Ve=(ie=l==null?void 0:l.data)==null?void 0:ie.result;(ge=p.cloneDeep(Ve))==null||ge.forEach(me=>{var ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut;if(((ct=me==null?void 0:me.key)==null?void 0:ct.type)!=="structure"){let et=(De=(be=(Ke=Je==null?void 0:Je.data)==null?void 0:Ke.result)==null?void 0:be.filter(Ze=>{var He;return((He=Ze==null?void 0:Ze.key)==null?void 0:He.type)==="data"}))==null?void 0:De.map(Ze=>Ze==null?void 0:Ze.id);Me=[...Me,...et];let ft=(Fe=(Ae=(de=(Qe=p.cloneDeep(Ve))==null?void 0:Qe.find(Ze=>{var He;return((He=me==null?void 0:me.key)==null?void 0:He.tableId)===(Ze==null?void 0:Ze.id)}))==null?void 0:de.value)==null?void 0:Ae.pageData)==null?void 0:Fe.name,rt=(Ce=(N=(We=Je==null?void 0:Je.data)==null?void 0:We.result)==null?void 0:N.find(Ze=>{var He,pt;return((pt=(He=Ze==null?void 0:Ze.value)==null?void 0:He.pageData)==null?void 0:pt.name)===ft}))==null?void 0:Ce.id,Se=(ut=p.cloneDeep(me))==null?void 0:ut.key;Se.tableId=rt,Se.pageKey=p.cloneDeep(_n).value+Qt+fe,ae.push({key:Se,value:me==null?void 0:me.value})}}),(Me==null?void 0:Me.length)>0&&(Me=[...new Set(Me)],await p.batchDeleteInsofDataApi({ids:Me})),(oe=($=l==null?void 0:l.data)==null?void 0:$.result)==null||oe.forEach(me=>{var Ke,be,De;let ct=(Ke=p.cloneDeep(me))==null?void 0:Ke.key;ct.pageKey=p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((be=Xt.value)==null?void 0:be.account)||((De=Xt.value)==null?void 0:De.账号)}`,Mn.setChildMenu(ct.pageKey),c.push({id:me==null?void 0:me.id,key:ct})})}(ae==null?void 0:ae.length)>0&&(await p.batchAddInsofDataApi({dataList:ae}),(X=he==null?void 0:he[0])!=null&&X.key&&await Ca.setLogRecordAsync({type:"保存",data:ae},(_e=ae==null?void 0:ae[0])==null?void 0:_e.key)),p.ElMessage.success("保存成功")}}else{if((Oe=(Re=l==null?void 0:l.data)==null?void 0:Re.result)==null||Oe.forEach(he=>{var Be;let ae=(Be=p.cloneDeep(he))==null?void 0:Be.key;ae.pageKey=p.cloneDeep(_n).value+Qt+fe,Mn.setChildMenu(ae.pageKey),c.push({id:he==null?void 0:he.id,key:ae})}),fe===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Mn.setImportLoading(!1),Mn.setChildMenu("");return}(Ye=c==null?void 0:c[0])!=null&&Ye.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await Ca.setLogRecordAsync({type:"保存",data:c},(qe=c==null?void 0:c[0])==null?void 0:qe.key)),await Ne.loadingConstruct(p.cloneDeep(_n).value+Qt+fe,p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((lt=Xt.value)==null?void 0:lt.account)||((Z=Xt.value)==null?void 0:Z.账号)}`),Mn.setActiveMenuPath(p.cloneDeep(_n).value+Qt+fe+Qt+`updateLoading${((tt=Xt.value)==null?void 0:tt.account)||((at=Xt.value)==null?void 0:at.账号)}`),p.ElMessage.success("保存成功")}}Mn.setImportLoading(!1)},sc={key:0,class:"method-content"},cc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const s=e.ref([]),i=Ne.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(i),c=a,d=e.ref(!1),x=e.ref(),m=Ne.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(m),D=jt.useModelComp(p.pinia),E=e.ref(!1),T=jt.useMenuState(p.pinia),O=p.useLoginState(p.pinia),{itemData:H,isEdit:V,routeToChildPath:ke,tableViewContents:W,lockingPage:K,payloadTypes:G}=p.storeToRefs(D),{activeMenuPath:w,platform:z,childMenu:k}=p.storeToRefs(T),{loginUserInfo:A}=p.storeToRefs(O),I=e.ref(!1),se=async()=>{var q,M;(q=s.value)!=null&&q.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")&&await te((M=s.value)==null?void 0:M.find(ye=>(ye==null?void 0:ye.buttonName)==="保存")),await El()};e.watch(()=>H.value,async()=>{V.value==="view"&&!I.value&&await st(p.cloneDeep(c.itemData)),I.value=!1},{deep:!0});const $e=()=>{d.value=!1,x.value=void 0},nt=q=>q.map(M=>{const ye={};for(const xe in M){const Re=M[xe];if(xe.includes(h.value)){const Oe=xe.split(h.value);let Ye=ye;Oe.forEach((qe,lt)=>{lt===Oe.length-1?Ye[qe]=Re:(Ye[qe]||(Ye[qe]={}),Ye=Ye[qe])})}else ye[xe]=Re}return ye}),Ie=async(q,M,ye=[])=>{var Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt;let xe=(Re=p.cloneDeep(M))==null?void 0:Re.filter(g=>(g==null?void 0:g.comp)!=="methodButton");if(q!=null&&q.includes("[")){let g=(Z=(lt=(qe=(Ye=(Oe=p.cloneDeep(q))==null?void 0:Oe.split("["))==null?void 0:Ye[1])==null?void 0:qe.split("]"))==null?void 0:lt[0])==null?void 0:Z.split(":"),C="";if(g!=null&&g[0]){let U=(tt=xe==null?void 0:xe.find(J=>(J==null?void 0:J.name)===(g==null?void 0:g[0])))==null?void 0:tt.compData;if(!U){let J=(at=q==null?void 0:q.split("["))==null?void 0:at[0],v=await Ne.getItemData(J,sessionStorage.getItem("systemKey"),"",!1,"","",ye);U=(Le=v==null?void 0:v.find(F=>(F==null?void 0:F.name)===(g==null?void 0:g[0])))==null?void 0:Le.compData}U==null||U.forEach(J=>{var v,F,ee,R,pe,L;if((J==null?void 0:J.key)==="formContent")(v=J==null?void 0:J.contents)==null||v.forEach(Y=>{var ie;(Y==null?void 0:Y.key)===(g==null?void 0:g[1])&&(Array.isArray(Y==null?void 0:Y.value)?C=Y==null?void 0:Y.value:C=(ie=Y==null?void 0:Y.value)==null?void 0:ie.toString())});else if((J==null?void 0:J.key)==="tableContents"){let Y=[],ie=(F=U==null?void 0:U.find($=>($==null?void 0:$.key)==="header"))==null?void 0:F.contents,ge=(g==null?void 0:g[1])??"";if(ie!=null&&ie.every($=>Array.isArray($))){let $=Ne.getColumnChild((pe=ie==null?void 0:ie[0])==null?void 0:pe.filter(oe=>(oe==null?void 0:oe.label)!=="操作"));(L=J.contents)==null||L.forEach(oe=>{let X={};oe=oe==null?void 0:oe.filter(_e=>!(_e!=null&&_e.id)),$==null||$.forEach((_e,fe)=>{let Ee=oe[fe];typeof oe[fe]=="number"&&(Ee=oe[fe].toString()),(ge===""||ge===_e.prop)&&(X[_e.prop]=Ee)}),Y.push(X)}),Y=nt(Y)}else{let $=(ee=ie==null?void 0:ie.map(oe=>oe==null?void 0:oe.label))==null?void 0:ee.filter(oe=>oe!=="操作");(R=J.contents)==null||R.forEach(oe=>{let X={};oe=oe==null?void 0:oe.filter(_e=>!(_e!=null&&_e.id)),$==null||$.forEach((_e,fe)=>{let Ee=oe[fe];typeof oe[fe]=="number"&&(Ee=oe[fe].toString()),(ge===""||ge===_e)&&(X[_e]=Ee)}),Y.push(X)})}C=Y}})}return C}else if(q!=null&&q.includes("/")){let g={};return(ce=p.cloneDeep(xe))==null||ce.forEach((C,U)=>{var J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae;if((C==null?void 0:C.comp)==="Table"){let Be=Array.isArray((F=(v=(J=C==null?void 0:C.compData)==null?void 0:J.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:v.contents)==null?void 0:F[0])?(L=(pe=(R=(ee=C==null?void 0:C.compData)==null?void 0:ee.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:R.contents)==null?void 0:pe[0])==null?void 0:L.some(me=>me==null?void 0:me.children):[],Je=(ge=(ie=(Y=C==null?void 0:C.compData)==null?void 0:Y.find(me=>(me==null?void 0:me.key)==="tableContents"))==null?void 0:ie.contents)==null?void 0:ge.map(me=>(me!=null&&me.find(ct=>ct==null?void 0:ct.id)&&(me=me.slice(1)),me)),Me=(fe=(_e=(X=(oe=($=C==null?void 0:C.compData)==null?void 0:$.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:oe.contents)==null?void 0:X[0])==null?void 0:_e[0])==null?void 0:fe.label,Ve=(P=(Ee=C==null?void 0:C.compData)==null?void 0:Ee.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:P.contents;if(Be)(Be==null?void 0:Be.length)===0?g[C.name]=g!=null&&g[C.name]?g[C.name]:Ne.tableToForm(Je,Ve):g[Me]=Ne.tableToForm(Je,Ve);else{const me=[];Ve=Ve.slice(1,Ve.length-1),Ve==null||Ve.forEach((ct,Ke)=>{Je==null||Je.forEach(be=>{me.push({key:ct.label+be[0],value:be[Ke+1]})})}),g["form"+U]=me}}else{const Be=(ae=(he=C.compData)==null?void 0:he.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:ae.contents;g!=null&&g.form||(g.form=[]);const Je=[];Be==null||Be.forEach(Me=>{Me.key!==""&&(Me={key:(Me==null?void 0:Me.key)??(Me==null?void 0:Me.label),value:Me==null?void 0:Me.value},Je.push(Me))}),g.form=[...Je,...p.cloneDeep(g==null?void 0:g.form)]}}),g}else{if(q==="createInsofDataApi"){let g=(le=p.cloneDeep(M))==null?void 0:le[0];return g={comp:(re=p.cloneDeep(g))==null?void 0:re.comp,compData:(Te=p.cloneDeep(g))==null?void 0:Te.compData,name:(Xe=p.cloneDeep(g))==null?void 0:Xe.name,isShow:(dt=p.cloneDeep(g))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:g}}}return q}},ze=async(q,M,ye)=>{var Oe,Ye,qe;let xe=await Ne.getItemData(M,sessionStorage.getItem("systemKey"),""),Re=xe==null?void 0:xe.find(lt=>(lt==null?void 0:lt.name)===(ye==null?void 0:ye[0]));if(Re){if((Re==null?void 0:Re.comp)==="Table"){let lt={};for(let re in p.cloneDeep(q))p.cloneDeep(q)[re]!=="loginUser"?lt[re]=p.cloneDeep(q)[re]:lt[re]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);let Z=[],tt=lt;Array.isArray(q)||(tt=[lt]),tt==null||tt.forEach(re=>{Z.push({[re[ye[1]]]:re})});let at=[],Le=Z==null?void 0:Z.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]});xe==null||xe.forEach(re=>{var Te;(re==null?void 0:re.name)===(ye==null?void 0:ye[0])&&((Te=re==null?void 0:re.compData)==null||Te.forEach(Xe=>{var dt;(Xe==null?void 0:Xe.key)==="tableContents"&&((dt=Xe==null?void 0:Xe.contents)==null||dt.forEach(g=>{g!=null&&g.some(C=>Le.includes(C))&&at.push({[g.find(C=>C.id).id]:g.find(C=>Le.includes(C))})}))}))});let ce=at==null?void 0:at.map(re=>{var Te;return(Te=Object.keys(re))==null?void 0:Te[0]}),le=[];if(ce==null||ce.forEach(re=>{var dt;let Te=(dt=at==null?void 0:at.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0].toString())===re.toString()}))==null?void 0:dt[re],Xe=Z==null?void 0:Z.find(g=>{var C;return((C=Object.keys(g))==null?void 0:C[0])===Te});le.push({id:parseInt(re),value:{tableData:Xe[Te]}})}),(le==null?void 0:le.length)>0)return le}else if((Re==null?void 0:Re.comp)==="Form"){let lt=p.cloneDeep(Re);lt.compData=(qe=lt.compData)==null?void 0:qe.map(at=>{var Le;return(at==null?void 0:at.key)==="formContent"&&(at.contents=(Le=at.contents)==null?void 0:Le.map(ce=>((ce==null?void 0:ce.key)===(ye==null?void 0:ye[1])&&(ce.value=(q==null?void 0:q[ce==null?void 0:ce.prop])||q),ce))),at});let Z={};for(let at in lt)at!=="id"&&(Z[at]=lt[at]);let tt=[];if(tt.push({id:Re==null?void 0:Re.id,keyType:ye==null?void 0:ye[1],value:{pageData:Z}}),(tt==null?void 0:tt.length)>0)return tt}}},ue=async(q,M,ye)=>{var Oe,Ye,qe,lt,Z,tt,at,Le,ce,le;let xe=await Ne.getItemData(M,sessionStorage.getItem("systemKey"),""),Re=xe==null?void 0:xe.find(re=>(re==null?void 0:re.name)===(ye==null?void 0:ye[0]));if(Re){if((Re==null?void 0:Re.comp)==="Table"){let re={};for(let Te in p.cloneDeep(q))p.cloneDeep(q)[Te]!=="loginUser"?re[Te]=p.cloneDeep(q)[Te]:re[Te]=((Oe=A.value)==null?void 0:Oe.account)||((Ye=A.value)==null?void 0:Ye.账号);await p.createInsofDataApi({key:{type:"data",pageKey:M,tableId:Re==null?void 0:Re.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})}else if((Re==null?void 0:Re.comp)==="Form"){let re=p.cloneDeep(Re),Te=Object.keys(q),Xe="";(lt=(qe=p.cloneDeep(re))==null?void 0:qe.compData)==null||lt.forEach(v=>{var F,ee;(v==null?void 0:v.key)==="formContent"&&((ee=(F=p.cloneDeep(v))==null?void 0:F.contents)==null||ee.forEach(R=>{var pe;Te.includes(R==null?void 0:R.key)&&(R==null?void 0:R.value)===((pe=A.value)==null?void 0:pe.姓名)&&(Xe=R==null?void 0:R.key)}))});let dt=[];(Z=Object.values(q[Xe]))==null||Z.forEach(v=>{v!=null&&v.includes("(")&&dt.push(v)}),dt=[...new Set(dt)];const g=dt==null?void 0:dt.map(async v=>{var L,Y,ie,ge,$,oe,X,_e,fe,Ee,P,he;let F="";(oe=($=(ge=(ie=(Y=(L=p.cloneDeep(v))==null?void 0:L.split("("))==null?void 0:Y[1])==null?void 0:ie.split(")"))==null?void 0:ge[0])==null?void 0:$.split(":"))==null||oe.forEach(ae=>{F=F===""?F+ae.replaceAll("'",""):F+"/"+ae.replaceAll("'","")});let ee=[];(he=(P=(Ee=(fe=(_e=(X=p.cloneDeep(v))==null?void 0:X.split("<"))==null?void 0:_e[1])==null?void 0:fe.split(">"))==null?void 0:Ee[0])==null?void 0:P.split(":"))==null||he.forEach(ae=>{ee.push(ae.replaceAll("'",""))});const R=await Ne.getItemData(F,sessionStorage.getItem("systemKey"),"");let pe="";return R==null||R.forEach(ae=>{var Be;ae.name===(ee==null?void 0:ee[0])&&((Be=ae==null?void 0:ae.compData)==null||Be.forEach(Je=>{var Me;(Je==null?void 0:Je.key)==="formContent"&&((Me=Je.contents)==null||Me.forEach(Ve=>{(Ve==null?void 0:Ve.key)===(ee==null?void 0:ee[1])&&(pe=Ve==null?void 0:Ve.value)}))}))}),{[v]:pe}}),C=await Promise.all(g);re.compData=(at=(tt=p.cloneDeep(re))==null?void 0:tt.compData)==null?void 0:at.map(v=>{var F,ee;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(ee=(F=p.cloneDeep(v))==null?void 0:F.contents)==null?void 0:ee.map(R=>{var pe,L,Y,ie;return(pe=q[Xe])!=null&&pe[R==null?void 0:R.key]&&(q[Xe][R==null?void 0:R.key].includes("(")?R.value=(L=C==null?void 0:C.find(ge=>{var $;return(($=Object.keys(ge))==null?void 0:$[0])===q[Xe][R==null?void 0:R.key]}))==null?void 0:L[q[Xe][R==null?void 0:R.key]]:R.value=(ie=(Y=p.cloneDeep(q))==null?void 0:Y[Xe])==null?void 0:ie[R==null?void 0:R.key]),R})),v});const U=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let J="";((Le=U==null?void 0:U.data)==null?void 0:Le.type)==="success"&&((le=(ce=U==null?void 0:U.data)==null?void 0:ce.result)==null||le.forEach(v=>{var F,ee;((ee=(F=v==null?void 0:v.value)==null?void 0:F.pageData)==null?void 0:ee.name)===(ye==null?void 0:ye[0])&&(J=v.id)}),await p.updateInsofDataApi({id:J,value:{pageData:re}}))}}},_=(q,M="",ye={})=>{for(const[xe,Re]of Object.entries(q)){const Oe=M?`${M}.${xe}`:xe;Re!==null&&typeof Re=="object"&&!Array.isArray(Re)&&Object.prototype.toString.call(Re)!=="[object Date]"?_(Re,Oe,ye):ye[Oe]=Re}return ye},ne=async(q,M,ye,xe)=>{var Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te,Xe,dt,g,C,U,J,v,F,ee,R,pe,L,Y,ie;let Re=await Ne.getItemData(M,sessionStorage.getItem("systemKey"),""),Oe=Re==null?void 0:Re.find(ge=>(ge==null?void 0:ge.name)===(ye==null?void 0:ye[0]));if(Oe){if(!(ye!=null&&ye[1])&&(Oe==null?void 0:Oe.comp)==="Table"){let ge={},$=[],oe=(qe=(Ye=Oe==null?void 0:Oe.compData)==null?void 0:Ye.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:qe.contents;oe!=null&&oe.every(fe=>Array.isArray(fe))?$=(Z=Ne.getColumnChild((lt=oe==null?void 0:oe[0])==null?void 0:lt.filter(fe=>(fe==null?void 0:fe.label)!=="操作")))==null?void 0:Z.map(fe=>fe==null?void 0:fe.prop):$=oe==null?void 0:oe.map(fe=>fe==null?void 0:fe.label);for(let fe in p.cloneDeep(q))if(p.cloneDeep(q)[fe]!=="loginUser"){let Ee=_(p.cloneDeep(q)[fe]),P={};for(let he in Ee)if($!=null&&$.find(ae=>ae===he))P[he]=Ee[he];else if($!=null&&$.find(ae=>(ae==null?void 0:ae.toUpperCase())===(he==null?void 0:he.toUpperCase()))){let ae=$==null?void 0:$.find(Be=>(Be==null?void 0:Be.toUpperCase())===(he==null?void 0:he.toUpperCase()));P[ae]=Ee[he]}ge[fe]=P}else ge[fe]=((tt=A.value)==null?void 0:tt.account)||((at=A.value)==null?void 0:at.账号);let X=await p.getInsofDataApi({keyLikes:{tableId:Oe==null?void 0:Oe.id}});if(((ce=(Le=X==null?void 0:X.data)==null?void 0:Le.result)==null?void 0:ce.length)>0){let fe=(re=(le=X==null?void 0:X.data)==null?void 0:le.result)==null?void 0:re.map(Ee=>Ee==null?void 0:Ee.id);(fe==null?void 0:fe.length)>0&&await p.batchDeleteInsofDataApi({ids:fe})}let _e=[];if((Te=Oe==null?void 0:Oe.compData)!=null&&Te.find(fe=>(fe==null?void 0:fe.key)==="pageColumn")&&((g=(dt=(Xe=Oe==null?void 0:Oe.compData)==null?void 0:Xe.find(fe=>(fe==null?void 0:fe.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&g.includes("["))){const fe=await p.getInsofDataApi({id:Oe==null?void 0:Oe.tableId});let Ee=((v=(J=(U=(C=fe==null?void 0:fe.data)==null?void 0:C.result)==null?void 0:U[0])==null?void 0:J.key)==null?void 0:v.pageKey)??"";(F=Object.values(ge))==null||F.forEach(P=>{_e.push({key:{type:"data",pageKey:Ee,tableId:Oe==null?void 0:Oe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:P}})})}else(ee=Object.values(ge))==null||ee.forEach(fe=>{_e.push({key:{type:"data",pageKey:M,tableId:Oe==null?void 0:Oe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})});(_e==null?void 0:_e.length)>0&&await p.batchAddInsofDataApi({dataList:_e})}else if(!(ye!=null&&ye[1])&&(Oe==null?void 0:Oe.comp)==="Form"){let ge=p.cloneDeep(Oe);ge.compData=(pe=(R=p.cloneDeep(ge))==null?void 0:R.compData)==null?void 0:pe.map(X=>{var _e,fe;return(X==null?void 0:X.key)==="formContent"&&(X.contents=(fe=(_e=p.cloneDeep(X))==null?void 0:_e.contents)==null?void 0:fe.map(Ee=>{var P,he;return(P=p.cloneDeep(q))!=null&&P[Ee==null?void 0:Ee.key]&&(Ee.value=(he=p.cloneDeep(q))==null?void 0:he[Ee==null?void 0:Ee.key]),Ee})),X});const $=await p.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let oe="";((L=$==null?void 0:$.data)==null?void 0:L.type)==="success"&&((ie=(Y=$==null?void 0:$.data)==null?void 0:Y.result)==null||ie.forEach(X=>{var _e,fe;((fe=(_e=X==null?void 0:X.value)==null?void 0:_e.pageData)==null?void 0:fe.name)===(ye==null?void 0:ye[0])&&(oe=X.id)}),await p.updateInsofDataApi({id:oe,value:{pageData:ge}}))}}},te=async q=>{var M,ye,xe,Re,Oe,Ye,qe,lt,Z,tt,at,Le,ce,le,re,Te;T.setImportLoading(!0);try{if(q.api){let Xe=new WeakMap;(ye=(M=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value})).data.result)==null?void 0:M.filter(L=>{var Y,ie;return((Y=L==null?void 0:L.key)==null?void 0:Y.pageKey)!=="menu"&&((ie=L==null?void 0:L.key)==null?void 0:ie.pageKey)!=="secret"}))==null||ye.forEach(L=>{Xe[L.key.pageKey]?Xe[L.key.pageKey]=[...Xe[L.key.pageKey],L]:Xe[L.key.pageKey]=[L]});let g=await Ne.getItemData((k==null?void 0:k.value)===""?w.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe),C="";if(g=g==null?void 0:g.map(L=>{var Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae;if((L==null?void 0:L.comp)==="Form")L.compData=(Y=L.compData)==null?void 0:Y.map(Be=>{var Je;return(Be==null?void 0:Be.key)==="formContent"&&(Be.contents=(Je=Be.contents)==null?void 0:Je.map(Me=>{var Ve;if((Me==null?void 0:Me.value)===""&&(Me==null?void 0:Me.type)==="Select"){let me=Ne.judgeContents((Ve=p.cloneDeep(Me))==null?void 0:Ve.optionUrl,Xe);Me.value=Me.value||me}return Me})),Be});else if((L==null?void 0:L.comp)==="Table"&&(ie=L.compData)!=null&&ie.find(Be=>(Be==null?void 0:Be.key)==="pageColumn")){let Be=($=(ge=L.compData)==null?void 0:ge.find(me=>(me==null?void 0:me.key)==="pageColumn"))==null?void 0:$.contents,Je=((X=(oe=L.compData)==null?void 0:oe.find(me=>(me==null?void 0:me.key)==="pageGroup"))==null?void 0:X.contents)??"",Me=(Ee=(fe=(_e=Be==null?void 0:Be.split("["))==null?void 0:_e[1])==null?void 0:fe.split("]"))==null?void 0:Ee[0];C=((P=Be==null?void 0:Be.split("["))==null?void 0:P[0])+((ae=(he=W.value)==null?void 0:he.find(me=>(me==null?void 0:me.key)===Me))==null?void 0:ae.value)}return L}),!(C===""||C==="")){const L=await Ne.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);g=g==null?void 0:g.map(Y=>{var ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je;if((Y==null?void 0:Y.comp)==="Table"&&(ie=Y.compData)!=null&&ie.find(Me=>(Me==null?void 0:Me.key)==="pageColumn")){let Me=($=(ge=Y.compData)==null?void 0:ge.find(be=>(be==null?void 0:be.key)==="pageColumn"))==null?void 0:$.contents,Ve=((X=(oe=Y.compData)==null?void 0:oe.find(be=>(be==null?void 0:be.key)==="pageGroup"))==null?void 0:X.contents)??"",me=(Ee=(fe=(_e=Me==null?void 0:Me.split("["))==null?void 0:_e[1])==null?void 0:fe.split("]"))==null?void 0:Ee[0],ct=((P=Me==null?void 0:Me.split("["))==null?void 0:P[0])+((ae=(he=W.value)==null?void 0:he.find(be=>(be==null?void 0:be.key)===me))==null?void 0:ae.value),Ke=(Be=L==null?void 0:L.find(be=>(be==null?void 0:be.name)===(Ve===""?c==null?void 0:c.compName:Ve)))==null?void 0:Be.compData;Y.compData=(Je=Y.compData)==null?void 0:Je.map(be=>{var De;return(be==null?void 0:be.key)==="tableContents"&&(be.contents=(De=Ke==null?void 0:Ke.find(Qe=>(Qe==null?void 0:Qe.key)==="tableContents"))==null?void 0:De.contents),be})}return Y})}let U={};if(((Re=(xe=q==null?void 0:q.extraValues)==null?void 0:xe.input)==null?void 0:Re.length)>0){const L=(Ye=(Oe=q==null?void 0:q.extraValues)==null?void 0:Oe.input)==null?void 0:Ye.map(async Y=>{var ie;ve!=null&&ve.find(ge=>ge===Y)?U=await Ie(Y,g):U[Object.keys(Y)[0]]=await Ie((ie=Object.values(Y))==null?void 0:ie[0],g,Xe)});await Promise.all(L)}else U=await Ie("/",g);let J=!1;(lt=(qe=q==null?void 0:q.extraValues)==null?void 0:qe.output)==null||lt.forEach(L=>{var Y,ie;(ie=(Y=Object.values(L))==null?void 0:Y[0])!=null&&ie.includes(".doc")&&(J=!0)});let v;if(J){const L=Ne.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});v=await p.axios.post(q.api,U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{L.close()})}else v=await p.axios.post(q.api,U,{headers:{"Content-Type":"application/json"}});let F=(Le=(at=(tt=(Z=p.cloneDeep(q))==null?void 0:Z.extraValues)==null?void 0:tt.output)==null?void 0:at.map(L=>{var Y,ie,ge,$,oe,X,_e,fe,Ee,P,he,ae,Be,Je,Me,Ve;if(!((ie=(Y=Object.values(L))==null?void 0:Y[0])!=null&&ie.includes(".doc"))){let me=(P=(Ee=(fe=($=p.cloneDeep((ge=Object.values(L))==null?void 0:ge[0]))==null?void 0:$.split("["))==null?void 0:fe[((_e=(X=p.cloneDeep((oe=Object.values(L))==null?void 0:oe[0]))==null?void 0:X.split("["))==null?void 0:_e.length)-1])==null?void 0:Ee.split("]"))==null?void 0:P[0],ct=me==null?void 0:me.split(":"),Ke=(Be=p.cloneDeep((he=Object.values(L))==null?void 0:he[0]))==null?void 0:Be.substring(0,p.cloneDeep((ae=Object.values(L))==null?void 0:ae[0]).lastIndexOf("["));if(Ke=(Me=p.cloneDeep(Ke))==null?void 0:Me.slice(0,((Je=p.cloneDeep(Ke))==null?void 0:Je.length)-1),Ke!=null&&Ke.includes("[")){let be="";if((Ve=_a(Ke,"/"))==null||Ve.forEach(De=>{var Qe,de,Ae,Fe,We,N,Ce;if(!(De!=null&&De.includes("[")))be=be===""?be+De.replaceAll("/",""):be+"/"+De.replaceAll("/","");else{let ut=p.cloneDeep(De).slice(1,((Qe=p.cloneDeep(De))==null?void 0:Qe.length)-1),et=(N=(We=(Fe=(Ae=(de=p.cloneDeep(ut))==null?void 0:de.split("["))==null?void 0:Ae[1])==null?void 0:Fe.split("]"))==null?void 0:We[0])==null?void 0:N.split(":"),ft="",rt=(Ce=g==null?void 0:g.find(Se=>(Se==null?void 0:Se.name)===(et==null?void 0:et[0])))==null?void 0:Ce.compData;rt==null||rt.forEach(Se=>{var Ze;(Se==null?void 0:Se.key)==="formContent"&&((Ze=Se==null?void 0:Se.contents)==null||Ze.forEach(He=>{(He==null?void 0:He.key)===(et==null?void 0:et[1])&&(ft=He==null?void 0:He.value)}))}),be=be===""?be+ft.replaceAll("/",""):be+"/"+ft.replaceAll("/","")}}),Ke=be,Ke[(Ke==null?void 0:Ke.length)-1]!=="/")return Ke}}}))==null?void 0:Le.filter(L=>L);F=[...new Set(p.cloneDeep(F))];let ee=F==null?void 0:F.map(async L=>{let Y=await Ne.getItemData(L,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);if((Y==null?void 0:Y.length)===0)return await Ne.getParentContents(L)});await Promise.all(ee);let R=[],pe=(re=(le=(ce=p.cloneDeep(q))==null?void 0:ce.extraValues)==null?void 0:le.output)==null?void 0:re.map(async L=>{var fe,Ee,P,he,ae,Be,Je,Me,Ve,me,ct,Ke,be,De,Qe,de,Ae,Fe,We,N,Ce,ut,et,ft,rt,Se,Ze,He,pt,vt,Tt,It,wt,Dt,Ot,Bt,Ut,Pt,Vt,qt,wn,fn,Dn,Sn,hn,Tn,vn,In,gn,Xn,Yn,Jn,jn,Bn,mn,zn,An,an,Cn,kt,Jt,gt,Qn,Mt,yn,Nn,on,Vn,Zt,Kn;if((Ee=(fe=Object.values(L))==null?void 0:fe[0])!=null&&Ee.includes(".doc")){var Y=new Blob([v.data],{type:"application/octet-stream;charset=UTF-8"}),ie=v.headers["content-disposition"],ge=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),$=ge.exec(ie),oe=$==null?void 0:$[1],X=document.createElement("a"),_e=window.URL.createObjectURL(Y);x.value=[{name:oe,blobUrl:_e}],d.value=!0}else{let bn=(me=(Ve=(Me=(he=p.cloneDeep((P=Object.values(L))==null?void 0:P[0]))==null?void 0:he.split("["))==null?void 0:Me[((Je=(Be=p.cloneDeep((ae=Object.values(L))==null?void 0:ae[0]))==null?void 0:Be.split("["))==null?void 0:Je.length)-1])==null?void 0:Ve.split("]"))==null?void 0:me[0],zt=bn==null?void 0:bn.split(":"),Gt=(be=p.cloneDeep((ct=Object.values(L))==null?void 0:ct[0]))==null?void 0:be.substring(0,p.cloneDeep((Ke=Object.values(L))==null?void 0:Ke[0]).lastIndexOf("["));if(Gt!=null&&Gt.includes("[")?Gt=(Qe=p.cloneDeep(Gt))==null?void 0:Qe.slice(0,((De=p.cloneDeep(Gt))==null?void 0:De.length)-1):Gt===""&&(Gt=w.value),Gt=Gt.replaceAll("<","[").replaceAll(">","]"),Gt!=null&&Gt.includes("[")){let Ct="";(de=_a(Gt,"/"))==null||de.forEach((At,Wt)=>{var Ht,$t,cn,rn,Un,Zn,Wn,ea,Na,ca,ba;if(!(At!=null&&At.includes("[")))Ct=Ct===""?Ct+At.replaceAll("/",""):Ct+"/"+At.replaceAll("/","");else{let ua="",kn="";(Ht=p.cloneDeep(At))!=null&&Ht.includes("]")?(ua=p.cloneDeep(At).slice(1,(($t=p.cloneDeep(At))==null?void 0:$t.length)-1),kn=(Wn=(Zn=(Un=(rn=(cn=p.cloneDeep(ua))==null?void 0:cn.split("["))==null?void 0:rn[1])==null?void 0:Un.split("]"))==null?void 0:Zn[0])==null?void 0:Wn.split(":")):(ua=p.cloneDeep(At).slice(1,(ea=p.cloneDeep(At))==null?void 0:ea.length),kn=(Na=p.cloneDeep(ua))==null?void 0:Na.split("/"));let ta="",pa=(ca=g==null?void 0:g.find(sn=>(sn==null?void 0:sn.name)===(kn==null?void 0:kn[0])))==null?void 0:ca.compData;pa==null||pa.forEach(sn=>{var Va;(sn==null?void 0:sn.key)==="formContent"&&((Va=sn==null?void 0:sn.contents)==null||Va.forEach(Hn=>{(Hn==null?void 0:Hn.key)===(kn==null?void 0:kn[1])&&(ta=Hn==null?void 0:Hn.value)}))}),((ba=_a(Gt,"/"))==null?void 0:ba.length)-1!==Wt?Ct=Ct===""?Ct+ta.replaceAll("/",""):Ct+"/"+ta.replaceAll("/",""):Ct=Ct+l.value+ta.replaceAll("/","")}}),(Ae=w.value)!=null&&Ae.includes(Ct)?Gt=w.value:Gt=Ct}let ln=p.cloneDeep((Fe=Object.keys(L))==null?void 0:Fe[0]);if(((We=v==null?void 0:v.data)==null?void 0:We.statusCode)===200||((N=v==null?void 0:v.data)==null?void 0:N.code)===200){if(((ut=(Ce=v==null?void 0:v.data)==null?void 0:Ce.data)!=null&&ut[ln]||(ft=(et=v==null?void 0:v.data)==null?void 0:et.result)!=null&&ft[ln])&&(zt==null?void 0:zt.length)===1)return await ne(((Se=(rt=v==null?void 0:v.data)==null?void 0:rt.data)==null?void 0:Se[ln])||((He=(Ze=v==null?void 0:v.data)==null?void 0:Ze.result)==null?void 0:He[ln]),p.cloneDeep(Gt),zt,C);if((vt=(pt=v==null?void 0:v.data)==null?void 0:pt.data)!=null&&vt[ln]||(It=(Tt=v==null?void 0:v.data)==null?void 0:Tt.result)!=null&&It[ln]){let Ct=await ze(((Dt=(wt=v==null?void 0:v.data)==null?void 0:wt.data)==null?void 0:Dt[ln])||((Bt=(Ot=v==null?void 0:v.data)==null?void 0:Ot.result)==null?void 0:Bt[ln]),p.cloneDeep(Gt),zt);return Ct&&(R=[...R,...Ct]),Ct}else{if(!((Ut=v==null?void 0:v.data)!=null&&Ut.data)){let Ct=await Ne.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Xe);Ct=Ct==null?void 0:Ct.map(Wt=>{var Ht;return(Wt==null?void 0:Wt.name)===(zt==null?void 0:zt[0])&&(Wt.compData=(Ht=Wt.compData)==null?void 0:Ht.map($t=>{var cn;return($t==null?void 0:$t.key)==="formContent"&&($t.contents=(cn=$t.contents)==null?void 0:cn.map(rn=>{var Un,Zn;return(rn==null?void 0:rn.key)===(zt==null?void 0:zt[1])&&(rn.value=(Zn=(Un=v==null?void 0:v.data)==null?void 0:Un.result)==null?void 0:Zn[ln==null?void 0:ln.replaceAll(":","")]),rn})),$t})),Wt});let At=[];(Pt=Ct==null?void 0:Ct.filter(Wt=>(Wt==null?void 0:Wt.comp)==="Form"))==null||Pt.forEach(async Wt=>{let Ht={};for(let $t in Wt)$t!=="id"&&(Ht[$t]=Wt[$t]);At.push({id:Wt==null?void 0:Wt.id,value:{pageData:Ht}})}),(At==null?void 0:At.length)>0&&await p.batchUpdateInsofDataApi({dataList:At});return}if((zt==null?void 0:zt.length)===1){const Ct=(wn=(qt=(Vt=v==null?void 0:v.data)==null?void 0:Vt.data)==null?void 0:qt.path)==null?void 0:wn.path;let At="";(Tn=(hn=(Sn=(Dn=(fn=Ct==null?void 0:Ct.split("("))==null?void 0:fn[1])==null?void 0:Dn.split(")"))==null?void 0:Sn[0])==null?void 0:hn.split(":"))==null||Tn.forEach($t=>{var cn,rn;At=At===""?At+((cn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:cn.trim()):At+"/"+((rn=$t==null?void 0:$t.replaceAll("'",""))==null?void 0:rn.trim())});let Wt=[(Yn=(Xn=(gn=(In=(vn=Ct==null?void 0:Ct.split("<"))==null?void 0:vn[1])==null?void 0:In.split(">"))==null?void 0:gn[0])==null?void 0:Xn.replaceAll("'",""))==null?void 0:Yn.trim()],Ht;return(Bn=(jn=(Jn=v==null?void 0:v.data)==null?void 0:Jn.data)==null?void 0:jn.data)!=null&&Bn[zt==null?void 0:zt[0]]?Ht=await ne((An=(zn=(mn=v==null?void 0:v.data)==null?void 0:mn.data)==null?void 0:zn.data)==null?void 0:An[zt==null?void 0:zt[0]],At,zt,C):Ht=await ue((Cn=(an=v==null?void 0:v.data)==null?void 0:an.data)==null?void 0:Cn.data,At,Wt,Xe),Ht}else{const Ct=(gt=(Jt=(kt=v==null?void 0:v.data)==null?void 0:kt.data)==null?void 0:Jt.path)==null?void 0:gt.path;let At="";return(on=(Nn=(yn=(Mt=(Qn=Ct==null?void 0:Ct.split("("))==null?void 0:Qn[1])==null?void 0:Mt.split(")"))==null?void 0:yn[0])==null?void 0:Nn.split(":"))==null||on.forEach(Ht=>{var $t,cn;At=At===""?At+(($t=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:$t.trim()):At+"/"+((cn=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:cn.trim())}),await ze((Kn=(Zt=(Vn=v==null?void 0:v.data)==null?void 0:Vn.data)==null?void 0:Zt.data)==null?void 0:Kn[zt==null?void 0:zt[0]],At,zt)}}}}});if(await Promise.all(pe),(R==null?void 0:R.length)>0){let L=[];R==null||R.forEach(ge=>{L!=null&&L.find($=>{var oe,X,_e,fe;return((X=(oe=$==null?void 0:$.value)==null?void 0:oe.pageData)==null?void 0:X.name)===((fe=(_e=ge==null?void 0:ge.value)==null?void 0:_e.pageData)==null?void 0:fe.name)})||L.push(ge)});let Y=[];L==null||L.forEach(ge=>{var X,_e,fe,Ee;let $=p.cloneDeep(ge);$.value.pageData.compData=(X=$.value.pageData.compData)==null?void 0:X.map(P=>{var he;return(P==null?void 0:P.key)==="formContent"&&(P.contents=(he=P.contents)==null?void 0:he.map(ae=>{var Je,Me,Ve,me;let Be=(Je=p.cloneDeep(R))==null?void 0:Je.find(ct=>(ct==null?void 0:ct.keyType)===(ae==null?void 0:ae.key));if(Be){let ct=(me=(Ve=(Me=Be.value.pageData.compData)==null?void 0:Me.find(Ke=>(Ke==null?void 0:Ke.key)==="formContent"))==null?void 0:Ve.contents)==null?void 0:me.find(Ke=>(Ke==null?void 0:Ke.key)===(ae==null?void 0:ae.key));ae.value=ct==null?void 0:ct.value}return ae})),P}),Y.push({id:$==null?void 0:$.id,value:$==null?void 0:$.value});let oe=[];(Ee=(fe=(_e=$==null?void 0:$.value)==null?void 0:_e.pageData)==null?void 0:fe.compData)==null||Ee.forEach(P=>{var he;(P==null?void 0:P.key)==="formContent"&&((he=P==null?void 0:P.contents)==null||he.forEach(ae=>{var Be,Je,Me,Ve,me,ct;if((Je=(Be=ae==null?void 0:ae.optionUrl)==null?void 0:Be.menuSelect)!=null&&Je.find(Ke=>Ke==null?void 0:Ke.includes("[")))if(oe!=null&&oe.find(Ke=>{var be,De,Qe;return((be=Ke==null?void 0:Ke.key)==null?void 0:be.join(","))===((Qe=(De=ae==null?void 0:ae.optionUrl)==null?void 0:De.menuSelect)==null?void 0:Qe.join(","))})){let Ke=(Me=oe==null?void 0:oe.find(be=>{var De,Qe,de;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((de=(Qe=ae==null?void 0:ae.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:de.join(","))}))==null?void 0:Me.value;Ke.push({key:ae==null?void 0:ae.prop,groups:(Ve=ae==null?void 0:ae.optionUrl)==null?void 0:Ve.groupSelect,value:ae==null?void 0:ae.value}),oe=oe==null?void 0:oe.map(be=>{var De,Qe,de;return((De=be==null?void 0:be.key)==null?void 0:De.join(","))===((de=(Qe=ae==null?void 0:ae.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:de.join(","))&&(be.value=Ke),be})}else oe.push({key:(me=ae==null?void 0:ae.optionUrl)==null?void 0:me.menuSelect,value:[{key:ae==null?void 0:ae.prop,groups:(ct=ae==null?void 0:ae.optionUrl)==null?void 0:ct.groupSelect,value:ae==null?void 0:ae.value}]})}))}),(oe==null?void 0:oe.length)>0&&(oe=oe==null?void 0:oe.map(P=>{var ae;let he="";return(ae=P==null?void 0:P.key)==null||ae.forEach(Be=>{var Je;if(!(Be!=null&&Be.includes("[")))he=he===""?he+Be:he+"/"+Be;else{let Me="",Ve=(Je=Be==null?void 0:Be.replaceAll("[","").replaceAll("]",""))==null?void 0:Je.split(":");g==null||g.forEach(me=>{var ct;(me==null?void 0:me.name)===(Ve==null?void 0:Ve[0])&&((ct=me==null?void 0:me.compData)==null||ct.forEach(Ke=>{var be;(Ke==null?void 0:Ke.key)==="formContent"&&((be=Ke==null?void 0:Ke.contents)==null||be.forEach(De=>{(De==null?void 0:De.prop)===(Ve==null?void 0:Ve[1])&&(Me=De==null?void 0:De.value)}))}))}),he=he+l.value+Me}}),P.key=he,P})),oe==null||oe.forEach(P=>{var Je,Me,Ve;let he=(Je=Xe[P.key])==null?void 0:Je.find(me=>{var ct,Ke,be,De,Qe,de,Ae;return((Ke=(ct=me==null?void 0:me.value)==null?void 0:ct.pageData)==null?void 0:Ke.name)===((Qe=(De=(be=P==null?void 0:P.value)==null?void 0:be[0])==null?void 0:De.groups)==null?void 0:Qe[0])&&((Ae=(de=me==null?void 0:me.value)==null?void 0:de.pageData)==null?void 0:Ae.name)!==void 0}),ae=he==null?void 0:he.id,Be=(Me=he==null?void 0:he.value)==null?void 0:Me.pageData;Be.compData=(Ve=Be.compData)==null?void 0:Ve.map(me=>{var ct;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(ct=me.contents)==null?void 0:ct.map(Ke=>{var De;let be=(De=P.value)==null?void 0:De.find(Qe=>(Qe==null?void 0:Qe.key)===(Ke==null?void 0:Ke.prop));return be&&(Ke.value=be.value),Ke})),me}),Y.push({id:ae,value:{pageData:Be}})})});let ie=(Te=p.cloneDeep(R))==null?void 0:Te[0];(Y==null?void 0:Y.length)>0&&await p.batchUpdateInsofDataApi({dataList:Y})}D.setFreshContent(!0)}T.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),T.setImportLoading(!1)}I.value=!0},ve=["createInsofDataApi"],Ue=Ne.debounce(async q=>{te(q)},100),st=async q=>{var qe,lt,Z,tt,at;const M=p.cloneDeep(q);let ye,xe=new WeakMap,Re=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value});(lt=(qe=Re.data.result)==null?void 0:qe.filter(Le=>{var ce,le;return((ce=Le==null?void 0:Le.key)==null?void 0:ce.pageKey)!=="menu"&&((le=Le==null?void 0:Le.key)==null?void 0:le.pageKey)!=="secret"}))==null||lt.forEach(Le=>{xe[Le.key.pageKey]?xe[Le.key.pageKey]=[...xe[Le.key.pageKey],Le]:xe[Le.key.pageKey]=[Le]}),q!=null&&q[0].path&&(ye=await(M==null?void 0:M.map(async(Le,ce)=>{var U,J,v,F,ee,R,pe,L,Y,ie,ge,$,oe,X,_e,fe;const re=(U=xe[Le==null?void 0:Le.path])==null?void 0:U.filter(Ee=>{var P;return((P=Ee==null?void 0:Ee.key)==null?void 0:P.type)==="data"});let Te="";const Xe=await Ne.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);re==null||re.forEach(Ee=>{var P,he,ae,Be,Je;((he=(P=Ee==null?void 0:Ee.value)==null?void 0:P.tableData)==null?void 0:he.算法名称)===((ae=M==null?void 0:M[ce])==null?void 0:ae.method)&&(Te=(Je=(Be=Ee==null?void 0:Ee.value)==null?void 0:Be.tableData)==null?void 0:Je.算法体)});const dt=await Ne.getItemData(Le==null?void 0:Le.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);let g="",C=(ee=(F=(v=(J=dt==null?void 0:dt[0])==null?void 0:J.compData)==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.key)==="header"))==null?void 0:F.contents)==null?void 0:ee.findIndex(Ee=>(Ee==null?void 0:Ee.prop)==="算法体");return(pe=(R=dt==null?void 0:dt[0])==null?void 0:R.compData)==null||pe.forEach(Ee=>{var P;(Ee==null?void 0:Ee.key)==="tableContents"&&((P=Ee==null?void 0:Ee.contents)==null||P.forEach(he=>{he!=null&&he.find(ae=>ae===(Le==null?void 0:Le.method))&&(g=he[C])}))}),{buttonName:((L=M==null?void 0:M[ce])==null?void 0:L.method)||((ge=(ie=(Y=re==null?void 0:re[0])==null?void 0:Y.value)==null?void 0:ie.tableData)==null?void 0:ge.算法名称),api:(Te===""?(X=(oe=($=re==null?void 0:re[0])==null?void 0:$.value)==null?void 0:oe.tableData)==null?void 0:X.算法体:Te)||g,content:Xe==null?void 0:Xe.filter(Ee=>Ee.comp!=="methodButton"),extraContent:(_e=p.cloneDeep(Le.value))==null?void 0:_e.slice(1),methodName:(Le==null?void 0:Le.path)??"",extraValues:(fe=M==null?void 0:M[ce])==null?void 0:fe.data}})));const Oe=M==null?void 0:M.map(async Le=>{var dt,g,C,U,J,v;const ce=(dt=Re.data.result)==null?void 0:dt.filter(F=>{var ee,R,pe;return((ee=F==null?void 0:F.key)==null?void 0:ee.parentTable)===""&&((R=F==null?void 0:F.key)==null?void 0:R.type)==="method"&&((pe=F==null?void 0:F.key)==null?void 0:pe.methodName)===F.method}),le=ce==null?void 0:ce[0],re=(g=Re.data.result)==null?void 0:g.filter(F=>{var ee,R;return((ee=F==null?void 0:F.key)==null?void 0:ee.type)==="methodData"&&((R=F==null?void 0:F.key)==null?void 0:R.tableId)===(le==null?void 0:le.id)}),Te=await Ne.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe),Xe=re==null?void 0:re[0];return{buttonName:(C=le==null?void 0:le.key)==null?void 0:C.methodKey,api:(J=(U=Xe==null?void 0:Xe.value)==null?void 0:U.tableData)==null?void 0:J[0],content:Te==null?void 0:Te.filter(F=>F.comp!=="methodButton"),extraContent:(v=p.cloneDeep(Le.value))==null?void 0:v.slice(1),methodName:(Le==null?void 0:Le.method)??""}}),Ye=(Z=q==null?void 0:q[0])!=null&&Z.path&&((tt=q==null?void 0:q[0])==null?void 0:tt.path)!==""?await Promise.all(ye):await Promise.all(Oe);s.value=Ye==null?void 0:Ye.filter(Le=>Le==null?void 0:Le.extraContent),(at=s.value)==null||at.forEach(Le=>{var ce;Le.api===""&&((ce=Le.content)==null||ce.forEach(le=>{var re;le.comp=="Table"&&D.setExtraContents(Ne.methodTableToContent(le.compData,(re=Le.extraContent)==null?void 0:re[0]))}))})};return e.watch(()=>c.itemData,async()=>{V.value=="view"&&!I.value&&await st(p.cloneDeep(c.itemData)),I.value=!1},{immediate:!0,deep:!0}),(q,M)=>{var ye,xe,Re;return e.unref(V)!=="edit"?(e.openBlock(),e.createElementBlock("div",sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ye=s.value)==null?void 0:ye.filter(Oe=>(Oe==null?void 0:Oe.buttonName)!=="保存"),Oe=>{var Ye;return e.openBlock(),e.createElementBlock("div",null,[Oe.api!==""?(e.openBlock(),e.createBlock(e.unref(Ne._sfc_main),{key:0,disabled:e.unref(K)===e.unref(w)&&!((Ye=Oe==null?void 0:Oe.buttonName)!=null&&Ye.includes("预览")),class:"calculator-content",modelValue:Oe.buttonName,onClickTrigger:qe=>e.unref(Ue)(Oe),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&((Re=e.unref(w))==null?void 0:Re[((xe=e.unref(w))==null?void 0:xe.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Ne._sfc_main),{key:0,class:"calculator-content",onClickTrigger:se,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:$e},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},uc=Lt._export_sfc(cc,[["__scopeId","data-v-11fca7e0"]]),pc={};function dc(a,s){return" 567 "}const fc=Lt._export_sfc(pc,[["render",dc]]),hc={class:"module content"},vc={class:"module data"},gc={class:"module layout"},mc={class:"form-content"},yc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),m=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),h=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),D=e.ref({}),E=e.ref([]),T=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:D.value}]}),O=W=>{var K;D.value=p.cloneDeep(W),l("change",(K=T())==null?void 0:K.compData)},H=W=>{var K,G;if((W==null?void 0:W.buttonName)==="确认"){const w=p.cloneDeep(W==null?void 0:W.content);switch(d.value){case"create":E.value.push({...w,index:((K=E.value)==null?void 0:K.length)+1});break}l("change",(G=T())==null?void 0:G.compData),c.visible=!1}else c.visible=!1},V=(W,K)=>{var G,w;switch(W){case"create":(G=h.value)==null||G.forEach(z=>{z.value=""}),d.value="create",c.visible=!0;break;case"update":(w=h.value)==null||w.forEach(z=>{z.value=K[z==null?void 0:z.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice(K,1),d.value="delete";break}},ke=()=>{c.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,W=>{var K,G;W&&(D.value=((K=W==null?void 0:W.find(w=>w.key==="signConfig"))==null?void 0:K.contents)??{},E.value=((G=W==null?void 0:W.find(w=>w.key==="signTypeList"))==null?void 0:G.contents)??[])},{immediate:!0}),(W,K)=>{const G=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",hc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=z=>V("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(z,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[e.createElementVNode("span",null,e.toDisplayString(z==null?void 0:z.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:A=>V("update",{...z,index:k+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:A=>V("delete",k)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",gc,[e.createVNode(Nt.ssForm,{rowContents:m.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ke,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",mc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),bc=Lt._export_sfc(yc,[["__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:s}){const i=a,l=s,c=e.ref(1),d=e.computed(()=>{var T,O;return(T=i==null?void 0:i.stepConfig)!=null&&T.allowTrigger?c.value:(O=i==null?void 0:i.stepConfig)==null?void 0:O.active}),x=(T,O)=>{c.value=O,l("clickStep",T,O)},m=T=>Nt.getComponent(T),h=()=>{var O;const T=(O=i==null?void 0:i.stepList)==null?void 0:O.find((H,V)=>V+1===d.value);return console.log("findStep",T),T?T==null?void 0:T.children:[]},D=T=>{l("clickTrigger",T)},E=T=>{l("changeTrigger",T)};return(T,O)=>{var ke,W,K,G,w;const H=e.resolveComponent("el-step"),V=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{direction:(ke=a.stepConfig)==null?void 0:ke.direction,active:d.value,"finish-status":"success",simple:(W=a.stepConfig)==null?void 0:W.simple,"align-center":((K=a.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(z,k)=>(e.openBlock(),e.createBlock(H,{key:k,class:"step-item",onClick:A=>x(z,k+1)},{title:e.withCtx(()=>[e.renderSlot(T.$slots,"title",{title:z==null?void 0:z.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(T.$slots,"description",{description:z==null?void 0:z.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(G=a.stepConfig)!=null&&G.allowTrigger&&((w=a.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(z,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m(z==null?void 0:z.type)),{modelValue:z.value,"onUpdate:modelValue":A=>z.value=A,onClickTrigger:D,onChangeTrigger:E,content:z==null?void 0:z.content},e.createSlots({_:2},[e.renderList(T.$slots,(A,I)=>({name:I,fn:e.withCtx(se=>[e.renderSlot(T.$slots,I,e.mergeProps({ref_for:!0},se||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),xc=Lt._export_sfc(kc,[["__scopeId","data-v-d7c99969"]]),wc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:s}){const i=a,l=s,c=e.ref({}),d=e.ref([]),x=(m,h)=>{l("clickStep",m,h)};return e.watch(()=>i==null?void 0:i.itemData,m=>{var h,D;d.value=(h=m==null?void 0:m.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(D=m==null?void 0:m.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(m,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(xc,{stepConfig:c.value,stepList:d.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),Dc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(s,i)=>{const l=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,x)=>(e.openBlock(),e.createBlock(l,{key:x,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Cc=Lt._export_sfc(Dc,[["__scopeId","data-v-4172a886"]]),Ec={class:"line-content"},_c={class:"line-time"},Sc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const s=a,i=e.ref({}),l=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,c=>{var d,x;l.value=(d=c==null?void 0:c.find(m=>(m==null?void 0:m.key)==="timeLineList"))==null?void 0:d.contents,i.value=(x=c==null?void 0:c.find(m=>(m==null?void 0:m.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(Cc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:x,timestamp:m})=>[e.createElementVNode("span",Ec,e.toDisplayString(x),1),e.createElementVNode("span",_c,e.toDisplayString(m),1)]),_:1},8,["activities","timeLineConfig"]))}}),Tc=Lt._export_sfc(Sc,[["__scopeId","data-v-b4d9deed"]]),Ic={class:"tabs-content"},Bc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const s=a,i=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?i.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):i.value=s==null?void 0:s.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Ic,[e.createVNode(Nt.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},Ac=Lt._export_sfc(Bc,[["__scopeId","data-v-40865f68"]]),lo=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Nc={class:"type-select"},Vc=["onClick"],Oc={class:"list-icon"},Mc={__name:"modelSelect",setup(a){const s=lo(p.pinia),{itemData:i}=p.storeToRefs(s),l=c=>{const d=p.cloneDeep(i.value);d.push({comp:c.comp,name:c.name,compData:[]}),s.setItemData(d)};return(c,d)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(er),(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(m)},[e.createElementVNode("div",Oc,[e.createVNode(x,{name:m.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(m.name),1)],8,Vc)]))),128))])}}},zc=Lt._export_sfc(Mc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Lc={class:"operate-content"},Pc={class:"collapse-title-content"},Fc={class:"collapse-title-item"},$c={key:1},jc=["onClick"],Kc={class:"icon-content"},Uc={key:0,class:"edit-content"},Wc=["onClick"],Hc={class:"comp-child"},qc={__name:"modelFill",setup(a){const s=lo(p.pinia),{itemData:i,originalData:l}=p.storeToRefs(s),c=e.ref([]);e.ref([]);const d=e.ref([]),x=e.ref([]),m=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,K)=>(H===K&&(W.content=!0),W));x.value=V},h=H=>{var ke;let V=(ke=p.cloneDeep(x.value))==null?void 0:ke.map((W,K)=>(H===K&&(W.content=!1),W));x.value=V,c.value=p.cloneDeep(i.value)},D=(H,V)=>{var G;let ke=(G=p.cloneDeep(x.value))==null?void 0:G.map((w,z)=>(H===z&&(w.content=!1),w));x.value=ke;const W=p.cloneDeep(i.value),K=W==null?void 0:W.filter((w,z)=>(z===H&&(w.name=V),w));s.setOriginalData(K),s.setItemData(K)};e.watch(()=>i.value,()=>{var H,V,ke;!i.value||((H=i.value)==null?void 0:H.length)===0?c.value=[]:c.value=(V=p.cloneDeep(i.value))==null?void 0:V.filter(W=>(W==null?void 0:W.comp)!=="methodButton"),d.value=c.value,x.value=(ke=p.cloneDeep(d.value))==null?void 0:ke.map((W,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const E=H=>ya(H),T=(H,V,ke)=>{var K,G;if(!H)return;let W=p.cloneDeep(i.value);W=(K=W==null?void 0:W.map((w,z)=>(z===ke&&(w.compData=H),w)))==null?void 0:K.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),x.value=(G=p.cloneDeep(W))==null?void 0:G.map((w,z)=>({id:z,content:!1})),s.setOriginalData(W),s.setItemData(W)},O=H=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const V=p.cloneDeep(i.value),ke=V==null?void 0:V.filter((W,K)=>K!==H);s.setOriginalData(ke),s.setItemData(ke),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(H,V)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[V[1]||(V[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Lc,[e.createVNode(gl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:W,index:K})=>{var G,w,z,k,A,I,se,$e,nt,Ie;return[e.createElementVNode("div",Pc,[e.createElementVNode("div",Fc,[(w=(G=x.value)==null?void 0:G.find(ze=>ze.id===K))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:W.name&&W.name!==""?"8px":"0px"})},e.toDisplayString(W.name),5)),(k=(z=x.value)==null?void 0:z.find(ze=>ze.id===K))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",$c,[e.createVNode(Nt._sfc_main$2,{modelValue:W.name,"onUpdate:modelValue":ze=>W.name=ze,onClick:V[0]||(V[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(I=(A=x.value)==null?void 0:A.find(ze=>ze.id===K))!=null&&I.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(ze=>m(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,jc))]),e.createElementVNode("div",Kc,[($e=(se=x.value)==null?void 0:se.find(ze=>ze.id===K))!=null&&$e.content?(e.openBlock(),e.createElementBlock("div",Uc,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(ze=>h(K),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers(ze=>D(K,W.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ie=(nt=x.value)==null?void 0:nt.find(ze=>ze.id===K))!=null&&Ie.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(ze=>O(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Wc))])])]}),content:e.withCtx(({item:W,index:K})=>{var G,w;return[e.createElementVNode("div",Hc,[e.createTextVNode(e.toDisplayString(E(W.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(W.comp+"Operate")),{itemContents:W==null?void 0:W.compData,originalItemContents:(w=(G=d.value)==null?void 0:G.find((z,k)=>k===K))==null?void 0:w.compData,onChange:z=>T(z,W,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Gc=Lt._export_sfc(qc,[["__scopeId","data-v-a46a44b9"]]),Xc={key:0,class:"show-content"},Yc={style:{display:"flex"}},Jc={__name:"modelShow",setup(a){const s=lo(p.pinia),{itemData:i}=p.storeToRefs(s),l=e.ref([]);e.watch(()=>i.value,()=>{var d;!i.value||((d=i.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(i.value)},{deep:!0,immediate:!0});const c=d=>ya(d);return(d,x)=>{var m;return((m=l.value)==null?void 0:m.length)>0?(e.openBlock(),e.createElementBlock("div",Xc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",Yc,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},Qc=Lt._export_sfc(Jc,[["__scopeId","data-v-3f3e863e"]]),Zc={class:"tabs-header"},eu={class:"tabs-list"},tu={class:"tab-name"},nu={class:"tab-actions"},au=["onClick"],ou=["onClick"],lu=["onClick"],ru={class:"model-operate"},iu={class:"model-select",style:{display:"unset"}},su={class:"existing-components"},cu={class:"component-list"},uu=["onClick"],pu={class:"component-info"},du={class:"component-type"},fu={class:"component-name"},hu={class:"model-fill"},vu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.ref([]),d=e.ref(!1),x=e.ref(""),m=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),E=e.ref(-1),T=e.ref(new WeakMap),O=e.ref(null),H=lo(p.pinia),{itemData:V}=p.storeToRefs(H),ke=()=>{x.value="新增标签页",m.value.title="",h.value=-1,d.value=!0},W=q=>{x.value="修改标签页",m.value.title=c.value[q].title,h.value=q,d.value=!0},K=q=>{const M=z(q);T.value.delete(M),c.value.splice(q,1),st()},G=()=>{if(m.value.title.trim()){if(h.value===-1){const q={title:m.value.title,value:m.value.title,label:m.value.title,children:[],id:w()};c.value.push(q)}else c.value[h.value].title=m.value.title,c.value[h.value].value=m.value.title,c.value[h.value].label=m.value.title;d.value=!1,st()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,z=q=>{const M=c.value[q];return M.id||(M.id=w()),M.id},k=q=>{var xe;E.value=q;const M=z(q);O.value=p.cloneDeep(V.value);let ye=T.value.get(M);!ye&&((xe=c.value[q].children)==null?void 0:xe.length)>0&&(ye=$e(c.value[q].children)),ye?H.setItemData(p.cloneDeep(ye)):H.setItemData([]),D.value=!0},A=e.computed(()=>{const q=jt.useModelComp(p.pinia),M=p.storeToRefs(q).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(ye=>{var xe;if(ye.comp==="Tabs"&&E.value>=0){const Re=z(E.value);if((xe=ye.compData)==null?void 0:xe.some(Ye=>{var qe;return Ye.key==="stepList"&&((qe=Ye.contents)==null?void 0:qe.some(lt=>lt.id===Re))}))return!1}return!0})}),I=q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[q]||q,se=q=>{var M;try{const ye=p.cloneDeep(q);ye.id=Date.now()+Math.random(),ye.comp==="Tabs"&&((M=ye.compData)==null||M.forEach(Re=>{Re.key==="stepList"&&Re.contents&&Re.contents.forEach(Oe=>{Oe.id=w()})}));const xe=p.cloneDeep(V.value);xe.push(ye),H.setItemData(xe)}catch(ye){console.error("添加组件失败:",ye)}},$e=q=>q.map(M=>{var ye;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:nt(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Ie(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((ye=M.content)==null?void 0:ye.originalData)||[]}}}),nt=q=>{if(!q)return[];const M=[];return q.rowContents&&M.push({key:"formContent",contents:q.rowContents}),q.buttonValue&&M.push({key:"formButton",contents:q.buttonValue}),typeof q.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:q.isEnableWrap}),M},Ie=q=>[],ze=()=>{if(E.value>=0&&E.value<c.value.length){const q=z(E.value);T.value.set(q,p.cloneDeep(V.value)),c.value[E.value].children=ne(V.value),console.log("保存后的数据",ne(V.value))}D.value=!1,E.value=-1,O.value=null,st()},ue=()=>{O.value&&H.setItemData(p.cloneDeep(O.value)),D.value=!1,E.value=-1,O.value=null},_=()=>{D.value&&ue()},ne=q=>{if(!Array.isArray(q))throw new Error("sourceData must be an array");return q.map((M,ye)=>{if(!M||typeof M!="object")return M;const{comp:xe,name:Re,compData:Oe}=M;switch(xe){case"Form":return{type:"form",content:te(Oe||[]),value:"表单"};case"Table":return{type:"table",content:ve(Oe||[]),value:"表格"};default:return{type:"xxx",content:Ue(Oe||[]),value:""}}})},te=q=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ye={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return q.forEach((xe,Re)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Re}:`,xe);return}const{key:Oe,contents:Ye}=xe,qe=ye[Oe];if(!qe){console.warn(`Unknown Form config key: ${Oe}`);return}Oe==="enableWrap"?M[qe]=!!Ye:M[qe]=Array.isArray(Ye)?Ye:[]}),M},ve=q=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ye={header:"columns",tableContents:"tableData"};return q.forEach((xe,Re)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Re}:`,xe);return}const{key:Oe,contents:Ye}=xe,qe=ye[Oe];if(!qe){console.warn(`Unknown Table config key: ${Oe}`);return}M[qe]=Array.isArray(Ye)?Ye:[]}),M},Ue=q=>(console.log("Default conversion logic - to be implemented"),{originalData:q,processed:!1,componentType:"unknown"}),st=()=>{const q=[{key:"stepList",contents:c.value}];l("change",q)};return e.watch(()=>i.itemContents,q=>{if(q&&q.length>0){const M=q.find(ye=>ye.key==="stepList");M&&M.contents&&(c.value=M.contents.map(ye=>({title:ye.title||"",value:ye.value||ye.title||"",label:ye.label||ye.title||"",children:ye.children||[],id:ye.id||w()})))}},{immediate:!0,deep:!0}),(q,M)=>{const ye=e.resolveComponent("svg-icon"),xe=e.resolveComponent("el-input"),Re=e.resolveComponent("el-form-item"),Oe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Zc,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(ye,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ye,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",tu,e.toDisplayString(Ye.title),1),e.createElementVNode("div",nu,[e.createElementVNode("button",{onClick:lt=>W(qe)},"修改标题",8,au),e.createElementVNode("button",{onClick:lt=>k(qe)},"布局调整",8,ou),e.createElementVNode("button",{onClick:lt=>K(qe)},"删除",8,lu)])]))),128))]),e.createVNode(Yt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":M[2]||(M[2]=Ye=>d.value=Ye),title:x.value,onBeforeDestroy:M[3]||(M[3]=Ye=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=Ye=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:G},"确定")]),default:e.withCtx(()=>[e.createVNode(Oe,{model:m.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Re,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(xe,{modelValue:m.value.title,"onUpdate:modelValue":M[0]||(M[0]=Ye=>m.value.title=Ye),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Yt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=Ye=>D.value=Ye),title:"布局调整",fullScreen:"",onBeforeDestroy:_},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:ue},"取消"),e.createElementVNode("button",{onClick:ze},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",ru,[e.createElementVNode("div",iu,[e.createVNode(zc),e.createElementVNode("div",su,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",cu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Ye=>(e.openBlock(),e.createElementBlock("div",{key:Ye.id,class:"component-item",onClick:qe=>se(Ye)},[e.createElementVNode("div",pu,[e.createElementVNode("span",du,e.toDisplayString(I(Ye.comp)),1),e.createElementVNode("span",fu,e.toDisplayString(Ye.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,uu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:q.innerWidth},[e.createVNode(Qc)])),e.createElementVNode("div",hu,[e.createVNode(Gc)])])]),_:1},8,["modelValue"])])}}},gu=Lt._export_sfc(vu,[["__scopeId","data-v-9096ed0d"]]);function mu(){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 yu(a){return{type:"line",...a}}function bu(){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 xu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function wu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const $n={line:{initBaseoptions:mu,initSeries:yu},bar:{initBaseoptions:bu,initSeries:ku},pie:{initBaseoptions:xu,initSeries:wu}},zo=jt.useMenuState(p.pinia),_l=(a,s)=>{var E;const i=[],l=[],{group:c,nameCol:d,valueCol:x}=s||{},m=a==null?void 0:a.find(T=>{const{name:O}=T;return O===c});if(!m)return{names:i,values:l};const h=(E=m==null?void 0:m.compData)==null?void 0:E.find(T=>{const{key:O}=T;return O==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(T=>{const O=T==null?void 0:T[0];let H=!1;p.isObject(O)&&(O!=null&&O.id)&&(H=!0);let V=d,ke=x;H&&(V=V+1,ke=ke+1);const W=T==null?void 0:T[V],K=T==null?void 0:T[ke];i.push(W),l.push(K)}),{names:i,values:l}},Du=async a=>{const{menu:s,mainKey:i,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:x}=a||{};let m=null;const h=sessionStorage.getItem("systemKey");if(x&&zo.activeMenuPath&&(m=await Ne.getItemData(`${zo.activeMenuPath}`,h,"")),!x){const D=s==null?void 0:s.join("/");m=await Ne.getItemData(`${D}^${i}`,h,"")}return _l(m,{group:l,nameCol:c,valueCol:d})},Cu=async a=>{const{menu:s,group:i,nameCol:l,valueCol:c}=a||{},d=s==null?void 0:s.join("/"),x=sessionStorage.getItem("systemKey"),m=await Ne.getItemData(d,x,"");return _l(m,{group:i,nameCol:l,valueCol:c})},yo=async(a,s)=>{const i={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:x}=a||{};if(!l.length||!c)return i;const{mainKey:m,group:h,nameCol:D,valueCol:E,isSelfDetail:T}=s||{};return m&&h&&Nt.isNumber(D)&&Nt.isNumber(E)?await Du({menu:l,mainKey:m,detailGroup:h,detailNameCol:D,detailValueCol:E,isSelfDetail:T}):Nt.isNumber(d)&&Nt.isNumber(x)?await Cu({menu:l,group:c,nameCol:d,valueCol:x}):i},Eu=async({chartBaseConfig:a,chartDataConfig:s,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:m}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await yo(s,i);if(!D||!E)return h;h.xAxis.data=D;const T=m({data:E});return h.series.push(T),h},_u=async({chartBaseConfig:a,chartDataConfig:s,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:m}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await yo(s,i);if(!D||!E)return h;h.xAxis.data=D;const T=m({data:E});return h.series.push(T),h},Su=async({chartBaseConfig:a,chartDataConfig:s,chartDetailConfig:i})=>{const{type:l,title:c}=a||{},d=$n==null?void 0:$n[l];if(!d)return;const{initBaseoptions:x,initSeries:m}=d,h=x();h.title.text=c??"";const{names:D,values:E}=await yo(s,i);if(!D||!E)return h;const T=[];for(let H=0;H<D.length;H++){const V=D[H],ke=E[H];T.push({name:V,value:ke})}const O=m({data:T});return h.series.push(O),h},Tu=async(a=[])=>{var x,m,h;const s=((x=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:x.contents)??{},i=((m=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:m.contents)??{},l=((h=a==null?void 0:a.find(D=>D.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=s;let d={};return c==="line"&&(d=await Eu({chartBaseConfig:s,chartDataConfig:i,chartDetailConfig:l})),c==="bar"&&(d=await _u({chartBaseConfig:s,chartDataConfig:i,chartDetailConfig:l})),c==="pie"&&(d=await Su({chartBaseConfig:s,chartDataConfig:i,chartDetailConfig:l})),d},Iu=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 s=a,i=e.ref({});e.onMounted(async()=>{const c=s==null?void 0:s.itemData;i.value=await Tu(c)});const l=e.computed(()=>(s==null?void 0:s.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Vr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),Bu=Lt._export_sfc(Iu,[["__scopeId","data-v-d4c081e8"]]),Au={class:"chart-module layout"},Nu={class:"chart-module content"},Vu={class:"chart-module content"},Ou={class:"form-content"},Mu={class:"dialog-footer"},zu={class:"form-content"},Ru={class:"dialog-footer"},Lu={class:"form-content"},Pu={class:"dialog-footer"},Fu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),x=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],m=e.ref({}),h=()=>{var ce;d.value=x(),(ce=d.value)==null||ce.forEach(le=>{var Te;const re=le==null?void 0:le.prop;le.value=(Te=m==null?void 0:m.value)==null?void 0:Te[re]}),c.visible=!0},D=ce=>{m.value=ce},E=()=>{var ce;c.visible=!1,l("change",(ce=at())==null?void 0:ce.compData)},T=e.reactive({visible:!1,width:"840",title:"数据配置"}),O=e.ref([]),H=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],V=e.ref({}),ke=()=>{const ce=O.value,le=p.cloneDeep(ce);return le==null||le.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=V.value)==null?void 0:Xe[Te]}),le},W=ce=>{var re;V.value=ce;const le=ke();O.value=le,l("change",(re=at())==null?void 0:re.compData)},K=async()=>{const ce=await Ne.getMenusContent(),le=ke();le==null||le.forEach(re=>{(re==null?void 0:re.prop)==="menu"&&(re.contents=ce)}),O.value=le,T.visible=!0,await Ye(V.value.menu),await Z(V.value.group)},G=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),z=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),A=()=>{const ce=w.value,le=p.cloneDeep(ce);return le==null||le.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k.value)==null?void 0:Xe[Te]}),le},I=ce=>{var re;k.value=ce;const le=A();w.value=le,l("change",(re=at())==null?void 0:re.compData)},se=async()=>{await _();const ce=p.cloneDeep($e.value),le=A();le==null||le.forEach(re=>{var Xe;const Te=re==null?void 0:re.prop;re.value=(Xe=k==null?void 0:k.value)==null?void 0:Xe[Te],Te==="mainKey"&&(re.contents=ce)}),w.value=le,G.visible=!0},$e=e.ref([]),nt=e.ref([]),Ie=e.ref({}),ze=e.ref({}),ue=()=>{const{compData:ce}=xe.value||{},le=ce==null?void 0:ce.find(U=>{const{key:J}=U;return J==="header"}),re=(le==null?void 0:le.contents)||[],Te=re==null?void 0:re.filter((U,J)=>{const{label:v}=U;return v!=="操作"}),Xe=Te==null?void 0:Te.findIndex((U,J)=>{const{isMainKey:v}=U;return v});if(Xe<0)return[];const dt=ce==null?void 0:ce.find(U=>{const{key:J}=U;return J==="tableContents"}),g=(dt==null?void 0:dt.contents)||[];return g==null?void 0:g.map(U=>{const J=U==null?void 0:U[0];let v=Xe;p.isObject(J)&&(J!=null&&J.id)&&(v=v+1);const F=U==null?void 0:U[v];return{label:F,value:F}})},_=async()=>{const ce=await ue();$e.value=ce},ne=async ce=>{const le=sessionStorage.getItem("systemKey");return await Ne.getItemData(ce,le,"")},te=async ce=>{const le=ce;nt.value=le==null?void 0:le.map(re=>{const{name:Te}=re;return Ie.value[Te]=re,{label:Te,value:Te}})},ve=ce=>{const{comp:le,compData:re}=ze.value||{};if(le==="Table"){let Te=A();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),w.value=Te}},Ue=async()=>{var re,Te;const ce=(re=k==null?void 0:k.value)==null?void 0:re.mainKey,le=(Te=V==null?void 0:V.value)==null?void 0:Te.menu;if(ce){const dt=`${le==null?void 0:le.join("/")}^${ce}`,g=await ne(dt);await te(g);const C=A();C==null||C.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=nt.value)}),w.value=C}};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.mainKey},async(ce,le)=>{ce!=le&&ce&&await Ue()});const st=async ce=>{const le=Ie.value[ce];ze.value=le,await ve()};e.watch(()=>{var ce;return(ce=k==null?void 0:k.value)==null?void 0:ce.group},async(ce,le)=>{ce!=le&&ce&&st(ce)});const q=async()=>{var le;await Ue();const ce=(le=k.value)==null?void 0:le.group;await st(ce)},M=e.ref([]),ye=e.ref({}),xe=e.ref({}),Re=async ce=>{const le=ce==null?void 0:ce.join("/"),re=sessionStorage.getItem("systemKey");return await Ne.getItemData(le,re,"")},Oe=async ce=>{const le=await Re(ce);M.value=le==null?void 0:le.map(re=>{const{name:Te}=re;return ye.value[Te]=re,{label:Te,value:Te}})},Ye=async(ce,le)=>{await Oe(ce);const re=ke();re==null||re.forEach(Te=>{(Te==null?void 0:Te.prop)==="group"&&(Te.contents=M.value)}),O.value=re};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.menu},async(ce,le)=>{const re=ce==null?void 0:ce.join("/"),Te=le==null?void 0:le.join("/");re!=Te&&await Ye(ce)});const qe=(ce,le)=>{const re=le==null?void 0:le.find(g=>{const{key:C}=g;return C==="header"}),Te=(re==null?void 0:re.contents)||[],Xe=Te==null?void 0:Te.filter((g,C)=>{const{label:U}=g;return U!=="操作"}),dt=Xe==null?void 0:Xe.map((g,C)=>{const{label:U}=g;return{label:U,value:C}});ce==null||ce.forEach(g=>{const C=g==null?void 0:g.prop;(C==="nameCol"||C==="valueCol")&&(g.contents=dt)})},lt=ce=>{const{comp:le,compData:re}=xe.value||{};if(le==="Table"){V.value.formItems=[];let Te=ke();Te=Te.filter(Xe=>{const{prop:dt}=Xe;return dt!=="formItems"}),qe(Te,re),O.value=Te}},Z=async ce=>{const le=ye.value[ce];xe.value=le,await lt()};e.watch(()=>{var ce;return(ce=V==null?void 0:V.value)==null?void 0:ce.group},async(ce,le)=>{ce!=le&&Z(ce)});const tt=async()=>{var re,Te;const ce=(re=V.value)==null?void 0:re.menu;await Ye(ce);const le=(Te=V.value)==null?void 0:Te.group;await Z(le)},at=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:m.value},{key:"chartDataConfig",contents:V.value},{key:"chartDetailConfig",contents:k.value}]}),Le=()=>{c.visible=!1,T.visible=!1,G.visible=!1};return e.onMounted(async()=>{var le,re,Te;O.value=H(),w.value=z();const ce=i==null?void 0:i.itemContents;m.value=((le=ce==null?void 0:ce.find(Xe=>Xe.key==="chartBaseConfig"))==null?void 0:le.contents)??{},V.value=((re=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDataConfig"))==null?void 0:re.contents)??{},await tt(),k.value=((Te=ce==null?void 0:ce.find(Xe=>Xe.key==="chartDetailConfig"))==null?void 0:Te.contents)??{},await q()}),(ce,le)=>{const re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Au,[le[4]||(le[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(re,{id:"themeButton",onClick:le[0]||(le[0]=Te=>h())},{default:e.withCtx(()=>le[3]||(le[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Nu,[le[6]||(le[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:le[1]||(le[1]=Te=>K())},{default:e.withCtx(()=>le[5]||(le[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Vu,[le[8]||(le[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:le[2]||(le[2]=Te=>se())},{default:e.withCtx(()=>le[7]||(le[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Yt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Le,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ou,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Mu,[e.createVNode(re,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>le[9]||(le[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(re,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>le[10]||(le[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:T.visible,title:T.title,onBeforeDestroy:Le,width:T.width},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(re,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>le[11]||(le[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(re,{class:"ok-button button",onClick:Le,id:"themeButton"},{default:e.withCtx(()=>le[12]||(le[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Yt.ssDialog,{visible:G.visible,title:G.title,onBeforeDestroy:Le,width:G.width},{default:e.withCtx(()=>[e.createElementVNode("div",Lu,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Pu,[e.createVNode(re,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>le[13]||(le[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(re,{class:"ok-button button",onClick:Le,id:"themeButton"},{default:e.withCtx(()=>le[14]||(le[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),$u=Lt._export_sfc(Fu,[["__scopeId","data-v-fe119645"]]);var Ka={exports:{}},ju=Ka.exports,Ro;function Ku(){return Ro||(Ro=1,function(a,s){(function(i,l){l()})(ju,function(){function i(D,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function l(D,E,T){var O=new XMLHttpRequest;O.open("GET",D),O.responseType="blob",O.onload=function(){h(O.response,E,T)},O.onerror=function(){console.error("could not download file")},O.send()}function c(D){var E=new XMLHttpRequest;E.open("HEAD",D,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(E)}}var x=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ne.commonjsGlobal=="object"&&Ne.commonjsGlobal.global===Ne.commonjsGlobal?Ne.commonjsGlobal:void 0,m=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(D,E,T){var O=x.URL||x.webkitURL,H=document.createElement("a");E=E||D.name||"download",H.download=E,H.rel="noopener",typeof D=="string"?(H.href=D,H.origin===location.origin?d(H):c(H.href)?l(D,E,T):d(H,H.target="_blank")):(H.href=O.createObjectURL(D),setTimeout(function(){O.revokeObjectURL(H.href)},4e4),setTimeout(function(){d(H)},0))}:"msSaveOrOpenBlob"in navigator?function(D,E,T){if(E=E||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(i(D,T),E);else if(c(D))l(D,E,T);else{var O=document.createElement("a");O.href=D,O.target="_blank",setTimeout(function(){d(O)})}}:function(D,E,T,O){if(O=O||open("","_blank"),O&&(O.document.title=O.document.body.innerText="downloading..."),typeof D=="string")return l(D,E,T);var H=D.type==="application/octet-stream",V=/constructor/i.test(x.HTMLElement)||x.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||H&&V||m)&&typeof FileReader<"u"){var W=new FileReader;W.onloadend=function(){var w=W.result;w=ke?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),O?O.location.href=w:location=w,O=null},W.readAsDataURL(D)}else{var K=x.URL||x.webkitURL,G=K.createObjectURL(D);O?O.location=G:location.href=G,O=null,setTimeout(function(){K.revokeObjectURL(G)},4e4)}});x.saveAs=h.saveAs=h,a.exports=h})}(Ka)),Ka.exports}Ku();const ia=p.useLoginState(),{loginUserInfo:La}=p.storeToRefs(ia),Ft=jt.useModelComp(p.pinia),Ua=e.ref(!1),{itemData:Uu,itemGridData:oa,curStructureCompIds:Lo,isSubmitCurStructure:Wu,isRefreshCurStructure:Hu,freshContent:Po,routeToChildPath:qu,payloadTypes:Gu,pageMapState:Xa,itemExtendData:Pa}=p.storeToRefs(Ft),dn=jt.useMenuState(p.pinia),{activeTopMenuPath:Xu,activeMenuPath:Rt,platform:Fd,activeAsideMenu:Yu,buttonTriggerType:Ju}=p.storeToRefs(dn),xn=fa.useUnit(p.pinia),{selectTitle:Fo}=p.storeToRefs(xn),Qu=Ne.useOriginalState(p.pinia),{originalPath:ro}=p.storeToRefs(Qu),$o=jt.useAuthorityState(p.pinia),Ya=e.ref(!0),ga=e.ref(0),Ja=e.ref([]),ma=e.computed(async()=>{var s,i;const a=(s=Rt.value)!=null&&s.startsWith("/")?(i=Rt.value)==null?void 0:i.substring(1):Rt.value;return(a==null?void 0:a.includes(ro.value))||await sp(a)}),Zu=()=>{Ft.setItemGridData([]),Ft.setIsEdit("edit"),Ft.setSubmitCurStructure(Rt.value!=="/平台管理/菜单管理")},ep=()=>{Ft.setIsEdit("view"),Ft.setRefreshCurStructure(!0)},tp=async a=>{var s;if((a==null?void 0:a.key)==="main"||Fo.value.length===1)bt.value=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value),xn.setSelectIndex(""),xn.setSelectMenu(""),xn.setSelectTitle([]);else{const i=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);bt.value=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),l,!1,[],await ma.value);let c=-1;(s=Fo.value)==null||s.forEach((d,x)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=x),(c===-1||c>=x)&&i.push(d)}),xn.setSelectTitle(i),l!==""?xn.setSelectMenu(a==null?void 0:a.key):(xn.setSelectIndex(""),xn.setSelectMenu(""))}bt.value=Aa(bt.value),Ft.setItemData(bt.value),Ft.setOriginalData(bt.value)},uo=async(a,s,i,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,x;s==="create"?(d={dataList:a==null?void 0:a.map(h=>{var D;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:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchAddInsofDataApi):s==="update"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},x=p.batchUpdateInsofDataApi):s==="delete"&&(d={ids:a},x=p.batchDeleteInsofDataApi);const m=await x(d);if(((c=m==null?void 0:m.data)==null?void 0:c.code)===200)return m.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},jo=async(a,s,i,l)=>{var c,d,x,m,h,D,E,T,O,H,V;try{const ke=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:d.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:s,relatedInfo:i},value:{tableData:k}})),W=(m=(x=a==null?void 0:a.results)==null?void 0:x.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:m.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),K=JSON.parse(p.cloneDeep(JSON.stringify(a))),G=(h=K==null?void 0:K.results)==null?void 0:h.map(k=>k.id);let w;i?w=(T=(E=(D=Xa.value)==null?void 0:D[Rt.value])==null?void 0:E.filter(k=>{var A,I,se;return((A=k==null?void 0:k.key)==null?void 0:A.type)===s&&((se=(I=k==null?void 0:k.key)==null?void 0:I.relatedInfo)==null?void 0:se.target)===l}))==null?void 0:T.map(k=>k==null?void 0:k.id):w=(V=(H=(O=Xa.value)==null?void 0:O[Rt.value])==null?void 0:H.filter(k=>{var A;return((A=k==null?void 0:k.key)==null?void 0:A.type)===s}))==null?void 0:V.map(k=>k==null?void 0:k.id);const z=w==null?void 0:w.filter(k=>!(G!=null&&G.includes(k))&&typeof k=="number");(ke==null?void 0:ke.length)>0&&await p.batchAddInsofDataApi({dataList:ke}),(W==null?void 0:W.length)>0&&await p.batchUpdateInsofDataApi({dataList:W}),(z==null?void 0:z.length)>0&&await p.batchDeleteInsofDataApi({ids:z})}catch(ke){throw new Error(ke)}},np=async a=>{var D,E,T,O,H,V,ke,W,K,G;dn.setContentLoading(!0);const s=JSON.parse(p.cloneDeep(JSON.stringify(Uu.value)));if(!Wu.value)return dn.setCacheStructures({key:Ju.value,data:s}),p.ElMessage.success("已暂存");const i=s==null?void 0:s.map(w=>w.id),l=i.filter(w=>{var z;return!((z=Lo.value)!=null&&z.includes(w))}),c=(D=Lo.value)==null?void 0:D.filter(w=>!i.includes(w)),d=[...l,...c].filter(w=>typeof w!==null&&typeof w<"u"),x=s==null?void 0:s.filter(w=>!w.id),m=s==null?void 0:s.filter(w=>w.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(uo(d,"delete",a)),x&&(x==null?void 0:x.length)>0&&h.push(uo(x,"create",a)),m&&(m==null?void 0:m.length)>0&&h.push(uo(m,"update",a)),oa.value&&((E=oa.value)!=null&&E.isDelete&&((O=(T=oa.value)==null?void 0:T.results)==null?void 0:O.length)>0&&((V=(H=oa.value)==null?void 0:H.results)!=null&&V.every(w=>typeof w=="number"))?await p.batchDeleteInsofDataApi({ids:(ke=oa.value)==null?void 0:ke.results}):(console.log("itemGridData.value",oa.value),h.push(await jo(oa.value,"gridLayout")))),Pa.value)for(const w in Pa.value)h.push(await jo((W=Pa.value)==null?void 0:W[w],"extend",{target:w,compId:(G=(K=Pa.value)==null?void 0:K[w])==null?void 0:G.compId},w));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Ft.setRefreshCurStructure(!0)}).catch(w=>{p.ElMessage.success(w)}),dn.setContentLoading(!1)},Qa=a=>ya(a),bt=e.ref([]),ap=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(s=>(s==null?void 0:s.affix)&&(s==null?void 0:s.affix)!=="default")}),Sl=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.filter(s=>!(s!=null&&s.affix)||(s==null?void 0:s.affix)==="default")}),op=async a=>{var l,c,d,x,m,h;let s=p.cloneDeep(Rt).value;s=s+ro.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const i=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s}});if(((d=(c=i==null?void 0:i.data)==null?void 0:c.result)==null?void 0:d.length)>0){const D=(m=(x=i==null?void 0:i.data)==null?void 0:x.result)==null?void 0:m.map(T=>T==null?void 0:T.id),E=await p.batchDeleteInsofDataApi({ids:D});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},s)):p.ElMessage.error("删除响应失败"),Ft.setTableLoading(!1)}},Ko=async a=>{var s,i;try{let l=p.cloneDeep(Rt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(x=>{var m;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+ro.value+((m=Object.values(x==null?void 0:x.singleContent))==null?void 0:m[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(x=>{var m;return((m=x==null?void 0:x.data)==null?void 0:m.code)===200}))){const x=Array.from(new Set((s=d==null?void 0:d.flatMap(h=>{var D;return(D=h==null?void 0:h.data)==null?void 0:D.result}))==null?void 0:s.map(h=>h==null?void 0:h.id))),m=await p.batchDeleteInsofDataApi({ids:x});((i=m==null?void 0:m.data)==null?void 0:i.code)===200?(p.ElMessage.success("删除成功"),await ia.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await op(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Ft.setTableLoading(!1)}},lp=async a=>{var s,i;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Rt.value,tableId:(s=a==null?void 0:a.to)==null?void 0:s.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((i=a==null?void 0:a.data)!=null&&i.id))return;const x=await Promise.all([d]);(x==null?void 0:x.every(h=>{var D;return((D=h==null?void 0:h.data)==null?void 0:D.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Tl=e.ref(0),Za=e.ref(null),eo=async(a,s="data",i)=>{var l,c,d,x,m,h,D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I;if(Za.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await Ko(a):await Ne.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await ia.setLogRecordAsync({type:"删除",data:a},Rt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(se=>typeof(se==null?void 0:se.id)=="string")){const se=(x=a==null?void 0:a.selectItems)==null?void 0:x.map($e=>({content:a==null?void 0:a.content,singleContent:$e,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await Ko(se)}else{const se=(m=a==null?void 0:a.selectItems)==null?void 0:m.map($e=>$e==null?void 0:$e.id);await p.batchDeleteInsofDataApi({ids:se}),await ia.setLogRecordAsync({type:"删除",data:se},Rt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let se={};for(let nt in a==null?void 0:a.singleContent)nt!=="id"&&nt!=="index"&&(se[nt]=a==null?void 0:a.singleContent[nt]);const $e=await Ne.addTableContents(s,Rt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a,{param:i});Za.value={resId:$e,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Ft.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let se=[],$e=[],nt=((D=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:D.id)??"",Ie=i==null?void 0:i.url,ze="",ue="";if(nt!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((O=(T=a==null?void 0:a.content)==null?void 0:T[0])==null?void 0:O.id)!="string"){const _=await p.getInsofDataApi({id:nt});ze=((W=(ke=(V=(H=_==null?void 0:_.data)==null?void 0:H.result)==null?void 0:V[0])==null?void 0:ke.key)==null?void 0:W.tableId)??"",ue=((z=(w=(G=(K=_==null?void 0:_.data)==null?void 0:K.result)==null?void 0:G[0])==null?void 0:w.key)==null?void 0:z.pageKey)??""}(k=a==null?void 0:a.singleContent)==null||k.forEach(_=>{let ne={};for(let te in _)te!=="id"&&te!=="index"&&(ne[te]=_[te]);typeof(_==null?void 0:_.id)=="number"?se.push({id:_==null?void 0:_.id,value:{tableData:ne}}):$e.push({key:{type:s,pageKey:Ie||ue||Rt.value,tableId:ze||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ne}})}),($e==null?void 0:$e.length)>0&&await p.batchAddInsofDataApi({dataList:$e}),(se==null?void 0:se.length)>0&&await p.batchUpdateInsofDataApi({dataList:se})}else{let se={},$e=(A=a==null?void 0:a.singleContent)==null?void 0:A.id;for(let nt in a==null?void 0:a.singleContent)nt!=="id"&&nt!=="index"&&(se[nt]=a==null?void 0:a.singleContent[nt]);await Ne.fixTableContents(s,Rt.value,a==null?void 0:a.index,$e,sessionStorage.getItem("systemKey"),Object.values(se),a==null?void 0:a.column,a)}Ft.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await lp(a==null?void 0:a.value);Ft.setTableLoading(!1),(I=a==null?void 0:a.column)!=null&&I.some(se=>se==null?void 0:se.isMainKey)||(bt.value=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value)),bt.value=Aa(bt.value),ko.value&&(a==null?void 0:a.buttonName)!=="删除"&&Ft.setRefreshCurStructure(!0)},rp=async a=>{var i,l,c;const s=await p.getInsofDataApi({id:a});return(c=(l=(i=s==null?void 0:s.data)==null?void 0:i.result)==null?void 0:l[0])==null?void 0:c.value},to=async(a,s)=>{var c,d,x;if(Ua.value||typeof(a==null?void 0:a.index)=="string")return;const i=await rp(a==null?void 0:a.index),l=(c=i==null?void 0:i.pageData)==null?void 0:c.name;await Ne.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(m=>m.contents),name:l,isShow:(x=i==null?void 0:i.pageData)==null?void 0:x.isShow}),s&&(dn.setActiveMenuPath(null),dn.setActiveMenuPath(s))},no=a=>{bt.value=Aa(a),Ft.setItemData(bt.value),Ft.setOriginalData(bt.value)},ip=async a=>{var s;await e.nextTick(),(s=Yu.value)!=null&&s.isRouter?$o.setRouterPageStructure(a):$o.setRouterPageStructure([])},sp=async a=>{var d,x,m,h,D,E;let s="",i="";(d=a==null?void 0:a.split("/"))==null||d.forEach((T,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-2>O&&(s=s===""?s+T:s+"/"+T)}),(x=a==null?void 0:a.split("/"))==null||x.forEach((T,O)=>{var H;((H=a==null?void 0:a.split("/"))==null?void 0:H.length)-1>O&&(i=i===""?i+T:i+"/"+T)}),s=s+"/",i=i+"/";let l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}});return((h=(m=l==null?void 0:l.data)==null?void 0:m.result)==null?void 0:h.length)>0||((E=(D=c==null?void 0:c.data)==null?void 0:D.result)==null?void 0:E.length)>0},cp=e.ref(),Fn=e.ref(null),up=a=>{var D,E,T,O,H,V,ke,W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze;const s=(E=(D=Xa.value)==null?void 0:D[a])==null?void 0:E.filter(ue=>{var _;return((_=ue==null?void 0:ue.key)==null?void 0:_.type)==="extend"});if((s==null?void 0:s.length)===0)return Fn.value=null;cp.value=s;const i=(O=(T=s==null?void 0:s.find(ue=>{var _,ne,te;return(te=(ne=(_=ue==null?void 0:ue.value)==null?void 0:_.tableData)==null?void 0:ne.执行任务)==null?void 0:te.includes("计时")}))==null?void 0:T.value)==null?void 0:O.tableData;if(!i)return Fn.value=null;const l=(ke=(V=(H=s==null?void 0:s.find(ue=>{var _,ne,te;return(te=(ne=(_=ue==null?void 0:ue.value)==null?void 0:_.tableData)==null?void 0:ne.执行任务)==null?void 0:te.includes("计时")}))==null?void 0:H.key)==null?void 0:V.relatedInfo)==null?void 0:ke.compId,c=(W=bt.value)==null?void 0:W.find(ue=>(ue==null?void 0:ue.id)===l);if(!c)return Fn.value=null;const d=(G=i==null?void 0:i.任务关键词)==null?void 0:G[((K=i==null?void 0:i.任务关键词)==null?void 0:K.length)-1],x=(k=(z=(w=c==null?void 0:c.compData)==null?void 0:w.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:z.contents)==null?void 0:k.findIndex(ue=>(ue==null?void 0:ue.prop)===d),m=($e=(se=(I=(A=c==null?void 0:c.compData)==null?void 0:A.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:I.contents)==null?void 0:se.find(ue=>ue==null?void 0:ue.isMainKey))==null?void 0:$e.prop,h=(ze=(Ie=(nt=c==null?void 0:c.compData)==null?void 0:nt.find(ue=>(ue==null?void 0:ue.key)==="tableContents"))==null?void 0:Ie.contents)==null?void 0:ze[x];Fn.value={prop:d,value:h,title:i==null?void 0:i.任务名称,task:i==null?void 0:i.执行任务,action:i==null?void 0:i.执行动作,runIn:i==null?void 0:i.执行交互,mainKeyProp:m},console.log("getPageExtendData:",i,s)},pp=()=>{var a,s;console.log("倒计时结束时"),jt.ElMessageBox.alert(`超时未提交,【${(s=(a=Rt.value)==null?void 0:a.split("/"))==null?void 0:s[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Il=()=>{var a,s,i,l;try{if(Xu.value!=="报告中心"||!((a=Rt.value)!=null&&a.includes(ro.value)))return;const c=(s=bt.value)==null?void 0:s.find(h=>{var D;return((D=h==null?void 0:h.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},x=(l=(i=c==null?void 0:c.compData)==null?void 0:i.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,m=x==null?void 0:x.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));m!=null&&m.value&&(m==null?void 0:m.value)!==(d==null?void 0:d.value)&&Ft.setLockingPage(Rt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},bo=e.ref([]),dp=e.computed(()=>{var a,s;return(s=(a=Xa.value)==null?void 0:a[Rt.value])==null?void 0:s.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Rt.value,Hu.value],async a=>{var d,x,m,h,D,E,T,O,H,V,ke,W,K;if(!Rt.value)return;Ft.setLockingPage(""),bt.value=[];let s=e.getCurrentInstance();(d=s==null?void 0:s.scope)==null||d.stop(),s=null,Ya.value=!1,Ua.value=!0;const i=(x=a==null?void 0:a[0])!=null&&x.startsWith("/")?(m=a==null?void 0:a[0])==null?void 0:m.substring(1):a==null?void 0:a[0];let l=new WeakMap;if((D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:Gu.value})).data.result)==null?void 0:h.filter(G=>{var w,z;return((w=G==null?void 0:G.key)==null?void 0:w.pageKey)!=="menu"&&((z=G==null?void 0:G.key)==null?void 0:z.pageKey)!=="secret"}))==null||D.forEach(G=>{l[G.key.pageKey]?l[G.key.pageKey]=[...l[G.key.pageKey],G]:l[G.key.pageKey]=[G]}),Ja.value=l,i){if(dn.setContentLoading(!0),sessionStorage.setItem("pageKey",Rt.value),bt.value=await Ne.getItemData(i,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value,l),!bt.value){let G=(T=(E=i==null?void 0:i.split("/"))==null?void 0:E.filter((z,k)=>{var A;return k!==((A=i==null?void 0:i.split("/"))==null?void 0:A.length)-1}))==null?void 0:T.join("/");bt.value=await Ne.getItemData(G,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value,l);let w=(H=i==null?void 0:i.split("/"))==null?void 0:H[((O=i==null?void 0:i.split("/"))==null?void 0:O.length)-1];bt.value=(V=bt.value)==null?void 0:V.map(z=>{var k;return z.compData=(k=z==null?void 0:z.compData)==null?void 0:k.map(A=>{var I,se,$e,nt,Ie;if((A==null?void 0:A.key)==="tableContents"){let ze=[];(I=A.contents)!=null&&I.every(ue=>Array.isArray(ue)&&(ue==null?void 0:ue.find(_=>_==null?void 0:_.id)))?ze=(se=A.contents)==null?void 0:se.filter(ue=>(ue==null?void 0:ue[1])===w):($e=A.contents)!=null&&$e.every(ue=>Array.isArray(ue)&&!(ue!=null&&ue.find(_=>_==null?void 0:_.id)))?ze=(nt=A.contents)==null?void 0:nt.filter(ue=>(ue==null?void 0:ue[0])===w):ze=(Ie=A.contents)==null?void 0:Ie.filter(ue=>{var _;return(ue==null?void 0:ue[((_=Object.keys(ue))==null?void 0:_[1])??""])===w}),A.contents=ze}return A}),z})}await ia.setLogRecordAsync({type:"查询",data:bt.value},Rt.value),bt.value=Aa(bt.value),await ip(bt.value),Il(),up(i),bo.value=(ke=bt.value)==null?void 0:ke.map(G=>({label:G==null?void 0:G.name,value:G==null?void 0:G.id})),Ft.setExtraContents([]),xn.setSelectTitle([]),xn.setSelectIndex(""),xn.setSelectMenu(""),Ft.setItemData(bt.value),Ft.setOriginalData(bt.value),Ft.setCurStructureCompIds((W=bt.value)==null?void 0:W.map(G=>G==null?void 0:G.id)),Ft.setRefreshCurStructure(!1),xn.setSelectTitle((K=Rt.value)==null?void 0:K.split("/").map(G=>({value:G.trim()}))),dn.setChildMenu(""),dn.setContentLoading(!1),Ft.setTableLoading(!1),Ua.value=!1}else bt.value=[],Ua.value=!1;e.nextTick(()=>{ga.value=ga.value++,Ya.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{if(Po.value){let a=await Ne.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await ma.value);bt.value=Aa(a),Ft.setFreshContent(!1),Il()}},{deep:!0});const fp=async()=>{var c,d,x,m,h,D,E,T;dn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=La.value)==null?void 0:c.account)||((d=La.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),s=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=La.value)==null?void 0:x.account)||((m=La.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let i=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(O=>O==null?void 0:O.id);const l=(T=(E=s==null?void 0:s.data)==null?void 0:E.result)==null?void 0:T.map(O=>O==null?void 0:O.id);i=[...p.cloneDeep(i),...l],(i==null?void 0:i.length)>0&&(i!=null&&i.every(O=>O!==null&&O))&&(await p.batchDeleteInsofDataApi({ids:i}),await ia.setLogRecordAsync({type:"删除",data:i},Rt.value)),dn.setActiveMenuPath(qu.value),bt.value=null,Ft.setRouteToChildPath(""),dn.setChildMenu("")},hp=a=>new RegExp("button","i").test(a),vp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Bl=a=>{if(vp(a)){const s=a==null?void 0:a.split("^");(s==null?void 0:s.length)>0&&(s!=null&&s[0])&&dn.setLinkMenuInfo({path:s==null?void 0:s[0],data:s==null?void 0:s[1]})}},Al=a=>{var s;Fn.value&&(Fn.value={...Fn.value,mainKeyPropValue:a==null?void 0:a[(s=Fn.value)==null?void 0:s.mainKeyProp]})},gp=a=>{Tl.value=a},ha=e.reactive({index:0,comp:null}),mp=e.computed(()=>{var a;return(a=bt.value)==null?void 0:a.map((s,i)=>({id:s.id,name:s.name,status:yp(s,i)}))}),Nl=(a,s)=>{var h,D,E,T,O;const i=s?a:a-2,l=(h=bt.value)==null?void 0:h[i],c=(E=(D=l==null?void 0:l.compData)==null?void 0:D.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(H=>(H==null?void 0:H.isMainKey)&&(H==null?void 0:H.label)!=="操作"),x=d===-1?0:d,m=(O=(T=l==null?void 0:l.compData)==null?void 0:T.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:O.contents;return{valid:m==null?void 0:m.every(H=>H==null?void 0:H[x+1]),length:(m==null?void 0:m.length)||0}},yp=(a,s)=>{var l;let i="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Nl(s,!0);ha.index===s?i="process":d===0?i="wait":i=c?"success":"error"}return i},Vl=a=>{var i,l,c,d,x;const s=a+1;if(s>1&&((c=(l=(i=bt.value)==null?void 0:i[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:m}=Nl(s);m?(ha.index=s,ha.comp=(d=bt.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ha.index=s,ha.comp=(x=bt.value)==null?void 0:x[a]},ko=e.computed(()=>{var a,s;return(s=(a=Sl.value)==null?void 0:a[0])==null?void 0:s.isStepLayout});e.watch(()=>ko.value,a=>{a&&Vl(0)},{immediate:!0});const bp={class:"layout"},kp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:s}){const i=s,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(T=>{const{key:O}=T;return O==="baseConfig"});return D==null?void 0:D.contents}),x=e.computed(()=>{var E;const D=(E=c==null?void 0:c.value)==null?void 0:E.find(T=>{const{key:O}=T;return O==="children"});return D==null?void 0:D.contents}),m=e.computed(()=>{let D=p.cloneDeep(x.value)||[];const E=D.length;let T=0;const O=[];if(D=D.map(H=>{const V=H.span;return V?(H.span=Number(V),T=T+H.span):O.push(H),H}),T<24){const H=Math.floor((24-T)/E);O.forEach(V=>{V.span=H})}return D}),h=D=>{i("rowClick",D)};return(D,E)=>{var H;const T=e.resolveComponent("el-col"),O=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",bp,[e.createVNode(O,{style:e.normalizeStyle({height:(H=d.value)==null?void 0:H.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(V,ke)=>(e.openBlock(),e.createBlock(T,{span:V==null?void 0:V.span},{default:e.withCtx(()=>{var W;return[e.unref(Ya)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{key:e.unref(ga),compName:V.name,index:(V==null?void 0:V.id)??ke,height:(W=d.value)==null?void 0:W.height,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,onChange:e.unref(eo),onContentChange:e.unref(to),onPageChange:e.unref(no),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),xp=Lt._export_sfc(kp,[["__scopeId","data-v-ab9a36ed"]]),wp={class:"layout-operate"},Dp={class:"layout-module"},Cp={class:"collapse-title-item"},Ep={class:"collapse-title"},_p={class:"icon-content"},Sp=["onClick"],Tp={class:"comp-child"},Ip=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:s}){const i=a,l=s;e.onMounted(()=>{ke()});const c=e.ref({}),d=e.ref({}),x=e.ref([]),m=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],h=k=>{d.value=k,l("change",z(),!0)},D=e.ref([]),E=e.ref([]),T=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],O=e.computed(()=>{const k=i==null?void 0:i.itemContents;return p.cloneDeep(k)}),H=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(I=>{const{key:se}=I;return se==="baseConfig"});return A==null?void 0:A.contents}),V=e.computed(()=>{const k=O==null?void 0:O.value,A=k==null?void 0:k.find(I=>{const{key:se}=I;return se==="children"});return A==null?void 0:A.contents}),ke=()=>{var k;c.value=O.value||{},D.value=(V==null?void 0:V.value)||[],x.value=m(),x.value=(k=x.value)==null?void 0:k.map(A=>{var se;const{prop:I}=A;return A.value=(se=H.value)==null?void 0:se[I],A})};e.watch(()=>{var k;return(k=V==null?void 0:V.value)==null?void 0:k.length},()=>{var k;D.value=(V==null?void 0:V.value)||[],E.value=(k=V.value)==null?void 0:k.map(A=>T(A))},{immediate:!0});const W=(k,A)=>{const I=p.cloneDeep(V==null?void 0:V.value);I[A].span=k.span,D.value=I,l("change",z(),!0)},K=k=>ya(k),G=(k,A,I)=>{if(!k)return;const se=p.cloneDeep(V==null?void 0:V.value);se[I]&&(se[I].compData=k,D.value=se,l("change",z(),!0))},w=k=>{jt.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=p.cloneDeep(V==null?void 0:V.value);A=A==null?void 0:A.filter((I,se)=>k!==se),D.value=A,l("change",z(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:D==null?void 0:D.value}]});return(k,A)=>{const I=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",wp,[e.createElementVNode("div",Dp,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Nt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:A[0]||(A[0]=se=>h(se))},null,8,["rowContents"])])]),e.createVNode(gl.default,{class:"collapse-content",collapseContents:V.value},{title:e.withCtx(({item:se,index:$e})=>[e.createElementVNode("div",Cp,[e.createElementVNode("div",Ep,e.toDisplayString(se.name),1),e.createElementVNode("div",_p,[e.createElementVNode("div",{onClick:e.withModifiers(nt=>w($e),["stop"]),class:"icon-content"},[e.createVNode(I,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Sp)])])]),content:e.withCtx(({item:se,index:$e})=>[e.createElementVNode("div",Tp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:E.value[$e],key:$e,isEnableWrap:!0,onChange:nt=>W(nt,$e)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(se.comp+"Operate")),{itemContents:se==null?void 0:se.compData,originalItemContents:se.compData,onChange:nt=>G(nt,se,$e)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Bp=Lt._export_sfc(Ip,[["__scopeId","data-v-ba05456e"]]),Ap=typeof window<"u";var Uo;Ap&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pn(a){return a==null}function Ol(){}const Np=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(Np)));function Vp(){const a=new Map;return{on(s,i){const l=a.get(s);l!=null&&l.add(i)||a.set(s,new Set([i]))},off(s,i){const l=a.get(s);l&&l.delete(i)},clear(s){const i=a.get(s);i&&i.clear()},clearAll(){a.clear()},emit(s,...i){const l=a.get(s);l&&l.forEach(c=>{c(...i)})}}}function Wo(a,s=16){if(typeof a!="function")return Ol;const i=(...d)=>{a(...d)};if(s<=0)return Ml(i);let l=0,c;return function(...d){const x=Date.now(),m=x-l;clearTimeout(c),m>=s?(l=x,i(...d)):c=setTimeout(()=>{l=Date.now(),i(...d)},Math.max(0,s-m))}}function Op(a,s=100){if(typeof a!="function")return Ol;const i=(...c)=>{a(...c)};if(s<=0)return Ml(i);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{i(...c)},s)}}function Ml(a){if(typeof a!="function")return a;let s=!1,i,l;return function(...c){return i=c,s||(s=!0,l=Promise.resolve().then(()=>(s=!1,l=void 0,a(...i)))),l}}const Sa=new Set,zl=new WeakMap;function Mp(){Sa.forEach(a=>{a(...zl.get(a))}),Sa.clear()}function nn(a,...s){if(typeof a!="function")return a;zl.set(a,s),!Sa.has(a)&&(Sa.add(a),Sa.size===1&&Promise.resolve().then(Mp))}const Rl=Symbol("LAYOUT_KEY"),Ll=Symbol("EMITTER_KEY");function zp(a){let s=0,i;for(let l=0,c=a.length;l<c;l++)i=a[l].y+a[l].h,i>s&&(s=i);return s}function vo(a){const s=Array(a.length);for(let i=0,l=a.length;i<l;i++)s[i]=Rp(a[i]);return s}function Rp(a){return{...a}}function Pl(a,s){return!(a===s||a.x+a.w<=s.x||a.x>=s.x+s.w||a.y+a.h<=s.y||a.y>=s.y+s.h)}function da(a,s,i){const l=$l(a),c=jl(a),d=Array(a.length);for(let x=0,m=c.length;x<m;x++){let h=c[x];h.static||(h=Lp(l,h,s,i),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function Lp(a,s,i,l){if(i)for(;s.y>0&&!Ta(a,s);)s.y--;else if(l){const d=l[s.i].y;for(;s.y>d&&!Ta(a,s);)s.y--}let c;for(;c=Ta(a,s);)s.y=c.y+c.h;return s}function Pp(a,s){const i=$l(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>s.cols&&(d.x=s.cols-d.w),d.x<0&&(d.x=0,d.w=s.cols),!d.static)i.push(d);else for(;Ta(i,d);)d.y++}return a}function Ho(a,s){for(let i=0,l=a.length;i<l;i++)if(a[i].i===s)return a[i]}function Ta(a,s){for(let i=0,l=a.length;i<l;i++)if(Pl(a[i],s))return a[i]}function Fl(a,s){return a.filter(i=>Pl(i,s))}function $l(a){return a.filter(s=>s.static)}function go(a,s,i,l,c=!1,d=!1){if(s.static)return a;const x=s.x,m=s.y,h=l&&s.y>l;typeof i=="number"&&(s.x=i),typeof l=="number"&&(s.y=l),s.moved=!0;let D=jl(a);h&&(D=D.reverse());const E=Fl(D,s);if(d&&E.length)return s.x=x,s.y=m,s.moved=!1,a;for(let T=0,O=E.length;T<O;T++){const H=E[T];H.moved||s.y>H.y&&s.y-H.y>H.h/4||(H.static?a=qo(a,H,s,c):a=qo(a,s,H,c))}return a}function qo(a,s,i,l){if(l){const c={x:i.x,y:i.y,w:i.w,h:i.h};if(c.y=Math.max(s.y-i.h,0),!Ta(a,c))return go(a,i,void 0,c.y,!1)}return go(a,i,void 0,i.y+1,!1)}function Fp(a,s,i,l){const c="translate3d("+s+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:i+"px",height:l+"px",position:"absolute"}}function $p(a,s,i,l){const c="translate3d("+s*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:i+"px",height:l+"px",position:"absolute"}}function jp(a,s,i,l){return{top:a+"px",left:s+"px",width:i+"px",height:l+"px",position:"absolute"}}function Kp(a,s,i,l){return{top:a+"px",right:s+"px",width:i+"px",height:l+"px",position:"absolute"}}function jl(a){return Array.from(a).sort(function(s,i){return s.y===i.y&&s.x===i.x?0:s.y>i.y||s.y===i.y&&s.x>i.x?1:-1})}function Up(a,s){s=s||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(s+" must be an array!");for(let c=0,d=a.length;c<d;c++){const x=a[c];for(let m=0;m<i.length;m++)if(typeof x[i[m]]!="number")throw new Error("VueGridLayout: "+s+"["+c+"]."+i[m]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+s+"["+c+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+s+"["+c+"].i must be a string or number!");if(l.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+s+"["+c+"].i must be unique!");if(l.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+s+"["+c+"].static must be a boolean!")}}function Wp(a,s="vgl"){const i=()=>`${s}-${a}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,c)=>`${i()}__${l}--${c}`}}function Go(a){return Hp(a)}function Hp(a){var s;const i=((s=a.target)==null?void 0:s.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),c=a.clientX+i.scrollLeft-l.left,d=a.clientY+i.scrollTop-l.top;return{x:c,y:d}}function Xo(a,s,i,l){return qp(a)?{deltaX:i-a,deltaY:l-s,lastX:a,lastY:s,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function qp(a){return typeof a=="number"&&!Number.isNaN(a)}function Gp(a,s){const i=Ul(a);let l=i[0];for(let c=1,d=i.length;c<d;c++){const x=i[c];s>a[x]&&(l=x)}return l}function Kl(a,s){if(!s[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return s[a]}function Xp(a,s,i,l,c,d,x){if(s[l])return vo(s[l]);let m=a;const h=Ul(i),D=h.slice(h.indexOf(l));for(let E=0,T=D.length;E<T;E++){const O=D[E];if(s[O]){m=s[O];break}}return m=vo(m||[]),da(Pp(m,{cols:d}),x)}function Ul(a){return Object.keys(a).sort((s,i)=>a[s]-a[i])}let Yp="auto";function Jp(){return typeof document<"u"}function Yo(){return Jp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Yp}var Ea={exports:{}},Qp=Ea.exports,Jo;function Zp(){return Jo||(Jo=1,function(a,s){(function(i,l){a.exports=l()})(Qp,function(){function i(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function x(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ke(r.key),r)}}function m(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=ke(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function D(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&&T(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function T(n,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},T(n,t)}function O(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function H(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,y){if(y&&(typeof y=="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(f)}(this,o)}}function V(){return V=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,y){for(;!Object.prototype.hasOwnProperty.call(f,y)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},V.apply(this,arguments)}function ke(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var W=function(n){return!(!n||!n.Window)&&n instanceof n.Window},K=void 0,G=void 0;function w(n){K=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),G=n}function z(n){return W(n)?n:(n.ownerDocument||n).defaultView||G.window}typeof window<"u"&&window&&w(window);var k=function(n){return!!n&&c(n)==="object"},A=function(n){return typeof n=="function"},I={window:function(n){return n===G||W(n)},docFrag:function(n){return k(n)&&n.nodeType===11},object:k,func:A,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||c(n)!=="object")return!1;var t=z(n)||G;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return k(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return k(n)&&n.length!==void 0&&A(n.splice)}};function se(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 $e(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var nt={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=nt.draggable,t.map.drag=nt,t.methodDict.drag="draggable",r.actions.drag=nt.defaults},listeners:{"interactions:before-action-move":se,"interactions:action-resume":se,"interactions:action-move":$e,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return I.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):I.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:se,move:$e,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ie=nt,ze={init:function(n){var t=n;ze.document=t.document,ze.DocumentFragment=t.DocumentFragment||ue,ze.SVGElement=t.SVGElement||ue,ze.SVGSVGElement=t.SVGSVGElement||ue,ze.SVGElementInstance=t.SVGElementInstance||ue,ze.Element=t.Element||ue,ze.HTMLElement=t.HTMLElement||ze.Element,ze.Event=t.Event,ze.Touch=t.Touch||ue,ze.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 ue(){}var _=ze,ne={init:function(n){var t=_.Element,o=n.navigator||{};ne.supportsTouch="ontouchstart"in n||I.func(n.DocumentTouch)&&_.document instanceof n.DocumentTouch,ne.supportsPointerEvent=o.pointerEnabled!==!1&&!!_.PointerEvent,ne.isIOS=/iP(hone|od|ad)/.test(o.platform),ne.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ne.isIe9=/MSIE 9/.test(o.userAgent),ne.isOperaMobile=o.appName==="Opera"&&ne.supportsTouch&&/Presto/.test(o.userAgent),ne.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ne.pEventTypes=ne.supportsPointerEvent?_.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,ne.wheelEvent=_.document&&"onmousewheel"in _.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},te=ne;function ve(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ue(n,t){for(;I.element(n);){if(q(n,t))return n;n=st(n)}return null}function st(n){var t=n.parentNode;if(I.docFrag(t)){for(;(t=t.host)&&I.docFrag(t););return t}return t}function q(n,t){return G!==K&&(t=t.replace(/\/deep\//g," ")),n[te.prefixedMatchesSelector](t)}var M=function(n){return n.parentNode||n.host};function ye(n,t){for(var o,r=[],u=n;(o=M(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function xe(n,t,o){for(;I.element(n);){if(q(n,t))return!0;if((n=st(n))===o)return q(n,t)}return!1}function Re(n){return n.correspondingUseElement||n}function Oe(n){var t=n instanceof _.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 Ye(n){var t,o=Oe(n);if(!te.isIOS7&&o){var r={x:(t=(t=z(n))||G).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function qe(n){for(var t=[];n;)t.push(n),n=st(n);return t}function lt(n){return!!I.string(n)&&(_.document.querySelector(n),!0)}function Z(n,t){for(var o in t)n[o]=t[o];return n}function tt(n,t,o){return n==="parent"?st(o):n==="self"?t.getRect(o):Ue(o,n)}function at(n,t,o,r){var u=n;return I.string(u)?u=tt(u,t,o):I.func(u)&&(u=u.apply(void 0,r)),I.element(u)&&(u=Ye(u)),u}function Le(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=Z({},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 le(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 re(n,t,o){var r=o&&n.options[o];return Le(at(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Te(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(S){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},I.string(n)&&n.search(" ")!==-1&&(n=Xe(n)),I.array(n))return n.forEach(function(S){return Te(S,t,o,r)}),r;if(I.object(n)&&(t=n,n=""),I.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(I.array(t))for(var u=0,f=t;u<f.length;u++){var y=f[u];Te(n,y,o,r)}else if(I.object(t))for(var b in t)Te(Xe(b).map(function(S){return"".concat(n).concat(S)}),t[b],o,r);return r}function Xe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},g=["webkit","moz"];function C(n,t){n.__set||(n.__set={});var o=function(u){if(g.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function U(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 J(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function v(n){return n instanceof _.Event||n instanceof _.Touch}function F(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function ee(n,t){return t=t||{x:0,y:0},te.isOperaMobile&&v(n)?(F("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):F("page",n,t),t}function R(n){return I.number(n.pointerId)?n.pointerId:n.identifier}function pe(n,t,o){var r=t.length>1?Y(t):t[0];ee(r,n.page),function(u,f){f=f||{},te.isOperaMobile&&v(u)?F("screen",u,f):F("client",u,f)}(r,n.client),n.timeStamp=o}function L(n){var t=[];return I.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 r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function ie(n){if(!n.length)return null;var t=L(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function ge(n,t){var o=t+"X",r=t+"Y",u=L(n),f=u[0][o]-u[1][o],y=u[0][r]-u[1][r];return dt(f,y)}function $(n,t){var o=t+"X",r=t+"Y",u=L(n),f=u[1][o]-u[0][o],y=u[1][r]-u[0][r];return 180*Math.atan2(y,f)/Math.PI}function oe(n){return I.string(n.pointerType)?n.pointerType:I.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof _.Touch?"touch":"mouse"}function X(n){var t=I.func(n.composedPath)?n.composedPath():n.path;return[Re(t?t[0]:n.target),Re(n.currentTarget)]}var _e=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return m(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(_e.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var fe=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ee=function(n){return fe([],n)},P=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},he=function(n,t){return n[P(n,t)]},ae=function(n){D(o,n);var t=H(o);function o(r,u,f){var y;d(this,o),(y=t.call(this,u._interaction)).dropzone=void 0,y.dragEvent=void 0,y.relatedTarget=void 0,y.draggable=void 0,y.propagationStopped=!1,y.immediatePropagationStopped=!1;var b=f==="dragleave"?r.prev:r.cur,S=b.element,j=b.dropzone;return y.type=f,y.target=S,y.currentTarget=S,y.dropzone=j,y.dragEvent=u,y.relatedTarget=u.target,y.draggable=u.interactable,y.timeStamp=u.timeStamp,y}return m(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,y=P(f,function(S){var j=S.dropzone,B=S.element;return j===r.dropzone&&B===r.target});u.activeDrops.splice(y,1);var b=new o(u,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(_e);function Be(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,y=u.element;t.dropzone=f,t.target=y,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Je(n,t){for(var o=function(f,y){for(var b=[],S=0,j=f.interactables.list;S<j.length;S++){var B=j[S];if(B.options.drop.enabled){var Q=B.options.drop.accept;if(!(I.element(Q)&&Q!==y||I.string(Q)&&!q(y,Q)||I.func(Q)&&!Q({dropzone:B,draggableElement:y})))for(var we=0,je=B.getAllElements();we<je.length;we++){var Pe=je[we];Pe!==y&&b.push({dropzone:B,element:Pe,rect:B.getRect(Pe)})}}}return b}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Me(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,y=[],b=0,S=r.activeDrops;b<S.length;b++){var j=S[b],B=j.dropzone,Q=j.element,we=j.rect,je=B.dropCheck(t,o,u,f,Q,we);y.push(je?Q:null)}var Pe=function(Ge){for(var it,ot,ht,yt=[],_t=0;_t<Ge.length;_t++){var mt=Ge[_t],xt=Ge[it];if(mt&&_t!==it)if(xt){var tn=M(mt),Kt=M(xt);if(tn!==mt.ownerDocument)if(Kt!==mt.ownerDocument)if(tn!==Kt){yt=yt.length?yt:ye(xt);var un=void 0;if(xt instanceof _.HTMLElement&&mt instanceof _.SVGElement&&!(mt instanceof _.SVGSVGElement)){if(mt===Kt)continue;un=mt.ownerSVGElement}else un=mt;for(var En=ye(un,xt.ownerDocument),Rn=0;En[Rn]&&En[Rn]===yt[Rn];)Rn++;var Ra=[En[Rn-1],En[Rn],yt[Rn]];if(Ra[0])for(var wa=Ra[0].lastChild;wa;){if(wa===Ra[1]){it=_t,yt=En;break}if(wa===Ra[2])break;wa=wa.previousSibling}}else ht=xt,(parseInt(z(ot=mt).getComputedStyle(ot).zIndex,10)||0)>=(parseInt(z(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=_t);else it=_t}else it=_t}return it}(y);return r.activeDrops[Pe]||null}function Ve(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ae(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ae(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new ae(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new ae(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ae(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ae(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function me(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&Be(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function ct(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Je(t,o.element));var y=r,b=Me(o,y,u);f.rejected=f.rejected&&!!b&&b.dropzone===f.cur.dropzone&&b.element===f.cur.element,f.cur.dropzone=b&&b.dropzone,f.cur.element=b&&b.element,f.events=Ve(o,0,y)}}var Ke={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Ie),r.prototype.dropzone=function(f){return function(y,b){if(I.object(b)){if(y.options.drop.enabled=b.enabled!==!1,b.listeners){var S=Te(b.listeners),j=Object.keys(S).reduce(function(Q,we){return Q[/^(enter|leave)/.test(we)?"drag".concat(we):/^(activate|deactivate|move)/.test(we)?"drop".concat(we):we]=S[we],Q},{}),B=y.options.drop.listeners;B&&y.off(B),y.on(j),y.options.drop.listeners=j}return I.func(b.ondrop)&&y.on("drop",b.ondrop),I.func(b.ondropactivate)&&y.on("dropactivate",b.ondropactivate),I.func(b.ondropdeactivate)&&y.on("dropdeactivate",b.ondropdeactivate),I.func(b.ondragenter)&&y.on("dragenter",b.ondragenter),I.func(b.ondragleave)&&y.on("dragleave",b.ondragleave),I.func(b.ondropmove)&&y.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?y.options.drop.overlap=b.overlap:I.number(b.overlap)&&(y.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(y.options.drop.accept=b.accept),"checker"in b&&(y.options.drop.checker=b.checker),y}return I.bool(b)?(y.options.drop.enabled=b,y):y.options.drop}(this,f)},r.prototype.dropCheck=function(f,y,b,S,j,B){return function(Q,we,je,Pe,Ge,it,ot){var ht=!1;if(!(ot=ot||Q.getRect(it)))return!!Q.options.drop.checker&&Q.options.drop.checker(we,je,ht,Q,it,Pe,Ge);var yt=Q.options.drop.overlap;if(yt==="pointer"){var _t=re(Pe,Ge,"drag"),mt=ee(we);mt.x+=_t.x,mt.y+=_t.y;var xt=mt.x>ot.left&&mt.x<ot.right,tn=mt.y>ot.top&&mt.y<ot.bottom;ht=xt&&tn}var Kt=Pe.getRect(Ge);if(Kt&&yt==="center"){var un=Kt.left+Kt.width/2,En=Kt.top+Kt.height/2;ht=un>=ot.left&&un<=ot.right&&En>=ot.top&&En<=ot.bottom}return Kt&&I.number(yt)&&(ht=Math.max(0,Math.min(ot.right,Kt.right)-Math.max(ot.left,Kt.left))*Math.max(0,Math.min(ot.bottom,Kt.bottom)-Math.max(ot.top,Kt.top))/(Kt.width*Kt.height)>=yt),Q.options.drop.checker&&(ht=Q.options.drop.checker(we,je,ht,Q,it,Pe,Ge)),ht}(this,f,y,b,S,j,B)},o.dynamicDrop=function(f){return I.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},Z(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ke.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Je(t,o.element),u.events=Ve(o,0,r),u.events.activate&&(Be(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":ct,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;me(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;ct(n,t),me(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:Je,getDrop:Me,getDropEvents:Ve,fireDropEvents:me,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},be=Ke;function De(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(j){return j.pointer}),f=r==="start",y=r==="end",b=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ge(u,b),o.box=ie(u),o.scale=1,o.ds=0,o.angle=$(u,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(y||t.pointers.length<2){var S=t.prevEvent;o.distance=S.distance,o.box=S.box,o.scale=S.scale,o.ds=0,o.angle=S.angle,o.da=0}else o.distance=ge(u,b),o.box=ie(u),o.scale=o.distance/t.gesture.startDistance,o.angle=$(u,b),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,I.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Qe={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return I.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):I.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=Qe,t.methodDict.gesture="gesturable",r.actions.gesture=Qe.defaults},listeners:{"interactions:action-start":De,"interactions:action-move":De,"interactions:action-end":De,"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}},de=Qe;function Ae(n,t,o,r,u,f,y){if(!t)return!1;if(t===!0){var b=I.number(f.width)?f.width:f.right-f.left,S=I.number(f.height)?f.height:f.bottom-f.top;if(y=Math.min(y,Math.abs((n==="left"||n==="right"?b:S)/2)),b<0&&(n==="left"?n="right":n==="right"&&(n="left")),S<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var j=b>=0?f.left:f.right;return o.x<j+y}if(n==="top"){var B=S>=0?f.top:f.bottom;return o.y<B+y}if(n==="right")return o.x>(b>=0?f.right:f.left)-y;if(n==="bottom")return o.y>(S>=0?f.bottom:f.top)-y}return!!I.element(r)&&(I.element(t)?t===r:xe(r,t,u))}function Fe(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var We,N,Ce={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ce.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ce.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(y,b,S){return I.object(b)?(y.options.resize.enabled=b.enabled!==!1,y.setPerAction("resize",b),y.setOnEvents("resize",b),I.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?y.options.resize.axis=b.axis:b.axis===null&&(y.options.resize.axis=S.defaults.actions.resize.axis),I.bool(b.preserveAspectRatio)?y.options.resize.preserveAspectRatio=b.preserveAspectRatio:I.bool(b.square)&&(y.options.resize.square=b.square),y):I.bool(b)?(y.options.resize.enabled=b,y):y.options.resize}(this,f,n)},t.map.resize=Ce,t.methodDict.resize="resizable",u.actions.resize=Ce.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:Z({},f),corrected:Z({},f),previous:Z({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),Fe(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,y=f==="reposition"||f==="negate",b=r.rect,S=r._rects,j=S.start,B=S.corrected,Q=S.delta,we=S.previous;if(Z(we,B),y){if(Z(B,b),f==="reposition"){if(B.top>B.bottom){var je=B.top;B.top=B.bottom,B.bottom=je}if(B.left>B.right){var Pe=B.left;B.left=B.right,B.right=Pe}}}else B.top=Math.min(b.top,j.bottom),B.bottom=Math.max(b.bottom,j.top),B.left=Math.min(b.left,j.right),B.right=Math.max(b.right,j.left);for(var Ge in B.width=B.right-B.left,B.height=B.bottom-B.top,B)Q[Ge]=B[Ge]-we[Ge];u.edges=r.prepared.edges,u.rect=B,u.deltaRect=Q}})(n),Fe(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var y=Z({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&b.mouseButtons)!=0)){if(I.object(b.edges)){var S={left:!1,right:!1,top:!1,bottom:!1};for(var j in S)S[j]=Ae(j,b.edges[j],y,t._latestPointer.eventTarget,r,u,b.margin||Ce.defaultMargin);S.left=S.left&&!S.right,S.top=S.top&&!S.bottom,(S.left||S.right||S.top||S.bottom)&&(n.action={name:"resize",edges:S})}else{var B=b.axis!=="y"&&y.x>u.right-Ce.defaultMargin,Q=b.axis!=="x"&&y.y>u.bottom-Ce.defaultMargin;(B||Q)&&(n.action={name:"resize",axes:(B?"x":"")+(Q?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=Ce.cursors,f=null;if(o)f=u[r+o];else if(t){for(var y="",b=0,S=["top","bottom","left","right"];b<S.length;b++){var j=S[b];t[j]&&(y+=j)}f=u[y]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},ut=Ce,et={id:"actions",install:function(n){n.usePlugin(de),n.usePlugin(ut),n.usePlugin(Ie),n.usePlugin(be)}},ft=0,rt={request:function(n){return We(n)},cancel:function(n){return N(n)},init:function(n){if(We=n.requestAnimationFrame,N=n.cancelAnimationFrame,!We)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];We=n["".concat(r,"RequestAnimationFrame")],N=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}We=We&&We.bind(n),N=N&&N.bind(n),We||(We=function(u){var f=Date.now(),y=Math.max(0,16-(f-ft)),b=n.setTimeout(function(){u(f+y)},y);return ft=f+y,b},N=function(u){return clearTimeout(u)})}},Se={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){Se.isScrolling=!0,rt.cancel(Se.i),n.autoScroll=Se,Se.interaction=n,Se.prevTime=Se.now(),Se.i=rt.request(Se.scroll)},stop:function(){Se.isScrolling=!1,Se.interaction&&(Se.interaction.autoScroll=null),rt.cancel(Se.i)},scroll:function(){var n=Se.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Ze(u.container,t,o),y=Se.now(),b=(y-Se.prevTime)/1e3,S=u.speed*b;if(S>=1){var j={x:Se.x*S,y:Se.y*S};if(j.x||j.y){var B=He(f);I.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var Q=He(f),we={x:Q.x-B.x,y:Q.y-B.y};(we.x||we.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:we,interaction:n,container:f})}Se.prevTime=y}Se.isScrolling&&(rt.cancel(Se.i),Se.i=rt.request(Se.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()&&Se.check(t.interactable,t.prepared.name))if(t.simulation)Se.x=Se.y=0;else{var r,u,f,y,b=t.interactable,S=t.element,j=t.prepared.name,B=b.options[j].autoScroll,Q=Ze(B.container,b,S);if(I.window(Q))y=o.clientX<Se.margin,r=o.clientY<Se.margin,u=o.clientX>Q.innerWidth-Se.margin,f=o.clientY>Q.innerHeight-Se.margin;else{var we=Oe(Q);y=o.clientX<we.left+Se.margin,r=o.clientY<we.top+Se.margin,u=o.clientX>we.right-Se.margin,f=o.clientY>we.bottom-Se.margin}Se.x=u?1:y?-1:0,Se.y=f?1:r?-1:0,Se.isScrolling||(Se.margin=B.margin,Se.speed=B.speed,Se.start(t))}}};function Ze(n,t,o){return(I.string(n)?tt(n,t,o):n)||z(o)}function He(n){return I.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var pt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Se,Se.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Se.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Se.stop(),Se.interaction&&(Se.interaction=null)},"interactions:stop":Se.stop,"interactions:action-move":function(n){return Se.onInteractionMove(n)}}},vt=pt;function Tt(n,t){var o=!1;return function(){return o||(G.console.warn(t),o=!0),n.apply(this,arguments)}}function It(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function wt(n){return I.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Dt(n){return I.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ot={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var y=function(b,S,j,B,Q){var we=b.getRect(B),je=S.buttons||{0:1,1:4,3:8,4:16}[S.button],Pe={action:null,interactable:b,interaction:j,element:B,rect:we,buttons:je};return Q.fire("auto-start:check",Pe),Pe.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,y,this,f,u):y},t.prototype.ignoreFrom=Tt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Tt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Dt,t.prototype.styleCursor=wt}};function Bt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&qt(t,o,n,u)?n:null}function Ut(n,t,o,r,u,f,y){for(var b=0,S=r.length;b<S;b++){var j=r[b],B=u[b],Q=j.getAction(t,o,n,B);if(Q){var we=Bt(Q,j,B,f,y);if(we)return{action:we,interactable:j,element:B}}}return{action:null,interactable:null,element:null}}function Pt(n,t,o,r,u){var f=[],y=[],b=r;function S(B){f.push(B),y.push(b)}for(;I.element(b);){f=[],y=[],u.interactables.forEachMatch(b,S);var j=Ut(n,t,o,f,y,r,u);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;b=st(b)}return{action:null,interactable:null,element:null}}function Vt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,It(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,Dn(n,o),o.fire("autoStart:prepared",{interaction:n})}function qt(n,t,o,r){var u=n.options,f=u[o.name].max,y=u[o.name].maxPerElement,b=r.autoStart.maxInteractions,S=0,j=0,B=0;if(!(f&&y&&b))return!1;for(var Q=0,we=r.interactions.list;Q<we.length;Q++){var je=we[Q],Pe=je.prepared.name;if(je.interacting()&&(++S>=b||je.interactable===n&&((j+=Pe===o.name?1:0)>=f||je.element===t&&(B++,Pe===o.name&&B>=y))))return!1}return b>0}function wn(n,t){return I.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function fn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function Dn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var y=o.options[u.name].cursorChecker;f=I.func(y)?y(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}fn(n.element,f||"",t)}else t.autoStart.cursorElement&&fn(t.autoStart.cursorElement,"",t)}var Sn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ot),o.base.actionChecker=null,o.base.styleCursor=!0,Z(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return wn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Vt(o,Pt(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Vt(u,Pt(u,f,y,b,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,y=u.prepared.name;y&&f&&(f.options[y].manualStart||!qt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),Dn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&fn(o.element,"",t)}},maxInteractions:wn,withinInteractionLimit:qt,validateAction:Bt},hn=Sn,Tn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var y=Math.abs(u),b=Math.abs(f),S=o.interactable.options.drag,j=S.startAxis,B=y>b?"x":y<b?"y":"xy";if(o.prepared.axis=S.lockAxis==="start"?B[0]:S.lockAxis,B!=="xy"&&j!=="xy"&&j!==B){o.prepared.name=null;for(var Q=r,we=function(Pe){if(Pe!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&Pe.testIgnoreAllow(Ge,Q,r)){var it=Pe.getAction(o.downPointer,o.downEvent,o,Q);if(it&&it.name==="drag"&&function(ot,ht){if(!ht)return!1;var yt=ht.options.drag.startAxis;return ot==="xy"||yt==="xy"||yt===ot}(B,Pe)&&hn.validateAction(it,Pe,Q,r,t))return Pe}}};I.element(Q);){var je=t.interactables.forEachMatch(Q,we);if(je){o.prepared.name="drag",o.interactable=je,o.element=Q;break}Q=st(Q)}}}}}};function vn(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 In={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(hn),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=vn(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;vn(t)>0&&(t.prepared.name=null)}},getHoldDuration:vn},gn=In,Xn={id:"auto-start",install:function(n){n.usePlugin(hn),n.usePlugin(gn),n.usePlugin(Tn)}},Yn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):I.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Jn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var jn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Yn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var y=r.options.preventDefault;if(y!=="never")if(y!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var b=z(f.target).document,S=u.getDocOptions(b);if(!S||!S.events||S.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||I.element(f.target)&&q(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||ve(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Jn,n},{})};function Bn(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 mn(n){var t={};for(var o in n){var r=n[o];I.plainObject(r)?t[o]=mn(r):I.array(r)?t[o]=Ee(r):t[o]=r}return t}var zn=function(){function n(t){d(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=An(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return m(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,y=this.interaction,b=function(j){var B=j.interactable.options[j.prepared.name],Q=B.modifiers;return Q&&Q.length?Q:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(we){var je=B[we];return je&&je.enabled&&{options:je,methods:je._methods}}).filter(function(we){return!!we})}(y);this.prepareStates(b),this.startEdges=Z({},y.edges),this.edges=Z({},this.startEdges),this.startOffset=(r=y.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var S=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=An(),this.startAll(S),this.result=this.setAll(S)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,y=t.edges;t.coords=Z({},t.pageCoords),t.rect=Z({},f),t.edges=Z({},y);for(var b=u?this.states.slice(u):this.states,S=An(t.coords,t.rect),j=0;j<b.length;j++){var B,Q=b[j],we=Q.options,je=Z({},t.coords),Pe=null;(B=Q.methods)!=null&&B.set&&this.shouldDo(we,r,o)&&(t.state=Q,Pe=Q.methods.set(t),le(t.edges,t.rect,{x:t.coords.x-je.x,y:t.coords.y-je.y})),S.eventProps.push(Pe)}Z(this.edges,t.edges),S.delta.x=t.coords.x-t.pageCoords.x,S.delta.y=t.coords.y-t.pageCoords.y,S.rectDelta.left=t.rect.left-f.left,S.rectDelta.right=t.rect.right-f.right,S.rectDelta.top=t.rect.top-f.top,S.rectDelta.bottom=t.rect.bottom-f.bottom;var Ge=this.result.coords,it=this.result.rect;if(Ge&&it){var ot=S.rect.left!==it.left||S.rect.right!==it.right||S.rect.top!==it.top||S.rect.bottom!==it.bottom;S.changed=ot||Ge.x!==S.coords.x||Ge.y!==S.coords.y}return S}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,y=this.result,b=this.startDelta,S=y.delta;r==="start"&&Z(this.startDelta,y.delta);for(var j=0,B=[[f,b],[u,S]];j<B.length;j++){var Q=B[j],we=Q[0],je=Q[1];we.page.x+=je.x,we.page.y+=je.y,we.client.x+=je.x,we.client.y+=je.y}var Pe=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=Pe.left,Ge.right+=Pe.right,Ge.top+=Pe.top,Ge.bottom+=Pe.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,y=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=y,!y.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,S={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};y.coords.x+=S.x,y.coords.y+=S.y,y.delta.x+=S.x,y.delta.y+=S.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,y=0;y<u.length;y++){var b=u[y];t.state=b;var S=b.options,j=b.methods,B=j.beforeEnd&&j.beforeEnd(t);if(B)return this.endResult=B,!1;f=f||!f&&this.shouldDo(S,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=Z({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var y=f[u];r.state=y,y.methods.stop&&y.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,y=r.name;this.states.push({options:u,methods:f,index:o,name:y})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var y=f.startDelta,b=f.result,S=b.delta,j=b.rectDelta,B=0,Q=[[r.start,y],[r.cur,S]];B<Q.length;B++){var we=Q[B],je=we[0],Pe=we[1];je.page.x-=Pe.x,je.page.y-=Pe.y,je.client.x-=Pe.x,je.client.y-=Pe.y}u.left-=j.left,u.right-=j.right,u.top-=j.top,u.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return mn(o)}),this.result=An(Z({},t.result.coords),Z({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function An(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 an(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var y=f||{};for(var b in y.enabled=y.enabled!==!1,o)b in y||(y[b]=o[b]);var S={options:y,methods:r,name:t,enable:function(){return y.enabled=!0,S},disable:function(){return y.enabled=!1,S}};return S};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function Cn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var kt={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new zn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":Cn,"interactions:action-move":Cn,"interactions:action-end":Cn,"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)}}},Jt=kt,gt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Qn=function(n){D(o,n);var t=H(o);function o(r,u,f,y,b,S,j){var B;d(this,o),(B=t.call(this,r)).relatedTarget=null,B.screenX=void 0,B.screenY=void 0,B.button=void 0,B.buttons=void 0,B.ctrlKey=void 0,B.shiftKey=void 0,B.altKey=void 0,B.metaKey=void 0,B.page=void 0,B.client=void 0,B.delta=void 0,B.rect=void 0,B.x0=void 0,B.y0=void 0,B.t0=void 0,B.dt=void 0,B.duration=void 0,B.clientX0=void 0,B.clientY0=void 0,B.velocity=void 0,B.speed=void 0,B.swipe=void 0,B.axes=void 0,B.preEnd=void 0,b=b||r.element;var Q=r.interactable,we=(Q&&Q.options||gt).deltaSource,je=re(Q,b,f),Pe=y==="start",Ge=y==="end",it=Pe?O(B):r.prevEvent,ot=Pe?r.coords.start:Ge?{page:it.page,client:it.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return B.page=Z({},ot.page),B.client=Z({},ot.client),B.rect=Z({},r.rect),B.timeStamp=ot.timeStamp,Ge||(B.page.x-=je.x,B.page.y-=je.y,B.client.x-=je.x,B.client.y-=je.y),B.ctrlKey=u.ctrlKey,B.altKey=u.altKey,B.shiftKey=u.shiftKey,B.metaKey=u.metaKey,B.button=u.button,B.buttons=u.buttons,B.target=b,B.currentTarget=b,B.preEnd=S,B.type=j||f+(y||""),B.interactable=Q,B.t0=Pe?r.pointers[r.pointers.length-1].downTime:it.t0,B.x0=r.coords.start.page.x-je.x,B.y0=r.coords.start.page.y-je.y,B.clientX0=r.coords.start.client.x-je.x,B.clientY0=r.coords.start.client.y-je.y,B.delta=Pe||Ge?{x:0,y:0}:{x:B[we].x-it[we].x,y:B[we].y-it[we].y},B.dt=r.coords.delta.timeStamp,B.duration=B.timeStamp-B.t0,B.velocity=Z({},r.coords.velocity[we]),B.speed=dt(B.velocity.x,B.velocity.y),B.swipe=Ge||y==="inertiastart"?B.getSwipe():null,B}return m(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,y=202.5<=u&&u<337.5;return{up:y,down:!y&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(_e);Object.defineProperties(Qn.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 Mt=m(function n(t,o,r,u,f){d(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=r,this.downTime=u,this.downTarget=f}),yn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Nn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),on=0,Vn=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Tt(function(B){this.move(B)},"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=on++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var y=function(B){Object.defineProperty(o._proxy,B,{get:function(){return f[B]}})};for(var b in yn)y(b);var S=function(B){Object.defineProperty(o._proxy,B,{value:function(){return f[B].apply(f,arguments)}})};for(var j in Nn)S(j);this._scopeFire("interactions:new",{interaction:this})}return m(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(It(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?Z({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,y=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(u,f)>this.pointerMoveTolerance);var b,S,j,B=this.getPointerIndex(t),Q={pointer:t,pointerIndex:B,pointerInfo:this.pointers[B],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:y,interaction:this};y||(b=this.coords.velocity,S=this.coords.delta,j=Math.max(S.timeStamp/1e3,.001),b.page.x=S.page.x/j,b.page.y=S.page.y/j,b.client.x=S.client.x/j,b.client.y=S.client.y/j,b.timeStamp=j),this._scopeFire("interactions:move",Q),y||this.simulation||(this.interacting()&&(Q.type=null,this.move(Q)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||J(this.coords.delta),(t=Z({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var y=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(y),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:y,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=R(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:P(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,y,b,S=R(t),j=this.getPointerIndex(t),B=this.pointers[j];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),B?B.pointer=t:(B=new Mt(S,t,o,null,null),j=this.pointers.length,this.pointers.push(B)),pe(this.coords.cur,this.pointers.map(function(Q){return Q.pointer}),this._now()),f=this.coords.delta,y=this.coords.prev,b=this.coords.cur,f.page.x=b.page.x-y.page.x,f.page.y=b.page.y-y.page.y,f.client.x=b.client.x-y.client.x,f.client.y=b.client.y-y.client.y,f.timeStamp=b.timeStamp-y.timeStamp,u&&(this.pointerIsDown=!0,B.downTime=this.coords.cur.timeStamp,B.downTarget=r,C(this.downPointer,t),this.interacting()||(U(this.coords.start,this.coords.cur),U(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:B,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new Qn(this,t,this.prepared.name,o,this.element,r,u)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,r=t.phase,u=t.preEnd,f=t.type,y=this.rect;if(y&&r==="move"&&(le(this.edges,y,this.coords.delta[this.interactable.options.deltaSource]),y.width=y.right-y.left,y.height=y.bottom-y.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Zt(n){Kn(n.interaction)}function Kn(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return zt(n.coords.cur,t),zt(n.coords.delta,t),le(n.edges,n.rect,t),t.x=0,t.y=0,!0}function bn(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 zt(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}Nn.offsetBy="";var Gt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=bn},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&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Zt,"interactions:before-action-move":Zt,"interactions:before-action-end":function(n){var t=n.interaction;if(Kn(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}}},ln=Gt,Ct=function(){function n(t){d(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return m(n,[{key:"start",value:function(t){var o=this.interaction,r=At(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=dt(u.x,u.y),y=this.modification||(this.modification=new zn(o));if(y.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(y.result=y.setAll(this.modifierArg),!y.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,r=At(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var y=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},y.result=y.setAll(b),y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+y.result.delta.x,y:this.targetOffset.y+y.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=rt.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,y,b,S=this,j=this.interaction,B=At(j).resistance,Q=(j._now()-this.t0)/1e3;if(Q<this.te){var we,je=1-(Math.exp(-B*Q)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,y=this.modifiedOffset.y,we={x:Ht(b=je,t,r,f),y:Ht(b,o,u,y)}):we={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var Pe={x:we.x-this.currentOffset.x,y:we.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,j.offsetBy(Pe),j.move(),this.onNextFrame(function(){return S.inertiaTick()})}else j.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=At(o).smoothEndDuration;if(r<u){var f={x:$t(r,0,this.targetOffset.x,u),y:$t(r,0,this.targetOffset.y,u)},y={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=y.x,this.currentOffset.y+=y.y,o.offsetBy(y),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),U(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rt.cancel(this.timeout)}}]),n}();function At(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Wt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(ln),n.usePlugin(Jt),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 Ct(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;I.element(u);){if(u===t.element){r.resume(n);break}u=st(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":Cn,"interactions:action-inertiastart":Cn,"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 Ht(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function $t(n,t,o,r){return-o*(n/=r)*(n-2)+t}var cn=Wt;function rn(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var Un=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=Z({},t||{})}return m(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&rn(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&rn(t,o)}},{key:"on",value:function(t,o){var r=Te(t,o);for(t in r)this.types[t]=fe(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Te(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,y=r[t];f<y.length;f++){var b=y[f],S=u.indexOf(b);S!==-1&&u.splice(S,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Zn=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return m(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Wn(n){return I.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function ea(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Na={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:y,remove:b,addDelegate:function(B,Q,we,je,Pe){var Ge=Wn(Pe);if(!r[we]){r[we]=[];for(var it=0;it<u.length;it++){var ot=u[it];y(ot,we,S),y(ot,we,j,!0)}}var ht=r[we],yt=he(ht,function(_t){return _t.selector===B&&_t.context===Q});yt||(yt={selector:B,context:Q,listeners:[]},ht.push(yt)),yt.listeners.push({func:je,options:Ge})},removeDelegate:function(B,Q,we,je,Pe){var Ge,it=Wn(Pe),ot=r[we],ht=!1;if(ot)for(Ge=ot.length-1;Ge>=0;Ge--){var yt=ot[Ge];if(yt.selector===B&&yt.context===Q){for(var _t=yt.listeners,mt=_t.length-1;mt>=0;mt--){var xt=_t[mt];if(xt.func===je&&ea(xt.options,it)){_t.splice(mt,1),_t.length||(ot.splice(Ge,1),b(Q,we,S),b(Q,we,j,!0)),ht=!0;break}}if(ht)break}}},delegateListener:S,delegateUseCapture:j,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function y(B,Q,we,je){if(B.addEventListener){var Pe=Wn(je),Ge=he(o,function(it){return it.eventTarget===B});Ge||(Ge={eventTarget:B,events:{}},o.push(Ge)),Ge.events[Q]||(Ge.events[Q]=[]),he(Ge.events[Q],function(it){return it.func===we&&ea(it.options,Pe)})||(B.addEventListener(Q,we,f.supportsOptions?Pe:Pe.capture),Ge.events[Q].push({func:we,options:Pe}))}}function b(B,Q,we,je){if(B.addEventListener&&B.removeEventListener){var Pe=P(o,function(tn){return tn.eventTarget===B}),Ge=o[Pe];if(Ge&&Ge.events)if(Q!=="all"){var it=!1,ot=Ge.events[Q];if(ot){if(we==="all"){for(var ht=ot.length-1;ht>=0;ht--){var yt=ot[ht];b(B,Q,yt.func,yt.options)}return}for(var _t=Wn(je),mt=0;mt<ot.length;mt++){var xt=ot[mt];if(xt.func===we&&ea(xt.options,_t)){B.removeEventListener(Q,we,f.supportsOptions?_t:_t.capture),ot.splice(mt,1),ot.length===0&&(delete Ge.events[Q],it=!0);break}}}it&&!Object.keys(Ge.events).length&&o.splice(Pe,1)}else for(Q in Ge.events)Ge.events.hasOwnProperty(Q)&&b(B,Q,"all")}}function S(B,Q){for(var we=Wn(Q),je=new Zn(B),Pe=r[B.type],Ge=X(B)[0],it=Ge;I.element(it);){for(var ot=0;ot<Pe.length;ot++){var ht=Pe[ot],yt=ht.selector,_t=ht.context;if(q(it,yt)&&ve(_t,Ge)&&ve(_t,it)){var mt=ht.listeners;je.currentTarget=it;for(var xt=0;xt<mt.length;xt++){var tn=mt[xt];ea(tn.options,we)&&tn.func(je)}}}it=st(it)}}function j(B){return S(B,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},ca={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=ca.methodOrder;t<o.length;t++){var r=o[t],u=ca[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,y=u.interactions.list;f<y.length;f++){var b=y[f],S=r;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;S;){if(S===b.element)return b;S=st(S)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var y=0,b=f.interactions.list;y<b.length;y++){var S=b[y];if(S.pointerType===r){if(S.simulation&&!ba(S,o))continue;if(S.interacting())return S;t||(t=S)}}if(t)return t;for(var j=0,B=f.interactions.list;j<B.length;j++){var Q=B[j];if(!(Q.pointerType!==r||/down/i.test(u)&&Q.simulation))return Q}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ba(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ba(n,t){return n.pointers.some(function(o){return o.id===t})}var ua=ca,kn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ta(n,t){return function(o){var r=t.interactions.list,u=oe(o),f=X(o),y=f[0],b=f[1],S=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,B=o.changedTouches;j<B.length;j++){var Q=B[j],we={pointer:Q,pointerId:R(Q),pointerType:u,eventType:o.type,eventTarget:y,curEventTarget:b,scope:t},je=pa(we);S.push([we.pointer,we.eventTarget,we.curEventTarget,je])}}else{var Pe=!1;if(!te.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<r.length&&!Pe;Ge++)Pe=r[Ge].pointerType!=="mouse"&&r[Ge].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var it={pointer:o,pointerId:R(o),pointerType:u,eventType:o.type,curEventTarget:b,eventTarget:y,scope:t},ot=pa(it);S.push([it.pointer,it.eventTarget,it.curEventTarget,ot])}}for(var ht=0;ht<S.length;ht++){var yt=S[ht],_t=yt[0],mt=yt[1],xt=yt[2];yt[3][n](_t,o,mt,xt)}}}function pa(n){var t=n.pointerType,o=n.scope,r={interaction:ua.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function sn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,y=r.events,b=y[t];for(var S in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),y.delegatedEvents)b(o,S,y.delegateListener),b(o,S,y.delegateUseCapture,!0);for(var j=u&&u.events,B=0;B<f.length;B++){var Q=f[B];b(o,Q.type,Q.listener,j)}}var Va={id:"core/interactions",install:function(n){for(var t={},o=0;o<kn.length;o++){var r=kn[o];t[r]=ta(r,n)}var u,f=te.pEventTypes;function y(){for(var b=0,S=n.interactions.list;b<S.length;b++){var j=S[b];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var B=function(){var je=we[Q];n.documents.some(function(Pe){return ve(Pe.doc,je.downTarget)})||j.removePointer(je.pointer,je.event)},Q=0,we=j.pointers;Q<we.length;Q++)B()}}(u=_.PointerEvent?[{type:f.down,listener:y},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:y},{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(b){for(var S=0,j=n.interactions.list;S<j.length;S++)j[S].documentBlur(b)}}),n.prevTouchTime=0,n.Interaction=function(b){D(j,b);var S=H(j);function j(){return d(this,j),S.apply(this,arguments)}return m(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(B){n.interactions.pointerMoveTolerance=B}},{key:"_now",value:function(){return n.now()}}]),j}(Vn),n.interactions={list:[],new:function(b){b.scopeFire=function(j,B){return n.fire(j,B)};var S=new n.Interaction(b);return n.interactions.list.push(S),S},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(jn)},listeners:{"scope:add-document":function(n){return sn(n,"add")},"scope:remove-document":function(n){return sn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:sn,doOnInteractions:ta,methodNames:kn},Hn=Va,qn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(qn||{}),tr=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Un,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||r,this._win=z(lt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return m(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return I.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),I.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),I.func(o.onend)&&this.on("".concat(t,"end"),o.onend),I.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,y=(u=this._actions.map[t])==null?void 0:u.filterEventType,b=function(S){return(y==null||y(S))&&Bn(S,f._actions)};(I.array(o)||I.object(o))&&this._onOff(qn.Off,t,o,void 0,b),(I.array(r)||I.object(r))&&this._onOff(qn.On,t,r,void 0,b)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,y=this.options[t],b=o[f];f==="listeners"&&this.updatePerActionListeners(t,y.listeners,b),I.array(b)?y[f]=Ee(b):I.plainObject(b)?(y[f]=Z(y[f]||{},mn(b)),I.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(y[f].enabled=b.enabled!==!1)):I.bool(b)&&I.object(r.perAction[f])?y[f].enabled=b:y[f]=b}}},{key:"getRect",value:function(t){return t=t||(I.element(this.target)?this.target:null),I.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ye(t)}},{key:"rectChecker",value:function(t){var o=this;return I.func(t)?(this.getRect=function(r){var u=Z({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(lt(o)||I.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return I.string(t)?Array.from(this._context.querySelectorAll(t)):I.func(t)&&t.getAllElements?t.getAllElements():I.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ve(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!I.element(r)&&(I.string(t)?xe(r,t,o):!!I.element(t)&&ve(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!I.element(r))&&(I.string(t)?xe(r,t,o):!!I.element(t)&&ve(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){I.object(o)&&!I.array(o)&&(u=r,r=null);var y=Te(o,r,f);for(var b in y){b==="wheel"&&(b=te.wheelEvent);for(var S=0,j=y[b];S<j.length;S++){var B=j[S];Bn(b,this._actions)?this.events[t===qn.On?"on":"off"](b,B):I.string(this.target)?this._scopeEvents[t===qn.On?"addDelegate":"removeDelegate"](this.target,this._context,b,B,u):this._scopeEvents[t===qn.On?"add":"remove"](this.target,b,B,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(qn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(qn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in I.object(t)||(t={}),this.options=mn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,Z(Z({},o.perAction),o.actions[u])),this[f](t[u])}for(var y in t)y!=="getRect"?I.func(this[y])&&this[y](t[y]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(I.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,y=u.context,b=u.listeners;f===this.target&&y===this._context&&o.splice(r,1);for(var S=b.length-1;S>=0;S--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[S][0],b[S][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),nr=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,y=I.string(f)?o.selectorMap[f]:f[o.scope.id],b=P(y,function(S){return S===u});y.splice(b,1)}})}return m(n,[{key:"new",value:function(t,o){o=Z(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),I.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=I.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return he(f,function(y){return y._context===r&&(u||y.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],y=void 0;if((I.string(f.target)?I.element(t)&&q(t,f.target):t===f.target)&&f.inContext(t)&&(y=o(f)),y!==void 0)return y}}}]),n}(),ar=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=te,this.defaults=mn(gt),this.Eventable=Un,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(y,b){var S=r.interactables.getExisting(y,b);return S||((S=r.interactables.new(y,b)).events.global=f.globalEvents),S};return u.getPointerAverage=Y,u.getTouchBBox=ie,u.getTouchDistance=ge,u.getTouchAngle=$,u.getElementRect=Ye,u.getElementClientRect=Oe,u.matchesSelector=q,u.closest=Ue,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,y){return this.scope.usePlugin(f,y),this},u.isSet=function(f,y){return!!this.scope.interactables.get(f,y&&y.context)},u.on=Tt(function(f,y,b){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var S=0,j=f;S<j.length;S++){var B=j[S];this.on(B,y,b)}return this}if(I.object(f)){for(var Q in f)this.on(Q,f[Q],y);return this}return Bn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(y):this.globalEvents[f]=[y]:this.scope.events.add(this.scope.document,f,y,{options:b}),this},"The interact.on() method is being deprecated"),u.off=Tt(function(f,y,b){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var S=0,j=f;S<j.length;S++){var B=j[S];this.off(B,y,b)}return this}if(I.object(f)){for(var Q in f)this.off(Q,f[Q],y);return this}var we;return Bn(f,this.scope.actions)?f in this.globalEvents&&(we=this.globalEvents[f].indexOf(y))!==-1&&this.globalEvents[f].splice(we,1):this.scope.events.remove(this.scope.document,f,y,b),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return te.supportsTouch},u.supportsPointerEvent=function(){return te.supportsPointerEvent},u.stop=function(){for(var f=0,y=this.scope.interactions.list;f<y.length;f++)y[f].stop();return this},u.pointerMoveTolerance=function(f){return I.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,y){this.scope.addDocument(f,y)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Qn,this.Interactable=void 0,this.interactables=new nr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){D(f,r);var u=H(f);function f(){return d(this,f),u.apply(this,arguments)}return m(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(y){return V(E(f.prototype),"set",this).call(this,y),o.fire("interactable:set",{options:y,interactable:this}),this}},{key:"unset",value:function(){V(E(f.prototype),"unset",this).call(this);var y=o.interactables.list.indexOf(this);y<0||(o.interactables.list.splice(y,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(tr)}return m(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,I.window(r)&&w(r),_.init(r),te.init(r),rt.init(r),o.window=r,o.document=r.document,o.usePlugin(Hn),o.usePlugin(Na),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var r=0,u=this.listenerMaps.length,f=t.before.reduce(function(b,S){return b[S]=!0,b[wo(S)]=!0,b},{});r<u;r++){var y=this.listenerMaps[r].id;if(y&&(f[y]||f[wo(y)]))break}this.listenerMaps.splice(r,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var r=z(t);o=o?Z({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=z(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function wo(n){return n&&n.replace(/\/.*$/,"")}var Do=new ar,en=Do.interactStatic,or=typeof globalThis<"u"?globalThis:window;Do.init(or);var lr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,y=n.limits,b=y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:y,S=n.offset,j=S===void 0?{x:0,y:0}:S,B={range:f,grid:n,x:null,y:null},Q=0;Q<t.length;Q++){var we=t[Q],je=we[0],Pe=we[1],Ge=Math.round((r-j.x)/n[je]),it=Math.round((u-j.y)/n[Pe]);B[je]=Math.max(b.left,Math.min(b.right,Ge*n[je]+j.x)),B[Pe]=Math.max(b.top,Math.min(b.bottom,it*n[Pe]+j.y))}return B};return o.grid=n,o.coordFields=t,o}}),rr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=Z(t.snappers||{},lr),t.createSnapGrid=t.snappers.grid}},ir=rr,sr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,y=f.ratio,b=f.enabled,S=t.options,j=S.equalDelta,B=S.modifiers;y==="preserve"&&(y=o.width/o.height),t.startCoords=Z({},u),t.startRect=Z({},o),t.ratio=y,t.equalDelta=j;var Q=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var we=(Q.left?1:-1)*(Q.top?1:-1);t.edgeSign={x:we,y:we}}else t.edgeSign={x:Q.left?-1:1,y:Q.top?-1:1};if(b!==!1&&Z(r,Q),B!=null&&B.length){var je=new zn(n.interaction);je.copyFrom(n.interaction.modification),je.prepareStates(B),t.subModification=je,je.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=Z({},r),y=t.equalDelta?cr:ur;if(Z(n.edges,u),y(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var b=Z({},o);le(u,b,{x:r.x-f.x,y:r.y-f.y});var S=t.subModification.setAll(l(l({},n),{},{rect:b,edges:u,pageCoords:r,prevCoords:r,prevRect:b})),j=S.delta;return S.changed&&(y(t,Math.abs(j.x)>Math.abs(j.y),S.coords,S.rect),Z(r,S.coords)),S.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function cr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function ur(n,t,o,r){var u=n.startRect,f=n.startCoords,y=n.ratio,b=n.edgeSign;if(t){var S=r.width/y;o.y=f.y+(S-u.height)*b.y}else{var j=r.height*y;o.x=f.x+(j-u.width)*b.x}}var pr=an(sr,"aspectRatio"),Co=function(){};Co._defaults={};var Oa=Co;function na(n,t,o){return I.func(n)?at(n,t.interactable,t.element,[o.x,o.y,t]):at(n,t.interactable,t.element)}var Ma={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,y=r.options,b=y.elementRect,S=Z({left:0,top:0,right:0,bottom:0},y.offset||{});if(t&&b){var j=na(y.restriction,u,f);if(j){var B=j.right-j.left-t.width,Q=j.bottom-j.top-t.height;B<0&&(S.left+=B,S.right+=B),Q<0&&(S.top+=Q,S.bottom+=Q)}S.left+=o.left-t.width*b.left,S.top+=o.top-t.height*b.top,S.right+=o.right-t.width*(1-b.right),S.bottom+=o.bottom-t.height*(1-b.bottom)}r.offset=S},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,y=na(u.restriction,o,t);if(y){var b=function(S){return!S||"left"in S&&"top"in S||((S=Z({},S)).left=S.x||0,S.top=S.y||0,S.right=S.right||S.left+S.width,S.bottom=S.bottom||S.top+S.height),S}(y);t.x=Math.max(Math.min(b.right-f.right,t.x),b.left+f.left),t.y=Math.max(Math.min(b.bottom-f.bottom,t.y),b.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},dr=an(Ma,"restrict"),Eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function So(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var ka={noInner:Eo,noOuter:_o,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Le(na(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,y=u.options;if(o){var b=Z({},t),S=na(y.inner,r,b)||{},j=na(y.outer,r,b)||{};So(S,Eo),So(j,_o),o.top?t.y=Math.min(Math.max(j.top+f.top,b.y),S.top+f.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+f.bottom,b.y),S.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(j.left+f.left,b.x),S.left+f.left):o.right&&(t.x=Math.max(Math.min(j.right+f.right,b.x),S.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},fr=an(ka,"restrictEdges"),hr=Z({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ma.defaults),vr=an({start:Ma.start,set:Ma.set,defaults:hr},"restrictRect"),gr={width:-1/0,height:-1/0},mr={width:1/0,height:1/0},yr=an({start:function(n){return ka.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var y=ce(na(f.min,t,n.coords))||gr,b=ce(na(f.max,t,n.coords))||mr;o.options={endOnly:f.endOnly,inner:Z({},ka.noInner),outer:Z({},ka.noOuter)},u.top?(o.options.inner.top=r.bottom-y.height,o.options.outer.top=r.bottom-b.height):u.bottom&&(o.options.inner.bottom=r.top+y.height,o.options.outer.bottom=r.top+b.height),u.left?(o.options.inner.left=r.right-y.width,o.options.outer.left=r.right-b.width):u.right&&(o.options.inner.right=r.left+y.width,o.options.outer.right=r.left+b.width),ka.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),io={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,y=n.state,b=n.startOffset,S=y.options,j=S.offsetWithOrigin?function(we){var je=we.interaction.element,Pe=Le(at(we.state.options.origin,null,null,[je])),Ge=Pe||re(we.interactable,je,we.interaction.prepared.name);return Ge}(n):{x:0,y:0};if(S.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var B=at(S.offset,r,u,[o]);(t=Le(B)||{x:0,y:0}).x+=j.x,t.y+=j.y}var Q=S.relativePoints;y.offsets=f&&Q&&Q.length?Q.map(function(we,je){return{index:je,relativePoint:we,x:b.left-f.width*we.x+t.x,y:b.top-f.height*we.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,y=re(t.interactable,t.element,t.prepared.name),b=Z({},o),S=[];u.offsetWithOrigin||(b.x-=y.x,b.y-=y.y);for(var j=0,B=f;j<B.length;j++)for(var Q=B[j],we=b.x-Q.x,je=b.y-Q.y,Pe=0,Ge=u.targets.length;Pe<Ge;Pe++){var it=u.targets[Pe],ot=void 0;(ot=I.func(it)?it(we,je,t._proxy,Q,Pe):it)&&S.push({x:(I.number(ot.x)?ot.x:we)+Q.x,y:(I.number(ot.y)?ot.y:je)+Q.y,range:I.number(ot.range)?ot.range:u.range,source:it,index:Pe,offset:Q})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},yt=0;yt<S.length;yt++){var _t=S[yt],mt=_t.range,xt=_t.x-b.x,tn=_t.y-b.y,Kt=dt(xt,tn),un=Kt<=mt;mt===1/0&&ht.inRange&&ht.range!==1/0&&(un=!1),ht.target&&!(un?ht.inRange&&mt!==1/0?Kt/mt<ht.distance/ht.range:mt===1/0&&ht.range!==1/0||Kt<ht.distance:!ht.inRange&&Kt<ht.distance)||(ht.target=_t,ht.distance=Kt,ht.range=mt,ht.inRange=un,ht.delta.x=xt,ht.delta.y=tn)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),r.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},br=an(io,"snap"),za={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],io.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,y={x:r.x-f[0].x,y:r.y-f[0].y};o.options=Z({},u),o.options.targets=[];for(var b=0,S=u.targets||[];b<S.length;b++){var j=S[b],B=void 0;if(B=I.func(j)?j(y.x,y.y,t):j){for(var Q=0,we=o.targetFields;Q<we.length;Q++){var je=we[Q],Pe=je[0],Ge=je[1];if(Pe in B||Ge in B){B.x=B[Pe],B.y=B[Ge];break}}o.options.targets.push(B)}}var it=io.set(n);return o.options=u,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},kr=an(za,"snapSize"),so={aspectRatio:pr,restrictEdges:fr,restrict:dr,restrictRect:vr,restrictSize:yr,snapEdges:an({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],za.start(n)):null},set:za.set,defaults:Z(mn(za.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:br,snapSize:kr,spring:Oa,avoid:Oa,transform:Oa,rubberband:Oa},xr={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Jt),n.usePlugin(ir),t.modifiers=so,so){var r=so[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},wr=xr,To=function(n){D(o,n);var t=H(o);function o(r,u,f,y,b,S){var j;if(d(this,o),C(O(j=t.call(this,b)),f),f!==u&&C(O(j),u),j.timeStamp=S,j.originalEvent=f,j.type=r,j.pointerId=R(u),j.pointerType=oe(u),j.target=y,j.currentTarget=null,r==="tap"){var B=b.getPointerIndex(u);j.dt=j.timeStamp-b.pointers[B].downTime;var Q=j.timeStamp-b.tapTime;j.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===j.target&&Q<500}else r==="doubletap"&&(j.dt=u.timeStamp-b.tapTime,j.double=!0);return j}return m(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(_e),xa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=xa,n.defaults.actions.pointerEvents=xa.defaults,Z(n.actions.phaselessTypes,xa.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&co(n),Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget,S=o.pointerIndex,j=u.pointers[S].hold,B=qe(b),Q={interaction:u,pointer:f,event:y,eventTarget:b,type:"hold",targets:[],path:B,node:null},we=0;we<B.length;we++){var je=B[we];Q.node=je,r.fire("pointerEvents:collect-targets",Q)}if(Q.targets.length){for(var Pe=1/0,Ge=0,it=Q.targets;Ge<it.length;Ge++){var ot=it[Ge].eventable.options.holdDuration;ot<Pe&&(Pe=ot)}j.duration=Pe,j.timeout=setTimeout(function(){Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"hold"},r)},Pe)}})(n,t),Gn(n,t)},"interactions:up":function(n,t){co(n),Gn(n,t),function(o,r){var u=o.interaction,f=o.pointer,y=o.event,b=o.eventTarget;u.pointerWasMoved||Gn({interaction:u,eventTarget:b,pointer:f,event:y,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){co(n),Gn(n,t)}},PointerEvent:To,fire:Gn,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 Gn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=n.targets,S=b===void 0?Io(n,t):b,j=new To(y,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var B={interaction:o,pointer:r,event:u,eventTarget:f,targets:S,type:y,pointerEvent:j},Q=0;Q<S.length;Q++){var we=S[Q];for(var je in we.props||{})j[je]=we.props[je];var Pe=re(we.eventable,we.node);if(j._subtractOrigin(Pe),j.eventable=we.eventable,j.currentTarget=we.node,we.eventable.fire(j),j._addOrigin(Pe),j.immediatePropagationStopped||j.propagationStopped&&Q+1<S.length&&S[Q+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",B),y==="tap"){var Ge=j.double?Gn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):j;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return j}function Io(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,y=n.type,b=o.getPointerIndex(r),S=o.pointers[b];if(y==="tap"&&(o.pointerWasMoved||!S||S.downTarget!==f))return[];for(var j=qe(f),B={interaction:o,pointer:r,event:u,eventTarget:f,type:y,path:j,targets:[],node:null},Q=0;Q<j.length;Q++){var we=j[Q];B.node=we,t.fire("pointerEvents:collect-targets",B)}return y==="hold"&&(B.targets=B.targets.filter(function(je){var Pe,Ge;return je.eventable.options.holdDuration===((Pe=o.pointers[b])==null||(Ge=Pe.hold)==null?void 0:Ge.duration)})),B.targets}function co(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Dr=Object.freeze({__proto__:null,default:xa});function Cr(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Er={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(xa);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)]=Cr,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var y=f[0].eventable.options.holdRepeatInterval;y<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},y))}}})},_r=Er,Sr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return Z(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(y){var b=y.events,S=b.options;b.types[u]&&b.types[u].length&&y.testIgnoreAllow(S,r,f)&&o.push({node:r,eventable:b,props:{interactable:y}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;Z(o.events.options,t.pointerEvents.defaults),Z(o.events.options,r.pointerEvents||{})}}},Tr=Sr,Ir={id:"pointer-events",install:function(n){n.usePlugin(Dr),n.usePlugin(_r),n.usePlugin(Tr)}},Br=Ir,Ar={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var y=r.getAllElements(),b=f.window.Promise,S=b?[]:null,j=function(){var Q=y[B],we=r.getRect(Q);if(!we)return 1;var je,Pe=he(f.interactions.list,function(ot){return ot.interacting()&&ot.interactable===r&&ot.element===Q&&ot.prepared.name===u.name});if(Pe)Pe.move(),S&&(je=Pe._reflowPromise||new b(function(ot){Pe._reflowResolve=ot}));else{var Ge=ce(we),it=function(ot){return{coords:ot,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:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:f.now()});je=function(ot,ht,yt,_t,mt){var xt=ot.interactions.new({pointerType:"reflow"}),tn={interaction:xt,event:mt,pointer:mt,eventTarget:yt,phase:"reflow"};xt.interactable=ht,xt.element=yt,xt.prevEvent=mt,xt.updatePointer(mt,mt,yt,!0),J(xt.coords.delta),It(xt.prepared,_t),xt._doPhase(tn);var Kt=ot.window,un=Kt.Promise,En=un?new un(function(Rn){xt._reflowResolve=Rn}):void 0;return xt._reflowPromise=En,xt.start(_t,ht,yt),xt._interacting?(xt.move(tn),xt.end(mt)):(xt.stop(),xt._reflowResolve()),xt.removePointer(mt,mt),En}(f,r,Q,u,it)}S&&S.push(je)},B=0;B<y.length&&!j();B++);return S&&b.all(S).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Nr=Ar;if(en.use(jn),en.use(ln),en.use(Br),en.use(cn),en.use(wr),en.use(Xn),en.use(et),en.use(vt),en.use(Nr),en.default=en,c(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Ea,Ea.exports)),Ea.exports}var ed=Zp();const Qo=Ne.getDefaultExportFromCjs(ed),ao=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:s,emit:i}){const l=a,c=i,d=e.inject(Rl),x=e.inject(Ll);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const m=e.shallowRef(null),h=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let D=!1,E=!1,T=NaN,O=NaN,H=NaN,V=NaN,ke=-1,W=-1,K=-1,G=-1,w=l.x,z=l.y,k=l.w,A=l.h;const I=e.ref(),se=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:I,calcXY:at});function $e(v){Te(v)}function nt(){Xe()}function Ie(v){pn(l.isDraggable)&&(h.draggable=v)}function ze(v){pn(l.isResizable)&&(h.resizable=v)}function ue(v){pn(l.isBounded)&&(h.bounded=v)}function _(v){h.transformScale=v}function ne(v){h.rowHeight=v}function te(v){h.maxRows=v}function ve(){h.rtl=Yo()==="rtl",Xe()}function Ue(v){h.cols=Math.floor(v)}d.increaseItem(se),e.onBeforeMount(()=>{h.rtl=Yo()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Kl(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,pn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,pn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,pn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{w=l.x,z=l.y,A=l.h,k=l.w,nn(Ye)}),x.on("updateWidth",$e),x.on("compact",nt),x.on("setDraggable",Ie),x.on("setResizable",ze),x.on("setBounded",ue),x.on("setTransformScale",_),x.on("setRowHeight",ne),x.on("setMaxRows",te),x.on("directionchange",ve),x.on("setColNum",Ue)}),e.onBeforeUnmount(()=>{x.off("updateWidth",$e),x.off("compact",nt),x.off("setDraggable",Ie),x.off("setResizable",ze),x.off("setBounded",ue),x.off("setTransformScale",_),x.off("setRowHeight",ne),x.off("setMaxRows",te),x.off("directionchange",ve),x.off("setColNum",Ue),m.value&&(m.value.unset(),m.value=null),d.decreaseItem(se)}),s({state:h,wrapper:I});const st=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,q=e.computed(()=>h.resizable&&!l.static),M=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),ye=e.computed(()=>(h.draggable||h.resizable)&&!l.static),xe=Wp("item"),Re=e.computed(()=>({[xe.b()]:!0,[xe.bm("resizable")]:q.value,[xe.bm("static")]:l.static,[xe.bm("resizing")]:h.isResizing,[xe.bm("dragging")]:h.isDragging,[xe.bm("transform")]:h.useCssTransforms,[xe.bm("rtl")]:M.value,[xe.bm("no-touch")]:st&&ye.value})),Oe=e.computed(()=>[xe.be("resizer"),M.value&&xe.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,v=>{h.draggable=v}),e.watch(()=>l.static,()=>{nn(C),nn(J)}),e.watch(()=>h.draggable,()=>{nn(C)}),e.watch(()=>l.isResizable,v=>{h.resizable=v}),e.watch(()=>l.isBounded,v=>{h.bounded=v}),e.watch(()=>h.resizable,()=>{nn(J)}),e.watch(()=>h.rowHeight,()=>{nn(Ye),nn(qe)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{nn(J),nn(Ye),nn(qe)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(J)}),e.watch(M,()=>{nn(J),nn(Ye)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const v=d.margin;!v||v[0]===h.margin[0]&&v[1]===h.margin[1]||(h.margin=v.map(Number),nn(Ye),nn(qe))});function Ye(){l.x+l.w>h.cols?(w=0,k=l.w>h.cols?h.cols:l.w):(w=l.x,k=l.w);const v=tt(w,z,k,A);h.isDragging&&(v.top=h.dragging.top,M.value?v.right=h.dragging.left:v.left=h.dragging.left),h.isResizing&&(v.width=h.resizing.width,v.height=h.resizing.height);let F;h.useCssTransforms?M.value?F=$p(v.top,v.right,v.width,v.height):F=Fp(v.top,v.left,v.width,v.height):M.value?F=Kp(v.top,v.right,v.width,v.height):F=jp(v.top,v.left,v.width,v.height),h.style=F}function qe(){const v={};for(const F of["width","height"]){const ee=h.style[F].match(/^(\d+)px$/);if(!ee)return;v[F]=ee[1]}c("container-resized",l.i,l.h,l.w,v.height,v.width)}function lt(v){if(l.static)return;const F=v.type;if(F==="resizestart"&&h.isResizing||F!=="resizestart"&&!h.isResizing)return;const ee=Go(v);if(pn(ee))return;const{x:R,y:pe}=ee,L={width:0,height:0};let Y;switch(F){case"resizestart":{J(),ke=k,W=A,Y=tt(w,z,k,A),L.width=Y.width,L.height=Y.height,h.resizing=L,h.isResizing=!0;break}case"resizemove":{!v.edges.right&&!v.edges.left&&(H=R),!v.edges.top&&!v.edges.bottom&&(V=pe);const ie=Xo(H,V,R,pe);M.value?L.width=h.resizing.width-ie.deltaX/h.transformScale:L.width=h.resizing.width+ie.deltaX/h.transformScale,L.height=h.resizing.height+ie.deltaY/h.transformScale,h.resizing=L;break}case"resizeend":{Y=tt(w,z,k,A),L.width=Y.width,L.height=Y.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}Y=re(L.height,L.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),H=R,V=pe,(k!==Y.w||A!==Y.h)&&c("resize",l.i,Y.h,Y.w,L.height,L.width),v.type==="resizeend"&&(ke!==k||W!==A)&&c("resized",l.i,Y.h,Y.w,L.height,L.width),x.emit("resizeEvent",v.type,l.i,w,z,Y.h,Y.w)}function Z(v){if(l.static||h.isResizing)return;const F=v.type;if(F==="dragstart"&&h.isDragging||F!=="dragstart"&&!h.isDragging)return;const ee=Go(v);if(pn(ee))return;const{x:R,y:pe}=ee,L=v.target;if(!L.offsetParent)return;const Y={top:0,left:0};switch(F){case"dragstart":{K=w,G=z;const ge=L.offsetParent.getBoundingClientRect(),$=L.getBoundingClientRect(),oe=$.left/h.transformScale,X=ge.left/h.transformScale,_e=$.right/h.transformScale,fe=ge.right/h.transformScale,Ee=$.top/h.transformScale,P=ge.top/h.transformScale;M.value?Y.left=(_e-fe)*-1:Y.left=oe-X,Y.top=Ee-P,h.dragging=Y,h.isDragging=!0;break}case"dragmove":{const ge=Xo(T,O,R,pe);if(M.value?Y.left=h.dragging.left-ge.deltaX/h.transformScale:Y.left=h.dragging.left+ge.deltaX/h.transformScale,Y.top=h.dragging.top+ge.deltaY/h.transformScale,h.bounded){const $=L.offsetParent.clientHeight-ce(l.h,h.rowHeight,h.margin[1]);Y.top=le(Y.top,0,$);const oe=Le(),X=h.containerWidth-ce(l.w,oe,h.margin[0]);Y.left=le(Y.left,0,X)}h.dragging=Y;break}case"dragend":{const ge=L.offsetParent.getBoundingClientRect(),$=L.getBoundingClientRect(),oe=$.left/h.transformScale,X=ge.left/h.transformScale,_e=$.right/h.transformScale,fe=ge.right/h.transformScale,Ee=$.top/h.transformScale,P=ge.top/h.transformScale;M.value?Y.left=(_e-fe)*-1:Y.left=oe-X,Y.top=Ee-P,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let ie;M.value,ie=at(Y.top,Y.left),T=R,O=pe,(w!==ie.x||z!==ie.y)&&c("move",l.i,ie.x,ie.y),v.type==="dragend"&&(K!==w||G!==z)&&c("moved",l.i,ie.x,ie.y),x.emit("dragEvent",v.type,l.i,ie.x,ie.y,A,k)}function tt(v,F,ee,R){const pe=Le();let L;return M.value?L={right:Math.round(pe*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:ee===1/0?ee:Math.round(pe*ee+Math.max(0,ee-1)*h.margin[0]),height:R===1/0?R:Math.round(h.rowHeight*R+Math.max(0,R-1)*h.margin[1])}:L={left:Math.round(pe*v+(v+1)*h.margin[0]),top:Math.round(h.rowHeight*F+(F+1)*h.margin[1]),width:ee===1/0?ee:Math.round(pe*ee+Math.max(0,ee-1)*h.margin[0]),height:R===1/0?R:Math.round(h.rowHeight*R+Math.max(0,R-1)*h.margin[1])},L}function at(v,F){const ee=Le();let R=Math.round((F-h.margin[0])/(ee+h.margin[0])),pe=Math.round((v-h.margin[1])/(h.rowHeight+h.margin[1]));return R=Math.max(Math.min(R,h.cols-k),0),pe=Math.max(Math.min(pe,h.maxRows-A),0),{x:R,y:pe}}function Le(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ce(v,F,ee){return Number.isFinite(v)?Math.round(F*v+Math.max(0,v-1)*ee):v}function le(v,F,ee){return Math.max(Math.min(v,ee),F)}function re(v,F,ee=!1){const R=Le();let pe=Math.round((F+h.margin[0])/(R+h.margin[0])),L=0;return ee?L=Math.ceil((v+h.margin[1])/(h.rowHeight+h.margin[1])):L=Math.round((v+h.margin[1])/(h.rowHeight+h.margin[1])),pe=Math.max(Math.min(pe,h.cols-w),0),L=Math.max(Math.min(L,h.maxRows-z),0),{w:pe,h:L}}function Te(v,F){h.containerWidth=v}function Xe(){Ye()}function dt(){!m.value&&I.value&&(m.value=Qo(I.value),h.useStyleCursor||m.value.styleCursor(!1))}const g=Wo(Z);function C(){if(dt(),!!m.value)if(h.draggable&&!l.static){const v={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};m.value.draggable(v),D||(D=!0,m.value.on("dragstart dragmove dragend",F=>{F.type==="dragmove"?g(F):Z(F)}))}else m.value.draggable({enabled:!1})}const U=Wo(lt);function J(){if(dt(),!!m.value)if(h.resizable&&!l.static){const v=tt(0,0,l.maxW,l.maxH),F=tt(0,0,l.minW,l.minH),ee={edges:{left:M.value?`.${Oe.value[0]}`:!1,right:M.value?!1:`.${Oe.value[0]}`,bottom:`.${Oe.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:F.height*h.transformScale,width:F.width*h.transformScale},max:{height:v.height*h.transformScale,width:v.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(ee.modifiers=[Qo.modifiers.aspectRatio({ratio:"preserve"})]),m.value.resizable(ee),E||(E=!0,m.value.on("resizestart resizemove resizeend",R=>{R.type==="resizemove"?U(R):lt(R)}))}else m.value.resizable({enabled:!1})}return(v,F)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:I,class:e.normalizeClass(Re.value),style:e.normalizeStyle(h.style)},[e.renderSlot(v.$slots,"default"),q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Oe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),sa=typeof window<"u";var Zo;sa&&(Zo=window==null?void 0:window.navigator)!=null&&Zo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function el(a){return a!=null}function tl(){}const td=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(td)));const nd=sa&&("ontouchstart"in window||od()>0),ad=nd?"pointerdown":"click";function od(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function ld(a,s,i=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...x}=s;if(!el(l)||l==="")return!1;let m;return el(i)?m=new i(l,{bubbles:c,cancelable:d}):(m=document.createEvent("HTMLEvents"),m.initEvent(l,c,d)),Object.assign(m,x),a.dispatchEvent(m)}const rd="clickoutside",id=new Set;sa&&document.addEventListener(ad,a=>{const s=a.target,i=a.composedPath&&a.composedPath();id.forEach(l=>{l!==s&&(i?!i.includes(l):!l.contains(s))&&(!l.__transferElement||l.__transferElement!==s&&!l.__transferElement.contains(s))&&ld(l,{type:rd})})},!0);const sd=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Wa;if(sa){for(const a of sd)if(a[1]in document){Wa=a;break}}e.computed(()=>!1);const cd=new Set,ud=new WeakMap;if(sa&&Wa){const a=Wa[2],s=Wa[4];document.addEventListener(s,()=>{if(cd.forEach(i=>{i.value=!1}),document[a]){const i=ud.get(document[a]);i&&(i.value=!0)}},!1)}const Wl=new Map;Wl.set("x",0);Wl.set("y",0);var la=[],pd=function(){return la.some(function(a){return a.activeTargets.length>0})},dd=function(){return la.some(function(a){return a.skippedTargets.length>0})},nl="ResizeObserver loop completed with undelivered notifications.",fd=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:nl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=nl),window.dispatchEvent(a)},Ba;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ba||(Ba={}));var ra=function(a){return Object.freeze(a)},hd=function(){function a(s,i){this.inlineSize=s,this.blockSize=i,ra(this)}return a}(),Hl=function(){function a(s,i,l,c){return this.x=s,this.y=i,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ra(this)}return a.prototype.toJSON=function(){var s=this,i=s.x,l=s.y,c=s.top,d=s.right,x=s.bottom,m=s.left,h=s.width,D=s.height;return{x:i,y:l,top:c,right:d,bottom:x,left:m,width:h,height:D}},a.fromRect=function(s){return new a(s.x,s.y,s.width,s.height)},a}(),xo=function(a){return a instanceof SVGElement&&"getBBox"in a},ql=function(a){if(xo(a)){var s=a.getBBox(),i=s.width,l=s.height;return!i&&!l}var c=a,d=c.offsetWidth,x=c.offsetHeight;return!(d||x||a.getClientRects().length)},al=function(a){var s;if(a instanceof Element)return!0;var i=(s=a==null?void 0:a.ownerDocument)===null||s===void 0?void 0:s.defaultView;return!!(i&&a instanceof i.Element)},vd=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},Ia=typeof window<"u"?window:{},Fa=new WeakMap,ol=/auto|scroll/,gd=/^tb|vertical/,md=/msie|trident/i.test(Ia.navigator&&Ia.navigator.userAgent),On=function(a){return parseFloat(a||"0")},va=function(a,s,i){return a===void 0&&(a=0),s===void 0&&(s=0),i===void 0&&(i=!1),new hd((i?s:a)||0,(i?a:s)||0)},ll=ra({devicePixelContentBoxSize:va(),borderBoxSize:va(),contentBoxSize:va(),contentRect:new Hl(0,0,0,0)}),Gl=function(a,s){if(s===void 0&&(s=!1),Fa.has(a)&&!s)return Fa.get(a);if(ql(a))return Fa.set(a,ll),ll;var i=getComputedStyle(a),l=xo(a)&&a.ownerSVGElement&&a.getBBox(),c=!md&&i.boxSizing==="border-box",d=gd.test(i.writingMode||""),x=!l&&ol.test(i.overflowY||""),m=!l&&ol.test(i.overflowX||""),h=l?0:On(i.paddingTop),D=l?0:On(i.paddingRight),E=l?0:On(i.paddingBottom),T=l?0:On(i.paddingLeft),O=l?0:On(i.borderTopWidth),H=l?0:On(i.borderRightWidth),V=l?0:On(i.borderBottomWidth),ke=l?0:On(i.borderLeftWidth),W=T+D,K=h+E,G=ke+H,w=O+V,z=m?a.offsetHeight-w-a.clientHeight:0,k=x?a.offsetWidth-G-a.clientWidth:0,A=c?W+G:0,I=c?K+w:0,se=l?l.width:On(i.width)-A-k,$e=l?l.height:On(i.height)-I-z,nt=se+W+k+G,Ie=$e+K+z+w,ze=ra({devicePixelContentBoxSize:va(Math.round(se*devicePixelRatio),Math.round($e*devicePixelRatio),d),borderBoxSize:va(nt,Ie,d),contentBoxSize:va(se,$e,d),contentRect:new Hl(T,h,se,$e)});return Fa.set(a,ze),ze},Xl=function(a,s,i){var l=Gl(a,i),c=l.borderBoxSize,d=l.contentBoxSize,x=l.devicePixelContentBoxSize;switch(s){case Ba.DEVICE_PIXEL_CONTENT_BOX:return x;case Ba.BORDER_BOX:return c;default:return d}},yd=function(){function a(s){var i=Gl(s);this.target=s,this.contentRect=i.contentRect,this.borderBoxSize=ra([i.borderBoxSize]),this.contentBoxSize=ra([i.contentBoxSize]),this.devicePixelContentBoxSize=ra([i.devicePixelContentBoxSize])}return a}(),Yl=function(a){if(ql(a))return 1/0;for(var s=0,i=a.parentNode;i;)s+=1,i=i.parentNode;return s},bd=function(){var a=1/0,s=[];la.forEach(function(d){if(d.activeTargets.length!==0){var x=[];d.activeTargets.forEach(function(m){var h=new yd(m.target),D=Yl(m.target);x.push(h),m.lastReportedSize=Xl(m.target,m.observedBox),D<a&&(a=D)}),s.push(function(){d.callback.call(d.observer,x,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var i=0,l=s;i<l.length;i++){var c=l[i];c()}return a},rl=function(a){la.forEach(function(s){s.activeTargets.splice(0,s.activeTargets.length),s.skippedTargets.splice(0,s.skippedTargets.length),s.observationTargets.forEach(function(i){i.isActive()&&(Yl(i.target)>a?s.activeTargets.push(i):s.skippedTargets.push(i))})})},kd=function(){var a=0;for(rl(a);pd();)a=bd(),rl(a);return dd()&&fd(),a>0},po,Jl=[],xd=function(){return Jl.splice(0).forEach(function(a){return a()})},wd=function(a){if(!po){var s=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return xd()}).observe(i,l),po=function(){i.textContent="".concat(s?s--:s++)}}Jl.push(a),po()},Dd=function(a){wd(function(){requestAnimationFrame(a)})},Ha=0,Cd=function(){return!!Ha},Ed=250,_d={attributes:!0,characterData:!0,childList:!0,subtree:!0},il=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sl=function(a){return a===void 0&&(a=0),Date.now()+a},fo=!1,Sd=function(){function a(){var s=this;this.stopped=!0,this.listener=function(){return s.schedule()}}return a.prototype.run=function(s){var i=this;if(s===void 0&&(s=Ed),!fo){fo=!0;var l=sl(s);Dd(function(){var c=!1;try{c=kd()}finally{if(fo=!1,s=l-sl(),!Cd())return;c?i.run(1e3):s>0?i.run(s):i.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var s=this,i=function(){return s.observer&&s.observer.observe(document.body,_d)};document.body?i():Ia.addEventListener("DOMContentLoaded",i)},a.prototype.start=function(){var s=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),il.forEach(function(i){return Ia.addEventListener(i,s.listener,!0)}))},a.prototype.stop=function(){var s=this;this.stopped||(this.observer&&this.observer.disconnect(),il.forEach(function(i){return Ia.removeEventListener(i,s.listener,!0)}),this.stopped=!0)},a}(),mo=new Sd,cl=function(a){!Ha&&a>0&&mo.start(),Ha+=a,!Ha&&mo.stop()},Td=function(a){return!xo(a)&&!vd(a)&&getComputedStyle(a).display==="inline"},Id=function(){function a(s,i){this.target=s,this.observedBox=i||Ba.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var s=Xl(this.target,this.observedBox,!0);return Td(this.target)&&(this.lastReportedSize=s),this.lastReportedSize.inlineSize!==s.inlineSize||this.lastReportedSize.blockSize!==s.blockSize},a}(),Bd=function(){function a(s,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=s,this.callback=i}return a}(),$a=new WeakMap,ul=function(a,s){for(var i=0;i<a.length;i+=1)if(a[i].target===s)return i;return-1},ja=function(){function a(){}return a.connect=function(s,i){var l=new Bd(s,i);$a.set(s,l)},a.observe=function(s,i,l){var c=$a.get(s),d=c.observationTargets.length===0;ul(c.observationTargets,i)<0&&(d&&la.push(c),c.observationTargets.push(new Id(i,l&&l.box)),cl(1),mo.schedule())},a.unobserve=function(s,i){var l=$a.get(s),c=ul(l.observationTargets,i),d=l.observationTargets.length===1;c>=0&&(d&&la.splice(la.indexOf(l),1),l.observationTargets.splice(c,1),cl(-1))},a.disconnect=function(s){var i=this,l=$a.get(s);l.observationTargets.slice().forEach(function(c){return i.unobserve(s,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Ad=function(){function a(s){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof s!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ja.connect(this,s)}return a.prototype.observe=function(s,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(s))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.observe(this,s,i)},a.prototype.unobserve=function(s){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(s))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ja.unobserve(this,s)},a.prototype.disconnect=function(){ja.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const oo=new WeakMap;function Nd(a){var s;for(let i=0,l=a.length;i<l;++i){const c=a[i],d=oo.get(c.target);if(typeof d=="function"){const{inlineSize:x,blockSize:m}=((s=c.borderBoxSize)==null?void 0:s[0])??{},{offsetWidth:h,offsetHeight:D}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:D,width:x??h,height:m??D}))}}}const Ql=new(sa&&window.ResizeObserver||Ad)(Nd);function pl(a,s){oo.set(a,s),Ql.observe(a)}function dl(a){oo.has(a)&&(Ql.unobserve(a),oo.delete(a))}function Vd(a={}){let s=tl;const i=e.watch(()=>e.unref(a.target),c=>{s(),!(!c||typeof a.onResize!="function")&&(pl(c,a.onResize),s=()=>{dl(c),s=tl})},{immediate:!0}),l=()=>{i(),s()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:pl,unobserveResize:dl,unobserve:l}}const Od=e.ref(!1);e.computed(()=>Od.value);const fl="__theme_style__",ho="__theme_observer__",hl=e.reactive(new Map),vl=new Map;e.watch(hl,()=>{if(!sa)return;vl.clear();const a=document.head.querySelector(`#${fl}`);a&&document.head.removeChild(a);const s=document.createElement("style");let i=`.${ho} { width: 1px }`,l=1;for(const[c,[d,x]]of hl.entries())i+=` html.${d} .${ho}, .${x} .${ho} { width: ${++l}px }`,vl.set(l,c);s.textContent=i,s.id=fl,document.head.appendChild(s)});const Zl=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:s,emit:i}){const l=a,c=i,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,m=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:E}=Vd(),T=Vp();T.on("resizeEvent",O),T.on("dragEvent",H),e.onBeforeMount(()=>{c("layout-before-mount",m.value)}),e.onMounted(()=>{c("layout-mounted",m.value),e.nextTick(()=>{Up(m.value),d.originalLayout=m.value,e.nextTick(()=>{$e(),h.value&&D(h.value,Op(w,16)),da(m.value,l.verticalCompact),c("layout-updated",m.value),G(),w()})})}),e.onBeforeUnmount(()=>{T.clearAll(),h.value&&E(h.value)});function O(Ie,ze,ue,_,ne,te){I(Ie,ze,ue,_,ne,te)}function H(Ie,ze,ue,_,ne,te){A(Ie,ze,ue,_,ne,te)}e.watch(()=>d.width,(Ie,ze)=>{e.nextTick(()=>{T.emit("updateWidth",Ie),ze===-1&&e.nextTick(()=>{c("layout-ready",m.value)}),G()})}),e.watch(()=>[l.layout,l.layout.length],()=>{m.value=l.layout,K()}),e.watch(()=>l.colNum,Ie=>{T.emit("setColNum",Ie)}),e.watch(()=>l.rowHeight,Ie=>{T.emit("setRowHeight",Ie)}),e.watch(()=>l.isDraggable,Ie=>{T.emit("setDraggable",Ie)}),e.watch(()=>l.isResizable,Ie=>{T.emit("setResizable",Ie)}),e.watch(()=>l.isBounded,Ie=>{T.emit("setBounded",Ie)}),e.watch(()=>l.transformScale,Ie=>{T.emit("setTransformScale",Ie)}),e.watch(()=>l.responsive,Ie=>{Ie||(c("update:layout",d.originalLayout),T.emit("setColNum",l.colNum)),w()}),e.watch(()=>l.maxRows,Ie=>{T.emit("setMaxRows",Ie)}),e.watch([()=>l.margin,()=>l.margin[1]],G),e.provide(Rl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:V,decreaseItem:ke})),e.provide(Ll,T),s({state:d,getItem:W,resizeEvent:I,dragEvent:A,layoutUpdate:K});function V(Ie){x.set(Ie.i,Ie)}function ke(Ie){x.delete(Ie.i)}function W(Ie){return x.get(Ie)}function K(){if(!pn(m.value)&&!pn(d.originalLayout)){if(m.value.length!==d.originalLayout.length){const Ie=nt(m.value,d.originalLayout);if(Ie.length>0)if(m.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Ie);else{const ze=new Set(Ie.map(ue=>ue.i));d.originalLayout=d.originalLayout.filter(ue=>!ze.has(ue.i))}d.lastLayoutLength=m.value.length,$e()}da(m.value,l.verticalCompact),T.emit("updateWidth",d.width),G(),c("layout-updated",m.value)}}function G(){d.mergedStyle={height:z()}}function w(){h.value&&(d.width=h.value.offsetWidth),T.emit("resizeEvent")}function z(){if(!l.autoSize)return;const Ie=parseFloat(l.margin[1]);return zp(m.value)*(l.rowHeight+Ie)+Ie+"px"}let k;function A(Ie,ze,ue,_,ne,te){let ve=Ho(m.value,ze);pn(ve)&&(ve={h:0,w:0,x:0,y:0,i:""}),Ie==="dragstart"&&!l.verticalCompact&&(k=m.value.reduce((Ue,{i:st,x:q,y:M})=>({...Ue,[st]:{x:q,y:M}}),{})),Ie==="dragmove"||Ie==="dragstart"?(d.placeholder.i=ze,d.placeholder.x=ve.x,d.placeholder.y=ve.y,d.placeholder.w=te,d.placeholder.h=ne,e.nextTick(()=>{d.isDragging=!0}),T.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),m.value=go(m.value,ve,ue,_,!0,l.preventCollision),l.restoreOnDrag?(ve.static=!0,da(m.value,l.verticalCompact,k),ve.static=!1):da(m.value,l.verticalCompact),T.emit("compact"),G(),Ie==="dragend"&&(k=void 0,c("layout-updated",m.value))}function I(Ie,ze,ue,_,ne,te){let ve=Ho(m.value,ze);pn(ve)&&(ve={h:0,w:0,x:0,y:0,i:""});let Ue;if(l.preventCollision){const st=Fl(m.value,{...ve,w:te,h:ne}).filter(q=>q.i!==ve.i);if(Ue=st.length>0,Ue){let q=1/0,M=1/0;st.forEach(ye=>{ye.x>ve.x&&(q=Math.min(q,ye.x)),ye.y>ve.y&&(M=Math.min(M,ye.y))}),Number.isFinite(q)&&(ve.w=q-ve.x),Number.isFinite(M)&&(ve.h=M-ve.y)}}Ue||(ve.w=te,ve.h=ne),Ie==="resizestart"||Ie==="resizemove"?(d.placeholder.i=ze,d.placeholder.x=ue,d.placeholder.y=_,d.placeholder.w=ve.w,d.placeholder.h=ve.h,e.nextTick(()=>{d.isDragging=!0}),T.emit("updateWidth",d.width)):Ie&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&se(),da(m.value,l.verticalCompact),T.emit("compact"),G(),Ie==="resizeend"&&c("layout-updated",m.value)}function se(){const Ie=Gp(l.breakpoints,d.width);if(Ie===d.lastBreakpoint)return;const ze=Kl(Ie,l.cols);!pn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=vo(m.value));const ue=Xp(d.originalLayout,d.layouts,l.breakpoints,Ie,d.lastBreakpoint,ze,l.verticalCompact);d.layouts[Ie]=ue,d.lastBreakpoint!==Ie&&c("breakpoint-changed",Ie,ue),m.value=ue,c("update:layout",ue),d.lastBreakpoint=Ie,T.emit("setColNum",ze)}function $e(){d.layouts=Object.assign({},l.responsiveLayouts)}function nt(Ie,ze){const ue=new Set(ze.map(ve=>ve.i)),_=new Set(Ie.map(ve=>ve.i)),ne=Ie.filter(ve=>!ue.has(ve.i)),te=ze.filter(ve=>!_.has(ve.i));return ne.concat(te)}return(Ie,ze)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Ie.$slots.default?e.renderSlot(Ie.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(m.value,ue=>(e.openBlock(),e.createBlock(ao,e.mergeProps({key:ue.i,ref_for:!0},ue),{default:e.withCtx(()=>[e.renderSlot(Ie.$slots,"item",{item:ue})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ao,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(s){console.error("vite-plugin-css-injected-by-js",s)}})();const Md={key:0,class:"item-view-group"},zd={key:0,class:"item-view-group"},Rd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:s}){const i=jt.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(i),c=s,d=a,x=e.computed(()=>d==null?void 0:d.children),m=e.computed(()=>{var O,H,V,ke;return((O=d==null?void 0:d.children)==null?void 0:O.length)>0&&((H=d==null?void 0:d.children)!=null&&H.every(W=>W==null?void 0:W.layout))?(ke=(V=d==null?void 0:d.children)==null?void 0:V[0])==null?void 0:ke.layout:"vertical"}),h=e.computed(()=>{var O,H;return((H=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:H.isGridLayout)||!1}),D=e.ref((d==null?void 0:d.level)+1),E=O=>{c("rowClick",O)},T=(O,H)=>{c("routeUrl",O,H)};return(O,H)=>h.value?(e.openBlock(),e.createBlock(e.unref(Zl),{key:0,layout:x.value,"onUpdate:layout":H[0]||(H[0]=V=>x.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(x.value,(V,ke)=>(e.openBlock(),e.createBlock(e.unref(ao),{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 W,K,G,w,z,k,A,I,se,$e,nt,Ie,ze;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((G=(K=V==null?void 0:V.component)==null?void 0:K.comp)==null?void 0:G.toUpperCase())!=="TABLE"&&((w=V==null?void 0:V.component)!=null&&w.name)?(e.openBlock(),e.createElementBlock("div",Md,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((z=V==null?void 0:V.component)==null?void 0:z.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)((k=V==null?void 0:V.component)==null?void 0:k.comp)),{pageLayout:m.value,config:{showIndex:(A=e.unref(bt)[ke])==null?void 0:A.showIndex,allowMove:(I=e.unref(bt)[ke])==null?void 0:I.allowMove,viewport:(se=e.unref(bt)[ke])==null?void 0:se.viewport},compName:V==null?void 0:V.component.name,compNames:e.unref(bo),itemData:($e=V==null?void 0:V.component)==null?void 0:$e.compData,childItemData:(nt=V==null?void 0:V.component)==null?void 0:nt.itemChildData,key:e.unref(ga),cacheNewData:e.unref(Za),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:(Ie=V==null?void 0:V.component)==null?void 0:Ie.tableId,allMapContents:e.unref(Ja),children:(ze=V==null?void 0:V.component)==null?void 0:ze.children,level:D.value,onRowClick:E,onRouteUrl:T,onClickTrigger:e.unref(Bl),onClickMainKey:e.unref(Al)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d==null?void 0:d.children,(V,ke)=>{var W,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((W=d==null?void 0:d.children)==null?void 0:W.length)-1?"0px":"24px"})},[((K=V==null?void 0:V.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&V.name?(e.openBlock(),e.createElementBlock("div",zd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"0px":"8px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(V.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qa)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:e.unref(ga),onChange:e.unref(eo),index:(V==null?void 0:V.id)??ke,onContentChange:e.unref(to),onPageChange:e.unref(no),parentTableId:V==null?void 0:V.tableId,allMapContents:e.unref(Ja),children:V==null?void 0:V.children,level:D.value,onRowClick:E,onRouteUrl:T},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Ld=Lt._export_sfc(Rd,[["__scopeId","data-v-3babf83a"]]),er=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"}]),Pd={TABLE:fa.ssTable,FORM:Vo,TABLEOPERATE:ji,TABLESTYLE:os,TABLEEXTEND:rs,TABLEINTERACTION:cs,FORMOPERATE:Oo,FOLD:Ps,CALCULATOR:Ws,METHODBUTTON:uc,AVATARUPLOAD:No.ssAvatar,SIGNATURE:No.ssSignature,FORMTOP:Vo,STEP:wc,STEPOPERATE:Bs,TIMELINE:Tc,TIMELINEOPERATE:zs,FORMTOPOPERATE:Oo,SIGNATUREOPERATE:bc,AVATARUPLOADOPERATE:fc,TABS:Ac,TABSOPERATE:gu,CHART:Bu,CHARTOPERATE:$u,LAYOUT:xp,LAYOUTOPERATE:Bp,PARENTITEM:Ld};function ya(a){return Pd[a==null?void 0:a.toUpperCase()]||null}exports.De=Zl;exports.activeStepInfo=ha;exports.affixItems=ap;exports.allMapContents=Ja;exports.cacheNewData=Za;exports.checkForTableContents=tc;exports.checkIsQuote=Ys;exports.checkIsShowGroup=Hs;exports.checkIsShowGroupForm=Xs;exports.checkIsShowTable=Zs;exports.checkIsTableCheck=Gs;exports.checkIsUsingGroup=qs;exports.clickMainKey=Al;exports.clickSavePage=np;exports.clickStep=Vl;exports.clickTrigger=Bl;exports.compId=ga;exports.compNames=bo;exports.compShow=Ya;exports.contentTransArray=Da;exports.contentTransArrayToAll=_a;exports.contentTransArrayToAllNoExtra=Ga;exports.existLayouts=dp;exports.formToExtraContent=ec;exports.generateLayouts=es;exports.getComponent=ya;exports.getComponents=Qa;exports.getExtraContents=ac;exports.getSliceContLength=gp;exports.gridRowHeight=Xi;exports.isStepLayout=ko;exports.newContentTransArrayToAllNoExtra=Qs;exports.onBack=ep;exports.onChange=eo;exports.onClick=tp;exports.onContentChange=to;exports.onExtendTaskEnd=pp;exports.onPageBack=fp;exports.onPageChange=no;exports.onSaveBack=El;exports.onSelectFixContent=Zu;exports.renderShowItems=Sl;exports.showItems=bt;exports.sliceTableLength=Tl;exports.slotContent=er;exports.st=ao;exports.stepItems=mp;exports.toolBar=Fn;exports.verifyButton=hp;